

===================== parser output ===============================

let t  = 123
in 
   let f  = 456
   in 
      let rec even  x = 
         let rec odd  x = 
            if not((x <= 0))
            then (even (x - 1))
            else 
               if not((0 <= x))
               then (even (x + 1))
               else f
         in 
            if not((x <= 0))
            then (odd (x - 1))
            else 
               if not((0 <= x))
               then (odd (x + 1))
               else t
      in (print_int (even 789))

===================== typing output ===============================

let t  : int = 123
in 
   let f  : int = 456
   in 
      let rec even  : (int) -> int x : int = 
         let rec odd  : (int) -> int x : int = 
            if not((x <= 0))
            then (even (x - 1))
            else 
               if not((0 <= x))
               then (even (x + 1))
               else f
         in 
            if not((x <= 0))
            then (odd (x - 1))
            else 
               if not((0 <= x))
               then (odd (x + 1))
               else t
      in (print_int (even 789))

===================== knormal output ===============================

let t  : int = 123 in

let f  : int = 456 in

let even  : (int) -> intx : int = 
   let odd  : (int) -> intx : int = 
      let Ti9  : int = 0 in
      
      if x <= Ti9 
      then 
         let Ti10  : int = 0 in
         
         if Ti10 <= x 
         then f
         else 
            let Ti12  : int = let Ti11  : int = 1 in
            (x + Ti11) in
            (even Ti12)
      else 
         let Ti14  : int = let Ti13  : int = 1 in
         (x - Ti13) in
         (even Ti14)
   in 
      let Ti3  : int = 0 in
      
      if x <= Ti3 
      then 
         let Ti4  : int = 0 in
         
         if Ti4 <= x 
         then t
         else 
            let Ti6  : int = let Ti5  : int = 1 in
            (x + Ti5) in
            (odd Ti6)
      else 
         let Ti8  : int = let Ti7  : int = 1 in
         (x - Ti7) in
         (odd Ti8)
in 
   let Ti2  : int = let Ti1  : int = 789 in
   (even Ti1) in
   EXTERN(print_int Ti2)

===================== alpha output ===============================

let t_15  : int = 123 in

let f_16  : int = 456 in

let even_17  : (int) -> intx_18 : int = 
   let odd_21  : (int) -> intx_22 : int = 
      let Ti9_29  : int = 0 in
      
      if x_22 <= Ti9_29 
      then 
         let Ti10_32  : int = 0 in
         
         if Ti10_32 <= x_22 
         then f_16
         else 
            let Ti12_33  : int = let Ti11_34  : int = 1 in
            (x_22 + Ti11_34) in
            (even_17 Ti12_33)
      else 
         let Ti14_30  : int = let Ti13_31  : int = 1 in
         (x_22 - Ti13_31) in
         (even_17 Ti14_30)
   in 
      let Ti3_23  : int = 0 in
      
      if x_18 <= Ti3_23 
      then 
         let Ti4_26  : int = 0 in
         
         if Ti4_26 <= x_18 
         then t_15
         else 
            let Ti6_27  : int = let Ti5_28  : int = 1 in
            (x_18 + Ti5_28) in
            (odd_21 Ti6_27)
      else 
         let Ti8_24  : int = let Ti7_25  : int = 1 in
         (x_18 - Ti7_25) in
         (odd_21 Ti8_24)
in 
   let Ti2_19  : int = let Ti1_20  : int = 789 in
   (even_17 Ti1_20) in
   EXTERN(print_int Ti2_19)

===================== simplify output ===============================

let even_17  : (int) -> intx_18 : int = 
   let odd_21  : (int) -> intx_22 : int = 
      let Ti9_29  : int = 0 in
      
      if x_22 <= Ti9_29 
      then 
         let Ti10_32  : int = 0 in
         
         if Ti10_32 <= x_22 
         then 456
         else 
            let Ti11_34  : int = 1 in
            
            let Ti12_33  : int = (x_22 + Ti11_34) in
            (even_17 Ti12_33)
      else 
         let Ti13_31  : int = 1 in
         
         let Ti14_30  : int = (x_22 - Ti13_31) in
         (even_17 Ti14_30)
   in 
      let Ti3_23  : int = 0 in
      
      if x_18 <= Ti3_23 
      then 
         let Ti4_26  : int = 0 in
         
         if Ti4_26 <= x_18 
         then 123
         else 
            let Ti5_28  : int = 1 in
            
            let Ti6_27  : int = (x_18 + Ti5_28) in
            (odd_21 Ti6_27)
      else 
         let Ti7_25  : int = 1 in
         
         let Ti8_24  : int = (x_18 - Ti7_25) in
         (odd_21 Ti8_24)
