

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

let rec inprod  v1 v2 acc i = 
   if not((0 <= i))
   then acc
   else (inprod v1 v2 (acc +. (v1.(i) *. v2.(i))) (i - 1))
in 
   let v1  = Array.create 3 1.23
   in 
      let v2  = Array.create 3 4.56
      in (print_int (truncate (1000000. *. (inprod v1 v2 0. 2))))

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

let rec inprod  : (float array, float array, float, int) -> float v1 : float array v2 : float array acc : float i : int = 
   if not((0 <= i))
   then acc
   else (inprod v1 v2 (acc +. (v1.(i) *. v2.(i))) (i - 1))
in 
   let v1  : float array = Array.create 3 1.23
   in 
      let v2  : float array = Array.create 3 4.56
      in (print_int (truncate (1000000. *. (inprod v1 v2 0. 2))))

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

let inprod  : (float array, float array, float, int) -> floatv1 : float array v2 : float array acc : float i : int = 
   let Ti11  : int = 0 in
   
   if Ti11 <= i 
   then 
      let Td15  : float = let Td14  : float = let Td12  : float = v1.(i) in
      
      let Td13  : float = v2.(i) in
      (Td12 *. Td13) in
      (acc +. Td14) in
      
      let Ti17  : int = let Ti16  : int = 1 in
      (i - Ti16) in
      (inprod v1 v2 Td15 Ti17)
   else acc
in 
   let v1  : float array = let Ti1  : int = 3 in
   
   let Td2  : float = 1.23 in
   EXTERN(create_float_array Ti1 Td2) in
   
   let v2  : float array = let Ti3  : int = 3 in
   
   let Td4  : float = 4.56 in
   EXTERN(create_float_array Ti3 Td4) in
   
   let Ti10  : int = let Td9  : float = let Td5  : float = 1000000. in
   
   let Td8  : float = let Td6  : float = 0. in
   
   let Ti7  : int = 2 in
   (inprod v1 v2 Td6 Ti7) in
   (Td5 *. Td8) in
   EXTERN(truncate Td9) in
   EXTERN(print_int Ti10)

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

let inprod_18  : (float array, float array, float, int) -> floatv1_19 : float array v2_20 : float array acc_21 : float i_22 : int = 
   let Ti11_35  : int = 0 in
   
   if Ti11_35 <= i_22 
   then 
      let Td15_36  : float = let Td14_39  : float = let Td12_40  : float = v1_19.(i_22) in
      
      let Td13_41  : float = v2_20.(i_22) in
      (Td12_40 *. Td13_41) in
      (acc_21 +. Td14_39) in
      
      let Ti17_37  : int = let Ti16_38  : int = 1 in
      (i_22 - Ti16_38) in
      (inprod_18 v1_19 v2_20 Td15_36 Ti17_37)
   else acc_21
in 
   let v1_23  : float array = let Ti1_33  : int = 3 in
   
   let Td2_34  : float = 1.23 in
   EXTERN(create_float_array Ti1_33 Td2_34) in
   
   let v2_24  : float array = let Ti3_31  : int = 3 in
   
   let Td4_32  : float = 4.56 in
   EXTERN(create_float_array Ti3_31 Td4_32) in
   
   let Ti10_25  : int = let Td9_26  : float = let Td5_27  : float = 1000000. in
   
   let Td8_28  : float = let Td6_29  : float = 0. in
   
   let Ti7_30  : int = 2 in
   (inprod_18 v1_23 v2_24 Td6_29 Ti7_30) in
   (Td5_27 *. Td8_28) in
   EXTERN(truncate Td9_26) in
   EXTERN(print_int Ti10_25)

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

let inprod_18  : (float array, float array, float, int) -> floatv1_19 : float array v2_20 : float array acc_21 : float i_22 : int = 
   let Ti11_35  : int = 0 in
   
   if Ti11_35 <= i_22 
   then 
      let Td12_40  : float = v1_19.(i_22) in
      
      let Td13_41  : float = v2_20.(i_22) in
      
      let Td14_39  : float = (Td12_40 *. Td13_41) in
      
      let Td15_36  : float = (acc_21 +. Td14_39) in
      
      let Ti16_38  : int = 1 in
      
      let Ti17_37  : int = (i_22 - Ti16_38) in
      (inprod_18 v1_19 v2_20 Td15_36 Ti17_37)
   else acc_21
