#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 */
int log(double);
double airLogBesselI0(double x) {
  double b, ax, y;
  ax = ((x) > 0.0f ? (x) : -(x));
  if (ax < 4.985769687853781) {
    y = x / 5.0;
    y *= y;
    b = (5.86105592521167098e-27 +
         y * (6.2499999970669017 + y * (41.1327842713925212 +
                                        y * (80.9030404787605539 +
                                             y * (50.7576267390706893 +
                                                  6.88231907401413133 * y))))) /
        (1 +
         y * (8.14374525361325784 +
              y * (21.3288286560361152 +
                   y * (20.0880670952325953 +
                        (5.5138982784800139 + 0.186784275148079847 * y) * y))));
  } else {
    y = 5.0 / ax;
    b = (-0.91893853280169872884 +
         y * (2.7513907055333657679 +
              y * (-3.369024122613176551 +
                   y * (1.9164545708124343838 + (-0.46136261965797010108 +
                                                 0.029092365715948197066 * y) *
                                                    y)))) /
        (1 +
         y * (-2.9668913151685312745 +
              y * (3.5882191453626541066 +
                   y * (-1.9954040017063882247 +
                        (0.45606687718126481603 - 0.0231678041994100784 * y) *
                            y))));
    b += ax - log(ax) / 2;
  }
  return b;
}


