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 i32 @function_0() local_unnamed_addr {
dec_label_pc_0:
  %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
  %tmp277 = call double @__decompiler_undefined_function_1()
  %stack_var_-48 = alloca double, align 8
  %v0_3 = load i32, i32* %esi.global-to-local, align 4
  %v1_3 = add i32 %v0_3, -120
  %v2_3 = inttoptr i32 %v1_3 to i128*
  %v3_3 = load i128, i128* %v2_3, align 4
  %v4_3 = call i128 @__asm_movupd(i128 %v3_3)
  %v1_8 = add i32 %v0_3, -104
  %v2_8 = inttoptr i32 %v1_8 to i64*
  %v3_8 = load i64, i64* %v2_8, align 4
  %v4_8 = call i128 @__asm_movsd(i64 %v3_8)
  %v1_d = load i32, i32* @edi, align 8
  %v2_d = add i32 %v1_d, -32
  %v3_d = inttoptr i32 %v2_d to i128*
  %v4_d = load i128, i128* %v3_d, align 4
  %v5_d = call i128 @__asm_mulpd(i128 %v4_3, i128 %v4_d)
  %v1_12 = load i32, i32* @edi, align 8
  %v2_12 = add i32 %v1_12, -32
  %v3_12 = inttoptr i32 %v2_12 to i64*
  %v4_12 = load i64, i64* %v3_12, align 4
  %v5_12 = call i128 @__asm_mulsd(i128 %v4_8, i64 %v4_12)
  %v1_17 = load i32, i32* @edi, align 8
  %v2_17 = add i32 %v1_17, -64
  %v3_17 = inttoptr i32 %v2_17 to i128*
  %v4_17 = load i128, i128* %v3_17, align 4
  %v5_17 = call i128 @__asm_addpd(i128 %v5_d, i128 %v4_17)
  %v1_1c = load i32, i32* @edi, align 8
  %v2_1c = add i32 %v1_1c, -48
  %v3_1c = inttoptr i32 %v2_1c to i64*
  %v4_1c = load i64, i64* %v3_1c, align 4
  %v5_1c = call i128 @__asm_addsd(i128 %v5_12, i64 %v4_1c)
  %v0_21 = load i32, i32* @edi, align 8
  %v1_21 = add i32 %v0_21, -76
  %v2_21 = inttoptr i32 %v1_21 to i32*
  %v3_21 = load i32, i32* %v2_21, align 4
  %v10_21 = icmp eq i32 %v3_21, 0
  br i1 %v10_21, label %dec_label_pc_40, label %dec_label_pc_27

dec_label_pc_27:                                  ; preds = %dec_label_pc_0
  %v0_27 = load i32, i32* %esi.global-to-local, align 4
  %v1_27 = add i32 %v0_27, 112
  %v2_27 = inttoptr i32 %v1_27 to i64*
  %v3_27 = load i64, i64* %v2_27, align 4
  %v4_27 = call i128 @__asm_movsd(i64 %v3_27)
  %v1_2c = load i32, i32* @edi, align 8
  %v2_2c = add i32 %v1_2c, -32
  %v3_2c = inttoptr i32 %v2_2c to i64*
  %v4_2c = load i64, i64* %v3_2c, align 4
  %v5_2c = call i128 @__asm_mulsd(i128 %v4_27, i64 %v4_2c)
  %v0_31 = load i32, i32* %esi.global-to-local, align 4
  %v1_31 = add i32 %v0_31, -120
  %v2_31 = inttoptr i32 %v1_31 to i128*
  %v3_31 = load i128, i128* %v2_31, align 4
  call void @__asm_movupd.1(i128 %v3_31, i128 %v5_17)
  %v1_36 = call i32 @__asm_movsd.2(i128 %v5_1c)
  %v3_36 = add i32 %v0_31, -104
  %v4_36 = sext i32 %v1_36 to i64
  %v5_36 = inttoptr i32 %v3_36 to i64*
  store i64 %v4_36, i64* %v5_36, align 4
  %v1_3b = call i32 @__asm_movsd.2(i128 %v5_2c)
  %v2_3b = load i32, i32* %esi.global-to-local, align 4
  %v3_3b = add i32 %v2_3b, 112
  %v4_3b = sext i32 %v1_3b to i64
  %v5_3b = inttoptr i32 %v3_3b to i64*
  store i64 %v4_3b, i64* %v5_3b, align 4
  br label %dec_label_pc_40

dec_label_pc_40:                                  ; preds = %dec_label_pc_27, %dec_label_pc_0
  %v2_40 = load double, double* %stack_var_-48, align 8
  %v3_40 = fptrunc double %v2_40 to float
  %v4_40 = bitcast float %v3_40 to i32
  %v5_40 = sext i32 %v4_40 to i128
  call void @__asm_movupd.1(i128 %v5_40, i128 %v5_17)
  %v1_45 = call i32 @__asm_movsd.2(i128 %v5_1c)
  %v4_45 = sext i32 %v1_45 to i64
  %v6_45 = bitcast i64 %v4_45 to double
  %v0_4b = load i3, i3* %fpu_stat_TOP.global-to-local, align 1
  %v3_4b = load double, double* %stack_var_-48, align 8
  %v8_4b = fpext double %v3_4b to x86_fp80
  %v3_4e = fmul x86_fp80 %v8_4b, %v8_4b
  %v5_50 = fpext double %tmp277 to x86_fp80
  %v3_54 = fmul x86_fp80 %v5_50, %v5_50
  %v4_56 = fadd x86_fp80 %v3_54, %v3_4e
  %v2_58 = call x86_fp80 @llvm.sqrt.f80(x86_fp80 %v4_56)
  store x86_fp80 %v2_58, x86_fp80* %st7.global-to-local, align 4
  %v2_5a = load i32, i32* @edi, align 8
  %v3_5a = add i32 %v2_5a, -72
  %v4_5a = inttoptr i32 %v3_5a to double*
  %v5_5a = load double, double* %v4_5a, align 4
  %v6_5a = fpext double %v5_5a to x86_fp80
  %v7_5a = fsub x86_fp80 %v2_58, %v6_5a
  %v4_5d = fptrunc x86_fp80 %v7_5a to double
  store x86_fp80 %v5_50, x86_fp80* %st7.global-to-local, align 4
  %v9_65 = add i3 %v0_4b, -2
  store i3 %v9_65, i3* %fpu_stat_TOP.global-to-local, align 1
  %v5_68 = call i32 @__asm_fpatan(i32 %v1_45, x86_fp80 %v7_5a)
  %v6_6c = add i3 %v0_4b, -3
  store i3 %v6_6c, i3* %fpu_stat_TOP.global-to-local, align 1
  %v0_72 = call i32 @__asm_wait()
  %v0_73 = load i32, i32* %fpsw.global-to-local, align 4
  %v1_73 = call i16 @__asm_fnstsw(i32 %v0_73)
  %tmp291 = and i16 %v1_73, 256
  %v4_75 = icmp ne i16 %tmp291, 0
  %v1_76 = icmp eq i1 %v4_75, false
  %v1_7f.pre = load x86_fp80, x86_fp80* %st7.global-to-local, align 4
  %v2_81.pre = load i32, i32* @edi, align 8
  br i1 %v1_76, label %dec_label_pc_7f, label %dec_label_pc_78

dec_label_pc_78:                                  ; preds = %dec_label_pc_40
  %v3_7a = add i32 %v2_81.pre, -108
  %v4_7a = inttoptr i32 %v3_7a to double*
  %v5_7a = load double, double* %v4_7a, align 4
  %v6_7a = fpext double %v5_7a to x86_fp80
  %v7_7a = fsub x86_fp80 %v1_7f.pre, %v6_7a
  store x86_fp80 %v7_7a, x86_fp80* %st7.global-to-local, align 4
  br label %dec_label_pc_7f

dec_label_pc_7f:                                  ; preds = %dec_label_pc_40, %dec_label_pc_78
  %v1_7f = phi x86_fp80 [ %v7_7a, %dec_label_pc_78 ], [ %v1_7f.pre, %dec_label_pc_40 ]
  %v3_81 = add i32 %v2_81.pre, -84
  %v4_81 = inttoptr i32 %v3_81 to double*
  %v5_81 = load double, double* %v4_81, align 4
  %v6_81 = fpext double %v5_81 to x86_fp80
  %v7_81 = fdiv x86_fp80 %v1_7f, %v6_81
  %v2_86 = call x86_fp80 @llvm.round.f80(x86_fp80 %v7_81)
  %v4_88 = fsub x86_fp80 %v7_81, %v2_86
  store x86_fp80 %v4_88, x86_fp80* %st7.global-to-local, align 4
  %v5_8a = load double, double* %v4_81, align 4
  %v6_8a = fpext double %v5_8a to x86_fp80
  %v7_8a = fmul x86_fp80 %v4_88, %v6_8a
  %v2_8d = call x86_fp80 @llvm.fabs.f80(x86_fp80 %v7_8a)
  store x86_fp80 %v2_8d, x86_fp80* %st7.global-to-local, align 4
  %v3_8f = add i32 %v2_81.pre, -16
  %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 = fdiv x86_fp80 %v2_8d, %v6_8f
  %v4_94 = fadd x86_fp80 %v7_8f, 0xKBFFF8000000000000000
  store x86_fp80 %v4_94, x86_fp80* %st7.global-to-local, align 4
  %v5_96 = load double, double* %v4_8f, align 4
  %v6_96 = fpext double %v5_96 to x86_fp80
  %v7_96 = fmul x86_fp80 %v4_94, %v6_96
  store x86_fp80 %v7_96, x86_fp80* %st7.global-to-local, align 4
  %v3_99 = add i32 %v2_81.pre, 8
  %v4_99 = inttoptr i32 %v3_99 to double*
  %v5_99 = load double, double* %v4_99, align 4
  %v6_99 = fpext double %v5_99 to x86_fp80
  %v7_99 = fmul x86_fp80 %v7_96, %v6_99
  %v2_9c = fsub x86_fp80 0xK80000000000000000000, %v7_99
  store x86_fp80 %v2_9c, x86_fp80* %st7.global-to-local, align 4
  %tmp283 = call double @llvm.fabs.f64(double %v4_5d)
  %v2_a2 = fpext double %tmp283 to x86_fp80
  %v0_a9 = call i32 @__asm_wait()
  %v0_aa = load i32, i32* %fpsw.global-to-local, align 4
  %v1_aa = call i16 @__asm_fnstsw(i32 %v0_aa)
  store x86_fp80 %v2_a2, x86_fp80* %st7.global-to-local, align 4
  %v2_bc = load i32, i32* @edi, align 8
  %v3_bc = add i32 %v2_bc, -116
  %v4_bc = inttoptr i32 %v3_bc to double*
  %v5_bc = load double, double* %v4_bc, align 4
  %v6_bc = fpext double %v5_bc to x86_fp80
  %v7_bc = fsub x86_fp80 %v2_a2, %v6_bc
  store x86_fp80 %v7_bc, x86_fp80* %st7.global-to-local, align 4
  %v0_c1 = call i32 @__asm_wait()
  %v0_c2 = load i32, i32* %fpsw.global-to-local, align 4
  %v1_c2 = call i16 @__asm_fnstsw(i32 %v0_c2)
  %tmp286 = call double @llvm.fabs.f64(double %v6_45)
  %v2_d2 = fpext double %tmp286 to x86_fp80
  store x86_fp80 %v2_d2, x86_fp80* %st7.global-to-local, align 4
  %v2_d4 = load i32, i32* @edi, align 8
  %v3_d4 = add i32 %v2_d4, -100
  %v4_d4 = inttoptr i32 %v3_d4 to double*
  %v5_d4 = load double, double* %v4_d4, align 4
  %v6_d4 = fpext double %v5_d4 to x86_fp80
  %v7_d4 = fsub x86_fp80 %v2_d2, %v6_d4
  store x86_fp80 %v7_d4, x86_fp80* %st7.global-to-local, align 4
  %v0_d9 = call i32 @__asm_wait()
  %v0_da = load i32, i32* %fpsw.global-to-local, align 4
  %v1_da = call i16 @__asm_fnstsw(i32 %v0_da)
  %v2_da = sext i16 %v1_da to i32
  %v4_da = and i32 %v0_d9, -65536
  %tmp287 = udiv i32 %v2_da, 2
  %v12_dc = and i32 %tmp287, 32512
  %v2_da.masked = and i32 %v2_da, -65281
  %v13_dc = or i32 %v4_da, %v2_da.masked
  %v14_dc = or i32 %v13_dc, %v12_dc
  %storemerge.in = load i3, i3* %fpu_stat_TOP.global-to-local, align 1
  %storemerge = add i3 %storemerge.in, 1
  store i3 %storemerge, i3* %fpu_stat_TOP.global-to-local, align 1
  %v0_e6 = load i32, i32* @edi, align 8
  %v1_e6 = add i32 %v0_e6, -76
  %v2_e6 = inttoptr i32 %v1_e6 to i32*
  %v3_e6 = load i32, i32* %v2_e6, align 4
  %v10_e6 = icmp eq i32 %v3_e6, 0
  %v1_ea = icmp eq i1 %v10_e6, false
  %v1_ef.pre = load x86_fp80, x86_fp80* %st7.global-to-local, align 4
  br i1 %v1_ea, label %dec_label_pc_ef, label %dec_label_pc_ec

dec_label_pc_ec:                                  ; preds = %dec_label_pc_7f
  %v3_ec = add i32 %v0_e6, -32
  %v4_ec = inttoptr i32 %v3_ec to double*
  %v5_ec = load double, double* %v4_ec, align 4
  %v6_ec = fpext double %v5_ec to x86_fp80
  %v7_ec = fdiv x86_fp80 %v1_ef.pre, %v6_ec
  store x86_fp80 %v7_ec, x86_fp80* %st7.global-to-local, align 4
  br label %dec_label_pc_ef

dec_label_pc_ef:                                  ; preds = %dec_label_pc_7f, %dec_label_pc_ec
  %v1_ef = phi x86_fp80 [ %v7_ec, %dec_label_pc_ec ], [ %v1_ef.pre, %dec_label_pc_7f ]
  %v2_ef = load i32, i32* %esi.global-to-local, align 4
  %v3_ef = add i32 %v2_ef, -32
  %v4_ef = fptrunc x86_fp80 %v1_ef to double
  %v5_ef = inttoptr i32 %v3_ef to double*
  store double %v4_ef, double* %v5_ef, align 4
  %v6_ef = add i3 %storemerge.in, 2
  store i3 %v6_ef, i3* %fpu_stat_TOP.global-to-local, align 1
  ret i32 %v14_dc
}

declare i128 @__asm_movupd(i128) local_unnamed_addr

declare i128 @__asm_movsd(i64) local_unnamed_addr

declare i128 @__asm_mulpd(i128, i128) local_unnamed_addr

declare i128 @__asm_mulsd(i128, i64) local_unnamed_addr

declare i128 @__asm_addpd(i128, i128) local_unnamed_addr

declare i128 @__asm_addsd(i128, i64) local_unnamed_addr

declare void @__asm_movupd.1(i128, i128) local_unnamed_addr

declare i32 @__asm_movsd.2(i128) local_unnamed_addr

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

declare i32 @__asm_fpatan(i32, x86_fp80) local_unnamed_addr

declare i32 @__asm_wait() local_unnamed_addr

declare i16 @__asm_fnstsw(i32) local_unnamed_addr

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

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

declare double @__decompiler_undefined_function_1() local_unnamed_addr

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

attributes #0 = { nounwind readnone speculatable }
