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:
  %eax.global-to-local = alloca i32, align 4
  %esi.global-to-local = alloca i32, align 4
  %fpu_stat_TOP.global-to-local = alloca i3, align 1
  %st4.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
  %xmm0.global-to-local = alloca i128, align 8
  %xmm2.global-to-local = alloca i128, align 8
  %tmp255 = call double @__decompiler_undefined_function_2()
  %v0_c = load i32, i32* %esi.global-to-local, align 4
  %v1_c = add i32 %v0_c, -112
  %v2_c = inttoptr i32 %v1_c to i128*
  %v3_c = load i128, i128* %v2_c, align 4
  %v4_c = call i128 @__asm_movupd(i128 %v3_c)
  store i128 %v4_c, i128* %xmm2.global-to-local, align 8
  %v1_11 = add i32 %v0_c, -120
  %v2_11 = inttoptr i32 %v1_11 to i64*
  %v3_11 = load i64, i64* %v2_11, align 4
  %v4_11 = call i128 @__asm_movsd(i64 %v3_11)
  %v1_16 = load i32, i32* @edi, align 8
  %v2_16 = add i32 %v1_16, -48
  %v3_16 = inttoptr i32 %v2_16 to i128*
  %v4_16 = load i128, i128* %v3_16, align 4
  %v5_16 = call i128 @__asm_mulpd(i128 %v4_c, i128 %v4_16)
  store i128 %v5_16, i128* %xmm2.global-to-local, align 8
  %v1_1b = load i32, i32* @edi, align 8
  %v2_1b = add i32 %v1_1b, -48
  %v3_1b = inttoptr i32 %v2_1b to i64*
  %v4_1b = load i64, i64* %v3_1b, align 4
  %v5_1b = call i128 @__asm_mulsd(i128 %v4_11, i64 %v4_1b)
  %v1_20 = load i32, i32* @edi, align 8
  %v2_20 = add i32 %v1_20, -64
  %v3_20 = inttoptr i32 %v2_20 to i128*
  %v4_20 = load i128, i128* %v3_20, align 4
  %v5_20 = call i128 @__asm_addpd(i128 %v5_16, i128 %v4_20)
  store i128 %v5_20, i128* %xmm2.global-to-local, align 8
  %v1_25 = load i32, i32* @edi, align 8
  %v2_25 = add i32 %v1_25, -72
  %v3_25 = inttoptr i32 %v2_25 to i64*
  %v4_25 = load i64, i64* %v3_25, align 4
  %v5_25 = call i128 @__asm_addsd(i128 %v5_1b, i64 %v4_25)
  %v0_2a = load i32, i32* @edi, align 8
  %v1_2a = add i32 %v0_2a, -84
  %v2_2a = inttoptr i32 %v1_2a to i32*
  %v3_2a = load i32, i32* %v2_2a, align 4
  %v10_2a = icmp eq i32 %v3_2a, 0
  br i1 %v10_2a, label %dec_label_pc_49, label %dec_label_pc_30

dec_label_pc_30:                                  ; preds = %dec_label_pc_0
  %v0_30 = load i32, i32* %esi.global-to-local, align 4
  %v1_30 = add i32 %v0_30, 112
  %v2_30 = inttoptr i32 %v1_30 to i64*
  %v3_30 = load i64, i64* %v2_30, align 4
  %v4_30 = call i128 @__asm_movsd(i64 %v3_30)
  %v1_35 = load i32, i32* @edi, align 8
  %v2_35 = add i32 %v1_35, -48
  %v3_35 = inttoptr i32 %v2_35 to i64*
  %v4_35 = load i64, i64* %v3_35, align 4
  %v5_35 = call i128 @__asm_mulsd(i128 %v4_30, i64 %v4_35)
  %v0_3a = load i32, i32* %esi.global-to-local, align 4
  %v1_3a = add i32 %v0_3a, -112
  %v2_3a = inttoptr i32 %v1_3a to i128*
  %v3_3a = load i128, i128* %v2_3a, align 4
  %v4_3a = load i128, i128* %xmm2.global-to-local, align 8
  call void @__asm_movupd.1(i128 %v3_3a, i128 %v4_3a)
  %v1_3f = call i32 @__asm_movsd.2(i128 %v5_25)
  %v2_3f = load i32, i32* %esi.global-to-local, align 4
  %v3_3f = add i32 %v2_3f, -120
  %v4_3f = sext i32 %v1_3f to i64
  %v5_3f = inttoptr i32 %v3_3f to i64*
  store i64 %v4_3f, i64* %v5_3f, align 4
  %v1_44 = call i32 @__asm_movsd.2(i128 %v5_35)
  %v3_44 = add i32 %v2_3f, 112
  %v4_44 = sext i32 %v1_44 to i64
  %v5_44 = inttoptr i32 %v3_44 to i64*
  store i64 %v4_44, i64* %v5_44, align 4
  %v0_49.pre = load i32, i32* @edi, align 8
  br label %dec_label_pc_49

