LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/kernfel[P]fNEAT/cppn.c
// Function: CPPN_insert_link
int CPPN_insert_link( CPPN *net, struct NEAT_Params *params, int from, int to, double weight, int is_disabled, unsigned int innov_id ) {
	int err=0;

	if (( err = Realloc( net->links, (net->num_links+1)*sizeof *net->links ) ))
		return err;
	
	if ( ! innov_id )
		innov_id = ++params->innov_counter;

	int i;
	// Find the right place in the innov_id-sorted array
	for ( i=net->num_links; i>0; i-- ) {
		if ( net->links[i-1].innov_id < innov_id )
			break;
	}

	CPPN_Link *l = &net->links[i];
	if ( net->num_links > i ) {
		// Move over, newbies!
		memmove( l+1, l, (net->num_links-i)*sizeof *l );
	}
	l->innov_id = innov_id;
	l->from = from;
	l->to = to;
	l->weight = weight;
	l->is_disabled = is_disabled;
	
	net->num_links++;
	
	return err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, %r15d
movl %r8d, %ebp
movsd %xmm0, 0x10(%rsp)
movl %ecx, %r12d
movl %edx, %ebx
movq %rsi, %r13
movq %rdi, %r14
addq $0x18, %rdi
movslq 0x20(%r14), %rsi
shlq $0x5, %rsi
addq $0x20, %rsi
callq 0x4231
testl %eax, %eax
jne 0x24a0
movl %ebx, 0xc(%rsp)
testl %r15d, %r15d
jne 0x2404
movl 0x108(%r13), %r15d
incl %r15d
movl %r15d, 0x108(%r13)
movl 0x20(%r14), %r11d
movl %r11d, %ecx
sarl $0x1f, %ecx
andl %r11d, %ecx
movq 0x18(%r14), %rbx
leaq -0x20(%rbx), %rsi
movl %r11d, %edx
movl %ebp, %r8d
movsd 0x10(%rsp), %xmm0
movl %r12d, %r9d
movl 0xc(%rsp), %r10d
testl %edx, %edx
jle 0x2443
movl %edx, %edi
shlq $0x5, %rdi
cmpl %r15d, (%rsi,%rdi)
jb 0x2441
decl %edx
jmp 0x242d
movl %edx, %ecx
movslq %ecx, %rdx
movq %rdx, %rcx
shlq $0x5, %rcx
addq %rcx, %rbx
movl %r11d, %ecx
subl %edx, %ecx
jle 0x2485
leaq 0x20(%rbx), %rdi
movslq %ecx, %rdx
shlq $0x5, %rdx
movq %rbx, %rsi
movl %eax, %r13d
callq 0x1110
movl %r13d, %eax
movl 0xc(%rsp), %r10d
movl %r12d, %r9d
movsd 0x10(%rsp), %xmm0
movl %ebp, %r8d
movl 0x20(%r14), %r11d
movl %r15d, (%rbx)
movl %r10d, 0x4(%rbx)
movl %r9d, 0x8(%rbx)
movsd %xmm0, 0x10(%rbx)
movl %r8d, 0x18(%rbx)
incl %r11d
movl %r11d, 0x20(%r14)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/kernfel[P]fNEAT/cppn.c
// Function: CPPN_exclude_recurrent_links
int CPPN_exclude_recurrent_links( const CPPN *net, const struct NEAT_Params *params, int target_id, int *possible_sources ) {
	int i, n=0;

	// Exclude self
	n += possible_sources[target_id];
	possible_sources[target_id] = 0;

	// Find all links that node #target_id projects to, exclude them
	for ( i=0; i<net->num_links; i++ ) {
		if ( net->links[i].from == target_id ) {
			n += possible_sources[net->links[i].to];
			possible_sources[net->links[i].to] = 0;
			
			// Recurse.
			n += CPPN_exclude_recurrent_links( net, params, net->links[i].to, possible_sources );
		}
	}
	
	return n;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movl %edx, %ebp
movslq %edx, %rax
movl (%rcx,%rax,4), %r14d
andl $0x0, (%rcx,%rax,4)
movq %rsi, (%rsp)
movq %rdi, %r12
pushq $0x8
popq %r13
xorl %r15d, %r15d
movslq 0x20(%r12), %rax
cmpq %rax, %r15
jge 0x2519
movq 0x18(%r12), %rax
cmpl %ebp, -0x4(%rax,%r13)
jne 0x2510
movslq (%rax,%r13), %rcx
addl (%rbx,%rcx,4), %r14d
andl $0x0, (%rbx,%rcx,4)
movl (%rax,%r13), %edx
movq %r12, %rdi
movq (%rsp), %rsi
movq %rbx, %rcx
callq 0x24af
addl %eax, %r14d
incq %r15
addq $0x20, %r13
jmp 0x24d8
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/kernfel[P]fNEAT/cppn.c
// Function: CPPN_update_innov_id
int CPPN_update_innov_id( CPPN *net, unsigned int old_id, unsigned int new_id ) {
	int i,j;
	for ( i=net->num_links-1; i>=0; i-- ) {
		if ( net->links[i].innov_id == old_id ) {
			net->links[i].innov_id = new_id;

			// Check first: Do we need to move at all?
			if (
				( i==0 || net->links[i-1].innov_id < new_id ) // Lowest or younger than lower neighbour
				&& ( i==net->num_links-1 || net->links[i+1].innov_id > new_id ) // Highest or older than higher neighbour
			)
				break;
			
			CPPN_Link tmp;
			// Excise
			memcpy( &tmp, &net->links[i], sizeof tmp );
			if ( old_id > new_id ) {
				// Search downwards...
				for ( j=i; j>0; j-- )
					if ( net->links[j-1].innov_id < new_id )
						break;
				// Move the block [j..i] up by one
				memmove( &net->links[j+1], &net->links[j], (i-j)*sizeof tmp );
			} else {
				// Search upwards...
				for ( j=i; j<net->num_links-1; j++ )
					if ( net->links[j+1].innov_id > new_id )
						break;
				// Move the block [i..j] down by one
				memmove( &net->links[i-1], &net->links[i], (j-i)*sizeof tmp );
			}
			
			// Reinsert
			memcpy( &net->links[j], &tmp, sizeof tmp );
		}
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %edx, %ebx
movl %esi, %r8d
movq %rdi, %r14
movl 0x20(%rdi), %ecx
pushq $0x1
popq %r15
subq %rcx, %r15
leal -0x1(%rcx), %r12d
movl %esi, 0xc(%rsp)
testl %ecx, %ecx
jle 0x2693
leaq -0x1(%rcx), %r13
movq 0x18(%r14), %rax
movl %r13d, %esi
shlq $0x5, %rsi
cmpl %r8d, (%rax,%rsi)
jne 0x2685
addq %rax, %rsi
movl %ebx, (%rsi)
testl %r13d, %r13d
je 0x258b
movq %rcx, %rdx
shlq $0x5, %rdx
cmpl %ebx, -0x40(%rax,%rdx)
jae 0x25a8
movl 0x20(%r14), %edx
cmpq %rdx, %rcx
je 0x2693
movq %rcx, %rdx
shlq $0x5, %rdx
cmpl %ebx, (%rax,%rdx)
ja 0x2693
movups (%rsi), %xmm0
movups 0x10(%rsi), %xmm1
movaps %xmm1, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
cmpl %ebx, %r8d
jbe 0x25e8
movslq %r12d, %rcx
shlq $0x5, %rcx
leaq -0x20(%rax), %rsi
xorl %edx, %edx
movl %r13d, %ebp
testl %ebp, %ebp
movl %ebp, %ebp
jle 0x2648
movq %rbp, %rdi
shlq $0x5, %rdi
cmpl %ebx, (%rsi,%rdi)
jb 0x2648
decl %ebp
addq $-0x20, %rdx
jmp 0x25ce
movl %r12d, %edx
leal (%r15,%r12), %r8d
shlq $0x20, %r8
shlq $0x5, %rdx
movl %r13d, %r10d
movl 0x20(%r14), %edi
decl %edi
leaq (%rax,%rdx), %r9
addq $0x20, %r9
movq %r10, %rbp
movq %r8, %rdx
cmpl %ebp, %edi
jle 0x262f
leaq 0x1(%rbp), %r10
movabsq $0x100000000, %r8       # imm = 0x100000000
addq %rdx, %r8
leaq 0x20(%r9), %r11
cmpl %ebx, (%r9)
movq %r11, %r9
jbe 0x2608
shlq $0x5, %rcx
leaq (%rax,%rcx), %rdi
addq $-0x40, %rdi
sarq $0x1b, %rdx
callq 0x1110
movl %ebp, %ebp
jmp 0x2665
addq %rax, %rcx
leaq (%rdx,%rcx), %rdi
addq $0x20, %rdi
movq %rbp, %rsi
shlq $0x5, %rsi
addq %rax, %rsi
negq %rdx
callq 0x1110
movq 0x18(%r14), %rax
shlq $0x5, %rbp
movaps 0x10(%rsp), %xmm0
movaps 0x20(%rsp), %xmm1
movups %xmm1, 0x10(%rax,%rbp)
movups %xmm0, (%rax,%rbp)
movl 0xc(%rsp), %r8d
incq %r15
decl %r12d
movq %r13, %rcx
jmp 0x2553
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/kernfel[P]fNEAT/cppn.c
// Function: CPPN_func
double CPPN_func( enum CPPNFunc fn, double x ) {
	switch ( fn ) {
		case CF_ABS:
			return fabs(x);
		case CF_GAUSS:
			return exp(-0.5*x*x)*M_2_SQRTPI*M_SQRT1_2*0.5; // sigma=1, mu=0
		case CF_SIGMOID:
			//return 1.0/(1.0+exp(-4.9*x)); // [0,1]
			return tanh(x); // [-1,1]
		case CF_SINE:
			return sin(x);
		case CF_STEP:
			return x<0.0 ? 0.0 : 1.0;
		case CF_LINEAR:
		default:
			return x;
	}
}

// Assembly:
cmpl $0x5, %edi
ja 0x2711
movl %edi, %eax
leaq 0x3b9e(%rip), %rcx      # 0x6250
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
pushq %rax
movsd 0x3a54(%rip), %xmm1     # 0x6118
mulsd %xmm0, %xmm1
mulsd %xmm0, %xmm1
movapd %xmm1, %xmm0
callq 0x1190
mulsd 0x3b4b(%rip), %xmm0     # 0x6228
mulsd 0x3b4b(%rip), %xmm0     # 0x6230
mulsd 0x3a33(%rip), %xmm0     # 0x6120
addq $0x8, %rsp
retq
jmp 0x1130
jmp 0x1150
xorpd %xmm1, %xmm1
cmpltsd %xmm1, %xmm0
movsd 0x3a03(%rip), %xmm1     # 0x6110
andnpd %xmm1, %xmm0
retq
andps 0x3b27(%rip), %xmm0     # 0x6240
retq
// File: /workspace/github_c_makefile_star2_O2/kernfel[P]fNEAT/cppn.c
// Function: get_genetic_distance
double get_genetic_distance( const CPPN *net1, const CPPN *net2, const struct NEAT_Params *params ) {
	int disjoint=0, excess=0, matches=0, n=max(net1->num_links, net2->num_links);
	double w1, w2, wdiff=0.0;
	int i=0, j=0;
	
	while ( i<net1->num_links && j<net2->num_links ) {
		if ( net1->links[i].innov_id == net2->links[j].innov_id ) {
			matches++;
			w1 = net1->links[i].is_disabled ? 0.0 : net1->links[i].weight;
			w2 = net2->links[j].is_disabled ? 0.0 : net2->links[j].weight;
			wdiff += fabs(w1-w2);
			i++;
			j++;
		} else if ( net1->links[i].innov_id > net2->links[j].innov_id ) {
			disjoint++;
			j++;
		} else {
			disjoint++;
			i++;
		}
	}

	if ( i == net1->num_links )
		excess = net2->num_links - j;
	else
		excess = net1->num_links - i;
	
	if ( params->flags & CFL_NO_DISTCALC_NORM )
		return params->disjoint_factor*disjoint + params->excess_factor*excess + params->weight_factor*wdiff/n;
	else
		return params->disjoint_factor*disjoint/n + params->excess_factor*excess/n + params->weight_factor*wdiff/n;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, -0x8(%rsp)
movl 0x20(%rdi), %edx
movl 0x20(%rsi), %eax
xorpd %xmm0, %xmm0
movl $0x0, -0xc(%rsp)
movapd 0x3880(%rip), %xmm1     # 0x6240
xorl %r9d, %r9d
xorl %r10d, %r10d
movslq %r9d, %rbx
shlq $0x5, %rbx
movslq %r10d, %r14
shlq $0x5, %r14
xorl %r11d, %r11d
leal (%r9,%r11), %ebp
cmpl %edx, %ebp
jge 0x2a5e
leal (%r10,%r11), %r15d
cmpl %eax, %r15d
jge 0x2a5e
movq 0x18(%rdi), %r13
movl (%r13,%rbx), %ecx
movq 0x18(%rsi), %r12
movl (%r12,%r14), %r8d
cmpl %r8d, %ecx
jne 0x2a3d
xorpd %xmm3, %xmm3
cmpl $0x0, 0x18(%r13,%rbx)
xorpd %xmm2, %xmm2
jne 0x2a15
movsd 0x10(%r13,%rbx), %xmm2
cmpl $0x0, 0x18(%r12,%r14)
jne 0x2a24
movsd 0x10(%r12,%r14), %xmm3
subsd %xmm3, %xmm2
andpd %xmm1, %xmm2
addsd %xmm2, %xmm0
incl %r11d
addq $0x20, %rbx
addq $0x20, %r14
jmp 0x29d7
incl -0xc(%rsp)
cmpl %r8d, %ecx
leal 0x1(%r9,%r11), %r9d
leal 0x1(%r10,%r11), %ecx
cmoval %ebp, %r9d
cmoval %ecx, %r15d
movl %r15d, %r10d
jmp 0x29c6
cmpl %eax, %edx
movl %eax, %esi
cmovgl %edx, %esi
subl %r9d, %edx
subl %r10d, %eax
cmpl %r11d, %edx
cmovnel %edx, %eax
subl %r11d, %eax
movq -0x8(%rsp), %rcx
testb $0x1, 0x1(%rcx)
movsd 0x80(%rcx), %xmm2
cvtsi2sdl -0xc(%rsp), %xmm1
jne 0x2acb
cvtsi2sd %esi, %xmm3
cvtsi2sd %eax, %xmm4
mulsd 0x88(%rcx), %xmm4
divsd %xmm3, %xmm4
movhpd 0x90(%rcx), %xmm1       # xmm1 = xmm1[0],mem[0]
unpcklpd %xmm0, %xmm2            # xmm2 = xmm2[0],xmm0[0]
mulpd %xmm2, %xmm1
unpcklpd %xmm3, %xmm3            # xmm3 = xmm3[0,0]
divpd %xmm3, %xmm1
addsd %xmm1, %xmm4
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm4, %xmm1
movapd %xmm1, %xmm0
jmp 0x2af3
cvtsi2sd %eax, %xmm3
mulsd 0x88(%rcx), %xmm3
mulsd %xmm1, %xmm2
addsd %xmm3, %xmm2
mulsd 0x90(%rcx), %xmm0
cvtsi2sd %esi, %xmm1
divsd %xmm1, %xmm0
addsd %xmm2, %xmm0
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/kernfel[P]fNEAT/cppn.c
// Function: dump_CPPN
void dump_CPPN( CPPN *net, FILE *fp ) {
	int i;
	for ( i=0; i<net->num_inputs; i++ ) {
		fprintf( fp, "%2d | input\n", i );
	}
	for ( ; i<net->num_inputs+net->num_outputs; i++ ) {
		fprintf( fp, "%2d | output | func %d\n", i, net->nodes[i].func );
	}
	for ( ; i<net->num_inputs+net->num_outputs+net->num_hidden; i++ ) {
		fprintf( fp, "%2d | hidden | func %d\n", i, net->nodes[i].func );
	}
	for ( i=0; i<net->num_links; i++ ) {
		fprintf( fp, "%3d | link #%5x | %2d > %2d | %+5.4f | %d\n", i, net->links[i].innov_id,
		 net->links[i].from, net->links[i].to, net->links[i].weight, !net->links[i].is_disabled );
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x332a(%rip), %r12      # 0x6268
xorl %r13d, %r13d
xorl %r15d, %r15d
movl 0x8(%r14), %eax
cmpl %eax, %r15d
jge 0x2f66
movq %rbx, %rdi
movq %r12, %rsi
movl %r15d, %edx
xorl %eax, %eax
callq 0x10b0
incq %r15
addq $0x10, %r13
jmp 0x2f44
leaq 0x3308(%rip), %r12      # 0x6275
movl 0xc(%r14), %ecx
leal (%rcx,%rax), %edx
movslq %edx, %rdx
cmpq %rdx, %r15
jge 0x2fa0
movq (%r14), %rax
movl (%rax,%r13), %ecx
movq %rbx, %rdi
movq %r12, %rsi
movl %r15d, %edx
xorl %eax, %eax
callq 0x10b0
incq %r15
movl 0x8(%r14), %eax
addq $0x10, %r13
jmp 0x2f6d
leaq 0x32e6(%rip), %r12      # 0x628d
addl %eax, %ecx
movslq 0x10(%r14), %rax
movslq %ecx, %rcx
addq %rax, %rcx
cmpq %rcx, %r15
jge 0x2fe0
movq (%r14), %rax
movl (%rax,%r13), %ecx
movq %rbx, %rdi
movq %r12, %rsi
movl %r15d, %edx
xorl %eax, %eax
callq 0x10b0
incq %r15
movl 0x8(%r14), %eax
movl 0xc(%r14), %ecx
addq $0x10, %r13
jmp 0x2fa7
xorl %r13d, %r13d
leaq 0x32bb(%rip), %r15      # 0x62a5
xorl %r12d, %r12d
movslq 0x20(%r14), %rax
cmpq %rax, %r12
jge 0x3036
movq 0x18(%r14), %rax
movl (%rax,%r13), %ecx
movl 0x4(%rax,%r13), %r8d
movl 0x8(%rax,%r13), %r9d
movsd 0x10(%rax,%r13), %xmm0
xorl %edx, %edx
cmpl $0x0, 0x18(%rax,%r13)
sete %dl
movl %edx, (%rsp)
movq %rbx, %rdi
movq %r15, %rsi
movl %r12d, %edx
movb $0x1, %al
callq 0x10b0
incq %r12
addq $0x20, %r13
jmp 0x2fed
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/kernfel[P]fNEAT/neat.c
// Function: create_Population
int create_Population( Population *pop, struct NEAT_Params *params, const CPPN *prototype ) {
	int err=0;
	
	pop->num_members = params->population_size;
	pop->num_species = 1;
	
	if (( err = allocate_Population( pop ) ))
		return err;
	
	Individual adam;
	adam.genotype = *prototype;
	adam.species_id = ++params->species_counter;
	adam.id = ++params->individual_counter;
	
	pop->species[0].id = adam.species_id;
	pop->species[0].size = pop->num_members;
	
	int i;
	for ( i=0; i<pop->num_members; i++ ) {
		if (( err = clone_CPPN( &pop->members[i].genotype, prototype ) )) {
			pop->num_members = i;
			delete_Population( pop );
			return err;
		}
		pop->members[i].species_id = adam.species_id;
		pop->members[i].id = ++params->individual_counter;
	}
	
	return err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbp
movq %rsi, %r15
movq %rdi, %rbx
movl 0x50(%rsi), %eax
movl %eax, 0x8(%rdi)
movl $0x1, 0x18(%rdi)
callq 0x3115
testl %eax, %eax
jne 0x3106
movq 0x10c(%r15), %xmm0
pcmpeqd %xmm1, %xmm1
psubd %xmm1, %xmm0
movq %xmm0, 0x10c(%r15)
movq 0x10(%rbx), %rcx
movd %xmm0, 0x4(%rsp)
movd %xmm0, (%rcx)
movl 0x8(%rbx), %eax
movl %eax, 0x4(%rcx)
xorl %r14d, %r14d
xorl %r12d, %r12d
cltq
cmpq %rax, %r12
jge 0x30f2
movq (%rbx), %rdi
addq %r14, %rdi
movq %rbp, %r13
movq %rbp, %rsi
callq 0x1cc9
testl %eax, %eax
jne 0x30f6
movq (%rbx), %rax
movl 0x4(%rsp), %ecx
movl %ecx, 0x30(%rax,%r14)
movl 0x110(%r15), %ecx
incl %ecx
movl %ecx, 0x110(%r15)
movl %ecx, 0x34(%rax,%r14)
incq %r12
movl 0x8(%rbx), %eax
addq $0x38, %r14
movq %r13, %rbp
jmp 0x30a6
xorl %eax, %eax
jmp 0x3106
movl %eax, %ebp
movl %r12d, 0x8(%rbx)
movq %rbx, %rdi
callq 0x315f
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/kernfel[P]fNEAT/neat.c
// Function: allocate_Population
int allocate_Population( Population *pop ) {
	int err=0;
	
	pop->members = 0;
	pop->species = 0;
	
	if (( err = Calloc( pop->members, pop->num_members, sizeof *pop->members ) )
	 || ( err = Calloc( pop->species, pop->num_species, sizeof *pop->species ) ))
		delete_Population( pop );

	return err;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
andq $0x0, (%rdi)
andq $0x0, 0x10(%rdi)
movslq 0x8(%rdi), %rsi
pushq $0x38
popq %rdx
callq 0x421b
testl %eax, %eax
jne 0x3148
leaq 0x10(%rbx), %rdi
movslq 0x18(%rbx), %rsi
pushq $0x18
popq %rdx
callq 0x421b
testl %eax, %eax
je 0x315b
movl %eax, %ebp
movq %rbx, %rdi
callq 0x315f
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
xorl %ebp, %ebp
jmp 0x3152
// File: /workspace/github_c_makefile_star2_O2/kernfel[P]fNEAT/neat.c
// Function: delete_Population
void delete_Population( Population *pop ) {
	int i;
	for ( i=0; i<pop->num_members; i++ )
		delete_CPPN( &pop->members[i].genotype );
	free( pop->members );
	free( pop->species );
	pop->members = 0;
	pop->species = 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %r14d, %r14d
xorl %r15d, %r15d
movslq 0x8(%rbx), %rax
movq (%rbx), %rdi
cmpq %rax, %r15
jge 0x318a
addq %r14, %rdi
callq 0x1d31
incq %r15
addq $0x38, %r14
jmp 0x316d
callq 0x1030
movq 0x10(%rbx), %rdi
callq 0x1030
andq $0x0, (%rbx)
andq $0x0, 0x10(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/kernfel[P]fNEAT/neat.c
// Function: epoch
int epoch( Population *pop, struct NEAT_Params *params ) {
	int i, err=0;

	// Initialise next generation whilst saving a set of species representatives
	Individual reps[pop->num_species];
	Individual *champions[pop->num_species];
	int num_reps = pop->num_species;
	if (( err = reproduce_population( pop, params, reps, champions ) ))
		goto cleanup;

	// Mutate the entire new generation
	if (( err = mutate_population( pop, params, champions ) ))
		goto cleanup;

	// Divide the offspring into species
	if (( err = speciate_population( pop, params, reps ) ))
		goto cleanup;
	
	// Adjust the speciation threshold for next generation
	if ( params->target_num_species ) {
		if ( pop->num_species < params->target_num_species && params->speciation_threshold > params->d_speciation_threshold )
			params->speciation_threshold -= params->d_speciation_threshold;
		else if ( pop->num_species > params->target_num_species \
		 && params->speciation_threshold + params->d_speciation_threshold <= params->max_speciation_threshold )
			params->speciation_threshold += params->d_speciation_threshold;
	}

cleanup:
	if ( err != E_NO_OFFSPRING )
		for ( i=0; i<num_reps; i++ )
			if ( reps[i].species_id )
				delete_CPPN( &reps[i].genotype );

	return err;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %r12
movl 0x18(%rdi), %ecx
movq %rsp, %rbx
imulq $0x38, %rcx, %rax
addq $0xf, %rax
andq $-0x10, %rax
subq %rax, %rbx
movq %rbx, %rsp
movq %rsp, %r13
movq %rcx, -0x30(%rbp)
leaq 0xf(,%rcx,8), %rax
andq $-0x10, %rax
subq %rax, %r13
movq %r13, %rsp
movq %rbx, %rdx
movq %r13, %rcx
callq 0x32f2
testl %eax, %eax
jne 0x325f
movq %r12, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x37d5
testl %eax, %eax
jne 0x325f
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x3a4b
testl %eax, %eax
je 0x327d
movl %eax, %r14d
cmpl $-0xa, %eax
jne 0x32cb
pushq $-0xa
popq %r14
movl %r14d, %eax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0x5c(%r15), %eax
xorl %r14d, %r14d
testl %eax, %eax
je 0x32cb
movl 0x18(%r12), %ecx
cmpl %eax, %ecx
jge 0x32a9
movsd 0x68(%r15), %xmm0
movsd 0x70(%r15), %xmm1
ucomisd %xmm1, %xmm0
jbe 0x32a9
subsd %xmm1, %xmm0
jmp 0x32c5
cmpl %eax, %ecx
jle 0x32cb
movsd 0x68(%r15), %xmm0
movsd 0x78(%r15), %xmm1
addsd 0x70(%r15), %xmm0
ucomisd %xmm0, %xmm1
jb 0x32cb
movsd %xmm0, 0x68(%r15)
xorl %r12d, %r12d
movq -0x30(%rbp), %rax
testl %eax, %eax
cmovgl %eax, %r12d
subq $0x1, %r12
jb 0x326b
cmpl $0x0, 0x30(%rbx)
je 0x32ec
movq %rbx, %rdi
callq 0x1d31
addq $0x38, %rbx
jmp 0x32d8
// File: /workspace/github_c_makefile_star2_O2/kernfel[P]fNEAT/neat.c
// Function: get_population_ranking
Individual ***get_population_ranking( Population *pop, int *err ) {
	Individual ***ranked=0;

	if (( *err = Malloc( ranked, pop->num_species*sizeof *ranked + pop->num_members*sizeof **ranked ) ))
		return 0;

	int i, j, all_indiv_seen=0, sp;
	for ( sp=0; sp<pop->num_species; sp++ ) {
		// Assign the primary array index to point to the right chunk
		ranked[sp] = (Individual **) &ranked[pop->num_species + all_indiv_seen];
		
		// Find all members...
		int sp_indiv_seen=0;
		for ( i=0; i<pop->num_members; i++ ) {
			// ...of that species...
			if ( pop->members[i].species_id == pop->species[sp].id ) {
				// Go through the conspecifics already in place...
				for ( j=0; j<sp_indiv_seen; j++ ) {
					// Shove the losers back...
					if ( pop->members[i].score > ranked[sp][j]->score ) {
						memmove( ranked[sp]+j+1, ranked[sp]+j, (sp_indiv_seen-j)*sizeof **ranked );
						break;
					}
				}
				// ... so as to maintain order.
				ranked[sp][j] = pop->members + i;
				sp_indiv_seen++;
			}
		}
		all_indiv_seen += sp_indiv_seen;
	}

	return ranked;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsp, %rdi
andq $0x0, (%rdi)
movslq 0x18(%rbx), %rax
movslq 0x8(%rbx), %rsi
addq %rax, %rsi
shlq $0x3, %rsi
callq 0x4208
movl %eax, (%r14)
xorl %edx, %edx
testl %eax, %eax
je 0x4129
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %r15d, %r15d
movslq 0x18(%rbx), %rcx
movq (%rsp), %rax
cmpq %rcx, %r15
jge 0x411a
movq %rdx, 0x8(%rsp)
movslq %edx, %rdx
addq %rdx, %rcx
leaq (%rax,%rcx,8), %rcx
movq %rcx, (%rax,%r15,8)
xorl %r12d, %r12d
imulq $0x18, %r15, %r10
xorl %ebp, %ebp
movq %r10, 0x10(%rsp)
movslq 0x8(%rbx), %rax
cmpq %rax, %r12
jge 0x41f6
movq (%rbx), %rax
movq 0x10(%rbx), %rcx
imulq $0x38, %r12, %r14
movl 0x30(%rax,%r14), %edx
cmpl (%rcx,%r10), %edx
jne 0x41ee
leaq (%rax,%r14), %rsi
addq $0x28, %rsi
testl %ebp, %ebp
movl $0x0, %edi
cmovgl %ebp, %edi
movq (%rsp), %rcx
movslq %ebp, %rdx
shlq $0x3, %rdx
xorl %r13d, %r13d
cmpq %r13, %rdi
je 0x41bf
movsd (%rsi), %xmm0
movq (%rcx,%r15,8), %r8
movq (%r8,%r13,8), %r9
ucomisd 0x28(%r9), %xmm0
ja 0x41c4
incq %r13
addq $-0x8, %rdx
jmp 0x419d
movq %rdi, %r13
jmp 0x41e1
leaq (%r8,%r13,8), %rsi
leaq (%r8,%r13,8), %rdi
addq $0x8, %rdi
callq 0x1110
movq 0x10(%rsp), %r10
movq (%rbx), %rax
movq (%rsp), %rcx
addq %r14, %rax
movq (%rcx,%r15,8), %rcx
movq %rax, (%rcx,%r13,8)
incl %ebp
incq %r12
jmp 0x415a
movq 0x8(%rsp), %rdx
addl %ebp, %edx
incq %r15
jmp 0x412c
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/kernfel[P]fNEAT/util.c
// Function: Realloc_
int Realloc_( void **p, size_t s ) {
	void *q = realloc( *p, s );
	if ( ! q )
		return E_ALLOC;
	*p = q;
	return 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x1100
testq %rax, %rax
je 0x4249
movq %rax, (%rbx)
xorl %eax, %eax
jmp 0x424c
pushq $-0x1
popq %rax
popq %rbx
retq
nop
// File: /workspace/github_c_makefile_star2_O2/kernfel[P]fNEAT/extract.c
// Function: extract_links
int extract_links( struct Extraction_Params *eparams ) {
	int err=0;
	
	BinLeaf root = {0};
	eparams->root = &root;
	
	if (( err = build_tree( &root, eparams ) )) {
		goto cleanup;
	}
	
	if (( err = extract_tree( &root, eparams ) )) {
		goto cleanup;
	}

cleanup:
	delete_tree( &root );
	eparams->root = 0;
	return err;
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movq %rsp, %rdi
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, (%rdi)
andq $0x0, 0x20(%rdi)
movq %rdi, (%rbx)
movq %rbx, %rsi
callq 0x429e
movl %eax, %ebp
testl %eax, %eax
jne 0x4289
movq %rsp, %rdi
movq %rbx, %rsi
callq 0x43fc
movl %eax, %ebp
movq %rsp, %rdi
callq 0x45ae
andq $0x0, (%rbx)
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/kernfel[P]fNEAT/extract.c
// Function: build_tree
int build_tree( BinLeaf *p, struct Extraction_Params *eparams ) {
	int i, j, err=0;

	// Divide the parent
	if (( err = Malloc( p->c, CLUSTERSIZE*sizeof *p->c ) ))
		return err;

	double w = 1.0 / (1 << (p->level+2));
	for ( i=0; i<CLUSTERSIZE; i++ ) {
		p->c[i].c = 0;
		p->c[i].level = p->level+1;
		for ( j=0; j<DIMENSIONS; j++ ) {
			// Adjust child coords to be in the center of the quadrant/octant
			p->c[i].x[j] = p->x[j] + ( (i>>j & 1) ? (-1) : 1 ) * w;
		}

		// Populate the new child with CPPN data
		if ( eparams->outgoing )
			read_CPPN( eparams->cppn, eparams->params, eparams->ref, p->c[i].x, p->c[i].r );
		else
			read_CPPN( eparams->cppn, eparams->params, p->c[i].x, eparams->ref, p->c[i].r );
	}

	// Recurse
	if ( p->level < eparams->params->min_resolution-1 \
	 || ( p->level < eparams->params->max_resolution-1 && get_binleaf_variance(p, eparams->params) > eparams->params->variance_threshold ) ) {
		for ( i=0; i<CLUSTERSIZE; i++ ) {
			if (( err = build_tree( &p->c[i], eparams ) ))
				return err;
		}
	}

	return err;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movl $0xa0, %esi
callq 0x4208
testl %eax, %eax
je 0x42d3
movl %eax, %r15d
movl %r15d, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movb 0x20(%r14), %cl
addb $0x2, %cl
pushq $0x1
popq %rax
shll %cl, %eax
cvtsi2sd %eax, %xmm0
movsd 0x1e25(%rip), %xmm1     # 0x6110
divsd %xmm0, %xmm1
leaq 0x8(%rbx), %r15
pushq $0x10
popq %r12
xorl %r13d, %r13d
movsd %xmm1, 0x8(%rsp)
cmpq $0x4, %r13
je 0x4390
movq (%r14), %rcx
imulq $0x28, %r13, %rax
andq $0x0, (%rcx,%rax)
movl 0x20(%r14), %ecx
incl %ecx
movq (%r14), %rdx
movl %ecx, 0x20(%rdx,%rax)
leaq (%rdx,%r12), %rcx
xorl %esi, %esi
cmpq $0x2, %rsi
je 0x4356
btl %esi, %r13d
movl $0x0, %edi
sbbl %edi, %edi
orl $0x1, %edi
cvtsi2sd %edi, %xmm0
mulsd %xmm1, %xmm0
addsd 0x10(%r14,%rsi,8), %xmm0
movsd %xmm0, (%rcx,%rsi,8)
incq %rsi
jmp 0x4329
cmpb $0x0, 0x18(%rbx)
movq 0x20(%rbx), %rdi
movq 0x28(%rbx), %rsi
leaq 0x10(%rdx,%rax), %rcx
leaq 0x8(%rdx,%rax), %r8
je 0x4373
movq %r15, %rdx
jmp 0x4379
movq %rcx, %rdx
movq %r15, %rcx
callq 0x271a
incq %r13
addq $0x28, %r12
movsd 0x8(%rsp), %xmm1
jmp 0x4300
movl 0x20(%r14), %eax
movq 0x28(%rbx), %r12
movl 0x4(%r12), %ecx
decl %ecx
cmpl %ecx, %eax
jge 0x43d0
xorl %r15d, %r15d
xorl %edi, %edi
leaq 0x28(%rdi), %r12
cmpq $0xc8, %r12
je 0x42c2
addq (%r14), %rdi
movq %rbx, %rsi
callq 0x429e
movq %r12, %rdi
testl %eax, %eax
je 0x43a8
jmp 0x42bf
movl 0x8(%r12), %ecx
decl %ecx
xorl %r15d, %r15d
cmpl %ecx, %eax
jge 0x42c2
movq %r14, %rdi
movq %r12, %rsi
callq 0x45e9
ucomisd 0x10(%r12), %xmm0
jbe 0x42c2
jmp 0x43a3
// File: /workspace/github_c_makefile_star2_O2/kernfel[P]fNEAT/extract.c
// Function: delete_tree
void delete_tree( BinLeaf *p ) {
	int i;
	if ( ! p->c )
		return;
	for ( i=0; i<CLUSTERSIZE; i++ )
		delete_tree( &p->c[i] );
	free( p->c );
	p->c = 0;
}

// Assembly:
cmpq $0x0, (%rdi)
je 0x45e8
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
movq (%rbx), %rdi
cmpq $0xa0, %r14
je 0x45d8
addq %r14, %rdi
callq 0x45ae
addq $0x28, %r14
jmp 0x45be
callq 0x1030
andq $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/kernfel[P]fNEAT/extract.c
// Function: get_binleaf_variance
double get_binleaf_variance( BinLeaf *p, struct NEAT_Params *params ) {
	int i,j;
	double sum_of_variances=0;
	for ( j=0; j<N_OUTPUTS; j++ ) {
		double sum=0, mean, sum_of_deviations=0;
		for ( i=0; i<CLUSTERSIZE; i++ ) {
			sum += p->c[i].r[j];
		}
		mean = sum/CLUSTERSIZE;
		for ( i=0; i<CLUSTERSIZE; i++ ) {
			sum_of_deviations += fabs( mean - p->c[i].r[j] );
		}

		sum_of_variances += sum_of_deviations/CLUSTERSIZE * params->output_variance_weight[j];
	}
	
	return sum_of_variances/N_OUTPUTS;
}

// Assembly:
xorpd %xmm0, %xmm0
movb $0x1, %cl
pushq $0x8
popq %rax
movsd 0x1d46(%rip), %xmm1     # 0x6340
movapd 0x1c3e(%rip), %xmm2     # 0x6240
testb $0x1, %cl
je 0x4661
movq (%rdi), %rcx
xorpd %xmm3, %xmm3
movq %rax, %rdx
cmpq $0xa8, %rdx
je 0x4625
addsd (%rcx,%rdx), %xmm3
addq $0x28, %rdx
jmp 0x4611
mulsd %xmm1, %xmm3
xorpd %xmm4, %xmm4
movq %rax, %rdx
cmpq $0xa8, %rdx
je 0x4650
movapd %xmm3, %xmm5
subsd (%rcx,%rdx), %xmm5
andpd %xmm2, %xmm5
addsd %xmm5, %xmm4
addq $0x28, %rdx
jmp 0x4630
mulsd %xmm1, %xmm4
mulsd 0x18(%rsi), %xmm4
addsd %xmm4, %xmm0
xorl %ecx, %ecx
jmp 0x4602
retq
// File: /workspace/github_c_makefile_star2_O2/kernfel[P]fNEAT/extract.c
// Function: get_activation_at
void get_activation_at( double x[DIMENSIONS], double r[N_OUTPUTS], struct Extraction_Params *eparams ) {
	int i, read_new=0;
	BinLeaf *b = eparams->root;
	// Check whether x lies within root's bounding box at all
	double w = 1.0 / (1<<(b->level+1));
	for ( i=0; i<DIMENSIONS; i++ ) {
		if ( x[i] > b->x[i]+w || x[i] < b->x[i]-w ) {
			read_new = 1;
			break;
		}
	}
	
	if ( !read_new ) {
		// Drill down into the tree
		while (1) {
			// b is at the requested coordinates, return its readout.
			// No need to check for eparams->outgoing, since the tree was constructed with the same parameters
			if ( ! memcmp(x, b->x, DIMENSIONS*sizeof *x) ) {
				memcpy( r, b->r, N_OUTPUTS*sizeof *r );
				return;
			}
			
			// Determine the appropriate child leaf - 0 for left, 1 for right, dim 0 is right-most bit
			int idx=0;
			for ( i=0; i<DIMENSIONS; i++ ) {
				if ( x[i] > b->x[i] )
					idx |= 1 << i;
			}

			// b has children, c[idx] is closest to the requested coords, check that out
			if ( b->c )
				b = &b->c[idx];

			// b has no children, compute the readout afresh
			else
				break;
		}
	}

	if ( eparams->outgoing )
		read_CPPN( eparams->cppn, eparams->params, eparams->ref, x, r );
	else
		read_CPPN( eparams->cppn, eparams->params, x, eparams->ref, r );
}

// Assembly:
movq (%rdx), %rax
movb 0x20(%rax), %cl
incb %cl
pushq $0x1
popq %r9
shll %cl, %r9d
movq %rsi, %r8
cvtsi2sd %r9d, %xmm1
movq %rdi, %rcx
movsd 0x1a8c(%rip), %xmm0     # 0x6110
divsd %xmm1, %xmm0
pushq $0x2
popq %rsi
cmpq $0x4, %rsi
je 0x46b9
movsd -0x10(%rcx,%rsi,8), %xmm1
movsd (%rax,%rsi,8), %xmm2
movapd %xmm0, %xmm3
addsd %xmm2, %xmm3
ucomisd %xmm3, %xmm1
ja 0x4704
incq %rsi
subsd %xmm0, %xmm2
ucomisd %xmm1, %xmm2
jbe 0x468b
jmp 0x4704
movdqu (%rcx), %xmm0
movdqu 0x10(%rax), %xmm1
pcmpeqb %xmm0, %xmm1
pmovmskb %xmm1, %esi
cmpl $0xffff, %esi           # imm = 0xFFFF
je 0x4729
movsd 0x8(%rcx), %xmm1
xorl %esi, %esi
ucomisd 0x18(%rax), %xmm1
movsd (%rcx), %xmm1
seta %sil
xorl %edi, %edi
ucomisd 0x10(%rax), %xmm1
seta %dil
leaq (%rdi,%rsi,2), %rsi
movq (%rax), %rdi
imulq $0x28, %rsi, %rax
addq %rdi, %rax
testq %rdi, %rdi
jne 0x46bd
leaq 0x8(%rdx), %rax
cmpb $0x0, 0x18(%rdx)
movq 0x20(%rdx), %rdi
movq 0x28(%rdx), %rsi
je 0x471e
movq %rax, %rdx
jmp 0x271a
movq %rcx, %rdx
movq %rax, %rcx
jmp 0x271a
movq 0x8(%rax), %rax
movq %rax, (%r8)
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/kernfel[P]fNEAT/network.c
// Function: create_pNetwork
int create_pNetwork( pNetwork *n ) {
	int err=0;
	n->p_nodes = 0;
	n->p_links = 0;
	if (( err = Malloc( n->p_nodes, sizeof *n->p_nodes ) )
	 || ( err = Malloc( n->p_links, sizeof *n->p_links ) ) ) {
		free( n->p_nodes );
		return err;
	}

	n->p_nodes[0] = 0;
	n->num_nodes = 0;
	n->num_node_blocks = 1;
	n->num_inputs = 0;
	n->num_outputs = 0;

	n->p_links[0] = 0;
	n->num_links = 0;
	n->num_link_blocks = 1;

	if (( err = Malloc( n->p_nodes[0], BLOCKSIZE_NODES*sizeof **n->p_nodes ) )
	 || ( err = Malloc( n->p_links[0], BLOCKSIZE_LINKS*sizeof **n->p_links ) )) {
		delete_pNetwork( n );
		return err;
	}
	
	return err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
andq $0x0, 0x10(%rdi)
leaq 0x10(%rdi), %r15
andq $0x0, 0x30(%rdi)
pushq $0x8
popq %rsi
movq %r15, %rdi
callq 0x4208
testl %eax, %eax
jne 0x476e
leaq 0x30(%rbx), %r14
pushq $0x8
popq %rsi
movq %r14, %rdi
callq 0x4208
testl %eax, %eax
je 0x4785
movl %eax, %ebp
movq (%r15), %rdi
callq 0x1030
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%rbx), %rax
andq $0x0, (%rax)
andl $0x0, (%rbx)
pushq $0x1
popq %rax
movl %eax, 0x8(%rbx)
andq $0x0, 0x18(%rbx)
movq 0x30(%rbx), %rcx
andq $0x0, (%rcx)
andl $0x0, 0x20(%rbx)
movl %eax, 0x28(%rbx)
movq 0x10(%rbx), %rdi
movl $0x1800, %esi           # imm = 0x1800
callq 0x4208
testl %eax, %eax
jne 0x47cd
movq (%r14), %rdi
movl $0x8000, %esi           # imm = 0x8000
callq 0x4208
testl %eax, %eax
je 0x47d9
movl %eax, %ebp
movq %rbx, %rdi
callq 0x47dd
jmp 0x4778
xorl %ebp, %ebp
jmp 0x4778
// File: /workspace/github_c_makefile_star2_O2/kernfel[P]fNEAT/network.c
// Function: delete_pNetwork
void delete_pNetwork( pNetwork *n ) {
	int i;
	for ( i=0; i<n->num_node_blocks; i++ ) {
		free( n->p_nodes[i] );
	}
	for ( i=0; i<n->num_link_blocks; i++ ) {
		free( n->p_links[i] );
	}

	free( n->p_nodes );
	free( n->p_links );
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
movl 0x8(%rbx), %eax
cmpq %rax, %r14
jae 0x4801
movq 0x10(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x1030
incq %r14
jmp 0x47e7
xorl %r14d, %r14d
movl 0x28(%rbx), %eax
cmpq %rax, %r14
jae 0x481e
movq 0x30(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x1030
incq %r14
jmp 0x4804
movq 0x10(%rbx), %rdi
callq 0x1030
movq 0x30(%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O2/kernfel[P]fNEAT/network.c
// Function: add_pNode
int add_pNode( pNetwork *n, const double x[DIMENSIONS], pNode **result ) {
	int err=0;

	// If need be, allocate a new block
	if ( n->num_nodes == n->num_node_blocks * BLOCKSIZE_NODES ) {
		if (( err = Realloc( n->p_nodes, (n->num_node_blocks+1)*sizeof *n->p_nodes ) )
		 || ( err = Malloc( n->p_nodes[n->num_node_blocks], BLOCKSIZE_NODES*sizeof **n->p_nodes ) )) {
			return err;
		}
		n->num_node_blocks++;
	}

	int block = n->num_nodes / BLOCKSIZE_NODES;
	int index = n->num_nodes % BLOCKSIZE_NODES;
	pNode *new = &n->p_nodes[block][index];
	new->used = 0;
	memcpy( new->x, x, DIMENSIONS*sizeof *x );

	n->num_nodes++;
	
	if ( result )
		*result = new;

	return err;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movl (%rdi), %eax
movl 0x8(%rdi), %esi
movl %esi, %ecx
shll $0x8, %ecx
cmpl %ecx, %eax
jne 0x4a05
leaq 0x10(%r14), %rdi
incl %esi
shlq $0x3, %rsi
callq 0x4231
testl %eax, %eax
jne 0x4a34
movl 0x8(%r14), %edi
shlq $0x3, %rdi
addq 0x10(%r14), %rdi
movl $0x1800, %esi           # imm = 0x1800
callq 0x4208
testl %eax, %eax
jne 0x4a34
incl 0x8(%r14)
movl (%r14), %eax
movzbl %al, %edx
movq 0x10(%r14), %rcx
shrl $0x8, %eax
movq (%rcx,%rax,8), %rcx
imulq $0x18, %rdx, %rdx
movb $0x0, 0x10(%rcx,%rdx)
movups (%r15), %xmm0
movups %xmm0, (%rcx,%rdx)
incl (%r14)
xorl %eax, %eax
testq %rbx, %rbx
je 0x4a34
addq %rdx, %rcx
movq %rcx, (%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/kernfel[P]fNEAT/network.c
// Function: add_pLink
int add_pLink( pNetwork *n, pNode *from, pNode *to, pLink **result ) {
	int err=0;

	// If need be, allocate a new block
	if ( n->num_links == n->num_link_blocks * BLOCKSIZE_LINKS ) {
		if (( err = Realloc( n->p_links, (n->num_link_blocks+1)*sizeof *n->p_links ) )
		 || ( err = Malloc( n->p_links[n->num_link_blocks], BLOCKSIZE_LINKS*sizeof **n->p_links ) )) {
			return err;
		}
		n->num_link_blocks++;
	}

	int block = n->num_links / BLOCKSIZE_LINKS;
	int index = n->num_links % BLOCKSIZE_LINKS;
	pLink *new = &n->p_links[block][index];
	new->from = from;
	new->to = to;
	new->used = 0;

	n->num_links++;

	if ( result )
		*result = new;

	return err;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
movl 0x20(%rdi), %eax
movl 0x28(%rdi), %esi
movl %esi, %ecx
shll $0xa, %ecx
cmpl %ecx, %eax
jne 0x4a92
leaq 0x30(%r14), %rdi
incl %esi
shlq $0x3, %rsi
callq 0x4231
testl %eax, %eax
jne 0x4acb
movl 0x28(%r14), %edi
shlq $0x3, %rdi
addq 0x30(%r14), %rdi
movl $0x8000, %esi           # imm = 0x8000
callq 0x4208
testl %eax, %eax
jne 0x4acb
incl 0x28(%r14)
movl 0x20(%r14), %eax
movl %eax, %ecx
andl $0x3ff, %ecx            # imm = 0x3FF
movq 0x30(%r14), %rdx
movl %eax, %esi
shrl $0xa, %esi
movq (%rdx,%rsi,8), %rdx
shll $0x5, %ecx
movq %r12, (%rdx,%rcx)
movq %r15, 0x8(%rdx,%rcx)
movb $0x0, 0x18(%rdx,%rcx)
incl %eax
movl %eax, 0x20(%r14)
xorl %eax, %eax
testq %rbx, %rbx
je 0x4acb
addq %rcx, %rdx
movq %rdx, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/kernfel[P]fNEAT/network.c
// Function: backtrack
void backtrack( pNetwork *net, pNode *n ) {
	n->used = 1;
	net->num_used_nodes++;
	unsigned int i;
	int index, block=-1;
	pLink *l;
	for ( i = 0; i < net->num_links; i++ ) {
		index = i % BLOCKSIZE_LINKS;
		if ( ! index )
			block++;
		l = &net->p_links[block][index];
		if ( l->to == n ) {
			l->used = 1;
			net->num_used_links++;
			if ( ! l->from->used ) {
				backtrack( net, l->from );
			}
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movb $0x1, 0x10(%rsi)
incl 0x4(%rdi)
xorl %ebp, %ebp
pushq $-0x1
popq %r15
cmpl 0x20(%r14), %ebp
jae 0x4f4f
movl %ebp, %eax
andl $0x3ff, %eax            # imm = 0x3FF
cmpl $0x1, %eax
adcl $0x0, %r15d
movq 0x30(%r14), %rcx
movslq %r15d, %rdx
movq (%rcx,%rdx,8), %rcx
shll $0x5, %eax
cmpq %rbx, 0x8(%rcx,%rax)
jne 0x4f4b
addq %rax, %rcx
movb $0x1, 0x18(%rcx)
incl 0x24(%r14)
movq (%rcx), %rsi
cmpb $0x0, 0x10(%rsi)
jne 0x4f4b
movq %r14, %rdi
callq 0x4eec
incl %ebp
jmp 0x4f06
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/kernfel[P]fNEAT/robot-simplistic.c
// Function: adjust_heading
void adjust_heading( Robot *bot, struct Robot_Params *params, double *controller_outputs ) {
	double turn_output = controller_outputs[1] - controller_outputs[2];
	if ( fabs(turn_output) > params->turn_threshold ) {
		if ( turn_output > 0 )
			turn_output = turn_output - params->turn_threshold;
		else
			turn_output = turn_output + params->turn_threshold;
		bot->heading = fmod( bot->heading + turn_output*params->turn_sensitivity, 2*M_PI );
	}
}

// Assembly:
movsd 0x8(%rdx), %xmm1
subsd 0x10(%rdx), %xmm1
movapd 0x12d2(%rip), %xmm0     # 0x6240
andpd %xmm1, %xmm0
movsd 0x20(%rsi), %xmm2
ucomisd %xmm2, %xmm0
jbe 0x4fc3
pushq %rbx
movq %rdi, %rbx
movapd 0x1437(%rip), %xmm3     # 0x63c0
xorpd %xmm2, %xmm3
xorpd %xmm0, %xmm0
cmpltsd %xmm1, %xmm0
andpd %xmm0, %xmm3
andnpd %xmm2, %xmm0
orpd %xmm3, %xmm0
addsd %xmm1, %xmm0
mulsd 0x18(%rsi), %xmm0
addsd 0x10(%rdi), %xmm0
movsd 0x1418(%rip), %xmm1     # 0x63d0
callq 0x1070
movsd %xmm0, 0x10(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/kernfel[P]fNEAT/robot-simplistic.c
// Function: get_sensor_readings_in_room
void get_sensor_readings_in_room( Robot *bot, Room *room, struct Robot_Params *params, double *sensor_inputs ) {
	// Calculate sensor data
	int i;
	double s_length = params->dist_sensor_length + params->radius;
	for ( i=0; i<params->num_dist_sensors; i++ ) {
		double s_x = cos(bot->heading + params->dist_sensor_pos[i]) * s_length;
		double s_y = sin(bot->heading + params->dist_sensor_pos[i]) * s_length;
		double depth_x=0, depth_y=0;
		if ( bot->x + s_x < 0 )
			depth_x = -(bot->x + s_x) / s_x;
		else if ( bot->x + s_x > room->x )
			depth_x = (bot->x + s_x - room->x) / s_x;
		if ( bot->y + s_y < 0 )
			depth_y = -(bot->y + s_y) / s_y;
		else if ( bot->y + s_y > room->y )
			depth_y = (bot->y + s_y - room->y) / s_y;
		double reading = max(depth_x, depth_y) * s_length / params->dist_sensor_length;
		sensor_inputs[i] = params->invert_dist_sensors ? 1-reading : reading;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movsd 0x30(%rdx), %xmm0
addsd (%rdx), %xmm0
movsd %xmm0, (%rsp)
xorl %r13d, %r13d
movslq 0x28(%r14), %rax
cmpq %rax, %r13
jge 0x525a
movsd 0x10(%r12), %xmm0
movq 0x38(%r14), %rax
addsd (%rax,%r13,8), %xmm0
callq 0x1080
mulsd (%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x10(%r12), %xmm0
movq 0x38(%r14), %rax
addsd (%rax,%r13,8), %xmm0
callq 0x1130
movsd 0x8(%rsp), %xmm5
xorpd %xmm4, %xmm4
movsd (%r12), %xmm2
addsd %xmm5, %xmm2
ucomisd %xmm2, %xmm4
jbe 0x51cf
xorpd 0x11f3(%rip), %xmm2     # 0x63c0
jmp 0x51e2
movsd (%r15), %xmm3
xorpd %xmm1, %xmm1
ucomisd %xmm3, %xmm2
jbe 0x51ea
subsd %xmm3, %xmm2
divsd %xmm5, %xmm2
movapd %xmm2, %xmm1
mulsd (%rsp), %xmm0
movsd 0x8(%r12), %xmm2
addsd %xmm0, %xmm2
ucomisd %xmm2, %xmm4
jbe 0x520a
xorpd 0x11b8(%rip), %xmm2     # 0x63c0
jmp 0x521e
movsd 0x8(%r15), %xmm4
xorpd %xmm3, %xmm3
ucomisd %xmm4, %xmm2
jbe 0x5226
subsd %xmm4, %xmm2
divsd %xmm0, %xmm2
movapd %xmm2, %xmm3
maxsd %xmm3, %xmm1
mulsd (%rsp), %xmm1
divsd 0x30(%r14), %xmm1
cmpb $0x0, 0x40(%r14)
je 0x524c
movsd 0xecc(%rip), %xmm0      # 0x6110
subsd %xmm1, %xmm0
movapd %xmm0, %xmm1
movsd %xmm1, (%rbx,%r13,8)
incq %r13
jmp 0x5167
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/kernfel[P]fNEAT/network-static.c
// Function: delete_eNetwork
void delete_eNetwork( eNetwork *e ) {
	free( e->nodes );
	free( e->inputs );
	free( e->outputs );
	free( e->links );

	e->nodes = 0;
	e->inputs = 0;
	e->outputs = 0;
	e->links = 0;

	e->num_nodes = 0;
	e->num_inputs = 0;
	e->num_outputs = 0;
	e->num_links = 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0x1030
movq 0x18(%rbx), %rdi
callq 0x1030
movq 0x20(%rbx), %rdi
callq 0x1030
movq 0x30(%rbx), %rdi
callq 0x1030
andq $0x0, 0x30(%rbx)
andl $0x0, (%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rbx)
movups %xmm0, 0x18(%rbx)
andl $0x0, 0x28(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/kernfel[P]fNEAT/network-static.c
// Function: activate
void activate( eNetwork *net, double *inputs, double *outputs ) {
	unsigned int i, j=0;
	eNode *n = net->nodes;
	eLink *l = net->links;

	// Load input values
	for ( i=0; i<net->num_inputs; i++ ) {
		if ( net->inputs[i] ) {
			net->inputs[i]->a = inputs[i];
			n++;
			j++;
			l += net->inputs[i]->num_inputs;
		}
	}

	// Propagate
	for ( i=j; i<net->num_nodes; i++ ) {
		double sum=0;
		for ( j=0; j<n->num_inputs; j++ ) {
			sum += l->w * l->from->a;
			l++;
		}
		n->a = tanh(sum);
		n++;
	}

	// Load output values
	for ( i=0; i<net->num_outputs; i++ ) {
		if ( net->outputs[i] ) {
			outputs[i] = net->outputs[i]->a;
		} else {
			outputs[i] = 0;
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %r15
movq 0x30(%rdi), %r12
movl 0x10(%rdi), %eax
xorl %ecx, %ecx
xorl %ebp, %ebp
cmpq %rcx, %rax
je 0x5ec2
movq 0x18(%r14), %rdx
movq (%rdx,%rcx,8), %rdx
testq %rdx, %rdx
je 0x5e7d
movsd (%rsi,%rcx,8), %xmm0
movsd %xmm0, (%rdx)
addq $0x10, %r15
incl %ebp
movslq 0x8(%rdx), %rdx
shlq $0x4, %rdx
addq %rdx, %r12
incq %rcx
jmp 0x5e51
movl 0x8(%r15), %eax
movq %rax, %rcx
shlq $0x4, %rcx
xorpd %xmm0, %xmm0
movq %r12, %rdx
subl $0x1, %eax
jb 0x5eaf
movsd (%rdx), %xmm1
movq 0x8(%rdx), %rsi
mulsd (%rsi), %xmm1
addsd %xmm1, %xmm0
addq $0x10, %rdx
jmp 0x5e94
addq %rcx, %r12
callq 0x1150
movsd %xmm0, (%r15)
addq $0x10, %r15
incl %ebp
cmpl (%r14), %ebp
jb 0x5e82
movl 0x14(%r14), %eax
xorl %ecx, %ecx
cmpq %rcx, %rax
je 0x5ef3
movq 0x20(%r14), %rdx
movq (%rdx,%rcx,8), %rdx
testq %rdx, %rdx
je 0x5ee5
movsd (%rdx), %xmm0
jmp 0x5ee9
xorpd %xmm0, %xmm0
movsd %xmm0, (%rbx,%rcx,8)
incq %rcx
jmp 0x5ecd
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/kernfel[P]fNEAT/network-static.c
// Function: dump_eNetwork
void dump_eNetwork( eNetwork *net, FILE *fp ) {
	unsigned int i;
	for ( i=0; i<net->num_nodes; i++ ) {
		fprintf( fp, "0x%08x | %4d\n",
			(unsigned int) &net->nodes[i],
			net->nodes[i].num_inputs
		);
	}

	for ( i=0; i<net->num_links; i++ ) {
		fprintf( fp, "0x%08x | 0x%08x > ... | %+6.4f\n",
			(unsigned int) &net->links[i],
			(unsigned int) net->links[i].from,
			net->links[i].w
		);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x4c6(%rip), %r15       # 0x63d8
xorl %r12d, %r12d
xorl %r13d, %r13d
movl (%r14), %eax
cmpq %rax, %r13
jae 0x5f43
movq 0x8(%r14), %rax
leal (%rax,%r12), %edx
movl 0x8(%rax,%r12), %ecx
movq %rbx, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x10b0
incq %r13
addq $0x10, %r12
jmp 0x5f18
xorl %r12d, %r12d
leaq 0x499(%rip), %r15       # 0x63e6
xorl %r13d, %r13d
movl 0x28(%r14), %eax
cmpq %rax, %r13
jae 0x5f82
movq 0x30(%r14), %rax
leal (%rax,%r12), %edx
movl 0x8(%rax,%r12), %ecx
movsd (%rax,%r12), %xmm0
movq %rbx, %rdi
movq %r15, %rsi
movb $0x1, %al
callq 0x10b0
incq %r13
addq $0x10, %r12
jmp 0x5f50
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/aligrudi[P]gpss/sum.c
// Function: main
int main(void)
{
	int cnt = 0;
	int npt;
	int r[NALG];
	int amax[NALG] = {0};
	int arat[NALG] = {0};
	int i;
	while (scanf("%d", &npt) == 1) {
		int best = 0;
		for (i = 0; i < NALG; i++)
			scanf("%d", &r[i]);
		for (i = 0; i < NALG; i++)
			if (best < r[i])
				best = r[i];
		for (i = 0; i < NALG; i++)
			if (r[i] == best)
				amax[i]++;
		for (i = 0; i < NALG; i++)
			arat[i] += r[i] * 10000 / best;
		cnt++;
	}
	for (i = 0; i < NALG; i++) {
		int maxrat = amax[i] * 10000 / cnt;
		int sizerat = arat[i] / cnt;
		printf("%2d.%02d %2d.%02d\n", maxrat / 100, maxrat % 100,
			sizerat / 100, sizerat % 100);
	}
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
leaq 0xe9a(%rip), %rbx       # 0x2004
leaq 0x1c(%rsp), %r14
xorl %ebp, %ebp
movq %rbx, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x1040
cmpl $0x1, %eax
jne 0x11ec
xorl %r15d, %r15d
cmpq $0x10, %r15
je 0x11a0
leaq (%rsp,%r15), %rsi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1040
addq $0x4, %r15
jmp 0x1186
xorl %eax, %eax
xorl %ecx, %ecx
cmpq $0x4, %rax
je 0x11b7
movl (%rsp,%rax,4), %edx
cmpl %edx, %ecx
cmovlel %edx, %ecx
incq %rax
jmp 0x11a4
xorl %eax, %eax
cmpq $0x4, %rax
je 0x11cd
cmpl %ecx, (%rsp,%rax,4)
jne 0x11c8
incl 0x30(%rsp,%rax,4)
incq %rax
jmp 0x11b9
xorl %esi, %esi
cmpq $0x4, %rsi
je 0x11e8
imull $0x2710, (%rsp,%rsi,4), %eax # imm = 0x2710
cltd
idivl %ecx
addl %eax, 0x20(%rsp,%rsi,4)
incq %rsi
jmp 0x11cf
incl %ebp
jmp 0x1171
pushq $0x64
popq %r14
leaq 0xe10(%rip), %rbx       # 0x2007
xorl %r15d, %r15d
cmpq $0x4, %r15
je 0x1245
imull $0x2710, 0x30(%rsp,%r15,4), %eax # imm = 0x2710
cltd
idivl %ebp
movl %eax, %ecx
movl 0x20(%rsp,%r15,4), %eax
cltd
idivl %ebp
movl %eax, %esi
movl %ecx, %eax
cltd
idivl %r14d
movl %edx, %ecx
movl %eax, %r8d
movl %esi, %eax
cltd
idivl %r14d
movl %edx, %r9d
movq %rbx, %rdi
movl %r8d, %esi
movl %ecx, %edx
movl %eax, %ecx
movl %r9d, %r8d
xorl %eax, %eax
callq 0x1030
incq %r15
jmp 0x11fa
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq