// File: /workspace/github_cpp_makefile_star2_O2/JorisCaze[P]NASG-EOS_Calibration/src/tools.cpp
// Function: writeResults(double, double, double, double, double, double, double, double, double, double, double, double, double, double)
void writeResults(double cpL, double qL, double pinfL, double cvL, double gammaL, double qPrimL, double bL, double cpG, double qG, double pinfG, double cvG, double gammaG, double qPrimG, double bG)
{
    ofstream strmRes("res/res.txt");
    strmRes << "* Results *\n";
    strmRes << "--- Liquid (L) ---\n";
    strmRes << "cpL    (J.kg-1.K-1)  : " << cpL << endl;
    strmRes << "qL     (J.kg-1)      : " << qL << endl;
    strmRes << "pinfL  (Pa)          : " << pinfL << endl;
    strmRes << "cvL    (J.kg-1.K-1)  : " << cvL << endl;
    strmRes << "gammaL (-)           : " << gammaL << endl;
    strmRes << "q'L    (J.kg-1)      : " << qPrimL << endl;
    strmRes << "bL     (m3/kg)       : " << bL << endl;
    strmRes << "\n";

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

// Assembly:
pushq %rbx
subq $0x240, %rsp            # imm = 0x240
movsd %xmm7, (%rsp)
movsd %xmm6, 0x8(%rsp)
movsd %xmm5, 0x10(%rsp)
movsd %xmm4, 0x18(%rsp)
movsd %xmm3, 0x20(%rsp)
movsd %xmm2, 0x28(%rsp)
movsd %xmm1, 0x30(%rsp)
movsd %xmm0, 0x38(%rsp)
leaq 0xe5d(%rip), %rsi       # 0x55e5
leaq 0x40(%rsp), %rbx
pushq $0x10
popq %rdx
movq %rbx, %rdi
callq 0x2180
leaq 0xe52(%rip), %rsi       # 0x55f1
movq %rbx, %rdi
callq 0x2150
leaq 0x9e3(%rip), %rsi       # 0x5191
leaq 0x40(%rsp), %rdi
callq 0x2150
leaq 0x9e6(%rip), %rsi       # 0x51a5
leaq 0x40(%rsp), %rdi
callq 0x2150
movq %rax, %rdi
movsd 0x38(%rsp), %xmm0
callq 0x21d0
movq %rax, %rdi
callq 0x20b0
leaq 0x9d7(%rip), %rsi       # 0x51bd
leaq 0x40(%rsp), %rdi
callq 0x2150
movq %rax, %rdi
movsd 0x30(%rsp), %xmm0
callq 0x21d0
movq %rax, %rdi
callq 0x20b0
leaq 0x9c8(%rip), %rsi       # 0x51d5
leaq 0x40(%rsp), %rdi
callq 0x2150
movq %rax, %rdi
movsd 0x28(%rsp), %xmm0
callq 0x21d0
movq %rax, %rdi
callq 0x20b0
leaq 0x9b9(%rip), %rsi       # 0x51ed
leaq 0x40(%rsp), %rdi
callq 0x2150
movq %rax, %rdi
movsd 0x20(%rsp), %xmm0
callq 0x21d0
movq %rax, %rdi
callq 0x20b0
leaq 0x9aa(%rip), %rsi       # 0x5205
leaq 0x40(%rsp), %rdi
callq 0x2150
movq %rax, %rdi
movsd 0x18(%rsp), %xmm0
callq 0x21d0
movq %rax, %rdi
callq 0x20b0
leaq 0x99b(%rip), %rsi       # 0x521d
leaq 0x40(%rsp), %rdi
callq 0x2150
movq %rax, %rdi
movsd 0x10(%rsp), %xmm0
callq 0x21d0
movq %rax, %rdi
callq 0x20b0
leaq 0x98c(%rip), %rsi       # 0x5235
leaq 0x40(%rsp), %rdi
callq 0x2150
movq %rax, %rdi
movsd 0x8(%rsp), %xmm0
callq 0x21d0
movq %rax, %rdi
callq 0x20b0
leaq 0x8a8(%rip), %rsi       # 0x5178
leaq 0x40(%rsp), %rdi
callq 0x2150
leaq 0x96c(%rip), %rsi       # 0x524d
leaq 0x40(%rsp), %rdi
callq 0x2150
leaq 0x96c(%rip), %rsi       # 0x525e
leaq 0x40(%rsp), %rdi
callq 0x2150
movq %rax, %rdi
movsd (%rsp), %xmm0
callq 0x21d0
movq %rax, %rdi
callq 0x20b0
leaq 0x95e(%rip), %rsi       # 0x5276
leaq 0x40(%rsp), %rdi
callq 0x2150
movsd 0x250(%rsp), %xmm0
movq %rax, %rdi
callq 0x21d0
movq %rax, %rdi
callq 0x20b0
leaq 0x94c(%rip), %rsi       # 0x528e
leaq 0x40(%rsp), %rdi
callq 0x2150
movsd 0x258(%rsp), %xmm0
movq %rax, %rdi
callq 0x21d0
movq %rax, %rdi
callq 0x20b0
leaq 0x93a(%rip), %rsi       # 0x52a6
leaq 0x40(%rsp), %rdi
callq 0x2150
movsd 0x260(%rsp), %xmm0
movq %rax, %rdi
callq 0x21d0
movq %rax, %rdi
callq 0x20b0
leaq 0x928(%rip), %rsi       # 0x52be
leaq 0x40(%rsp), %rdi
callq 0x2150
movsd 0x268(%rsp), %xmm0
movq %rax, %rdi
callq 0x21d0
movq %rax, %rdi
callq 0x20b0
leaq 0x916(%rip), %rsi       # 0x52d6
leaq 0x40(%rsp), %rdi
callq 0x2150
movsd 0x270(%rsp), %xmm0
movq %rax, %rdi
callq 0x21d0
movq %rax, %rdi
callq 0x20b0
leaq 0x904(%rip), %rsi       # 0x52ee
leaq 0x40(%rsp), %rdi
callq 0x2150
movsd 0x278(%rsp), %xmm0
movq %rax, %rdi
callq 0x21d0
movq %rax, %rdi
callq 0x20b0
leaq 0x40(%rsp), %rdi
callq 0x21b0
addq $0x240, %rsp            # imm = 0x240
popq %rbx
retq
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x21b0
movq %rbx, %rdi
callq 0x2210
nop