// File: /workspace/github_cpp_makefile_star2_O3/ALSchwalm[P]cppEvolve/examples/traveling.cpp
// Function: main
int main()
{
    //All members of the population start with route A->B->C->D
    auto generator = []() -> Genome { return {'a', 'b', 'c', 'd'}; };

    SimpleGA<Genome, 50> gaList(
        //Generator: The above generator func
        generator,

        //The above fitness function
        fitness,

        //Crossover: Take a random copy of one parent (no crossing over)
        list1d::crossover::randomCopy<Genome>,

        //Mutator: Swap two of the cities
        list1d::mutator::swap<Genome>,

        //Select the top 5 each generation ordered by lowest fitness value
        //(smaller distance is better)
        selector::top<Genome, 5, Ordering::LOWER>);

    //Evolve for 100 generations, converges on "acbd" or "dbca"
    gaList.run(100);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x188, %rsp            # imm = 0x188
xorps %xmm0, %xmm0
leaq -0x30(%rbp), %rsi
movaps %xmm0, (%rsi)
leaq 0x231(%rip), %rax       # 0x26c0
movq %rax, 0x18(%rsi)
leaq 0x232(%rip), %rax       # 0x26cc
movq %rax, 0x10(%rsi)
xorl %eax, %eax
leaq -0xb0(%rbp), %rdx
movq %rax, 0x8(%rdx)
leaq -0xcf(%rip), %rcx       # 0x23e3
movq %rcx, (%rdx)
leaq 0xeaa(%rip), %rcx       # 0x3366
movq %rcx, 0x18(%rdx)
leaq 0xead(%rip), %rcx       # 0x3374
movq %rcx, 0x10(%rdx)
leaq -0x90(%rbp), %rcx
movq %rax, 0x8(%rcx)
leaq 0x31a(%rip), %rdi       # 0x27f7
movq %rdi, (%rcx)
leaq 0xeb5(%rip), %rdi       # 0x339c
movq %rdi, 0x18(%rcx)
leaq 0xeba(%rip), %rdi       # 0x33ac
movq %rdi, 0x10(%rcx)
leaq -0x70(%rbp), %r8
movq %rax, 0x8(%r8)
leaq 0x31a(%rip), %rdi       # 0x281f
movq %rdi, (%r8)
leaq 0xec5(%rip), %rdi       # 0x33d4
movq %rdi, 0x18(%r8)
leaq 0xec8(%rip), %rdi       # 0x33e2
movq %rdi, 0x10(%r8)
leaq -0x50(%rbp), %r9
movq %rax, 0x8(%r9)
leaq 0x32f(%rip), %rax       # 0x285c
movq %rax, (%r9)
leaq 0x1ced(%rip), %rax      # 0x4224
movq %rax, 0x18(%r9)
leaq 0x1cec(%rip), %rax      # 0x422e
movq %rax, 0x10(%r9)
leaq -0x188(%rbp), %rdi
callq 0x28b0
movq -0x40(%rbp), %rax
testq %rax, %rax
je 0x2569
leaq -0x50(%rbp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq -0x60(%rbp), %rax
testq %rax, %rax
je 0x2580
leaq -0x70(%rbp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq -0x80(%rbp), %rax
testq %rax, %rax
je 0x259a
leaq -0x90(%rbp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq -0xa0(%rbp), %rax
testq %rax, %rax
je 0x25b7
leaq -0xb0(%rbp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq -0x20(%rbp), %rax
testq %rax, %rax
je 0x25ce
leaq -0x30(%rbp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq -0x188(%rbp), %rdi
movl $0x64, %esi
movl $0x64, %edx
callq 0x29fc
leaq -0x188(%rbp), %rdi
callq 0x2e10
xorl %eax, %eax
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %rbp
retq
jmp 0x26b8
jmp 0x26b8
jmp 0x26b8
jmp 0x26b8
jmp 0x26b8
movq %rax, %rbx
leaq -0x188(%rbp), %rdi
callq 0x2e10
movq %rbx, %rdi
callq 0x21a0
movq %rax, %rbx
movq -0x40(%rbp), %rax
testq %rax, %rax
je 0x2646
leaq -0x50(%rbp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq -0x60(%rbp), %rax
testq %rax, %rax
je 0x265d
leaq -0x70(%rbp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq -0x80(%rbp), %rax
testq %rax, %rax
je 0x2677
leaq -0x90(%rbp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq -0xa0(%rbp), %rax
testq %rax, %rax
je 0x2694
leaq -0xb0(%rbp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq -0x20(%rbp), %rax
testq %rax, %rax
je 0x2624
leaq -0x30(%rbp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x2624
jmp 0x26b8
jmp 0x26b8
jmp 0x26b8
jmp 0x26b8
movq %rax, %rdi
callq 0x2f22