#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 */
float cos(double);
double log(float);
double sin(double);
double sqrt(double);
float bessy0(float x) {
  float bessj0(float x);
  float z;
  double xx, y, ans, ans1, ans2;
  if (x < 8.0) {
    y = x * x;
    ans1 = -2957821389.0 +
           y * (7062834065.0 +
                y * (-512359803.6 +
                     y * (10879881.29 + y * (-86327.92757 + y * 228.4622733))));
    ans2 = 40076544269.0 +
           y * (745249964.8 +
                y * (7189466.438 +
                     y * (47447.26470 + y * (226.1030244 + y * 1.0))));
    ans = (ans1 / ans2) + 0.636619772 * bessj0(x) * log(x);
  } else {
    z = 8.0 / x;
    y = z * z;
    xx = x - 0.785398164;
    ans1 = 1.0 + y * (-0.1098628627e-2 +
                      y * (0.2734510407e-4 +
                           y * (-0.2073370639e-5 + y * 0.2093887211e-6)));
    ans2 = -0.1562499995e-1 +
           y * (0.1430488765e-3 +
                y * (-0.6911147651e-5 +
                     y * (0.7621095161e-6 + y * (-0.934945152e-7))));
    ans = sqrt(0.636619772 / x) * (sin(xx) * ans1 + z * cos(xx) * ans2);
  }
  return ans;
}


