// File: /workspace/github_cpp_makefile_star2_O3/samuel500[P]NEAT/individual.cpp
// Function: Individual::Individual(int*, int*, int*, int*)
Individual::Individual(int *isize, int *osize, int *gen, int *innnum){ //, vector<Node*> *allnodes, vector<Connection*> *allconnections){

	in_size = new int;
	in_size = isize;
	out_size = new int;
	out_size = osize;

	
	generation = new int;
	generation = gen;

	innov_num = new int;
	innov_num = innnum;


	fitness = 0.;

	// all_nodes = allnodes;
	// all_connections = allconnections;


	Node *new_node;

	for(int i=0; i<*in_size; i++){
		new_node = new Node(INPUT, i, *generation);
		
		// all_nodes->push_back(new_node);
		
		inputs.push_back(new_node);
		nodes.push_back(new_node);
	}

	for(int i=0; i<*out_size; i++){
		new_node = new Node(OUTPUT, *in_size+i, *generation);
		// all_nodes->push_back(new_node);

		outputs.push_back(new_node);
		nodes.push_back(new_node);

	}

	// mutate_add_connection();

	// mutate_add_connection();
	// mutate_add_node();

	// mutate_add_connection();
	// mutate_add_node();
	// mutate_add_connection();
	// mutate_add_node();



}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x18(%rdi), %r14
leaq 0x30(%rdi), %rax
movq %rax, -0x40(%rbp)
leaq 0x48(%rdi), %rax
movq %rax, -0x38(%rbp)
xorps %xmm0, %xmm0
movups %xmm0, 0x68(%rdi)
movups %xmm0, 0x58(%rdi)
movups %xmm0, 0x48(%rdi)
movups %xmm0, 0x38(%rdi)
movups %xmm0, 0x28(%rdi)
movups %xmm0, 0x18(%rdi)
movq %rsi, 0x80(%rdi)
movq %rdx, 0x88(%rdi)
movq %rcx, 0x90(%rdi)
movq %r8, 0x78(%rdi)
movq $0x0, (%rdi)
cmpl $0x0, (%rsi)
jle 0x55eb
xorl %r13d, %r13d
leaq -0x30(%rbp), %r15
movl $0x48, %edi
callq 0x1100
movq %rax, %r12
movq 0x90(%rbx), %rax
movl (%rax), %ecx
movq %r12, %rdi
xorl %esi, %esi
movl %r13d, %edx
callq 0x6512
movq %r12, -0x30(%rbp)
movq 0x38(%rbx), %rsi
cmpq 0x40(%rbx), %rsi
je 0x55a6
movq %r12, (%rsi)
addq $0x8, 0x38(%rbx)
jmp 0x55b2
movq -0x40(%rbp), %rdi
movq %r15, %rdx
callq 0x2cfe
movq 0x20(%rbx), %rsi
cmpq 0x28(%rbx), %rsi
je 0x55ca
movq -0x30(%rbp), %rax
movq %rax, (%rsi)
addq $0x8, 0x20(%rbx)
jmp 0x55d5
movq %r14, %rdi
movq %r15, %rdx
callq 0x2cfe
incl %r13d
movq 0x80(%rbx), %rax
cmpl (%rax), %r13d
jl 0x556b
movq 0x88(%rbx), %rdx
cmpl $0x0, (%rdx)
jle 0x5684
xorl %r12d, %r12d
leaq -0x30(%rbp), %r13
movl $0x48, %edi
callq 0x1100
movq %rax, %r15
movq 0x80(%rbx), %rax
movq 0x90(%rbx), %rcx
movl (%rax), %edx
addl %r12d, %edx
movl (%rcx), %ecx
movq %r15, %rdi
movl $0x1, %esi
callq 0x6512
movq %r15, -0x30(%rbp)
movq 0x50(%rbx), %rsi
cmpq 0x58(%rbx), %rsi
je 0x5642
movq %r15, (%rsi)
addq $0x8, 0x50(%rbx)
jmp 0x564e
movq -0x38(%rbp), %rdi
movq %r13, %rdx
callq 0x2cfe
movq 0x20(%rbx), %rsi
cmpq 0x28(%rbx), %rsi
je 0x5666
movq -0x30(%rbp), %rax
movq %rax, (%rsi)
addq $0x8, 0x20(%rbx)
jmp 0x5671
movq %r14, %rdi
movq %r13, %rdx
callq 0x2cfe
incl %r12d
movq 0x88(%rbx), %rax
cmpl (%rax), %r12d
jl 0x55fb
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r13
movl $0x48, %esi
movq %r15, %rdi
jmp 0x56ab
movq %rax, %r13
movl $0x48, %esi
movq %r12, %rdi
callq 0x1110
jmp 0x56b7
jmp 0x56b4
movq %rax, %r13
movq 0x60(%rbx), %rdi
testq %rdi, %rdi
je 0x56cc
movq 0x70(%rbx), %rsi
subq %rdi, %rsi
callq 0x1110
movq -0x38(%rbp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x56e4
movq 0x58(%rbx), %rsi
subq %rdi, %rsi
callq 0x1110
movq -0x40(%rbp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x56fc
movq 0x40(%rbx), %rsi
subq %rdi, %rsi
callq 0x1110
movq (%r14), %rdi
testq %rdi, %rdi
je 0x5710
movq 0x28(%rbx), %rsi
subq %rdi, %rsi
callq 0x1110
movq %r13, %rdi
callq 0x11a0