#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 sqrt(double);
double bessi1(double x) {
  double ax, ans;
  static double P[7] = {0.5,          0.87890594,  0.51498869, 0.15084934,
                        0.2658733e-1, 0.301532e-2, 0.32411e-3};
  static double Q[9] = {0.39894228,    -0.3988024e-1, -0.362018e-2,
                        0.163801e-2,   -0.1031555e-1, 0.2282967e-1,
                        -0.2895312e-1, 0.1787654e-1,  -0.420059e-2};
  double y;
  if ((ax = fabs(x)) < 3.75) {
    y = x / 3.75;
    y *= y;
    ans = x *
          (P[0] +
           y * (P[1] +
                y * (P[2] + y * (P[3] + y * (P[4] + y * (P[5] + y * P[6]))))));
  } else {
    y = 3.75 / ax;
    ans = (exp(ax) / sqrt(ax)) *
          (Q[0] +
           y * (Q[1] +
                y * (Q[2] +
                     y * (Q[3] +
                          y * (Q[4] +
                               y * (Q[5] +
                                    y * (Q[6] + y * (Q[7] + y * Q[8]))))))));
  }
  return ans;
}


x86 assembly (clang, -O0):
<bessi1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm1
movaps 0xed7(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  %xmm1,-0x10(%rbp)
movsd  0xeb6(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    121e <bessi1+0xfe>
movsd  -0x8(%rbp),%xmm0
movsd  0xe9f(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0x2eba(%rip),%xmm2
movsd  -0x20(%rbp),%xmm1
movsd  0x2eb5(%rip),%xmm4
movsd  -0x20(%rbp),%xmm3
movsd  0x2eb0(%rip),%xmm6
movsd  -0x20(%rbp),%xmm5
movsd  0x2eaa(%rip),%xmm8
movsd  -0x20(%rbp),%xmm7
movsd  0x2ea4(%rip),%xmm10
movsd  -0x20(%rbp),%xmm9
movsd  0x2e9d(%rip),%xmm12
movsd  -0x20(%rbp),%xmm11
movsd  0x2e96(%rip),%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)
jmp    1334 <bessi1+0x214>
movsd  0xdda(%rip),%xmm0
divsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1030 <exp@plt>
movsd  %xmm0,-0x38(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1040 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x38(%rbp),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0x2e1e(%rip),%xmm2
movsd  -0x20(%rbp),%xmm1
movsd  0x2e19(%rip),%xmm4
movsd  -0x20(%rbp),%xmm3
movsd  0x2e14(%rip),%xmm6
movsd  -0x20(%rbp),%xmm5
movsd  0x2e0e(%rip),%xmm8
movsd  -0x20(%rbp),%xmm7
movsd  0x2e08(%rip),%xmm10
movsd  -0x20(%rbp),%xmm9
movsd  0x2e01(%rip),%xmm12
movsd  -0x20(%rbp),%xmm11
movsd  0x2dfa(%rip),%xmm14
movsd  -0x20(%rbp),%xmm13
movsd  0x2df4(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x20(%rbp),%xmm15
movsd  0x2de9(%rip),%xmm0
mulsd  %xmm0,%xmm15
movsd  -0x30(%rbp),%xmm0
addsd  %xmm0,%xmm15
movsd  -0x28(%rbp),%xmm0
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    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bessi1>:
sub    $0x18,%rsp
movapd %xmm0,%xmm1
movapd 0xed0(%rip),%xmm0
andpd  %xmm1,%xmm0
movsd  0xed4(%rip),%xmm2
ucomisd %xmm0,%xmm2
jbe    11ab <bessi1+0x8b>
movapd %xmm1,%xmm2
divsd  0xec2(%rip),%xmm2
mulsd  %xmm2,%xmm2
movsd  0xf06(%rip),%xmm0
mulsd  %xmm2,%xmm0
addsd  0xf02(%rip),%xmm0
mulsd  %xmm2,%xmm0
addsd  0xefe(%rip),%xmm0
mulsd  %xmm2,%xmm0
addsd  0xefa(%rip),%xmm0
mulsd  %xmm2,%xmm0
addsd  0xef6(%rip),%xmm0
mulsd  %xmm2,%xmm0
addsd  0xef2(%rip),%xmm0
mulsd  %xmm2,%xmm0
addsd  0xeee(%rip),%xmm0
mulsd  %xmm1,%xmm0
add    $0x18,%rsp
ret
divsd  %xmm0,%xmm2
movsd  %xmm2,0x10(%rsp)
movapd %xmm0,(%rsp)
call   1030 <exp@plt>
movapd (%rsp),%xmm1
movapd %xmm0,%xmm3
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm1
jb     11d8 <bessi1+0xb8>
sqrtsd %xmm1,%xmm1
jmp    11ef <bessi1+0xcf>
movapd %xmm1,%xmm0
movsd  %xmm3,(%rsp)
call   1040 <sqrt@plt>
movsd  (%rsp),%xmm3
movapd %xmm0,%xmm1
movsd  0xe21(%rip),%xmm0
movsd  0x10(%rsp),%xmm2
mulsd  %xmm2,%xmm0
addsd  0xe17(%rip),%xmm0
mulsd  %xmm2,%xmm0
addsd  0xe13(%rip),%xmm0
mulsd  %xmm2,%xmm0
addsd  0xe0f(%rip),%xmm0
mulsd  %xmm2,%xmm0
addsd  0xe0b(%rip),%xmm0
mulsd  %xmm2,%xmm0
addsd  0xe07(%rip),%xmm0
mulsd  %xmm2,%xmm0
addsd  0xe03(%rip),%xmm0
divsd  %xmm1,%xmm3
mulsd  %xmm2,%xmm0
addsd  0xdfb(%rip),%xmm0
mulsd  %xmm2,%xmm0
addsd  0xdf7(%rip),%xmm0
mulsd  %xmm3,%xmm0
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
define double @bessi1(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 %14
4: ; preds = %1
%5 = fdiv double %0, 3.750000e+00
%6 = fmul double %5, %5
%7 = tail call double @llvm.fmuladd.f64(double %6, double 3.241100e-04, double 3.015320e-03)
%8 = tail call double @llvm.fmuladd.f64(double %6, double %7, double 0x3F9B39B5835A121A)
%9 = tail call double @llvm.fmuladd.f64(double %6, double %8, double 0x3FC34F07FAF62AEA)
%10 = tail call double @llvm.fmuladd.f64(double %6, double %9, double 0x3FE07AC98FAB8428)
%11 = tail call double @llvm.fmuladd.f64(double %6, double %10, double 0x3FEC1FFF5991ECA7)
%12 = tail call double @llvm.fmuladd.f64(double %6, double %11, double 5.000000e-01)
%13 = fmul double %12, %0
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 -4.200590e-03, double 0x3F924E3A4AA99C71)
%20 = tail call double @llvm.fmuladd.f64(double %15, double %19, double 0xBF9DA5E2FE119350)
%21 = tail call double @llvm.fmuladd.f64(double %15, double %20, double 0x3F9760A9381D27D9)
%22 = tail call double @llvm.fmuladd.f64(double %15, double %21, double 0xBF852051AF1F3CDC)
%23 = tail call double @llvm.fmuladd.f64(double %15, double %22, double 1.638010e-03)
%24 = tail call double @llvm.fmuladd.f64(double %15, double %23, double -3.620180e-03)
%25 = tail call double @llvm.fmuladd.f64(double %15, double %24, double 0xBFA46B2ECD1CFEBE)
%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 ]
ret double %29
}