subi: an addi in disguise
There's no subtract-immediate opcode. As the last lesson hinted, subtracting a constant is just addi with a negative immediate. The disassembler is kind about it, though: when an addi carries a negative constant, it prints the friendlier mnemonic subi instead.
So dec7(n) = n - 7 shows up in the diff as:
subi r3, r3, 7 # r3 = r3 - 7 (encoded as addi r3, r3, -7)
blr
Same instruction, same bytes — subi is only a nicer name, and the number it shows is positive: the amount being subtracted. Read that value off the target.
Your task
Write subConst, taking an int a, to reproduce the target subi.