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
  %st7.global-to-local = alloca x86_fp80, align 4
  %tmp252 = call double @__decompiler_undefined_function_3()
  %stack_var_-40 = 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, -68
  %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_-40, 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_-40, 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
  %v3_52 = call i32 @__asm_fpatan(i32 %v1_45)
  %v2_54 = load i32, i32* @edi, align 8
  %v3_54 = add i32 %v2_54, 16
  %v4_54 = inttoptr i32 %v3_54 to double*
  %v5_54 = load double, double* %v4_54, align 4
  %v6_54 = fpext double %v5_54 to x86_fp80
  %v7_54 = fsub x86_fp80 %v6_54, %v5_4e
  %v4_57 = load double, double* bitcast (i32* @edi to double*), align 8
  %v5_57 = fpext double %v4_57 to x86_fp80
  %v6_57 = fmul x86_fp80 %v7_54, %v5_57
  %tmp257 = bitcast double %v4_57 to i64
  %tmp258 = trunc i64 %tmp257 to i32
  %v3_59 = add i32 %tmp258, -12
  %v4_59 = inttoptr i32 %v3_59 to i32*
  %v5_59 = load i32, i32* %v4_59, align 4
  %v6_59 = sitofp i32 %v5_59 to x86_fp80
  %v7_59 = fmul x86_fp80 %v6_57, %v6_59
  %v2_5c = call x86_fp80 @llvm.round.f80(x86_fp80 %v7_59)
  %v6_5e = sitofp i32 %v5_59 to x86_fp80
  %v7_5e = fdiv x86_fp80 %v2_5c, %v6_5e
  %v3_61 = add i32 %tmp258, 8
  %v4_61 = inttoptr i32 %v3_61 to double*
  %v5_61 = load double, double* %v4_61, align 4
  %v6_61 = fpext double %v5_61 to x86_fp80
  %v7_61 = fmul x86_fp80 %v7_5e, %v6_61
  %v2_64 = call x86_fp80 @llvm.fabs.f80(x86_fp80 %v7_61)
  %v3_64 = fcmp olt x86_fp80 %v2_64, 0xK403E8000000000000000
  %v0_64 = load i3, i3* %fpu_stat_TOP.global-to-local, align 1
  br i1 %v3_64, label %bb, label %dec_label_pc_40._crit_edge

bb:                                               ; preds = %dec_label_pc_40
  %v8_64 = add i3 %v0_64, -1
  store i3 %v8_64, i3* %fpu_stat_TOP.global-to-local, align 1
  br label %dec_label_pc_40._crit_edge

dec_label_pc_40._crit_edge:                       ; preds = %dec_label_pc_40, %bb
  %v0_66 = phi i3 [ %v8_64, %bb ], [ %v0_64, %dec_label_pc_40 ]
  %v1_66 = load x86_fp80, x86_fp80* %st7.global-to-local, align 4
  %v3_6e = load double, double* %stack_var_-40, align 8
  %v8_6e = fpext double %v3_6e to x86_fp80
  %v7_71 = fmul x86_fp80 %v1_66, %v8_6e
  %v7_79 = fmul x86_fp80 %v1_66, %v5_4e
  %v4_90 = fadd x86_fp80 %v7_79, %v7_71
  %tmp259 = fptrunc x86_fp80 %v4_90 to double
  store double %tmp259, double* %stack_var_-40, align 8
  store x86_fp80 %v4_90, x86_fp80* %st7.global-to-local, align 4
  %v7_9c = fpext double %v6_45 to x86_fp80
  store i3 %v0_66, i3* %fpu_stat_TOP.global-to-local, align 1
  %tmp264 = fptrunc x86_fp80 %v4_90 to float
  %v2_a0 = bitcast float %tmp264 to i32
  %v3_a0 = call i32 @__asm_fpatan(i32 %v2_a0)
  %v2_a2 = load i32, i32* @edi, align 8
  %v3_a2 = add i32 %v2_a2, 16
  %v4_a2 = inttoptr i32 %v3_a2 to double*
  %v5_a2 = load double, double* %v4_a2, align 4
  %v6_a2 = fpext double %v5_a2 to x86_fp80
  %v7_a2 = fsub x86_fp80 %v6_a2, %v7_9c
  %v4_a5 = load double, double* bitcast (i32* @edi to double*), align 8
  %v5_a5 = fpext double %v4_a5 to x86_fp80
  %v6_a5 = fmul x86_fp80 %v7_a2, %v5_a5
  %tmp260 = bitcast double %v4_a5 to i64
  %tmp261 = trunc i64 %tmp260 to i32
  %v3_a7 = add i32 %tmp261, -16
  %v4_a7 = inttoptr i32 %v3_a7 to i32*
  %v5_a7 = load i32, i32* %v4_a7, align 4
  %v6_a7 = sitofp i32 %v5_a7 to x86_fp80
  %v7_a7 = fmul x86_fp80 %v6_a5, %v6_a7
  %v2_aa = call x86_fp80 @llvm.round.f80(x86_fp80 %v7_a7)
  %v6_ac = sitofp i32 %v5_a7 to x86_fp80
  %v7_ac = fdiv x86_fp80 %v2_aa, %v6_ac
  %v3_af = add i32 %tmp261, 8
  %v4_af = inttoptr i32 %v3_af to double*
  %v5_af = load double, double* %v4_af, align 4
  %v6_af = fpext double %v5_af to x86_fp80
  %v7_af = fmul x86_fp80 %v7_ac, %v6_af
  %v2_b2 = call x86_fp80 @llvm.fabs.f80(x86_fp80 %v7_af)
  %v3_b2 = fcmp olt x86_fp80 %v2_b2, 0xK403E8000000000000000
  %v0_b2 = load i3, i3* %fpu_stat_TOP.global-to-local, align 1
  br i1 %v3_b2, label %bb262, label %._crit_edge

