// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movl %edx, -0x44(%rbp)
movl %esi, -0x30(%rbp)
movq %rdi, %rbx
leaq 0x8(%rdi), %r13
leaq 0x20(%rdi), %r15
pushq $0x64
popq %r14
leaq -0x40(%rbp), %r12
subl $0x1, %r14d
jb 0x26f6
movq %r15, %rdi
callq 0x3efe
movq %rax, -0x40(%rbp)
movl %edx, -0x38(%rbp)
movq %r13, %rdi
movq %r12, %rsi
callq 0x3f54
jmp 0x26d4
leaq 0x60(%rbx), %rax
movq %rax, -0x78(%rbp)
leaq 0x80(%rbx), %rax
movq %rax, -0x70(%rbp)
leaq 0xa0(%rbx), %rax
movq %rax, -0x60(%rbp)
leaq 0x40(%rbx), %r14
leaq 0xc0(%rbx), %rax
movq %rax, -0x50(%rbp)
movl -0x30(%rbp), %eax
movq %rax, -0x68(%rbp)
xorl %r15d, %r15d
leaq -0x98(%rbp), %r12
movq %r14, -0x58(%rbp)
cmpq -0x68(%rbp), %r15
je 0x28d6
movq %r15, -0x30(%rbp)
movq 0x8(%rbx), %rsi
movq 0x10(%rbx), %rcx
movq %rcx, %rax
subq %rsi, %rax
cqto
pushq $0xc
popq %rdi
idivq %rdi
movq %rax, %r14
subq %rsi, %rcx
movq %rcx, %rax
cqto
pushq $0xc
popq %rcx
idivq %rcx
cmpq $0x64, %rax
jae 0x27bc
movq %r14, %rdi
callq 0x2313
imulq $0xc, %rax, %r15
addq 0x8(%rbx), %r15
movq %r14, %rdi
callq 0x2313
imulq $0xc, %rax, %rdx
addq 0x8(%rbx), %rdx
movq -0x78(%rbp), %rdi
movq %r15, %rsi
callq 0x3f12
movq %rax, -0x40(%rbp)
movl %edx, -0x38(%rbp)
movq %r13, %rdi
leaq -0x40(%rbp), %rsi
callq 0x3f54
movq 0x8(%rbx), %rsi
movq 0x10(%rbx), %rcx
jmp 0x275f
xorl %r14d, %r14d
testq %r14, %r14
js 0x27cb
cvtsi2ss %r14, %xmm0
jmp 0x27e3
movq %r14, %rax
shrq %rax
movl %r14d, %ecx
andl $0x1, %ecx
orq %rax, %rcx
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
movq %r12, %rdi
movss 0xd8(%rbx), %xmm1
mulss 0x280e(%rip), %xmm1     # 0x5004
ucomiss %xmm0, %xmm1
jbe 0x2819
pushq $0x64
popq %rdi
callq 0x2313
imulq $0xc, %rax, %rsi
addq (%r13), %rsi
movq -0x70(%rbp), %rdi
callq 0x3f28
incq %r14
jmp 0x27bf
movq -0x58(%rbp), %r14
movq %r14, %rsi
movq %rdi, %r15
callq 0x3d48
movq -0x60(%rbp), %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x3f3e
movq %r15, %rdi
callq 0x3bb8
movq 0x8(%rbx), %rsi
movq %r14, %rdi
callq 0x3c86
ucomisd 0xd0(%rbx), %xmm0
jbe 0x2879
movq 0x8(%rbx), %rsi
movl 0x8(%rsi), %eax
movq -0x50(%rbp), %rcx
movl %eax, 0x8(%rcx)
movq (%rsi), %rax
movq %rax, (%rcx)
movq %r14, %rdi
callq 0x3c86
movsd %xmm0, 0xd0(%rbx)
movq -0x30(%rbp), %r15
movl %r15d, %eax
xorl %edx, %edx
divl -0x44(%rbp)
testl %edx, %edx
jne 0x28ce
movq 0x5748(%rip), %rdi      # 0x7fd8
leaq 0x28db(%rip), %rsi      # 0x5172
callq 0x20f0
movq %rax, %rdi
movq %r15, %rsi
callq 0x20b0
movq %rax, %rdi
leaq 0x28cd(%rip), %rsi      # 0x517e
callq 0x20f0
movsd 0xd0(%rbx), %xmm0
movq %rax, %rdi
callq 0x2120
movq %rax, %rdi
callq 0x2070
incq %r15
jmp 0x2738
movq 0x56fb(%rip), %r14      # 0x7fd8
leaq 0x28a7(%rip), %rsi      # 0x518b
movq %r14, %rdi
callq 0x20f0
pushq $-0xc
popq %r12
leaq 0x28a3(%rip), %r15      # 0x519a
testq %r12, %r12
je 0x291d
movl 0xcc(%rbx,%r12), %esi
movq %r14, %rdi
callq 0x2140
movq %rax, %rdi
movq %r15, %rsi
callq 0x20f0
addq $0x4, %r12
jmp 0x28f7
movq 0x56b4(%rip), %rdi      # 0x7fd8
callq 0x2070
leaq 0x2862(%rip), %rsi      # 0x5192
movq %rax, %rdi
callq 0x20f0
movq %rax, %rbx
movq -0x58(%rbp), %rdi
movq -0x50(%rbp), %rsi
callq 0x3c86
movq %rbx, %rdi
callq 0x2120
movq %rax, %rdi
callq 0x2070
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x98(%rbp), %rdi
callq 0x3bb8
movq %rbx, %rdi
callq 0x2150