subi: an addi in disguise
There's no separate subtract-immediate opcode. As the last lesson hinted, subtracting a constant is just addi with a negative immediate. But the disassembler is helpful about it: whenever it meets an addi carrying a negative constant, it prints the friendlier simplified 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 single instruction, same bytes as an addi — subi is only the nicer name the diff prints, and the number it carries is positive: the amount being subtracted. Read that value straight off the target.
Your task
Write subConst, taking an int a, to reproduce the target subi.