#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 expl(long double);
long double fabsl(long double);
double sqrtl(long double);
long double bessi0_spd(long double x) {
  long double ax;
  long double y;
  if ((ax = fabsl(x)) < 3.75) {
    y = x / 3.75, y = y * y;
    return (
        1.0 +
        y * (3.5156229 +
             y * (3.0899424 +
                  y * (1.2067492 +
                       y * (0.2659732 + y * (0.360768e-1 + y * 0.45813e-2))))));
  } else {
    y = 3.75 / ax;
    return ((expl(ax) / sqrtl(ax)) *
            (0.39894228 +
             y * (0.1328592e-1 +
                  y * (0.225319e-2 +
                       y * (-0.157565e-2 +
                            y * (0.916281e-2 +
                                 y * (-0.2057706e-1 +
                                      y * (0.2635537e-1 +
                                           y * (-0.1647633e-1 +
                                                y * 0.392377e-2)))))))));
  }
}


x86 assembly (clang, -O0):
<bessi0_spd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
fldt   0x10(%rbp)
fstpt  -0x20(%rbp)
fldt   -0x20(%rbp)
fabs
fld    %st(0)
fstpt  -0x30(%rbp)
flds   0xec2(%rip)
fucomip %st(1),%st
fstp   %st(0)
jbe    11ac <bessi0_spd+0x8c>
jmp    114d <bessi0_spd+0x2d>
fldt   -0x20(%rbp)
flds   0xeaa(%rip)
fdivrp %st,%st(1)
fstpt  -0x40(%rbp)
fldt   -0x40(%rbp)
fmul   %st,%st(0)
fstpt  -0x40(%rbp)
fldt   -0x40(%rbp)
fldl   0xee4(%rip)
fmul   %st(1),%st
fldl   0xee4(%rip)
faddp  %st,%st(1)
fmul   %st(1),%st
fldl   0xee2(%rip)
faddp  %st,%st(1)
fmul   %st(1),%st
fldl   0xee0(%rip)
faddp  %st,%st(1)
fmul   %st(1),%st
fldl   0xede(%rip)
faddp  %st,%st(1)
fmul   %st(1),%st
fldl   0xedc(%rip)
faddp  %st,%st(1)
fmulp  %st,%st(1)
fld1
faddp  %st,%st(1)
fstpt  -0x10(%rbp)
jmp    1250 <bessi0_spd+0x130>
fldt   -0x30(%rbp)
flds   0xe4b(%rip)
fdivp  %st,%st(1)
fstpt  -0x40(%rbp)
fldt   -0x30(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <expl@plt>
movsd  %xmm0,-0x60(%rbp)
fldt   -0x30(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1040 <sqrtl@plt>
movaps %xmm0,%xmm1
movsd  -0x60(%rbp),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
fldl   -0x48(%rbp)
fldt   -0x40(%rbp)
fld    %st(0)
fstpt  -0x54(%rbp)
fldl   0xe0d(%rip)
fmul   %st(1),%st
fldl   0xe0d(%rip)
faddp  %st,%st(1)
fmul   %st(1),%st
fldl   0xe0b(%rip)
faddp  %st,%st(1)
fmul   %st(1),%st
fldl   0xe09(%rip)
faddp  %st,%st(1)
fmul   %st(1),%st
fldl   0xe07(%rip)
faddp  %st,%st(1)
fmul   %st(1),%st
fldl   0xe05(%rip)
faddp  %st,%st(1)
fmul   %st(1),%st
fldl   0xe03(%rip)
faddp  %st,%st(1)
fmul   %st(1),%st
fldl   0xe01(%rip)
faddp  %st,%st(1)
fmulp  %st,%st(1)
fldl   0xdff(%rip)
faddp  %st,%st(1)
fmulp  %st,%st(1)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bessi0_spd>:
sub    $0x38,%rsp
fldt   0x40(%rsp)
fld    %st(0)
fabs
flds   0xece(%rip)
fucomip %st(1),%st
jbe    1179 <bessi0_spd+0x59>
fstp   %st(0)
fdivs  0xec2(%rip)
fmul   %st,%st(0)
fld    %st(0)
fmull  0xf08(%rip)
faddl  0xf0a(%rip)
fmul   %st(1),%st
faddl  0xf0a(%rip)
fmul   %st(1),%st
faddl  0xf0a(%rip)
fmul   %st(1),%st
faddl  0xf0a(%rip)
fmul   %st(1),%st
faddl  0xf0a(%rip)
fmulp  %st,%st(1)
fld1
faddp  %st,%st(1)
add    $0x38,%rsp
ret
fstp   %st(1)
fld    %st(0)
fdivrs 0xe7d(%rip)
fstpt  0x2c(%rsp)
fld    %st(0)
fstpt  (%rsp)
fstpt  0x20(%rsp)
call   1030 <expl@plt>
movsd  %xmm0,0x10(%rsp)
fldt   0x20(%rsp)
fstpt  (%rsp)
call   1040 <sqrtl@plt>
fldt   0x2c(%rsp)
fld    %st(0)
fmull  0xe55(%rip)
faddl  0xe57(%rip)
fmul   %st(1),%st
faddl  0xe57(%rip)
fmul   %st(1),%st
faddl  0xe57(%rip)
fmul   %st(1),%st
faddl  0xe57(%rip)
movsd  0x10(%rsp),%xmm1
divsd  %xmm0,%xmm1
fmul   %st(1),%st
faddl  0xe4d(%rip)
movsd  %xmm1,0x18(%rsp)
fmul   %st(1),%st
faddl  0xe47(%rip)
fmul   %st(1),%st
faddl  0xe47(%rip)
fmulp  %st,%st(1)
faddl  0xe47(%rip)
fmull  0x18(%rsp)
add    $0x38,%rsp
ret

LLVM IR (-O0):
define x86_fp80 @bessi0_spd(x86_fp80 %0) {
%2 = alloca x86_fp80
%3 = alloca x86_fp80
%4 = alloca x86_fp80
%5 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %3
%6 = load x86_fp80, x86_fp80* %3
%7 = call x86_fp80 @llvm.fabs.f80(x86_fp80 %6)
store x86_fp80 %7, x86_fp80* %4
%8 = fcmp olt x86_fp80 %7, 0xK4000F000000000000000
br i1 %8, label %9, label %27
9: ; preds = %1
%10 = load x86_fp80, x86_fp80* %3
%11 = fdiv x86_fp80 %10, 0xK4000F000000000000000
store x86_fp80 %11, x86_fp80* %5
%12 = load x86_fp80, x86_fp80* %5
%13 = load x86_fp80, x86_fp80* %5
%14 = fmul x86_fp80 %12, %13
store x86_fp80 %14, x86_fp80* %5
%15 = load x86_fp80, x86_fp80* %5
%16 = load x86_fp80, x86_fp80* %5
%17 = load x86_fp80, x86_fp80* %5
%18 = load x86_fp80, x86_fp80* %5
%19 = load x86_fp80, x86_fp80* %5
%20 = load x86_fp80, x86_fp80* %5
%21 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %20, x86_fp80 0xK3FF7961EBAD62A43A000, x86_fp80 0xK3FFA93C544424F2FE800)
%22 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %19, x86_fp80 %21, x86_fp80 0xK3FFD882DA3A739955000)
%23 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %18, x86_fp80 %22, x86_fp80 0xK3FFF9A76C1FE3CB16000)
%24 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %17, x86_fp80 %23, x86_fp80 0xK4000C5C19DC4A1852000)
%25 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %16, x86_fp80 %24, x86_fp80 0xK4000E0FFF73124653800)
%26 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %15, x86_fp80 %25, x86_fp80 0xK3FFF8000000000000000)
store x86_fp80 %26, x86_fp80* %2
br label %53
27: ; preds = %1
%28 = load x86_fp80, x86_fp80* %4
%29 = fdiv x86_fp80 0xK4000F000000000000000, %28
store x86_fp80 %29, x86_fp80* %5
%30 = load x86_fp80, x86_fp80* %4
%31 = call double @expl(x86_fp80 %30)
%32 = load x86_fp80, x86_fp80* %4
%33 = call double @sqrtl(x86_fp80 %32)
%34 = fdiv double %31, %33
%35 = fpext double %34 to x86_fp80
%36 = load x86_fp80, x86_fp80* %5
%37 = load x86_fp80, x86_fp80* %5
%38 = load x86_fp80, x86_fp80* %5
%39 = load x86_fp80, x86_fp80* %5
%40 = load x86_fp80, x86_fp80* %5
%41 = load x86_fp80, x86_fp80* %5
%42 = load x86_fp80, x86_fp80* %5
%43 = load x86_fp80, x86_fp80* %5
%44 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %43, x86_fp80 0xK3FF78092F7E9DBFC4000, x86_fp80 0xKBFF986F95E504262A800)
%45 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %42, x86_fp80 %44, x86_fp80 0xK3FF9D7E737872AD71800)
%46 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %41, x86_fp80 %45, x86_fp80 0xKBFF9A89138F7EE38B000)
%47 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %40, x86_fp80 %46, x86_fp80 0xK3FF8961F9C52868AA000)
%48 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %39, x86_fp80 %47, x86_fp80 0xKBFF5CE860A709C4A5000)
%49 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %38, x86_fp80 %48, x86_fp80 0xK3FF693AA415C96AED800)
%50 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %37, x86_fp80 %49, x86_fp80 0xK3FF8D9AD2FF96CE8E000)
%51 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %36, x86_fp80 %50, x86_fp80 0xK3FFDCC42299B2EF00000)
%52 = fmul x86_fp80 %35, %51
store x86_fp80 %52, x86_fp80* %2
br label %53
53: ; preds = %27, %9
%54 = load x86_fp80, x86_fp80* %2
ret x86_fp80 %54
}

