// File: /workspace/github_cpp_makefile_star2_O1/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 $0x20, %rsp
movq %rdi, %rbx
xorpd %xmm1, %xmm1
movsd %xmm1, 0x8(%rsp)
movsd %xmm0, 0x10(%rsp)
callq 0x2631e
testb %al, %al
jne 0xed88
movsd 0x25b5b(%rip), %xmm1    # 0x343e0
movsd 0x10(%rsp), %xmm0
callq 0x262fe
testb %al, %al
je 0xe95d
movsd 0x27260(%rip), %xmm1    # 0x35b00
movsd 0x10(%rsp), %xmm0
mulsd %xmm0, %xmm1
addsd 0x27256(%rip), %xmm1    # 0x35b08
mulsd %xmm0, %xmm1
addsd 0x27252(%rip), %xmm1    # 0x35b10
mulsd %xmm0, %xmm1
addsd 0x2724e(%rip), %xmm1    # 0x35b18
mulsd %xmm0, %xmm1
addsd 0x2724a(%rip), %xmm1    # 0x35b20
movapd %xmm1, %xmm3
movsd 0x2724e(%rip), %xmm2    # 0x35b30
addsd %xmm0, %xmm2
mulsd %xmm0, %xmm2
addsd 0x27246(%rip), %xmm2    # 0x35b38
mulsd %xmm0, %xmm2
addsd 0x27242(%rip), %xmm2    # 0x35b40
mulsd %xmm0, %xmm3
mulsd %xmm0, %xmm2
addsd 0x2723a(%rip), %xmm2    # 0x35b48
movsd 0x27212(%rip), %xmm1    # 0x35b28
mulsd %xmm0, %xmm2
addsd 0x2722e(%rip), %xmm2    # 0x35b50
addsd %xmm1, %xmm3
mulsd %xmm0, %xmm2
addsd %xmm1, %xmm2
divsd %xmm2, %xmm3
movsd %xmm3, 0x8(%rsp)
movq %rbx, %rdi
callq 0x266d6
addsd 0x25b18(%rip), %xmm0    # 0x34460
movsd 0x8(%rsp), %xmm1
mulsd 0x10(%rsp), %xmm1
addsd %xmm1, %xmm0
jmp 0xed8e
movsd 0x2584b(%rip), %xmm1    # 0x341b0
movsd 0x10(%rsp), %xmm0
callq 0x262fe
testb %al, %al
je 0xea49
movsd 0x25820(%rip), %xmm2    # 0x341a0
movsd 0x10(%rsp), %xmm0
divsd %xmm0, %xmm2
movsd %xmm2, 0x18(%rsp)
movsd 0x270f0(%rip), %xmm1    # 0x35a88
mulsd %xmm2, %xmm1
addsd 0x270ec(%rip), %xmm1    # 0x35a90
mulsd %xmm2, %xmm1
addsd 0x270e8(%rip), %xmm1    # 0x35a98
mulsd %xmm2, %xmm1
addsd 0x270e4(%rip), %xmm1    # 0x35aa0
mulsd %xmm2, %xmm1
addsd 0x270e0(%rip), %xmm1    # 0x35aa8
mulsd %xmm2, %xmm1
addsd 0x270dc(%rip), %xmm1    # 0x35ab0
mulsd %xmm2, %xmm1
addsd 0x270d8(%rip), %xmm1    # 0x35ab8
mulsd %xmm2, %xmm1
addsd 0x270d4(%rip), %xmm1    # 0x35ac0
movapd %xmm1, %xmm3
movsd 0x270d0(%rip), %xmm1    # 0x35ac8
addsd %xmm2, %xmm1
mulsd %xmm2, %xmm1
addsd 0x270c8(%rip), %xmm1    # 0x35ad0
mulsd %xmm2, %xmm1
addsd 0x270c4(%rip), %xmm1    # 0x35ad8
mulsd %xmm2, %xmm1
addsd 0x270c0(%rip), %xmm1    # 0x35ae0
mulsd %xmm2, %xmm1
addsd 0x270bc(%rip), %xmm1    # 0x35ae8
mulsd %xmm2, %xmm1
addsd 0x270b8(%rip), %xmm1    # 0x35af0
mulsd %xmm2, %xmm1
addsd 0x270b4(%rip), %xmm1    # 0x35af8
jmp 0xed50
movsd 0x25bff(%rip), %xmm1    # 0x34650
movsd 0x10(%rsp), %xmm0
callq 0x262fe
testb %al, %al
je 0xeb41
movsd 0x25734(%rip), %xmm2    # 0x341a0
movsd 0x10(%rsp), %xmm0
divsd %xmm0, %xmm2
movsd %xmm2, 0x18(%rsp)
movsd 0x26f84(%rip), %xmm1    # 0x35a08
mulsd %xmm2, %xmm1
addsd 0x26f80(%rip), %xmm1    # 0x35a10
mulsd %xmm2, %xmm1
addsd 0x26f7c(%rip), %xmm1    # 0x35a18
mulsd %xmm2, %xmm1
addsd 0x26f78(%rip), %xmm1    # 0x35a20
mulsd %xmm2, %xmm1
addsd 0x26f74(%rip), %xmm1    # 0x35a28
mulsd %xmm2, %xmm1
addsd 0x26f70(%rip), %xmm1    # 0x35a30
mulsd %xmm2, %xmm1
addsd 0x26f6c(%rip), %xmm1    # 0x35a38
mulsd %xmm2, %xmm1
addsd 0x26f68(%rip), %xmm1    # 0x35a40
movapd %xmm1, %xmm3
movsd 0x26f64(%rip), %xmm1    # 0x35a48
addsd %xmm2, %xmm1
mulsd %xmm2, %xmm1
addsd 0x26f5c(%rip), %xmm1    # 0x35a50
mulsd %xmm2, %xmm1
addsd 0x26f58(%rip), %xmm1    # 0x35a58
mulsd %xmm2, %xmm1
addsd 0x26f54(%rip), %xmm1    # 0x35a60
mulsd %xmm2, %xmm1
addsd 0x26f50(%rip), %xmm1    # 0x35a68
mulsd %xmm2, %xmm1
addsd 0x26f4c(%rip), %xmm1    # 0x35a70
mulsd %xmm2, %xmm1
addsd 0x26f48(%rip), %xmm1    # 0x35a78
mulsd %xmm2, %xmm1
addsd 0x26f44(%rip), %xmm1    # 0x35a80
jmp 0xed50
movsd 0x26caf(%rip), %xmm1    # 0x357f8
movsd 0x10(%rsp), %xmm0
callq 0x262fe
testb %al, %al
je 0xec5d
movsd 0x2563c(%rip), %xmm2    # 0x341a0
movsd 0x10(%rsp), %xmm0
divsd %xmm0, %xmm2
movsd %xmm2, 0x18(%rsp)
movsd 0x26df4(%rip), %xmm1    # 0x35970
mulsd %xmm2, %xmm1
addsd 0x26df0(%rip), %xmm1    # 0x35978
mulsd %xmm2, %xmm1
addsd 0x26dec(%rip), %xmm1    # 0x35980
mulsd %xmm2, %xmm1
addsd 0x26de8(%rip), %xmm1    # 0x35988
mulsd %xmm2, %xmm1
addsd 0x26de4(%rip), %xmm1    # 0x35990
mulsd %xmm2, %xmm1
addsd 0x26de0(%rip), %xmm1    # 0x35998
mulsd %xmm2, %xmm1
addsd 0x26ddc(%rip), %xmm1    # 0x359a0
mulsd %xmm2, %xmm1
addsd 0x26dd8(%rip), %xmm1    # 0x359a8
mulsd %xmm2, %xmm1
addsd 0x26dd4(%rip), %xmm1    # 0x359b0
mulsd %xmm2, %xmm1
addsd 0x26dd0(%rip), %xmm1    # 0x359b8
movapd %xmm1, %xmm3
movsd 0x26dcc(%rip), %xmm1    # 0x359c0
addsd %xmm2, %xmm1
mulsd %xmm2, %xmm1
addsd 0x26dc4(%rip), %xmm1    # 0x359c8
mulsd %xmm2, %xmm1
addsd 0x26dc0(%rip), %xmm1    # 0x359d0
mulsd %xmm2, %xmm1
addsd 0x26dbc(%rip), %xmm1    # 0x359d8
mulsd %xmm2, %xmm1
addsd 0x26db8(%rip), %xmm1    # 0x359e0
mulsd %xmm2, %xmm1
addsd 0x26db4(%rip), %xmm1    # 0x359e8
mulsd %xmm2, %xmm1
addsd 0x26db0(%rip), %xmm1    # 0x359f0
mulsd %xmm2, %xmm1
addsd 0x26dac(%rip), %xmm1    # 0x359f8
mulsd %xmm2, %xmm1
addsd 0x26da8(%rip), %xmm1    # 0x35a00
jmp 0xed50
movsd 0x2622b(%rip), %xmm1    # 0x34e90
movsd 0x10(%rsp), %xmm0
callq 0x262fe
testb %al, %al
je 0xed94
movsd 0x25520(%rip), %xmm2    # 0x341a0
movsd 0x10(%rsp), %xmm0
divsd %xmm0, %xmm2
movsd %xmm2, 0x18(%rsp)
movsd 0x26c58(%rip), %xmm1    # 0x358f0
mulsd %xmm2, %xmm1
addsd 0x26c54(%rip), %xmm1    # 0x358f8
mulsd %xmm2, %xmm1
addsd 0x26c50(%rip), %xmm1    # 0x35900
mulsd %xmm2, %xmm1
addsd 0x26c4c(%rip), %xmm1    # 0x35908
mulsd %xmm2, %xmm1
addsd 0x26c48(%rip), %xmm1    # 0x35910
mulsd %xmm2, %xmm1
addsd 0x26c44(%rip), %xmm1    # 0x35918
mulsd %xmm2, %xmm1
addsd 0x26c40(%rip), %xmm1    # 0x35920
mulsd %xmm2, %xmm1
addsd 0x26c3c(%rip), %xmm1    # 0x35928
movapd %xmm1, %xmm3
movsd 0x26c38(%rip), %xmm1    # 0x35930
addsd %xmm2, %xmm1
mulsd %xmm2, %xmm1
addsd 0x26c30(%rip), %xmm1    # 0x35938
mulsd %xmm2, %xmm1
addsd 0x26c2c(%rip), %xmm1    # 0x35940
mulsd %xmm2, %xmm1
addsd 0x26c28(%rip), %xmm1    # 0x35948
mulsd %xmm2, %xmm1
addsd 0x26c24(%rip), %xmm1    # 0x35950
mulsd %xmm2, %xmm1
addsd 0x26c20(%rip), %xmm1    # 0x35958
mulsd %xmm2, %xmm1
addsd 0x26c1c(%rip), %xmm1    # 0x35960
mulsd %xmm2, %xmm1
addsd 0x26c18(%rip), %xmm1    # 0x35968
divsd %xmm1, %xmm3
movsd %xmm3, 0x8(%rsp)
movq %rbx, %rdi
callq 0x266e0
movsd 0x18(%rsp), %xmm2
mulsd %xmm2, %xmm0
movsd 0x8(%rsp), %xmm1
mulsd %xmm2, %xmm1
addsd 0x25422(%rip), %xmm1    # 0x341a0
mulsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
movsd 0x8(%rsp), %xmm0
addq $0x20, %rsp
popq %rbx
retq
movsd 0x26a64(%rip), %xmm1    # 0x35800
movsd 0x10(%rsp), %xmm0
callq 0x262fe
movsd 0x253f1(%rip), %xmm0    # 0x341a0
divsd 0x10(%rsp), %xmm0
testb %al, %al
movsd %xmm0, 0x18(%rsp)
je 0xee50
movsd 0x26acd(%rip), %xmm1    # 0x35898
mulsd %xmm0, %xmm1
addsd 0x26ac9(%rip), %xmm1    # 0x358a0
mulsd %xmm0, %xmm1
addsd 0x26ac5(%rip), %xmm1    # 0x358a8
mulsd %xmm0, %xmm1
addsd 0x26ac1(%rip), %xmm1    # 0x358b0
mulsd %xmm0, %xmm1
addsd 0x26abd(%rip), %xmm1    # 0x358b8
mulsd %xmm0, %xmm1
addsd 0x26ab9(%rip), %xmm1    # 0x358c0
movapd %xmm1, %xmm2
movapd %xmm0, %xmm1
movsd 0x26ab1(%rip), %xmm0    # 0x358c8
addsd %xmm1, %xmm0
mulsd %xmm1, %xmm0
addsd 0x26aa9(%rip), %xmm0    # 0x358d0
mulsd %xmm1, %xmm0
addsd 0x26aa5(%rip), %xmm0    # 0x358d8
mulsd %xmm1, %xmm0
addsd 0x26aa1(%rip), %xmm0    # 0x358e0
mulsd %xmm1, %xmm0
addsd 0x26a9d(%rip), %xmm0    # 0x358e8
jmp 0xef2c
movsd 0x269b0(%rip), %xmm1    # 0x35808
mulsd %xmm0, %xmm1
addsd 0x269ac(%rip), %xmm1    # 0x35810
mulsd %xmm0, %xmm1
addsd 0x269a8(%rip), %xmm1    # 0x35818
mulsd %xmm0, %xmm1
addsd 0x269a4(%rip), %xmm1    # 0x35820
mulsd %xmm0, %xmm1
addsd 0x269a0(%rip), %xmm1    # 0x35828
mulsd %xmm0, %xmm1
addsd 0x2699c(%rip), %xmm1    # 0x35830
mulsd %xmm0, %xmm1
addsd 0x26998(%rip), %xmm1    # 0x35838
mulsd %xmm0, %xmm1
addsd 0x26994(%rip), %xmm1    # 0x35840
mulsd %xmm0, %xmm1
addsd 0x26990(%rip), %xmm1    # 0x35848
movapd %xmm1, %xmm2
movapd %xmm0, %xmm1
movsd 0x26988(%rip), %xmm0    # 0x35850
addsd %xmm1, %xmm0
mulsd %xmm1, %xmm0
addsd 0x26980(%rip), %xmm0    # 0x35858
mulsd %xmm1, %xmm0
addsd 0x2697c(%rip), %xmm0    # 0x35860
mulsd %xmm1, %xmm0
addsd 0x26978(%rip), %xmm0    # 0x35868
mulsd %xmm1, %xmm0
addsd 0x26974(%rip), %xmm0    # 0x35870
mulsd %xmm1, %xmm0
addsd 0x26970(%rip), %xmm0    # 0x35878
mulsd %xmm1, %xmm0
addsd 0x2696c(%rip), %xmm0    # 0x35880
mulsd %xmm1, %xmm0
addsd 0x26968(%rip), %xmm0    # 0x35888
mulsd %xmm1, %xmm0
addsd 0x26964(%rip), %xmm0    # 0x35890
divsd %xmm0, %xmm2
movsd %xmm2, 0x8(%rsp)
movsd 0x10(%rsp), %xmm0
jmp 0xed5a