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
  %fpu_stat_TOP.global-to-local = alloca i3, align 1
  %st5.global-to-local = alloca x86_fp80, align 4
  %st6.global-to-local = alloca x86_fp80, align 4
  %st7.global-to-local = alloca x86_fp80, align 4
  %tmp252 = call double @__decompiler_undefined_function_3()
  %stack_var_-50 = 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_-50, 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_-50, align 8
  %v8_4b = fpext double %v3_4b to x86_fp80
  store x86_fp80 %v8_4b, x86_fp80* %st7.global-to-local, align 4
  %v5_4e = fpext double %tmp252 to x86_fp80
  %v6_4e = add i3 %v0_4b, -2
  store i3 %v6_4e, i3* %fpu_stat_TOP.global-to-local, align 1
  store x86_fp80 %v5_4e, x86_fp80* %st6.global-to-local, align 4
  %v3_52 = call i32 @__asm_fpatan(i32 %v1_45)
  %v1_54 = load i32, i32* @edi, align 8
  %v2_54 = add i32 %v1_54, -84
  %v3_54 = inttoptr i32 %v2_54 to i32*
  %v4_54 = load i32, i32* %v3_54, align 4
  %v5_54 = sitofp i32 %v4_54 to x86_fp80
  %v6_54 = add i3 %v0_4b, -3
  store x86_fp80 %v5_54, x86_fp80* %st5.global-to-local, align 4
  %v2_57 = add i32 %v1_54, -88
  %v3_57 = inttoptr i32 %v2_57 to i32*
  %v4_57 = load i32, i32* %v3_57, align 4
  %v5_57 = sitofp i32 %v4_57 to x86_fp80
  %v3_5a = add i32 %v1_54, -80
  %v4_5a = inttoptr i32 %v3_5a to i32*
  %v5_5a = load i32, i32* %v4_5a, align 4
  %v6_5a = sitofp i32 %v5_5a to x86_fp80
  %v7_5a = fdiv x86_fp80 %v5_57, %v6_5a
  %v4_5d = fadd x86_fp80 %v7_5a, %v5_54
  store x86_fp80 %v4_5d, x86_fp80* %st5.global-to-local, align 4
  %v3_5f = load x86_fp80, x86_fp80* %st6.global-to-local, align 4
  %v4_5f = fmul x86_fp80 %v3_5f, %v4_5d
  store x86_fp80 %v4_5f, x86_fp80* %st6.global-to-local, align 4
  %v2_61 = call x86_fp80 @llvm.fabs.f80(x86_fp80 %v4_5f)
  %v3_61 = fcmp olt x86_fp80 %v2_61, 0xK403E8000000000000000
  br i1 %v3_61, label %bb, label %bb257

bb:                                               ; preds = %dec_label_pc_40
  %v4_61 = call x86_fp80 @llvm.sin.f80(x86_fp80 %v4_5f)
  store x86_fp80 %v4_61, x86_fp80* %st6.global-to-local, align 4
  %v7_61 = call x86_fp80 @llvm.cos.f80(x86_fp80 %v4_5f)
  store i3 %v6_54, i3* %fpu_stat_TOP.global-to-local, align 1
  store x86_fp80 %v7_61, x86_fp80* %st5.global-to-local, align 4
  br label %bb257

