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

@eax = internal unnamed_addr global i32 0, align 8
@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:
  %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, align 8
  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
  store x86_fp80 %v3_1e, x86_fp80* %st7.global-to-local, align 4
  %v3_23 = load double, double* %v2_16, align 4
  %v4_23 = fpext double %v3_23 to x86_fp80
  store x86_fp80 %v4_23, x86_fp80* %st7.global-to-local, align 4
  %v3_25 = add i32 %v3_f, -24
  %v4_25 = inttoptr i32 %v3_25 to double*
  %v5_25 = load double, double* %v4_25, align 4
  %v6_25 = fpext double %v5_25 to x86_fp80
  %v7_25 = fdiv x86_fp80 %v4_23, %v6_25
  %v3_2b = fadd x86_fp80 %v7_25, %v7_25
  %v3_30 = load double, double* bitcast (i32* @ecx to double*), align 8
  %v4_30 = fpext double %v3_30 to x86_fp80
  %v3_32 = fmul x86_fp80 %v4_30, %v4_30
  %v3_34 = load double, double* bitcast (i32* @edx to double*), align 8
  %v4_34 = fpext double %v3_34 to x86_fp80
  %v5_34 = 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)))
  %v3_36 = fmul x86_fp80 %v4_34, %v4_34
  %v4_38 = fadd x86_fp80 %v3_32, %v3_36
  %v2_3a = call x86_fp80 @llvm.sqrt.f80(x86_fp80 %v4_38)
  store x86_fp80 %v2_3a, x86_fp80* %st7.global-to-local, align 4
  %v3_3c = load double, double* bitcast (i32* @eax to double*), align 8
  %v4_3c = fpext double %v3_3c to x86_fp80
  store i3 %v5_34, i3* %fpu_stat_TOP.global-to-local, align 1
  store x86_fp80 %v4_3c, x86_fp80* %st6.global-to-local, align 4
  %v2_3e = call i32 @__asm_fpatan(i32 %v0_b, i32 %v0_a)
  store i32 %v2_3e, i32* @eax, align 8
  %v2_40 = call x86_fp80 @llvm.fabs.f80(x86_fp80 %v4_3c)
  br label %dec_label_pc_42

dec_label_pc_42:                                  ; preds = %dec_label_pc_4c, %dec_label_pc_0
  %storemerge = phi x86_fp80 [ %v2_40, %dec_label_pc_0 ], [ %v7_4c, %dec_label_pc_4c ]
  store x86_fp80 %storemerge, x86_fp80* %st6.global-to-local, align 4
  %v0_45 = load i32, i32* %fpsw.global-to-local, align 4
  %v1_45 = call i16 @__asm_fnstsw(i32 %v0_45)
  %v2_45 = sext i16 %v1_45 to i32
  %v3_45 = load i32, i32* @eax, align 8
  %v4_45 = and i32 %v3_45, -65536
  %v1_47 = udiv i32 %v2_45, 256
  %v2_47 = trunc i32 %v1_47 to i8
  %v3_47 = and i8 %v2_47, 65
  %v4_47 = icmp eq i8 %v3_47, 0
  %v9_47 = zext i8 %v3_47 to i32
  %v11_47 = mul i32 %v9_47, 256
  %v2_45.masked = and i32 %v2_45, -65281
  %v12_47 = or i32 %v4_45, %v2_45.masked
  %v13_47 = or i32 %v12_47, %v11_47
  store i32 %v13_47, i32* @eax, align 8
  %v4_4a = icmp eq i1 %v4_47, false
  %v1_51 = load x86_fp80, x86_fp80* %st6.global-to-local, align 4
  br i1 %v4_4a, label %dec_label_pc_51, label %dec_label_pc_4c

dec_label_pc_4c:                                  ; preds = %dec_label_pc_42
  %v7_4c = fsub x86_fp80 %v1_51, %v3_2b
  br label %dec_label_pc_42

dec_label_pc_51:                                  ; preds = %dec_label_pc_42
  %v2_51 = call x86_fp80 @llvm.fabs.f80(x86_fp80 %v1_51)
  %v3_51 = fcmp olt x86_fp80 %v2_51, 0xK403E8000000000000000
  br i1 %v3_51, label %bb, label %bb249

bb:                                               ; preds = %dec_label_pc_51
  %v4_51 = call x86_fp80 @llvm.cos.f80(x86_fp80 %v1_51)
  store x86_fp80 %v4_51, x86_fp80* %st6.global-to-local, align 4
  br label %bb249

