// File: 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
movq %rsp, %rbp
subq $0x6a0, %rsp            # imm = 0x6A0
movl $0x0, -0x4(%rbp)
callq 0x6d00
movq 0x6a3a(%rip), %rdi      # 0xafd8
leaq 0x3b6c(%rip), %rsi      # 0x8111
callq 0x2180
leaq -0x29(%rbp), %rdi
movq %rdi, -0x3e0(%rbp)
callq 0x22e0
movq -0x3e0(%rbp), %rdx
leaq 0x3b8a(%rip), %rsi      # 0x8152
leaq -0x28(%rbp), %rdi
callq 0x4000
jmp 0x45d3
leaq -0x29(%rbp), %rdi
callq 0x21d0
movq $0x0, -0x60(%rbp)
movq $0x0, -0x68(%rbp)
movq $0x0, -0x70(%rbp)
movq $0x0, -0x78(%rbp)
movq $0x0, -0x80(%rbp)
movq $0x0, -0x88(%rbp)
movq $0x0, -0x90(%rbp)
movq $0x0, -0x98(%rbp)
movq $0x0, -0xa0(%rbp)
movq $0x0, -0xa8(%rbp)
movq $0x0, -0xb0(%rbp)
movq $0x0, -0xb8(%rbp)
movq $0x0, -0xc0(%rbp)
movq $0x0, -0xc8(%rbp)
movq $0x0, -0xd0(%rbp)
movq $0x0, -0xd8(%rbp)
movq $0x0, -0xe0(%rbp)
movq $0x0, -0xe8(%rbp)
movq $0x0, -0xf0(%rbp)
movq $0x0, -0xf8(%rbp)
leaq -0x110(%rbp), %rdi
callq 0x5bf0
leaq -0x128(%rbp), %rdi
callq 0x5bf0
leaq -0x140(%rbp), %rdi
callq 0x5bf0
leaq -0x158(%rbp), %rdi
callq 0x5bf0
leaq -0x170(%rbp), %rdi
callq 0x5bf0
leaq -0x188(%rbp), %rdi
callq 0x5bf0
leaq -0x1a0(%rbp), %rdi
callq 0x5bf0
leaq -0x48(%rbp), %rdi
leaq -0x50(%rbp), %rsi
leaq -0x58(%rbp), %rdx
callq 0x2500
jmp 0x4710
leaq -0x1c1(%rbp), %rdi
movq %rdi, -0x3e8(%rbp)
callq 0x22e0
movq -0x3e8(%rbp), %rdx
leaq 0x3a26(%rip), %rsi      # 0x8157
leaq -0x1c0(%rbp), %rdi
callq 0x4000
jmp 0x473f
movq %rsp, %rax
leaq -0x1a0(%rbp), %rcx
movq %rcx, 0x8(%rax)
leaq -0x188(%rbp), %rcx
movq %rcx, (%rax)
leaq -0x1c0(%rbp), %rdi
leaq -0x110(%rbp), %rsi
leaq -0x128(%rbp), %rdx
leaq -0x140(%rbp), %rcx
leaq -0x158(%rbp), %r8
leaq -0x170(%rbp), %r9
callq 0x6de0
jmp 0x4788
leaq -0x1c0(%rbp), %rdi
callq 0x20e0
leaq -0x1c1(%rbp), %rdi
callq 0x21d0
leaq -0x158(%rbp), %rdi
callq 0x7420
movsd %xmm0, -0x3f0(%rbp)
jmp 0x47b6
movsd -0x3f0(%rbp), %xmm0
movsd %xmm0, -0xd0(%rbp)
leaq -0x110(%rbp), %rdi
callq 0x7420
movsd %xmm0, -0x3f8(%rbp)
jmp 0x47dc
movsd -0x3f8(%rbp), %xmm0
movsd %xmm0, -0xd8(%rbp)
leaq -0x128(%rbp), %rdi
callq 0x7420
movsd %xmm0, -0x400(%rbp)
jmp 0x4802
movsd -0x400(%rbp), %xmm0
movsd %xmm0, -0xe0(%rbp)
leaq -0x188(%rbp), %rdi
callq 0x7420
movsd %xmm0, -0x408(%rbp)
jmp 0x4828
movsd -0x408(%rbp), %xmm0
movsd %xmm0, -0xe8(%rbp)
movsd -0x48(%rbp), %xmm0
movsd -0x50(%rbp), %xmm1
movsd -0x58(%rbp), %xmm2
leaq -0x128(%rbp), %rdi
leaq -0x110(%rbp), %rsi
leaq -0x158(%rbp), %rdx
leaq -0x188(%rbp), %rcx
callq 0x36e0
movsd %xmm0, -0x410(%rbp)
jmp 0x4872
movsd -0x410(%rbp), %xmm0
movsd %xmm0, -0x70(%rbp)
movsd -0x70(%rbp), %xmm0
leaq -0x128(%rbp), %rdi
leaq -0x110(%rbp), %rsi
callq 0x2d40
movsd %xmm0, -0x418(%rbp)
jmp 0x48a1
movsd -0x418(%rbp), %xmm0
movsd %xmm0, -0xf0(%rbp)
movsd -0xd0(%rbp), %xmm0
movsd -0xf0(%rbp), %xmm1
movsd -0x70(%rbp), %xmm2
leaq -0x128(%rbp), %rdi
leaq -0x110(%rbp), %rsi
leaq -0x158(%rbp), %rdx
callq 0x2f20
movsd %xmm0, -0x420(%rbp)
jmp 0x48ea
movsd -0x420(%rbp), %xmm0
movsd %xmm0, -0xf8(%rbp)
movsd -0xd0(%rbp), %xmm0
movsd -0xf0(%rbp), %xmm1
movsd -0xf8(%rbp), %xmm2
callq 0x3300
movsd %xmm0, -0x428(%rbp)
jmp 0x4921
movsd -0x428(%rbp), %xmm0
movsd %xmm0, -0x90(%rbp)
movsd -0xe8(%rbp), %xmm0
movsd -0xe0(%rbp), %xmm1
movsd -0xd8(%rbp), %xmm2
movsd -0x90(%rbp), %xmm3
leaq -0x110(%rbp), %rdi
leaq -0x188(%rbp), %rsi
leaq -0x128(%rbp), %rdx
callq 0x33a0
movsd %xmm0, -0x430(%rbp)
jmp 0x4975
movsd -0x430(%rbp), %xmm0
movsd %xmm0, -0x60(%rbp)
movsd -0x60(%rbp), %xmm0
movsd -0xf8(%rbp), %xmm1
subsd %xmm1, %xmm0
movsd %xmm0, -0x78(%rbp)
movsd -0x60(%rbp), %xmm0
movsd -0x78(%rbp), %xmm1
callq 0x2d20
movsd %xmm0, -0x438(%rbp)
jmp 0x49b1
movsd -0x438(%rbp), %xmm0
movsd %xmm0, -0x80(%rbp)
movsd -0xe8(%rbp), %xmm0
movsd -0xd8(%rbp), %xmm1
movsd -0xe0(%rbp), %xmm2
movsd -0x60(%rbp), %xmm3
movsd -0x90(%rbp), %xmm4
callq 0x3660
movsd %xmm0, -0x440(%rbp)
jmp 0x49f2
movsd -0x440(%rbp), %xmm0
movsd %xmm0, -0x68(%rbp)
movq $0x0, -0x88(%rbp)
leaq -0x170(%rbp), %rdi
leaq -0x110(%rbp), %rsi
callq 0x2750
movsd %xmm0, -0x448(%rbp)
jmp 0x4a27
movsd -0x448(%rbp), %xmm0
movsd %xmm0, -0x98(%rbp)
movsd -0x98(%rbp), %xmm0
leaq -0x170(%rbp), %rdi
leaq -0x110(%rbp), %rsi
callq 0x2860
movsd %xmm0, -0x450(%rbp)
jmp 0x4a5c
movsd -0x450(%rbp), %xmm0
movsd %xmm0, -0xa0(%rbp)
movsd -0x98(%rbp), %xmm0
leaq -0x140(%rbp), %rdi
leaq -0x110(%rbp), %rsi
leaq -0x128(%rbp), %rdx
callq 0x28d0
movsd %xmm0, -0x458(%rbp)
jmp 0x4a98
movsd -0x458(%rbp), %xmm0
movsd %xmm0, -0xb0(%rbp)
movsd -0x98(%rbp), %xmm0
movsd -0xb0(%rbp), %xmm1
callq 0x2d20
movsd %xmm0, -0x460(%rbp)
jmp 0x4ac7
movsd -0x460(%rbp), %xmm0
movsd %xmm0, -0xb8(%rbp)
movq $0x0, -0xa8(%rbp)
movq $0x0, -0xc8(%rbp)
leaq -0x1e0(%rbp), %rdi
leaq -0x128(%rbp), %rsi
callq 0x5c10
jmp 0x4b02
leaq -0x1f8(%rbp), %rdi
leaq -0x110(%rbp), %rsi
callq 0x5c10
jmp 0x4b17
movsd -0x60(%rbp), %xmm0
movsd -0x98(%rbp), %xmm1
movsd -0x78(%rbp), %xmm2
movsd -0xb0(%rbp), %xmm3
movsd -0x68(%rbp), %xmm4
movsd -0xa0(%rbp), %xmm5
movsd -0x70(%rbp), %xmm6
movsd -0x90(%rbp), %xmm7
leaq -0x1e0(%rbp), %rdi
leaq -0x1f8(%rbp), %rsi
callq 0x2a20
movsd %xmm0, -0x468(%rbp)
jmp 0x4b68
movsd -0x468(%rbp), %xmm0
movsd %xmm0, -0xc0(%rbp)
leaq -0x1f8(%rbp), %rdi
callq 0x5d00
leaq -0x1e0(%rbp), %rdi
callq 0x5d00
movq 0x6441(%rip), %rdi      # 0xafd8
leaq 0x35cb(%rip), %rsi      # 0x8169
callq 0x2180
jmp 0x4ba5
movq 0x642c(%rip), %rdi      # 0xafd8
leaq 0x35ca(%rip), %rsi      # 0x817d
callq 0x2180
movq %rax, -0x470(%rbp)
jmp 0x4bc1
movq -0x470(%rbp), %rdi
movsd -0x60(%rbp), %xmm0
callq 0x2320
movq %rax, -0x478(%rbp)
jmp 0x4bdb
movq -0x478(%rbp), %rdi
movq 0x63d7(%rip), %rsi      # 0xafc0
callq 0x21b0
jmp 0x4bf0
movq 0x63e1(%rip), %rdi      # 0xafd8
leaq 0x3597(%rip), %rsi      # 0x8195
callq 0x2180
movq %rax, -0x480(%rbp)
jmp 0x4c0c
movq -0x480(%rbp), %rdi
movsd -0x68(%rbp), %xmm0
callq 0x2320
movq %rax, -0x488(%rbp)
jmp 0x4c26
movq -0x488(%rbp), %rdi
movq 0x638c(%rip), %rsi      # 0xafc0
callq 0x21b0
jmp 0x4c3b
movq 0x6396(%rip), %rdi      # 0xafd8
leaq 0x3564(%rip), %rsi      # 0x81ad
callq 0x2180
movq %rax, -0x490(%rbp)
jmp 0x4c57
movq -0x490(%rbp), %rdi
movsd -0x70(%rbp), %xmm0
callq 0x2320
movq %rax, -0x498(%rbp)
jmp 0x4c71
movq -0x498(%rbp), %rdi
movq 0x6341(%rip), %rsi      # 0xafc0
callq 0x21b0
jmp 0x4c86
movq 0x634b(%rip), %rdi      # 0xafd8
leaq 0x3531(%rip), %rsi      # 0x81c5
callq 0x2180
movq %rax, -0x4a0(%rbp)
jmp 0x4ca2
movq -0x4a0(%rbp), %rdi
movsd -0x78(%rbp), %xmm0
callq 0x2320
movq %rax, -0x4a8(%rbp)
jmp 0x4cbc
movq -0x4a8(%rbp), %rdi
movq 0x62f6(%rip), %rsi      # 0xafc0
callq 0x21b0
jmp 0x4cd1
movq 0x6300(%rip), %rdi      # 0xafd8
leaq 0x34fe(%rip), %rsi      # 0x81dd
callq 0x2180
movq %rax, -0x4b0(%rbp)
jmp 0x4ced
movq -0x4b0(%rbp), %rdi
movsd -0x80(%rbp), %xmm0
callq 0x2320
movq %rax, -0x4b8(%rbp)
jmp 0x4d07
movq -0x4b8(%rbp), %rdi
movq 0x62ab(%rip), %rsi      # 0xafc0
callq 0x21b0
jmp 0x4d1c
movq 0x62b5(%rip), %rdi      # 0xafd8
leaq 0x34cb(%rip), %rsi      # 0x81f5
callq 0x2180
movq %rax, -0x4c0(%rbp)
jmp 0x4d38
movq -0x4c0(%rbp), %rdi
movsd -0x88(%rbp), %xmm0
callq 0x2320
movq %rax, -0x4c8(%rbp)
jmp 0x4d55
movq -0x4c8(%rbp), %rdi
movq 0x625d(%rip), %rsi      # 0xafc0
callq 0x21b0
jmp 0x4d6a
movq 0x6267(%rip), %rdi      # 0xafd8
leaq 0x3495(%rip), %rsi      # 0x820d
callq 0x2180
movq %rax, -0x4d0(%rbp)
jmp 0x4d86
movq -0x4d0(%rbp), %rdi
movsd -0x90(%rbp), %xmm0
callq 0x2320
movq %rax, -0x4d8(%rbp)
jmp 0x4da3
movq -0x4d8(%rbp), %rdi
movq 0x620f(%rip), %rsi      # 0xafc0
callq 0x21b0
jmp 0x4db8
movq 0x6219(%rip), %rdi      # 0xafd8
leaq 0x338a(%rip), %rsi      # 0x8150
callq 0x2180
jmp 0x4dcd
movq 0x6204(%rip), %rdi      # 0xafd8
leaq 0x344a(%rip), %rsi      # 0x8225
callq 0x2180
jmp 0x4de2
movq 0x61ef(%rip), %rdi      # 0xafd8
leaq 0x3446(%rip), %rsi      # 0x8236
callq 0x2180
movq %rax, -0x4e0(%rbp)
jmp 0x4dfe
movq -0x4e0(%rbp), %rdi
movsd -0x98(%rbp), %xmm0
callq 0x2320
movq %rax, -0x4e8(%rbp)
jmp 0x4e1b
movq -0x4e8(%rbp), %rdi
movq 0x6197(%rip), %rsi      # 0xafc0
callq 0x21b0
jmp 0x4e30
movq 0x61a1(%rip), %rdi      # 0xafd8
leaq 0x3410(%rip), %rsi      # 0x824e
callq 0x2180
movq %rax, -0x4f0(%rbp)
jmp 0x4e4c
movq -0x4f0(%rbp), %rdi
movsd -0xa0(%rbp), %xmm0
callq 0x2320
movq %rax, -0x4f8(%rbp)
jmp 0x4e69
movq -0x4f8(%rbp), %rdi
movq 0x6149(%rip), %rsi      # 0xafc0
callq 0x21b0
jmp 0x4e7e
movq 0x6153(%rip), %rdi      # 0xafd8
leaq 0x33da(%rip), %rsi      # 0x8266
callq 0x2180
movq %rax, -0x500(%rbp)
jmp 0x4e9a
movq -0x500(%rbp), %rdi
movsd -0xa8(%rbp), %xmm0
callq 0x2320
movq %rax, -0x508(%rbp)
jmp 0x4eb7
movq -0x508(%rbp), %rdi
movq 0x60fb(%rip), %rsi      # 0xafc0
callq 0x21b0
jmp 0x4ecc
movq 0x6105(%rip), %rdi      # 0xafd8
leaq 0x33a4(%rip), %rsi      # 0x827e
callq 0x2180
movq %rax, -0x510(%rbp)
jmp 0x4ee8
movq -0x510(%rbp), %rdi
movsd -0xb0(%rbp), %xmm0
callq 0x2320
movq %rax, -0x518(%rbp)
jmp 0x4f05
movq -0x518(%rbp), %rdi
movq 0x60ad(%rip), %rsi      # 0xafc0
callq 0x21b0
jmp 0x4f1a
movq 0x60b7(%rip), %rdi      # 0xafd8
leaq 0x336e(%rip), %rsi      # 0x8296
callq 0x2180
movq %rax, -0x520(%rbp)
jmp 0x4f36
movq -0x520(%rbp), %rdi
movsd -0xb8(%rbp), %xmm0
callq 0x2320
movq %rax, -0x528(%rbp)
jmp 0x4f53
movq -0x528(%rbp), %rdi
movq 0x605f(%rip), %rsi      # 0xafc0
callq 0x21b0
jmp 0x4f68
movq 0x6069(%rip), %rdi      # 0xafd8
leaq 0x3338(%rip), %rsi      # 0x82ae
callq 0x2180
movq %rax, -0x530(%rbp)
jmp 0x4f84
movq -0x530(%rbp), %rdi
movsd -0xc0(%rbp), %xmm0
callq 0x2320
movq %rax, -0x538(%rbp)
jmp 0x4fa1
movq -0x538(%rbp), %rdi
movq 0x6011(%rip), %rsi      # 0xafc0
callq 0x21b0
jmp 0x4fb6
movq 0x601b(%rip), %rdi      # 0xafd8
leaq 0x3302(%rip), %rsi      # 0x82c6
callq 0x2180
movq %rax, -0x540(%rbp)
jmp 0x4fd2
movq -0x540(%rbp), %rdi
movsd -0xc8(%rbp), %xmm0
callq 0x2320
movq %rax, -0x548(%rbp)
jmp 0x4fef
movq -0x548(%rbp), %rdi
movq 0x5fc3(%rip), %rsi      # 0xafc0
callq 0x21b0
jmp 0x5004
movq 0x5fcd(%rip), %rdi      # 0xafd8
leaq 0x313e(%rip), %rsi      # 0x8150
callq 0x2180
jmp 0x5019
movsd -0x60(%rbp), %xmm0
movsd -0x68(%rbp), %xmm1
movsd -0x70(%rbp), %xmm2
movsd -0x78(%rbp), %xmm3
movsd -0x80(%rbp), %xmm4
movsd -0x88(%rbp), %xmm5
movsd -0x90(%rbp), %xmm6
movsd -0x98(%rbp), %xmm7
movsd -0xa0(%rbp), %xmm8
movsd -0xa8(%rbp), %xmm9
movsd -0xb0(%rbp), %xmm10
movsd -0xb8(%rbp), %xmm11
movsd -0xc0(%rbp), %xmm12
movsd -0xc8(%rbp), %xmm13
movq %rsp, %rax
movsd %xmm13, 0x28(%rax)
movsd %xmm12, 0x20(%rax)
movsd %xmm11, 0x18(%rax)
movsd %xmm10, 0x10(%rax)
movsd %xmm9, 0x8(%rax)
movsd %xmm8, (%rax)
callq 0x7720
jmp 0x50ad
leaq -0x210(%rbp), %rdi
callq 0x5bf0
leaq -0x228(%rbp), %rdi
callq 0x5bf0
leaq -0x240(%rbp), %rdi
callq 0x5bf0
leaq -0x258(%rbp), %rdi
callq 0x5bf0
leaq -0x270(%rbp), %rdi
callq 0x5bf0
leaq -0x288(%rbp), %rdi
callq 0x5bf0
movq $0x0, -0x290(%rbp)
movq $0x0, -0x298(%rbp)
movq $0x0, -0x2a0(%rbp)
movq $0x0, -0x2a8(%rbp)
movq $0x0, -0x2b0(%rbp)
movsd -0x98(%rbp), %xmm0
movsd -0x60(%rbp), %xmm1
movsd -0xb0(%rbp), %xmm2
movsd -0x78(%rbp), %xmm3
movsd -0xa0(%rbp), %xmm4
movsd -0x68(%rbp), %xmm5
movsd -0xc0(%rbp), %xmm6
movsd -0x88(%rbp), %xmm7
movsd -0xc8(%rbp), %xmm8
movsd -0x90(%rbp), %xmm9
movq %rsp, %rax
movsd %xmm9, 0x8(%rax)
movsd %xmm8, (%rax)
leaq -0x290(%rbp), %rdi
leaq -0x298(%rbp), %rsi
leaq -0x2a0(%rbp), %rdx
leaq -0x2a8(%rbp), %rcx
leaq -0x2b0(%rbp), %r8
callq 0x3b60
jmp 0x51ad
movl $0x0, -0x2b4(%rbp)
movl -0x2b4(%rbp), %eax
movq %rax, -0x550(%rbp)
leaq -0x110(%rbp), %rdi
callq 0x40f0
movq %rax, %rcx
movq -0x550(%rbp), %rax
cmpq %rcx, %rax
jae 0x56ee
movsd -0x290(%rbp), %xmm0
movsd %xmm0, -0x588(%rbp)
movsd -0x298(%rbp), %xmm0
movsd %xmm0, -0x580(%rbp)
movsd -0x2a0(%rbp), %xmm0
movsd %xmm0, -0x578(%rbp)
movsd -0x2a8(%rbp), %xmm0
movsd %xmm0, -0x570(%rbp)
movsd -0x2b0(%rbp), %xmm0
movsd %xmm0, -0x568(%rbp)
movsd -0x70(%rbp), %xmm0
movsd %xmm0, -0x560(%rbp)
movl -0x2b4(%rbp), %eax
movl %eax, %esi
leaq -0x110(%rbp), %rdi
callq 0x4130
movsd -0x588(%rbp), %xmm0
movsd -0x580(%rbp), %xmm1
movsd -0x578(%rbp), %xmm2
movsd -0x570(%rbp), %xmm3
movsd -0x568(%rbp), %xmm4
movsd -0x560(%rbp), %xmm5
movsd (%rax), %xmm6
callq 0x3c60
movsd %xmm0, -0x558(%rbp)
jmp 0x5297
movsd -0x558(%rbp), %xmm0
movsd %xmm0, -0x2c0(%rbp)
leaq -0x258(%rbp), %rdi
leaq -0x2c0(%rbp), %rsi
callq 0x5d60
jmp 0x52bc
movsd -0x60(%rbp), %xmm0
movsd %xmm0, -0x5b0(%rbp)
movsd -0x90(%rbp), %xmm0
movsd %xmm0, -0x5a8(%rbp)
movsd -0x68(%rbp), %xmm0
movsd %xmm0, -0x5a0(%rbp)
movl -0x2b4(%rbp), %eax
movl %eax, %esi
leaq -0x110(%rbp), %rdi
callq 0x4130
movsd (%rax), %xmm0
movsd %xmm0, -0x598(%rbp)
movl -0x2b4(%rbp), %eax
movl %eax, %esi
leaq -0x258(%rbp), %rdi
callq 0x4130
movsd -0x5b0(%rbp), %xmm0
movsd -0x5a8(%rbp), %xmm1
movsd -0x5a0(%rbp), %xmm2
movsd -0x598(%rbp), %xmm3
movsd (%rax), %xmm4
callq 0x3f70
movsd %xmm0, -0x590(%rbp)
jmp 0x534d
movsd -0x590(%rbp), %xmm0
movsd %xmm0, -0x2c8(%rbp)
leaq -0x210(%rbp), %rdi
leaq -0x2c8(%rbp), %rsi
callq 0x5d60
jmp 0x5372
movsd -0x98(%rbp), %xmm0
movsd %xmm0, -0x5d8(%rbp)
movsd -0xc8(%rbp), %xmm0
movsd %xmm0, -0x5d0(%rbp)
movsd -0xa0(%rbp), %xmm0
movsd %xmm0, -0x5c8(%rbp)
movl -0x2b4(%rbp), %eax
movl %eax, %esi
leaq -0x110(%rbp), %rdi
callq 0x4130
movsd (%rax), %xmm0
movsd %xmm0, -0x5c0(%rbp)
movl -0x2b4(%rbp), %eax
movl %eax, %esi
leaq -0x258(%rbp), %rdi
callq 0x4130
movsd -0x5d8(%rbp), %xmm0
movsd -0x5d0(%rbp), %xmm1
movsd -0x5c8(%rbp), %xmm2
movsd -0x5c0(%rbp), %xmm3
movsd (%rax), %xmm4
callq 0x3f70
movsd %xmm0, -0x5b8(%rbp)
jmp 0x5409
movsd -0x5b8(%rbp), %xmm0
movsd %xmm0, -0x2d0(%rbp)
leaq -0x228(%rbp), %rdi
leaq -0x2d0(%rbp), %rsi
callq 0x5d60
jmp 0x542e
movl -0x2b4(%rbp), %eax
movl %eax, %esi
leaq -0x228(%rbp), %rdi
callq 0x4130
movsd (%rax), %xmm0
movsd %xmm0, -0x5e0(%rbp)
movl -0x2b4(%rbp), %eax
movl %eax, %esi
leaq -0x210(%rbp), %rdi
callq 0x4130
movsd -0x5e0(%rbp), %xmm0
movsd (%rax), %xmm1
subsd %xmm1, %xmm0
movsd %xmm0, -0x2d8(%rbp)
leaq -0x240(%rbp), %rdi
leaq -0x2d8(%rbp), %rsi
callq 0x5d60
jmp 0x548f
movsd -0x60(%rbp), %xmm0
movsd %xmm0, -0x610(%rbp)
movsd -0x78(%rbp), %xmm0
movsd %xmm0, -0x608(%rbp)
movsd -0x70(%rbp), %xmm0
movsd %xmm0, -0x600(%rbp)
movsd -0x90(%rbp), %xmm0
movsd %xmm0, -0x5f8(%rbp)
movl -0x2b4(%rbp), %eax
movl %eax, %esi
leaq -0x110(%rbp), %rdi
callq 0x4130
movsd (%rax), %xmm0
movsd %xmm0, -0x5f0(%rbp)
movl -0x2b4(%rbp), %eax
movl %eax, %esi
leaq -0x258(%rbp), %rdi
callq 0x4130
movsd -0x610(%rbp), %xmm0
movsd -0x608(%rbp), %xmm1
movsd -0x600(%rbp), %xmm2
movsd -0x5f8(%rbp), %xmm3
movsd -0x5f0(%rbp), %xmm4
movsd (%rax), %xmm5
callq 0x3fb0
movsd %xmm0, -0x5e8(%rbp)
jmp 0x5535
movsd -0x5e8(%rbp), %xmm0
movsd %xmm0, -0x2e0(%rbp)
leaq -0x270(%rbp), %rdi
leaq -0x2e0(%rbp), %rsi
callq 0x5d60
jmp 0x555a
movsd -0x98(%rbp), %xmm0
movsd %xmm0, -0x640(%rbp)
movsd -0xb0(%rbp), %xmm0
movsd %xmm0, -0x638(%rbp)
movsd -0xa8(%rbp), %xmm0
movsd %xmm0, -0x630(%rbp)
movsd -0xc8(%rbp), %xmm0
movsd %xmm0, -0x628(%rbp)
movl -0x2b4(%rbp), %eax
movl %eax, %esi
leaq -0x110(%rbp), %rdi
callq 0x4130
movsd (%rax), %xmm0
movsd %xmm0, -0x620(%rbp)
movl -0x2b4(%rbp), %eax
movl %eax, %esi
leaq -0x258(%rbp), %rdi
callq 0x4130
movsd -0x640(%rbp), %xmm0
movsd -0x638(%rbp), %xmm1
movsd -0x630(%rbp), %xmm2
movsd -0x628(%rbp), %xmm3
movsd -0x620(%rbp), %xmm4
movsd (%rax), %xmm5
callq 0x3fb0
movsd %xmm0, -0x618(%rbp)
jmp 0x5609
movsd -0x618(%rbp), %xmm0
movsd %xmm0, -0x2e8(%rbp)
leaq -0x288(%rbp), %rdi
leaq -0x2e8(%rbp), %rsi
callq 0x5d60
jmp 0x562e
jmp 0x5630
movl -0x2b4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2b4(%rbp)
jmp 0x51b7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x29(%rbp), %rdi
callq 0x21d0
jmp 0x5bdc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x5b7f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x5695
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x1c0(%rbp), %rdi
callq 0x20e0
leaq -0x1c1(%rbp), %rdi
callq 0x21d0
jmp 0x5b7f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x56cc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x1f8(%rbp), %rdi
callq 0x5d00
leaq -0x1e0(%rbp), %rdi
callq 0x5d00
jmp 0x5b7f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x5b37
leaq -0x309(%rbp), %rdi
movq %rdi, -0x648(%rbp)
callq 0x22e0
movq -0x648(%rbp), %rdx
leaq 0x2bcf(%rip), %rsi      # 0x82de
leaq -0x308(%rbp), %rdi
callq 0x4000
jmp 0x571d
leaq -0x308(%rbp), %rdi
leaq -0x110(%rbp), %rsi
leaq -0x258(%rbp), %rdx
callq 0x72e0
jmp 0x5739
leaq -0x308(%rbp), %rdi
callq 0x20e0
leaq -0x309(%rbp), %rdi
callq 0x21d0
leaq -0x331(%rbp), %rdi
movq %rdi, -0x650(%rbp)
callq 0x22e0
movq -0x650(%rbp), %rdx
leaq 0x2b7c(%rip), %rsi      # 0x82ee
leaq -0x330(%rbp), %rdi
callq 0x4000
jmp 0x5780
leaq -0x330(%rbp), %rdi
leaq -0x110(%rbp), %rsi
leaq -0x210(%rbp), %rdx
callq 0x72e0
jmp 0x579c
leaq -0x330(%rbp), %rdi
callq 0x20e0
leaq -0x331(%rbp), %rdi
callq 0x21d0
leaq -0x359(%rbp), %rdi
movq %rdi, -0x658(%rbp)
callq 0x22e0
movq -0x658(%rbp), %rdx
leaq 0x2b27(%rip), %rsi      # 0x82fc
leaq -0x358(%rbp), %rdi
callq 0x4000
jmp 0x57e3
leaq -0x358(%rbp), %rdi
leaq -0x110(%rbp), %rsi
leaq -0x228(%rbp), %rdx
callq 0x72e0
jmp 0x57ff
leaq -0x358(%rbp), %rdi
callq 0x20e0
leaq -0x359(%rbp), %rdi
callq 0x21d0
leaq -0x381(%rbp), %rdi
movq %rdi, -0x660(%rbp)
callq 0x22e0
movq -0x660(%rbp), %rdx
leaq 0x2ad2(%rip), %rsi      # 0x830a
leaq -0x380(%rbp), %rdi
callq 0x4000
jmp 0x5846
leaq -0x380(%rbp), %rdi
leaq -0x110(%rbp), %rsi
leaq -0x240(%rbp), %rdx
callq 0x72e0
jmp 0x5862
leaq -0x380(%rbp), %rdi
callq 0x20e0
leaq -0x381(%rbp), %rdi
callq 0x21d0
leaq -0x3a9(%rbp), %rdi
movq %rdi, -0x668(%rbp)
callq 0x22e0
movq -0x668(%rbp), %rdx
leaq 0x2a7d(%rip), %rsi      # 0x8318
leaq -0x3a8(%rbp), %rdi
callq 0x4000
jmp 0x58a9
leaq -0x3a8(%rbp), %rdi
leaq -0x110(%rbp), %rsi
leaq -0x270(%rbp), %rdx
callq 0x72e0
jmp 0x58c5
leaq -0x3a8(%rbp), %rdi
callq 0x20e0
leaq -0x3a9(%rbp), %rdi
callq 0x21d0
leaq -0x3d1(%rbp), %rdi
movq %rdi, -0x670(%rbp)
callq 0x22e0
movq -0x670(%rbp), %rdx
leaq 0x2a28(%rip), %rsi      # 0x8326
leaq -0x3d0(%rbp), %rdi
callq 0x4000
jmp 0x590c
leaq -0x3d0(%rbp), %rdi
leaq -0x110(%rbp), %rsi
leaq -0x288(%rbp), %rdx
callq 0x72e0
jmp 0x5928
leaq -0x3d0(%rbp), %rdi
callq 0x20e0
leaq -0x3d1(%rbp), %rdi
callq 0x21d0
movl $0x0, -0x4(%rbp)
leaq -0x288(%rbp), %rdi
callq 0x5d00
leaq -0x270(%rbp), %rdi
callq 0x5d00
leaq -0x258(%rbp), %rdi
callq 0x5d00
leaq -0x240(%rbp), %rdi
callq 0x5d00
leaq -0x228(%rbp), %rdi
callq 0x5d00
leaq -0x210(%rbp), %rdi
callq 0x5d00
leaq -0x1a0(%rbp), %rdi
callq 0x5d00
leaq -0x188(%rbp), %rdi
callq 0x5d00
leaq -0x170(%rbp), %rdi
callq 0x5d00
leaq -0x158(%rbp), %rdi
callq 0x5d00
leaq -0x140(%rbp), %rdi
callq 0x5d00
leaq -0x128(%rbp), %rdi
callq 0x5d00
leaq -0x110(%rbp), %rdi
callq 0x5d00
leaq -0x28(%rbp), %rdi
callq 0x20e0
movl -0x4(%rbp), %eax
addq $0x6a0, %rsp            # imm = 0x6A0
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x5a1e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x308(%rbp), %rdi
callq 0x20e0
leaq -0x309(%rbp), %rdi
callq 0x21d0
jmp 0x5b37
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x5a55
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x330(%rbp), %rdi
callq 0x20e0
leaq -0x331(%rbp), %rdi
callq 0x21d0
jmp 0x5b37
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x5a8c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x358(%rbp), %rdi
callq 0x20e0
leaq -0x359(%rbp), %rdi
callq 0x21d0
jmp 0x5b37
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x5ac3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x380(%rbp), %rdi
callq 0x20e0
leaq -0x381(%rbp), %rdi
callq 0x21d0
jmp 0x5b37
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x5af7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x3a8(%rbp), %rdi
callq 0x20e0
leaq -0x3a9(%rbp), %rdi
callq 0x21d0
jmp 0x5b37
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x5b2b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x3d0(%rbp), %rdi
callq 0x20e0
leaq -0x3d1(%rbp), %rdi
callq 0x21d0
leaq -0x288(%rbp), %rdi
callq 0x5d00
leaq -0x270(%rbp), %rdi
callq 0x5d00
leaq -0x258(%rbp), %rdi
callq 0x5d00
leaq -0x240(%rbp), %rdi
callq 0x5d00
leaq -0x228(%rbp), %rdi
callq 0x5d00
leaq -0x210(%rbp), %rdi
callq 0x5d00
leaq -0x1a0(%rbp), %rdi
callq 0x5d00
leaq -0x188(%rbp), %rdi
callq 0x5d00
leaq -0x170(%rbp), %rdi
callq 0x5d00
leaq -0x158(%rbp), %rdi
callq 0x5d00
leaq -0x140(%rbp), %rdi
callq 0x5d00
leaq -0x128(%rbp), %rdi
callq 0x5d00
leaq -0x110(%rbp), %rdi
callq 0x5d00
leaq -0x28(%rbp), %rdi
callq 0x20e0
movq -0x38(%rbp), %rdi
callq 0x22d0
nopw %cs:(%rax,%rax)
nop