// File: /workspace/github_cpp_makefile_star2_O1/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)
movq 0x80(%rdi), %rax
cmpl $0x0, (%rax)
jle 0x56df
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 0x664e
movq %r12, -0x30(%rbp)
movq 0x38(%rbx), %rsi
cmpq 0x40(%rbx), %rsi
je 0x56a1
movq %r12, (%rsi)
addq $0x8, 0x38(%rbx)
jmp 0x56ad
movq -0x40(%rbp), %rdi
movq %r15, %rdx
callq 0x2d18
movq 0x20(%rbx), %rsi
cmpq 0x28(%rbx), %rsi
je 0x56c5
movq -0x30(%rbp), %rax
movq %rax, (%rsi)
addq $0x8, 0x20(%rbx)
jmp 0x56d0
movq %r14, %rdi
movq %r15, %rdx
callq 0x2d18
incl %r13d
movq 0x80(%rbx), %rax
cmpl (%rax), %r13d
jl 0x5666
movq 0x88(%rbx), %rax
cmpl $0x0, (%rax)
jle 0x577f
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 0x664e
movq %r15, -0x30(%rbp)
movq 0x50(%rbx), %rsi
cmpq 0x58(%rbx), %rsi
je 0x573d
movq %r15, (%rsi)
addq $0x8, 0x50(%rbx)
jmp 0x5749
movq -0x38(%rbp), %rdi
movq %r13, %rdx
callq 0x2d18
movq 0x20(%rbx), %rsi
cmpq 0x28(%rbx), %rsi
je 0x5761
movq -0x30(%rbp), %rax
movq %rax, (%rsi)
addq $0x8, 0x20(%rbx)
jmp 0x576c
movq %r14, %rdi
movq %r13, %rdx
callq 0x2d18
incl %r12d
movq 0x88(%rbx), %rax
cmpl (%rax), %r12d
jl 0x56f6
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 0x57a6
movq %rax, %r13
movl $0x48, %esi
movq %r12, %rdi
callq 0x1110
jmp 0x57b2
jmp 0x57af
movq %rax, %r13
movq 0x60(%rbx), %rdi
testq %rdi, %rdi
je 0x57c7
movq 0x70(%rbx), %rsi
subq %rdi, %rsi
callq 0x1110
movq -0x38(%rbp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x57df
movq 0x58(%rbx), %rsi
subq %rdi, %rsi
callq 0x1110
movq -0x40(%rbp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x57f7
movq 0x40(%rbx), %rsi
subq %rdi, %rsi
callq 0x1110
movq (%r14), %rdi
testq %rdi, %rdi
je 0x580b
movq 0x28(%rbx), %rsi
subq %rdi, %rsi
callq 0x1110
movq %r13, %rdi
callq 0x11a0
nop