#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 Y, P1, P2, P3, P4, P5, P6, P7, Q1, Q2, Q3, Q4, Q5, Q6, Q7, Q8, Q9, AX,
      BX;
  P1 = 0.5;
  P2 = 0.87890594;
  P3 = 0.51498869;
  P4 = 0.15084934;
  P5 = 0.2658733e-1;
  P6 = 0.301532e-2;
  P7 = 0.32411e-3;
  Q1 = 0.39894228;
  Q2 = -0.3988024e-1;
  Q3 = -0.362018e-2;
  Q4 = 0.163801e-2;
  Q5 = -0.1031555e-1;
  Q6 = 0.2282967e-1;
  Q7 = -0.2895312e-1;
  Q8 = 0.1787654e-1;
  Q9 = -0.420059e-2;
  if (fabs(X) < 3.75) {
    Y = (X / 3.75) * (X / 3.75);
    return (
        X *
        (P1 + Y * (P2 + Y * (P3 + Y * (P4 + Y * (P5 + Y * (P6 + Y * P7)))))));
  } else {
    AX = fabs(X);
    Y = 3.75 / AX;
    BX = exp(AX) / sqrt(AX);
    AX = Q1 +
         Y * (Q2 +
              Y * (Q3 +
                   Y * (Q4 +
                        Y * (Q5 + Y * (Q6 + Y * (Q7 + Y * (Q8 + Y * Q9)))))));
    return (AX * BX);
  }
}