LLVM IR (-O2):
define x86_fp80 @bessi0_spd(x86_fp80 %0) {
%2 = tail call x86_fp80 @llvm.fabs.f80(x86_fp80 %0)
%3 = fcmp olt x86_fp80 %2, 0xK4000F000000000000000
br i1 %3, label %4, label %13
4: ; preds = %1
%5 = fdiv x86_fp80 %0, 0xK4000F000000000000000
%6 = fmul x86_fp80 %5, %5
%7 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %6, x86_fp80 0xK3FF7961EBAD62A43A000, x86_fp80 0xK3FFA93C544424F2FE800)
%8 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %6, x86_fp80 %7, x86_fp80 0xK3FFD882DA3A739955000)
%9 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %6, x86_fp80 %8, x86_fp80 0xK3FFF9A76C1FE3CB16000)
%10 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %6, x86_fp80 %9, x86_fp80 0xK4000C5C19DC4A1852000)
%11 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %6, x86_fp80 %10, x86_fp80 0xK4000E0FFF73124653800)
%12 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %6, x86_fp80 %11, x86_fp80 0xK3FFF8000000000000000)
br label %28
13: ; preds = %1
%14 = fdiv x86_fp80 0xK4000F000000000000000, %2
%15 = tail call double @expl(x86_fp80 %2)
%16 = tail call double @sqrtl(x86_fp80 %2)
%17 = fdiv double %15, %16
%18 = fpext double %17 to x86_fp80
%19 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %14, x86_fp80 0xK3FF78092F7E9DBFC4000, x86_fp80 0xKBFF986F95E504262A800)
%20 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %14, x86_fp80 %19, x86_fp80 0xK3FF9D7E737872AD71800)
%21 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %14, x86_fp80 %20, x86_fp80 0xKBFF9A89138F7EE38B000)
%22 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %14, x86_fp80 %21, x86_fp80 0xK3FF8961F9C52868AA000)
%23 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %14, x86_fp80 %22, x86_fp80 0xKBFF5CE860A709C4A5000)
%24 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %14, x86_fp80 %23, x86_fp80 0xK3FF693AA415C96AED800)
%25 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %14, x86_fp80 %24, x86_fp80 0xK3FF8D9AD2FF96CE8E000)
%26 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %14, x86_fp80 %25, x86_fp80 0xK3FFDCC42299B2EF00000)
%27 = fmul x86_fp80 %26, %18
br label %28
28: ; preds = %13, %4
%29 = phi x86_fp80 [ %12, %4 ], [ %27, %13 ]
ret x86_fp80 %29
}