// File: /workspace/github_cpp_makefile_star2_O1/richardposner[P]BioNetFit2/src/code/Particle.cpp
// Function: Particle::calculateFit(bool, unsigned int)
void Particle::calculateFit(bool local, unsigned int mid) {

	//razi TODO: check if the fit calculation is corrent.

	//swarm_->outputError("Particle::calculateFit needs modification");

	bool usingSD = false;
	bool usingMean = false;

	// Construct pointers to the relevant fitting function.
	// This lets us avoid a switch/case or excess conditionals
	// within the calculation loop
	if (swarm_->options.objFunc == 1) {
		objFuncPtr = &Particle::objFunc_sumOfSquares;
	}
	else if (swarm_->options.objFunc == 2) {
		objFuncPtr = &Particle::objFunc_chiSquare;
		usingSD = true;
	}
	else if (swarm_->options.objFunc == 3) {
		objFuncPtr = &Particle::objFunc_divByMeasured;
	}
	else if (swarm_->options.objFunc == 4) {
		objFuncPtr = &Particle::objFunc_divByMean;
		usingMean = true;
	}

	double colSum;
	double setSum;
	double totalSum;
	double divisor;


	//razi: loop over all subparticles associated with models

	unsigned int subParID = calcsubParID(mid);
	if ((mid<0)|| (mid >= swarm_->getNumModels()) || (!getSubParticle(mid)) || (!models.at(mid)) || (dataFiles_.at(mid).empty())){
		outputError("calculateFit Failed. Invalid SubParticle.  PID:"+ toString(id_) + "  model id:" + toString(mid)+ "  subParID:" + toString(subParID)+". Quitting !!!");
	}else{

		totalSum = 0;
		divisor = 0;
		int notfoundCount = 0;
		// Loop through .exp files. Iterator points to string/dataset pair
		for (auto e = swarm_->options.expFiles.begin(); e != swarm_->options.expFiles.end(); ++e){
			if(swarm_->options.verbosity >=4){
				cout << "DATA FILE FOR MID " << mid << " " << e->first << endl;
			}


			if ( dataFiles_.at(mid).find(e->first) == dataFiles_.at(mid).end() ) {
			  // not found
				if(swarm_->options.verbosity >=4){
					cout << "EXPERIMENTAL KEY NOT FOUND IN SIM GDAT FILE: " << e->first << " SKIPING..." << endl;
				}
				continue;
			}

			//razi: we first need to check if the exp file belongs to this subParticle
			if (dataFiles_.at(mid).count(e->first)!=1){
				cout<<"The exp file "<< e->first<< " does not belong to model is:"<<mid<<". try other models."<<endl;
				continue; //Raquel: was a break, making the fit for MID 1 always become zero
			}


			if(swarm_->options.verbosity >=4){
				cout << "RAQUEL PASSED MID " << mid << endl;
			}
			// Loop through .exp columns. Iterator points to column/map pair
			//cout << "exp loop " << e->first << endl;
			setSum = 0;
			if(swarm_->options.verbosity >=4){
				cout << "first: " << e->second->dataCurrent->begin()->first << endl;
				cout << "second " <<  e->second->dataCurrent->begin()->second.begin()->first << endl;
				cout << " third " << e->second->dataCurrent->begin()->second.begin()->second << endl;
			}
			for (std::map<std::string, std::map<double,double> >::iterator exp_col = e->second->dataCurrent->begin(); exp_col != e->second->dataCurrent->end(); ++exp_col) {
				// Loop through timepoints of column.  Iterator points to a timepoint/value pair

				if (usingMean) {
					//cout << "trying to set mean" << endl;
					divisor = e->second->colAverages.at(exp_col->first);
					//cout << "mean set" << endl;
					if(swarm_->options.verbosity >=4){
						cout << "RAQUEL divisor(colmean): " << divisor << endl;
					}
				}

				//cout << "col loop " << exp_col->first << endl;
				colSum = 0;
				for (std::map<double,double>::iterator timepoint = exp_col->second.begin(); timepoint != exp_col->second.end(); ++timepoint) {
					if (std::isnan(timepoint->second)) {
						continue;
					}

					//double exp = timepoint->second;
					//cout << "exp: " << exp << endl;
					if ( dataFiles_.at(mid).at(e->first).at(swarm_->options.smoothing)->dataCurrent->find(exp_col->first) == dataFiles_.at(mid).at(e->first).at(swarm_->options.smoothing)->dataCurrent->end() ) {
					  // not found
						if(swarm_->options.verbosity >=4){
							cout << "EXPERIMENTAL KEY NOT FOUND IN SIM GDAT FILE, exp_col: " << exp_col->first << " SKIPING..." << endl;

						}
						notfoundCount++;

						if((unsigned)notfoundCount>=e->second->dataCurrent->size()){
							if(swarm_->options.verbosity >=4){
								cout << "Went through all EXP columns and didn't find any result in the SIM GDAT, skipping this failed simulation." << endl;
							}

							totalSum=9999;

						}

						continue;
					}

					if ( dataFiles_.at(mid).at(e->first).at(swarm_->options.smoothing)->dataCurrent->at(exp_col->first).find(timepoint->first) == dataFiles_.at(mid).at(e->first).at(swarm_->options.smoothing)->dataCurrent->at(exp_col->first).end() ) {
					  // not found
						if(swarm_->options.verbosity >=4){
							cout << "EXPERIMENTAL KEY NOT FOUND IN SIM GDAT FILE, time_point: " << timepoint->first << " SKIPING..." << endl;
						}
						continue;
					}

					if (swarm_->options.smoothing == 1) {
						//cout << "sim: " << dataFiles_.at(e->first).at(swarm_->options.smoothing)->dataCurrent->at(exp_col->first).at(timepoint->first) << endl;


					}
					else {
						//cout << "sim: " << dataFiles_.at(e->first).at(swarm_->options.smoothing + 1)->dataCurrent->at(exp_col->first).at(timepoint->first) << endl;
					}



					if (usingSD) {
						divisor = e->second->standardDeviations.at(exp_col->first).at(timepoint->first);
						//cout << "divisor: " << divisor << endl;
					}

					double sim;
					// TODO: Introduce fudge tolerance to account for precision loss in simulation control column
					if (swarm_->options.smoothing == 1) {
						if(swarm_->options.verbosity >=4){
							cout << "trying smoothing" << endl;
							cout << "MID: " << mid << " data files size: " << dataFiles_.size() << " e->first: " << e->first << " dataFiles_.at(mid) size: " << dataFiles_.at(mid).size() << " exp_col->first: " << exp_col->first << endl;
							cout << "exp_col->first: " << exp_col->first << " timepoint->first: " << timepoint->first << endl;



						}

						if(swarm_->options.verbosity >=9){

							for(auto keys=dataFiles_.at(mid).at(e->first).begin(); keys!=dataFiles_.at(mid).at(e->first).end(); ++keys){

								cout << "keys: " << keys->first << endl;
								cout << "keys: " << keys->second << endl;

							}
						}

						if(swarm_->options.verbosity >=5){
							cout << "print: " << dataFiles_.at(mid).at(e->first).at(swarm_->options.smoothing+1)->dataCurrent->at(exp_col->first).at(timepoint->first) << endl;
						}
						sim = dataFiles_.at(mid).at(e->first).at(swarm_->options.smoothing)->dataCurrent->at(exp_col->first).at(timepoint->first);
						//cout << dataCurrent->at(exp_col->first).at(timepoint->first) << endl;
						if(swarm_->options.verbosity >=4){
							cout << " [mid] " << mid << " [e->first] " << e->first << " [swarm_->options.smoothing] " << swarm_->options.smoothing << " exp_col->first " << exp_col->first << " timepoint->first " << timepoint->first << endl;
							cout << "done " << endl;
						}
					}
					else {
						if(swarm_->options.verbosity >=4){
							cout << "trying smoothing2 " << endl;
						}
						sim = dataFiles_.at(mid).at(e->first).at(swarm_->options.smoothing+1)->dataCurrent->at(exp_col->first).at(timepoint->first);
						if(swarm_->options.verbosity >=4){
							cout << "done" << endl;
						}
					}
					double sum = 0;
					if(sim != timepoint->second){ //if simulation and experimental values are exactly equal, the difference between them will be zero, so we can skip the objective function
						sum = (this->*objFuncPtr)(sim, timepoint->second, divisor);
					}
					if(swarm_->options.verbosity >= 3){
						cout << "sum = " << sum << " sim =" << sim << " timepoint->second = " << timepoint->second << " divisor = "<< divisor << endl;
						cout << "SUM: " << sum << "MID: " << mid << endl;
					}
					if (swarm_->options.bootstrap) {
						//cout << "all sets: "<< swarm_->bootstrapMaps.size() << endl;
						//cout << "files: " << swarm_->bootstrapMaps[swarm_->bootstrapCounter].size() << endl;
						//cout << "cols: " << (swarm_->bootstrapMaps[swarm_->bootstrapCounter].begin())->first << endl;
						//cout << "tps: " << swarm_->bootstrapMaps[swarm_->bootstrapCounter][exp_col->first][timepoint->first] << endl;
						//cout << "multiplying " << colSum << " by " << swarm_->bootstrapMaps[swarm_->bootstrapCounter - 1][e->first][exp_col->first][timepoint->first] << endl;
						//cout << "m: " << colSum << " by " << swarm_->bootstrapMaps[swarm_->bootstrapCounter].at(e->first).at(exp_col->first).at(timepoint->first) << endl;
						sum *= swarm_->bootstrapMaps[swarm_->bootstrapCounter][e->first][exp_col->first][timepoint->first];
					} //if (swarm_->options.bootstrap)
					colSum += sum;
				} //for through values
				setSum += colSum;
			} //for col loop
			totalSum += setSum;
		}//for (auto e = swarm_->options.expFiles.begin(); e != swarm_->options.expFiles.end(); ++e)
		// Erase our data sets
		dataFiles_.at(mid).clear();
		// Store our fit calc
		if(swarm_->options.verbosity >=4){
			cout << " totalSum " << totalSum << endl;
		}
		if (!local) {
			fitCalcs[mid][currentGeneration_] = pow(totalSum, 0.5);
			if(swarm_->options.verbosity >=4){
				cout << "RAQUEL LOCAL FIT for mid " << mid << ": " << fitCalcs[mid][currentGeneration_] << endl;
			}
		}
		else {
			fitCalcs[mid][-1] = pow(totalSum, 0.5);
			if(swarm_->options.verbosity >=4){
				cout << "RAQUEL GLOBALFIT FIT for mid " << mid << ": " << fitCalcs[mid][-1]<< endl;
			}
		}

		if (swarm_->options.verbosity >= 3) {
			cout << "Fit calculation["<<mid<<"]: " << pow(totalSum, 0.5) << endl;
		}

	} //if(!getSubParticle(mid))
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
movl %edx, %r12d
movq %rdi, %r14
movq 0xa8(%rdi), %rax
movl 0x162c(%rax), %ecx
movl $0x0, 0xc(%rsp)
decl %ecx
cmpl $0x3, %ecx
ja 0x5c6d1
leaq 0x9d44c(%rip), %rdx     # 0xf8330
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
leaq -0x6e00(%rip), %rcx     # 0x540f4
jmp 0x5af14
leaq -0x6de1(%rip), %rcx     # 0x5411c
movl $0x0, 0xc(%rsp)
jmp 0x5af14
movb $0x1, %cl
movl %ecx, 0xc(%rsp)
leaq -0x6ce2(%rip), %rcx     # 0x54232
movl $0x0, 0x8(%rsp)
jmp 0x5af33
movb $0x1, %cl
movl %ecx, 0x8(%rsp)
leaq -0x6e25(%rip), %rcx     # 0x54106
movl $0x0, 0xc(%rsp)
movq %rcx, 0x30(%r14)
movq $0x0, 0x38(%r14)
movl 0x40(%r14), %r13d
movq 0x15c8(%rax), %rbp
subq 0x15c0(%rax), %rbp
shrq $0x3, %rbp
cmpl %r12d, %ebp
jbe 0x5c23d
movl %r12d, %r15d
movq 0x48(%r14), %rcx
movq 0x50(%r14), %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
cmpq %r15, %rdx
jbe 0x5c97f
cmpq $0x0, (%rcx,%r15,8)
je 0x5c23d
movq 0x78(%r14), %rcx
movq 0x80(%r14), %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
cmpq %r15, %rdx
jbe 0x5c97f
cmpq $0x0, (%rcx,%r15,8)
je 0x5c23d
movq 0x90(%r14), %rcx
movq 0x98(%r14), %rdx
subq %rcx, %rdx
sarq $0x4, %rdx
movabsq $-0x5555555555555555, %rdi # imm = 0xAAAAAAAAAAAAAAAB
imulq %rdi, %rdx
cmpq %r15, %rdx
jbe 0x5c97f
leaq (%r15,%r15,2), %rdx
shlq $0x4, %rdx
movq %rdx, 0x80(%rsp)
cmpq $0x0, 0x28(%rcx,%rdx)
je 0x5c23d
movl %esi, 0xb4(%rsp)
movq 0x1578(%rax), %r12
movq 0xa8(%r14), %rax
leaq 0x1568(%rax), %rcx
xorpd %xmm0, %xmm0
cmpq %rcx, %r12
je 0x5c6de
movsd %xmm0, 0x30(%rsp)
movq $0x0, 0xd8(%rsp)
movq 0x11af5c(%rip), %rbp    # 0x175f90
movsd %xmm0, 0x10(%rsp)
movq 0x80(%rsp), %r13
cmpl $0x4, 0x1614(%rax)
jb 0x5b0bd
movl $0x12, %edx
movq %rbp, %rdi
leaq 0x9e3f4(%rip), %rsi     # 0xf944e
callq 0x22ab0
movq %rbp, %rdi
movq %r15, %rsi
callq 0x22650
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
leaq 0xa63c1(%rip), %rsi     # 0x10143d
callq 0x22ab0
movq 0x20(%r12), %rsi
movq 0x28(%r12), %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 0x90(%r14), %rdi
movq 0x98(%r14), %rdx
subq %rdi, %rdx
sarq $0x4, %rdx
movabsq $-0x5555555555555555, %rbx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rbx, %rdx
cmpq %r15, %rdx
jbe 0x5c97f
addq %r13, %rdi
leaq 0x20(%r12), %rsi
movq %rsi, 0x88(%rsp)
callq 0x6a986
movq 0x90(%r14), %rdi
movq 0x98(%r14), %rdx
subq %rdi, %rdx
sarq $0x4, %rdx
imulq %rbx, %rdx
cmpq %r15, %rdx
jbe 0x5c97f
leaq (%rdi,%r13), %rbx
addq $0x8, %rbx
cmpq %rbx, %rax
je 0x5c113
addq %r13, %rdi
movq 0x88(%rsp), %rsi
callq 0x694ea
cmpq %rbx, %rax
je 0x5c168
movq 0xa8(%r14), %rax
cmpl $0x4, 0x1614(%rax)
jb 0x5b1aa
movl $0x12, %edx
movq 0x11ae2a(%rip), %rbx    # 0x175f90
movq %rbx, %rdi
leaq 0x9e36b(%rip), %rsi     # 0xf94db
callq 0x22ab0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x22650
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 0xa8(%r14), %rax
cmpl $0x4, 0x1614(%rax)
jb 0x5b2d5
movl $0x7, %edx
movq 0x11adc6(%rip), %rbp    # 0x175f90
movq %rbp, %rdi
leaq 0x9e44d(%rip), %rsi     # 0xf9621
callq 0x22ab0
movq 0x40(%r12), %rax
movq (%rax), %rax
movq 0x18(%rax), %rax
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
movq %rbp, %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
movl $0x7, %edx
movq %rbp, %rdi
leaq 0x9e2c0(%rip), %rsi     # 0xf94ee
callq 0x22ab0
movq 0x40(%r12), %rax
movq (%rax), %rax
movq 0x18(%rax), %rax
movq 0x58(%rax), %rax
movsd 0x20(%rax), %xmm0
movq %rbp, %rdi
callq 0x23060
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
movl $0x7, %edx
movq %rbp, %rdi
leaq 0x9e26d(%rip), %rsi     # 0xf94f6
callq 0x22ab0
movq 0x40(%r12), %rax
movq (%rax), %rax
movq 0x18(%rax), %rax
movq 0x58(%rax), %rax
movsd 0x28(%rax), %xmm0
movq %rbp, %rdi
callq 0x23060
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 0x40(%r12), %rdi
movq (%rdi), %rcx
movq 0x18(%rcx), %rax
addq $0x8, %rcx
xorpd %xmm0, %xmm0
cmpq %rcx, %rax
je 0x5c1f7
movsd %xmm0, 0x60(%rsp)
movq %r12, 0x58(%rsp)
cmpb $0x0, 0xc(%rsp)
movq %rax, 0x28(%rsp)
je 0x5b388
addq $0x38, %rdi
leaq 0x20(%rax), %rsi
callq 0x66534
movsd (%rax), %xmm0
movq 0xa8(%r14), %rax
cmpl $0x4, 0x1614(%rax)
movsd %xmm0, 0x30(%rsp)
jb 0x5b383
movl $0x19, %edx
movq 0x11ac54(%rip), %rbx    # 0x175f90
movq %rbx, %rdi
leaq 0x9e1b8(%rip), %rsi     # 0xf94fe
callq 0x22ab0
movq %rbx, %rdi
movsd 0x30(%rsp), %xmm0
callq 0x23060
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 0x28(%rsp), %rax
movq 0x58(%rax), %rdi
leaq 0x48(%rax), %rcx
movq %rcx, 0x140(%rsp)
cmpq %rcx, %rdi
je 0x5c0ce
addq $0x20, %rax
movq %rax, 0x20(%rsp)
xorpd %xmm0, %xmm0
movsd %xmm0, 0x68(%rsp)
movq 0x88(%rsp), %r12
movsd 0x28(%rdi), %xmm0
ucomisd %xmm0, %xmm0
jp 0x5c0b6
movq %rdi, (%rsp)
movq 0x90(%r14), %rdi
movq 0x98(%r14), %rdx
subq %rdi, %rdx
sarq $0x4, %rdx
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %rdx
cmpq %r15, %rdx
jbe 0x5c97f
addq %r13, %rdi
movq %r12, %rsi
callq 0x66588
movq 0xa8(%r14), %rcx
movl 0x1658(%rcx), %ecx
movl %ecx, 0x38(%rsp)
movq %rax, %rdi
leaq 0x38(%rsp), %rsi
callq 0x665dc
movq (%rax), %rax
movq (%rax), %rdi
movq 0x20(%rsp), %rsi
callq 0x6a9cc
movq %rax, %rbx
movq 0x90(%r14), %rdi
movq 0x98(%r14), %rdx
subq %rdi, %rdx
sarq $0x4, %rdx
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %rdx
cmpq %r15, %rdx
jbe 0x5c97f
addq %r13, %rdi
movq %r12, %rsi
callq 0x66588
movq 0xa8(%r14), %rcx
movl 0x1658(%rcx), %ecx
movl %ecx, 0x90(%rsp)
movq %rax, %rdi
leaq 0x90(%rsp), %rsi
callq 0x665dc
movq (%rax), %rax
movq (%rax), %rax
addq $0x8, %rax
cmpq %rax, %rbx
je 0x5b98f
movq 0x90(%r14), %rdi
movq 0x98(%r14), %rdx
subq %rdi, %rdx
sarq $0x4, %rdx
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %rdx
cmpq %r15, %rdx
jbe 0x5c97f
movq (%rsp), %rax
leaq 0x20(%rax), %rbx
addq %r13, %rdi
movq %r12, %rsi
callq 0x66588
movq 0xa8(%r14), %rcx
movl 0x1658(%rcx), %ecx
movl %ecx, 0x38(%rsp)
movq %rax, %rdi
leaq 0x38(%rsp), %rsi
callq 0x665dc
movq (%rax), %rax
movq (%rax), %rdi
movq 0x20(%rsp), %rsi
callq 0x66628
movq %rbx, %rsi
movq %rax, %rbx
movq 0x10(%rax), %rcx
addq $0x8, %rbx
movq %rbx, %rax
testq %rcx, %rcx
je 0x5b547
movsd (%rsi), %xmm0
movq %rbx, %rax
xorl %edx, %edx
ucomisd 0x20(%rcx), %xmm0
cmovbeq %rcx, %rax
seta %dl
movq 0x10(%rcx,%rdx,8), %rcx
testq %rcx, %rcx
jne 0x5b52f
cmpq %rbx, %rax
je 0x5b55a
movsd 0x20(%rax), %xmm0
ucomisd (%rsi), %xmm0
ja 0x5b55a
movq %rax, %rbx
movq 0x90(%r14), %rdi
movq 0x98(%r14), %rdx
subq %rdi, %rdx
sarq $0x4, %rdx
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %rdx
cmpq %r15, %rdx
jbe 0x5c97f
movq %rsi, 0x18(%rsp)
addq %r13, %rdi
movq %r12, %rsi
callq 0x66588
movq 0xa8(%r14), %rcx
movl 0x1658(%rcx), %ecx
movl %ecx, 0x90(%rsp)
movq %rax, %rdi
leaq 0x90(%rsp), %rsi
callq 0x665dc
movq (%rax), %rax
movq (%rax), %rdi
movq 0x20(%rsp), %rsi
callq 0x66628
addq $0x8, %rax
cmpq %rax, %rbx
je 0x5ba97
cmpb $0x0, 0x8(%rsp)
movsd 0x30(%rsp), %xmm0
je 0x5b60c
movq 0x58(%rsp), %rax
movq 0x40(%rax), %rdi
addq $0x8, %rdi
movq 0x20(%rsp), %rsi
callq 0x66628
movq %rax, %rdi
movq 0x18(%rsp), %rsi
callq 0x6667c
movsd (%rax), %xmm0
movq 0xa8(%r14), %rcx
movl 0x1614(%rcx), %eax
cmpl $0x1, 0x1658(%rcx)
movsd %xmm0, 0x30(%rsp)
jne 0x5bb1a
cmpl $0x4, %eax
jb 0x5b81b
movl $0x10, %edx
movq 0x11a94f(%rip), %rbp    # 0x175f90
movq %rbp, %rdi
leaq 0x9dfa8(%rip), %rsi     # 0xf95f3
callq 0x22ab0
movq (%rbp), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x22940
movsbl %al, %esi
movq %rbp, %rdi
callq 0x22050
movq %rax, %rdi
callq 0x22660
movl $0x5, %edx
movq %rbp, %rdi
leaq 0x9df7d(%rip), %rsi     # 0xf9604
callq 0x22ab0
movq %rbp, %rdi
movq %r15, %rsi
callq 0x22650
movq %rax, %rbx
movl $0x12, %edx
movq %rax, %rdi
leaq 0x9df61(%rip), %rsi     # 0xf960a
callq 0x22ab0
movq 0x98(%r14), %rsi
subq 0x90(%r14), %rsi
sarq $0x4, %rsi
movabsq $-0x5555555555555555, %rbp # imm = 0xAAAAAAAAAAAAAAAB
imulq %rbp, %rsi
movq %rbx, %rdi
callq 0x22650
movq %rax, %rbx
movl $0xb, %edx
movq %rax, %rdi
leaq 0x9df35(%rip), %rsi     # 0xf961d
callq 0x22ab0
movq 0x58(%rsp), %rax
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
movq %rbx, %rdi
callq 0x22ab0
movq %rax, %rbx
movl $0x1a, %edx
movq %rax, %rdi
leaq 0x9df15(%rip), %rsi     # 0xf9629
callq 0x22ab0
movq 0x90(%r14), %rax
movq 0x98(%r14), %rdx
subq %rax, %rdx
sarq $0x4, %rdx
imulq %rbp, %rdx
cmpq %r15, %rdx
jbe 0x5c97f
movq 0x28(%rax,%r13), %rsi
movq %rbx, %rdi
callq 0x22650
movq %rax, %rbx
movl $0x11, %edx
movq %rax, %rdi
leaq 0x9deea(%rip), %rsi     # 0xf9644
callq 0x22ab0
movq 0x28(%rsp), %rbp
movq 0x20(%rbp), %rsi
movq 0x28(%rbp), %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
movl $0x10, %edx
movq 0x11a7e6(%rip), %rbx    # 0x175f90
movq %rbx, %rdi
leaq 0x9de91(%rip), %rsi     # 0xf9645
callq 0x22ab0
movq 0x20(%rbp), %rsi
movq 0x28(%rbp), %rdx
movq %rbx, %rdi
callq 0x22ab0
movq %rax, %rbx
movl $0x13, %edx
movq %rax, %rdi
leaq 0x9de7b(%rip), %rsi     # 0xf9656
callq 0x22ab0
movq 0x18(%rsp), %rax
movsd (%rax), %xmm0
movq %rbx, %rdi
callq 0x23060
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 0xa8(%r14), %rax
cmpl $0x9, 0x1614(%rax)
jb 0x5bc0e
movq 0x90(%r14), %rdi
movq 0x98(%r14), %rdx
subq %rdi, %rdx
sarq $0x4, %rdx
movabsq $-0x5555555555555555, %rbx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rbx, %rdx
cmpq %r15, %rdx
jbe 0x5c97f
addq %r13, %rdi
movq %r12, %rsi
callq 0x66588
movq 0x90(%r14), %rdi
movq 0x98(%r14), %rdx
subq %rdi, %rdx
sarq $0x4, %rdx
imulq %rbx, %rdx
cmpq %r15, %rdx
jbe 0x5c97f
movq 0x18(%rax), %rbx
addq %r13, %rdi
movq %r12, %rsi
callq 0x66588
addq $0x8, %rax
cmpq %rax, %rbx
je 0x5bc0e
movl $0x6, %edx
movq 0x11a6e0(%rip), %rbp    # 0x175f90
movq %rbp, %rdi
leaq 0x9ddb0(%rip), %r12     # 0xf966a
movq %r12, %rsi
callq 0x22ab0
movl 0x20(%rbx), %esi
movq %rbp, %rdi
callq 0x231e0
movq %r15, %r13
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x22940
movsbl %al, %esi
movq %r15, %rdi
callq 0x22050
movq %rax, %rdi
callq 0x22660
movl $0x6, %edx
movq %rbp, %rdi
movq %r12, %rsi
movq 0x88(%rsp), %r12
callq 0x22ab0
movq 0x28(%rbx), %rsi
movq %rbp, %rdi
callq 0x22750
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x22940
movsbl %al, %esi
movq %r15, %rdi
movq %r13, %r15
movq 0x80(%rsp), %r13
callq 0x22050
movq %rax, %rdi
callq 0x22660
movq %rbx, %rdi
callq 0x22670
movq %rax, %rbx
movq 0x90(%r14), %rdi
movq 0x98(%r14), %rdx
subq %rdi, %rdx
sarq $0x4, %rdx
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %rdx
cmpq %r15, %rdx
ja 0x5b88c
jmp 0x5c97f
movq 0xa8(%r14), %rax
cmpl $0x4, 0x1614(%rax)
jb 0x5ba0d
movl $0x36, %edx
movq 0x11a5e5(%rip), %rbx    # 0x175f90
movq %rbx, %rdi
leaq 0x9db63(%rip), %rsi     # 0xf9518
callq 0x22ab0
movq 0x28(%rsp), %rax
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
movq %rbx, %rdi
callq 0x22ab0
movq %rax, %rbx
movl $0xb, %edx
movq %rax, %rdi
leaq 0x9daae(%rip), %rsi     # 0xf948f
callq 0x22ab0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x22940
movsbl %al, %esi
movq %rbx, %rdi
callq 0x22050
movq %rax, %rdi
callq 0x22660
movq 0xd8(%rsp), %rcx
incl %ecx
movq 0x58(%rsp), %rax
movq 0x40(%rax), %rax
movq (%rax), %rax
movq %rcx, 0xd8(%rsp)
cmpq %rcx, 0x28(%rax)
ja 0x5bb11
movq 0xa8(%r14), %rax
cmpl $0x4, 0x1614(%rax)
jb 0x5ba87
movl $0x69, %edx
movq 0x11a53f(%rip), %rbx    # 0x175f90
movq %rbx, %rdi
leaq 0x9daf4(%rip), %rsi     # 0xf954f
callq 0x22ab0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x22940
movsbl %al, %esi
movq %rbx, %rdi
callq 0x22050
movq %rax, %rdi
callq 0x22660
movsd 0x9c899(%rip), %xmm0    # 0xf8328
movsd %xmm0, 0x10(%rsp)
jmp 0x5bb11
movq 0xa8(%r14), %rax
cmpl $0x4, 0x1614(%rax)
jb 0x5bb11
movl $0x39, %edx
movq 0x11a4dd(%rip), %rbx    # 0x175f90
movq %rbx, %rdi
leaq 0x9dafc(%rip), %rsi     # 0xf95b9
callq 0x22ab0
movq 0x18(%rsp), %rax
movsd (%rax), %xmm0
movq %rbx, %rdi
callq 0x23060
movq %rax, %rbx
movl $0xb, %edx
movq %rax, %rdi
leaq 0x9d9aa(%rip), %rsi     # 0xf948f
callq 0x22ab0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x22940
movsbl %al, %esi
movq %rbx, %rdi
callq 0x22050
movq %rax, %rdi
callq 0x22660
movq (%rsp), %rdi
jmp 0x5c0b6
cmpl $0x4, %eax
jb 0x5bb61
movl $0x12, %edx
movq 0x11a465(%rip), %rbx    # 0x175f90
movq %rbx, %rdi
leaq 0x9dba1(%rip), %rsi     # 0xf96d6
callq 0x22ab0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x22940
movsbl %al, %esi
movq %rbx, %rdi
callq 0x22050
movq %rax, %rdi
callq 0x22660
movq 0x90(%r14), %rdi
movq 0x98(%r14), %rdx
subq %rdi, %rdx
sarq $0x4, %rdx
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %rdx
cmpq %r15, %rdx
jbe 0x5c97f
addq %r13, %rdi
movq %r12, %rsi
callq 0x66588
movq 0xa8(%r14), %rcx
movl 0x1658(%rcx), %ecx
incl %ecx
movl %ecx, 0x38(%rsp)
movq %rax, %rdi
leaq 0x38(%rsp), %rsi
callq 0x665dc
movq (%rax), %rax
movq (%rax), %rdi
movq 0x20(%rsp), %rsi
callq 0x66628
movq %rax, %rdi
movq 0x18(%rsp), %rsi
callq 0x6667c
movsd (%rax), %xmm0
movq 0xa8(%r14), %rax
cmpl $0x4, 0x1614(%rax)
jb 0x5beb5
movsd %xmm0, 0x70(%rsp)
movl $0x4, %edx
movq 0x11a391(%rip), %rbp    # 0x175f90
movq %rbp, %rdi
leaq 0x9fb8b(%rip), %rsi     # 0xfb794
jmp 0x5be82
movq 0xa8(%r14), %rax
cmpl $0x5, 0x1614(%rax)
jb 0x5bce7
movl $0x7, %edx
movq 0x11a362(%rip), %rbx    # 0x175f90
movq %rbx, %rdi
leaq 0x9da39(%rip), %rsi     # 0xf9671
callq 0x22ab0
movq 0x90(%r14), %rdi
movq 0x98(%r14), %rdx
subq %rdi, %rdx
sarq $0x4, %rdx
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %rdx
cmpq %r15, %rdx
jbe 0x5c97f
addq %r13, %rdi
movq %r12, %rsi
callq 0x66588
movq 0xa8(%r14), %rcx
movl 0x1658(%rcx), %ecx
incl %ecx
movl %ecx, 0x38(%rsp)
movq %rax, %rdi
leaq 0x38(%rsp), %rsi
callq 0x665dc
movq (%rax), %rax
movq (%rax), %rdi
movq 0x20(%rsp), %rsi
callq 0x66628
movq %rax, %rdi
movq 0x18(%rsp), %rsi
callq 0x6667c
movsd (%rax), %xmm0
movq %rbx, %rdi
callq 0x23060
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 0x90(%r14), %rdi
movq 0x98(%r14), %rdx
subq %rdi, %rdx
sarq $0x4, %rdx
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %rdx
cmpq %r15, %rdx
jbe 0x5c97f
addq %r13, %rdi
movq %r12, %rsi
callq 0x66588
movq 0xa8(%r14), %rcx
movl 0x1658(%rcx), %ecx
movl %ecx, 0x38(%rsp)
movq %rax, %rdi
leaq 0x38(%rsp), %rsi
callq 0x665dc
movq (%rax), %rax
movq (%rax), %rdi
movq 0x20(%rsp), %rsi
callq 0x66628
movq %rax, %rdi
movq 0x18(%rsp), %rsi
callq 0x6667c
movsd (%rax), %xmm0
movq 0xa8(%r14), %rax
cmpl $0x4, 0x1614(%rax)
jb 0x5beb5
movsd %xmm0, 0x70(%rsp)
movl $0x7, %edx
movq 0x11a20d(%rip), %rbp    # 0x175f90
movq %rbp, %rdi
leaq 0x9d8ec(%rip), %rsi     # 0xf9679
callq 0x22ab0
movq %rbp, %rdi
movq %r15, %rsi
callq 0x22650
movq %rax, %rbx
movl $0xc, %edx
movq %rax, %rdi
leaq 0x9d8d2(%rip), %rsi     # 0xf9681
callq 0x22ab0
movq 0x58(%rsp), %rax
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
movq %rbx, %rdi
callq 0x22ab0
movq %rax, %rbx
movl $0x1d, %edx
movq %rax, %rdi
leaq 0x9d8b3(%rip), %rsi     # 0xf968e
callq 0x22ab0
movq 0xa8(%r14), %rax
movl 0x1658(%rax), %esi
movq %rbx, %rdi
callq 0x22650
movq %rax, %rbx
movl $0x10, %edx
movq %rax, %rdi
leaq 0x9d8a5(%rip), %rsi     # 0xf96ac
callq 0x22ab0
movq 0x28(%rsp), %rax
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
movq %rbx, %rdi
callq 0x22ab0
movq %rax, %rbx
movl $0x12, %edx
movq %rax, %rdi
leaq 0x9d88a(%rip), %rsi     # 0xf96bd
callq 0x22ab0
movq 0x18(%rsp), %rax
movsd (%rax), %xmm0
movq %rbx, %rdi
callq 0x23060
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
movl $0x5, %edx
movq %rbp, %rdi
leaq 0x9d84e(%rip), %rsi     # 0xf96d0
callq 0x22ab0
movq (%rbp), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x22940
movsbl %al, %esi
movq %rbp, %rdi
callq 0x22050
movq %rax, %rdi
callq 0x22660
movsd 0x70(%rsp), %xmm0
movq (%rsp), %rax
movsd 0x28(%rax), %xmm1
ucomisd %xmm1, %xmm0
movsd %xmm0, 0x70(%rsp)
jne 0x5becc
jnp 0x5beed
movq 0x30(%r14), %rax
movq 0x38(%r14), %rdi
addq %r14, %rdi
testb $0x1, %al
je 0x5bee3
movq (%rdi), %rcx
movq -0x1(%rcx,%rax), %rax
movsd 0x30(%rsp), %xmm2
callq *%rax
jmp 0x5bef1
xorpd %xmm0, %xmm0
movsd %xmm0, 0x78(%rsp)
movq 0xa8(%r14), %rax
cmpl $0x3, 0x1614(%rax)
jb 0x5c03e
movl $0x6, %edx
movq 0x11a079(%rip), %rbp    # 0x175f90
movq %rbp, %rdi
leaq 0x9d7c8(%rip), %rsi     # 0xf96e9
callq 0x22ab0
movq %rbp, %rdi
movsd 0x78(%rsp), %xmm0
callq 0x23060
movq %rax, %rbx
movl $0x6, %edx
movq %rax, %rdi
leaq 0x9d7aa(%rip), %rsi     # 0xf96f0
callq 0x22ab0
movq %rbx, %rdi
movsd 0x70(%rsp), %xmm0
callq 0x23060
movq %rax, %rbx
movl $0x15, %edx
movq %rax, %rdi
leaq 0x9d78c(%rip), %rsi     # 0xf96f7
callq 0x22ab0
movq (%rsp), %rax
movsd 0x28(%rax), %xmm0
movq %rbx, %rdi
callq 0x23060
movq %rax, %rbx
movl $0xb, %edx
movq %rax, %rdi
leaq 0x9d77a(%rip), %rsi     # 0xf970d
callq 0x22ab0
movq %rbx, %rdi
movsd 0x30(%rsp), %xmm0
callq 0x23060
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
movl $0x5, %edx
movq %rbp, %rdi
leaq 0x9d73a(%rip), %rsi     # 0xf9719
callq 0x22ab0
movq %rbp, %rdi
movsd 0x78(%rsp), %xmm0
callq 0x23060
movq %rax, %rbx
movl $0x5, %edx
movq %rax, %rdi
leaq 0x9d600(%rip), %rsi     # 0xf9604
callq 0x22ab0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x22650
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 0xa8(%r14), %rax
cmpl $0x0, 0x1638(%rax)
je 0x5c09c
movl 0x13ec(%rax), %ecx
leaq (%rcx,%rcx,2), %rdi
shlq $0x4, %rdi
addq 0x38(%rax), %rdi
movq %r12, %rsi
callq 0x666ce
movq %rax, %rdi
movq 0x20(%rsp), %rsi
callq 0x6674a
movq %rax, %rdi
movq 0x18(%rsp), %rsi
callq 0x667c6
movl (%rax), %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
movsd 0x78(%rsp), %xmm1
mulsd %xmm0, %xmm1
movq (%rsp), %rdi
jmp 0x5c0a6
movq (%rsp), %rdi
movsd 0x78(%rsp), %xmm1
movsd 0x68(%rsp), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x68(%rsp)
callq 0x22670
movq %rax, %rdi
cmpq 0x140(%rsp), %rax
jne 0x5b3bc
jmp 0x5c0d8
xorpd %xmm0, %xmm0
movsd %xmm0, 0x68(%rsp)
movsd 0x60(%rsp), %xmm0
addsd 0x68(%rsp), %xmm0
movsd %xmm0, 0x60(%rsp)
movq 0x28(%rsp), %rdi
callq 0x22670
movq 0x58(%rsp), %r12
movq 0x40(%r12), %rdi
movq (%rdi), %rcx
addq $0x8, %rcx
cmpq %rcx, %rax
jne 0x5b2fd
jmp 0x5c1fd
movq 0xa8(%r14), %rax
cmpl $0x4, 0x1614(%rax)
jb 0x5c20f
movl $0x2d, %edx
movq 0x119e5d(%rip), %rbp    # 0x175f90
movq %rbp, %rdi
leaq 0x9d324(%rip), %rsi     # 0xf9461
callq 0x22ab0
movq 0x20(%r12), %rsi
movq 0x28(%r12), %rdx
movq %rbp, %rdi
callq 0x22ab0
movq %rax, %rbx
movl $0xb, %edx
movq %rax, %rdi
leaq 0x9d329(%rip), %rsi     # 0xf948f
jmp 0x5c1c9
movl $0xd, %edx
movq 0x119e1c(%rip), %rbp    # 0x175f90
movq %rbp, %rdi
leaq 0x9d31d(%rip), %rsi     # 0xf949b
callq 0x22ab0
movq 0x20(%r12), %rsi
movq 0x28(%r12), %rdx
movq %rbp, %rdi
callq 0x22ab0
movq %rax, %rbx
movl $0x1d, %edx
movq %rax, %rdi
leaq 0x9d302(%rip), %rsi     # 0xf94a9
callq 0x22ab0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x22650
movq %rax, %rbx
movl $0x13, %edx
movq %rax, %rdi
leaq 0x9d2fe(%rip), %rsi     # 0xf94c7
callq 0x22ab0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x22940
movsbl %al, %esi
movq %rbx, %rdi
callq 0x22050
movq %rax, %rdi
callq 0x22660
jmp 0x5c216
movsd %xmm0, 0x60(%rsp)
movsd 0x10(%rsp), %xmm0
addsd 0x60(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
movq 0x119d7a(%rip), %rbp    # 0x175f90
movq %r12, %rdi
callq 0x22670
movq %rax, %r12
movq 0xa8(%r14), %rax
leaq 0x1568(%rax), %rcx
cmpq %rcx, %r12
jne 0x5b042
jmp 0x5c6ec
leaq 0x188(%rsp), %rbx
movq %rbx, %rdi
movl %r13d, %esi
callq 0xc03b8
leaq 0x9d1c7(%rip), %rcx     # 0xf941e
movl $0x2f, %r8d
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x22a80
leaq 0x158(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x5c299
movq %rdx, 0x148(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x158(%rsp)
jmp 0x5c2a0
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
leaq 0x148(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x9ca11(%rip), %rsi     # 0xf8cd7
callq 0x233b0
leaq 0xf0(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x5c2fb
movq %rdx, 0xe0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xf0(%rsp)
jmp 0x5c302
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
movq %rdx, 0xe8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x120(%rsp), %rdi
movl %r12d, %esi
callq 0xc03b8
movq 0xe0(%rsp), %rcx
movq 0xe8(%rsp), %r8
movq 0x128(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
cmpq %r15, %rcx
je 0x5c35b
movq 0xf0(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x5c380
leaq 0x130(%rsp), %rdi
movl $0xf, %esi
cmpq %rdi, -0x10(%rdi)
je 0x5c37b
movq 0x130(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x5c397
movq 0x120(%rsp), %rsi
leaq 0xe0(%rsp), %rdi
callq 0x222b0
jmp 0x5c3a8
leaq 0x120(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x22a80
leaq 0xc8(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x5c3d5
movq %rsi, 0xb8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xc8(%rsp)
jmp 0x5c3db
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0xc0(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x9c382(%rip), %rsi     # 0xf8784
leaq 0xb8(%rsp), %rdi
callq 0x233b0
decl %r13d
imull %ebp, %r13d
leal (%r12,%r13), %esi
incl %esi
leaq 0xa0(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x5c44d
movq %rdx, 0x90(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xa0(%rsp)
jmp 0x5c455
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rdx, 0x98(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x100(%rsp), %rdi
callq 0xc03b8
movq 0x90(%rsp), %rcx
movq 0x98(%rsp), %r8
movq 0x108(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
cmpq %r12, %rcx
je 0x5c4ab
movq 0xa0(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x5c4d0
leaq 0x110(%rsp), %rdi
movl $0xf, %esi
cmpq %rdi, -0x10(%rdi)
je 0x5c4cb
movq 0x110(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x5c4e7
movq 0x100(%rsp), %rsi
leaq 0x90(%rsp), %rdi
callq 0x222b0
jmp 0x5c4f8
leaq 0x100(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x22a80
leaq 0x48(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x5c51c
movq %rsi, 0x38(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x48(%rsp)
jmp 0x5c522
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x40(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x9c8ac(%rip), %rsi     # 0xf8df2
leaq 0x38(%rsp), %rdi
callq 0x233b0
leaq 0x178(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x5c580
movq %rdx, 0x168(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x178(%rsp)
jmp 0x5c588
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
leaq 0x168(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
callq 0xc0396
movq 0x168(%rsp), %rdi
cmpq %r13, %rdi
je 0x5c5c9
movq 0x178(%rsp), %rsi
incq %rsi
callq 0x229c0
leaq 0x48(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5c5e4
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x229c0
leaq 0x110(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5c605
movq 0x110(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0x90(%rsp), %rdi
cmpq %r12, %rdi
je 0x5c622
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x229c0
leaq 0xc8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5c643
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x229c0
leaq 0x130(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5c664
movq 0x130(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0xe0(%rsp), %rdi
cmpq %r15, %rdi
je 0x5c681
movq 0xf0(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0x148(%rsp), %rdi
cmpq %r14, %rdi
je 0x5c69e
movq 0x158(%rsp), %rsi
incq %rsi
callq 0x229c0
leaq 0x198(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5c6bf
movq 0x198(%rsp), %rsi
incq %rsi
callq 0x229c0
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x0, 0x8(%rsp)
jmp 0x5af3f
movsd %xmm0, 0x10(%rsp)
movq 0x80(%rsp), %r13
movq 0x90(%r14), %rdi
movq 0x98(%r14), %rdx
subq %rdi, %rdx
sarq $0x4, %rdx
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %rdx
cmpq %r15, %rdx
jbe 0x5c97f
addq %r13, %rdi
callq 0x6b376
movq 0xa8(%r14), %rax
cmpl $0x3, 0x1614(%rax)
jbe 0x5c783
movq 0x119859(%rip), %rbx    # 0x175f90
leaq 0x9cfe1(%rip), %rsi     # 0xf971f
movl $0xa, %edx
movq %rbx, %rdi
callq 0x22ab0
movq %rbx, %rdi
movsd 0x10(%rsp), %xmm0
callq 0x23060
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
movsd 0x9a3bd(%rip), %xmm1    # 0xf6b48
movsd 0x10(%rsp), %xmm0
callq 0x23210
movsd %xmm0, (%rsp)
movq 0x18(%r14), %rdi
addq %r13, %rdi
cmpb $0x0, 0xb4(%rsp)
je 0x5c827
leaq 0x38(%rsp), %rsi
movl $0xffffffff, (%rsi)     # imm = 0xFFFFFFFF
callq 0x66390
movsd (%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0xa8(%r14), %rax
cmpl $0x4, 0x1614(%rax)
jb 0x5c8e4
movq 0x1197b0(%rip), %rbx    # 0x175f90
leaq 0x9cf5d(%rip), %rsi     # 0xf9744
movl $0x1d, %edx
movq %rbx, %rdi
callq 0x22ab0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x22650
movq %rax, %rbx
leaq 0x95373(%rip), %rsi     # 0xf1b7c
movl $0x2, %edx
movq %rax, %rdi
callq 0x22ab0
addq 0x18(%r14), %r13
leaq 0x38(%rsp), %rsi
movl $0xffffffff, (%rsi)     # imm = 0xFFFFFFFF
jmp 0x5c8a6
movl 0xb0(%r14), %eax
leaq 0x38(%rsp), %rsi
movl %eax, (%rsi)
callq 0x66390
movsd (%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0xa8(%r14), %rax
cmpl $0x4, 0x1614(%rax)
jb 0x5c8e4
movq 0x119732(%rip), %rbx    # 0x175f90
leaq 0x9cec5(%rip), %rsi     # 0xf972a
movl $0x19, %edx
movq %rbx, %rdi
callq 0x22ab0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x22650
movq %rax, %rbx
leaq 0x952f5(%rip), %rsi     # 0xf1b7c
movl $0x2, %edx
movq %rax, %rdi
callq 0x22ab0
addq 0x18(%r14), %r13
movl 0xb0(%r14), %eax
leaq 0x38(%rsp), %rsi
movl %eax, (%rsi)
movq %r13, %rdi
callq 0x66390
movsd (%rax), %xmm0
movq %rbx, %rdi
callq 0x23060
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 0xa8(%r14), %rax
cmpl $0x3, 0x1614(%rax)
jb 0x5c6bf
movq 0x119691(%rip), %rbx    # 0x175f90
leaq 0x9ce5c(%rip), %rsi     # 0xf9762
movl $0x10, %edx
movq %rbx, %rdi
callq 0x22ab0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x22650
movq %rax, %rbx
leaq 0xc5c65(%rip), %rsi     # 0x12258d
movl $0x3, %edx
movq %rax, %rdi
callq 0x22ab0
movsd 0x9a20b(%rip), %xmm1    # 0xf6b48
movsd 0x10(%rsp), %xmm0
callq 0x23210
movq %rbx, %rdi
callq 0x23060
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
jmp 0x5c6bf
leaq 0x96d3f(%rip), %rdi     # 0xf36c5
movq %r15, %rsi
xorl %eax, %eax
callq 0x22f40
movq %rax, %rbx
movq 0x168(%rsp), %rdi
cmpq %r13, %rdi
je 0x5c9b5
movq 0x178(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x5c9b5
movq %rax, %rbx
leaq 0x48(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5c9d5
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x5c9d5
movq %rax, %rbx
leaq 0x110(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5c9fb
movq 0x110(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x5c9fb
movq %rax, %rbx
movq 0x90(%rsp), %rdi
cmpq %r12, %rdi
je 0x5ca1d
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x5ca1d
movq %rax, %rbx
leaq 0xc8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5ca43
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x5ca43
movq %rax, %rbx
leaq 0x130(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5ca69
movq 0x130(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x5ca69
movq %rax, %rbx
movq 0xe0(%rsp), %rdi
cmpq %r15, %rdi
je 0x5ca8b
movq 0xf0(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x5ca8b
movq %rax, %rbx
movq 0x148(%rsp), %rdi
cmpq %r14, %rdi
je 0x5caad
movq 0x158(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x5caad
movq %rax, %rbx
leaq 0x198(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5cace
movq 0x198(%rsp), %rsi
incq %rsi
callq 0x229c0
movq %rbx, %rdi
callq 0x23240