x86 assembly (clang, -O0):
<BESSI1>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  0xf48(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xf33(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xf1e(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xf09(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xef4(%rip),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  0xedf(%rip),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  0xeca(%rip),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  0xeb5(%rip),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  0xea0(%rip),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  0xe8b(%rip),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  0xe76(%rip),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  0xe61(%rip),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  0xe4c(%rip),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  0xe37(%rip),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  0xe1f(%rip),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  0xe07(%rip),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x10(%rbp),%xmm1
movaps 0xe7b(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  0xddf(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    12e6 <BESSI1+0x1c6>
movsd  -0x10(%rbp),%xmm0
movsd  0xdc8(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  0xdb7(%rip),%xmm2
divsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm2
movsd  -0x18(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm4
movsd  -0x18(%rbp),%xmm3
movsd  -0x30(%rbp),%xmm6
movsd  -0x18(%rbp),%xmm5
movsd  -0x38(%rbp),%xmm8
movsd  -0x18(%rbp),%xmm7
movsd  -0x40(%rbp),%xmm10
movsd  -0x18(%rbp),%xmm9
movsd  -0x48(%rbp),%xmm12
movsd  -0x18(%rbp),%xmm11
movsd  -0x50(%rbp),%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,-0x8(%rbp)
jmp    1428 <BESSI1+0x308>
movsd  -0x10(%rbp),%xmm0
movaps 0xd9e(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  0xcfa(%rip),%xmm0
divsd  -0xa0(%rbp),%xmm0
ff
movsd  %xmm0,-0x18(%rbp)
movsd  -0xa0(%rbp),%xmm0
ff
call   1030 <exp@plt>
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
call   1040 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0xb8(%rbp),%xmm0
ff
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x58(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x60(%rbp),%xmm3
movsd  -0x18(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm5
movsd  -0x18(%rbp),%xmm4
movsd  -0x70(%rbp),%xmm7
movsd  -0x18(%rbp),%xmm6
movsd  -0x78(%rbp),%xmm9
movsd  -0x18(%rbp),%xmm8
movsd  -0x80(%rbp),%xmm11
movsd  -0x18(%rbp),%xmm10
movsd  -0x88(%rbp),%xmm13
ff ff
movsd  -0x18(%rbp),%xmm12
movsd  -0x90(%rbp),%xmm15
ff ff
movsd  -0x18(%rbp),%xmm14
movsd  -0x98(%rbp),%xmm0
ff
mulsd  %xmm0,%xmm14
movsd  -0xb0(%rbp),%xmm0
ff
addsd  %xmm15,%xmm14
mulsd  %xmm14,%xmm12
addsd  %xmm13,%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,-0xa0(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
mulsd  -0xa8(%rbp),%xmm0
ff
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0xc0,%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):
define double @BESSI1(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
%22 = alloca double
store double %0, double* %3
store double 5.000000e-01, double* %5
store double 0x3FEC1FFF5991ECA7, double* %6
store double 0x3FE07AC98FAB8428, double* %7
store double 0x3FC34F07FAF62AEA, double* %8
store double 0x3F9B39B5835A121A, double* %9
store double 3.015320e-03, double* %10
store double 3.241100e-04, double* %11
store double 0x3FD988453365DE00, double* %12
store double 0xBFA46B2ECD1CFEBE, double* %13
store double -3.620180e-03, double* %14
store double 1.638010e-03, double* %15
store double 0xBF852051AF1F3CDC, double* %16
store double 0x3F9760A9381D27D9, double* %17
store double 0xBF9DA5E2FE119350, double* %18
store double 0x3F924E3A4AA99C71, double* %19
store double -4.200590e-03, double* %20
%23 = load double, double* %3
%24 = call double @llvm.fabs.f64(double %23)
%25 = fcmp olt double %24, 3.750000e+00
br i1 %25, label %26, label %53
26: ; preds = %1
%27 = load double, double* %3
%28 = fdiv double %27, 3.750000e+00
%29 = load double, double* %3
%30 = fdiv double %29, 3.750000e+00
%31 = fmul double %28, %30
store double %31, double* %4
%32 = load double, double* %3
%33 = load double, double* %5
%34 = load double, double* %4
%35 = load double, double* %6
%36 = load double, double* %4
%37 = load double, double* %7
%38 = load double, double* %4
%39 = load double, double* %8
%40 = load double, double* %4
%41 = load double, double* %9
%42 = load double, double* %4
%43 = load double, double* %10
%44 = load double, double* %4
%45 = load double, double* %11
%46 = call double @llvm.fmuladd.f64(double %44, double %45, double %43)
%47 = call double @llvm.fmuladd.f64(double %42, double %46, double %41)
%48 = call double @llvm.fmuladd.f64(double %40, double %47, double %39)
%49 = call double @llvm.fmuladd.f64(double %38, double %48, double %37)
%50 = call double @llvm.fmuladd.f64(double %36, double %49, double %35)
%51 = call double @llvm.fmuladd.f64(double %34, double %50, double %33)
%52 = fmul double %32, %51
store double %52, double* %2
br label %91
53: ; preds = %1
%54 = load double, double* %3
%55 = call double @llvm.fabs.f64(double %54)
store double %55, double* %21
%56 = load double, double* %21
%57 = fdiv double 3.750000e+00, %56
store double %57, double* %4
%58 = load double, double* %21
%59 = call double @exp(double %58)
%60 = load double, double* %21
%61 = call double @sqrt(double %60)
%62 = fdiv double %59, %61
store double %62, double* %22
%63 = load double, double* %12
%64 = load double, double* %4
%65 = load double, double* %13
%66 = load double, double* %4
%67 = load double, double* %14
%68 = load double, double* %4
%69 = load double, double* %15
%70 = load double, double* %4
%71 = load double, double* %16
%72 = load double, double* %4
%73 = load double, double* %17
%74 = load double, double* %4
%75 = load double, double* %18
%76 = load double, double* %4
%77 = load double, double* %19
%78 = load double, double* %4
%79 = load double, double* %20
%80 = call double @llvm.fmuladd.f64(double %78, double %79, double %77)
%81 = call double @llvm.fmuladd.f64(double %76, double %80, double %75)
%82 = call double @llvm.fmuladd.f64(double %74, double %81, double %73)
%83 = call double @llvm.fmuladd.f64(double %72, double %82, double %71)
%84 = call double @llvm.fmuladd.f64(double %70, double %83, double %69)
%85 = call double @llvm.fmuladd.f64(double %68, double %84, double %67)
%86 = call double @llvm.fmuladd.f64(double %66, double %85, double %65)
%87 = call double @llvm.fmuladd.f64(double %64, double %86, double %63)
store double %87, double* %21
%88 = load double, double* %21
%89 = load double, double* %22
%90 = fmul double %88, %89
store double %90, double* %2
br label %91
91: ; preds = %53, %26
%92 = load double, double* %2
ret double %92
}

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
}