Skip to content

Instantly share code, notes, and snippets.

@sheroze1123
Created March 18, 2016 00:38
Show Gist options
  • Save sheroze1123/036a4bc610c6bad7d8a0 to your computer and use it in GitHub Desktop.
Save sheroze1123/036a4bc610c6bad7d8a0 to your computer and use it in GitHub Desktop.
(COMPUNIT
pa4tests/gcd
(FUNC
_Igcd_iii
(SEQ
(LABEL pa4tests/gcd$0)
(MOVE (TEMP LIRVisitorTemp_0) (CONST 0))
(CJUMP (NEQ (TEMP LIRVisitorTemp_0) (TEMP a)) pa4tests/gcd$1)
(JUMP (NAME pa4tests/gcd$2))
(LABEL pa4tests/gcd$1)
(MOVE (TEMP LIRVisitorTemp_1) (TEMP b))
(CJUMP (LT (TEMP LIRVisitorTemp_1) (TEMP a)) pa4tests/gcd$3)
(JUMP (NAME pa4tests/gcd$4))
(LABEL pa4tests/gcd$3)
(MOVE (TEMP b) (SUB (TEMP a) (TEMP b)))
(JUMP (NAME pa4tests/gcd$5))
(LABEL pa4tests/gcd$4)
(MOVE (TEMP a) (SUB (TEMP b) (TEMP a)))
(LABEL pa4tests/gcd$5)
(RETURN) (JUMP (NAME pa4tests/gcd$0))
(LABEL pa4tests/gcd$2)
(MOVE (TEMP _RET0) (TEMP b)) (RETURN)))
(FUNC
_Imain_paai
(SEQ
(MOVE (TEMP LIRVisitorTemp_2) (CONST 8))
(MOVE (TEMP LIRVisitorTemp_3) (CONST 4))
(MOVE (TEMP LIRVisitorTemp_4) (CALL (NAME _Igcd_iii) (TEMP LIRVisitorTemp_2) (TEMP LIRVisitorTemp_3)))
(MOVE (TEMP LIRVisitorTemp_5) (TEMP LIRVisitorTemp_4))
(MOVE (TEMP LIRVisitorTemp_6) (CALL (NAME _IunparseInt_aii) (TEMP LIRVisitorTemp_5)))
(MOVE (TEMP LIRVisitorTemp_7) (TEMP LIRVisitorTemp_6))
(MOVE (TEMP LIRVisitorTemp_8) (CALL (NAME _Iprint_pai) (TEMP LIRVisitorTemp_7)))
(RETURN))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment