// File: 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
movq %rsp, %rbp
subq $0xad0, %rsp            # imm = 0xAD0
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x860(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x2f880
movq -0x860(%rbp), %rsi
addq $0x68, %rsi
leaq -0x230(%rbp), %rdi
movl $0x8, %edx
callq 0x30d80
jmp 0x97f61
leaq -0x258(%rbp), %rdi
callq 0x448b0
leaq -0x230(%rbp), %rdi
callq 0x30980
movb %al, -0x861(%rbp)
jmp 0x97f81
movb -0x861(%rbp), %al
testb $0x1, %al
jne 0x97f90
jmp 0x9806d
jmp 0x97f92
leaq -0x230(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x2fcb0
movq %rax, -0x870(%rbp)
jmp 0x97fab
movq -0x870(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x2f8e0
movb %al, -0x871(%rbp)
jmp 0x97fc9
movb -0x871(%rbp), %al
testb $0x1, %al
jne 0x97fd8
jmp 0x98068
leaq 0x1433d0(%rip), %rdx    # 0x1db3af
leaq -0x278(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x447b0
jmp 0x97ff1
leaq -0x258(%rbp), %rdi
leaq -0x278(%rbp), %rsi
callq 0x45280
jmp 0x98006
leaq -0x278(%rbp), %rdi
callq 0x311e8
jmp 0x97f92
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
jmp 0x997f8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
jmp 0x997e0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
leaq -0x278(%rbp), %rdi
callq 0x311e8
jmp 0x997e0
jmp 0x98126
movq -0x860(%rbp), %rdx
movq 0x60(%rdx), %rax
movq %rax, -0x880(%rbp)
addq $0x68, %rdx
leaq 0x142438(%rip), %rsi    # 0x1da4c2
leaq -0x2b8(%rbp), %rdi
callq 0x44240
jmp 0x98098
leaq 0x13b898(%rip), %rdx    # 0x1d3937
leaq -0x298(%rbp), %rdi
leaq -0x2b8(%rbp), %rsi
callq 0x441f0
jmp 0x980b4
movq -0x880(%rbp), %rdi
leaq -0x298(%rbp), %rsi
callq 0xeada0
jmp 0x980c9
leaq -0x298(%rbp), %rdi
callq 0x311e8
leaq -0x2b8(%rbp), %rdi
callq 0x311e8
jmp 0x98126
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
jmp 0x98115
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
leaq -0x298(%rbp), %rdi
callq 0x311e8
leaq -0x2b8(%rbp), %rdi
callq 0x311e8
jmp 0x997e0
leaq -0x230(%rbp), %rdi
callq 0x300d0
jmp 0x98134
movl $0x0, -0x2bc(%rbp)
movl -0x2bc(%rbp), %eax
movq %rax, -0x888(%rbp)
leaq -0x258(%rbp), %rdi
callq 0x44960
movq %rax, %rcx
movq -0x888(%rbp), %rax
cmpq %rcx, %rax
jae 0x98739
movl $0x0, -0x2c0(%rbp)
jmp 0x98176
movl -0x2bc(%rbp), %eax
movl -0x2c0(%rbp), %ecx
subl %ecx, %eax
movl %eax, %esi
leaq -0x258(%rbp), %rdi
callq 0x449e0
movq %rax, -0x890(%rbp)
leaq 0x142343(%rip), %rsi    # 0x1da4e3
leaq -0x2d0(%rbp), %rdi
xorl %edx, %edx
callq 0x43f20
jmp 0x981b0
movq -0x890(%rbp), %rdi
leaq -0x2d0(%rbp), %rsi
xorl %edx, %edx
callq 0x450e0
movb %al, -0x891(%rbp)
jmp 0x981cd
leaq -0x2d0(%rbp), %rdi
callq 0x441d0
movb -0x891(%rbp), %al
testb $0x1, %al
jne 0x981e8
jmp 0x986d8
movl -0x2bc(%rbp), %eax
movl -0x2c0(%rbp), %ecx
subl %ecx, %eax
movl %eax, %esi
leaq -0x258(%rbp), %rdi
callq 0x449e0
movq %rax, -0x8a0(%rbp)
leaq 0x1422d4(%rip), %rsi    # 0x1da4e6
leaq -0x300(%rbp), %rdi
xorl %edx, %edx
callq 0x43f20
jmp 0x98222
leaq -0x321(%rbp), %rdi
movq %rdi, -0x8a8(%rbp)
callq 0x30a70
movq -0x8a8(%rbp), %rdx
leaq 0x1412bd(%rip), %rsi    # 0x1d9500
leaq -0x320(%rbp), %rdi
callq 0x44470
jmp 0x98251
movq -0x8a0(%rbp), %rsi
leaq -0x2f0(%rbp), %rdi
leaq -0x300(%rbp), %rdx
leaq -0x320(%rbp), %rcx
xorl %r8d, %r8d
callq 0x8def0
jmp 0x98277
movl -0x2bc(%rbp), %eax
movl -0x2c0(%rbp), %ecx
subl %ecx, %eax
movl %eax, %esi
leaq -0x258(%rbp), %rdi
movq %rdi, -0x8b8(%rbp)
callq 0x449e0
movq %rax, %rdi
leaq -0x2f0(%rbp), %rsi
movq %rsi, -0x8c0(%rbp)
callq 0x2fd80
movq -0x8c0(%rbp), %rdi
callq 0x311e8
leaq -0x320(%rbp), %rdi
callq 0x311e8
leaq -0x321(%rbp), %rdi
callq 0x311c0
leaq -0x300(%rbp), %rdi
callq 0x441d0
movq -0x8b8(%rbp), %rdi
movl -0x2bc(%rbp), %eax
movl -0x2c0(%rbp), %ecx
subl %ecx, %eax
movl %eax, %esi
callq 0x449e0
movq -0x8b8(%rbp), %rdi
movq %rax, -0x8b0(%rbp)
movl -0x2bc(%rbp), %eax
incl %eax
movl %eax, %esi
callq 0x449e0
movq -0x8b0(%rbp), %rsi
movq %rax, %rdx
leaq -0x348(%rbp), %rdi
callq 0x50f10
jmp 0x98331
movl -0x2bc(%rbp), %eax
movl -0x2c0(%rbp), %ecx
subl %ecx, %eax
movl %eax, %esi
leaq -0x258(%rbp), %rdi
movq %rdi, -0x8d0(%rbp)
callq 0x449e0
movq %rax, %rdi
leaq -0x348(%rbp), %rsi
movq %rsi, -0x8d8(%rbp)
callq 0x2fd80
movq -0x8d8(%rbp), %rdi
callq 0x311e8
movq -0x8d0(%rbp), %rdi
movl -0x2bc(%rbp), %eax
movl -0x2c0(%rbp), %ecx
subl %ecx, %eax
movl %eax, %esi
callq 0x449e0
movq %rax, -0x8c8(%rbp)
leaq 0x14214c(%rip), %rsi    # 0x1da4ec
leaq -0x378(%rbp), %rdi
xorl %edx, %edx
callq 0x43f20
jmp 0x983b0
leaq -0x399(%rbp), %rdi
movq %rdi, -0x8e0(%rbp)
callq 0x30a70
movq -0x8e0(%rbp), %rdx
leaq 0x14112f(%rip), %rsi    # 0x1d9500
leaq -0x398(%rbp), %rdi
callq 0x44470
jmp 0x983df
movq -0x8c8(%rbp), %rsi
leaq -0x368(%rbp), %rdi
leaq -0x378(%rbp), %rdx
leaq -0x398(%rbp), %rcx
xorl %r8d, %r8d
callq 0x8def0
jmp 0x98405
movl -0x2bc(%rbp), %eax
movl -0x2c0(%rbp), %ecx
subl %ecx, %eax
movl %eax, %esi
leaq -0x258(%rbp), %rdi
movq %rdi, -0x8f0(%rbp)
callq 0x449e0
movq %rax, %rdi
leaq -0x368(%rbp), %rsi
movq %rsi, -0x8f8(%rbp)
callq 0x2fd80
movq -0x8f8(%rbp), %rdi
callq 0x311e8
leaq -0x398(%rbp), %rdi
callq 0x311e8
leaq -0x399(%rbp), %rdi
callq 0x311c0
leaq -0x378(%rbp), %rdi
callq 0x441d0
movq -0x8f0(%rbp), %rdi
movl -0x2bc(%rbp), %eax
movl -0x2c0(%rbp), %ecx
subl %ecx, %eax
movl %eax, %esi
callq 0x449e0
movq %rax, -0x8e8(%rbp)
leaq 0x14204b(%rip), %rsi    # 0x1da4e3
leaq -0x3b0(%rbp), %rdi
xorl %edx, %edx
callq 0x43f20
jmp 0x984a8
movq -0x8e8(%rbp), %rdi
leaq -0x3b0(%rbp), %rsi
xorl %edx, %edx
callq 0x450e0
movb %al, -0x8f9(%rbp)
jmp 0x984c5
movb -0x8f9(%rbp), %al
xorb $-0x1, %al
movb %al, -0x8fa(%rbp)
leaq -0x3b0(%rbp), %rdi
callq 0x441d0
movb -0x8fa(%rbp), %al
testb $0x1, %al
jne 0x984ee
jmp 0x98618
movq -0x860(%rbp), %rax
addq $0x88, %rax
movq %rax, -0x908(%rbp)
movl -0x2bc(%rbp), %eax
movl -0x2c0(%rbp), %ecx
subl %ecx, %eax
movl %eax, %esi
leaq -0x258(%rbp), %rdi
callq 0x449e0
movq -0x908(%rbp), %rdi
movq %rax, %rsi
callq 0x45280
jmp 0x9852f
jmp 0x98618
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
leaq -0x2d0(%rbp), %rdi
callq 0x441d0
jmp 0x997e0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
jmp 0x98589
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
leaq -0x320(%rbp), %rdi
callq 0x311e8
leaq -0x321(%rbp), %rdi
callq 0x311c0
leaq -0x300(%rbp), %rdi
callq 0x441d0
jmp 0x997e0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
jmp 0x985d8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
leaq -0x398(%rbp), %rdi
callq 0x311e8
leaq -0x399(%rbp), %rdi
callq 0x311c0
leaq -0x378(%rbp), %rdi
callq 0x441d0
jmp 0x997e0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
leaq -0x3b0(%rbp), %rdi
callq 0x441d0
jmp 0x997e0
movl -0x2bc(%rbp), %eax
incl %eax
movl %eax, -0x2bc(%rbp)
movl -0x2c0(%rbp), %eax
incl %eax
movl %eax, -0x2c0(%rbp)
movl -0x2bc(%rbp), %eax
movl -0x2c0(%rbp), %ecx
subl %ecx, %eax
movl %eax, %esi
leaq -0x258(%rbp), %rdi
callq 0x449e0
movq %rax, -0x910(%rbp)
leaq 0x141e85(%rip), %rsi    # 0x1da4e3
leaq -0x3c0(%rbp), %rdi
xorl %edx, %edx
callq 0x43f20
jmp 0x9866e
movq -0x910(%rbp), %rdi
leaq -0x3c0(%rbp), %rsi
xorl %edx, %edx
callq 0x450e0
movb %al, -0x911(%rbp)
jmp 0x9868b
movb -0x911(%rbp), %al
xorb $-0x1, %al
movb %al, -0x912(%rbp)
leaq -0x3c0(%rbp), %rdi
callq 0x441d0
movb -0x912(%rbp), %al
testb $0x1, %al
jne 0x986b1
jmp 0x986d6
jmp 0x986df
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
leaq -0x3c0(%rbp), %rdi
callq 0x441d0
jmp 0x997e0
jmp 0x986da
jmp 0x986df
jmp 0x98174
cmpl $0x0, -0x2c0(%rbp)
jne 0x98723
movq -0x860(%rbp), %rax
addq $0x88, %rax
movq %rax, -0x920(%rbp)
movl -0x2bc(%rbp), %eax
movl %eax, %esi
leaq -0x258(%rbp), %rdi
callq 0x449e0
movq -0x920(%rbp), %rdi
movq %rax, %rsi
callq 0x45280
jmp 0x98721
jmp 0x98723
jmp 0x98725
movl -0x2bc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2bc(%rbp)
jmp 0x9813e
leaq -0x411(%rbp), %rdi
movq %rdi, -0x928(%rbp)
callq 0x43db0
movq -0x928(%rbp), %rsi
leaq -0x410(%rbp), %rdi
callq 0x43dd0
jmp 0x98761
leaq -0x411(%rbp), %rdi
callq 0x43e60
movq -0x860(%rbp), %rdi
addq $0x88, %rdi
callq 0x458f0
movq %rax, -0x420(%rbp)
movq -0x860(%rbp), %rdi
addq $0x88, %rdi
callq 0x45920
movq %rax, -0x428(%rbp)
leaq -0x420(%rbp), %rdi
leaq -0x428(%rbp), %rsi
callq 0x45860
testb $0x1, %al
jne 0x987bd
jmp 0x996d8
leaq -0x420(%rbp), %rdi
callq 0x8aed0
movq %rax, -0x930(%rbp)
leaq 0x141d19(%rip), %rsi    # 0x1da4f0
leaq -0x438(%rbp), %rdi
xorl %edx, %edx
callq 0x43f20
jmp 0x987e7
movq -0x930(%rbp), %rdi
leaq -0x438(%rbp), %rsi
xorl %edx, %edx
callq 0x450e0
movb %al, -0x931(%rbp)
jmp 0x98804
leaq -0x438(%rbp), %rdi
callq 0x441d0
movb -0x931(%rbp), %al
testb $0x1, %al
jne 0x9881f
jmp 0x99312
leaq -0x4a8(%rbp), %rdi
callq 0x9c2a0
leaq -0x4c8(%rbp), %rdi
callq 0x2f880
movb $0x0, -0x4c9(%rbp)
leaq -0x420(%rbp), %rdi
callq 0x8aed0
movq %rax, -0x940(%rbp)
leaq 0x141cfb(%rip), %rsi    # 0x1da553
leaq -0x4e0(%rbp), %rdi
xorl %edx, %edx
callq 0x43f20
jmp 0x98868
movq -0x940(%rbp), %rdi
leaq -0x410(%rbp), %rsi
leaq -0x4e0(%rbp), %rdx
xorl %ecx, %ecx
callq 0x43f80
movb %al, -0x941(%rbp)
jmp 0x9888c
leaq -0x4e0(%rbp), %rdi
callq 0x441d0
movb -0x941(%rbp), %al
testb $0x1, %al
jne 0x988a7
jmp 0x98995
leaq -0x410(%rbp), %rdi
movl $0x2, %esi
callq 0x43fe0
movq %rax, -0x950(%rbp)
jmp 0x988c1
movq -0x950(%rbp), %rsi
leaq -0x500(%rbp), %rdi
callq 0x44070
jmp 0x988d6
leaq -0x4a8(%rbp), %rdi
addq $0x28, %rdi
leaq -0x500(%rbp), %rsi
callq 0x2fd80
leaq -0x500(%rbp), %rdi
callq 0x311e8
jmp 0x98eff
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
leaq -0x411(%rbp), %rdi
callq 0x43e60
jmp 0x997e0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
jmp 0x997d4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
leaq -0x438(%rbp), %rdi
callq 0x441d0
jmp 0x997d4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
jmp 0x992f5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
leaq -0x4e0(%rbp), %rdi
callq 0x441d0
jmp 0x992f5
leaq -0x420(%rbp), %rdi
callq 0x8aed0
movq %rax, -0x958(%rbp)
leaq 0x141bd2(%rip), %rsi    # 0x1da581
leaq -0x510(%rbp), %rdi
xorl %edx, %edx
callq 0x43f20
jmp 0x989bf
movq -0x958(%rbp), %rdi
leaq -0x410(%rbp), %rsi
leaq -0x510(%rbp), %rdx
xorl %ecx, %ecx
callq 0x43f80
movb %al, -0x959(%rbp)
jmp 0x989e3
leaq -0x510(%rbp), %rdi
callq 0x441d0
movb -0x959(%rbp), %al
testb $0x1, %al
jne 0x989fb
jmp 0x98a75
leaq -0x410(%rbp), %rdi
movl $0x1, %esi
callq 0x43fe0
movq %rax, -0x968(%rbp)
jmp 0x98a15
movq -0x968(%rbp), %rsi
leaq -0x530(%rbp), %rdi
callq 0x44070
jmp 0x98a2a
leaq -0x4a8(%rbp), %rdi
addq $0x28, %rdi
leaq -0x530(%rbp), %rsi
callq 0x2fd80
leaq -0x530(%rbp), %rdi
callq 0x311e8
jmp 0x98efd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
leaq -0x510(%rbp), %rdi
callq 0x441d0
jmp 0x992f5
leaq -0x420(%rbp), %rdi
callq 0x8aed0
movq %rax, -0x970(%rbp)
leaq 0x141b0b(%rip), %rsi    # 0x1da59a
leaq -0x540(%rbp), %rdi
xorl %edx, %edx
callq 0x43f20
jmp 0x98a9f
movq -0x970(%rbp), %rdi
leaq -0x410(%rbp), %rsi
leaq -0x540(%rbp), %rdx
xorl %ecx, %ecx
callq 0x43f80
movb %al, -0x971(%rbp)
jmp 0x98ac3
leaq -0x540(%rbp), %rdi
callq 0x441d0
movb -0x971(%rbp), %al
testb $0x1, %al
jne 0x98ade
jmp 0x98efb
movb $0x1, -0x4c9(%rbp)
leaq -0x410(%rbp), %rdi
movl $0x2, %esi
callq 0x43fe0
movq %rax, -0x980(%rbp)
jmp 0x98aff
movq -0x980(%rbp), %rsi
leaq -0x560(%rbp), %rdi
callq 0x44070
jmp 0x98b14
leaq -0x480(%rbp), %rdi
leaq -0x560(%rbp), %rsi
movq %rsi, -0x990(%rbp)
callq 0x2fd80
movq -0x990(%rbp), %rdi
callq 0x311e8
leaq -0x420(%rbp), %rdi
callq 0x8aed0
movq %rax, -0x988(%rbp)
leaq 0x141a7a(%rip), %rsi    # 0x1da5ce
leaq -0x570(%rbp), %rdi
xorl %edx, %edx
callq 0x43f20
jmp 0x98b64
movq -0x988(%rbp), %rdi
leaq -0x410(%rbp), %rsi
leaq -0x570(%rbp), %rdx
xorl %ecx, %ecx
callq 0x43f80
movb %al, -0x991(%rbp)
jmp 0x98b88
leaq -0x570(%rbp), %rdi
callq 0x441d0
movb -0x991(%rbp), %al
testb $0x1, %al
jne 0x98ba3
jmp 0x98c3d
leaq -0x410(%rbp), %rdi
movl $0x2, %esi
callq 0x43fe0
movq %rax, -0x9a0(%rbp)
jmp 0x98bbd
movq -0x9a0(%rbp), %rsi
leaq -0x590(%rbp), %rdi
callq 0x44070
jmp 0x98bd2
leaq -0x4a8(%rbp), %rdi
addq $0x48, %rdi
leaq -0x590(%rbp), %rsi
callq 0x2fd80
leaq -0x590(%rbp), %rdi
callq 0x311e8
jmp 0x98c3d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
leaq -0x540(%rbp), %rdi
callq 0x441d0
jmp 0x992f5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
leaq -0x570(%rbp), %rdi
callq 0x441d0
jmp 0x992f5
leaq -0x420(%rbp), %rdi
callq 0x8aed0
movq %rax, -0x9a8(%rbp)
leaq 0x141992(%rip), %rsi    # 0x1da5e9
leaq -0x5a0(%rbp), %rdi
xorl %edx, %edx
callq 0x43f20
jmp 0x98c67
movq -0x9a8(%rbp), %rdi
leaq -0x410(%rbp), %rsi
leaq -0x5a0(%rbp), %rdx
xorl %ecx, %ecx
callq 0x43f80
movb %al, -0x9a9(%rbp)
jmp 0x98c8b
leaq -0x5a0(%rbp), %rdi
callq 0x441d0
movb -0x9a9(%rbp), %al
testb $0x1, %al
jne 0x98ca3
jmp 0x98d1f
leaq -0x410(%rbp), %rdi
movl $0x1, %esi
callq 0x43fe0
movq %rax, -0x9b8(%rbp)
jmp 0x98cbd
movq -0x9b8(%rbp), %rsi
leaq -0x5c0(%rbp), %rdi
callq 0x9c2e0
jmp 0x98cd2
leaq -0x5c0(%rbp), %rdi
callq 0x2f290
movq %rax, %rdi
callq 0x30650
movsd %xmm0, -0x488(%rbp)
leaq -0x5c0(%rbp), %rdi
callq 0x311e8
jmp 0x98d1f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
leaq -0x5a0(%rbp), %rdi
callq 0x441d0
jmp 0x992f5
leaq -0x420(%rbp), %rdi
callq 0x8aed0
movq %rax, -0x9c0(%rbp)
leaq 0x1418bf(%rip), %rsi    # 0x1da5f8
leaq -0x5d0(%rbp), %rdi
xorl %edx, %edx
callq 0x43f20
jmp 0x98d49
movq -0x9c0(%rbp), %rdi
leaq -0x410(%rbp), %rsi
leaq -0x5d0(%rbp), %rdx
xorl %ecx, %ecx
callq 0x43f80
movb %al, -0x9c1(%rbp)
jmp 0x98d6d
leaq -0x5d0(%rbp), %rdi
callq 0x441d0
movb -0x9c1(%rbp), %al
testb $0x1, %al
jne 0x98d88
jmp 0x98ef9
leaq -0x5e8(%rbp), %rdi
callq 0x448b0
leaq -0x410(%rbp), %rdi
movl $0x1, %esi
callq 0x43fe0
movq %rax, -0x9d0(%rbp)
jmp 0x98dae
movq -0x9d0(%rbp), %rsi
leaq -0x608(%rbp), %rdi
callq 0x9c2e0
jmp 0x98dc3
leaq -0x629(%rbp), %rdi
movq %rdi, -0x9d8(%rbp)
callq 0x30a70
movq -0x9d8(%rbp), %rdx
leaq 0x14182c(%rip), %rsi    # 0x1da610
leaq -0x628(%rbp), %rdi
callq 0x44470
jmp 0x98df2
leaq -0x608(%rbp), %rdi
leaq -0x5e8(%rbp), %rsi
leaq -0x628(%rbp), %rdx
callq 0x17d490
jmp 0x98e0e
leaq -0x628(%rbp), %rdi
callq 0x311e8
leaq -0x629(%rbp), %rdi
callq 0x311c0
leaq -0x608(%rbp), %rdi
callq 0x311e8
leaq -0x5e8(%rbp), %rdi
callq 0x9c3e0
movq %rax, %rdi
callq 0x2f290
movq %rax, %rdi
callq 0x30650
movsd %xmm0, -0x488(%rbp)
leaq -0x5e8(%rbp), %rdi
callq 0x448d0
jmp 0x98ef9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
leaq -0x5d0(%rbp), %rdi
callq 0x441d0
jmp 0x992f5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
jmp 0x98ee8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
jmp 0x98ed0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
leaq -0x628(%rbp), %rdi
callq 0x311e8
leaq -0x629(%rbp), %rdi
callq 0x311c0
leaq -0x608(%rbp), %rdi
callq 0x311e8
leaq -0x5e8(%rbp), %rdi
callq 0x448d0
jmp 0x992f5
jmp 0x98efb
jmp 0x98efd
jmp 0x98eff
leaq -0x420(%rbp), %rdi
callq 0x8aed0
movq %rax, -0x9e0(%rbp)
leaq 0x1416f9(%rip), %rsi    # 0x1da612
leaq -0x660(%rbp), %rdi
xorl %edx, %edx
callq 0x43f20
jmp 0x98f29
leaq -0x681(%rbp), %rdi
movq %rdi, -0x9e8(%rbp)
callq 0x30a70
movq -0x9e8(%rbp), %rdx
leaq 0x1405b6(%rip), %rsi    # 0x1d9500
leaq -0x680(%rbp), %rdi
callq 0x44470
jmp 0x98f58
movq -0x9e0(%rbp), %rsi
leaq -0x650(%rbp), %rdi
leaq -0x660(%rbp), %rdx
leaq -0x680(%rbp), %rcx
xorl %r8d, %r8d
callq 0x8def0
jmp 0x98f7e
leaq -0x420(%rbp), %rdi
movq %rdi, -0x9f8(%rbp)
callq 0x8aed0
movq %rax, %rdi
leaq -0x650(%rbp), %rsi
movq %rsi, -0xa00(%rbp)
callq 0x2fd80
movq -0xa00(%rbp), %rdi
callq 0x311e8
leaq -0x680(%rbp), %rdi
callq 0x311e8
leaq -0x681(%rbp), %rdi
callq 0x311c0
leaq -0x660(%rbp), %rdi
callq 0x441d0
movq -0x9f8(%rbp), %rdi
callq 0x8aed0
movq %rax, -0x9f0(%rbp)
leaq 0x14163b(%rip), %rsi    # 0x1da62c
leaq -0x698(%rbp), %rdi
xorl %edx, %edx
callq 0x43f20
jmp 0x99001
movq -0x9f0(%rbp), %rdi
leaq -0x410(%rbp), %rsi
leaq -0x698(%rbp), %rdx
xorl %ecx, %ecx
callq 0x43f80
movb %al, -0xa01(%rbp)
jmp 0x99025
leaq -0x698(%rbp), %rdi
callq 0x441d0
movb -0xa01(%rbp), %al
testb $0x1, %al
jne 0x99040
jmp 0x99102
leaq -0x410(%rbp), %rdi
movl $0x2, %esi
callq 0x43fe0
movq %rax, -0xa10(%rbp)
jmp 0x9905a
movq -0xa10(%rbp), %rsi
leaq -0x6b8(%rbp), %rdi
callq 0x44070
jmp 0x9906f
leaq -0x4c8(%rbp), %rdi
leaq -0x6b8(%rbp), %rsi
callq 0x2fd80
leaq -0x6b8(%rbp), %rdi
callq 0x311e8
jmp 0x99102
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
jmp 0x990c2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
leaq -0x680(%rbp), %rdi
callq 0x311e8
leaq -0x681(%rbp), %rdi
callq 0x311c0
leaq -0x660(%rbp), %rdi
callq 0x441d0
jmp 0x992f5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
leaq -0x698(%rbp), %rdi
callq 0x441d0
jmp 0x992f5
leaq -0x420(%rbp), %rdi
callq 0x8aed0
movq %rax, -0xa18(%rbp)
leaq 0x141528(%rip), %rsi    # 0x1da644
leaq -0x6c8(%rbp), %rdi
xorl %edx, %edx
callq 0x43f20
jmp 0x9912c
movq -0xa18(%rbp), %rdi
leaq -0x410(%rbp), %rsi
leaq -0x6c8(%rbp), %rdx
xorl %ecx, %ecx
callq 0x43f80
movb %al, -0xa19(%rbp)
jmp 0x99150
movb -0xa19(%rbp), %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0xa1a(%rbp)
jne 0x99165
jmp 0x99173
movb -0x4c9(%rbp), %al
xorb $-0x1, %al
movb %al, -0xa1a(%rbp)
movb -0xa1a(%rbp), %al
movb %al, -0xa1b(%rbp)
leaq -0x6c8(%rbp), %rdi
callq 0x441d0
movb -0xa1b(%rbp), %al
testb $0x1, %al
jne 0x99197
jmp 0x99213
leaq -0x410(%rbp), %rdi
movl $0x1, %esi
callq 0x43fe0
movq %rax, -0xa28(%rbp)
jmp 0x991b1
movq -0xa28(%rbp), %rsi
leaq -0x6e8(%rbp), %rdi
callq 0x9c2e0
jmp 0x991c6
leaq -0x6e8(%rbp), %rdi
callq 0x2f290
movq %rax, %rdi
callq 0x30650
movsd %xmm0, -0x488(%rbp)
leaq -0x6e8(%rbp), %rdi
callq 0x311e8
jmp 0x99213
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
leaq -0x6c8(%rbp), %rdi
callq 0x441d0
jmp 0x992f5
leaq -0x420(%rbp), %rdi
callq 0x8aed0
movq %rax, %rsi
leaq -0x4a8(%rbp), %rdi
callq 0x30fa0
jmp 0x99230
leaq -0x4c8(%rbp), %rdi
callq 0x2f700
testb $0x1, %al
jne 0x992d8
movq -0x860(%rbp), %rax
movq %rax, -0xa30(%rbp)
leaq -0x778(%rbp), %rdi
leaq -0x4c8(%rbp), %rsi
leaq -0x4a8(%rbp), %rdx
callq 0x9c460
jmp 0x9926e
movq -0xa30(%rbp), %rdi
leaq -0x778(%rbp), %rsi
callq 0x9c420
movb %dl, -0xa39(%rbp)
movq %rax, -0xa38(%rbp)
jmp 0x99290
movb -0xa39(%rbp), %al
movq -0xa38(%rbp), %rcx
movq %rcx, -0x788(%rbp)
movb %al, -0x780(%rbp)
leaq -0x778(%rbp), %rdi
callq 0x9c4c0
jmp 0x992d8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
leaq -0x778(%rbp), %rdi
callq 0x9c4c0
jmp 0x992f5
leaq -0x4c8(%rbp), %rdi
callq 0x311e8
leaq -0x4a8(%rbp), %rdi
callq 0x87df0
jmp 0x996c5
leaq -0x4c8(%rbp), %rdi
callq 0x311e8
leaq -0x4a8(%rbp), %rdi
callq 0x87df0
jmp 0x997d4
leaq -0x420(%rbp), %rdi
callq 0x8aed0
movq %rax, -0xa48(%rbp)
leaq 0x141325(%rip), %rsi    # 0x1da651
leaq -0x798(%rbp), %rdi
xorl %edx, %edx
callq 0x43f20
jmp 0x9933c
movq -0xa48(%rbp), %rdi
leaq -0x410(%rbp), %rsi
leaq -0x798(%rbp), %rdx
xorl %ecx, %ecx
callq 0x43f80
movb %al, -0xa49(%rbp)
jmp 0x99360
leaq -0x798(%rbp), %rdi
callq 0x441d0
movb -0xa49(%rbp), %al
testb $0x1, %al
jne 0x9937b
jmp 0x99628
movl $0x58, %edi
callq 0x2f3b0
movq %rax, -0xa58(%rbp)
jmp 0x9938e
movb $0x1, -0x7c1(%rbp)
leaq -0x410(%rbp), %rdi
movl $0x2, %esi
callq 0x43fe0
movq %rax, -0xa60(%rbp)
jmp 0x993af
movq -0xa60(%rbp), %rsi
leaq -0x7c0(%rbp), %rdi
callq 0x44070
jmp 0x993c4
movq -0xa58(%rbp), %rdi
leaq -0x7c0(%rbp), %rsi
callq 0x97bb0
jmp 0x993d9
movb $0x0, -0x7c1(%rbp)
leaq -0x7c0(%rbp), %rdi
callq 0x311e8
movq -0xa58(%rbp), %rcx
movq -0x860(%rbp), %rax
movq %rcx, -0x7a0(%rbp)
addq $0x30, %rax
movq %rax, -0xa70(%rbp)
leaq -0x410(%rbp), %rdi
movl $0x2, %esi
callq 0x43fe0
movq %rax, -0xa68(%rbp)
jmp 0x99426
movq -0xa68(%rbp), %rsi
leaq -0x7f0(%rbp), %rdi
leaq -0x7a0(%rbp), %rdx
callq 0x9c530
jmp 0x99442
movq -0xa70(%rbp), %rdi
leaq -0x7f0(%rbp), %rsi
callq 0x9c4f0
movb %dl, -0xa79(%rbp)
movq %rax, -0xa78(%rbp)
jmp 0x99464
movb -0xa79(%rbp), %al
movq -0xa78(%rbp), %rcx
movq %rcx, -0x800(%rbp)
movb %al, -0x7f8(%rbp)
leaq -0x7f0(%rbp), %rdi
callq 0x9c570
movq -0x860(%rbp), %rax
movq 0x60(%rax), %rax
cmpl $0x3, 0x1614(%rax)
jb 0x99623
movq 0x23baa7(%rip), %rdi    # 0x2d4f50
leaq 0x1411b9(%rip), %rsi    # 0x1da669
callq 0x2ff50
movq %rax, -0xa88(%rbp)
jmp 0x994be
leaq -0x410(%rbp), %rdi
movl $0x2, %esi
callq 0x43fe0
movq %rax, -0xa90(%rbp)
jmp 0x994d8
movq -0xa90(%rbp), %rsi
movq -0xa88(%rbp), %rdi
callq 0x9c590
movq %rax, -0xa98(%rbp)
jmp 0x994f4
movq -0xa98(%rbp), %rdi
leaq 0x141173(%rip), %rsi    # 0x1da675
callq 0x2ff50
movq %rax, -0xaa0(%rbp)
jmp 0x99510
movq -0x860(%rbp), %rsi
leaq -0x820(%rbp), %rdi
callq 0x8e140
jmp 0x99525
movq -0xaa0(%rbp), %rdi
leaq -0x820(%rbp), %rsi
callq 0x2f780
movq %rax, -0xaa8(%rbp)
jmp 0x99541
movq -0xaa8(%rbp), %rdi
movq 0x23ba79(%rip), %rsi    # 0x2d4fc8
callq 0x30c10
jmp 0x99556
leaq -0x820(%rbp), %rdi
callq 0x311e8
jmp 0x99623
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
leaq -0x798(%rbp), %rdi
callq 0x441d0
jmp 0x997d4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
jmp 0x995bc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
leaq -0x7c0(%rbp), %rdi
callq 0x311e8
testb $0x1, -0x7c1(%rbp)
jne 0x995c7
jmp 0x995d8
movq -0xa58(%rbp), %rdi
movl $0x58, %esi
callq 0x2f2a0
jmp 0x997d4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
leaq -0x7f0(%rbp), %rdi
callq 0x9c570
jmp 0x997d4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
leaq -0x820(%rbp), %rdi
callq 0x311e8
jmp 0x997d4
jmp 0x996c3
leaq -0x420(%rbp), %rdi
callq 0x8aed0
movq %rax, -0xab0(%rbp)
leaq 0x14104a(%rip), %rsi    # 0x1da68c
leaq -0x830(%rbp), %rdi
xorl %edx, %edx
callq 0x43f20
jmp 0x99652
movq -0xab0(%rbp), %rdi
leaq -0x410(%rbp), %rsi
leaq -0x830(%rbp), %rdx
xorl %ecx, %ecx
callq 0x43f80
movb %al, -0xab1(%rbp)
jmp 0x99676
leaq -0x830(%rbp), %rdi
callq 0x441d0
movb -0xab1(%rbp), %al
testb $0x1, %al
jne 0x9968e
jmp 0x996c1
movq -0x860(%rbp), %rax
movb $0x1, 0xb8(%rax)
jmp 0x996c1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
leaq -0x830(%rbp), %rdi
callq 0x441d0
jmp 0x997d4
jmp 0x996c3
jmp 0x996c5
jmp 0x996c7
leaq -0x420(%rbp), %rdi
callq 0x8aef0
jmp 0x98787
movq -0x860(%rbp), %rdi
callq 0x9c600
cmpq $0x0, %rax
jne 0x9979e
movq -0x860(%rbp), %rax
movq 0x60(%rax), %rax
movq %rax, -0xac8(%rbp)
leaq -0x851(%rbp), %rdi
movq %rdi, -0xac0(%rbp)
callq 0x30a70
movq -0xac0(%rbp), %rdx
leaq 0x140f80(%rip), %rsi    # 0x1da6a1
leaq -0x850(%rbp), %rdi
callq 0x44470
jmp 0x9972f
movq -0xac8(%rbp), %rdi
leaq -0x850(%rbp), %rsi
callq 0xeada0
jmp 0x99744
leaq -0x850(%rbp), %rdi
callq 0x311e8
leaq -0x851(%rbp), %rdi
callq 0x311c0
jmp 0x9979e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
jmp 0x99790
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
leaq -0x850(%rbp), %rdi
callq 0x311e8
leaq -0x851(%rbp), %rdi
callq 0x311c0
jmp 0x997d4
leaq -0x410(%rbp), %rdi
callq 0x45ac0
leaq -0x258(%rbp), %rdi
callq 0x448d0
leaq -0x230(%rbp), %rdi
callq 0x2f0e0
leaq -0x28(%rbp), %rdi
callq 0x311e8
addq $0xad0, %rsp            # imm = 0xAD0
popq %rbp
retq
leaq -0x410(%rbp), %rdi
callq 0x45ac0
leaq -0x258(%rbp), %rdi
callq 0x448d0
leaq -0x230(%rbp), %rdi
callq 0x2f0e0
leaq -0x28(%rbp), %rdi
callq 0x311e8
movq -0x238(%rbp), %rdi
callq 0x30170
nopl (%rax)