One instruction flips the sign
Plenty of chips negate a number by subtracting it from zero. Thumb skips all that with neg Rd, Rs, meaning Rd = -Rs — one instruction that flips the sign without ever materializing a zero.
Say some function takes two ints and returns the negation of the second one. It compiles down to this:
neg r0, r1
bx lr
So Rs is r1, the second argument, and Rd = -Rs settles into r0, ready to hand back.
You will meet this habit constantly: where a dedicated instruction exists, agbcc reaches for it rather than building the operation out of smaller pieces, and learning to recognize those idioms is honestly most of the work.
Run Rd = -Rs against the target and the C expression you need falls right out.
Your task
Write negate, taking an int x, to match the target assembly.