#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
float exp(float);
float fabs(float);
float sqrt(float);
float bessi1(float x) {
  float ax, ans;
  double y;
  if ((ax = fabs(x)) < 3.75) {
    y = x / 3.75;
    y *= y;
    ans =
        ax * (0.5 + y * (0.87890594 +
                         y * (0.51498869 +
                              y * (0.15084934 +
                                   y * (0.2658733e-1 +
                                        y * (0.301532e-2 + y * 0.32411e-3))))));
  } else {
    y = 3.75 / ax;
    ans = 0.2282967e-1 +
          y * (-0.2895312e-1 + y * (0.1787654e-1 - y * 0.420059e-2));
    ans = 0.39894228 +
          y * (-0.3988024e-1 +
               y * (-0.362018e-2 +
                    y * (0.163801e-2 + y * (-0.1031555e-1 + y * ans))));
    ans *= (exp(ax) / sqrt(ax));
  }
  return x < 0.0 ? -ans : ans;
}


x86 assembly (clang, -O0):
<bessi1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <fabs@plt>
movss  %xmm0,-0x8(%rbp)
cvtss2sd %xmm0,%xmm1
movsd  0xea8(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    122c <bessi1+0xfc>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe8d(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  -0x18(%rbp),%xmm3
movsd  -0x18(%rbp),%xmm4
movsd  -0x18(%rbp),%xmm5
movsd  -0x18(%rbp),%xmm6
movsd  0xebe(%rip),%xmm7
mulsd  %xmm7,%xmm6
movsd  0xeba(%rip),%xmm7
addsd  %xmm7,%xmm6
mulsd  %xmm6,%xmm5
movsd  0xe9a(%rip),%xmm6
addsd  %xmm6,%xmm5
mulsd  %xmm5,%xmm4
movsd  0xe82(%rip),%xmm5
addsd  %xmm5,%xmm4
mulsd  %xmm4,%xmm3
movsd  0xe6a(%rip),%xmm4
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm2
movsd  0xe52(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
movsd  0xe3a(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    1357 <bessi1+0x227>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xdc3(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
movsd  0xdcc(%rip),%xmm3
mulsd  %xmm3,%xmm2
movsd  0xdc8(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
movsd  0xda8(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xd90(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  -0x18(%rbp),%xmm3
movsd  -0x18(%rbp),%xmm4
movss  -0xc(%rbp),%xmm5
cvtss2sd %xmm5,%xmm5
mulsd  %xmm5,%xmm4
movsd  0xd4d(%rip),%xmm5
addsd  %xmm5,%xmm4
mulsd  %xmm4,%xmm3
movsd  0xd35(%rip),%xmm4
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm2
movsd  0xd1d(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
movsd  0xd05(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xced(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
call   1040 <exp@plt>
movss  %xmm0,-0x1c(%rbp)
movss  -0x8(%rbp),%xmm0
call   1050 <sqrt@plt>
movaps %xmm0,%xmm1
movss  -0x1c(%rbp),%xmm0
divss  %xmm1,%xmm0
mulss  -0xc(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    1389 <bessi1+0x259>
movss  -0xc(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0x20(%rbp)
jmp    1393 <bessi1+0x263>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x20(%rbp)
movss  -0x20(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bessi1>:
sub    $0x38,%rsp
movaps 0xed5(%rip),%xmm2
andps  %xmm0,%xmm2
cvtss2sd %xmm2,%xmm3
movss  0xee6(%rip),%xmm1
ucomiss %xmm2,%xmm1
jbe    11b2 <bessi1+0x92>
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
divsd  0xeda(%rip),%xmm1
mulsd  %xmm1,%xmm1
movsd  0xf1e(%rip),%xmm2
mulsd  %xmm1,%xmm2
addsd  0xf1a(%rip),%xmm2
mulsd  %xmm1,%xmm2
addsd  0xf16(%rip),%xmm2
mulsd  %xmm1,%xmm2
addsd  0xf12(%rip),%xmm2
mulsd  %xmm1,%xmm2
addsd  0xf0e(%rip),%xmm2
mulsd  %xmm1,%xmm2
addsd  0xf0a(%rip),%xmm2
mulsd  %xmm1,%xmm2
addsd  0xf06(%rip),%xmm2
mulsd  %xmm3,%xmm2
xorps  %xmm3,%xmm3
cvtsd2ss %xmm2,%xmm3
jmp    1284 <bessi1+0x164>
movaps %xmm0,0x20(%rsp)
movsd  0xe69(%rip),%xmm1
divsd  %xmm3,%xmm1
movsd  0xe65(%rip),%xmm0
mulsd  %xmm1,%xmm0
addsd  0xe61(%rip),%xmm0
mulsd  %xmm1,%xmm0
addsd  0xe5d(%rip),%xmm0
mulsd  %xmm1,%xmm0
addsd  0xe59(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  %xmm1,%xmm0
addsd  0xe4d(%rip),%xmm0
mulsd  %xmm1,%xmm0
addsd  0xe49(%rip),%xmm0
mulsd  %xmm1,%xmm0
addsd  0xe45(%rip),%xmm0
mulsd  %xmm1,%xmm0
addsd  0xe41(%rip),%xmm0
mulsd  %xmm1,%xmm0
addsd  0xe3d(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0xc(%rsp)
movaps %xmm2,%xmm0
movaps %xmm2,0x10(%rsp)
call   1030 <exp@plt>
movaps 0x10(%rsp),%xmm1
movaps %xmm0,%xmm3
xorps  %xmm0,%xmm0
ucomiss %xmm0,%xmm1
jb     1263 <bessi1+0x143>
xorps  %xmm0,%xmm0
sqrtss %xmm1,%xmm0
jmp    1275 <bessi1+0x155>
movaps %xmm1,%xmm0
movaps %xmm3,0x10(%rsp)
call   1040 <sqrt@plt>
movaps 0x10(%rsp),%xmm3
divss  %xmm0,%xmm3
mulss  0xc(%rsp),%xmm3
movaps 0x20(%rsp),%xmm0
movaps 0xd85(%rip),%xmm2
xorps  %xmm3,%xmm2
xorps  %xmm1,%xmm1
cmpltss %xmm1,%xmm0
andps  %xmm0,%xmm2
andnps %xmm3,%xmm0
orps   %xmm2,%xmm0
add    $0x38,%rsp
ret

LLVM IR (-O0):
define float @bessi1(float %0) {
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca double
store float %0, float* %2
%6 = load float, float* %2
%7 = call float @fabs(float %6)
store float %7, float* %3
%8 = fpext float %7 to double
%9 = fcmp olt double %8, 3.750000e+00
br i1 %9, label %10, label %33
10: ; preds = %1
%11 = load float, float* %2
%12 = fpext float %11 to double
%13 = fdiv double %12, 3.750000e+00
store double %13, double* %5
%14 = load double, double* %5
%15 = load double, double* %5
%16 = fmul double %15, %14
store double %16, double* %5
%17 = load float, float* %3
%18 = fpext float %17 to double
%19 = load double, double* %5
%20 = load double, double* %5
%21 = load double, double* %5
%22 = load double, double* %5
%23 = load double, double* %5
%24 = load double, double* %5
%25 = call double @llvm.fmuladd.f64(double %24, double 3.241100e-04, double 3.015320e-03)
%26 = call double @llvm.fmuladd.f64(double %23, double %25, double 0x3F9B39B5835A121A)
%27 = call double @llvm.fmuladd.f64(double %22, double %26, double 0x3FC34F07FAF62AEA)
%28 = call double @llvm.fmuladd.f64(double %21, double %27, double 0x3FE07AC98FAB8428)
%29 = call double @llvm.fmuladd.f64(double %20, double %28, double 0x3FEC1FFF5991ECA7)
%30 = call double @llvm.fmuladd.f64(double %19, double %29, double 5.000000e-01)
%31 = fmul double %18, %30
%32 = fptrunc double %31 to float
store float %32, float* %4
br label %65
33: ; preds = %1
%34 = load float, float* %3
%35 = fpext float %34 to double
%36 = fdiv double 3.750000e+00, %35
store double %36, double* %5
%37 = load double, double* %5
%38 = load double, double* %5
%39 = load double, double* %5
%40 = fneg double %39
%41 = call double @llvm.fmuladd.f64(double %40, double 4.200590e-03, double 0x3F924E3A4AA99C71)
%42 = call double @llvm.fmuladd.f64(double %38, double %41, double 0xBF9DA5E2FE119350)
%43 = call double @llvm.fmuladd.f64(double %37, double %42, double 0x3F9760A9381D27D9)
%44 = fptrunc double %43 to float
store float %44, float* %4
%45 = load double, double* %5
%46 = load double, double* %5
%47 = load double, double* %5
%48 = load double, double* %5
%49 = load double, double* %5
%50 = load float, float* %4
%51 = fpext float %50 to double
%52 = call double @llvm.fmuladd.f64(double %49, double %51, double 0xBF852051AF1F3CDC)
%53 = call double @llvm.fmuladd.f64(double %48, double %52, double 1.638010e-03)
%54 = call double @llvm.fmuladd.f64(double %47, double %53, double -3.620180e-03)
%55 = call double @llvm.fmuladd.f64(double %46, double %54, double 0xBFA46B2ECD1CFEBE)
%56 = call double @llvm.fmuladd.f64(double %45, double %55, double 0x3FD988453365DE00)
%57 = fptrunc double %56 to float
store float %57, float* %4
%58 = load float, float* %3
%59 = call float @exp(float %58)
%60 = load float, float* %3
%61 = call float @sqrt(float %60)
%62 = fdiv float %59, %61
%63 = load float, float* %4
%64 = fmul float %63, %62
store float %64, float* %4
br label %65
65: ; preds = %33, %10
%66 = load float, float* %2
%67 = fpext float %66 to double
%68 = fcmp olt double %67, 0.000000e+00
br i1 %68, label %69, label %72
69: ; preds = %65
%70 = load float, float* %4
%71 = fneg float %70
br label %74
72: ; preds = %65
%73 = load float, float* %4
br label %74
74: ; preds = %72, %69
%75 = phi float [ %71, %69 ], [ %73, %72 ]
ret float %75
}

LLVM IR (-O2):
define float @bessi1(float %0) {
%2 = tail call float @llvm.fabs.f32(float %0)
%3 = fpext float %2 to double
%4 = fcmp olt float %2, 3.750000e+00
br i1 %4, label %5, label %17
5: ; preds = %1
%6 = fpext float %0 to double
%7 = fdiv double %6, 3.750000e+00
%8 = fmul double %7, %7
%9 = tail call double @llvm.fmuladd.f64(double %8, double 3.241100e-04, double 3.015320e-03)
%10 = tail call double @llvm.fmuladd.f64(double %8, double %9, double 0x3F9B39B5835A121A)
%11 = tail call double @llvm.fmuladd.f64(double %8, double %10, double 0x3FC34F07FAF62AEA)
%12 = tail call double @llvm.fmuladd.f64(double %8, double %11, double 0x3FE07AC98FAB8428)
%13 = tail call double @llvm.fmuladd.f64(double %8, double %12, double 0x3FEC1FFF5991ECA7)
%14 = tail call double @llvm.fmuladd.f64(double %8, double %13, double 5.000000e-01)
%15 = fmul double %14, %3
%16 = fptrunc double %15 to float
br label %35
17: ; preds = %1
%18 = fdiv double 3.750000e+00, %3
%19 = fneg double %18
%20 = tail call double @llvm.fmuladd.f64(double %19, double 4.200590e-03, double 0x3F924E3A4AA99C71)
%21 = tail call double @llvm.fmuladd.f64(double %18, double %20, double 0xBF9DA5E2FE119350)
%22 = tail call double @llvm.fmuladd.f64(double %18, double %21, double 0x3F9760A9381D27D9)
%23 = fptrunc double %22 to float
%24 = fpext float %23 to double
%25 = tail call double @llvm.fmuladd.f64(double %18, double %24, double 0xBF852051AF1F3CDC)
%26 = tail call double @llvm.fmuladd.f64(double %18, double %25, double 1.638010e-03)
%27 = tail call double @llvm.fmuladd.f64(double %18, double %26, double -3.620180e-03)
%28 = tail call double @llvm.fmuladd.f64(double %18, double %27, double 0xBFA46B2ECD1CFEBE)
%29 = tail call double @llvm.fmuladd.f64(double %18, double %28, double 0x3FD988453365DE00)
%30 = fptrunc double %29 to float
%31 = tail call float @exp(float %2)
%32 = tail call float @sqrt(float %2)
%33 = fdiv float %31, %32
%34 = fmul float %33, %30
br label %35
35: ; preds = %17, %5
%36 = phi float [ %16, %5 ], [ %34, %17 ]
%37 = fcmp olt float %0, 0.000000e+00
%38 = fneg float %36
%39 = select i1 %37, float %38, float %36
ret float %39
}