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

	all_nodes.clear();
	all_connections.clear();

	speciate();

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

	vector<Individual*>::iterator indPtr;


	double pop_avg_fitness = 0.;

	for(indPtr=individuals.begin(); indPtr!=individuals.end(); ++indPtr){
		double fitness=4.;
		for(int i=0; i<xs.size(); i++){
			(*indPtr)->activate(xs[i]);
			vector<double> out = (*indPtr)->get_outputs();
			(*indPtr)->reset_activations();
			fitness -= abs(out[0]-ys[i]);
		}
		fitness = pow(fitness, 2);
		(*indPtr)->fitness = fitness;
	}
	// cout << "x1" << endl;

	vector<Species*>::iterator spePtr;

	sort(individuals.begin(), individuals.end(), indPtr_compare2);

	elite = individuals[individuals.size()-1];
	// cout << "x2" << endl;
	if(elite->fitness>max_fitness) max_fitness = elite->fitness;


	for(spePtr=species.begin(); spePtr!=species.end(); ++spePtr){
		(*spePtr)->adjust_fitness();

	}

	sort(species.begin(), species.end(), spePtr_compare);



	for(indPtr=individuals.begin(); indPtr!=individuals.end(); ++indPtr){
		pop_avg_fitness += (*indPtr)->adjusted_fitness;
	}

	pop_avg_fitness /= individuals.size();


	for(indPtr=individuals.begin(); indPtr!=individuals.end(); ++indPtr){
		(*indPtr)->est_n_offspring = (*indPtr)->adjusted_fitness / pop_avg_fitness;
	}

	int temp_n_offspring = 0;
	for(spePtr=species.begin(); spePtr!=species.end(); ++spePtr){
		temp_n_offspring += (*spePtr)->calc_n_offspring();
	}
	// cout << "x3" << endl;

	// give missing offspring (bc double->int) to best species
	species[species.size()-1]->n_offspring += (pop_size - temp_n_offspring);


	for(spePtr=species.begin(); spePtr!=species.end(); ++spePtr){
		if((*spePtr)->n_offspring==0) species.erase(spePtr);
	}


	vector<Individual*> new_individuals;
	vector<Individual*> descendants;

	for(spePtr=species.begin(); spePtr!=species.end(); ++spePtr){
	// cout << "x4" << endl;

		descendants = (*spePtr)->evolve(&all_nodes, &all_connections);
	// cout << "x5" << endl;

		new_individuals.insert(end(new_individuals), begin(descendants), end(descendants));
	}

	for(indPtr=individuals.begin(); indPtr!=prev(individuals.end()); ++indPtr){
		delete *indPtr;
	}
	individuals.clear();
	individuals = new_individuals;


	for(spePtr=species.begin(); spePtr!=prev(species.end()); ++spePtr){
		delete *spePtr;
	}
	species.clear();


}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x4a0, %rsp            # imm = 0x4A0
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x370(%rbp)
addq $0x18, %rdi
callq 0x41b0
movq -0x370(%rbp), %rdi
addq $0x30, %rdi
callq 0x41d0
movq -0x370(%rbp), %rdi
callq 0x36a0
movb $0x1, -0x162(%rbp)
leaq -0x90(%rbp), %rax
movq %rax, -0x368(%rbp)
movq %rax, -0x98(%rbp)
movups 0x12aa6(%rip), %xmm0    # 0x151d8
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, -0x360(%rbp)
callq 0x3b90
movq -0x368(%rbp), %rdi
movq -0x360(%rbp), %rcx
movq -0xa8(%rbp), %rsi
movq -0xa0(%rbp), %rdx
callq 0x3bb0
jmp 0x2793
leaq -0x78(%rbp), %rax
movq %rax, -0x380(%rbp)
movq %rax, -0x98(%rbp)
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, -0xf0(%rbp)
movups 0x12a33(%rip), %xmm0    # 0x151f0
movaps %xmm0, -0x100(%rbp)
leaq -0x100(%rbp), %rax
movq %rax, -0xe8(%rbp)
movq $0x3, -0xe0(%rbp)
leaq -0x101(%rbp), %rdi
movq %rdi, -0x378(%rbp)
callq 0x3b90
movq -0x380(%rbp), %rdi
movq -0x378(%rbp), %rcx
movq -0xe8(%rbp), %rsi
movq -0xe0(%rbp), %rdx
callq 0x3bb0
jmp 0x2813
leaq -0x60(%rbp), %rax
movq %rax, -0x390(%rbp)
movq %rax, -0x98(%rbp)
movups 0x129dc(%rip), %xmm0    # 0x15208
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, -0x388(%rbp)
callq 0x3b90
movq -0x390(%rbp), %rdi
movq -0x388(%rbp), %rcx
movq -0x118(%rbp), %rsi
movq -0x110(%rbp), %rdx
callq 0x3bb0
jmp 0x288d
leaq -0x48(%rbp), %rax
movq %rax, -0x3a0(%rbp)
movq %rax, -0x98(%rbp)
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, -0x150(%rbp)
movups 0x12969(%rip), %xmm0    # 0x15220
movaps %xmm0, -0x160(%rbp)
leaq -0x160(%rbp), %rax
movq %rax, -0x148(%rbp)
movq $0x3, -0x140(%rbp)
leaq -0x161(%rbp), %rdi
movq %rdi, -0x398(%rbp)
callq 0x3b90
movq -0x3a0(%rbp), %rdi
movq -0x398(%rbp), %rcx
movq -0x148(%rbp), %rsi
movq -0x140(%rbp), %rdx
callq 0x3bb0
jmp 0x290d
movb $0x0, -0x162(%rbp)
leaq -0x90(%rbp), %rax
movq %rax, -0x30(%rbp)
movq $0x4, -0x28(%rbp)
leaq -0x163(%rbp), %rdi
movq %rdi, -0x3a8(%rbp)
callq 0x3f90
movq -0x3a8(%rbp), %rcx
movq -0x30(%rbp), %rsi
movq -0x28(%rbp), %rdx
leaq -0x20(%rbp), %rdi
callq 0x3fb0
jmp 0x2954
leaq -0x163(%rbp), %rdi
callq 0x4030
leaq -0x90(%rbp), %rax
movq %rax, -0x3b8(%rbp)
addq $0x60, %rax
movq %rax, -0x3b0(%rbp)
movq -0x3b0(%rbp), %rdi
addq $-0x18, %rdi
movq %rdi, -0x3c0(%rbp)
callq 0x3d40
movq -0x3b8(%rbp), %rcx
movq -0x3c0(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x3b0(%rbp)
jne 0x2979
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 0x12867(%rip), %xmm0    # 0x15248
movaps %xmm0, -0x1a0(%rbp)
movups 0x12849(%rip), %xmm0    # 0x15238
movaps %xmm0, -0x1b0(%rbp)
leaq -0x1b0(%rbp), %rax
movq %rax, -0x190(%rbp)
movq $0x4, -0x188(%rbp)
leaq -0x1b1(%rbp), %rdi
movq %rdi, -0x3c8(%rbp)
callq 0x3b90
movq -0x3c8(%rbp), %rcx
movq -0x190(%rbp), %rsi
movq -0x188(%rbp), %rdx
leaq -0x180(%rbp), %rdi
callq 0x3bb0
jmp 0x2a45
leaq -0x1b1(%rbp), %rdi
callq 0x3c30
leaq -0x1c0(%rbp), %rdi
callq 0x41f0
movq -0x370(%rbp), %rdi
xorps %xmm0, %xmm0
movsd %xmm0, -0x1c8(%rbp)
callq 0x4210
movq %rax, -0x1d0(%rbp)
movq -0x1d0(%rbp), %rax
movq %rax, -0x1c0(%rbp)
movq -0x370(%rbp), %rdi
callq 0x4280
movq %rax, -0x1d8(%rbp)
leaq -0x1c0(%rbp), %rdi
leaq -0x1d8(%rbp), %rsi
callq 0x4240
testb $0x1, %al
jne 0x2ab8
jmp 0x2e49
movsd 0x12590(%rip), %xmm0    # 0x15050
movsd %xmm0, -0x1e0(%rbp)
movl $0x0, -0x1e4(%rbp)
movslq -0x1e4(%rbp), %rax
movq %rax, -0x3d0(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x4090
movq %rax, %rcx
movq -0x3d0(%rbp), %rax
cmpq %rcx, %rax
jae 0x2de1
leaq -0x1c0(%rbp), %rdi
callq 0x42b0
movq (%rax), %rax
movq %rax, -0x3d8(%rbp)
movslq -0x1e4(%rbp), %rsi
leaq -0x20(%rbp), %rdi
callq 0x40c0
movq %rax, %rsi
leaq -0x200(%rbp), %rdi
callq 0x3c50
jmp 0x2b33
movq -0x3d8(%rbp), %rdi
leaq -0x200(%rbp), %rsi
callq 0x11be0
jmp 0x2b48
leaq -0x200(%rbp), %rdi
callq 0x3d40
leaq -0x1c0(%rbp), %rdi
callq 0x42b0
movq (%rax), %rsi
leaq -0x218(%rbp), %rdi
callq 0x11df0
jmp 0x2b71
leaq -0x1c0(%rbp), %rdi
callq 0x42b0
movq (%rax), %rdi
callq 0x11ed0
jmp 0x2b87
xorl %eax, %eax
movl %eax, %esi
leaq -0x218(%rbp), %rdi
callq 0x4100
movsd (%rax), %xmm0
movsd %xmm0, -0x3e8(%rbp)
movslq -0x1e4(%rbp), %rsi
leaq -0x180(%rbp), %rdi
callq 0x4100
movsd -0x3e8(%rbp), %xmm0
movsd (%rax), %xmm1
subsd %xmm1, %xmm0
callq 0x40e0
movsd %xmm0, -0x3e0(%rbp)
jmp 0x2bd5
movsd -0x3e0(%rbp), %xmm1
movsd -0x1e0(%rbp), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, -0x1e0(%rbp)
leaq -0x218(%rbp), %rdi
callq 0x3d40
movl -0x1e4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1e4(%rbp)
jmp 0x2ad2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd0(%rbp)
movl %eax, -0xd4(%rbp)
jmp 0x2cf8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd0(%rbp)
movl %eax, -0xd4(%rbp)
jmp 0x2cec
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd0(%rbp)
movl %eax, -0xd4(%rbp)
jmp 0x2ce0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd0(%rbp)
movl %eax, -0xd4(%rbp)
jmp 0x2cd4
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, -0x3f8(%rbp)
addq $0x60, %rax
movq %rax, -0x3f0(%rbp)
movq -0x3f0(%rbp), %rdi
addq $-0x18, %rdi
movq %rdi, -0x400(%rbp)
callq 0x3d40
movq -0x3f8(%rbp), %rcx
movq -0x400(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x3f0(%rbp)
jne 0x2ca1
jmp 0x2cd4
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 0x2d0f
jmp 0x2d5c
movq -0x98(%rbp), %rax
leaq -0x90(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x408(%rbp)
je 0x2d5a
movq -0x408(%rbp), %rdi
addq $-0x18, %rdi
movq %rdi, -0x410(%rbp)
callq 0x3d40
movq -0x410(%rbp), %rax
leaq -0x90(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x408(%rbp)
jne 0x2d29
jmp 0x2d5c
jmp 0x368e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd0(%rbp)
movl %eax, -0xd4(%rbp)
leaq -0x1b1(%rbp), %rdi
callq 0x3c30
jmp 0x3685
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd0(%rbp)
movl %eax, -0xd4(%rbp)
jmp 0x3679
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd0(%rbp)
movl %eax, -0xd4(%rbp)
leaq -0x200(%rbp), %rdi
callq 0x3d40
jmp 0x3679
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd0(%rbp)
movl %eax, -0xd4(%rbp)
leaq -0x218(%rbp), %rdi
callq 0x3d40
jmp 0x3679
movsd -0x1e0(%rbp), %xmm0
movl $0x2, %edi
callq 0x4120
movsd %xmm0, -0x418(%rbp)
jmp 0x2dfd
movsd -0x418(%rbp), %xmm0
movsd %xmm0, -0x1e0(%rbp)
movsd -0x1e0(%rbp), %xmm0
movsd %xmm0, -0x420(%rbp)
leaq -0x1c0(%rbp), %rdi
callq 0x42b0
movsd -0x420(%rbp), %xmm0
movq (%rax), %rax
movsd %xmm0, (%rax)
leaq -0x1c0(%rbp), %rdi
callq 0x42d0
jmp 0x2a89
leaq -0x220(%rbp), %rdi
callq 0x42f0
movq -0x370(%rbp), %rdi
callq 0x4210
movq -0x370(%rbp), %rdi
movq %rax, -0x228(%rbp)
callq 0x4280
movq %rax, -0x230(%rbp)
movq -0x228(%rbp), %rdi
movq -0x230(%rbp), %rsi
leaq -0x1530(%rip), %rdx     # 0x1960
callq 0x4310
jmp 0x2e97
movq -0x370(%rbp), %rdi
callq 0x17e0
movq -0x370(%rbp), %rdi
movq %rax, %rsi
subq $0x1, %rsi
callq 0x4360
movq %rax, %rcx
movq -0x370(%rbp), %rax
movq (%rcx), %rcx
movq %rcx, 0x48(%rax)
movq 0x48(%rax), %rcx
movsd (%rcx), %xmm0
ucomisd 0x80(%rax), %xmm0
jbe 0x2ef0
movq -0x370(%rbp), %rax
movq 0x48(%rax), %rcx
movsd (%rcx), %xmm0
movsd %xmm0, 0x80(%rax)
movq -0x370(%rbp), %rdi
addq $0x50, %rdi
callq 0x4380
movq %rax, -0x238(%rbp)
movq -0x238(%rbp), %rax
movq %rax, -0x220(%rbp)
movq -0x370(%rbp), %rdi
addq $0x50, %rdi
callq 0x43f0
movq %rax, -0x240(%rbp)
leaq -0x220(%rbp), %rdi
leaq -0x240(%rbp), %rsi
callq 0x43b0
testb $0x1, %al
jne 0x2f45
jmp 0x2f6b
leaq -0x220(%rbp), %rdi
callq 0x4420
movq (%rax), %rdi
callq 0xd510
jmp 0x2f5b
jmp 0x2f5d
leaq -0x220(%rbp), %rdi
callq 0x4440
jmp 0x2f15
movq -0x370(%rbp), %rdi
addq $0x50, %rdi
movq %rdi, -0x428(%rbp)
callq 0x4380
movq -0x428(%rbp), %rdi
movq %rax, -0x248(%rbp)
callq 0x43f0
movq %rax, -0x250(%rbp)
movq -0x248(%rbp), %rdi
movq -0x250(%rbp), %rsi
leaq -0x1681(%rip), %rdx     # 0x1930
callq 0x4460
jmp 0x2fb8
movq -0x370(%rbp), %rdi
callq 0x4210
movq %rax, -0x258(%rbp)
movq -0x258(%rbp), %rax
movq %rax, -0x1c0(%rbp)
movq -0x370(%rbp), %rdi
callq 0x4280
movq %rax, -0x260(%rbp)
leaq -0x1c0(%rbp), %rdi
leaq -0x260(%rbp), %rsi
callq 0x4240
testb $0x1, %al
jne 0x3005
jmp 0x3037
leaq -0x1c0(%rbp), %rdi
callq 0x42b0
movq (%rax), %rax
movsd 0x8(%rax), %xmm0
addsd -0x1c8(%rbp), %xmm0
movsd %xmm0, -0x1c8(%rbp)
leaq -0x1c0(%rbp), %rdi
callq 0x42d0
jmp 0x2fd9
movq -0x370(%rbp), %rdi
callq 0x17e0
movq -0x370(%rbp), %rdi
movq %rax, %xmm1
movaps 0x1202a(%rip), %xmm0    # 0x15080
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movapd 0x1202e(%rip), %xmm0    # 0x15090
subpd %xmm0, %xmm1
movaps %xmm1, %xmm0
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm0, %xmm1
movsd -0x1c8(%rbp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, -0x1c8(%rbp)
callq 0x4210
movq %rax, -0x268(%rbp)
movq -0x268(%rbp), %rax
movq %rax, -0x1c0(%rbp)
movq -0x370(%rbp), %rdi
callq 0x4280
movq %rax, -0x270(%rbp)
leaq -0x1c0(%rbp), %rdi
leaq -0x270(%rbp), %rsi
callq 0x4240
testb $0x1, %al
jne 0x30cb
jmp 0x3119
leaq -0x1c0(%rbp), %rdi
callq 0x42b0
movq (%rax), %rax
movsd 0x8(%rax), %xmm0
divsd -0x1c8(%rbp), %xmm0
movsd %xmm0, -0x430(%rbp)
leaq -0x1c0(%rbp), %rdi
callq 0x42b0
movsd -0x430(%rbp), %xmm0
movq (%rax), %rax
movsd %xmm0, 0x10(%rax)
leaq -0x1c0(%rbp), %rdi
callq 0x42d0
jmp 0x309f
movq -0x370(%rbp), %rdi
movl $0x0, -0x274(%rbp)
addq $0x50, %rdi
callq 0x4380
movq %rax, -0x280(%rbp)
movq -0x280(%rbp), %rax
movq %rax, -0x220(%rbp)
movq -0x370(%rbp), %rdi
addq $0x50, %rdi
callq 0x43f0
movq %rax, -0x288(%rbp)
leaq -0x220(%rbp), %rdi
leaq -0x288(%rbp), %rsi
callq 0x43b0
testb $0x1, %al
jne 0x3178
jmp 0x31b4
leaq -0x220(%rbp), %rdi
callq 0x4420
movq (%rax), %rdi
callq 0xd6e0
movl %eax, -0x434(%rbp)
jmp 0x3194
movl -0x434(%rbp), %eax
addl -0x274(%rbp), %eax
movl %eax, -0x274(%rbp)
leaq -0x220(%rbp), %rdi
callq 0x4440
jmp 0x3148
movq -0x370(%rbp), %rdi
movl 0x68(%rdi), %eax
subl -0x274(%rbp), %eax
movl %eax, -0x438(%rbp)
movq %rdi, %rax
addq $0x50, %rax
movq %rax, -0x440(%rbp)
addq $0x50, %rdi
callq 0x17c0
movq -0x440(%rbp), %rdi
movq %rax, %rsi
subq $0x1, %rsi
callq 0x44b0
movl -0x438(%rbp), %ecx
movq -0x370(%rbp), %rdi
movq (%rax), %rax
addl 0x40(%rax), %ecx
movl %ecx, 0x40(%rax)
addq $0x50, %rdi
callq 0x4380
movq %rax, -0x290(%rbp)
movq -0x290(%rbp), %rax
movq %rax, -0x220(%rbp)
movq -0x370(%rbp), %rdi
addq $0x50, %rdi
callq 0x43f0
movq %rax, -0x298(%rbp)
leaq -0x220(%rbp), %rdi
leaq -0x298(%rbp), %rsi
callq 0x43b0
testb $0x1, %al
jne 0x3258
jmp 0x32cf
leaq -0x220(%rbp), %rdi
callq 0x4420
movq (%rax), %rax
cmpl $0x0, 0x40(%rax)
jne 0x32bc
movq -0x370(%rbp), %rax
addq $0x50, %rax
movq %rax, -0x450(%rbp)
leaq -0x2a0(%rbp), %rdi
leaq -0x220(%rbp), %rsi
callq 0x4540
movq -0x450(%rbp), %rdi
movq -0x2a0(%rbp), %rsi
callq 0x44d0
movq %rax, -0x448(%rbp)
jmp 0x32ae
movq -0x448(%rbp), %rax
movq %rax, -0x2a8(%rbp)
jmp 0x32be
leaq -0x220(%rbp), %rdi
callq 0x4440
jmp 0x3228
leaq -0x2c0(%rbp), %rdi
callq 0x3930
leaq -0x2d8(%rbp), %rdi
callq 0x3930
movq -0x370(%rbp), %rdi
addq $0x50, %rdi
callq 0x4380
movq %rax, -0x2e0(%rbp)
movq -0x2e0(%rbp), %rax
movq %rax, -0x220(%rbp)
movq -0x370(%rbp), %rdi
addq $0x50, %rdi
callq 0x43f0
movq %rax, -0x2e8(%rbp)
leaq -0x220(%rbp), %rdi
leaq -0x2e8(%rbp), %rsi
callq 0x43b0
testb $0x1, %al
jne 0x333f
jmp 0x3488
leaq -0x220(%rbp), %rdi
callq 0x4420
movq -0x370(%rbp), %rcx
movq (%rax), %rsi
movq %rcx, %rdx
addq $0x18, %rdx
addq $0x30, %rcx
leaq -0x300(%rbp), %rdi
callq 0xd790
jmp 0x336e
leaq -0x2d8(%rbp), %rdi
leaq -0x300(%rbp), %rsi
movq %rsi, -0x460(%rbp)
callq 0x4580
movq -0x460(%rbp), %rdi
callq 0x3f30
leaq -0x2c0(%rbp), %rdi
callq 0x4660
movq %rax, -0x458(%rbp)
jmp 0x33a9
movq -0x458(%rbp), %rax
movq %rax, -0x310(%rbp)
leaq -0x308(%rbp), %rdi
leaq -0x310(%rbp), %rsi
callq 0x4690
leaq -0x2d8(%rbp), %rdi
callq 0x46d0
movq %rax, -0x468(%rbp)
jmp 0x33df
movq -0x468(%rbp), %rax
movq %rax, -0x318(%rbp)
leaq -0x2d8(%rbp), %rdi
callq 0x4660
movq %rax, -0x470(%rbp)
jmp 0x3402
movq -0x470(%rbp), %rax
movq %rax, -0x320(%rbp)
movq -0x308(%rbp), %rsi
movq -0x318(%rbp), %rdx
movq -0x320(%rbp), %rcx
leaq -0x2c0(%rbp), %rdi
callq 0x45b0
movq %rax, -0x478(%rbp)
jmp 0x343a
movq -0x478(%rbp), %rax
movq %rax, -0x328(%rbp)
leaq -0x220(%rbp), %rdi
callq 0x4440
jmp 0x330c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd0(%rbp)
movl %eax, -0xd4(%rbp)
leaq -0x2d8(%rbp), %rdi
callq 0x3f30
leaq -0x2c0(%rbp), %rdi
callq 0x3f30
jmp 0x3679
movq -0x370(%rbp), %rdi
callq 0x4210
movq %rax, -0x330(%rbp)
movq -0x330(%rbp), %rax
movq %rax, -0x1c0(%rbp)
movq -0x370(%rbp), %rdi
callq 0x4280
movq %rax, -0x340(%rbp)
movq -0x340(%rbp), %rdi
movl $0x1, %esi
callq 0x4700
movq %rax, -0x480(%rbp)
jmp 0x34d6
movq -0x480(%rbp), %rax
movq %rax, -0x338(%rbp)
leaq -0x1c0(%rbp), %rdi
leaq -0x338(%rbp), %rsi
callq 0x4240
testb $0x1, %al
jne 0x34fd
jmp 0x3549
leaq -0x1c0(%rbp), %rdi
callq 0x42b0
movq (%rax), %rax
movq %rax, -0x488(%rbp)
cmpq $0x0, %rax
je 0x3536
movq -0x488(%rbp), %rdi
callq 0x128f0
movq -0x488(%rbp), %rdi
movl $0x98, %esi
callq 0x10f0
jmp 0x3538
leaq -0x1c0(%rbp), %rdi
callq 0x42d0
jmp 0x34a9
movq -0x370(%rbp), %rdi
callq 0x4740
movq -0x370(%rbp), %rdi
leaq -0x2c0(%rbp), %rsi
callq 0x4760
jmp 0x356a
movq -0x370(%rbp), %rdi
addq $0x50, %rdi
callq 0x4380
movq %rax, -0x348(%rbp)
movq -0x348(%rbp), %rax
movq %rax, -0x220(%rbp)
movq -0x370(%rbp), %rdi
addq $0x50, %rdi
callq 0x43f0
movq %rax, -0x358(%rbp)
movq -0x358(%rbp), %rdi
movl $0x1, %esi
callq 0x49b0
movq %rax, -0x490(%rbp)
jmp 0x35c0
movq -0x490(%rbp), %rax
movq %rax, -0x350(%rbp)
leaq -0x220(%rbp), %rdi
leaq -0x350(%rbp), %rsi
callq 0x43b0
testb $0x1, %al
jne 0x35e7
jmp 0x3633
leaq -0x220(%rbp), %rdi
callq 0x4420
movq (%rax), %rax
movq %rax, -0x498(%rbp)
cmpq $0x0, %rax
je 0x3620
movq -0x498(%rbp), %rdi
callq 0xdc90
movq -0x498(%rbp), %rdi
movl $0x48, %esi
callq 0x10f0
jmp 0x3622
leaq -0x220(%rbp), %rdi
callq 0x4440
jmp 0x358f
movq -0x370(%rbp), %rdi
addq $0x50, %rdi
callq 0x49f0
leaq -0x2d8(%rbp), %rdi
callq 0x3f30
leaq -0x2c0(%rbp), %rdi
callq 0x3f30
leaq -0x180(%rbp), %rdi
callq 0x3d40
leaq -0x20(%rbp), %rdi
callq 0x4150
addq $0x4a0, %rsp            # imm = 0x4A0
popq %rbp
retq
leaq -0x180(%rbp), %rdi
callq 0x3d40
leaq -0x20(%rbp), %rdi
callq 0x4150
movq -0xd0(%rbp), %rdi
callq 0x1180
nopw (%rax,%rax)