Two forms of register add
Thumb's register add has two forms. The three-operand form names a separate destination:
0 add r0, r1, r2
2 bx lr
add r0, r1, r2 is r0 = r1 + r2. This function returns the sum of its second and third arguments, and the result goes into r0, ready to return. Neither source register is changed.
You will see the two-operand form much more often:
0 add r0, r1
2 bx lr
That is r0 = r0 + r1. It is the same addition with one fewer operand to encode, and r0's old value is overwritten. The compiler uses this form whenever it does not need the original value again. In a short function, that is most of the time.
Look at your target. Work out which two registers it adds, and which register the result ends up in.
Your task
Write add2, taking two s32s, to reproduce the target assembly.