

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

let rec f  n = 
   if not((0 <= n))
   then ()
   else 
      let Tu1  : unit = (print_int n)
      in 
         let a  = Array.create 1 f
         in (a.(0) (n - 1))
in (f 9)

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

let rec f  : (int) -> unit n : int = 
   if not((0 <= n))
   then ()
   else 
      let Tu1  : unit = (print_int n)
      in 
         let a  : (int) -> unit array = Array.create 1 f
         in (a.(0) (n - 1))
in (f 9)

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

let f  : (int) -> unitn : int = 
   let Ti3  : int = 0 in
   
   if Ti3 <= n 
   then 
      let Tu1  : unit = EXTERN(print_int n) in
      
      let a  : (int) -> unit array = let Ti4  : int = 1 in
      EXTERN(create_array Ti4 f) in
      
      let Tf6  : (int) -> unit = let Ti5  : int = 0 in
      a.(Ti5) in
      
      let Ti8  : int = let Ti7  : int = 1 in
      (n - Ti7) in
      (Tf6 Ti8)
   else ()
in 
   let Ti2  : int = 9 in
   (f Ti2)

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

let f_9  : (int) -> unitn_10 : int = 
   let Ti3_12  : int = 0 in
   
   if Ti3_12 <= n_10 
   then 
      let Tu1_13  : unit = EXTERN(print_int n_10) in
      
      let a_14  : (int) -> unit array = let Ti4_19  : int = 1 in
      EXTERN(create_array Ti4_19 f_9) in
      
      let Tf6_15  : (int) -> unit = let Ti5_18  : int = 0 in
      a_14.(Ti5_18) in
      
      let Ti8_16  : int = let Ti7_17  : int = 1 in
      (n_10 - Ti7_17) in
      (Tf6_15 Ti8_16)
   else ()
in 
   let Ti2_11  : int = 9 in
   (f_9 Ti2_11)

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

let f_9  : (int) -> unitn_10 : int = 
   let Ti3_12  : int = 0 in
   
   if Ti3_12 <= n_10 
   then 
      let Tu1_13  : unit = EXTERN(print_int n_10) in
      
      let Ti4_19  : int = 1 in
      
      let a_14  : (int) -> unit array = EXTERN(create_array Ti4_19 f_9) in
      
      let Ti5_18  : int = 0 in
      
      let Tf6_15  : (int) -> unit = a_14.(Ti5_18) in
      
      let Ti7_17  : int = 1 in
      
      let Ti8_16  : int = (n_10 - Ti7_17) in
      (Tf6_15 Ti8_16)
   else ()
in 
   let Ti2_11  : int = 9 in
   (f_9 Ti2_11)

===================== closure output ===============================
let LABEL(f_9) [] n_10 : int = 
   let Ti3_12  : int = 0 in
   
   if Ti3_12 <= n_10 
   then 
      let Tu1_13  : unit = APPLY_DIRECT(LABEL(min_caml_print_int) n_10) in
      
      let Ti4_19  : int = 1 in
      
      let a_14  : (int) -> unit array = APPLY_DIRECT(LABEL(min_caml_create_array) Ti4_19 f_9) in
      
      let Ti5_18  : int = 0 in
      
      let Tf6_15  : (int) -> unit = a_14.(Ti5_18) in
      
      let Ti7_17  : int = 1 in
      
      let Ti8_16  : int = (n_10 - Ti7_17) in
      APPLY_CLOSURE(Tf6_15 Ti8_16)
   else ()
in

let closure f_9  : (int) -> unit = ( LABEL(f_9); [] )
in 
   let Ti2_11  : int = 9 in
   APPLY_CLOSURE(f_9 Ti2_11)

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

LABEL(f_9) (arg=(n_10), farg=())

LET(Ti3_12, set(0), 
   ANSWER(
      IfLE(Ti3_12, n_10, 
         LET(Tu1_13, CallDirect(LABEL(min_caml_print_int), args=(n_10), farg=()), 
            LET(Ti4_19, set(1), 
               LET(a_14, CallDirect(LABEL(min_caml_create_array), args=(Ti4_19, f_9), farg=()), 
                  LET(Ti5_18, set(0), 
                     LET(o_21, sub(Ti5_18, 2), 
                        LET(Tf6_15, ld(a_14, o_21), 
                           LET(Ti7_17, set(1), 
                              LET(Ti8_16, sub(n_10, Ti7_17), 
                                 ANSWER(CallClosure(Tf6_15, args=(Ti8_16), farg=())))))))))), 
         ANSWER(nop))))
