// File: ALSchwalm[P]cppEvolve/include/cppEvolve/SimpleGA.hpp
// Function: evolve::SimpleGA<std::array<int, 3ul>, 100ul>::run(unsigned int, unsigned int)
virtual void run(unsigned int generations,
                     unsigned int logFrequency = 100) {
        // Generation: create the new members
        for (auto i = 0U; i < PopSize; ++i) {
            population.push_back(generator());
        }

        for (auto generation = 0U; generation < generations; ++generation) {
            // Crossover: Add missing members
            auto popSizePostSelection = population.size();
            while (population.size() < PopSize) {
                population.push_back(
                    crossover(population[random_uint(popSizePostSelection)],
                              population[random_uint(popSizePostSelection)]));
            }

            // Mutation: Mutate at least rate*popsize members
            for (size_t i = 0; i < PopSize * mutationRate; ++i) {
                auto index = random_uint(PopSize);
                mutator(population[index]);
            }

            // Selection: Destroy the least fit members
            selector(population, evaluator);

            if (evaluator(population[0]) > bestScore) {
                bestMember = population[0];
                bestScore = evaluator(population[0]);
            }

            if (generation % logFrequency == 0) {
                std::cout << "Generation(" << generation
                          << ") - Fitness:" << bestScore << std::endl;
            }
        }
        std::cout << "Best: ";
        for (const auto& allele : bestMember) {
            std::cout << allele << " ";
        }
        std::cout << std::endl << "Fitness: " << evaluator(bestMember)
                  << std::endl;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xc8(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpq $0x64, %rax
jae 0x346e
movq -0xc8(%rbp), %rdi
movq %rdi, %rax
addq $0x8, %rax
movq %rax, -0xd0(%rbp)
addq $0x20, %rdi
callq 0x88d0
movq -0xd0(%rbp), %rdi
movl %edx, -0x28(%rbp)
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x20(%rbp)
movl -0x28(%rbp), %eax
movl %eax, -0x18(%rbp)
leaq -0x20(%rbp), %rsi
callq 0x88a0
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x3417
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0xc(%rbp), %eax
jae 0x37af
movq -0xc8(%rbp), %rdi
addq $0x8, %rdi
callq 0x4810
movq %rax, -0x40(%rbp)
movq -0xc8(%rbp), %rdi
addq $0x8, %rdi
callq 0x4810
cmpq $0x64, %rax
jae 0x3546
movq -0xc8(%rbp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, -0xd8(%rbp)
addq $0x60, %rax
movq %rax, -0xe8(%rbp)
movq -0x40(%rbp), %rdi
callq 0x2360
movq -0xd8(%rbp), %rdi
movq %rax, %rsi
callq 0x89a0
movq %rax, -0xe0(%rbp)
movq -0x40(%rbp), %rdi
callq 0x2360
movq -0xd8(%rbp), %rdi
movq %rax, %rsi
callq 0x89a0
movq -0xe8(%rbp), %rdi
movq -0xe0(%rbp), %rsi
movq %rax, %rdx
callq 0x8930
movq -0xd8(%rbp), %rdi
movl %edx, -0x58(%rbp)
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x4c(%rbp)
movl -0x58(%rbp), %eax
movl %eax, -0x44(%rbp)
leaq -0x4c(%rbp), %rsi
callq 0x88a0
jmp 0x3495
movq $0x0, -0x68(%rbp)
movq -0x68(%rbp), %rax
movq %rax, %rdx
shrq %rdx
movl %eax, %ecx
andl $0x1, %ecx
orq %rdx, %rcx
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
cvtsi2ss %rax, %xmm1
movss %xmm1, -0xf0(%rbp)
testq %rax, %rax
movss %xmm0, -0xec(%rbp)
js 0x3593
movss -0xf0(%rbp), %xmm0
movss %xmm0, -0xec(%rbp)
movq -0xc8(%rbp), %rax
movss -0xec(%rbp), %xmm1
movss 0x6a5e(%rip), %xmm0     # 0xa008
mulss 0xd8(%rax), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x3609
movl $0x64, %edi
callq 0x2360
movq -0xc8(%rbp), %rdi
movq %rax, -0x70(%rbp)
movq %rdi, %rax
addq $0x80, %rax
movq %rax, -0xf8(%rbp)
addq $0x8, %rdi
movq -0x70(%rbp), %rsi
callq 0x89a0
movq -0xf8(%rbp), %rdi
movq %rax, %rsi
callq 0x89c0
movq -0x68(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x68(%rbp)
jmp 0x354e
movq -0xc8(%rbp), %rsi
movq %rsi, %rax
addq $0xa0, %rax
movq %rax, -0x110(%rbp)
movq %rsi, %rax
addq $0x8, %rax
movq %rax, -0x108(%rbp)
addq $0x40, %rsi
leaq -0x90(%rbp), %rdi
movq %rdi, -0x100(%rbp)
callq 0x8080
movq -0x110(%rbp), %rdi
movq -0x108(%rbp), %rsi
movq -0x100(%rbp), %rdx
callq 0x8a00
jmp 0x3661
leaq -0x90(%rbp), %rdi
callq 0x33b0
movq -0xc8(%rbp), %rdi
movq %rdi, %rax
addq $0x40, %rax
movq %rax, -0x118(%rbp)
addq $0x8, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x89a0
movq -0x118(%rbp), %rdi
movq %rax, %rsi
callq 0x7ea0
movq -0xc8(%rbp), %rax
ucomisd 0xd0(%rax), %xmm0
jbe 0x373f
movq -0xc8(%rbp), %rdi
addq $0x8, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x89a0
movq -0xc8(%rbp), %rdi
movq (%rax), %rcx
movq %rcx, 0xc0(%rdi)
movl 0x8(%rax), %eax
movl %eax, 0xc8(%rdi)
movq %rdi, %rax
addq $0x40, %rax
movq %rax, -0x120(%rbp)
addq $0x8, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x89a0
movq -0x120(%rbp), %rdi
movq %rax, %rsi
callq 0x7ea0
movq -0xc8(%rbp), %rax
movsd %xmm0, 0xd0(%rax)
jmp 0x373f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x33b0
jmp 0x38b9
movl -0x34(%rbp), %eax
xorl %edx, %edx
divl -0x10(%rbp)
cmpl $0x0, %edx
jne 0x379f
movq 0xb885(%rip), %rdi      # 0xefd8
leaq 0x6a70(%rip), %rsi      # 0xa1ca
callq 0x20f0
movq %rax, %rdi
movl -0x34(%rbp), %esi
callq 0x2120
movq %rax, %rdi
leaq 0x6a62(%rip), %rsi      # 0xa1d6
callq 0x20f0
movq %rax, %rdi
movq -0xc8(%rbp), %rax
movsd 0xd0(%rax), %xmm0
callq 0x2180
movq %rax, %rdi
movq 0xb82e(%rip), %rsi      # 0xefc8
callq 0x2110
jmp 0x37a1
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x3475
movq 0xb822(%rip), %rdi      # 0xefd8
leaq 0x6a26(%rip), %rsi      # 0xa1e3
callq 0x20f0
movq -0xc8(%rbp), %rax
addq $0xc0, %rax
movq %rax, -0xa8(%rbp)
movq -0xa8(%rbp), %rdi
callq 0x4450
movq %rax, -0xb0(%rbp)
movq -0xa8(%rbp), %rdi
callq 0x5d30
movq %rax, -0xb8(%rbp)
movq -0xb0(%rbp), %rax
cmpq -0xb8(%rbp), %rax
je 0x3852
movq -0xb0(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq -0xc0(%rbp), %rax
movl (%rax), %esi
movq 0xb7ae(%rip), %rdi      # 0xefd8
callq 0x2150
movq %rax, %rdi
leaq 0x69b9(%rip), %rsi      # 0xa1f2
callq 0x20f0
movq -0xb0(%rbp), %rax
addq $0x4, %rax
movq %rax, -0xb0(%rbp)
jmp 0x37fc
movq 0xb77f(%rip), %rdi      # 0xefd8
movq 0xb768(%rip), %rsi      # 0xefc8
callq 0x2110
movq %rax, %rdi
leaq 0x697b(%rip), %rsi      # 0xa1ea
callq 0x20f0
movq -0xc8(%rbp), %rsi
movq %rax, -0x128(%rbp)
movq %rsi, %rdi
addq $0x40, %rdi
addq $0xc0, %rsi
callq 0x7ea0
movq -0x128(%rbp), %rdi
callq 0x2180
movq %rax, %rdi
movq 0xb71d(%rip), %rsi      # 0xefc8
callq 0x2110
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
movq -0x98(%rbp), %rdi
callq 0x2160
nopw %cs:(%rax,%rax)
nop