// File: /workspace/github_cpp_makefile_star2_O3/mouda[P]LTE_random_access-simulate/specialfunctions.cpp
// Function: alglib_impl::exponentialintegralei(double, alglib_impl::ae_state*)
double exponentialintegralei(double x, ae_state *_state)
{
    double eul;
    double f;
    double f1;
    double f2;
    double w;
    double result;


    eul = 0.5772156649015328606065;
    if( ae_fp_less_eq(x,0) )
    {
        result = 0;
        return result;
    }
    if( ae_fp_less(x,2) )
    {
        f1 = -5.350447357812542947283;
        f1 = f1*x+218.5049168816613393830;
        f1 = f1*x-4176.572384826693777058;
        f1 = f1*x+55411.76756393557601232;
        f1 = f1*x-331338.1331178144034309;
        f1 = f1*x+1592627.163384945414220;
        f2 = 1.000000000000000000000;
        f2 = f2*x-52.50547959112862969197;
        f2 = f2*x+1259.616186786790571525;
        f2 = f2*x-17565.49581973534652631;
        f2 = f2*x+149306.2117002725991967;
        f2 = f2*x-729494.9239640527645655;
        f2 = f2*x+1592627.163384945429726;
        f = f1/f2;
        result = eul+ae_log(x, _state)+x*f;
        return result;
    }
    if( ae_fp_less(x,4) )
    {
        w = 1/x;
        f1 = 1.981808503259689673238E-2;
        f1 = f1*w-1.271645625984917501326;
        f1 = f1*w-2.088160335681228318920;
        f1 = f1*w+2.755544509187936721172;
        f1 = f1*w-4.409507048701600257171E-1;
        f1 = f1*w+4.665623805935891391017E-2;
        f1 = f1*w-1.545042679673485262580E-3;
        f1 = f1*w+7.059980605299617478514E-5;
        f2 = 1.000000000000000000000;
        f2 = f2*w+1.476498670914921440652;
        f2 = f2*w+5.629177174822436244827E-1;
        f2 = f2*w+1.699017897879307263248E-1;
        f2 = f2*w+2.291647179034212017463E-2;
        f2 = f2*w+4.450150439728752875043E-3;
        f2 = f2*w+1.727439612206521482874E-4;
        f2 = f2*w+3.953167195549672482304E-5;
        f = f1/f2;
        result = ae_exp(x, _state)*w*(1+w*f);
        return result;
    }
    if( ae_fp_less(x,8) )
    {
        w = 1/x;
        f1 = -1.373215375871208729803;
        f1 = f1*w-7.084559133740838761406E-1;
        f1 = f1*w+1.580806855547941010501;
        f1 = f1*w-2.601500427425622944234E-1;
        f1 = f1*w+2.994674694113713763365E-2;
        f1 = f1*w-1.038086040188744005513E-3;
        f1 = f1*w+4.371064420753005429514E-5;
        f1 = f1*w+2.141783679522602903795E-6;
        f2 = 1.000000000000000000000;
        f2 = f2*w+8.585231423622028380768E-1;
        f2 = f2*w+4.483285822873995129957E-1;
        f2 = f2*w+7.687932158124475434091E-2;
        f2 = f2*w+2.449868241021887685904E-2;
        f2 = f2*w+8.832165941927796567926E-4;
        f2 = f2*w+4.590952299511353531215E-4;
        f2 = f2*w+(-4.729848351866523044863E-6);
        f2 = f2*w+2.665195537390710170105E-6;
        f = f1/f2;
        result = ae_exp(x, _state)*w*(1+w*f);
        return result;
    }
    if( ae_fp_less(x,16) )
    {
        w = 1/x;
        f1 = -2.106934601691916512584;
        f1 = f1*w+1.732733869664688041885;
        f1 = f1*w-2.423619178935841904839E-1;
        f1 = f1*w+2.322724180937565842585E-2;
        f1 = f1*w+2.372880440493179832059E-4;
        f1 = f1*w-8.343219561192552752335E-5;
        f1 = f1*w+1.363408795605250394881E-5;
        f1 = f1*w-3.655412321999253963714E-7;
        f1 = f1*w+1.464941733975961318456E-8;
        f1 = f1*w+6.176407863710360207074E-10;
        f2 = 1.000000000000000000000;
        f2 = f2*w-2.298062239901678075778E-1;
        f2 = f2*w+1.105077041474037862347E-1;
        f2 = f2*w-1.566542966630792353556E-2;
        f2 = f2*w+2.761106850817352773874E-3;
        f2 = f2*w-2.089148012284048449115E-4;
        f2 = f2*w+1.708528938807675304186E-5;
        f2 = f2*w-4.459311796356686423199E-7;
        f2 = f2*w+1.394634930353847498145E-8;
        f2 = f2*w+6.150865933977338354138E-10;
        f = f1/f2;
        result = ae_exp(x, _state)*w*(1+w*f);
        return result;
    }
    if( ae_fp_less(x,32) )
    {
        w = 1/x;
        f1 = -2.458119367674020323359E-1;
        f1 = f1*w-1.483382253322077687183E-1;
        f1 = f1*w+7.248291795735551591813E-2;
        f1 = f1*w-1.348315687380940523823E-2;
        f1 = f1*w+1.342775069788636972294E-3;
        f1 = f1*w-7.942465637159712264564E-5;
        f1 = f1*w+2.644179518984235952241E-6;
        f1 = f1*w-4.239473659313765177195E-8;
        f2 = 1.000000000000000000000;
        f2 = f2*w-1.044225908443871106315E-1;
        f2 = f2*w-2.676453128101402655055E-1;
        f2 = f2*w+9.695000254621984627876E-2;
        f2 = f2*w-1.601745692712991078208E-2;
        f2 = f2*w+1.496414899205908021882E-3;
        f2 = f2*w-8.462452563778485013756E-5;
        f2 = f2*w+2.728938403476726394024E-6;
        f2 = f2*w-4.239462431819542051337E-8;
        f = f1/f2;
        result = ae_exp(x, _state)*w*(1+w*f);
        return result;
    }
    if( ae_fp_less(x,64) )
    {
        w = 1/x;
        f1 = 1.212561118105456670844E-1;
        f1 = f1*w-5.823133179043894485122E-1;
        f1 = f1*w+2.348887314557016779211E-1;
        f1 = f1*w-3.040034318113248237280E-2;
        f1 = f1*w+1.510082146865190661777E-3;
        f1 = f1*w-2.523137095499571377122E-5;
        f2 = 1.000000000000000000000;
        f2 = f2*w-1.002252150365854016662;
        f2 = f2*w+2.928709694872224144953E-1;
        f2 = f2*w-3.337004338674007801307E-2;
        f2 = f2*w+1.560544881127388842819E-3;
        f2 = f2*w-2.523137093603234562648E-5;
        f = f1/f2;
        result = ae_exp(x, _state)*w*(1+w*f);
        return result;
    }
    w = 1/x;
    f1 = -7.657847078286127362028E-1;
    f1 = f1*w+6.886192415566705051750E-1;
    f1 = f1*w-2.132598113545206124553E-1;
    f1 = f1*w+3.346107552384193813594E-2;
    f1 = f1*w-3.076541477344756050249E-3;
    f1 = f1*w+1.747119316454907477380E-4;
    f1 = f1*w-6.103711682274170530369E-6;
    f1 = f1*w+1.218032765428652199087E-7;
    f1 = f1*w-1.086076102793290233007E-9;
    f2 = 1.000000000000000000000;
    f2 = f2*w-1.888802868662308731041;
    f2 = f2*w+1.066691687211408896850;
    f2 = f2*w-2.751915982306380647738E-1;
    f2 = f2*w+3.930852688233823569726E-2;
    f2 = f2*w-3.414684558602365085394E-3;
    f2 = f2*w+1.866844370703555398195E-4;
    f2 = f2*w-6.345146083130515357861E-6;
    f2 = f2*w+1.239754287483206878024E-7;
    f2 = f2*w-1.086076102793126632978E-9;
    f = f1/f2;
    result = ae_exp(x, _state)*w*(1+w*f);
    return result;
}

