ans2.jas

f2:
    push #4              / Allocate j
    ld [fp+12] -> %r0
    cmp %r0, %g0         / if (x == NULL)
    bne l1
    mov #37 -> %r0       / return 37
    ret
l1:
    ld [fp+12] -> %r0    / j = *x * 2
    ld [r0] -> %r0
    mov #2 -> %r1
    mul %r0, %r1 -> %r0
    st %r0 -> [fp]
    ld [fp] -> %r0       / return j
    ret