bb257:                                            ; preds = %dec_label_pc_40, %bb
  %v0_63 = phi i3 [ %v6_4e, %dec_label_pc_40 ], [ %v6_54, %bb ]
  %v1_63 = load x86_fp80, x86_fp80* %st7.global-to-local, align 4
  %v3_6b = load double, double* %stack_var_-50, align 8
  %v8_6b = fpext double %v3_6b to x86_fp80
  %v3_6e = fmul x86_fp80 %v8_6b, %v8_6b
  %v3_74 = fmul x86_fp80 %v5_4e, %v5_4e
  store x86_fp80 %v3_74, x86_fp80* %st6.global-to-local, align 4
  %v4_76 = fadd x86_fp80 %v3_74, %v3_6e
  %v2_78 = call x86_fp80 @llvm.sqrt.f80(x86_fp80 %v4_76)
  store x86_fp80 %v2_78, x86_fp80* %st7.global-to-local, align 4
  %v3_7a = add i32 %v1_54, -16
  %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 %v2_78, %v6_7a
  %v7_83 = fmul x86_fp80 %v1_63, %v7_7a
  %v7_87 = fpext double %v6_45 to x86_fp80
  %v7_8b = fmul x86_fp80 %v1_63, %v7_87
  %v4_91 = fsub x86_fp80 %v7_83, %v7_8b
  store x86_fp80 %v7_8b, x86_fp80* %st5.global-to-local, align 4
  %v4_a2 = fadd x86_fp80 %v7_8b, %v7_83
  %tmp259 = fptrunc x86_fp80 %v4_a2 to double
  store double %tmp259, double* %stack_var_-50, align 8
  store x86_fp80 %v4_a2, x86_fp80* %st7.global-to-local, align 4
  store i3 %v0_63, i3* %fpu_stat_TOP.global-to-local, align 1
  store x86_fp80 %v4_91, x86_fp80* %st6.global-to-local, align 4
  %tmp264 = fptrunc x86_fp80 %v4_a2 to float
  %v2_b2 = bitcast float %tmp264 to i32
  %v3_b2 = call i32 @__asm_fpatan(i32 %v2_b2)
  %v2_b4 = load i32, i32* @edi, align 8
  %v3_b4 = add i32 %v2_b4, 16
  %v4_b4 = inttoptr i32 %v3_b4 to double*
  %v5_b4 = load double, double* %v4_b4, align 4
  %v6_b4 = fpext double %v5_b4 to x86_fp80
  %v7_b4 = fsub x86_fp80 %v6_b4, %v4_91
  %v4_b7 = load double, double* bitcast (i32* @edi to double*), align 8
  %v5_b7 = fpext double %v4_b7 to x86_fp80
  %v6_b7 = fmul x86_fp80 %v7_b4, %v5_b7
  store x86_fp80 %v6_b7, x86_fp80* %st6.global-to-local, align 4
  %tmp260 = bitcast double %v4_b7 to i64
  %tmp261 = trunc i64 %tmp260 to i32
  %v3_b9 = add i32 %tmp261, -80
  %v4_b9 = inttoptr i32 %v3_b9 to i32*
  %v5_b9 = load i32, i32* %v4_b9, align 4
  %v6_b9 = sitofp i32 %v5_b9 to x86_fp80
  %v7_b9 = fmul x86_fp80 %v6_b7, %v6_b9
  %v2_bc = call x86_fp80 @llvm.round.f80(x86_fp80 %v7_b9)
  store x86_fp80 %v2_bc, x86_fp80* %st6.global-to-local, align 4
  %v5_be = load i32, i32* %v4_b9, align 4
  %v6_be = sitofp i32 %v5_be to x86_fp80
  %v7_be = fdiv x86_fp80 %v2_bc, %v6_be
  store x86_fp80 %v7_be, x86_fp80* %st6.global-to-local, align 4
  %v3_c1 = add i32 %tmp261, 8
  %v4_c1 = inttoptr i32 %v3_c1 to double*
  %v5_c1 = load double, double* %v4_c1, align 4
  %v6_c1 = fpext double %v5_c1 to x86_fp80
  %v7_c1 = fmul x86_fp80 %v7_be, %v6_c1
  store x86_fp80 %v7_c1, x86_fp80* %st6.global-to-local, align 4
  %v2_c4 = call x86_fp80 @llvm.fabs.f80(x86_fp80 %v7_c1)
  %v3_c4 = fcmp olt x86_fp80 %v2_c4, 0xK403E8000000000000000
  %v0_c4 = load i3, i3* %fpu_stat_TOP.global-to-local, align 1
  br i1 %v3_c4, label %bb262, label %._crit_edge

._crit_edge:                                      ; preds = %bb257
  %v1_c6.pre = load x86_fp80, x86_fp80* %st5.global-to-local, align 4
  br label %bb263

bb262:                                            ; preds = %bb257
  %v4_c4 = call x86_fp80 @llvm.sin.f80(x86_fp80 %v7_c1)
  store x86_fp80 %v4_c4, x86_fp80* %st6.global-to-local, align 4
  %v7_c4 = call x86_fp80 @llvm.cos.f80(x86_fp80 %v7_c1)
  %v8_c4 = add i3 %v0_c4, -1
  store i3 %v8_c4, i3* %fpu_stat_TOP.global-to-local, align 1
  store x86_fp80 %v7_c4, x86_fp80* %st5.global-to-local, align 4
  br label %bb263

