// File: /workspace/github_cpp_makefile_star2_O1/richardposner[P]BioNetFit2/src/code/Swarm.cpp
// Function: Swarm::runASA()
void Swarm::runASA() {
	if (options.verbosity >= 3) {
		cout << "Running an asynchronous PSADE fit" << endl;
	}

	if (!checkIfFileExists(options.jobOutputDir + "1")) {
		string createDirCmd = "mkdir " + options.jobOutputDir + "1";
		if (runCommand(createDirCmd) != 0) {
			outputError("Error: Couldn't create first generation output directory with command: " + createDirCmd + ". Quitting.");
		}
	}

	// Initialize and/or fill our parameter vectors
	vector<unsigned int> isLocal = vector<unsigned int>(options.swarmSize + 1);
	vector<double> particleTemps = vector<double>(options.swarmSize + 1, 0);
	vector<double> particleRadii = vector<double>(options.swarmSize + 1, 0);
	vector<float> particleFs = generateParticleFs();
	vector<float> particleCRs = generateParticleCRs();
	vector<float> cpuToParticle = vector<float>(options.swarmSize + 1, 0);
	vector<vector<float> > trialParams = vector<vector<float> >(options.swarmSize + 1, vector<float>(2, 0));
	map<unsigned int, unsigned int> particleToController;

	// Launch the initialization population and map
	// CPUs to particles
	for (int p = 1; p <= options.swarmSize; ++p) {
		launchParticle(p);
		cpuToParticle[p] = p;
		particleToController[p] = p;
	}

	unordered_map<unsigned int, vector<double> > finishedParticles;
	unordered_map<unsigned int, vector<double> > initFinishedParticles;
	int numFinishedParticles = 0;

	// Wait for initialization population to finish simulations
	while (numFinishedParticles < options.swarmSize) {
		initFinishedParticles = checkMasterMessagesDE();
		// Save finished particles in another map, we still need to process them in the main loop later on
		if (initFinishedParticles.size()) {
			finishedParticles.insert(initFinishedParticles.begin(), initFinishedParticles.end());
			numFinishedParticles += initFinishedParticles.size();
		}

		// Process each finished particle
		for (auto particle = initFinishedParticles.begin(); particle != initFinishedParticles.end(); ++particle) {
			//++flightCounter_;
			cout << "particle " << cpuToParticle[particle->first] << " on cpu " << particle->first << " finished" << endl;
			string paramString = toString(flightCounter_) + " ";

			// Update parameter values
			unsigned int i = 0;
			for (auto param = particle->second.begin() + 1; param != particle->second.end(); ++param) {
				particleCurrParamSets_[cpuToParticle[particle->first]][i++] = *param;
				cout << "updating particle " << cpuToParticle[particle->first] << " to " << *param << " at " << i << endl;
				paramString += toString(*param) + " ";
			}

			// Update fit calcs
			particleBestFits_[cpuToParticle[particle->first]] = particle->second[0];
			insertKeyByValue(particleBestFitsByFit_, particle->second[0], cpuToParticle[particle->first]);
			//allGenFits.insert(pair<double, string>(particle->second[0], paramString));
			cout << "updating particle " << cpuToParticle[particle->first] << " calc to " << particle->second[0] << endl;
			//cout << "count: " << particleBestFitsByFit_.count(particle->second[0]) << endl;

			// Update F and CR
			trialParams[cpuToParticle[particle->first]][0] = particleFs[cpuToParticle[particle->first]];
			trialParams[cpuToParticle[particle->first]][1] = particleCRs[cpuToParticle[particle->first]];
		}
	}

	// Generate our initial temps and radii
	particleTemps = generateParticleTemps();
	particleRadii = generateParticleRadii();

	// Main loop
	cout << "entering main loop" << endl;
	while (!checkStopCriteria()) {

		// Check to make sure we aren't processing init swarm before checking for new
		if (!finishedParticles.size()) {
			finishedParticles = checkMasterMessagesDE();
		}

		// Process any finished particles
		for (auto particle = finishedParticles.begin(); particle != finishedParticles.end(); ++particle) {
			cout << "particle " << cpuToParticle[particle->first] << " on cpu " << particle->first << " finished" << endl;

			string paramString = toString(flightCounter_ + 1) + " ";

			// If the particle finished their local search
			if (isLocal[particle->first]) {
				cout << "particle just finished local search" << endl;

				cout << "greedy acceptance of fit of " << particle->second[0] << endl;
				// Greedy acceptance
				particleBestFits_[cpuToParticle[particle->first]] = particle->second[0];
				insertKeyByValue(particleBestFitsByFit_, particle->second[0], cpuToParticle[particle->first]);

				unsigned int i = 0;
				for (auto param = particle->second.begin() + 1; param != particle->second.end(); ++param) {
					particleCurrParamSets_[cpuToParticle[particle->first]][i++] = *param;
					cout << "updating particle " << cpuToParticle[particle->first] << " to " << *param << " at " << i << endl;
					paramString += toString(*param) + " ";
				}

				particleFs[cpuToParticle[particle->first]] = trialParams[cpuToParticle[particle->first]][0];
				particleCRs[cpuToParticle[particle->first]] = trialParams[cpuToParticle[particle->first]][1];

				allGenFits.insert(pair<double, string>(particle->second[0], paramString));

				isLocal[particle->first] = 0;
			}
			else {
				// If we pass metropolis selection, store the params for assignment to receiver
				if (particle->second[0] < particleBestFits_.at(particleToController[cpuToParticle[particle->first]]) || metropolisSelection(particleToController[cpuToParticle[particle->first]], particle->second[0], particleTemps[particleToController[cpuToParticle[particle->first]]])) {

					cout << "particle was accepted through metropolis selection" << endl;

					unsigned int i = 0;
					for (auto param = particle->second.begin() + 1; param != particle->second.end(); ++param) {
						particleCurrParamSets_[cpuToParticle[particle->first]][i++] = *param;
						cout << "updating particle " << cpuToParticle[particle->first] << " to " << *param << " at " << i << endl;
						paramString += toString(*param) + " ";
					}

					// Update fitness
					particleBestFits_[cpuToParticle[particle->first]] = particle->second[0];
					insertKeyByValue(particleBestFitsByFit_, particle->second[0], cpuToParticle[particle->first]);
					cout << "accepting params and fit of " << particle->second[0] << endl;

					// Update CR and F
					cout << "updating F to " << trialParams[cpuToParticle[particle->first]][0] << " and CR to " << trialParams[cpuToParticle[particle->first]][1] << endl;
					particleFs[cpuToParticle[particle->first]] = trialParams[cpuToParticle[particle->first]][0];
					particleCRs[cpuToParticle[particle->first]] = trialParams[cpuToParticle[particle->first]][1];
				}
				else {
					for (auto param = particle->second.begin() + 1; param != particle->second.end(); ++param) {
						paramString += toString(*param) + " ";
					}
				}

				// Save params for output no matter what
				allGenFits.insert(pair<double, string>(particle->second[0], paramString));
				cout << "inserting " << paramString << endl;
				// Do a local search at some probability
				// Or if particle is best in swarm
				if (particle->second[0] < particleBestFits_.at(particleToController[cpuToParticle[particle->first]]) || options.localSearchProbability >= ((float)rand() / (float)RAND_MAX)) {
					cout << "going to do a local search" << endl;
					// This receiver will go on to do a local search
					isLocal[particle->first] = cpuToParticle[particle->first];
				}
			}

			if ((options.outputEvery != 0) && (++flightCounter_ && flightCounter_ % options.outputEvery == 0)) {
				string outputPath = options.jobOutputDir + toString(flightCounter_) + "_summary.txt";
				outputRunSummary(outputPath);
				//cout << "fc is " << flightCounter_ << ", outputting" << endl;
			}

			unsigned int it = rand() % options.swarmSize + 1;
			cout << "chose receiver of " << it << endl;
			vector<double> newParams;

			// Swap temps and radii
			swapTR(particleRadii, particleTemps);

			// If we aren't going to do a local search, generate a new trial point
			if (!isLocal[particle->first]) {
				// Pick the controller
				unsigned int controller = pickWeightedSA();
				cout << "not doing local search. chose controller of " << controller << endl;
				// Generate a new trial vector
				particleToController[cpuToParticle[particle->first]] = controller;
				newParams = generateTrialPointSA(controller, it, particleRadii, particleCRs, particleFs, trialParams);
				cout << "generated new trial points" << endl;

				// Make sure we know this CPU will be running this Receiver
				cpuToParticle[particle->first] = it;
				cout << "setting cpu " << particle->first << " as receiver " << it << endl;

				// Save new params for sending to particle
				vector<string> newParamsStr;
				for (auto param = newParams.begin(); param != newParams.end(); ++param) {
					newParamsStr.push_back(toString(*param));
				}

				cout << "running " << cpuToParticle[particle->first] << " with new params on cpu " << particle->first << endl;

				// Send the params to the CPU
				swarmComm->sendToSwarm(0, particle->first, SEND_FINAL_PARAMS_TO_PARTICLE, false, newParamsStr);
				launchParticle(particle->first);
			}
			else {
				cout << "running local search on cpu " << particle->first << endl;
				// Do local search using PREVIOUS receiver
				runNelderMead(isLocal[particle->first], particle->first);
			}
		}
		finishedParticles.clear();
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x328, %rsp            # imm = 0x328
movq %rdi, %rbp
cmpl $0x3, 0x1614(%rdi)
jb 0x848db
movq 0xf16f0(%rip), %rbx     # 0x175f90
leaq 0x7c30c(%rip), %rsi     # 0x100bb3
movl $0x21, %edx
movq %rbx, %rdi
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
leaq 0x1e8(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x1520(%rbp), %rsi
movq 0x1528(%rbp), %rdx
addq %rsi, %rdx
leaq 0x1d8(%rsp), %rbx
movq %rbx, %rdi
callq 0x32180
leaq 0x742ed(%rip), %rsi     # 0xf8bfc
movq %rbx, %rdi
callq 0x233b0
leaq 0x1d8(%rsp), %rdi
callq 0xbf2c2
movl %eax, %ebx
movq 0x1d8(%rsp), %rdi
cmpq %r14, %rdi
je 0x84943
movq 0x1e8(%rsp), %rsi
incq %rsi
callq 0x229c0
testl %ebx, %ebx
movq %rbp, 0x10(%rsp)
jne 0x84a6e
leaq 0x1520(%rbp), %rdx
leaq 0x73639(%rip), %rsi     # 0xf7f97
leaq 0x158(%rsp), %rbx
movq %rbx, %rdi
callq 0x319d8
leaq 0x74287(%rip), %rsi     # 0xf8bfc
movq %rbx, %rdi
callq 0x233b0
leaq 0xe0(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x849ad
movq %rdx, 0xd0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xe0(%rsp)
jmp 0x849b4
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
movq %rdx, 0xd8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x168(%rsp), %r15
movq -0x10(%r15), %rdi
cmpq %r15, %rdi
je 0x849f0
movq 0x168(%rsp), %rsi
incq %rsi
callq 0x229c0
leaq 0x280(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0xd0(%rsp), %rsi
movq 0xd8(%rsp), %rdx
addq %rsi, %rdx
leaq 0x270(%rsp), %rdi
callq 0x32180
leaq 0x270(%rsp), %rdi
callq 0xc038e
movl %eax, %ebx
movq 0x270(%rsp), %rdi
cmpq %r12, %rdi
je 0x84a49
movq 0x280(%rsp), %rsi
incq %rsi
callq 0x229c0
testl %ebx, %ebx
jne 0x85567
movq 0xd0(%rsp), %rdi
cmpq %r14, %rdi
je 0x84a6e
movq 0xe0(%rsp), %rsi
incq %rsi
callq 0x229c0
movslq 0x1620(%rbp), %rsi
incq %rsi
leaq 0x140(%rsp), %rdi
leaq 0xd0(%rsp), %rdx
callq 0xa8618
movslq 0x1620(%rbp), %rsi
incq %rsi
leaq 0xd0(%rsp), %rdx
movq $0x0, (%rdx)
leaq 0x128(%rsp), %rdi
leaq 0x158(%rsp), %rcx
callq 0xa8b2a
movslq 0x1620(%rbp), %rsi
incq %rsi
leaq 0xd0(%rsp), %rdx
movq $0x0, (%rdx)
leaq 0x110(%rsp), %rdi
leaq 0x158(%rsp), %rcx
callq 0xa8b2a
leaq 0x1a8(%rsp), %rdi
movq %rbp, %rsi
callq 0xa212c
leaq 0x190(%rsp), %rdi
movq %rbp, %rsi
callq 0xa21aa
movslq 0x1620(%rbp), %rsi
incq %rsi
leaq 0xd0(%rsp), %rdx
movl $0x0, (%rdx)
leaq 0x60(%rsp), %rdi
leaq 0x158(%rsp), %rcx
callq 0xa8bac
movslq 0x1620(%rbp), %rbx
xorps %xmm0, %xmm0
movaps %xmm0, 0xd0(%rsp)
movq $0x0, 0xe0(%rsp)
movl $0x8, %edi
callq 0x22980
leaq 0xd0(%rsp), %rdx
movq %rax, (%rdx)
movq %rax, 0x8(%rdx)
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, 0x10(%rdx)
movq $0x0, (%rax)
movq %rcx, 0x8(%rdx)
incq %rbx
leaq 0x1c0(%rsp), %rdi
leaq 0x158(%rsp), %rcx
movq %rbx, %rsi
callq 0xa8c2e
movq 0xd0(%rsp), %rdi
testq %rdi, %rdi
je 0x84bb8
movq 0xe0(%rsp), %rsi
subq %rdi, %rsi
callq 0x229c0
leaq 0x298(%rsp), %rax
movl $0x0, (%rax)
xorl %ecx, %ecx
movq %rcx, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rcx, 0x20(%rax)
cmpl $0x0, 0x1620(%rbp)
jle 0x84c3a
movl $0x1, %ebx
leaq 0x290(%rsp), %r14
leaq 0xd0(%rsp), %r15
movq %rbp, %rdi
movl %ebx, %esi
xorl %edx, %edx
callq 0x8c82e
xorps %xmm0, %xmm0
cvtsi2ss %ebx, %xmm0
movq 0x60(%rsp), %rax
movss %xmm0, (%rax,%rbx,4)
movl %ebx, 0xd0(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0xa8236
movl %ebx, (%rax)
leaq 0x1(%rbx), %rax
movslq 0x1620(%rbp), %rcx
cmpq %rcx, %rbx
movq %rax, %rbx
jl 0x84bf6
leaq 0x100(%rsp), %rax
movq %rax, -0x30(%rax)
movl $0x1, %ecx
movq %rcx, -0x28(%rax)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rax)
movl $0x3f800000, %edx       # imm = 0x3F800000
movl %edx, -0x10(%rax)
movups %xmm0, -0x8(%rax)
leaq 0x188(%rsp), %rax
movq %rax, -0x30(%rax)
movq %rcx, -0x28(%rax)
movups %xmm0, -0x20(%rax)
movl %edx, -0x10(%rax)
movups %xmm0, -0x8(%rax)
cmpl $0x0, 0x1620(%rbp)
jle 0x8520e
leaq 0xa8(%rsp), %r13
leaq 0x1400(%rbp), %rax
movq %rax, 0xc0(%rsp)
leaq 0x1a20(%rbp), %rax
movq %rax, 0xc8(%rsp)
leaq 0x1ab0(%rbp), %rax
movq %rax, 0x1f8(%rsp)
movl $0x0, 0xbc(%rsp)
leaq 0x20(%rsp), %rdi
leaq 0x98(%rsp), %r15
movq %rbp, %rsi
movq %rdi, %rbx
callq 0x96964
leaq 0x158(%rsp), %rdi
movq %rbx, %rsi
callq 0x23d5e
movq %rbx, %rdi
callq 0xad720
cmpq $0x0, 0x170(%rsp)
je 0x84d4f
movq 0x168(%rsp), %r14
leaq 0xd0(%rsp), %rax
movq %rax, 0x20(%rsp)
testq %r14, %r14
je 0x84d3a
leaq 0x8(%r14), %rsi
leaq 0xd0(%rsp), %rdi
leaq 0x20(%rsp), %rdx
callq 0xbcc5e
movq (%r14), %r14
jmp 0x84d1a
movl 0xbc(%rsp), %eax
addl 0x170(%rsp), %eax
movl %eax, 0xbc(%rsp)
movq 0x168(%rsp), %r14
testq %r14, %r14
je 0x851f6
movl $0x9, %edx
movq 0xf1224(%rip), %rdi     # 0x175f90
leaq 0x7b133(%rip), %rsi     # 0xffea6
callq 0x22ab0
movl 0x8(%r14), %eax
movq 0x60(%rsp), %rcx
xorps %xmm0, %xmm0
cvtss2sd (%rcx,%rax,4), %xmm0
movq 0xf1200(%rip), %rdi     # 0x175f90
callq 0x23060
movq %rax, %r12
movl $0x8, %edx
movq %rax, %rdi
leaq 0x7bf89(%rip), %rsi     # 0x100d30
callq 0x22ab0
movl 0x8(%r14), %esi
movq %r12, %rdi
callq 0x22650
movq %rax, %r12
movl $0x9, %edx
movq %rax, %rdi
leaq 0x74a57(%rip), %rsi     # 0xf9821
callq 0x22ab0
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x22940
movsbl %al, %esi
movq %r12, %rdi
callq 0x22050
movq %rax, %rdi
callq 0x22660
movl 0x1d84(%rbp), %esi
movq %r15, %rdi
callq 0xc03b8
movq %r15, %rdi
leaq 0x7c62e(%rip), %rsi     # 0x10143d
callq 0x233b0
leaq 0x30(%rsp), %rsi
movq %rsi, 0x20(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x84e3c
movq %rdx, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
jmp 0x84e42
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq %r15, %rbx
movq 0x8(%rax), %rdx
movq %rdx, 0x28(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x98(%rsp), %rdi
cmpq %r13, %rdi
je 0x84e7a
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0x10(%r14), %r15
addq $0x8, %r15
cmpq 0x18(%r14), %r15
je 0x85052
movl $0x1, %ebp
movsd (%r15), %xmm0
movsd %xmm0, 0x18(%rsp)
movl 0x8(%r14), %eax
movq 0x60(%rsp), %rcx
cvttss2si (%rcx,%rax,4), %rax
movl %eax, 0x98(%rsp)
movq 0xc0(%rsp), %rdi
movq %rbx, %rsi
callq 0x6f1a2
leal -0x1(%rbp), %ecx
movl %ecx, %ecx
movq (%rax), %rax
movsd 0x18(%rsp), %xmm0
movsd %xmm0, (%rax,%rcx,8)
movl $0x12, %edx
movq 0xf10af(%rip), %rdi     # 0x175f90
leaq 0x7bced(%rip), %rsi     # 0x100bd5
callq 0x22ab0
movl 0x8(%r14), %eax
movq 0x60(%rsp), %rcx
xorps %xmm0, %xmm0
cvtss2sd (%rcx,%rax,4), %xmm0
movq 0xf108b(%rip), %rdi     # 0x175f90
callq 0x23060
movq %rax, %r12
movl $0x4, %edx
movq %rax, %rdi
leaq 0x7bd89(%rip), %rsi     # 0x100ca5
callq 0x22ab0
movsd (%r15), %xmm0
movq %r12, %rdi
callq 0x23060
movq %rax, %r12
movl $0x4, %edx
movq %rax, %rdi
leaq 0x7bca8(%rip), %rsi     # 0x100be8
callq 0x22ab0
movl %ebp, %esi
movq %r12, %rdi
callq 0x22650
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x22940
movsbl %al, %esi
movq %r12, %rdi
callq 0x22050
movq %rax, %rdi
callq 0x22660
movsd (%r15), %xmm0
leaq 0x78(%rsp), %r12
movq %r12, %rdi
callq 0xc0446
movq %r12, %rdi
leaq 0x7c4a8(%rip), %rsi     # 0x10143d
callq 0x233b0
movq %r13, 0x98(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x84fc6
movq %rdx, 0x98(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xa8(%rsp)
jmp 0x84fce
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
movq %rdx, 0xa0(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x98(%rsp), %rsi
movq 0xa0(%rsp), %rdx
leaq 0x20(%rsp), %rdi
callq 0x222b0
movq 0x98(%rsp), %rdi
cmpq %r13, %rdi
je 0x85020
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0x85042
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x229c0
addq $0x8, %r15
incl %ebp
cmpq 0x18(%r14), %r15
jne 0x84e91
movq 0x10(%r14), %rax
movsd (%rax), %xmm0
movsd %xmm0, 0x18(%rsp)
movl 0x8(%r14), %eax
movq 0x60(%rsp), %rcx
cvttss2si (%rcx,%rax,4), %rax
movl %eax, 0x98(%rsp)
movq 0xc8(%rsp), %rdi
movq %rbx, %r15
movq %rbx, %rsi
callq 0xa816e
movsd 0x18(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x10(%r14), %rax
movsd (%rax), %xmm0
movl 0x8(%r14), %eax
movq 0x60(%rsp), %rcx
cvttss2si (%rcx,%rax,4), %rdx
movq 0x1f8(%rsp), %rsi
callq 0x9c6ba
movl $0x12, %edx
movq 0xf0ecd(%rip), %rdi     # 0x175f90
leaq 0x7bb0b(%rip), %rsi     # 0x100bd5
callq 0x22ab0
movl 0x8(%r14), %eax
movq 0x60(%rsp), %rcx
xorps %xmm0, %xmm0
cvtss2sd (%rcx,%rax,4), %xmm0
movq 0xf0ea9(%rip), %rdi     # 0x175f90
callq 0x23060
movq %rax, %r12
movl $0x9, %edx
movq %rax, %rdi
leaq 0x7baef(%rip), %rsi     # 0x100bed
callq 0x22ab0
movq 0x10(%r14), %rax
movsd (%rax), %xmm0
movq %r12, %rdi
callq 0x23060
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x22940
movsbl %al, %esi
movq %r12, %rdi
callq 0x22050
movq %rax, %rdi
callq 0x22660
movl 0x8(%r14), %eax
movq 0x60(%rsp), %rcx
movss (%rcx,%rax,4), %xmm0
cvttss2si %xmm0, %rdx
movq %rdx, %rsi
sarq $0x3f, %rsi
movss 0x731e9(%rip), %xmm1    # 0xf8348
subss %xmm1, %xmm0
cvttss2si %xmm0, %rdi
andq %rsi, %rdi
orq %rdx, %rdi
movq 0x1a8(%rsp), %rdx
movss (%rdx,%rdi,4), %xmm0
movq 0x1c0(%rsp), %rdx
leaq (%rdi,%rdi,2), %rsi
movq (%rdx,%rsi,8), %rsi
movss %xmm0, (%rsi)
movss (%rcx,%rax,4), %xmm0
cvttss2si %xmm0, %rax
movq %rax, %rcx
sarq $0x3f, %rcx
subss %xmm1, %xmm0
cvttss2si %xmm0, %rsi
andq %rcx, %rsi
orq %rax, %rsi
movq 0x190(%rsp), %rax
movss (%rax,%rsi,4), %xmm0
leaq (%rsi,%rsi,2), %rax
movq (%rdx,%rax,8), %rax
movss %xmm0, 0x4(%rax)
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x851e5
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x229c0
movq (%r14), %r14
testq %r14, %r14
movq 0x10(%rsp), %rbp
jne 0x84d60
movl 0xbc(%rsp), %eax
cmpl 0x1620(%rbp), %eax
leaq 0x20(%rsp), %rdi
jl 0x84cd7
leaq 0x20(%rsp), %rdi
movq %rbp, %rsi
callq 0xa2230
movq 0x128(%rsp), %rdi
movq 0x138(%rsp), %rsi
movq 0x20(%rsp), %rax
movq %rax, 0x128(%rsp)
movups 0x28(%rsp), %xmm0
movups %xmm0, 0x130(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movq $0x0, 0x30(%rsp)
testq %rdi, %rdi
je 0x85263
subq %rdi, %rsi
callq 0x229c0
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x8527a
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x229c0
leaq 0x20(%rsp), %rdi
movq %rbp, %rsi
callq 0xa2312
movq 0x110(%rsp), %rdi
movq 0x120(%rsp), %rsi
movq 0x20(%rsp), %rax
movq %rax, 0x110(%rsp)
movups 0x28(%rsp), %xmm0
movups %xmm0, 0x118(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movq $0x0, 0x30(%rsp)
testq %rdi, %rdi
je 0x852cf
subq %rdi, %rsi
callq 0x229c0
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x852e6
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x229c0
movq 0xf0ca3(%rip), %rbx     # 0x175f90
leaq 0x7b903(%rip), %rsi     # 0x100bf7
movl $0x12, %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 0xf0c71(%rip), %rdi     # 0x175f90
callq 0x22050
movq %rax, %rdi
callq 0x22660
leaq 0x20(%rsp), %rbx
leaq 0xd0(%rsp), %r14
movq %rbp, %rdi
callq 0x8795e
testb %al, %al
jne 0x85389
cmpq $0x0, 0xe8(%rsp)
jne 0x8536e
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x96964
movq %r14, %rdi
movq %rbx, %rsi
callq 0x23d5e
movq %rbx, %rdi
callq 0xad720
movq 0xe0(%rsp), %r13
testq %r13, %r13
jne 0x85477
movq %r14, %rdi
callq 0xad746
jmp 0x85339
leaq 0x158(%rsp), %rdi
callq 0xad720
leaq 0xd0(%rsp), %rdi
callq 0xad720
leaq 0x290(%rsp), %rdi
callq 0xacef8
leaq 0x1c0(%rsp), %rdi
callq 0xa8d46
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x853d4
movq 0x70(%rsp), %rsi
subq %rdi, %rsi
callq 0x229c0
movq 0x190(%rsp), %rdi
testq %rdi, %rdi
je 0x853f1
movq 0x1a0(%rsp), %rsi
subq %rdi, %rsi
callq 0x229c0
movq 0x1a8(%rsp), %rdi
testq %rdi, %rdi
je 0x8540e
movq 0x1b8(%rsp), %rsi
subq %rdi, %rsi
callq 0x229c0
movq 0x110(%rsp), %rdi
testq %rdi, %rdi
je 0x8542b
movq 0x120(%rsp), %rsi
subq %rdi, %rsi
callq 0x229c0
movq 0x128(%rsp), %rdi
testq %rdi, %rdi
je 0x85448
movq 0x138(%rsp), %rsi
subq %rdi, %rsi
callq 0x229c0
movq 0x140(%rsp), %rdi
testq %rdi, %rdi
je 0x85465
movq 0x150(%rsp), %rsi
subq %rdi, %rsi
callq 0x229c0
addq $0x328, %rsp            # imm = 0x328
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xf0b12(%rip), %rdi     # 0x175f90
leaq 0x7aa21(%rip), %rsi     # 0xffea6
movl $0x9, %edx
callq 0x22ab0
movl 0x8(%r13), %eax
movq 0x60(%rsp), %rcx
xorps %xmm0, %xmm0
cvtss2sd (%rcx,%rax,4), %xmm0
movq 0xf0ae9(%rip), %rdi     # 0x175f90
callq 0x23060
movq %rax, %rbx
leaq 0x7b87a(%rip), %rsi     # 0x100d30
movl $0x8, %edx
movq %rax, %rdi
callq 0x22ab0
movl 0x8(%r13), %esi
movq %rbx, %rdi
callq 0x22650
movq %rax, %rbx
leaq 0x74348(%rip), %rsi     # 0xf9821
movl $0x9, %edx
movq %rax, %rdi
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 0x10(%rsp), %rax
movl 0x1d84(%rax), %esi
incl %esi
leaq 0x20(%rsp), %rdi
callq 0xc03b8
leaq 0x7bf12(%rip), %rsi     # 0x10143d
leaq 0x20(%rsp), %rdi
callq 0x233b0
leaq 0xa8(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x855f9
movups (%rcx), %xmm0
leaq 0xa8(%rsp), %rdx
movups %xmm0, (%rdx)
jmp 0x8560c
leaq 0x7b1c0(%rip), %rsi     # 0x10072e
leaq 0x158(%rsp), %rdi
leaq 0xd0(%rsp), %rdx
callq 0x319d8
leaq 0x7c448(%rip), %rsi     # 0x1019d2
leaq 0x158(%rsp), %rdi
callq 0x233b0
leaq 0x2d0(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x855bd
movups (%rcx), %xmm0
movups %xmm0, (%r12)
jmp 0x855d0
movq %rdx, 0x2c0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x2d0(%rsp)
movq 0x8(%rax), %rdx
leaq 0x2c0(%rsp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x10(%rsp), %rdi
callq 0x78b66
movq %rdx, 0x98(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xa8(%rsp)
movq 0x8(%rax), %rdx
movq %rdx, 0xa0(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x85642
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x229c0
movl 0x8(%r13), %eax
movq 0x140(%rsp), %rcx
cmpl $0x0, (%rcx,%rax,4)
jne 0x85949
movq 0x60(%rsp), %rcx
cvttss2si (%rcx,%rax,4), %rax
movq 0x10(%r13), %rcx
movsd (%rcx), %xmm0
movsd %xmm0, 0x18(%rsp)
leaq 0x20(%rsp), %rsi
movl %eax, (%rsi)
leaq 0x290(%rsp), %rdi
callq 0xa8236
movq 0x10(%rsp), %rcx
leaq 0x1a20(%rcx), %rdi
movq %rdi, 0xc8(%rsp)
movq %rax, %rsi
callq 0xa83c8
movsd (%rax), %xmm0
ucomisd 0x18(%rsp), %xmm0
jbe 0x85b5f
movq 0xf08d8(%rip), %rbx     # 0x175f90
leaq 0x7b58c(%rip), %rsi     # 0x100c4b
movl $0x32, %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 0xf08a6(%rip), %rdi     # 0x175f90
callq 0x22050
movq %rax, %rdi
callq 0x22660
movq 0x10(%r13), %rbp
addq $0x8, %rbp
cmpq 0x18(%r13), %rbp
jne 0x85e23
movl 0x8(%r13), %eax
movq 0x60(%rsp), %rcx
cvttss2si (%rcx,%rax,4), %rax
movq 0x10(%r13), %rcx
movsd (%rcx), %xmm0
movsd %xmm0, 0x18(%rsp)
leaq 0x20(%rsp), %rsi
movl %eax, (%rsi)
movq 0xc8(%rsp), %rdi
callq 0xa816e
movsd 0x18(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x10(%rsp), %rax
leaq 0x1ab0(%rax), %rsi
movq 0x10(%r13), %rax
movsd (%rax), %xmm0
movl 0x8(%r13), %eax
movq 0x60(%rsp), %rcx
cvttss2si (%rcx,%rax,4), %rdx
callq 0x9c6ba
movq 0xf081d(%rip), %rdi     # 0x175f90
leaq 0x7b504(%rip), %rsi     # 0x100c7e
movl $0x1c, %edx
callq 0x22ab0
movq 0x10(%r13), %rax
movsd (%rax), %xmm0
movq 0xf07fd(%rip), %rdi     # 0x175f90
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 0xf07c7(%rip), %rdi     # 0x175f90
leaq 0x7b4cb(%rip), %rsi     # 0x100c9b
movl $0xe, %edx
callq 0x22ab0
movl 0x8(%r13), %eax
movq 0x60(%rsp), %rcx
movss (%rcx,%rax,4), %xmm0
cvttss2si %xmm0, %rax
movq %rax, %rcx
subss 0x72b50(%rip), %xmm0    # 0xf8348
cvttss2si %xmm0, %rdx
sarq $0x3f, %rcx
andq %rcx, %rdx
orq %rax, %rdx
movq 0x1c0(%rsp), %rax
leaq (%rdx,%rdx,2), %rcx
movq (%rax,%rcx,8), %rax
xorps %xmm0, %xmm0
cvtss2sd (%rax), %xmm0
movq 0xf076b(%rip), %rdi     # 0x175f90
callq 0x23060
movq %rax, %rbx
leaq 0x7b476(%rip), %rsi     # 0x100caa
movl $0xb, %edx
movq %rax, %rdi
callq 0x22ab0
movl 0x8(%r13), %eax
movq 0x60(%rsp), %rcx
movss (%rcx,%rax,4), %xmm0
cvttss2si %xmm0, %rax
movq %rax, %rcx
subss 0x72ae9(%rip), %xmm0    # 0xf8348
cvttss2si %xmm0, %rdx
sarq $0x3f, %rcx
andq %rcx, %rdx
orq %rax, %rdx
movq 0x1c0(%rsp), %rax
leaq (%rdx,%rdx,2), %rcx
movq (%rax,%rcx,8), %rax
xorps %xmm0, %xmm0
cvtss2sd 0x4(%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 0x8(%r13), %eax
movq 0x60(%rsp), %rcx
movss (%rcx,%rax,4), %xmm0
cvttss2si %xmm0, %rdx
movq %rdx, %rsi
movss 0x72a72(%rip), %xmm1    # 0xf8348
subss %xmm1, %xmm0
cvttss2si %xmm0, %rdi
sarq $0x3f, %rsi
andq %rsi, %rdi
orq %rdx, %rdi
movq 0x1c0(%rsp), %rdx
leaq (%rdi,%rdi,2), %rsi
movq (%rdx,%rsi,8), %rsi
movss (%rsi), %xmm0
movq 0x1a8(%rsp), %rsi
movss %xmm0, (%rsi,%rdi,4)
movss (%rcx,%rax,4), %xmm0
cvttss2si %xmm0, %rax
movq %rax, %rcx
subss %xmm1, %xmm0
cvttss2si %xmm0, %rsi
sarq $0x3f, %rcx
andq %rcx, %rsi
orq %rax, %rsi
leaq (%rsi,%rsi,2), %rax
movq (%rdx,%rax,8), %rax
movss 0x4(%rax), %xmm0
movq 0x190(%rsp), %rax
movss %xmm0, (%rax,%rsi,4)
jmp 0x85bf3
movq 0xf0640(%rip), %rbx     # 0x175f90
leaq 0x7b2b3(%rip), %rsi     # 0x100c0a
movl $0x23, %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 0xf060e(%rip), %rdi     # 0x175f90
callq 0x22050
movq %rax, %rdi
callq 0x22660
movq 0xf05fa(%rip), %rdi     # 0x175f90
leaq 0x7b291(%rip), %rsi     # 0x100c2e
movl $0x1c, %edx
callq 0x22ab0
movq 0x10(%r13), %rax
movsd (%rax), %xmm0
movq 0xf05da(%rip), %rdi     # 0x175f90
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 0x10(%r13), %rax
movl 0x8(%r13), %ecx
movq 0x60(%rsp), %rdx
cvttss2si (%rdx,%rcx,4), %rcx
movsd (%rax), %xmm0
movsd %xmm0, 0x18(%rsp)
movq 0x10(%rsp), %rax
leaq 0x1a20(%rax), %rdi
leaq 0x20(%rsp), %rsi
movl %ecx, (%rsi)
callq 0xa816e
movsd 0x18(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x10(%rsp), %rax
leaq 0x1ab0(%rax), %rsi
movq 0x10(%r13), %rax
movsd (%rax), %xmm0
movl 0x8(%r13), %eax
movq 0x60(%rsp), %rcx
cvttss2si (%rcx,%rax,4), %rdx
callq 0x9c6ba
movq 0x10(%r13), %r12
addq $0x8, %r12
cmpq 0x18(%r13), %r12
jne 0x860d5
movl 0x8(%r13), %eax
movq 0x60(%rsp), %rcx
movss (%rcx,%rax,4), %xmm0
cvttss2si %xmm0, %rdx
movq %rdx, %rsi
sarq $0x3f, %rsi
movss 0x728c8(%rip), %xmm1    # 0xf8348
subss %xmm1, %xmm0
cvttss2si %xmm0, %rdi
andq %rsi, %rdi
orq %rdx, %rdi
movq 0x1c0(%rsp), %rdx
leaq (%rdi,%rdi,2), %rsi
movq (%rdx,%rsi,8), %rsi
movss (%rsi), %xmm0
movq 0x1a8(%rsp), %rsi
movss %xmm0, (%rsi,%rdi,4)
movss (%rcx,%rax,4), %xmm0
cvttss2si %xmm0, %rax
movq %rax, %rcx
sarq $0x3f, %rcx
subss %xmm1, %xmm0
cvttss2si %xmm0, %rsi
andq %rcx, %rsi
orq %rax, %rsi
leaq (%rsi,%rsi,2), %rax
movq (%rdx,%rax,8), %rax
movss 0x4(%rax), %xmm0
movq 0x190(%rsp), %rax
movss %xmm0, (%rax,%rsi,4)
movq 0x10(%r13), %rax
movsd (%rax), %xmm0
leaq 0x28(%rsp), %rdi
movsd %xmm0, -0x8(%rdi)
leaq 0x38(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x98(%rsp), %rsi
movq 0xa0(%rsp), %rdx
addq %rsi, %rdx
callq 0x32180
movq 0x10(%rsp), %rax
leaq 0x8(%rax), %rdi
leaq 0x20(%rsp), %rsi
callq 0xb044a
movq 0x28(%rsp), %rdi
cmpq %r14, %rdi
je 0x85b47
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x229c0
movl 0x8(%r13), %eax
movq 0x140(%rsp), %rcx
movl $0x0, (%rcx,%rax,4)
jmp 0x85d8d
movl 0x8(%r13), %eax
movq 0x60(%rsp), %rcx
cvttss2si (%rcx,%rax,4), %rax
leaq 0x78(%rsp), %rsi
movl %eax, (%rsi)
leaq 0x290(%rsp), %rdi
callq 0xa8236
movl (%rax), %ebx
movl 0x8(%r13), %eax
movq 0x60(%rsp), %rcx
cvttss2si (%rcx,%rax,4), %rax
movq 0x10(%r13), %rcx
movsd (%rcx), %xmm0
movsd %xmm0, 0x18(%rsp)
leaq 0x250(%rsp), %rsi
movl %eax, (%rsi)
leaq 0x290(%rsp), %rdi
callq 0xa8236
movl (%rax), %eax
movq 0x128(%rsp), %rcx
cvtsd2ss (%rcx,%rax,8), %xmm1
movq 0x10(%rsp), %rdi
movl %ebx, %esi
movsd 0x18(%rsp), %xmm0
callq 0xa23e8
testb %al, %al
jne 0x856b1
movq 0x10(%r13), %rbp
addq $0x8, %rbp
cmpq 0x18(%r13), %rbp
jne 0x85ff9
movq 0x10(%r13), %rax
movsd (%rax), %xmm0
leaq 0x28(%rsp), %rdi
movsd %xmm0, -0x8(%rdi)
leaq 0x38(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x98(%rsp), %rsi
movq 0xa0(%rsp), %rdx
addq %rsi, %rdx
callq 0x32180
movq 0x10(%rsp), %rax
leaq 0x8(%rax), %rdi
leaq 0x20(%rsp), %rsi
callq 0xb044a
movq 0x28(%rsp), %rdi
cmpq %r14, %rdi
je 0x85c50
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0xf0339(%rip), %rdi     # 0x175f90
leaq 0x7b058(%rip), %rsi     # 0x100cb6
movl $0xa, %edx
callq 0x22ab0
movq 0x98(%rsp), %rsi
movq 0xa0(%rsp), %rdx
movq 0xf0311(%rip), %rdi     # 0x175f90
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 0x8(%r13), %eax
movq 0x60(%rsp), %rcx
cvttss2si (%rcx,%rax,4), %rax
movq 0x10(%r13), %rcx
movsd (%rcx), %xmm0
movsd %xmm0, 0x18(%rsp)
leaq 0x20(%rsp), %rsi
movl %eax, (%rsi)
leaq 0x290(%rsp), %rdi
callq 0xa8236
movq 0xc8(%rsp), %rdi
movq %rax, %rsi
callq 0xa83c8
movsd (%rax), %xmm0
ucomisd 0x18(%rsp), %xmm0
ja 0x85d2d
movq 0x10(%rsp), %rax
movss 0x1720(%rax), %xmm0
movss %xmm0, 0x18(%rsp)
callq 0x22230
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
mulss 0x782d6(%rip), %xmm0    # 0xfdff8
movss 0x18(%rsp), %xmm1
ucomiss %xmm0, %xmm1
jb 0x85d8d
movq 0xf025c(%rip), %rbx     # 0x175f90
leaq 0x7af86(%rip), %rsi     # 0x100cc1
movl $0x1a, %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 0xf022a(%rip), %rdi     # 0x175f90
callq 0x22050
movq %rax, %rdi
callq 0x22660
movl 0x8(%r13), %eax
movq 0x60(%rsp), %rcx
cvttss2si (%rcx,%rax,4), %rcx
movq 0x140(%rsp), %rdx
movl %ecx, (%rdx,%rax,4)
movq 0x10(%rsp), %rax
movl 0x1728(%rax), %ecx
testl %ecx, %ecx
je 0x863dd
movq 0x10(%rsp), %rax
movl 0x1d84(%rax), %esi
incl %esi
movl %esi, 0x1d84(%rax)
je 0x863dd
movl %esi, %eax
xorl %edx, %edx
divl %ecx
testl %edx, %edx
jne 0x863dd
leaq 0x250(%rsp), %rdi
callq 0xc03b8
movq 0x10(%rsp), %rax
movq 0x1520(%rax), %rcx
movq 0x1528(%rax), %r8
leaq 0x250(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x22a80
leaq 0x88(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x862ae
movups (%rcx), %xmm0
movups %xmm0, (%r14)
jmp 0x862be
movq 0x10(%rsp), %rax
addq $0x1400, %rax           # imm = 0x1400
movq %rax, 0xc0(%rsp)
movl $0x1, %ebx
movq 0xf014e(%rip), %r12     # 0x175f90
leaq 0x78(%rsp), %r15
movsd (%rbp), %xmm0
movsd %xmm0, 0x18(%rsp)
movl 0x8(%r13), %eax
movq 0x60(%rsp), %rcx
cvttss2si (%rcx,%rax,4), %rax
movl %eax, 0x20(%rsp)
movq 0xc0(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x6f1a2
leal -0x1(%rbx), %ecx
movl %ecx, %ecx
movq (%rax), %rax
movsd 0x18(%rsp), %xmm0
movsd %xmm0, (%rax,%rcx,8)
movl $0x12, %edx
movq %r12, %rdi
leaq 0x7ad3c(%rip), %rsi     # 0x100bd5
callq 0x22ab0
movl 0x8(%r13), %eax
movq 0x60(%rsp), %rcx
xorps %xmm0, %xmm0
cvtss2sd (%rcx,%rax,4), %xmm0
movq %r12, %rdi
callq 0x23060
movq %rax, %r14
movl $0x4, %edx
movq %rax, %rdi
leaq 0x7addc(%rip), %rsi     # 0x100ca5
callq 0x22ab0
movsd (%rbp), %xmm0
movq %r14, %rdi
callq 0x23060
movq %rax, %r14
movl $0x4, %edx
movq %rax, %rdi
leaq 0x7acfb(%rip), %rsi     # 0x100be8
callq 0x22ab0
movl %ebx, %esi
movq %r14, %rdi
callq 0x22650
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
movsd (%rbp), %xmm0
movq %r15, %rdi
callq 0xc0446
movq %r15, %rdi
leaq 0x7b500(%rip), %rsi     # 0x10143d
callq 0x233b0
leaq 0x30(%rsp), %rcx
movq %rcx, 0x20(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x85f6a
movq %rdx, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
jmp 0x85f77
movupd (%rcx), %xmm0
leaq 0x30(%rsp), %rdx
movupd %xmm0, (%rdx)
movq 0x8(%rax), %rdx
movq %rdx, 0x28(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
leaq 0x98(%rsp), %rdi
callq 0x222b0
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x85fc2
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0x85fe4
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x229c0
addq $0x8, %rbp
incl %ebx
cmpq 0x18(%r13), %rbp
jne 0x85e47
jmp 0x85709
leaq 0x88(%rsp), %r12
leaq 0x78(%rsp), %rbx
leaq 0x7b430(%rip), %r14     # 0x10143d
leaq 0x98(%rsp), %r15
movsd (%rbp), %xmm0
movq %rbx, %rdi
callq 0xc0446
movq %rbx, %rdi
movq %r14, %rsi
callq 0x233b0
leaq 0x30(%rsp), %rcx
movq %rcx, 0x20(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x86055
movq %rdx, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
jmp 0x86062
movupd (%rcx), %xmm0
leaq 0x30(%rsp), %rdx
movupd %xmm0, (%rdx)
movq 0x8(%rax), %rdx
movq %rdx, 0x28(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
movq %r15, %rdi
callq 0x222b0
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x860a8
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0x78(%rsp), %rdi
cmpq %r12, %rdi
je 0x860c2
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x229c0
addq $0x8, %rbp
cmpq 0x18(%r13), %rbp
jne 0x86015
jmp 0x85bf3
movq 0x10(%rsp), %rax
addq $0x1400, %rax           # imm = 0x1400
movq %rax, 0xc0(%rsp)
movl $0x1, %ebx
movq 0xefe9c(%rip), %r15     # 0x175f90
leaq 0x78(%rsp), %r14
movsd (%r12), %xmm0
movsd %xmm0, 0x18(%rsp)
movl 0x8(%r13), %eax
movq 0x60(%rsp), %rcx
cvttss2si (%rcx,%rax,4), %rax
movl %eax, 0x20(%rsp)
movq 0xc0(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x6f1a2
leal -0x1(%rbx), %ecx
movl %ecx, %ecx
movq (%rax), %rax
movsd 0x18(%rsp), %xmm0
movsd %xmm0, (%rax,%rcx,8)
movl $0x12, %edx
movq %r15, %rdi
leaq 0x7aa89(%rip), %rsi     # 0x100bd5
callq 0x22ab0
movl 0x8(%r13), %eax
movq 0x60(%rsp), %rcx
xorps %xmm0, %xmm0
cvtss2sd (%rcx,%rax,4), %xmm0
movq %r15, %rdi
callq 0x23060
movq %rax, %rbp
movl $0x4, %edx
movq %rax, %rdi
leaq 0x7ab29(%rip), %rsi     # 0x100ca5
callq 0x22ab0
movsd (%r12), %xmm0
movq %rbp, %rdi
callq 0x23060
movq %rax, %rbp
movl $0x4, %edx
movq %rax, %rdi
leaq 0x7aa47(%rip), %rsi     # 0x100be8
callq 0x22ab0
movl %ebx, %esi
movq %rbp, %rdi
callq 0x22650
movq %rax, %rbp
movq (%rax), %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 (%r12), %xmm0
movq %r14, %rdi
callq 0xc0446
movq %r14, %rdi
leaq 0x7b24b(%rip), %rsi     # 0x10143d
callq 0x233b0
leaq 0x30(%rsp), %rcx
movq %rcx, 0x20(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x8621f
movq %rdx, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
jmp 0x8622c
movupd (%rcx), %xmm0
leaq 0x30(%rsp), %rdx
movupd %xmm0, (%rdx)
movq 0x8(%rax), %rdx
movq %rdx, 0x28(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
leaq 0x98(%rsp), %rdi
callq 0x222b0
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x86277
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0x86299
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x229c0
addq $0x8, %r12
incl %ebx
cmpq 0x18(%r13), %r12
jne 0x860f9
jmp 0x85a5e
movq %rdx, 0x78(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x88(%rsp)
movq 0x8(%rax), %rdx
leaq 0x78(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x7a495(%rip), %rsi     # 0x100776
callq 0x233b0
leaq 0x30(%rsp), %rcx
movq %rcx, 0x20(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x8630c
movups (%rcx), %xmm0
leaq 0x30(%rsp), %rdx
movups %xmm0, (%rdx)
jmp 0x86319
movq %rdx, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
movq 0x8(%rax), %rdx
movq %rdx, 0x28(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x78(%rsp), %rdi
cmpq %r14, %rdi
je 0x8634b
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x229c0
leaq 0x260(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8636c
movq 0x260(%rsp), %rsi
incq %rsi
callq 0x229c0
leaq 0x240(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
addq %rsi, %rdx
leaq 0x230(%rsp), %rdi
callq 0x32180
leaq 0x230(%rsp), %rsi
movq 0x10(%rsp), %rdi
callq 0x92400
movq 0x230(%rsp), %rdi
cmpq %r14, %rdi
je 0x863c1
movq 0x240(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x863dd
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x229c0
callq 0x22230
movl %eax, %ebx
movq 0x10(%rsp), %rax
movl 0x1620(%rax), %ebp
movq 0xefb9a(%rip), %rdi     # 0x175f90
leaq 0x7a8df(%rip), %rsi     # 0x100cdc
movl $0x12, %edx
callq 0x22ab0
movl %ebx, %eax
cltd
idivl %ebp
leal 0x1(%rdx), %esi
movq 0xefb7a(%rip), %rdi     # 0x175f90
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
leaq 0x218(%rsp), %rdi
leaq 0x110(%rsp), %rsi
callq 0x66228
leaq 0x200(%rsp), %rdi
leaq 0x128(%rsp), %rsi
callq 0x66228
leaq 0x218(%rsp), %rsi
leaq 0x200(%rsp), %rdx
movq 0x10(%rsp), %rdi
callq 0xa246a
movq 0x200(%rsp), %rdi
testq %rdi, %rdi
je 0x864a6
movq 0x210(%rsp), %rsi
subq %rdi, %rsi
callq 0x229c0
movq 0x218(%rsp), %rdi
testq %rdi, %rdi
je 0x864c3
movq 0x228(%rsp), %rsi
subq %rdi, %rsi
callq 0x229c0
movl 0x8(%r13), %eax
movq 0x140(%rsp), %rcx
cmpl $0x0, (%rcx,%rax,4)
jne 0x865a5
movq 0x10(%rsp), %rdi
callq 0xa2596
movl %eax, %ebx
movq 0xefaa4(%rip), %rdi     # 0x175f90
leaq 0x7a7fc(%rip), %rsi     # 0x100cef
movl $0x2c, %edx
callq 0x22ab0
movl %ebx, %esi
movq 0xefa8a(%rip), %rdi     # 0x175f90
callq 0x22650
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
movl 0x8(%r13), %eax
movq 0x60(%rsp), %rcx
cvttss2si (%rcx,%rax,4), %rax
leaq 0x20(%rsp), %rsi
movl %eax, (%rsi)
leaq 0x290(%rsp), %rdi
callq 0xa8236
movl %ebx, (%rax)
leaq 0x310(%rsp), %rdi
leaq 0x110(%rsp), %rsi
callq 0x66228
leaq 0x2f8(%rsp), %rdi
leaq 0x190(%rsp), %rsi
callq 0xa8cc6
leaq 0x2e0(%rsp), %rdi
leaq 0x1a8(%rsp), %rsi
callq 0xa8cc6
movq 0x10(%rsp), %rsi
movl %ebx, %edx
callq 0xa27cc
movq 0xef9e4(%rip), %rdi     # 0x175f90
leaq 0x7a769(%rip), %rsi     # 0x100d1c
movl $0x1c, %edx
callq 0x22ab0
movl 0x8(%r13), %esi
movq 0xef9c8(%rip), %rdi     # 0x175f90
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
movl 0x8(%r13), %edx
movq 0x140(%rsp), %rax
movl (%rax,%rdx,4), %esi
movq 0x10(%rsp), %rdi
callq 0xa2824
jmp 0x86820
movq %rax, %rbx
movq 0x2e0(%rsp), %rdi
testq %rdi, %rdi
je 0x8663a
movq 0x2f0(%rsp), %rsi
subq %rdi, %rsi
callq 0x229c0
jmp 0x8663a
movq %rax, %rbx
movq 0x2f8(%rsp), %rdi
testq %rdi, %rdi
je 0x8665c
movq 0x308(%rsp), %rsi
subq %rdi, %rsi
callq 0x229c0
jmp 0x8665c
movq %rax, %rbx
movq 0x310(%rsp), %rdi
testq %rdi, %rdi
je 0x86823
movq 0x320(%rsp), %rsi
jmp 0x866c4
jmp 0x86820
jmp 0x86820
jmp 0x86820
movq %rax, %rbx
movq 0x200(%rsp), %rdi
testq %rdi, %rdi
je 0x866ab
movq 0x210(%rsp), %rsi
subq %rdi, %rsi
callq 0x229c0
jmp 0x866ab
movq %rax, %rbx
movq 0x218(%rsp), %rdi
testq %rdi, %rdi
je 0x86823
movq 0x228(%rsp), %rsi
subq %rdi, %rsi
jmp 0x8680b
movq %rax, %rbx
movq 0x230(%rsp), %rdi
cmpq %r14, %rdi
je 0x866f1
movq 0x240(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x866f1
movq %rax, %rbx
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x86823
movq 0x30(%rsp), %rsi
jmp 0x86808
movq %rax, %rbx
movq 0x78(%rsp), %rdi
cmpq %r14, %rdi
je 0x8673e
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x8673e
jmp 0x8677e
jmp 0x8679f
jmp 0x86820
jmp 0x86820
movq %rax, %rbx
leaq 0x260(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x86823
movq 0x260(%rsp), %rsi
jmp 0x86808
jmp 0x86820
jmp 0x86820
jmp 0x86820
jmp 0x867f6
jmp 0x86820
jmp 0x86820
movq %rax, %rbx
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x867a2
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x867a2
movq %rax, %rbx
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
jne 0x867e8
jmp 0x86823
jmp 0x86820
jmp 0x86820
movq %rax, %rbx
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x867de
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x867de
movq %rax, %rbx
movq 0x78(%rsp), %rdi
cmpq %r12, %rdi
je 0x86823
movq 0x88(%rsp), %rsi
jmp 0x86808
jmp 0x86820
jmp 0x86820
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r14, %rdi
je 0x86823
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x86823
jmp 0x86820
jmp 0x86820
jmp 0x86820
jmp 0x86820
jmp 0x86820
jmp 0x86820
jmp 0x86820
movq %rax, %rbx
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
jne 0x869c0
jmp 0x86a3f
movq %rax, %rbx
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
jmp 0x86a2d
jmp 0x869ce
movq %rax, %rbx
movq 0x2c0(%rsp), %rdi
cmpq %r12, %rdi
je 0x8687c
movq 0x2d0(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x8687c
movq %rax, %rbx
movq 0x158(%rsp), %rdi
cmpq %r15, %rdi
je 0x868ba
movq 0x168(%rsp), %rsi
jmp 0x868ad
jmp 0x868b7
movq %rax, %rbx
movq 0x270(%rsp), %rdi
cmpq %r12, %rdi
je 0x868ba
movq 0x280(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x868ba
movq %rax, %rbx
movq 0xd0(%rsp), %rdi
cmpq %r14, %rdi
je 0x86b1b
movq 0xe0(%rsp), %rsi
jmp 0x86986
movq %rax, %rbx
leaq 0x168(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x86b1b
movq 0x168(%rsp), %rsi
jmp 0x86986
jmp 0x869ce
jmp 0x869ce
movq %rax, %rbx
movq 0xd0(%rsp), %rdi
testq %rdi, %rdi
je 0x86a73
movq 0xe0(%rsp), %rsi
subq %rdi, %rsi
callq 0x229c0
jmp 0x86a73
movq %rax, %rbx
jmp 0x86a73
movq %rax, %rbx
jmp 0x86a8a
movq %rax, %rbx
jmp 0x86aa7
movq %rax, %rbx
jmp 0x86ac4
movq %rax, %rbx
jmp 0x86ae1
movq %rax, %rbx
jmp 0x86afe
movq %rax, %rbx
jmp 0x86b1b
jmp 0x8696a
movq %rax, %rbx
movq 0x1d8(%rsp), %rdi
cmpq %r14, %rdi
je 0x86b1b
movq 0x1e8(%rsp), %rsi
incq %rsi
jmp 0x86b16
jmp 0x869ce
jmp 0x86996
jmp 0x869ce
jmp 0x869ce
movq %rax, %rdi
callq 0x318ef
jmp 0x869a0
movq %rax, %rbx
jmp 0x86a59
jmp 0x869ce
jmp 0x869ce
jmp 0x869ce
jmp 0x86a20
movq %rax, %rbx
movq 0x98(%rsp), %rdi
cmpq %r13, %rdi
je 0x86a3f
movq 0xa8(%rsp), %rsi
jmp 0x86a37
jmp 0x869ce
jmp 0x86a20
movq %rax, %rbx
jmp 0x86a3f
jmp 0x86a20
movq %rax, %rbx
jmp 0x869fc
jmp 0x86a20
movq %rax, %rbx
movq 0x98(%rsp), %rdi
cmpq %r13, %rdi
je 0x869fc
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0x86a23
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x86a23
movq %rax, %rbx
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x86a3f
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x229c0
leaq 0x158(%rsp), %rdi
callq 0xad720
leaq 0xd0(%rsp), %rdi
callq 0xad720
leaq 0x290(%rsp), %rdi
callq 0xacef8
leaq 0x1c0(%rsp), %rdi
callq 0xa8d46
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x86a8a
movq 0x70(%rsp), %rsi
subq %rdi, %rsi
callq 0x229c0
movq 0x190(%rsp), %rdi
testq %rdi, %rdi
je 0x86aa7
movq 0x1a0(%rsp), %rsi
subq %rdi, %rsi
callq 0x229c0
movq 0x1a8(%rsp), %rdi
testq %rdi, %rdi
je 0x86ac4
movq 0x1b8(%rsp), %rsi
subq %rdi, %rsi
callq 0x229c0
movq 0x110(%rsp), %rdi
testq %rdi, %rdi
je 0x86ae1
movq 0x120(%rsp), %rsi
subq %rdi, %rsi
callq 0x229c0
movq 0x128(%rsp), %rdi
testq %rdi, %rdi
je 0x86afe
movq 0x138(%rsp), %rsi
subq %rdi, %rsi
callq 0x229c0
movq 0x140(%rsp), %rdi
testq %rdi, %rdi
je 0x86b1b
movq 0x150(%rsp), %rsi
subq %rdi, %rsi
callq 0x229c0
movq %rbx, %rdi
callq 0x23240
nop