// File: /workspace/github_c_makefile_star2_O0/kernfel[P]fNEAT/cppn.c
// Function: mutate_CPPN
int mutate_CPPN( CPPN *net, struct NEAT_Params *params, Node_Innovation *ni, Link_Innovation *li ) {
	int i, j, err=0;
	
	// Mutate (perturb or re-randomise) link weights
	if ( params->mutate_weights_prob * RAND_MAX > rand() ) {
		double k_pert = params->perturb_weights_range*2/RAND_MAX;
		double k_rand = params->random_weights_range*2/RAND_MAX;
		for ( i=0; i<net->num_links; i++ ) {
			double p = rand() / RAND_MAX;
			if ( params->perturb_weights_proportion > p )
				net->links[i].weight += k_pert*rand() - params->perturb_weights_range;
			else if ( params->reassign_weights_proportion > 1-p )
				net->links[i].weight = k_rand*rand() - params->random_weights_range;
		}
	}
	
	// Toggle link disable
	if ( params->enable_link_prob * RAND_MAX > rand() ) {
		int n_dis=0;
		for ( i=0; i<net->num_links; i++ )
			if ( net->links[i].is_disabled )
				n_dis++;
		if ( n_dis ) {
			n_dis = rand() % n_dis;
			for ( i=0; i<net->num_links; i++ ) {
				if ( net->links[i].is_disabled ) {
					if ( ! (n_dis--) ) {
						net->links[i].is_disabled = 0;
						break;
					}
				}
			}
		}
	}
	if ( params->disable_link_prob * RAND_MAX > rand() ) {
		int n_en=0;
		for ( i=0; i<net->num_links; i++ )
			if ( ! net->links[i].is_disabled )
				n_en++;
		if ( n_en ) {
			n_en = rand() % n_en;
			for ( i=0; i<net->num_links; i++ ) {
				if ( ! net->links[i].is_disabled ) {
					if ( ! (n_en--) ) {
						net->links[i].is_disabled = 1;
						break;
					}
				}
			}
		}
	}
	
	// Add a node
	if ( params->add_node_prob * RAND_MAX > rand() ) {
		// Determine the link to split
		int link_id = rand() % net->num_links;
		
		// id of the new node
		int node_id = net->num_inputs + net->num_outputs + net->num_hidden;
		
		// Disable the existing link
		net->links[link_id].is_disabled = 1;

		// Create a new, random-function node
		if (( err = Realloc( net->nodes, (node_id+1)*sizeof *net->nodes ) ))
			return err;
		net->nodes[node_id].func = params->allowed_funcs[ rand() % params->num_allowed_funcs ];
		net->num_hidden++;
		
		// Link it along the old link's route
		// Into the new node, with weight=1, and out of the new node, with inherited weight
		// Note, net->num_links will be updated within CPPN_insert_link.
		// Todo: Tidy clean-up
		if (( err = CPPN_insert_link( net, params, net->links[link_id].from, node_id, 1.0, 0, 0 ) ))
			return err;
		if (( err = CPPN_insert_link( net, params, node_id, net->links[link_id].to, net->links[link_id].weight, 0, 0 ) ))
			return err;
		
		// Provide details about the mutation
		if ( ni ) {
			ni->replaced_link = net->links[link_id].innov_id;
			ni->link_in = params->innov_counter-1;
			ni->link_out = params->innov_counter;
		}
	}
	
	// Add a link
	if ( params->add_link_prob * RAND_MAX > rand() ) {
		int	target_id = rand() % (net->num_outputs+net->num_hidden) + net->num_inputs,
			num_possible_sources = net->num_inputs+net->num_hidden+net->num_outputs,
			possible_sources[num_possible_sources],
			source_id;
		
		for ( i=0; i<num_possible_sources; i++ )
			possible_sources[i] = 1;
		
		// Exclude existing links
		for ( i=0; i<net->num_links; i++ ) {
			if ( net->links[i].to == target_id ) {
				possible_sources[net->links[i].from] = 0;
				num_possible_sources--;
			}
		}
		
		// Exclude recurrent links
		if ( !(params->flags & CFL_ALLOW_RECURRENCE) )
			num_possible_sources -= CPPN_exclude_recurrent_links( net, params, target_id, possible_sources );
		
		// Exclude output to hidden
		if ( !(params->flags & CFL_ALLOW_OUTPUT_TO_HIDDEN) && target_id >= net->num_inputs+net->num_outputs ) {
			for ( i=net->num_inputs; i<net->num_inputs+net->num_outputs; i++ ) {
				num_possible_sources -= possible_sources[i];
				possible_sources[i] = 0;
			}
		
		// Exclude output-to-output links
		} else if ( !(params->flags & CFL_ALLOW_OUTPUT_TO_OUTPUT) && target_id < net->num_inputs+net->num_outputs ) {
			int skip_self = params->flags & CFL_ALLOW_RECURRENCE && params->flags & CFL_ALLOW_OUTPUT_TO_SELF;
			for ( i=net->num_inputs; i<net->num_inputs+net->num_outputs; i++ ) {
				if ( skip_self && i == target_id )
					continue;
				num_possible_sources -= possible_sources[i];
				possible_sources[i] = 0;
			}
		}
		
		// Determine source node and add link
		if ( num_possible_sources ) {
			j = rand() % num_possible_sources + 1;
			// Find the j:th blip in a sparse array
			for ( source_id=0; j; source_id++ ) {
				j -= possible_sources[source_id];
			}
			source_id--; // To correct for that last ++ before loop exit
			
			if (( err = CPPN_insert_link(
				net,
				params,
				source_id,
				target_id,
				2*params->random_weights_range*rand()/RAND_MAX - params->random_weights_range,
				0,
				0
			) ))
				return err;
		
			// Provide details about the mutation
			if ( li ) {
				li->innov_id = params->innov_counter;
				li->type = 0x00;
				li->from = source_id;
				li->to = target_id;
				if ( source_id >= net->num_inputs ) {
					li->type |= 0x01;
					int oldest_link = li->innov_id;
					for ( i=0; i<net->num_links; i++) {
						if (( net->links[i].to == source_id || net->links[i].from == source_id ) \
						  && net->links[i].innov_id < oldest_link )
							oldest_link = net->links[i].innov_id;
					}
					li->from = oldest_link;
				}
				if ( target_id >= net->num_inputs+net->num_outputs ) {
					li->type |= 0x10;
					int oldest_link = li->innov_id;
					for ( i=0; i<net->num_links; i++) {
						if (( net->links[i].to == target_id || net->links[i].from == target_id ) \
						  && net->links[i].innov_id < oldest_link )
							oldest_link = net->links[i].innov_id;
					}
					li->to = oldest_link;
				}
			}
		}
	}
	
	return err;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x100, %rsp            # imm = 0x100
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movl $0x0, -0x34(%rbp)
movq -0x18(%rbp), %rax
movsd 0x7cb2(%rip), %xmm0     # 0xa190
mulsd 0xe0(%rax), %xmm0
movsd %xmm0, -0x98(%rbp)
callq 0x11b0
movsd -0x98(%rbp), %xmm0
cvtsi2sd %eax, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x2692
movq -0x18(%rbp), %rax
movsd 0x7b7b(%rip), %xmm0     # 0xa090
mulsd 0xf0(%rax), %xmm0
movsd 0x7c6b(%rip), %xmm1     # 0xa190
divsd %xmm1, %xmm0
movsd %xmm0, -0x40(%rbp)
movq -0x18(%rbp), %rax
movsd 0x7b56(%rip), %xmm0     # 0xa090
mulsd 0x100(%rax), %xmm0
movsd 0x7c46(%rip), %xmm1     # 0xa190
divsd %xmm1, %xmm0
movsd %xmm0, -0x48(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x20(%rcx), %eax
jge 0x2690
callq 0x11b0
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cltd
idivl %ecx
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0x50(%rbp)
movq -0x18(%rbp), %rax
movsd 0xe8(%rax), %xmm0
ucomisd -0x50(%rbp), %xmm0
jbe 0x25fe
movsd -0x40(%rbp), %xmm0
movsd %xmm0, -0xa0(%rbp)
callq 0x11b0
movsd -0xa0(%rbp), %xmm0
cvtsi2sd %eax, %xmm2
movq -0x18(%rbp), %rax
movsd 0xf0(%rax), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x2c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
addsd 0x10(%rax), %xmm0
movsd %xmm0, 0x10(%rax)
jmp 0x2680
movq -0x18(%rbp), %rax
movsd 0xf8(%rax), %xmm0
movsd 0x7a56(%rip), %xmm1     # 0xa068
subsd -0x50(%rbp), %xmm1
ucomisd %xmm1, %xmm0
jbe 0x267e
movsd -0x48(%rbp), %xmm0
movsd %xmm0, -0xa8(%rbp)
callq 0x11b0
movsd -0xa8(%rbp), %xmm0
cvtsi2sd %eax, %xmm2
movq -0x18(%rbp), %rax
movsd 0x100(%rax), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x2c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movsd %xmm0, 0x10(%rax)
jmp 0x2680
jmp 0x2682
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x255a
jmp 0x2692
movq -0x18(%rbp), %rax
movsd 0x7af2(%rip), %xmm0     # 0xa190
mulsd 0xc0(%rax), %xmm0
movsd %xmm0, -0xb0(%rbp)
callq 0x11b0
movsd -0xb0(%rbp), %xmm0
cvtsi2sd %eax, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x278f
movl $0x0, -0x54(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x20(%rcx), %eax
jge 0x2712
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x2c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
cmpl $0x0, 0x18(%rax)
je 0x2705
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x2707
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x26d7
cmpl $0x0, -0x54(%rbp)
je 0x278d
callq 0x11b0
cltd
idivl -0x54(%rbp)
movl %edx, -0x54(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x20(%rcx), %eax
jge 0x278b
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x2c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
cmpl $0x0, 0x18(%rax)
je 0x277e
movl -0x54(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x54(%rbp)
cmpl $0x0, %eax
jne 0x277c
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x2c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movl $0x0, 0x18(%rax)
jmp 0x278b
jmp 0x277e
jmp 0x2780
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x272b
jmp 0x278d
jmp 0x278f
movq -0x18(%rbp), %rax
movsd 0x79f5(%rip), %xmm0     # 0xa190
mulsd 0xc8(%rax), %xmm0
movsd %xmm0, -0xb8(%rbp)
callq 0x11b0
movsd -0xb8(%rbp), %xmm0
cvtsi2sd %eax, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x288c
movl $0x0, -0x58(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x20(%rcx), %eax
jge 0x280f
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x2c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
cmpl $0x0, 0x18(%rax)
jne 0x2802
movl -0x58(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x58(%rbp)
jmp 0x2804
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x27d4
cmpl $0x0, -0x58(%rbp)
je 0x288a
callq 0x11b0
cltd
idivl -0x58(%rbp)
movl %edx, -0x58(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x20(%rcx), %eax
jge 0x2888
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x2c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
cmpl $0x0, 0x18(%rax)
jne 0x287b
movl -0x58(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x58(%rbp)
cmpl $0x0, %eax
jne 0x2879
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x2c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movl $0x1, 0x18(%rax)
jmp 0x2888
jmp 0x287b
jmp 0x287d
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x2828
jmp 0x288a
jmp 0x288c
movq -0x18(%rbp), %rax
movsd 0x78f8(%rip), %xmm0     # 0xa190
mulsd 0xb8(%rax), %xmm0
movsd %xmm0, -0xc0(%rbp)
callq 0x11b0
movsd -0xc0(%rbp), %xmm0
cvtsi2sd %eax, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x2a5f
callq 0x11b0
movq -0x10(%rbp), %rcx
cltd
idivl 0x20(%rcx)
movl %edx, -0x5c(%rbp)
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x10(%rbp), %rcx
addl 0xc(%rcx), %eax
movq -0x10(%rbp), %rcx
addl 0x10(%rcx), %eax
movl %eax, -0x60(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x5c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movl $0x1, 0x18(%rax)
movq -0x10(%rbp), %rdi
movl -0x60(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rsi
shlq $0x4, %rsi
callq 0x63c0
movl %eax, -0x34(%rbp)
cmpl $0x0, %eax
je 0x292e
movl -0x34(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x2ff5
movq -0x18(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0xc8(%rbp)
callq 0x11b0
movq -0x18(%rbp), %rcx
cltd
idivl 0x48(%rcx)
movq -0xc8(%rbp), %rax
movslq %edx, %rcx
movl (%rax,%rcx,4), %ecx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movslq -0x60(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
movl 0x10(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x10(%rax)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x5c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x4(%rax), %edx
movl -0x60(%rbp), %ecx
movsd 0x76c7(%rip), %xmm0     # 0xa068
xorl %r9d, %r9d
movl %r9d, %r8d
callq 0x3000
movl %eax, -0x34(%rbp)
cmpl $0x0, %eax
je 0x29bf
movl -0x34(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x2ff5
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x60(%rbp), %edx
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x5c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x8(%rax), %ecx
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x5c(%rbp), %r8
shlq $0x5, %r8
addq %r8, %rax
movsd 0x10(%rax), %xmm0
xorl %r9d, %r9d
movl %r9d, %r8d
callq 0x3000
movl %eax, -0x34(%rbp)
cmpl $0x0, %eax
je 0x2a16
movl -0x34(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x2ff5
cmpq $0x0, -0x20(%rbp)
je 0x2a5d
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x5c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movl (%rax), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
movl 0x108(%rax), %ecx
subl $0x1, %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x18(%rbp), %rax
movl 0x108(%rax), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x8(%rax)
jmp 0x2a5f
movq -0x18(%rbp), %rax
movsd 0x7725(%rip), %xmm0     # 0xa190
mulsd 0xb0(%rax), %xmm0
movsd %xmm0, -0xd0(%rbp)
callq 0x11b0
movsd -0xd0(%rbp), %xmm0
cvtsi2sd %eax, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x2fef
callq 0x11b0
movq -0x10(%rbp), %rdx
movl 0x8(%rdx), %ecx
movl %ecx, -0xdc(%rbp)
movl 0xc(%rdx), %ecx
movl 0x10(%rdx), %edx
addl %edx, %ecx
cltd
idivl %ecx
movl -0xdc(%rbp), %eax
addl %eax, %edx
movl %edx, -0x64(%rbp)
movq -0x10(%rbp), %rcx
movl 0x10(%rcx), %edx
movl 0x8(%rcx), %eax
movl 0xc(%rcx), %ecx
addl %edx, %eax
addl %ecx, %eax
movl %eax, -0x68(%rbp)
movl -0x68(%rbp), %eax
movq %rsp, %rcx
movq %rcx, -0x70(%rbp)
leaq 0xf(,%rax,4), %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0xd8(%rbp)
movq %rcx, %rsp
movq %rax, -0x78(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x68(%rbp), %eax
jge 0x2b28
movq -0xd8(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movl $0x1, (%rax,%rcx,4)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x2b03
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x20(%rcx), %eax
jge 0x2b91
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x2c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
cmpl -0x64(%rbp), %eax
jne 0x2b84
movq -0xd8(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rcx
movslq -0x2c(%rbp), %rdx
shlq $0x5, %rdx
addq %rdx, %rcx
movslq 0x4(%rcx), %rcx
movl $0x0, (%rax,%rcx,4)
movl -0x68(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x68(%rbp)
jmp 0x2b86
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x2b2f
movq -0x18(%rbp), %rax
movl (%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
jne 0x2bc0
movq -0xd8(%rbp), %rcx
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x64(%rbp), %edx
callq 0x3150
movl %eax, %ecx
movl -0x68(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x68(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
jne 0x2c33
movl -0x64(%rbp), %eax
movq -0x10(%rbp), %rcx
movl 0x8(%rcx), %ecx
movq -0x10(%rbp), %rdx
addl 0xc(%rdx), %ecx
cmpl %ecx, %eax
jl 0x2c33
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x10(%rbp), %rcx
movl 0x8(%rcx), %ecx
movq -0x10(%rbp), %rdx
addl 0xc(%rdx), %ecx
cmpl %ecx, %eax
jge 0x2c2e
movq -0xd8(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movl (%rax,%rcx,4), %edx
movl -0x68(%rbp), %ecx
subl %edx, %ecx
movl %ecx, -0x68(%rbp)
movslq -0x2c(%rbp), %rcx
movl $0x0, (%rax,%rcx,4)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x2bed
jmp 0x2cf6
movq -0x18(%rbp), %rax
movl (%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
jne 0x2cf4
movl -0x64(%rbp), %eax
movq -0x10(%rbp), %rcx
movl 0x8(%rcx), %ecx
movq -0x10(%rbp), %rdx
addl 0xc(%rdx), %ecx
cmpl %ecx, %eax
jge 0x2cf4
movq -0x18(%rbp), %rax
movl (%rax), %ecx
andl $0x8, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0xdd(%rbp)
je 0x2c89
movq -0x18(%rbp), %rax
movl (%rax), %eax
andl $0x40, %eax
cmpl $0x0, %eax
setne %al
movb %al, -0xdd(%rbp)
movb -0xdd(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x80(%rbp)
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x10(%rbp), %rcx
movl 0x8(%rcx), %ecx
movq -0x10(%rbp), %rdx
addl 0xc(%rdx), %ecx
cmpl %ecx, %eax
jge 0x2cf2
cmpl $0x0, -0x80(%rbp)
je 0x2cc6
movl -0x2c(%rbp), %eax
cmpl -0x64(%rbp), %eax
jne 0x2cc6
jmp 0x2ce7
movq -0xd8(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movl (%rax,%rcx,4), %edx
movl -0x68(%rbp), %ecx
subl %edx, %ecx
movl %ecx, -0x68(%rbp)
movslq -0x2c(%rbp), %rcx
movl $0x0, (%rax,%rcx,4)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x2ca1
jmp 0x2cf4
jmp 0x2cf6
cmpl $0x0, -0x68(%rbp)
je 0x2fce
callq 0x11b0
cltd
idivl -0x68(%rbp)
addl $0x1, %edx
movl %edx, -0x30(%rbp)
movl $0x0, -0x7c(%rbp)
cmpl $0x0, -0x30(%rbp)
je 0x2d3d
movq -0xd8(%rbp), %rax
movslq -0x7c(%rbp), %rcx
movl (%rax,%rcx,4), %ecx
movl -0x30(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x30(%rbp)
movl -0x7c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x7c(%rbp)
jmp 0x2d16
movl -0x7c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x7c(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xf8(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0xf0(%rbp)
movl -0x7c(%rbp), %eax
movl %eax, -0xe8(%rbp)
movl -0x64(%rbp), %eax
movl %eax, -0xe4(%rbp)
movq -0x18(%rbp), %rax
movsd 0x7316(%rip), %xmm0     # 0xa090
mulsd 0x100(%rax), %xmm0
movsd %xmm0, -0x100(%rbp)
callq 0x11b0
movsd -0x100(%rbp), %xmm0
movq -0xf8(%rbp), %rdi
movq -0xf0(%rbp), %rsi
movl -0xe8(%rbp), %edx
movl -0xe4(%rbp), %ecx
cvtsi2sd %eax, %xmm1
mulsd %xmm1, %xmm0
movsd 0x73cf(%rip), %xmm1     # 0xa190
divsd %xmm1, %xmm0
movq -0x18(%rbp), %rax
subsd 0x100(%rax), %xmm0
xorl %r9d, %r9d
movl %r9d, %r8d
callq 0x3000
movl %eax, -0x34(%rbp)
cmpl $0x0, %eax
je 0x2df9
movl -0x34(%rbp), %eax
movl %eax, -0x4(%rbp)
movl $0x1, -0x84(%rbp)
jmp 0x2fd8
cmpq $0x0, -0x28(%rbp)
je 0x2fcc
movq -0x18(%rbp), %rax
movl 0x108(%rax), %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movq -0x28(%rbp), %rax
movl $0x0, 0x4(%rax)
movl -0x7c(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x8(%rax)
movl -0x64(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0xc(%rax)
movl -0x7c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jl 0x2efa
movq -0x28(%rbp), %rax
movl 0x4(%rax), %ecx
orl $0x1, %ecx
movl %ecx, 0x4(%rax)
movq -0x28(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x88(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x20(%rcx), %eax
jge 0x2eed
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x2c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
cmpl -0x7c(%rbp), %eax
je 0x2ea5
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x2c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
cmpl -0x7c(%rbp), %eax
jne 0x2edd
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x2c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movl (%rax), %eax
cmpl -0x88(%rbp), %eax
jae 0x2edd
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x2c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, -0x88(%rbp)
jmp 0x2edf
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x2e63
movl -0x88(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x8(%rax)
movl -0x64(%rbp), %eax
movq -0x10(%rbp), %rcx
movl 0x8(%rcx), %ecx
movq -0x10(%rbp), %rdx
addl 0xc(%rdx), %ecx
cmpl %ecx, %eax
jl 0x2fca
movq -0x28(%rbp), %rax
movl 0x4(%rax), %ecx
orl $0x10, %ecx
movl %ecx, 0x4(%rax)
movq -0x28(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x8c(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x20(%rcx), %eax
jge 0x2fbd
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x2c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
cmpl -0x64(%rbp), %eax
je 0x2f75
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x2c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
cmpl -0x64(%rbp), %eax
jne 0x2fad
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x2c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movl (%rax), %eax
cmpl -0x8c(%rbp), %eax
jae 0x2fad
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x2c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, -0x8c(%rbp)
jmp 0x2faf
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x2f33
movl -0x8c(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0xc(%rax)
jmp 0x2fcc
jmp 0x2fce
movl $0x0, -0x84(%rbp)
movq -0x70(%rbp), %rax
movq %rax, %rsp
movl -0x84(%rbp), %eax
testl %eax, %eax
je 0x2fed
jmp 0x2feb
jmp 0x2ff5
jmp 0x2fef
movl -0x34(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
movq %rbp, %rsp
popq %rbp
retq
nopl (%rax)