// File: /workspace/github_cpp_makefile_star2_O3/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 0x30(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x84cf9(%rip), %rsi     # 0x101424
leaq 0x84cf3(%rip), %rdx     # 0x101425
leaq 0x20(%rsp), %rdi
callq 0x321d2
movq %rsp, %rsi
leaq 0x20(%rsp), %rdx
movq %r14, %rdi
callq 0xbea28
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x7c763
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x229c0
movq (%rsp), %rsi
movq 0x8(%rsp), %rax
subq %rsi, %rax
cmpq $0x60, %rax
jne 0x7cacb
leaq 0x1590(%rbx), %r14
movq %r14, %rdi
callq 0x46058
leaq 0x1598(%rbx), %rcx
movq %rcx, 0x40(%rsp)
cmpq %rcx, %rax
je 0x7c8b0
movq (%rsp), %rax
leaq 0x78(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
addq %rsi, %rdx
leaq 0x68(%rsp), %rdi
callq 0x3213c
leaq 0x68(%rsp), %rdi
callq 0xbf8b5
testb %al, %al
je 0x7c815
movq (%rsp), %rax
leaq 0x58(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x40(%rax), %rsi
movq 0x48(%rax), %rdx
addq %rsi, %rdx
leaq 0x48(%rsp), %rdi
callq 0x3213c
leaq 0x48(%rsp), %rdi
callq 0xbf8b5
movl %eax, %ebp
movq 0x48(%rsp), %rdi
cmpq %r12, %rdi
je 0x7c817
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x7c817
xorl %ebp, %ebp
movq 0x68(%rsp), %rdi
cmpq %r15, %rdi
je 0x7c82e
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x229c0
testb %bpl, %bpl
je 0x7cb02
movq (%rsp), %rdi
leaq 0x7d207(%rip), %rsi     # 0xf9a49
callq 0x22250
testl %eax, %eax
je 0x7c93a
movq (%rsp), %rsi
movq %r14, %rdi
callq 0x31a68
movq (%rax), %r13
movq (%rsp), %rax
movq 0x20(%rax), %rbx
callq 0x22070
movq %rax, %r15
movl (%rax), %ebp
movl $0x0, (%rax)
leaq 0x20(%rsp), %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x22cc0
cmpq %rbx, (%r12)
je 0x7cb39
movl (%r15), %eax
testl %eax, %eax
je 0x7ca09
cmpl $0x22, %eax
jne 0x7ca0c
leaq 0x75e8b(%rip), %rdi     # 0xf2736
callq 0x22e40
movq (%rsp), %rdi
leaq 0x7d18e(%rip), %rsi     # 0xf9a49
callq 0x22250
testl %eax, %eax
je 0x7c79d
movq 0xf96d9(%rip), %rdi     # 0x175fa8
leaq 0x82083(%rip), %rsi     # 0xfe959
movl $0x25, %edx
callq 0x22ab0
movq (%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq 0xf96b6(%rip), %rdi     # 0x175fa8
callq 0x22ab0
movq %rax, %rbx
leaq 0x8207e(%rip), %rsi     # 0xfe97f
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 0x7ca81
movq 0x15a8(%rbx), %rbx
cmpq 0x40(%rsp), %rbx
je 0x7ca81
callq 0x22070
movq %rax, %r14
movl (%rax), %r13d
movq 0x40(%rbx), %r15
movq (%rsp), %rax
movq 0x20(%rax), %r12
movl $0x0, (%r14)
movq %r12, %rdi
leaq 0x20(%rsp), %rsi
callq 0x22cc0
cmpq %r12, 0x20(%rsp)
je 0x7ca9b
movl (%r14), %ebp
testl %ebp, %ebp
je 0x7c993
cmpl $0x22, %ebp
jne 0x7c999
jmp 0x7cabf
movl %r13d, (%r14)
movl %r13d, %ebp
movss %xmm0, 0x40(%r15)
movq 0x40(%rbx), %r15
movq (%rsp), %rax
movq 0x40(%rax), %r12
movl $0x0, (%r14)
movq %r12, %rdi
leaq 0x20(%rsp), %rsi
callq 0x22cc0
cmpq %r12, 0x20(%rsp)
je 0x7caa7
movl (%r14), %r13d
testl %r13d, %r13d
je 0x7c9dd
cmpl $0x22, %r13d
jne 0x7c9e3
jmp 0x7cab3
movl %ebp, (%r14)
movl %ebp, %r13d
movss %xmm0, 0x44(%r15)
movq 0x40(%rbx), %rax
movb $0x1, 0x50(%rax)
movq %rbx, %rdi
callq 0x22670
movq %rax, %rbx
cmpq 0x40(%rsp), %rax
jne 0x7c957
jmp 0x7ca81
movl %ebp, (%r15)
movss %xmm0, 0x40(%r13)
movq (%rsp), %rsi
movq %r14, %rdi
callq 0x31a68
movq (%rax), %r13
movq (%rsp), %rax
movq 0x40(%rax), %rbx
movl (%r15), %ebp
movl $0x0, (%r15)
leaq 0x20(%rsp), %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x22cc0
cmpq %rbx, (%r12)
je 0x7cb45
movl (%r15), %eax
testl %eax, %eax
je 0x7ca65
cmpl $0x22, %eax
jne 0x7ca68
leaq 0x75cd6(%rip), %rdi     # 0xf2736
callq 0x22e40
movl %ebp, (%r15)
movss %xmm0, 0x44(%r13)
movq (%rsp), %rsi
movq %r14, %rdi
callq 0x31a68
movq (%rax), %rax
movb $0x1, 0x50(%rax)
movq %rsp, %rdi
callq 0x31a0a
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x75c94(%rip), %rdi     # 0xf2736
callq 0x225a0
leaq 0x75c88(%rip), %rdi     # 0xf2736
callq 0x225a0
leaq 0x75c7c(%rip), %rdi     # 0xf2736
callq 0x22e40
leaq 0x75c70(%rip), %rdi     # 0xf2736
callq 0x22e40
leaq 0x98(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x81f26(%rip), %rsi     # 0xfea04
leaq 0x81fc3(%rip), %rdx     # 0xfeaa8
leaq 0x88(%rsp), %rdi
callq 0x321d2
leaq 0x88(%rsp), %rsi
movq %rbx, %rdi
callq 0x784c2
leaq 0xb8(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x81dd4(%rip), %rsi     # 0xfe8e9
leaq 0x81e3c(%rip), %rdx     # 0xfe958
leaq 0xa8(%rsp), %rdi
callq 0x321d2
leaq 0xa8(%rsp), %rsi
movq %rbx, %rdi
callq 0x784c2
leaq 0x75bf6(%rip), %rdi     # 0xf2736
callq 0x225a0
leaq 0x75bea(%rip), %rdi     # 0xf2736
callq 0x225a0
movq %rax, %rbx
movq 0xa8(%rsp), %rdi
cmpq %r14, %rdi
je 0x7cc0a
movq 0xb8(%rsp), %rsi
jmp 0x7cbe1
jmp 0x7cbeb
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r12, %rdi
je 0x7cbd2
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x7cbd2
movq %rax, %rbx
movq 0x88(%rsp), %rdi
cmpq %r14, %rdi
je 0x7cc0a
movq 0x98(%rsp), %rsi
jmp 0x7cbe1
jmp 0x7cbeb
jmp 0x7cbab
movq %rax, %rbx
cmpl $0x0, (%r15)
jne 0x7cc0a
movl %ebp, (%r15)
jmp 0x7cc0a
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x7cc0a
movq 0x30(%rsp), %rsi
jmp 0x7cbe1
jmp 0x7cbeb
movq %rax, %rbx
movq 0x68(%rsp), %rdi
cmpq %r15, %rdi
je 0x7cc0a
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x7cc0a
movq %rax, %rbx
jmp 0x7cc0a
movq %rax, %rbx
cmpl $0x0, (%r14)
jne 0x7cc0a
movl %r13d, (%r14)
jmp 0x7cc0a
movq %rax, %rbx
cmpl $0x0, (%r14)
jne 0x7cc0a
movl %ebp, (%r14)
movq %rsp, %rdi
callq 0x31a0a
movq %rbx, %rdi
callq 0x23240