// File: /workspace/github_cpp_makefile_star2_O3/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 0x840c3
movq 0xf1f20(%rip), %rbx     # 0x175fa8
leaq 0x7cb0b(%rip), %rsi     # 0x100b9a
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 0x3213c
leaq 0x74ae5(%rip), %rsi     # 0xf8bdc
movq %rbx, %rdi
callq 0x233b0
leaq 0x1d8(%rsp), %rdi
callq 0xbe9a8
movl %eax, %ebx
movq 0x1d8(%rsp), %rdi
cmpq %r14, %rdi
je 0x8412b
movq 0x1e8(%rsp), %rsi
incq %rsi
callq 0x229c0
testl %ebx, %ebx
movq %rbp, 0x10(%rsp)
jne 0x84256
leaq 0x1520(%rbp), %rdx
leaq 0x73e01(%rip), %rsi     # 0xf7f47
leaq 0x158(%rsp), %rbx
movq %rbx, %rdi
callq 0x31944
leaq 0x74a7f(%rip), %rsi     # 0xf8bdc
movq %rbx, %rdi
callq 0x233b0
leaq 0xd0(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x84195
movq %rdx, 0xc0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xd0(%rsp)
jmp 0x8419c
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
movq %rdx, 0xc8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x168(%rsp), %r15
movq -0x10(%r15), %rdi
cmpq %r15, %rdi
je 0x841d8
movq 0x168(%rsp), %rsi
incq %rsi
callq 0x229c0
leaq 0x280(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0xc0(%rsp), %rsi
movq 0xc8(%rsp), %rdx
addq %rsi, %rdx
leaq 0x270(%rsp), %rdi
callq 0x3213c
leaq 0x270(%rsp), %rdi
callq 0xbfa1f
movl %eax, %ebx
movq 0x270(%rsp), %rdi
cmpq %r12, %rdi
je 0x84231
movq 0x280(%rsp), %rsi
incq %rsi
callq 0x229c0
testl %ebx, %ebx
jne 0x84d5c
movq 0xc0(%rsp), %rdi
cmpq %r14, %rdi
je 0x84256
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x229c0
movslq 0x1620(%rbp), %rsi
incq %rsi
leaq 0x140(%rsp), %rdi
leaq 0xc0(%rsp), %rdx
callq 0xa7cdc
movslq 0x1620(%rbp), %rsi
incq %rsi
leaq 0xc0(%rsp), %rdx
movq $0x0, (%rdx)
leaq 0x120(%rsp), %rdi
leaq 0x158(%rsp), %rcx
callq 0xa81f4
movslq 0x1620(%rbp), %rsi
incq %rsi
leaq 0xc0(%rsp), %rdx
movq $0x0, (%rdx)
leaq 0x100(%rsp), %rdi
leaq 0x158(%rsp), %rcx
callq 0xa81f4
leaq 0x1a8(%rsp), %rdi
movq %rbp, %rsi
callq 0xa1678
leaq 0x190(%rsp), %rdi
movq %rbp, %rsi
callq 0xa16f6
movslq 0x1620(%rbp), %rsi
incq %rsi
leaq 0xc0(%rsp), %rdx
movl $0x0, (%rdx)
leaq 0x58(%rsp), %rdi
leaq 0x158(%rsp), %rcx
callq 0xa8316
movslq 0x1620(%rbp), %rbx
xorps %xmm0, %xmm0
movaps %xmm0, 0xc0(%rsp)
movq $0x0, 0xd0(%rsp)
movl $0x8, %edi
callq 0x22980
leaq 0xc0(%rsp), %rdx
movq %rax, (%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 0xa84a0
movq 0xc0(%rsp), %rdi
testq %rdi, %rdi
je 0x8439c
movq 0xd0(%rsp), %rsi
subq %rdi, %rsi
callq 0x229c0
leaq 0x298(%rsp), %rcx
movl $0x0, (%rcx)
xorl %eax, %eax
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rax, 0x20(%rcx)
cmpl $0x0, 0x1620(%rbp)
jle 0x84423
movl $0x1, %ebx
leaq 0x290(%rsp), %r14
leaq 0xc0(%rsp), %r15
movq %rbp, %rdi
movl %ebx, %esi
xorl %edx, %edx
callq 0x8befe
xorps %xmm0, %xmm0
cvtsi2ss %ebx, %xmm0
movq 0x58(%rsp), %rax
movss %xmm0, (%rax,%rbx,4)
movl %ebx, 0xc0(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0xa7800
movl %ebx, (%rax)
leaq 0x1(%rbx), %rcx
movslq 0x1620(%rbp), %rax
cmpq %rax, %rbx
movq %rcx, %rbx
jl 0x843da
testl %eax, %eax
setg %al
leaq 0xf0(%rsp), %rcx
movq %rcx, -0x30(%rcx)
movl $0x1, %edx
movq %rdx, -0x28(%rcx)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rcx)
movl $0x3f800000, %esi       # imm = 0x3F800000
movl %esi, -0x10(%rcx)
movups %xmm0, -0x8(%rcx)
leaq 0x188(%rsp), %rcx
movq %rcx, -0x30(%rcx)
movq %rdx, -0x28(%rcx)
movups %xmm0, -0x20(%rcx)
movl %esi, -0x10(%rcx)
movups %xmm0, -0x8(%rcx)
testb %al, %al
je 0x84a03
leaq 0xa0(%rsp), %r13
leaq 0x1400(%rbp), %rax
movq %rax, 0xb0(%rsp)
leaq 0x1a20(%rbp), %rax
movq %rax, 0xb8(%rsp)
leaq 0x1ab0(%rbp), %rax
movq %rax, 0x1f8(%rsp)
movq $0x0, 0xf8(%rsp)
leaq 0x20(%rsp), %rdi
leaq 0x90(%rsp), %r15
movq %rbp, %rsi
movq %rdi, %rbx
callq 0x95fea
leaq 0x158(%rsp), %rdi
movq %rbx, %rsi
callq 0x23d5c
movq %rbx, %rdi
callq 0xacf96
movq 0x168(%rsp), %r14
movq 0x170(%rsp), %rax
testq %rax, %rax
je 0x849e1
leaq 0xc0(%rsp), %rcx
movq %rcx, 0x20(%rsp)
testq %r14, %r14
je 0x8453a
leaq 0x8(%r14), %rsi
leaq 0xc0(%rsp), %rdi
leaq 0x20(%rsp), %rdx
callq 0xbc388
movq (%r14), %r14
testq %r14, %r14
jne 0x8450a
movq 0x168(%rsp), %r14
movq 0x170(%rsp), %rax
jmp 0x8453d
xorl %r14d, %r14d
movq 0xf8(%rsp), %rcx
addl %eax, %ecx
movq %rcx, 0xf8(%rsp)
jmp 0x849e1
movl $0x9, %edx
movq 0xf1a48(%rip), %rdi     # 0x175fa8
leaq 0x7b926(%rip), %rsi     # 0xffe8d
callq 0x22ab0
movl 0x8(%r14), %eax
movq 0x58(%rsp), %rcx
xorps %xmm0, %xmm0
cvtss2sd (%rcx,%rax,4), %xmm0
movq 0xf1a24(%rip), %rdi     # 0x175fa8
callq 0x23060
movq %rax, %r12
movl $0x8, %edx
movq %rax, %rdi
leaq 0x7c77c(%rip), %rsi     # 0x100d17
callq 0x22ab0
movl 0x8(%r14), %esi
movq %r12, %rdi
callq 0x22650
movq %rax, %r12
movl $0x9, %edx
movq %rax, %rdi
leaq 0x75243(%rip), %rsi     # 0xf9801
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 0xbfa49
movq %r15, %rdi
leaq 0x7ce21(%rip), %rsi     # 0x101424
callq 0x233b0
leaq 0x30(%rsp), %rsi
movq %rsi, 0x20(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x84630
movq %rdx, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
jmp 0x84636
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 0x90(%rsp), %rdi
cmpq %r13, %rdi
je 0x8466e
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0x10(%r14), %rax
leaq 0x8(%rax), %r15
cmpq 0x18(%r14), %r15
je 0x8484f
movl $0x1, %ebp
movsd (%r15), %xmm0
movsd %xmm0, 0x18(%rsp)
movl 0x8(%r14), %eax
movq 0x58(%rsp), %rcx
cvttss2si (%rcx,%rax,4), %rax
movl %eax, 0x90(%rsp)
movq 0xb0(%rsp), %rdi
movq %rbx, %rsi
callq 0x6ec8a
leal -0x1(%rbp), %ecx
movl %ecx, %ecx
movq (%rax), %rax
movsd 0x18(%rsp), %xmm0
movsd %xmm0, (%rax,%rcx,8)
movl $0x12, %edx
movq 0xf18d3(%rip), %rdi     # 0x175fa8
leaq 0x7c4e0(%rip), %rsi     # 0x100bbc
callq 0x22ab0
movl 0x8(%r14), %eax
movq 0x58(%rsp), %rcx
xorps %xmm0, %xmm0
cvtss2sd (%rcx,%rax,4), %xmm0
movq 0xf18af(%rip), %rdi     # 0x175fa8
callq 0x23060
movq %rax, %r12
movl $0x4, %edx
movq %rax, %rdi
leaq 0x7c57c(%rip), %rsi     # 0x100c8c
callq 0x22ab0
movsd (%r15), %xmm0
movq %r12, %rdi
callq 0x23060
movq %rax, %r12
movl $0x4, %edx
movq %rax, %rdi
leaq 0x7c49b(%rip), %rsi     # 0x100bcf
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 0x70(%rsp), %r12
movq %r12, %rdi
callq 0xbfad7
movq %r12, %rdi
leaq 0x7cc9b(%rip), %rsi     # 0x101424
callq 0x233b0
movq %r13, 0x90(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x847ba
movq %rdx, 0x90(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xa0(%rsp)
jmp 0x847c2
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
movq %rdx, 0x98(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x90(%rsp), %rsi
movq 0x98(%rsp), %rdx
leaq 0x20(%rsp), %rdi
callq 0x222b0
movq 0x90(%rsp), %rdi
cmpq %r13, %rdi
je 0x84814
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x84836
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x229c0
addq $0x8, %r15
incl %ebp
cmpq 0x18(%r14), %r15
jne 0x84685
movq 0x10(%r14), %rax
movq 0x10(%rsp), %rbp
movsd (%rax), %xmm0
movsd %xmm0, 0x18(%rsp)
movl 0x8(%r14), %eax
movq 0x58(%rsp), %rcx
cvttss2si (%rcx,%rax,4), %rax
movl %eax, 0x90(%rsp)
movq 0xb8(%rsp), %rdi
movq %rbx, %r15
movq %rbx, %rsi
callq 0xa7734
movsd 0x18(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x10(%r14), %rax
movsd (%rax), %xmm0
movl 0x8(%r14), %eax
movq 0x58(%rsp), %rcx
cvttss2si (%rcx,%rax,4), %rdx
movq 0x1f8(%rsp), %rsi
callq 0x9bbf2
movl $0x12, %edx
movq 0xf16ec(%rip), %rdi     # 0x175fa8
leaq 0x7c2f9(%rip), %rsi     # 0x100bbc
callq 0x22ab0
movl 0x8(%r14), %eax
movq 0x58(%rsp), %rcx
xorps %xmm0, %xmm0
cvtss2sd (%rcx,%rax,4), %xmm0
movq 0xf16c8(%rip), %rdi     # 0x175fa8
callq 0x23060
movq %rax, %r12
movl $0x9, %edx
movq %rax, %rdi
leaq 0x7c2dd(%rip), %rsi     # 0x100bd4
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 0x58(%rsp), %rcx
movss (%rcx,%rax,4), %xmm0
cvttss2si %xmm0, %rdx
movq %rdx, %rsi
sarq $0x3f, %rsi
movss 0x739d0(%rip), %xmm1    # 0xf8328
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 0x849de
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x229c0
movq (%r14), %r14
testq %r14, %r14
jne 0x84554
movq 0xf8(%rsp), %rax
cmpl 0x1620(%rbp), %eax
leaq 0x20(%rsp), %rdi
jl 0x844bc
leaq 0x20(%rsp), %rdi
movq %rbp, %rsi
callq 0xa177c
movq 0x120(%rsp), %rdi
movq 0x130(%rsp), %rsi
movaps 0x20(%rsp), %xmm0
movaps %xmm0, 0x120(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x130(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movq $0x0, 0x30(%rsp)
testq %rdi, %rdi
je 0x84a6f
subq %rdi, %rsi
callq 0x229c0
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x84a6f
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x229c0
leaq 0x20(%rsp), %rdi
movq %rbp, %rsi
callq 0xa185e
movq 0x100(%rsp), %rdi
movq 0x110(%rsp), %rsi
movaps 0x20(%rsp), %xmm0
movaps %xmm0, 0x100(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x110(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movq $0x0, 0x30(%rsp)
testq %rdi, %rdi
je 0x84adb
subq %rdi, %rsi
callq 0x229c0
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x84adb
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x229c0
movq 0xf14c6(%rip), %rbx     # 0x175fa8
leaq 0x7c0f5(%rip), %rsi     # 0x100bde
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 0xf1494(%rip), %rdi     # 0x175fa8
callq 0x22050
movq %rax, %rdi
callq 0x22660
leaq 0x20(%rsp), %rbx
leaq 0xc0(%rsp), %r14
movq %rbp, %rdi
callq 0x86f12
testb %al, %al
jne 0x84b7e
cmpq $0x0, 0xd8(%rsp)
jne 0x84b63
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x95fea
movq %r14, %rdi
movq %rbx, %rsi
callq 0x23d5c
movq %rbx, %rdi
callq 0xacf96
movq 0xd0(%rsp), %r13
testq %r13, %r13
jne 0x84c6c
movq %r14, %rdi
callq 0xacfbc
jmp 0x84b2e
leaq 0x158(%rsp), %rdi
callq 0xacf96
leaq 0xc0(%rsp), %rdi
callq 0xacf96
leaq 0x290(%rsp), %rdi
callq 0xac772
leaq 0x1c0(%rsp), %rdi
callq 0xa85b8
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x84bc9
movq 0x68(%rsp), %rsi
subq %rdi, %rsi
callq 0x229c0
movq 0x190(%rsp), %rdi
testq %rdi, %rdi
je 0x84be6
movq 0x1a0(%rsp), %rsi
subq %rdi, %rsi
callq 0x229c0
movq 0x1a8(%rsp), %rdi
testq %rdi, %rdi
je 0x84c03
movq 0x1b8(%rsp), %rsi
subq %rdi, %rsi
callq 0x229c0
movq 0x100(%rsp), %rdi
testq %rdi, %rdi
je 0x84c20
movq 0x110(%rsp), %rsi
subq %rdi, %rsi
callq 0x229c0
movq 0x120(%rsp), %rdi
testq %rdi, %rdi
je 0x84c3d
movq 0x130(%rsp), %rsi
subq %rdi, %rsi
callq 0x229c0
movq 0x140(%rsp), %rdi
testq %rdi, %rdi
je 0x84c5a
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 0xf1335(%rip), %rdi     # 0x175fa8
leaq 0x7b213(%rip), %rsi     # 0xffe8d
movl $0x9, %edx
callq 0x22ab0
movl 0x8(%r13), %eax
movq 0x58(%rsp), %rcx
xorps %xmm0, %xmm0
cvtss2sd (%rcx,%rax,4), %xmm0
movq 0xf130c(%rip), %rdi     # 0x175fa8
callq 0x23060
movq %rax, %rbx
leaq 0x7c06c(%rip), %rsi     # 0x100d17
movl $0x8, %edx
movq %rax, %rdi
callq 0x22ab0
movl 0x8(%r13), %esi
movq %rbx, %rdi
callq 0x22650
movq %rax, %rbx
leaq 0x74b33(%rip), %rsi     # 0xf9801
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 0xbfa49
leaq 0x7c704(%rip), %rsi     # 0x101424
leaq 0x20(%rsp), %rdi
callq 0x233b0
leaq 0xa0(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x84dee
movups (%rcx), %xmm0
leaq 0xa0(%rsp), %rdx
movups %xmm0, (%rdx)
jmp 0x84e01
leaq 0x7b9b2(%rip), %rsi     # 0x100715
leaq 0x158(%rsp), %rdi
leaq 0xc0(%rsp), %rdx
callq 0x31944
leaq 0x7cc3a(%rip), %rsi     # 0x1019b9
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 0x84db2
movups (%rcx), %xmm0
movups %xmm0, (%r12)
jmp 0x84dc5
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 0x784c2
movq %rdx, 0x90(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xa0(%rsp)
movq 0x8(%rax), %rdx
movq %rdx, 0x98(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x84e37
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x229c0
movl 0x8(%r13), %eax
movq 0x140(%rsp), %rcx
cmpl $0x0, (%rcx,%rax,4)
jne 0x8513a
movq 0x58(%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 0xa7800
movq 0x10(%rsp), %rcx
leaq 0x1a20(%rcx), %rdi
movq %rdi, 0xb8(%rsp)
movq %rax, %rsi
callq 0xa7a8c
movsd (%rax), %xmm0
ucomisd 0x18(%rsp), %xmm0
jbe 0x8534d
movq 0xf10fb(%rip), %rbx     # 0x175fa8
leaq 0x7bd7e(%rip), %rsi     # 0x100c32
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 0xf10c9(%rip), %rdi     # 0x175fa8
callq 0x22050
movq %rax, %rdi
callq 0x22660
movq 0x10(%r13), %rax
leaq 0x8(%rax), %rbp
cmpq 0x18(%r13), %rbp
jne 0x856e8
movl 0x8(%r13), %ecx
movq 0x58(%rsp), %rdx
cvttss2si (%rdx,%rcx,4), %rcx
movsd (%rax), %xmm0
movsd %xmm0, 0x18(%rsp)
leaq 0x20(%rsp), %rsi
movl %ecx, (%rsi)
movq 0xb8(%rsp), %rdi
callq 0xa7734
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 0x58(%rsp), %rcx
cvttss2si (%rcx,%rax,4), %rdx
callq 0x9bbf2
movq 0xf1044(%rip), %rdi     # 0x175fa8
leaq 0x7bcfa(%rip), %rsi     # 0x100c65
movl $0x1c, %edx
callq 0x22ab0
movq 0x10(%r13), %rax
movsd (%rax), %xmm0
movq 0xf1024(%rip), %rdi     # 0x175fa8
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 0xf0fee(%rip), %rdi     # 0x175fa8
leaq 0x7bcc1(%rip), %rsi     # 0x100c82
movl $0xe, %edx
callq 0x22ab0
movl 0x8(%r13), %eax
movq 0x58(%rsp), %rcx
movss (%rcx,%rax,4), %xmm0
cvttss2si %xmm0, %rax
movq %rax, %rcx
subss 0x7333f(%rip), %xmm0    # 0xf8328
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 0xf0f92(%rip), %rdi     # 0x175fa8
callq 0x23060
movq %rax, %rbx
leaq 0x7bc6c(%rip), %rsi     # 0x100c91
movl $0xb, %edx
movq %rax, %rdi
callq 0x22ab0
movl 0x8(%r13), %eax
movq 0x58(%rsp), %rcx
movss (%rcx,%rax,4), %xmm0
cvttss2si %xmm0, %rax
movq %rax, %rcx
subss 0x732d8(%rip), %xmm0    # 0xf8328
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 0x58(%rsp), %rcx
movss (%rcx,%rax,4), %xmm0
cvttss2si %xmm0, %rdx
movq %rdx, %rsi
movss 0x73261(%rip), %xmm1    # 0xf8328
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 0x854b8
movq 0xf0e67(%rip), %rbx     # 0x175fa8
leaq 0x7baa9(%rip), %rsi     # 0x100bf1
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 0xf0e35(%rip), %rdi     # 0x175fa8
callq 0x22050
movq %rax, %rdi
callq 0x22660
movq 0xf0e21(%rip), %rdi     # 0x175fa8
leaq 0x7ba87(%rip), %rsi     # 0x100c15
movl $0x1c, %edx
callq 0x22ab0
movq 0x10(%r13), %rax
movsd (%rax), %xmm0
movq 0xf0e01(%rip), %rdi     # 0x175fa8
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 0x58(%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 0xa7734
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 0x58(%rsp), %rcx
cvttss2si (%rcx,%rax,4), %rdx
callq 0x9bbf2
movq 0x10(%r13), %rax
leaq 0x8(%rax), %r12
cmpq 0x18(%r13), %r12
jne 0x858c2
movl 0x8(%r13), %ecx
movq 0x58(%rsp), %rdx
movss (%rdx,%rcx,4), %xmm0
cvttss2si %xmm0, %rsi
movq %rsi, %rdi
movss 0x730bb(%rip), %xmm1    # 0xf8328
subss %xmm1, %xmm0
cvttss2si %xmm0, %r8
sarq $0x3f, %rdi
andq %rdi, %r8
orq %rsi, %r8
movq 0x1c0(%rsp), %rsi
leaq (%r8,%r8,2), %rdi
movq (%rsi,%rdi,8), %rdi
movss (%rdi), %xmm0
movq 0x1a8(%rsp), %rdi
movss %xmm0, (%rdi,%r8,4)
movss (%rdx,%rcx,4), %xmm0
cvttss2si %xmm0, %rcx
movq %rcx, %rdx
subss %xmm1, %xmm0
cvttss2si %xmm0, %rdi
sarq $0x3f, %rdx
andq %rdx, %rdi
orq %rcx, %rdi
leaq (%rdi,%rdi,2), %rcx
movq (%rsi,%rcx,8), %rcx
movss 0x4(%rcx), %xmm0
movq 0x190(%rsp), %rcx
movss %xmm0, (%rcx,%rdi,4)
movsd (%rax), %xmm0
leaq 0x28(%rsp), %rdi
movsd %xmm0, -0x8(%rdi)
leaq 0x38(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x90(%rsp), %rsi
movq 0x98(%rsp), %rdx
addq %rsi, %rdx
callq 0x3213c
movq 0x10(%rsp), %rax
leaq 0x8(%rax), %rdi
leaq 0x20(%rsp), %rsi
callq 0xafc16
movq 0x28(%rsp), %rdi
cmpq %r14, %rdi
je 0x85335
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x229c0
movl 0x8(%r13), %eax
movq 0x140(%rsp), %rcx
movl $0x0, (%rcx,%rax,4)
jmp 0x85652
movl 0x8(%r13), %eax
movq 0x58(%rsp), %rcx
cvttss2si (%rcx,%rax,4), %rax
leaq 0x70(%rsp), %rsi
movl %eax, (%rsi)
leaq 0x290(%rsp), %rdi
callq 0xa7800
movl (%rax), %ebx
movl 0x8(%r13), %eax
movq 0x58(%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 0xa7800
movl (%rax), %eax
movq 0x120(%rsp), %rcx
cvtsd2ss (%rcx,%rax,8), %xmm1
movq 0x10(%rsp), %rdi
movl %ebx, %esi
movsd 0x18(%rsp), %xmm0
callq 0xa1934
testb %al, %al
jne 0x84ea6
movq 0x10(%r13), %rbp
addq $0x8, %rbp
cmpq 0x18(%r13), %rbp
je 0x854b8
leaq 0x80(%rsp), %r12
leaq 0x70(%rsp), %rbx
leaq 0x7c02f(%rip), %r14     # 0x101424
leaq 0x90(%rsp), %r15
movsd (%rbp), %xmm0
movq %rbx, %rdi
callq 0xbfad7
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 0x8543d
movq %rdx, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
jmp 0x8544a
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 0x85490
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0x70(%rsp), %rdi
cmpq %r12, %rdi
je 0x854aa
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x229c0
addq $0x8, %rbp
cmpq 0x18(%r13), %rbp
jne 0x853fd
movq 0x10(%r13), %rax
movsd (%rax), %xmm0
leaq 0x28(%rsp), %rdi
movsd %xmm0, -0x8(%rdi)
leaq 0x38(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x90(%rsp), %rsi
movq 0x98(%rsp), %rdx
addq %rsi, %rdx
callq 0x3213c
movq 0x10(%rsp), %rax
leaq 0x8(%rax), %rdi
leaq 0x20(%rsp), %rsi
callq 0xafc16
movq 0x28(%rsp), %rdi
cmpq %r14, %rdi
je 0x85515
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0xf0a8c(%rip), %rdi     # 0x175fa8
leaq 0x7b77a(%rip), %rsi     # 0x100c9d
movl $0xa, %edx
callq 0x22ab0
movq 0x90(%rsp), %rsi
movq 0x98(%rsp), %rdx
movq 0xf0a64(%rip), %rdi     # 0x175fa8
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 0x58(%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 0xa7800
movq 0xb8(%rsp), %rdi
movq %rax, %rsi
callq 0xa7a8c
movsd (%rax), %xmm0
ucomisd 0x18(%rsp), %xmm0
ja 0x855f2
movq 0x10(%rsp), %rax
movss 0x1720(%rax), %xmm0
movss %xmm0, 0x18(%rsp)
callq 0x22230
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
mulss 0x78a81(%rip), %xmm0    # 0xfe068
movss 0x18(%rsp), %xmm1
ucomiss %xmm0, %xmm1
jb 0x85652
movq 0xf09af(%rip), %rbx     # 0x175fa8
leaq 0x7b6a8(%rip), %rsi     # 0x100ca8
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 0xf097d(%rip), %rdi     # 0x175fa8
callq 0x22050
movq %rax, %rdi
callq 0x22660
movl 0x8(%r13), %eax
movq 0x58(%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 0x85bce
movq 0x10(%rsp), %rax
movl 0x1d84(%rax), %esi
incl %esi
movl %esi, 0x1d84(%rax)
je 0x85bce
movl %esi, %eax
xorl %edx, %edx
divl %ecx
testl %edx, %edx
jne 0x85bce
leaq 0x250(%rsp), %rdi
callq 0xbfa49
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 0x80(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x85a9f
movups (%rcx), %xmm0
movups %xmm0, (%r14)
jmp 0x85aaf
movq 0x10(%rsp), %rax
addq $0x1400, %rax           # imm = 0x1400
movq %rax, 0xb0(%rsp)
movl $0x1, %ebx
movq 0xf08a1(%rip), %r12     # 0x175fa8
leaq 0x70(%rsp), %r15
movsd (%rbp), %xmm0
movsd %xmm0, 0x18(%rsp)
movl 0x8(%r13), %eax
movq 0x58(%rsp), %rcx
cvttss2si (%rcx,%rax,4), %rax
movl %eax, 0x20(%rsp)
movq 0xb0(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x6ec8a
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 0x7b45e(%rip), %rsi     # 0x100bbc
callq 0x22ab0
movl 0x8(%r13), %eax
movq 0x58(%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 0x7b4fe(%rip), %rsi     # 0x100c8c
callq 0x22ab0
movsd (%rbp), %xmm0
movq %r14, %rdi
callq 0x23060
movq %rax, %r14
movl $0x4, %edx
movq %rax, %rdi
leaq 0x7b41d(%rip), %rsi     # 0x100bcf
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 0xbfad7
movq %r15, %rdi
leaq 0x7bc22(%rip), %rsi     # 0x101424
callq 0x233b0
leaq 0x30(%rsp), %rcx
movq %rcx, 0x20(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x8582f
movq %rdx, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
jmp 0x8583c
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 0x90(%rsp), %rdi
callq 0x222b0
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x85887
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x858a9
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x229c0
addq $0x8, %rbp
incl %ebx
cmpq 0x18(%r13), %rbp
jne 0x8570c
movq 0x10(%r13), %rax
jmp 0x84efe
movq 0x10(%rsp), %rax
addq $0x1400, %rax           # imm = 0x1400
movq %rax, 0xb0(%rsp)
movl $0x1, %ebx
movq 0xf06c7(%rip), %r15     # 0x175fa8
leaq 0x70(%rsp), %r14
movsd (%r12), %xmm0
movsd %xmm0, 0x18(%rsp)
movl 0x8(%r13), %eax
movq 0x58(%rsp), %rcx
cvttss2si (%rcx,%rax,4), %rax
movl %eax, 0x20(%rsp)
movq 0xb0(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x6ec8a
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 0x7b283(%rip), %rsi     # 0x100bbc
callq 0x22ab0
movl 0x8(%r13), %eax
movq 0x58(%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 0x7b323(%rip), %rsi     # 0x100c8c
callq 0x22ab0
movsd (%r12), %xmm0
movq %rbp, %rdi
callq 0x23060
movq %rax, %rbp
movl $0x4, %edx
movq %rax, %rdi
leaq 0x7b241(%rip), %rsi     # 0x100bcf
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 0xbfad7
movq %r14, %rdi
leaq 0x7ba45(%rip), %rsi     # 0x101424
callq 0x233b0
leaq 0x30(%rsp), %rcx
movq %rcx, 0x20(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x85a0c
movq %rdx, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
jmp 0x85a19
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 0x90(%rsp), %rdi
callq 0x222b0
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x85a64
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x85a86
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x229c0
addq $0x8, %r12
incl %ebx
cmpq 0x18(%r13), %r12
jne 0x858e6
movq 0x10(%r13), %rax
jmp 0x8524f
movq %rdx, 0x70(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x80(%rsp)
movq 0x8(%rax), %rdx
leaq 0x70(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x7ac8b(%rip), %rsi     # 0x10075d
callq 0x233b0
leaq 0x30(%rsp), %rcx
movq %rcx, 0x20(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x85afd
movups (%rcx), %xmm0
leaq 0x30(%rsp), %rdx
movups %xmm0, (%rdx)
jmp 0x85b0a
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 0x70(%rsp), %rdi
cmpq %r14, %rdi
je 0x85b3c
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x229c0
leaq 0x260(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x85b5d
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 0x3213c
leaq 0x230(%rsp), %rsi
movq 0x10(%rsp), %rdi
callq 0x91ae2
movq 0x230(%rsp), %rdi
cmpq %r14, %rdi
je 0x85bb2
movq 0x240(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x85bce
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x229c0
callq 0x22230
movl %eax, %ebx
movq 0x10(%rsp), %rax
movl 0x1620(%rax), %ebp
movq 0xf03c1(%rip), %rdi     # 0x175fa8
leaq 0x7b0d5(%rip), %rsi     # 0x100cc3
movl $0x12, %edx
callq 0x22ab0
movl %ebx, %eax
cltd
idivl %ebp
leal 0x1(%rdx), %esi
movq 0xf03a1(%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
leaq 0x218(%rsp), %rdi
leaq 0x100(%rsp), %rsi
callq 0x65d5c
leaq 0x200(%rsp), %rdi
leaq 0x120(%rsp), %rsi
callq 0x65d5c
leaq 0x218(%rsp), %rsi
leaq 0x200(%rsp), %rdx
movq 0x10(%rsp), %rdi
callq 0xa19b6
movq 0x200(%rsp), %rdi
testq %rdi, %rdi
je 0x85c97
movq 0x210(%rsp), %rsi
subq %rdi, %rsi
callq 0x229c0
movq 0x218(%rsp), %rdi
testq %rdi, %rdi
je 0x85cb4
movq 0x228(%rsp), %rsi
subq %rdi, %rsi
callq 0x229c0
movl 0x8(%r13), %eax
movq 0x140(%rsp), %rcx
cmpl $0x0, (%rcx,%rax,4)
jne 0x85d96
movq 0x10(%rsp), %rdi
callq 0xa1af4
movl %eax, %ebx
movq 0xf02cb(%rip), %rdi     # 0x175fa8
leaq 0x7aff2(%rip), %rsi     # 0x100cd6
movl $0x2c, %edx
callq 0x22ab0
movl %ebx, %esi
movq 0xf02b1(%rip), %rdi     # 0x175fa8
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 0x58(%rsp), %rcx
cvttss2si (%rcx,%rax,4), %rax
leaq 0x20(%rsp), %rsi
movl %eax, (%rsi)
leaq 0x290(%rsp), %rdi
callq 0xa7800
movl %ebx, (%rax)
leaq 0x310(%rsp), %rdi
leaq 0x100(%rsp), %rsi
callq 0x65d5c
leaq 0x2f8(%rsp), %rdi
leaq 0x190(%rsp), %rsi
callq 0xa8538
leaq 0x2e0(%rsp), %rdi
leaq 0x1a8(%rsp), %rsi
callq 0xa8538
movq 0x10(%rsp), %rsi
movl %ebx, %edx
callq 0xa1d14
movq 0xf020b(%rip), %rdi     # 0x175fa8
leaq 0x7af5f(%rip), %rsi     # 0x100d03
movl $0x1c, %edx
callq 0x22ab0
movl 0x8(%r13), %esi
movq 0xf01ef(%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
movl 0x8(%r13), %edx
movq 0x140(%rsp), %rax
movl (%rax,%rdx,4), %esi
movq 0x10(%rsp), %rdi
callq 0xa1d6c
jmp 0x86011
movq %rax, %rbx
movq 0x2e0(%rsp), %rdi
testq %rdi, %rdi
je 0x85e2b
movq 0x2f0(%rsp), %rsi
subq %rdi, %rsi
callq 0x229c0
jmp 0x85e2b
movq %rax, %rbx
movq 0x2f8(%rsp), %rdi
testq %rdi, %rdi
je 0x85e4d
movq 0x308(%rsp), %rsi
subq %rdi, %rsi
callq 0x229c0
jmp 0x85e4d
movq %rax, %rbx
movq 0x310(%rsp), %rdi
testq %rdi, %rdi
je 0x86014
movq 0x320(%rsp), %rsi
jmp 0x85eb5
jmp 0x86011
jmp 0x86011
jmp 0x86011
movq %rax, %rbx
movq 0x200(%rsp), %rdi
testq %rdi, %rdi
je 0x85e9c
movq 0x210(%rsp), %rsi
subq %rdi, %rsi
callq 0x229c0
jmp 0x85e9c
movq %rax, %rbx
movq 0x218(%rsp), %rdi
testq %rdi, %rdi
je 0x86014
movq 0x228(%rsp), %rsi
subq %rdi, %rsi
jmp 0x85ffc
movq %rax, %rbx
movq 0x230(%rsp), %rdi
cmpq %r14, %rdi
je 0x85ee2
movq 0x240(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x85ee2
movq %rax, %rbx
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x86014
movq 0x30(%rsp), %rsi
jmp 0x85ff9
movq %rax, %rbx
movq 0x70(%rsp), %rdi
cmpq %r14, %rdi
je 0x85f2f
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x85f2f
jmp 0x85f6f
jmp 0x85f90
jmp 0x86011
jmp 0x86011
movq %rax, %rbx
leaq 0x260(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x86014
movq 0x260(%rsp), %rsi
jmp 0x85ff9
jmp 0x86011
jmp 0x86011
jmp 0x86011
jmp 0x85fe7
jmp 0x86011
jmp 0x86011
movq %rax, %rbx
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x85f93
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x85f93
movq %rax, %rbx
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
jne 0x85fd9
jmp 0x86014
jmp 0x86011
jmp 0x86011
movq %rax, %rbx
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x85fcf
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x85fcf
movq %rax, %rbx
movq 0x70(%rsp), %rdi
cmpq %r12, %rdi
je 0x86014
movq 0x80(%rsp), %rsi
jmp 0x85ff9
jmp 0x86011
jmp 0x86011
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r14, %rdi
je 0x86014
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x86014
jmp 0x86011
jmp 0x86011
jmp 0x86011
jmp 0x86011
jmp 0x86011
jmp 0x86011
jmp 0x86011
movq %rax, %rbx
movq 0x90(%rsp), %rdi
leaq 0xa0(%rsp), %rax
cmpq %rax, %rdi
jne 0x861b3
jmp 0x86230
movq %rax, %rbx
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
jmp 0x8621e
jmp 0x861bf
movq %rax, %rbx
movq 0x2c0(%rsp), %rdi
cmpq %r12, %rdi
je 0x8606d
movq 0x2d0(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x8606d
movq %rax, %rbx
movq 0x158(%rsp), %rdi
cmpq %r15, %rdi
je 0x860ab
movq 0x168(%rsp), %rsi
jmp 0x8609e
jmp 0x860a8
movq %rax, %rbx
movq 0x270(%rsp), %rdi
cmpq %r12, %rdi
je 0x860ab
movq 0x280(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x860ab
movq %rax, %rbx
movq 0xc0(%rsp), %rdi
cmpq %r14, %rdi
je 0x8630c
movq 0xd0(%rsp), %rsi
jmp 0x86177
movq %rax, %rbx
leaq 0x168(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8630c
movq 0x168(%rsp), %rsi
jmp 0x86177
jmp 0x861bf
jmp 0x861bf
movq %rax, %rbx
movq 0xc0(%rsp), %rdi
testq %rdi, %rdi
je 0x86264
movq 0xd0(%rsp), %rsi
subq %rdi, %rsi
callq 0x229c0
jmp 0x86264
movq %rax, %rbx
jmp 0x86264
movq %rax, %rbx
jmp 0x8627b
movq %rax, %rbx
jmp 0x86298
movq %rax, %rbx
jmp 0x862b5
movq %rax, %rbx
jmp 0x862d2
movq %rax, %rbx
jmp 0x862ef
movq %rax, %rbx
jmp 0x8630c
jmp 0x8615b
movq %rax, %rbx
movq 0x1d8(%rsp), %rdi
cmpq %r14, %rdi
je 0x8630c
movq 0x1e8(%rsp), %rsi
incq %rsi
jmp 0x86307
jmp 0x861bf
jmp 0x86187
jmp 0x861bf
jmp 0x861bf
movq %rax, %rdi
callq 0x3185b
jmp 0x86191
movq %rax, %rbx
jmp 0x8624a
jmp 0x861bf
jmp 0x861bf
jmp 0x861bf
jmp 0x86211
jmp 0x861bf
movq %rax, %rbx
movq 0x90(%rsp), %rdi
cmpq %r13, %rdi
je 0x86230
movq 0xa0(%rsp), %rsi
jmp 0x86228
jmp 0x86211
movq %rax, %rbx
jmp 0x86230
jmp 0x86211
jmp 0x86211
movq %rax, %rbx
jmp 0x861ed
movq %rax, %rbx
movq 0x90(%rsp), %rdi
cmpq %r13, %rdi
je 0x861ed
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x86214
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x86214
movq %rax, %rbx
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x86230
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x229c0
leaq 0x158(%rsp), %rdi
callq 0xacf96
leaq 0xc0(%rsp), %rdi
callq 0xacf96
leaq 0x290(%rsp), %rdi
callq 0xac772
leaq 0x1c0(%rsp), %rdi
callq 0xa85b8
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x8627b
movq 0x68(%rsp), %rsi
subq %rdi, %rsi
callq 0x229c0
movq 0x190(%rsp), %rdi
testq %rdi, %rdi
je 0x86298
movq 0x1a0(%rsp), %rsi
subq %rdi, %rsi
callq 0x229c0
movq 0x1a8(%rsp), %rdi
testq %rdi, %rdi
je 0x862b5
movq 0x1b8(%rsp), %rsi
subq %rdi, %rsi
callq 0x229c0
movq 0x100(%rsp), %rdi
testq %rdi, %rdi
je 0x862d2
movq 0x110(%rsp), %rsi
subq %rdi, %rsi
callq 0x229c0
movq 0x120(%rsp), %rdi
testq %rdi, %rdi
je 0x862ef
movq 0x130(%rsp), %rsi
subq %rdi, %rsi
callq 0x229c0
movq 0x140(%rsp), %rdi
testq %rdi, %rdi
je 0x8630c
movq 0x150(%rsp), %rsi
subq %rdi, %rsi
callq 0x229c0
movq %rbx, %rdi
callq 0x23240