// File: /workspace/github_cpp_makefile_star2_O1/richardposner[P]BioNetFit2/src/code/Swarm.cpp
// Function: Swarm::mutateParamGA[abi:cxx11](FreeParam*, double)
string Swarm::mutateParamGA(FreeParam* fp, double paramValue) {
	//Timer tmr;
	//uniform_real_distribution<double> unif(0,1);
	if(options.verbosity>=3){
		cout << "generating random dist" << endl;
	}
	boost::random::uniform_real_distribution<double> unif(0,1);
	if(options.verbosity>=3){
		cout << "done" << endl;
	}
	// Generate a random number and see if it's less than our mutation rate.  If is, we mutate.
	if (unif(generalRand) < fp->getMutationRate()) {
		// Store our mutation factor
		if(options.verbosity>=3){
			cout << "setting maxrange" << endl;
		}
		float maxChange = abs(paramValue) * fp->getMutationFactor();
		if(options.verbosity>=3){
			cout << "done" << endl;
		}
		// Generate a new distribution between 0 and double maxChange
		//using param_t = uniform_real_distribution<>::param_type;
		//param_t p{0.0, maxChange * 2};
		//unif.param(p);

		boost::random::uniform_real_distribution<double> unif(0.0, maxChange * 2);

		// Ger our new random number between 0 and maxChange, subtract maxChange.
		double change = unif(generalRand) - maxChange;

		// Add/subtract the value from the parameter
		paramValue+= change;
		//cout << "factor: " << fp->getMutationFactor() << " max change: " << maxChange << " rand: " << rand << endl << endl;
	}
	//double t = tmr.elapsed();
	//cout << "Mutate took " << t << " seconds" << endl;
	return toString(paramValue);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movapd %xmm0, 0x10(%rsp)
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
cmpl $0x3, 0x1614(%rsi)
jb 0x9c784
movq 0xd9848(%rip), %r12     # 0x175f90
leaq 0x63eb8(%rip), %rsi     # 0x100607
movl $0x16, %edx
movq %r12, %rdi
callq 0x22ab0
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x22940
movsbl %al, %esi
movq %r12, %rdi
callq 0x22050
movq %rax, %rdi
callq 0x22660
cmpl $0x3, 0x1614(%r14)
jb 0x9c7d1
movq 0xd97fb(%rip), %r12     # 0x175f90
leaq 0x5eff8(%rip), %rsi     # 0xfb794
movl $0x4, %edx
movq %r12, %rdi
callq 0x22ab0
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x22940
movsbl %al, %esi
movq %r12, %rdi
callq 0x22050
movq %rax, %rdi
callq 0x22660
leaq 0x58(%r14), %r12
movsd 0x5bb33(%rip), %xmm1    # 0xf8310
xorpd %xmm0, %xmm0
movq %r12, %rdi
callq 0xb093a
xorps %xmm1, %xmm1
cvtss2sd 0x40(%r15), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x9c8fe
cmpl $0x3, 0x1614(%r14)
jb 0x9c849
movq 0xd9783(%rip), %r13     # 0x175f90
leaq 0x63e0a(%rip), %rsi     # 0x10061e
movl $0x10, %edx
movq %r13, %rdi
callq 0x22ab0
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x22940
movsbl %al, %esi
movq %r13, %rdi
callq 0x22050
movq %rax, %rdi
callq 0x22660
movapd 0x5b44f(%rip), %xmm0    # 0xf7ca0
andpd 0x10(%rsp), %xmm0
xorps %xmm1, %xmm1
cvtss2sd 0x44(%r15), %xmm1
mulsd %xmm0, %xmm1
xorps %xmm0, %xmm0
cvtsd2ss %xmm1, %xmm0
cmpl $0x3, 0x1614(%r14)
movss %xmm0, 0xc(%rsp)
jb 0x9c8c3
movq 0xd970e(%rip), %r14     # 0x175f90
leaq 0x5ef0b(%rip), %rsi     # 0xfb794
movl $0x4, %edx
movq %r14, %rdi
callq 0x22ab0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x22940
movsbl %al, %esi
movq %r14, %rdi
callq 0x22050
movq %rax, %rdi
callq 0x22660
movss 0xc(%rsp), %xmm0
addss %xmm0, %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x9c91d
xorps %xmm1, %xmm1
cvtss2sd %xmm0, %xmm1
xorps %xmm0, %xmm0
movq %r12, %rdi
callq 0xb093a
xorps %xmm1, %xmm1
cvtss2sd 0xc(%rsp), %xmm1
subsd %xmm1, %xmm0
movapd 0x10(%rsp), %xmm1
addsd %xmm0, %xmm1
movapd %xmm1, %xmm0
jmp 0x9c904
movapd 0x10(%rsp), %xmm0
movq %rbx, %rdi
callq 0xc0446
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x65774(%rip), %rdi     # 0x102098
leaq 0x6577f(%rip), %rsi     # 0x1020aa
leaq 0x657b0(%rip), %rcx     # 0x1020e2
movl $0x9f, %edx
callq 0x22610