dec_label_pc_49:                                  ; preds = %dec_label_pc_30, %dec_label_pc_0
  %v0_59 = phi i32 [ %v0_49.pre, %dec_label_pc_30 ], [ %v0_2a, %dec_label_pc_0 ]
  %v1_49 = add i32 %v0_59, -92
  %v2_49 = inttoptr i32 %v1_49 to i32*
  %v3_49 = load i32, i32* %v2_49, align 4
  store i32 %v3_49, i32* %eax.global-to-local, align 4
  %v1_4c = add i32 %v0_59, -88
  %v2_4c = inttoptr i32 %v1_4c to i32*
  %v3_4c = load i32, i32* %v2_4c, align 4
  %v10_4c = icmp eq i32 %v3_4c, 0
  %v1_50 = icmp eq i1 %v10_4c, false
  br i1 %v1_50, label %dec_label_pc_59, label %dec_label_pc_52

dec_label_pc_52:                                  ; preds = %dec_label_pc_49
  %v1_52 = call i32 @__asm_movsd.2(i128 %v5_25)
  %v4_52 = sext i32 %v1_52 to i64
  %v5_52 = bitcast i64 %v4_52 to double
  br label %dec_label_pc_73

dec_label_pc_59:                                  ; preds = %dec_label_pc_49
  %v13_59 = icmp eq i32 %v3_4c, 1
  br i1 %v13_59, label %dec_label_pc_6a, label %dec_label_pc_5f

dec_label_pc_5f:                                  ; preds = %dec_label_pc_59
  %v3_5f = fptrunc double %tmp255 to float
  %v4_5f = bitcast float %v3_5f to i32
  %v5_5f = sext i32 %v4_5f to i64
  %v6_5f = load i128, i128* %xmm2.global-to-local, align 8
  call void @__asm_movhpd(i64 %v5_5f, i128 %v6_5f)
  %v2_64 = call i128 @__asm_unpcklpd(i128 %v6_5f, i128 %v5_25)
  store i128 %v2_64, i128* %xmm2.global-to-local, align 8
  br label %dec_label_pc_73

dec_label_pc_6a:                                  ; preds = %dec_label_pc_59
  %v0_6a = load i128, i128* %xmm2.global-to-local, align 8
  %v1_6a = call i32 @__asm_movsd.2(i128 %v0_6a)
  %v4_6a = sext i32 %v1_6a to i64
  %v5_6a = bitcast i64 %v4_6a to double
  %v2_6f = call i128 @__asm_movsd.3(i128 %v0_6a, i128 %v5_25)
  store i128 %v2_6f, i128* %xmm2.global-to-local, align 8
  br label %dec_label_pc_73

dec_label_pc_73:                                  ; preds = %dec_label_pc_6a, %dec_label_pc_5f, %dec_label_pc_52
  %v3_8c = phi double [ %v5_6a, %dec_label_pc_6a ], [ %tmp255, %dec_label_pc_5f ], [ %v5_52, %dec_label_pc_52 ]
  %v0_73 = load i32, i32* %eax.global-to-local, align 4
  %v1_73 = add i32 %v0_73, 15
  %v1_74 = urem i32 %v1_73, 16
  store i32 %v1_74, i32* %eax.global-to-local, align 4
  %v0_77 = load i3, i3* %fpu_stat_TOP.global-to-local, align 1
  %v1_77 = add i3 %v0_77, -1
  store x86_fp80 0xK4000C90FDAA22168C000, x86_fp80* %st7.global-to-local, align 4
  store i3 %v1_77, i3* %fpu_stat_TOP.global-to-local, align 1
  %v7_7c = icmp ugt i32 %v1_74, 1
  br i1 %v7_7c, label %dec_label_pc_7e, label %dec_label_pc_8c

