// File: /workspace/github_cpp_makefile_star2_O1/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 0x262fe
testb %al, %al
je 0x560a
movapd (%rsp), %xmm0
xorpd 0x2ebec(%rip), %xmm0    # 0x341e0
movq %rbx, %rdi
callq 0x55cf
movapd %xmm0, %xmm1
movsd 0x2edd8(%rip), %xmm0    # 0x343e0
jmp 0x5638
movsd 0x2ee56(%rip), %xmm1    # 0x34468
movaps (%rsp), %xmm0
callq 0x262fe
testb %al, %al
je 0x5642
movapd (%rsp), %xmm0
movq %rbx, %rdi
callq 0x53c0
movapd %xmm0, %xmm1
movsd 0x2eb68(%rip), %xmm0    # 0x341a0
subsd %xmm1, %xmm0
addq $0x20, %rsp
popq %rbx
retq
movsd 0x2eefe(%rip), %xmm1    # 0x34548
movapd (%rsp), %xmm0
callq 0x2635a
xorpd %xmm0, %xmm0
testb %al, %al
jne 0x563c
xorpd %xmm1, %xmm1
movapd (%rsp), %xmm0
mulsd %xmm0, %xmm1
addsd 0x2ef3f(%rip), %xmm1    # 0x345b0
mulsd %xmm0, %xmm1
addsd 0x2ef3b(%rip), %xmm1    # 0x345b8
mulsd %xmm0, %xmm1
addsd 0x2ef37(%rip), %xmm1    # 0x345c0
mulsd %xmm0, %xmm1
addsd 0x2ef33(%rip), %xmm1    # 0x345c8
mulsd %xmm0, %xmm1
addsd 0x2ef2f(%rip), %xmm1    # 0x345d0
mulsd %xmm0, %xmm1
addsd 0x2ef2b(%rip), %xmm1    # 0x345d8
mulsd %xmm0, %xmm1
addsd 0x2ef27(%rip), %xmm1    # 0x345e0
movapd %xmm1, %xmm2
movsd 0x2ef2b(%rip), %xmm3    # 0x345f0
addsd %xmm0, %xmm3
mulsd %xmm0, %xmm3
addsd 0x2ef23(%rip), %xmm3    # 0x345f8
mulsd %xmm0, %xmm2
mulsd %xmm0, %xmm3
addsd 0x2ef1b(%rip), %xmm3    # 0x34600
movsd 0x2eefb(%rip), %xmm1    # 0x345e8
mulsd %xmm0, %xmm3
addsd 0x2ef0f(%rip), %xmm3    # 0x34608
addsd %xmm1, %xmm2
movsd %xmm2, 0x18(%rsp)
mulsd %xmm0, %xmm3
addsd 0x2ef01(%rip), %xmm3    # 0x34610
mulsd %xmm0, %xmm3
addsd 0x2eefd(%rip), %xmm3    # 0x34618
mulsd %xmm0, %xmm3
addsd 0x2eef9(%rip), %xmm3    # 0x34620
mulsd %xmm0, %xmm3
addsd %xmm1, %xmm3
movsd %xmm3, 0x10(%rsp)
movq %rbx, %rdi
callq 0x26588
xorpd 0x2ea9b(%rip), %xmm0    # 0x341e0
movq %rbx, %rdi
callq 0x266e0
mulsd 0x18(%rsp), %xmm0
divsd 0x10(%rsp), %xmm0
jmp 0x563c