

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

let rec make_adder  x = 
   let rec adder  y = (x + y)
   in adder
in (print_int ((make_adder 3) 7))

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

let rec make_adder  : (int) -> (int) -> int x : int = 
   let rec adder  : (int) -> int y : int = (x + y)
   in adder
in (print_int ((make_adder 3) 7))

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

let make_adder  : (int) -> (int) -> intx : int = 
   let adder  : (int) -> inty : int = (x + y)
   in adder
in 
   let Ti4  : int = let Tf2  : (int) -> int = let Ti1  : int = 3 in
   (make_adder Ti1) in
   
   let Ti3  : int = 7 in
   (Tf2 Ti3) in
   EXTERN(print_int Ti4)

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

let make_adder_5  : (int) -> (int) -> intx_6 : int = 
   let adder_11  : (int) -> inty_12 : int = (x_6 + y_12)
   in adder_11
in 
   let Ti4_7  : int = let Tf2_8  : (int) -> int = let Ti1_10  : int = 3 in
   (make_adder_5 Ti1_10) in
   
   let Ti3_9  : int = 7 in
   (Tf2_8 Ti3_9) in
   EXTERN(print_int Ti4_7)

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

let make_adder_5  : (int) -> (int) -> intx_6 : int = 
   let adder_11  : (int) -> inty_12 : int = (x_6 + y_12)
   in adder_11
in 
   let Ti1_10  : int = 3 in
   
   let Tf2_8  : (int) -> int = (make_adder_5 Ti1_10) in
   
   let Ti3_9  : int = 7 in
   
   let Ti4_7  : int = (Tf2_8 Ti3_9) in
   EXTERN(print_int Ti4_7)

===================== closure output ===============================
let LABEL(adder_11) [x_6 : int] y_12 : int = (x_6 + y_12)
in

let LABEL(make_adder_5) [] x_6 : int = 
   let closure adder_11  : (int) -> int = ( LABEL(adder_11); [x_6] )
   in adder_11
in

let Ti1_10  : int = 3 in

let Tf2_8  : (int) -> int = APPLY_DIRECT(LABEL(make_adder_5) Ti1_10) in

let Ti3_9  : int = 7 in

let Ti4_7  : int = APPLY_CLOSURE(Tf2_8 Ti3_9) in
APPLY_DIRECT(LABEL(min_caml_print_int) Ti4_7)

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

LABEL(adder_11) (arg=(y_12), farg=())

LET(x_6, ld(%o5, 4), 
   ANSWER(add(x_6, y_12)))

LABEL(make_adder_5) (arg=(x_6), farg=())

LET(adder_11, mov(%i1), 
   LET(%i1, add(%i1, 8), 
      LET(l_14, set(LABEL(adder_11)), 
         LET(Tu15, st(l_14, adder_11, 0), 
            LET(Tu13, st(x_6, adder_11, 4), 
               ANSWER(mov(adder_11)))))))
==== Expression =======

LET(Ti1_10, set(3), 
   LET(Tf2_8, CallDirect(LABEL(make_adder_5), args=(Ti1_10), farg=()), 
      LET(Ti3_9, set(7), 
         LET(Ti4_7, CallClosure(Tf2_8, args=(Ti3_9), farg=()), 
            ANSWER(CallDirect(LABEL(min_caml_print_int), args=(Ti4_7), farg=()))))))


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

LABEL(adder_11) (arg=(y_12), farg=())

LET(x_6, ld(%o5, 4), 
   ANSWER(add(x_6, y_12)))

LABEL(make_adder_5) (arg=(x_6), farg=())

LET(adder_11, mov(%i1), 
   LET(%i1, add(%i1, 8), 
      LET(l_14, set(LABEL(adder_11)), 
         LET(Tu15, st(l_14, adder_11, 0), 
            LET(Tu13, st(x_6, adder_11, 4), 
               ANSWER(mov(adder_11)))))))
==== Expression =======

LET(Ti1_10, set(3), 
   LET(Tf2_8, CallDirect(LABEL(make_adder_5), args=(Ti1_10), farg=()), 
      LET(Ti3_9, set(7), 
         LET(Ti4_7, CallClosure(Tf2_8, args=(Ti3_9), farg=()), 
            ANSWER(CallDirect(LABEL(min_caml_print_int), args=(Ti4_7), farg=()))))))


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

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

LET(%i3, ld(%o5, 4), 
   ANSWER(add(%i3, %i2)))

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

LET(%i3, mov(%i1), 
   LET(%i1, add(%i1, 8), 
      LET(%i4, set(LABEL(adder_11)), 
         LET(%g0, st(%i4, %i3, 0), 
            LET(%g0, st(%i2, %i3, 4), 
               ANSWER(mov(%i3)))))))
==== Expression =======

LET(%i2, set(3), 
   LET(%o5, CallDirect(LABEL(make_adder_5), args=(%i2), farg=()), 
      LET(%i2, set(7), 
         LET(%i2, CallClosure(%o5, args=(%i2), farg=()), 
            ANSWER(CallDirect(LABEL(min_caml_print_int), args=(%i2), farg=()))))))


===================== Emit output ===============================
.section	".rodata"
.align	8
.section	".text"
adder_11:
	ld	[%o5 + 4], %i3
	add	%i3, %i2, %i2
	retl
	nop
make_adder_5:
	mov	%i1, %i3
	add	%i1, 8, %i1
	set	adder_11, %i4
	st	%i4, [%i3 + 0]
	st	%i2, [%i3 + 4]
	mov	%i3, %i2
	retl
	nop
.global	min_caml_start
min_caml_start:
	save	%sp, -112, %sp
	set	3, %i2
	st	%o7, [%i0 + 4]
	call	make_adder_5
	add	%i0, 8, %i0	! delay slot
	sub	%i0, 8, %i0
	ld	[%i0 + 4], %o7
	mov	%i2, %o5
	set	7, %i2
	st	%o7, [%i0 + 4]
	ld	[%o5 + 0], %o4
	call	%o4
	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
