Where arguments come from
The rule for arguments is short. The first four arguments arrive in r0, r1, r2, r3, from left to right. Any arguments after the fourth go on the stack, which a later chapter covers.
The first argument register and the return register are the same register. This has a consequence that is worth seeing now. Here are two functions that each return one of their two arguments:
0 mov r0, r1
2 bx lr
This one returns its second argument. The value is in r1 and has to end up in r0, so one mov copies it across. The other function returns its first argument, and its whole body is this:
0 bx lr
There is nothing else. The value was already in the register it had to be returned in, so the compiler emitted no other instructions. A bare bx lr is a complete, valid function. When you see one, ask what the input and output must be for the function to have no work to do.
Your task
Write identity, taking an s32 x, to reproduce the target assembly.