// File: 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
movq %rsp, %rbp
subq $0x560, %rsp            # imm = 0x560
movq %rdi, -0x428(%rbp)
movq %rdi, %rax
movq %rax, -0x420(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x418(%rbp)
movl $0x0, -0x1c(%rbp)
cmpl $0x3, 0x1614(%rax)
jb 0x10a8f1
jmp 0x10a8f1
movq -0x428(%rbp), %rdi
movb $0x0, -0x1d(%rbp)
callq 0x123840
movq -0x418(%rbp), %rax
movq (%rax), %rdi
movq %rdi, %r9
addq $0x18, %r9
movq %rsp, %rax
movl $0xffffffff, 0x8(%rax)  # imm = 0xFFFFFFFF
movl $0x1, (%rax)
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
xorl %r8d, %r8d
movl %ecx, %esi
movl %r8d, %edx
callq 0xcefc0
movl %eax, -0x42c(%rbp)
jmp 0x10a93c
movl -0x42c(%rbp), %eax
movl %eax, -0x24(%rbp)
cmpl $0x1, -0x24(%rbp)
jl 0x10b769
movq -0x418(%rbp), %rax
cmpl $0x3, 0x1614(%rax)
jb 0x10a972
jmp 0x10a972
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x10b78f
leaq -0x48(%rbp), %rdi
callq 0xb3700
jmp 0x10a97d
movq -0x418(%rbp), %rax
movq (%rax), %rdi
addq $0x18, %rdi
movl $0xd, -0x5c(%rbp)
leaq -0x5c(%rbp), %rsi
callq 0xb3750
movq %rdx, -0x440(%rbp)
movq %rax, -0x438(%rbp)
jmp 0x10a9ab
movq -0x440(%rbp), %rax
movq -0x438(%rbp), %rcx
movq %rcx, -0x58(%rbp)
movq %rax, -0x50(%rbp)
leaq -0x48(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0xb3790
movq -0x48(%rbp), %rax
movq %rax, -0x68(%rbp)
leaq -0x48(%rbp), %rsi
addq $0x8, %rsi
leaq -0x68(%rbp), %rdi
callq 0xb37c0
testb $0x1, %al
jne 0x10a9f0
jmp 0x10b029
leaq -0x68(%rbp), %rdi
callq 0xb3190
movq -0x418(%rbp), %rdi
movl 0x2c(%rax), %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
movl %eax, -0x448(%rbp)
addq $0x15c0, %rdi           # imm = 0x15C0
callq 0x45170
movl -0x448(%rbp), %edi
movl %eax, %esi
callq 0x17d3f0
movl %eax, -0x444(%rbp)
jmp 0x10aa30
movq -0x418(%rbp), %rdi
movl -0x444(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x18(%rbp), %eax
movl %eax, -0x450(%rbp)
addq $0x15c0, %rdi           # imm = 0x15C0
callq 0x45170
movl -0x450(%rbp), %edi
movl %eax, %esi
callq 0x17d3d0
movl %eax, -0x44c(%rbp)
jmp 0x10aa6a
movq -0x418(%rbp), %rax
movl -0x44c(%rbp), %ecx
movl %ecx, -0x1c(%rbp)
cmpl $0x3, 0x1614(%rax)
jb 0x10aa85
jmp 0x10aa85
movq -0x418(%rbp), %rdi
addq $0x1820, %rdi           # imm = 0x1820
leaq -0x18(%rbp), %rsi
callq 0x123530
movq %rax, -0x458(%rbp)
jmp 0x10aaa5
movq -0x418(%rbp), %rdi
movq -0x458(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
movq %rax, 0x1850(%rdi)
movq %rdi, %rax
addq $0x1850, %rax           # imm = 0x1850
movq %rax, -0x460(%rbp)
addq $0x1820, %rdi           # imm = 0x1820
callq 0x1233c0
movq -0x460(%rbp), %rdi
movq %rax, -0x78(%rbp)
leaq -0x78(%rbp), %rsi
callq 0x123570
testb $0x1, %al
jne 0x10aafb
jmp 0x10ad8f
movl -0x18(%rbp), %esi
leaq -0xd8(%rbp), %rdi
callq 0x17e460
jmp 0x10ab0c
leaq 0xd7c7c(%rip), %rsi     # 0x1e278f
leaq -0xb8(%rbp), %rdi
leaq -0xd8(%rbp), %rdx
callq 0x8e0f0
jmp 0x10ab28
leaq 0xd7c84(%rip), %rdx     # 0x1e27b3
leaq -0x98(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0x441f0
jmp 0x10ab44
leaq -0xb8(%rbp), %rdi
callq 0x311e8
leaq -0xd8(%rbp), %rdi
callq 0x311e8
movq 0x1ca3ed(%rip), %rdi    # 0x2d4f50
leaq 0xd813c(%rip), %rsi     # 0x1e2ca6
callq 0x2ff50
movq %rax, -0x468(%rbp)
jmp 0x10ab78
movq -0x418(%rbp), %rdi
addq $0x1820, %rdi           # imm = 0x1820
callq 0x123340
movq -0x468(%rbp), %rdi
movq %rax, %rsi
callq 0x30cf0
movq %rax, -0x470(%rbp)
jmp 0x10aba3
movq -0x470(%rbp), %rdi
movq 0x1ca417(%rip), %rsi    # 0x2d4fc8
callq 0x30c10
jmp 0x10abb8
movq 0x1ca391(%rip), %rdi    # 0x2d4f50
leaq 0xd7c28(%rip), %rsi     # 0x1e27ee
callq 0x2ff50
movq %rax, -0x478(%rbp)
jmp 0x10abd4
movq -0x478(%rbp), %rdi
movq 0x1ca3e6(%rip), %rsi    # 0x2d4fc8
callq 0x30c10
jmp 0x10abe9
movq -0x418(%rbp), %rdi
addq $0x1820, %rdi           # imm = 0x1820
callq 0x123360
movq %rax, -0xe0(%rbp)
movq -0x418(%rbp), %rdi
addq $0x1820, %rdi           # imm = 0x1820
callq 0x1233c0
movq %rax, -0xe8(%rbp)
leaq -0xe0(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
callq 0x123390
testb $0x1, %al
jne 0x10ac39
jmp 0x10acf1
movq 0x1ca310(%rip), %rdi    # 0x2d4f50
leaq 0xd1235(%rip), %rsi     # 0x1dbe7c
callq 0x2ff50
movq %rax, -0x480(%rbp)
jmp 0x10ac55
leaq -0xe0(%rbp), %rdi
callq 0x1233f0
movq -0x480(%rbp), %rdi
movl (%rax), %esi
callq 0x30640
movq %rax, -0x488(%rbp)
jmp 0x10ac78
movq -0x488(%rbp), %rdi
movq 0x1ca342(%rip), %rsi    # 0x2d4fc8
callq 0x30c10
jmp 0x10ac8d
jmp 0x10ac8f
leaq -0xe0(%rbp), %rdi
xorl %esi, %esi
callq 0x1235a0
movq %rax, -0xf0(%rbp)
jmp 0x10ac03
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x10accf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0xb8(%rbp), %rdi
callq 0x311e8
leaq -0xd8(%rbp), %rdi
callq 0x311e8
jmp 0x10b78f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x10ad7e
movq 0x1ca258(%rip), %rdi    # 0x2d4f50
leaq 0xd7b12(%rip), %rsi     # 0x1e2811
callq 0x2ff50
movq %rax, -0x490(%rbp)
jmp 0x10ad0d
movq -0x490(%rbp), %rdi
movq 0x1ca2ad(%rip), %rsi    # 0x2d4fc8
callq 0x30c10
jmp 0x10ad22
leaq -0x110(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0x2f300
jmp 0x10ad37
movq -0x418(%rbp), %rdi
leaq -0x110(%rbp), %rsi
callq 0xeada0
jmp 0x10ad4c
leaq -0x110(%rbp), %rdi
callq 0x311e8
leaq -0x98(%rbp), %rdi
callq 0x311e8
jmp 0x10ad8f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x110(%rbp), %rdi
callq 0x311e8
leaq -0x98(%rbp), %rdi
callq 0x311e8
jmp 0x10b78f
movq -0x418(%rbp), %rax
movq %rax, %rdi
addq $0x1820, %rdi           # imm = 0x1820
movq 0x1850(%rax), %rax
movq %rax, -0x118(%rbp)
movq -0x118(%rbp), %rsi
callq 0x1235e0
movq %rax, -0x498(%rbp)
jmp 0x10adc3
movq -0x418(%rbp), %rdi
movq -0x498(%rbp), %rax
movq %rax, -0x120(%rbp)
addq $0x1950, %rdi           # imm = 0x1950
leaq -0x14(%rbp), %rsi
callq 0x1230c0
movq %rax, -0x4a0(%rbp)
jmp 0x10adf1
movq -0x4a0(%rbp), %rdi
leaq -0x1c(%rbp), %rsi
callq 0x123620
movq %rax, -0x4a8(%rbp)
jmp 0x10ae0a
movq -0x418(%rbp), %rsi
movq -0x4a8(%rbp), %rax
movl (%rax), %ecx
incl %ecx
movl %ecx, (%rax)
leaq -0x138(%rbp), %rdi
callq 0x109ef0
jmp 0x10ae2c
leaq -0x138(%rbp), %rdi
callq 0xb2400
leaq -0x68(%rbp), %rdi
callq 0xb3190
movq %rax, %rdi
addq $0x30, %rdi
xorl %eax, %eax
movl %eax, %esi
movq %rsi, -0x4b8(%rbp)
callq 0x449e0
movq -0x4b8(%rbp), %rsi
movq %rax, %rdi
callq 0x44830
movsd %xmm0, -0x4b0(%rbp)
jmp 0x10ae71
movsd -0x4b0(%rbp), %xmm0
movsd %xmm0, -0x140(%rbp)
leaq -0x158(%rbp), %rdi
movq %rdi, -0x4c0(%rbp)
callq 0xb2580
movq -0x4c0(%rbp), %rdi
leaq -0x140(%rbp), %rsi
callq 0xb2e30
jmp 0x10aea9
leaq -0x68(%rbp), %rdi
callq 0xb3190
movq %rax, %rdi
addq $0x8, %rdi
addq $0x28, %rdi
callq 0x458f0
movq %rax, -0x168(%rbp)
leaq -0x168(%rbp), %rdi
movl $0x1, %esi
callq 0x8b080
movq %rax, -0x160(%rbp)
leaq -0x68(%rbp), %rdi
callq 0xb3190
movq %rax, %rdi
addq $0x8, %rdi
addq $0x28, %rdi
callq 0x45920
movq %rax, -0x170(%rbp)
leaq -0x160(%rbp), %rdi
leaq -0x170(%rbp), %rsi
callq 0x45860
testb $0x1, %al
jne 0x10af1a
jmp 0x10af85
leaq -0x160(%rbp), %rdi
callq 0x8aed0
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x44830
movsd %xmm0, -0x4c8(%rbp)
jmp 0x10af3c
movsd -0x4c8(%rbp), %xmm0
movsd %xmm0, -0x178(%rbp)
leaq -0x158(%rbp), %rdi
leaq -0x178(%rbp), %rsi
callq 0xb2630
jmp 0x10af61
jmp 0x10af63
leaq -0x160(%rbp), %rdi
callq 0x8aef0
jmp 0x10aee1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x10b018
leaq -0x198(%rbp), %rdi
leaq -0x18(%rbp), %rsi
leaq -0x158(%rbp), %rdx
callq 0x1238a0
jmp 0x10af9e
movq -0x428(%rbp), %rdi
leaq -0x198(%rbp), %rsi
callq 0x123860
movb %dl, -0x4d1(%rbp)
movq %rax, -0x4d0(%rbp)
jmp 0x10afc0
movb -0x4d1(%rbp), %al
movq -0x4d0(%rbp), %rcx
movq %rcx, -0x1a8(%rbp)
movb %al, -0x1a0(%rbp)
leaq -0x198(%rbp), %rdi
callq 0x121cb0
leaq -0x158(%rbp), %rdi
callq 0xb2660
leaq -0x68(%rbp), %rdi
callq 0xb37f0
jmp 0x10a9d6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x198(%rbp), %rdi
callq 0x121cb0
leaq -0x158(%rbp), %rdi
callq 0xb2660
jmp 0x10b78f
movq -0x418(%rbp), %rax
movq (%rax), %rdi
addq $0x18, %rdi
movl $0xe, -0x1bc(%rbp)
leaq -0x1bc(%rbp), %rsi
callq 0xb3750
movq %rdx, -0x4e8(%rbp)
movq %rax, -0x4e0(%rbp)
jmp 0x10b05d
movq -0x4e8(%rbp), %rax
movq -0x4e0(%rbp), %rcx
movq %rcx, -0x1b8(%rbp)
movq %rax, -0x1b0(%rbp)
leaq -0x48(%rbp), %rdi
leaq -0x1b8(%rbp), %rsi
callq 0xb3790
movq -0x48(%rbp), %rax
movq %rax, -0x1c8(%rbp)
leaq -0x48(%rbp), %rsi
addq $0x8, %rsi
leaq -0x1c8(%rbp), %rdi
callq 0xb37c0
testb $0x1, %al
jne 0x10b0b1
jmp 0x10b756
leaq -0x1c8(%rbp), %rdi
callq 0xb3190
movq -0x418(%rbp), %rdi
movl 0x2c(%rax), %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
movl %eax, -0x4f0(%rbp)
addq $0x15c0, %rdi           # imm = 0x15C0
callq 0x45170
movl -0x4f0(%rbp), %edi
movl %eax, %esi
callq 0x17d3f0
movl %eax, -0x4ec(%rbp)
jmp 0x10b0f4
movq -0x418(%rbp), %rdi
movl -0x4ec(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x18(%rbp), %eax
movl %eax, -0x4f8(%rbp)
addq $0x15c0, %rdi           # imm = 0x15C0
callq 0x45170
movl -0x4f8(%rbp), %edi
movl %eax, %esi
callq 0x17d3d0
movl %eax, -0x4f4(%rbp)
jmp 0x10b12e
movq -0x418(%rbp), %rdi
movl -0x4f4(%rbp), %eax
movl %eax, -0x1c(%rbp)
addq $0x1820, %rdi           # imm = 0x1820
leaq -0x18(%rbp), %rsi
callq 0x123530
movq %rax, -0x500(%rbp)
jmp 0x10b157
movq -0x418(%rbp), %rdi
movq -0x500(%rbp), %rax
movq %rax, -0x1d0(%rbp)
movq -0x1d0(%rbp), %rax
movq %rax, 0x1850(%rdi)
addq $0x1820, %rdi           # imm = 0x1820
leaq -0x18(%rbp), %rsi
callq 0x123530
movq %rax, -0x508(%rbp)
jmp 0x10b193
movq -0x418(%rbp), %rdi
movq -0x508(%rbp), %rax
movq %rax, -0x1d8(%rbp)
movq -0x1d8(%rbp), %rax
movq %rax, 0x1850(%rdi)
movq %rdi, %rax
addq $0x1850, %rax           # imm = 0x1850
movq %rax, -0x510(%rbp)
addq $0x1820, %rdi           # imm = 0x1820
callq 0x1233c0
movq -0x510(%rbp), %rdi
movq %rax, -0x1e0(%rbp)
leaq -0x1e0(%rbp), %rsi
callq 0x123570
testb $0x1, %al
jne 0x10b1f5
jmp 0x10b3c6
movl -0x14(%rbp), %esi
leaq -0x280(%rbp), %rdi
callq 0x17e460
jmp 0x10b206
leaq 0xd7861(%rip), %rsi     # 0x1e2a6e
leaq -0x260(%rbp), %rdi
leaq -0x280(%rbp), %rdx
callq 0x8e0f0
jmp 0x10b222
leaq 0xd7866(%rip), %rdx     # 0x1e2a8f
leaq -0x240(%rbp), %rdi
leaq -0x260(%rbp), %rsi
callq 0x441f0
jmp 0x10b23e
movl -0x18(%rbp), %esi
leaq -0x2a0(%rbp), %rdi
callq 0x17e460
jmp 0x10b24f
leaq -0x220(%rbp), %rdi
leaq -0x240(%rbp), %rsi
leaq -0x2a0(%rbp), %rdx
callq 0x9c7d0
jmp 0x10b26b
leaq 0xd7541(%rip), %rdx     # 0x1e27b3
leaq -0x200(%rbp), %rdi
leaq -0x220(%rbp), %rsi
callq 0x441f0
jmp 0x10b287
leaq -0x220(%rbp), %rdi
callq 0x311e8
leaq -0x2a0(%rbp), %rdi
callq 0x311e8
leaq -0x240(%rbp), %rdi
callq 0x311e8
leaq -0x260(%rbp), %rdi
callq 0x311e8
leaq -0x280(%rbp), %rdi
callq 0x311e8
leaq -0x2c0(%rbp), %rdi
leaq -0x200(%rbp), %rsi
callq 0x2f300
jmp 0x10b2d8
movq -0x418(%rbp), %rdi
leaq -0x2c0(%rbp), %rsi
callq 0xeada0
jmp 0x10b2ed
leaq -0x2c0(%rbp), %rdi
callq 0x311e8
leaq -0x200(%rbp), %rdi
callq 0x311e8
jmp 0x10b408
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x10b37e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x10b372
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x10b366
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x10b35a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x220(%rbp), %rdi
callq 0x311e8
leaq -0x2a0(%rbp), %rdi
callq 0x311e8
leaq -0x240(%rbp), %rdi
callq 0x311e8
leaq -0x260(%rbp), %rdi
callq 0x311e8
leaq -0x280(%rbp), %rdi
callq 0x311e8
jmp 0x10b78f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x10b3b5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x2c0(%rbp), %rdi
callq 0x311e8
leaq -0x200(%rbp), %rdi
callq 0x311e8
jmp 0x10b78f
movq -0x418(%rbp), %rax
movq %rax, %rdi
addq $0x1820, %rdi           # imm = 0x1820
movq 0x1850(%rax), %rax
movq %rax, -0x2c8(%rbp)
movq -0x2c8(%rbp), %rsi
callq 0x1235e0
movq %rax, -0x518(%rbp)
jmp 0x10b3fa
movq -0x518(%rbp), %rax
movq %rax, -0x2d0(%rbp)
movq -0x418(%rbp), %rdi
addq $0x1858, %rdi           # imm = 0x1858
leaq -0x18(%rbp), %rsi
callq 0x123530
movq %rax, -0x520(%rbp)
jmp 0x10b428
movq -0x418(%rbp), %rdi
movq -0x520(%rbp), %rax
movq %rax, -0x2d8(%rbp)
movq -0x2d8(%rbp), %rax
movq %rax, 0x1850(%rdi)
movq %rdi, %rax
addq $0x1850, %rax           # imm = 0x1850
movq %rax, -0x528(%rbp)
addq $0x1858, %rdi           # imm = 0x1858
callq 0x1233c0
movq -0x528(%rbp), %rdi
movq %rax, -0x2e0(%rbp)
leaq -0x2e0(%rbp), %rsi
callq 0x123570
testb $0x1, %al
jne 0x10b487
jmp 0x10b4cc
movq -0x418(%rbp), %rdi
addq $0x19d0, %rdi           # imm = 0x19D0
leaq -0x18(%rbp), %rsi
callq 0x123270
movb %dl, -0x531(%rbp)
movq %rax, -0x530(%rbp)
jmp 0x10b4ad
movb -0x531(%rbp), %al
movq -0x530(%rbp), %rcx
movq %rcx, -0x2f0(%rbp)
movb %al, -0x2e8(%rbp)
jmp 0x10b65b
movl -0x14(%rbp), %esi
leaq -0x370(%rbp), %rdi
callq 0x17e460
jmp 0x10b4dd
leaq 0xd77e4(%rip), %rsi     # 0x1e2cc8
leaq -0x350(%rbp), %rdi
leaq -0x370(%rbp), %rdx
callq 0x8e0f0
jmp 0x10b4f9
leaq 0xd758f(%rip), %rdx     # 0x1e2a8f
leaq -0x330(%rbp), %rdi
leaq -0x350(%rbp), %rsi
callq 0x441f0
jmp 0x10b515
movl -0x18(%rbp), %esi
leaq -0x390(%rbp), %rdi
callq 0x17e460
jmp 0x10b526
leaq -0x310(%rbp), %rdi
leaq -0x330(%rbp), %rsi
leaq -0x390(%rbp), %rdx
callq 0x9c7d0
jmp 0x10b542
leaq -0x390(%rbp), %rdi
callq 0x311e8
leaq -0x330(%rbp), %rdi
callq 0x311e8
leaq -0x350(%rbp), %rdi
callq 0x311e8
leaq -0x370(%rbp), %rdi
callq 0x311e8
leaq -0x3b0(%rbp), %rdi
leaq -0x310(%rbp), %rsi
callq 0x2f300
jmp 0x10b587
movq -0x418(%rbp), %rdi
leaq -0x3b0(%rbp), %rsi
callq 0xeada0
jmp 0x10b59c
leaq -0x3b0(%rbp), %rdi
callq 0x311e8
leaq -0x310(%rbp), %rdi
callq 0x311e8
jmp 0x10b65b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x10b613
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x10b607
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x10b5fb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x390(%rbp), %rdi
callq 0x311e8
leaq -0x330(%rbp), %rdi
callq 0x311e8
leaq -0x350(%rbp), %rdi
callq 0x311e8
leaq -0x370(%rbp), %rdi
callq 0x311e8
jmp 0x10b78f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x10b64a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x3b0(%rbp), %rdi
callq 0x311e8
leaq -0x310(%rbp), %rdi
callq 0x311e8
jmp 0x10b78f
movq -0x418(%rbp), %rsi
leaq -0x3c8(%rbp), %rdi
callq 0x109ef0
jmp 0x10b670
leaq -0x3c8(%rbp), %rdi
callq 0xb2400
xorps %xmm0, %xmm0
movaps %xmm0, -0x400(%rbp)
movq $0x0, -0x3f0(%rbp)
leaq -0x400(%rbp), %rdi
movq %rdi, -0x540(%rbp)
callq 0xb2580
movq -0x540(%rbp), %rdx
leaq -0x3e8(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x1238e0
jmp 0x10b6bd
movq -0x428(%rbp), %rdi
leaq -0x3e8(%rbp), %rsi
callq 0x123860
movb %dl, -0x549(%rbp)
movq %rax, -0x548(%rbp)
jmp 0x10b6df
movb -0x549(%rbp), %al
movq -0x548(%rbp), %rcx
movq %rcx, -0x410(%rbp)
movb %al, -0x408(%rbp)
leaq -0x3e8(%rbp), %rdi
callq 0x121cb0
leaq -0x400(%rbp), %rdi
callq 0xb2660
leaq -0x1c8(%rbp), %rdi
callq 0xb37f0
jmp 0x10b094
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x10b748
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x3e8(%rbp), %rdi
callq 0x121cb0
leaq -0x400(%rbp), %rdi
callq 0xb2660
jmp 0x10b78f
movq -0x418(%rbp), %rax
movq (%rax), %rdi
addq $0x18, %rdi
callq 0xb31c0
movb $0x1, -0x1d(%rbp)
testb $0x1, -0x1d(%rbp)
jne 0x10b77f
movq -0x428(%rbp), %rdi
callq 0x123920
movq -0x420(%rbp), %rax
addq $0x560, %rsp            # imm = 0x560
popq %rbp
retq
movq -0x428(%rbp), %rdi
callq 0x123920
movq -0x30(%rbp), %rdi
callq 0x30170
nopw %cs:(%rax,%rax)