When the multiply runs first
* outranks + and −, so a mixed expression always does the multiply before the add. Whether the multiply is on the left or right of the sum doesn't matter. The mullw still comes out first, even with the multiply written last.
Take bias_scaled(p, q, r), subtracting a scaled value from a base:
mullw r0, r4, r5 # r0 = q * r
subf r3, r0, r3 # r3 = r3 - r0 = p - (q * r)
blr
mullw builds q * r from the second and third arguments, r4 and r5. subf then subtracts that from r3. Mind the reversal: subf rD, rA, rB is rB − rA, so subf r3, r0, r3 works out to r3 − r0, i.e. p − (q * r).
Spot it by the registers: mullw only ever touches r4 and r5; the first argument r3 waits until the second instruction.
Read the target the same way, working out which two registers feed the mullw and which argument register surfaces only in the second instruction.
Your task
Write func_8010f884 to reproduce the assembly above.