// File: /workspace/github_cpp_makefile_star2_O2/mouda[P]LTE_random_access-simulate/specialfunctions.cpp
// Function: alglib_impl::errorfunctionc(double, alglib_impl::ae_state*)
double errorfunctionc(double x, ae_state *_state)
{
    double p;
    double q;
    double result;


    if( ae_fp_less(x,0) )
    {
        result = 2-errorfunctionc(-x, _state);
        return result;
    }
    if( ae_fp_less(x,0.5) )
    {
        result = 1.0-errorfunction(x, _state);
        return result;
    }
    if( ae_fp_greater_eq(x,10) )
    {
        result = 0;
        return result;
    }
    p = 0.0;
    p = 0.5641877825507397413087057563+x*p;
    p = 9.675807882987265400604202961+x*p;
    p = 77.08161730368428609781633646+x*p;
    p = 368.5196154710010637133875746+x*p;
    p = 1143.262070703886173606073338+x*p;
    p = 2320.439590251635247384768711+x*p;
    p = 2898.0293292167655611275846+x*p;
    p = 1826.3348842295112592168999+x*p;
    q = 1.0;
    q = 17.14980943627607849376131193+x*q;
    q = 137.1255960500622202878443578+x*q;
    q = 661.7361207107653469211984771+x*q;
    q = 2094.384367789539593790281779+x*q;
    q = 4429.612803883682726711528526+x*q;
    q = 6089.5424232724435504633068+x*q;
    q = 4958.82756472114071495438422+x*q;
    q = 1826.3348842295112595576438+x*q;
    result = ae_exp(-ae_sqr(x, _state), _state)*p/q;
    return result;
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
xorps %xmm1, %xmm1
movaps %xmm0, (%rsp)
callq 0x24239
testb %al, %al
je 0x4ff4
movapd (%rsp), %xmm0
xorpd 0x2b1d2(%rip), %xmm0    # 0x301b0
movq %rbx, %rdi
callq 0x4fb9
movapd %xmm0, %xmm1
movsd 0x2b406(%rip), %xmm0    # 0x303f8
jmp 0x5022
movsd 0x2b48c(%rip), %xmm1    # 0x30488
movaps (%rsp), %xmm0
callq 0x24239
testb %al, %al
je 0x502c
movapd (%rsp), %xmm0
movq %rbx, %rdi
callq 0x4daf
movapd %xmm0, %xmm1
movsd 0x2b1d6(%rip), %xmm0    # 0x301f8
subsd %xmm1, %xmm0
addq $0x20, %rsp
popq %rbx
retq
movsd 0x2b53c(%rip), %xmm1    # 0x30570
movapd (%rsp), %xmm0
callq 0x24295
xorpd %xmm0, %xmm0
testb %al, %al
jne 0x5026
xorpd %xmm1, %xmm1
movapd (%rsp), %xmm0
mulsd %xmm0, %xmm1
addsd 0x2b57d(%rip), %xmm1    # 0x305d8
mulsd %xmm0, %xmm1
addsd 0x2b579(%rip), %xmm1    # 0x305e0
mulsd %xmm0, %xmm1
addsd 0x2b575(%rip), %xmm1    # 0x305e8
mulsd %xmm0, %xmm1
addsd 0x2b571(%rip), %xmm1    # 0x305f0
mulsd %xmm0, %xmm1
addsd 0x2b56d(%rip), %xmm1    # 0x305f8
mulsd %xmm0, %xmm1
addsd 0x2b569(%rip), %xmm1    # 0x30600
mulsd %xmm0, %xmm1
addsd 0x2b565(%rip), %xmm1    # 0x30608
movapd %xmm1, %xmm2
movsd 0x2b569(%rip), %xmm3    # 0x30618
addsd %xmm0, %xmm3
mulsd %xmm0, %xmm3
addsd 0x2b561(%rip), %xmm3    # 0x30620
mulsd %xmm0, %xmm2
mulsd %xmm0, %xmm3
addsd 0x2b559(%rip), %xmm3    # 0x30628
movsd 0x2b539(%rip), %xmm1    # 0x30610
mulsd %xmm0, %xmm3
addsd 0x2b54d(%rip), %xmm3    # 0x30630
addsd %xmm1, %xmm2
movsd %xmm2, 0x18(%rsp)
mulsd %xmm0, %xmm3
addsd 0x2b53f(%rip), %xmm3    # 0x30638
mulsd %xmm0, %xmm3
addsd 0x2b53b(%rip), %xmm3    # 0x30640
mulsd %xmm0, %xmm3
addsd 0x2b537(%rip), %xmm3    # 0x30648
mulsd %xmm0, %xmm3
addsd %xmm1, %xmm3
movsd %xmm3, 0x10(%rsp)
movq %rbx, %rdi
callq 0x2441f
xorpd 0x2b081(%rip), %xmm0    # 0x301b0
movq %rbx, %rdi
callq 0x24569
mulsd 0x18(%rsp), %xmm0
divsd 0x10(%rsp), %xmm0
jmp 0x5026