bb263:                                            ; preds = %._crit_edge, %bb262
  %v1_ca = phi x86_fp80 [ %v7_c1, %._crit_edge ], [ %v4_c4, %bb262 ]
  %v1_c6 = phi x86_fp80 [ %v1_c6.pre, %._crit_edge ], [ %v7_c4, %bb262 ]
  %v0_c6 = phi i3 [ %v0_c4, %._crit_edge ], [ %v8_c4, %bb262 ]
  %v6_c6 = add i3 %v0_c6, 1
  %v3_ce = load double, double* %stack_var_-50, align 8
  %v8_ce = fpext double %v3_ce to x86_fp80
  %v7_d1 = fmul x86_fp80 %v1_c6, %v8_ce
  %v7_d9 = fmul x86_fp80 %v4_91, %v1_ca
  %v2_dd = fsub x86_fp80 0xK80000000000000000000, %v7_d9
  store x86_fp80 %v2_dd, x86_fp80* %st5.global-to-local, align 4
  %v4_df = fsub x86_fp80 %v7_d1, %v7_d9
  store x86_fp80 %v4_df, x86_fp80* %st6.global-to-local, align 4
  %v3_e1 = add i32 %tmp261, -96
  %v4_e1 = inttoptr i32 %v3_e1 to double*
  %v5_e1 = load double, double* %v4_e1, align 4
  %v6_e1 = fpext double %v5_e1 to x86_fp80
  %v7_e1 = fadd x86_fp80 %v4_df, %v6_e1
  %v3_e4 = fmul x86_fp80 %v7_e1, %v7_e1
  %v7_e9 = fmul x86_fp80 %v1_ca, %v8_ce
  %v7_f1 = fmul x86_fp80 %v4_91, %v1_c6
  %v4_f5 = fadd x86_fp80 %v7_f1, %v7_e9
  %v3_f7 = fmul x86_fp80 %v4_f5, %v4_f5
  store x86_fp80 %v3_f7, x86_fp80* %st5.global-to-local, align 4
  %v4_f9 = fadd x86_fp80 %v3_f7, %v3_e4
  store i3 %v6_c6, i3* %fpu_stat_TOP.global-to-local, align 1
  %v2_fb = call x86_fp80 @llvm.sqrt.f80(x86_fp80 %v4_f9)
  store x86_fp80 %v2_fb, x86_fp80* %st6.global-to-local, align 4
  %v3_fd = add i32 %tmp261, -72
  %v4_fd = inttoptr i32 %v3_fd to double*
  %v5_fd = load double, double* %v4_fd, align 4
  %v6_fd = fpext double %v5_fd to x86_fp80
  %v7_fd = fsub x86_fp80 %v2_fb, %v6_fd
  store x86_fp80 %v7_fd, x86_fp80* %st6.global-to-local, align 4
  %v1_100 = add i32 %tmp261, -76
  %v2_100 = inttoptr i32 %v1_100 to i32*
  %v3_100 = load i32, i32* %v2_100, align 4
  %v10_100 = icmp eq i32 %v3_100, 0
  %v1_104 = icmp eq i1 %v10_100, false
  %v1_109.pre = load x86_fp80, x86_fp80* %st7.global-to-local, align 4
  br i1 %v1_104, label %dec_label_pc_109, label %dec_label_pc_106

dec_label_pc_106:                                 ; preds = %bb263
  %v3_106 = add i32 %tmp261, -32
  %v4_106 = inttoptr i32 %v3_106 to double*
  %v5_106 = load double, double* %v4_106, align 4
  %v6_106 = fpext double %v5_106 to x86_fp80
  %v7_106 = fdiv x86_fp80 %v1_109.pre, %v6_106
  store x86_fp80 %v7_106, x86_fp80* %st7.global-to-local, align 4
  br label %dec_label_pc_109

dec_label_pc_109:                                 ; preds = %bb263, %dec_label_pc_106
  %v1_109 = phi x86_fp80 [ %v7_106, %dec_label_pc_106 ], [ %v1_109.pre, %bb263 ]
  %v2_109 = load i32, i32* %esi.global-to-local, align 4
  %v3_109 = add i32 %v2_109, -32
  %v4_109 = fptrunc x86_fp80 %v1_109 to double
  %v5_109 = inttoptr i32 %v3_109 to double*
  store double %v4_109, double* %v5_109, align 4
  %v6_109 = add i3 %v0_c6, 2
  store i3 %v6_109, i3* %fpu_stat_TOP.global-to-local, align 1
  ret i32 %v3_b2
}

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

declare i32 @__asm_fpatan(i32) local_unnamed_addr

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

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

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

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

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

declare double @__decompiler_undefined_function_3() local_unnamed_addr

attributes #0 = { nounwind readnone speculatable }
