// File: /workspace/github_cpp_makefile_star2_O3/richardposner[P]BioNetFit2/src/code/Swarm.cpp
// Function: Swarm::checkMasterMessagesDE()
unordered_map<unsigned int, vector<double> > Swarm::checkMasterMessagesDE() {

	unsigned int pID, subParID, mid=0; //Removed newlyFinishedParticles
	if (options.verbosity >= 3) { //razi: TODO test for multiple models
		//cout << "Checking messages DE, may need some modifications/test to support sbParticle" << endl;
	}

	unordered_map<unsigned int, vector<double> > subParticleParams;

	// First let's check interswarm communication
	int numMessages = swarmComm->recvMessage(-1, 0, -1, false, swarmComm->univMessageReceiver);

	if (numMessages >= 1) {
		if (options.verbosity >= 3) {
			//cout << "Found " << numMessages << " messages" << endl;
		}

		pair <Pheromones::swarmMsgHolderIt, Pheromones::swarmMsgHolderIt> smhRange;

		smhRange = swarmComm->univMessageReceiver.equal_range(SIMULATION_END);
		for (Pheromones::swarmMsgHolderIt sm = smhRange.first; sm != smhRange.second; ++sm) {
			subParID = sm->second.sender;
			pID = fcalcParID(subParID, options.models.size());
			mid= fcalcMID(subParID, options.models.size());

			if (options.verbosity >= 3) {
				//cout << "Particle " << pID << " finished simulation" << endl;
			}

			// Get an iterator to the particle in our list of running particles
			runningSubParticlesIterator_ = runningSubParticles_.find(subParID);
			// Then remove it
			if (runningSubParticlesIterator_ == runningSubParticles_.end()) {
				string errMsg = "Error: Couldn't remove subParticle " + toString(subParID) + " from runningParticle list.";
				cout << "Size of runningSubParticles_(2): " << runningSubParticles_.size() << endl;
				cout << "Subparticles in running list are: " << endl;
				for(auto myIt = runningSubParticles_.begin(); myIt != runningSubParticles_.end(); myIt++){
					cout << "first: " << *myIt << endl;

				}
				cout << "Done listing running particles. " << endl;
				outputError(errMsg);
			}
			runningSubParticles_.erase(runningSubParticlesIterator_);

			++particleIterationCounter_[pID][mid];
			update_finished_running_particles();

			/*
			// Only increment flight counter if we're finishing a trial set
			if (trial == true) {
				++flightCounter_;
			}
			 */

			/*
			unsigned int gen = currentGeneration;
			string paramsString;
			// Only output a run summary after a trial set has finished
			if (options.synchronicity == 1 && trial == true) {
				paramsString = "gen" + toString(static_cast<long long int>(gen)) + "perm" + toString(static_cast<long long int>(pID)) + " ";
			}
			else if (options.synchronicity == 0 && trial == true) {
				// TODO: This run summary contains 1 less particle than it should.
				// Output a run summary every outputEvery flights
				if (flightCounter_ % options.outputEvery == 0) {
					string outputPath = options.jobOutputDir + toString(static_cast<long long int>(flightCounter_)) + "_summary.txt";
					outputRunSummary(outputPath);
				}

				paramsString = toString(static_cast<long long int>(flightCounter_)) + " ";
			}
			 */

			double fitCalc = stod(sm->second.message[0]);

			/*
			bool replaceParams = false;
			if (trial == false) {
				particleBestFits_[pID] = fitCalc;
				insertKeyByValue(particleBestFitsByFit_, fitCalc, pID);
				replaceParams = true;
			}
			else if (trial == true && fitCalc < particleBestFits_.at(pID)) {
				cout << "replacing" << endl;
				particleBestFits_[pID] = fitCalc;
				insertKeyByValue(particleBestFitsByFit_, fitCalc, pID);
				replaceParams = true;
			}
			 */

			// Store the parameters given to us by the particle
			vector<double> paramsVec;
			paramsVec.push_back(fitCalc);
			//int i = 0;
			for (vector<string>::iterator m = sm->second.message.begin() + 1; m != sm->second.message.end(); ++m) {

				paramsVec.push_back(stod(*m));

				/*
				if (replaceParams) {
					//cout << "stored " << stod(*m) << " for particle " << pID << " as " << particleCurrParamSets_[pID][i] << endl;
					particleCurrParamSets_[pID][i] = stod(*m);
					paramsString += *m + " ";
				}
				else if (trial) {
					paramsString += toString(static_cast<long double>(particleCurrParamSets_[pID][i])) + " ";
				}
				 */

				//++i;
			}

			/*
			if (trial == true) {
				allGenFits.insert(pair<double, string>(particleBestFits_[pID], paramsString));
				swarmBestFits_.insert(pair<double, unsigned int>(fitCalc, pID));
			}
			 */

			subParticleParams.insert(pair<unsigned int, vector<double> >(subParID, paramsVec)); //razi: params for subparticle, then translate to particle params
			//cout << "done processing particle " << pID << endl;
		}

		// TODO: When sending NEXT_GENERATION, make sure failed particles have actually run again. If not, they need re-launched.
		smhRange = swarmComm->univMessageReceiver.equal_range(SIMULATION_FAIL);
		for (Pheromones::swarmMsgHolderIt sm = smhRange.first; sm != smhRange.second; ++sm) {

			subParID = sm->second.sender;
			pID = fcalcParID(subParID, options.models.size());
			mid= fcalcMID(subParID, options.models.size());

			// Get an iterator to the particle in our list of running particles
			runningSubParticlesIterator_ = runningSubParticles_.find(subParID);



			// Get an iterator to the particle in our list of running particles
			runningSubParticlesIterator_ = runningSubParticles_.find(subParID);
			if (runningSubParticlesIterator_ == runningSubParticles_.end()) {
				string errMsg = "Error: Couldn't remove particle " + toString(pID) +  "  SubParticle " + toString(subParID) + " from runningParticle list.";
				outputError(errMsg);
			}else
				runningSubParticles_.erase(runningSubParticlesIterator_);

			runningSubParticlesIterator_ = failedSubParticles_.find(subParID);
			if (runningSubParticlesIterator_== failedSubParticles_.end())  //add to the list of failed subparticles
				failedParticles_.insert(subParID);
			else{
				string errMsg = "Error: subParticle failed, but failure was already reported for particle " + toString(pID) +  "  SubParticle " + toString(subParID);
				outputError(errMsg);
			}
			update_finished_running_particles();



			// Increment our finished counter
			//finishedParticles.push_back(pID);
			subParticleParams.insert(pair<unsigned int, vector<double> >(subParID, vector<double>()));  //razi: params for subparticle, then translate to particle params
		}

		swarmComm->univMessageReceiver.clear();

	}

	return subParticleParams;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x198, %rsp            # imm = 0x198
movq %rsi, %r14
movl $0x0, 0x5c(%rsp)
leaq 0x30(%rdi), %rax
movq %rax, (%rdi)
movq $0x1, 0x8(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
movl $0x3f800000, 0x20(%rdi) # imm = 0x3F800000
movq %rdi, 0x88(%rsp)
movups %xmm0, 0x28(%rdi)
movq (%rsi), %rdi
leaq 0x18(%rdi), %r9
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
xorl %r8d, %r8d
pushq $-0x1
pushq $0x1
callq 0x6d52e
addq $0x10, %rsp
testl %eax, %eax
jle 0x9653a
movq (%r14), %rdi
addq $0x18, %rdi
leaq 0x10(%rsp), %rsi
movl $0xd, (%rsi)
callq 0x6920c
movq %rax, %r15
movq %rdx, %r13
cmpq %rdx, %rax
movq %r14, 0x8(%rsp)
je 0x9630f
leaq 0x1820(%r14), %rax
movq %rax, 0x100(%rsp)
leaq 0x1828(%r14), %r12
leaq 0x1950(%r14), %rax
movq %rax, 0xf8(%rsp)
leaq 0x10(%rsp), %rbx
movq %r12, 0x80(%rsp)
movq %r13, 0xf0(%rsp)
movl 0x34(%r15), %edi
movl %edi, 0x4(%rsp)
movq 0x15c8(%r14), %rsi
subq 0x15c0(%r14), %rsi
shrq $0x3, %rsi
callq 0xbe99e
movl %eax, 0x58(%rsp)
movl 0x4(%rsp), %edi
movq 0x15c8(%r14), %rsi
subq 0x15c0(%r14), %rsi
shrq $0x3, %rsi
callq 0xbe994
movl %eax, 0x5c(%rsp)
movq 0x1830(%r14), %rcx
movl 0x4(%rsp), %esi
testq %rcx, %rcx
je 0x9656c
movq %r12, %rax
xorl %edx, %edx
cmpl %esi, 0x20(%rcx)
setb %dl
cmovaeq %rcx, %rax
movq 0x10(%rcx,%rdx,8), %rcx
testq %rcx, %rcx
jne 0x96118
cmpq %r12, %rax
je 0x9656c
cmpl 0x20(%rax), %esi
movq %rax, %rcx
cmovbq %r12, %rcx
movq %rcx, 0x1850(%r14)
jb 0x96573
movq 0x100(%rsp), %rdi
movq %rax, %rsi
callq 0xafb34
movq 0xf8(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0xa7ecc
movq %rax, %rdi
leaq 0x5c(%rsp), %rsi
callq 0xa7f32
incl (%rax)
leaq 0x180(%rsp), %rdi
movq %r14, %rsi
callq 0x958ea
movq 0x180(%rsp), %rdi
testq %rdi, %rdi
je 0x961ac
movq 0x190(%rsp), %rsi
subq %rdi, %rsi
callq 0x229c0
movq 0x38(%r15), %rax
movq (%rax), %r14
callq 0x22070
movq %rax, %r12
movl (%rax), %ebp
movl $0x0, (%rax)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x22760
cmpq %r14, 0x10(%rsp)
je 0x9662c
movl (%r12), %eax
testl %eax, %eax
je 0x961eb
cmpl $0x22, %eax
jne 0x961ef
jmp 0x96638
movl %ebp, (%r12)
movsd %xmm0, 0x60(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movq $0x0, 0x40(%rsp)
leaq 0x30(%rsp), %rdi
xorl %esi, %esi
leaq 0x60(%rsp), %rdx
callq 0x684d4
movq 0x38(%r15), %rbp
addq $0x20, %rbp
cmpq 0x40(%r15), %rbp
je 0x96299
movq (%rbp), %r14
movl (%r12), %r13d
movl $0x0, (%r12)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x22760
cmpq %r14, 0x10(%rsp)
je 0x96554
movl (%r12), %eax
testl %eax, %eax
je 0x9625d
cmpl $0x22, %eax
jne 0x96261
jmp 0x96560
movl %r13d, (%r12)
movsd %xmm0, 0xb0(%rsp)
movq 0x38(%rsp), %rsi
cmpq 0x40(%rsp), %rsi
je 0x96285
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x38(%rsp)
jmp 0x9621b
leaq 0x30(%rsp), %rdi
leaq 0xb0(%rsp), %rdx
callq 0x67e5a
jmp 0x9621b
movl 0x4(%rsp), %eax
movl %eax, 0x10(%rsp)
leaq 0x18(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x65d5c
movq 0x88(%rsp), %rdi
movq %rbx, %rsi
callq 0xafde8
movq 0x8(%rsp), %r14
movq 0x80(%rsp), %r12
movq 0xf0(%rsp), %r13
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x962ec
movq 0x28(%rsp), %rsi
subq %rdi, %rsi
callq 0x229c0
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x96303
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x229c0
movq (%r15), %r15
cmpq %r13, %r15
jne 0x960bf
movq (%r14), %rdi
addq $0x18, %rdi
leaq 0x10(%rsp), %rsi
movl $0xe, (%rsi)
callq 0x6920c
movq %rax, %rbx
movq %rdx, %r15
cmpq %rdx, %rax
je 0x96529
movq 0x8(%rsp), %rax
leaq 0x1820(%rax), %rcx
movq %rcx, 0x80(%rsp)
leaq 0x1828(%rax), %r14
leaq 0x1860(%rax), %rbp
leaq 0x19d0(%rax), %r13
movq 0x8(%rsp), %r12
movl 0x34(%rbx), %edi
movl %edi, 0x4(%rsp)
movq 0x15c8(%r12), %rsi
subq 0x15c0(%r12), %rsi
shrq $0x3, %rsi
callq 0xbe99e
movl %eax, 0x58(%rsp)
movl 0x4(%rsp), %edi
movq 0x15c8(%r12), %rsi
subq 0x15c0(%r12), %rsi
shrq $0x3, %rsi
callq 0xbe994
movl %eax, 0x5c(%rsp)
movq 0x1830(%r12), %rcx
testq %rcx, %rcx
je 0x965bf
movl 0x4(%rsp), %eax
movq %rcx, %rsi
movq %r14, %rdx
xorl %edi, %edi
cmpl %eax, 0x20(%rsi)
setb %dil
cmovaeq %rsi, %rdx
movq 0x10(%rsi,%rdi,8), %rsi
testq %rsi, %rsi
jne 0x963c3
movq %r14, %rsi
cmpq %r14, %rdx
je 0x963ec
cmpl 0x20(%rdx), %eax
cmovbq %r14, %rdx
movq %rdx, %rsi
movq 0x8(%rsp), %rdx
movq %rsi, 0x1850(%rdx)
movq %r14, %rsi
xorl %edx, %edx
cmpl %eax, 0x20(%rcx)
setb %dl
cmovaeq %rcx, %rsi
movq 0x10(%rcx,%rdx,8), %rcx
testq %rcx, %rcx
jne 0x963fb
cmpq %r14, %rsi
je 0x965cb
cmpl 0x20(%rsi), %eax
movq %rsi, %rax
cmovbq %r14, %rax
movq 0x8(%rsp), %rcx
movq %rax, 0x1850(%rcx)
jb 0x965d7
movq 0x80(%rsp), %rdi
callq 0xafb34
movq 0x8(%rsp), %rax
movq 0x1868(%rax), %rdx
testq %rdx, %rdx
je 0x96491
movl 0x4(%rsp), %ecx
movq %rbp, %rax
xorl %esi, %esi
cmpl %ecx, 0x20(%rdx)
setb %sil
cmovaeq %rdx, %rax
movq 0x10(%rdx,%rsi,8), %rdx
testq %rdx, %rdx
jne 0x9645b
cmpq %rbp, %rax
je 0x96491
cmpl 0x20(%rax), %ecx
cmovbq %rbp, %rax
movq 0x8(%rsp), %rcx
movq %rax, 0x1850(%rcx)
jb 0x9649d
jmp 0x96644
movq 0x8(%rsp), %rax
movq %rbp, 0x1850(%rax)
movq %r13, %rdi
leaq 0x4(%rsp), %rsi
callq 0xaf99c
movq 0x8(%rsp), %rsi
leaq 0x168(%rsp), %rdi
callq 0x958ea
movq 0x168(%rsp), %rdi
testq %rdi, %rdi
je 0x964d9
movq 0x178(%rsp), %rsi
subq %rdi, %rsi
callq 0x229c0
movl 0x4(%rsp), %eax
movl %eax, 0x10(%rsp)
leaq 0x18(%rsp), %rax
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movq 0x88(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0xafde8
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x9651d
movq 0x28(%rsp), %rsi
subq %rdi, %rsi
callq 0x229c0
movq (%rbx), %rbx
cmpq %r15, %rbx
jne 0x96363
movq 0x8(%rsp), %rax
movq (%rax), %rdi
addq $0x18, %rdi
callq 0x689b6
movq 0x88(%rsp), %rax
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5c1e0(%rip), %rdi     # 0xf273b
callq 0x225a0
leaq 0x5c1d4(%rip), %rdi     # 0xf273b
callq 0x22e40
movq %r12, 0x1850(%r14)
leaq 0x60(%rsp), %rdi
callq 0xbfa49
leaq 0x69613(%rip), %rcx     # 0xffb97
leaq 0x60(%rsp), %rdi
movl $0x23, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x22a80
leaq 0x40(%rsp), %rbx
movq %rbx, -0x10(%rbx)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x966f9
movups (%rcx), %xmm0
movups %xmm0, (%rbx)
jmp 0x96706
movq 0x8(%rsp), %rax
movq %r14, 0x1850(%rax)
movq 0x8(%rsp), %rax
movq %r14, 0x1850(%rax)
movl 0x58(%rsp), %esi
leaq 0x90(%rsp), %rdi
callq 0xbfa49
leaq 0x69887(%rip), %rcx     # 0xffe76
leaq 0x90(%rsp), %rdi
movl $0x20, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x22a80
leaq 0xc0(%rsp), %rbx
movq %rbx, -0x10(%rbx)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x9669a
movups (%rcx), %xmm0
movups %xmm0, (%rbx)
jmp 0x966ad
leaq 0x5c108(%rip), %rdi     # 0xf273b
callq 0x225a0
leaq 0x5c0fc(%rip), %rdi     # 0xf273b
callq 0x22e40
movl 0x58(%rsp), %esi
leaq 0xb0(%rsp), %rdi
callq 0xbfa49
leaq 0x69a74(%rip), %rcx     # 0x1000d0
leaq 0xb0(%rsp), %rdi
movl $0x49, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x22a80
leaq 0x70(%rsp), %rbx
movq %rbx, -0x10(%rbx)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x9697c
movups (%rcx), %xmm0
movups %xmm0, (%rbx)
jmp 0x96989
movq %rdx, 0xb0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xc0(%rsp)
movq 0x8(%rax), %rdx
leaq 0xb0(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x697c4(%rip), %rsi     # 0xffe97
callq 0x233b0
leaq 0x70(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x96756
movups (%rcx), %xmm0
movups %xmm0, (%r15)
jmp 0x96763
movq %rdx, 0x30(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x40(%rsp)
movq 0x8(%rax), %rdx
leaq 0x30(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x69492(%rip), %rsi     # 0xffbbb
callq 0x233b0
leaq 0x20(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x967ed
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
jmp 0x967fa
movq %rdx, 0x60(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x70(%rsp)
movq 0x8(%rax), %rdx
movq %rdx, 0x68(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movl 0x4(%rsp), %esi
leaq 0xd0(%rsp), %rdi
callq 0xbfa49
movq 0x60(%rsp), %rcx
movq 0x68(%rsp), %r8
movq 0xd8(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %edi
cmpq %r15, %rcx
je 0x967b1
movq 0x70(%rsp), %rdi
leaq 0xe0(%rsp), %r12
movq -0x10(%r12), %rsi
cmpq %rdi, %rax
jbe 0x967de
movl $0xf, %edi
cmpq %r12, %rsi
je 0x967d5
movq 0xe0(%rsp), %rdi
cmpq %rdi, %rax
jbe 0x969d9
leaq 0x60(%rsp), %rdi
callq 0x222b0
jmp 0x969ea
movq %rdx, 0x10(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x20(%rsp)
movq 0x8(%rax), %rdx
movq %rdx, 0x18(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x30(%rsp), %rdi
cmpq %rbx, %rdi
je 0x96829
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x229c0
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x96844
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0xdf75d(%rip), %rdi     # 0x175fa8
leaq 0x6985c(%rip), %rsi     # 0x1000ae
movl $0x21, %edx
callq 0x22ab0
movq 0x8(%rsp), %rax
movq 0x1848(%rax), %rsi
movq 0xdf739(%rip), %rdi     # 0x175fa8
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 0xdf703(%rip), %rbx     # 0x175fa8
leaq 0x6934a(%rip), %rsi     # 0xffbf6
movl $0x22, %edx
movq %rbx, %rdi
callq 0x22ab0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x22940
movsbl %al, %esi
movq 0xdf6d1(%rip), %rdi     # 0x175fa8
callq 0x22050
movq %rax, %rdi
callq 0x22660
movq 0x8(%rsp), %rax
movq 0x1838(%rax), %rbx
cmpq 0x80(%rsp), %rbx
jne 0x96cef
movq 0xdf6a3(%rip), %rbx     # 0x175fa8
leaq 0x6930d(%rip), %rsi     # 0xffc19
movl $0x20, %edx
movq %rbx, %rdi
callq 0x22ab0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x22940
movsbl %al, %esi
movq 0xdf671(%rip), %rdi     # 0x175fa8
callq 0x22050
movq %rax, %rdi
callq 0x22660
leaq 0x158(%rsp), %rbx
movq %rbx, -0x10(%rbx)
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
addq %rsi, %rdx
leaq 0x148(%rsp), %rdi
callq 0x3213c
leaq 0x148(%rsp), %rsi
movq 0x8(%rsp), %rdi
callq 0x784c2
movq %rdx, 0x60(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x70(%rsp)
movq 0x8(%rax), %rdx
leaq 0x60(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x694eb(%rip), %rsi     # 0xffe97
callq 0x233b0
leaq 0x40(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x96a6b
movups (%rcx), %xmm0
movups %xmm0, (%r15)
jmp 0x96a78
leaq 0xd0(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x22a80
leaq 0x40(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
jne 0x96a07
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
jmp 0x96a14
movq %rsi, 0x30(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x40(%rsp)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x38(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x69183(%rip), %rsi     # 0xffbbb
leaq 0x30(%rsp), %rdi
callq 0x233b0
leaq 0x20(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x96b05
movups (%rcx), %xmm0
movups %xmm0, (%r13)
jmp 0x96b12
movq %rdx, 0x30(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x40(%rsp)
movq 0x8(%rax), %rdx
movq %rdx, 0x38(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movl 0x4(%rsp), %esi
leaq 0x90(%rsp), %rdi
callq 0xbfa49
movq 0x30(%rsp), %rcx
movq 0x38(%rsp), %r8
movq 0x98(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %edi
cmpq %r15, %rcx
je 0x96ac6
movq 0x40(%rsp), %rdi
movq 0x90(%rsp), %rsi
cmpq %rdi, %rax
jbe 0x96af6
leaq 0xa0(%rsp), %r9
movl $0xf, %edi
cmpq %r9, %rsi
je 0x96aed
movq 0xa0(%rsp), %rdi
cmpq %rdi, %rax
jbe 0x96bef
leaq 0x30(%rsp), %rdi
callq 0x222b0
jmp 0x96c00
movq %rdx, 0x10(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x20(%rsp)
movq 0x8(%rax), %rdx
movq %rdx, 0x18(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x96b45
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0xd0(%rsp), %rdi
cmpq %r12, %rdi
je 0x96b62
movq 0xe0(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0x60(%rsp), %rdi
cmpq %r15, %rdi
je 0x96b79
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0xb0(%rsp), %rdi
cmpq %rbx, %rdi
je 0x96b96
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x229c0
leaq 0xa0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x96bb7
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x229c0
leaq 0x138(%rsp), %rbx
movq %rbx, -0x10(%rbx)
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
addq %rsi, %rdx
leaq 0x128(%rsp), %rdi
callq 0x3213c
leaq 0x128(%rsp), %rsi
movq 0x8(%rsp), %rdi
callq 0x784c2
leaq 0x90(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x22a80
leaq 0x20(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
jne 0x96c1d
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
jmp 0x96c2a
movq %rsi, 0x10(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x20(%rsp)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x18(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0xa0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x96c68
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0x30(%rsp), %rdi
cmpq %r15, %rdi
je 0x96c7f
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0x60(%rsp), %rdi
cmpq %rbx, %rdi
je 0x96c96
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x229c0
leaq 0xc0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x96cb7
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x229c0
leaq 0x118(%rsp), %rbx
movq %rbx, -0x10(%rbx)
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
addq %rsi, %rdx
leaq 0x108(%rsp), %rdi
callq 0x3213c
leaq 0x108(%rsp), %rsi
movq 0x8(%rsp), %rdi
callq 0x784c2
movq 0xdf2b2(%rip), %r15     # 0x175fa8
leaq 0x62904(%rip), %r12     # 0xf9601
movl $0x7, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x22ab0
movl 0x20(%rbx), %esi
movq %r15, %rdi
callq 0x22650
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x22940
movsbl %al, %esi
movq %r13, %rdi
callq 0x22050
movq %rax, %rdi
callq 0x22660
movq %rbx, %rdi
callq 0x22ad0
movq %rax, %rbx
cmpq 0x80(%rsp), %rax
jne 0x96cfd
jmp 0x968fe
movq %rax, %r14
movq 0x148(%rsp), %rdi
cmpq %rbx, %rdi
je 0x96ef6
movq 0x158(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x96ef6
jmp 0x96ef3
movq %rax, %r14
movq 0x108(%rsp), %rdi
cmpq %rbx, %rdi
je 0x96daf
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x96daf
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x96f04
jmp 0x97003
movq %rax, %r14
leaq 0xa0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x96e27
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x96e27
movq %rax, %r14
movq 0x128(%rsp), %rdi
cmpq %rbx, %rdi
je 0x96e11
movq 0x138(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x96e11
movq %rax, %r14
movq 0x10(%rsp), %rdi
cmpq %r13, %rdi
jne 0x96f04
jmp 0x97003
movq %rax, %r14
movq 0x30(%rsp), %rdi
cmpq %r15, %rdi
je 0x96e63
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x96e63
movq %rax, %r14
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x96e8e
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x96e8e
movq %rax, %r14
movq 0x60(%rsp), %rdi
cmpq %rbx, %rdi
je 0x96eb0
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x96eb0
jmp 0x96fd4
jmp 0x96fd4
jmp 0x96fd4
movq %rax, %r14
movq 0xd0(%rsp), %rdi
cmpq %r12, %rdi
je 0x96ed5
movq 0xe0(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x96ed5
movq %rax, %r14
leaq 0xc0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x97003
movq 0xc0(%rsp), %rsi
jmp 0x96f85
movq %rax, %r14
movq 0x60(%rsp), %rdi
cmpq %r15, %rdi
je 0x96f2a
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x96f2a
jmp 0x96fd4
movq %rax, %r14
movq 0x10(%rsp), %rdi
cmpq %rbp, %rdi
je 0x97003
movq 0x20(%rsp), %rsi
jmp 0x96f85
movq %rax, %r14
movq 0x30(%rsp), %rdi
cmpq %rbx, %rdi
je 0x96f4c
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x96f4c
movq %rax, %r14
movq 0xb0(%rsp), %rdi
cmpq %rbx, %rdi
je 0x96f68
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x96f68
movq %rax, %r14
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x97003
movq 0x70(%rsp), %rsi
jmp 0x96f85
movq %rax, %r14
leaq 0xa0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x97003
movq 0xa0(%rsp), %rsi
incq %rsi
jmp 0x96ffe
jmp 0x96fd9
movq %rax, %r14
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x96fec
movq 0x28(%rsp), %rsi
subq %rdi, %rsi
callq 0x229c0
jmp 0x96fec
jmp 0x96fd9
movq %rax, %r14
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x97003
movq 0x28(%rsp), %rsi
jmp 0x96ffb
jmp 0x96fd4
movq %rax, %r14
cmpl $0x0, (%r12)
jne 0x97003
movl %ebp, (%r12)
jmp 0x97003
jmp 0x96fd4
jmp 0x96fd4
movq %rax, %r14
jmp 0x97003
movq %rax, %r14
jmp 0x96fec
movq %rax, %r14
cmpl $0x0, (%r12)
jne 0x96fec
movl %r13d, (%r12)
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x97003
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x229c0
movq 0x88(%rsp), %rdi
callq 0xacf96
movq %r14, %rdi
callq 0x23240