// File: /workspace/github_cpp_makefile_star2_O3/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 0x5517(%rip), %xmm0     # 0x7168
leaq -0x50(%rbp), %rsi
movapd %xmm0, (%rsi)
movq $0x0, 0x10(%rsi)
leaq -0xe0(%rbp), %r14
leaq -0x2d(%rbp), %rcx
movl $0x3, %edx
movq %r14, %rdi
callq 0x2950
leaq -0xc8(%rbp), %r15
movupd 0x54f8(%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 %r15, %rdi
callq 0x2950
leaq -0xb0(%rbp), %r15
movupd 0x54d7(%rip), %xmm0     # 0x7198
leaq -0x140(%rbp), %rsi
movapd %xmm0, (%rsi)
movq $0x0, 0x10(%rsi)
leaq -0x2b(%rbp), %rcx
movl $0x3, %edx
movq %r15, %rdi
callq 0x2950
leaq -0x98(%rbp), %r15
movupd 0x54bc(%rip), %xmm0     # 0x71b0
leaq -0x120(%rbp), %rsi
movapd %xmm0, (%rsi)
movq %r12, 0x10(%rsi)
leaq -0x2a(%rbp), %rcx
movl $0x3, %edx
movq %r15, %rdi
callq 0x2950
leaq -0x68(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
leaq -0x29(%rbp), %rcx
movl $0x4, %edx
callq 0x2a16
movl $0x60, %r14d
movq -0xf8(%rbp,%r14), %rdi
testq %rdi, %rdi
je 0x1d50
movq -0xe8(%rbp,%r14), %rsi
subq %rdi, %rsi
callq 0x1110
addq $-0x18, %r14
jne 0x1d33
movups 0x547b(%rip), %xmm0     # 0x71d8
leaq -0xe0(%rbp), %rsi
movaps %xmm0, 0x10(%rsi)
movupd 0x5458(%rip), %xmm0     # 0x71c8
movapd %xmm0, (%rsi)
leaq -0x50(%rbp), %rdi
leaq -0x100(%rbp), %rcx
movl $0x4, %edx
callq 0x2950
movq 0x8248(%rip), %rdi      # 0x9fd8
leaq 0x533e(%rip), %rsi      # 0x70d5
movl $0x7, %edx
callq 0x1120
movq 0x48(%rbx), %rax
movq 0x68(%rax), %rsi
subq 0x60(%rax), %rsi
sarq $0x3, %rsi
movq 0x8220(%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 0x81ea(%rip), %rdi      # 0x9fd8
leaq 0x52e8(%rip), %rsi      # 0x70dd
movl $0x7, %edx
callq 0x1120
movq 0x48(%rbx), %rax
movq 0x20(%rax), %rsi
subq 0x18(%rax), %rsi
sarq $0x3, %rsi
movq 0x81c2(%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 0x1f12
movsd 0x51f5(%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 0x2996
movq %r12, %rdi
movq %r14, %rsi
callq 0x5a7e
movq -0x80(%rbp), %rdi
testq %rdi, %rdi
je 0x1e99
movq -0x70(%rbp), %rsi
subq %rdi, %rsi
callq 0x1110
movq 0x48(%rbx), %rsi
leaq -0xe0(%rbp), %rdi
callq 0x5ba8
movq -0xe0(%rbp), %rdi
movsd (%rdi), %xmm0
movq -0x50(%rbp), %rax
subsd (%rax,%r15,8), %xmm0
movq -0xd0(%rbp), %rsi
andpd 0x51a3(%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 0x1e6a
jmp 0x1f1f
movsd 0x5136(%rip), %xmm0     # 0x7050
movsd %xmm0, -0x38(%rbp)
movq 0x80b2(%rip), %rdi      # 0x9fd8
leaq 0x51b8(%rip), %rsi      # 0x70e5
movl $0x7, %edx
callq 0x1120
movsd -0x38(%rbp), %xmm0
mulsd %xmm0, %xmm0
movq 0x8091(%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 0x1f8b
movq -0x40(%rbp), %rsi
subq %rdi, %rsi
callq 0x1110
leaq -0x68(%rbp), %rdi
callq 0x2a60
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x2040
movq %rax, %rbx
movl $0x60, %r14d
movq -0xf8(%rbp,%r14), %rdi
testq %rdi, %rdi
je 0x1fd4
movq -0xe8(%rbp,%r14), %rsi
subq %rdi, %rsi
callq 0x1110
addq $-0x18, %r14
jne 0x1fb7
jmp 0x2049
jmp 0x1fe0
jmp 0x1fe0
movq %rax, %rbx
movq -0x18(%r15), %rdi
testq %rdi, %rdi
je 0x1ff8
movq -0x8(%r15), %rsi
subq %rdi, %rsi
callq 0x1110
addq $-0x18, %r15
cmpq %r14, %r15
jne 0x1fe3
jmp 0x2049
movq %rax, %rbx
jmp 0x2049
jmp 0x2028
jmp 0x2028
jmp 0x2028
movq %rax, %rbx
movq -0x80(%rbp), %rdi
testq %rdi, %rdi
je 0x202b
movq -0x70(%rbp), %rsi
subq %rdi, %rsi
callq 0x1110
jmp 0x202b
movq %rax, %rbx
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0x2040
movq -0x40(%rbp), %rsi
subq %rdi, %rsi
callq 0x1110
leaq -0x68(%rbp), %rdi
callq 0x2a60
movq %rbx, %rdi
callq 0x11a0
nop