// File: /workspace/github_cpp_makefile_star2_O1/JorisCaze[P]NASG-EOS_Calibration/src/main.cpp
// Function: main
int main()
{
    displayHeader();
    cout << "\n*** Noble-Abel Stiffened Gas EOS Liquid/vapor calibration ***\n\n";

    string run("res/");
    double p0, ro0, c0;
    double cpL(0.), qL(0.), pinfL(0.), cvL(0.), gammaL(0.), qPrimL(0.), bL(0.);
    double cpG(0.), qG(0.), pinfG(0.), cvG(0.), gammaG(0.), qPrimG(0.), bG(0.);
    double mvL(0.), mT(0.), mp(0.), mhL(0.), mTp(0.), diffCl(0.);
    vector<double> Texp, psatExp, vGexp, vLexp, hGexp, hLexp, LvExp; 

    readLiqVapInput(p0,ro0,c0);
    readExpData("input/expData.txt",Texp,psatExp,vGexp,vLexp,hGexp,hLexp,LvExp);

    mvL = meanValue(vLexp);
    mT = meanValue(Texp);
    mp = meanValue(psatExp);
    mhL = meanValue(hLexp);

    // --- Liquid phase ---
    pinfL = computePinfL(psatExp,Texp,vLexp,hLexp,p0,ro0,c0);
    mTp = computeMeanTp(psatExp,Texp,pinfL);
    diffCl = computeHeatCapDiffL(psatExp,Texp,vLexp,mvL,mTp,pinfL);
    bL = computebL(mvL,mTp,diffCl);
    cpL = computeCpL(Texp,hLexp,psatExp,mhL,mp,mT,bL);
    cvL = cpL - diffCl;
    gammaL = computeGammak(cpL,cvL);
    qL = computeQl(mhL,mT,mp,cpL,bL);
    qPrimL = 0.; // Ref. energy convention

    // --- Vapor phase ---
    cpG = computecpG(hGexp,Texp);
    qG = computeQg(hGexp,Texp,cpG);
    cvG = computecvG(vGexp,Texp,psatExp,cpG);
    gammaG = computeGammak(cpG,cvG);
    pinfG = 0.;  // Ideal Gas
    bG = 0.;     // Ideal Gas
    qPrimG = computeQprimG(psatExp,Texp,cpL,cpG,cvL,cvG,qL,qG,pinfL,bL);

    // --- Results --- 
    cout << "--- Liquid (L) ---\n";
    cout << "cpL    (J.kg-1.K-1)  : " << cpL << endl;
    cout << "qL     (J.kg-1)      : " << qL << endl;
    cout << "pinfL  (Pa)          : " << pinfL << endl;
    cout << "cvL    (J.kg-1.K-1)  : " << cvL << endl;
    cout << "gammaL (-)           : " << gammaL << endl;
    cout << "q'L    (J.kg-1)      : " << qPrimL << endl;
    cout << "bL     (m3/kg)       : " << bL << endl;
    cout << "\n";

    cout << "--- Gas (G) ---\n";
    cout << "cpG    (J.kg-1.K-1)  : " << cpG << endl;
    cout << "qG     (J.kg-1)      : " << qG << endl;
    cout << "pinfG  (Pa)          : " << pinfG << endl;
    cout << "cvG    (J.kg-1.K-1)  : " << cvG << endl;
    cout << "gammaG (-)           : " << gammaG << endl;
    cout << "q'G    (J.kg-1)      : " << qPrimG << endl;
    cout << "bG     (m3/kg)       : " << bG << endl;
    cout << "\n";

    writeResults(cpL,qL,pinfL,cvL,gammaL,qPrimL,bL,cpG,qG,pinfG,cvG,gammaG,qPrimG,bG);
    
    // --- Write theoric curves --- 
    vector<double> hLth, hGth, LvTh, PsatTh, vlTh, vgTh;
    double A(0.),B(0.),C(0.),D(0.),E(0.);
    
    coeffPsatTh(cpG,cpL,cvG,cvL,qG,qL,qPrimG,qPrimL,bG,bL,A,B,C,D,E);

    for (unsigned int i = 0; i < Texp.size(); i++) {
        PsatTh.push_back(computePsatTh(A,B,C,D,E,pinfL,Texp[i]));
        hLth.push_back(computeThEnthalpy(cpL,bL,qL,Texp[i],PsatTh[i]));
        hGth.push_back(computeThEnthalpy(cpG,bG,qG,Texp[i],PsatTh[i]));
        LvTh.push_back(hGth[i]-hLth[i]);
        vlTh.push_back(computeVkTh(cpL,cvL,pinfL,bL,Texp[i],PsatTh[i]));
        vgTh.push_back(computeVkTh(cpG,cvG,pinfG,bG,Texp[i],PsatTh[i]));
    }
    writePlotFile("res/Psat_th.txt",Texp,PsatTh);
    writePlotFile("res/hL_th.txt",Texp,hLth);
    writePlotFile("res/hG_th.txt",Texp,hGth);
    writePlotFile("res/Lv_th.txt",Texp,LvTh);
    writePlotFile("res/vL_th.txt",Texp,vlTh);
    writePlotFile("res/vG_th.txt",Texp,vgTh);

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x388, %rsp            # imm = 0x388
callq 0x4af4
movq 0x5acb(%rip), %rdi      # 0x8fd8
leaq 0x2c1d(%rip), %rsi      # 0x6131
movl $0x40, %edx
callq 0x2180
leaq 0x298(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x2c41(%rip), %rsi      # 0x6172
leaq 0x2c3e(%rip), %rdx      # 0x6176
leaq 0x288(%rsp), %rdi
callq 0x345e
xorl %eax, %eax
movq %rax, 0x50(%rsp)
xorpd %xmm0, %xmm0
movapd %xmm0, 0x40(%rsp)
movq %rax, 0xc0(%rsp)
movapd %xmm0, 0xb0(%rsp)
movq %rax, 0x1f0(%rsp)
movapd %xmm0, 0x1e0(%rsp)
movq %rax, 0x1a0(%rsp)
movapd %xmm0, 0x190(%rsp)
movq %rax, 0x1c0(%rsp)
movapd %xmm0, 0x1b0(%rsp)
movq %rax, 0x180(%rsp)
movapd %xmm0, 0x170(%rsp)
movq %rax, 0x210(%rsp)
movapd %xmm0, 0x200(%rsp)
leaq 0x280(%rsp), %rdi
leaq 0x278(%rsp), %rsi
leaq 0x270(%rsp), %rdx
callq 0x23fc
leaq 0x378(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x2b8b(%rip), %rsi      # 0x6177
leaq 0x2b95(%rip), %rdx      # 0x6188
leaq 0x368(%rsp), %rdi
callq 0x345e
leaq 0x200(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x170(%rsp), %rax
movq %rax, (%rsp)
leaq 0x368(%rsp), %rdi
leaq 0x40(%rsp), %rsi
leaq 0xb0(%rsp), %rdx
leaq 0x1e0(%rsp), %rcx
leaq 0x190(%rsp), %r8
leaq 0x1b0(%rsp), %r9
callq 0x4c5f
movq 0x368(%rsp), %rdi
cmpq %r14, %rdi
je 0x3668
movq 0x378(%rsp), %rsi
incq %rsi
callq 0x2160
leaq 0x190(%rsp), %rdi
callq 0x527a
movsd %xmm0, 0x30(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x527a
movsd %xmm0, 0x58(%rsp)
leaq 0xb0(%rsp), %rdi
callq 0x527a
movsd %xmm0, 0x70(%rsp)
leaq 0x170(%rsp), %rdi
callq 0x527a
movsd %xmm0, 0x68(%rsp)
movsd 0x280(%rsp), %xmm0
movsd 0x278(%rsp), %xmm1
movsd 0x270(%rsp), %xmm2
leaq 0xb0(%rsp), %rdi
leaq 0x40(%rsp), %rsi
leaq 0x190(%rsp), %rdx
leaq 0x170(%rsp), %rcx
callq 0x2d3f
movsd %xmm0, 0x80(%rsp)
leaq 0xb0(%rsp), %rdi
leaq 0x40(%rsp), %rsi
movsd 0x80(%rsp), %xmm0
callq 0x29aa
movapd %xmm0, %xmm1
leaq 0xb0(%rsp), %rdi
leaq 0x40(%rsp), %rsi
leaq 0x190(%rsp), %rdx
movsd 0x30(%rsp), %xmm0
movsd %xmm1, 0x38(%rsp)
movsd 0x38(%rsp), %xmm1
movsd 0x80(%rsp), %xmm2
callq 0x2a8c
movsd 0x38(%rsp), %xmm1
movsd %xmm0, 0x60(%rsp)
movsd 0x30(%rsp), %xmm0
movsd 0x60(%rsp), %xmm2
callq 0x2c17
movsd %xmm0, 0x78(%rsp)
leaq 0x40(%rsp), %rdi
leaq 0x170(%rsp), %rsi
leaq 0xb0(%rsp), %rdx
movsd 0x68(%rsp), %xmm0
movsd 0x70(%rsp), %xmm1
movsd 0x58(%rsp), %xmm2
movsd 0x78(%rsp), %xmm3
callq 0x2c31
movsd %xmm0, 0x38(%rsp)
movsd 0x38(%rsp), %xmm0
movapd %xmm0, %xmm1
subsd 0x60(%rsp), %xmm1
movsd %xmm1, 0x60(%rsp)
callq 0x29a5
movsd %xmm0, 0x1d8(%rsp)
movsd 0x68(%rsp), %xmm0
movsd 0x58(%rsp), %xmm1
movsd 0x70(%rsp), %xmm2
movsd 0x38(%rsp), %xmm3
movsd 0x78(%rsp), %xmm4
callq 0x2d2e
movsd %xmm0, 0x70(%rsp)
leaq 0x1b0(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x26fd
movsd %xmm0, 0x30(%rsp)
leaq 0x1b0(%rsp), %rdi
leaq 0x40(%rsp), %rsi
movsd 0x30(%rsp), %xmm0
callq 0x2785
movsd %xmm0, 0x68(%rsp)
leaq 0x1e0(%rsp), %rdi
leaq 0x40(%rsp), %rsi
leaq 0xb0(%rsp), %rdx
movsd 0x30(%rsp), %xmm0
callq 0x27be
movsd %xmm0, 0x58(%rsp)
movsd 0x30(%rsp), %xmm0
movsd 0x58(%rsp), %xmm1
callq 0x29a5
movsd %xmm0, 0x1d0(%rsp)
leaq 0x258(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
callq 0x4932
leaq 0x240(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x4932
leaq 0x258(%rsp), %rdi
leaq 0x240(%rsp), %rsi
movsd 0x38(%rsp), %xmm0
movsd 0x30(%rsp), %xmm1
movsd 0x60(%rsp), %xmm2
movsd 0x58(%rsp), %xmm3
movsd 0x70(%rsp), %xmm4
movsd 0x68(%rsp), %xmm5
movsd 0x80(%rsp), %xmm6
movsd 0x78(%rsp), %xmm7
callq 0x281b
movsd %xmm0, 0x108(%rsp)
movq 0x240(%rsp), %rdi
testq %rdi, %rdi
je 0x38fe
movq 0x250(%rsp), %rsi
subq %rdi, %rsi
callq 0x2160
movq 0x258(%rsp), %rdi
testq %rdi, %rdi
je 0x391b
movq 0x268(%rsp), %rsi
subq %rdi, %rsi
callq 0x2160
movq 0x56b6(%rip), %rdi      # 0x8fd8
leaq 0x2860(%rip), %rsi      # 0x6189
movl $0x13, %edx
callq 0x2180
movq 0x569e(%rip), %rdi      # 0x8fd8
leaq 0x285c(%rip), %rsi      # 0x619d
movl $0x17, %edx
callq 0x2180
movq 0x5686(%rip), %rdi      # 0x8fd8
movsd 0x38(%rsp), %xmm0
callq 0x21d0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20b0
movq 0x564a(%rip), %rdi      # 0x8fd8
leaq 0x2820(%rip), %rsi      # 0x61b5
movl $0x17, %edx
callq 0x2180
movq 0x5632(%rip), %rdi      # 0x8fd8
movsd 0x70(%rsp), %xmm0
callq 0x21d0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20b0
movq 0x55f6(%rip), %rdi      # 0x8fd8
leaq 0x27e4(%rip), %rsi      # 0x61cd
movl $0x17, %edx
callq 0x2180
movq 0x55de(%rip), %rdi      # 0x8fd8
movsd 0x80(%rsp), %xmm0
callq 0x21d0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20b0
movq 0x559f(%rip), %rdi      # 0x8fd8
leaq 0x27a5(%rip), %rsi      # 0x61e5
movl $0x17, %edx
callq 0x2180
movq 0x5587(%rip), %rdi      # 0x8fd8
movsd 0x60(%rsp), %xmm0
callq 0x21d0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20b0
movq 0x554b(%rip), %rdi      # 0x8fd8
leaq 0x2769(%rip), %rsi      # 0x61fd
movl $0x17, %edx
callq 0x2180
movq 0x5533(%rip), %rdi      # 0x8fd8
movsd 0x1d8(%rsp), %xmm0
callq 0x21d0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20b0
movq 0x54f4(%rip), %rdi      # 0x8fd8
leaq 0x272a(%rip), %rsi      # 0x6215
movl $0x17, %edx
callq 0x2180
movq 0x54dc(%rip), %rdi      # 0x8fd8
xorpd %xmm0, %xmm0
callq 0x21d0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20b0
movq 0x54a2(%rip), %rdi      # 0x8fd8
leaq 0x26f0(%rip), %rsi      # 0x622d
movl $0x17, %edx
callq 0x2180
movq 0x548a(%rip), %rdi      # 0x8fd8
movsd 0x78(%rsp), %xmm0
callq 0x21d0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20b0
movq 0x544e(%rip), %rdi      # 0x8fd8
leaq 0x25df(%rip), %rsi      # 0x6170
movl $0x1, %edx
callq 0x2180
movq 0x5436(%rip), %rdi      # 0x8fd8
leaq 0x269c(%rip), %rsi      # 0x6245
movl $0x10, %edx
callq 0x2180
movq 0x541e(%rip), %rdi      # 0x8fd8
leaq 0x2695(%rip), %rsi      # 0x6256
movl $0x17, %edx
callq 0x2180
movq 0x5406(%rip), %rdi      # 0x8fd8
movsd 0x30(%rsp), %xmm0
callq 0x21d0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20b0
movq 0x53ca(%rip), %rdi      # 0x8fd8
leaq 0x2659(%rip), %rsi      # 0x626e
movl $0x17, %edx
callq 0x2180
movq 0x53b2(%rip), %rdi      # 0x8fd8
movsd 0x68(%rsp), %xmm0
callq 0x21d0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20b0
movq 0x5376(%rip), %rdi      # 0x8fd8
leaq 0x261d(%rip), %rsi      # 0x6286
movl $0x17, %edx
callq 0x2180
movq 0x535e(%rip), %rdi      # 0x8fd8
xorpd %xmm0, %xmm0
callq 0x21d0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20b0
movq 0x5324(%rip), %rdi      # 0x8fd8
leaq 0x25e3(%rip), %rsi      # 0x629e
movl $0x17, %edx
callq 0x2180
movq 0x530c(%rip), %rdi      # 0x8fd8
movsd 0x58(%rsp), %xmm0
callq 0x21d0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20b0
movq 0x52d0(%rip), %rdi      # 0x8fd8
leaq 0x25a7(%rip), %rsi      # 0x62b6
movl $0x17, %edx
callq 0x2180
movq 0x52b8(%rip), %rdi      # 0x8fd8
movsd 0x1d0(%rsp), %xmm0
callq 0x21d0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20b0
movq 0x5279(%rip), %rdi      # 0x8fd8
leaq 0x2568(%rip), %rsi      # 0x62ce
movl $0x17, %edx
callq 0x2180
movq 0x5261(%rip), %rdi      # 0x8fd8
movsd 0x108(%rsp), %xmm0
callq 0x21d0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20b0
movq 0x5222(%rip), %rdi      # 0x8fd8
leaq 0x2529(%rip), %rsi      # 0x62e6
movl $0x17, %edx
callq 0x2180
movq 0x520a(%rip), %rdi      # 0x8fd8
xorpd %xmm0, %xmm0
callq 0x21d0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20b0
movq 0x51d0(%rip), %rdi      # 0x8fd8
leaq 0x2361(%rip), %rsi      # 0x6170
movl $0x1, %edx
callq 0x2180
xorl %eax, %eax
movq %rax, 0x28(%rsp)
movsd 0x108(%rsp), %xmm0
movsd %xmm0, 0x20(%rsp)
movsd 0x1d0(%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
movsd 0x58(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
movq %rax, 0x8(%rsp)
movsd 0x68(%rsp), %xmm0
movsd %xmm0, (%rsp)
xorps %xmm5, %xmm5
movsd 0x38(%rsp), %xmm0
movsd 0x70(%rsp), %xmm1
movsd 0x80(%rsp), %xmm2
movsd 0x60(%rsp), %xmm3
movsd 0x1d8(%rsp), %xmm4
movsd 0x78(%rsp), %xmm6
movsd 0x30(%rsp), %xmm7
callq 0x5412
xorpd %xmm0, %xmm0
movapd %xmm0, 0xf0(%rsp)
xorl %eax, %eax
movq %rax, 0x100(%rsp)
movq %rax, 0xe0(%rsp)
movapd %xmm0, 0xd0(%rsp)
movq %rax, 0x160(%rsp)
movapd %xmm0, 0x150(%rsp)
movq %rax, 0xa0(%rsp)
movapd %xmm0, 0x90(%rsp)
movq %rax, 0x140(%rsp)
movapd %xmm0, 0x130(%rsp)
movq %rax, 0x120(%rsp)
movapd %xmm0, 0x110(%rsp)
leaq 0x238(%rsp), %rdi
movq %rax, (%rdi)
leaq 0x230(%rsp), %rsi
movq %rax, (%rsi)
leaq 0x228(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x220(%rsp), %rcx
movq %rax, (%rcx)
leaq 0x218(%rsp), %r8
movq %rax, (%r8)
movsd 0x78(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movq %rax, (%rsp)
xorps %xmm7, %xmm7
movsd 0x30(%rsp), %xmm0
movsd 0x38(%rsp), %xmm1
movsd 0x58(%rsp), %xmm2
movsd 0x60(%rsp), %xmm3
movsd 0x68(%rsp), %xmm4
movsd 0x70(%rsp), %xmm5
movsd 0x108(%rsp), %xmm6
callq 0x31ac
movq 0x40(%rsp), %rax
cmpq %rax, 0x48(%rsp)
je 0x4255
movl $0x1, %r15d
xorl %r12d, %r12d
leaq 0x88(%rsp), %r14
leaq 0x150(%rsp), %r13
leaq 0x130(%rsp), %rbp
leaq 0x110(%rsp), %rbx
movsd 0x238(%rsp), %xmm0
movsd 0x230(%rsp), %xmm1
movsd 0x228(%rsp), %xmm2
movsd 0x220(%rsp), %xmm3
movsd 0x218(%rsp), %xmm4
movsd (%rax,%r12,8), %xmm6
movsd 0x80(%rsp), %xmm5
callq 0x320f
movsd %xmm0, 0x88(%rsp)
movq 0x98(%rsp), %rsi
cmpq 0xa0(%rsp), %rsi
je 0x4021
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x98(%rsp)
jmp 0x4031
leaq 0x90(%rsp), %rdi
movq %r14, %rdx
callq 0x49ce
movq 0x40(%rsp), %rax
movsd (%rax,%r12,8), %xmm3
movq 0x90(%rsp), %rax
movsd (%rax,%r12,8), %xmm4
movsd 0x38(%rsp), %xmm0
movsd 0x78(%rsp), %xmm1
movsd 0x70(%rsp), %xmm2
callq 0x3438
movsd %xmm0, 0x88(%rsp)
movq 0xf8(%rsp), %rsi
cmpq 0x100(%rsp), %rsi
je 0x408e
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0xf8(%rsp)
jmp 0x409e
leaq 0xf0(%rsp), %rdi
movq %r14, %rdx
callq 0x49ce
movq 0x40(%rsp), %rax
movsd (%rax,%r12,8), %xmm3
movq 0x90(%rsp), %rax
movsd (%rax,%r12,8), %xmm4
xorps %xmm1, %xmm1
movsd 0x30(%rsp), %xmm0
movsd 0x68(%rsp), %xmm2
callq 0x3438
movsd %xmm0, 0x88(%rsp)
movq 0xd8(%rsp), %rsi
cmpq 0xe0(%rsp), %rsi
je 0x40f8
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0xd8(%rsp)
jmp 0x4108
leaq 0xd0(%rsp), %rdi
movq %r14, %rdx
callq 0x49ce
movq 0xd0(%rsp), %rax
movsd (%rax,%r12,8), %xmm0
movq 0xf0(%rsp), %rax
subsd (%rax,%r12,8), %xmm0
movsd %xmm0, 0x88(%rsp)
movq 0x158(%rsp), %rsi
cmpq 0x160(%rsp), %rsi
je 0x4151
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x158(%rsp)
jmp 0x415c
movq %r13, %rdi
movq %r14, %rdx
callq 0x49ce
movq 0x40(%rsp), %rax
movsd (%rax,%r12,8), %xmm4
movq 0x90(%rsp), %rax
movsd (%rax,%r12,8), %xmm5
movsd 0x38(%rsp), %xmm0
movsd 0x60(%rsp), %xmm1
movsd 0x80(%rsp), %xmm2
movsd 0x78(%rsp), %xmm3
callq 0x3449
movsd %xmm0, 0x88(%rsp)
movq 0x138(%rsp), %rsi
cmpq 0x140(%rsp), %rsi
je 0x41c2
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x138(%rsp)
jmp 0x41cd
movq %rbp, %rdi
movq %r14, %rdx
callq 0x49ce
movq 0x40(%rsp), %rax
movsd (%rax,%r12,8), %xmm4
movq 0x90(%rsp), %rax
movsd (%rax,%r12,8), %xmm5
xorps %xmm2, %xmm2
xorps %xmm3, %xmm3
movsd 0x30(%rsp), %xmm0
movsd 0x58(%rsp), %xmm1
callq 0x3449
movsd %xmm0, 0x88(%rsp)
movq 0x118(%rsp), %rsi
cmpq 0x120(%rsp), %rsi
je 0x422a
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x118(%rsp)
jmp 0x4235
movq %rbx, %rdi
movq %r14, %rdx
callq 0x49ce
movl %r15d, %r12d
movq 0x40(%rsp), %rax
movq 0x48(%rsp), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
incl %r15d
cmpq %r12, %rcx
ja 0x3fb3
leaq 0x358(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x2096(%rip), %rsi      # 0x62fe
leaq 0x209e(%rip), %rdx      # 0x630d
leaq 0x348(%rsp), %rdi
callq 0x345e
leaq 0x348(%rsp), %rdi
leaq 0x40(%rsp), %rsi
leaq 0x90(%rsp), %rdx
callq 0x5166
movq 0x348(%rsp), %rdi
cmpq %r14, %rdi
je 0x42b3
movq 0x358(%rsp), %rsi
incq %rsi
callq 0x2160
leaq 0x338(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x2048(%rip), %rsi      # 0x630e
leaq 0x204e(%rip), %rdx      # 0x631b
leaq 0x328(%rsp), %rdi
leaq 0x298(%rsp), %rbx
callq 0x345e
leaq 0x328(%rsp), %rdi
leaq 0x40(%rsp), %rsi
leaq 0xf0(%rsp), %rdx
callq 0x5166
movq 0x328(%rsp), %rdi
cmpq %r14, %rdi
je 0x4319
movq 0x338(%rsp), %rsi
incq %rsi
callq 0x2160
leaq 0x318(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x1ff0(%rip), %rsi      # 0x631c
leaq 0x1ff6(%rip), %rdx      # 0x6329
leaq 0x308(%rsp), %rdi
callq 0x345e
leaq 0x308(%rsp), %rdi
leaq 0x40(%rsp), %rsi
leaq 0xd0(%rsp), %rdx
callq 0x5166
movq 0x308(%rsp), %rdi
cmpq %r14, %rdi
je 0x4377
movq 0x318(%rsp), %rsi
incq %rsi
callq 0x2160
leaq 0x2f8(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x1fa0(%rip), %rsi      # 0x632a
leaq 0x1fa6(%rip), %rdx      # 0x6337
leaq 0x2e8(%rsp), %rdi
callq 0x345e
leaq 0x2e8(%rsp), %rdi
leaq 0x40(%rsp), %rsi
leaq 0x150(%rsp), %rdx
callq 0x5166
movq 0x2e8(%rsp), %rdi
cmpq %r14, %rdi
je 0x43d5
movq 0x2f8(%rsp), %rsi
incq %rsi
callq 0x2160
leaq 0x2d8(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x1f50(%rip), %rsi      # 0x6338
leaq 0x1f56(%rip), %rdx      # 0x6345
leaq 0x2c8(%rsp), %rdi
callq 0x345e
leaq 0x2c8(%rsp), %rdi
leaq 0x40(%rsp), %rsi
leaq 0x130(%rsp), %rdx
callq 0x5166
movq 0x2c8(%rsp), %rdi
cmpq %r14, %rdi
je 0x4433
movq 0x2d8(%rsp), %rsi
incq %rsi
callq 0x2160
leaq 0x2b8(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x1f00(%rip), %rsi      # 0x6346
leaq 0x1f06(%rip), %rdx      # 0x6353
leaq 0x2a8(%rsp), %rdi
callq 0x345e
leaq 0x2a8(%rsp), %rdi
leaq 0x40(%rsp), %rsi
leaq 0x110(%rsp), %rdx
callq 0x5166
movq 0x2a8(%rsp), %rdi
cmpq %r14, %rdi
je 0x4491
movq 0x2b8(%rsp), %rsi
incq %rsi
callq 0x2160
movq 0x110(%rsp), %rdi
testq %rdi, %rdi
je 0x44ae
movq 0x120(%rsp), %rsi
subq %rdi, %rsi
callq 0x2160
movq 0x130(%rsp), %rdi
testq %rdi, %rdi
je 0x44cb
movq 0x140(%rsp), %rsi
subq %rdi, %rsi
callq 0x2160
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x44e8
movq 0xa0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2160
movq 0x150(%rsp), %rdi
testq %rdi, %rdi
je 0x4505
movq 0x160(%rsp), %rsi
subq %rdi, %rsi
callq 0x2160
movq 0xd0(%rsp), %rdi
testq %rdi, %rdi
je 0x4522
movq 0xe0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2160
movq 0xf0(%rsp), %rdi
testq %rdi, %rdi
je 0x453f
movq 0x100(%rsp), %rsi
subq %rdi, %rsi
callq 0x2160
movq 0x200(%rsp), %rdi
testq %rdi, %rdi
je 0x455c
movq 0x210(%rsp), %rsi
subq %rdi, %rsi
callq 0x2160
movq 0x170(%rsp), %rdi
testq %rdi, %rdi
je 0x4579
movq 0x180(%rsp), %rsi
subq %rdi, %rsi
callq 0x2160
movq 0x1b0(%rsp), %rdi
testq %rdi, %rdi
je 0x4596
movq 0x1c0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2160
movq 0x190(%rsp), %rdi
testq %rdi, %rdi
je 0x45b3
movq 0x1a0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2160
movq 0x1e0(%rsp), %rdi
testq %rdi, %rdi
je 0x45d0
movq 0x1f0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2160
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0x45ed
movq 0xc0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2160
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x4604
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x2160
movq 0x288(%rsp), %rdi
cmpq %rbx, %rdi
je 0x4621
movq 0x298(%rsp), %rsi
incq %rsi
callq 0x2160
xorl %eax, %eax
addq $0x388, %rsp            # imm = 0x388
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x2a8(%rsp), %rdi
cmpq %r14, %rdi
je 0x478d
movq 0x2b8(%rsp), %rsi
jmp 0x4706
jmp 0x478a
movq %rax, %rbx
movq 0x2c8(%rsp), %rdi
cmpq %r14, %rdi
je 0x478d
movq 0x2d8(%rsp), %rsi
jmp 0x4706
jmp 0x478a
movq %rax, %rbx
movq 0x2e8(%rsp), %rdi
cmpq %r14, %rdi
je 0x478d
movq 0x2f8(%rsp), %rsi
jmp 0x4706
jmp 0x478a
movq %rax, %rbx
movq 0x308(%rsp), %rdi
cmpq %r14, %rdi
je 0x478d
movq 0x318(%rsp), %rsi
jmp 0x4706
jmp 0x478a
movq %rax, %rbx
movq 0x328(%rsp), %rdi
cmpq %r14, %rdi
je 0x478d
movq 0x338(%rsp), %rsi
jmp 0x4706
jmp 0x478a
movq %rax, %rbx
movq 0x348(%rsp), %rdi
cmpq %r14, %rdi
je 0x478d
movq 0x358(%rsp), %rsi
incq %rsi
callq 0x2160
jmp 0x478d
jmp 0x478a
jmp 0x478a
movq %rax, %rbx
movq 0x240(%rsp), %rdi
testq %rdi, %rdi
je 0x4739
movq 0x250(%rsp), %rsi
subq %rdi, %rsi
callq 0x2160
jmp 0x4739
movq %rax, %rbx
movq 0x258(%rsp), %rdi
testq %rdi, %rdi
je 0x4848
movq 0x268(%rsp), %rsi
jmp 0x483b
movq %rax, %rbx
movq 0x368(%rsp), %rdi
cmpq %r14, %rdi
je 0x4848
movq 0x378(%rsp), %rsi
incq %rsi
jmp 0x483e
jmp 0x4845
jmp 0x478a
jmp 0x478a
jmp 0x478a
jmp 0x478a
jmp 0x478a
movq %rax, %rbx
movq 0x110(%rsp), %rdi
testq %rdi, %rdi
leaq 0x298(%rsp), %r15
je 0x47b2
movq 0x120(%rsp), %rsi
subq %rdi, %rsi
callq 0x2160
movq 0x130(%rsp), %rdi
testq %rdi, %rdi
je 0x47cf
movq 0x140(%rsp), %rsi
subq %rdi, %rsi
callq 0x2160
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x47ec
movq 0xa0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2160
movq 0x150(%rsp), %rdi
testq %rdi, %rdi
je 0x4809
movq 0x160(%rsp), %rsi
subq %rdi, %rsi
callq 0x2160
movq 0xd0(%rsp), %rdi
testq %rdi, %rdi
je 0x4826
movq 0xe0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2160
movq 0xf0(%rsp), %rdi
testq %rdi, %rdi
je 0x4848
movq 0x100(%rsp), %rsi
subq %rdi, %rsi
callq 0x2160
jmp 0x4848
movq %rax, %rbx
movq 0x200(%rsp), %rdi
testq %rdi, %rdi
je 0x4865
movq 0x210(%rsp), %rsi
subq %rdi, %rsi
callq 0x2160
movq 0x170(%rsp), %rdi
testq %rdi, %rdi
je 0x4882
movq 0x180(%rsp), %rsi
subq %rdi, %rsi
callq 0x2160
movq 0x1b0(%rsp), %rdi
testq %rdi, %rdi
je 0x489f
movq 0x1c0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2160
movq 0x190(%rsp), %rdi
testq %rdi, %rdi
je 0x48bc
movq 0x1a0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2160
movq 0x1e0(%rsp), %rdi
testq %rdi, %rdi
je 0x48d9
movq 0x1f0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2160
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0x48f6
movq 0xc0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2160
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x490d
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x2160
movq 0x288(%rsp), %rdi
cmpq %r15, %rdi
je 0x492a
movq 0x298(%rsp), %rsi
incq %rsi
callq 0x2160
movq %rbx, %rdi
callq 0x2210