// File: 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
subq $0x2f0, %rsp            # imm = 0x2F0
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x210(%rbp)
movb $0x1, -0x162(%rbp)
leaq -0x90(%rbp), %rax
movq %rax, -0x208(%rbp)
movq %rax, -0x98(%rbp)
movups 0x1322b(%rip), %xmm0    # 0x15158
movaps %xmm0, -0xc0(%rbp)
movq $0x0, -0xb0(%rbp)
leaq -0xc0(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq $0x3, -0xa0(%rbp)
leaq -0xc1(%rbp), %rdi
movq %rdi, -0x200(%rbp)
callq 0x3b90
movq -0x208(%rbp), %rdi
movq -0x200(%rbp), %rcx
movq -0xa8(%rbp), %rsi
movq -0xa0(%rbp), %rdx
callq 0x3bb0
jmp 0x1f8e
leaq -0x78(%rbp), %rax
movq %rax, -0x220(%rbp)
movq %rax, -0x98(%rbp)
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, -0xf0(%rbp)
movups 0x131b8(%rip), %xmm0    # 0x15170
movaps %xmm0, -0x100(%rbp)
leaq -0x100(%rbp), %rax
movq %rax, -0xe8(%rbp)
movq $0x3, -0xe0(%rbp)
leaq -0x101(%rbp), %rdi
movq %rdi, -0x218(%rbp)
callq 0x3b90
movq -0x220(%rbp), %rdi
movq -0x218(%rbp), %rcx
movq -0xe8(%rbp), %rsi
movq -0xe0(%rbp), %rdx
callq 0x3bb0
jmp 0x200e
leaq -0x60(%rbp), %rax
movq %rax, -0x230(%rbp)
movq %rax, -0x98(%rbp)
movups 0x13161(%rip), %xmm0    # 0x15188
movaps %xmm0, -0x130(%rbp)
movq $0x0, -0x120(%rbp)
leaq -0x130(%rbp), %rax
movq %rax, -0x118(%rbp)
movq $0x3, -0x110(%rbp)
leaq -0x131(%rbp), %rdi
movq %rdi, -0x228(%rbp)
callq 0x3b90
movq -0x230(%rbp), %rdi
movq -0x228(%rbp), %rcx
movq -0x118(%rbp), %rsi
movq -0x110(%rbp), %rdx
callq 0x3bb0
jmp 0x2088
leaq -0x48(%rbp), %rax
movq %rax, -0x240(%rbp)
movq %rax, -0x98(%rbp)
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, -0x150(%rbp)
movups 0x130ee(%rip), %xmm0    # 0x151a0
movaps %xmm0, -0x160(%rbp)
leaq -0x160(%rbp), %rax
movq %rax, -0x148(%rbp)
movq $0x3, -0x140(%rbp)
leaq -0x161(%rbp), %rdi
movq %rdi, -0x238(%rbp)
callq 0x3b90
movq -0x240(%rbp), %rdi
movq -0x238(%rbp), %rcx
movq -0x148(%rbp), %rsi
movq -0x140(%rbp), %rdx
callq 0x3bb0
jmp 0x2108
movb $0x0, -0x162(%rbp)
leaq -0x90(%rbp), %rax
movq %rax, -0x30(%rbp)
movq $0x4, -0x28(%rbp)
leaq -0x163(%rbp), %rdi
movq %rdi, -0x248(%rbp)
callq 0x3f90
movq -0x248(%rbp), %rcx
movq -0x30(%rbp), %rsi
movq -0x28(%rbp), %rdx
leaq -0x20(%rbp), %rdi
callq 0x3fb0
jmp 0x214f
leaq -0x163(%rbp), %rdi
callq 0x4030
leaq -0x90(%rbp), %rax
movq %rax, -0x258(%rbp)
addq $0x60, %rax
movq %rax, -0x250(%rbp)
movq -0x250(%rbp), %rdi
addq $-0x18, %rdi
movq %rdi, -0x260(%rbp)
callq 0x3d40
movq -0x258(%rbp), %rcx
movq -0x260(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x250(%rbp)
jne 0x2174
leaq -0x161(%rbp), %rdi
callq 0x3c30
leaq -0x131(%rbp), %rdi
callq 0x3c30
leaq -0x101(%rbp), %rdi
callq 0x3c30
leaq -0xc1(%rbp), %rdi
callq 0x3c30
movups 0x12fec(%rip), %xmm0    # 0x151c8
movaps %xmm0, -0x1a0(%rbp)
movups 0x12fce(%rip), %xmm0    # 0x151b8
movaps %xmm0, -0x1b0(%rbp)
leaq -0x1b0(%rbp), %rax
movq %rax, -0x190(%rbp)
movq $0x4, -0x188(%rbp)
leaq -0x1b1(%rbp), %rdi
movq %rdi, -0x268(%rbp)
callq 0x3b90
movq -0x268(%rbp), %rcx
movq -0x190(%rbp), %rsi
movq -0x188(%rbp), %rdx
leaq -0x180(%rbp), %rdi
callq 0x3bb0
jmp 0x2240
leaq -0x1b1(%rbp), %rdi
callq 0x3c30
movq 0x1bd85(%rip), %rdi     # 0x1dfd8
leaq 0x12e6b(%rip), %rsi     # 0x150c5
callq 0x10d0
movq %rax, -0x270(%rbp)
jmp 0x2268
movq -0x210(%rbp), %rax
movq 0x48(%rax), %rdi
addq $0x60, %rdi
callq 0x4050
movq -0x270(%rbp), %rdi
movq %rax, %rsi
callq 0x1030
movq %rax, -0x278(%rbp)
jmp 0x2294
movq -0x278(%rbp), %rdi
movq 0x1bd26(%rip), %rsi     # 0x1dfc8
callq 0x1100
jmp 0x22a9
movq 0x1bd28(%rip), %rdi     # 0x1dfd8
leaq 0x12e16(%rip), %rsi     # 0x150cd
callq 0x10d0
movq %rax, -0x280(%rbp)
jmp 0x22c5
movq -0x210(%rbp), %rax
movq 0x48(%rax), %rdi
addq $0x18, %rdi
callq 0x4070
movq -0x280(%rbp), %rdi
movq %rax, %rsi
callq 0x1030
movq %rax, -0x288(%rbp)
jmp 0x22f1
movq -0x288(%rbp), %rdi
movq 0x1bcc9(%rip), %rsi     # 0x1dfc8
callq 0x1100
jmp 0x2306
movsd 0x12d42(%rip), %xmm0    # 0x15050
movsd %xmm0, -0x1c0(%rbp)
movl $0x0, -0x1c4(%rbp)
movslq -0x1c4(%rbp), %rax
movq %rax, -0x290(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x4090
movq %rax, %rcx
movq -0x290(%rbp), %rax
cmpq %rcx, %rax
jae 0x2611
movq -0x210(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x298(%rbp)
movslq -0x1c4(%rbp), %rsi
leaq -0x20(%rbp), %rdi
callq 0x40c0
movq %rax, %rsi
leaq -0x1e0(%rbp), %rdi
callq 0x3c50
jmp 0x237d
movq -0x298(%rbp), %rdi
leaq -0x1e0(%rbp), %rsi
callq 0x11be0
jmp 0x2392
leaq -0x1e0(%rbp), %rdi
callq 0x3d40
movq -0x210(%rbp), %rax
movq 0x48(%rax), %rsi
leaq -0x1f8(%rbp), %rdi
callq 0x11df0
jmp 0x23b7
xorl %eax, %eax
movl %eax, %esi
leaq -0x1f8(%rbp), %rdi
callq 0x4100
movsd (%rax), %xmm0
movsd %xmm0, -0x2a8(%rbp)
movslq -0x1c4(%rbp), %rsi
leaq -0x180(%rbp), %rdi
callq 0x4100
movsd -0x2a8(%rbp), %xmm0
movsd (%rax), %xmm1
subsd %xmm1, %xmm0
callq 0x40e0
movsd %xmm0, -0x2a0(%rbp)
jmp 0x2405
movsd -0x2a0(%rbp), %xmm1
movsd -0x1c0(%rbp), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, -0x1c0(%rbp)
leaq -0x1f8(%rbp), %rdi
callq 0x3d40
movl -0x1c4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c4(%rbp)
jmp 0x2320
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd0(%rbp)
movl %eax, -0xd4(%rbp)
jmp 0x2528
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd0(%rbp)
movl %eax, -0xd4(%rbp)
jmp 0x251c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd0(%rbp)
movl %eax, -0xd4(%rbp)
jmp 0x2510
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd0(%rbp)
movl %eax, -0xd4(%rbp)
jmp 0x2504
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd0(%rbp)
movl %eax, -0xd4(%rbp)
leaq -0x163(%rbp), %rdi
callq 0x4030
leaq -0x90(%rbp), %rax
movq %rax, -0x2b8(%rbp)
addq $0x60, %rax
movq %rax, -0x2b0(%rbp)
movq -0x2b0(%rbp), %rdi
addq $-0x18, %rdi
movq %rdi, -0x2c0(%rbp)
callq 0x3d40
movq -0x2b8(%rbp), %rcx
movq -0x2c0(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x2b0(%rbp)
jne 0x24d1
jmp 0x2504
leaq -0x161(%rbp), %rdi
callq 0x3c30
leaq -0x131(%rbp), %rdi
callq 0x3c30
leaq -0x101(%rbp), %rdi
callq 0x3c30
leaq -0xc1(%rbp), %rdi
callq 0x3c30
testb $0x1, -0x162(%rbp)
jne 0x253f
jmp 0x258c
movq -0x98(%rbp), %rax
leaq -0x90(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x2c8(%rbp)
je 0x258a
movq -0x2c8(%rbp), %rdi
addq $-0x18, %rdi
movq %rdi, -0x2d0(%rbp)
callq 0x3d40
movq -0x2d0(%rbp), %rax
leaq -0x90(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x2c8(%rbp)
jne 0x2559
jmp 0x258c
jmp 0x26be
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd0(%rbp)
movl %eax, -0xd4(%rbp)
leaq -0x1b1(%rbp), %rdi
callq 0x3c30
jmp 0x26b5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd0(%rbp)
movl %eax, -0xd4(%rbp)
jmp 0x26a9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd0(%rbp)
movl %eax, -0xd4(%rbp)
leaq -0x1e0(%rbp), %rdi
callq 0x3d40
jmp 0x26a9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd0(%rbp)
movl %eax, -0xd4(%rbp)
leaq -0x1f8(%rbp), %rdi
callq 0x3d40
jmp 0x26a9
movsd -0x1c0(%rbp), %xmm0
movl $0x2, %edi
callq 0x4120
movsd %xmm0, -0x2d8(%rbp)
jmp 0x262d
movsd -0x2d8(%rbp), %xmm0
movsd %xmm0, -0x1c0(%rbp)
movq 0x1b994(%rip), %rdi     # 0x1dfd8
leaq 0x12a8a(%rip), %rsi     # 0x150d5
callq 0x10d0
movq %rax, -0x2e0(%rbp)
jmp 0x2659
movq -0x2e0(%rbp), %rdi
movsd -0x1c0(%rbp), %xmm0
callq 0x11a0
movq %rax, -0x2e8(%rbp)
jmp 0x2676
movq -0x2e8(%rbp), %rdi
movq 0x1b944(%rip), %rsi     # 0x1dfc8
callq 0x1100
jmp 0x268b
leaq -0x180(%rbp), %rdi
callq 0x3d40
leaq -0x20(%rbp), %rdi
callq 0x4150
addq $0x2f0, %rsp            # imm = 0x2F0
popq %rbp
retq
leaq -0x180(%rbp), %rdi
callq 0x3d40
leaq -0x20(%rbp), %rdi
callq 0x4150
movq -0xd0(%rbp), %rdi
callq 0x1180
nopw (%rax,%rax)