#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 */
double exp(double);
double fabs(float);
double sqrt(double);
float bessi0(float x) {
  double ax = fabs(x);
  if (ax < 3.75) {
    double y = x / 3.75;
    y = y * y;
    return 1.0 +
           y * (3.5156229 +
                y * (3.0899424 +
                     y * (1.2067492 + y * (0.2659732 + y * (0.360768e-1 +
                                                            y * 0.45813e-2)))));
  } else {
    double y = 3.75 / ax;
    return (exp(ax) / sqrt(ax)) *
           (0.39894228 +
            y * (0.1328592e-1 +
                 y * (0.225319e-2 +
                      y * (-0.157565e-2 +
                           y * (0.916281e-2 +
                                y * (-0.2057706e-1 +
                                     y * (0.2635537e-1 +
                                          y * (-0.1647633e-1 +
                                               y * 0.392377e-2))))))));
  }
}


x86 assembly (clang, -O0):
<bessi0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
call   1030 <fabs@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  0xeac(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    121c <bessi0+0xec>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe90(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  -0x18(%rbp),%xmm3
movsd  -0x18(%rbp),%xmm4
movsd  -0x18(%rbp),%xmm5
movsd  0xeca(%rip),%xmm6
mulsd  %xmm6,%xmm5
movsd  0xec6(%rip),%xmm6
addsd  %xmm6,%xmm5
mulsd  %xmm5,%xmm4
movsd  0xea6(%rip),%xmm5
addsd  %xmm5,%xmm4
mulsd  %xmm4,%xmm3
movsd  0xe8e(%rip),%xmm4
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm2
movsd  0xe76(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
movsd  0xe5e(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe46(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1318 <bessi0+0x1e8>
movsd  0xddc(%rip),%xmm0
divsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1040 <exp@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1050 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
divsd  %xmm1,%xmm0
movsd  -0x20(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm3
movsd  -0x20(%rbp),%xmm4
movsd  -0x20(%rbp),%xmm5
movsd  -0x20(%rbp),%xmm6
movsd  -0x20(%rbp),%xmm7
movsd  -0x20(%rbp),%xmm8
movsd  0xdbb(%rip),%xmm9
mulsd  %xmm9,%xmm8
movsd  0xdb5(%rip),%xmm9
addsd  %xmm9,%xmm8
mulsd  %xmm8,%xmm7
movsd  0xd92(%rip),%xmm8
addsd  %xmm8,%xmm7
mulsd  %xmm7,%xmm6
movsd  0xd79(%rip),%xmm7
addsd  %xmm7,%xmm6
mulsd  %xmm6,%xmm5
movsd  0xd61(%rip),%xmm6
addsd  %xmm6,%xmm5
mulsd  %xmm5,%xmm4
movsd  0xd49(%rip),%xmm5
addsd  %xmm5,%xmm4
mulsd  %xmm4,%xmm3
movsd  0xd31(%rip),%xmm4
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm2
movsd  0xd19(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
movsd  0xd01(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bessi0>:
sub    $0x18,%rsp
movss  %xmm0,0x10(%rsp)
call   1030 <fabs@plt>
movsd  0xeb9(%rip),%xmm1
ucomisd %xmm0,%xmm1
jbe    11b8 <bessi0+0x88>
movss  0x10(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
divsd  0xea1(%rip),%xmm0
mulsd  %xmm0,%xmm0
movsd  0xee5(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xee1(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xedd(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xed9(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xed5(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xed1(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xecd(%rip),%xmm1
jmp    1275 <bessi0+0x145>
divsd  %xmm0,%xmm1
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
call   1040 <exp@plt>
movsd  0x8(%rsp),%xmm1
movapd %xmm0,%xmm3
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm1
jb     11ea <bessi0+0xba>
xorps  %xmm0,%xmm0
sqrtsd %xmm1,%xmm0
jmp    11ff <bessi0+0xcf>
movapd %xmm1,%xmm0
movsd  %xmm3,0x8(%rsp)
call   1050 <sqrt@plt>
movsd  0x8(%rsp),%xmm3
movsd  0xe01(%rip),%xmm1
movsd  0x10(%rsp),%xmm2
mulsd  %xmm2,%xmm1
addsd  0xdf7(%rip),%xmm1
mulsd  %xmm2,%xmm1
addsd  0xdf3(%rip),%xmm1
mulsd  %xmm2,%xmm1
addsd  0xdef(%rip),%xmm1
mulsd  %xmm2,%xmm1
addsd  0xdeb(%rip),%xmm1
mulsd  %xmm2,%xmm1
addsd  0xde7(%rip),%xmm1
mulsd  %xmm2,%xmm1
addsd  0xde3(%rip),%xmm1
divsd  %xmm0,%xmm3
mulsd  %xmm2,%xmm1
addsd  0xddb(%rip),%xmm1
mulsd  %xmm2,%xmm1
addsd  0xdd7(%rip),%xmm1
mulsd  %xmm3,%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define float @bessi0(float %0) {
%2 = alloca float
%3 = alloca float
%4 = alloca double
%5 = alloca double
%6 = alloca double
store float %0, float* %3
%7 = load float, float* %3
%8 = call double @fabs(float %7)
store double %8, double* %4
%9 = load double, double* %4
%10 = fcmp olt double %9, 3.750000e+00
br i1 %10, label %11, label %31
11: ; preds = %1
%12 = load float, float* %3
%13 = fpext float %12 to double
%14 = fdiv double %13, 3.750000e+00
store double %14, double* %5
%15 = load double, double* %5
%16 = load double, double* %5
%17 = fmul double %15, %16
store double %17, double* %5
%18 = load double, double* %5
%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 = call double @llvm.fmuladd.f64(double %23, double 4.581300e-03, double 3.607680e-02)
%25 = call double @llvm.fmuladd.f64(double %22, double %24, double 0x3FD105B474E732AA)
%26 = call double @llvm.fmuladd.f64(double %21, double %25, double 0x3FF34ED83FC7962C)
%27 = call double @llvm.fmuladd.f64(double %20, double %26, double 0x4008B833B89430A4)
%28 = call double @llvm.fmuladd.f64(double %19, double %27, double 0x400C1FFEE6248CA7)
%29 = call double @llvm.fmuladd.f64(double %18, double %28, double 1.000000e+00)
%30 = fptrunc double %29 to float
store float %30, float* %2
br label %57
31: ; preds = %1
%32 = load double, double* %4
%33 = fdiv double 3.750000e+00, %32
store double %33, double* %6
%34 = load double, double* %4
%35 = call double @exp(double %34)
%36 = load double, double* %4
%37 = call double @sqrt(double %36)
%38 = fdiv double %35, %37
%39 = load double, double* %6
%40 = load double, double* %6
%41 = load double, double* %6
%42 = load double, double* %6
%43 = load double, double* %6
%44 = load double, double* %6
%45 = load double, double* %6
%46 = load double, double* %6
%47 = call double @llvm.fmuladd.f64(double %46, double 3.923770e-03, double 0xBF90DF2BCA084C55)
%48 = call double @llvm.fmuladd.f64(double %45, double %47, double 0x3F9AFCE6F0E55AE3)
%49 = call double @llvm.fmuladd.f64(double %44, double %48, double 0xBF9512271EFDC716)
%50 = call double @llvm.fmuladd.f64(double %43, double %49, double 9.162810e-03)
%51 = call double @llvm.fmuladd.f64(double %42, double %50, double -1.575650e-03)
%52 = call double @llvm.fmuladd.f64(double %41, double %51, double 2.253190e-03)
%53 = call double @llvm.fmuladd.f64(double %40, double %52, double 0x3F8B35A5FF2D9D1C)
%54 = call double @llvm.fmuladd.f64(double %39, double %53, double 0x3FD988453365DE00)
%55 = fmul double %38, %54
%56 = fptrunc double %55 to float
store float %56, float* %2
br label %57
57: ; preds = %31, %11
%58 = load float, float* %2
ret float %58
}

LLVM IR (-O2):
define float @bessi0(float %0) {
%2 = tail call double @fabs(float %0)
%3 = fcmp olt double %2, 3.750000e+00
br i1 %3, label %4, label %14
4: ; preds = %1
%5 = fpext float %0 to double
%6 = fdiv double %5, 3.750000e+00
%7 = fmul double %6, %6
%8 = tail call double @llvm.fmuladd.f64(double %7, double 4.581300e-03, double 3.607680e-02)
%9 = tail call double @llvm.fmuladd.f64(double %7, double %8, double 0x3FD105B474E732AA)
%10 = tail call double @llvm.fmuladd.f64(double %7, double %9, double 0x3FF34ED83FC7962C)
%11 = tail call double @llvm.fmuladd.f64(double %7, double %10, double 0x4008B833B89430A4)
%12 = tail call double @llvm.fmuladd.f64(double %7, double %11, double 0x400C1FFEE6248CA7)
%13 = tail call double @llvm.fmuladd.f64(double %7, double %12, double 1.000000e+00)
br label %28
14: ; preds = %1
%15 = fdiv double 3.750000e+00, %2
%16 = tail call double @exp(double %2)
%17 = tail call double @sqrt(double %2)
%18 = fdiv double %16, %17
%19 = tail call double @llvm.fmuladd.f64(double %15, double 3.923770e-03, double 0xBF90DF2BCA084C55)
%20 = tail call double @llvm.fmuladd.f64(double %15, double %19, double 0x3F9AFCE6F0E55AE3)
%21 = tail call double @llvm.fmuladd.f64(double %15, double %20, double 0xBF9512271EFDC716)
%22 = tail call double @llvm.fmuladd.f64(double %15, double %21, double 9.162810e-03)
%23 = tail call double @llvm.fmuladd.f64(double %15, double %22, double -1.575650e-03)
%24 = tail call double @llvm.fmuladd.f64(double %15, double %23, double 2.253190e-03)
%25 = tail call double @llvm.fmuladd.f64(double %15, double %24, double 0x3F8B35A5FF2D9D1C)
%26 = tail call double @llvm.fmuladd.f64(double %15, double %25, double 0x3FD988453365DE00)
%27 = fmul double %26, %18
br label %28
28: ; preds = %14, %4
%29 = phi double [ %13, %4 ], [ %27, %14 ]
%30 = fptrunc double %29 to float
ret float %30
}