#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 */
long double expl(long double);
long double fabsl(long double);
long double sqrtl(long double);
long double bessi1_spd(long double x) {
  long double ax, ans;
  long double y;
  if ((ax = fabsl(x)) < 3.75) {
    y = x / 3.75, y = y * y;
    ans =
        ax * (0.5 + y * (0.87890594 +
                         y * (0.51498869 +
                              y * (0.15084934 +
                                   y * (0.2658733e-1 +
                                        y * (0.301532e-2 + y * 0.32411e-3))))));
  } else {
    y = 3.75 / ax;
    ans = 0.2282967e-1 +
          y * (-0.2895312e-1 + y * (0.1787654e-1 - y * 0.420059e-2));
    ans = 0.39894228 +
          y * (-0.3988024e-1 +
               y * (-0.362018e-2 +
                    y * (0.163801e-2 + y * (-0.1031555e-1 + y * ans))));
    ans *= (expl(ax) / sqrtl(ax));
  }
  return x < 0.0 ? -ans : ans;
}


x86 assembly (clang, -O0):
<bessi1_spd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fabs
fld    %st(0)
fstpt  -0x20(%rbp)
flds   0xec2(%rip)
fucomip %st(1),%st
fstp   %st(0)
jbe    11b5 <bessi1_spd+0x95>
jmp    114d <bessi1_spd+0x2d>
fldt   -0x10(%rbp)
flds   0xeaa(%rip)
fdivrp %st,%st(1)
fstpt  -0x40(%rbp)
fldt   -0x40(%rbp)
fmul   %st,%st(0)
fstpt  -0x40(%rbp)
fldt   -0x20(%rbp)
fldt   -0x40(%rbp)
fldl   0xee1(%rip)
fmul   %st(1),%st
fldl   0xee1(%rip)
faddp  %st,%st(1)
fmul   %st(1),%st
fldl   0xedf(%rip)
faddp  %st,%st(1)
fmul   %st(1),%st
fldl   0xedd(%rip)
faddp  %st,%st(1)
fmul   %st(1),%st
fldl   0xedb(%rip)
faddp  %st,%st(1)
fmul   %st(1),%st
fldl   0xed9(%rip)
faddp  %st,%st(1)
fmulp  %st,%st(1)
flds   0xe5b(%rip)
faddp  %st,%st(1)
fmulp  %st,%st(1)
fstpt  -0x30(%rbp)
jmp    1252 <bessi1_spd+0x132>
fldt   -0x20(%rbp)
flds   0xe42(%rip)
fdivp  %st,%st(1)
fstpt  -0x40(%rbp)
fldt   -0x40(%rbp)
fldl   0xe3c(%rip)
fmul   %st(1),%st
fldl   0xe3c(%rip)
faddp  %st,%st(1)
fmul   %st(1),%st
fldl   0xe3a(%rip)
faddp  %st,%st(1)
fmulp  %st,%st(1)
fldl   0xe38(%rip)
faddp  %st,%st(1)
fstpt  -0x30(%rbp)
fldt   -0x40(%rbp)
fldt   -0x30(%rbp)
fmul   %st(1),%st
fldl   0xe2d(%rip)
faddp  %st,%st(1)
fmul   %st(1),%st
fldl   0xe2b(%rip)
faddp  %st,%st(1)
fmul   %st(1),%st
fldl   0xe29(%rip)
faddp  %st,%st(1)
fmul   %st(1),%st
fldl   0xe27(%rip)
faddp  %st,%st(1)
fmulp  %st,%st(1)
fldl   0xe25(%rip)
faddp  %st,%st(1)
fstpt  -0x30(%rbp)
fldt   -0x20(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <expl@plt>
fstpt  -0x4c(%rbp)
fldt   -0x20(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1040 <sqrtl@plt>
fldt   -0x4c(%rbp)
fdivp  %st,%st(1)
fldt   -0x30(%rbp)
fmulp  %st,%st(1)
fstpt  -0x30(%rbp)
fldt   -0x10(%rbp)
fldz
fucomip %st(1),%st
fstp   %st(0)
jbe    1273 <bessi1_spd+0x153>
jmp    1266 <bessi1_spd+0x146>
fldt   -0x30(%rbp)
fchs
fstpt  -0x58(%rbp)
jmp    1279 <bessi1_spd+0x159>
fldt   -0x30(%rbp)
fstpt  -0x58(%rbp)
fldt   -0x58(%rbp)
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bessi1_spd>:
sub    $0x48,%rsp
fldt   0x50(%rsp)
fld    %st(0)
fabs
flds   0xece(%rip)
fucomip %st(1),%st
jbe    117d <bessi1_spd+0x5d>
fld    %st(1)
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)
fadds  0xe8e(%rip)
fmulp  %st,%st(1)
jmp    1205 <bessi1_spd+0xe5>
fld    %st(0)
fdivrs 0xe7b(%rip)
fld    %st(0)
fmull  0xe7b(%rip)
faddl  0xe7d(%rip)
fmul   %st(1),%st
faddl  0xe7d(%rip)
fmul   %st(1),%st
faddl  0xe7d(%rip)
fmul   %st(1),%st
faddl  0xe7d(%rip)
fmul   %st(1),%st
faddl  0xe7d(%rip)
fmul   %st(1),%st
faddl  0xe7d(%rip)
fmul   %st(1),%st
faddl  0xe7d(%rip)
fmulp  %st,%st(1)
faddl  0xe7d(%rip)
fstpt  0x30(%rsp)
fld    %st(0)
fstpt  (%rsp)
fxch   %st(1)
fstpt  0x3c(%rsp)
fstpt  0x18(%rsp)
call   1030 <expl@plt>
fstpt  0x24(%rsp)
fldt   0x18(%rsp)
fstpt  (%rsp)
call   1040 <sqrtl@plt>
fldt   0x3c(%rsp)
fldt   0x24(%rsp)
fdivp  %st,%st(2)
fldt   0x30(%rsp)
fmulp  %st,%st(2)
fxch   %st(1)
fldz
fucomip %st(2),%st
fstp   %st(1)
fld    %st(0)
fchs
fxch   %st(1)
fcmovnbe %st(1),%st
fstp   %st(1)
add    $0x48,%rsp
ret

LLVM IR (-O0):
define x86_fp80 @bessi1_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* %2
%6 = load x86_fp80, x86_fp80* %2
%7 = call x86_fp80 @llvm.fabs.f80(x86_fp80 %6)
store x86_fp80 %7, x86_fp80* %3
%8 = fcmp olt x86_fp80 %7, 0xK4000F000000000000000
br i1 %8, label %9, label %29
9: ; preds = %1
%10 = load x86_fp80, x86_fp80* %2
%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* %3
%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 = load x86_fp80, x86_fp80* %5
%22 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %21, x86_fp80 0xK3FF3A9ED4ECD6D869800, x86_fp80 0xK3FF6C59CACC9772CE000)
%23 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %20, x86_fp80 %22, x86_fp80 0xK3FF9D9CDAC1AD090D000)
%24 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %19, x86_fp80 %23, x86_fp80 0xK3FFC9A783FD7B1575000)
%25 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %18, x86_fp80 %24, x86_fp80 0xK3FFE83D64C7D5C214000)
%26 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %17, x86_fp80 %25, x86_fp80 0xK3FFEE0FFFACC8F653800)
%27 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %16, x86_fp80 %26, x86_fp80 0xK3FFE8000000000000000)
%28 = fmul x86_fp80 %15, %27
store x86_fp80 %28, x86_fp80* %4
br label %57
29: ; preds = %1
%30 = load x86_fp80, x86_fp80* %3
%31 = fdiv x86_fp80 0xK4000F000000000000000, %30
store x86_fp80 %31, x86_fp80* %5
%32 = load x86_fp80, x86_fp80* %5
%33 = load x86_fp80, x86_fp80* %5
%34 = load x86_fp80, x86_fp80* %5
%35 = fneg x86_fp80 %34
%36 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %35, x86_fp80 0xK3FF789A51A564281D800, x86_fp80 0xK3FF99271D2554CE38800)
%37 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %33, x86_fp80 %36, x86_fp80 0xKBFF9ED2F17F08C9A8000)
%38 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %32, x86_fp80 %37, x86_fp80 0xK3FF9BB0549C0E93EC800)
store x86_fp80 %38, x86_fp80* %4
%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 = load x86_fp80, x86_fp80* %4
%45 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %43, x86_fp80 %44, x86_fp80 0xKBFF8A9028D78F9E6E000)
%46 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %42, x86_fp80 %45, x86_fp80 0xK3FF5D6B27EC2D3A4B000)
%47 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %41, x86_fp80 %46, x86_fp80 0xKBFF6ED408AB4A461F800)
%48 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %40, x86_fp80 %47, x86_fp80 0xKBFFAA3597668E7F5F000)
%49 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %39, x86_fp80 %48, x86_fp80 0xK3FFDCC42299B2EF00000)
store x86_fp80 %49, x86_fp80* %4
%50 = load x86_fp80, x86_fp80* %3
%51 = call x86_fp80 @expl(x86_fp80 %50)
%52 = load x86_fp80, x86_fp80* %3
%53 = call x86_fp80 @sqrtl(x86_fp80 %52)
%54 = fdiv x86_fp80 %51, %53
%55 = load x86_fp80, x86_fp80* %4
%56 = fmul x86_fp80 %55, %54
store x86_fp80 %56, x86_fp80* %4
br label %57
57: ; preds = %29, %9
%58 = load x86_fp80, x86_fp80* %2
%59 = fcmp olt x86_fp80 %58, 0xK00000000000000000000
br i1 %59, label %60, label %63
60: ; preds = %57
%61 = load x86_fp80, x86_fp80* %4
%62 = fneg x86_fp80 %61
br label %65
63: ; preds = %57
%64 = load x86_fp80, x86_fp80* %4
br label %65
65: ; preds = %63, %60
%66 = phi x86_fp80 [ %62, %60 ], [ %64, %63 ]
ret x86_fp80 %66
}