==== Expression =======

LET(f_9, mov(%i1), 
   LET(%i1, add(%i1, 8), 
      LET(l_22, set(LABEL(f_9)), 
         LET(Tu23, st(l_22, f_9, 0), 
            LET(Ti2_11, set(9), 
               ANSWER(CallClosure(f_9, args=(Ti2_11), farg=())))))))


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

LABEL(f_9) (arg=(n_10), farg=())

ANSWER(
   IfGE(n_10, 0, 
      LET(Tu1_13, CallDirect(LABEL(min_caml_print_int), args=(n_10), farg=()), 
         LET(Ti4_19, set(1), 
            LET(a_14, CallDirect(LABEL(min_caml_create_array), args=(Ti4_19, f_9), farg=()), 
               LET(Tf6_15, ld(a_14, 0), 
                  LET(Ti8_16, sub(n_10, 1), 
                     ANSWER(CallClosure(Tf6_15, args=(Ti8_16), farg=()))))))), 
      ANSWER(nop)))
==== Expression =======

LET(f_9, mov(%i1), 
   LET(%i1, add(%i1, 8), 
      LET(l_22, set(LABEL(f_9)), 
         LET(Tu23, st(l_22, f_9, 0), 
            LET(Ti2_11, set(9), 
               ANSWER(CallClosure(f_9, args=(Ti2_11), farg=())))))))


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

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

ANSWER(
   IfGE(%i2, 0, 
      LET(%g0, save(%i2, n_10), 
         LET(%g0, save(%o5, f_9), 
            LET(%g0, CallDirect(LABEL(min_caml_print_int), args=(%i2), farg=()), 
               LET(%g0, nop, 
                  LET(%i2, set(1), 
                     LET(%i3, restore(f_9), 
                        LET(%i2, CallDirect(LABEL(min_caml_create_array), args=(%i2, %i3), farg=()), 
                           LET(%i2, mov(%i2), 
                              LET(%o5, ld(%i2, 0), 
                                 LET(%i2, restore(n_10), 
                                    LET(%i2, sub(%i2, 1), 
                                       ANSWER(CallClosure(%o5, args=(%i2), farg=()))))))))))))), 
      ANSWER(nop)))
==== Expression =======

LET(%o5, mov(%i1), 
   LET(%i1, add(%i1, 8), 
      LET(%i2, set(LABEL(f_9)), 
         LET(%g0, st(%i2, %o5, 0), 
            LET(%i2, set(9), 
               ANSWER(CallClosure(%o5, args=(%i2), farg=())))))))


===================== Emit output ===============================
.section	".rodata"
.align	8
.section	".text"
f_9:
	cmp	%i2, 0
	bl	bge_else_30
	nop
	st	%i2, [%i0 + 0]
	st	%o5, [%i0 + 4]
	st	%o7, [%i0 + 12]
	call	min_caml_print_int
	add	%i0, 16, %i0	! delay slot
	sub	%i0, 16, %i0
	ld	[%i0 + 12], %o7
	set	1, %i2
	ld	[%i0 + 4], %i3
	st	%o7, [%i0 + 12]
	call	min_caml_create_array
	add	%i0, 16, %i0	! delay slot
	sub	%i0, 16, %i0
	ld	[%i0 + 12], %o7
	ld	[%i2 + 0], %o5
	ld	[%i0 + 0], %i2
	sub	%i2, 1, %i2
	ld	[%o5 + 0], %o4
	jmp	%o4
	nop
bge_else_30:
	retl
	nop
.global	min_caml_start
min_caml_start:
	save	%sp, -112, %sp
	mov	%i1, %o5
	add	%i1, 8, %i1
	set	f_9, %i2
	st	%i2, [%o5 + 0]
	set	9, %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
	ret
	restore
