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

define x86_fp80 @function_0(i32 %arg1) local_unnamed_addr {
dec_label_pc_0:
  %eax.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
  %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
  %v0_3 = load i32, i32* %esi.global-to-local, align 4
  %v0_4 = load i32, i32* %edi.global-to-local, align 4
  store i32 %arg1, i32* %esi.global-to-local, align 4
  %v1_8 = add i32 %arg1, 48
  %v2_8 = inttoptr i32 %v1_8 to i32*
  %v3_8 = load i32, i32* %v2_8, align 4
  store i32 %v3_8, i32* %edi.global-to-local, align 4
  %v0_b = load i3, i3* %fpu_stat_TOP.global-to-local, align 1
  %v2_b = add i32 %arg1, 56
  %v3_b = inttoptr i32 %v2_b to double*
  %v4_b = load double, double* %v3_b, align 4
  %v5_b = fpext double %v4_b to x86_fp80
  %v6_b = add i3 %v0_b, -1
  store i3 %v6_b, i3* %fpu_stat_TOP.global-to-local, align 1
  store x86_fp80 %v5_b, x86_fp80* %st7.global-to-local, align 4
  %v0_11 = load i32, i32* %fpsw.global-to-local, align 4
  %v1_11 = call i16 @__asm_fnstsw(i32 %v0_11)
  %v2_11 = sext i16 %v1_11 to i32
  %v3_11 = load i32, i32* %eax.global-to-local, align 4
  %v4_11 = and i32 %v3_11, -65536
  %tmp236 = udiv i32 %v2_11, 2
  %v12_13 = and i32 %tmp236, 32512
  %v2_11.masked = and i32 %v2_11, -65281
  %v13_13 = or i32 %v4_11, %v2_11.masked
  %v14_13 = or i32 %v13_13, %v12_13
  store i32 %v14_13, i32* %eax.global-to-local, align 4
  %v15_134 = and i32 %v2_11, 256
  %v16_13 = icmp ne i32 %v15_134, 0
  %v1_15 = icmp eq i1 %v16_13, false
  br i1 %v1_15, label %dec_label_pc_0.dec_label_pc_34_crit_edge, label %dec_label_pc_17

dec_label_pc_0.dec_label_pc_34_crit_edge:         ; preds = %dec_label_pc_0
  %v0_34.pre = load i3, i3* %fpu_stat_TOP.global-to-local, align 1
  br label %dec_label_pc_34

dec_label_pc_17:                                  ; preds = %dec_label_pc_0
  %v1_17 = load x86_fp80, x86_fp80* %st7.global-to-local, align 4
  %v2_17 = call x86_fp80 @llvm.sqrt.f80(x86_fp80 %v1_17)
  store x86_fp80 %v2_17, x86_fp80* %st7.global-to-local, align 4
  %v0_19 = load i3, i3* %fpu_stat_TOP.global-to-local, align 1
  store x86_fp80 %v2_17, x86_fp80* %st6.global-to-local, align 4
  %v2_1b = load i32, i32* %edi.global-to-local, align 4
  %v3_1b = add i32 %v2_1b, -24
  %v4_1b = inttoptr i32 %v3_1b to double*
  %v5_1b = load double, double* %v4_1b, align 4
  %v6_1b = fpext double %v5_1b to x86_fp80
  %v7_1b = fsub x86_fp80 %v6_1b, %v2_17
  %v4_1e = fdiv x86_fp80 %v7_1b, %v2_17
  store x86_fp80 %v4_1e, x86_fp80* %st7.global-to-local, align 4
  %v3_20 = load double, double* bitcast (i32* @ecx to double*), align 8
  %v4_20 = fpext double %v3_20 to x86_fp80
  store x86_fp80 %v4_20, x86_fp80* %st6.global-to-local, align 4
  %v3_22 = load double, double* bitcast (i32* @edx to double*), align 8
  %v4_22 = fpext double %v3_22 to x86_fp80
  store x86_fp80 %v4_22, x86_fp80* %st5.global-to-local, align 4
  %tmp237 = bitcast double %v3_22 to i64
  %tmp238 = trunc i64 %tmp237 to i32
  %v2_24 = add i32 %tmp238, -8
  %v3_24 = inttoptr i32 %v2_24 to double*
  %v4_24 = load double, double* %v3_24, align 4
  %v5_24 = fpext double %v4_24 to x86_fp80
  %v4_27 = fmul x86_fp80 %v4_1e, %v5_24
  %v4_29 = fptrunc x86_fp80 %v4_27 to double
  store double %v4_29, double* %v3_24, align 4
  %v2_2c = load x86_fp80, x86_fp80* %st5.global-to-local, align 4
  %v3_2c = load x86_fp80, x86_fp80* %st7.global-to-local, align 4
  %v4_2c = fmul x86_fp80 %v2_2c, %v3_2c
  store x86_fp80 %v4_2c, x86_fp80* %st5.global-to-local, align 4
  %v2_2e = load i32, i32* @edx, align 8
  %v3_2e = fptrunc x86_fp80 %v4_2c to double
  %v4_2e = inttoptr i32 %v2_2e to double*
  store double %v3_2e, double* %v4_2e, align 4
  %v2_30 = load x86_fp80, x86_fp80* %st6.global-to-local, align 4
  %v3_30 = load x86_fp80, x86_fp80* %st7.global-to-local, align 4
  %v4_30 = fmul x86_fp80 %v2_30, %v3_30
  store x86_fp80 %v4_30, x86_fp80* %st7.global-to-local, align 4
  %v2_32 = load i32, i32* @ecx, align 8
  %v3_32 = fptrunc x86_fp80 %v4_30 to double
  %v4_32 = inttoptr i32 %v2_32 to double*
  store double %v3_32, double* %v4_32, align 4
  br label %dec_label_pc_34

dec_label_pc_34:                                  ; preds = %dec_label_pc_0.dec_label_pc_34_crit_edge, %dec_label_pc_17
  %v0_34 = phi i3 [ %v0_34.pre, %dec_label_pc_0.dec_label_pc_34_crit_edge ], [ %v0_19, %dec_label_pc_17 ]
  %v4_34 = add i3 %v0_34, 1
  store i3 %v4_34, i3* %fpu_stat_TOP.global-to-local, align 1
  store i32 %v0_4, i32* %edi.global-to-local, align 4
  store i32 %v0_3, i32* %esi.global-to-local, align 4
  %v0_39 = load x86_fp80, x86_fp80* %st7.global-to-local, align 4
  ret x86_fp80 %v0_39
}

declare i16 @__asm_fnstsw(i32) local_unnamed_addr

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

attributes #0 = { nounwind readnone speculatable }
