Dividing unsigned is just a shift
For an unsigned value, dividing by a power of two is a logical right shift, srwi — yet another face of rlwinm. No rounding fix is needed: unsigned division truncates toward zero, and the shift simply discards the low bits that would have been the remainder.
Run udiv8(n) = n / 8 through the compiler and you get:
srwi r3, r3, 3 # n >> 3 == n / 8 (unsigned)
blr
The shift count is log₂ of the divisor: 2^3 = 8 means a shift of 3. So a target that shifts right by N is dividing by 2^N, and the shift count alone hands you the divisor.
Signed division by a power of two is a different beast — it has to round toward zero for negative inputs, so instead of one clean shift MWCC emits a srawi/addze correction pair. That's the next lesson.
Your task
(u32 is the GameCube SDK's typedef for unsigned int — it's pre-declared for you here, not a built-in C type.)
Write func_802f0570 to reproduce the assembly above.