// File: /workspace/github_cpp_makefile_star2_O2/mouda[P]LTE_random_access-simulate/specialfunctions.cpp
// Function: alglib_impl::besseli0(double, alglib_impl::ae_state*)
double besseli0(double x, ae_state *_state)
{
    double y;
    double v;
    double z;
    double b0;
    double b1;
    double b2;
    double result;


    if( ae_fp_less(x,0) )
    {
        x = -x;
    }
    if( ae_fp_less_eq(x,8.0) )
    {
        y = x/2.0-2.0;
        bessel_besselmfirstcheb(-4.41534164647933937950E-18, &b0, &b1, &b2, _state);
        bessel_besselmnextcheb(y, 3.33079451882223809783E-17, &b0, &b1, &b2, _state);
        bessel_besselmnextcheb(y, -2.43127984654795469359E-16, &b0, &b1, &b2, _state);
        bessel_besselmnextcheb(y, 1.71539128555513303061E-15, &b0, &b1, &b2, _state);
        bessel_besselmnextcheb(y, -1.16853328779934516808E-14, &b0, &b1, &b2, _state);
        bessel_besselmnextcheb(y, 7.67618549860493561688E-14, &b0, &b1, &b2, _state);
        bessel_besselmnextcheb(y, -4.85644678311192946090E-13, &b0, &b1, &b2, _state);
        bessel_besselmnextcheb(y, 2.95505266312963983461E-12, &b0, &b1, &b2, _state);
        bessel_besselmnextcheb(y, -1.72682629144155570723E-11, &b0, &b1, &b2, _state);
        bessel_besselmnextcheb(y, 9.67580903537323691224E-11, &b0, &b1, &b2, _state);
        bessel_besselmnextcheb(y, -5.18979560163526290666E-10, &b0, &b1, &b2, _state);
        bessel_besselmnextcheb(y, 2.65982372468238665035E-9, &b0, &b1, &b2, _state);
        bessel_besselmnextcheb(y, -1.30002500998624804212E-8, &b0, &b1, &b2, _state);
        bessel_besselmnextcheb(y, 6.04699502254191894932E-8, &b0, &b1, &b2, _state);
        bessel_besselmnextcheb(y, -2.67079385394061173391E-7, &b0, &b1, &b2, _state);
        bessel_besselmnextcheb(y, 1.11738753912010371815E-6, &b0, &b1, &b2, _state);
        bessel_besselmnextcheb(y, -4.41673835845875056359E-6, &b0, &b1, &b2, _state);
        bessel_besselmnextcheb(y, 1.64484480707288970893E-5, &b0, &b1, &b2, _state);
        bessel_besselmnextcheb(y, -5.75419501008210370398E-5, &b0, &b1, &b2, _state);
        bessel_besselmnextcheb(y, 1.88502885095841655729E-4, &b0, &b1, &b2, _state);
        bessel_besselmnextcheb(y, -5.76375574538582365885E-4, &b0, &b1, &b2, _state);
        bessel_besselmnextcheb(y, 1.63947561694133579842E-3, &b0, &b1, &b2, _state);
        bessel_besselmnextcheb(y, -4.32430999505057594430E-3, &b0, &b1, &b2, _state);
        bessel_besselmnextcheb(y, 1.05464603945949983183E-2, &b0, &b1, &b2, _state);
        bessel_besselmnextcheb(y, -2.37374148058994688156E-2, &b0, &b1, &b2, _state);
        bessel_besselmnextcheb(y, 4.93052842396707084878E-2, &b0, &b1, &b2, _state);
        bessel_besselmnextcheb(y, -9.49010970480476444210E-2, &b0, &b1, &b2, _state);
        bessel_besselmnextcheb(y, 1.71620901522208775349E-1, &b0, &b1, &b2, _state);
        bessel_besselmnextcheb(y, -3.04682672343198398683E-1, &b0, &b1, &b2, _state);
        bessel_besselmnextcheb(y, 6.76795274409476084995E-1, &b0, &b1, &b2, _state);
        v = 0.5*(b0-b2);
        result = ae_exp(x, _state)*v;
        return result;
    }
    z = 32.0/x-2.0;
    bessel_besselmfirstcheb(-7.23318048787475395456E-18, &b0, &b1, &b2, _state);
    bessel_besselmnextcheb(z, -4.83050448594418207126E-18, &b0, &b1, &b2, _state);
    bessel_besselmnextcheb(z, 4.46562142029675999901E-17, &b0, &b1, &b2, _state);
    bessel_besselmnextcheb(z, 3.46122286769746109310E-17, &b0, &b1, &b2, _state);
    bessel_besselmnextcheb(z, -2.82762398051658348494E-16, &b0, &b1, &b2, _state);
    bessel_besselmnextcheb(z, -3.42548561967721913462E-16, &b0, &b1, &b2, _state);
    bessel_besselmnextcheb(z, 1.77256013305652638360E-15, &b0, &b1, &b2, _state);
    bessel_besselmnextcheb(z, 3.81168066935262242075E-15, &b0, &b1, &b2, _state);
    bessel_besselmnextcheb(z, -9.55484669882830764870E-15, &b0, &b1, &b2, _state);
    bessel_besselmnextcheb(z, -4.15056934728722208663E-14, &b0, &b1, &b2, _state);
    bessel_besselmnextcheb(z, 1.54008621752140982691E-14, &b0, &b1, &b2, _state);
    bessel_besselmnextcheb(z, 3.85277838274214270114E-13, &b0, &b1, &b2, _state);
    bessel_besselmnextcheb(z, 7.18012445138366623367E-13, &b0, &b1, &b2, _state);
    bessel_besselmnextcheb(z, -1.79417853150680611778E-12, &b0, &b1, &b2, _state);
    bessel_besselmnextcheb(z, -1.32158118404477131188E-11, &b0, &b1, &b2, _state);
    bessel_besselmnextcheb(z, -3.14991652796324136454E-11, &b0, &b1, &b2, _state);
    bessel_besselmnextcheb(z, 1.18891471078464383424E-11, &b0, &b1, &b2, _state);
    bessel_besselmnextcheb(z, 4.94060238822496958910E-10, &b0, &b1, &b2, _state);
    bessel_besselmnextcheb(z, 3.39623202570838634515E-9, &b0, &b1, &b2, _state);
    bessel_besselmnextcheb(z, 2.26666899049817806459E-8, &b0, &b1, &b2, _state);
    bessel_besselmnextcheb(z, 2.04891858946906374183E-7, &b0, &b1, &b2, _state);
    bessel_besselmnextcheb(z, 2.89137052083475648297E-6, &b0, &b1, &b2, _state);
    bessel_besselmnextcheb(z, 6.88975834691682398426E-5, &b0, &b1, &b2, _state);
    bessel_besselmnextcheb(z, 3.36911647825569408990E-3, &b0, &b1, &b2, _state);
    bessel_besselmnextcheb(z, 8.04490411014108831608E-1, &b0, &b1, &b2, _state);
    v = 0.5*(b0-b2);
    result = ae_exp(x, _state)*v/ae_sqrt(x, _state);
    return result;
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
xorps %xmm1, %xmm1
movaps %xmm0, 0x10(%rsp)
callq 0x24239
testb %al, %al
jne 0x7e1f
movaps 0x10(%rsp), %xmm0
jmp 0x7e2b
movaps 0x10(%rsp), %xmm0
xorps 0x28385(%rip), %xmm0    # 0x301b0
movsd 0x28845(%rip), %xmm1    # 0x30678
movaps %xmm0, 0x10(%rsp)
callq 0x24259
testb %al, %al
je 0x80cc
movsd 0x2863b(%rip), %xmm5    # 0x30488
movapd 0x10(%rsp), %xmm0
movapd %xmm0, %xmm1
mulsd %xmm5, %xmm1
addsd 0x2859d(%rip), %xmm1    # 0x30400
movsd 0x28eed(%rip), %xmm2    # 0x30d58
movapd %xmm1, %xmm3
mulsd %xmm2, %xmm3
movsd 0x28ee5(%rip), %xmm4    # 0x30d60
subsd %xmm3, %xmm4
movapd %xmm1, %xmm3
mulsd %xmm4, %xmm3
addsd %xmm2, %xmm3
addsd 0x28ed5(%rip), %xmm3    # 0x30d68
movapd %xmm1, %xmm2
mulsd %xmm3, %xmm2
subsd %xmm4, %xmm2
addsd 0x28ec9(%rip), %xmm2    # 0x30d70
movapd %xmm1, %xmm4
mulsd %xmm2, %xmm4
subsd %xmm3, %xmm4
addsd 0x28ebd(%rip), %xmm4    # 0x30d78
movapd %xmm1, %xmm3
mulsd %xmm4, %xmm3
subsd %xmm2, %xmm3
addsd 0x28eb1(%rip), %xmm3    # 0x30d80
movapd %xmm1, %xmm2
mulsd %xmm3, %xmm2
subsd %xmm4, %xmm2
addsd 0x28ea5(%rip), %xmm2    # 0x30d88
movapd %xmm1, %xmm4
mulsd %xmm2, %xmm4
subsd %xmm3, %xmm4
addsd 0x28e99(%rip), %xmm4    # 0x30d90
movapd %xmm1, %xmm3
mulsd %xmm4, %xmm3
subsd %xmm2, %xmm3
addsd 0x28e8d(%rip), %xmm3    # 0x30d98
movapd %xmm1, %xmm2
mulsd %xmm3, %xmm2
subsd %xmm4, %xmm2
addsd 0x28e81(%rip), %xmm2    # 0x30da0
movapd %xmm1, %xmm4
mulsd %xmm2, %xmm4
subsd %xmm3, %xmm4
addsd 0x28e75(%rip), %xmm4    # 0x30da8
movapd %xmm1, %xmm3
mulsd %xmm4, %xmm3
subsd %xmm2, %xmm3
addsd 0x28e69(%rip), %xmm3    # 0x30db0
movapd %xmm1, %xmm2
mulsd %xmm3, %xmm2
subsd %xmm4, %xmm2
addsd 0x28e5d(%rip), %xmm2    # 0x30db8
movapd %xmm1, %xmm4
mulsd %xmm2, %xmm4
subsd %xmm3, %xmm4
addsd 0x28e51(%rip), %xmm4    # 0x30dc0
movapd %xmm1, %xmm3
mulsd %xmm4, %xmm3
subsd %xmm2, %xmm3
addsd 0x28e45(%rip), %xmm3    # 0x30dc8
movapd %xmm1, %xmm2
mulsd %xmm3, %xmm2
subsd %xmm4, %xmm2
addsd 0x28e39(%rip), %xmm2    # 0x30dd0
movapd %xmm1, %xmm4
mulsd %xmm2, %xmm4
subsd %xmm3, %xmm4
addsd 0x28e2d(%rip), %xmm4    # 0x30dd8
movapd %xmm1, %xmm3
mulsd %xmm4, %xmm3
subsd %xmm2, %xmm3
addsd 0x28e21(%rip), %xmm3    # 0x30de0
movapd %xmm1, %xmm2
mulsd %xmm3, %xmm2
subsd %xmm4, %xmm2
addsd 0x28e15(%rip), %xmm2    # 0x30de8
movapd %xmm1, %xmm4
mulsd %xmm2, %xmm4
subsd %xmm3, %xmm4
addsd 0x28e09(%rip), %xmm4    # 0x30df0
movapd %xmm1, %xmm3
mulsd %xmm4, %xmm3
subsd %xmm2, %xmm3
addsd 0x28dfd(%rip), %xmm3    # 0x30df8
movapd %xmm1, %xmm2
mulsd %xmm3, %xmm2
subsd %xmm4, %xmm2
addsd 0x28df1(%rip), %xmm2    # 0x30e00
movapd %xmm1, %xmm4
mulsd %xmm2, %xmm4
subsd %xmm3, %xmm4
addsd 0x28de5(%rip), %xmm4    # 0x30e08
movapd %xmm1, %xmm3
mulsd %xmm4, %xmm3
subsd %xmm2, %xmm3
addsd 0x28dd9(%rip), %xmm3    # 0x30e10
movapd %xmm1, %xmm2
mulsd %xmm3, %xmm2
subsd %xmm4, %xmm2
addsd 0x28dcd(%rip), %xmm2    # 0x30e18
movapd %xmm1, %xmm4
mulsd %xmm2, %xmm4
subsd %xmm3, %xmm4
addsd 0x28dc1(%rip), %xmm4    # 0x30e20
movapd %xmm1, %xmm3
mulsd %xmm4, %xmm3
subsd %xmm2, %xmm3
addsd 0x28db5(%rip), %xmm3    # 0x30e28
movapd %xmm1, %xmm2
mulsd %xmm3, %xmm2
subsd %xmm4, %xmm2
addsd 0x28da9(%rip), %xmm2    # 0x30e30
movapd %xmm1, %xmm4
mulsd %xmm2, %xmm4
subsd %xmm3, %xmm4
addsd 0x28d9d(%rip), %xmm4    # 0x30e38
mulsd %xmm1, %xmm4
subsd %xmm2, %xmm4
addsd 0x28d95(%rip), %xmm4    # 0x30e40
subsd %xmm2, %xmm4
mulsd %xmm5, %xmm4
movsd %xmm4, 0x8(%rsp)
movq %rbx, %rdi
callq 0x24569
mulsd 0x8(%rsp), %xmm0
jmp 0x8310
movsd 0x28bb4(%rip), %xmm4    # 0x30c88
movapd 0x10(%rsp), %xmm1
divsd %xmm1, %xmm4
movapd %xmm1, %xmm0
addsd 0x28316(%rip), %xmm4    # 0x30400
movsd 0x28b9e(%rip), %xmm1    # 0x30c90
movapd %xmm4, %xmm2
mulsd %xmm1, %xmm2
movsd 0x28b96(%rip), %xmm3    # 0x30c98
subsd %xmm2, %xmm3
movapd %xmm4, %xmm2
mulsd %xmm3, %xmm2
addsd %xmm1, %xmm2
addsd 0x28b86(%rip), %xmm2    # 0x30ca0
movapd %xmm4, %xmm1
mulsd %xmm2, %xmm1
subsd %xmm3, %xmm1
addsd 0x28b7a(%rip), %xmm1    # 0x30ca8
movapd %xmm4, %xmm3
mulsd %xmm1, %xmm3
subsd %xmm2, %xmm3
addsd 0x28b6e(%rip), %xmm3    # 0x30cb0
movapd %xmm4, %xmm2
mulsd %xmm3, %xmm2
subsd %xmm1, %xmm2
addsd 0x28b62(%rip), %xmm2    # 0x30cb8
movapd %xmm4, %xmm1
mulsd %xmm2, %xmm1
subsd %xmm3, %xmm1
addsd 0x28b56(%rip), %xmm1    # 0x30cc0
movapd %xmm4, %xmm3
mulsd %xmm1, %xmm3
subsd %xmm2, %xmm3
addsd 0x28b4a(%rip), %xmm3    # 0x30cc8
movapd %xmm4, %xmm2
mulsd %xmm3, %xmm2
subsd %xmm1, %xmm2
addsd 0x28b3e(%rip), %xmm2    # 0x30cd0
movapd %xmm4, %xmm1
mulsd %xmm2, %xmm1
subsd %xmm3, %xmm1
addsd 0x28b32(%rip), %xmm1    # 0x30cd8
movapd %xmm4, %xmm3
mulsd %xmm1, %xmm3
subsd %xmm2, %xmm3
addsd 0x28b26(%rip), %xmm3    # 0x30ce0
movapd %xmm4, %xmm2
mulsd %xmm3, %xmm2
subsd %xmm1, %xmm2
addsd 0x28b1a(%rip), %xmm2    # 0x30ce8
movapd %xmm4, %xmm1
mulsd %xmm2, %xmm1
subsd %xmm3, %xmm1
addsd 0x28b0e(%rip), %xmm1    # 0x30cf0
movapd %xmm4, %xmm3
mulsd %xmm1, %xmm3
subsd %xmm2, %xmm3
addsd 0x28b02(%rip), %xmm3    # 0x30cf8
movapd %xmm4, %xmm2
mulsd %xmm3, %xmm2
subsd %xmm1, %xmm2
addsd 0x28af6(%rip), %xmm2    # 0x30d00
movapd %xmm4, %xmm1
mulsd %xmm2, %xmm1
subsd %xmm3, %xmm1
addsd 0x28aea(%rip), %xmm1    # 0x30d08
movapd %xmm4, %xmm3
mulsd %xmm1, %xmm3
subsd %xmm2, %xmm3
addsd 0x28ade(%rip), %xmm3    # 0x30d10
movapd %xmm4, %xmm2
mulsd %xmm3, %xmm2
subsd %xmm1, %xmm2
addsd 0x28ad2(%rip), %xmm2    # 0x30d18
movapd %xmm4, %xmm1
mulsd %xmm2, %xmm1
subsd %xmm3, %xmm1
addsd 0x28ac6(%rip), %xmm1    # 0x30d20
movapd %xmm4, %xmm3
mulsd %xmm1, %xmm3
subsd %xmm2, %xmm3
addsd 0x28aba(%rip), %xmm3    # 0x30d28
movapd %xmm4, %xmm2
mulsd %xmm3, %xmm2
subsd %xmm1, %xmm2
addsd 0x28aae(%rip), %xmm2    # 0x30d30
movapd %xmm4, %xmm1
mulsd %xmm2, %xmm1
subsd %xmm3, %xmm1
addsd 0x28aa2(%rip), %xmm1    # 0x30d38
movapd %xmm4, %xmm3
mulsd %xmm1, %xmm3
subsd %xmm2, %xmm3
addsd 0x28a96(%rip), %xmm3    # 0x30d40
movapd %xmm4, %xmm2
mulsd %xmm3, %xmm2
subsd %xmm1, %xmm2
addsd 0x28a8a(%rip), %xmm2    # 0x30d48
mulsd %xmm4, %xmm2
subsd %xmm3, %xmm2
addsd 0x28a82(%rip), %xmm2    # 0x30d50
subsd %xmm3, %xmm2
mulsd 0x281ae(%rip), %xmm2    # 0x30488
movsd %xmm2, 0x8(%rsp)
movq %rbx, %rdi
callq 0x24569
mulsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movapd 0x10(%rsp), %xmm0
movq %rbx, %rdi
callq 0x24424
movsd 0x8(%rsp), %xmm1
divsd %xmm0, %xmm1
movapd %xmm1, %xmm0
addq $0x20, %rsp
popq %rbx
retq