// File: /workspace/github_cpp_makefile_star2_O1/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 0x262fe
testb %al, %al
jne 0x86cb
movaps 0x10(%rsp), %xmm0
jmp 0x86d7
movaps 0x10(%rsp), %xmm0
xorps 0x2bb09(%rip), %xmm0    # 0x341e0
movsd 0x2bf71(%rip), %xmm1    # 0x34650
movaps %xmm0, 0x10(%rsp)
callq 0x2631e
testb %al, %al
je 0x8978
movsd 0x2bd6f(%rip), %xmm5    # 0x34468
movapd 0x10(%rsp), %xmm0
movapd %xmm0, %xmm1
mulsd %xmm5, %xmm1
addsd 0x2bce1(%rip), %xmm1    # 0x343f0
movsd 0x2c849(%rip), %xmm2    # 0x34f60
movapd %xmm1, %xmm3
mulsd %xmm2, %xmm3
movsd 0x2c841(%rip), %xmm4    # 0x34f68
subsd %xmm3, %xmm4
movapd %xmm1, %xmm3
mulsd %xmm4, %xmm3
addsd %xmm2, %xmm3
addsd 0x2c831(%rip), %xmm3    # 0x34f70
movapd %xmm1, %xmm2
mulsd %xmm3, %xmm2
subsd %xmm4, %xmm2
addsd 0x2c825(%rip), %xmm2    # 0x34f78
movapd %xmm1, %xmm4
mulsd %xmm2, %xmm4
subsd %xmm3, %xmm4
addsd 0x2c819(%rip), %xmm4    # 0x34f80
movapd %xmm1, %xmm3
mulsd %xmm4, %xmm3
subsd %xmm2, %xmm3
addsd 0x2c80d(%rip), %xmm3    # 0x34f88
movapd %xmm1, %xmm2
mulsd %xmm3, %xmm2
subsd %xmm4, %xmm2
addsd 0x2c801(%rip), %xmm2    # 0x34f90
movapd %xmm1, %xmm4
mulsd %xmm2, %xmm4
subsd %xmm3, %xmm4
addsd 0x2c7f5(%rip), %xmm4    # 0x34f98
movapd %xmm1, %xmm3
mulsd %xmm4, %xmm3
subsd %xmm2, %xmm3
addsd 0x2c7e9(%rip), %xmm3    # 0x34fa0
movapd %xmm1, %xmm2
mulsd %xmm3, %xmm2
subsd %xmm4, %xmm2
addsd 0x2c7dd(%rip), %xmm2    # 0x34fa8
movapd %xmm1, %xmm4
mulsd %xmm2, %xmm4
subsd %xmm3, %xmm4
addsd 0x2c7d1(%rip), %xmm4    # 0x34fb0
movapd %xmm1, %xmm3
mulsd %xmm4, %xmm3
subsd %xmm2, %xmm3
addsd 0x2c7c5(%rip), %xmm3    # 0x34fb8
movapd %xmm1, %xmm2
mulsd %xmm3, %xmm2
subsd %xmm4, %xmm2
addsd 0x2c7b9(%rip), %xmm2    # 0x34fc0
movapd %xmm1, %xmm4
mulsd %xmm2, %xmm4
subsd %xmm3, %xmm4
addsd 0x2c7ad(%rip), %xmm4    # 0x34fc8
movapd %xmm1, %xmm3
mulsd %xmm4, %xmm3
subsd %xmm2, %xmm3
addsd 0x2c7a1(%rip), %xmm3    # 0x34fd0
movapd %xmm1, %xmm2
mulsd %xmm3, %xmm2
subsd %xmm4, %xmm2
addsd 0x2c795(%rip), %xmm2    # 0x34fd8
movapd %xmm1, %xmm4
mulsd %xmm2, %xmm4
subsd %xmm3, %xmm4
addsd 0x2c789(%rip), %xmm4    # 0x34fe0
movapd %xmm1, %xmm3
mulsd %xmm4, %xmm3
subsd %xmm2, %xmm3
addsd 0x2c77d(%rip), %xmm3    # 0x34fe8
movapd %xmm1, %xmm2
mulsd %xmm3, %xmm2
subsd %xmm4, %xmm2
addsd 0x2c771(%rip), %xmm2    # 0x34ff0
movapd %xmm1, %xmm4
mulsd %xmm2, %xmm4
subsd %xmm3, %xmm4
addsd 0x2c765(%rip), %xmm4    # 0x34ff8
movapd %xmm1, %xmm3
mulsd %xmm4, %xmm3
subsd %xmm2, %xmm3
addsd 0x2c759(%rip), %xmm3    # 0x35000
movapd %xmm1, %xmm2
mulsd %xmm3, %xmm2
subsd %xmm4, %xmm2
addsd 0x2c74d(%rip), %xmm2    # 0x35008
movapd %xmm1, %xmm4
mulsd %xmm2, %xmm4
subsd %xmm3, %xmm4
addsd 0x2c741(%rip), %xmm4    # 0x35010
movapd %xmm1, %xmm3
mulsd %xmm4, %xmm3
subsd %xmm2, %xmm3
addsd 0x2c735(%rip), %xmm3    # 0x35018
movapd %xmm1, %xmm2
mulsd %xmm3, %xmm2
subsd %xmm4, %xmm2
addsd 0x2c729(%rip), %xmm2    # 0x35020
movapd %xmm1, %xmm4
mulsd %xmm2, %xmm4
subsd %xmm3, %xmm4
addsd 0x2c71d(%rip), %xmm4    # 0x35028
movapd %xmm1, %xmm3
mulsd %xmm4, %xmm3
subsd %xmm2, %xmm3
addsd 0x2c711(%rip), %xmm3    # 0x35030
movapd %xmm1, %xmm2
mulsd %xmm3, %xmm2
subsd %xmm4, %xmm2
addsd 0x2c705(%rip), %xmm2    # 0x35038
movapd %xmm1, %xmm4
mulsd %xmm2, %xmm4
subsd %xmm3, %xmm4
addsd 0x2c6f9(%rip), %xmm4    # 0x35040
mulsd %xmm1, %xmm4
subsd %xmm2, %xmm4
addsd 0x2c6f1(%rip), %xmm4    # 0x35048
subsd %xmm2, %xmm4
mulsd %xmm5, %xmm4
movsd %xmm4, 0x8(%rsp)
movq %rbx, %rdi
callq 0x266e0
mulsd 0x8(%rsp), %xmm0
jmp 0x8bbc
movsd 0x2c510(%rip), %xmm4    # 0x34e90
movapd 0x10(%rsp), %xmm1
divsd %xmm1, %xmm4
movapd %xmm1, %xmm0
addsd 0x2ba5a(%rip), %xmm4    # 0x343f0
movsd 0x2c4fa(%rip), %xmm1    # 0x34e98
movapd %xmm4, %xmm2
mulsd %xmm1, %xmm2
movsd 0x2c4f2(%rip), %xmm3    # 0x34ea0
subsd %xmm2, %xmm3
movapd %xmm4, %xmm2
mulsd %xmm3, %xmm2
addsd %xmm1, %xmm2
addsd 0x2c4e2(%rip), %xmm2    # 0x34ea8
movapd %xmm4, %xmm1
mulsd %xmm2, %xmm1
subsd %xmm3, %xmm1
addsd 0x2c4d6(%rip), %xmm1    # 0x34eb0
movapd %xmm4, %xmm3
mulsd %xmm1, %xmm3
subsd %xmm2, %xmm3
addsd 0x2c4ca(%rip), %xmm3    # 0x34eb8
movapd %xmm4, %xmm2
mulsd %xmm3, %xmm2
subsd %xmm1, %xmm2
addsd 0x2c4be(%rip), %xmm2    # 0x34ec0
movapd %xmm4, %xmm1
mulsd %xmm2, %xmm1
subsd %xmm3, %xmm1
addsd 0x2c4b2(%rip), %xmm1    # 0x34ec8
movapd %xmm4, %xmm3
mulsd %xmm1, %xmm3
subsd %xmm2, %xmm3
addsd 0x2c4a6(%rip), %xmm3    # 0x34ed0
movapd %xmm4, %xmm2
mulsd %xmm3, %xmm2
subsd %xmm1, %xmm2
addsd 0x2c49a(%rip), %xmm2    # 0x34ed8
movapd %xmm4, %xmm1
mulsd %xmm2, %xmm1
subsd %xmm3, %xmm1
addsd 0x2c48e(%rip), %xmm1    # 0x34ee0
movapd %xmm4, %xmm3
mulsd %xmm1, %xmm3
subsd %xmm2, %xmm3
addsd 0x2c482(%rip), %xmm3    # 0x34ee8
movapd %xmm4, %xmm2
mulsd %xmm3, %xmm2
subsd %xmm1, %xmm2
addsd 0x2c476(%rip), %xmm2    # 0x34ef0
movapd %xmm4, %xmm1
mulsd %xmm2, %xmm1
subsd %xmm3, %xmm1
addsd 0x2c46a(%rip), %xmm1    # 0x34ef8
movapd %xmm4, %xmm3
mulsd %xmm1, %xmm3
subsd %xmm2, %xmm3
addsd 0x2c45e(%rip), %xmm3    # 0x34f00
movapd %xmm4, %xmm2
mulsd %xmm3, %xmm2
subsd %xmm1, %xmm2
addsd 0x2c452(%rip), %xmm2    # 0x34f08
movapd %xmm4, %xmm1
mulsd %xmm2, %xmm1
subsd %xmm3, %xmm1
addsd 0x2c446(%rip), %xmm1    # 0x34f10
movapd %xmm4, %xmm3
mulsd %xmm1, %xmm3
subsd %xmm2, %xmm3
addsd 0x2c43a(%rip), %xmm3    # 0x34f18
movapd %xmm4, %xmm2
mulsd %xmm3, %xmm2
subsd %xmm1, %xmm2
addsd 0x2c42e(%rip), %xmm2    # 0x34f20
movapd %xmm4, %xmm1
mulsd %xmm2, %xmm1
subsd %xmm3, %xmm1
addsd 0x2c422(%rip), %xmm1    # 0x34f28
movapd %xmm4, %xmm3
mulsd %xmm1, %xmm3
subsd %xmm2, %xmm3
addsd 0x2c416(%rip), %xmm3    # 0x34f30
movapd %xmm4, %xmm2
mulsd %xmm3, %xmm2
subsd %xmm1, %xmm2
addsd 0x2c40a(%rip), %xmm2    # 0x34f38
movapd %xmm4, %xmm1
mulsd %xmm2, %xmm1
subsd %xmm3, %xmm1
addsd 0x2c3fe(%rip), %xmm1    # 0x34f40
movapd %xmm4, %xmm3
mulsd %xmm1, %xmm3
subsd %xmm2, %xmm3
addsd 0x2c3f2(%rip), %xmm3    # 0x34f48
movapd %xmm4, %xmm2
mulsd %xmm3, %xmm2
subsd %xmm1, %xmm2
addsd 0x2c3e6(%rip), %xmm2    # 0x34f50
mulsd %xmm4, %xmm2
subsd %xmm3, %xmm2
addsd 0x2c3de(%rip), %xmm2    # 0x34f58
subsd %xmm3, %xmm2
mulsd 0x2b8e2(%rip), %xmm2    # 0x34468
movsd %xmm2, 0x8(%rsp)
movq %rbx, %rdi
callq 0x266e0
mulsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movapd 0x10(%rsp), %xmm0
movq %rbx, %rdi
callq 0x2658d
movsd 0x8(%rsp), %xmm1
divsd %xmm0, %xmm1
movapd %xmm1, %xmm0
addq $0x20, %rsp
popq %rbx
retq