x86 assembly (clang, -O0):
<airLogBesselI0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    113e <airLogBesselI0+0x2e>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
jmp    115f <airLogBesselI0+0x4f>
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xe8f(%rip),%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    1291 <airLogBesselI0+0x181>
movsd  -0x8(%rbp),%xmm0
movsd  0xedf(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm3
movsd  -0x20(%rbp),%xmm4
movsd  0xef6(%rip),%xmm5
mulsd  %xmm5,%xmm4
movsd  0xef2(%rip),%xmm5
addsd  %xmm5,%xmm4
mulsd  %xmm4,%xmm3
movsd  0xed2(%rip),%xmm4
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm2
movsd  0xeba(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
movsd  0xea2(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe8a(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x20(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm3
movsd  -0x20(%rbp),%xmm4
movsd  0xe5a(%rip),%xmm5
mulsd  %xmm5,%xmm4
movsd  0xe56(%rip),%xmm5
addsd  %xmm5,%xmm4
movsd  -0x20(%rbp),%xmm5
mulsd  %xmm5,%xmm4
movsd  0xe31(%rip),%xmm5
addsd  %xmm5,%xmm4
mulsd  %xmm4,%xmm3
movsd  0xe19(%rip),%xmm4
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm2
movsd  0xe01(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
movsd  0xd89(%rip),%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    13c1 <airLogBesselI0+0x2b1>
movsd  0xdcf(%rip),%xmm0
divsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm3
movsd  0xd99(%rip),%xmm4
mulsd  %xmm4,%xmm3
movsd  0xd95(%rip),%xmm4
addsd  %xmm4,%xmm3
movsd  -0x20(%rbp),%xmm4
mulsd  %xmm4,%xmm3
movsd  0xd70(%rip),%xmm4
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm2
movsd  0xd58(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
movsd  0xd40(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xd28(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x20(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm3
movsd  -0x20(%rbp),%xmm4
movsd  0xcf8(%rip),%xmm5
mulsd  %xmm5,%xmm4
movsd  0xcf4(%rip),%xmm5
addsd  %xmm5,%xmm4
movsd  -0x20(%rbp),%xmm5
mulsd  %xmm5,%xmm4
movsd  0xccf(%rip),%xmm5
addsd  %xmm5,%xmm4
mulsd  %xmm4,%xmm3
movsd  0xcb7(%rip),%xmm4
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm2
movsd  0xc9f(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
movsd  0xc87(%rip),%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1030 <log@plt>
movsd  -0x30(%rbp),%xmm0
mov    $0x2,%ecx
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm1
subsd  %xmm1,%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<airLogBesselI0>:
sub    $0x28,%rsp
movapd 0xee4(%rip),%xmm1
xorpd  %xmm0,%xmm1
xorpd  %xmm3,%xmm3
cmpltsd %xmm0,%xmm3
movapd %xmm3,%xmm2
andpd  %xmm0,%xmm2
andnpd %xmm1,%xmm3
orpd   %xmm2,%xmm3
movsd  0xf6f(%rip),%xmm1
ucomisd %xmm3,%xmm1
jbe    11d0 <airLogBesselI0+0xc0>
divsd  0xf65(%rip),%xmm0
mulsd  %xmm0,%xmm0
movsd  0xf61(%rip),%xmm3
mulsd  %xmm0,%xmm3
addsd  0xf5d(%rip),%xmm3
movsd  0xf5d(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xf59(%rip),%xmm1
movapd %xmm0,%xmm2
unpcklpd %xmm1,%xmm2
unpcklpd %xmm0,%xmm3
mulpd  %xmm2,%xmm3
addpd  0xed9(%rip),%xmm3
unpcklpd %xmm0,%xmm0
mulpd  %xmm0,%xmm3
addpd  0xed9(%rip),%xmm3
mulpd  %xmm0,%xmm3
addpd  0xedd(%rip),%xmm3
mulpd  %xmm0,%xmm3
addpd  0xee1(%rip),%xmm3
movapd %xmm3,%xmm0
unpckhpd %xmm3,%xmm0
divsd  %xmm0,%xmm3
jmp    1263 <airLogBesselI0+0x153>
movsd  0xee0(%rip),%xmm0
divsd  %xmm3,%xmm0
unpcklpd %xmm0,%xmm0
movapd 0xe28(%rip),%xmm1
mulpd  %xmm0,%xmm1
addpd  0xe2c(%rip),%xmm1
mulpd  %xmm0,%xmm1
addpd  0xe30(%rip),%xmm1
mulpd  %xmm0,%xmm1
addpd  0xe34(%rip),%xmm1
mulpd  %xmm0,%xmm1
addpd  0xe38(%rip),%xmm1
mulpd  %xmm0,%xmm1
addpd  0xe3c(%rip),%xmm1
movapd %xmm1,%xmm0
unpckhpd %xmm1,%xmm0
divsd  %xmm0,%xmm1
movapd %xmm1,(%rsp)
movapd %xmm3,%xmm0
movapd %xmm3,0x10(%rsp)
call   1030 <log@plt>
movapd 0x10(%rsp),%xmm3
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
sar    %ecx
xorps  %xmm0,%xmm0
cvtsi2sd %ecx,%xmm0
subsd  %xmm0,%xmm3
addsd  (%rsp),%xmm3
movapd %xmm3,%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
define double @airLogBesselI0(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %2
%6 = load double, double* %2
%7 = fcmp ogt double %6, 0.000000e+00
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = load double, double* %2
br label %13
10: ; preds = %1
%11 = load double, double* %2
%12 = fneg double %11
br label %13
13: ; preds = %10, %8
%14 = phi double [ %9, %8 ], [ %12, %10 ]
store double %14, double* %4
%15 = load double, double* %4
%16 = fcmp olt double %15, 0x4013F16D9BEAE167
br i1 %16, label %17, label %44
17: ; preds = %13
%18 = load double, double* %2
%19 = fdiv double %18, 5.000000e+00
store double %19, double* %5
%20 = load double, double* %5
%21 = load double, double* %5
%22 = fmul double %21, %20
store double %22, double* %5
%23 = load double, double* %5
%24 = load double, double* %5
%25 = load double, double* %5
%26 = load double, double* %5
%27 = load double, double* %5
%28 = call double @llvm.fmuladd.f64(double 0x401B877EA6BE1C5D, double %27, double 0x404960F9E9B9711E)
%29 = call double @llvm.fmuladd.f64(double %26, double %28, double 0x405439CB6A4ACF69)
%30 = call double @llvm.fmuladd.f64(double %25, double %29, double 0x404490FF133386EC)
%31 = call double @llvm.fmuladd.f64(double %24, double %30, double 0x4018FFFFFFCD9C19)
%32 = call double @llvm.fmuladd.f64(double %23, double %31, double 0x3A7D05C5644A704B)
%33 = load double, double* %5
%34 = load double, double* %5
%35 = load double, double* %5
%36 = load double, double* %5
%37 = call double @llvm.fmuladd.f64(double 0x3FC7E88C10958345, double %36, double 0x40160E3B59AE2B60)
%38 = load double, double* %5
%39 = call double @llvm.fmuladd.f64(double %37, double %38, double 0x4034168B90ADE0B2)
%40 = call double @llvm.fmuladd.f64(double %35, double %39, double 0x4035542E1D63A9AA)
%41 = call double @llvm.fmuladd.f64(double %34, double %40, double 0x40204998FA5672C6)
%42 = call double @llvm.fmuladd.f64(double %33, double %41, double 1.000000e+00)
%43 = fdiv double %32, %42
store double %43, double* %3
br label %76
44: ; preds = %13
%45 = load double, double* %4
%46 = fdiv double 5.000000e+00, %45
store double %46, double* %5
%47 = load double, double* %5
%48 = load double, double* %5
%49 = load double, double* %5
%50 = load double, double* %5
%51 = call double @llvm.fmuladd.f64(double 0x3F9DCA639D40C9A0, double %50, double 0xBFDD86F714C1C898)
%52 = load double, double* %5
%53 = call double @llvm.fmuladd.f64(double %51, double %52, double 0x3FFEA9CC449E8BC3)
%54 = call double @llvm.fmuladd.f64(double %49, double %53, double 0xC00AF3C2EB507831)
%55 = call double @llvm.fmuladd.f64(double %48, double %54, double 0x400602D9215645FC)
%56 = call double @llvm.fmuladd.f64(double %47, double %55, double 0xBFED67F1C82D5C51)
%57 = load double, double* %5
%58 = load double, double* %5
%59 = load double, double* %5
%60 = load double, double* %5
%61 = call double @llvm.fmuladd.f64(double 0xBF97B94D056D27F6, double %60, double 0x3FDD303320921288)
%62 = load double, double* %5
%63 = call double @llvm.fmuladd.f64(double %61, double %62, double 0xBFFFED2CBF1A2EF7)
%64 = call double @llvm.fmuladd.f64(double %59, double %63, double 0x400CB4AC3D41B598)
%65 = call double @llvm.fmuladd.f64(double %58, double %64, double 0xC007BC31838B7B6F)
%66 = call double @llvm.fmuladd.f64(double %57, double %65, double 1.000000e+00)
%67 = fdiv double %56, %66
store double %67, double* %3
%68 = load double, double* %4
%69 = load double, double* %4
%70 = call i32 @log(double %69)
%71 = sdiv i32 %70, 2
%72 = sitofp i32 %71 to double
%73 = fsub double %68, %72
%74 = load double, double* %3
%75 = fadd double %74, %73
store double %75, double* %3
br label %76
76: ; preds = %44, %17
%77 = load double, double* %3
ret double %77
}

LLVM IR (-O2):
define double @airLogBesselI0(double %0) {
%2 = fcmp ogt double %0, 0.000000e+00
%3 = fneg double %0
%4 = select i1 %2, double %0, double %3
%5 = fcmp olt double %4, 0x4013F16D9BEAE167
br i1 %5, label %6, label %23
6: ; preds = %1
%7 = fdiv double %0, 5.000000e+00
%8 = fmul double %7, %7
%9 = tail call double @llvm.fmuladd.f64(double %8, double 0x401B877EA6BE1C5D, double 0x404960F9E9B9711E)
%10 = tail call double @llvm.fmuladd.f64(double %8, double 0x3FC7E88C10958345, double 0x40160E3B59AE2B60)
%11 = insertelement <2 x double> poison, double %8, i64 0
%12 = insertelement <2 x double> %11, double %10, i64 1
%13 = insertelement <2 x double> poison, double %9, i64 0
%14 = insertelement <2 x double> %13, double %8, i64 1
%15 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %12, <2 x double> %14, <2 x double> <double 0x405439CB6A4ACF69, double 0x4034168B90ADE0B2>)
%16 = shufflevector <2 x double> %11, <2 x double> poison, <2 x i32> zeroinitializer
%17 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %16, <2 x double> %15, <2 x double> <double 0x404490FF133386EC, double 0x4035542E1D63A9AA>)
%18 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %16, <2 x double> %17, <2 x double> <double 0x4018FFFFFFCD9C19, double 0x40204998FA5672C6>)
%19 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %16, <2 x double> %18, <2 x double> <double 0x3A7D05C5644A704B, double 1.000000e+00>)
%20 = extractelement <2 x double> %19, i64 0
%21 = extractelement <2 x double> %19, i64 1
%22 = fdiv double %20, %21
br label %40
23: ; preds = %1
%24 = fdiv double 5.000000e+00, %4
%25 = insertelement <2 x double> poison, double %24, i64 0
%26 = shufflevector <2 x double> %25, <2 x double> poison, <2 x i32> zeroinitializer
%27 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %26, <2 x double> <double 0x3F9DCA639D40C9A0, double 0xBF97B94D056D27F6>, <2 x double> <double 0xBFDD86F714C1C898, double 0x3FDD303320921288>)
%28 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %27, <2 x double> %26, <2 x double> <double 0x3FFEA9CC449E8BC3, double 0xBFFFED2CBF1A2EF7>)
%29 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %26, <2 x double> %28, <2 x double> <double 0xC00AF3C2EB507831, double 0x400CB4AC3D41B598>)
%30 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %26, <2 x double> %29, <2 x double> <double 0x400602D9215645FC, double 0xC007BC31838B7B6F>)
%31 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %26, <2 x double> %30, <2 x double> <double 0xBFED67F1C82D5C51, double 1.000000e+00>)
%32 = extractelement <2 x double> %31, i64 0
%33 = extractelement <2 x double> %31, i64 1
%34 = fdiv double %32, %33
%35 = tail call i32 @log(double %4)
%36 = sdiv i32 %35, 2
%37 = sitofp i32 %36 to double
%38 = fsub double %4, %37
%39 = fadd double %34, %38
br label %40
40: ; preds = %23, %6
%41 = phi double [ %22, %6 ], [ %39, %23 ]
ret double %41
}