#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 sqrtl(long double);
long double bessi1_spd_exponScaled(long double x) {
  long double ans;
  long double y;
  if (x < 3.75) {
    y = x / 3.75, y = y * y;
    ans = expl(-x) * x *
          (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 / x;
    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 /= sqrtl(x);
  }
  return ans;
}


x86 assembly (clang, -O0):
<bessi1_spd_exponScaled>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
flds   0xec9(%rip)
fucomip %st(1),%st
fstp   %st(0)
jbe    11bf <bessi1_spd_exponScaled+0x9f>
jmp    1146 <bessi1_spd_exponScaled+0x26>
fldt   -0x10(%rbp)
flds   0xeb1(%rip)
fdivrp %st,%st(1)
fstpt  -0x30(%rbp)
fldt   -0x30(%rbp)
fmul   %st,%st(0)
fstpt  -0x30(%rbp)
fldt   -0x10(%rbp)
fchs
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <expl@plt>
fldt   -0x10(%rbp)
fmulp  %st,%st(1)
fldt   -0x30(%rbp)
fldl   0xed7(%rip)
fmul   %st(1),%st
fldl   0xed7(%rip)
faddp  %st,%st(1)
fmul   %st(1),%st
fldl   0xed5(%rip)
faddp  %st,%st(1)
fmul   %st(1),%st
fldl   0xed3(%rip)
faddp  %st,%st(1)
fmul   %st(1),%st
fldl   0xed1(%rip)
faddp  %st,%st(1)
fmul   %st(1),%st
fldl   0xecf(%rip)
faddp  %st,%st(1)
fmulp  %st,%st(1)
flds   0xe51(%rip)
faddp  %st,%st(1)
fmulp  %st,%st(1)
fstpt  -0x20(%rbp)
jmp    1247 <bessi1_spd_exponScaled+0x127>
fldt   -0x10(%rbp)
flds   0xe38(%rip)
fdivp  %st,%st(1)
fstpt  -0x30(%rbp)
fldt   -0x30(%rbp)
fldl   0xe32(%rip)
fmul   %st(1),%st
fldl   0xe32(%rip)
faddp  %st,%st(1)
fmul   %st(1),%st
fldl   0xe30(%rip)
faddp  %st,%st(1)
fmulp  %st,%st(1)
fldl   0xe2e(%rip)
faddp  %st,%st(1)
fstpt  -0x20(%rbp)
fldt   -0x30(%rbp)
fldt   -0x20(%rbp)
fmul   %st(1),%st
fldl   0xe23(%rip)
faddp  %st,%st(1)
fmul   %st(1),%st
fldl   0xe21(%rip)
faddp  %st,%st(1)
fmul   %st(1),%st
fldl   0xe1f(%rip)
faddp  %st,%st(1)
fmul   %st(1),%st
fldl   0xe1d(%rip)
faddp  %st,%st(1)
fmulp  %st,%st(1)
fldl   0xe1b(%rip)
faddp  %st,%st(1)
fstpt  -0x20(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1040 <sqrtl@plt>
fldt   -0x20(%rbp)
fdivp  %st,%st(1)
fstpt  -0x20(%rbp)
fldt   -0x20(%rbp)
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bessi1_spd_exponScaled>:
sub    $0x28,%rsp
fldt   0x30(%rsp)
flds   0xed2(%rip)
fucomip %st(1),%st
jbe    1197 <bessi1_spd_exponScaled+0x77>
fld    %st(0)
fdivs  0xec6(%rip)
fmul   %st,%st(0)
fstpt  0x1c(%rsp)
fld    %st(0)
fchs
fstpt  (%rsp)
fstpt  0x10(%rsp)
call   1030 <expl@plt>
fldt   0x1c(%rsp)
fld    %st(0)
fmull  0xef4(%rip)
faddl  0xef6(%rip)
fmul   %st(1),%st
faddl  0xef6(%rip)
fmul   %st(1),%st
faddl  0xef6(%rip)
fmul   %st(1),%st
faddl  0xef6(%rip)
fldt   0x10(%rsp)
fmulp  %st,%st(3)
fmul   %st(1),%st
faddl  0xef0(%rip)
fmulp  %st,%st(1)
fadds  0xe74(%rip)
fmulp  %st,%st(1)
add    $0x28,%rsp
ret
fld    %st(0)
fdivrs 0xe61(%rip)
fld    %st(0)
fmull  0xe61(%rip)
faddl  0xe63(%rip)
fmul   %st(1),%st
faddl  0xe63(%rip)
fmul   %st(1),%st
faddl  0xe63(%rip)
fmul   %st(1),%st
faddl  0xe63(%rip)
fmul   %st(1),%st
faddl  0xe63(%rip)
fmul   %st(1),%st
faddl  0xe63(%rip)
fmul   %st(1),%st
faddl  0xe63(%rip)
fmulp  %st,%st(1)
faddl  0xe63(%rip)
fstpt  0x10(%rsp)
fstpt  (%rsp)
call   1040 <sqrtl@plt>
fldt   0x10(%rsp)
fdivp  %st,%st(1)
add    $0x28,%rsp
ret

LLVM IR (-O0):
define x86_fp80 @bessi1_spd_exponScaled(x86_fp80 %0) {
%2 = alloca x86_fp80
%3 = alloca x86_fp80
%4 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%5 = load x86_fp80, x86_fp80* %2
%6 = fcmp olt x86_fp80 %5, 0xK4000F000000000000000
br i1 %6, label %7, label %31
7: ; preds = %1
%8 = load x86_fp80, x86_fp80* %2
%9 = fdiv x86_fp80 %8, 0xK4000F000000000000000
store x86_fp80 %9, x86_fp80* %4
%10 = load x86_fp80, x86_fp80* %4
%11 = load x86_fp80, x86_fp80* %4
%12 = fmul x86_fp80 %10, %11
store x86_fp80 %12, x86_fp80* %4
%13 = load x86_fp80, x86_fp80* %2
%14 = fneg x86_fp80 %13
%15 = call x86_fp80 @expl(x86_fp80 %14)
%16 = load x86_fp80, x86_fp80* %2
%17 = fmul x86_fp80 %15, %16
%18 = load x86_fp80, x86_fp80* %4
%19 = load x86_fp80, x86_fp80* %4
%20 = load x86_fp80, x86_fp80* %4
%21 = load x86_fp80, x86_fp80* %4
%22 = load x86_fp80, x86_fp80* %4
%23 = load x86_fp80, x86_fp80* %4
%24 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %23, x86_fp80 0xK3FF3A9ED4ECD6D869800, x86_fp80 0xK3FF6C59CACC9772CE000)
%25 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %22, x86_fp80 %24, x86_fp80 0xK3FF9D9CDAC1AD090D000)
%26 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %21, x86_fp80 %25, x86_fp80 0xK3FFC9A783FD7B1575000)
%27 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %20, x86_fp80 %26, x86_fp80 0xK3FFE83D64C7D5C214000)
%28 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %19, x86_fp80 %27, x86_fp80 0xK3FFEE0FFFACC8F653800)
%29 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %18, x86_fp80 %28, x86_fp80 0xK3FFE8000000000000000)
%30 = fmul x86_fp80 %17, %29
store x86_fp80 %30, x86_fp80* %3
br label %56
31: ; preds = %1
%32 = load x86_fp80, x86_fp80* %2
%33 = fdiv x86_fp80 0xK4000F000000000000000, %32
store x86_fp80 %33, x86_fp80* %4
%34 = load x86_fp80, x86_fp80* %4
%35 = load x86_fp80, x86_fp80* %4
%36 = load x86_fp80, x86_fp80* %4
%37 = fneg x86_fp80 %36
%38 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %37, x86_fp80 0xK3FF789A51A564281D800, x86_fp80 0xK3FF99271D2554CE38800)
%39 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %35, x86_fp80 %38, x86_fp80 0xKBFF9ED2F17F08C9A8000)
%40 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %34, x86_fp80 %39, x86_fp80 0xK3FF9BB0549C0E93EC800)
store x86_fp80 %40, x86_fp80* %3
%41 = load x86_fp80, x86_fp80* %4
%42 = load x86_fp80, x86_fp80* %4
%43 = load x86_fp80, x86_fp80* %4
%44 = load x86_fp80, x86_fp80* %4
%45 = load x86_fp80, x86_fp80* %4
%46 = load x86_fp80, x86_fp80* %3
%47 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %45, x86_fp80 %46, x86_fp80 0xKBFF8A9028D78F9E6E000)
%48 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %44, x86_fp80 %47, x86_fp80 0xK3FF5D6B27EC2D3A4B000)
%49 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %43, x86_fp80 %48, x86_fp80 0xKBFF6ED408AB4A461F800)
%50 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %42, x86_fp80 %49, x86_fp80 0xKBFFAA3597668E7F5F000)
%51 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %41, x86_fp80 %50, x86_fp80 0xK3FFDCC42299B2EF00000)
store x86_fp80 %51, x86_fp80* %3
%52 = load x86_fp80, x86_fp80* %2
%53 = call x86_fp80 @sqrtl(x86_fp80 %52)
%54 = load x86_fp80, x86_fp80* %3
%55 = fdiv x86_fp80 %54, %53
store x86_fp80 %55, x86_fp80* %3
br label %56
56: ; preds = %31, %7
%57 = load x86_fp80, x86_fp80* %3
ret x86_fp80 %57
}

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