a: push #4 / Allocate k st %r2 -> [sp]-- / Spill r2 ld [fp+12] -> %r0 mov #2 -> %r1 add %r0, %r1 -> %r0 / Calculate (i+2) and put the result in r0 ld [fp+16] -> %r1 mov #5 -> %r2 sub %r1, %r2 -> %r1 / Calculate (j-5) and put the result in r1 mul %r0, %r1 -> %r0 st %r0 -> [fp] / Do k = r0 * r1 ld [fp] -> %r0 ld ++[sp] -> %r2 / Unspill r2 ret main: push #4 / Allocate i mov #22 -> %r0 / Push arguments onto the stack in reverse order st %r0 -> [sp]-- mov #44 -> %r0 st %r0 -> [sp]-- jsr a pop #8 / Always pop the arguments off the stack after jsr st %r0 -> [fp] ret