source_filename = "test"
target datalayout = "e-p:32:32-f64:32:64-f80:32-n8:16:32-S128"

@ecx = internal unnamed_addr global i32 0, align 8
@edx = internal unnamed_addr global i32 0, align 8
@global_var_1.1 = constant i8 -117

define i32 @function_0(i32 %arg1) local_unnamed_addr {
dec_label_pc_0:
  %eax.global-to-local = alloca i32, align 4
  %ebx.global-to-local = alloca i32, align 4
  %edi.global-to-local = alloca i32, align 4
  %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
  %v0_9 = load i32, i32* %ebx.global-to-local, align 4
  %v0_a = load i32, i32* %esi.global-to-local, align 4
  %v0_b = load i32, i32* %edi.global-to-local, align 4
  store i32 %arg1, i32* %esi.global-to-local, align 4
  %v1_f = add i32 %arg1, 48
  %v2_f = inttoptr i32 %v1_f to i32*
  %v3_f = load i32, i32* %v2_f, align 4
  store i32 %v3_f, i32* %edi.global-to-local, align 4
  %v0_12 = load i32, i32* %eax.global-to-local, align 4
  store i32 %v0_12, i32* %ebx.global-to-local, align 4
  %v0_16 = load i3, i3* %fpu_stat_TOP.global-to-local, align 1
  %v2_16 = inttoptr i32 %v3_f to double*
  %v3_16 = load double, double* %v2_16, align 4
  %v4_16 = fpext double %v3_16 to x86_fp80
  store x86_fp80 %v4_16, x86_fp80* %st7.global-to-local, align 4
  %v3_18 = add i32 %v3_f, -16
  %v4_18 = inttoptr i32 %v3_18 to double*
  %v5_18 = load double, double* %v4_18, align 4
  %v6_18 = fpext double %v5_18 to x86_fp80
  %v7_18 = fdiv x86_fp80 %v4_16, %v6_18
  %v3_1e = fadd x86_fp80 %v7_18, %v7_18
  %v3_23 = load double, double* bitcast (i32* @ecx to double*), align 8
  %v4_23 = fpext double %v3_23 to x86_fp80
  store x86_fp80 %v4_23, x86_fp80* %st7.global-to-local, align 4
  %v3_25 = load double, double* bitcast (i32* @edx to double*), align 8
  %v4_25 = fpext double %v3_25 to x86_fp80
  %v5_25 = add i3 %v0_16, add (i3 sub (i3 0, i3 ptrtoint (i8* @global_var_1.1 to i3)), i3 sub (i3 0, i3 ptrtoint (i8* @global_var_1.1 to i3)))
  store i3 %v5_25, i3* %fpu_stat_TOP.global-to-local, align 1
  store x86_fp80 %v4_25, x86_fp80* %st6.global-to-local, align 4
  %v3_27 = call i32 @__asm_fpatan(i32 %v0_b, i32 %v0_a, i32 %v0_9)
  store i32 %v3_27, i32* %eax.global-to-local, align 4
  %v2_29 = call x86_fp80 @llvm.fabs.f80(x86_fp80 %v4_25)
  br label %dec_label_pc_2b

dec_label_pc_2b:                                  ; preds = %dec_label_pc_35, %dec_label_pc_0
  %storemerge = phi x86_fp80 [ %v2_29, %dec_label_pc_0 ], [ %v7_35, %dec_label_pc_35 ]
  store x86_fp80 %storemerge, x86_fp80* %st6.global-to-local, align 4
  %v0_2e = load i32, i32* %fpsw.global-to-local, align 4
  %v1_2e = call i16 @__asm_fnstsw(i32 %v0_2e)
  %v2_2e = sext i16 %v1_2e to i32
  %v3_2e = load i32, i32* %eax.global-to-local, align 4
  %v4_2e = and i32 %v3_2e, -65536
  %v1_30 = udiv i32 %v2_2e, 256
  %v2_30 = trunc i32 %v1_30 to i8
  %v3_30 = and i8 %v2_30, 65
  %v4_30 = icmp eq i8 %v3_30, 0
  %v9_30 = zext i8 %v3_30 to i32
  %v11_30 = mul i32 %v9_30, 256
  %v2_2e.masked = and i32 %v2_2e, -65281
  %v12_30 = or i32 %v4_2e, %v2_2e.masked
  %v13_30 = or i32 %v12_30, %v11_30
  store i32 %v13_30, i32* %eax.global-to-local, align 4
  %v4_33 = icmp eq i1 %v4_30, false
  %v1_3a = load x86_fp80, x86_fp80* %st6.global-to-local, align 4
  br i1 %v4_33, label %dec_label_pc_3a, label %dec_label_pc_35

dec_label_pc_35:                                  ; preds = %dec_label_pc_2b
  %v7_35 = fsub x86_fp80 %v1_3a, %v3_1e
  br label %dec_label_pc_2b

dec_label_pc_3a:                                  ; preds = %dec_label_pc_2b
  %v2_3a = call x86_fp80 @llvm.fabs.f80(x86_fp80 %v1_3a)
  %v3_3a = fcmp olt x86_fp80 %v2_3a, 0xK403E8000000000000000
  br i1 %v3_3a, label %bb, label %bb240

bb:                                               ; preds = %dec_label_pc_3a
  %v4_3a = call x86_fp80 @llvm.cos.f80(x86_fp80 %v1_3a)
  store x86_fp80 %v4_3a, x86_fp80* %st6.global-to-local, align 4
  br label %bb240

bb240:                                            ; preds = %dec_label_pc_3a, %bb
  %v0_3c = load i3, i3* %fpu_stat_TOP.global-to-local, align 1
  %v4_42 = load double, double* bitcast (i32* @edx to double*), align 8
  %v5_42 = fpext double %v4_42 to x86_fp80
  store x86_fp80 %v5_42, x86_fp80* %st7.global-to-local, align 4
  %tmp241 = bitcast double %v4_42 to i64
  %tmp242 = trunc i64 %tmp241 to i32
  %v4_44 = inttoptr i32 %tmp242 to double*
  store double %v4_42, double* %v4_44, align 4
  %v1_48 = load x86_fp80, x86_fp80* %st7.global-to-local, align 4
  %v4_48 = load double, double* bitcast (i32* @ecx to double*), align 8
  %v5_48 = fpext double %v4_48 to x86_fp80
  %v6_48 = fmul x86_fp80 %v1_48, %v5_48
  store x86_fp80 %v6_48, x86_fp80* %st7.global-to-local, align 4
  %tmp243 = bitcast double %v4_48 to i64
  %tmp244 = trunc i64 %tmp243 to i32
  %v3_4a = fptrunc x86_fp80 %v6_48 to double
  %v4_4a = inttoptr i32 %tmp244 to double*
  store double %v3_4a, double* %v4_4a, align 4
  %v5_4a = add i3 %v0_3c, ptrtoint (i8* @global_var_1.1 to i3)
  store i3 %v5_4a, i3* %fpu_stat_TOP.global-to-local, align 1
  %v0_4e = load i32, i32* %ebx.global-to-local, align 4
  store i32 %v0_4e, i32* %eax.global-to-local, align 4
  store i32 %v0_b, i32* %edi.global-to-local, align 4
  store i32 %v0_a, i32* %esi.global-to-local, align 4
  store i32 %v0_9, i32* %ebx.global-to-local, align 4
  ret i32 %v0_4e
}

declare i32 @__asm_fpatan(i32, i32, i32) local_unnamed_addr

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

declare i16 @__asm_fnstsw(i32) local_unnamed_addr

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

attributes #0 = { nounwind readnone speculatable }
