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
  %st6.global-to-local = alloca x86_fp80, align 4
  %st7.global-to-local = alloca x86_fp80, align 4
  %tmp263 = call double @__decompiler_undefined_function_1()
  %stack_var_-70 = 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_-70, 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)
  %tmp268 = zext i32 %v1_45 to i80
  %v7_45 = bitcast i80 %tmp268 to x86_fp80
  %v0_4b = load i32, i32* @edi, align 8
  %v1_4b = add i32 %v0_4b, -96
  %v2_4b = inttoptr i32 %v1_4b to i32*
  %v3_4b = load i32, i32* %v2_4b, align 4
  %v13_4b = icmp eq i32 %v3_4b, 1
  %v1_4f = icmp eq i1 %v13_4b, false
  br i1 %v1_4f, label %dec_label_pc_5f, label %dec_label_pc_51

dec_label_pc_51:                                  ; preds = %dec_label_pc_40
  %v3_51 = load double, double* %stack_var_-70, align 8
  %v8_51 = fpext double %v3_51 to x86_fp80
  store x86_fp80 %v8_51, x86_fp80* %st7.global-to-local, align 4
  store x86_fp80 %v7_45, x86_fp80* %st6.global-to-local, align 4
  %tmp269 = fptrunc x86_fp80 %v7_45 to double
  store double %tmp269, double* %stack_var_-70, align 8
  %v3_5f.pre = load i32, i32* %v2_4b, align 4
  br label %dec_label_pc_5f

dec_label_pc_5f:                                  ; preds = %dec_label_pc_51, %dec_label_pc_40
  %v3_5f = phi i32 [ %v3_4b, %dec_label_pc_40 ], [ %v3_5f.pre, %dec_label_pc_51 ]
  %stack_var_-54.0 = phi x86_fp80 [ %v7_45, %dec_label_pc_40 ], [ %v8_51, %dec_label_pc_51 ]
  %v13_5f = icmp eq i32 %v3_5f, -1
  %v1_63 = icmp eq i1 %v13_5f, false
  %v0_85.pre.pre = load i3, i3* %fpu_stat_TOP.global-to-local, align 1
  br i1 %v1_63, label %dec_label_pc_75, label %dec_label_pc_65

dec_label_pc_65:                                  ; preds = %dec_label_pc_5f
  %v5_65 = fpext double %tmp263 to x86_fp80
  store x86_fp80 %v5_65, x86_fp80* %st7.global-to-local, align 4
  store x86_fp80 %stack_var_-54.0, x86_fp80* %st6.global-to-local, align 4
  %v4_6d = fptrunc x86_fp80 %stack_var_-54.0 to double
  br label %dec_label_pc_75

dec_label_pc_75:                                  ; preds = %dec_label_pc_5f, %dec_label_pc_65
  %stack_var_-62.0 = phi double [ %v4_6d, %dec_label_pc_65 ], [ %tmp263, %dec_label_pc_5f ]
  %stack_var_-54.1 = phi x86_fp80 [ %v5_65, %dec_label_pc_65 ], [ %stack_var_-54.0, %dec_label_pc_5f ]
  %v1_75 = add i32 %v0_4b, -100
  %v2_75 = inttoptr i32 %v1_75 to i32*
  %v3_75 = load i32, i32* %v2_75, align 4
  %v10_75 = icmp eq i32 %v3_75, 0
  br i1 %v10_75, label %dec_label_pc_85, label %dec_label_pc_7b

dec_label_pc_7b:                                  ; preds = %dec_label_pc_75
  %v2_7f = fsub x86_fp80 0xK80000000000000000000, %stack_var_-54.1
  store x86_fp80 %v2_7f, x86_fp80* %st7.global-to-local, align 4
  store i3 %v0_85.pre.pre, i3* %fpu_stat_TOP.global-to-local, align 1
  br label %dec_label_pc_85

