# MODULE gcd.c .section ".text" .align 1 string.6: .byte 105 .byte 110 .byte 112 .byte 117 .byte 116 .byte 58 .byte 32 .byte 0 .align 1 string.8: .byte 37 .byte 100 .byte 37 .byte 100 .byte 0 .align 1 string.10: .byte 71 .byte 67 .byte 68 .byte 40 .byte 37 .byte 100 .byte 44 .byte 32 .byte 37 .byte 100 .byte 41 .byte 32 .byte 61 .byte 32 .byte 0 .align 1 string.12: .byte 32 .byte 37 .byte 100 .byte 10 .byte 0 # FUNCTION main .align 4 .global main main: save %sp,-104,%sp .L2: set string.6,%o0 call printf nop add %fp,-8,%o1 add %fp,-4,%o2 set string.8,%o0 call scanf nop ld [%fp-8],%o1 ld [%fp-4],%o2 set string.10,%o0 call printf nop .L8: .L3: ld [%fp-4],%i0 cmp %i0,0 ble .L6 nop .L4: ld [%fp-8],%o0 ld [%fp-4],%o1 call .rem nop ld [%fp-4],%i0 st %i0,[%fp-8] st %o0,[%fp-4] ba .L3 nop .L6: ld [%fp-8],%o1 set string.12,%o0 call printf nop mov 0,%i0 .L7: ret restore