source_filename = "test"
target datalayout = "e-p:32:32-f64:32:64-f80:32-n8:16:32-S128"

@fpu_stat_TOP = internal unnamed_addr global i3 0
@eax = internal unnamed_addr global i32 0, align 8
@ecx = internal unnamed_addr global i32 0, align 8
@edx = internal unnamed_addr global i32 0, align 8
@ebx = internal unnamed_addr global i32 0, align 8
@edi = internal unnamed_addr global i32 0, align 8

define i32 @function_0(i32 %arg1) local_unnamed_addr {
dec_label_pc_0:
  %ebp.global-to-local = alloca i32, align 4
  %esi.global-to-local = alloca i32, align 4
  %fpsw.global-to-local = alloca i32, align 4
  %fpu_stat_TOP.global-to-local = alloca i3, align 1
  %st7.global-to-local = alloca x86_fp80, align 4
  %v0_0 = load i32, i32* %ebp.global-to-local, align 4
  %v0_3 = load i32, i32* @ebx, align 8
  %v0_4 = load i32, i32* %esi.global-to-local, align 4
  %v0_5 = load i32, i32* @edi, align 8
  store i32 %arg1, i32* %esi.global-to-local, align 4
  %v1_9 = add i32 %arg1, 48
  %v2_9 = inttoptr i32 %v1_9 to i32*
  %v3_9 = load i32, i32* %v2_9, align 4
  store i32 %v3_9, i32* @edi, align 8
  %v0_c = load i32, i32* @eax, align 8
  store i32 %v0_c, i32* @ebx, align 8
  %v1_10 = add i32 %v3_9, -36
  %v2_10 = inttoptr i32 %v1_10 to i32*
  %v3_10 = load i32, i32* %v2_10, align 4
  %v10_10 = icmp eq i32 %v3_10, 0
  br i1 %v10_10, label %dec_label_pc_1b, label %dec_label_pc_16

dec_label_pc_16:                                  ; preds = %dec_label_pc_0
  %v4_16 = call x86_fp80 @function_94(i32 %v0_5, i32 %v0_4, i32 %v0_3, i32 %v0_0)
  store x86_fp80 %v4_16, x86_fp80* %st7.global-to-local, align 4
  %v5_16 = fptrunc x86_fp80 %v4_16 to float
  %v6_16 = bitcast float %v5_16 to i32
  store i32 %v6_16, i32* @eax, align 8
  %v0_1d.pre = load i32, i32* @edi, align 8
  br label %dec_label_pc_1b

dec_label_pc_1b:                                  ; preds = %dec_label_pc_16, %dec_label_pc_0
  %v0_44 = phi i32 [ %v0_1d.pre, %dec_label_pc_16 ], [ %v3_9, %dec_label_pc_0 ]
  %v0_1b = load i3, i3* @fpu_stat_TOP, align 1
  %v3_1b = load double, double* bitcast (i32* @eax to double*), align 8
  %v4_1b = fpext double %v3_1b to x86_fp80
  %v5_1b = add i3 %v0_1b, -1
  store i3 %v5_1b, i3* %fpu_stat_TOP.global-to-local, align 1
  store x86_fp80 %v4_1b, x86_fp80* %st7.global-to-local, align 4
  %v1_1d = add i32 %v0_44, -24
  %v2_1d = inttoptr i32 %v1_1d to i32*
  %v3_1d = load i32, i32* %v2_1d, align 4
  %v10_1d = icmp eq i32 %v3_1d, 0
  br i1 %v10_1d, label %dec_label_pc_25, label %dec_label_pc_23

dec_label_pc_23:                                  ; preds = %dec_label_pc_1b
  %v2_23 = fsub x86_fp80 0xK80000000000000000000, %v4_1b
  store x86_fp80 %v2_23, x86_fp80* %st7.global-to-local, align 4
  br label %dec_label_pc_25

dec_label_pc_25:                                  ; preds = %dec_label_pc_23, %dec_label_pc_1b
  %v1_2d = phi x86_fp80 [ %v2_23, %dec_label_pc_23 ], [ %v4_1b, %dec_label_pc_1b ]
  %v5_25 = add i3 %v0_1b, -2
  store i3 %v5_25, i3* %fpu_stat_TOP.global-to-local, align 1
  %v1_27 = add i32 %v0_44, -28
  %v2_27 = inttoptr i32 %v1_27 to i32*
  %v3_27 = load i32, i32* %v2_27, align 4
  %v10_27 = icmp eq i32 %v3_27, 0
  br i1 %v10_27, label %dec_label_pc_2f, label %dec_label_pc_2d

dec_label_pc_2d:                                  ; preds = %dec_label_pc_25
  %v2_2d = fsub x86_fp80 0xK80000000000000000000, %v1_2d
  store x86_fp80 %v2_2d, x86_fp80* %st7.global-to-local, align 4
  br label %dec_label_pc_2f

dec_label_pc_2f:                                  ; preds = %dec_label_pc_2d, %dec_label_pc_25
  %v3_31 = load double, double* bitcast (i32* @ecx to double*), align 8
  %v4_31 = fpext double %v3_31 to x86_fp80
  store i3 %v5_25, i3* %fpu_stat_TOP.global-to-local, align 1
  store x86_fp80 %v4_31, x86_fp80* %st7.global-to-local, align 4
  %v1_33 = add i32 %v0_44, -32
  %v2_33 = inttoptr i32 %v1_33 to i32*
  %v3_33 = load i32, i32* %v2_33, align 4
  %v10_33 = icmp eq i32 %v3_33, 0
  br i1 %v10_33, label %dec_label_pc_3b, label %dec_label_pc_39

dec_label_pc_39:                                  ; preds = %dec_label_pc_2f
  %v2_39 = fsub x86_fp80 0xK80000000000000000000, %v4_31
  store x86_fp80 %v2_39, x86_fp80* %st7.global-to-local, align 4
  br label %dec_label_pc_3b

dec_label_pc_3b:                                  ; preds = %dec_label_pc_39, %dec_label_pc_2f
  %v2_3b = phi x86_fp80 [ %v2_39, %dec_label_pc_39 ], [ %v4_31, %dec_label_pc_2f ]
  %v4_3b = fadd x86_fp80 %v2_3b, %v2_3b
  store x86_fp80 %v4_3b, x86_fp80* %st7.global-to-local, align 4
  %v2_3d = add i32 %v0_44, -16
  %v3_3d = inttoptr i32 %v2_3d to double*
  %v4_3d = load double, double* %v3_3d, align 4
  %v5_3d = fpext double %v4_3d to x86_fp80
  %v4_40 = fsub x86_fp80 %v5_3d, %v5_3d
  store i3 %v5_25, i3* %fpu_stat_TOP.global-to-local, align 1
  store x86_fp80 %v4_40, x86_fp80* %st7.global-to-local, align 4
  %v1_44 = add i32 %v0_44, -20
  %v2_44 = inttoptr i32 %v1_44 to i32*
  %v3_44 = load i32, i32* %v2_44, align 4
  %v10_44 = icmp eq i32 %v3_44, 0
  br i1 %v10_44, label %dec_label_pc_4c, label %dec_label_pc_4a

dec_label_pc_4a:                                  ; preds = %dec_label_pc_3b
  %v2_4a = fsub x86_fp80 0xK80000000000000000000, %v4_40
  store x86_fp80 %v2_4a, x86_fp80* %st7.global-to-local, align 4
  br label %dec_label_pc_4c

dec_label_pc_4c:                                  ; preds = %dec_label_pc_4a, %dec_label_pc_3b
  %v0_4e = load i32, i32* %fpsw.global-to-local, align 4
  %v1_4e = call i16 @__asm_fnstsw(i32 %v0_4e)
  %v2_4e = sext i16 %v1_4e to i32
  %v3_4e = load i32, i32* @eax, align 8
  %v4_4e = and i32 %v3_4e, -65536
  %v5_4e = or i32 %v4_4e, %v2_4e
  store i32 %v5_4e, i32* @eax, align 8
  %tmp245 = and i32 %v2_4e, 256
  %v4_50 = icmp eq i32 %tmp245, 0
  %v0_51 = load i3, i3* %fpu_stat_TOP.global-to-local, align 1
  %v4_51 = add i3 %v0_51, 1
  store i3 %v4_51, i3* %fpu_stat_TOP.global-to-local, align 1
  br i1 %v4_50, label %dec_label_pc_55, label %dec_label_pc_87

dec_label_pc_55:                                  ; preds = %dec_label_pc_4c
  %v1_55 = load x86_fp80, x86_fp80* %st7.global-to-local, align 4
  %v2_55 = load i32, i32* @edi, align 8
  %v3_55 = inttoptr i32 %v2_55 to double*
  %v4_55 = load double, double* %v3_55, align 4
  %v5_55 = fpext double %v4_55 to x86_fp80
  %v6_55 = fmul x86_fp80 %v1_55, %v5_55
  store x86_fp80 %v6_55, x86_fp80* %st7.global-to-local, align 4
  %v3_57 = load double, double* bitcast (i32* @eax to double*), align 8
  %v4_57 = fpext double %v3_57 to x86_fp80
  %v1_59 = add i32 %v2_55, -24
  %v2_59 = inttoptr i32 %v1_59 to i32*
  %v3_59 = load i32, i32* %v2_59, align 4
  %v10_59 = icmp eq i32 %v3_59, 0
  %tmp246 = fsub x86_fp80 0xK80000000000000000000, %v6_55
  %storemerge5.in.in.p = select i1 %v10_59, x86_fp80 %tmp246, x86_fp80 %v6_55
  %storemerge5.in.in = fadd x86_fp80 %storemerge5.in.in.p, %v4_57
  %v2_65 = load i32, i32* @ebx, align 8
  %v3_65 = fptrunc x86_fp80 %storemerge5.in.in to double
  %v4_65 = inttoptr i32 %v2_65 to double*
  store double %v3_65, double* %v4_65, align 4
  %v3_67 = load double, double* bitcast (i32* @edx to double*), align 8
  %v0_69 = load i32, i32* @edi, align 8
  %v1_69 = add i32 %v0_69, -28
  %v2_69 = inttoptr i32 %v1_69 to i32*
  %v3_69 = load i32, i32* %v2_69, align 4
  %v10_69 = icmp eq i32 %v3_69, 0
  %v2_73 = load x86_fp80, x86_fp80* %st7.global-to-local, align 4
  %tmp247 = fsub x86_fp80 0xK80000000000000000000, %v2_73
  %storemerge6.in.in.p = select i1 %v10_69, x86_fp80 %tmp247, x86_fp80 %v2_73
  %storemerge6.in.in = fadd x86_fp80 %v2_73, %storemerge6.in.in.p
  %tmp248 = bitcast double %v3_67 to i64
  %tmp249 = trunc i64 %tmp248 to i32
  %v3_75 = fptrunc x86_fp80 %storemerge6.in.in to double
  %v4_75 = inttoptr i32 %tmp249 to double*
  store double %v3_75, double* %v4_75, align 4
  %v3_77 = load double, double* bitcast (i32* @ecx to double*), align 8
  %v4_77 = fpext double %v3_77 to x86_fp80
  store x86_fp80 %v4_77, x86_fp80* %st7.global-to-local, align 4
  %v0_79 = load i32, i32* @edi, align 8
  %v1_79 = add i32 %v0_79, -32
  %v2_79 = inttoptr i32 %v1_79 to i32*
  %v3_79 = load i32, i32* %v2_79, align 4
  %v10_79 = icmp eq i32 %v3_79, 0
  %tmp250 = fsub x86_fp80 0xK80000000000000000000, %v4_77
  %storemerge7.in.in.p = select i1 %v10_79, x86_fp80 %tmp250, x86_fp80 %v4_77
  %storemerge7.in.in = fadd x86_fp80 %storemerge7.in.in.p, %v4_77
  store x86_fp80 %storemerge7.in.in, x86_fp80* %st7.global-to-local, align 4
  %tmp251 = bitcast double %v3_77 to i64
  %tmp252 = trunc i64 %tmp251 to i32
  %v3_85 = fptrunc x86_fp80 %storemerge7.in.in to double
  %v4_85 = inttoptr i32 %tmp252 to double*
  store double %v3_85, double* %v4_85, align 4
  store i3 %v4_51, i3* %fpu_stat_TOP.global-to-local, align 1
  br label %dec_label_pc_87

dec_label_pc_87:                                  ; preds = %dec_label_pc_4c, %dec_label_pc_55
  %v4_87 = add i3 %v0_51, 2
  store i3 %v4_87, i3* %fpu_stat_TOP.global-to-local, align 1
  %v0_8b = load i32, i32* @ebx, align 8
  store i32 %v0_8b, i32* @eax, align 8
  store i32 %v0_5, i32* @edi, align 8
  store i32 %v0_4, i32* %esi.global-to-local, align 4
  store i32 %v0_3, i32* @ebx, align 8
  ret i32 %v0_8b
}

