// File: /workspace/github_cpp_makefile_star2_O3/mouda[P]LTE_random_access-simulate/specialfunctions.cpp
// Function: alglib_impl::dawsonintegral(double, alglib_impl::ae_state*)
double dawsonintegral(double x, ae_state *_state)
{
    double x2;
    double y;
    ae_int_t sg;
    double an;
    double ad;
    double bn;
    double bd;
    double cn;
    double cd;
    double result;


    sg = 1;
    if( ae_fp_less(x,0) )
    {
        sg = -1;
        x = -x;
    }
    if( ae_fp_less(x,3.25) )
    {
        x2 = x*x;
        an = 1.13681498971755972054E-11;
        an = an*x2+8.49262267667473811108E-10;
        an = an*x2+1.94434204175553054283E-8;
        an = an*x2+9.53151741254484363489E-7;
        an = an*x2+3.07828309874913200438E-6;
        an = an*x2+3.52513368520288738649E-4;
        an = an*x2+(-8.50149846724410912031E-4);
        an = an*x2+4.22618223005546594270E-2;
        an = an*x2+(-9.17480371773452345351E-2);
        an = an*x2+9.99999999999999994612E-1;
        ad = 2.40372073066762605484E-11;
        ad = ad*x2+1.48864681368493396752E-9;
        ad = ad*x2+5.21265281010541664570E-8;
        ad = ad*x2+1.27258478273186970203E-6;
        ad = ad*x2+2.32490249820789513991E-5;
        ad = ad*x2+3.25524741826057911661E-4;
        ad = ad*x2+3.48805814657162590916E-3;
        ad = ad*x2+2.79448531198828973716E-2;
        ad = ad*x2+1.58874241960120565368E-1;
        ad = ad*x2+5.74918629489320327824E-1;
        ad = ad*x2+1.00000000000000000539E0;
        y = x*an/ad;
        result = sg*y;
        return result;
    }
    x2 = 1.0/(x*x);
    if( ae_fp_less(x,6.25) )
    {
        bn = 5.08955156417900903354E-1;
        bn = bn*x2-2.44754418142697847934E-1;
        bn = bn*x2+9.41512335303534411857E-2;
        bn = bn*x2-2.18711255142039025206E-2;
        bn = bn*x2+3.66207612329569181322E-3;
        bn = bn*x2-4.23209114460388756528E-4;
        bn = bn*x2+3.59641304793896631888E-5;
        bn = bn*x2-2.14640351719968974225E-6;
        bn = bn*x2+9.10010780076391431042E-8;
        bn = bn*x2-2.40274520828250956942E-9;
        bn = bn*x2+3.59233385440928410398E-11;
        bd = 1.00000000000000000000E0;
        bd = bd*x2-6.31839869873368190192E-1;
        bd = bd*x2+2.36706788228248691528E-1;
        bd = bd*x2-5.31806367003223277662E-2;
        bd = bd*x2+8.48041718586295374409E-3;
        bd = bd*x2-9.47996768486665330168E-4;
        bd = bd*x2+7.81025592944552338085E-5;
        bd = bd*x2-4.55875153252442634831E-6;
        bd = bd*x2+1.89100358111421846170E-7;
        bd = bd*x2-4.91324691331920606875E-9;
        bd = bd*x2+7.18466403235734541950E-11;
        y = 1.0/x+x2*bn/(bd*x);
        result = sg*0.5*y;
        return result;
    }
    if( ae_fp_greater(x,1.0E9) )
    {
        result = sg*0.5/x;
        return result;
    }
    cn = -5.90592860534773254987E-1;
    cn = cn*x2+6.29235242724368800674E-1;
    cn = cn*x2-1.72858975380388136411E-1;
    cn = cn*x2+1.64837047825189632310E-2;
    cn = cn*x2-4.86827613020462700845E-4;
    cd = 1.00000000000000000000E0;
    cd = cd*x2-2.69820057197544900361E0;
    cd = cd*x2+1.73270799045947845857E0;
    cd = cd*x2-3.93708582281939493482E-1;
    cd = cd*x2+3.44278924041233391079E-2;
    cd = cd*x2-9.73655226040941223894E-4;
    y = 1.0/x+x2*cn/(cd*x);
    result = sg*0.5*y;
    return result;
}

