// File: /workspace/github_cpp_makefile_star2_O1/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 -0xb0(%rbp), %rsi
movaps %xmm0, (%rsi)
leaq 0x23c(%rip), %rax       # 0x26ce
movq %rax, 0x18(%rsi)
leaq 0x23d(%rip), %rax       # 0x26da
movq %rax, 0x10(%rsi)
leaq -0x90(%rbp), %rdx
movaps %xmm0, (%rdx)
movaps %xmm0, 0x10(%rdx)
leaq -0xd3(%rip), %rax       # 0x23e3
movq %rax, (%rdx)
leaq 0xe86(%rip), %rax       # 0x3346
movq %rax, 0x18(%rdx)
leaq 0xe89(%rip), %rax       # 0x3354
movq %rax, 0x10(%rdx)
leaq -0x70(%rbp), %rcx
movaps %xmm0, (%rcx)
movaps %xmm0, 0x10(%rcx)
leaq 0x32b(%rip), %rax       # 0x280c
movq %rax, (%rcx)
leaq 0xe91(%rip), %rax       # 0x337c
movq %rax, 0x18(%rcx)
leaq 0xe96(%rip), %rax       # 0x338c
movq %rax, 0x10(%rcx)
leaq -0x50(%rbp), %r8
movaps %xmm0, (%r8)
movaps %xmm0, 0x10(%r8)
leaq 0x326(%rip), %rax       # 0x2834
movq %rax, (%r8)
leaq 0xe9c(%rip), %rax       # 0x33b4
movq %rax, 0x18(%r8)
leaq 0xe9f(%rip), %rax       # 0x33c2
movq %rax, 0x10(%r8)
leaq -0x30(%rbp), %r9
movaps %xmm0, 0x10(%r9)
movaps %xmm0, (%r9)
leaq 0x336(%rip), %rax       # 0x2871
movq %rax, (%r9)
leaq 0x1d3b(%rip), %rax      # 0x4280
movq %rax, 0x18(%r9)
leaq 0x1d3a(%rip), %rax      # 0x428a
movq %rax, 0x10(%r9)
leaq -0x188(%rbp), %rdi
callq 0x28a6
movq -0x20(%rbp), %rax
testq %rax, %rax
je 0x2577
leaq -0x30(%rbp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq -0x40(%rbp), %rax
testq %rax, %rax
je 0x258e
leaq -0x50(%rbp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq -0x60(%rbp), %rax
testq %rax, %rax
je 0x25a5
leaq -0x70(%rbp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq -0x80(%rbp), %rax
testq %rax, %rax
je 0x25bf
leaq -0x90(%rbp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq -0xa0(%rbp), %rax
testq %rax, %rax
je 0x25dc
leaq -0xb0(%rbp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq -0x188(%rbp), %rdi
movl $0x64, %esi
movl $0x64, %edx
callq 0x29f2
leaq -0x188(%rbp), %rdi
callq 0x2dfa
xorl %eax, %eax
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %rbp
retq
jmp 0x26c6
jmp 0x26c6
jmp 0x26c6
jmp 0x26c6
jmp 0x26c6
movq %rax, %rbx
leaq -0x188(%rbp), %rdi
callq 0x2dfa
movq %rbx, %rdi
callq 0x21a0
movq %rax, %rbx
movq -0x20(%rbp), %rax
testq %rax, %rax
je 0x2654
leaq -0x30(%rbp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq -0x40(%rbp), %rax
testq %rax, %rax
je 0x266b
leaq -0x50(%rbp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq -0x60(%rbp), %rax
testq %rax, %rax
je 0x2682
leaq -0x70(%rbp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq -0x80(%rbp), %rax
testq %rax, %rax
je 0x269c
leaq -0x90(%rbp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq -0xa0(%rbp), %rax
testq %rax, %rax
je 0x2632
leaq -0xb0(%rbp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x2632
jmp 0x26c6
jmp 0x26c6
jmp 0x26c6
jmp 0x26c6
movq %rax, %rdi
callq 0x2f0c