define x86_fp80 @function_94(i32 %arg1, i32 %arg2, i32 %arg3, i32 %arg4) local_unnamed_addr {
dec_label_pc_94:
  %st7.global-to-local = alloca x86_fp80, align 4
  %v0_94 = load i3, i3* @fpu_stat_TOP, align 1
  %v3_94 = load double, double* bitcast (i32* @ebx to double*), align 8
  %v4_94 = fpext double %v3_94 to x86_fp80
  store x86_fp80 %v4_94, x86_fp80* %st7.global-to-local, align 4
  %v0_96 = load i32, i32* @edi, align 8
  %v1_96 = add i32 %v0_96, -24
  %v2_96 = inttoptr i32 %v1_96 to i32*
  %v3_96 = load i32, i32* %v2_96, align 4
  %v10_96 = icmp eq i32 %v3_96, 0
  %v1_9a = icmp eq i1 %v10_96, false
  %tmp = bitcast double %v3_94 to i64
  %tmp9 = trunc i64 %tmp to i32
  br i1 %v1_9a, label %dec_label_pc_9e, label %dec_label_pc_9c

dec_label_pc_9c:                                  ; preds = %dec_label_pc_94
  %v2_9c = fsub x86_fp80 0xK80000000000000000000, %v4_94
  store x86_fp80 %v2_9c, x86_fp80* %st7.global-to-local, align 4
  br label %dec_label_pc_9e

dec_label_pc_9e:                                  ; preds = %dec_label_pc_9c, %dec_label_pc_94
  %v3_a8 = phi x86_fp80 [ %v2_9c, %dec_label_pc_9c ], [ %v4_94, %dec_label_pc_94 ]
  %v3_9e = load double, double* bitcast (i32* @edx to double*), align 8
  %v4_9e = fpext double %v3_9e to x86_fp80
  %v1_a0 = add i32 %v0_96, -28
  %v2_a0 = inttoptr i32 %v1_a0 to i32*
  %v3_a0 = load i32, i32* %v2_a0, align 4
  %v10_a0 = icmp eq i32 %v3_a0, 0
  %v1_a4 = icmp eq i1 %v10_a0, false
  %v2_a6 = fsub x86_fp80 0xK80000000000000000000, %v4_9e
  %spec.select = select i1 %v1_a4, x86_fp80 %v4_9e, x86_fp80 %v2_a6
  %v4_a8 = fadd x86_fp80 %v3_a8, %spec.select
  store x86_fp80 %v4_a8, x86_fp80* %st7.global-to-local, align 4
  %v1_ac = add i32 %v0_96, -32
  %v2_ac = inttoptr i32 %v1_ac to i32*
  %v3_ac = load i32, i32* %v2_ac, align 4
  %v10_ac = icmp eq i32 %v3_ac, 0
  %v1_b0 = icmp eq i1 %v10_ac, false
  br i1 %v1_b0, label %dec_label_pc_b4, label %dec_label_pc_b2

dec_label_pc_b2:                                  ; preds = %dec_label_pc_9e
  %v2_b2 = fsub x86_fp80 0xK80000000000000000000, %v4_a8
  store x86_fp80 %v2_b2, x86_fp80* %st7.global-to-local, align 4
  br label %dec_label_pc_b4

dec_label_pc_b4:                                  ; preds = %dec_label_pc_b2, %dec_label_pc_9e
  %v2_b4 = phi x86_fp80 [ %v2_b2, %dec_label_pc_b2 ], [ %v4_a8, %dec_label_pc_9e ]
  %v4_b4 = fadd x86_fp80 %v2_b4, %v2_b4
  %v4_b6 = load double, double* bitcast (i32* @edi to double*), align 8
  %v5_b6 = fpext double %v4_b6 to x86_fp80
  %v6_b6 = fmul x86_fp80 %v4_b4, %v5_b6
  store x86_fp80 %v6_b6, x86_fp80* %st7.global-to-local, align 4
  %tmp10 = bitcast double %v4_b6 to i64
  %tmp11 = trunc i64 %tmp10 to i32
  %v1_ba = add i32 %tmp11, -24
  %v2_ba = inttoptr i32 %v1_ba to i32*
  %v3_ba = load i32, i32* %v2_ba, align 4
  %v10_ba = icmp eq i32 %v3_ba, 0
  %v1_be = icmp eq i1 %v10_ba, false
  %tmp12 = fsub x86_fp80 0xK80000000000000000000, %v6_b6
  %storemerge3.in.in.p = select i1 %v1_be, x86_fp80 %tmp12, x86_fp80 %v6_b6
  %storemerge3.in.in = fadd x86_fp80 %storemerge3.in.in.p, %v4_94
  %tmp13 = fptrunc x86_fp80 %storemerge3.in.in to double
  %v3_c8 = fsub double -0.000000e+00, %tmp13
  %v4_c8 = inttoptr i32 %tmp9 to double*
  store double %v3_c8, double* %v4_c8, align 4
  %v3_ca = load double, double* bitcast (i32* @edx to double*), align 8
  %v0_cc = load i32, i32* @edi, align 8
  %v1_cc = add i32 %v0_cc, -28
  %v2_cc = inttoptr i32 %v1_cc to i32*
  %v3_cc = load i32, i32* %v2_cc, align 4
  %v10_cc = icmp eq i32 %v3_cc, 0
  %v1_d0 = icmp eq i1 %v10_cc, false
  %v2_d6 = load x86_fp80, x86_fp80* %st7.global-to-local, align 4
  %tmp14 = fsub x86_fp80 0xK80000000000000000000, %v2_d6
  %storemerge4.in.in.p = select i1 %v1_d0, x86_fp80 %tmp14, x86_fp80 %v2_d6
  %storemerge4.in.in = fadd x86_fp80 %v2_d6, %storemerge4.in.in.p
  %tmp15 = bitcast double %v3_ca to i64
  %tmp16 = trunc i64 %tmp15 to i32
  %tmp17 = fptrunc x86_fp80 %storemerge4.in.in to double
  %v3_da = fsub double -0.000000e+00, %tmp17
  %v4_da = inttoptr i32 %tmp16 to double*
  store double %v3_da, double* %v4_da, align 4
  %v3_dc = load double, double* bitcast (i32* @ecx to double*), align 8
  %v4_dc = fpext double %v3_dc to x86_fp80
  store x86_fp80 %v4_dc, x86_fp80* %st7.global-to-local, align 4
  %v0_de = load i32, i32* @edi, align 8
  %v1_de = add i32 %v0_de, -32
  %v2_de = inttoptr i32 %v1_de to i32*
  %v3_de = load i32, i32* %v2_de, align 4
  %v10_de = icmp eq i32 %v3_de, 0
  %v1_e2 = icmp eq i1 %v10_de, false
  %tmp18 = fsub x86_fp80 0xK80000000000000000000, %v4_dc
  %storemerge5.in.in.p = select i1 %v1_e2, x86_fp80 %tmp18, x86_fp80 %v4_dc
  %storemerge5.in.in = fadd x86_fp80 %storemerge5.in.in.p, %v4_dc
  %v2_ea = fsub x86_fp80 0xK80000000000000000000, %storemerge5.in.in
  store x86_fp80 %v2_ea, x86_fp80* %st7.global-to-local, align 4
  %tmp19 = bitcast double %v3_dc to i64
  %tmp20 = trunc i64 %tmp19 to i32
  %v3_ec = fptrunc x86_fp80 %v2_ea to double
  %v4_ec = inttoptr i32 %tmp20 to double*
  store double %v3_ec, double* %v4_ec, align 4
  %v1_ee = load x86_fp80, x86_fp80* %st7.global-to-local, align 4
  store i3 %v0_94, i3* @fpu_stat_TOP, align 1
  ret x86_fp80 %v1_ee
}

declare i16 @__asm_fnstsw(i32) local_unnamed_addr
