// File: richardposner[P]BioNetFit2/src/code/Swarm.cpp
// Function: Swarm::processParamsDE(std::vector<double, std::allocator<double>>&, unsigned int, double)
void Swarm::processParamsDE(vector<double> &params, unsigned int subParID, double fit) {
	//unsigned int mid = fcalcMID(subParID,options.models.size());
	unsigned int pID = fcalcParID(subParID,options.models.size());

	if (options.verbosity >= 3) {
		cout << "Processing finished params for particle " << pID << " subParticle:" << subParID<<"  with fit of " << fit << endl;
	}

	unsigned int i = 0;

	//razi: TODO: modify, the params order is based on free parameters in the corresonding model, reorder based on the global list

	//outputError("Needs modifications: for models that have different numbers of free parameters, we need to check if the values are in the correct order.");

	// If this is the particle's first iteration, we need to store its params
	if (particleIterationCounter_[pID][0] == 1) {   //razi: later check consistency, models parameters
		//cout << "Storing " << params.size() << " params for particle " << pID << endl;
		for (auto param = params.begin(); param != params.end(); ++param) {
			if (options.verbosity >= 3) {
				cout << *param << endl;
			}
			particleCurrParamSets_[pID][i] = *param;

			//Raquel added: now parameters for subparticles are processed as well
			for(unsigned int mid=0; mid < options.models.size(); mid++){
				subparticleCurrParamSets_[pID][mid][i] = *param;
			}

			++i;
		}
	}

	// The the fit value of this param set is less than the particles best fit
	// we should update the particle's best fit, then store the best fit params
	if (particleBestFits_.at(pID) == 0 || fit < particleBestFits_.at(pID)) {
		if (options.verbosity >= 3) {
			cout << "Updating best fit and params for particle " << pID << endl;
		}

		// Insert into best fit lists, erasing in the case of the map with fits as keys
		particleBestFits_[pID] = fit;

		map<double, unsigned int>::iterator toDelIt = particleBestFitsByFit_.end();
		if (options.verbosity >= 4) {
			cout << "looping fits" << endl;
		}
		for (auto it = particleBestFitsByFit_.begin(); it != particleBestFitsByFit_.end(); ++it) {
			//cout << "loop: " << it->second << endl;
			if (it->second == pID) {
				//cout << "Erasing old best fit for particle " << pID << endl;
				toDelIt = it;
				//it = particleBestFitsByFit_.erase(it);
			}
		}
		if (options.verbosity >= 3) {
			cout << "setting new fit value" << endl;
		}
		if (toDelIt != particleBestFitsByFit_.end()) {
			particleBestFitsByFit_.erase(toDelIt);

		}
		if (options.verbosity >= 3) {
			cout << "done" << endl;
		}
		particleBestFitsByFit_.insert(pair<double, unsigned int>(fit, pID));

		//unsigned int i = 0;
		//for (auto param = params.begin(); param != params.end(); ++param) {
		//	cout << "Updating best param for particle " << pID << ": " << *param << endl;
		//	particleBestParamSets_[pID][i] = *param;
		//	++i;
		//}

		if (options.verbosity >= 3) {
			cout << "updating params" << endl;
		}
		for(unsigned int mid = 0; mid < options.models.size(); mid++){
			update_cur_particle_params(pID, mid, true);
		}
		if (options.verbosity >= 3) {
			cout << "done" << endl;
		}

	}



	if (subparticleBestFits_.at(subParID) == 0 || fit < subparticleBestFits_.at(subParID)) {
		if (options.verbosity >= 3) {
			cout << "Updating best fit and params for particle " << pID << endl;
		}

		// Insert into best fit lists, erasing in the case of the map with fits as keys
		subparticleBestFits_[subParID] = fit; //Raquel added support to subparticles
		subparticleBestFits_copy[subParID] = fit; //Raquel added support to subparticles

		map<double, unsigned int>::iterator toDelIt2 = subparticleBestFitsByFit_.end();
		if (options.verbosity >= 3) {
			cout << "looping fits" << endl;
		}
		for (auto it = subparticleBestFitsByFit_.begin(); it != subparticleBestFitsByFit_.end(); ++it) {
			//cout << "loop: " << it->second << endl;
			if (it->second == subParID) {
				//cout << "Erasing old best fit for particle " << pID << endl;
				toDelIt2 = it;
				//it = particleBestFitsByFit_.erase(it);
			}
		}
		if (options.verbosity >= 3) {
			cout << "seting new fit value" << endl;
		}
		if (toDelIt2 != subparticleBestFitsByFit_.end()) {
			subparticleBestFitsByFit_.erase(toDelIt2);

		}

		if (options.verbosity >= 3) {
			cout << "done" << endl;
		}
		subparticleBestFitsByFit_.insert(pair<double, unsigned int>(fit, subParID));//Raquel added support to subparticles
		subparticleBestFitsByFit_copy.insert(pair<double, unsigned int>(fit, subParID));//Raquel added support to subparticles
		currentsubparticleBestFitsByFit_.insert(pair<double, unsigned int>(fit, subParID));//Raquel added support to subparticles
		currentsubparticleBestFitsByFit_copy.insert(pair<double, unsigned int>(fit, subParID));//Raquel added support to subparticles

		//unsigned int i = 0;
		//for (auto param = params.begin(); param != params.end(); ++param) {
		//	cout << "Updating best param for particle " << pID << ": " << *param << endl;
		//	particleBestParamSets_[pID][i] = *param;
		//	++i;
		//}

		if (options.verbosity >= 3) {
			cout << "updating params" << endl;
		}
		for(unsigned int mid = 0; mid < options.models.size(); mid++){
			update_cur_particle_params(pID, mid, true);
		}
		if (options.verbosity >= 3) {
			cout << "done" << endl;
		}

	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1c0, %rsp            # imm = 0x1C0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movsd %xmm0, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x138(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x13c(%rbp)
addq $0x14c0, %rdi           # imm = 0x14C0
addq $0x100, %rdi            # imm = 0x100
callq 0x45170
movl -0x13c(%rbp), %edi
movl %eax, %esi
callq 0x17d3f0
movl %eax, %ecx
movq -0x138(%rbp), %rax
movl %ecx, -0x24(%rbp)
cmpl $0x3, 0x1614(%rax)
jb 0xff617
movq 0x1d5995(%rip), %rdi    # 0x2d4f50
leaq 0xe27a3(%rip), %rsi     # 0x1e1d65
callq 0x2ff50
movq %rax, %rdi
movl -0x24(%rbp), %esi
callq 0x30640
movq %rax, %rdi
leaq 0x106736(%rip), %rsi    # 0x205d12
callq 0x2ff50
movq %rax, %rdi
movl -0x14(%rbp), %esi
callq 0x30640
movq %rax, %rdi
leaq 0xe2798(%rip), %rsi     # 0x1e1d8e
callq 0x2ff50
movq %rax, %rdi
movsd -0x20(%rbp), %xmm0
callq 0x30710
movq %rax, %rdi
movq 0x1d59b6(%rip), %rsi    # 0x2d4fc8
callq 0x30c10
movq -0x138(%rbp), %rdi
movl $0x0, -0x28(%rbp)
addq $0x1950, %rdi           # imm = 0x1950
leaq -0x24(%rbp), %rsi
callq 0x1230c0
movq %rax, %rdi
movl $0x0, -0x2c(%rbp)
leaq -0x2c(%rbp), %rsi
callq 0x122180
cmpl $0x1, (%rax)
jne 0xff7b0
movq -0x10(%rbp), %rdi
callq 0xb2ea0
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
callq 0xbdfd0
movq %rax, -0x40(%rbp)
leaq -0x38(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x122510
testb $0x1, %al
jne 0xff681
jmp 0xff7ae
movq -0x138(%rbp), %rax
cmpl $0x3, 0x1614(%rax)
jb 0xff6b9
leaq -0x38(%rbp), %rdi
callq 0xb2ed0
movsd (%rax), %xmm0
movq 0x1d58ab(%rip), %rdi    # 0x2d4f50
callq 0x30710
movq %rax, %rdi
movq 0x1d5914(%rip), %rsi    # 0x2d4fc8
callq 0x30c10
leaq -0x38(%rbp), %rdi
callq 0xb2ed0
movq -0x138(%rbp), %rdi
movsd (%rax), %xmm0
movsd %xmm0, -0x148(%rbp)
addq $0x1400, %rdi           # imm = 0x1400
leaq -0x24(%rbp), %rsi
callq 0x122da0
movq %rax, %rdi
movl -0x28(%rbp), %eax
movl %eax, %esi
callq 0xb2610
movsd -0x148(%rbp), %xmm0
movsd %xmm0, (%rax)
movl $0x0, -0x44(%rbp)
movq -0x138(%rbp), %rdi
movl -0x44(%rbp), %eax
movq %rax, -0x150(%rbp)
addq $0x14c0, %rdi           # imm = 0x14C0
addq $0x100, %rdi            # imm = 0x100
callq 0x45170
movq %rax, %rcx
movq -0x150(%rbp), %rax
cmpq %rcx, %rax
jae 0xff797
leaq -0x38(%rbp), %rdi
callq 0xb2ed0
movq -0x138(%rbp), %rdi
movsd (%rax), %xmm0
movsd %xmm0, -0x158(%rbp)
addq $0x1460, %rdi           # imm = 0x1460
leaq -0x24(%rbp), %rsi
callq 0x122e80
movq %rax, %rdi
leaq -0x44(%rbp), %rsi
callq 0x122da0
movq %rax, %rdi
movl -0x28(%rbp), %eax
movl %eax, %esi
callq 0xb2610
movsd -0x158(%rbp), %xmm0
movsd %xmm0, (%rax)
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0xff705
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
leaq -0x38(%rbp), %rdi
callq 0xb2ef0
jmp 0xff65e
jmp 0xff7b0
movq -0x138(%rbp), %rdi
addq $0x1a20, %rdi           # imm = 0x1A20
leaq -0x24(%rbp), %rsi
callq 0x1226a0
movsd (%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0xff7d8
jp 0xff7d8
jmp 0xff812
movq -0x138(%rbp), %rdi
movsd -0x20(%rbp), %xmm0
movsd %xmm0, -0x160(%rbp)
addq $0x1a20, %rdi           # imm = 0x1A20
leaq -0x24(%rbp), %rsi
callq 0x1226a0
movsd -0x160(%rbp), %xmm1
movsd (%rax), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xffaf9
movq -0x138(%rbp), %rax
cmpl $0x3, 0x1614(%rax)
jb 0xff84f
movq 0x1d5727(%rip), %rdi    # 0x2d4f50
leaq 0xe256d(%rip), %rsi     # 0x1e1d9d
callq 0x2ff50
movq %rax, %rdi
movl -0x24(%rbp), %esi
callq 0x30640
movq %rax, %rdi
movq 0x1d577e(%rip), %rsi    # 0x2d4fc8
callq 0x30c10
movq -0x138(%rbp), %rdi
movsd -0x20(%rbp), %xmm0
movsd %xmm0, -0x168(%rbp)
addq $0x1a20, %rdi           # imm = 0x1A20
leaq -0x24(%rbp), %rsi
callq 0x122740
movsd -0x168(%rbp), %xmm0
movq -0x138(%rbp), %rdi
movsd %xmm0, (%rax)
addq $0x1ab0, %rdi           # imm = 0x1AB0
callq 0x1231a0
movq %rax, %rcx
movq -0x138(%rbp), %rax
movq %rcx, -0x50(%rbp)
cmpl $0x4, 0x1614(%rax)
jb 0xff8cb
movq 0x1d56a0(%rip), %rdi    # 0x2d4f50
leaq 0xe2511(%rip), %rsi     # 0x1e1dc8
callq 0x2ff50
movq %rax, %rdi
movq 0x1d5702(%rip), %rsi    # 0x2d4fc8
callq 0x30c10
movq -0x138(%rbp), %rdi
addq $0x1ab0, %rdi           # imm = 0x1AB0
callq 0x122630
movq %rax, -0x58(%rbp)
movq -0x138(%rbp), %rdi
addq $0x1ab0, %rdi           # imm = 0x1AB0
callq 0x1231a0
movq %rax, -0x60(%rbp)
leaq -0x58(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x1231d0
testb $0x1, %al
jne 0xff90c
jmp 0xff932
leaq -0x58(%rbp), %rdi
callq 0x122660
movl 0x8(%rax), %eax
cmpl -0x24(%rbp), %eax
jne 0xff925
movq -0x58(%rbp), %rax
movq %rax, -0x50(%rbp)
jmp 0xff927
leaq -0x58(%rbp), %rdi
callq 0xcbd20
jmp 0xff8e2
movq -0x138(%rbp), %rax
cmpl $0x3, 0x1614(%rax)
jb 0xff964
movq 0x1d5607(%rip), %rdi    # 0x2d4f50
leaq 0xe2485(%rip), %rsi     # 0x1e1dd5
callq 0x2ff50
movq %rax, %rdi
movq 0x1d5669(%rip), %rsi    # 0x2d4fc8
callq 0x30c10
movq -0x138(%rbp), %rdi
addq $0x1ab0, %rdi           # imm = 0x1AB0
callq 0x1231a0
movq %rax, -0x68(%rbp)
leaq -0x50(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x1231d0
testb $0x1, %al
jne 0xff98e
jmp 0xff9b1
movq -0x138(%rbp), %rdi
addq $0x1ab0, %rdi           # imm = 0x1AB0
movq -0x50(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rsi
callq 0x123200
movq %rax, -0x78(%rbp)
movq -0x138(%rbp), %rax
cmpl $0x3, 0x1614(%rax)
jb 0xff9e3
movq 0x1d5588(%rip), %rdi    # 0x2d4f50
leaq 0xde82d(%rip), %rsi     # 0x1de1fc
callq 0x2ff50
movq %rax, %rdi
movq 0x1d55ea(%rip), %rsi    # 0x2d4fc8
callq 0x30c10
movq -0x138(%rbp), %rax
addq $0x1ab0, %rax           # imm = 0x1AB0
movq %rax, -0x170(%rbp)
leaq -0x88(%rbp), %rdi
leaq -0x20(%rbp), %rsi
leaq -0x24(%rbp), %rdx
callq 0x123240
movq -0x170(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x122340
movq %rax, %rcx
movq -0x138(%rbp), %rax
movq %rcx, -0x90(%rbp)
cmpl $0x3, 0x1614(%rax)
jb 0xffa5a
movq 0x1d5511(%rip), %rdi    # 0x2d4f50
leaq 0xe23a5(%rip), %rsi     # 0x1e1deb
callq 0x2ff50
movq %rax, %rdi
movq 0x1d5573(%rip), %rsi    # 0x2d4fc8
callq 0x30c10
movl $0x0, -0x94(%rbp)
movq -0x138(%rbp), %rdi
movl -0x94(%rbp), %eax
movq %rax, -0x178(%rbp)
addq $0x14c0, %rdi           # imm = 0x14C0
addq $0x100, %rdi            # imm = 0x100
callq 0x45170
movq %rax, %rcx
movq -0x178(%rbp), %rax
cmpq %rcx, %rax
jae 0xffac5
movq -0x138(%rbp), %rdi
movl -0x24(%rbp), %esi
movl -0x94(%rbp), %edx
movl $0x1, %ecx
callq 0xfeea0
movl -0x94(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x94(%rbp)
jmp 0xffa64
movq -0x138(%rbp), %rax
cmpl $0x3, 0x1614(%rax)
jb 0xffaf7
movq 0x1d5474(%rip), %rdi    # 0x2d4f50
leaq 0xde719(%rip), %rsi     # 0x1de1fc
callq 0x2ff50
movq %rax, %rdi
movq 0x1d54d6(%rip), %rsi    # 0x2d4fc8
callq 0x30c10
jmp 0xffaf9
movq -0x138(%rbp), %rdi
addq $0x1a50, %rdi           # imm = 0x1A50
leaq -0x14(%rbp), %rsi
callq 0x1226a0
movsd (%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0xffb21
jp 0xffb21
jmp 0xffb5b
movq -0x138(%rbp), %rdi
movsd -0x20(%rbp), %xmm0
movsd %xmm0, -0x180(%rbp)
addq $0x1a50, %rdi           # imm = 0x1A50
leaq -0x14(%rbp), %rsi
callq 0x1226a0
movsd -0x180(%rbp), %xmm1
movsd (%rax), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xfff71
movq -0x138(%rbp), %rax
cmpl $0x3, 0x1614(%rax)
jb 0xffb98
movq 0x1d53de(%rip), %rdi    # 0x2d4f50
leaq 0xe2224(%rip), %rsi     # 0x1e1d9d
callq 0x2ff50
movq %rax, %rdi
movl -0x24(%rbp), %esi
callq 0x30640
movq %rax, %rdi
movq 0x1d5435(%rip), %rsi    # 0x2d4fc8
callq 0x30c10
movq -0x138(%rbp), %rdi
movsd -0x20(%rbp), %xmm0
movsd %xmm0, -0x190(%rbp)
addq $0x1a50, %rdi           # imm = 0x1A50
leaq -0x14(%rbp), %rsi
callq 0x122740
movsd -0x190(%rbp), %xmm0
movq -0x138(%rbp), %rdi
movsd %xmm0, (%rax)
movsd -0x20(%rbp), %xmm0
movsd %xmm0, -0x188(%rbp)
addq $0x1a80, %rdi           # imm = 0x1A80
leaq -0x14(%rbp), %rsi
callq 0x122740
movsd -0x188(%rbp), %xmm0
movq -0x138(%rbp), %rdi
movsd %xmm0, (%rax)
addq $0x1b10, %rdi           # imm = 0x1B10
callq 0x1231a0
movq %rax, %rcx
movq -0x138(%rbp), %rax
movq %rcx, -0xa0(%rbp)
cmpl $0x3, 0x1614(%rax)
jb 0xffc47
movq 0x1d5324(%rip), %rdi    # 0x2d4f50
leaq 0xe2195(%rip), %rsi     # 0x1e1dc8
callq 0x2ff50
movq %rax, %rdi
movq 0x1d5386(%rip), %rsi    # 0x2d4fc8
callq 0x30c10
movq -0x138(%rbp), %rdi
addq $0x1b10, %rdi           # imm = 0x1B10
callq 0x122630
movq %rax, -0xa8(%rbp)
movq -0x138(%rbp), %rdi
addq $0x1b10, %rdi           # imm = 0x1B10
callq 0x1231a0
movq %rax, -0xb0(%rbp)
leaq -0xa8(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x1231d0
testb $0x1, %al
jne 0xffc94
jmp 0xffcc6
leaq -0xa8(%rbp), %rdi
callq 0x122660
movl 0x8(%rax), %eax
cmpl -0x14(%rbp), %eax
jne 0xffcb6
movq -0xa8(%rbp), %rax
movq %rax, -0xa0(%rbp)
jmp 0xffcb8
leaq -0xa8(%rbp), %rdi
callq 0xcbd20
jmp 0xffc61
movq -0x138(%rbp), %rax
cmpl $0x3, 0x1614(%rax)
jb 0xffcf8
movq 0x1d5273(%rip), %rdi    # 0x2d4f50
leaq 0xe2117(%rip), %rsi     # 0x1e1dfb
callq 0x2ff50
movq %rax, %rdi
movq 0x1d52d5(%rip), %rsi    # 0x2d4fc8
callq 0x30c10
movq -0x138(%rbp), %rdi
addq $0x1b10, %rdi           # imm = 0x1B10
callq 0x1231a0
movq %rax, -0xb8(%rbp)
leaq -0xa0(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0x1231d0
testb $0x1, %al
jne 0xffd2b
jmp 0xffd5a
movq -0x138(%rbp), %rdi
addq $0x1b10, %rdi           # imm = 0x1B10
movq -0xa0(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq -0xc0(%rbp), %rsi
callq 0x123200
movq %rax, -0xc8(%rbp)
movq -0x138(%rbp), %rax
cmpl $0x3, 0x1614(%rax)
jb 0xffd8c
movq 0x1d51df(%rip), %rdi    # 0x2d4f50
leaq 0xde484(%rip), %rsi     # 0x1de1fc
callq 0x2ff50
movq %rax, %rdi
movq 0x1d5241(%rip), %rsi    # 0x2d4fc8
callq 0x30c10
movq -0x138(%rbp), %rax
addq $0x1b10, %rax           # imm = 0x1B10
movq %rax, -0x1b0(%rbp)
leaq -0xd8(%rbp), %rdi
leaq -0x20(%rbp), %rsi
leaq -0x14(%rbp), %rdx
callq 0x123240
movq -0x1b0(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
callq 0x122340
movq %rax, %rcx
movq -0x138(%rbp), %rax
movq %rcx, -0xe0(%rbp)
addq $0x1b40, %rax           # imm = 0x1B40
movq %rax, -0x1a8(%rbp)
leaq -0xf0(%rbp), %rdi
leaq -0x20(%rbp), %rsi
leaq -0x14(%rbp), %rdx
callq 0x123240
movq -0x1a8(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
callq 0x122340
movq %rax, %rcx
movq -0x138(%rbp), %rax
movq %rcx, -0xf8(%rbp)
addq $0x1b70, %rax           # imm = 0x1B70
movq %rax, -0x1a0(%rbp)
leaq -0x108(%rbp), %rdi
leaq -0x20(%rbp), %rsi
leaq -0x14(%rbp), %rdx
callq 0x123240
movq -0x1a0(%rbp), %rdi
leaq -0x108(%rbp), %rsi
callq 0x122340
movq %rax, %rcx
movq -0x138(%rbp), %rax
movq %rcx, -0x110(%rbp)
addq $0x1ba0, %rax           # imm = 0x1BA0
movq %rax, -0x198(%rbp)
leaq -0x120(%rbp), %rdi
leaq -0x20(%rbp), %rsi
leaq -0x14(%rbp), %rdx
callq 0x123240
movq -0x198(%rbp), %rdi
leaq -0x120(%rbp), %rsi
callq 0x122340
movq %rax, %rcx
movq -0x138(%rbp), %rax
movq %rcx, -0x128(%rbp)
cmpl $0x3, 0x1614(%rax)
jb 0xffed2
movq 0x1d5099(%rip), %rdi    # 0x2d4f50
leaq 0xe1f2d(%rip), %rsi     # 0x1e1deb
callq 0x2ff50
movq %rax, %rdi
movq 0x1d50fb(%rip), %rsi    # 0x2d4fc8
callq 0x30c10
movl $0x0, -0x12c(%rbp)
movq -0x138(%rbp), %rdi
movl -0x12c(%rbp), %eax
movq %rax, -0x1b8(%rbp)
addq $0x14c0, %rdi           # imm = 0x14C0
addq $0x100, %rdi            # imm = 0x100
callq 0x45170
movq %rax, %rcx
movq -0x1b8(%rbp), %rax
cmpq %rcx, %rax
jae 0xfff3d
movq -0x138(%rbp), %rdi
movl -0x24(%rbp), %esi
movl -0x12c(%rbp), %edx
movl $0x1, %ecx
callq 0xfeea0
movl -0x12c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x12c(%rbp)
jmp 0xffedc
movq -0x138(%rbp), %rax
cmpl $0x3, 0x1614(%rax)
jb 0xfff6f
movq 0x1d4ffc(%rip), %rdi    # 0x2d4f50
leaq 0xde2a1(%rip), %rsi     # 0x1de1fc
callq 0x2ff50
movq %rax, %rdi
movq 0x1d505e(%rip), %rsi    # 0x2d4fc8
callq 0x30c10
jmp 0xfff71
addq $0x1c0, %rsp            # imm = 0x1C0
popq %rbp
retq
nopw (%rax,%rax)