x86 assembly (clang, -O0):
<bessy0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe92(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    12c2 <bessy0+0x172>
movss  -0x4(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  -0x18(%rbp),%xmm3
movsd  -0x18(%rbp),%xmm4
movsd  0xf04(%rip),%xmm5
mulsd  %xmm5,%xmm4
movsd  0xf00(%rip),%xmm5
addsd  %xmm5,%xmm4
mulsd  %xmm4,%xmm3
movsd  0xee0(%rip),%xmm4
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm2
movsd  0xec8(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
movsd  0xeb0(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe98(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  -0x18(%rbp),%xmm3
movsd  -0x18(%rbp),%xmm4
movsd  0xe66(%rip),%xmm5
addsd  %xmm5,%xmm4
mulsd  %xmm4,%xmm3
movsd  0xe4e(%rip),%xmm4
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm2
movsd  0xe36(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
movsd  0xe1e(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe06(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x28(%rbp),%xmm0
divsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movss  -0x4(%rbp),%xmm0
call   1040 <bessj0@plt>
cvtss2sd %xmm0,%xmm1
movsd  0xd78(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movss  -0x4(%rbp),%xmm0
call   1060 <log@plt>
movsd  -0x40(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x38(%rbp),%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
jmp    1450 <bessy0+0x300>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xd2d(%rip),%xmm0
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xd5c(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  -0x18(%rbp),%xmm3
movsd  0xd27(%rip),%xmm4
mulsd  %xmm4,%xmm3
movsd  0xd23(%rip),%xmm4
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm2
movsd  0xd03(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
movsd  0xceb(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xcd3(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  -0x18(%rbp),%xmm3
movsd  0xc9e(%rip),%xmm4
mulsd  %xmm4,%xmm3
movsd  0xc9a(%rip),%xmm4
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm2
movsd  0xc7a(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
movsd  0xc62(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xc4a(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xc28(%rip),%xmm0
divsd  %xmm1,%xmm0
call   1070 <sqrt@plt>
movsd  %xmm0,-0x48(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1030 <sin@plt>
movsd  %xmm0,-0x58(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x5c(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1050 <cos@plt>
movss  -0x5c(%rbp),%xmm2
movsd  -0x58(%rbp),%xmm1
movsd  -0x50(%rbp),%xmm3
movaps %xmm0,%xmm4
movsd  -0x48(%rbp),%xmm0
mulss  %xmm4,%xmm2
cvtss2sd %xmm2,%xmm2
mulsd  -0x30(%rbp),%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bessy0>:
sub    $0x48,%rsp
movaps %xmm0,%xmm1
movss  0xea1(%rip),%xmm0
ucomiss %xmm1,%xmm0
jbe    1219 <bessy0+0xc9>
movaps %xmm1,%xmm0
mulss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm3
movsd  0xeed(%rip),%xmm2
mulsd  %xmm3,%xmm2
addsd  0xee9(%rip),%xmm2
movaps %xmm1,%xmm0
movss  %xmm1,0x8(%rsp)
movsd  0xee0(%rip),%xmm1
addsd  %xmm3,%xmm1
unpcklpd %xmm1,%xmm2
unpcklpd %xmm3,%xmm3
mulpd  %xmm3,%xmm2
addpd  0xed0(%rip),%xmm2
mulpd  %xmm3,%xmm2
addpd  0xed4(%rip),%xmm2
mulpd  %xmm3,%xmm2
addpd  0xed8(%rip),%xmm2
mulpd  %xmm3,%xmm2
addpd  0xedc(%rip),%xmm2
movapd %xmm2,%xmm1
unpckhpd %xmm2,%xmm1
divsd  %xmm1,%xmm2
movapd %xmm2,0x20(%rsp)
call   1040 <bessj0@plt>
cvtss2sd %xmm0,%xmm0
mulsd  0xe69(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
movss  0x8(%rsp),%xmm0
call   1060 <log@plt>
mulsd  0x10(%rsp),%xmm0
addsd  0x20(%rsp),%xmm0
jmp    1331 <bessy0+0x1e1>
divss  %xmm1,%xmm0
movss  %xmm0,0x10(%rsp)
mulss  %xmm0,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xddd(%rip),%xmm2
mulsd  %xmm0,%xmm2
addsd  0xdd9(%rip),%xmm2
mulsd  %xmm0,%xmm2
addsd  0xdd5(%rip),%xmm2
mulsd  %xmm0,%xmm2
addsd  0xdd1(%rip),%xmm2
cvtss2sd %xmm1,%xmm1
mulsd  %xmm0,%xmm2
addsd  0xdc9(%rip),%xmm2
movsd  %xmm2,0x8(%rsp)
movsd  0xdc3(%rip),%xmm2
mulsd  %xmm0,%xmm2
addsd  0xdbf(%rip),%xmm2
movsd  0xd7f(%rip),%xmm3
mulsd  %xmm0,%xmm2
addsd  0xdb3(%rip),%xmm2
addsd  %xmm1,%xmm3
movsd  %xmm3,0x20(%rsp)
mulsd  %xmm0,%xmm2
addsd  0xda5(%rip),%xmm2
mulsd  %xmm0,%xmm2
addsd  0xda1(%rip),%xmm2
movsd  %xmm2,0x40(%rsp)
movsd  0xd9b(%rip),%xmm0
divsd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     12d9 <bessy0+0x189>
sqrtsd %xmm0,%xmm0
jmp    12de <bessy0+0x18e>
call   1070 <sqrt@plt>
movsd  %xmm0,0x18(%rsp)
movsd  0x20(%rsp),%xmm0
call   1030 <sin@plt>
movsd  %xmm0,0x38(%rsp)
movsd  0x20(%rsp),%xmm0
call   1050 <cos@plt>
movss  0x10(%rsp),%xmm1
mulss  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
movsd  0x40(%rsp),%xmm1
mulsd  %xmm0,%xmm1
movsd  0x38(%rsp),%xmm0
mulsd  0x8(%rsp),%xmm0
addsd  %xmm1,%xmm0
mulsd  0x18(%rsp),%xmm0
cvtsd2ss %xmm0,%xmm0
add    $0x48,%rsp
ret

LLVM IR (-O0):
define float @bessy0(float %0) {
%2 = alloca float
%3 = alloca float
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store float %0, float* %2
%9 = load float, float* %2
%10 = fpext float %9 to double
%11 = fcmp olt double %10, 8.000000e+00
br i1 %11, label %12, label %47
12: ; preds = %1
%13 = load float, float* %2
%14 = load float, float* %2
%15 = fmul float %13, %14
%16 = fpext float %15 to double
store double %16, double* %5
%17 = load double, double* %5
%18 = load double, double* %5
%19 = load double, double* %5
%20 = load double, double* %5
%21 = load double, double* %5
%22 = call double @llvm.fmuladd.f64(double %21, double 0x406C8ECAF1602A0C, double 0xC0F5137ED753A3EC)
%23 = call double @llvm.fmuladd.f64(double %20, double %22, double 0x4164C0712947AE14)
%24 = call double @llvm.fmuladd.f64(double %19, double %23, double 0xC1BE89FD7B99999A)
%25 = call double @llvm.fmuladd.f64(double %18, double %24, double 0x41FA4FA4B9100000)
%26 = call double @llvm.fmuladd.f64(double %17, double %25, double 0xC1E60998B9A00000)
store double %26, double* %7
%27 = load double, double* %5
%28 = load double, double* %5
%29 = load double, double* %5
%30 = load double, double* %5
%31 = load double, double* %5
%32 = call double @llvm.fmuladd.f64(double %31, double 1.000000e+00, double 0x406C434BF9D39615)
%33 = call double @llvm.fmuladd.f64(double %30, double %32, double 0x40E72AE8786C2268)
%34 = call double @llvm.fmuladd.f64(double %29, double %33, double 0x415B6CF69C083127)
%35 = call double @llvm.fmuladd.f64(double %28, double %34, double 0x41C635CE56666666)
%36 = call double @llvm.fmuladd.f64(double %27, double %35, double 0x4222A97F121A0000)
store double %36, double* %8
%37 = load double, double* %7
%38 = load double, double* %8
%39 = fdiv double %37, %38
%40 = load float, float* %2
%41 = call float @bessj0(float %40)
%42 = fpext float %41 to double
%43 = fmul double 0x3FE45F306D974364, %42
%44 = load float, float* %2
%45 = call double @log(float %44)
%46 = call double @llvm.fmuladd.f64(double %43, double %45, double %39)
store double %46, double* %6
br label %91
47: ; preds = %1
%48 = load float, float* %2
%49 = fpext float %48 to double
%50 = fdiv double 8.000000e+00, %49
%51 = fptrunc double %50 to float
store float %51, float* %3
%52 = load float, float* %3
%53 = load float, float* %3
%54 = fmul float %52, %53
%55 = fpext float %54 to double
store double %55, double* %5
%56 = load float, float* %2
%57 = fpext float %56 to double
%58 = fsub double %57, 0x3FE921FB5496FD7F
store double %58, double* %4
%59 = load double, double* %5
%60 = load double, double* %5
%61 = load double, double* %5
%62 = load double, double* %5
%63 = call double @llvm.fmuladd.f64(double %62, double 0x3E8C1A8AAB292861, double 0xBEC1648790299C51)
%64 = call double @llvm.fmuladd.f64(double %61, double %63, double 0x3EFCAC653E340F37)
%65 = call double @llvm.fmuladd.f64(double %60, double %64, double 0xBF51FFFB817F9F0A)
%66 = call double @llvm.fmuladd.f64(double %59, double %65, double 1.000000e+00)
store double %66, double* %7
%67 = load double, double* %5
%68 = load double, double* %5
%69 = load double, double* %5
%70 = load double, double* %5
%71 = call double @llvm.fmuladd.f64(double %70, double 0xBE7918E4E7D0DF29, double 0x3EA992788C9726A9)
%72 = call double @llvm.fmuladd.f64(double %69, double %71, double 0xBEDCFCC9CD06FBFC)
%73 = call double @llvm.fmuladd.f64(double %68, double %72, double 0x3F22BFEC7E1AA561)
%74 = call double @llvm.fmuladd.f64(double %67, double %73, double 0xBF8FFFFFFE483202)
store double %74, double* %8
%75 = load float, float* %2
%76 = fpext float %75 to double
%77 = fdiv double 0x3FE45F306D974364, %76
%78 = call double @sqrt(double %77)
%79 = load double, double* %4
%80 = call double @sin(double %79)
%81 = load double, double* %7
%82 = load float, float* %3
%83 = load double, double* %4
%84 = call float @cos(double %83)
%85 = fmul float %82, %84
%86 = fpext float %85 to double
%87 = load double, double* %8
%88 = fmul double %86, %87
%89 = call double @llvm.fmuladd.f64(double %80, double %81, double %88)
%90 = fmul double %78, %89
store double %90, double* %6
br label %91
91: ; preds = %47, %12
%92 = load double, double* %6
%93 = fptrunc double %92 to float
ret float %93
}

LLVM IR (-O2):
define float @bessy0(float %0) {
%2 = fpext float %0 to double
%3 = fcmp olt float %0, 8.000000e+00
br i1 %3, label %4, label %25
4: ; preds = %1
%5 = fmul float %0, %0
%6 = fpext float %5 to double
%7 = tail call double @llvm.fmuladd.f64(double %6, double 0x406C8ECAF1602A0C, double 0xC0F5137ED753A3EC)
%8 = fadd double %6, 0x406C434BF9D39615
%9 = insertelement <2 x double> poison, double %6, i64 0
%10 = shufflevector <2 x double> %9, <2 x double> poison, <2 x i32> zeroinitializer
%11 = insertelement <2 x double> poison, double %7, i64 0
%12 = insertelement <2 x double> %11, double %8, i64 1
%13 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %10, <2 x double> %12, <2 x double> <double 0x4164C0712947AE14, double 0x40E72AE8786C2268>)
%14 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %10, <2 x double> %13, <2 x double> <double 0xC1BE89FD7B99999A, double 0x415B6CF69C083127>)
%15 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %10, <2 x double> %14, <2 x double> <double 0x41FA4FA4B9100000, double 0x41C635CE56666666>)
%16 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %10, <2 x double> %15, <2 x double> <double 0xC1E60998B9A00000, double 0x4222A97F121A0000>)
%17 = extractelement <2 x double> %16, i64 0
%18 = extractelement <2 x double> %16, i64 1
%19 = fdiv double %17, %18
%20 = tail call float @bessj0(float %0)
%21 = fpext float %20 to double
%22 = fmul double %21, 0x3FE45F306D974364
%23 = tail call double @log(float %0)
%24 = tail call double @llvm.fmuladd.f64(double %22, double %23, double %19)
br label %47
25: ; preds = %1
%26 = fdiv float 8.000000e+00, %0
%27 = fmul float %26, %26
%28 = fpext float %27 to double
%29 = fadd double %2, 0xBFE921FB5496FD7F
%30 = tail call double @llvm.fmuladd.f64(double %28, double 0x3E8C1A8AAB292861, double 0xBEC1648790299C51)
%31 = tail call double @llvm.fmuladd.f64(double %28, double %30, double 0x3EFCAC653E340F37)
%32 = tail call double @llvm.fmuladd.f64(double %28, double %31, double 0xBF51FFFB817F9F0A)
%33 = tail call double @llvm.fmuladd.f64(double %28, double %32, double 1.000000e+00)
%34 = tail call double @llvm.fmuladd.f64(double %28, double 0xBE7918E4E7D0DF29, double 0x3EA992788C9726A9)
%35 = tail call double @llvm.fmuladd.f64(double %28, double %34, double 0xBEDCFCC9CD06FBFC)
%36 = tail call double @llvm.fmuladd.f64(double %28, double %35, double 0x3F22BFEC7E1AA561)
%37 = tail call double @llvm.fmuladd.f64(double %28, double %36, double 0xBF8FFFFFFE483202)
%38 = fdiv double 0x3FE45F306D974364, %2
%39 = tail call double @sqrt(double %38)
%40 = tail call double @sin(double %29)
%41 = tail call float @cos(double %29)
%42 = fmul float %26, %41
%43 = fpext float %42 to double
%44 = fmul double %37, %43
%45 = tail call double @llvm.fmuladd.f64(double %40, double %33, double %44)
%46 = fmul double %39, %45
br label %47
47: ; preds = %25, %4
%48 = phi double [ %24, %4 ], [ %46, %25 ]
%49 = fptrunc double %48 to float
ret float %49
}