

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

let rec foo  a b c d e f = 
   let Tu5  : unit = (print_int a)
   in 
      let Tu4  : unit = (print_int b)
      in 
         let Tu3  : unit = (print_int c)
         in 
            let Tu2  : unit = (print_int d)
            in 
               let Tu1  : unit = (print_int e)
               in (print_int f)
in 
   let rec bar  a b c d e f = (foo b a d e f c)
   in (bar 1 2 3 4 5 6)

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

let rec foo  : (int, int, int, int, int, int) -> unit a : int b : int c : int d : int e : int f : int = 
   let Tu5  : unit = (print_int a)
   in 
      let Tu4  : unit = (print_int b)
      in 
         let Tu3  : unit = (print_int c)
         in 
            let Tu2  : unit = (print_int d)
            in 
               let Tu1  : unit = (print_int e)
               in (print_int f)
in 
   let rec bar  : (int, int, int, int, int, int) -> unit a : int b : int c : int d : int e : int f : int = (foo b a d e f c)
   in (bar 1 2 3 4 5 6)

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

let foo  : (int, int, int, int, int, int) -> unita : int b : int c : int d : int e : int f : int = 
   let Tu5  : unit = EXTERN(print_int a) in
   
   let Tu4  : unit = EXTERN(print_int b) in
   
   let Tu3  : unit = EXTERN(print_int c) in
   
   let Tu2  : unit = EXTERN(print_int d) in
   
   let Tu1  : unit = EXTERN(print_int e) in
   EXTERN(print_int f)
in 
   let bar  : (int, int, int, int, int, int) -> unita : int b : int c : int d : int e : int f : int = (foo b a d e f c)
   in 
      let Ti6  : int = 1 in
      
      let Ti7  : int = 2 in
      
      let Ti8  : int = 3 in
      
      let Ti9  : int = 4 in
      
      let Ti10  : int = 5 in
      
      let Ti11  : int = 6 in
      (bar Ti6 Ti7 Ti8 Ti9 Ti10 Ti11)

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

let foo_12  : (int, int, int, int, int, int) -> unita_13 : int b_14 : int c_15 : int d_16 : int e_17 : int f_18 : int = 
   let Tu5_32  : unit = EXTERN(print_int a_13) in
   
   let Tu4_33  : unit = EXTERN(print_int b_14) in
   
   let Tu3_34  : unit = EXTERN(print_int c_15) in
   
   let Tu2_35  : unit = EXTERN(print_int d_16) in
   
   let Tu1_36  : unit = EXTERN(print_int e_17) in
   EXTERN(print_int f_18)
in 
   let bar_19  : (int, int, int, int, int, int) -> unita_20 : int b_21 : int c_22 : int d_23 : int e_24 : int f_25 : int = (foo_12 b_21 a_20 d_23 e_24 f_25 c_22)
   in 
      let Ti6_26  : int = 1 in
      
      let Ti7_27  : int = 2 in
      
      let Ti8_28  : int = 3 in
      
      let Ti9_29  : int = 4 in
      
      let Ti10_30  : int = 5 in
      
      let Ti11_31  : int = 6 in
      (bar_19 Ti6_26 Ti7_27 Ti8_28 Ti9_29 Ti10_30 Ti11_31)

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

let foo_12  : (int, int, int, int, int, int) -> unita_13 : int b_14 : int c_15 : int d_16 : int e_17 : int f_18 : int = 
   let Tu5_32  : unit = EXTERN(print_int a_13) in
   
   let Tu4_33  : unit = EXTERN(print_int b_14) in
   
   let Tu3_34  : unit = EXTERN(print_int c_15) in
   
   let Tu2_35  : unit = EXTERN(print_int d_16) in
   
   let Tu1_36  : unit = EXTERN(print_int e_17) in
   EXTERN(print_int f_18)
in 
   let bar_19  : (int, int, int, int, int, int) -> unita_20 : int b_21 : int c_22 : int d_23 : int e_24 : int f_25 : int = (foo_12 b_21 a_20 d_23 e_24 f_25 c_22)
   in 
      let Ti6_26  : int = 1 in
      
      let Ti7_27  : int = 2 in
      
      let Ti8_28  : int = 3 in
      
      let Ti9_29  : int = 4 in
      
      let Ti10_30  : int = 5 in
      
      let Ti11_31  : int = 6 in
      (bar_19 Ti6_26 Ti7_27 Ti8_28 Ti9_29 Ti10_30 Ti11_31)

