One instruction, no zero needed
Plenty of ISAs negate a number by subtracting it from zero. PowerPC doesn't bother — there's neg rD, rA, meaning rD = -rA, one instruction that flips the sign without touching a zero register.
Negating the second of two int arguments:
neg r3, r4
blr
rA is r4, the second argument, and the result settles into r3, ready to hand back.
You'll see this habit everywhere: where a dedicated instruction exists, MWCC uses it rather than building the operation from smaller pieces. Learning to recognize those idioms is most of the job.
The target gives you rD = -rA; the C expression follows from that.
Your task
Write negate, taking an int x, to match the target assembly.