// File: /workspace/github_cpp_makefile_star2_O3/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 0x4acc
movq 0x5af3(%rip), %rdi      # 0x8fd8
leaq 0x2c55(%rip), %rsi      # 0x6141
movl $0x40, %edx
callq 0x2180
leaq 0x298(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x2c79(%rip), %rsi      # 0x6182
leaq 0x2c76(%rip), %rdx      # 0x6186
leaq 0x288(%rsp), %rdi
callq 0x3430
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 0x2bc3(%rip), %rsi      # 0x6187
leaq 0x2bcd(%rip), %rdx      # 0x6198
leaq 0x368(%rsp), %rdi
callq 0x3430
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 0x4c37
movq 0x368(%rsp), %rdi
cmpq %r14, %rdi
je 0x3640
movq 0x378(%rsp), %rsi
incq %rsi
callq 0x2160
leaq 0x190(%rsp), %rdi
callq 0x524f
movsd %xmm0, 0x30(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x524f
movsd %xmm0, 0x58(%rsp)
leaq 0xb0(%rsp), %rdi
callq 0x524f
movsd %xmm0, 0x70(%rsp)
leaq 0x170(%rsp), %rdi
callq 0x524f
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 0x2ce9
movsd %xmm0, 0x80(%rsp)
leaq 0xb0(%rsp), %rdi
leaq 0x40(%rsp), %rsi
movsd 0x80(%rsp), %xmm0
callq 0x2990
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 0x2a40
movsd 0x38(%rsp), %xmm1
movsd %xmm0, 0x60(%rsp)
movsd 0x30(%rsp), %xmm0
movsd 0x60(%rsp), %xmm2
callq 0x2bd1
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 0x2beb
movsd %xmm0, 0x38(%rsp)
movsd 0x38(%rsp), %xmm0
movapd %xmm0, %xmm1
subsd 0x60(%rsp), %xmm1
movsd %xmm1, 0x60(%rsp)
callq 0x298b
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 0x2cd8
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 0x2780
movsd %xmm0, 0x68(%rsp)
leaq 0x1e0(%rsp), %rdi
leaq 0x40(%rsp), %rsi
leaq 0xb0(%rsp), %rdx
movsd 0x30(%rsp), %xmm0
callq 0x27b9
movsd %xmm0, 0x58(%rsp)
movsd 0x30(%rsp), %xmm0
movsd 0x58(%rsp), %xmm1
callq 0x298b
movsd %xmm0, 0x1d0(%rsp)
leaq 0x258(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
callq 0x490a
leaq 0x240(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x490a
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 0x281a
movsd %xmm0, 0x108(%rsp)
movq 0x240(%rsp), %rdi
testq %rdi, %rdi
je 0x38d6
movq 0x250(%rsp), %rsi
subq %rdi, %rsi
callq 0x2160
movq 0x258(%rsp), %rdi
testq %rdi, %rdi
je 0x38f3
movq 0x268(%rsp), %rsi
subq %rdi, %rsi
callq 0x2160
movq 0x56de(%rip), %rdi      # 0x8fd8
leaq 0x2898(%rip), %rsi      # 0x6199
movl $0x13, %edx
callq 0x2180
movq 0x56c6(%rip), %rdi      # 0x8fd8
leaq 0x2894(%rip), %rsi      # 0x61ad
movl $0x17, %edx
callq 0x2180
movq 0x56ae(%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 0x5672(%rip), %rdi      # 0x8fd8
leaq 0x2858(%rip), %rsi      # 0x61c5
movl $0x17, %edx
callq 0x2180
movq 0x565a(%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 0x561e(%rip), %rdi      # 0x8fd8
leaq 0x281c(%rip), %rsi      # 0x61dd
movl $0x17, %edx
callq 0x2180
movq 0x5606(%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 0x55c7(%rip), %rdi      # 0x8fd8
leaq 0x27dd(%rip), %rsi      # 0x61f5
movl $0x17, %edx
callq 0x2180
movq 0x55af(%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 0x5573(%rip), %rdi      # 0x8fd8
leaq 0x27a1(%rip), %rsi      # 0x620d
movl $0x17, %edx
callq 0x2180
movq 0x555b(%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 0x551c(%rip), %rdi      # 0x8fd8
leaq 0x2762(%rip), %rsi      # 0x6225
movl $0x17, %edx
callq 0x2180
movq 0x5504(%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 0x54ca(%rip), %rdi      # 0x8fd8
leaq 0x2728(%rip), %rsi      # 0x623d
movl $0x17, %edx
callq 0x2180
movq 0x54b2(%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 0x5476(%rip), %rdi      # 0x8fd8
leaq 0x2617(%rip), %rsi      # 0x6180
movl $0x1, %edx
callq 0x2180
movq 0x545e(%rip), %rdi      # 0x8fd8
leaq 0x26d4(%rip), %rsi      # 0x6255
movl $0x10, %edx
callq 0x2180
movq 0x5446(%rip), %rdi      # 0x8fd8
leaq 0x26cd(%rip), %rsi      # 0x6266
movl $0x17, %edx
callq 0x2180
movq 0x542e(%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 0x53f2(%rip), %rdi      # 0x8fd8
leaq 0x2691(%rip), %rsi      # 0x627e
movl $0x17, %edx
callq 0x2180
movq 0x53da(%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 0x539e(%rip), %rdi      # 0x8fd8
leaq 0x2655(%rip), %rsi      # 0x6296
movl $0x17, %edx
callq 0x2180
movq 0x5386(%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 0x534c(%rip), %rdi      # 0x8fd8
leaq 0x261b(%rip), %rsi      # 0x62ae
movl $0x17, %edx
callq 0x2180
movq 0x5334(%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 0x52f8(%rip), %rdi      # 0x8fd8
leaq 0x25df(%rip), %rsi      # 0x62c6
movl $0x17, %edx
callq 0x2180
movq 0x52e0(%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 0x52a1(%rip), %rdi      # 0x8fd8
leaq 0x25a0(%rip), %rsi      # 0x62de
movl $0x17, %edx
callq 0x2180
movq 0x5289(%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 0x524a(%rip), %rdi      # 0x8fd8
leaq 0x2561(%rip), %rsi      # 0x62f6
movl $0x17, %edx
callq 0x2180
movq 0x5232(%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 0x51f8(%rip), %rdi      # 0x8fd8
leaq 0x2399(%rip), %rsi      # 0x6180
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 0x5393
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 0x3194
movq 0x40(%rsp), %rax
cmpq %rax, 0x48(%rsp)
je 0x422d
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 0x31f7
movsd %xmm0, 0x88(%rsp)
movq 0x98(%rsp), %rsi
cmpq 0xa0(%rsp), %rsi
je 0x3ff9
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x98(%rsp)
jmp 0x4009
leaq 0x90(%rsp), %rdi
movq %r14, %rdx
callq 0x49a6
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 0x3409
movsd %xmm0, 0x88(%rsp)
movq 0xf8(%rsp), %rsi
cmpq 0x100(%rsp), %rsi
je 0x4066
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0xf8(%rsp)
jmp 0x4076
leaq 0xf0(%rsp), %rdi
movq %r14, %rdx
callq 0x49a6
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 0x3409
movsd %xmm0, 0x88(%rsp)
movq 0xd8(%rsp), %rsi
cmpq 0xe0(%rsp), %rsi
je 0x40d0
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0xd8(%rsp)
jmp 0x40e0
leaq 0xd0(%rsp), %rdi
movq %r14, %rdx
callq 0x49a6
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 0x4129
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x158(%rsp)
jmp 0x4134
movq %r13, %rdi
movq %r14, %rdx
callq 0x49a6
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 0x341a
movsd %xmm0, 0x88(%rsp)
movq 0x138(%rsp), %rsi
cmpq 0x140(%rsp), %rsi
je 0x419a
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x138(%rsp)
jmp 0x41a5
movq %rbp, %rdi
movq %r14, %rdx
callq 0x49a6
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 0x341a
movsd %xmm0, 0x88(%rsp)
movq 0x118(%rsp), %rsi
cmpq 0x120(%rsp), %rsi
je 0x4202
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x118(%rsp)
jmp 0x420d
movq %rbx, %rdi
movq %r14, %rdx
callq 0x49a6
movl %r15d, %r12d
movq 0x40(%rsp), %rax
movq 0x48(%rsp), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
incl %r15d
cmpq %r12, %rcx
ja 0x3f8b
leaq 0x358(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x20ce(%rip), %rsi      # 0x630e
leaq 0x20d6(%rip), %rdx      # 0x631d
leaq 0x348(%rsp), %rdi
callq 0x3430
leaq 0x348(%rsp), %rdi
leaq 0x40(%rsp), %rsi
leaq 0x90(%rsp), %rdx
callq 0x513b
movq 0x348(%rsp), %rdi
cmpq %r14, %rdi
je 0x428b
movq 0x358(%rsp), %rsi
incq %rsi
callq 0x2160
leaq 0x338(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x2080(%rip), %rsi      # 0x631e
leaq 0x2086(%rip), %rdx      # 0x632b
leaq 0x328(%rsp), %rdi
leaq 0x298(%rsp), %rbx
callq 0x3430
leaq 0x328(%rsp), %rdi
leaq 0x40(%rsp), %rsi
leaq 0xf0(%rsp), %rdx
callq 0x513b
movq 0x328(%rsp), %rdi
cmpq %r14, %rdi
je 0x42f1
movq 0x338(%rsp), %rsi
incq %rsi
callq 0x2160
leaq 0x318(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x2028(%rip), %rsi      # 0x632c
leaq 0x202e(%rip), %rdx      # 0x6339
leaq 0x308(%rsp), %rdi
callq 0x3430
leaq 0x308(%rsp), %rdi
leaq 0x40(%rsp), %rsi
leaq 0xd0(%rsp), %rdx
callq 0x513b
movq 0x308(%rsp), %rdi
cmpq %r14, %rdi
je 0x434f
movq 0x318(%rsp), %rsi
incq %rsi
callq 0x2160
leaq 0x2f8(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x1fd8(%rip), %rsi      # 0x633a
leaq 0x1fde(%rip), %rdx      # 0x6347
leaq 0x2e8(%rsp), %rdi
callq 0x3430
leaq 0x2e8(%rsp), %rdi
leaq 0x40(%rsp), %rsi
leaq 0x150(%rsp), %rdx
callq 0x513b
movq 0x2e8(%rsp), %rdi
cmpq %r14, %rdi
je 0x43ad
movq 0x2f8(%rsp), %rsi
incq %rsi
callq 0x2160
leaq 0x2d8(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x1f88(%rip), %rsi      # 0x6348
leaq 0x1f8e(%rip), %rdx      # 0x6355
leaq 0x2c8(%rsp), %rdi
callq 0x3430
leaq 0x2c8(%rsp), %rdi
leaq 0x40(%rsp), %rsi
leaq 0x130(%rsp), %rdx
callq 0x513b
movq 0x2c8(%rsp), %rdi
cmpq %r14, %rdi
je 0x440b
movq 0x2d8(%rsp), %rsi
incq %rsi
callq 0x2160
leaq 0x2b8(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x1f38(%rip), %rsi      # 0x6356
leaq 0x1f3e(%rip), %rdx      # 0x6363
leaq 0x2a8(%rsp), %rdi
callq 0x3430
leaq 0x2a8(%rsp), %rdi
leaq 0x40(%rsp), %rsi
leaq 0x110(%rsp), %rdx
callq 0x513b
movq 0x2a8(%rsp), %rdi
cmpq %r14, %rdi
je 0x4469
movq 0x2b8(%rsp), %rsi
incq %rsi
callq 0x2160
movq 0x110(%rsp), %rdi
testq %rdi, %rdi
je 0x4486
movq 0x120(%rsp), %rsi
subq %rdi, %rsi
callq 0x2160
movq 0x130(%rsp), %rdi
testq %rdi, %rdi
je 0x44a3
movq 0x140(%rsp), %rsi
subq %rdi, %rsi
callq 0x2160
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x44c0
movq 0xa0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2160
movq 0x150(%rsp), %rdi
testq %rdi, %rdi
je 0x44dd
movq 0x160(%rsp), %rsi
subq %rdi, %rsi
callq 0x2160
movq 0xd0(%rsp), %rdi
testq %rdi, %rdi
je 0x44fa
movq 0xe0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2160
movq 0xf0(%rsp), %rdi
testq %rdi, %rdi
je 0x4517
movq 0x100(%rsp), %rsi
subq %rdi, %rsi
callq 0x2160
movq 0x200(%rsp), %rdi
testq %rdi, %rdi
je 0x4534
movq 0x210(%rsp), %rsi
subq %rdi, %rsi
callq 0x2160
movq 0x170(%rsp), %rdi
testq %rdi, %rdi
je 0x4551
movq 0x180(%rsp), %rsi
subq %rdi, %rsi
callq 0x2160
movq 0x1b0(%rsp), %rdi
testq %rdi, %rdi
je 0x456e
movq 0x1c0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2160
movq 0x190(%rsp), %rdi
testq %rdi, %rdi
je 0x458b
movq 0x1a0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2160
movq 0x1e0(%rsp), %rdi
testq %rdi, %rdi
je 0x45a8
movq 0x1f0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2160
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0x45c5
movq 0xc0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2160
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x45dc
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x2160
movq 0x288(%rsp), %rdi
cmpq %rbx, %rdi
je 0x45f9
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 0x4765
movq 0x2b8(%rsp), %rsi
jmp 0x46de
jmp 0x4762
movq %rax, %rbx
movq 0x2c8(%rsp), %rdi
cmpq %r14, %rdi
je 0x4765
movq 0x2d8(%rsp), %rsi
jmp 0x46de
jmp 0x4762
movq %rax, %rbx
movq 0x2e8(%rsp), %rdi
cmpq %r14, %rdi
je 0x4765
movq 0x2f8(%rsp), %rsi
jmp 0x46de
jmp 0x4762
movq %rax, %rbx
movq 0x308(%rsp), %rdi
cmpq %r14, %rdi
je 0x4765
movq 0x318(%rsp), %rsi
jmp 0x46de
jmp 0x4762
movq %rax, %rbx
movq 0x328(%rsp), %rdi
cmpq %r14, %rdi
je 0x4765
movq 0x338(%rsp), %rsi
jmp 0x46de
jmp 0x4762
movq %rax, %rbx
movq 0x348(%rsp), %rdi
cmpq %r14, %rdi
je 0x4765
movq 0x358(%rsp), %rsi
incq %rsi
callq 0x2160
jmp 0x4765
jmp 0x4762
jmp 0x4762
movq %rax, %rbx
movq 0x240(%rsp), %rdi
testq %rdi, %rdi
je 0x4711
movq 0x250(%rsp), %rsi
subq %rdi, %rsi
callq 0x2160
jmp 0x4711
movq %rax, %rbx
movq 0x258(%rsp), %rdi
testq %rdi, %rdi
je 0x4820
movq 0x268(%rsp), %rsi
jmp 0x4813
movq %rax, %rbx
movq 0x368(%rsp), %rdi
cmpq %r14, %rdi
je 0x4820
movq 0x378(%rsp), %rsi
incq %rsi
jmp 0x4816
jmp 0x481d
jmp 0x4762
jmp 0x4762
jmp 0x4762
jmp 0x4762
jmp 0x4762
movq %rax, %rbx
movq 0x110(%rsp), %rdi
testq %rdi, %rdi
leaq 0x298(%rsp), %r15
je 0x478a
movq 0x120(%rsp), %rsi
subq %rdi, %rsi
callq 0x2160
movq 0x130(%rsp), %rdi
testq %rdi, %rdi
je 0x47a7
movq 0x140(%rsp), %rsi
subq %rdi, %rsi
callq 0x2160
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x47c4
movq 0xa0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2160
movq 0x150(%rsp), %rdi
testq %rdi, %rdi
je 0x47e1
movq 0x160(%rsp), %rsi
subq %rdi, %rsi
callq 0x2160
movq 0xd0(%rsp), %rdi
testq %rdi, %rdi
je 0x47fe
movq 0xe0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2160
movq 0xf0(%rsp), %rdi
testq %rdi, %rdi
je 0x4820
movq 0x100(%rsp), %rsi
subq %rdi, %rsi
callq 0x2160
jmp 0x4820
movq %rax, %rbx
movq 0x200(%rsp), %rdi
testq %rdi, %rdi
je 0x483d
movq 0x210(%rsp), %rsi
subq %rdi, %rsi
callq 0x2160
movq 0x170(%rsp), %rdi
testq %rdi, %rdi
je 0x485a
movq 0x180(%rsp), %rsi
subq %rdi, %rsi
callq 0x2160
movq 0x1b0(%rsp), %rdi
testq %rdi, %rdi
je 0x4877
movq 0x1c0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2160
movq 0x190(%rsp), %rdi
testq %rdi, %rdi
je 0x4894
movq 0x1a0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2160
movq 0x1e0(%rsp), %rdi
testq %rdi, %rdi
je 0x48b1
movq 0x1f0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2160
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0x48ce
movq 0xc0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2160
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x48e5
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x2160
movq 0x288(%rsp), %rdi
cmpq %r15, %rdi
je 0x4902
movq 0x298(%rsp), %rsi
incq %rsi
callq 0x2160
movq %rbx, %rdi
callq 0x2210