// File: /workspace/github_cpp_makefile_star2_O2/EduBic[P]TSP-MetaheuristicSolvers/solversexecutor.cpp
// Function: SolversExecutor::printResults() const
void SolversExecutor::printResults() const {
    std::cout << "----------------------------------------------------------------------" << std::endl;

    TSPSolution* bestSolutionFound;
    std::vector<TSPSolution*> bestSolutionsFound;
    double bestValue = 1e10;

    for (vector<TSPSolution*>::const_iterator it = mBestSolutions.begin(); it != mBestSolutions.end(); ++it) {
        double value = (*it)->evaluateObjectiveFunction(mTspInstance);

        if (value < bestValue) {
            bestValue = value;
            bestSolutionFound = *it;
        }

        if (value <= bestValue) {
            bestSolutionsFound.push_back(*it);
        }

        std::cout << std::endl << (*it)->solveBy << std::endl;
        std::cout << "(value : " << value << ")\n";
        std::cout << "sec. (user time) " << (*it)->userTime << std::endl;
        std::cout << "sec. (CPU time) " << (*it)->cpuTime << std::endl;
        cout << "Max iterations " << (*it)->iterations << endl;
    }

    if (mBestSolutions.size() > 1) {

        std::cout << "------------------------------- THE WINNER -------------------------------------" << std::endl;

        std::cout << std::endl << bestSolutionFound->solveBy << std::endl;
        std::cout << "(value : " << bestValue << ")\n";
        std::cout << "sec. (user time) " << bestSolutionFound->userTime << std::endl;
        std::cout << "sec. (CPU time) " << bestSolutionFound->cpuTime << std::endl;

        std::cout << "------------------------------- THE WINNERS -------------------------------------" << std::endl;

        for (vector<TSPSolution*>::const_iterator it = bestSolutionsFound.begin(); it != bestSolutionsFound.end(); ++it) {
            double value = (*it)->evaluateObjectiveFunction(mTspInstance);

            std::cout << std::endl << (*it)->solveBy << std::endl;
            std::cout << "(value : " << value << ")\n";
            std::cout << "sec. (user time) " << (*it)->userTime << std::endl;
            std::cout << "sec. (CPU time) " << (*it)->cpuTime << std::endl;
        }
    }

    cout << endl;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %r14
movq 0x6f48(%rip), %r15      # 0xafd0
leaq 0x3021(%rip), %rsi      # 0x70b0
movq %r15, %rdi
callq 0x3250
movq %rax, %rdi
callq 0x3130
leaq 0x10(%rsp), %rax
andq $0x0, 0x10(%rax)
xorps %xmm0, %xmm0
movaps %xmm0, (%rax)
movq 0x48(%r14), %r13
leaq 0x8(%r14), %rbx
movq %r13, %r12
negq %r12
movsd 0x2f5b(%rip), %xmm0     # 0x7020
movsd %xmm0, 0x8(%rsp)
leaq 0x3055(%rip), %rbp      # 0x7127
cmpq 0x50(%r14), %r13
je 0x41eb
movq (%r13), %rdi
movq %rbx, %rsi
callq 0x476c
movsd 0x8(%rsp), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x4101
movq (%r13), %rax
movq %rax, 0x28(%rsp)
movapd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
movsd %xmm0, 0x30(%rsp)
ucomisd %xmm0, %xmm1
jb 0x4120
leaq 0x10(%rsp), %rdi
movq %r13, %rsi
callq 0x467c
movq %r15, %rdi
callq 0x3130
movq (%r13), %rsi
addq $0x18, %rsi
movq %rax, %rdi
callq 0x3210
movq %rax, %rdi
callq 0x3130
movq %r15, %rdi
leaq 0x2fad(%rip), %rsi      # 0x70f7
callq 0x3250
movq %rax, %rdi
movsd 0x30(%rsp), %xmm0
callq 0x3320
movq %rax, %rdi
leaq 0x2fd0(%rip), %rsi      # 0x7137
callq 0x3250
movq %r15, %rdi
leaq 0x2f8e(%rip), %rsi      # 0x7104
callq 0x3250
movq (%r13), %rcx
movsd 0x38(%rcx), %xmm0
movq %rax, %rdi
callq 0x3320
movq %rax, %rdi
callq 0x3130
movq %r15, %rdi
leaq 0x2f78(%rip), %rsi      # 0x7116
callq 0x3250
movq (%r13), %rcx
movsd 0x40(%rcx), %xmm0
movq %rax, %rdi
callq 0x3320
movq %rax, %rdi
callq 0x3130
movq %r15, %rdi
movq %rbp, %rsi
callq 0x3250
movq (%r13), %rcx
movl 0x48(%rcx), %esi
movq %rax, %rdi
callq 0x31b0
movq %rax, %rdi
callq 0x3130
addq $0x8, %r13
addq $-0x8, %r12
jmp 0x40d2
addq 0x48(%r14), %r12
negq %r12
cmpq $0x8, %r12
jbe 0x43ac
movq 0x6dcd(%rip), %rdi      # 0xafd0
leaq 0x2f30(%rip), %rsi      # 0x713a
callq 0x3250
movq 0x28(%rsp), %r14
movq %rax, %rdi
callq 0x3130
movq 0x6dad(%rip), %rdi      # 0xafd0
callq 0x3130
leaq 0x18(%r14), %rsi
movq %rax, %rdi
callq 0x3210
movq %rax, %rdi
callq 0x3130
movq 0x6d8d(%rip), %rdi      # 0xafd0
leaq 0x2ead(%rip), %rsi      # 0x70f7
callq 0x3250
movq %rax, %rdi
movsd 0x8(%rsp), %xmm0
callq 0x3320
leaq 0x2ed3(%rip), %rsi      # 0x7137
movq %rax, %rdi
callq 0x3250
movq 0x6d5d(%rip), %rdi      # 0xafd0
leaq 0x2e8a(%rip), %rsi      # 0x7104
callq 0x3250
movsd 0x38(%r14), %xmm0
movq %rax, %rdi
callq 0x3320
movq %rax, %rdi
callq 0x3130
movq 0x6d34(%rip), %rdi      # 0xafd0
leaq 0x2e73(%rip), %rsi      # 0x7116
callq 0x3250
movsd 0x40(%r14), %xmm0
movq %rax, %rdi
callq 0x3320
movq %rax, %rdi
callq 0x3130
movq 0x6d0b(%rip), %rdi      # 0xafd0
leaq 0x2ebf(%rip), %rsi      # 0x718b
callq 0x3250
movq %rax, %rdi
callq 0x3130
movq 0x10(%rsp), %r15
movq 0x6ceb(%rip), %r14      # 0xafd0
leaq 0x2e4b(%rip), %r12      # 0x7137
leaq 0x2e11(%rip), %r13      # 0x7104
leaq 0x2e1c(%rip), %rbp      # 0x7116
cmpq 0x18(%rsp), %r15
je 0x43ac
movq (%r15), %rdi
movq %rbx, %rsi
callq 0x476c
movsd %xmm0, 0x8(%rsp)
movq %r14, %rdi
callq 0x3130
movq (%r15), %rsi
addq $0x18, %rsi
movq %rax, %rdi
callq 0x3210
movq %rax, %rdi
callq 0x3130
movq %r14, %rdi
leaq 0x2db8(%rip), %rsi      # 0x70f7
callq 0x3250
movq %rax, %rdi
movsd 0x8(%rsp), %xmm0
callq 0x3320
movq %rax, %rdi
movq %r12, %rsi
callq 0x3250
movq %r14, %rdi
movq %r13, %rsi
callq 0x3250
movq (%r15), %rcx
movsd 0x38(%rcx), %xmm0
movq %rax, %rdi
callq 0x3320
movq %rax, %rdi
callq 0x3130
movq %r14, %rdi
movq %rbp, %rsi
callq 0x3250
movq (%r15), %rcx
movsd 0x40(%rcx), %xmm0
movq %rax, %rdi
callq 0x3320
movq %rax, %rdi
callq 0x3130
addq $0x8, %r15
jmp 0x42fa
movq 0x6c1d(%rip), %rdi      # 0xafd0
callq 0x3130
leaq 0x10(%rsp), %rdi
callq 0x4fca
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x43d5
jmp 0x43d5
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x4fca
movq %rbx, %rdi
callq 0x33b0