// File: /workspace/github_cpp_makefile_star2_O3/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 0x25bb9
testb %al, %al
je 0x5611
movapd (%rsp), %xmm0
xorpd 0x2dbb5(%rip), %xmm0    # 0x331b0
movq %rbx, %rdi
callq 0x55d6
movapd %xmm0, %xmm1
movsd 0x2ddf1(%rip), %xmm0    # 0x33400
jmp 0x563f
movsd 0x2de6f(%rip), %xmm1    # 0x33488
movaps (%rsp), %xmm0
callq 0x25bb9
testb %al, %al
je 0x5649
movapd (%rsp), %xmm0
movq %rbx, %rdi
callq 0x53c7
movapd %xmm0, %xmm1
movsd 0x2dba1(%rip), %xmm0    # 0x331e0
subsd %xmm1, %xmm0
addq $0x20, %rsp
popq %rbx
retq
movsd 0x2df1f(%rip), %xmm1    # 0x33570
movapd (%rsp), %xmm0
callq 0x25c15
xorpd %xmm0, %xmm0
testb %al, %al
jne 0x5643
xorpd %xmm1, %xmm1
movapd (%rsp), %xmm0
mulsd %xmm0, %xmm1
addsd 0x2df60(%rip), %xmm1    # 0x335d8
mulsd %xmm0, %xmm1
addsd 0x2df5c(%rip), %xmm1    # 0x335e0
mulsd %xmm0, %xmm1
addsd 0x2df58(%rip), %xmm1    # 0x335e8
mulsd %xmm0, %xmm1
addsd 0x2df54(%rip), %xmm1    # 0x335f0
mulsd %xmm0, %xmm1
addsd 0x2df50(%rip), %xmm1    # 0x335f8
mulsd %xmm0, %xmm1
addsd 0x2df4c(%rip), %xmm1    # 0x33600
mulsd %xmm0, %xmm1
addsd 0x2df48(%rip), %xmm1    # 0x33608
movapd %xmm1, %xmm2
movsd 0x2df4c(%rip), %xmm3    # 0x33618
addsd %xmm0, %xmm3
mulsd %xmm0, %xmm3
addsd 0x2df44(%rip), %xmm3    # 0x33620
mulsd %xmm0, %xmm2
mulsd %xmm0, %xmm3
addsd 0x2df3c(%rip), %xmm3    # 0x33628
movsd 0x2df1c(%rip), %xmm1    # 0x33610
mulsd %xmm0, %xmm3
addsd 0x2df30(%rip), %xmm3    # 0x33630
addsd %xmm1, %xmm2
movsd %xmm2, 0x18(%rsp)
mulsd %xmm0, %xmm3
addsd 0x2df22(%rip), %xmm3    # 0x33638
mulsd %xmm0, %xmm3
addsd 0x2df1e(%rip), %xmm3    # 0x33640
mulsd %xmm0, %xmm3
addsd 0x2df1a(%rip), %xmm3    # 0x33648
mulsd %xmm0, %xmm3
addsd %xmm1, %xmm3
movsd %xmm3, 0x10(%rsp)
movq %rbx, %rdi
callq 0x25e43
xorpd 0x2da64(%rip), %xmm0    # 0x331b0
movq %rbx, %rdi
callq 0x25f9b
mulsd 0x18(%rsp), %xmm0
divsd 0x10(%rsp), %xmm0
jmp 0x5643