dec_label_pc_85:                                  ; preds = %dec_label_pc_75, %dec_label_pc_7b
  %stack_var_-54.2 = phi x86_fp80 [ %v2_7f, %dec_label_pc_7b ], [ %stack_var_-54.1, %dec_label_pc_75 ]
  %v3_85 = load double, double* %stack_var_-70, align 8
  %v8_85 = fpext double %v3_85 to x86_fp80
  %v3_88 = fmul x86_fp80 %v8_85, %v8_85
  %v5_8a = fpext double %stack_var_-62.0 to x86_fp80
  %v3_8e = fmul x86_fp80 %v5_8a, %v5_8a
  store x86_fp80 %v3_8e, x86_fp80* %st6.global-to-local, align 4
  %v4_90 = fadd x86_fp80 %v3_8e, %v3_88
  %v2_96 = call x86_fp80 @llvm.sqrt.f80(x86_fp80 %v4_90)
  store x86_fp80 %v2_96, x86_fp80* %st7.global-to-local, align 4
  %tmp270 = fptrunc x86_fp80 %v2_96 to double
  store double %tmp270, double* %stack_var_-70, align 8
  %v2_9b = add i32 %v0_4b, -16
  %v3_9b = inttoptr i32 %v2_9b to double*
  %v4_9b = load double, double* %v3_9b, align 4
  %v5_9b = fpext double %v4_9b to x86_fp80
  %v3_9e = fmul x86_fp80 %v5_9b, %v5_9b
  %v7_a0 = fsub x86_fp80 %v3_9e, %v4_90
  %v2_a6 = call x86_fp80 @llvm.fabs.f80(x86_fp80 %v7_a0)
  %v4_a8 = fadd x86_fp80 %v7_a0, %v2_a6
  %v2_aa = call x86_fp80 @llvm.sqrt.f80(x86_fp80 %v4_a8)
  store x86_fp80 %v2_aa, x86_fp80* %st7.global-to-local, align 4
  store x86_fp80 %v2_aa, x86_fp80* %st6.global-to-local, align 4
  %v5_ae = load double, double* %v3_9b, align 4
  %v6_ae = fpext double %v5_ae to x86_fp80
  %v7_ae = fadd x86_fp80 %v2_aa, %v6_ae
  %v10_b1 = fdiv x86_fp80 %v7_ae, %v2_96
  %v1_b4 = add i3 %v0_85.pre.pre, -3
  store i3 %v1_b4, i3* %fpu_stat_TOP.global-to-local, align 1
  store x86_fp80 0xK3FFEB17217F7D1CF7800, x86_fp80* %st6.global-to-local, align 4
  %v12_b8 = call i32 @__asm_fyl2x(x86_fp80 %v2_96, x86_fp80 %v4_90, x86_fp80 %stack_var_-54.2)
  %v2_ba = load i32, i32* @edi, align 8
  %v3_ba = add i32 %v2_ba, -16
  %v4_ba = inttoptr i32 %v3_ba to double*
  %v5_ba = load double, double* %v4_ba, align 4
  %v6_ba = fpext double %v5_ba to x86_fp80
  %v7_ba = fmul x86_fp80 %v10_b1, %v6_ba
  %v3_bd = load x86_fp80, x86_fp80* %st6.global-to-local, align 4
  %v4_c1 = fsub x86_fp80 %v7_ba, %v3_bd
  %v10_c3 = fsub x86_fp80 %v4_c1, %stack_var_-54.2
  %v2_c7 = call x86_fp80 @llvm.fabs.f80(x86_fp80 %v10_c3)
  store x86_fp80 %v2_c7, x86_fp80* %st6.global-to-local, align 4
  %v3_c9 = add i32 %v2_ba, -84
  %v4_c9 = inttoptr i32 %v3_c9 to double*
  %v5_c9 = load double, double* %v4_c9, align 4
  %v6_c9 = fpext double %v5_c9 to x86_fp80
  %v7_c9 = fsub x86_fp80 %v2_c7, %v6_c9
  store x86_fp80 %v7_c9, x86_fp80* %st6.global-to-local, align 4
  %v4_cf = load double, double* bitcast (i32* @edi to double*), align 8
  %v5_cf = fpext double %v4_cf to x86_fp80
  %v6_cf = fmul x86_fp80 %v2_96, %v5_cf
  %tmp271 = bitcast double %v4_cf to i64
  %tmp272 = trunc i64 %tmp271 to i32
  %v3_d1 = add i32 %tmp272, 8
  %v4_d1 = inttoptr i32 %v3_d1 to double*
  %v5_d1 = load double, double* %v4_d1, align 4
  %v6_d1 = fpext double %v5_d1 to x86_fp80
  %v7_d1 = fadd x86_fp80 %v6_cf, %v6_d1
  %v2_d4 = call x86_fp80 @llvm.fabs.f80(x86_fp80 %v7_d1)
  %v4_d6 = fmul x86_fp80 %v7_c9, %v2_d4
  store x86_fp80 %v4_d6, x86_fp80* %st6.global-to-local, align 4
  %v0_e0 = call i32 @__asm_wait()
  %v0_e1 = load i32, i32* %fpsw.global-to-local, align 4
  %v1_e1 = call i16 @__asm_fnstsw(i32 %v0_e1)
  store x86_fp80 %v2_96, x86_fp80* %st7.global-to-local, align 4
  %v2_f0 = load i32, i32* @edi, align 8
  %v3_f0 = add i32 %v2_f0, -92
  %v4_f0 = inttoptr i32 %v3_f0 to double*
  %v5_f0 = load double, double* %v4_f0, align 4
  %v6_f0 = fpext double %v5_f0 to x86_fp80
  %v7_f0 = fsub x86_fp80 %v6_f0, %v2_96
  store x86_fp80 %v7_f0, x86_fp80* %st7.global-to-local, align 4
  %v0_f5 = call i32 @__asm_wait()
  %v0_f6 = load i32, i32* %fpsw.global-to-local, align 4
  %v1_f6 = call i16 @__asm_fnstsw(i32 %v0_f6)
  %v2_f6 = sext i16 %v1_f6 to i32
  %v4_f6 = and i32 %v0_f5, -65536
  %tmp274 = udiv i32 %v2_f6, 2
  %v12_f8 = and i32 %tmp274, 32512
  %v2_f6.masked = and i32 %v2_f6, -65281
  %v13_f8 = or i32 %v4_f6, %v2_f6.masked
  %v14_f8 = or i32 %v13_f8, %v12_f8
  %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_102 = load i32, i32* @edi, align 8
  %v1_102 = add i32 %v0_102, -76
  %v2_102 = inttoptr i32 %v1_102 to i32*
  %v3_102 = load i32, i32* %v2_102, align 4
  %v10_102 = icmp eq i32 %v3_102, 0
  %v1_106 = icmp eq i1 %v10_102, false
  %v1_10b.pre = load x86_fp80, x86_fp80* %st7.global-to-local, align 4
  br i1 %v1_106, label %dec_label_pc_10b, label %dec_label_pc_108

