// File: /workspace/github_cpp_makefile_star2_O3/samuel500[P]NEAT/main.cpp
// Function: main
int main(int argc, char *argv[]){
	srand(time(0));

	int population_size = 150;

	Population population = Population(population_size, 3, 1);

	for(int i=0; i<1000; ++i){
		cout << "gen " << i+1 << endl;
		// cout << "m1" << endl;
		// cout << "m2" << endl;

		population.xor_epoch();

		// cout << "m3" << endl;

		cout << "spe size " << population.species.size() << endl;

		// cout << "m4" << endl;

		cout << "fin innov_num " << *(population.innov_num) << endl;

		cout << "elite " << population.elite->fitness << endl;
		// population.test_elite();
		cout << "max f " << population.max_fitness << endl;

		cout << "pop size " << population.individuals.size() << endl;
		if(population.max_fitness>15.9){

			vector<Connection*>::iterator conPtr;
			for(conPtr=population.elite->connections.begin(); conPtr!=population.elite->connections.end(); ++conPtr){
				cout << "w " << (*conPtr)->weight << endl; 
			}
			break;
		}
	}

	return 0;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
xorl %edi, %edi
callq 0x10d0
movl %eax, %edi
callq 0x10e0
leaq -0xb0(%rbp), %rbx
movl $0x1, %r14d
movq %rbx, %rdi
movl $0x96, %esi
movl $0x3, %edx
movl $0x1, %ecx
callq 0x1814
movq 0x8a8f(%rip), %r15      # 0x9fd8
leaq 0x5aec(%rip), %r13      # 0x703c
cmpl $0x3e9, %r14d           # imm = 0x3E9
je 0x17c4
movl $0x4, %edx
movq %r15, %rdi
leaq 0x5aa4(%rip), %rsi      # 0x7010
callq 0x1120
movq %r15, %rdi
movl %r14d, %esi
callq 0x1190
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x10f0
movsbl %al, %esi
movq %r12, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x10a0
movq %rbx, %rdi
callq 0x2052
movl $0x9, %edx
movq %r15, %rdi
leaq 0x5a58(%rip), %rsi      # 0x7015
callq 0x1120
movq -0x58(%rbp), %rsi
subq -0x60(%rbp), %rsi
sarq $0x3, %rsi
movq %r15, %rdi
callq 0x1090
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x10f0
movsbl %al, %esi
movq %r12, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x10a0
movl $0xe, %edx
movq %r15, %rdi
leaq 0x5a10(%rip), %rsi      # 0x701f
callq 0x1120
movq -0x38(%rbp), %rax
movl (%rax), %esi
movq %r15, %rdi
callq 0x1190
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x10f0
movsbl %al, %esi
movq %r12, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x10a0
movl $0x6, %edx
movq %r15, %rdi
leaq 0x59d3(%rip), %rsi      # 0x702e
callq 0x1120
movq -0x68(%rbp), %rax
movsd (%rax), %xmm0
movq %r15, %rdi
callq 0x1150
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x10f0
movsbl %al, %esi
movq %r12, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x10a0
movl $0x6, %edx
movq %r15, %rdi
leaq 0x598c(%rip), %rsi      # 0x7035
callq 0x1120
movsd -0x30(%rbp), %xmm0
movq %r15, %rdi
callq 0x1150
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x10f0
movsbl %al, %esi
movq %r12, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x10a0
movl $0x9, %edx
movq %r15, %rdi
movq %r13, %rsi
callq 0x1120
movq -0xa8(%rbp), %rsi
subq -0xb0(%rbp), %rsi
sarq $0x3, %rsi
movq %r15, %rdi
callq 0x1090
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x10f0
movsbl %al, %esi
movq %r12, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x10a0
movsd -0x30(%rbp), %xmm0
incl %r14d
ucomisd 0x58bf(%rip), %xmm0     # 0x7008
jbe 0x1550
movq -0x68(%rbp), %rax
movq 0x60(%rax), %r12
cmpq 0x68(%rax), %r12
je 0x17c4
movq 0x8874(%rip), %rbx      # 0x9fd8
leaq 0x58db(%rip), %r14      # 0x7046
movl $0x2, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1120
movq (%r12), %rax
movsd 0x10(%rax), %xmm0
movq %rbx, %rdi
callq 0x1150
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x10f0
movsbl %al, %esi
movq %r15, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x10a0
addq $0x8, %r12
movq -0x68(%rbp), %rax
cmpq 0x68(%rax), %r12
jne 0x176b
leaq -0xb0(%rbp), %rdi
callq 0x28e6
xorl %eax, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x17e6
movq %rax, %rbx
leaq -0xb0(%rbp), %rdi
callq 0x28e6
movq %rbx, %rdi
callq 0x11a0
nopl (%rax)