LLVM IR (-O2):
define x86_fp80 @bessi1_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 %14
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 0xK3FF3A9ED4ECD6D869800, x86_fp80 0xK3FF6C59CACC9772CE000)
%8 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %6, x86_fp80 %7, x86_fp80 0xK3FF9D9CDAC1AD090D000)
%9 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %6, x86_fp80 %8, x86_fp80 0xK3FFC9A783FD7B1575000)
%10 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %6, x86_fp80 %9, x86_fp80 0xK3FFE83D64C7D5C214000)
%11 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %6, x86_fp80 %10, x86_fp80 0xK3FFEE0FFFACC8F653800)
%12 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %6, x86_fp80 %11, x86_fp80 0xK3FFE8000000000000000)
%13 = fmul x86_fp80 %2, %12
br label %29
14: ; preds = %1
%15 = fdiv x86_fp80 0xK4000F000000000000000, %2
%16 = fneg x86_fp80 %15
%17 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %16, x86_fp80 0xK3FF789A51A564281D800, x86_fp80 0xK3FF99271D2554CE38800)
%18 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %15, x86_fp80 %17, x86_fp80 0xKBFF9ED2F17F08C9A8000)
%19 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %15, x86_fp80 %18, x86_fp80 0xK3FF9BB0549C0E93EC800)
%20 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %15, x86_fp80 %19, x86_fp80 0xKBFF8A9028D78F9E6E000)
%21 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %15, x86_fp80 %20, x86_fp80 0xK3FF5D6B27EC2D3A4B000)
%22 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %15, x86_fp80 %21, x86_fp80 0xKBFF6ED408AB4A461F800)
%23 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %15, x86_fp80 %22, x86_fp80 0xKBFFAA3597668E7F5F000)
%24 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %15, x86_fp80 %23, x86_fp80 0xK3FFDCC42299B2EF00000)
%25 = tail call x86_fp80 @expl(x86_fp80 %2)
%26 = tail call x86_fp80 @sqrtl(x86_fp80 %2)
%27 = fdiv x86_fp80 %25, %26
%28 = fmul x86_fp80 %24, %27
br label %29
29: ; preds = %14, %4
%30 = phi x86_fp80 [ %13, %4 ], [ %28, %14 ]
%31 = fcmp olt x86_fp80 %0, 0xK00000000000000000000
%32 = fneg x86_fp80 %30
%33 = select i1 %31, x86_fp80 %32, x86_fp80 %30
ret x86_fp80 %33
}