in 
   let Ti1_20  : int = 789 in
   
   let Ti2_19  : int = (even_17 Ti1_20) in
   EXTERN(print_int Ti2_19)

===================== closure output ===============================
let LABEL(odd_21) [] x_22 : int = 
   let Ti9_29  : int = 0 in
   
   if x_22 <= Ti9_29 
   then 
      let Ti10_32  : int = 0 in
      
      if Ti10_32 <= x_22 
      then 456
      else 
         let Ti11_34  : int = 1 in
         
         let Ti12_33  : int = (x_22 + Ti11_34) in
         APPLY_DIRECT(LABEL(even_17) Ti12_33)
   else 
      let Ti13_31  : int = 1 in
      
      let Ti14_30  : int = (x_22 - Ti13_31) in
      APPLY_DIRECT(LABEL(even_17) Ti14_30)
in

let LABEL(even_17) [] x_18 : int = 
   let Ti3_23  : int = 0 in
   
   if x_18 <= Ti3_23 
   then 
      let Ti4_26  : int = 0 in
      
      if Ti4_26 <= x_18 
      then 123
      else 
         let Ti5_28  : int = 1 in
         
         let Ti6_27  : int = (x_18 + Ti5_28) in
         APPLY_DIRECT(LABEL(odd_21) Ti6_27)
   else 
      let Ti7_25  : int = 1 in
      
      let Ti8_24  : int = (x_18 - Ti7_25) in
      APPLY_DIRECT(LABEL(odd_21) Ti8_24)
in

let Ti1_20  : int = 789 in

let Ti2_19  : int = APPLY_DIRECT(LABEL(even_17) Ti1_20) in
APPLY_DIRECT(LABEL(min_caml_print_int) Ti2_19)

===================== virtual  output ===============================
==== Data Segment =======
==== Function Declarations =======

LABEL(odd_21) (arg=(x_22), farg=())

LET(Ti9_29, set(0), 
   ANSWER(
      IfLE(x_22, Ti9_29, 
         LET(Ti10_32, set(0), 
            ANSWER(
               IfLE(Ti10_32, x_22, 
                  ANSWER(set(456)), 
                  LET(Ti11_34, set(1), 
                     LET(Ti12_33, add(x_22, Ti11_34), 
                        ANSWER(CallDirect(LABEL(even_17), args=(Ti12_33), farg=()))))))), 
         LET(Ti13_31, set(1), 
            LET(Ti14_30, sub(x_22, Ti13_31), 
               ANSWER(CallDirect(LABEL(even_17), args=(Ti14_30), farg=())))))))

LABEL(even_17) (arg=(x_18), farg=())

LET(Ti3_23, set(0), 
   ANSWER(
      IfLE(x_18, Ti3_23, 
         LET(Ti4_26, set(0), 
            ANSWER(
               IfLE(Ti4_26, x_18, 
                  ANSWER(set(123)), 
                  LET(Ti5_28, set(1), 
                     LET(Ti6_27, add(x_18, Ti5_28), 
                        ANSWER(CallDirect(LABEL(odd_21), args=(Ti6_27), farg=()))))))), 
         LET(Ti7_25, set(1), 
            LET(Ti8_24, sub(x_18, Ti7_25), 
               ANSWER(CallDirect(LABEL(odd_21), args=(Ti8_24), farg=())))))))
==== Expression =======

LET(Ti1_20, set(789), 
   LET(Ti2_19, CallDirect(LABEL(even_17), args=(Ti1_20), farg=()), 
      ANSWER(CallDirect(LABEL(min_caml_print_int), args=(Ti2_19), farg=()))))