===================== closure output ===============================
let LABEL(foo_12) [] a_13 : int, b_14 : int, c_15 : int, d_16 : int, e_17 : int, f_18 : int = 
   let Tu5_32  : unit = APPLY_DIRECT(LABEL(min_caml_print_int) a_13) in
   
   let Tu4_33  : unit = APPLY_DIRECT(LABEL(min_caml_print_int) b_14) in
   
   let Tu3_34  : unit = APPLY_DIRECT(LABEL(min_caml_print_int) c_15) in
   
   let Tu2_35  : unit = APPLY_DIRECT(LABEL(min_caml_print_int) d_16) in
   
   let Tu1_36  : unit = APPLY_DIRECT(LABEL(min_caml_print_int) e_17) in
   APPLY_DIRECT(LABEL(min_caml_print_int) f_18)
in

let LABEL(bar_19) [] a_20 : int, b_21 : int, c_22 : int, d_23 : int, e_24 : int, f_25 : int = APPLY_DIRECT(LABEL(foo_12) b_21 a_20 d_23 e_24 f_25 c_22)
in

let Ti6_26  : int = 1 in

let Ti7_27  : int = 2 in

let Ti8_28  : int = 3 in

let Ti9_29  : int = 4 in

let Ti10_30  : int = 5 in

let Ti11_31  : int = 6 in
APPLY_DIRECT(LABEL(bar_19) Ti6_26 Ti7_27 Ti8_28 Ti9_29 Ti10_30 Ti11_31)

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

LABEL(foo_12) (arg=(a_13, b_14, c_15, d_16, e_17, f_18), farg=())

LET(Tu5_32, CallDirect(LABEL(min_caml_print_int), args=(a_13), farg=()), 
   LET(Tu4_33, CallDirect(LABEL(min_caml_print_int), args=(b_14), farg=()), 
      LET(Tu3_34, CallDirect(LABEL(min_caml_print_int), args=(c_15), farg=()), 
         LET(Tu2_35, CallDirect(LABEL(min_caml_print_int), args=(d_16), farg=()), 
            LET(Tu1_36, CallDirect(LABEL(min_caml_print_int), args=(e_17), farg=()), 
               ANSWER(CallDirect(LABEL(min_caml_print_int), args=(f_18), farg=())))))))

LABEL(bar_19) (arg=(a_20, b_21, c_22, d_23, e_24, f_25), farg=())

ANSWER(CallDirect(LABEL(foo_12), args=(b_21, a_20, d_23, e_24, f_25, c_22), farg=()))
==== Expression =======

LET(Ti6_26, set(1), 
   LET(Ti7_27, set(2), 
      LET(Ti8_28, set(3), 
         LET(Ti9_29, set(4), 
            LET(Ti10_30, set(5), 
               LET(Ti11_31, set(6), 
                  ANSWER(CallDirect(LABEL(bar_19), args=(Ti6_26, Ti7_27, Ti8_28, Ti9_29, Ti10_30, Ti11_31), farg=()))))))))


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

LABEL(foo_12) (arg=(a_13, b_14, c_15, d_16, e_17, f_18), farg=())

LET(Tu5_32, CallDirect(LABEL(min_caml_print_int), args=(a_13), farg=()), 
   LET(Tu4_33, CallDirect(LABEL(min_caml_print_int), args=(b_14), farg=()), 
      LET(Tu3_34, CallDirect(LABEL(min_caml_print_int), args=(c_15), farg=()), 
         LET(Tu2_35, CallDirect(LABEL(min_caml_print_int), args=(d_16), farg=()), 
            LET(Tu1_36, CallDirect(LABEL(min_caml_print_int), args=(e_17), farg=()), 
               ANSWER(CallDirect(LABEL(min_caml_print_int), args=(f_18), farg=())))))))

LABEL(bar_19) (arg=(a_20, b_21, c_22, d_23, e_24, f_25), farg=())

ANSWER(CallDirect(LABEL(foo_12), args=(b_21, a_20, d_23, e_24, f_25, c_22), farg=()))
==== Expression =======

LET(Ti6_26, set(1), 
   LET(Ti7_27, set(2), 
      LET(Ti8_28, set(3), 
         LET(Ti9_29, set(4), 
            LET(Ti10_30, set(5), 
               LET(Ti11_31, set(6), 
                  ANSWER(CallDirect(LABEL(bar_19), args=(Ti6_26, Ti7_27, Ti8_28, Ti9_29, Ti10_30, Ti11_31), farg=()))))))))


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

