#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);
int sqrt(double);
double airBesselI1ExpScaled(double x) {
  double b, ax, y;
  ax = ((x) > 0.0f ? (x) : -(x));
  if (ax < 6.449305566387246) {
    y = x / 6.45;
    y *= y;
    b = ax *
        (0.4999999998235554 +
         y * (2.370331499358438 +
              y * (3.3554331305863787 +
                   y * (2.0569974969268707 +
                        (0.6092719473097832 + 0.0792323006694466 * y) * y)))) /
        (1 + y * (-0.4596495788370524 +
                  (0.08677361454866868 - 0.006777712190188699 * y) * y));
    b *= exp(-ax);
  } else {
    y = 6.45 / ax;
    b = (0.398942280267484 +
         y * (-0.669339325353065 +
              y * (0.40311772245257 +
                   y * (-0.0766281832045885 +
                        (0.00248933264397244 + 0.0000703849046144657 * y) *
                            y)))) /
        (1 + y * (-1.61964537617937 +
                  (0.919118239717915 - 0.142824922601647 * y) * y));
    b *= 1 / sqrt(ax);
  }
  return x < 0.0 ? -b : b;
}


x86 assembly (clang, -O0):
<airBesselI1ExpScaled>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    114e <airBesselI1ExpScaled+0x2e>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
jmp    116f <airBesselI1ExpScaled+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  0xe7f(%rip),%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    12ab <airBesselI1ExpScaled+0x18b>
movsd  -0x8(%rbp),%xmm0
movsd  0xebf(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm3
movsd  -0x20(%rbp),%xmm4
movsd  0xec6(%rip),%xmm5
mulsd  %xmm5,%xmm4
movsd  0xec2(%rip),%xmm5
addsd  %xmm5,%xmm4
movsd  -0x20(%rbp),%xmm5
mulsd  %xmm5,%xmm4
movsd  0xe9d(%rip),%xmm5
addsd  %xmm5,%xmm4
mulsd  %xmm4,%xmm3
movsd  0xe85(%rip),%xmm4
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm2
movsd  0xe6d(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
movsd  0xe55(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  -0x20(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
movsd  0xe2b(%rip),%xmm3
mulsd  %xmm3,%xmm2
movsd  0xe27(%rip),%xmm3
addsd  %xmm3,%xmm2
movsd  -0x20(%rbp),%xmm3
mulsd  %xmm3,%xmm2
movsd  0xe02(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
movsd  0xd9a(%rip),%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x18(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
call   1030 <exp@plt>
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    13a0 <airBesselI1ExpScaled+0x280>
movsd  0xda5(%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  0xd6f(%rip),%xmm4
mulsd  %xmm4,%xmm3
movsd  0xd6b(%rip),%xmm4
addsd  %xmm4,%xmm3
movsd  -0x20(%rbp),%xmm4
mulsd  %xmm4,%xmm3
movsd  0xd46(%rip),%xmm4
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm2
movsd  0xd2e(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
movsd  0xd16(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xcfe(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x20(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
movsd  0xcd8(%rip),%xmm3
mulsd  %xmm3,%xmm2
movsd  0xcd4(%rip),%xmm3
addsd  %xmm3,%xmm2
movsd  -0x20(%rbp),%xmm3
mulsd  %xmm3,%xmm2
movsd  0xcaf(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
movsd  0xc97(%rip),%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1040 <sqrt@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    13d4 <airBesselI1ExpScaled+0x2b4>
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x30(%rbp)
jmp    13de <airBesselI1ExpScaled+0x2be>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<airBesselI1ExpScaled>:
sub    $0x28,%rsp
movapd %xmm0,%xmm3
movapd 0xed0(%rip),%xmm1
xorpd  %xmm0,%xmm1
xorpd  %xmm0,%xmm0
cmpltsd %xmm3,%xmm0
movapd %xmm0,%xmm2
andpd  %xmm3,%xmm2
andnpd %xmm1,%xmm0
orpd   %xmm2,%xmm0
movsd  0xedb(%rip),%xmm1
ucomisd %xmm0,%xmm1
movapd %xmm3,0x10(%rsp)
jbe    1210 <airBesselI1ExpScaled+0xf0>
movapd %xmm3,%xmm1
divsd  0xec7(%rip),%xmm1
mulsd  %xmm1,%xmm1
movsd  0xef3(%rip),%xmm2
mulsd  %xmm1,%xmm2
addsd  0xeef(%rip),%xmm2
mulsd  %xmm1,%xmm2
addsd  0xeeb(%rip),%xmm2
mulsd  %xmm1,%xmm2
addsd  0xee7(%rip),%xmm2
mulsd  %xmm1,%xmm2
addsd  0xee3(%rip),%xmm2
mulsd  %xmm1,%xmm2
addsd  0xedf(%rip),%xmm2
movapd %xmm2,%xmm4
movsd  0xedb(%rip),%xmm2
mulsd  %xmm1,%xmm2
addsd  0xed7(%rip),%xmm2
mulsd  %xmm1,%xmm2
addsd  0xed3(%rip),%xmm2
mulsd  %xmm1,%xmm2
addsd  0xecf(%rip),%xmm2
mulsd  %xmm0,%xmm4
divsd  %xmm2,%xmm4
movsd  %xmm4,(%rsp)
movapd 0xe02(%rip),%xmm1
xorpd  %xmm0,%xmm1
movapd %xmm1,%xmm0
call   1030 <exp@plt>
jmp    12ac <airBesselI1ExpScaled+0x18c>
movsd  0xe20(%rip),%xmm4
divsd  %xmm0,%xmm4
movsd  0xe1c(%rip),%xmm1
mulsd  %xmm4,%xmm1
addsd  0xe18(%rip),%xmm1
mulsd  %xmm4,%xmm1
addsd  0xe14(%rip),%xmm1
mulsd  %xmm4,%xmm1
addsd  0xe10(%rip),%xmm1
movsd  0xe10(%rip),%xmm2
mulsd  %xmm4,%xmm2
addsd  0xe0c(%rip),%xmm2
movapd %xmm4,%xmm3
unpcklpd %xmm2,%xmm3
unpcklpd %xmm4,%xmm1
mulpd  %xmm3,%xmm1
addpd  0xd9c(%rip),%xmm1
unpcklpd %xmm4,%xmm4
mulpd  %xmm1,%xmm4
addpd  0xd9c(%rip),%xmm4
movapd %xmm4,%xmm1
unpckhpd %xmm4,%xmm1
divsd  %xmm1,%xmm4
movapd %xmm4,(%rsp)
call   1040 <sqrt@plt>
lea    0x1(%rax),%ecx
xor    %edx,%edx
cmp    $0x3,%ecx
cmovb  %eax,%edx
xorps  %xmm0,%xmm0
cvtsi2sd %edx,%xmm0
mulsd  (%rsp),%xmm0
movapd 0xd47(%rip),%xmm1
xorpd  %xmm0,%xmm1
xorpd  %xmm2,%xmm2
movapd 0x10(%rsp),%xmm3
cmpltsd %xmm2,%xmm3
andpd  %xmm3,%xmm1
andnpd %xmm0,%xmm3
orpd   %xmm1,%xmm3
movapd %xmm3,%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
define double @airBesselI1ExpScaled(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, 0x4019CC16C2262D09
br i1 %16, label %17, label %47
17: ; preds = %13
%18 = load double, double* %2
%19 = fdiv double %18, 6.450000e+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* %4
%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 0x3FB448916C29802D, double %27, double 0x3FE37F27E2021AA8)
%29 = load double, double* %5
%30 = call double @llvm.fmuladd.f64(double %28, double %29, double 0x400074BB1A8A09C5)
%31 = call double @llvm.fmuladd.f64(double %26, double %30, double 0x400AD7ED533E4464)
%32 = call double @llvm.fmuladd.f64(double %25, double %31, double 0x4002F6705C736295)
%33 = call double @llvm.fmuladd.f64(double %24, double %32, double 0x3FDFFFFFFFCF7FD1)
%34 = fmul double %23, %33
%35 = load double, double* %5
%36 = load double, double* %5
%37 = call double @llvm.fmuladd.f64(double 0xBF7BC2F2432D4E4B, double %36, double 0x3FB636CBACA469F5)
%38 = load double, double* %5
%39 = call double @llvm.fmuladd.f64(double %37, double %38, double 0xBFDD6AE6112E6B8A)
%40 = call double @llvm.fmuladd.f64(double %35, double %39, double 1.000000e+00)
%41 = fdiv double %34, %40
store double %41, double* %3
%42 = load double, double* %4
%43 = fneg double %42
%44 = call double @exp(double %43)
%45 = load double, double* %3
%46 = fmul double %45, %44
store double %46, double* %3
br label %73
47: ; preds = %13
%48 = load double, double* %4
%49 = fdiv double 6.450000e+00, %48
store double %49, double* %5
%50 = load double, double* %5
%51 = load double, double* %5
%52 = load double, double* %5
%53 = load double, double* %5
%54 = call double @llvm.fmuladd.f64(double 0x3F127373742C8DCD, double %53, double 0x3F646482496E66FC)
%55 = load double, double* %5
%56 = call double @llvm.fmuladd.f64(double %54, double %55, double 0xBFB39DE794D0CB6E)
%57 = call double @llvm.fmuladd.f64(double %52, double %56, double 0x3FD9CCAE4697CB75)
%58 = call double @llvm.fmuladd.f64(double %51, double %57, double 0xBFE56B3A4E0A2E05)
%59 = call double @llvm.fmuladd.f64(double %50, double %58, double 0x3FD9884533AF6484)
%60 = load double, double* %5
%61 = load double, double* %5
%62 = call double @llvm.fmuladd.f64(double 0xBFC2481649D05BEB, double %61, double 0x3FED696AA797DB68)
%63 = load double, double* %5
%64 = call double @llvm.fmuladd.f64(double %62, double %63, double 0xBFF9EA11451CED9E)
%65 = call double @llvm.fmuladd.f64(double %60, double %64, double 1.000000e+00)
%66 = fdiv double %59, %65
store double %66, double* %3
%67 = load double, double* %4
%68 = call i32 @sqrt(double %67)
%69 = sdiv i32 1, %68
%70 = sitofp i32 %69 to double
%71 = load double, double* %3
%72 = fmul double %71, %70
store double %72, double* %3
br label %73
73: ; preds = %47, %17
%74 = load double, double* %2
%75 = fcmp olt double %74, 0.000000e+00
br i1 %75, label %76, label %79
76: ; preds = %73
%77 = load double, double* %3
%78 = fneg double %77
br label %81
79: ; preds = %73
%80 = load double, double* %3
br label %81
81: ; preds = %79, %76
%82 = phi double [ %78, %76 ], [ %80, %79 ]
ret double %82
}

LLVM IR (-O2):
define double @airBesselI1ExpScaled(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, 0x4019CC16C2262D09
br i1 %5, label %6, label %22
6: ; preds = %1
%7 = fdiv double %0, 6.450000e+00
%8 = fmul double %7, %7
%9 = tail call double @llvm.fmuladd.f64(double %8, double 0x3FB448916C29802D, double 0x3FE37F27E2021AA8)
%10 = tail call double @llvm.fmuladd.f64(double %9, double %8, double 0x400074BB1A8A09C5)
%11 = tail call double @llvm.fmuladd.f64(double %8, double %10, double 0x400AD7ED533E4464)
%12 = tail call double @llvm.fmuladd.f64(double %8, double %11, double 0x4002F6705C736295)
%13 = tail call double @llvm.fmuladd.f64(double %8, double %12, double 0x3FDFFFFFFFCF7FD1)
%14 = fmul double %4, %13
%15 = tail call double @llvm.fmuladd.f64(double %8, double 0xBF7BC2F2432D4E4B, double 0x3FB636CBACA469F5)
%16 = tail call double @llvm.fmuladd.f64(double %15, double %8, double 0xBFDD6AE6112E6B8A)
%17 = tail call double @llvm.fmuladd.f64(double %8, double %16, double 1.000000e+00)
%18 = fdiv double %14, %17
%19 = fneg double %4
%20 = tail call double @exp(double %19)
%21 = fmul double %18, %20
br label %44
22: ; preds = %1
%23 = fdiv double 6.450000e+00, %4
%24 = tail call double @llvm.fmuladd.f64(double %23, double 0x3F127373742C8DCD, double 0x3F646482496E66FC)
%25 = tail call double @llvm.fmuladd.f64(double %24, double %23, double 0xBFB39DE794D0CB6E)
%26 = tail call double @llvm.fmuladd.f64(double %23, double %25, double 0x3FD9CCAE4697CB75)
%27 = tail call double @llvm.fmuladd.f64(double %23, double 0xBFC2481649D05BEB, double 0x3FED696AA797DB68)
%28 = insertelement <2 x double> poison, double %23, i64 0
%29 = insertelement <2 x double> %28, double %27, i64 1
%30 = insertelement <2 x double> poison, double %26, i64 0
%31 = insertelement <2 x double> %30, double %23, i64 1
%32 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %29, <2 x double> %31, <2 x double> <double 0xBFE56B3A4E0A2E05, double 0xBFF9EA11451CED9E>)
%33 = shufflevector <2 x double> %28, <2 x double> poison, <2 x i32> zeroinitializer
%34 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %33, <2 x double> %32, <2 x double> <double 0x3FD9884533AF6484, double 1.000000e+00>)
%35 = extractelement <2 x double> %34, i64 0
%36 = extractelement <2 x double> %34, i64 1
%37 = fdiv double %35, %36
%38 = tail call i32 @sqrt(double %4)
%39 = add i32 %38, 1
%40 = icmp ult i32 %39, 3
%41 = select i1 %40, i32 %38, i32 0
%42 = sitofp i32 %41 to double
%43 = fmul double %37, %42
br label %44
44: ; preds = %22, %6
%45 = phi double [ %21, %6 ], [ %43, %22 ]
%46 = fcmp olt double %0, 0.000000e+00
%47 = fneg double %45
%48 = select i1 %46, double %47, double %45
ret double %48
}