// File: /workspace/github_cpp_makefile_star2_O3/richardposner[P]BioNetFit2/src/code/Data.cpp
// Function: Data::parseData()
void Data::parseData(){  //parsing .exp file
	vector<string> allLines;
	double value;
	Model * mdl=0;
	if ((mid_ >= 0)&& ( (unsigned) mid_ < swarm_->getNumModels())) //Raquel Fixing unsigned vs signed warnings
		mdl=swarm_->options.models[mid_];

//int ii; Raquel fixing unised variable warnings
//cout<<"Data::parseData AAA1. File:"<< dataPath <<".  Enter a number..."; mypause();

	if (swarm_->options.usePipes){
		char buf[5120];
		string line;

		int fd = open(dataPath.c_str(), O_RDONLY);

		if (fd < 0) {
			cout << "Warning: couldn't open " << dataPath << " to gather simulation output." << endl;
		}

		int len;
		while( (len = read(fd, buf, 5120) )){
			buf[len] = 0;
			line = string(buf);
			//cout << line << "!";
			split(line, allLines, "\n");
			//printf("%s", buf);
		}

		if (len < 0) {
			perror("read error");
		}

		close(fd);
	}
	else {

		ifstream dataFile(dataPath);

		std::string line;
		std::string errMsg;

		if (dataFile.is_open()) {
			while (getline(dataFile, line)) {
				allLines.push_back(line);
				//cout << "line: " << line << endl;
			}
		}
		else {
			swarm_->outputError("Error: Couldn't open data file " + dataPath + " for parsing.");
		}
		dataFile.close();
	}

	string replacement = "";
	string basename = boost::regex_replace(getFilename(dataPath),boost::regex("_\\d+_\\d+$"),replacement);

	if(allLines[0].at(0) != '#') {
		swarm_->outputError("Error: Your data file (" + dataPath + ") doesn't contain (#) as the first value.");
	}

	// Do we need to store columns that aren't in .exp?  Maybe not.
	vector<string> columns;
	split(allLines[0], columns, " \t");

	for (vector<string>::iterator l = allLines.begin()+1; l != allLines.end(); ++l) {
		vector<string> values;
		split(*l, values," \t");

		int i = 1;
		for(vector<string>::iterator col = columns.begin(); col != columns.end(); ++col) {

			//cout << "col: " << *col << endl;

			// TODO: Haven't done prefix/exp consistency checks yet so it's possible we're missing
			// a scan parameter.  This needs fixed..
			// Skip column if we encounter a hash, a 'time' column, or a column corresponding to a scan parameter name


			bool scanParam = false;
			if(mdl){
				scanParam = (mdl->actions.find(basename) != mdl->actions.end()) && (*col == mdl->actions.at(basename).scanParam);
			}
			else if((!mdl) && (mid_==-1)){ //check all models
				for(unsigned int m =0; m < swarm_->options.models.size(); m++){
					if((swarm_->options.models.at(m)->actions.find(basename) != swarm_->options.models.at(m)->actions.end()) && (*col == swarm_->options.models.at(m)->actions.at(basename).scanParam)){
						scanParam = true; //break;
						swarm_->outputError("The parameter appears as scan in some of the model files.\n I am quitting since since it is not supported in this version.\n model file name:" + swarm_->options.models.at(m)->getName() + " exp file name:" + basename + " col:"+ *col);
					}
				}
			}
			else{
				swarm_->outputError("Data parsing error. Model is not specified. All models are not requested either. ..."); exit(0);
			}


			if (*col == "#" || *col == "time" || scanParam){
				//cout<<"Swarm::parseData AAA6-1  Enter a number..."; mypause();
				continue;
			}
			else{

				value=0;
				// Replace any NaN's with our own NaN constant
				if (values[i] == "NaN") {
					value = nan("1");
				}
				else {
					value = stod(values[i]);
				}

				// If our column name ends in "_SD" we need to store the value in our stdev map
				if (col->size() > 3 && col->find("_SD") == col->size()-3) {
					string colWithoutSD = boost::regex_replace(*col,boost::regex("_SD$"),string(""));
					cout << "inserting sd at col " << colWithoutSD << ": " << stof(values[0]) << " " << stof(values[i]) << endl;
					//standardDeviations[col].insert(make_pair(stof(values[0]),stof(values[i])));
					standardDeviations[colWithoutSD][stod(values[0])] = stod(values[i]);
					//cout << "test " << colWithoutSD << ": " << standardDeviations[colWithoutSD][stof(values[0])] << endl;
					// TODO: Make sure all SD's have values if we're using objfunc 2, lest we div_by_0
					// TODO: Make sure all normal columns also have SD columns if we're using objfunc 2
				}
				// Insert value into data map
				else {
					dataOrig_[*col][stod(values[0])] = value;
				}
				++i;
			}
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1648, %rsp           # imm = 0x1648
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, 0xc0(%rsp)
movq $0x0, 0xd0(%rsp)
movslq 0x68(%rdi), %rcx
movq 0x150(%rdi), %rax
testq %rcx, %rcx
js 0x480e4
movq 0x15c0(%rax), %rdx
movq 0x15c8(%rax), %rsi
subq %rdx, %rsi
shrq $0x3, %rsi
cmpl %esi, %ecx
jae 0x480e4
movq (%rdx,%rcx,8), %rcx
jmp 0x480e6
xorl %ecx, %ecx
movq %rcx, 0x50(%rsp)
cmpb $0x1, 0x1630(%rax)
jne 0x48254
leaq 0x68(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq 0x70(%rbx), %rdi
xorl %esi, %esi
xorl %eax, %eax
callq 0x226e0
movl %eax, %ebp
testl %eax, %eax
jns 0x48189
movq 0x12de82(%rip), %rdi    # 0x175fa8
leaq 0xaeaa0(%rip), %rsi     # 0xf6bcd
movl $0x17, %edx
callq 0x22ab0
movq 0x70(%rbx), %rsi
movq 0x78(%rbx), %rdx
movq 0x12de62(%rip), %rdi    # 0x175fa8
callq 0x22ab0
movq %rax, %r14
leaq 0xaea90(%rip), %rsi     # 0xf6be5
movl $0x1d, %edx
movq %rax, %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
leaq 0x18(%rsp), %r13
leaq 0x240(%rsp), %r14
leaq 0x8(%rsp), %r15
leaq 0x58(%rsp), %r12
movl $0x1400, %edx           # imm = 0x1400
movl %ebp, %edi
movq %r14, %rsi
callq 0x22e20
testl %eax, %eax
je 0x482fb
cltq
movb $0x0, 0x240(%rsp,%rax)
movq %r13, 0x8(%rsp)
movq %r14, %rdi
callq 0x223a0
leaq (%rsp,%rax), %rdx
addq $0x240, %rdx            # imm = 0x240
movq %r15, %rdi
movq %r14, %rsi
callq 0x321d2
movq %r12, %rdi
movq %r15, %rsi
callq 0x22bb0
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x48206
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x229c0
movq %r13, 0x8(%rsp)
movq %r15, %rdi
leaq 0xb091f(%rip), %rsi     # 0xf8b34
leaq 0xb0919(%rip), %rdx     # 0xf8b35
callq 0x321d2
movq %r12, %rdi
leaq 0xc0(%rsp), %rsi
movq %r15, %rdx
callq 0xbea28
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x481a0
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x481a0
leaq 0x70(%rbx), %r15
leaq 0x240(%rsp), %r14
movq %r14, %rdi
movq %r15, %rsi
movl $0x8, %edx
callq 0x23070
leaq 0x68(%rsp), %r13
movq %r13, -0x10(%r13)
xorl %eax, %eax
movq %rax, -0x8(%r13)
movb %al, (%r13)
leaq 0x18(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq %rax, -0x8(%rbp)
movb %al, (%rbp)
leaq 0x2b8(%rsp), %rdi
callq 0x221e0
testb %al, %al
je 0x4832c
leaq 0x58(%rsp), %r15
leaq 0xc0(%rsp), %r12
movq 0x240(%rsp), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x22940
movsbl %al, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x23300
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x483ee
movq %r12, %rdi
movq %r15, %rsi
callq 0x31cec
jmp 0x482b5
movl %ebp, %edi
callq 0x233e0
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
movq 0x50(%rsp), %r13
je 0x4843b
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x4843b
movq 0x150(%rbx), %r14
leaq 0xae8c9(%rip), %rsi     # 0xf6c03
leaq 0x28(%rsp), %rdi
movq %r15, %rdx
callq 0x31944
leaq 0xa9194(%rip), %rsi     # 0xf14e2
leaq 0x28(%rsp), %rdi
callq 0x233b0
leaq 0x1d0(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x48388
movq %rdx, 0x1c0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x1d0(%rsp)
jmp 0x4838f
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
leaq 0x1c0(%rsp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %r14, %rdi
callq 0x784c2
movq 0x1c0(%rsp), %rdi
cmpq %r15, %rdi
je 0x483d3
movq 0x1d0(%rsp), %rsi
incq %rsi
callq 0x229c0
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x483ee
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x229c0
leaq 0x240(%rsp), %rdi
callq 0x221b0
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x48412
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0x58(%rsp), %rdi
cmpq %r13, %rdi
je 0x48429
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x229c0
leaq 0x240(%rsp), %rdi
callq 0x22200
movq 0x50(%rsp), %r13
leaq 0x250(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0xae823(%rip), %rdx     # 0xf6c71
leaq 0x240(%rsp), %rdi
movq %rdx, %rsi
callq 0x321d2
leaq 0x210(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x70(%rbx), %rsi
movq 0x78(%rbx), %rdx
addq %rsi, %rdx
leaq 0x200(%rsp), %rdi
callq 0x3213c
leaq 0x8(%rsp), %rdi
leaq 0x200(%rsp), %rsi
callq 0xbeb1d
leaq 0xae788(%rip), %rsi     # 0xf6c23
leaq 0x28(%rsp), %rdi
xorl %edx, %edx
callq 0x3186e
leaq 0x1f0(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x240(%rsp), %rsi
movq 0x248(%rsp), %rdx
addq %rsi, %rdx
leaq 0x1e0(%rsp), %rdi
callq 0x3213c
leaq 0x58(%rsp), %rdi
leaq 0x8(%rsp), %rsi
leaq 0x28(%rsp), %rdx
leaq 0x1e0(%rsp), %rcx
xorl %r8d, %r8d
callq 0x4a0a3
movq 0x1e0(%rsp), %rdi
cmpq %r15, %rdi
je 0x4850f
movq 0x1f0(%rsp), %rsi
incq %rsi
callq 0x229c0
leaq 0x30(%rsp), %rdi
callq 0x32268
leaq 0x18(%rsp), %rbp
movq -0x10(%rbp), %rdi
cmpq %rbp, %rdi
je 0x48534
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0x200(%rsp), %rdi
cmpq %r14, %rdi
je 0x48551
movq 0x210(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0xc0(%rsp), %r14
cmpq $0x0, 0x8(%r14)
je 0x491c2
movq (%r14), %rax
cmpb $0x23, (%rax)
je 0x48637
leaq 0x70(%rbx), %rdx
movq 0x150(%rbx), %r14
leaq 0xae6ab(%rip), %rsi     # 0xf6c2d
leaq 0x8(%rsp), %rdi
callq 0x31944
leaq 0xae6b2(%rip), %rsi     # 0xf6c45
leaq 0x8(%rsp), %rdi
callq 0x233b0
leaq 0x1b0(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x485cd
movq %rdx, 0x1a0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x1b0(%rsp)
jmp 0x485d4
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
leaq 0x1a0(%rsp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %r14, %rdi
callq 0x784c2
movq 0x1a0(%rsp), %rdi
cmpq %r15, %rdi
je 0x48618
movq 0x1b0(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x4862f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0xc0(%rsp), %r14
xorps %xmm0, %xmm0
movaps %xmm0, 0x120(%rsp)
movq $0x0, 0x130(%rsp)
leaq 0x8(%rsp), %rdi
movq %rbp, (%rdi)
leaq 0xae612(%rip), %rsi     # 0xf6c6f
leaq 0xae60d(%rip), %rdx     # 0xf6c71
callq 0x321d2
leaq 0x120(%rsp), %rsi
leaq 0x8(%rsp), %rdx
movq %r14, %rdi
callq 0xbea28
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x48695
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0xc0(%rsp), %r14
addq $0x20, %r14
cmpq 0xc8(%rsp), %r14
je 0x49059
leaq 0x8(%r13), %rax
movq %rax, 0x198(%rsp)
leaq 0x90(%rbx), %rax
movq %rax, 0x190(%rsp)
leaq 0x8(%rbx), %rax
movq %rax, 0x180(%rsp)
leaq 0x8(%rsp), %r15
xorps %xmm0, %xmm0
movaps %xmm0, 0xa0(%rsp)
movq $0x0, 0xb0(%rsp)
movq %rbp, 0x8(%rsp)
movq %r15, %rdi
leaq 0xae56e(%rip), %rsi     # 0xf6c6f
leaq 0xae569(%rip), %rdx     # 0xf6c71
callq 0x321d2
movq %r14, %rdi
leaq 0xa0(%rsp), %rsi
movq %r15, %rdx
callq 0xbea28
movq %r14, 0x188(%rsp)
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x4873f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0x120(%rsp), %r15
cmpq 0x128(%rsp), %r15
je 0x4902d
movl $0x1, 0x7c(%rsp)
testq %r13, %r13
je 0x487b8
movq %r13, %rdi
leaq 0x58(%rsp), %rsi
callq 0x4c616
cmpq 0x198(%rsp), %rax
je 0x48ba8
movq %r13, %rdi
leaq 0x58(%rsp), %rsi
callq 0x4a17a
movq 0x8(%r15), %rdx
cmpq 0x50(%rax), %rdx
jne 0x48ba8
testq %rdx, %rdx
je 0x48e76
movq 0x48(%rax), %rsi
movq (%r15), %rdi
callq 0x229f0
testl %eax, %eax
sete %r12b
jmp 0x48bab
cmpl $-0x1, 0x68(%rbx)
movq 0x150(%rbx), %r14
jne 0x490e7
movq 0x15c0(%r14), %rax
cmpq %rax, 0x15c8(%r14)
je 0x48ba8
movl $0x1, %r13d
xorl %r14d, %r14d
xorl %r12d, %r12d
movq (%rax,%r14,8), %rdi
leaq 0x58(%rsp), %rsi
callq 0x4c616
movq 0x150(%rbx), %rdx
movq 0x15c0(%rdx), %rcx
movq 0x15c8(%rdx), %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
cmpq %r14, %rdx
jbe 0x490c5
movq (%rcx,%r14,8), %rdi
leaq 0x8(%rdi), %rcx
cmpq %rcx, %rax
je 0x48b7b
leaq 0x58(%rsp), %rsi
callq 0x4a17a
movq 0x8(%r15), %rdx
cmpq 0x50(%rax), %rdx
jne 0x48b7b
testq %rdx, %rdx
je 0x4885e
movq 0x48(%rax), %rsi
movq (%r15), %rdi
callq 0x229f0
testl %eax, %eax
jne 0x48b7b
movq 0x150(%rbx), %r12
movq 0x15c0(%r12), %rax
movq 0x15c8(%r12), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq %r14, %rdx
jbe 0x490d6
movq (%rax,%r14,8), %rax
leaq 0x170(%rsp), %rcx
movq %rcx, 0x160(%rsp)
movq 0x68(%rax), %rsi
movq 0x70(%rax), %rdx
addq %rsi, %rdx
leaq 0x160(%rsp), %r14
movq %r14, %rdi
callq 0x3213c
movl $0x8b, %r8d
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
leaq 0xae3aa(%rip), %rcx     # 0xf6c72
callq 0x22a80
leaq 0x90(%rsp), %rsi
movq %rsi, 0x80(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x48901
movq %rdx, 0x80(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x90(%rsp)
jmp 0x48907
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x88(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x80(%rsp), %rdi
leaq 0xae3cd(%rip), %rsi     # 0xf6cfe
callq 0x233b0
leaq 0xf0(%rsp), %rsi
movq %rsi, 0xe0(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x4896a
movq %rdx, 0xe0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xf0(%rsp)
jmp 0x48970
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0xe8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x58(%rsp), %rsi
movq 0x60(%rsp), %rdx
leaq 0xe0(%rsp), %rdi
callq 0x222b0
leaq 0x38(%rsp), %rsi
movq %rsi, 0x28(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x489ca
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x489d0
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x30(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x28(%rsp), %rdi
leaq 0xae31a(%rip), %rsi     # 0xf6d0e
callq 0x233b0
movq %rbp, 0x8(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x48a1c
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x48a23
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
leaq 0x8(%rsp), %rdi
callq 0x222b0
leaq 0x110(%rsp), %rsi
movq %rsi, 0x100(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x48a80
movq %rdx, 0x100(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x110(%rsp)
jmp 0x48a86
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x108(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %r12, %rdi
leaq 0x100(%rsp), %rsi
callq 0x784c2
movq 0x100(%rsp), %rdi
leaq 0x110(%rsp), %rax
cmpq %rax, %rdi
je 0x48ad6
movq 0x110(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x48aed
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x48b09
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0xe0(%rsp), %rdi
leaq 0xf0(%rsp), %rax
cmpq %rax, %rdi
je 0x48b2e
movq 0xf0(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x48b53
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0x160(%rsp), %rdi
leaq 0x170(%rsp), %rax
cmpq %rax, %rdi
je 0x48b78
movq 0x170(%rsp), %rsi
incq %rsi
callq 0x229c0
movb $0x1, %r12b
movl %r13d, %r14d
movq 0x150(%rbx), %rcx
movq 0x15c0(%rcx), %rax
movq 0x15c8(%rcx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
incl %r13d
cmpq %r14, %rcx
ja 0x487e9
jmp 0x48bab
xorl %r12d, %r12d
movq %r15, %rdi
leaq 0xaf58e(%rip), %rsi     # 0xf8143
callq 0x22250
testl %eax, %eax
je 0x48bd9
movq %r15, %rdi
leaq 0xa8be2(%rip), %rsi     # 0xf17aa
callq 0x22250
testl %eax, %eax
sete %al
orb %r12b, %al
testb $0x1, %al
je 0x48be3
movq 0x50(%rsp), %r13
jmp 0x48e5f
movslq 0x7c(%rsp), %r12
shlq $0x5, %r12
movq 0xa0(%rsp), %rdi
addq %r12, %rdi
leaq 0xae16b(%rip), %rsi     # 0xf6d69
callq 0x22250
testl %eax, %eax
je 0x48c63
movq %rbx, %r13
movq %rbp, %rbx
movq 0xa0(%rsp), %rax
movq %r12, %rbp
movq (%rax,%r12), %r12
callq 0x22070
movq %rax, %r14
movl (%rax), %eax
movl %eax, 0x4(%rsp)
movl $0x0, (%r14)
movq %r12, %rdi
leaq 0x8(%rsp), %rsi
callq 0x22760
movsd %xmm0, 0x48(%rsp)
cmpq %r12, 0x8(%rsp)
je 0x4913e
movl (%r14), %eax
testl %eax, %eax
je 0x48c77
cmpl $0x22, %eax
movq %rbp, %r12
jne 0x48c81
jmp 0x49156
leaq 0xaff72(%rip), %rdi     # 0xf8bdc
callq 0x22130
movsd %xmm0, 0x48(%rsp)
jmp 0x48c87
movl 0x4(%rsp), %eax
movl %eax, (%r14)
movq %rbp, %r12
movq %rbx, %rbp
movq %r13, %rbx
cmpq $0x4, 0x8(%r15)
jb 0x48dda
movl $0x3, %ecx
movq %r15, %rdi
leaq 0xae0cc(%rip), %rsi     # 0xf6d6d
xorl %edx, %edx
callq 0x231f0
movq 0x8(%r15), %rcx
addq $-0x3, %rcx
cmpq %rcx, %rax
jne 0x48dda
leaq 0x28(%rsp), %rdi
leaq 0xae0ac(%rip), %rsi     # 0xf6d71
xorl %edx, %edx
callq 0x3186e
leaq 0x150(%rsp), %rax
movq %rax, 0x140(%rsp)
leaq 0x140(%rsp), %r14
movq %r14, %rdi
leaq 0xadf83(%rip), %rdx     # 0xf6c71
movq %rdx, %rsi
callq 0x321d2
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
leaq 0x28(%rsp), %rdx
movq %r14, %rcx
xorl %r8d, %r8d
callq 0x4a0a3
movq %r12, 0x48(%rsp)
movq 0x140(%rsp), %rdi
leaq 0x150(%rsp), %rax
cmpq %rax, %rdi
je 0x48d38
movq 0x150(%rsp), %rsi
incq %rsi
callq 0x229c0
leaq 0x30(%rsp), %rdi
callq 0x32268
movl $0x14, %edx
movq 0x12d25a(%rip), %rdi    # 0x175fa8
leaq 0xae021(%rip), %rsi     # 0xf6d76
callq 0x22ab0
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq 0x12d23d(%rip), %rdi    # 0x175fa8
callq 0x22ab0
movq %rax, %r14
movl $0x2, %edx
movq %rax, %rdi
leaq 0xa8dda(%rip), %rsi     # 0xf1b5c
callq 0x22ab0
movq 0xa0(%rsp), %rax
movq (%rax), %r13
callq 0x22070
movq %rax, %r12
movl (%rax), %eax
movl %eax, 0x4(%rsp)
movl $0x0, (%r12)
movq %r13, %rdi
leaq 0x28(%rsp), %rsi
callq 0x22cc0
cmpq %r13, 0x28(%rsp)
je 0x49162
movl (%r12), %eax
testl %eax, %eax
je 0x48e7e
cmpl $0x22, %eax
jne 0x48e86
jmp 0x49192
movq 0x190(%rsp), %rdi
movq %r15, %rsi
callq 0x4a1ce
movq %rax, %r12
movq 0xa0(%rsp), %rax
movq (%rax), %r13
callq 0x22070
movq %rax, %r14
movl (%rax), %ebp
movl $0x0, (%rax)
movq %r13, %rdi
leaq 0x8(%rsp), %rsi
callq 0x22760
cmpq %r13, 0x8(%rsp)
je 0x49132
movl (%r14), %eax
testl %eax, %eax
movq 0x50(%rsp), %r13
je 0x48e36
cmpl $0x22, %eax
jne 0x48e39
jmp 0x4914a
movl %ebp, (%r14)
movsd %xmm0, 0x28(%rsp)
movq %r12, %rdi
leaq 0x28(%rsp), %rsi
callq 0x4a24a
movsd 0x48(%rsp), %xmm0
movsd %xmm0, (%rax)
leaq 0x18(%rsp), %rbp
incl 0x7c(%rsp)
addq $0x20, %r15
cmpq 0x128(%rsp), %r15
jne 0x4875d
jmp 0x4902d
movb $0x1, %r12b
jmp 0x48bab
movl 0x4(%rsp), %eax
movl %eax, (%r12)
cvtss2sd %xmm0, %xmm0
movq %r14, %rdi
callq 0x23060
movq %rax, %r14
movl $0x1, %edx
movq %rax, %rdi
leaq 0xb8580(%rip), %rsi     # 0x101424
callq 0x22ab0
movq 0xa0(%rsp), %rax
movq 0x48(%rsp), %rcx
movq (%rax,%rcx), %r13
movl (%r12), %eax
movl %eax, 0x4(%rsp)
movl $0x0, (%r12)
movq %r13, %rdi
leaq 0x28(%rsp), %rsi
callq 0x22cc0
cmpq %r13, 0x28(%rsp)
je 0x4916e
movl (%r12), %eax
testl %eax, %eax
je 0x48ef4
cmpl $0x22, %eax
jne 0x48efc
jmp 0x4919e
movl 0x4(%rsp), %eax
movl %eax, (%r12)
cvtss2sd %xmm0, %xmm0
movq %r14, %rdi
callq 0x23060
movq %rax, %r14
movq (%rax), %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
movq 0xa0(%rsp), %rax
movq 0x48(%rsp), %rcx
movq (%rax,%rcx), %r14
movl (%r12), %r13d
movl $0x0, (%r12)
movq %r14, %rdi
leaq 0x28(%rsp), %rsi
callq 0x22760
movsd %xmm0, 0x48(%rsp)
cmpq %r14, 0x28(%rsp)
je 0x4917a
movl (%r12), %eax
testl %eax, %eax
je 0x48f7f
cmpl $0x22, %eax
jne 0x48f83
jmp 0x491b6
movl %r13d, (%r12)
movq 0x180(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x4a1ce
movq %rax, %r14
movq 0xa0(%rsp), %rax
movq (%rax), %r13
movl (%r12), %eax
movl %eax, 0x4(%rsp)
movl $0x0, (%r12)
movq %r13, %rdi
leaq 0x28(%rsp), %rsi
callq 0x22760
cmpq %r13, 0x28(%rsp)
je 0x49186
movl (%r12), %eax
testl %eax, %eax
movq 0x50(%rsp), %r13
je 0x48fe2
cmpl $0x22, %eax
jne 0x48fea
jmp 0x491aa
movl 0x4(%rsp), %eax
movl %eax, (%r12)
movsd %xmm0, 0xe0(%rsp)
movq %r14, %rdi
leaq 0xe0(%rsp), %rsi
callq 0x4a24a
movsd 0x48(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x48e5b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x48e5b
leaq 0xa0(%rsp), %rdi
callq 0x31a0a
movq 0x188(%rsp), %r14
addq $0x20, %r14
cmpq 0xc8(%rsp), %r14
leaq 0x8(%rsp), %r15
jne 0x486db
leaq 0x120(%rsp), %rdi
callq 0x31a0a
leaq 0x68(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x49081
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0x240(%rsp), %rdi
leaq 0x250(%rsp), %rax
cmpq %rax, %rdi
je 0x490a6
movq 0x250(%rsp), %rsi
incq %rsi
callq 0x229c0
leaq 0xc0(%rsp), %rdi
callq 0x31a0a
addq $0x1648, %rsp           # imm = 0x1648
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xaa5ad(%rip), %rdi     # 0xf3679
movq %r14, %rsi
xorl %eax, %eax
callq 0x22f40
leaq 0xaa59c(%rip), %rdi     # 0xf3679
movq %r14, %rsi
xorl %eax, %eax
callq 0x22f40
leaq 0x230(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xadc1a(%rip), %rsi     # 0xf6d14
leaq 0xadc67(%rip), %rdx     # 0xf6d68
leaq 0x220(%rsp), %rdi
callq 0x321d2
leaq 0x220(%rsp), %rsi
movq %r14, %rdi
callq 0x784c2
leaq 0x220(%rsp), %rdi
callq 0x23470
xorl %edi, %edi
callq 0x22b90
leaq 0xa9602(%rip), %rdi     # 0xf273b
callq 0x225a0
leaq 0xa95f6(%rip), %rdi     # 0xf273b
callq 0x225a0
leaq 0xa95ea(%rip), %rdi     # 0xf273b
callq 0x22e40
leaq 0xa95de(%rip), %rdi     # 0xf273b
callq 0x22e40
leaq 0xa95cd(%rip), %rdi     # 0xf2736
callq 0x225a0
leaq 0xa95c1(%rip), %rdi     # 0xf2736
callq 0x225a0
leaq 0xa95ba(%rip), %rdi     # 0xf273b
callq 0x225a0
leaq 0xa95ae(%rip), %rdi     # 0xf273b
callq 0x225a0
leaq 0xa959d(%rip), %rdi     # 0xf2736
callq 0x22e40
leaq 0xa9591(%rip), %rdi     # 0xf2736
callq 0x22e40
leaq 0xa958a(%rip), %rdi     # 0xf273b
callq 0x22e40
leaq 0xa957e(%rip), %rdi     # 0xf273b
callq 0x22e40
leaq 0xae928(%rip), %rdi     # 0xf7af1
xorl %esi, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0x22f40
movq %rax, %rbx
movq 0x1c0(%rsp), %rdi
cmpq %r15, %rdi
je 0x491f9
movq 0x1d0(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x491f9
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x49381
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x49381
jmp 0x4937e
jmp 0x49354
movq %rax, %rbx
movq 0x1a0(%rsp), %rdi
cmpq %r15, %rdi
je 0x4924c
movq 0x1b0(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x4924c
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x495df
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x495df
jmp 0x492a8
jmp 0x4937e
jmp 0x4932a
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x495d2
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x495d2
movq %rax, %rbx
jmp 0x495d2
movq %rax, %rbx
jmp 0x495df
movq %rax, %rbx
movq 0x1e0(%rsp), %rdi
cmpq %r15, %rdi
je 0x492d5
movq 0x1f0(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x492d5
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x32268
jmp 0x492e4
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x49304
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x49304
movq %rax, %rbx
movq 0x200(%rsp), %rdi
cmpq %r14, %rdi
je 0x495fa
movq 0x210(%rsp), %rsi
jmp 0x495f2
movq %rax, %rbx
jmp 0x495fa
movq %rax, %rbx
jmp 0x4961f
jmp 0x49354
jmp 0x49354
jmp 0x49354
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x49357
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x49357
movq %rax, %rbx
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x4961f
movq 0x68(%rsp), %rsi
jmp 0x49617
jmp 0x495c2
jmp 0x4949f
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x49398
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0x58(%rsp), %rdi
cmpq %r13, %rdi
je 0x493af
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x229c0
leaq 0x240(%rsp), %rdi
callq 0x22200
jmp 0x4961f
movq %rax, %rbx
jmp 0x49451
jmp 0x495c2
movq %rax, %rbx
jmp 0x493fb
movq %rax, %rbx
movq 0x140(%rsp), %rdi
leaq 0x150(%rsp), %rax
cmpq %rax, %rdi
je 0x493fb
movq 0x150(%rsp), %rsi
incq %rsi
callq 0x229c0
leaq 0x30(%rsp), %rdi
callq 0x32268
jmp 0x495c5
movq %rax, %rbx
movq 0x220(%rsp), %rdi
cmpq %r15, %rdi
je 0x495c5
movq 0x230(%rsp), %rsi
jmp 0x495b2
movq %rax, %rbx
cmpl $0x0, (%r12)
jne 0x49451
movl %r13d, (%r12)
jmp 0x49451
jmp 0x4943f
jmp 0x4943f
movq %rax, %rbx
cmpl $0x0, (%r12)
jne 0x49451
movl 0x4(%rsp), %eax
movl %eax, (%r12)
leaq 0x18(%rsp), %rbp
jmp 0x494a2
jmp 0x495c2
jmp 0x495c2
jmp 0x495c2
movq %rax, %rbx
cmpl $0x0, (%r14)
jne 0x495c5
movl 0x4(%rsp), %eax
movl %eax, (%r14)
jmp 0x495c5
movq %rax, %rbx
cmpl $0x0, (%r14)
jne 0x495c5
movl %ebp, (%r14)
jmp 0x495c5
jmp 0x495c2
jmp 0x495c2
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x495c5
movq 0x18(%rsp), %rsi
jmp 0x495b2
jmp 0x495c2
movq %rax, %rbx
movq 0x100(%rsp), %rdi
leaq 0x110(%rsp), %rax
cmpq %rax, %rdi
je 0x494f9
movq 0x110(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x494f9
movq %rax, %rbx
leaq 0x90(%rsp), %r14
jmp 0x49518
movq %rax, %rbx
leaq 0x90(%rsp), %r14
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x49518
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x49541
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x49541
movq %rax, %rbx
leaq 0x90(%rsp), %r14
movq 0xe0(%rsp), %rdi
leaq 0xf0(%rsp), %rax
cmpq %rax, %rdi
je 0x49573
movq 0xf0(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x49573
movq %rax, %rbx
leaq 0x90(%rsp), %r14
movq 0x80(%rsp), %rdi
cmpq %r14, %rdi
je 0x49595
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x49595
movq %rax, %rbx
movq 0x160(%rsp), %rdi
leaq 0x170(%rsp), %rax
cmpq %rax, %rdi
je 0x495c5
movq 0x170(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x495c5
jmp 0x495c2
jmp 0x495c2
jmp 0x495c2
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
callq 0x31a0a
leaq 0x120(%rsp), %rdi
callq 0x31a0a
leaq 0x68(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x495fa
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x229c0
leaq 0x250(%rsp), %rax
movq 0x240(%rsp), %rdi
cmpq %rax, %rdi
je 0x4961f
movq 0x250(%rsp), %rsi
incq %rsi
callq 0x229c0
leaq 0xc0(%rsp), %rdi
callq 0x31a0a
movq %rbx, %rdi
callq 0x23240