dec_label_pc_108:                                 ; preds = %dec_label_pc_85
  %v3_108 = add i32 %v0_102, -32
  %v4_108 = inttoptr i32 %v3_108 to double*
  %v5_108 = load double, double* %v4_108, align 4
  %v6_108 = fpext double %v5_108 to x86_fp80
  %v7_108 = fdiv x86_fp80 %v1_10b.pre, %v6_108
  store x86_fp80 %v7_108, x86_fp80* %st7.global-to-local, align 4
  br label %dec_label_pc_10b

dec_label_pc_10b:                                 ; preds = %dec_label_pc_85, %dec_label_pc_108
  %v1_10b = phi x86_fp80 [ %v7_108, %dec_label_pc_108 ], [ %v1_10b.pre, %dec_label_pc_85 ]
  %v2_10b = load i32, i32* %esi.global-to-local, align 4
  %v3_10b = add i32 %v2_10b, -32
  %v4_10b = fptrunc x86_fp80 %v1_10b to double
  %v5_10b = inttoptr i32 %v3_10b to double*
  store double %v4_10b, double* %v5_10b, align 4
  %v6_10b = add i3 %storemerge.in, 2
  store i3 %v6_10b, i3* %fpu_stat_TOP.global-to-local, align 1
  ret i32 %v14_f8
}

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

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

declare i32 @__asm_fyl2x(x86_fp80, x86_fp80, x86_fp80) local_unnamed_addr

declare i32 @__asm_wait() local_unnamed_addr

declare i16 @__asm_fnstsw(i32) local_unnamed_addr

declare double @__decompiler_undefined_function_1() local_unnamed_addr

attributes #0 = { nounwind readnone speculatable }