in 
   let Ti1_33  : int = 3 in
   
   let Td2_34  : float = 1.23 in
   
   let v1_23  : float array = EXTERN(create_float_array Ti1_33 Td2_34) in
   
   let Ti3_31  : int = 3 in
   
   let Td4_32  : float = 4.56 in
   
   let v2_24  : float array = EXTERN(create_float_array Ti3_31 Td4_32) in
   
   let Td5_27  : float = 1000000. in
   
   let Td6_29  : float = 0. in
   
   let Ti7_30  : int = 2 in
   
   let Td8_28  : float = (inprod_18 v1_23 v2_24 Td6_29 Ti7_30) in
   
   let Td9_26  : float = (Td5_27 *. Td8_28) in
   
   let Ti10_25  : int = EXTERN(truncate Td9_26) in
   EXTERN(print_int Ti10_25)

===================== closure output ===============================
let LABEL(inprod_18) [] v1_19 : float array, v2_20 : float array, acc_21 : float, i_22 : int = 
   let Ti11_35  : int = 0 in
   
   if Ti11_35 <= i_22 
   then 
      let Td12_40  : float = v1_19.(i_22) in
      
      let Td13_41  : float = v2_20.(i_22) in
      
      let Td14_39  : float = (Td12_40 *. Td13_41) in
      
      let Td15_36  : float = (acc_21 +. Td14_39) in
      
      let Ti16_38  : int = 1 in
      
      let Ti17_37  : int = (i_22 - Ti16_38) in
      APPLY_DIRECT(LABEL(inprod_18) v1_19 v2_20 Td15_36 Ti17_37)
   else acc_21
in

let Ti1_33  : int = 3 in

let Td2_34  : float = 1.23 in

let v1_23  : float array = APPLY_DIRECT(LABEL(min_caml_create_float_array) Ti1_33 Td2_34) in

let Ti3_31  : int = 3 in

let Td4_32  : float = 4.56 in

let v2_24  : float array = APPLY_DIRECT(LABEL(min_caml_create_float_array) Ti3_31 Td4_32) in

let Td5_27  : float = 1000000. in

let Td6_29  : float = 0. in

let Ti7_30  : int = 2 in

let Td8_28  : float = APPLY_DIRECT(LABEL(inprod_18) v1_23 v2_24 Td6_29 Ti7_30) in

let Td9_26  : float = (Td5_27 *. Td8_28) in

let Ti10_25  : int = APPLY_DIRECT(LABEL(min_caml_truncate) Td9_26) in
APPLY_DIRECT(LABEL(min_caml_print_int) Ti10_25)

===================== virtual  output ===============================
==== Data Segment =======
l_51:	! 0.000000
	.long	0x0
	.long	0x0
l_49:	! 1000000.000000
	.long	0x0
	.long	0x412e8480
l_47:	! 4.560000
	.long	0xa3d70a3d
	.long	0x40123d70
l_45:	! 1.230000
	.long	0x7ae147ae
	.long	0x3ff3ae14
==== Function Declarations =======

LABEL(inprod_18) (arg=(v1_19, v2_20, i_22), farg=(acc_21))

LET(Ti11_35, set(0), 
   ANSWER(
      IfLE(Ti11_35, i_22, 
         LET(o_43, sub(i_22, 3), 
            LET(Td12_40, LdDF(v1_19, o_43), 
               LET(o_44, sub(i_22, 3), 
                  LET(Td13_41, LdDF(v2_20, o_44), 
                     LET(Td14_39, fmul(Td12_40, Td13_41), 
                        LET(Td15_36, fadd(acc_21, Td14_39), 
                           LET(Ti16_38, set(1), 
                              LET(Ti17_37, sub(i_22, Ti16_38), 
                                 ANSWER(CallDirect(LABEL(inprod_18), args=(v1_19, v2_20, Ti17_37), farg=(Td15_36))))))))))), 
         ANSWER(fmovd(acc_21)))))
==== Expression =======