._crit_edge:                                      ; preds = %dec_label_pc_40._crit_edge
  br label %bb263

bb262:                                            ; preds = %dec_label_pc_40._crit_edge
  %v8_b2 = add i3 %v0_b2, -1
  store i3 %v8_b2, i3* %fpu_stat_TOP.global-to-local, align 1
  br label %bb263

bb263:                                            ; preds = %._crit_edge, %bb262
  %v0_b4 = phi i3 [ %v0_b2, %._crit_edge ], [ %v8_b2, %bb262 ]
  %v6_b4 = add i3 %v0_b4, 1
  store i3 %v6_b4, i3* %fpu_stat_TOP.global-to-local, align 1
  %v1_d5 = add i32 %tmp261, -68
  %v2_d5 = inttoptr i32 %v1_d5 to i32*
  %v3_d5 = load i32, i32* %v2_d5, align 4
  %v10_d5 = icmp eq i32 %v3_d5, 0
  %v1_d9 = icmp eq i1 %v10_d5, false
  %v1_de.pre = load x86_fp80, x86_fp80* %st7.global-to-local, align 4
  br i1 %v1_d9, label %dec_label_pc_de, label %dec_label_pc_db

dec_label_pc_db:                                  ; preds = %bb263
  %v3_db = add i32 %tmp261, -32
  %v4_db = inttoptr i32 %v3_db to double*
  %v5_db = load double, double* %v4_db, align 4
  %v6_db = fpext double %v5_db to x86_fp80
  %v7_db = fdiv x86_fp80 %v1_de.pre, %v6_db
  store x86_fp80 %v7_db, x86_fp80* %st7.global-to-local, align 4
  br label %dec_label_pc_de

dec_label_pc_de:                                  ; preds = %bb263, %dec_label_pc_db
  %v1_de = phi x86_fp80 [ %v7_db, %dec_label_pc_db ], [ %v1_de.pre, %bb263 ]
  %v2_de = load i32, i32* %esi.global-to-local, align 4
  %v3_de = add i32 %v2_de, -32
  %v4_de = fptrunc x86_fp80 %v1_de to double
  %v5_de = inttoptr i32 %v3_de to double*
  store double %v4_de, double* %v5_de, align 4
  %v6_de = add i3 %v0_b4, 2
  store i3 %v6_de, i3* %fpu_stat_TOP.global-to-local, align 1
  ret i32 %v3_a0
}

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.round.f80(x86_fp80) #0

; 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

declare double @__decompiler_undefined_function_3() local_unnamed_addr

attributes #0 = { nounwind readnone speculatable }
