// File: /workspace/github_cpp_makefile_star2_O3/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 0x25bb9
testb %al, %al
jne 0x8557
movaps 0x10(%rsp), %xmm0
jmp 0x8563
movaps 0x10(%rsp), %xmm0
xorps 0x2ac4d(%rip), %xmm0    # 0x331b0
movsd 0x2b10d(%rip), %xmm1    # 0x33678
movaps %xmm0, 0x10(%rsp)
callq 0x25bd9
testb %al, %al
je 0x8804
movsd 0x2af03(%rip), %xmm5    # 0x33488
movapd 0x10(%rsp), %xmm0
movapd %xmm0, %xmm1
mulsd %xmm5, %xmm1
addsd 0x2ae75(%rip), %xmm1    # 0x33410
movsd 0x2b7b5(%rip), %xmm2    # 0x33d58
movapd %xmm1, %xmm3
mulsd %xmm2, %xmm3
movsd 0x2b7ad(%rip), %xmm4    # 0x33d60
subsd %xmm3, %xmm4
movapd %xmm1, %xmm3
mulsd %xmm4, %xmm3
addsd %xmm2, %xmm3
addsd 0x2b79d(%rip), %xmm3    # 0x33d68
movapd %xmm1, %xmm2
mulsd %xmm3, %xmm2
subsd %xmm4, %xmm2
addsd 0x2b791(%rip), %xmm2    # 0x33d70
movapd %xmm1, %xmm4
mulsd %xmm2, %xmm4
subsd %xmm3, %xmm4
addsd 0x2b785(%rip), %xmm4    # 0x33d78
movapd %xmm1, %xmm3
mulsd %xmm4, %xmm3
subsd %xmm2, %xmm3
addsd 0x2b779(%rip), %xmm3    # 0x33d80
movapd %xmm1, %xmm2
mulsd %xmm3, %xmm2
subsd %xmm4, %xmm2
addsd 0x2b76d(%rip), %xmm2    # 0x33d88
movapd %xmm1, %xmm4
mulsd %xmm2, %xmm4
subsd %xmm3, %xmm4
addsd 0x2b761(%rip), %xmm4    # 0x33d90
movapd %xmm1, %xmm3
mulsd %xmm4, %xmm3
subsd %xmm2, %xmm3
addsd 0x2b755(%rip), %xmm3    # 0x33d98
movapd %xmm1, %xmm2
mulsd %xmm3, %xmm2
subsd %xmm4, %xmm2
addsd 0x2b749(%rip), %xmm2    # 0x33da0
movapd %xmm1, %xmm4
mulsd %xmm2, %xmm4
subsd %xmm3, %xmm4
addsd 0x2b73d(%rip), %xmm4    # 0x33da8
movapd %xmm1, %xmm3
mulsd %xmm4, %xmm3
subsd %xmm2, %xmm3
addsd 0x2b731(%rip), %xmm3    # 0x33db0
movapd %xmm1, %xmm2
mulsd %xmm3, %xmm2
subsd %xmm4, %xmm2
addsd 0x2b725(%rip), %xmm2    # 0x33db8
movapd %xmm1, %xmm4
mulsd %xmm2, %xmm4
subsd %xmm3, %xmm4
addsd 0x2b719(%rip), %xmm4    # 0x33dc0
movapd %xmm1, %xmm3
mulsd %xmm4, %xmm3
subsd %xmm2, %xmm3
addsd 0x2b70d(%rip), %xmm3    # 0x33dc8
movapd %xmm1, %xmm2
mulsd %xmm3, %xmm2
subsd %xmm4, %xmm2
addsd 0x2b701(%rip), %xmm2    # 0x33dd0
movapd %xmm1, %xmm4
mulsd %xmm2, %xmm4
subsd %xmm3, %xmm4
addsd 0x2b6f5(%rip), %xmm4    # 0x33dd8
movapd %xmm1, %xmm3
mulsd %xmm4, %xmm3
subsd %xmm2, %xmm3
addsd 0x2b6e9(%rip), %xmm3    # 0x33de0
movapd %xmm1, %xmm2
mulsd %xmm3, %xmm2
subsd %xmm4, %xmm2
addsd 0x2b6dd(%rip), %xmm2    # 0x33de8
movapd %xmm1, %xmm4
mulsd %xmm2, %xmm4
subsd %xmm3, %xmm4
addsd 0x2b6d1(%rip), %xmm4    # 0x33df0
movapd %xmm1, %xmm3
mulsd %xmm4, %xmm3
subsd %xmm2, %xmm3
addsd 0x2b6c5(%rip), %xmm3    # 0x33df8
movapd %xmm1, %xmm2
mulsd %xmm3, %xmm2
subsd %xmm4, %xmm2
addsd 0x2b6b9(%rip), %xmm2    # 0x33e00
movapd %xmm1, %xmm4
mulsd %xmm2, %xmm4
subsd %xmm3, %xmm4
addsd 0x2b6ad(%rip), %xmm4    # 0x33e08
movapd %xmm1, %xmm3
mulsd %xmm4, %xmm3
subsd %xmm2, %xmm3
addsd 0x2b6a1(%rip), %xmm3    # 0x33e10
movapd %xmm1, %xmm2
mulsd %xmm3, %xmm2
subsd %xmm4, %xmm2
addsd 0x2b695(%rip), %xmm2    # 0x33e18
movapd %xmm1, %xmm4
mulsd %xmm2, %xmm4
subsd %xmm3, %xmm4
addsd 0x2b689(%rip), %xmm4    # 0x33e20
movapd %xmm1, %xmm3
mulsd %xmm4, %xmm3
subsd %xmm2, %xmm3
addsd 0x2b67d(%rip), %xmm3    # 0x33e28
movapd %xmm1, %xmm2
mulsd %xmm3, %xmm2
subsd %xmm4, %xmm2
addsd 0x2b671(%rip), %xmm2    # 0x33e30
movapd %xmm1, %xmm4
mulsd %xmm2, %xmm4
subsd %xmm3, %xmm4
addsd 0x2b665(%rip), %xmm4    # 0x33e38
mulsd %xmm1, %xmm4
subsd %xmm2, %xmm4
addsd 0x2b65d(%rip), %xmm4    # 0x33e40
subsd %xmm2, %xmm4
mulsd %xmm5, %xmm4
movsd %xmm4, 0x8(%rsp)
movq %rbx, %rdi
callq 0x25f9b
mulsd 0x8(%rsp), %xmm0
jmp 0x8a48
movsd 0x2b47c(%rip), %xmm4    # 0x33c88
movapd 0x10(%rsp), %xmm1
divsd %xmm1, %xmm4
movapd %xmm1, %xmm0
addsd 0x2abee(%rip), %xmm4    # 0x33410
movsd 0x2b466(%rip), %xmm1    # 0x33c90
movapd %xmm4, %xmm2
mulsd %xmm1, %xmm2
movsd 0x2b45e(%rip), %xmm3    # 0x33c98
subsd %xmm2, %xmm3
movapd %xmm4, %xmm2
mulsd %xmm3, %xmm2
addsd %xmm1, %xmm2
addsd 0x2b44e(%rip), %xmm2    # 0x33ca0
movapd %xmm4, %xmm1
mulsd %xmm2, %xmm1
subsd %xmm3, %xmm1
addsd 0x2b442(%rip), %xmm1    # 0x33ca8
movapd %xmm4, %xmm3
mulsd %xmm1, %xmm3
subsd %xmm2, %xmm3
addsd 0x2b436(%rip), %xmm3    # 0x33cb0
movapd %xmm4, %xmm2
mulsd %xmm3, %xmm2
subsd %xmm1, %xmm2
addsd 0x2b42a(%rip), %xmm2    # 0x33cb8
movapd %xmm4, %xmm1
mulsd %xmm2, %xmm1
subsd %xmm3, %xmm1
addsd 0x2b41e(%rip), %xmm1    # 0x33cc0
movapd %xmm4, %xmm3
mulsd %xmm1, %xmm3
subsd %xmm2, %xmm3
addsd 0x2b412(%rip), %xmm3    # 0x33cc8
movapd %xmm4, %xmm2
mulsd %xmm3, %xmm2
subsd %xmm1, %xmm2
addsd 0x2b406(%rip), %xmm2    # 0x33cd0
movapd %xmm4, %xmm1
mulsd %xmm2, %xmm1
subsd %xmm3, %xmm1
addsd 0x2b3fa(%rip), %xmm1    # 0x33cd8
movapd %xmm4, %xmm3
mulsd %xmm1, %xmm3
subsd %xmm2, %xmm3
addsd 0x2b3ee(%rip), %xmm3    # 0x33ce0
movapd %xmm4, %xmm2
mulsd %xmm3, %xmm2
subsd %xmm1, %xmm2
addsd 0x2b3e2(%rip), %xmm2    # 0x33ce8
movapd %xmm4, %xmm1
mulsd %xmm2, %xmm1
subsd %xmm3, %xmm1
addsd 0x2b3d6(%rip), %xmm1    # 0x33cf0
movapd %xmm4, %xmm3
mulsd %xmm1, %xmm3
subsd %xmm2, %xmm3
addsd 0x2b3ca(%rip), %xmm3    # 0x33cf8
movapd %xmm4, %xmm2
mulsd %xmm3, %xmm2
subsd %xmm1, %xmm2
addsd 0x2b3be(%rip), %xmm2    # 0x33d00
movapd %xmm4, %xmm1
mulsd %xmm2, %xmm1
subsd %xmm3, %xmm1
addsd 0x2b3b2(%rip), %xmm1    # 0x33d08
movapd %xmm4, %xmm3
mulsd %xmm1, %xmm3
subsd %xmm2, %xmm3
addsd 0x2b3a6(%rip), %xmm3    # 0x33d10
movapd %xmm4, %xmm2
mulsd %xmm3, %xmm2
subsd %xmm1, %xmm2
addsd 0x2b39a(%rip), %xmm2    # 0x33d18
movapd %xmm4, %xmm1
mulsd %xmm2, %xmm1
subsd %xmm3, %xmm1
addsd 0x2b38e(%rip), %xmm1    # 0x33d20
movapd %xmm4, %xmm3
mulsd %xmm1, %xmm3
subsd %xmm2, %xmm3
addsd 0x2b382(%rip), %xmm3    # 0x33d28
movapd %xmm4, %xmm2
mulsd %xmm3, %xmm2
subsd %xmm1, %xmm2
addsd 0x2b376(%rip), %xmm2    # 0x33d30
movapd %xmm4, %xmm1
mulsd %xmm2, %xmm1
subsd %xmm3, %xmm1
addsd 0x2b36a(%rip), %xmm1    # 0x33d38
movapd %xmm4, %xmm3
mulsd %xmm1, %xmm3
subsd %xmm2, %xmm3
addsd 0x2b35e(%rip), %xmm3    # 0x33d40
movapd %xmm4, %xmm2
mulsd %xmm3, %xmm2
subsd %xmm1, %xmm2
addsd 0x2b352(%rip), %xmm2    # 0x33d48
mulsd %xmm4, %xmm2
subsd %xmm3, %xmm2
addsd 0x2b34a(%rip), %xmm2    # 0x33d50
subsd %xmm3, %xmm2
mulsd 0x2aa76(%rip), %xmm2    # 0x33488
movsd %xmm2, 0x8(%rsp)
movq %rbx, %rdi
callq 0x25f9b
mulsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movapd 0x10(%rsp), %xmm0
movq %rbx, %rdi
callq 0x25e48
movsd 0x8(%rsp), %xmm1
divsd %xmm0, %xmm1
movapd %xmm1, %xmm0
addq $0x20, %rsp
popq %rbx
retq