// File: /workspace/github_cpp_makefile_star2_O1/richardposner[P]BioNetFit2/src/code/Swarm.cpp
// Function: Swarm::addMutate(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void Swarm::addMutate(std::string mutateString) {
	vector<string> mutComponents;
	split(mutateString, mutComponents);

	// Make sure we have three components to work with
	if (mutComponents.size() == 3) {
		// Make sure first parameter name exists as a free parameter
		if (options.freeParams_.count(mutComponents[0]) > 0 || mutComponents[0] == "default") {
			// Make sure 2nd and 3rd components are numeric
			if (isFloat(mutComponents[1]) && isFloat(mutComponents[2])) {
				if (mutComponents[0] != "default") {
					//cout << "not default" << endl;
					options.freeParams_.at(mutComponents[0])->setMutationRate(stof(mutComponents[1]));
					options.freeParams_.at(mutComponents[0])->setMutationFactor(stof(mutComponents[2]));
					options.freeParams_.at(mutComponents[0])->setHasMutation(true);

					//cout << "setting " << mutComponents[0] << " to " << mutComponents[1] << ":" << mutComponents[2] << endl;
				}
				else {
					for (map<string,FreeParam*>::iterator fp = options.freeParams_.begin(); fp != options.freeParams_.end(); ++fp) {
						//cout << "setting " << mutComponents[0] << " to " << mutComponents[1] << ":" << mutComponents[2] << endl;

						fp->second->setMutationRate(stof(mutComponents[1]));
						fp->second->setMutationFactor(stof(mutComponents[2]));
						fp->second->setHasMutation(true);
					}
				}
			}
			else {
				outputError("Error: Problem parsing the mutation option in your .conf file. The mutation rate and/or factor are non-numeric.");
			}
		}
		else {
			cout << "Warning: We found a mutation option '" << mutComponents[0] << "' in your .conf file, but don't see a matching free parameter specification in your model file. We will ignore this mutation factor." << endl;
		}
	}
	else {
		outputError("Error: Problem parsing a mutation option in your .conf file. Each mutation option requires three components: the parameter name, mutation rate, and mutation factor.");
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
leaq 0x38(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x84680(%rip), %rsi     # 0x10143d
leaq 0x8467a(%rip), %rdx     # 0x10143e
leaq 0x28(%rsp), %rdi
callq 0x32210
movq %rsp, %rsi
leaq 0x28(%rsp), %rdx
movq %r14, %rdi
callq 0xbf342
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x7cdf5
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x229c0
movq (%rsp), %rsi
movq 0x8(%rsp), %rax
subq %rsi, %rax
cmpq $0x60, %rax
jne 0x7d165
leaq 0x1590(%rbx), %r14
movq %r14, %rdi
callq 0x4623c
leaq 0x1598(%rbx), %rcx
movq %rcx, 0x20(%rsp)
cmpq %rcx, %rax
je 0x7cf4e
movq (%rsp), %rax
leaq 0x78(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
addq %rsi, %rdx
leaq 0x68(%rsp), %rdi
callq 0x32180
leaq 0x68(%rsp), %rdi
callq 0xc0224
movl %eax, %r15d
testb %al, %al
je 0x7ce93
movq (%rsp), %rax
leaq 0x58(%rsp), %r13
movq %r13, -0x10(%r13)
movq 0x40(%rax), %rsi
movq 0x48(%rax), %rdx
addq %rsi, %rdx
leaq 0x48(%rsp), %rdi
callq 0x32180
leaq 0x48(%rsp), %rdi
callq 0xc0224
movl %eax, %ebp
jmp 0x7ce95
xorl %ebp, %ebp
testb %r15b, %r15b
je 0x7ceb5
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7ceb5
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0x68(%rsp), %rdi
cmpq %r12, %rdi
je 0x7cecc
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x229c0
testb %bpl, %bpl
je 0x7d19c
movq (%rsp), %rdi
leaq 0x7cb89(%rip), %rsi     # 0xf9a69
callq 0x22250
testl %eax, %eax
je 0x7cfd8
movq (%rsp), %rsi
movq %r14, %rdi
callq 0x31afa
movq (%rax), %r13
movq (%rsp), %rax
movq 0x20(%rax), %rbx
callq 0x22070
movq %rax, %r15
movl (%rax), %ebp
movl $0x0, (%rax)
leaq 0x28(%rsp), %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x22cc0
cmpq %rbx, (%r12)
je 0x7d1d3
movl (%r15), %eax
testl %eax, %eax
je 0x7d0a3
cmpl $0x22, %eax
jne 0x7d0a6
leaq 0x7580d(%rip), %rdi     # 0xf2756
callq 0x22e40
movq (%rsp), %rdi
leaq 0x7cb10(%rip), %rsi     # 0xf9a69
callq 0x22250
testl %eax, %eax
je 0x7ce2f
movq 0xf9023(%rip), %rdi     # 0x175f90
leaq 0x81975(%rip), %rsi     # 0xfe8e9
movl $0x25, %edx
callq 0x22ab0
movq (%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq 0xf9000(%rip), %rdi     # 0x175f90
callq 0x22ab0
movq %rax, %rbx
leaq 0x81970(%rip), %rsi     # 0xfe90f
movl $0x84, %edx
movq %rax, %rdi
callq 0x22ab0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x22940
movsbl %al, %esi
movq %rbx, %rdi
callq 0x22050
movq %rax, %rdi
callq 0x22660
jmp 0x7d11b
movq 0x15a8(%rbx), %rbx
cmpq 0x20(%rsp), %rbx
je 0x7d11b
callq 0x22070
movq %rax, %r14
leaq 0x28(%rsp), %r15
movq 0x40(%rbx), %r13
movq (%rsp), %rax
movq 0x20(%rax), %r12
movl (%r14), %ebp
movl $0x0, (%r14)
movq %r12, %rdi
movq %r15, %rsi
callq 0x22cc0
cmpq %r12, 0x28(%rsp)
je 0x7d135
movl (%r14), %eax
testl %eax, %eax
je 0x7d034
cmpl $0x22, %eax
jne 0x7d037
jmp 0x7d159
movl %ebp, (%r14)
movss %xmm0, 0x40(%r13)
movq 0x40(%rbx), %r13
movq (%rsp), %rax
movq 0x40(%rax), %r12
movl (%r14), %ebp
movl $0x0, (%r14)
movq %r12, %rdi
movq %r15, %rsi
callq 0x22cc0
cmpq %r12, 0x28(%rsp)
je 0x7d141
movl (%r14), %eax
testl %eax, %eax
je 0x7d07a
cmpl $0x22, %eax
jne 0x7d07d
jmp 0x7d14d
movl %ebp, (%r14)
movss %xmm0, 0x44(%r13)
movq 0x40(%rbx), %rax
movb $0x1, 0x50(%rax)
movq %rbx, %rdi
callq 0x22670
movq %rax, %rbx
cmpq 0x20(%rsp), %rax
jne 0x7cff7
jmp 0x7d11b
movl %ebp, (%r15)
movss %xmm0, 0x40(%r13)
movq (%rsp), %rsi
movq %r14, %rdi
callq 0x31afa
movq (%rax), %r13
movq (%rsp), %rax
movq 0x40(%rax), %rbx
movl (%r15), %ebp
movl $0x0, (%r15)
leaq 0x28(%rsp), %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x22cc0
cmpq %rbx, (%r12)
je 0x7d1df
movl (%r15), %eax
testl %eax, %eax
je 0x7d0ff
cmpl $0x22, %eax
jne 0x7d102
leaq 0x7565c(%rip), %rdi     # 0xf2756
callq 0x22e40
movl %ebp, (%r15)
movss %xmm0, 0x44(%r13)
movq (%rsp), %rsi
movq %r14, %rdi
callq 0x31afa
movq (%rax), %rax
movb $0x1, 0x50(%rax)
movq %rsp, %rdi
callq 0x31a9e
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x7561a(%rip), %rdi     # 0xf2756
callq 0x225a0
leaq 0x7560e(%rip), %rdi     # 0xf2756
callq 0x225a0
leaq 0x75602(%rip), %rdi     # 0xf2756
callq 0x22e40
leaq 0x755f6(%rip), %rdi     # 0xf2756
callq 0x22e40
leaq 0x98(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x8181c(%rip), %rsi     # 0xfe994
leaq 0x818b9(%rip), %rdx     # 0xfea38
leaq 0x88(%rsp), %rdi
callq 0x32210
leaq 0x88(%rsp), %rsi
movq %rbx, %rdi
callq 0x78b66
leaq 0xb8(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x816ca(%rip), %rsi     # 0xfe879
leaq 0x81732(%rip), %rdx     # 0xfe8e8
leaq 0xa8(%rsp), %rdi
callq 0x32210
leaq 0xa8(%rsp), %rsi
movq %rbx, %rdi
callq 0x78b66
leaq 0x7557c(%rip), %rdi     # 0xf2756
callq 0x225a0
leaq 0x75570(%rip), %rdi     # 0xf2756
callq 0x225a0
movq %rax, %rbx
movq 0xa8(%rsp), %rdi
cmpq %r14, %rdi
je 0x7d298
movq 0xb8(%rsp), %rsi
jmp 0x7d27b
jmp 0x7d285
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r13, %rdi
je 0x7d26c
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x7d26c
movq %rax, %rbx
movq 0x88(%rsp), %rdi
cmpq %r14, %rdi
je 0x7d298
movq 0x98(%rsp), %rsi
jmp 0x7d27b
jmp 0x7d285
jmp 0x7d245
movq %rax, %rbx
cmpl $0x0, (%r15)
jne 0x7d298
movl %ebp, (%r15)
jmp 0x7d298
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x7d298
movq 0x38(%rsp), %rsi
jmp 0x7d27b
jmp 0x7d285
movq %rax, %rbx
movq 0x68(%rsp), %rdi
cmpq %r12, %rdi
je 0x7d298
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x7d298
movq %rax, %rbx
jmp 0x7d298
jmp 0x7d28c
movq %rax, %rbx
cmpl $0x0, (%r14)
jne 0x7d298
movl %ebp, (%r14)
movq %rsp, %rdi
callq 0x31a9e
movq %rbx, %rdi
callq 0x23240