LABEL(foo_12) (arg=(%i2, %i3, %i4, %i5, %l0, %l1), farg=())

LET(%g0, save(%l1, f_18), 
   LET(%g0, save(%l0, e_17), 
      LET(%g0, save(%i5, d_16), 
         LET(%g0, save(%i4, c_15), 
            LET(%g0, save(%i3, b_14), 
               LET(%g0, CallDirect(LABEL(min_caml_print_int), args=(%i2), farg=()), 
                  LET(%g0, nop, 
                     LET(%i2, restore(b_14), 
                        LET(%g0, CallDirect(LABEL(min_caml_print_int), args=(%i2), farg=()), 
                           LET(%g0, nop, 
                              LET(%i2, restore(c_15), 
                                 LET(%g0, CallDirect(LABEL(min_caml_print_int), args=(%i2), farg=()), 
                                    LET(%g0, nop, 
                                       LET(%i2, restore(d_16), 
                                          LET(%g0, CallDirect(LABEL(min_caml_print_int), args=(%i2), farg=()), 
                                             LET(%g0, nop, 
                                                LET(%i2, restore(e_17), 
                                                   LET(%g0, CallDirect(LABEL(min_caml_print_int), args=(%i2), farg=()), 
                                                      LET(%g0, nop, 
                                                         LET(%i2, restore(f_18), 
                                                            ANSWER(CallDirect(LABEL(min_caml_print_int), args=(%i2), farg=()))))))))))))))))))))))

LABEL(bar_19) (arg=(%i2, %i3, %i4, %i5, %l0, %l1), farg=())

ANSWER(CallDirect(LABEL(foo_12), args=(%i3, %i2, %i5, %l0, %l1, %i4), farg=()))
==== Expression =======

LET(%i2, set(1), 
   LET(%i3, set(2), 
      LET(%i4, set(3), 
         LET(%i5, set(4), 
            LET(%l0, set(5), 
               LET(%l1, set(6), 
                  ANSWER(CallDirect(LABEL(bar_19), args=(%i2, %i3, %i4, %i5, %l0, %l1), farg=()))))))))


===================== Emit output ===============================
.section	".rodata"
.align	8
.section	".text"
foo_12:
	st	%l1, [%i0 + 0]
	st	%l0, [%i0 + 4]
	st	%i5, [%i0 + 8]
	st	%i4, [%i0 + 12]
	st	%i3, [%i0 + 16]
	st	%o7, [%i0 + 20]
	call	min_caml_print_int
	add	%i0, 24, %i0	! delay slot
	sub	%i0, 24, %i0
	ld	[%i0 + 20], %o7
	ld	[%i0 + 16], %i2
	st	%o7, [%i0 + 20]
	call	min_caml_print_int
	add	%i0, 24, %i0	! delay slot
	sub	%i0, 24, %i0
	ld	[%i0 + 20], %o7
	ld	[%i0 + 12], %i2
	st	%o7, [%i0 + 20]
	call	min_caml_print_int
	add	%i0, 24, %i0	! delay slot
	sub	%i0, 24, %i0
	ld	[%i0 + 20], %o7
	ld	[%i0 + 8], %i2
	st	%o7, [%i0 + 20]
	call	min_caml_print_int
	add	%i0, 24, %i0	! delay slot
	sub	%i0, 24, %i0
	ld	[%i0 + 20], %o7
	ld	[%i0 + 4], %i2
	st	%o7, [%i0 + 20]
	call	min_caml_print_int
	add	%i0, 24, %i0	! delay slot
	sub	%i0, 24, %i0
	ld	[%i0 + 20], %o7
	ld	[%i0 + 0], %i2
	b	min_caml_print_int
	nop
bar_19:
	mov	%l1, %o4
	mov	%i4, %l1
	mov	%i5, %i4
	mov	%l0, %i5
	mov	%o4, %l0
	mov	%i3, %o4
	mov	%i2, %i3
	mov	%o4, %i2
	b	foo_12
	nop
.global	min_caml_start
min_caml_start:
	save	%sp, -112, %sp
	set	1, %i2
	set	2, %i3
	set	3, %i4
	set	4, %i5
	set	5, %l0
	set	6, %l1
	st	%o7, [%i0 + 4]
	call	bar_19
	add	%i0, 8, %i0	! delay slot
	sub	%i0, 8, %i0
	ld	[%i0 + 4], %o7
	ret
	restore
