// File: /workspace/github_cpp_makefile_star2_O1/richardposner[P]BioNetFit2/src/code/Model.cpp
// Function: Model::parseModel()
void Model::parseModel() {
	string line;
	ifstream modelFile(modelPath_);
	vector<string> model_vector;

	if (modelFile.is_open()) {
		while (getline(modelFile, line)) {
			string line_with_newline = line + "\n";
			model_vector.push_back(line_with_newline);
		}
	}
	else {
		swarm_->outputError("Error: Couldn't open model file " + modelPath_ + " for parsing.");
	}
	modelFile.close();

	// Find any line-continuation backslashes and merge the lines together
	for (unsigned i = 0 ; i < model_vector.size(); i++) {
		int j = 0;
		while(1) {
			if (boost::regex_search(model_vector[i-j],boost::regex("\\\\"))) {
				model_vector[i-j] = boost::regex_replace(model_vector[i-j],boost::regex("\\\\\\W*"),string(""));
				model_vector[i-j] = model_vector[i-j] + model_vector[i+1];
				model_vector[i-j] = boost::regex_replace(model_vector[i-j],boost::regex("\\s*"),string(""));
				if (!boost::regex_search(model_vector[i-j],boost::regex("\\\\"))) {
					fullContents_.push_back(model_vector[i-j]);
				}
				i++;
				j++;
				if (!boost::regex_search(model_vector[i-j],boost::regex("\\\\"))) {
					break;
				}
			}
			else {
				break;
			}
		}
		if (j == 0){
			fullContents_.push_back(model_vector[i]);
		}
	}

	// Go through the model and store important things
	boost::smatch smatches;

	for (vector<string>::iterator i = fullContents_.begin(); i != fullContents_.end(); ++i) {
		if (boost::regex_search(*i, boost::regex("^\\s*simulate|^\\s*simulate_nf|^\\s*simulate_ode|^\\s*simulate_ssa|^\\s*simulate_pla|^\\s*parameter_scan"))) {
			action newAction;
			string prefix;
			bool isParScan = 0;

			// If the action is a normal "simulate", find the method in the arguments and store it
			if (boost::regex_search(*i, smatches, boost::regex("^\\s*simulate\\(\\{.*method=>(\"|')(\\w{2,3})(\"|')"))) {
				newAction.type = smatches[2];
			}
			// If we the action command is simulate_xx, store the sim type
			else if (boost::regex_search(*i, smatches, boost::regex("^\\s*simulate_(\\w{2})\\(\\{"))) {
				newAction.type = smatches[1];
			}
			// If we found a parameter_scan command, store the type, scan parameter, and t_end
			else if (boost::regex_search(*i, smatches, boost::regex("^\\s*parameter_scan\\(\\{.*method=>(\"|')(\\w{2,3})(\"|')"))) {
				isParScan = 1;
				newAction.type = smatches[2];

				if (boost::regex_search(*i, smatches, boost::regex("parameter=>('|\")(\\w+)('|\")"))) {
					newAction.scanParam = smatches[2];
				}
				if (boost::regex_search(*i, smatches, boost::regex("par_max=>(\\w+)"))) {
					newAction.t_end = atof(smatches[1].str().c_str());
				}
				if (boost::regex_search(*i, smatches, boost::regex("par_scan_vals=>\\[(.+)\\]"))) {
					vector<string> values;
					split(smatches[1].str(), values, ",");
					newAction.t_end = atof(values.back().c_str());
				}
			}

			// Remove any suffixes from the command
			*i = boost::regex_replace(*i,boost::regex(",\\s*suffix=>('|\")\\w+('|\")"), string(""));

			// Find any prefixes and store them
			if (boost::regex_search(*i, smatches, boost::regex("prefix=>('|\")(\\w+)('|\")"))) {
				prefix = smatches[2];
			}

			// If we find a non parameter_scan action, store the t_end value
			if (boost::regex_search(*i, smatches, boost::regex("t_end=>(\\w+)")) && !isParScan) {
				newAction.t_end = atof(smatches[1].str().c_str());
			}

			newAction.full = *i;
			if (!prefix.empty()) {
				actions.insert(pair<string, action>(prefix, newAction));
			}
		}
		// Save any free parameters
		else if (boost::regex_search(*i, smatches, boost::regex("(\\s+|=\\s*)(\\w+)__FREE__"))) {
			FreeParam * fp = new FreeParam(smatches[2]);
			freeParams_.insert(pair<string,FreeParam*>(smatches[2],fp));
			if(swarm_->options.verbosity >= 3) cout<<"Free param:" <<smatches[2] << "is added to the model:" << this->getName() <<endl;
		}
		// Make sure we know if we need to do network generation
		else if (boost::regex_search(*i, smatches, boost::regex("^\\s*generate_network"))) {
			hasGenerateNetwork_ = true;
		}
	}

	if (actions.size() == 0) {
		swarm_->outputError("Error: We didn't find any action commands containing prefixes in your model file. Your model must contain an action command that uses a prefix which corresponds to the name of the .exp file to be fit to the data generated by that action command.");
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x4d8, %rsp            # imm = 0x4D8
movq %rdi, %r15
leaq 0x1b0(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x68(%rdi), %r14
leaq 0x2d0(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
movl $0x8, %edx
callq 0x23070
xorps %xmm0, %xmm0
movaps %xmm0, 0x90(%rsp)
movq $0x0, 0xa0(%rsp)
leaq 0x348(%rsp), %rdi
callq 0x221e0
testb %al, %al
movq %r15, 0xb8(%rsp)
je 0x4d7c3
leaq 0x10(%rsp), %rbp
leaq 0x1a0(%rsp), %r14
movq %rsp, %r15
leaq 0xab422(%rip), %r12     # 0xf8b54
leaq 0x90(%rsp), %r13
movq 0x2d0(%rsp), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x22940
movsbl %al, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x23300
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x4d87e
movq %rbp, (%rsp)
movq 0x1a0(%rsp), %rsi
movq 0x1a8(%rsp), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x32180
movq %r15, %rdi
movq %r12, %rsi
callq 0x233b0
movq %r13, %rdi
movq %r15, %rsi
callq 0x31d52
movq (%rsp), %rdi
cmpq %rbp, %rdi
je 0x4d73a
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x4d73a
movq 0x60(%r15), %rbx
leaq 0xaa4f4(%rip), %rsi     # 0xf7cc2
movq %rsp, %rdi
movq %r14, %rdx
callq 0x319d8
leaq 0xa3d22(%rip), %rsi     # 0xf1502
movq %rsp, %rdi
callq 0x233b0
leaq 0x250(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x4d818
movq %rdx, 0x240(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x250(%rsp)
jmp 0x4d81f
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
leaq 0x240(%rsp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %rbx, %rdi
callq 0x78b66
movq 0x240(%rsp), %rdi
cmpq %r15, %rdi
je 0x4d863
movq 0x250(%rsp), %rsi
incq %rsi
callq 0x229c0
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4d87e
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x229c0
leaq 0x2d0(%rsp), %rdi
callq 0x221b0
movq 0x98(%rsp), %rax
cmpq 0x90(%rsp), %rax
je 0x4dbfe
movq 0xb8(%rsp), %rax
addq $0x88, %rax
movq %rax, 0x128(%rsp)
xorl %ebp, %ebp
movq %rsp, %r12
leaq 0x130(%rsp), %r13
movl %ebp, %ebp
movq %rbp, 0xc0(%rsp)
shlq $0x5, %rbp
xorl %eax, %eax
movq %rax, 0xb0(%rsp)
movq 0x90(%rsp), %r14
movq %r12, %rdi
leaq 0xaa3f5(%rip), %rsi     # 0xf7ce3
xorl %edx, %edx
callq 0x31902
movq (%r14,%rbp), %rdi
movq 0x8(%r14,%rbp), %rsi
addq %rdi, %rsi
movq %r12, %rdx
xorl %ecx, %ecx
callq 0x47067
movl %eax, %r14d
leaq 0x8(%rsp), %rdi
callq 0x322a0
testb %r14b, %r14b
je 0x4dbae
movq 0x90(%rsp), %r14
addq %rbp, %r14
movq %r13, %rdi
leaq 0xaa3b0(%rip), %rsi     # 0xf7ce6
xorl %edx, %edx
callq 0x31902
leaq 0x210(%rsp), %rax
movq %rax, 0x200(%rsp)
leaq 0x200(%rsp), %rbx
movq %rbx, %rdi
leaq 0xa9362(%rip), %rdx     # 0xf6cc1
movq %rdx, %rsi
callq 0x32210
movq %r12, %r15
movq %r12, %rdi
movq %r14, %rsi
movq %r13, %rdx
movq %rbx, %rcx
xorl %r8d, %r8d
callq 0x4a2c9
movq 0x90(%rsp), %rdi
addq %rbp, %rdi
movq %r15, %rsi
callq 0x22bb0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x4d9ac
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0x200(%rsp), %rdi
leaq 0x210(%rsp), %rax
cmpq %rax, %rdi
je 0x4d9d1
movq 0x210(%rsp), %rsi
incq %rsi
callq 0x229c0
leaq 0x138(%rsp), %rdi
callq 0x322a0
movq 0x90(%rsp), %rax
leaq (%rax,%rbp), %rsi
movq 0xc0(%rsp), %rcx
movq 0xb0(%rsp), %rdx
addl %ecx, %edx
incl %edx
shlq $0x5, %rdx
addq %rax, %rdx
movq %r12, %rdi
callq 0x33608
leaq 0x1e0(%rsp), %r15
movq 0x90(%rsp), %rdi
addq %rbp, %rdi
movq %r12, %rsi
callq 0x22bb0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x4da43
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0x90(%rsp), %r14
addq %rbp, %r14
movq %r13, %rdi
leaq 0xaa294(%rip), %rsi     # 0xf7cec
xorl %edx, %edx
callq 0x31902
leaq 0x1f0(%rsp), %rax
movq %rax, 0x1e0(%rsp)
movq %r15, %rdi
leaq 0xa9248(%rip), %rdx     # 0xf6cc1
movq %rdx, %rsi
callq 0x32210
movq %r12, %rdi
movq %r14, %rsi
movq %r13, %rdx
movq %r15, %rcx
xorl %r8d, %r8d
callq 0x4a2c9
movq 0x90(%rsp), %rdi
addq %rbp, %rdi
movq %r12, %rsi
callq 0x22bb0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x4dac3
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0x1e0(%rsp), %rdi
leaq 0x1f0(%rsp), %rax
cmpq %rax, %rdi
je 0x4dae8
movq 0x1f0(%rsp), %rsi
incq %rsi
callq 0x229c0
leaq 0x138(%rsp), %rdi
callq 0x322a0
movq 0x90(%rsp), %r14
movq %r12, %rdi
leaq 0xaa1dc(%rip), %rsi     # 0xf7ce3
xorl %edx, %edx
callq 0x31902
movq (%r14,%rbp), %rdi
movq 0x8(%r14,%rbp), %rsi
addq %rdi, %rsi
movq %r12, %rdx
xorl %ecx, %ecx
callq 0x47067
movl %eax, %r14d
leaq 0x8(%rsp), %rdi
callq 0x322a0
testb %r14b, %r14b
jne 0x4db4e
movq 0x90(%rsp), %rsi
addq %rbp, %rsi
movq 0x128(%rsp), %rdi
callq 0x31d52
movq 0x90(%rsp), %r14
movq %r12, %rdi
leaq 0xaa183(%rip), %rsi     # 0xf7ce3
xorl %edx, %edx
callq 0x31902
movq (%r14,%rbp), %rdi
movq 0x8(%r14,%rbp), %rsi
addq %rdi, %rsi
movq %r12, %rdx
xorl %ecx, %ecx
callq 0x47067
movl %eax, %r14d
leaq 0x8(%rsp), %rdi
callq 0x322a0
movq 0xb0(%rsp), %rax
incl %eax
testb %r14b, %r14b
jne 0x4d8d4
movq 0xc0(%rsp), %rbp
addl %eax, %ebp
movl $0x1, %eax
jmp 0x4dbc0
movq 0xc0(%rsp), %rbp
movq 0xb0(%rsp), %rax
addl %eax, %ebp
testl %eax, %eax
jne 0x4dbdf
movl %ebp, %esi
shlq $0x5, %rsi
addq 0x90(%rsp), %rsi
movq 0x128(%rsp), %rdi
callq 0x31d52
incl %ebp
movq 0x98(%rsp), %rax
subq 0x90(%rsp), %rax
sarq $0x5, %rax
cmpq %rbp, %rax
ja 0x4d8c4
xorps %xmm0, %xmm0
movaps %xmm0, 0x2a0(%rsp)
movaps %xmm0, 0x290(%rsp)
movaps %xmm0, 0x280(%rsp)
movb $0x0, 0x2b0(%rsp)
movups %xmm0, 0x2b8(%rsp)
movl $0x0, 0x2c8(%rsp)
movb $0x1, 0x2cc(%rsp)
movq 0xb8(%rsp), %r13
movq 0x88(%r13), %r14
cmpq 0x90(%r13), %r14
je 0x4e724
leaq 0x30(%r13), %rax
movq %rax, 0xb0(%rsp)
movq %rsp, %r12
xorl %r15d, %r15d
leaq 0x280(%rsp), %rbp
movq %r12, %rdi
leaq 0xaa074(%rip), %rsi     # 0xf7cf0
xorl %edx, %edx
callq 0x31902
movq (%r14), %rdi
movq 0x8(%r14), %rsi
addq %rdi, %rsi
movq %r12, %rdx
xorl %ecx, %ecx
callq 0x47067
movl %eax, %ebx
leaq 0x8(%rsp), %rdi
callq 0x322a0
testb %bl, %bl
je 0x4dd9f
leaq 0x140(%rsp), %rax
movq %rax, 0x130(%rsp)
movq %r15, 0x138(%rsp)
movb %r15b, 0x140(%rsp)
leaq 0x168(%rsp), %rax
movq %rax, 0x158(%rsp)
movq %r15, 0x160(%rsp)
movb %r15b, 0x168(%rsp)
leaq 0x188(%rsp), %rax
movq %rax, 0x178(%rsp)
movq %r15, 0x180(%rsp)
movb %r15b, 0x188(%rsp)
leaq 0x118(%rsp), %rax
movq %rax, 0x108(%rsp)
movq %r15, 0x110(%rsp)
movb %r15b, 0x118(%rsp)
movq %r12, %rdi
leaq 0xaa01e(%rip), %rsi     # 0xf7d53
xorl %edx, %edx
callq 0x31902
movq (%r14), %rdi
movq 0x8(%r14), %rsi
addq %rdi, %rsi
movq %rbp, %rdx
movq %r12, %rcx
xorl %r8d, %r8d
movq %rdi, %r9
callq 0x404be
movl %eax, %ebx
leaq 0x8(%rsp), %rdi
callq 0x322a0
testb %bl, %bl
je 0x4de2c
movq %rbp, %rdi
movl $0x2, %esi
callq 0x3194a
cmpb $0x1, 0x10(%rax)
jne 0x4dee6
movq (%rax), %rsi
movq 0x8(%rax), %rdx
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq %r12, %rdi
callq 0x45c1c
jmp 0x4defd
movq %r12, %rdi
leaq 0xaa0a8(%rip), %rsi     # 0xf7e51
xorl %edx, %edx
callq 0x31902
movq (%r14), %rdi
movq 0x8(%r14), %rsi
addq %rdi, %rsi
movq %rbp, %rdx
movq %r12, %rcx
xorl %r8d, %r8d
movq %rdi, %r9
callq 0x404be
movl %eax, %ebx
leaq 0x8(%rsp), %rdi
callq 0x322a0
testb %bl, %bl
je 0x4de99
movl $0x58, %edi
callq 0x22980
movq %rax, %rbx
movq %rbp, %rdi
movl $0x2, %esi
callq 0x3194a
cmpb $0x1, 0x10(%rax)
jne 0x4e050
movq (%rax), %rsi
movq 0x8(%rax), %rdx
leaq 0xd8(%rsp), %rax
movq %rax, 0xc8(%rsp)
leaq 0xc8(%rsp), %rdi
callq 0x45c1c
jmp 0x4e074
movq %r12, %rdi
leaq 0xa9f4b(%rip), %rsi     # 0xf7d81
xorl %edx, %edx
callq 0x31902
movq (%r14), %rdi
movq 0x8(%r14), %rsi
addq %rdi, %rsi
movq %rbp, %rdx
movq %r12, %rcx
xorl %r8d, %r8d
movq %rdi, %r9
callq 0x404be
movl %eax, %ebx
leaq 0x8(%rsp), %rdi
callq 0x322a0
testb %bl, %bl
je 0x4e0dd
movq %rbp, %rdi
movl $0x1, %esi
callq 0x3194a
cmpb $0x1, 0x10(%rax)
jne 0x4dee6
movq (%rax), %rsi
movq 0x8(%rax), %rdx
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq %r12, %rdi
callq 0x45c1c
jmp 0x4defd
movq %r12, %rdi
leaq 0xa9fe9(%rip), %rsi     # 0xf7e8c
xorl %edx, %edx
callq 0x31902
movq (%r14), %rdi
movq 0x8(%r14), %rsi
addq %rdi, %rsi
movq %rbp, %rdx
movq %r12, %rcx
xorl %r8d, %r8d
movq %rdi, %r9
callq 0x404be
movl %eax, %ebx
leaq 0x8(%rsp), %rdi
callq 0x322a0
testb %bl, %bl
je 0x4e487
movb $0x1, 0xb8(%r13)
jmp 0x4e487
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq $0x0, 0x8(%rsp)
movb $0x0, 0x10(%rsp)
leaq 0x158(%rsp), %rdi
movq %r12, %rsi
callq 0x22bb0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x4df28
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x229c0
movb $0x1, %r13b
leaq 0xe8(%rsp), %rdi
leaq 0xa9ed8(%rip), %rsi     # 0xf7e12
xorl %edx, %edx
callq 0x31902
leaq 0x1d0(%rsp), %rax
movq %rax, 0x1c0(%rsp)
leaq 0x1c0(%rsp), %rbx
movq %rbx, %rdi
leaq 0xa8d5e(%rip), %rdx     # 0xf6cc1
movq %rdx, %rsi
callq 0x32210
movq %r12, %rdi
movq %r14, %rsi
leaq 0xe8(%rsp), %rdx
movq %rbx, %rcx
xorl %r8d, %r8d
callq 0x4a2c9
movq %r14, %rdi
movq %r12, %rsi
callq 0x22bb0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x4dfaa
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0x1c0(%rsp), %rdi
leaq 0x1d0(%rsp), %rax
cmpq %rax, %rdi
je 0x4dfcf
movq 0x1d0(%rsp), %rsi
incq %rsi
callq 0x229c0
leaq 0xf0(%rsp), %rdi
callq 0x322a0
movq %r12, %rdi
leaq 0xa9e46(%rip), %rsi     # 0xf7e2c
xorl %edx, %edx
callq 0x31902
movq (%r14), %rdi
movq 0x8(%r14), %rsi
addq %rdi, %rsi
movq %rbp, %rdx
movq %r12, %rcx
xorl %r8d, %r8d
movq %rdi, %r9
callq 0x404be
movl %eax, %ebx
leaq 0x8(%rsp), %rdi
callq 0x322a0
testb %bl, %bl
je 0x4e2b4
movq %rbp, %rdi
movl $0x2, %esi
callq 0x3194a
cmpb $0x1, 0x10(%rax)
jne 0x4e272
movq (%rax), %rsi
movq 0x8(%rax), %rdx
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq %r12, %rdi
callq 0x45c1c
jmp 0x4e289
leaq 0xd8(%rsp), %rax
movq %rax, 0xc8(%rsp)
movq $0x0, 0xd0(%rsp)
movb $0x0, 0xd8(%rsp)
movq %rbx, %rdi
leaq 0xc8(%rsp), %rsi
callq 0x4d418
movq 0xc8(%rsp), %rdi
leaq 0xd8(%rsp), %rax
cmpq %rax, %rdi
je 0x4e0a9
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x229c0
movq %rbp, %rdi
movl $0x2, %esi
callq 0x3194a
cmpb $0x1, 0x10(%rax)
jne 0x4e15c
movq (%rax), %rsi
movq 0x8(%rax), %rdx
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq %r12, %rdi
callq 0x45c1c
jmp 0x4e173
movq %r12, %rdi
leaq 0xa9cb3(%rip), %rsi     # 0xf7d9a
xorl %edx, %edx
callq 0x31902
movq (%r14), %rdi
movq 0x8(%r14), %rsi
addq %rdi, %rsi
movq %rbp, %rdx
movq %r12, %rcx
xorl %r8d, %r8d
movq %rdi, %r9
callq 0x404be
movl %eax, %ebx
leaq 0x8(%rsp), %rdi
callq 0x322a0
movb $0x1, %r13b
testb %bl, %bl
je 0x4df2b
movq %rbp, %rdi
movl $0x2, %esi
callq 0x3194a
leaq 0xe8(%rsp), %r13
cmpb $0x1, 0x10(%rax)
jne 0x4e49d
movq (%rax), %rsi
movq 0x8(%rax), %rdx
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq %r12, %rdi
callq 0x45c1c
jmp 0x4e4b4
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq $0x0, 0x8(%rsp)
movb $0x0, 0x10(%rsp)
movq %rbx, 0x20(%rsp)
movq 0xb0(%rsp), %rdi
movq %r12, %rsi
callq 0x51f58
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x4e1a3
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0x60(%r13), %rax
cmpl $0x3, 0x1614(%rax)
jb 0x4e487
movl $0xb, %edx
movq 0x127dd0(%rip), %rdi    # 0x175f90
leaq 0xa9ca2(%rip), %rsi     # 0xf7e69
callq 0x22ab0
movq %rbp, %rdi
movl $0x2, %esi
callq 0x3194a
movq 0x127db0(%rip), %rdi    # 0x175f90
movq %rax, %rsi
callq 0x51860
movq %rax, %rbx
movl $0x16, %edx
movq %rax, %rdi
leaq 0xa9c7b(%rip), %rsi     # 0xf7e75
callq 0x22ab0
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq 0x68(%r13), %rsi
movq 0x70(%r13), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x32180
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x22ab0
movq %rax, %rbx
movq (%rax), %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
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x4e487
movq 0x10(%rsp), %rsi
jmp 0x4e47f
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq $0x0, 0x8(%rsp)
movb $0x0, 0x10(%rsp)
leaq 0x108(%rsp), %rdi
movq %r12, %rsi
callq 0x22bb0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x4e2b4
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x229c0
movq %r12, %rdi
leaq 0xa9b86(%rip), %rsi     # 0xf7e44
xorl %edx, %edx
callq 0x31902
movq (%r14), %rdi
movq 0x8(%r14), %rsi
addq %rdi, %rsi
movq %rbp, %rdx
movq %r12, %rcx
xorl %r8d, %r8d
movq %rdi, %r9
callq 0x404be
andb %al, %r13b
leaq 0x8(%rsp), %rdi
callq 0x322a0
cmpb $0x1, %r13b
movq 0xb8(%rsp), %r13
jne 0x4e342
movq %rbp, %rdi
movl $0x1, %esi
callq 0x3194a
movq %r12, %rdi
movq %rax, %rsi
callq 0x5161a
movq (%rsp), %rbx
movq %rbx, %rdi
callq 0x22be0
movsd %xmm0, 0x150(%rsp)
leaq 0x10(%rsp), %rax
cmpq %rax, %rbx
je 0x4e342
movq 0x10(%rsp), %rsi
incq %rsi
movq %rbx, %rdi
callq 0x229c0
leaq 0x130(%rsp), %rdi
movq %r14, %rsi
callq 0x22500
cmpq $0x0, 0x110(%rsp)
je 0x4e3f3
movq %r12, %rdi
leaq 0x108(%rsp), %rsi
leaq 0x130(%rsp), %rdx
callq 0x516aa
movq %r13, %rdi
movq %r12, %rsi
callq 0x51c90
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x4e3a0
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x4e3bc
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x4e3d8
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x229c0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x4e3f3
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0x108(%rsp), %rdi
leaq 0x118(%rsp), %rax
cmpq %rax, %rdi
je 0x4e418
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0x178(%rsp), %rdi
leaq 0x188(%rsp), %rax
cmpq %rax, %rdi
je 0x4e43d
movq 0x188(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0x158(%rsp), %rdi
leaq 0x168(%rsp), %rax
cmpq %rax, %rdi
je 0x4e462
movq 0x168(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0x130(%rsp), %rdi
leaq 0x140(%rsp), %rax
cmpq %rax, %rdi
je 0x4e487
movq 0x140(%rsp), %rsi
incq %rsi
callq 0x229c0
addq $0x20, %r14
cmpq 0x90(%r13), %r14
jne 0x4dc72
jmp 0x4e724
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq $0x0, 0x8(%rsp)
movb $0x0, 0x10(%rsp)
leaq 0x158(%rsp), %rdi
movq %r12, %rsi
callq 0x22bb0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x4e4df
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x229c0
movq %r12, %rdi
leaq 0xa98e5(%rip), %rsi     # 0xf7dce
xorl %edx, %edx
callq 0x31902
movq (%r14), %rdi
movq 0x8(%r14), %rsi
addq %rdi, %rsi
movq %rbp, %rdx
movq %r12, %rcx
xorl %r8d, %r8d
movq %rdi, %r9
callq 0x404be
movl %eax, %ebx
leaq 0x8(%rsp), %rdi
callq 0x322a0
testb %bl, %bl
je 0x4e58a
movq %rbp, %rdi
movl $0x2, %esi
callq 0x3194a
cmpb $0x1, 0x10(%rax)
jne 0x4e548
movq (%rax), %rsi
movq 0x8(%rax), %rdx
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq %r12, %rdi
callq 0x45c1c
jmp 0x4e55f
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq $0x0, 0x8(%rsp)
movb $0x0, 0x10(%rsp)
leaq 0x178(%rsp), %rdi
movq %r12, %rsi
callq 0x22bb0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x4e58a
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x229c0
movq %r12, %rdi
leaq 0xa9855(%rip), %rsi     # 0xf7de9
xorl %edx, %edx
callq 0x31902
movq (%r14), %rdi
movq 0x8(%r14), %rsi
addq %rdi, %rsi
movq %rbp, %rdx
movq %r12, %rcx
xorl %r8d, %r8d
movq %rdi, %r9
callq 0x404be
movl %eax, %ebx
leaq 0x8(%rsp), %rdi
callq 0x322a0
testb %bl, %bl
je 0x4e60d
movq %rbp, %rdi
movl $0x1, %esi
callq 0x3194a
movq %r12, %rdi
movq %rax, %rsi
callq 0x5161a
movq (%rsp), %rbx
movq %rbx, %rdi
callq 0x22be0
movsd %xmm0, 0x150(%rsp)
leaq 0x10(%rsp), %rax
cmpq %rax, %rbx
je 0x4e60d
movq 0x10(%rsp), %rsi
incq %rsi
movq %rbx, %rdi
callq 0x229c0
movq %r12, %rdi
leaq 0xa97e1(%rip), %rsi     # 0xf7df8
xorl %edx, %edx
callq 0x31902
movq (%r14), %rdi
movq 0x8(%r14), %rsi
addq %rdi, %rsi
movq %rbp, %rdx
movq %r12, %rcx
xorl %r8d, %r8d
movq %rdi, %r9
callq 0x404be
movl %eax, %ebx
leaq 0x8(%rsp), %rdi
callq 0x322a0
testb %bl, %bl
je 0x4e71c
xorps %xmm0, %xmm0
movaps %xmm0, 0x220(%rsp)
movq $0x0, 0x230(%rsp)
movq %rbp, %rdi
movl $0x1, %esi
callq 0x3194a
movq %r12, %rdi
movq %rax, %rsi
callq 0x5161a
leaq 0xf8(%rsp), %rax
movq %rax, 0xe8(%rsp)
movq %r13, %rdi
leaq 0xa977a(%rip), %rsi     # 0xf7e10
leaq 0xa9774(%rip), %rdx     # 0xf7e11
callq 0x32210
movq %r12, %rdi
leaq 0x220(%rsp), %rsi
movq %r13, %rdx
callq 0xbf342
movq 0xe8(%rsp), %rdi
leaq 0xf8(%rsp), %rax
cmpq %rax, %rdi
je 0x4e6da
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x229c0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x4e6f5
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0x228(%rsp), %rax
movq -0x20(%rax), %rdi
callq 0x22be0
movsd %xmm0, 0x150(%rsp)
leaq 0x220(%rsp), %rdi
callq 0x31a9e
xorl %r13d, %r13d
jmp 0x4df2b
cmpq $0x0, 0x28(%r13)
jne 0x4e783
movq 0x60(%r13), %rbx
leaq 0x270(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xa975f(%rip), %rsi     # 0xf7ea1
leaq 0xa984d(%rip), %rdx     # 0xf7f96
leaq 0x260(%rsp), %rdi
callq 0x32210
leaq 0x260(%rsp), %rsi
movq %rbx, %rdi
callq 0x78b66
movq 0x260(%rsp), %rdi
cmpq %r15, %rdi
je 0x4e783
movq 0x270(%rsp), %rsi
incq %rsi
callq 0x229c0
leaq 0x280(%rsp), %rdi
callq 0x32024
leaq 0x90(%rsp), %rdi
callq 0x31a9e
leaq 0x2d0(%rsp), %rdi
callq 0x22200
movq 0x1a0(%rsp), %rdi
leaq 0x1b0(%rsp), %rax
cmpq %rax, %rdi
je 0x4e7cf
movq 0x1b0(%rsp), %rsi
incq %rsi
callq 0x229c0
addq $0x4d8, %rsp            # imm = 0x4D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq 0x260(%rsp), %rdi
cmpq %r15, %rdi
je 0x4ea61
movq 0x270(%rsp), %rsi
jmp 0x4e98c
jmp 0x4ea4f
movq %rax, %r14
movq 0x240(%rsp), %rdi
cmpq %r15, %rdi
je 0x4e82c
movq 0x250(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x4e82c
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x4ea38
jmp 0x4eaef
jmp 0x4eaec
movq %rax, %r14
movq 0xe8(%rsp), %rdi
leaq 0xf8(%rsp), %rax
cmpq %rax, %rdi
je 0x4e875
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x4e875
movq %rax, %r14
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x4e8a7
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x4e8a7
jmp 0x4e9eb
jmp 0x4eaec
movq %rax, %r14
jmp 0x4eb09
movq %rax, %r14
leaq 0x220(%rsp), %rdi
callq 0x31a9e
jmp 0x4e9ee
jmp 0x4e9d8
jmp 0x4e9eb
jmp 0x4e9eb
jmp 0x4e9d8
jmp 0x4e9eb
jmp 0x4e9d8
jmp 0x4e9eb
jmp 0x4e9eb
jmp 0x4e9d8
jmp 0x4e9eb
jmp 0x4ea4f
jmp 0x4e9eb
jmp 0x4e9eb
jmp 0x4ea4f
jmp 0x4e972
movq %rax, %r14
movq 0xc8(%rsp), %rdi
leaq 0xd8(%rsp), %rax
cmpq %rax, %rdi
je 0x4e95c
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x4e95c
jmp 0x4e9d8
jmp 0x4ea54
movq %rax, %r14
movq %rsp, %rdi
callq 0x517ac
jmp 0x4e9ee
jmp 0x4e9eb
jmp 0x4eaec
jmp 0x4ea4f
jmp 0x4e9eb
movq %rax, %r14
movl $0x58, %esi
movq %rbx, %rdi
jmp 0x4e98f
jmp 0x4e9eb
movq %rax, %r14
jmp 0x4e9ce
jmp 0x4e9eb
movq %rax, %r14
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x4ea61
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x4ea61
jmp 0x4e9d8
jmp 0x4e9d8
jmp 0x4e9eb
jmp 0x4ea54
jmp 0x4e9eb
movq %rax, %r14
movq 0x1c0(%rsp), %rdi
leaq 0x1d0(%rsp), %rax
cmpq %rax, %rdi
je 0x4e9ce
movq 0x1d0(%rsp), %rsi
incq %rsi
callq 0x229c0
leaq 0xf0(%rsp), %rdi
jmp 0x4e9e0
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x322a0
jmp 0x4e9ee
jmp 0x4e9eb
jmp 0x4e9eb
movq %rax, %r14
movq 0x108(%rsp), %rdi
leaq 0x118(%rsp), %rax
cmpq %rax, %rdi
je 0x4ea13
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x229c0
leaq 0x130(%rsp), %rdi
callq 0x51812
jmp 0x4ea61
jmp 0x4ea4f
jmp 0x4ea4f
jmp 0x4ea28
movq %rax, %r14
movq (%rsp), %rdi
cmpq %rbp, %rdi
je 0x4eaef
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x4eaef
jmp 0x4eaec
movq %rax, %r14
jmp 0x4ea61
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x322a0
leaq 0x280(%rsp), %rdi
callq 0x32024
jmp 0x4eaef
jmp 0x4eaec
jmp 0x4eaec
movq %rax, %r14
movq 0x200(%rsp), %rdi
leaq 0x210(%rsp), %rax
cmpq %rax, %rdi
je 0x4ead1
movq 0x210(%rsp), %rsi
jmp 0x4eac4
jmp 0x4eace
jmp 0x4eaec
jmp 0x4eadd
jmp 0x4eadd
jmp 0x4eaec
jmp 0x4eaec
jmp 0x4eaec
movq %rax, %r14
movq 0x1e0(%rsp), %rdi
leaq 0x1f0(%rsp), %rax
cmpq %rax, %rdi
je 0x4ead1
movq 0x1f0(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x4ead1
movq %rax, %r14
leaq 0x138(%rsp), %rdi
jmp 0x4eae5
jmp 0x4eaec
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x322a0
jmp 0x4eaef
movq %rax, %r14
leaq 0x90(%rsp), %rdi
callq 0x31a9e
leaq 0x2d0(%rsp), %rdi
callq 0x22200
movq 0x1a0(%rsp), %rdi
leaq 0x1b0(%rsp), %rax
cmpq %rax, %rdi
je 0x4eb2e
movq 0x1b0(%rsp), %rsi
incq %rsi
callq 0x229c0
movq %r14, %rdi
callq 0x23240