// File: /workspace/github_cpp_makefile_star2_O1/samuel500[P]NEAT/population.cpp
// Function: Population::test_elite()
void Population::test_elite(){

	vector<vector<double>> xs {{1., 0.,0.}, {1., 0.,1.}, {1., 1.,0.}, {1., 1.,1.}};
	vector<double> ys {0., 1., 1., 0.};

	cout << "el n c " << elite->connections.size() << endl;
	cout << "el n n " << elite->nodes.size() << endl;


	double fitness=4.;
	for(int i=0; i<xs.size(); i++){
		// cout << "in " << xs[i][1] << " " << xs[i][2] << endl;
		elite->activate(xs[i]);
		vector<double> out = elite->get_outputs();
		// cout << "out " << out[0] << endl;

		fitness -= abs(out[0]-ys[i]);
	}
	fitness = pow(fitness, 2);
	cout << "fitness" << fitness << endl;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movq %rdi, %rbx
movupd 0x54b7(%rip), %xmm0     # 0x7168
leaq -0x50(%rbp), %rsi
movapd %xmm0, (%rsi)
movq $0x0, 0x10(%rsi)
leaq -0xe0(%rbp), %r15
leaq -0x2d(%rbp), %rcx
movl $0x3, %edx
movq %r15, %rdi
callq 0x297e
leaq -0xc8(%rbp), %r14
movupd 0x5498(%rip), %xmm0     # 0x7180
leaq -0x100(%rbp), %rsi
movapd %xmm0, (%rsi)
movabsq $0x3ff0000000000000, %r12 # imm = 0x3FF0000000000000
movq %r12, 0x10(%rsi)
leaq -0x2c(%rbp), %rcx
movl $0x3, %edx
movq %r14, %rdi
callq 0x297e
leaq -0xb0(%rbp), %r14
movupd 0x5477(%rip), %xmm0     # 0x7198
leaq -0x140(%rbp), %rsi
movapd %xmm0, (%rsi)
movq $0x0, 0x10(%rsi)
leaq -0x2b(%rbp), %rcx
movl $0x3, %edx
movq %r14, %rdi
callq 0x297e
leaq -0x98(%rbp), %r14
movupd 0x545c(%rip), %xmm0     # 0x71b0
leaq -0x120(%rbp), %rsi
movapd %xmm0, (%rsi)
movq %r12, 0x10(%rsi)
leaq -0x2a(%rbp), %rcx
movl $0x3, %edx
movq %r14, %rdi
callq 0x297e
leaq -0x68(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
leaq -0x29(%rbp), %rcx
movl $0x4, %edx
callq 0x2a44
movl $0x60, %r14d
movq -0xf8(%rbp,%r14), %rdi
testq %rdi, %rdi
je 0x1db0
movq -0xe8(%rbp,%r14), %rsi
subq %rdi, %rsi
callq 0x1110
addq $-0x18, %r14
jne 0x1d93
movups 0x541b(%rip), %xmm0     # 0x71d8
leaq -0xe0(%rbp), %rsi
movaps %xmm0, 0x10(%rsi)
movupd 0x53f8(%rip), %xmm0     # 0x71c8
movapd %xmm0, (%rsi)
leaq -0x50(%rbp), %rdi
leaq -0x100(%rbp), %rcx
movl $0x4, %edx
callq 0x297e
movq 0x81e8(%rip), %rdi      # 0x9fd8
leaq 0x52de(%rip), %rsi      # 0x70d5
movl $0x7, %edx
callq 0x1120
movq 0x48(%rbx), %rax
movq 0x68(%rax), %rsi
subq 0x60(%rax), %rsi
sarq $0x3, %rsi
movq 0x81c0(%rip), %rdi      # 0x9fd8
callq 0x1090
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x10f0
movsbl %al, %esi
movq %r14, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x10a0
movq 0x818a(%rip), %rdi      # 0x9fd8
leaq 0x5288(%rip), %rsi      # 0x70dd
movl $0x7, %edx
callq 0x1120
movq 0x48(%rbx), %rax
movq 0x20(%rax), %rsi
subq 0x18(%rax), %rsi
sarq $0x3, %rsi
movq 0x8162(%rip), %rdi      # 0x9fd8
callq 0x1090
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x10f0
movsbl %al, %esi
movq %r14, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x10a0
movq -0x68(%rbp), %rsi
cmpq %rsi, -0x60(%rbp)
je 0x1f72
movsd 0x5195(%rip), %xmm0     # 0x7050
movsd %xmm0, -0x38(%rbp)
xorl %r13d, %r13d
leaq -0x80(%rbp), %r14
xorl %r15d, %r15d
movq 0x48(%rbx), %r12
addq %r13, %rsi
movq %r14, %rdi
callq 0x29c4
movq %r12, %rdi
movq %r14, %rsi
callq 0x5b76
movq -0x80(%rbp), %rdi
testq %rdi, %rdi
je 0x1ef9
movq -0x70(%rbp), %rsi
subq %rdi, %rsi
callq 0x1110
movq 0x48(%rbx), %rsi
leaq -0xe0(%rbp), %rdi
callq 0x5cb8
movq -0xe0(%rbp), %rdi
movsd (%rdi), %xmm0
movq -0x50(%rbp), %rax
subsd (%rax,%r15,8), %xmm0
movq -0xd0(%rbp), %rsi
andpd 0x5143(%rip), %xmm0     # 0x7070
movsd -0x38(%rbp), %xmm1
subsd %xmm0, %xmm1
movsd %xmm1, -0x38(%rbp)
subq %rdi, %rsi
callq 0x1110
incq %r15
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rax
subq %rsi, %rax
sarq $0x3, %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rax
addq $0x18, %r13
cmpq %r15, %rax
ja 0x1eca
jmp 0x1f7f
movsd 0x50d6(%rip), %xmm0     # 0x7050
movsd %xmm0, -0x38(%rbp)
movq 0x8052(%rip), %rdi      # 0x9fd8
leaq 0x5158(%rip), %rsi      # 0x70e5
movl $0x7, %edx
callq 0x1120
movsd -0x38(%rbp), %xmm0
mulsd %xmm0, %xmm0
movq 0x8031(%rip), %rdi      # 0x9fd8
callq 0x1150
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x10f0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x10a0
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0x1feb
movq -0x40(%rbp), %rsi
subq %rdi, %rsi
callq 0x1110
leaq -0x68(%rbp), %rdi
callq 0x2a8e
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x20a1
movq %rax, %rbx
leaq -0x80(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
callq 0x11d0
movb $0x1, %al
jmp 0x2038
jmp 0x2029
jmp 0x2029
movq %rax, %rbx
xorl %eax, %eax
jmp 0x2038
movq %rax, %rbx
xorl %eax, %eax
movq %r15, %r14
cmpq %r14, %r15
sete %cl
orb %al, %cl
jne 0x20aa
leaq -0xe0(%rbp), %r15
movq -0x18(%r14), %rdi
testq %rdi, %rdi
je 0x205e
movq -0x8(%r14), %rsi
subq %rdi, %rsi
callq 0x1110
addq $-0x18, %r14
cmpq %r15, %r14
jne 0x2049
jmp 0x20aa
jmp 0x2089
jmp 0x2089
jmp 0x2089
movq %rax, %rbx
movq -0x80(%rbp), %rdi
testq %rdi, %rdi
je 0x208c
movq -0x70(%rbp), %rsi
subq %rdi, %rsi
callq 0x1110
jmp 0x208c
movq %rax, %rbx
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0x20a1
movq -0x40(%rbp), %rsi
subq %rdi, %rsi
callq 0x1110
leaq -0x68(%rbp), %rdi
callq 0x2a8e
movq %rbx, %rdi
callq 0x11a0