#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(double);
double pow(double, int);
double sqrt(double);
double bessi0(double x) {
  double y, result;
  double p1 = 1.0, p2 = 3.5156229, p3 = 3.0899424, p4 = 1.2067492,
         p5 = 0.2659732, p6 = 0.360768e-1, p7 = 0.45813e-2;
  double q1 = 0.39894228, q2 = 0.1328592e-1, q3 = 0.225319e-2,
         q4 = -0.157565e-2, q5 = 0.916281e-2, q6 = -0.2057706e-1,
         q7 = 0.2635537e-1, q8 = -0.1647633e-1, q9 = 0.392377e-2;
  if (fabs(x) < 3.75) {
    y = pow(x / 3.75, 2);
    result = p1 + y * (p2 + y * (p3 + y * (p4 + y * (p5 + y * (p6 + y * p7)))));
  } else {
    double ax = fabs(x);
    y = 3.75 / ax;
    result =
        (exp(ax) / sqrt(ax)) *
        (q1 +
         y * (q2 +
              y * (q3 +
                   y * (q4 +
                        y * (q5 + y * (q6 + y * (q7 + y * (q8 + y * q9))))))));
  }
  return result;
}


x86 assembly (clang, -O0):
<bessi0>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xf38(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xf23(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xf0e(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xef9(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xee4(%rip),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  0xecf(%rip),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  0xeba(%rip),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  0xea5(%rip),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  0xe90(%rip),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  0xe7b(%rip),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  0xe66(%rip),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  0xe51(%rip),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  0xe3c(%rip),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  0xe27(%rip),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  0xe0f(%rip),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  0xdf7(%rip),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x8(%rbp),%xmm1
movaps 0xe6b(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  0xdcf(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    12e0 <bessi0+0x1b0>
movsd  -0x8(%rbp),%xmm0
movsd  0xdb8(%rip),%xmm1
divsd  %xmm1,%xmm0
mov    $0x2,%edi
call   1040 <pow@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x20(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm3
movsd  -0x10(%rbp),%xmm2
movsd  -0x30(%rbp),%xmm5
movsd  -0x10(%rbp),%xmm4
movsd  -0x38(%rbp),%xmm7
movsd  -0x10(%rbp),%xmm6
movsd  -0x40(%rbp),%xmm9
movsd  -0x10(%rbp),%xmm8
movsd  -0x48(%rbp),%xmm11
movsd  -0x10(%rbp),%xmm10
movsd  -0x50(%rbp),%xmm12
mulsd  %xmm12,%xmm10
addsd  %xmm11,%xmm10
mulsd  %xmm10,%xmm8
addsd  %xmm9,%xmm8
mulsd  %xmm8,%xmm6
addsd  %xmm7,%xmm6
mulsd  %xmm6,%xmm4
addsd  %xmm5,%xmm4
mulsd  %xmm4,%xmm2
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1417 <bessi0+0x2e7>
movsd  -0x8(%rbp),%xmm0
movaps 0xda4(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  0xd00(%rip),%xmm0
divsd  -0xa0(%rbp),%xmm0
ff
movsd  %xmm0,-0x10(%rbp)
movsd  -0xa0(%rbp),%xmm0
ff
call   1030 <exp@plt>
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
call   1050 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0xb8(%rbp),%xmm0
ff
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x58(%rbp),%xmm2
movsd  -0x10(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm4
movsd  -0x10(%rbp),%xmm3
movsd  -0x68(%rbp),%xmm6
movsd  -0x10(%rbp),%xmm5
movsd  -0x70(%rbp),%xmm8
movsd  -0x10(%rbp),%xmm7
movsd  -0x78(%rbp),%xmm10
movsd  -0x10(%rbp),%xmm9
movsd  -0x80(%rbp),%xmm12
movsd  -0x10(%rbp),%xmm11
movsd  -0x88(%rbp),%xmm14
ff ff
movsd  -0x10(%rbp),%xmm13
movsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x10(%rbp),%xmm15
movsd  -0x98(%rbp),%xmm0
ff
mulsd  %xmm0,%xmm15
movsd  -0xb0(%rbp),%xmm0
ff
addsd  %xmm0,%xmm15
movsd  -0xa8(%rbp),%xmm0
ff
mulsd  %xmm15,%xmm13
addsd  %xmm14,%xmm13
mulsd  %xmm13,%xmm11
addsd  %xmm12,%xmm11
mulsd  %xmm11,%xmm9
addsd  %xmm10,%xmm9
mulsd  %xmm9,%xmm7
addsd  %xmm8,%xmm7
mulsd  %xmm7,%xmm5
addsd  %xmm6,%xmm5
mulsd  %xmm5,%xmm3
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bessi0>:
sub    $0x18,%rsp
movapd 0xec4(%rip),%xmm2
andpd  %xmm0,%xmm2
movsd  0xec8(%rip),%xmm1
ucomisd %xmm2,%xmm1
jbe    11b5 <bessi0+0x85>
divsd  0xeba(%rip),%xmm0
mov    $0x2,%edi
call   1040 <pow@plt>
movsd  0xef8(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xef4(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xef0(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xeec(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xee8(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xee4(%rip),%xmm1
mulsd  %xmm1,%xmm0
addsd  0xee0(%rip),%xmm0
add    $0x18,%rsp
ret
divsd  %xmm2,%xmm1
movsd  %xmm1,0x10(%rsp)
movapd %xmm2,%xmm0
movapd %xmm2,(%rsp)
call   1030 <exp@plt>
movapd (%rsp),%xmm1
movapd %xmm0,%xmm3
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm1
jb     11e6 <bessi0+0xb6>
sqrtsd %xmm1,%xmm1
jmp    11fd <bessi0+0xcd>
movapd %xmm1,%xmm0
movsd  %xmm3,(%rsp)
call   1050 <sqrt@plt>
movsd  (%rsp),%xmm3
movapd %xmm0,%xmm1
movsd  0xe13(%rip),%xmm0
movsd  0x10(%rsp),%xmm2
mulsd  %xmm2,%xmm0
addsd  0xe09(%rip),%xmm0
mulsd  %xmm2,%xmm0
addsd  0xe05(%rip),%xmm0
mulsd  %xmm2,%xmm0
addsd  0xe01(%rip),%xmm0
mulsd  %xmm2,%xmm0
addsd  0xdfd(%rip),%xmm0
mulsd  %xmm2,%xmm0
addsd  0xdf9(%rip),%xmm0
mulsd  %xmm2,%xmm0
addsd  0xdf5(%rip),%xmm0
divsd  %xmm1,%xmm3
mulsd  %xmm2,%xmm0
addsd  0xded(%rip),%xmm0
mulsd  %xmm2,%xmm0
addsd  0xde9(%rip),%xmm0
mulsd  %xmm3,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @bessi0(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca double
%19 = alloca double
%20 = alloca double
%21 = alloca double
store double %0, double* %2
store double 1.000000e+00, double* %5
store double 0x400C1FFEE6248CA7, double* %6
store double 0x4008B833B89430A4, double* %7
store double 0x3FF34ED83FC7962C, double* %8
store double 0x3FD105B474E732AA, double* %9
store double 3.607680e-02, double* %10
store double 4.581300e-03, double* %11
store double 0x3FD988453365DE00, double* %12
store double 0x3F8B35A5FF2D9D1C, double* %13
store double 2.253190e-03, double* %14
store double -1.575650e-03, double* %15
store double 9.162810e-03, double* %16
store double 0xBF9512271EFDC716, double* %17
store double 0x3F9AFCE6F0E55AE3, double* %18
store double 0xBF90DF2BCA084C55, double* %19
store double 3.923770e-03, double* %20
%22 = load double, double* %2
%23 = call double @llvm.fabs.f64(double %22)
%24 = fcmp olt double %23, 3.750000e+00
br i1 %24, label %25, label %48
25: ; preds = %1
%26 = load double, double* %2
%27 = fdiv double %26, 3.750000e+00
%28 = call double @pow(double %27, i32 2)
store double %28, double* %3
%29 = load double, double* %5
%30 = load double, double* %3
%31 = load double, double* %6
%32 = load double, double* %3
%33 = load double, double* %7
%34 = load double, double* %3
%35 = load double, double* %8
%36 = load double, double* %3
%37 = load double, double* %9
%38 = load double, double* %3
%39 = load double, double* %10
%40 = load double, double* %3
%41 = load double, double* %11
%42 = call double @llvm.fmuladd.f64(double %40, double %41, double %39)
%43 = call double @llvm.fmuladd.f64(double %38, double %42, double %37)
%44 = call double @llvm.fmuladd.f64(double %36, double %43, double %35)
%45 = call double @llvm.fmuladd.f64(double %34, double %44, double %33)
%46 = call double @llvm.fmuladd.f64(double %32, double %45, double %31)
%47 = call double @llvm.fmuladd.f64(double %30, double %46, double %29)
store double %47, double* %4
br label %84
48: ; preds = %1
%49 = load double, double* %2
%50 = call double @llvm.fabs.f64(double %49)
store double %50, double* %21
%51 = load double, double* %21
%52 = fdiv double 3.750000e+00, %51
store double %52, double* %3
%53 = load double, double* %21
%54 = call double @exp(double %53)
%55 = load double, double* %21
%56 = call double @sqrt(double %55)
%57 = fdiv double %54, %56
%58 = load double, double* %12
%59 = load double, double* %3
%60 = load double, double* %13
%61 = load double, double* %3
%62 = load double, double* %14
%63 = load double, double* %3
%64 = load double, double* %15
%65 = load double, double* %3
%66 = load double, double* %16
%67 = load double, double* %3
%68 = load double, double* %17
%69 = load double, double* %3
%70 = load double, double* %18
%71 = load double, double* %3
%72 = load double, double* %19
%73 = load double, double* %3
%74 = load double, double* %20
%75 = call double @llvm.fmuladd.f64(double %73, double %74, double %72)
%76 = call double @llvm.fmuladd.f64(double %71, double %75, double %70)
%77 = call double @llvm.fmuladd.f64(double %69, double %76, double %68)
%78 = call double @llvm.fmuladd.f64(double %67, double %77, double %66)
%79 = call double @llvm.fmuladd.f64(double %65, double %78, double %64)
%80 = call double @llvm.fmuladd.f64(double %63, double %79, double %62)
%81 = call double @llvm.fmuladd.f64(double %61, double %80, double %60)
%82 = call double @llvm.fmuladd.f64(double %59, double %81, double %58)
%83 = fmul double %57, %82
store double %83, double* %4
br label %84
84: ; preds = %48, %25
%85 = load double, double* %4
ret double %85
}

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