=====================  simm13  output ===============================
==== Data Segment =======
==== Function Declarations =======

LABEL(odd_21) (arg=(x_22), farg=())

ANSWER(
   IfLE(x_22, 0, 
      ANSWER(
         IfGE(x_22, 0, 
            ANSWER(set(456)), 
            LET(Ti12_33, add(x_22, 1), 
               ANSWER(CallDirect(LABEL(even_17), args=(Ti12_33), farg=()))))), 
      LET(Ti14_30, sub(x_22, 1), 
         ANSWER(CallDirect(LABEL(even_17), args=(Ti14_30), farg=())))))

LABEL(even_17) (arg=(x_18), farg=())

ANSWER(
   IfLE(x_18, 0, 
      ANSWER(
         IfGE(x_18, 0, 
            ANSWER(set(123)), 
            LET(Ti6_27, add(x_18, 1), 
               ANSWER(CallDirect(LABEL(odd_21), args=(Ti6_27), farg=()))))), 
      LET(Ti8_24, sub(x_18, 1), 
         ANSWER(CallDirect(LABEL(odd_21), args=(Ti8_24), farg=())))))
==== Expression =======

LET(Ti1_20, set(789), 
   LET(Ti2_19, CallDirect(LABEL(even_17), args=(Ti1_20), farg=()), 
      ANSWER(CallDirect(LABEL(min_caml_print_int), args=(Ti2_19), farg=()))))


===================== RegAlloc output ===============================
==== Data Segment =======
==== Function Declarations =======

LABEL(odd_21) (arg=(%i2), farg=())

ANSWER(
   IfLE(%i2, 0, 
      ANSWER(
         IfGE(%i2, 0, 
            ANSWER(set(456)), 
            LET(%i2, add(%i2, 1), 
               ANSWER(CallDirect(LABEL(even_17), args=(%i2), farg=()))))), 
      LET(%i2, sub(%i2, 1), 
         ANSWER(CallDirect(LABEL(even_17), args=(%i2), farg=())))))

LABEL(even_17) (arg=(%i2), farg=())

ANSWER(
   IfLE(%i2, 0, 
      ANSWER(
         IfGE(%i2, 0, 
            ANSWER(set(123)), 
            LET(%i2, add(%i2, 1), 
               ANSWER(CallDirect(LABEL(odd_21), args=(%i2), farg=()))))), 
      LET(%i2, sub(%i2, 1), 
         ANSWER(CallDirect(LABEL(odd_21), args=(%i2), farg=())))))
==== Expression =======

LET(%i2, set(789), 
   LET(%i2, CallDirect(LABEL(even_17), args=(%i2), farg=()), 
      ANSWER(CallDirect(LABEL(min_caml_print_int), args=(%i2), farg=()))))


===================== Emit output ===============================
.section	".rodata"
.align	8
.section	".text"
odd_21:
	cmp	%i2, 0
	bg	ble_else_40
	nop
	cmp	%i2, 0
	bl	bge_else_41
	nop
	set	456, %i2
	retl
	nop
bge_else_41:
	add	%i2, 1, %i2
	b	even_17
	nop
ble_else_40:
	sub	%i2, 1, %i2
	b	even_17
	nop
even_17:
	cmp	%i2, 0
	bg	ble_else_42
	nop
	cmp	%i2, 0
	bl	bge_else_43
	nop
	set	123, %i2
	retl
	nop
bge_else_43:
	add	%i2, 1, %i2
	b	odd_21
	nop
ble_else_42:
	sub	%i2, 1, %i2
	b	odd_21
	nop
.global	min_caml_start
min_caml_start:
	save	%sp, -112, %sp
	set	789, %i2
	st	%o7, [%i0 + 4]
	call	even_17
	add	%i0, 8, %i0	! delay slot
	sub	%i0, 8, %i0
	ld	[%i0 + 4], %o7
	st	%o7, [%i0 + 4]
	call	min_caml_print_int
	add	%i0, 8, %i0	! delay slot
	sub	%i0, 8, %i0
	ld	[%i0 + 4], %o7
	ret
	restore
