The instruction that clears flags
bic Rd, Rs computes Rd &= ~Rs. The complement is free, folded into the instruction, and no mvn appears anywhere in the listing. This is the shape you reach for whenever a variable mask says which bits to switch off:
0 bic r0, r1
2 eor r0, r2
4 bx lr
Three arguments, the second one used as a mask of bits to clear, the third xor-ed on afterwards. The bic is one instruction because the mask lives in a register and the value lives in the destination — for once the destructive two-operand form is exactly what you want, and nothing has to be evacuated.
Operand order in the C makes no difference here. a & ~b and ~b & a both compile to the same single bic, which is unusual for this compiler and worth remembering when you are trying spellings.
A constant mask behaves differently, and the difference matters:
0 mov r1, r0
2 mov r0, #16
4 neg r0, r0
6 and r0, r1
8 bx lr
That is a function clearing the low four bits of its argument. There is no bic at all. With a constant the compiler complements the constant instead — the mask it actually wants is 0xFFFFFFF0, which it builds by moving 16 and negating, since mov reaches only 8 bits — and then uses a plain and. So bic in a listing means the mask was a value, and and after a neg means the mask was a literal.
Your task
Write func_080dbde0 to reproduce the target assembly.