// File: /workspace/github_cpp_makefile_star2_O2/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 $0x128, %rsp            # imm = 0x128
movq %rdi, -0x38(%rbp)
movupd 0x58b4(%rip), %xmm0     # 0x7158
leaq -0x60(%rbp), %rsi
movapd %xmm0, (%rsi)
andq $0x0, 0x10(%rsi)
leaq -0xe0(%rbp), %r14
pushq $0x3
popq %rdx
leaq -0x2d(%rbp), %rcx
movq %r14, %rdi
callq 0x2290
leaq -0xc8(%rbp), %r15
movupd 0x589a(%rip), %xmm0     # 0x7170
leaq -0x100(%rbp), %rsi
movapd %xmm0, (%rsi)
movabsq $0x3ff0000000000000, %rbx # imm = 0x3FF0000000000000
movq %rbx, 0x10(%rsi)
pushq $0x3
popq %rdx
leaq -0x2c(%rbp), %rcx
movq %r15, %rdi
callq 0x2290
leaq -0xb0(%rbp), %r15
movupd 0x587b(%rip), %xmm0     # 0x7188
leaq -0x150(%rbp), %rsi
movapd %xmm0, (%rsi)
andq $0x0, 0x10(%rsi)
pushq $0x3
popq %rdx
leaq -0x2b(%rbp), %rcx
movq %r15, %rdi
callq 0x2290
leaq -0x98(%rbp), %r15
movupd 0x5865(%rip), %xmm0     # 0x71a0
leaq -0x130(%rbp), %rsi
movapd %xmm0, (%rsi)
movq %rbx, 0x10(%rsi)
pushq $0x3
popq %rdx
leaq -0x2a(%rbp), %rcx
movq %r15, %rdi
callq 0x2290
leaq -0x78(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
pushq $0x4
popq %rdx
leaq -0x29(%rbp), %rcx
callq 0x2342
pushq $0x48
popq %rbx
leaq (%rbx,%rbp), %rdi
addq $-0xe0, %rdi
callq 0x2914
addq $-0x18, %rbx
cmpq $-0x18, %rbx
jne 0x1973
movups 0x5834(%rip), %xmm0     # 0x71c8
leaq -0xe0(%rbp), %rsi
movaps %xmm0, 0x10(%rsi)
movupd 0x5811(%rip), %xmm0     # 0x71b8
movapd %xmm0, (%rsi)
leaq -0x60(%rbp), %rdi
pushq $0x4
popq %rdx
leaq -0x100(%rbp), %rcx
callq 0x2290
movq 0x9613(%rip), %rdi      # 0xafd8
leaq 0x56f9(%rip), %rsi      # 0x70c5
callq 0x10e0
movq -0x38(%rbp), %rcx
movq 0x48(%rcx), %rcx
movq 0x68(%rcx), %rsi
subq 0x60(%rcx), %rsi
sarq $0x3, %rsi
movq %rax, %rdi
callq 0x1090
movq %rax, %rdi
callq 0x1070
movq 0x95dc(%rip), %rdi      # 0xafd8
leaq 0x56ca(%rip), %rsi      # 0x70cd
callq 0x10e0
movq -0x38(%rbp), %rcx
movq 0x48(%rcx), %rcx
movq 0x20(%rcx), %rsi
subq 0x18(%rcx), %rsi
sarq $0x3, %rsi
movq %rax, %rdi
callq 0x1090
movq %rax, %rdi
callq 0x1070
movsd 0x561c(%rip), %xmm0     # 0x7050
movsd %xmm0, -0x40(%rbp)
xorl %r13d, %r13d
leaq -0x118(%rbp), %r14
leaq -0xe0(%rbp), %r15
xorl %ebx, %ebx
movq -0x78(%rbp), %rsi
movq -0x70(%rbp), %rax
subq %rsi, %rax
cqto
pushq $0x18
popq %rcx
idivq %rcx
cmpq %rbx, %rax
jbe 0x1ad8
movq -0x38(%rbp), %rax
movq 0x48(%rax), %r12
addq %r13, %rsi
movq %r14, %rdi
callq 0x22c6
movq %r12, %rdi
movq %r14, %rsi
callq 0x5788
movq %r14, %rdi
callq 0x2914
movq -0x38(%rbp), %rax
movq 0x48(%rax), %rsi
movq %r15, %rdi
callq 0x5864
movq -0xe0(%rbp), %rax
movsd (%rax), %xmm0
movq -0x60(%rbp), %rax
subsd (%rax,%rbx,8), %xmm0
andpd 0x55ba(%rip), %xmm0     # 0x7070
movsd -0x40(%rbp), %xmm1
subsd %xmm0, %xmm1
movsd %xmm1, -0x40(%rbp)
movq %r15, %rdi
callq 0x2914
incq %rbx
addq $0x18, %r13
jmp 0x1a4c
movq 0x94f9(%rip), %rdi      # 0xafd8
leaq 0x55ef(%rip), %rsi      # 0x70d5
callq 0x10e0
movsd -0x40(%rbp), %xmm0
mulsd %xmm0, %xmm0
movq %rax, %rdi
callq 0x1130
movq %rax, %rdi
callq 0x1070
leaq -0x60(%rbp), %rdi
callq 0x2914
leaq -0x78(%rbp), %rdi
callq 0x237c
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x1b92
movq %rax, %rbx
pushq $0x48
popq %r14
leaq (%r14,%rbp), %rdi
addq $-0xe0, %rdi
callq 0x2914
addq $-0x18, %r14
cmpq $-0x18, %r14
jne 0x1b34
jmp 0x1b9b
jmp 0x1b54
jmp 0x1b54
movq %rax, %rbx
addq $-0x18, %r15
movq %r15, %rdi
callq 0x2914
cmpq %r14, %r15
jne 0x1b57
jmp 0x1b9b
movq %rax, %rbx
jmp 0x1b9b
jmp 0x1b86
jmp 0x1b86
jmp 0x1b86
movq %rax, %rbx
leaq -0x118(%rbp), %rdi
callq 0x2914
jmp 0x1b89
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0x2914
leaq -0x78(%rbp), %rdi
callq 0x237c
movq %rbx, %rdi
callq 0x1180
nop