// File: pgrouchy[P]NoiseWorld/./mathNet.h
// Function: Population::Population(int)
Population(int isl_id) {
        numInputs = NUM_INPUTS;
        pop_size = ISLAND_POP;
        bestFitSoFar = DBL_MAX;
        gen = 0;
        my_isl_id = isl_id;
        max_tree_id = NUM_OUTPUTS - 1;
        beta = 1.0;

        int counter = 0;
        Genome *new_genome;

        for (int i = 0; i < pop_size; i++) {
            // ramped half-and-half (depth 1 to 2, half grow half full)
            if (i < (pop_size/4)) {
                new_genome = new Genome(i, 1, false, isl_id);
            } else if ((i >= (pop_size/4)) && (i < (pop_size/2))) {
                new_genome = new Genome(i, 2, false, isl_id);
            } else if ((i >= (pop_size/2)) && (i < (3*pop_size/4))) {
                new_genome = new Genome(i, 1, true, isl_id);
            } else {
                new_genome = new Genome(i, 2, true, isl_id);
            }
            new_genome->pop_id = counter;
            counter++;

            genomes.push_back(new_genome);
        }
    }

// Assembly:
subq $0x78, %rsp
movq %rdi, 0x70(%rsp)
movl %esi, 0x6c(%rsp)
movq 0x70(%rsp), %rdi
movq %rdi, 0x40(%rsp)
callq 0x5d30
movq 0x40(%rsp), %rax
movl $0x3, 0x18(%rax)
movl $0x32, 0x1c(%rax)
movsd 0xd759(%rip), %xmm0     # 0x13010
movsd %xmm0, 0x40(%rax)
movl $0x0, 0x20(%rax)
movl 0x6c(%rsp), %ecx
movl %ecx, 0x24(%rax)
movl $0x1, 0x28(%rax)
movsd 0xd72f(%rip), %xmm0     # 0x13008
movsd %xmm0, 0x48(%rax)
movl $0x0, 0x68(%rsp)
movl $0x0, 0x5c(%rsp)
movq 0x40(%rsp), %rcx
movl 0x5c(%rsp), %eax
cmpl 0x1c(%rcx), %eax
jge 0x5b71
movq 0x40(%rsp), %rax
movl 0x5c(%rsp), %ecx
movl %ecx, 0x3c(%rsp)
movl 0x1c(%rax), %eax
movl $0x4, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl 0x3c(%rsp), %eax
cmpl %ecx, %eax
jge 0x5993
movl $0x90, %edi
callq 0x32a0
movq %rax, 0x30(%rsp)
jmp 0x5933
movq 0x30(%rsp), %rdi
movl 0x5c(%rsp), %esi
movl 0x6c(%rsp), %r8d
movl $0x1, %edx
xorl %ecx, %ecx
callq 0x5d40
jmp 0x594f
movq 0x30(%rsp), %rax
movq %rax, 0x60(%rsp)
jmp 0x5b38
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
jmp 0x5b76
movq 0x30(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
movl $0x90, %esi
callq 0x32b0
jmp 0x5b76
movq 0x40(%rsp), %rax
movl 0x5c(%rsp), %ecx
movl %ecx, 0x2c(%rsp)
movl 0x1c(%rax), %eax
movl $0x4, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl 0x2c(%rsp), %eax
cmpl %ecx, %eax
jl 0x5a39
movq 0x40(%rsp), %rax
movl 0x5c(%rsp), %ecx
movl %ecx, 0x28(%rsp)
movl 0x1c(%rax), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl 0x28(%rsp), %eax
cmpl %ecx, %eax
jge 0x5a39
movl $0x90, %edi
callq 0x32a0
movq %rax, 0x20(%rsp)
jmp 0x59ec
movq 0x20(%rsp), %rdi
movl 0x5c(%rsp), %esi
movl 0x6c(%rsp), %r8d
movl $0x2, %edx
xorl %ecx, %ecx
callq 0x5d40
jmp 0x5a08
movq 0x20(%rsp), %rax
movq %rax, 0x60(%rsp)
jmp 0x5b36
movq 0x20(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
movl $0x90, %esi
callq 0x32b0
jmp 0x5b76
movq 0x40(%rsp), %rax
movl 0x5c(%rsp), %ecx
movl %ecx, 0x1c(%rsp)
movl 0x1c(%rax), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl 0x1c(%rsp), %eax
cmpl %ecx, %eax
jl 0x5ad9
movq 0x40(%rsp), %rax
movl 0x5c(%rsp), %ecx
movl %ecx, 0x18(%rsp)
imull $0x3, 0x1c(%rax), %eax
movl $0x4, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl 0x18(%rsp), %eax
cmpl %ecx, %eax
jge 0x5ad9
movl $0x90, %edi
callq 0x32a0
movq %rax, 0x10(%rsp)
jmp 0x5a8f
movq 0x10(%rsp), %rdi
movl 0x5c(%rsp), %esi
movl 0x6c(%rsp), %r8d
movl $0x1, %ecx
movl %ecx, %edx
callq 0x5d40
jmp 0x5aab
movq 0x10(%rsp), %rax
movq %rax, 0x60(%rsp)
jmp 0x5b34
movq 0x10(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
movl $0x90, %esi
callq 0x32b0
jmp 0x5b76
movl $0x90, %edi
callq 0x32a0
movq %rax, 0x8(%rsp)
jmp 0x5aea
movq 0x8(%rsp), %rdi
movl 0x5c(%rsp), %esi
movl 0x6c(%rsp), %r8d
movl $0x2, %edx
movl $0x1, %ecx
callq 0x5d40
jmp 0x5b09
movq 0x8(%rsp), %rax
movq %rax, 0x60(%rsp)
jmp 0x5b34
movq 0x8(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
movl $0x90, %esi
callq 0x32b0
jmp 0x5b76
jmp 0x5b36
jmp 0x5b38
movq 0x40(%rsp), %rdi
movl 0x68(%rsp), %ecx
movq 0x60(%rsp), %rax
movl %ecx, 0x30(%rax)
movl 0x68(%rsp), %eax
incl %eax
movl %eax, 0x68(%rsp)
leaq 0x60(%rsp), %rsi
callq 0x6050
jmp 0x5b5f
jmp 0x5b61
movl 0x5c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x5c(%rsp)
jmp 0x58ee
addq $0x78, %rsp
retq
movq 0x40(%rsp), %rdi
callq 0x6090
movq 0x50(%rsp), %rdi
callq 0x3450
nopw (%rax,%rax)