// Assembly:
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
xorpd %xmm1, %xmm1
movapd %xmm1, (%rsp)
movapd %xmm0, 0x10(%rsp)
callq 0x25bd9
testb %al, %al
jne 0xea31
movsd 0x24c17(%rip), %xmm1    # 0x33400
movaps 0x10(%rsp), %xmm0
callq 0x25bb9
testb %al, %al
je 0xe896
movsd 0x25e5d(%rip), %xmm3    # 0x34660
movapd 0x10(%rsp), %xmm2
addsd %xmm2, %xmm3
movapd %xmm2, %xmm1
movapd %xmm2, %xmm0
unpcklpd %xmm2, %xmm1            # xmm1 = xmm1[0],xmm2[0]
movapd 0x269bf(%rip), %xmm2    # 0x351e0
unpcklpd %xmm3, %xmm2            # xmm2 = xmm2[0],xmm3[0]
mulpd %xmm1, %xmm2
addpd 0x269bf(%rip), %xmm2    # 0x351f0
mulpd %xmm1, %xmm2
addpd 0x269c3(%rip), %xmm2    # 0x35200
mulpd %xmm1, %xmm2
addpd 0x269c7(%rip), %xmm2    # 0x35210
mulpd %xmm1, %xmm2
addpd 0x269cb(%rip), %xmm2    # 0x35220
mulpd %xmm1, %xmm2
addpd 0x269cf(%rip), %xmm2    # 0x35230
movapd %xmm2, %xmm1
unpckhpd %xmm2, %xmm1            # xmm1 = xmm1[1],xmm2[1]
divsd %xmm1, %xmm2
movapd %xmm2, (%rsp)
movq %rbx, %rdi
callq 0x25f91
addsd 0x24bfe(%rip), %xmm0    # 0x33480
movapd (%rsp), %xmm1
mulsd 0x10(%rsp), %xmm1
addsd %xmm1, %xmm0
jmp 0xea36
movsd 0x24952(%rip), %xmm1    # 0x331f0
movaps 0x10(%rsp), %xmm0
callq 0x25bb9
testb %al, %al
je 0xe952
movsd 0x24928(%rip), %xmm3    # 0x331e0
movapd 0x10(%rsp), %xmm0
divsd %xmm0, %xmm3
movapd %xmm3, 0x20(%rsp)
movsd 0x25d78(%rip), %xmm2    # 0x34648
mulsd %xmm3, %xmm2
addsd 0x25d74(%rip), %xmm2    # 0x34650
movsd 0x25d74(%rip), %xmm1    # 0x34658
addsd %xmm3, %xmm1
unpcklpd %xmm1, %xmm2            # xmm2 = xmm2[0],xmm1[0]
movapd %xmm3, %xmm1
unpcklpd %xmm3, %xmm1            # xmm1 = xmm1[0],xmm3[0]
mulpd %xmm1, %xmm2
addpd 0x26880(%rip), %xmm2    # 0x35180
mulpd %xmm1, %xmm2
addpd 0x26884(%rip), %xmm2    # 0x35190
mulpd %xmm1, %xmm2
addpd 0x26888(%rip), %xmm2    # 0x351a0
mulpd %xmm1, %xmm2
addpd 0x2688c(%rip), %xmm2    # 0x351b0
mulpd %xmm1, %xmm2
addpd 0x26890(%rip), %xmm2    # 0x351c0
mulpd %xmm1, %xmm2
addpd 0x26894(%rip), %xmm2    # 0x351d0
movapd %xmm2, %xmm1
unpckhpd %xmm2, %xmm1            # xmm1 = xmm1[1],xmm2[1]
divsd %xmm1, %xmm2
movapd %xmm2, (%rsp)
jmp 0xea05
movsd 0x24d1e(%rip), %xmm1    # 0x33678
movaps 0x10(%rsp), %xmm0
callq 0x25bb9
testb %al, %al
je 0xea3c
movsd 0x2486c(%rip), %xmm1    # 0x331e0
movapd 0x10(%rsp), %xmm0
divsd %xmm0, %xmm1
movapd %xmm1, 0x20(%rsp)
movsd 0x25cb4(%rip), %xmm2    # 0x34640
addsd %xmm1, %xmm2
unpcklpd %xmm1, %xmm1            # xmm1 = xmm1[0,0]
movapd 0x26764(%rip), %xmm3    # 0x35100
unpcklpd %xmm2, %xmm3            # xmm3 = xmm3[0],xmm2[0]
mulpd %xmm1, %xmm3
addpd 0x26764(%rip), %xmm3    # 0x35110
mulpd %xmm1, %xmm3
addpd 0x26768(%rip), %xmm3    # 0x35120
mulpd %xmm1, %xmm3
addpd 0x2676c(%rip), %xmm3    # 0x35130
mulpd %xmm1, %xmm3
addpd 0x26770(%rip), %xmm3    # 0x35140
mulpd %xmm1, %xmm3
addpd 0x26774(%rip), %xmm3    # 0x35150
mulpd %xmm1, %xmm3
addpd 0x26778(%rip), %xmm3    # 0x35160
mulpd %xmm1, %xmm3
addpd 0x2677c(%rip), %xmm3    # 0x35170
movapd %xmm3, %xmm1
unpckhpd %xmm3, %xmm1            # xmm1 = xmm1[1],xmm3[1]
divsd %xmm1, %xmm3
movapd %xmm3, (%rsp)
movq %rbx, %rdi
callq 0x25f9b
movapd 0x20(%rsp), %xmm1
mulsd %xmm1, %xmm0
movapd (%rsp), %xmm2
mulsd %xmm1, %xmm2
addsd 0x247b8(%rip), %xmm2    # 0x331e0
mulsd %xmm0, %xmm2
movapd %xmm2, (%rsp)
movapd (%rsp), %xmm0
addq $0x30, %rsp
popq %rbx
retq
movsd 0x25bac(%rip), %xmm1    # 0x345f0
movaps 0x10(%rsp), %xmm0
callq 0x25bb9
testb %al, %al
je 0xeaff
movsd 0x24782(%rip), %xmm3    # 0x331e0
movapd 0x10(%rsp), %xmm0
divsd %xmm0, %xmm3
movapd %xmm3, 0x20(%rsp)
movsd 0x25bb2(%rip), %xmm2    # 0x34628
mulsd %xmm3, %xmm2
addsd 0x25bae(%rip), %xmm2    # 0x34630
movsd 0x25bae(%rip), %xmm1    # 0x34638
addsd %xmm3, %xmm1
unpcklpd %xmm1, %xmm2            # xmm2 = xmm2[0],xmm1[0]
movapd %xmm3, %xmm1
unpcklpd %xmm3, %xmm1            # xmm1 = xmm1[0],xmm3[0]
mulpd %xmm1, %xmm2
addpd 0x265da(%rip), %xmm2    # 0x35080
mulpd %xmm1, %xmm2
addpd 0x265de(%rip), %xmm2    # 0x35090
mulpd %xmm1, %xmm2
addpd 0x265e2(%rip), %xmm2    # 0x350a0
mulpd %xmm1, %xmm2
addpd 0x265e6(%rip), %xmm2    # 0x350b0
mulpd %xmm1, %xmm2
addpd 0x265ea(%rip), %xmm2    # 0x350c0
mulpd %xmm1, %xmm2
addpd 0x265ee(%rip), %xmm2    # 0x350d0
mulpd %xmm1, %xmm2
addpd 0x265f2(%rip), %xmm2    # 0x350e0
mulpd %xmm1, %xmm2
addpd 0x265f6(%rip), %xmm2    # 0x350f0
jmp 0xe93c
movsd 0x25181(%rip), %xmm1    # 0x33c88
movaps 0x10(%rsp), %xmm0
callq 0x25bb9
testb %al, %al
je 0xeba6
movsd 0x246bf(%rip), %xmm1    # 0x331e0
movapd 0x10(%rsp), %xmm0
divsd %xmm0, %xmm1
movapd %xmm1, 0x20(%rsp)
movsd 0x25ae7(%rip), %xmm2    # 0x34620
addsd %xmm1, %xmm2
unpcklpd %xmm1, %xmm1            # xmm1 = xmm1[0,0]
movapd 0x264b7(%rip), %xmm3    # 0x35000
unpcklpd %xmm2, %xmm3            # xmm3 = xmm3[0],xmm2[0]
mulpd %xmm1, %xmm3
addpd 0x264b7(%rip), %xmm3    # 0x35010
mulpd %xmm1, %xmm3
addpd 0x264bb(%rip), %xmm3    # 0x35020
mulpd %xmm1, %xmm3
addpd 0x264bf(%rip), %xmm3    # 0x35030
mulpd %xmm1, %xmm3
addpd 0x264c3(%rip), %xmm3    # 0x35040
mulpd %xmm1, %xmm3
addpd 0x264c7(%rip), %xmm3    # 0x35050
mulpd %xmm1, %xmm3
addpd 0x264cb(%rip), %xmm3    # 0x35060
mulpd %xmm1, %xmm3
addpd 0x264cf(%rip), %xmm3    # 0x35070
jmp 0xe9f4
movsd 0x25a4a(%rip), %xmm1    # 0x345f8
movaps 0x10(%rsp), %xmm0
callq 0x25bb9
movsd 0x24620(%rip), %xmm1    # 0x331e0
divsd 0x10(%rsp), %xmm1
testb %al, %al
movapd %xmm1, 0x20(%rsp)
je 0xec31
movsd 0x25a30(%rip), %xmm2    # 0x34608
mulsd %xmm1, %xmm2
addsd 0x25a2c(%rip), %xmm2    # 0x34610
movsd 0x25a2c(%rip), %xmm0    # 0x34618
addsd %xmm1, %xmm0
unpcklpd %xmm0, %xmm2            # xmm2 = xmm2[0],xmm0[0]
movapd %xmm1, %xmm0
unpcklpd %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0]
mulpd %xmm0, %xmm2
addpd 0x263b8(%rip), %xmm2    # 0x34fc0
mulpd %xmm0, %xmm2
addpd 0x263bc(%rip), %xmm2    # 0x34fd0
mulpd %xmm0, %xmm2
addpd 0x263c0(%rip), %xmm2    # 0x34fe0
mulpd %xmm0, %xmm2
addpd 0x263c4(%rip), %xmm2    # 0x34ff0
jmp 0xecb1
movsd 0x259c7(%rip), %xmm0    # 0x34600
addsd %xmm1, %xmm0
movapd 0x262eb(%rip), %xmm2    # 0x34f30
unpcklpd %xmm0, %xmm2            # xmm2 = xmm2[0],xmm0[0]
movapd %xmm1, %xmm0
unpcklpd %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0]
mulpd %xmm0, %xmm2
addpd 0x262e3(%rip), %xmm2    # 0x34f40
mulpd %xmm0, %xmm2
addpd 0x262e7(%rip), %xmm2    # 0x34f50
mulpd %xmm0, %xmm2
addpd 0x262eb(%rip), %xmm2    # 0x34f60
mulpd %xmm0, %xmm2
addpd 0x262ef(%rip), %xmm2    # 0x34f70
mulpd %xmm0, %xmm2
addpd 0x262f3(%rip), %xmm2    # 0x34f80
mulpd %xmm0, %xmm2
addpd 0x262f7(%rip), %xmm2    # 0x34f90
mulpd %xmm0, %xmm2
addpd 0x262fb(%rip), %xmm2    # 0x34fa0
mulpd %xmm0, %xmm2
addpd 0x262ff(%rip), %xmm2    # 0x34fb0
movapd %xmm2, %xmm0
unpckhpd %xmm2, %xmm0            # xmm0 = xmm0[1],xmm2[1]
divsd %xmm0, %xmm2
movapd %xmm2, (%rsp)
movapd 0x10(%rsp), %xmm0
movq %rbx, %rdi
callq 0x25f9b
movapd 0x20(%rsp), %xmm2
mulsd %xmm2, %xmm0
movapd (%rsp), %xmm1
mulsd %xmm2, %xmm1
addsd 0x244f5(%rip), %xmm1    # 0x331e0
mulsd %xmm0, %xmm1
movapd %xmm1, (%rsp)
jmp 0xea31