// Assembly:
subq $0x28, %rsp
xorps %xmm1, %xmm1
movaps %xmm0, 0x10(%rsp)
callq 0x25bb9
testb %al, %al
jne 0xd3ee
movsd 0x25dff(%rip), %xmm0    # 0x331e0
movsd %xmm0, 0x8(%rsp)
movaps 0x10(%rsp), %xmm0
jmp 0xd40b
movaps 0x10(%rsp), %xmm1
xorps 0x25db6(%rip), %xmm1    # 0x331b0
movsd 0x25e06(%rip), %xmm0    # 0x33208
movsd %xmm0, 0x8(%rsp)
movaps %xmm1, %xmm0
movaps %xmm0, 0x10(%rsp)
movsd 0x26ed8(%rip), %xmm1    # 0x342f0
callq 0x25bb9
movapd 0x10(%rsp), %xmm4
movapd %xmm4, %xmm0
mulsd %xmm4, %xmm0
testb %al, %al
je 0xd53e
movsd 0x26fc5(%rip), %xmm1    # 0x34400
mulsd %xmm0, %xmm1
addsd 0x26fc1(%rip), %xmm1    # 0x34408
mulsd %xmm0, %xmm1
addsd 0x26fbd(%rip), %xmm1    # 0x34410
mulsd %xmm0, %xmm1
addsd 0x26fb9(%rip), %xmm1    # 0x34418
mulsd %xmm0, %xmm1
addsd 0x26fb5(%rip), %xmm1    # 0x34420
mulsd %xmm0, %xmm1
addsd 0x26fb1(%rip), %xmm1    # 0x34428
mulsd %xmm0, %xmm1
addsd 0x26fad(%rip), %xmm1    # 0x34430
mulsd %xmm0, %xmm1
addsd 0x26fa9(%rip), %xmm1    # 0x34438
mulsd %xmm0, %xmm1
addsd 0x26fa5(%rip), %xmm1    # 0x34440
movsd 0x26fa5(%rip), %xmm2    # 0x34448
mulsd %xmm0, %xmm2
addsd 0x26fa1(%rip), %xmm2    # 0x34450
mulsd %xmm0, %xmm2
addsd 0x26f9d(%rip), %xmm2    # 0x34458
mulsd %xmm0, %xmm2
addsd 0x26f99(%rip), %xmm2    # 0x34460
mulsd %xmm0, %xmm2
addsd 0x26f95(%rip), %xmm2    # 0x34468
mulsd %xmm0, %xmm2
addsd 0x26f91(%rip), %xmm2    # 0x34470
mulsd %xmm0, %xmm1
mulsd %xmm0, %xmm2
addsd 0x26f89(%rip), %xmm2    # 0x34478
movsd 0x25ce9(%rip), %xmm3    # 0x331e0
mulsd %xmm0, %xmm2
addsd 0x26f7d(%rip), %xmm2    # 0x34480
addsd %xmm3, %xmm1
mulsd %xmm0, %xmm2
addsd 0x26f75(%rip), %xmm2    # 0x34488
mulsd %xmm0, %xmm2
addsd 0x26f71(%rip), %xmm2    # 0x34490
mulsd %xmm0, %xmm2
addsd %xmm3, %xmm2
mulsd %xmm1, %xmm4
divsd %xmm2, %xmm4
movsd 0x8(%rsp), %xmm0
mulsd %xmm4, %xmm0
jmp 0xd755
movsd 0x25c9a(%rip), %xmm1    # 0x331e0
divsd %xmm0, %xmm1
movsd %xmm1, 0x20(%rsp)
movsd 0x26da0(%rip), %xmm1    # 0x342f8
movapd %xmm4, %xmm0
callq 0x25bb9
testb %al, %al
je 0xd66c
movsd 0x26de7(%rip), %xmm0    # 0x34358
movsd 0x20(%rsp), %xmm2
mulsd %xmm2, %xmm0
addsd 0x26ddd(%rip), %xmm0    # 0x34360
mulsd %xmm2, %xmm0
addsd 0x26dd9(%rip), %xmm0    # 0x34368
mulsd %xmm2, %xmm0
addsd 0x26dd5(%rip), %xmm0    # 0x34370
mulsd %xmm2, %xmm0
addsd 0x26dd1(%rip), %xmm0    # 0x34378
mulsd %xmm2, %xmm0
addsd 0x26dcd(%rip), %xmm0    # 0x34380
mulsd %xmm2, %xmm0
addsd 0x26dc9(%rip), %xmm0    # 0x34388
mulsd %xmm2, %xmm0
addsd 0x26dc5(%rip), %xmm0    # 0x34390
mulsd %xmm2, %xmm0
addsd 0x26dc1(%rip), %xmm0    # 0x34398
mulsd %xmm2, %xmm0
addsd 0x26dbd(%rip), %xmm0    # 0x343a0
mulsd %xmm2, %xmm0
addsd 0x26db9(%rip), %xmm0    # 0x343a8
movsd 0x26db9(%rip), %xmm1    # 0x343b0
addsd %xmm2, %xmm1
mulsd %xmm2, %xmm1
addsd 0x26db1(%rip), %xmm1    # 0x343b8
mulsd %xmm2, %xmm1
addsd 0x26dad(%rip), %xmm1    # 0x343c0
mulsd %xmm2, %xmm1
addsd 0x26da9(%rip), %xmm1    # 0x343c8
mulsd %xmm2, %xmm1
addsd 0x26da5(%rip), %xmm1    # 0x343d0
mulsd %xmm2, %xmm1
addsd 0x26da1(%rip), %xmm1    # 0x343d8
mulsd %xmm2, %xmm1
addsd 0x26d9d(%rip), %xmm1    # 0x343e0
mulsd %xmm2, %xmm1
addsd 0x26d99(%rip), %xmm1    # 0x343e8
mulsd %xmm2, %xmm1
addsd 0x26d95(%rip), %xmm1    # 0x343f0
mulsd %xmm2, %xmm1
addsd 0x26d91(%rip), %xmm1    # 0x343f8
jmp 0xd715
movsd 0x26c8c(%rip), %xmm1    # 0x34300
movaps 0x10(%rsp), %xmm0
callq 0x25bf9
testb %al, %al
je 0xd69b
movsd 0x8(%rsp), %xmm0
mulsd 0x25df8(%rip), %xmm0    # 0x33488
divsd 0x10(%rsp), %xmm0
jmp 0xd755
movsd 0x26c65(%rip), %xmm0    # 0x34308
movsd 0x20(%rsp), %xmm2
mulsd %xmm2, %xmm0
addsd 0x26c5b(%rip), %xmm0    # 0x34310
mulsd %xmm2, %xmm0
addsd 0x26c57(%rip), %xmm0    # 0x34318
mulsd %xmm2, %xmm0
addsd 0x26c53(%rip), %xmm0    # 0x34320
mulsd %xmm2, %xmm0
addsd 0x26c4f(%rip), %xmm0    # 0x34328
movsd 0x26c4f(%rip), %xmm1    # 0x34330
addsd %xmm2, %xmm1
mulsd %xmm2, %xmm1
addsd 0x26c47(%rip), %xmm1    # 0x34338
mulsd %xmm2, %xmm1
addsd 0x26c43(%rip), %xmm1    # 0x34340
mulsd %xmm2, %xmm1
addsd 0x26c3f(%rip), %xmm1    # 0x34348
mulsd %xmm2, %xmm1
addsd 0x26c3b(%rip), %xmm1    # 0x34350
mulsd %xmm2, %xmm0
movapd 0x10(%rsp), %xmm3
mulsd %xmm3, %xmm1
movapd 0x275e5(%rip), %xmm2    # 0x34d10
unpcklpd %xmm0, %xmm2            # xmm2 = xmm2[0],xmm0[0]
unpcklpd %xmm1, %xmm3            # xmm3 = xmm3[0],xmm1[0]
divpd %xmm3, %xmm2
movapd %xmm2, %xmm1
unpckhpd %xmm2, %xmm1            # xmm1 = xmm1[1],xmm2[1]
addsd %xmm2, %xmm1
movsd 0x8(%rsp), %xmm0
mulsd 0x25d37(%rip), %xmm0    # 0x33488
mulsd %xmm1, %xmm0
addq $0x28, %rsp
retq