// File: /workspace/github_cpp_makefile_star2_O3/richardposner[P]BioNetFit2/src/code/Swarm.cpp
// Function: Swarm::processParticlesPSO(std::vector<unsigned int, std::allocator<unsigned int>>, bool)
void Swarm::processParticlesPSO(vector<unsigned int> particles, bool newFlight) {

	map<unsigned int, std::vector<double> > particleNewParamSets;

	// Create the output directory for the next generation
	if (!checkIfFileExists(options.jobOutputDir + toString(currentGeneration))) {
		string createDirCmd = "mkdir " + options.jobOutputDir + toString(currentGeneration);
		int retryCounter = 0;
		while (runCommand(createDirCmd) != 0 && !checkIfFileExists(options.jobOutputDir + toString(currentGeneration))) {
			if(++retryCounter >= 100) {
				outputError("Error: Couldn't create " + options.jobOutputDir + toString(currentGeneration) + " to hold next generation's output.");
			}
			//sleep(1);
			cout << "Trying again to create dir" << endl;
		}
	}
	else if (options.verbosity >= 4) cout<<"Swarm::breedGenerationGA-AAA4, dir already exist\n.";


	if (options.verbosity >= 3) {
		cout << "Processing " << particles.size() << " particles" << endl;
	}

	vector<double> mBests;
	if (options.psoType == "qpso") {
		mBests = calcQPSOmBests();
	}

	// For each particle in our particle set
	for (auto particle = particles.begin(); particle != particles.end(); ++particle) {
		if (options.verbosity >= 3) {
			cout << "Processing particle " << *particle << endl;
		}

		// Calculate the next iteration positions according
		// to user preference
		if (options.psoType == "pso") {
			if (options.enhancedInertia) {
				updateInertia();
			}
			//cout << "RAQUEL before calcParticlePosPSO" << endl;

			particleCurrParamSets_[*particle] = calcParticlePosPSO(*particle);

			//for(int mid = 0; mid < options.models.size(); mid++){
			//	update_cur_particle_params(*particle, mid, true);
			//}

			//cout << "RAQUEL after calcParticlePosPSO size: " << particleCurrParamSets_[*particle].size() << endl;

		}
		else if (options.psoType == "bbpso") {
			if (options.verbosity >= 3) {
				cout << "RAQUEL before calcParticlePosBBPSO" << endl;
			}
			particleCurrParamSets_[*particle] = calcParticlePosBBPSO(*particle);
			if (options.verbosity >= 3) {
				cout << "RAQUEL after calcParticlePosBBPSO" << endl;
			}
		}
		else if (options.psoType == "bbpsoexp") {
			particleCurrParamSets_[*particle] = calcParticlePosBBPSO(*particle, true);
		}
		else if (options.psoType == "qpso") {
			updateContractionExpansionCoefficient();
			particleCurrParamSets_[*particle] = calcParticlePosQPSO(*particle, mBests);
		}

		if (options.verbosity >= 3) {
			cout << "Got next positions for particle " << *particle << endl;
		}
		// Convert positions to string so they can be sent to the particle
		vector<string> nextPositionsStr;
		vector<double> nextPositionsDouble;
		for (auto param = particleCurrParamSets_.at(*particle).begin(); param != particleCurrParamSets_.at(*particle).end(); ++param) {
			//nextPositionsStr.push_back(toString(static_cast<long double>(*param)));
			nextPositionsStr.push_back(toString(*param));
			nextPositionsDouble.push_back(*param);
			//cout << "Param " << *param << " size: " << particleCurrParamSets_.at(*particle).size() << endl;
			//cout << "Total size: " << particleCurrParamSets_.size() << endl;
		}

		//particleCurrParamSets_[*particle] = nextPositionsDouble;

		//subparticleCurrParamSets_.insert(make_pair(*particle, zmap));

		if (options.verbosity >= 3) {
			cout << "Sending new positions to " << *particle << endl;
		}

		// Replace any changed param sets in the master set
	//	for (auto child = particleCurrParamSets_.begin(); child != particleNewParamSets.end(); ++child) {
	//		cout << "param " << child<-first << endl;
	//	}

		// Finally, send the parameters

		//swarmComm->sendToSwarm(0, *particle, SEND_FINAL_PARAMS_TO_PARTICLE, false, nextPositionsStr);
		//for(int mid = 0; mid < options.models.size(); mid++){
		//	update_cur_particle_params(*particle, mid, true);
		//}

		int sp = 0;
		//Raquel: had to change the line above to send the message to subparticles
		if (options.verbosity >= 3) {
			cout << "RAQUEL total models " << options.models.size() << endl;
		}
		for(unsigned int i = 0; i < options.models.size(); i++){

			sp = fcalcsubParID(*particle, i, options.models.size());
			if (options.verbosity >= 3) {
				cout << "RAQUEL: sending message to subPar: " << sp << " model " << i << " particle " << *particle << endl;
			}
			swarmComm->sendToSwarm(0, sp, SEND_FINAL_PARAMS_TO_PARTICLE, false, nextPositionsStr);
			if (options.verbosity >= 3) {
				cout << "RAQUEL: sent message to subPar: " << sp << endl;
			}

			subparticleCurrParamSets_[*particle][i] = nextPositionsDouble;

			//for(auto param = nextPositionsStr.begin(); param != nextPositionsStr.end(); ++param) {
			//	particleNewParamSets[sp].push_back(stod(*param));
			//}
		}



		// Replace any changed param sets in the master set
		//for (auto child = particleNewParamSets.begin(); child != particleNewParamSets.end(); ++child) {
		//	particleCurrParamSets_[child->first] = child->second;
		//}



	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x178, %rsp            # imm = 0x178
movq %rsi, 0x98(%rsp)
movq %rdi, %rbx
leaq 0x150(%rsp), %rax
movl $0x0, (%rax)
xorl %ecx, %ecx
movq %rcx, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rcx, 0x20(%rax)
movl 0x13e8(%rdi), %esi
leaq 0x10(%rsp), %rdi
callq 0xbfa49
movq 0x1520(%rbx), %rcx
movq 0x1528(%rbx), %r8
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x22a80
leaq 0x100(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x88768
movq %rdx, 0xf0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x100(%rsp)
jmp 0x8876f
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
leaq 0xf0(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
callq 0xbe9a8
movl %eax, %ebp
movq 0xf0(%rsp), %rdi
cmpq %r14, %rdi
je 0x887b2
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x229c0
leaq 0x20(%rsp), %r14
movq -0x10(%r14), %rdi
cmpq %r14, %rdi
je 0x887cd
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x229c0
testl %ebp, %ebp
je 0x887fb
cmpl $0x4, 0x1614(%rbx)
jb 0x88ac4
movq 0xed7c3(%rip), %rdi     # 0x175fa8
leaq 0x76730(%rip), %rsi     # 0xfef1c
movl $0x32, %edx
callq 0x22ab0
jmp 0x88ac4
leaq 0x1520(%rbx), %r15
leaq 0x6f73e(%rip), %rsi     # 0xf7f47
leaq 0x30(%rsp), %rdi
movq %r15, %rdx
callq 0x31944
movl 0x13e8(%rbx), %esi
leaq 0x50(%rsp), %rdi
callq 0xbfa49
leaq 0x40(%rsp), %rsi
movq -0x10(%rsi), %rcx
movq -0x8(%rsi), %r8
movq 0x58(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %edi
cmpq %rsi, %rcx
je 0x8884b
movq 0x40(%rsp), %rdi
movq 0x50(%rsp), %rsi
cmpq %rdi, %rax
jbe 0x8886e
leaq 0x60(%rsp), %r9
movl $0xf, %edi
cmpq %r9, %rsi
je 0x88869
movq 0x60(%rsp), %rdi
cmpq %rdi, %rax
jbe 0x8887a
leaq 0x30(%rsp), %rdi
callq 0x222b0
jmp 0x88888
leaq 0x50(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x22a80
movq %r14, 0x10(%rsp)
movq (%rax), %rdx
leaq 0x10(%rax), %rcx
cmpq %rcx, %rdx
je 0x888a8
movq %rdx, 0x10(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x20(%rsp)
jmp 0x888af
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x18(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x60(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x888e7
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x229c0
movq %r15, 0xa0(%rsp)
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x8890b
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x229c0
leaq 0xb8(%rsp), %r13
movl $0x64, %ebp
leaq 0xc8(%rsp), %r15
movq 0xed681(%rip), %r12     # 0x175fa8
leaq 0xd8(%rsp), %rax
movq %rax, 0xc8(%rsp)
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x3213c
movq %r15, %rdi
callq 0xbfa1f
testl %eax, %eax
je 0x889b1
movl 0x13e8(%rbx), %esi
leaq 0x30(%rsp), %r14
movq %r14, %rdi
callq 0xbfa49
movq 0x1520(%rbx), %rcx
movq 0x1528(%rbx), %r8
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x22a80
movq %r13, 0xa8(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x889b6
movq %rdx, 0xa8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xb8(%rsp)
jmp 0x889be
xorl %r13d, %r13d
jmp 0x88a2d
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
movq %rdx, 0xb0(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0xa8(%rsp), %rdi
callq 0xbe9a8
testl %eax, %eax
sete %r13b
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x88a11
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x88a2d
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0xc8(%rsp), %rdi
leaq 0xd8(%rsp), %rax
cmpq %rax, %rdi
je 0x88a52
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x229c0
testb %r13b, %r13b
je 0x88aa8
decl %ebp
je 0x89301
movl $0x1a, %edx
movq %r12, %rdi
leaq 0x76493(%rip), %rsi     # 0xfef01
callq 0x22ab0
leaq 0xb8(%rsp), %r13
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
jmp 0x88927
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x88ac4
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x229c0
cmpl $0x3, 0x1614(%rbx)
jb 0x88b42
movq 0xed4d4(%rip), %rdi     # 0x175fa8
leaq 0x76474(%rip), %rsi     # 0xfef4f
movl $0xb, %edx
callq 0x22ab0
movq 0x98(%rsp), %rax
movq 0x8(%rax), %rsi
subq (%rax), %rsi
sarq $0x2, %rsi
movq 0xed4a9(%rip), %rdi     # 0x175fa8
callq 0x22650
movq %rax, %r14
leaq 0x76a23(%rip), %rsi     # 0xff531
movl $0xa, %edx
movq %rax, %rdi
callq 0x22ab0
movq (%r14), %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
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movq $0x0, 0x40(%rsp)
leaq 0x16d8(%rbx), %r14
leaq 0x68d48(%rip), %rsi     # 0xf18a9
movq %r14, %rdi
callq 0x22250
testl %eax, %eax
je 0x89294
movq %r14, 0xe8(%rsp)
movq 0x98(%rsp), %rax
movq (%rax), %r12
cmpq 0x8(%rax), %r12
je 0x8925e
leaq 0x1400(%rbx), %r13
leaq 0x1460(%rbx), %rax
movq %rax, 0xa0(%rsp)
leaq 0x10(%rsp), %r15
cmpl $0x3, 0x1614(%rbx)
jb 0x88c04
movl $0x14, %edx
movq 0xed3ea(%rip), %rdi     # 0x175fa8
leaq 0x76396(%rip), %rsi     # 0xfef5b
callq 0x22ab0
movl (%r12), %esi
movq 0xed3d3(%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
movq 0xe8(%rsp), %r14
movq %r14, %rdi
leaq 0x7635c(%rip), %rsi     # 0xfef72
callq 0x22250
testl %eax, %eax
je 0x88d0f
movq %r14, %rdi
leaq 0x76343(%rip), %rsi     # 0xfef70
callq 0x22250
testl %eax, %eax
je 0x88d3f
movq %r14, %rdi
leaq 0x76377(%rip), %rsi     # 0xfefbb
callq 0x22250
testl %eax, %eax
je 0x88e54
movq %r14, %rdi
leaq 0x68c4e(%rip), %rsi     # 0xf18a9
callq 0x22250
testl %eax, %eax
jne 0x88ec0
movq %rbx, %rdi
callq 0x8a36e
movl (%r12), %ebp
leaq 0x110(%rsp), %r14
movq %r14, %rdi
leaq 0x30(%rsp), %rsi
callq 0x65d5c
movq %r15, %rdi
movq %rbx, %rsi
movl %ebp, %edx
movq %r14, %rcx
callq 0x8a440
movq %r13, %rdi
movq %r12, %rsi
callq 0xa7e00
movq (%rax), %rdi
movq 0x10(%rax), %rsi
movaps 0x10(%rsp), %xmm0
movups %xmm0, (%rax)
movq 0x20(%rsp), %rcx
movq %rcx, 0x10(%rax)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
testq %rdi, %rdi
je 0x88cf1
subq %rdi, %rsi
callq 0x229c0
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x88cf1
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x229c0
movq 0x110(%rsp), %rdi
testq %rdi, %rdi
je 0x88ec0
movq 0x120(%rsp), %rsi
jmp 0x88eb8
cmpb $0x1, 0x16f9(%rbx)
jne 0x88d20
movq %rbx, %rdi
callq 0x896ec
movl (%r12), %edx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x8979c
movq %r13, %rdi
movq %r12, %rsi
callq 0xa7e00
jmp 0x88e73
cmpl $0x3, 0x1614(%rbx)
jb 0x88d92
movl $0x22, %edx
movq 0xed254(%rip), %rdi     # 0x175fa8
leaq 0x7621b(%rip), %rsi     # 0xfef76
callq 0x22ab0
movq 0xed241(%rip), %rcx     # 0x175fa8
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x22940
movsbl %al, %esi
movq 0xed223(%rip), %rdi     # 0x175fa8
callq 0x22050
movq %rax, %rdi
callq 0x22660
movl (%r12), %edx
movq %r15, %rdi
movq %rbx, %rsi
xorl %ecx, %ecx
callq 0x89de4
movq %r13, %rdi
movq %r12, %rsi
callq 0xa7e00
movq (%rax), %rdi
movq 0x10(%rax), %rsi
movaps 0x10(%rsp), %xmm0
movups %xmm0, (%rax)
movq 0x20(%rsp), %rcx
movq %rcx, 0x10(%rax)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
testq %rdi, %rdi
je 0x88dfb
subq %rdi, %rsi
callq 0x229c0
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x88dfb
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x229c0
cmpl $0x3, 0x1614(%rbx)
jb 0x88f1b
movl $0x21, %edx
movq 0xed194(%rip), %rdi     # 0x175fa8
leaq 0x7617e(%rip), %rsi     # 0xfef99
callq 0x22ab0
movq 0xed181(%rip), %rcx     # 0x175fa8
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x22940
movsbl %al, %esi
movq 0xed163(%rip), %rdi     # 0x175fa8
callq 0x22050
movq %rax, %rdi
callq 0x22660
jmp 0x88ec0
movl (%r12), %edx
movq %r15, %rdi
movq %rbx, %rsi
movl $0x1, %ecx
callq 0x89de4
movq %r13, %rdi
movq %r12, %rsi
callq 0xa7e00
movq (%rax), %rdi
movq 0x10(%rax), %rsi
movaps 0x10(%rsp), %xmm0
movups %xmm0, (%rax)
movq 0x20(%rsp), %rcx
movq %rcx, 0x10(%rax)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
testq %rdi, %rdi
je 0x88ec0
subq %rdi, %rsi
callq 0x229c0
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x88ec0
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x229c0
cmpl $0x3, 0x1614(%rbx)
jb 0x88f1b
movl $0x20, %edx
movq 0xed0d3(%rip), %rdi     # 0x175fa8
leaq 0x760e8(%rip), %rsi     # 0xfefc4
callq 0x22ab0
movl (%r12), %esi
movq 0xed0bc(%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
xorps %xmm0, %xmm0
movaps %xmm0, 0x50(%rsp)
xorl %eax, %eax
movq %rax, 0x60(%rsp)
movq %rax, 0x80(%rsp)
movaps %xmm0, 0x70(%rsp)
movq %r13, %rdi
movq %r12, %rsi
callq 0xa7a46
movq (%rax), %r14
movq %r13, %rdi
movq %r12, %rsi
callq 0xa7a46
cmpq 0x8(%rax), %r14
je 0x88fc2
movsd (%r14), %xmm0
movq %r15, %rdi
callq 0xbfad7
leaq 0x50(%rsp), %rdi
movq %r15, %rsi
callq 0x6a2a2
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x88f8c
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0x78(%rsp), %rsi
cmpq 0x80(%rsp), %rsi
je 0x88faf
movsd (%r14), %xmm0
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x78(%rsp)
jmp 0x88fbc
leaq 0x70(%rsp), %rdi
movq %r14, %rdx
callq 0x684d4
addq $0x8, %r14
jmp 0x88f45
cmpl $0x2, 0x1614(%rbx)
jbe 0x8908a
movl $0x19, %edx
movq 0xecfcd(%rip), %rdi     # 0x175fa8
leaq 0x76003(%rip), %rsi     # 0xfefe5
callq 0x22ab0
movl (%r12), %esi
movq 0xecfb6(%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
cmpl $0x3, 0x1614(%rbx)
jb 0x8908a
movl $0x14, %edx
movq 0xecf72(%rip), %rdi     # 0x175fa8
leaq 0x75fc2(%rip), %rsi     # 0xfefff
callq 0x22ab0
movq 0x15c8(%rbx), %rsi
subq 0x15c0(%rbx), %rsi
sarq $0x3, %rsi
movq 0xecf4d(%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 $0x0, 0x10(%rsp)
movq 0x15c8(%rbx), %rdx
subq 0x15c0(%rbx), %rdx
je 0x89224
sarq $0x3, %rdx
xorl %esi, %esi
movl (%r12), %edi
callq 0xbe989
movl %eax, %r14d
cmpl $0x3, 0x1614(%rbx)
jb 0x8915c
movl $0x23, %edx
movq 0xeced7(%rip), %rdi     # 0x175fa8
leaq 0x75f3c(%rip), %rsi     # 0xff014
callq 0x22ab0
movq 0xecec4(%rip), %rdi     # 0x175fa8
movl %r14d, %esi
callq 0x231e0
movq %rax, %rbp
movl $0x7, %edx
movq %rax, %rdi
leaq 0x7007b(%rip), %rsi     # 0xf9179
callq 0x22ab0
movl 0x10(%rsp), %esi
movq %rbp, %rdi
callq 0x22650
movq %rax, %rbp
movl $0xa, %edx
movq %rax, %rdi
leaq 0x76d6b(%rip), %rsi     # 0xffe8c
callq 0x22ab0
movl (%r12), %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
movq (%rbx), %rdi
movl $0xffffffff, (%rsp)     # imm = 0xFFFFFFFF
xorl %esi, %esi
movl %r14d, %edx
movl $0x15, %ecx
xorl %r8d, %r8d
leaq 0x50(%rsp), %r9
callq 0x6bac2
cmpl $0x3, 0x1614(%rbx)
jb 0x891d7
movl $0x20, %edx
movq 0xece16(%rip), %rdi     # 0x175fa8
leaq 0x75e9f(%rip), %rsi     # 0xff038
callq 0x22ab0
movq 0xece03(%rip), %rdi     # 0x175fa8
movl %r14d, %esi
callq 0x231e0
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
movq 0xa0(%rsp), %rdi
movq %r12, %rsi
callq 0xa7e66
movq %rax, %rdi
movq %r15, %rsi
callq 0xa7e00
movq %rax, %rdi
leaq 0x70(%rsp), %rsi
callq 0xa7650
movl 0x10(%rsp), %esi
incl %esi
movl %esi, 0x10(%rsp)
movq 0x15c8(%rbx), %rdx
subq 0x15c0(%rbx), %rdx
sarq $0x3, %rdx
cmpq %rsi, %rdx
ja 0x890ac
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x8923e
movq 0x80(%rsp), %rsi
subq %rdi, %rsi
callq 0x229c0
leaq 0x50(%rsp), %rdi
callq 0x31a0a
addq $0x4, %r12
movq 0x98(%rsp), %rax
cmpq 0x8(%rax), %r12
jne 0x88ba9
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x89275
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x229c0
leaq 0x148(%rsp), %rdi
callq 0x7260c
addq $0x178, %rsp            # imm = 0x178
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x10(%rsp), %rdi
movq %rbx, %rsi
callq 0x7cc1a
movq 0x30(%rsp), %rdi
movq 0x40(%rsp), %rsi
movaps 0x10(%rsp), %xmm0
movaps %xmm0, 0x30(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x40(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
testq %rdi, %rdi
je 0x88b71
subq %rdi, %rsi
callq 0x229c0
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x88b71
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x229c0
jmp 0x88b71
leaq 0x75bbe(%rip), %rsi     # 0xfeec6
leaq 0x50(%rsp), %rdi
movq 0xa0(%rsp), %rdx
callq 0x31944
movl 0x13e8(%rbx), %esi
leaq 0x70(%rsp), %rdi
callq 0xbfa49
movq 0x50(%rsp), %rcx
movq 0x58(%rsp), %r8
movq 0x78(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %edi
leaq 0x60(%rsp), %rsi
cmpq %rsi, %rcx
je 0x89351
movq 0x60(%rsp), %rdi
leaq 0x80(%rsp), %r14
movq -0x10(%r14), %rsi
cmpq %rdi, %rax
jbe 0x89379
movl $0xf, %edi
cmpq %r14, %rsi
je 0x89374
movq 0x80(%rsp), %rdi
cmpq %rdi, %rax
jbe 0x89385
leaq 0x50(%rsp), %rdi
callq 0x222b0
jmp 0x89393
leaq 0x70(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x22a80
leaq 0x40(%rsp), %rcx
movq %rcx, 0x30(%rsp)
movq (%rax), %rdx
leaq 0x10(%rax), %rcx
cmpq %rcx, %rdx
jne 0x893b6
movups (%rcx), %xmm0
leaq 0x40(%rsp), %rdx
movups %xmm0, (%rdx)
jmp 0x893c3
movq %rdx, 0x30(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x40(%rsp)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x38(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x75af7(%rip), %rsi     # 0xfeede
leaq 0x30(%rsp), %rdi
callq 0x233b0
leaq 0x138(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x89415
movups (%rcx), %xmm0
movups %xmm0, (%r15)
jmp 0x89428
movq %rdx, 0x128(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x138(%rsp)
movq 0x8(%rax), %rdx
leaq 0x128(%rsp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %rbx, %rdi
callq 0x784c2
jmp 0x8966d
movq %rax, %rbx
leaq 0x60(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x89477
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x89477
movq %rax, %rbx
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x896d7
movq 0x40(%rsp), %rsi
jmp 0x89668
jmp 0x89598
movq %rax, %rbx
movq 0x128(%rsp), %rdi
cmpq %r15, %rdi
je 0x894bd
movq 0x138(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x894bd
movq %rax, %rbx
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x89516
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x89516
movq %rax, %rbx
movq 0xf0(%rsp), %rdi
cmpq %r14, %rdi
je 0x89500
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x89500
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
jmp 0x8965e
jmp 0x89598
movq %rax, %rbx
movq 0x70(%rsp), %rdi
cmpq %r14, %rdi
je 0x8957b
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x8957b
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x89551
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x229c0
jmp 0x89551
movq %rax, %rbx
movq 0x110(%rsp), %rdi
testq %rdi, %rdi
je 0x896c0
movq 0x120(%rsp), %rsi
jmp 0x895c7
jmp 0x8966d
jmp 0x895b1
jmp 0x8966d
movq %rax, %rbx
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x89654
movq 0x60(%rsp), %rsi
jmp 0x89641
movq %rax, %rbx
jmp 0x896d7
jmp 0x8966d
jmp 0x895b1
jmp 0x89651
jmp 0x8966d
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x896c0
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x229c0
jmp 0x896c0
movq %rax, %rbx
jmp 0x89601
movq %rax, %rbx
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x89601
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x229c0
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x89624
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x89624
jmp 0x89621
movq %rax, %rbx
movq 0xc8(%rsp), %rdi
leaq 0xd8(%rsp), %rax
cmpq %rax, %rdi
je 0x89654
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x89654
jmp 0x89699
jmp 0x89699
jmp 0x89699
movq %rax, %rbx
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x896d7
movq 0x20(%rsp), %rsi
incq %rsi
jmp 0x896d2
movq %rax, %rbx
jmp 0x896c0
jmp 0x89699
movq %rax, %rbx
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x8969c
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x229c0
jmp 0x8969c
jmp 0x89699
jmp 0x89699
movq %rax, %rbx
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x896b6
movq 0x80(%rsp), %rsi
subq %rdi, %rsi
callq 0x229c0
leaq 0x50(%rsp), %rdi
callq 0x31a0a
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x896d7
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x229c0
leaq 0x148(%rsp), %rdi
callq 0x7260c
movq %rbx, %rdi
callq 0x23240