// File: /workspace/github_cpp_makefile_star2_O1/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), %rax
testq %rax, %rax
js 0x4831a
movq 0x150(%rbx), %rdx
movq 0x15c0(%rdx), %rcx
movq 0x15c8(%rdx), %rdx
subq %rcx, %rdx
shrq $0x3, %rdx
cmpl %edx, %eax
jae 0x4831a
movq (%rcx,%rax,8), %rax
jmp 0x4831c
xorl %eax, %eax
movq %rax, 0x50(%rsp)
movq 0x150(%rbx), %rax
cmpb $0x1, 0x1630(%rax)
jne 0x48491
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 0x483c6
movq 0x12dc2d(%rip), %rdi    # 0x175f90
leaq 0xae8b3(%rip), %rsi     # 0xf6c1d
movl $0x17, %edx
callq 0x22ab0
movq 0x70(%rbx), %rsi
movq 0x78(%rbx), %rdx
movq 0x12dc0d(%rip), %rdi    # 0x175f90
callq 0x22ab0
movq %rax, %r14
leaq 0xae8a3(%rip), %rsi     # 0xf6c35
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 0x48534
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 0x32210
movq %r12, %rdi
movq %r15, %rsi
callq 0x22bb0
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x48443
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x229c0
movq %r13, 0x8(%rsp)
movq %r15, %rdi
leaq 0xb0702(%rip), %rsi     # 0xf8b54
leaq 0xb06fc(%rip), %rdx     # 0xf8b55
callq 0x32210
movq %r12, %rdi
leaq 0xc0(%rsp), %rsi
movq %r15, %rdx
callq 0xbf342
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x483dd
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x483dd
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 0x48560
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 0x48622
movq %r12, %rdi
movq %r15, %rsi
callq 0x31d52
jmp 0x484ee
movl %ebp, %edi
callq 0x233e0
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x4866a
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x4866a
movq 0x150(%rbx), %r14
leaq 0xae6e5(%rip), %rsi     # 0xf6c53
leaq 0x28(%rsp), %rdi
movq %r15, %rdx
callq 0x319d8
leaq 0xa8f80(%rip), %rsi     # 0xf1502
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 0x485bc
movq %rdx, 0x1c0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x1d0(%rsp)
jmp 0x485c3
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 0x78b66
movq 0x1c0(%rsp), %rdi
cmpq %r15, %rdi
je 0x48607
movq 0x1d0(%rsp), %rsi
incq %rsi
callq 0x229c0
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x48622
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x229c0
leaq 0x240(%rsp), %rdi
callq 0x221b0
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x48646
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0x58(%rsp), %rdi
cmpq %r13, %rdi
je 0x4865d
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x229c0
leaq 0x240(%rsp), %rdi
callq 0x22200
leaq 0x250(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0xae644(%rip), %rdx     # 0xf6cc1
leaq 0x240(%rsp), %rdi
movq %rdx, %rsi
callq 0x32210
leaq 0x210(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x70(%rbx), %rsi
movq 0x78(%rbx), %rdx
addq %rsi, %rdx
leaq 0x200(%rsp), %rdi
callq 0x32180
leaq 0x8(%rsp), %rdi
leaq 0x200(%rsp), %rsi
callq 0xbf437
leaq 0xae5a9(%rip), %rsi     # 0xf6c73
leaq 0x28(%rsp), %rdi
xorl %edx, %edx
callq 0x31902
leaq 0x1f0(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x240(%rsp), %rsi
movq 0x248(%rsp), %rdx
addq %rsi, %rdx
leaq 0x1e0(%rsp), %rdi
callq 0x32180
leaq 0x58(%rsp), %rdi
leaq 0x8(%rsp), %rsi
leaq 0x28(%rsp), %rdx
leaq 0x1e0(%rsp), %rcx
xorl %r8d, %r8d
callq 0x4a2c9
movq 0x1e0(%rsp), %rdi
cmpq %r15, %rdi
je 0x4873e
movq 0x1f0(%rsp), %rsi
incq %rsi
callq 0x229c0
leaq 0x30(%rsp), %rdi
callq 0x322a0
leaq 0x18(%rsp), %rbp
movq -0x10(%rbp), %rdi
cmpq %rbp, %rdi
movq 0x50(%rsp), %r15
je 0x48768
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0x200(%rsp), %rdi
cmpq %r14, %rdi
je 0x48785
movq 0x210(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0xc0(%rsp), %rax
movq 0x8(%rax), %rdx
testq %rdx, %rdx
je 0x493ee
movq (%rax), %rax
cmpb $0x23, (%rax)
je 0x4886a
leaq 0x70(%rbx), %rdx
movq 0x150(%rbx), %r14
leaq 0xae4c5(%rip), %rsi     # 0xf6c7d
leaq 0x8(%rsp), %rdi
callq 0x319d8
leaq 0xae4cc(%rip), %rsi     # 0xf6c95
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 0x48803
movq %rdx, 0x1a0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x1b0(%rsp)
jmp 0x4880a
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 0x78b66
movq 0x1a0(%rsp), %rdi
cmpq %r15, %rdi
je 0x4884e
movq 0x1b0(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
movq 0x50(%rsp), %r15
je 0x4886a
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x229c0
xorps %xmm0, %xmm0
movaps %xmm0, 0x120(%rsp)
movq $0x0, 0x130(%rsp)
movq 0xc0(%rsp), %r14
leaq 0x8(%rsp), %rdi
movq %rbp, (%rdi)
leaq 0xae427(%rip), %rsi     # 0xf6cbf
leaq 0xae422(%rip), %rdx     # 0xf6cc1
callq 0x32210
leaq 0x120(%rsp), %rsi
leaq 0x8(%rsp), %rdx
movq %r14, %rdi
callq 0xbf342
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x488d0
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0xc0(%rsp), %r14
addq $0x20, %r14
cmpq 0xc8(%rsp), %r14
je 0x49285
leaq 0x8(%r15), %rax
movq %rax, 0x198(%rsp)
leaq 0x90(%rbx), %rax
movq %rax, 0x190(%rsp)
leaq 0x8(%rbx), %rax
movq %rax, 0x180(%rsp)
leaq 0x8(%rsp), %r12
leaq 0x80(%rsp), %r13
xorps %xmm0, %xmm0
movaps %xmm0, 0x80(%rsp)
movq $0x0, 0x90(%rsp)
movq %rbp, 0x8(%rsp)
movq %r12, %rdi
leaq 0xae37b(%rip), %rsi     # 0xf6cbf
leaq 0xae376(%rip), %rdx     # 0xf6cc1
callq 0x32210
movq %r14, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0xbf342
movq %r14, 0x188(%rsp)
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x4897d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0x120(%rsp), %r13
cmpq 0x128(%rsp), %r13
je 0x49256
movl $0x1, 0x7c(%rsp)
testq %r15, %r15
je 0x489f7
movq %r15, %rdi
leaq 0x58(%rsp), %rsi
callq 0x4c8de
cmpq 0x198(%rsp), %rax
je 0x48de0
movq %r15, %rdi
leaq 0x58(%rsp), %rsi
callq 0x4a3a0
movq 0x8(%r13), %rdx
cmpq 0x50(%rax), %rdx
jne 0x48de0
testq %rdx, %rdx
je 0x490ac
movq 0x48(%rax), %rsi
movq (%r13), %rdi
callq 0x229f0
testl %eax, %eax
sete %r15b
jmp 0x48de3
cmpl $-0x1, 0x68(%rbx)
movq 0x150(%rbx), %r14
jne 0x49313
movq 0x15c0(%r14), %rax
cmpq %rax, 0x15c8(%r14)
je 0x48de0
movl $0x1, %r12d
xorl %r14d, %r14d
xorl %r15d, %r15d
movq (%rax,%r14,8), %rdi
leaq 0x58(%rsp), %rsi
callq 0x4c8de
movq 0x150(%rbx), %rdx
movq 0x15c0(%rdx), %rcx
movq 0x15c8(%rdx), %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
cmpq %r14, %rdx
jbe 0x492f1
movq (%rcx,%r14,8), %rdi
leaq 0x8(%rdi), %rcx
cmpq %rcx, %rax
je 0x48db3
leaq 0x58(%rsp), %rsi
callq 0x4a3a0
movq 0x8(%r13), %rdx
cmpq 0x50(%rax), %rdx
jne 0x48db3
testq %rdx, %rdx
je 0x48a9e
movq 0x48(%rax), %rsi
movq (%r13), %rdi
callq 0x229f0
testl %eax, %eax
jne 0x48db3
movq 0x150(%rbx), %r15
movq 0x15c0(%r15), %rax
movq 0x15c8(%r15), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq %r14, %rdx
jbe 0x49302
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 0x32180
movl $0x8b, %r8d
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
leaq 0xae1bc(%rip), %rcx     # 0xf6cc2
callq 0x22a80
leaq 0xb0(%rsp), %rsi
movq %rsi, 0xa0(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x48b3f
movq %rdx, 0xa0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xb0(%rsp)
jmp 0x48b45
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
leaq 0x110(%rsp), %r14
movq 0x8(%rax), %rdx
movq %rdx, 0xa8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0xa0(%rsp), %rdi
leaq 0xae1d7(%rip), %rsi     # 0xf6d4e
callq 0x233b0
leaq 0xf0(%rsp), %rsi
movq %rsi, 0xe0(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x48bb0
movq %rdx, 0xe0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xf0(%rsp)
jmp 0x48bb6
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 0x48c10
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x48c16
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 0xae124(%rip), %rsi     # 0xf6d5e
callq 0x233b0
movq %rbp, 0x8(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x48c62
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x48c69
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 (%r13), %rsi
movq 0x8(%r13), %rdx
leaq 0x8(%rsp), %rdi
callq 0x222b0
movq %r14, 0x100(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x48cbf
movq %rdx, 0x100(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x110(%rsp)
jmp 0x48cc6
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
movq %rdx, 0x108(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %r15, %rdi
leaq 0x100(%rsp), %rsi
callq 0x78b66
movq 0x100(%rsp), %rdi
cmpq %r14, %rdi
leaq 0xb0(%rsp), %r14
je 0x48d16
movq 0x110(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x48d2d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x48d49
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0xe0(%rsp), %rdi
leaq 0xf0(%rsp), %rax
cmpq %rax, %rdi
je 0x48d6e
movq 0xf0(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0xa0(%rsp), %rdi
cmpq %r14, %rdi
je 0x48d8b
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0x160(%rsp), %rdi
leaq 0x170(%rsp), %rax
cmpq %rax, %rdi
je 0x48db0
movq 0x170(%rsp), %rsi
incq %rsi
callq 0x229c0
movb $0x1, %r15b
movl %r12d, %r14d
movq 0x150(%rbx), %rcx
movq 0x15c0(%rcx), %rax
movq 0x15c8(%rcx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
incl %r12d
cmpq %r14, %rcx
ja 0x48a28
jmp 0x48de3
xorl %r15d, %r15d
movq %r13, %rdi
leaq 0xaf3a6(%rip), %rsi     # 0xf8193
callq 0x22250
testl %eax, %eax
je 0x48e11
movq %r13, %rdi
leaq 0xa89ca(%rip), %rsi     # 0xf17ca
callq 0x22250
testl %eax, %eax
sete %al
orb %r15b, %al
testb $0x1, %al
je 0x48e1b
movq 0x50(%rsp), %r15
jmp 0x49095
movslq 0x7c(%rsp), %r15
shlq $0x5, %r15
movq 0x80(%rsp), %rdi
addq %r15, %rdi
leaq 0xadf83(%rip), %rsi     # 0xf6db9
callq 0x22250
testl %eax, %eax
je 0x48e9b
movq %rbx, %r12
movq %rbp, %rbx
movq 0x80(%rsp), %rax
movq %r15, %rbp
movq (%rax,%r15), %r15
callq 0x22070
movq %rax, %r14
movl (%rax), %eax
movl %eax, 0x4(%rsp)
movl $0x0, (%r14)
movq %r15, %rdi
leaq 0x8(%rsp), %rsi
callq 0x22760
movsd %xmm0, 0x48(%rsp)
cmpq %r15, 0x8(%rsp)
je 0x4936a
movl (%r14), %eax
testl %eax, %eax
je 0x48eaf
cmpl $0x22, %eax
movq %rbp, %r15
jne 0x48eb9
jmp 0x49382
leaq 0xafd5a(%rip), %rdi     # 0xf8bfc
callq 0x22130
movsd %xmm0, 0x48(%rsp)
jmp 0x48ebf
movl 0x4(%rsp), %eax
movl %eax, (%r14)
movq %rbp, %r15
movq %rbx, %rbp
movq %r12, %rbx
cmpq $0x4, 0x8(%r13)
jb 0x49010
movl $0x3, %ecx
movq %r13, %rdi
leaq 0xadee4(%rip), %rsi     # 0xf6dbd
xorl %edx, %edx
callq 0x231f0
movq 0x8(%r13), %rcx
addq $-0x3, %rcx
cmpq %rcx, %rax
jne 0x49010
leaq 0x28(%rsp), %rdi
leaq 0xadec4(%rip), %rsi     # 0xf6dc1
xorl %edx, %edx
callq 0x31902
leaq 0x150(%rsp), %rax
movq %rax, 0x140(%rsp)
leaq 0x140(%rsp), %r14
movq %r14, %rdi
leaq 0xadd9b(%rip), %rdx     # 0xf6cc1
movq %rdx, %rsi
callq 0x32210
leaq 0x8(%rsp), %rdi
movq %r13, %rsi
leaq 0x28(%rsp), %rdx
movq %r14, %rcx
xorl %r8d, %r8d
callq 0x4a2c9
movq %r15, 0x48(%rsp)
movq 0x140(%rsp), %rdi
leaq 0x150(%rsp), %rax
cmpq %rax, %rdi
je 0x48f70
movq 0x150(%rsp), %rsi
incq %rsi
callq 0x229c0
leaq 0x30(%rsp), %rdi
callq 0x322a0
movl $0x14, %edx
movq 0x12d00a(%rip), %rdi    # 0x175f90
leaq 0xade39(%rip), %rsi     # 0xf6dc6
callq 0x22ab0
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq 0x12cfed(%rip), %rdi    # 0x175f90
callq 0x22ab0
movq %rax, %r14
movl $0x2, %edx
movq %rax, %rdi
leaq 0xa8bc2(%rip), %rsi     # 0xf1b7c
callq 0x22ab0
movq 0x80(%rsp), %rax
movq (%rax), %r12
callq 0x22070
movq %rax, %r15
movl (%rax), %eax
movl %eax, 0x4(%rsp)
movl $0x0, (%r15)
movq %r12, %rdi
leaq 0x28(%rsp), %rsi
callq 0x22cc0
cmpq %r12, 0x28(%rsp)
je 0x4938e
movl (%r15), %eax
testl %eax, %eax
je 0x490b4
cmpl $0x22, %eax
jne 0x490bb
jmp 0x493be
movq 0x190(%rsp), %rdi
movq %r13, %rsi
callq 0x4a3f4
movq %rax, %r15
movq 0x80(%rsp), %rax
movq (%rax), %r12
callq 0x22070
movq %rax, %r14
movl (%rax), %ebp
movl $0x0, (%rax)
movq %r12, %rdi
leaq 0x8(%rsp), %rsi
callq 0x22760
cmpq %r12, 0x8(%rsp)
je 0x4935e
movl (%r14), %eax
testl %eax, %eax
je 0x49067
cmpl $0x22, %eax
jne 0x4906a
jmp 0x49376
movl %ebp, (%r14)
movsd %xmm0, 0x28(%rsp)
movq %r15, %rdi
leaq 0x28(%rsp), %rsi
callq 0x4a470
movsd 0x48(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x50(%rsp), %r15
leaq 0x18(%rsp), %rbp
incl 0x7c(%rsp)
addq $0x20, %r13
cmpq 0x128(%rsp), %r13
jne 0x4899b
jmp 0x49256
movb $0x1, %r15b
jmp 0x48de3
movl 0x4(%rsp), %eax
movl %eax, (%r15)
cvtss2sd %xmm0, %xmm0
movq %r14, %rdi
callq 0x23060
movq %rax, %r14
movl $0x1, %edx
movq %rax, %rdi
leaq 0xb8364(%rip), %rsi     # 0x10143d
callq 0x22ab0
movq 0x80(%rsp), %rax
movq 0x48(%rsp), %rcx
movq (%rax,%rcx), %r12
movl (%r15), %eax
movl %eax, 0x4(%rsp)
movl $0x0, (%r15)
movq %r12, %rdi
leaq 0x28(%rsp), %rsi
callq 0x22cc0
cmpq %r12, 0x28(%rsp)
je 0x4939a
movl (%r15), %eax
testl %eax, %eax
je 0x49126
cmpl $0x22, %eax
jne 0x4912d
jmp 0x493ca
movl 0x4(%rsp), %eax
movl %eax, (%r15)
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 0x80(%rsp), %rax
movq 0x48(%rsp), %rcx
movq (%rax,%rcx), %r14
movl (%r15), %r12d
movl $0x0, (%r15)
movq %r14, %rdi
leaq 0x28(%rsp), %rsi
callq 0x22760
movsd %xmm0, 0x48(%rsp)
cmpq %r14, 0x28(%rsp)
je 0x493a6
movl (%r15), %eax
testl %eax, %eax
je 0x491ad
cmpl $0x22, %eax
jne 0x491b0
jmp 0x493e2
movl %r12d, (%r15)
movq 0x180(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x4a3f4
movq %rax, %r14
movq 0x80(%rsp), %rax
movq (%rax), %r12
movl (%r15), %eax
movl %eax, 0x4(%rsp)
movl $0x0, (%r15)
movq %r12, %rdi
leaq 0x28(%rsp), %rsi
callq 0x22760
cmpq %r12, 0x28(%rsp)
je 0x493b2
movl (%r15), %eax
testl %eax, %eax
je 0x49207
cmpl $0x22, %eax
jne 0x4920e
jmp 0x493d6
movl 0x4(%rsp), %eax
movl %eax, (%r15)
movsd %xmm0, 0xe0(%rsp)
movq %r14, %rdi
leaq 0xe0(%rsp), %rsi
callq 0x4a470
movsd 0x48(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
movq 0x50(%rsp), %r15
je 0x49091
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x49091
leaq 0x80(%rsp), %r13
movq %r13, %rdi
callq 0x31a9e
movq 0x188(%rsp), %r14
addq $0x20, %r14
cmpq 0xc8(%rsp), %r14
leaq 0x8(%rsp), %r12
jne 0x4891e
leaq 0x120(%rsp), %rdi
callq 0x31a9e
leaq 0x68(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x492ad
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0x240(%rsp), %rdi
leaq 0x250(%rsp), %rax
cmpq %rax, %rdi
je 0x492d2
movq 0x250(%rsp), %rsi
incq %rsi
callq 0x229c0
leaq 0xc0(%rsp), %rdi
callq 0x31a9e
addq $0x1648, %rsp           # imm = 0x1648
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xaa3cd(%rip), %rdi     # 0xf36c5
movq %r14, %rsi
xorl %eax, %eax
callq 0x22f40
leaq 0xaa3bc(%rip), %rdi     # 0xf36c5
movq %r14, %rsi
xorl %eax, %eax
callq 0x22f40
leaq 0x230(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xada3e(%rip), %rsi     # 0xf6d64
leaq 0xada8b(%rip), %rdx     # 0xf6db8
leaq 0x220(%rsp), %rdi
callq 0x32210
leaq 0x220(%rsp), %rsi
movq %r14, %rdi
callq 0x78b66
leaq 0x220(%rsp), %rdi
callq 0x23470
xorl %edi, %edi
callq 0x22b90
leaq 0xa93f6(%rip), %rdi     # 0xf275b
callq 0x225a0
leaq 0xa93ea(%rip), %rdi     # 0xf275b
callq 0x225a0
leaq 0xa93de(%rip), %rdi     # 0xf275b
callq 0x22e40
leaq 0xa93d2(%rip), %rdi     # 0xf275b
callq 0x22e40
leaq 0xa93c1(%rip), %rdi     # 0xf2756
callq 0x225a0
leaq 0xa93b5(%rip), %rdi     # 0xf2756
callq 0x225a0
leaq 0xa93ae(%rip), %rdi     # 0xf275b
callq 0x225a0
leaq 0xa93a2(%rip), %rdi     # 0xf275b
callq 0x225a0
leaq 0xa9391(%rip), %rdi     # 0xf2756
callq 0x22e40
leaq 0xa9385(%rip), %rdi     # 0xf2756
callq 0x22e40
leaq 0xa937e(%rip), %rdi     # 0xf275b
callq 0x22e40
leaq 0xa9372(%rip), %rdi     # 0xf275b
callq 0x22e40
leaq 0xae74c(%rip), %rdi     # 0xf7b41
xorl %esi, %esi
xorl %eax, %eax
callq 0x22f40
movq %rax, %rbx
movq 0x1c0(%rsp), %rdi
cmpq %r15, %rdi
je 0x49423
movq 0x1d0(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x49423
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x495ab
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x495ab
jmp 0x495a8
jmp 0x4957e
movq %rax, %rbx
movq 0x1a0(%rsp), %rdi
cmpq %r15, %rdi
je 0x49476
movq 0x1b0(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x49476
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x49805
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x49805
jmp 0x494d2
jmp 0x495a8
jmp 0x49554
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x497f8
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x497f8
movq %rax, %rbx
jmp 0x497f8
movq %rax, %rbx
jmp 0x49805
movq %rax, %rbx
movq 0x1e0(%rsp), %rdi
cmpq %r15, %rdi
je 0x494ff
movq 0x1f0(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x494ff
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x322a0
jmp 0x4950e
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4952e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x4952e
movq %rax, %rbx
movq 0x200(%rsp), %rdi
cmpq %r14, %rdi
je 0x49820
movq 0x210(%rsp), %rsi
jmp 0x49818
movq %rax, %rbx
jmp 0x49820
movq %rax, %rbx
jmp 0x49845
jmp 0x4957e
jmp 0x4957e
jmp 0x4957e
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x49581
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x49581
movq %rax, %rbx
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x49845
movq 0x68(%rsp), %rsi
jmp 0x4983d
jmp 0x497e8
jmp 0x496c5
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x495c2
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0x58(%rsp), %rdi
cmpq %r13, %rdi
je 0x495d9
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x229c0
leaq 0x240(%rsp), %rdi
callq 0x22200
jmp 0x49845
movq %rax, %rbx
jmp 0x49677
jmp 0x497e8
movq %rax, %rbx
jmp 0x49625
movq %rax, %rbx
movq 0x140(%rsp), %rdi
leaq 0x150(%rsp), %rax
cmpq %rax, %rdi
je 0x49625
movq 0x150(%rsp), %rsi
incq %rsi
callq 0x229c0
leaq 0x30(%rsp), %rdi
callq 0x322a0
jmp 0x497eb
movq %rax, %rbx
movq 0x220(%rsp), %rdi
cmpq %r15, %rdi
je 0x497eb
movq 0x230(%rsp), %rsi
jmp 0x497d8
movq %rax, %rbx
cmpl $0x0, (%r15)
jne 0x49677
movl %r12d, (%r15)
jmp 0x49677
jmp 0x49667
jmp 0x49667
movq %rax, %rbx
cmpl $0x0, (%r15)
jne 0x49677
movl 0x4(%rsp), %eax
movl %eax, (%r15)
leaq 0x18(%rsp), %rbp
jmp 0x496c8
jmp 0x497e8
jmp 0x497e8
jmp 0x497e8
movq %rax, %rbx
cmpl $0x0, (%r14)
jne 0x497eb
movl 0x4(%rsp), %eax
movl %eax, (%r14)
jmp 0x497eb
movq %rax, %rbx
cmpl $0x0, (%r14)
jne 0x497eb
movl %ebp, (%r14)
jmp 0x497eb
jmp 0x497e8
jmp 0x497e8
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x497eb
movq 0x18(%rsp), %rsi
jmp 0x497d8
jmp 0x497e8
movq %rax, %rbx
movq 0x100(%rsp), %rdi
cmpq %r14, %rdi
leaq 0xb0(%rsp), %r14
je 0x49727
movq 0x110(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x49727
movq %rax, %rbx
leaq 0xb0(%rsp), %r14
jmp 0x4973e
movq %rax, %rbx
leaq 0xb0(%rsp), %r14
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x4973e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x49767
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x49767
movq %rax, %rbx
leaq 0xb0(%rsp), %r14
movq 0xe0(%rsp), %rdi
leaq 0xf0(%rsp), %rax
cmpq %rax, %rdi
je 0x49799
movq 0xf0(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x49799
movq %rax, %rbx
leaq 0xb0(%rsp), %r14
movq 0xa0(%rsp), %rdi
cmpq %r14, %rdi
je 0x497bb
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x497bb
movq %rax, %rbx
movq 0x160(%rsp), %rdi
leaq 0x170(%rsp), %rax
cmpq %rax, %rdi
je 0x497eb
movq 0x170(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x497eb
jmp 0x497e8
jmp 0x497e8
jmp 0x497e8
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
callq 0x31a9e
leaq 0x120(%rsp), %rdi
callq 0x31a9e
leaq 0x68(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x49820
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x229c0
leaq 0x250(%rsp), %rax
movq 0x240(%rsp), %rdi
cmpq %rax, %rdi
je 0x49845
movq 0x250(%rsp), %rsi
incq %rsi
callq 0x229c0
leaq 0xc0(%rsp), %rdi
callq 0x31a9e
movq %rbx, %rdi
callq 0x23240