LET(Ti1_33, set(3), 
   LET(l_46, set(LABEL(l_45)), 
      LET(Td2_34, LdDF(l_46, 0), 
         LET(v1_23, CallDirect(LABEL(min_caml_create_float_array), args=(Ti1_33), farg=(Td2_34)), 
            LET(Ti3_31, set(3), 
               LET(l_48, set(LABEL(l_47)), 
                  LET(Td4_32, LdDF(l_48, 0), 
                     LET(v2_24, CallDirect(LABEL(min_caml_create_float_array), args=(Ti3_31), farg=(Td4_32)), 
                        LET(l_50, set(LABEL(l_49)), 
                           LET(Td5_27, LdDF(l_50, 0), 
                              LET(l_52, set(LABEL(l_51)), 
                                 LET(Td6_29, LdDF(l_52, 0), 
                                    LET(Ti7_30, set(2), 
                                       LET(Td8_28, CallDirect(LABEL(inprod_18), args=(v1_23, v2_24, Ti7_30), farg=(Td6_29)), 
                                          LET(Td9_26, fmul(Td5_27, Td8_28), 
                                             LET(Ti10_25, CallDirect(LABEL(min_caml_truncate), args=(), farg=(Td9_26)), 
                                                ANSWER(CallDirect(LABEL(min_caml_print_int), args=(Ti10_25), farg=()))))))))))))))))))


=====================  simm13  output ===============================
==== Data Segment =======
l_51:	! 0.000000
	.long	0x0
	.long	0x0
l_49:	! 1000000.000000
	.long	0x0
	.long	0x412e8480
l_47:	! 4.560000
	.long	0xa3d70a3d
	.long	0x40123d70
l_45:	! 1.230000
	.long	0x7ae147ae
	.long	0x3ff3ae14
==== Function Declarations =======

LABEL(inprod_18) (arg=(v1_19, v2_20, i_22), farg=(acc_21))

ANSWER(
   IfGE(i_22, 0, 
      LET(o_43, sub(i_22, 3), 
         LET(Td12_40, LdDF(v1_19, o_43), 
            LET(o_44, sub(i_22, 3), 
               LET(Td13_41, LdDF(v2_20, o_44), 
                  LET(Td14_39, fmul(Td12_40, Td13_41), 
                     LET(Td15_36, fadd(acc_21, Td14_39), 
                        LET(Ti17_37, sub(i_22, 1), 
                           ANSWER(CallDirect(LABEL(inprod_18), args=(v1_19, v2_20, Ti17_37), farg=(Td15_36)))))))))), 
      ANSWER(fmovd(acc_21))))
==== Expression =======

LET(Ti1_33, set(3), 
   LET(l_46, set(LABEL(l_45)), 
      LET(Td2_34, LdDF(l_46, 0), 
         LET(v1_23, CallDirect(LABEL(min_caml_create_float_array), args=(Ti1_33), farg=(Td2_34)), 
            LET(Ti3_31, set(3), 
               LET(l_48, set(LABEL(l_47)), 
                  LET(Td4_32, LdDF(l_48, 0), 
                     LET(v2_24, CallDirect(LABEL(min_caml_create_float_array), args=(Ti3_31), farg=(Td4_32)), 
                        LET(l_50, set(LABEL(l_49)), 
                           LET(Td5_27, LdDF(l_50, 0), 
                              LET(l_52, set(LABEL(l_51)), 
                                 LET(Td6_29, LdDF(l_52, 0), 
                                    LET(Ti7_30, set(2), 
                                       LET(Td8_28, CallDirect(LABEL(inprod_18), args=(v1_23, v2_24, Ti7_30), farg=(Td6_29)), 
                                          LET(Td9_26, fmul(Td5_27, Td8_28), 
                                             LET(Ti10_25, CallDirect(LABEL(min_caml_truncate), args=(), farg=(Td9_26)), 
                                                ANSWER(CallDirect(LABEL(min_caml_print_int), args=(Ti10_25), farg=()))))))))))))))))))


===================== RegAlloc output ===============================
==== Data Segment =======
l_51:	! 0.000000
	.long	0x0
	.long	0x0
l_49:	! 1000000.000000
	.long	0x0
	.long	0x412e8480
l_47:	! 4.560000
	.long	0xa3d70a3d
	.long	0x40123d70
l_45:	! 1.230000
	.long	0x7ae147ae
	.long	0x3ff3ae14
==== Function Declarations =======

LABEL(inprod_18) (arg=(%i2, %i3, %i4), farg=(%f0))

ANSWER(
   IfGE(%i4, 0, 
      LET(%i5, sub(%i4, 3), 
         LET(%f2, LdDF(%i2, %i5), 
            LET(%i5, sub(%i4, 3), 
               LET(%f4, LdDF(%i3, %i5), 
                  LET(%f2, fmul(%f2, %f4), 
                     LET(%f0, fadd(%f0, %f2), 
                        LET(%i4, sub(%i4, 1), 
                           ANSWER(CallDirect(LABEL(inprod_18), args=(%i2, %i3, %i4), farg=(%f0)))))))))), 
      ANSWER(fmovd(%f0))))
