// File: /workspace/github_cpp_makefile_star2_O2/GAStudyGroup[P]GPX2/src/base/sources/Log.cpp
// Function: Log::printFooter(std::ostream&, Population&, unsigned int, unsigned int)
void Log::printFooter(ostream &out,Population &pop,unsigned gen,unsigned best){
    out << "\nTHE END\n";
    out << "First best fitness: " << best << "\n";
    out << "Last gen: " << gen << "\n";
    out << "Best fitness found: " << pop.bestFitness() << "\n";
    out << "Best know solution: "<< to_string(Config::BEST_FITNESS) << "\n";
    out << "=========================" << "\n";

    sort(pop.getPopulation().begin(),pop.getPopulation().end(),[](vector<int> &a, vector<int> &b) { return getFitness(a) < getFitness(b);});

    out << "\nLast population\n";
    for(vector<int> t : pop.getPopulation()){
        printTour(t,out);
        out<<"\n";
    }
    out.flush();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %ecx, %r15d
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x1c865(%rip), %rsi     # 0x2755a
callq 0x5370
leaq 0x1c863(%rip), %rsi     # 0x27564
movq %rbx, %rdi
callq 0x5370
movl %r15d, %esi
movq %rax, %rdi
callq 0x5280
leaq 0x1dabb(%rip), %r15     # 0x287d6
movq %rax, %rdi
movq %r15, %rsi
callq 0x5370
leaq 0x1c84c(%rip), %rsi     # 0x27579
movq %rbx, %rdi
callq 0x5370
movl %ebp, %esi
movq %rax, %rdi
callq 0x5280
movq %rax, %rdi
movq %r15, %rsi
callq 0x5370
leaq 0x1c833(%rip), %rsi     # 0x27584
movq %rbx, %rdi
callq 0x5370
movq %rax, %r12
movq %r14, %rdi
callq 0xb98c
movq %r12, %rdi
movl %eax, %esi
callq 0x55e0
movq %rax, %rdi
movq %r15, %rsi
callq 0x5370
leaq 0x1c819(%rip), %rsi     # 0x27599
movq %rbx, %rdi
callq 0x5370
movq %rax, %r15
leaq 0x31b32(%rip), %rax     # 0x3c8c4
movl (%rax), %esi
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0xb68c
movq %r15, %rdi
movq %r12, %rsi
callq 0x5330
leaq 0x1da23(%rip), %rsi     # 0x287d6
movq %rax, %rdi
callq 0x5370
leaq 0x8(%rsp), %rdi
callq 0x56f8
leaq 0x1c7e2(%rip), %rsi     # 0x275ae
movq %rbx, %rdi
callq 0x5370
leaq 0x1d9fb(%rip), %rsi     # 0x287d6
movq %rax, %rdi
callq 0x5370
movq %r14, %rdi
callq 0xb988
movq (%rax), %r12
movq %r14, %rdi
callq 0xb988
movq 0x8(%rax), %r15
cmpq %r15, %r12
je 0xae62
movq %r15, %r13
subq %r12, %r13
pushq $0x18
popq %rcx
movq %r13, %rax
cqto
idivq %rcx
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
movq %r12, %rdi
movq %r15, %rsi
callq 0xb0b5
cmpq $0x181, %r13            # imm = 0x181
jl 0xae57
leaq 0x180(%r12), %r13
movq %r12, %rdi
movq %r13, %rsi
callq 0xb4a5
cmpq %r15, %r13
je 0xae62
movq %r13, %rdi
callq 0xb544
addq $0x18, %r13
jmp 0xae44
movq %r12, %rdi
movq %r15, %rsi
callq 0xb4a5
leaq 0x1c75f(%rip), %rsi     # 0x275c8
movq %rbx, %rdi
callq 0x5370
movq %r14, %rdi
callq 0xb988
movq (%rax), %r14
movq 0x8(%rax), %r13
leaq 0x8(%rsp), %r15
leaq 0x1d94a(%rip), %r12     # 0x287d6
cmpq %r13, %r14
je 0xaec0
movq %r15, %rdi
movq %r14, %rsi
callq 0x9210
movq %r15, %rdi
movq %rbx, %rsi
callq 0xc0f3
movq %rbx, %rdi
movq %r12, %rsi
callq 0x5370
movq %r15, %rdi
callq 0x6e4c
addq $0x18, %r14
jmp 0xae8c
movq %rbx, %rdi
callq 0x5290
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x56f8
jmp 0xaef3
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x6e4c
movq %rbx, %rdi
callq 0x5610