// File: /workspace/github_cpp_makefile_star2_O2/camargodev[P]n-tile-puzzle/src/Result.cpp
// Function: Result::writeResult(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void Result :: writeResult(string fileName) {
    ofstream outFile;
    outFile.open(fileName, std::ios_base::app);

    string strResult = "";
    strResult += to_string(this->expandedNodes) + ",";
    strResult += to_string(this->optimalSolutionLenght) + ",";
    strResult += to_string(this->duration) + ",";
    strResult += to_string(this->totalHValue/max(this->counter, 1)) + ",";
    strResult += to_string(this->initialHeuristicValue);
    outFile << strResult + "\n";

    outFile.close();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x268, %rsp            # imm = 0x268
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x68(%rsp), %r15
movq %r15, %rdi
callq 0x2320
pushq $0x1
popq %rbp
movq %r15, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x20c0
leaq 0x3afc(%rip), %rsi      # 0x8051
leaq 0x48(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x2080
movl (%rbx), %esi
leaq 0x28(%rsp), %rdi
callq 0x477b
leaq 0x3af9(%rip), %rdx      # 0x8070
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x2973
leaq 0x48(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x23a0
leaq 0x8(%rsp), %rdi
callq 0x20b0
leaq 0x28(%rsp), %rdi
callq 0x20b0
movswl 0xc(%rbx), %esi
leaq 0x28(%rsp), %rdi
callq 0x477b
leaq 0x3ab2(%rip), %rdx      # 0x8070
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x2973
leaq 0x48(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x23a0
leaq 0x8(%rsp), %rdi
callq 0x20b0
leaq 0x28(%rsp), %rdi
callq 0x20b0
movss 0x10(%rbx), %xmm0
leaq 0x28(%rsp), %rdi
callq 0x47d4
leaq 0x3a6a(%rip), %rdx      # 0x8070
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x2973
leaq 0x48(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x23a0
leaq 0x8(%rsp), %rdi
callq 0x20b0
leaq 0x28(%rsp), %rdi
callq 0x20b0
movl 0x8(%rbx), %eax
cmpl $0x2, %eax
cmovgel %eax, %ebp
movsd 0x30(%rbx), %xmm0
cvtsi2sd %ebp, %xmm1
divsd %xmm1, %xmm0
leaq 0x28(%rsp), %rdi
callq 0x47f9
leaq 0x3a11(%rip), %rdx      # 0x8070
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x2973
leaq 0x48(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x23a0
leaq 0x8(%rsp), %rdi
callq 0x20b0
leaq 0x28(%rsp), %rdi
callq 0x20b0
movswl 0x20(%rbx), %esi
leaq 0x8(%rsp), %rdi
callq 0x477b
leaq 0x48(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x23a0
leaq 0x8(%rsp), %rdi
callq 0x20b0
leaq 0x3991(%rip), %rdx      # 0x8050
leaq 0x8(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x481c
leaq 0x68(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x21b0
leaq 0x8(%rsp), %rdi
callq 0x20b0
leaq 0x68(%rsp), %rdi
callq 0x2290
leaq 0x48(%rsp), %rdi
callq 0x20b0
leaq 0x68(%rsp), %rdi
callq 0x22c0
addq $0x268, %rsp            # imm = 0x268
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4755
jmp 0x4719
jmp 0x4755
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
jmp 0x474e
jmp 0x4755
jmp 0x4737
jmp 0x4746
jmp 0x4755
jmp 0x4737
jmp 0x4746
jmp 0x4755
jmp 0x4737
jmp 0x4746
jmp 0x4755
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x20b0
jmp 0x4749
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x20b0
jmp 0x4758
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x20b0
leaq 0x68(%rsp), %rdi
callq 0x22c0
movq %rbx, %rdi
callq 0x2340
jmp 0x4776
movq %rax, %rbx
jmp 0x4762