dec_label_pc_7e:                                  ; preds = %dec_label_pc_73
  %v1_7e = add nuw nsw i32 %v1_74, 1
  %v5_83 = sitofp i32 %v1_7e to x86_fp80
  store x86_fp80 %v5_83, x86_fp80* %st6.global-to-local, align 4
  %v4_87 = fdiv x86_fp80 0xK4000C90FDAA22168C000, %v5_83
  store i3 %v1_77, i3* %fpu_stat_TOP.global-to-local, align 1
  store i32 %v1_74, i32* %eax.global-to-local, align 4
  %v3_8a = fadd x86_fp80 %v4_87, %v4_87
  store x86_fp80 %v3_8a, x86_fp80* %st7.global-to-local, align 4
  br label %dec_label_pc_8c

dec_label_pc_8c:                                  ; preds = %dec_label_pc_73, %dec_label_pc_7e
  %v9_8c.pre-phi = add i3 %v0_77, -2
  %v8_8c = fpext double %v3_8c to x86_fp80
  store i3 %v9_8c.pre-phi, i3* %fpu_stat_TOP.global-to-local, align 1
  store x86_fp80 %v8_8c, x86_fp80* %st6.global-to-local, align 4
  %v2_8f = load i32, i32* @edi, align 8
  %v3_8f = add i32 %v2_8f, -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 = fmul x86_fp80 %v8_8c, %v6_8f
  store x86_fp80 %v7_8f, x86_fp80* %st6.global-to-local, align 4
  %v2_92 = load i64, i64* bitcast (i32* @edi to i64*), align 8
  %v3_92 = call i128 @__asm_movsd(i64 %v2_92)
  store i128 %v3_92, i128* %xmm0.global-to-local, align 8
  br label %dec_label_pc_96

dec_label_pc_96:                                  ; preds = %bb261, %dec_label_pc_8c
  %v0_96 = load i3, i3* %fpu_stat_TOP.global-to-local, align 1
  %v1_96 = load x86_fp80, x86_fp80* %st6.global-to-local, align 4
  %v2_96 = add i3 %v0_96, -1
  store i3 %v2_96, i3* %fpu_stat_TOP.global-to-local, align 1
  %v2_98 = call x86_fp80 @llvm.fabs.f80(x86_fp80 %v1_96)
  %v3_98 = fcmp olt x86_fp80 %v2_98, 0xK403E8000000000000000
  br i1 %v3_98, label %bb, label %dec_label_pc_96._crit_edge

dec_label_pc_96._crit_edge:                       ; preds = %dec_label_pc_96
  %v1_9a.pre = load x86_fp80, x86_fp80* %st4.global-to-local, align 4
  br label %bb261

bb:                                               ; preds = %dec_label_pc_96
  %v7_98 = call x86_fp80 @llvm.cos.f80(x86_fp80 %v1_96)
  %v8_98 = add i3 %v0_96, -2
  store i3 %v8_98, i3* %fpu_stat_TOP.global-to-local, align 1
  store x86_fp80 %v7_98, x86_fp80* %st4.global-to-local, align 4
  br label %bb261

bb261:                                            ; preds = %dec_label_pc_96._crit_edge, %bb
  %v0_9d = phi i3 [ %v2_96, %dec_label_pc_96._crit_edge ], [ %v8_98, %bb ]
  %v1_9a = phi x86_fp80 [ %v1_9a.pre, %dec_label_pc_96._crit_edge ], [ %v7_98, %bb ]
  %v2_9a = load i32, i32* @edi, align 8
  %v3_9a = add i32 %v2_9a, -32
  %v4_9a = inttoptr i32 %v3_9a to double*
  %v5_9a = load double, double* %v4_9a, align 4
  %v6_9a = fpext double %v5_9a to x86_fp80
  %v7_9a = fmul x86_fp80 %v1_9a, %v6_9a
  store x86_fp80 %v7_9a, x86_fp80* %st4.global-to-local, align 4
  %v7_a3 = add i3 %v0_9d, 2
  store i3 %v7_a3, i3* %fpu_stat_TOP.global-to-local, align 1
  %v0_a7 = load i128, i128* %xmm2.global-to-local, align 8
  %v1_a7 = call i128 @__asm_movapd(i128 %v0_a7)
  %v2_ab = load x86_fp80, x86_fp80* %st6.global-to-local, align 4
  %v3_ab = load x86_fp80, x86_fp80* %st7.global-to-local, align 4
  %v4_ab = fadd x86_fp80 %v2_ab, %v3_ab
  store x86_fp80 %v4_ab, x86_fp80* %st6.global-to-local, align 4
  %tmp263 = fptrunc x86_fp80 %v7_9a to float
  %v5_ad = bitcast float %tmp263 to i32
  %v6_ad = sext i32 %v5_ad to i128
  %v7_ad = call i128 @__asm_subpd(i128 %v1_a7, i128 %v6_ad)
  %v2_b2 = call i128 @__asm_mulpd(i128 %v7_ad, i128 %v7_ad)
  %v1_b6 = call i128 @__asm_pshufd(i128 %v2_b2, i32 78)
  %v2_bb = call i128 @__asm_addsd.4(i128 %v2_b2, i128 %v1_b6)
  %v1_bf = call i128 @__asm_sqrtsd(i128 %v2_bb)
  %v0_c3 = load i128, i128* %xmm0.global-to-local, align 8
  %v2_c3 = call i128 @__asm_minsd(i128 %v0_c3, i128 %v1_bf)
  store i128 %v2_c3, i128* %xmm0.global-to-local, align 8
  %v0_c7 = load i32, i32* %eax.global-to-local, align 4
  %v1_c7 = add i32 %v0_c7, -1
  %v11_c7 = icmp slt i32 %v1_c7, 0
  store i32 %v1_c7, i32* %eax.global-to-local, align 4
  %v1_ca = icmp eq i1 %v11_c7, false
  br i1 %v1_ca, label %dec_label_pc_96, label %dec_label_pc_cc

