One instruction or two?
The Gekko has a fused multiply-add: fmadds f1, fA, fC, fB computes fA*fC + fB in a single instruction (and a single rounding step). When fp_contract is on — our default — MWCC contracts a multiply-then-add pattern into exactly that.
Consider scaleshift(f32 x, f32 scale, f32 offset) — multiply x by a scale then add an offset. With fp_contract on:
fmadds f1, f1, f2, f3 # x*scale + offset, fused
blr
Turn fp_contract off and the compiler is forbidden from fusing; you get the multiply and the add as two instructions with two roundings:
fmuls f0, f1, f2 # x*scale
fadds f1, f3, f0 # + offset
blr
This matters constantly in decomp: if a target shows a bare fmuls immediately followed by fadds where you expected an fmadds, the original translation unit very likely had fp_contract disabled. Reproduce it with the in-code pragma rather than guessing at a different expression.
The #pragma fp_contract off / reset lines are part of both the starter and the solution, and apply to the target, so just write the arithmetic body.
Your task
Write madd(f32 a, f32 b, f32 c) so it compiles to the separate fmuls and fadds above — not the fused fmadds. Look at the function signature to determine what arithmetic to express.