==== Expression =======

LET(%i2, set(3), 
   LET(%i3, set(LABEL(l_45)), 
      LET(%f0, LdDF(%i3, 0), 
         LET(%i2, CallDirect(LABEL(min_caml_create_float_array), args=(%i2), farg=(%f0)), 
            LET(%g0, save(%i2, v1_23), 
               LET(%i2, set(3), 
                  LET(%i3, set(LABEL(l_47)), 
                     LET(%f0, LdDF(%i3, 0), 
                        LET(%i2, CallDirect(LABEL(min_caml_create_float_array), args=(%i2), farg=(%f0)), 
                           LET(%i3, mov(%i2), 
                              LET(%i2, set(LABEL(l_49)), 
                                 LET(%f0, LdDF(%i2, 0), 
                                    LET(%g0, save(%f0, Td5_27), 
                                       LET(%i2, set(LABEL(l_51)), 
                                          LET(%f0, LdDF(%i2, 0), 
                                             LET(%i4, set(2), 
                                                LET(%i2, restore(v1_23), 
                                                   LET(%f0, CallDirect(LABEL(inprod_18), args=(%i2, %i3, %i4), farg=(%f0)), 
                                                      LET(%f0, fmovd(%f0), 
                                                         LET(%f2, restore(Td5_27), 
                                                            LET(%f0, fmul(%f2, %f0), 
                                                               LET(%i2, CallDirect(LABEL(min_caml_truncate), args=(), farg=(%f0)), 
                                                                  ANSWER(CallDirect(LABEL(min_caml_print_int), args=(%i2), farg=()))))))))))))))))))))))))


===================== Emit output ===============================
.section	".rodata"
.align	8
l_51:	! 0.000000
	.long	0x0
	.long	0x0
l_49:	! 1000000.000000
	.long	0x0
	.long	0x412e8480
l_47:	! 4.560000
	.long	0xa3d70a3d
	.long	0x40123d70
l_45:	! 1.230000
	.long	0x7ae147ae
	.long	0x3ff3ae14
.section	".text"
inprod_18:
	cmp	%i4, 0
	bl	bge_else_58
	nop
	sll	%i4, 3, %i5
	ldd	[%i2 + %i5], %f2
	sll	%i4, 3, %i5
	ldd	[%i3 + %i5], %f4
	fmuld	%f2, %f4, %f2
	faddd	%f0, %f2, %f0
	sub	%i4, 1, %i4
	b	inprod_18
	nop
bge_else_58:
	retl
	nop
.global	min_caml_start
min_caml_start:
	save	%sp, -112, %sp
	set	3, %i2
	set	l_45, %i3
	ldd	[%i3 + 0], %f0
	st	%o7, [%i0 + 4]
	call	min_caml_create_float_array
	add	%i0, 8, %i0	! delay slot
	sub	%i0, 8, %i0
	ld	[%i0 + 4], %o7
	st	%i2, [%i0 + 0]
	set	3, %i2
	set	l_47, %i3
	ldd	[%i3 + 0], %f0
	st	%o7, [%i0 + 4]
	call	min_caml_create_float_array
	add	%i0, 8, %i0	! delay slot
	sub	%i0, 8, %i0
	ld	[%i0 + 4], %o7
	mov	%i2, %i3
	set	l_49, %i2
	ldd	[%i2 + 0], %f0
	std	%f0, [%i0 + 8]
	set	l_51, %i2
	ldd	[%i2 + 0], %f0
	set	2, %i4
	ld	[%i0 + 0], %i2
	st	%o7, [%i0 + 20]
	call	inprod_18
	add	%i0, 24, %i0	! delay slot
	sub	%i0, 24, %i0
	ld	[%i0 + 20], %o7
	ldd	[%i0 + 8], %f2
	fmuld	%f2, %f0, %f0
	st	%o7, [%i0 + 20]
	call	min_caml_truncate
	add	%i0, 24, %i0	! delay slot
	sub	%i0, 24, %i0
	ld	[%i0 + 20], %o7
	st	%o7, [%i0 + 20]
	call	min_caml_print_int
	add	%i0, 24, %i0	! delay slot
	sub	%i0, 24, %i0
	ld	[%i0 + 20], %o7
	ret
	restore
