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

@edi = internal unnamed_addr global i32 0, align 8

define x86_fp80 @function_0() local_unnamed_addr {
dec_label_pc_0:
  %eax.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
  %st3.global-to-local = alloca x86_fp80, align 4
  %st7.global-to-local = alloca x86_fp80, align 4
  %v0_0 = load i3, i3* %fpu_stat_TOP.global-to-local, align 1
  %v1_0 = load i32, i32* %esi.global-to-local, align 4
  %v2_0 = add i32 %v1_0, -104
  %v3_0 = inttoptr i32 %v2_0 to double*
  %v4_0 = load double, double* %v3_0, align 4
  %v5_0 = fpext double %v4_0 to x86_fp80
  %v3_3 = fmul x86_fp80 %v5_0, %v5_0
  store x86_fp80 %v3_3, x86_fp80* %st7.global-to-local, align 4
  %v2_5 = add i32 %v1_0, -112
  %v3_5 = inttoptr i32 %v2_5 to double*
  %v4_5 = load double, double* %v3_5, align 4
  %v5_5 = fpext double %v4_5 to x86_fp80
  %v3_8 = fmul x86_fp80 %v5_5, %v5_5
  %v4_a = fadd x86_fp80 %v3_3, %v3_8
  %v2_c = call x86_fp80 @llvm.sqrt.f80(x86_fp80 %v4_a)
  store x86_fp80 %v2_c, x86_fp80* %st7.global-to-local, align 4
  %v2_e = load i32, i32* @edi, align 8
  %v3_e = add i32 %v2_e, -16
  %v4_e = inttoptr i32 %v3_e to double*
  %v5_e = load double, double* %v4_e, align 4
  %v6_e = fpext double %v5_e to x86_fp80
  %v7_e = fsub x86_fp80 %v2_c, %v6_e
  store x86_fp80 %v7_e, x86_fp80* %st7.global-to-local, align 4
  %v6_22 = xor i3 %v0_0, -4
  store i3 %v6_22, i3* %fpu_stat_TOP.global-to-local, align 1
  %v0_27 = call i32 @__asm_fpatan()
  store i32 %v0_27, i32* %eax.global-to-local, align 4
  %v1_2d = load i32, i32* %esi.global-to-local, align 4
  %v2_2d = add i32 %v1_2d, -112
  %v3_2d = inttoptr i32 %v2_2d to double*
  %v4_2d = load double, double* %v3_2d, align 4
  %v5_2d = fpext double %v4_2d to x86_fp80
  store x86_fp80 %v5_2d, x86_fp80* %st3.global-to-local, align 4
  %v6_30 = add i3 %v0_0, 2
  store i3 %v6_30, i3* %fpu_stat_TOP.global-to-local, align 1
  %v0_33 = call i32 @__asm_fpatan()
  store i32 %v0_33, i32* %eax.global-to-local, align 4
  %v0_37 = load i32, i32* @edi, align 8
  %v1_37 = add i32 %v0_37, -68
  %v2_37 = inttoptr i32 %v1_37 to i32*
  %v3_37 = load i32, i32* %v2_37, align 4
  %v10_37 = icmp eq i32 %v3_37, 0
  %v1_3b = icmp eq i1 %v10_37, false
  %v0_ea = load i3, i3* %fpu_stat_TOP.global-to-local, align 1
  br i1 %v1_3b, label %dec_label_pc_ea, label %dec_label_pc_41

dec_label_pc_41:                                  ; preds = %dec_label_pc_0, %dec_label_pc_ea
  %v6_48.pre-phi = add i3 %v0_ea, -1
  store i3 %v6_48.pre-phi, i3* %fpu_stat_TOP.global-to-local, align 1
  %v0_4d = load i32, i32* %fpsw.global-to-local, align 4
  %v1_4d = call i16 @__asm_fnstsw(i32 %v0_4d)
  %v2_4d = sext i16 %v1_4d to i32
  %v3_4d = load i32, i32* %eax.global-to-local, align 4
  %v4_4d = and i32 %v3_4d, -65536
  %v5_4d = or i32 %v4_4d, %v2_4d
  store i32 %v5_4d, i32* %eax.global-to-local, align 4
  %v9_515 = and i32 %v2_4d, 16384
  %v10_51 = icmp eq i32 %v9_515, 0
  %v0_52 = load i3, i3* %fpu_stat_TOP.global-to-local, align 1
  %v4_52 = add i3 %v0_52, 1
  store i3 %v4_52, i3* %fpu_stat_TOP.global-to-local, align 1
  %v1_8c.pre = load x86_fp80, x86_fp80* %st7.global-to-local, align 4
  %v2_8c.pre = load i32, i32* %esi.global-to-local, align 4
  %.pre15 = add i32 %v2_8c.pre, -120
  br i1 %v10_51, label %dec_label_pc_56, label %dec_label_pc_41.dec_label_pc_8c_crit_edge

dec_label_pc_41.dec_label_pc_8c_crit_edge:        ; preds = %dec_label_pc_41
  %.pre16 = inttoptr i32 %.pre15 to double*
  br label %dec_label_pc_8c

dec_label_pc_56:                                  ; preds = %dec_label_pc_41
  %v4_56 = fptrunc x86_fp80 %v1_8c.pre to double
  %v5_56 = inttoptr i32 %.pre15 to double*
  store double %v4_56, double* %v5_56, align 4
  %v1_59 = load i32, i32* @edi, align 8
  %v2_59 = add i32 %v1_59, -76
  %v3_59 = inttoptr i32 %v2_59 to double*
  %v4_59 = load double, double* %v3_59, align 4
  %v5_59 = fpext double %v4_59 to x86_fp80
  %v3_5c = fadd x86_fp80 %v5_59, %v5_59
  %v3_5e = fadd x86_fp80 %v3_5c, %v3_5c
  store x86_fp80 %v3_5e, x86_fp80* %st7.global-to-local, align 4
  %v4_60 = load double, double* %v5_56, align 4
  %v5_60 = fpext double %v4_60 to x86_fp80
  %v4_66 = fdiv x86_fp80 %v5_60, %v3_5e
  %v2_69 = call x86_fp80 @llvm.round.f80(x86_fp80 %v4_66)
  %v4_6b = fmul x86_fp80 %v3_5e, %v2_69
  %v4_6e = fsub x86_fp80 %v5_60, %v4_6b
  %v2_72 = fsub x86_fp80 0xK80000000000000000000, %v4_6e
  store x86_fp80 %v2_72, x86_fp80* %st7.global-to-local, align 4
  %v5_78 = load double, double* %v3_59, align 4
  %v6_78 = fpext double %v5_78 to x86_fp80
  %v7_78 = fadd x86_fp80 %v4_6e, %v6_78
  %v2_7b = call x86_fp80 @llvm.fabs.f80(x86_fp80 %v7_78)
  %v7_81 = fsub x86_fp80 %v4_6e, %v6_78
  %v2_84 = call x86_fp80 @llvm.fabs.f80(x86_fp80 %v7_81)
  %v4_88 = fsub x86_fp80 %v2_7b, %v2_84
  %v4_8a = fsub x86_fp80 %v4_88, %v4_6e
  store x86_fp80 %v4_8a, x86_fp80* %st7.global-to-local, align 4
  store i3 %v4_52, i3* %fpu_stat_TOP.global-to-local, align 1
  br label %dec_label_pc_8c

dec_label_pc_8c:                                  ; preds = %dec_label_pc_41.dec_label_pc_8c_crit_edge, %dec_label_pc_56
  %v5_8c.pre-phi = phi double* [ %.pre16, %dec_label_pc_41.dec_label_pc_8c_crit_edge ], [ %v5_56, %dec_label_pc_56 ]
  %v1_8c = phi x86_fp80 [ %v1_8c.pre, %dec_label_pc_41.dec_label_pc_8c_crit_edge ], [ %v4_8a, %dec_label_pc_56 ]
  %v4_8c = fptrunc x86_fp80 %v1_8c to double
  store double %v4_8c, double* %v5_8c.pre-phi, align 4
  %v1_8f = load x86_fp80, x86_fp80* %st7.global-to-local, align 4
  %v2_8f = load i32, i32* @edi, align 8
  %v3_8f = add i32 %v2_8f, -40
  %v4_8f = inttoptr i32 %v3_8f to double*
  %v5_8f = load double, double* %v4_8f, align 4
  %v6_8f = fpext double %v5_8f to x86_fp80
  %v7_8f = fmul x86_fp80 %v1_8f, %v6_8f
  store x86_fp80 %v7_8f, x86_fp80* %st7.global-to-local, align 4
  %v3_92 = add i32 %v2_8f, -48
  %v4_92 = inttoptr i32 %v3_92 to double*
  %v5_92 = load double, double* %v4_92, align 4
  %v6_92 = fpext double %v5_92 to x86_fp80
  %v7_92 = fsub x86_fp80 %v7_8f, %v6_92
  store x86_fp80 %v7_92, x86_fp80* %st7.global-to-local, align 4
  store i3 %v4_52, i3* %fpu_stat_TOP.global-to-local, align 1
  %v0_9b = load i32, i32* %fpsw.global-to-local, align 4
  %v1_9b = call i16 @__asm_fnstsw(i32 %v0_9b)
  %v2_9b = sext i16 %v1_9b to i32
  %v3_9b = load i32, i32* %eax.global-to-local, align 4
  %v4_9b = and i32 %v3_9b, -65536
  %v5_9b = or i32 %v4_9b, %v2_9b
  store i32 %v5_9b, i32* %eax.global-to-local, align 4
  %v9_9f6 = and i32 %v2_9b, 16384
  %v10_9f = icmp eq i32 %v9_9f6, 0
  %v0_a0 = load i3, i3* %fpu_stat_TOP.global-to-local, align 1
  %v4_a0 = add i3 %v0_a0, 1
  store i3 %v4_a0, i3* %fpu_stat_TOP.global-to-local, align 1
  %v1_da.pre = load x86_fp80, x86_fp80* %st7.global-to-local, align 4
  %v2_da.pre = load i32, i32* %esi.global-to-local, align 4
  %.pre17 = add i32 %v2_da.pre, -112
  br i1 %v10_9f, label %dec_label_pc_a4, label %dec_label_pc_8c.dec_label_pc_da_crit_edge

dec_label_pc_8c.dec_label_pc_da_crit_edge:        ; preds = %dec_label_pc_8c
  %.pre18 = inttoptr i32 %.pre17 to double*
  br label %dec_label_pc_da

dec_label_pc_a4:                                  ; preds = %dec_label_pc_8c
  %v4_a4 = fptrunc x86_fp80 %v1_da.pre to double
  %v5_a4 = inttoptr i32 %.pre17 to double*
  store double %v4_a4, double* %v5_a4, align 4
  %v1_a7 = load i32, i32* @edi, align 8
  %v2_a7 = add i32 %v1_a7, -76
  %v3_a7 = inttoptr i32 %v2_a7 to double*
  %v4_a7 = load double, double* %v3_a7, align 4
  %v5_a7 = fpext double %v4_a7 to x86_fp80
  %v3_aa = fadd x86_fp80 %v5_a7, %v5_a7
  %v3_ac = fadd x86_fp80 %v3_aa, %v3_aa
  store x86_fp80 %v3_ac, x86_fp80* %st7.global-to-local, align 4
  %v4_ae = load double, double* %v5_a4, align 4
  %v5_ae = fpext double %v4_ae to x86_fp80
  %v4_b4 = fdiv x86_fp80 %v5_ae, %v3_ac
  %v2_b7 = call x86_fp80 @llvm.round.f80(x86_fp80 %v4_b4)
  %v4_b9 = fmul x86_fp80 %v3_ac, %v2_b7
  %v4_bc = fsub x86_fp80 %v5_ae, %v4_b9
  %v2_c0 = fsub x86_fp80 0xK80000000000000000000, %v4_bc
  store x86_fp80 %v2_c0, x86_fp80* %st7.global-to-local, align 4
  %v5_c6 = load double, double* %v3_a7, align 4
  %v6_c6 = fpext double %v5_c6 to x86_fp80
  %v7_c6 = fadd x86_fp80 %v4_bc, %v6_c6
  %v2_c9 = call x86_fp80 @llvm.fabs.f80(x86_fp80 %v7_c6)
  %v7_cf = fsub x86_fp80 %v4_bc, %v6_c6
  %v2_d2 = call x86_fp80 @llvm.fabs.f80(x86_fp80 %v7_cf)
  %v4_d6 = fsub x86_fp80 %v2_c9, %v2_d2
  %v4_d8 = fsub x86_fp80 %v4_d6, %v4_bc
  store x86_fp80 %v4_d8, x86_fp80* %st7.global-to-local, align 4
  store i3 %v4_a0, i3* %fpu_stat_TOP.global-to-local, align 1
  br label %dec_label_pc_da

dec_label_pc_da:                                  ; preds = %dec_label_pc_8c.dec_label_pc_da_crit_edge, %dec_label_pc_a4
  %v5_da.pre-phi = phi double* [ %.pre18, %dec_label_pc_8c.dec_label_pc_da_crit_edge ], [ %v5_a4, %dec_label_pc_a4 ]
  %v1_da = phi x86_fp80 [ %v1_da.pre, %dec_label_pc_8c.dec_label_pc_da_crit_edge ], [ %v4_d8, %dec_label_pc_a4 ]
  %v4_da = fptrunc x86_fp80 %v1_da to double
  store double %v4_da, double* %v5_da.pre-phi, align 4
  %v1_dd = load x86_fp80, x86_fp80* %st7.global-to-local, align 4
  %v2_dd = load i32, i32* @edi, align 8
  %v3_dd = add i32 %v2_dd, -56
  %v4_dd = inttoptr i32 %v3_dd to double*
  %v5_dd = load double, double* %v4_dd, align 4
  %v6_dd = fpext double %v5_dd to x86_fp80
  %v7_dd = fmul x86_fp80 %v1_dd, %v6_dd
  store x86_fp80 %v7_dd, x86_fp80* %st7.global-to-local, align 4
  %v3_e0 = add i32 %v2_dd, -64
  %v4_e0 = inttoptr i32 %v3_e0 to double*
  %v5_e0 = load double, double* %v4_e0, align 4
  %v6_e0 = fpext double %v5_e0 to x86_fp80
  %v7_e0 = fsub x86_fp80 %v7_dd, %v6_e0
  store x86_fp80 %v7_e0, x86_fp80* %st7.global-to-local, align 4
  %v3_e3 = add i32 %v2_da.pre, -104
  %v4_e3 = fptrunc x86_fp80 %v7_e0 to double
  %v5_e3 = inttoptr i32 %v3_e3 to double*
  store double %v4_e3, double* %v5_e3, align 4
  %v1_e6 = load x86_fp80, x86_fp80* %st7.global-to-local, align 4
  %v4_e6 = xor i3 %v0_a0, -4
  store i3 %v4_e6, i3* %fpu_stat_TOP.global-to-local, align 1
  ret x86_fp80 %v1_e6

dec_label_pc_ea:                                  ; preds = %dec_label_pc_0
  %v2_ea = add i32 %v0_37, 8
  %v3_ea = inttoptr i32 %v2_ea to double*
  %v4_ea = load double, double* %v3_ea, align 4
  %v5_ea = fpext double %v4_ea to x86_fp80
  %v2_ef = load x86_fp80, x86_fp80* %st3.global-to-local, align 4
  %v4_ef = fmul x86_fp80 %v2_ef, %v5_ea
  store x86_fp80 %v4_ef, x86_fp80* %st3.global-to-local, align 4
  br label %dec_label_pc_41
}

; Function Attrs: nounwind readnone speculatable
declare x86_fp80 @llvm.sqrt.f80(x86_fp80) #0

declare i32 @__asm_fpatan() local_unnamed_addr

; Function Attrs: nounwind readnone speculatable
declare x86_fp80 @llvm.fabs.f80(x86_fp80) #0

declare i16 @__asm_fnstsw(i32) local_unnamed_addr

; Function Attrs: nounwind readnone speculatable
declare x86_fp80 @llvm.round.f80(x86_fp80) #0

attributes #0 = { nounwind readnone speculatable }
