LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/kernfel[P]fNEAT/main.c
// Function: run_trial
int run_trial( pNetwork *controller_structure, struct NEAT_Params *n_params, struct Robot_Params *r_params, TileMaze *maze, int *behaviour ) {
	int err=0;

	struct Implementation_Params i_params = {3};

	eNetwork controller;
	if (( err = create_eNetwork( &controller ) ))
		return err;
	if (( err = build_eNetwork( &controller, controller_structure, n_params, &i_params ) )) {
		delete_eNetwork( &controller );
		return err;
	}

	Robot bot = { 1, 1, 0 };
/*	double sensors[NUM_SENSORS+1], motors[NUM_MOTORS];*/
/*	sensors[NUM_SENSORS] = 1;*/
	double sensors[NUM_SENSORS], motors[NUM_MOTORS];
	int i, tile_counter=0, tile=0, prev_tile;
	for ( i=0; i<20000 && tile_counter < 400; i++ ) {
		get_sensor_readings_in_tilemaze( &bot, maze, r_params, sensors );
		activate( &controller, sensors, motors );
		move_robot_in_tilemaze( &bot, maze, r_params, motors );
		
		prev_tile = tile;
		tile = (int)(bot.x / maze->tile_width) + maze->x*(int)(bot.y / maze->tile_width);
		tile_counter++;
		if ( tile != prev_tile )
			tile_counter = 0;

		++behaviour[tile];
	}
	
	if ( i==tile_counter && bot.x == 1 && bot.y == 1 )
		behaviour[tile] = 0;

	delete_eNetwork( &controller );

	return err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
movabsq $0x4008000000000000, %rax # imm = 0x4008000000000000
movq %rax, 0x30(%rsp)
leaq 0x38(%rsp), %rdi
callq 0x6164
movl %eax, %ebp
testl %eax, %eax
jne 0x15f9
leaq 0x38(%rsp), %rdi
leaq 0x30(%rsp), %rcx
movq %r13, %rsi
movq %r12, %rdx
callq 0x61c5
testl %eax, %eax
je 0x14e9
movl %eax, %ebp
leaq 0x38(%rsp), %rdi
callq 0x6181
jmp 0x15f9
movq %rbx, 0x8(%rsp)
movupd 0x5b6a(%rip), %xmm0     # 0x7060
leaq 0x10(%rsp), %rax
movapd %xmm0, (%rax)
movq $0x0, 0x10(%rax)
xorl %ecx, %ecx
xorl %ebx, %ebx
xorl %edx, %edx
movl %edx, %r12d
movl %ecx, 0x4(%rsp)
leaq 0x10(%rsp), %rbp
movq %rbp, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %r15, %r13
leaq 0x90(%rsp), %r15
movq %r15, %rcx
callq 0x5ed2
leaq 0x38(%rsp), %rdi
movq %r15, %rsi
movq %r13, %r15
leaq 0x70(%rsp), %r13
movq %r13, %rdx
callq 0x64b1
movq %rbp, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %r13, %rcx
callq 0x5774
movsd (%r14), %xmm0
movsd 0x10(%rsp), %xmm1
divsd %xmm0, %xmm1
cvttsd2si %xmm1, %eax
movsd 0x18(%rsp), %xmm1
divsd %xmm0, %xmm1
cvttsd2si %xmm1, %ecx
imull 0x8(%r14), %ecx
addl %eax, %ecx
incl %ebx
cmpl 0x4(%rsp), %ecx
movl $0x0, %eax
cmovnel %eax, %ebx
movslq %ecx, %rax
movq 0x8(%rsp), %rdx
incl (%rdx,%rax,4)
leal 0x1(%r12), %edx
cmpl $0x4e1e, %r12d          # imm = 0x4E1E
ja 0x15b9
cmpl $0x190, %ebx            # imm = 0x190
jl 0x150d
cmpl %ebx, %edx
jne 0x15ed
movsd 0x10(%rsp), %xmm0
ucomisd 0x5a75(%rip), %xmm0     # 0x7040
jne 0x15ed
jp 0x15ed
movsd 0x18(%rsp), %xmm0
ucomisd 0x5a63(%rip), %xmm0     # 0x7040
jne 0x15ed
jp 0x15ed
movq 0x8(%rsp), %rcx
movl $0x0, (%rcx,%rax,4)
leaq 0x38(%rsp), %rdi
callq 0x6181
xorl %ebp, %ebp
movl %ebp, %eax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/kernfel[P]fNEAT/main.c
// Function: m_get_spread
void m_get_spread( pNode *in, int n, double x ) {
	int i;
	for ( i=1; i<=n; i++ ) {
		in[i-1].x[0] = x;
		in[i-1].x[1] = (-0.5) + i/(1.0+n);
	}
}

// Assembly:
testl %esi, %esi
jle 0x1654
cvtsi2sd %esi, %xmm1
addsd 0x5a23(%rip), %xmm1     # 0x7040
incl %esi
addq $0x8, %rdi
movl $0x1, %eax
movsd 0x5a18(%rip), %xmm2     # 0x7048
movsd %xmm0, -0x8(%rdi)
xorps %xmm3, %xmm3
cvtsi2sd %eax, %xmm3
divsd %xmm1, %xmm3
addsd %xmm2, %xmm3
movsd %xmm3, (%rdi)
incq %rax
addq $0x18, %rdi
cmpq %rax, %rsi
jne 0x1630
retq
// File: /workspace/github_c_makefile_star2_O1/kernfel[P]fNEAT/main.c
// Function: analyse_maze
int analyse_maze( TileMaze *m, int *behaviour, int print ) {
	int x, y, maxval=0, tiles_visited=0;
	for ( x=0; x<m->x*m->y; x++ ) {
		maxval = max(maxval, behaviour[x]);
		if ( behaviour[x] )
			tiles_visited++;
	}
	if ( print ) {
		for ( y=0; y<m->y; y++ ) {
			putchar('\n');
			for ( x=0; x<m->x; x++ ) {
				if ( behaviour[x + m->x*y] ) {
					int track = (int)(34 * behaviour[x + m->x*y] / maxval);
					if ( track < 9 )
						putchar( '1'+track );
					else
						putchar( 'A'+(track-9) );
				} else if ( m->tiles[x + m->x*y] )
					putchar('0');
				else
					putchar('#');
			}
		}
		putchar('\n');
		fflush(stdout);
	}
	return tiles_visited;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl 0xc(%rdi), %eax
imull 0x8(%rdi), %eax
testl %eax, %eax
jle 0x1694
movl %eax, %eax
xorl %ecx, %ecx
xorl %ebp, %ebp
xorl %r15d, %r15d
movl (%rbx,%rcx,4), %esi
cmpl %esi, %r15d
cmovlel %esi, %r15d
cmpl $0x1, %esi
sbbl $-0x1, %ebp
incq %rcx
cmpq %rcx, %rax
jne 0x167a
jmp 0x1699
xorl %r15d, %r15d
xorl %ebp, %ebp
testl %edx, %edx
je 0x1739
cmpl $0x0, 0xc(%r14)
jle 0x1720
xorl %r12d, %r12d
movl $0xa, %edi
callq 0x1040
movl 0x8(%r14), %eax
testl %eax, %eax
jle 0x1717
xorl %r13d, %r13d
imull %r12d, %eax
movslq %eax, %rcx
leaq (%rcx,%r13), %rax
movl (%rbx,%rax,4), %eax
testl %eax, %eax
je 0x16ea
movl %eax, %ecx
shll $0x5, %ecx
leal (%rcx,%rax,2), %eax
cltd
idivl %r15d
movl %eax, %edi
cmpl $0x8, %eax
jg 0x1703
addl $0x31, %edi
jmp 0x1706
addq 0x10(%r14), %rcx
cmpb $0x0, (%r13,%rcx)
movl $0x30, %edi
movl $0x23, %eax
cmovel %eax, %edi
jmp 0x1706
addl $0x38, %edi
callq 0x1040
movl 0x8(%r14), %eax
incq %r13
cmpl %eax, %r13d
jl 0x16c0
incl %r12d
cmpl 0xc(%r14), %r12d
jl 0x16ab
movl $0xa, %edi
callq 0x1040
movq 0x88af(%rip), %rax      # 0x9fe0
movq (%rax), %rdi
callq 0x10f0
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_O1/kernfel[P]fNEAT/cppn.c
// Function: create_CPPN
int create_CPPN( CPPN *net, struct NEAT_Params *params )
{
	int i, j, err=0;
	
	// Determine number of nodes and links
	net->num_outputs = N_OUTPUTS;
	net->num_inputs = 2*DIMENSIONS + ((params->flags & CFL_USE_DIST)? 1:0) + ((params->flags & CFL_USE_BIAS)? 1:0);
	net->num_hidden = 0;
	if ( params->flags & CFL_MASK_INIT_UNLINKED ) {
		net->num_links = net->num_inputs * net->num_outputs;
	} else {
		net->num_links = 0;
		for ( i=0; i<net->num_outputs; i++ )
			if ( params->initially_linked_outputs[i] )
				net->num_links += net->num_inputs;
	}
	
	// Allocate the storage necessary
	if (( err = allocate_CPPN( net ) ))
		return err;

	// Create input and output nodes
	for ( i=0; i<net->num_inputs; i++ )
		net->nodes[i].func = CF_LINEAR;
	for ( i=0; i<net->num_outputs; i++ )
		net->nodes[i+net->num_inputs].func = params->output_funcs[i];

	// Create links from input to output nodes, where applicable
	for ( i=0; i<net->num_outputs; i++ ) {
		if ( ! (params->flags & CFL_MASK_INIT_UNLINKED) && ! params->initially_linked_outputs[i] )
			continue;
		for ( j=0; j<net->num_inputs; j++ ) {
			net->links[j].innov_id = ++params->innov_counter;
			net->links[j].from = j;
			net->links[j].to = i+net->num_inputs;
			net->links[j].weight = 0;
			net->links[j].is_disabled = ! params->initially_linked_outputs[i];
		}
	}

	return err;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl $0x1, 0xc(%rdi)
movl (%rsi), %ecx
movl %ecx, %eax
andl $0x1, %eax
btl $0x2, %ecx
adcl $0x0, %eax
orl $0x4, %eax
movl %eax, 0x8(%rdi)
movl $0x0, 0x10(%rdi)
testb %cl, %cl
js 0x1d1e
movl $0x0, 0x20(%r14)
cmpl $0x0, 0x3c(%rbx)
je 0x1d22
addl 0x20(%r14), %eax
movl %eax, 0x20(%r14)
movq %r14, %rdi
callq 0x1e14
testl %eax, %eax
jne 0x1e0f
movslq 0x8(%r14), %rcx
testq %rcx, %rcx
jle 0x1d57
movq (%r14), %rdx
movq %rcx, %rsi
shlq $0x4, %rsi
xorl %edi, %edi
movl $0x3, (%rdx,%rdi)
addq $0x10, %rdi
cmpq %rdi, %rsi
jne 0x1d47
movslq 0xc(%r14), %rdx
testq %rdx, %rdx
jle 0x1d87
movq %rcx, %rsi
shlq $0x4, %rsi
addq (%r14), %rsi
leaq (,%rdx,4), %rdi
xorl %r8d, %r8d
movl 0x38(%rbx,%r8), %r9d
movl %r9d, (%rsi,%r8,4)
addq $0x4, %r8
cmpq %r8, %rdi
jne 0x1d75
testl %edx, %edx
jle 0x1e0f
movl (%rbx), %esi
cmpl $0x2, %ecx
movl $0x1, %edi
cmovgel %ecx, %edi
xorl %r8d, %r8d
testb %sil, %sil
js 0x1dbb
testl %ecx, %ecx
setle %r9b
cmpl $0x0, 0x3c(%rbx,%r8,4)
sete %r10b
orb %r9b, %r10b
je 0x1dbf
jmp 0x1e07
testl %ecx, %ecx
jle 0x1e07
movq 0x18(%r14), %r9
leal (%r8,%rcx), %r10d
xorl %r11d, %r11d
movl 0x108(%rbx), %ebp
incl %ebp
movl %ebp, 0x108(%rbx)
movl %ebp, (%r9)
movl %r11d, 0x4(%r9)
movl %r10d, 0x8(%r9)
movq $0x0, 0x10(%r9)
xorl %ebp, %ebp
cmpl $0x0, 0x3c(%rbx,%r8,4)
sete %bpl
movl %ebp, 0x18(%r9)
incq %r11
addq $0x20, %r9
cmpq %r11, %rdi
jne 0x1dca
incq %r8
cmpq %rdx, %r8
jne 0x1d9f
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/kernfel[P]fNEAT/cppn.c
// Function: allocate_CPPN
int allocate_CPPN( CPPN *net ) {
	int err=0;

	net->nodes = 0;
	net->links = 0;

	if (( err = Malloc( net->links, net->num_links*sizeof *net->links ) ) \
	 || ( err = Malloc( net->nodes, (net->num_inputs+net->num_outputs+net->num_hidden)*sizeof *net->nodes ) )) {
		delete_CPPN( net );
	}

	return err;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
movq %r14, (%rdi)
addq $0x18, %rdi
movq %r14, 0x18(%rbx)
movslq 0x20(%rbx), %rsi
shlq $0x5, %rsi
callq 0x45fc
testl %eax, %eax
jne 0x1e5c
movslq 0x8(%rbx), %rax
movslq 0xc(%rbx), %rcx
addq %rax, %rcx
movslq 0x10(%rbx), %rsi
addq %rcx, %rsi
shlq $0x4, %rsi
movq %rbx, %rdi
callq 0x45fc
testl %eax, %eax
je 0x1e79
movl %eax, %r14d
movq (%rbx), %rdi
callq 0x1030
movq 0x18(%rbx), %rdi
callq 0x1030
xorl %eax, %eax
movq %rax, 0x18(%rbx)
movq %rax, (%rbx)
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/kernfel[P]fNEAT/cppn.c
// Function: clone_CPPN
int clone_CPPN( CPPN *net, const CPPN *original ) {
	int err=0;
	
	// Copy values over
	memcpy( net, original, sizeof *original );

	// Reassign pointers
	if (( err = allocate_CPPN( net ) ))
		return err;
	
	// Copy nodes and links
	memcpy( net->nodes, original->nodes, (net->num_inputs+net->num_outputs+net->num_hidden)*sizeof *net->nodes );
	memcpy( net->links, original->links, net->num_links*sizeof *net->links );

	return err;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq 0x20(%rsi), %rax
movq %rax, 0x20(%rdi)
movups (%rsi), %xmm0
movups 0x10(%rsi), %xmm1
movups %xmm1, 0x10(%rdi)
movups %xmm0, (%rdi)
callq 0x1e14
movl %eax, %ebp
testl %eax, %eax
jne 0x1ee5
movq (%rbx), %rdi
movq (%r14), %rsi
movslq 0x8(%rbx), %rax
movslq 0xc(%rbx), %rcx
addq %rax, %rcx
movslq 0x10(%rbx), %rdx
addq %rcx, %rdx
shlq $0x4, %rdx
callq 0x10c0
movq 0x18(%rbx), %rdi
movq 0x18(%r14), %rsi
movslq 0x20(%rbx), %rdx
shlq $0x5, %rdx
callq 0x10c0
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/kernfel[P]fNEAT/cppn.c
// Function: delete_CPPN
void delete_CPPN( CPPN *net ) {
	free( net->nodes );
	free( net->links );
	net->links = 0;
	net->nodes = 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x1030
movq 0x18(%rbx), %rdi
callq 0x1030
xorl %eax, %eax
movq %rax, 0x18(%rbx)
movq %rax, (%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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, 0xc(%rsp)
movsd %xmm0, 0x10(%rsp)
movl %ecx, %ebp
movl %edx, %r13d
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x18(%rdi), %r12
movslq 0x20(%rdi), %rsi
shlq $0x5, %rsi
addq $0x20, %rsi
movq %r12, %rdi
callq 0x4625
testl %eax, %eax
jne 0x26d6
movq %r12, %r11
movl %ebp, 0x8(%rsp)
movl 0xc(%rsp), %r12d
testl %r15d, %r15d
jne 0x2645
movl 0x108(%rbx), %r15d
incl %r15d
movl %r15d, 0x108(%rbx)
movl 0x20(%r14), %r10d
movl %r10d, %ecx
testl %r10d, %r10d
movl %r12d, %edi
movsd 0x10(%rsp), %xmm0
movl 0x8(%rsp), %r8d
movl %r13d, %r9d
jle 0x2684
movq (%r11), %rdx
addq $-0x20, %rdx
movl %r10d, %ecx
movl %ecx, %esi
shlq $0x5, %rsi
cmpl %r15d, (%rdx,%rsi)
jb 0x2684
leal -0x1(%rcx), %esi
cmpl $0x1, %ecx
movl %esi, %ecx
jg 0x266c
xorl %ecx, %ecx
movslq %ecx, %rcx
movq %rcx, %rbp
shlq $0x5, %rbp
addq (%r11), %rbp
subl %ecx, %r10d
jle 0x26be
leaq 0x20(%rbp), %rdi
movslq %r10d, %rdx
shlq $0x5, %rdx
movq %rbp, %rsi
movl %eax, %ebx
callq 0x1110
movl %ebx, %eax
movl %r13d, %r9d
movl 0x8(%rsp), %r8d
movsd 0x10(%rsp), %xmm0
movl %r12d, %edi
movl %r15d, (%rbp)
movl %r9d, 0x4(%rbp)
movl %r8d, 0x8(%rbp)
movsd %xmm0, 0x10(%rbp)
movl %edi, 0x18(%rbp)
incl 0x20(%r14)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 %rsi, (%rsp)
movslq %edx, %rax
movl (%rcx,%rax,4), %ebx
movl $0x0, (%rcx,%rax,4)
cmpl $0x0, 0x20(%rdi)
jle 0x275a
movq %rcx, %r14
movl %edx, %ebp
movq %rdi, %r12
movl $0x8, %r13d
xorl %r15d, %r15d
movq 0x18(%r12), %rax
cmpl %ebp, -0x4(%rax,%r13)
jne 0x2749
movslq (%rax,%r13), %rcx
addl (%r14,%rcx,4), %ebx
movl $0x0, (%r14,%rcx,4)
movl (%rax,%r13), %edx
movq %r12, %rdi
movq (%rsp), %rsi
movq %r14, %rcx
callq 0x26e5
addl %eax, %ebx
incq %r15
movslq 0x20(%r12), %rax
addq $0x20, %r13
cmpq %rax, %r15
jl 0x2718
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x296d
movl %edi, %eax
leaq 0x4882(%rip), %rcx      # 0x7190
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
pushq %rax
movsd 0x4728(%rip), %xmm1     # 0x7048
mulsd %xmm0, %xmm1
mulsd %xmm0, %xmm1
movapd %xmm1, %xmm0
callq 0x1190
mulsd 0x4827(%rip), %xmm0     # 0x7160
mulsd 0x4827(%rip), %xmm0     # 0x7168
mulsd 0x4827(%rip), %xmm0     # 0x7170
addq $0x8, %rsp
retq
jmp 0x1130
jmp 0x1150
xorpd %xmm1, %xmm1
cmpltsd %xmm1, %xmm0
movsd 0x46d7(%rip), %xmm1     # 0x7040
andnpd %xmm1, %xmm0
retq
andps 0x480b(%rip), %xmm0     # 0x7180
retq
// File: /workspace/github_c_makefile_star2_O1/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 %rbx
movl 0x20(%rdi), %ecx
movl 0x20(%rsi), %r8d
cmpl %r8d, %ecx
movl %r8d, %eax
cmovgl %ecx, %eax
testl %ecx, %ecx
setg %r9b
testl %r8d, %r8d
setg %r10b
andb %r9b, %r10b
cmpb $0x1, %r10b
jne 0x2caf
movq 0x18(%rdi), %r9
movq 0x18(%rsi), %r10
xorpd %xmm0, %xmm0
xorl %edi, %edi
movapd 0x4548(%rip), %xmm1     # 0x7180
xorl %esi, %esi
xorl %r11d, %r11d
movslq %esi, %r14
shlq $0x5, %r14
movl (%r9,%r14), %ebp
movslq %edi, %rbx
shlq $0x5, %rbx
movl (%r10,%rbx), %r15d
cmpl %r15d, %ebp
jne 0x2c8e
addq %r9, %r14
xorpd %xmm3, %xmm3
cmpl $0x0, 0x18(%r14)
xorpd %xmm2, %xmm2
jne 0x2c70
movsd 0x10(%r14), %xmm2
addq %r10, %rbx
cmpl $0x0, 0x18(%rbx)
jne 0x2c7e
movsd 0x10(%rbx), %xmm3
subsd %xmm3, %xmm2
andpd %xmm1, %xmm2
addsd %xmm2, %xmm0
incl %esi
jmp 0x2c96
incl %r11d
cmpl %r15d, %ebp
jbe 0x2c9a
incl %edi
jmp 0x2c9c
incl %esi
cmpl %ecx, %esi
jge 0x2ca5
cmpl %r8d, %edi
jl 0x2c3d
xorps %xmm1, %xmm1
cvtsi2sd %r11d, %xmm1
jmp 0x2cbb
xorl %esi, %esi
xorpd %xmm1, %xmm1
xorpd %xmm0, %xmm0
xorl %edi, %edi
subl %edi, %r8d
subl %esi, %ecx
cmovel %r8d, %ecx
testb $0x1, 0x1(%rdx)
movsd 0x80(%rdx), %xmm2
jne 0x2d0a
xorps %xmm3, %xmm3
cvtsi2sd %eax, %xmm3
mulsd %xmm1, %xmm2
divsd %xmm3, %xmm2
xorps %xmm1, %xmm1
cvtsi2sd %ecx, %xmm1
mulsd 0x88(%rdx), %xmm1
divsd %xmm3, %xmm1
addsd %xmm2, %xmm1
mulsd 0x90(%rdx), %xmm0
divsd %xmm3, %xmm0
addsd %xmm1, %xmm0
jmp 0x2d38
xorps %xmm3, %xmm3
cvtsi2sd %ecx, %xmm3
mulsd 0x88(%rdx), %xmm3
mulsd %xmm1, %xmm2
addsd %xmm3, %xmm2
mulsd 0x90(%rdx), %xmm0
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
divsd %xmm1, %xmm0
addsd %xmm2, %xmm0
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
cmpl $0x0, 0x8(%rdi)
jle 0x3156
leaq 0x406d(%rip), %r15      # 0x71a8
xorl %ebp, %ebp
movq %rbx, %rdi
movq %r15, %rsi
movl %ebp, %edx
xorl %eax, %eax
callq 0x10b0
incl %ebp
cmpl 0x8(%r14), %ebp
jl 0x313d
jmp 0x3158
xorl %ebp, %ebp
movl 0xc(%r14), %eax
addl 0x8(%r14), %eax
cmpl %eax, %ebp
jge 0x319a
movl %ebp, %r12d
shlq $0x4, %r12
leaq 0x4043(%rip), %r15      # 0x71b5
movq (%r14), %rax
movl (%rax,%r12), %ecx
movq %rbx, %rdi
movq %r15, %rsi
movl %ebp, %edx
xorl %eax, %eax
callq 0x10b0
movl 0xc(%r14), %eax
addl 0x8(%r14), %eax
incl %ebp
addq $0x10, %r12
cmpl %ebp, %eax
jg 0x3172
movl 0xc(%r14), %eax
addl 0x8(%r14), %eax
addl 0x10(%r14), %eax
cmpl %eax, %ebp
jge 0x31e4
movl %ebp, %r12d
shlq $0x4, %r12
leaq 0x4015(%rip), %r15      # 0x71cd
movq (%r14), %rax
movl (%rax,%r12), %ecx
movq %rbx, %rdi
movq %r15, %rsi
movl %ebp, %edx
xorl %eax, %eax
callq 0x10b0
movl 0xc(%r14), %eax
addl 0x8(%r14), %eax
addl 0x10(%r14), %eax
incl %ebp
addq $0x10, %r12
cmpl %ebp, %eax
jg 0x31b8
cmpl $0x0, 0x20(%r14)
jle 0x323f
xorl %r13d, %r13d
leaq 0x3ff0(%rip), %r15      # 0x71e5
xorl %r12d, %r12d
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
movslq 0x20(%r14), %rax
addq $0x20, %r13
cmpq %rax, %r12
jl 0x31f8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/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, %r14
movq %rsi, %r15
movq %rdi, %rbx
movl 0x50(%rsi), %eax
movl %eax, 0x8(%rdi)
movl $0x1, 0x18(%rdi)
callq 0x3316
movl %eax, %ebp
testl %eax, %eax
jne 0x3305
movl 0x10c(%r15), %r12d
incl %r12d
movl %r12d, 0x10c(%r15)
incl 0x110(%r15)
movq 0x10(%rbx), %rax
movl %r12d, (%rax)
movl 0x8(%rbx), %ecx
movl %ecx, 0x4(%rax)
testl %ecx, %ecx
jle 0x32f3
movq %r14, (%rsp)
xorl %r14d, %r14d
xorl %r13d, %r13d
movq (%rbx), %rdi
addq %r14, %rdi
movq (%rsp), %rsi
callq 0x1e84
testl %eax, %eax
jne 0x32f7
movq (%rbx), %rax
movl %r12d, 0x30(%rax,%r14)
movl 0x110(%r15), %ecx
incl %ecx
movl %ecx, 0x110(%r15)
movl %ecx, 0x34(%rax,%r14)
incq %r13
movslq 0x8(%rbx), %rax
addq $0x38, %r14
cmpq %rax, %r13
jl 0x32b3
xorl %ebp, %ebp
jmp 0x3305
movl %eax, %ebp
movl %r13d, 0x8(%rbx)
movq %rbx, %rdi
callq 0x3362
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_O1/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 %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
xorl %ebx, %ebx
movq %rbx, (%rdi)
movq %rbx, 0x10(%rdi)
movslq 0x8(%rdi), %rsi
movl $0x38, %edx
callq 0x460f
testl %eax, %eax
jne 0x334e
leaq 0x10(%r14), %rdi
movslq 0x18(%r14), %rsi
movl $0x18, %edx
callq 0x460f
testl %eax, %eax
je 0x3358
movl %eax, %ebx
movq %r14, %rdi
callq 0x3362
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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
cmpl $0x0, 0x8(%rdi)
jle 0x3391
xorl %r14d, %r14d
xorl %r15d, %r15d
movq (%rbx), %rdi
addq %r14, %rdi
callq 0x1eec
incq %r15
movslq 0x8(%rbx), %rax
addq $0x38, %r14
cmpq %rax, %r15
jl 0x3376
movq (%rbx), %rdi
callq 0x1030
movq 0x10(%rbx), %rdi
callq 0x1030
xorl %eax, %eax
movq %rax, (%rbx)
movq %rax, 0x10(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 %rdi, %r12
movl 0x18(%rdi), %r15d
movq %rsp, %rbx
imulq $0x38, %r15, %rax
addq $0xf, %rax
andq $-0x10, %rax
subq %rax, %rbx
movq %rbx, %rsp
movq %rsp, %r13
leaq 0xf(,%r15,8), %rax
andq $-0x10, %rax
subq %rax, %r13
movq %r13, %rsp
movq %rsi, -0x30(%rbp)
movq %rbx, %rdx
movq %r13, %rcx
callq 0x3507
testl %eax, %eax
jne 0x3470
movq %r12, %rdi
movq -0x30(%rbp), %rsi
movq %r13, %rdx
callq 0x3a7c
testl %eax, %eax
jne 0x3470
movq %r12, %rdi
movq -0x30(%rbp), %r13
movq %r13, %rsi
movq %rbx, %rdx
callq 0x3d4a
testl %eax, %eax
je 0x34b0
movl %eax, %r14d
cmpl $-0xa, %r14d
setne %al
testl %r15d, %r15d
setg %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x349e
cmpl $0x0, 0x30(%rbx)
je 0x3495
movq %rbx, %rdi
callq 0x1eec
addq $0x38, %rbx
decq %r15
jne 0x3487
movl %r14d, %eax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0x5c(%r13), %eax
xorl %r14d, %r14d
testl %eax, %eax
je 0x3473
movl 0x18(%r12), %ecx
cmpl %eax, %ecx
jge 0x34dc
movsd 0x68(%r13), %xmm0
movsd 0x70(%r13), %xmm1
ucomisd %xmm1, %xmm0
jbe 0x34dc
subsd %xmm1, %xmm0
jmp 0x34fc
cmpl %eax, %ecx
jle 0x3473
movsd 0x68(%r13), %xmm0
movsd 0x78(%r13), %xmm1
addsd 0x70(%r13), %xmm0
ucomisd %xmm0, %xmm1
jb 0x3473
movsd %xmm0, 0x68(%r13)
jmp 0x3473
// File: /workspace/github_c_makefile_star2_O1/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
movq $0x0, (%rdi)
movslq 0x18(%rbx), %rax
movslq 0x8(%rbx), %rsi
addq %rax, %rsi
shlq $0x3, %rsi
callq 0x45fc
movl %eax, (%r14)
testl %eax, %eax
je 0x44fe
xorl %eax, %eax
jmp 0x45ec
movl 0x18(%rbx), %eax
testl %eax, %eax
jle 0x45e8
xorl %edi, %edi
xorl %edx, %edx
movq (%rsp), %rcx
movl %edx, 0xc(%rsp)
addl %edx, %eax
cltq
leaq (%rcx,%rax,8), %rax
movq %rax, (%rcx,%rdi,8)
cmpl $0x0, 0x8(%rbx)
movl $0x0, %r15d
jle 0x45d1
xorl %r12d, %r12d
leaq (%rdi,%rdi,2), %r13
xorl %r15d, %r15d
movq %rdi, 0x10(%rsp)
movq (%rbx), %rcx
movq 0x10(%rbx), %rax
imulq $0x38, %r12, %rbp
movl 0x30(%rcx,%rbp), %edx
cmpl (%rax,%r13,8), %edx
jne 0x45c1
testl %r15d, %r15d
jle 0x4591
movl %r15d, %eax
movsd 0x28(%rcx,%rbp), %xmm0
movq (%rsp), %rcx
movq (%rcx,%rdi,8), %rcx
movslq %r15d, %rdx
shlq $0x3, %rdx
xorl %r14d, %r14d
movq (%rcx,%r14,8), %rsi
ucomisd 0x28(%rsi), %xmm0
ja 0x4596
incq %r14
addq $-0x8, %rdx
cmpq %r14, %rax
jne 0x4575
movl %eax, %r14d
jmp 0x45ac
xorl %r14d, %r14d
jmp 0x45ac
leaq (%rcx,%r14,8), %rsi
leaq (%rcx,%r14,8), %rdi
addq $0x8, %rdi
callq 0x1110
movq 0x10(%rsp), %rdi
addq (%rbx), %rbp
movq (%rsp), %rax
movq (%rax,%rdi,8), %rax
movl %r14d, %ecx
movq %rbp, (%rax,%rcx,8)
incl %r15d
incq %r12
movslq 0x8(%rbx), %rax
cmpq %rax, %r12
jl 0x4540
movl 0xc(%rsp), %edx
addl %r15d, %edx
incq %rdi
movslq 0x18(%rbx), %rax
cmpq %rax, %rdi
jl 0x450d
movq (%rsp), %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/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 0x463d
movq %rax, (%rbx)
xorl %eax, %eax
jmp 0x4642
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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)
movq $0x0, 0x20(%rdi)
movq %rdi, (%rbx)
movq %rbx, %rsi
callq 0x4698
movl %eax, %ebp
testl %eax, %eax
jne 0x4680
movq %rsp, %rdi
movq %rbx, %rsi
callq 0x4805
movl %eax, %ebp
movq %rsp, %rdi
callq 0x49ac
movq $0x0, (%rbx)
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl $0xa0, %esi
callq 0x45fc
testl %eax, %eax
je 0x46ca
movl %eax, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movb 0x20(%r14), %cl
addb $0x2, %cl
movl $0x1, %eax
shll %cl, %eax
cvtsi2sd %eax, %xmm0
movsd 0x295c(%rip), %xmm1     # 0x7040
divsd %xmm0, %xmm1
leaq 0x8(%rbx), %r15
movl $0x10, %r12d
xorl %r13d, %r13d
movsd %xmm1, (%rsp)
movq (%r14), %rax
leaq (,%r13,8), %rcx
leaq (%rcx,%rcx,4), %rcx
movq $0x0, (%rax,%rcx)
movl 0x20(%r14), %edx
incl %edx
movq (%r14), %rax
movl %edx, 0x20(%rax,%rcx)
leaq (%rax,%r12), %rcx
xorl %edx, %edx
btl %edx, %r13d
movl $0x0, %esi
sbbl %esi, %esi
orl $0x1, %esi
xorps %xmm0, %xmm0
cvtsi2sd %esi, %xmm0
mulsd %xmm1, %xmm0
addsd 0x10(%r14,%rdx,8), %xmm0
movsd %xmm0, (%rcx,%rdx,8)
incq %rdx
cmpq $0x1, %rdx
je 0x4724
cmpb $0x0, 0x18(%rbx)
leaq (%r13,%r13,4), %rdx
leaq 0x10(%rax,%rdx,8), %rcx
leaq 0x8(%rax,%rdx,8), %r8
je 0x4774
movq 0x20(%rbx), %rdi
movq 0x28(%rbx), %rsi
movq %r15, %rdx
jmp 0x4782
movq 0x20(%rbx), %rdi
movq 0x28(%rbx), %rsi
movq %rcx, %rdx
movq %r15, %rcx
callq 0x2976
incq %r13
addq $0x28, %r12
cmpq $0x4, %r13
movsd (%rsp), %xmm1
jne 0x46fa
movl 0x20(%r14), %eax
movq 0x28(%rbx), %r15
movl 0x4(%r15), %ecx
decl %ecx
cmpl %ecx, %eax
jge 0x47dc
xorl %r15d, %r15d
movq (%r14), %rdi
addq %r15, %rdi
movq %rbx, %rsi
callq 0x4698
testl %eax, %eax
jne 0x46b7
addq $0x28, %r15
cmpq $0xa0, %r15
jne 0x47b2
xorl %ebp, %ebp
jmp 0x46b9
movl 0x8(%r15), %ecx
decl %ecx
xorl %ebp, %ebp
cmpl %ecx, %eax
jge 0x46b9
movq %r14, %rdi
movq %r15, %rsi
callq 0x49eb
ucomisd 0x10(%r15), %xmm0
jbe 0x46b9
jmp 0x47af
// File: /workspace/github_c_makefile_star2_O1/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 0x49ea
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
movq (%rbx), %rdi
addq %r14, %rdi
callq 0x49ac
addq $0x28, %r14
cmpq $0xa0, %r14
jne 0x49bc
movq (%rbx), %rdi
callq 0x1030
movq $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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:
movq (%rdi), %rax
movsd 0x18(%rsi), %xmm0
xorpd %xmm1, %xmm1
movl $0x8, %ecx
addsd (%rax,%rcx), %xmm1
addq $0x28, %rcx
cmpq $0xa8, %rcx
jne 0x49fc
mulsd 0x2642(%rip), %xmm1     # 0x7058
xorpd %xmm2, %xmm2
movl $0x8, %ecx
movapd 0x2759(%rip), %xmm3     # 0x7180
movapd %xmm1, %xmm4
subsd (%rax,%rcx), %xmm4
andpd %xmm3, %xmm4
addsd %xmm4, %xmm2
addq $0x28, %rcx
cmpq $0xa8, %rcx
jne 0x4a27
mulsd 0x260b(%rip), %xmm2     # 0x7058
mulsd %xmm0, %xmm2
xorpd %xmm0, %xmm0
addsd %xmm2, %xmm0
retq
// File: /workspace/github_c_makefile_star2_O1/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), %r9
movb 0x20(%r9), %cl
incb %cl
movl $0x1, %eax
shll %cl, %eax
movq %rsi, %r8
cvtsi2sd %eax, %xmm1
movq %rdi, %rax
movsd 0x25c4(%rip), %xmm0     # 0x7040
divsd %xmm1, %xmm0
xorl %ecx, %ecx
movsd (%rax,%rcx,8), %xmm1
movsd 0x10(%r9,%rcx,8), %xmm2
movapd %xmm0, %xmm3
addsd %xmm2, %xmm3
ucomisd %xmm3, %xmm1
ja 0x4b06
subsd %xmm0, %xmm2
ucomisd %xmm1, %xmm2
ja 0x4b06
incq %rcx
cmpq $0x1, %rcx
je 0x4a82
movdqu (%rax), %xmm0
movdqu 0x10(%r9), %xmm1
pcmpeqb %xmm0, %xmm1
pmovmskb %xmm1, %ecx
cmpl $0xffff, %ecx           # imm = 0xFFFF
je 0x4b2b
xorl %ecx, %ecx
xorl %esi, %esi
movl $0x1, %edi
shll %cl, %edi
movsd (%rax,%rcx,8), %xmm1
ucomisd 0x10(%r9,%rcx,8), %xmm1
ja 0x4ae4
xorl %edi, %edi
orl %edi, %esi
incq %rcx
cmpq $0x1, %rcx
je 0x4acd
movq (%r9), %rcx
movslq %esi, %rsi
leaq (%rsi,%rsi,4), %rsi
leaq (%rcx,%rsi,8), %rsi
testq %rcx, %rcx
cmovneq %rsi, %r9
jne 0x4ab3
leaq 0x8(%rdx), %rcx
cmpb $0x0, 0x18(%rdx)
movq 0x20(%rdx), %rdi
movq 0x28(%rdx), %rsi
je 0x4b23
movq %rcx, %rdx
movq %rax, %rcx
jmp 0x2976
movq %rax, %rdx
jmp 0x2976
movq 0x8(%r9), %rax
movq %rax, (%r8)
retq
nop
// File: /workspace/github_c_makefile_star2_O1/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 %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
xorl %eax, %eax
movq %rax, 0x10(%rdi)
movq %rax, 0x30(%rdi)
movl $0x8, %esi
movq %r15, %rdi
callq 0x45fc
testl %eax, %eax
jne 0x4b73
leaq 0x30(%rbx), %r12
movl $0x8, %esi
movq %r12, %rdi
callq 0x45fc
testl %eax, %eax
je 0x4b8d
movl %eax, %r14d
movq (%r15), %rdi
callq 0x1030
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x10(%rbx), %rax
xorl %r14d, %r14d
movq %r14, (%rax)
movl %r14d, (%rbx)
movl $0x1, %eax
movl %eax, 0x8(%rbx)
movq %r14, 0x18(%rbx)
movq 0x30(%rbx), %rcx
movq %r14, (%rcx)
movl %r14d, 0x20(%rbx)
movl %eax, 0x28(%rbx)
movq 0x10(%rbx), %rdi
movl $0x1800, %esi           # imm = 0x1800
callq 0x45fc
testl %eax, %eax
jne 0x4bd8
movq (%r12), %rdi
movl $0x8000, %esi           # imm = 0x8000
callq 0x45fc
testl %eax, %eax
je 0x4b7e
movl %eax, %r14d
movq %rbx, %rdi
callq 0x4be5
jmp 0x4b7e
// File: /workspace/github_c_makefile_star2_O1/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
cmpl $0x0, 0x8(%rdi)
je 0x4c0d
xorl %r14d, %r14d
movq 0x10(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x1030
incq %r14
movl 0x8(%rbx), %eax
cmpq %rax, %r14
jb 0x4bf5
cmpl $0x0, 0x28(%rbx)
je 0x4c2e
xorl %r14d, %r14d
movq 0x30(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x1030
incq %r14
movl 0x28(%rbx), %eax
cmpq %rax, %r14
jb 0x4c16
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_O1/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 0x8(%rdi), %esi
movl %esi, %eax
shll $0x8, %eax
cmpl %eax, (%rdi)
jne 0x4e58
leaq 0x10(%r14), %rdi
incl %esi
shlq $0x3, %rsi
callq 0x4625
testl %eax, %eax
jne 0x4e8b
movl 0x8(%r14), %edi
shlq $0x3, %rdi
addq 0x10(%r14), %rdi
movl $0x1800, %esi           # imm = 0x1800
callq 0x45fc
testl %eax, %eax
jne 0x4e8b
incl 0x8(%r14)
movl (%r14), %eax
movzbl %al, %edx
movq 0x10(%r14), %rcx
shrl $0x8, %eax
movq (%rcx,%rax,8), %rcx
leaq (%rdx,%rdx,2), %rdx
movb $0x0, 0x10(%rcx,%rdx,8)
movups (%r15), %xmm0
movups %xmm0, (%rcx,%rdx,8)
incl (%r14)
xorl %eax, %eax
testq %rbx, %rbx
je 0x4e8b
leaq (%rcx,%rdx,8), %rcx
movq %rcx, (%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x28(%rdi), %esi
movl %esi, %eax
shll $0xa, %eax
cmpl %eax, 0x20(%rdi)
jne 0x4ee3
leaq 0x30(%r14), %rdi
incl %esi
shlq $0x3, %rsi
callq 0x4625
testl %eax, %eax
jne 0x4f20
movl 0x28(%r14), %edi
shlq $0x3, %rdi
addq 0x30(%r14), %rdi
movl $0x8000, %esi           # imm = 0x8000
callq 0x45fc
testl %eax, %eax
jne 0x4f20
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 0x4f20
addq %rcx, %rdx
movq %rdx, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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:
movb $0x1, 0x10(%rsi)
incl 0x4(%rdi)
cmpl $0x0, 0x20(%rdi)
je 0x5466
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
xorl %r15d, %r15d
movl %r15d, %eax
andl $0x3ff, %eax            # imm = 0x3FF
cmpl $0x1, %eax
adcl $0x0, %ebp
movq 0x30(%r14), %rcx
movslq %ebp, %rdx
movq (%rcx,%rdx,8), %rcx
shll $0x5, %eax
cmpq %rbx, 0x8(%rcx,%rax)
jne 0x5453
addq %rax, %rcx
movb $0x1, 0x18(%rcx)
incl 0x24(%r14)
movq (%rcx), %rsi
cmpb $0x0, 0x10(%rsi)
jne 0x5453
movq %r14, %rdi
callq 0x53f2
incl %r15d
cmpl 0x20(%r14), %r15d
jb 0x5414
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/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 0x1d06(%rip), %xmm0     # 0x7180
andpd %xmm1, %xmm0
movsd 0x20(%rsi), %xmm2
ucomisd %xmm2, %xmm0
jbe 0x54cf
pushq %rbx
movq %rdi, %rbx
movapd 0x1e4b(%rip), %xmm3     # 0x72e0
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 0x1e2c(%rip), %xmm1     # 0x72f0
callq 0x1070
movsd %xmm0, 0x10(%rbx)
popq %rbx
retq