Flipping bits
eor is the third member of the family, with the same shape as and and orr: eor Rd, Rs means Rd ^= Rs, no immediate form, constant in the destination. Against another register it is one instruction:
0 eor r0, r1
2 bx lr
Read that as "which bits of these two differ". Against a constant you pay for the constant, plus the evacuating mov if the value came in as argument one:
0 mov r1, r0
2 mov r0, #128
4 eor r0, r1
6 bx lr
What makes eor different from its siblings is that it is its own inverse. Apply the same mask twice and you are back where you started, and gcc 2.9 knows it. A function that flips 0x3C and then flips 0x3C again compiles to this:
0 bx lr
The whole body is gone. That is worth internalising early: if your C contains an identity the compiler can see through, the instructions you were expecting will not be there.
The other thing you will meet constantly on the GBA is a bit chosen at run time rather than written as a literal. There is no constant to build then — the mask is computed, by putting a 1 in a register and shifting it up. When you see a mov rN, #1 followed by a shift whose amount is a register, read the pair as one value: the single bit at that position.
Your task
Write func_080d7678 to reproduce the target assembly.