// File: /workspace/github_cpp_makefile_star2_O1/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, %r14d
movq %rdi, %rbx
leaq 0x8(%rdi), %rax
movq %rax, -0x40(%rbp)
leaq 0x20(%rdi), %r15
movl $0x64, %r13d
leaq -0x38(%rbp), %r12
cmpq $0x0, 0x30(%rbx)
je 0x2c1d
movq %r15, %rdi
callq *0x38(%rbx)
movq %rax, -0x38(%rbp)
movl %edx, -0x30(%rbp)
movq 0x10(%rbx), %rsi
cmpq 0x18(%rbx), %rsi
je 0x2864
movl -0x30(%rbp), %eax
movl %eax, 0x8(%rsi)
movq -0x38(%rbp), %rax
movq %rax, (%rsi)
addq $0xc, 0x10(%rbx)
jmp 0x2870
movq -0x40(%rbp), %rdi
movq %r12, %rdx
callq 0x4416
decl %r13d
jne 0x282e
testl %r14d, %r14d
je 0x2b3a
leaq 0x60(%rbx), %rax
movq %rax, -0x78(%rbp)
leaq 0x80(%rbx), %r13
leaq 0x40(%rbx), %r15
leaq 0xa0(%rbx), %rax
movq %rax, -0x68(%rbp)
leaq 0xc0(%rbx), %rax
movq %rax, -0x58(%rbp)
movl %r14d, %eax
movq %rax, -0x60(%rbp)
xorl %r14d, %r14d
movq %r15, -0x70(%rbp)
movq %r14, -0x50(%rbp)
movq 0x10(%rbx), %r15
subq 0x8(%rbx), %r15
sarq $0x2, %r15
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %r15
cmpq $0x63, %r15
ja 0x2974
xorl %edi, %edi
movq %r15, %rsi
callq 0x230c
movq %rax, %r14
movq 0x8(%rbx), %r12
xorl %edi, %edi
movq %r15, %rsi
callq 0x230c
cmpq $0x0, 0x70(%rbx)
je 0x2c1d
leaq (%rax,%rax,2), %rdx
shlq $0x2, %rdx
addq 0x8(%rbx), %rdx
leaq (%r14,%r14,2), %rax
leaq (%r12,%rax,4), %rsi
movq -0x78(%rbp), %rdi
callq *0x78(%rbx)
movq %rax, -0x38(%rbp)
movl %edx, -0x30(%rbp)
movq 0x10(%rbx), %rsi
cmpq 0x18(%rbx), %rsi
je 0x2943
movl -0x30(%rbp), %eax
movl %eax, 0x8(%rsi)
movq -0x38(%rbp), %rax
movq %rax, (%rsi)
addq $0xc, 0x10(%rbx)
jmp 0x2950
movq -0x40(%rbp), %rdi
leaq -0x38(%rbp), %rdx
callq 0x4416
movq 0x10(%rbx), %rax
subq 0x8(%rbx), %rax
sarq $0x2, %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rax
cmpq $0x64, %rax
jb 0x28dd
movss 0xd8(%rbx), %xmm0
mulss 0x2680(%rip), %xmm0     # 0x5004
ucomiss 0x267d(%rip), %xmm0     # 0x5008
movq -0x70(%rbp), %r15
jbe 0x2a08
movl $0x1, %r14d
movl $0x64, %esi
xorl %edi, %edi
callq 0x230c
cmpq $0x0, 0x90(%rbx)
je 0x2c1d
leaq (%rax,%rax,2), %rsi
shlq $0x2, %rsi
addq 0x8(%rbx), %rsi
movq %r13, %rdi
callq *0x98(%rbx)
testq %r14, %r14
js 0x29d5
xorps %xmm0, %xmm0
cvtsi2ss %r14, %xmm0
jmp 0x29f0
movq %r14, %rax
shrq %rax
movl %r14d, %ecx
andl $0x1, %ecx
orq %rax, %rcx
xorps %xmm0, %xmm0
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
movss 0xd8(%rbx), %xmm1
mulss 0x2604(%rip), %xmm1     # 0x5004
incq %r14
ucomiss %xmm0, %xmm1
ja 0x2997
leaq -0x98(%rbp), %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x41fc
cmpq $0x0, 0xb0(%rbx)
je 0x2c22
movq -0x68(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq %r14, %rdx
callq *0xb8(%rbx)
movq -0x88(%rbp), %rax
testq %rax, %rax
movq -0x50(%rbp), %r14
je 0x2a5a
leaq -0x98(%rbp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
cmpq $0x0, 0x50(%rbx)
je 0x2c1d
movq 0x8(%rbx), %rsi
movq %r15, %rdi
callq *0x58(%rbx)
ucomisd 0xd0(%rbx), %xmm0
jbe 0x2aa6
movq 0x8(%rbx), %rsi
movl 0x8(%rsi), %eax
movq -0x58(%rbp), %rcx
movl %eax, 0x8(%rcx)
movq (%rsi), %rax
movq %rax, (%rcx)
cmpq $0x0, 0x50(%rbx)
je 0x2c1d
movq %r15, %rdi
callq *0x58(%rbx)
movsd %xmm0, 0xd0(%rbx)
movl %r14d, %eax
xorl %edx, %edx
divl -0x44(%rbp)
testl %edx, %edx
jne 0x2b2d
movl $0xb, %edx
movq 0x551a(%rip), %r12      # 0x7fd8
movq %r12, %rdi
leaq 0x26c2(%rip), %rsi      # 0x518a
callq 0x2120
movq %r12, %rdi
movq %r14, %rsi
callq 0x20b0
movq %rax, %r14
movl $0xc, %edx
movq %rax, %rdi
leaq 0x26ac(%rip), %rsi      # 0x5196
callq 0x2120
movsd 0xd0(%rbx), %xmm0
movq %r14, %rdi
callq 0x2140
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2100
movsbl %al, %esi
movq %r14, %rdi
movq -0x50(%rbp), %r14
callq 0x2030
movq %rax, %rdi
callq 0x20c0
incq %r14
cmpq -0x60(%rbp), %r14
jne 0x28b5
movq 0x5497(%rip), %r14      # 0x7fd8
leaq 0x265b(%rip), %rsi      # 0x51a3
movl $0x6, %edx
movq %r14, %rdi
callq 0x2120
movq $-0xc, %r12
leaq 0x264f(%rip), %r15      # 0x51b2
movl 0xcc(%rbx,%r12), %esi
movq %r14, %rdi
callq 0x2160
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x2120
addq $0x4, %r12
jne 0x2b63
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2100
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20c0
movq %rax, %r14
leaq 0x25f0(%rip), %rsi      # 0x51aa
movl $0x9, %edx
movq %rax, %rdi
callq 0x2120
cmpq $0x0, 0x50(%rbx)
je 0x2c1d
leaq 0x40(%rbx), %rdi
leaq 0xc0(%rbx), %rsi
callq *0x58(%rbx)
movq %r14, %rdi
callq 0x2140
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2100
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20c0
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x2060
callq 0x2060
jmp 0x2c53
jmp 0x2c2b
movq %rax, %rbx
movq -0x88(%rbp), %rax
testq %rax, %rax
je 0x2c4b
leaq -0x98(%rbp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rdi
callq 0x2170
movq %rax, %rdi
callq 0x2d15
nop