dec_label_pc_cc:                                  ; preds = %bb261
  %v1_cc = load i32, i32* @edi, align 8
  %v2_cc = add i32 %v1_cc, -80
  %v3_cc = inttoptr i32 %v2_cc to i64*
  %v4_cc = load i64, i64* %v3_cc, align 4
  %v5_cc = call i128 @__asm_subsd(i128 %v2_c3, i64 %v4_cc)
  store i128 %v5_cc, i128* %xmm0.global-to-local, align 8
  %v0_d1 = load i3, i3* %fpu_stat_TOP.global-to-local, align 1
  %v8_d1 = add i3 %v0_d1, 2
  store i3 %v8_d1, i3* %fpu_stat_TOP.global-to-local, align 1
  %v0_d3 = load i32, i32* @edi, align 8
  %v1_d3 = add i32 %v0_d3, -84
  %v2_d3 = inttoptr i32 %v1_d3 to i32*
  %v3_d3 = load i32, i32* %v2_d3, align 4
  %v10_d3 = icmp eq i32 %v3_d3, 0
  %v1_d7 = icmp eq i1 %v10_d3, false
  br i1 %v1_d7, label %dec_label_pc_de, label %dec_label_pc_d9

dec_label_pc_d9:                                  ; preds = %dec_label_pc_cc
  %v2_d9 = add i32 %v0_d3, -48
  %v3_d9 = inttoptr i32 %v2_d9 to i64*
  %v4_d9 = load i64, i64* %v3_d9, align 4
  %v5_d9 = call i128 @__asm_divsd(i128 %v5_cc, i64 %v4_d9)
  store i128 %v5_d9, i128* %xmm0.global-to-local, align 8
  br label %dec_label_pc_de

dec_label_pc_de:                                  ; preds = %dec_label_pc_d9, %dec_label_pc_cc
  %v0_de = phi i128 [ %v5_d9, %dec_label_pc_d9 ], [ %v5_cc, %dec_label_pc_cc ]
  %v1_de = call i32 @__asm_movsd.2(i128 %v0_de)
  %v2_de = load i32, i32* %esi.global-to-local, align 4
  %v3_de = add i32 %v2_de, -32
  %v4_de = sext i32 %v1_de to i64
  %v5_de = inttoptr i32 %v3_de to i64*
  store i64 %v4_de, i64* %v5_de, align 4
  %v0_e6 = load i32, i32* %eax.global-to-local, align 4
  ret i32 %v0_e6
}

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 void @__asm_movhpd(i64, i128) local_unnamed_addr

declare i128 @__asm_unpcklpd(i128, i128) local_unnamed_addr

declare i128 @__asm_movsd.3(i128, i128) 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.cos.f80(x86_fp80) #0

declare i128 @__asm_movapd(i128) local_unnamed_addr

declare i128 @__asm_subpd(i128, i128) local_unnamed_addr

declare i128 @__asm_pshufd(i128, i32) local_unnamed_addr

declare i128 @__asm_addsd.4(i128, i128) local_unnamed_addr

declare i128 @__asm_sqrtsd(i128) local_unnamed_addr

declare i128 @__asm_minsd(i128, i128) local_unnamed_addr

declare i128 @__asm_subsd(i128, i64) local_unnamed_addr

declare i128 @__asm_divsd(i128, i64) local_unnamed_addr

declare double @__decompiler_undefined_function_2() local_unnamed_addr

attributes #0 = { nounwind readnone speculatable }