bb249:                                            ; preds = %dec_label_pc_51, %bb
  %v0_53 = load i3, i3* %fpu_stat_TOP.global-to-local, align 1
  %v1_53 = sub i3 %v0_53, ptrtoint (i8* @global_var_1.1 to i3)
  store x86_fp80 0xK3FFF8000000000000000, x86_fp80* %st7.global-to-local, align 4
  %v4_5b = load double, double* bitcast (i32* @eax to double*), align 8
  %v2_5d = load i32, i32* %ebx.global-to-local, align 4
  %v4_5d = inttoptr i32 %v2_5d to double*
  store double %v4_5b, double* %v4_5d, align 4
  %v1_5f = load x86_fp80, x86_fp80* %st7.global-to-local, align 4
  %v4_5f = load double, double* bitcast (i32* @edx to double*), align 8
  %v5_5f = fpext double %v4_5f to x86_fp80
  %v6_5f = fmul x86_fp80 %v1_5f, %v5_5f
  %v4_61 = fptrunc x86_fp80 %v6_5f to double
  %v4_64 = load double, double* bitcast (i32* @ecx to double*), align 8
  %v5_64 = fpext double %v4_64 to x86_fp80
  %v6_64 = fmul x86_fp80 %v6_5f, %v5_64
  store x86_fp80 %v6_64, x86_fp80* %st7.global-to-local, align 4
  store i3 %v1_53, i3* %fpu_stat_TOP.global-to-local, align 1
  store x86_fp80 %v6_5f, x86_fp80* %st6.global-to-local, align 4
  %tmp252 = fptrunc x86_fp80 %v6_64 to float
  %v2_6c = bitcast float %tmp252 to i32
  %tmp253 = fptrunc x86_fp80 %v6_5f to float
  %v5_6c = bitcast float %tmp253 to i32
  %v6_6c = call i32 @__asm_fpatan(i32 %v2_6c, i32 %v5_6c)
  store i32 %v6_6c, i32* @eax, align 8
  %v2_6e = call x86_fp80 @llvm.fabs.f80(x86_fp80 %v6_5f)
  br label %dec_label_pc_70

dec_label_pc_70:                                  ; preds = %dec_label_pc_7a, %bb249
  %storemerge1 = phi x86_fp80 [ %v2_6e, %bb249 ], [ %v7_7a, %dec_label_pc_7a ]
  store x86_fp80 %storemerge1, x86_fp80* %st6.global-to-local, align 4
  %v0_73 = load i32, i32* %fpsw.global-to-local, align 4
  %v1_73 = call i16 @__asm_fnstsw(i32 %v0_73)
  %v2_73 = sext i16 %v1_73 to i32
  %v3_73 = load i32, i32* @eax, align 8
  %v4_73 = and i32 %v3_73, -65536
  %v1_75 = udiv i32 %v2_73, 256
  %v2_75 = trunc i32 %v1_75 to i8
  %v3_75 = and i8 %v2_75, 65
  %v4_75 = icmp eq i8 %v3_75, 0
  %v9_75 = zext i8 %v3_75 to i32
  %v11_75 = mul i32 %v9_75, 256
  %v2_73.masked = and i32 %v2_73, -65281
  %v12_75 = or i32 %v4_73, %v2_73.masked
  %v13_75 = or i32 %v12_75, %v11_75
  store i32 %v13_75, i32* @eax, align 8
  %v4_78 = icmp eq i1 %v4_75, false
  %v1_7f = load x86_fp80, x86_fp80* %st6.global-to-local, align 4
  br i1 %v4_78, label %dec_label_pc_7f, label %dec_label_pc_7a

dec_label_pc_7a:                                  ; preds = %dec_label_pc_70
  %v7_7a = fsub x86_fp80 %v1_7f, %v3_1e
  br label %dec_label_pc_70

dec_label_pc_7f:                                  ; preds = %dec_label_pc_70
  %v2_7f = call x86_fp80 @llvm.fabs.f80(x86_fp80 %v1_7f)
  %v3_7f = fcmp olt x86_fp80 %v2_7f, 0xK403E8000000000000000
  br i1 %v3_7f, label %bb250, label %bb251

bb250:                                            ; preds = %dec_label_pc_7f
  %v4_7f = call x86_fp80 @llvm.cos.f80(x86_fp80 %v1_7f)
  store x86_fp80 %v4_7f, x86_fp80* %st6.global-to-local, align 4
  br label %bb251

bb251:                                            ; preds = %dec_label_pc_7f, %bb250
  %v0_81 = load i3, i3* %fpu_stat_TOP.global-to-local, align 1
  store x86_fp80 %v6_5f, x86_fp80* %st7.global-to-local, align 4
  %v2_8a = load i32, i32* @edx, align 8
  %v4_8a = inttoptr i32 %v2_8a to double*
  store double %v4_61, double* %v4_8a, align 4
  %v1_8c = load x86_fp80, x86_fp80* %st7.global-to-local, align 4
  %v7_8c = fmul x86_fp80 %v1_8c, %v6_64
  store x86_fp80 %v7_8c, x86_fp80* %st7.global-to-local, align 4
  %v2_8f = load i32, i32* @ecx, align 8
  %v3_8f = fptrunc x86_fp80 %v7_8c to double
  %v4_8f = inttoptr i32 %v2_8f to double*
  store double %v3_8f, double* %v4_8f, align 4
  %v5_8f = add i3 %v0_81, ptrtoint (i8* @global_var_1.1 to i3)
  store i3 %v5_8f, i3* %fpu_stat_TOP.global-to-local, align 1
  %v0_93 = load i32, i32* %ebx.global-to-local, align 4
  store i32 %v0_93, i32* @eax, align 8
  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_93
}

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

declare i32 @__asm_fpatan(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 }
