// File: 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
movq %rsp, %rbp
subq $0x4b0, %rsp            # imm = 0x4B0
movq %rsi, -0x320(%rbp)
movb %dl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
andb $0x1, %al
movb %al, -0x11(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x318(%rbp)
leaq -0x48(%rbp), %rdi
callq 0xde640
movq -0x318(%rbp), %rax
movq %rax, %rcx
addq $0x1520, %rcx           # imm = 0x1520
movq %rcx, -0x310(%rbp)
movl 0x13e8(%rax), %esi
leaq -0x88(%rbp), %rdi
callq 0x17e460
jmp 0xfbb81
movq -0x310(%rbp), %rsi
leaq -0x68(%rbp), %rdi
leaq -0x88(%rbp), %rdx
callq 0xb3380
jmp 0xfbb9a
leaq -0x68(%rbp), %rdi
callq 0x17d410
movl %eax, -0x324(%rbp)
jmp 0xfbbab
movl -0x324(%rbp), %eax
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
movb %al, -0x325(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x311e8
leaq -0x88(%rbp), %rdi
callq 0x311e8
movb -0x325(%rbp), %al
testb $0x1, %al
jne 0xfbbe3
jmp 0xfc057
movq -0x318(%rbp), %rdx
addq $0x1520, %rdx           # imm = 0x1520
leaq 0xdeb9f(%rip), %rsi     # 0x1da797
leaq -0xd8(%rbp), %rdi
callq 0x44240
jmp 0xfbc06
movq -0x318(%rbp), %rax
movl 0x13e8(%rax), %esi
leaq -0xf8(%rbp), %rdi
callq 0x17e460
jmp 0xfbc21
leaq -0xb8(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
leaq -0xf8(%rbp), %rdx
callq 0x9c7d0
jmp 0xfbc3d
leaq -0xf8(%rbp), %rdi
callq 0x311e8
leaq -0xd8(%rbp), %rdi
callq 0x311e8
movl $0x0, -0xfc(%rbp)
movb $0x0, -0x161(%rbp)
movb $0x0, -0x162(%rbp)
leaq -0x120(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0x2f300
jmp 0xfbc82
leaq -0x120(%rbp), %rdi
callq 0x17e3f0
movl %eax, -0x32c(%rbp)
jmp 0xfbc96
movl -0x32c(%rbp), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x32d(%rbp)
je 0xfbd27
movq -0x318(%rbp), %rax
movq %rax, %rcx
addq $0x1520, %rcx           # imm = 0x1520
movq %rcx, -0x338(%rbp)
movl 0x13e8(%rax), %esi
leaq -0x160(%rbp), %rdi
callq 0x17e460
jmp 0xfbcd5
movq -0x338(%rbp), %rsi
movb $0x1, -0x161(%rbp)
leaq -0x140(%rbp), %rdi
leaq -0x160(%rbp), %rdx
callq 0xb3380
jmp 0xfbcf8
movb $0x1, -0x162(%rbp)
leaq -0x140(%rbp), %rdi
callq 0x17d410
movl %eax, -0x33c(%rbp)
jmp 0xfbd13
movl -0x33c(%rbp), %eax
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
movb %al, -0x32d(%rbp)
movb -0x32d(%rbp), %al
movb %al, -0x33d(%rbp)
testb $0x1, -0x162(%rbp)
jne 0xfbd3e
jmp 0xfbd4a
leaq -0x140(%rbp), %rdi
callq 0x311e8
testb $0x1, -0x161(%rbp)
jne 0xfbd55
jmp 0xfbd61
leaq -0x160(%rbp), %rdi
callq 0x311e8
leaq -0x120(%rbp), %rdi
callq 0x311e8
movb -0x33d(%rbp), %al
testb $0x1, %al
jne 0xfbd7c
jmp 0xfc038
movl -0xfc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xfc(%rbp)
cmpl $0x64, %eax
jl 0xfc002
movq -0x318(%rbp), %rdx
addq $0x1520, %rdx           # imm = 0x1520
leaq 0xe5bed(%rip), %rsi     # 0x1e1996
leaq -0x1c8(%rbp), %rdi
callq 0x44240
jmp 0xfbdb7
movq -0x318(%rbp), %rax
movl 0x13e8(%rax), %esi
leaq -0x1e8(%rbp), %rdi
callq 0x17e460
jmp 0xfbdd2
leaq -0x1a8(%rbp), %rdi
leaq -0x1c8(%rbp), %rsi
leaq -0x1e8(%rbp), %rdx
callq 0x9c7d0
jmp 0xfbdee
leaq 0xe5bb9(%rip), %rdx     # 0x1e19ae
leaq -0x188(%rbp), %rdi
leaq -0x1a8(%rbp), %rsi
callq 0x441f0
jmp 0xfbe0a
movq -0x318(%rbp), %rdi
leaq -0x188(%rbp), %rsi
callq 0xeada0
jmp 0xfbe1f
leaq -0x188(%rbp), %rdi
callq 0x311e8
leaq -0x1a8(%rbp), %rdi
callq 0x311e8
leaq -0x1e8(%rbp), %rdi
callq 0x311e8
leaq -0x1c8(%rbp), %rdi
callq 0x311e8
jmp 0xfc002
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0xfcc39
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0xfbe9a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x311e8
leaq -0x88(%rbp), %rdi
callq 0x311e8
jmp 0xfcc39
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0xfbedd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0xf8(%rbp), %rdi
callq 0x311e8
leaq -0xd8(%rbp), %rdi
callq 0x311e8
jmp 0xfcc39
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0xfc046
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0xfbf71
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0xfbf58
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
testb $0x1, -0x162(%rbp)
jne 0xfbf4a
jmp 0xfbf56
leaq -0x140(%rbp), %rdi
callq 0x311e8
jmp 0xfbf58
testb $0x1, -0x161(%rbp)
jne 0xfbf63
jmp 0xfbf6f
leaq -0x160(%rbp), %rdi
callq 0x311e8
jmp 0xfbf71
leaq -0x120(%rbp), %rdi
callq 0x311e8
jmp 0xfc046
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0xfbff4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0xfbfe8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0xfbfdc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0x188(%rbp), %rdi
callq 0x311e8
leaq -0x1a8(%rbp), %rdi
callq 0x311e8
leaq -0x1e8(%rbp), %rdi
callq 0x311e8
leaq -0x1c8(%rbp), %rdi
callq 0x311e8
jmp 0xfc046
movq 0x1d8f47(%rip), %rdi    # 0x2d4f50
leaq 0xe59c1(%rip), %rsi     # 0x1e19d1
callq 0x2ff50
movq %rax, -0x348(%rbp)
jmp 0xfc01e
movq -0x348(%rbp), %rdi
movq 0x1d8f9c(%rip), %rsi    # 0x2d4fc8
callq 0x30c10
jmp 0xfc033
jmp 0xfbc5f
leaq -0xb8(%rbp), %rdi
callq 0x311e8
jmp 0xfc080
leaq -0xb8(%rbp), %rdi
callq 0x311e8
jmp 0xfcc39
movq -0x318(%rbp), %rax
cmpl $0x4, 0x1614(%rax)
jb 0xfc07e
movq 0x1d8ee2(%rip), %rdi    # 0x2d4f50
leaq 0xe5977(%rip), %rsi     # 0x1e19ec
callq 0x2ff50
jmp 0xfc07c
jmp 0xfc07e
jmp 0xfc080
movq -0x318(%rbp), %rax
cmpl $0x3, 0x1614(%rax)
jb 0xfc103
movq 0x1d8eb9(%rip), %rdi    # 0x2d4f50
leaq 0xe5981(%rip), %rsi     # 0x1e1a1f
callq 0x2ff50
movq %rax, -0x350(%rbp)
jmp 0xfc0ac
movq -0x320(%rbp), %rdi
callq 0xb46f0
movq -0x350(%rbp), %rdi
movq %rax, %rsi
callq 0x30cf0
movq %rax, -0x358(%rbp)
jmp 0xfc0d0
movq -0x358(%rbp), %rdi
leaq 0xe5f23(%rip), %rsi     # 0x1e2001
callq 0x2ff50
movq %rax, -0x360(%rbp)
jmp 0xfc0ec
movq -0x360(%rbp), %rdi
movq 0x1d8ece(%rip), %rsi    # 0x2d4fc8
callq 0x30c10
jmp 0xfc101
jmp 0xfc103
leaq -0x200(%rbp), %rdi
callq 0xb2580
movq -0x318(%rbp), %rdi
addq $0x16d8, %rdi           # imm = 0x16D8
leaq 0xd7bda(%rip), %rsi     # 0x1d3cfe
callq 0x44930
movb %al, -0x361(%rbp)
jmp 0xfc131
movb -0x361(%rbp), %al
testb $0x1, %al
jne 0xfc13d
jmp 0xfc18a
movq -0x318(%rbp), %rsi
leaq -0x218(%rbp), %rdi
callq 0xef3e0
jmp 0xfc152
leaq -0x200(%rbp), %rdi
leaq -0x218(%rbp), %rsi
callq 0x122d70
leaq -0x218(%rbp), %rdi
callq 0xb2660
jmp 0xfc18a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0xfcc2d
movq -0x320(%rbp), %rdi
callq 0xcc840
movq %rax, -0x220(%rbp)
movq -0x320(%rbp), %rdi
callq 0xcc6d0
movq %rax, -0x228(%rbp)
leaq -0x220(%rbp), %rdi
leaq -0x228(%rbp), %rsi
callq 0xd0cd0
testb $0x1, %al
jne 0xfc1cc
jmp 0xfcc0f
movq -0x318(%rbp), %rax
cmpl $0x3, 0x1614(%rax)
jb 0xfc232
movq 0x1d8d6d(%rip), %rdi    # 0x2d4f50
leaq 0xe5841(%rip), %rsi     # 0x1e1a2b
callq 0x2ff50
movq %rax, -0x370(%rbp)
jmp 0xfc1f8
leaq -0x220(%rbp), %rdi
callq 0xd0d10
movq -0x370(%rbp), %rdi
movl (%rax), %esi
callq 0x30640
movq %rax, -0x378(%rbp)
jmp 0xfc21b
movq -0x378(%rbp), %rdi
movq 0x1d8d9f(%rip), %rsi    # 0x2d4fc8
callq 0x30c10
jmp 0xfc230
jmp 0xfc232
movq -0x318(%rbp), %rdi
addq $0x16d8, %rdi           # imm = 0x16D8
leaq 0xe57fb(%rip), %rsi     # 0x1e1a42
callq 0x44930
movb %al, -0x379(%rbp)
jmp 0xfc254
movb -0x379(%rbp), %al
testb $0x1, %al
jne 0xfc263
jmp 0xfc325
movq -0x318(%rbp), %rax
testb $0x1, 0x16f9(%rax)
je 0xfc283
movq -0x318(%rbp), %rdi
callq 0xfcc50
jmp 0xfc281
jmp 0xfc283
leaq -0x220(%rbp), %rdi
callq 0xd0d10
movq -0x318(%rbp), %rsi
movl (%rax), %edx
leaq -0x240(%rbp), %rdi
callq 0xfccf0
jmp 0xfc2a6
movq -0x318(%rbp), %rax
addq $0x1400, %rax           # imm = 0x1400
movq %rax, -0x390(%rbp)
leaq -0x220(%rbp), %rdi
callq 0xd0d10
movq -0x390(%rbp), %rdi
movq %rax, %rsi
callq 0x122da0
movq %rax, -0x388(%rbp)
jmp 0xfc2de
movq -0x388(%rbp), %rdi
leaq -0x240(%rbp), %rsi
callq 0x122d70
leaq -0x240(%rbp), %rdi
callq 0xb2660
jmp 0xfc690
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0x240(%rbp), %rdi
callq 0xb2660
jmp 0xfcc2d
movq -0x318(%rbp), %rdi
addq $0x16d8, %rdi           # imm = 0x16D8
leaq 0xe5706(%rip), %rsi     # 0x1e1a40
callq 0x44930
movb %al, -0x391(%rbp)
jmp 0xfc347
movb -0x391(%rbp), %al
testb $0x1, %al
jne 0xfc356
jmp 0xfc480
movq -0x318(%rbp), %rax
cmpl $0x3, 0x1614(%rax)
jb 0xfc399
movq 0x1d8be3(%rip), %rdi    # 0x2d4f50
leaq 0xe56d2(%rip), %rsi     # 0x1e1a46
callq 0x2ff50
movq %rax, -0x3a0(%rbp)
jmp 0xfc382
movq -0x3a0(%rbp), %rdi
movq 0x1d8c38(%rip), %rsi    # 0x2d4fc8
callq 0x30c10
jmp 0xfc397
jmp 0xfc399
leaq -0x220(%rbp), %rdi
callq 0xd0d10
movq -0x318(%rbp), %rsi
movl (%rax), %edx
leaq -0x258(%rbp), %rdi
xorl %ecx, %ecx
callq 0xfd490
jmp 0xfc3be
movq -0x318(%rbp), %rax
addq $0x1400, %rax           # imm = 0x1400
movq %rax, -0x3b0(%rbp)
leaq -0x220(%rbp), %rdi
callq 0xd0d10
movq -0x3b0(%rbp), %rdi
movq %rax, %rsi
callq 0x122da0
movq %rax, -0x3a8(%rbp)
jmp 0xfc3f6
movq -0x3a8(%rbp), %rdi
leaq -0x258(%rbp), %rsi
callq 0x122d70
leaq -0x258(%rbp), %rdi
callq 0xb2660
movq -0x318(%rbp), %rax
cmpl $0x3, 0x1614(%rax)
jb 0xfc47b
movq 0x1d8b24(%rip), %rdi    # 0x2d4f50
leaq 0xe5636(%rip), %rsi     # 0x1e1a69
callq 0x2ff50
movq %rax, -0x3b8(%rbp)
jmp 0xfc441
movq -0x3b8(%rbp), %rdi
movq 0x1d8b79(%rip), %rsi    # 0x2d4fc8
callq 0x30c10
jmp 0xfc456
jmp 0xfc47b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0x258(%rbp), %rdi
callq 0xb2660
jmp 0xfcc2d
jmp 0xfc68e
movq -0x318(%rbp), %rdi
addq $0x16d8, %rdi           # imm = 0x16D8
leaq 0xe55f6(%rip), %rsi     # 0x1e1a8b
callq 0x44930
movb %al, -0x3b9(%rbp)
jmp 0xfc4a2
movb -0x3b9(%rbp), %al
testb $0x1, %al
jne 0xfc4b1
jmp 0xfc558
leaq -0x220(%rbp), %rdi
callq 0xd0d10
movq -0x318(%rbp), %rsi
movl (%rax), %edx
leaq -0x270(%rbp), %rdi
movl $0x1, %ecx
callq 0xfd490
jmp 0xfc4d9
movq -0x318(%rbp), %rax
addq $0x1400, %rax           # imm = 0x1400
movq %rax, -0x3d0(%rbp)
leaq -0x220(%rbp), %rdi
callq 0xd0d10
movq -0x3d0(%rbp), %rdi
movq %rax, %rsi
callq 0x122da0
movq %rax, -0x3c8(%rbp)
jmp 0xfc511
movq -0x3c8(%rbp), %rdi
leaq -0x270(%rbp), %rsi
callq 0x122d70
leaq -0x270(%rbp), %rdi
callq 0xb2660
jmp 0xfc68c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0x270(%rbp), %rdi
callq 0xb2660
jmp 0xfcc2d
movq -0x318(%rbp), %rdi
addq $0x16d8, %rdi           # imm = 0x16D8
leaq 0xd7791(%rip), %rsi     # 0x1d3cfe
callq 0x44930
movb %al, -0x3d1(%rbp)
jmp 0xfc57a
movb -0x3d1(%rbp), %al
testb $0x1, %al
jne 0xfc589
jmp 0xfc68a
movq -0x318(%rbp), %rdi
callq 0xfdb10
jmp 0xfc597
leaq -0x220(%rbp), %rdi
callq 0xd0d10
movl (%rax), %eax
movl %eax, -0x3d8(%rbp)
leaq -0x2a0(%rbp), %rdi
leaq -0x200(%rbp), %rsi
callq 0xb2bc0
jmp 0xfc5c0
movl -0x3d8(%rbp), %edx
movq -0x318(%rbp), %rsi
leaq -0x288(%rbp), %rdi
leaq -0x2a0(%rbp), %rcx
callq 0xfdc10
jmp 0xfc5e2
movq -0x318(%rbp), %rax
addq $0x1400, %rax           # imm = 0x1400
movq %rax, -0x3e8(%rbp)
leaq -0x220(%rbp), %rdi
callq 0xd0d10
movq -0x3e8(%rbp), %rdi
movq %rax, %rsi
callq 0x122da0
movq %rax, -0x3e0(%rbp)
jmp 0xfc61a
movq -0x3e0(%rbp), %rdi
leaq -0x288(%rbp), %rsi
callq 0x122d70
leaq -0x288(%rbp), %rdi
callq 0xb2660
leaq -0x2a0(%rbp), %rdi
callq 0xb2660
jmp 0xfc68a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0xfc679
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0x288(%rbp), %rdi
callq 0xb2660
leaq -0x2a0(%rbp), %rdi
callq 0xb2660
jmp 0xfcc2d
jmp 0xfc68c
jmp 0xfc68e
jmp 0xfc690
movq -0x318(%rbp), %rax
cmpl $0x3, 0x1614(%rax)
jb 0xfc6f6
movq 0x1d88a9(%rip), %rdi    # 0x2d4f50
leaq 0xe53e6(%rip), %rsi     # 0x1e1a94
callq 0x2ff50
movq %rax, -0x3f0(%rbp)
jmp 0xfc6bc
leaq -0x220(%rbp), %rdi
callq 0xd0d10
movq -0x3f0(%rbp), %rdi
movl (%rax), %esi
callq 0x30640
movq %rax, -0x3f8(%rbp)
jmp 0xfc6df
movq -0x3f8(%rbp), %rdi
movq 0x1d88db(%rip), %rsi    # 0x2d4fc8
callq 0x30c10
jmp 0xfc6f4
jmp 0xfc6f6
leaq -0x2b8(%rbp), %rdi
callq 0x448b0
leaq -0x2d0(%rbp), %rdi
callq 0xb2580
movq -0x318(%rbp), %rax
addq $0x1400, %rax           # imm = 0x1400
movq %rax, -0x408(%rbp)
leaq -0x220(%rbp), %rdi
callq 0xd0d10
movq -0x408(%rbp), %rdi
movq %rax, %rsi
callq 0x122470
movq %rax, -0x400(%rbp)
jmp 0xfc746
movq -0x400(%rbp), %rdi
callq 0xb2ea0
movq %rax, -0x2d8(%rbp)
movq -0x318(%rbp), %rax
addq $0x1400, %rax           # imm = 0x1400
movq %rax, -0x418(%rbp)
leaq -0x220(%rbp), %rdi
callq 0xd0d10
movq -0x418(%rbp), %rdi
movq %rax, %rsi
callq 0x122470
movq %rax, -0x410(%rbp)
jmp 0xfc791
movq -0x410(%rbp), %rdi
callq 0xbdfd0
movq %rax, -0x2e0(%rbp)
leaq -0x2d8(%rbp), %rdi
leaq -0x2e0(%rbp), %rsi
callq 0x122510
testb $0x1, %al
jne 0xfc7c0
jmp 0xfc869
leaq -0x2d8(%rbp), %rdi
callq 0xb2ed0
movsd (%rax), %xmm0
leaq -0x300(%rbp), %rdi
callq 0x17e490
jmp 0xfc7de
leaq -0x2b8(%rbp), %rdi
leaq -0x300(%rbp), %rsi
callq 0xb39c0
jmp 0xfc7f3
leaq -0x300(%rbp), %rdi
callq 0x311e8
leaq -0x2d8(%rbp), %rdi
callq 0xb2ed0
movq %rax, %rsi
leaq -0x2d0(%rbp), %rdi
callq 0xb2e30
jmp 0xfc81c
jmp 0xfc81e
leaq -0x2d8(%rbp), %rdi
callq 0xb2ef0
jmp 0xfc759
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0xfcbf5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0x300(%rbp), %rdi
callq 0x311e8
jmp 0xfcbf5
movq -0x318(%rbp), %rax
cmpl $0x3, 0x1614(%rax)
jb 0xfc8cf
movq 0x1d86d0(%rip), %rdi    # 0x2d4f50
leaq 0xe522e(%rip), %rsi     # 0x1e1ab5
callq 0x2ff50
movq %rax, -0x420(%rbp)
jmp 0xfc895
leaq -0x220(%rbp), %rdi
callq 0xd0d10
movq -0x420(%rbp), %rdi
movl (%rax), %esi
callq 0x30640
movq %rax, -0x428(%rbp)
jmp 0xfc8b8
movq -0x428(%rbp), %rdi
movq 0x1d8702(%rip), %rsi    # 0x2d4fc8
callq 0x30c10
jmp 0xfc8cd
jmp 0xfc8cf
movq -0x318(%rbp), %rax
movl $0x0, -0x304(%rbp)
cmpl $0x3, 0x1614(%rax)
jb 0xfc947
movq 0x1d8660(%rip), %rdi    # 0x2d4f50
leaq 0xe51d8(%rip), %rsi     # 0x1e1acf
callq 0x2ff50
movq %rax, -0x430(%rbp)
jmp 0xfc905
movq -0x318(%rbp), %rdi
addq $0x15c0, %rdi           # imm = 0x15C0
callq 0x45170
movq -0x430(%rbp), %rdi
movq %rax, %rsi
callq 0x30cf0
movq %rax, -0x438(%rbp)
jmp 0xfc930
movq -0x438(%rbp), %rdi
movq 0x1d868a(%rip), %rsi    # 0x2d4fc8
callq 0x30c10
jmp 0xfc945
jmp 0xfc947
movl $0x0, -0x308(%rbp)
movq -0x318(%rbp), %rdi
movl -0x308(%rbp), %eax
movq %rax, -0x440(%rbp)
addq $0x14c0, %rdi           # imm = 0x14C0
addq $0x100, %rdi            # imm = 0x100
callq 0x45170
movq %rax, %rcx
movq -0x440(%rbp), %rax
cmpq %rcx, %rax
jae 0xfcbcc
leaq -0x220(%rbp), %rdi
callq 0xd0d10
movq -0x318(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x44c(%rbp)
movl -0x308(%rbp), %eax
movl %eax, -0x448(%rbp)
addq $0x15c0, %rdi           # imm = 0x15C0
callq 0x45170
movl -0x44c(%rbp), %edi
movl -0x448(%rbp), %esi
movl %eax, %edx
callq 0x17d3a0
movl %eax, -0x444(%rbp)
jmp 0xfc9d9
movq -0x318(%rbp), %rax
movl -0x444(%rbp), %ecx
movl %ecx, -0x304(%rbp)
cmpl $0x3, 0x1614(%rax)
jb 0xfcabd
movq 0x1d8550(%rip), %rdi    # 0x2d4f50
leaq 0xe50dd(%rip), %rsi     # 0x1e1ae4
callq 0x2ff50
movq %rax, -0x458(%rbp)
jmp 0xfca15
movq -0x458(%rbp), %rdi
movl -0x304(%rbp), %esi
callq 0x2f800
movq %rax, -0x460(%rbp)
jmp 0xfca30
movq -0x460(%rbp), %rdi
leaq 0xdefb6(%rip), %rsi     # 0x1db9f4
callq 0x2ff50
movq %rax, -0x468(%rbp)
jmp 0xfca4c
movq -0x468(%rbp), %rdi
movl -0x308(%rbp), %esi
callq 0x30640
movq %rax, -0x470(%rbp)
jmp 0xfca67
movq -0x470(%rbp), %rdi
leaq 0xe600f(%rip), %rsi     # 0x1e2a84
callq 0x2ff50
movq %rax, -0x478(%rbp)
jmp 0xfca83
leaq -0x220(%rbp), %rdi
callq 0xd0d10
movq -0x478(%rbp), %rdi
movl (%rax), %esi
callq 0x30640
movq %rax, -0x480(%rbp)
jmp 0xfcaa6
movq -0x480(%rbp), %rdi
movq 0x1d8514(%rip), %rsi    # 0x2d4fc8
callq 0x30c10
jmp 0xfcabb
jmp 0xfcabd
movq -0x318(%rbp), %rax
movq (%rax), %rdi
movl -0x304(%rbp), %edx
movq %rsp, %rax
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
movl $0x15, %ecx
xorl %r8d, %r8d
leaq -0x2b8(%rbp), %r9
movl %r8d, %esi
callq 0xcd520
jmp 0xfcaef
movq -0x318(%rbp), %rax
cmpl $0x3, 0x1614(%rax)
jb 0xfcb4d
movq 0x1d844a(%rip), %rdi    # 0x2d4f50
leaq 0xe4ffb(%rip), %rsi     # 0x1e1b08
callq 0x2ff50
movq %rax, -0x488(%rbp)
jmp 0xfcb1b
movq -0x488(%rbp), %rdi
movl -0x304(%rbp), %esi
callq 0x2f800
movq %rax, -0x490(%rbp)
jmp 0xfcb36
movq -0x490(%rbp), %rdi
movq 0x1d8484(%rip), %rsi    # 0x2d4fc8
callq 0x30c10
jmp 0xfcb4b
jmp 0xfcb4d
movq -0x318(%rbp), %rax
addq $0x1460, %rax           # imm = 0x1460
movq %rax, -0x4a0(%rbp)
leaq -0x220(%rbp), %rdi
callq 0xd0d10
movq -0x4a0(%rbp), %rdi
movq %rax, %rsi
callq 0x122e80
movq %rax, -0x498(%rbp)
jmp 0xfcb85
movq -0x498(%rbp), %rdi
leaq -0x308(%rbp), %rsi
callq 0x122da0
movq %rax, -0x4a8(%rbp)
jmp 0xfcba1
movq -0x4a8(%rbp), %rdi
leaq -0x2d0(%rbp), %rsi
callq 0x121d70
jmp 0xfcbb6
jmp 0xfcbb8
movl -0x308(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x308(%rbp)
jmp 0xfc951
leaq -0x2d0(%rbp), %rdi
callq 0xb2660
leaq -0x2b8(%rbp), %rdi
callq 0x448d0
leaq -0x220(%rbp), %rdi
callq 0xd0f50
jmp 0xfc19d
leaq -0x2d0(%rbp), %rdi
callq 0xb2660
leaq -0x2b8(%rbp), %rdi
callq 0x448d0
jmp 0xfcc2d
leaq -0x200(%rbp), %rdi
callq 0xb2660
leaq -0x48(%rbp), %rdi
callq 0xdeb00
addq $0x4b0, %rsp            # imm = 0x4B0
popq %rbp
retq
leaq -0x200(%rbp), %rdi
callq 0xb2660
leaq -0x48(%rbp), %rdi
callq 0xdeb00
movq -0x90(%rbp), %rdi
callq 0x30170
nop