li the divisor, then divw
Division is the one basic operation with no immediate form — nothing lets you divide "by this number" from inside the instruction. So to divide by a constant, the compiler first drops it into a register with li ("load immediate"), then runs the real divide, divw ("divide word").
sixth(n) = n / 6 comes out as a plain pair:
li r0, 6 # load the divisor
divw r3, r3, r0 # r3 = r3 / 6
blr
The li names the divisor outright — it's the number being loaded. divw does signed division and throws the remainder away.
We've eased this lesson's optimizer back a notch to keep the divide this honest. At the setting the rest of the course runs under, dividing by a constant turns into something far stranger — you'll pull that apart later.
Your task
Write divConst, taking an int a, to reproduce the target assembly.