LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: richardposner[P]BioNetFit2/src/code/Swarm.cpp
// Function: Swarm::generateParticleRadii()
vector<double> Swarm::generateParticleRadii() {
	// Eq 4 in Olensek et al

	float rMax = 1;
	float cr = (1 / ((double)options.swarmSize - 1)) * log(rMax / options.minRadius);

	vector<double> radii = vector<double>(options.swarmSize + 1, 0);
	for (int p = 1; p <= options.swarmSize; ++p) {
		radii[p] = exp(0 - (cr * (p - 1)));
		//cout << "radius of " << p << " is " << radii[p] << endl;
	}

	return radii;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x58(%rbp)
movq %rdi, %rax
movq %rax, -0x70(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x68(%rbp)
movl $0x3f800000, -0x14(%rbp) # imm = 0x3F800000
cvtsi2sdl 0x1620(%rax), %xmm1
movsd 0xc44eb(%rip), %xmm0    # 0x1dab28
subsd %xmm0, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x60(%rbp)
movss -0x14(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x1718(%rax), %xmm1
divsd %xmm1, %xmm0
callq 0x2f410
movq -0x68(%rbp), %rax
movaps %xmm0, %xmm1
movsd -0x60(%rbp), %xmm0
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x18(%rbp)
movb $0x0, -0x19(%rbp)
movl 0x1620(%rax), %eax
incl %eax
cltq
movq %rax, -0x50(%rbp)
movq $0x0, -0x28(%rbp)
leaq -0x29(%rbp), %rdi
movq %rdi, -0x48(%rbp)
callq 0xb5b80
movq -0x58(%rbp), %rdi
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rcx
leaq -0x28(%rbp), %rdx
callq 0x1246b0
jmp 0x1166bb
leaq -0x29(%rbp), %rdi
callq 0xbefe0
movl $0x1, -0x40(%rbp)
movq -0x68(%rbp), %rcx
movl -0x40(%rbp), %eax
cmpl 0x1620(%rcx), %eax
jg 0x116760
movss -0x18(%rbp), %xmm1
movl -0x40(%rbp), %eax
decl %eax
cvtsi2ss %eax, %xmm0
mulss %xmm0, %xmm1
xorps %xmm0, %xmm0
subss %xmm1, %xmm0
callq 0x124b50
movss %xmm0, -0x74(%rbp)
jmp 0x116703
movq -0x58(%rbp), %rdi
movss -0x74(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, -0x80(%rbp)
movslq -0x40(%rbp), %rsi
callq 0xb2610
movsd -0x80(%rbp), %xmm0
movsd %xmm0, (%rax)
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x1166cb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x29(%rbp), %rdi
callq 0xbefe0
jmp 0x116780
movq -0x58(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
callq 0xb2660
jmp 0x116780
movb $0x1, -0x19(%rbp)
testb $0x1, -0x19(%rbp)
jne 0x116773
movq -0x58(%rbp), %rdi
callq 0xb2660
movq -0x70(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x30170
nopl (%rax)
// File: richardposner[P]BioNetFit2/src/code/Swarm.cpp
// Function: Swarm::metropolisSelection(unsigned int, double, float)
bool Swarm::metropolisSelection(unsigned int particle, double fit, float particleTemp) {

	float p = min <float>(1, exp( (0 - (fit - particleBestFits_.at(particle))) / particleTemp ) );
	float r = (float)rand() / (float)RAND_MAX;

	if (r < p) {
		return true;
	}
	else {
		return false;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movsd %xmm0, -0x20(%rbp)
movss %xmm1, -0x24(%rbp)
movq -0x10(%rbp), %rdi
movss 0xbc84f(%rip), %xmm0    # 0x1d3004
movss %xmm0, -0x2c(%rbp)
movsd -0x20(%rbp), %xmm0
movsd %xmm0, -0x40(%rbp)
addq $0x1a20, %rdi           # imm = 0x1A20
leaq -0x14(%rbp), %rsi
callq 0x1226a0
movsd -0x40(%rbp), %xmm1
subsd (%rax), %xmm1
xorps %xmm0, %xmm0
subsd %xmm1, %xmm0
movss -0x24(%rbp), %xmm1
cvtss2sd %xmm1, %xmm1
divsd %xmm1, %xmm0
callq 0x2f350
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x30(%rbp)
leaq -0x2c(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x124bc0
movss (%rax), %xmm0
movss %xmm0, -0x28(%rbp)
callq 0x30b00
cvtsi2ss %eax, %xmm0
movss 0xca332(%rip), %xmm1    # 0x1e0b58
divss %xmm1, %xmm0
movss %xmm0, -0x34(%rbp)
movss -0x34(%rbp), %xmm1
movss -0x28(%rbp), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x116844
movb $0x1, -0x1(%rbp)
jmp 0x116848
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: richardposner[P]BioNetFit2/src/code/Swarm.cpp
// Function: Swarm::normalizeParams(std::vector<double, std::allocator<double>>)
vector<double> Swarm::normalizeParams(vector<double> oldParams) {
	vector<double> newParams;

	outputError("needs modifications to support multiple files");
/*	unsigned int d = 0;
	for (auto param = options.model->getFreeParams_().begin(); param != options.model->getFreeParams_().end(); ++param) {
		//cout << "denormalized: " << oldParams[d] << endl;
		//cout << "max: " << param->second->getGenMax() << " min: " << param->second->getGenMin() << " diff: " << (param->second->getGenMax() - param->second->getGenMin()) << endl;
		//newParams.push_back((oldParams[d++] - param->second->getGenMin()) / (param->second->getGenMax() - param->second->getGenMin()));
		newParams.push_back(normalizeParam(oldParams[d], param->second->getGenMin(), param->second->getGenMax(), param->second->getIsLog()));
		//cout << "normalized: " << *(newParams.end() - 1) << endl;
		++d;
	}
	*/
	return newParams;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x78(%rbp)
movq %rdi, %rax
movq %rax, -0x70(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x68(%rbp)
movb $0x0, -0x19(%rbp)
callq 0xb2580
leaq -0x41(%rbp), %rdi
movq %rdi, -0x60(%rbp)
callq 0x30a70
movq -0x60(%rbp), %rdx
leaq 0xcc514(%rip), %rsi     # 0x1e43bf
leaq -0x40(%rbp), %rdi
callq 0x44470
jmp 0x117eb6
movq -0x68(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0xeada0
jmp 0x117ec5
leaq -0x40(%rbp), %rdi
callq 0x311e8
leaq -0x41(%rbp), %rdi
callq 0x311c0
movb $0x1, -0x19(%rbp)
testb $0x1, -0x19(%rbp)
jne 0x117f23
jmp 0x117f1a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x117f06
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x311e8
leaq -0x41(%rbp), %rdi
callq 0x311c0
movq -0x78(%rbp), %rdi
callq 0xb2660
jmp 0x117f30
movq -0x78(%rbp), %rdi
callq 0xb2660
movq -0x70(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
movq -0x50(%rbp), %rdi
callq 0x30170
nopl (%rax)
// File: richardposner[P]BioNetFit2/src/code/Data.hh
// Function: void Data::serialize<boost::archive::binary_oarchive>(boost::archive::binary_oarchive&, unsigned int)
void serialize(Archive& ar, const unsigned version) {
		//std::cout << "serializing data" << std::endl;

		ar & standardDeviations;
		ar & colAverages;
		ar & dataPath;
		ar & dataOrig_;
		ar & dataStandardized_;
		ar & dataLogTransformed_;
		ar & dataDividedByInit_;

		ar & swarm_;
		ar & isExp_;
		ar & dataCurrent;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rsi
movq %rsi, -0x20(%rbp)
movq -0x10(%rbp), %rdi
addq $0x8, %rsi
callq 0x14b500
movq -0x20(%rbp), %rsi
movq -0x10(%rbp), %rdi
addq $0x38, %rsi
callq 0x14b530
movq -0x20(%rbp), %rsi
movq -0x10(%rbp), %rdi
addq $0x70, %rsi
callq 0x1448d0
movq -0x20(%rbp), %rsi
movq -0x10(%rbp), %rdi
addq $0x90, %rsi
callq 0x14b500
movq -0x20(%rbp), %rsi
movq -0x10(%rbp), %rdi
addq $0xc0, %rsi
callq 0x14b500
movq -0x20(%rbp), %rsi
movq -0x10(%rbp), %rdi
addq $0xf0, %rsi
callq 0x14b500
movq -0x20(%rbp), %rsi
movq -0x10(%rbp), %rdi
addq $0x120, %rsi            # imm = 0x120
callq 0x14b500
movq -0x20(%rbp), %rsi
movq -0x10(%rbp), %rdi
addq $0x150, %rsi            # imm = 0x150
callq 0x14b560
movq -0x20(%rbp), %rsi
movq -0x10(%rbp), %rdi
addq $0x158, %rsi            # imm = 0x158
callq 0x144810
movq -0x20(%rbp), %rsi
movq -0x10(%rbp), %rdi
callq 0x14b590
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: richardposner[P]BioNetFit2/src/code/FreeParam.hh
// Function: void FreeParam::serialize<boost::archive::binary_oarchive>(boost::archive::binary_oarchive&, unsigned int)
void serialize(Archive& ar, const unsigned version) {
		//std::cout << " serializing fp" << std::endl;

		ar & parameterName_;
		ar & generationMethod_;
		ar & mutationRate_;
		ar & mutationFactor_;
		ar & genMin_;
		ar & genMax_;
		ar & hasMutation_;
		ar & isLog_;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rsi
movq %rsi, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1448d0
movq -0x20(%rbp), %rsi
movq -0x10(%rbp), %rdi
addq $0x20, %rsi
callq 0x1448d0
movq -0x20(%rbp), %rsi
movq -0x10(%rbp), %rdi
addq $0x40, %rsi
callq 0x147310
movq -0x20(%rbp), %rsi
movq -0x10(%rbp), %rdi
addq $0x44, %rsi
callq 0x147310
movq -0x20(%rbp), %rsi
movq -0x10(%rbp), %rdi
addq $0x48, %rsi
callq 0x147310
movq -0x20(%rbp), %rsi
movq -0x10(%rbp), %rdi
addq $0x4c, %rsi
callq 0x147310
movq -0x20(%rbp), %rsi
movq -0x10(%rbp), %rdi
addq $0x50, %rsi
callq 0x144810
movq -0x20(%rbp), %rsi
movq -0x10(%rbp), %rdi
addq $0x51, %rsi
callq 0x144810
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: richardposner[P]BioNetFit2/src/code/Model.hh
// Function: void Model::serialize<boost::archive::binary_oarchive>(boost::archive::binary_oarchive&, unsigned int)
void serialize(Archive& ar, const unsigned version) {
		//std::cout << " serializing model" << std::endl;
		ar & swarm_;

		ar & freeParams_;

		ar & actions;
		ar & modelPath_;
		ar & fullContents_;
		ar & netContents_;

		ar & hasGenerateNetwork_;

	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rsi
movq %rsi, -0x20(%rbp)
movq -0x10(%rbp), %rdi
addq $0x60, %rsi
callq 0x14b560
movq -0x20(%rbp), %rsi
movq -0x10(%rbp), %rdi
addq $0x30, %rsi
callq 0x147250
movq -0x20(%rbp), %rsi
movq -0x10(%rbp), %rdi
callq 0x1573a0
movq -0x20(%rbp), %rsi
movq -0x10(%rbp), %rdi
addq $0x68, %rsi
callq 0x1448d0
movq -0x20(%rbp), %rsi
movq -0x10(%rbp), %rdi
addq $0x88, %rsi
callq 0x144900
movq -0x20(%rbp), %rsi
movq -0x10(%rbp), %rdi
addq $0xa0, %rsi
callq 0x144900
movq -0x20(%rbp), %rsi
movq -0x10(%rbp), %rdi
addq $0xb8, %rsi
callq 0x144810
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: richardposner[P]BioNetFit2/src/code/Model.hh
// Function: void Model::action::serialize<boost::archive::binary_oarchive>(boost::archive::binary_oarchive&, unsigned int)
void serialize(Archive& ar, const unsigned version) {

			ar & full;
			ar & t_end;
			ar & type;
			ar & scanParam;

			ar & dataSet;
		}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rsi
movq %rsi, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1448d0
movq -0x20(%rbp), %rsi
movq -0x10(%rbp), %rdi
addq $0x20, %rsi
callq 0x144a50
movq -0x20(%rbp), %rsi
movq -0x10(%rbp), %rdi
addq $0x28, %rsi
callq 0x1448d0
movq -0x20(%rbp), %rsi
movq -0x10(%rbp), %rdi
addq $0x48, %rsi
callq 0x1448d0
movq -0x20(%rbp), %rsi
movq -0x10(%rbp), %rdi
addq $0x68, %rsi
callq 0x159c80
addq $0x20, %rsp
popq %rbp
retq
nop
// File: richardposner[P]BioNetFit2/src/code/Utils.cpp
// Function: convertToAbsPath(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
string convertToAbsPath(string relPath) {
        path fullPath;

        try{
                fullPath = canonical(relPath);
        }
        catch(...){}
        string tmp = fullPath.string();
        if(tmp.empty()){

        	return relPath;
        }

        return fullPath.string();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movq %rsi, -0xd0(%rbp)
movq %rdi, -0xe0(%rbp)
movq %rdi, %rax
movq %rax, -0xd8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x17e5d0
movq -0xd0(%rbp), %rsi
leaq -0x70(%rbp), %rdi
callq 0x43ef0
jmp 0x17c576
leaq -0xa0(%rbp), %rdi
callq 0x17e630
jmp 0x17c584
leaq -0x50(%rbp), %rdi
leaq -0x70(%rbp), %rsi
leaq -0xa0(%rbp), %rdx
callq 0x17e5f0
jmp 0x17c59a
leaq -0x30(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x121790
leaq -0x50(%rbp), %rdi
callq 0x44570
leaq -0xa0(%rbp), %rdi
callq 0x44570
leaq -0x70(%rbp), %rdi
callq 0x44570
jmp 0x17c616
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x17c604
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x17c5fb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x44570
leaq -0x70(%rbp), %rdi
callq 0x44570
movq -0x78(%rbp), %rdi
callq 0x2f160
callq 0x304d0
jmp 0x17c614
jmp 0x17c616
leaq -0x30(%rbp), %rdi
callq 0x44560
movq %rax, -0xe8(%rbp)
jmp 0x17c628
movq -0xe8(%rbp), %rsi
leaq -0xc0(%rbp), %rdi
callq 0x2f300
jmp 0x17c63d
leaq -0xc0(%rbp), %rdi
callq 0x2f700
testb $0x1, %al
jne 0x17c64f
jmp 0x17c67c
movq -0xd0(%rbp), %rsi
movq -0xe0(%rbp), %rdi
callq 0x30940
movl $0x1, -0xc4(%rbp)
jmp 0x17c6c9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x17c6ee
leaq -0x30(%rbp), %rdi
callq 0x44560
movq %rax, -0xf0(%rbp)
jmp 0x17c68e
movq -0xf0(%rbp), %rsi
movq -0xe0(%rbp), %rdi
callq 0x2f300
jmp 0x17c6a3
movl $0x1, -0xc4(%rbp)
jmp 0x17c6c9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0xc0(%rbp), %rdi
callq 0x311e8
jmp 0x17c6ee
leaq -0xc0(%rbp), %rdi
callq 0x311e8
leaq -0x30(%rbp), %rdi
callq 0x44570
movq -0xd8(%rbp), %rax
addq $0xf0, %rsp
popq %rbp
retq
leaq -0x30(%rbp), %rdi
callq 0x44570
movq -0x78(%rbp), %rdi
callq 0x30170
// File: richardposner[P]BioNetFit2/src/code/Utils.cpp
// Function: convertTimeToSeconds(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int convertTimeToSeconds(string time){ //Raquel adding this function for walltime calculation

	int h, m, s=0;
	if (sscanf(time.c_str(), "%d:%d:%d", &h, &m, &s) >= 2) {
	  int secs = h *3600 + m*60 + s;
	  return secs;

	}else{
		cout << "Error converting maxFitTime to seconds, please check the sintax of your input value. Ignoring MaxFitTime." << endl;
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl $0x0, -0x1c(%rbp)
callq 0x2f290
movq %rax, %rdi
leaq 0x8863a(%rip), %rsi     # 0x204d5c
leaq -0x14(%rbp), %rdx
leaq -0x18(%rbp), %rcx
leaq -0x1c(%rbp), %r8
movb $0x0, %al
callq 0x2f200
cmpl $0x2, %eax
jl 0x17c755
imull $0xe10, -0x14(%rbp), %eax # imm = 0xE10
imull $0x3c, -0x18(%rbp), %ecx
addl %ecx, %eax
addl -0x1c(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x17c77e
movq 0x1587f4(%rip), %rdi    # 0x2d4f50
leaq 0x88602(%rip), %rsi     # 0x204d65
callq 0x2ff50
movq %rax, %rdi
movq 0x158856(%rip), %rsi    # 0x2d4fc8
callq 0x30c10
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: richardposner[P]BioNetFit2/src/code/Utils.cpp
// Function: checkIfFileExists(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int checkIfFileExists(string path) {
	if (exists(path))
		return 1;
	else
		return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, %rsi
movq %rsi, -0x10(%rbp)
leaq -0x30(%rbp), %rdi
movq %rdi, -0x48(%rbp)
callq 0x43ef0
movq -0x48(%rbp), %rdi
callq 0x121730
movb %al, -0x3d(%rbp)
jmp 0x17d43a
leaq -0x30(%rbp), %rdi
callq 0x44570
movb -0x3d(%rbp), %al
testb $0x1, %al
jne 0x17d44c
jmp 0x17d46c
movl $0x1, -0x4(%rbp)
jmp 0x17d473
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x44570
jmp 0x17d47c
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x30170
nopw %cs:(%rax,%rax)
// File: richardposner[P]BioNetFit2/src/code/Utils.cpp
// Function: split(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void split(const string& str, vector<string>& tokens, const string& delimiters) {
	// Skip delimiters at beginning.
	string::size_type lastPos = str.find_first_not_of(delimiters, 0);
	// Find first "non-delimiter".
	string::size_type pos = str.find_first_of(delimiters, lastPos);

	while (string::npos != pos || string::npos != lastPos)
	{
		// Found a token, add it to the vector.
		tokens.push_back(str.substr(lastPos, pos - lastPos));
		// Skip delimiters.  Note the "not_of"
		lastPos = str.find_first_not_of(delimiters, pos);
		// Find next "non-delimiter"
		pos = str.find_first_of(delimiters, lastPos);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x30930
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x2f370
movq %rax, -0x28(%rbp)
movb $0x1, %al
movq $-0x1, %rcx
cmpq -0x28(%rbp), %rcx
movb %al, -0x55(%rbp)
jne 0x17d4f1
movq $-0x1, %rax
cmpq -0x20(%rbp), %rax
setne %al
movb %al, -0x55(%rbp)
movb -0x55(%rbp), %al
testb $0x1, %al
jne 0x17d4fd
jmp 0x17d57f
movq -0x10(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x8(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
subq %rdx, %rcx
leaq -0x48(%rbp), %rdi
movq %rdi, -0x60(%rbp)
callq 0x30b40
movq -0x68(%rbp), %rdi
movq -0x60(%rbp), %rsi
callq 0xb39c0
jmp 0x17d530
leaq -0x48(%rbp), %rdi
callq 0x311e8
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x30930
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x2f370
movq %rax, -0x28(%rbp)
jmp 0x17d4ce
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x311e8
jmp 0x17d585
addq $0x70, %rsp
popq %rbp
retq
movq -0x50(%rbp), %rdi
callq 0x30170
nop
// File: richardposner[P]BioNetFit2/src/code/Utils.cpp
// Function: createParticlePipe(char const*)
bool createParticlePipe(const char * path) {

	if (checkIfFileExists(path)) {
		unlink(path);
	}

	int fifo_status = mkfifo(path, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP);
	if (fifo_status) {
		cout << "Warning: Couldn't create pipe with path: " << path << endl;
		return false;
	}
	else {
		return true;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x58(%rbp)
leaq -0x31(%rbp), %rdi
movq %rdi, -0x50(%rbp)
callq 0x30a70
movq -0x58(%rbp), %rsi
movq -0x50(%rbp), %rdx
leaq -0x30(%rbp), %rdi
callq 0x44470
jmp 0x17e0e4
leaq -0x30(%rbp), %rdi
callq 0x17d410
movl %eax, -0x5c(%rbp)
jmp 0x17e0f2
leaq -0x30(%rbp), %rdi
callq 0x311e8
leaq -0x31(%rbp), %rdi
callq 0x311c0
movl -0x5c(%rbp), %eax
cmpl $0x0, %eax
je 0x17e145
movq -0x10(%rbp), %rdi
callq 0x2f600
jmp 0x17e145
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x17e13a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x311e8
leaq -0x31(%rbp), %rdi
callq 0x311c0
jmp 0x17e19f
movq -0x10(%rbp), %rdi
movl $0x1b0, %esi            # imm = 0x1B0
callq 0x2f380
movl %eax, -0x48(%rbp)
cmpl $0x0, -0x48(%rbp)
je 0x17e190
movq 0x156ded(%rip), %rdi    # 0x2d4f50
leaq 0x87185(%rip), %rsi     # 0x2052ef
callq 0x2ff50
movq %rax, %rdi
movq -0x10(%rbp), %rsi
callq 0x2ff50
movq %rax, %rdi
movq 0x156e43(%rip), %rsi    # 0x2d4fc8
callq 0x30c10
movb $0x0, -0x1(%rbp)
jmp 0x17e194
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x60, %rsp
popq %rbp
retq
movq -0x40(%rbp), %rdi
callq 0x30170
nopl (%rax,%rax)
// File: richardposner[P]BioNetFit2/src/code/Utils.cpp
// Function: isFloat(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
bool isFloat(string number) {
	istringstream iss(number);
	float f;
	iss >> noskipws >> f; // noskipws considers leading whitespace invalid
	// Check the entire string was consumed and if either failbit or badbit is set
	return iss.eof() && !iss.fail();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1c0, %rsp            # imm = 0x1C0
movq %rdi, %rsi
movq %rsi, -0x8(%rbp)
leaq -0x188(%rbp), %rdi
movq %rdi, -0x1b0(%rbp)
movl $0x8, %edx
callq 0x2fb90
movq -0x1b0(%rbp), %rdi
leaq 0x7f8(%rip), %rsi       # 0x17e9e0
callq 0x30e50
movq %rax, -0x1a8(%rbp)
jmp 0x17e1f6
movq -0x1a8(%rbp), %rdi
leaq -0x18c(%rbp), %rsi
callq 0x30990
jmp 0x17e20b
movq -0x188(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x188(%rbp,%rax), %rdi
callq 0x310b0
movb %al, -0x1b1(%rbp)
jmp 0x17e22b
movb -0x1b1(%rbp), %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x1b2(%rbp)
jne 0x17e240
jmp 0x17e26e
movq -0x188(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x188(%rbp,%rax), %rdi
callq 0x30c80
movb %al, -0x1b3(%rbp)
jmp 0x17e260
movb -0x1b3(%rbp), %al
xorb $-0x1, %al
movb %al, -0x1b2(%rbp)
movb -0x1b2(%rbp), %al
movb %al, -0x1b4(%rbp)
leaq -0x188(%rbp), %rdi
callq 0x2fed0
movb -0x1b4(%rbp), %al
andb $0x1, %al
addq $0x1c0, %rsp            # imm = 0x1C0
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x198(%rbp)
movl %eax, -0x19c(%rbp)
leaq -0x188(%rbp), %rdi
callq 0x2fed0
movq -0x198(%rbp), %rdi
callq 0x30170
nopw %cs:(%rax,%rax)
// File: richardposner[P]BioNetFit2/src/code/Utils.cpp
// Function: runCommand(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
int runCommand(string cmd, string &result) {

	std::shared_ptr<FILE> pipe(popen(cmd.c_str(), "r"), pclose);

	if (!pipe) {
		return 1;
	}

	char buffer[1024];
	result.clear();

	while (!feof(pipe.get())) {
		if (fgets(buffer, 1024, pipe.get()) != NULL)
			result += buffer;
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x450, %rsp            # imm = 0x450
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
callq 0x2f290
movq %rax, %rdi
leaq 0x608da(%rip), %rsi     # 0x1debcc
callq 0x30680
movq %rax, %rsi
leaq -0x28(%rbp), %rdi
movq 0x156c13(%rip), %rdx    # 0x2d4f18
callq 0x17ea10
leaq -0x28(%rbp), %rdi
callq 0x17ea40
testb $0x1, %al
jne 0x17e32a
movl $0x1, -0x4(%rbp)
movl $0x1, -0x2c(%rbp)
jmp 0x17e3c9
movq -0x18(%rbp), %rdi
callq 0x2fe00
leaq -0x28(%rbp), %rdi
callq 0x17ea60
movq %rax, %rdi
callq 0x2f150
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x17e352
jmp 0x17e3bb
leaq -0x28(%rbp), %rdi
callq 0x17ea60
movq %rax, %rdx
leaq -0x430(%rbp), %rdi
movl $0x400, %esi            # imm = 0x400
callq 0x300f0
movq %rax, -0x448(%rbp)
jmp 0x17e378
movq -0x448(%rbp), %rax
cmpq $0x0, %rax
je 0x17e3b6
movq -0x18(%rbp), %rdi
leaq -0x430(%rbp), %rsi
callq 0x2f330
jmp 0x17e397
jmp 0x17e3b6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x438(%rbp)
movl %eax, -0x43c(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x17ea80
jmp 0x17e3de
jmp 0x17e333
movl $0x0, -0x4(%rbp)
movl $0x1, -0x2c(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x17ea80
movl -0x4(%rbp), %eax
addq $0x450, %rsp            # imm = 0x450
popq %rbp
retq
movq -0x438(%rbp), %rdi
callq 0x30170
nopw (%rax,%rax)
// File: brianwu02[P]ImageProcessing/ordered_dither.cpp
// Function: main
int main(int argc, char** argv) {
    int n, m;
    double gamma;
    imageP	I1, I2, tmp_img;
    // read input image (I1) and reserve space for output (I2)
    I1 = IP_readImage(argv[1]);
    I2 = NEWIMAGE;
    tmp_img = NEWIMAGE;
    
    // read m and gamma from STDIN
    m = atoi(argv[2]);
    n = pow(m, 2);

    // check if n is a power of 2
    if (n != 9) {
        if (not(is_pow_of_2(n))) {
            cerr << n << " is not a power of 2. Exiting." << endl;
            exit(1);
        }
    }
    gamma = atof(argv[3]);
    
    // threshold image and save result in file
    ordered_dither(I1, n, gamma, I2, tmp_img, m);
    IP_saveImage(I2, argv[4]);
    
    // free up image structures/memory
    IP_freeImage(I1);
    IP_freeImage(I2);
    IP_freeImage(tmp_img);
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x19b0
movq %rax, -0x28(%rbp)
movl $0x10, %edi
callq 0x1130
movq %rax, -0x30(%rbp)
movl $0x10, %edi
callq 0x1130
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x1170
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %edi
movl $0x2, %esi
callq 0x1980
cvttsd2si %xmm0, %eax
movl %eax, -0x14(%rbp)
cmpl $0x9, -0x14(%rbp)
je 0x13f2
movl -0x14(%rbp), %edi
callq 0x1460
testb $0x1, %al
jne 0x13f0
movl -0x14(%rbp), %esi
movq 0x2c2d(%rip), %rdi      # 0x3ff0
callq 0x1180
movq %rax, %rdi
leaq 0xc46(%rip), %rsi       # 0x2018
callq 0x10b0
movq %rax, %rdi
movq 0x2be7(%rip), %rsi      # 0x3fc8
callq 0x10c0
movl $0x1, %edi
callq 0x10f0
jmp 0x13f2
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x1100
movsd %xmm0, -0x20(%rbp)
movq -0x28(%rbp), %rdi
movl -0x14(%rbp), %esi
movsd -0x20(%rbp), %xmm0
cvtsd2ss %xmm0, %xmm0
movq -0x30(%rbp), %rdx
movq -0x38(%rbp), %rcx
movl -0x18(%rbp), %r8d
callq 0x1490
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rsi
callq 0x1cd0
movq -0x28(%rbp), %rdi
callq 0x1ed0
movq -0x30(%rbp), %rdi
callq 0x1ed0
movq -0x38(%rbp), %rdi
callq 0x1ed0
movl $0x1, %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: brianwu02[P]ImageProcessing/ordered_dither.cpp
// Function: clip_values(int)
int clip_values(int pixel_val) {
    // if a is greater than 255, clip at 255; if a is lower than 255; clip at 0;
    // else return the same value;
    if (pixel_val >= 255) {
        return 255;
    } else if (pixel_val <= 0) {
        return 0;
    } else {
        return pixel_val;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
cmpl $0xff, -0x8(%rbp)
jl 0x1959
movl $0xff, -0x4(%rbp)
jmp 0x196e
cmpl $0x0, -0x8(%rbp)
jg 0x1968
movl $0x0, -0x4(%rbp)
jmp 0x196e
movl -0x8(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: exrok[P]evdoublebind/./src/input_event_names.h
// Function: key_code_name(unsigned short)
const char * key_code_name(u_int16_t code){
    if (code < sizeof(LOOKUP_KEY_NAME)/sizeof(char *)){
        return LOOKUP_KEY_NAME[code];
    }else{
        return UNKNOWN_KEY;
    }
}

// Assembly:
movw %di, %ax
movw %ax, -0xa(%rsp)
movzwl -0xa(%rsp), %eax
cmpq $0xf8, %rax
jae 0x338e
movzwl -0xa(%rsp), %eax
movl %eax, %ecx
leaq 0x4e1d(%rip), %rax      # 0x81a0
movq (%rax,%rcx,8), %rax
movq %rax, -0x8(%rsp)
jmp 0x339a
movq 0x4e03(%rip), %rax      # 0x8198
movq %rax, -0x8(%rsp)
movq -0x8(%rsp), %rax
retq
// File: exrok[P]evdoublebind/./src/input_event_names.h
// Function: key_state_name(int)
const char * key_state_name(int state){
    if (state == 0) return "UP";
    if (state == 1) return "DOWN";
    if (state == 2) return "REPEAT";
    return "UNKOWN";
}

// Assembly:
movl %edi, -0xc(%rsp)
cmpl $0x0, -0xc(%rsp)
jne 0x33b9
leaq 0x20b2(%rip), %rax      # 0x5464
movq %rax, -0x8(%rsp)
jmp 0x33ef
cmpl $0x1, -0xc(%rsp)
jne 0x33ce
leaq 0x20cc(%rip), %rax      # 0x5493
movq %rax, -0x8(%rsp)
jmp 0x33ef
cmpl $0x2, -0xc(%rsp)
jne 0x33e3
leaq 0x272a(%rip), %rax      # 0x5b06
movq %rax, -0x8(%rsp)
jmp 0x33ef
leaq 0x2723(%rip), %rax      # 0x5b0d
movq %rax, -0x8(%rsp)
movq -0x8(%rsp), %rax
retq
nopw %cs:(%rax,%rax)
// File: exrok[P]evdoublebind/./src/input_event_names.h
// Function: msc_code_name(unsigned short)
const char * msc_code_name(u_int16_t code){
    if (code < sizeof(LOOKUP_MSC_NAME)/sizeof(char *)){
        return LOOKUP_MSC_NAME[code];
    }else{
        return "UNKNOWN_MSC";
    }
}

// Assembly:
movw %di, %ax
movw %ax, -0xa(%rsp)
movzwl -0xa(%rsp), %eax
cmpq $0x7, %rax
jae 0x342c
movzwl -0xa(%rsp), %eax
movl %eax, %ecx
leaq 0x553f(%rip), %rax      # 0x8960
movq (%rax,%rcx,8), %rax
movq %rax, -0x8(%rsp)
jmp 0x3438
leaq 0x26e1(%rip), %rax      # 0x5b14
movq %rax, -0x8(%rsp)
movq -0x8(%rsp), %rax
retq
nop
// File: exrok[P]evdoublebind/./src/input_event_names.h
// Function: ev_code_name(unsigned short)
const char * ev_code_name(u_int16_t code){
    if (code < sizeof(LOOKUP_EV_NAME)/sizeof(char *)){
        return LOOKUP_EV_NAME[code];
    }else{
        return UNKNOWN_EV;
    }
}

// Assembly:
movw %di, %ax
movw %ax, -0xa(%rsp)
movzwl -0xa(%rsp), %eax
cmpq $0x6, %rax
jae 0x346c
movzwl -0xa(%rsp), %eax
movl %eax, %ecx
leaq 0x4cdf(%rip), %rax      # 0x8140
movq (%rax,%rcx,8), %rax
movq %rax, -0x8(%rsp)
jmp 0x3478
movq 0x4d1d(%rip), %rax      # 0x8190
movq %rax, -0x8(%rsp)
movq -0x8(%rsp), %rax
retq
nop
// File: exrok[P]evdoublebind/./src/input_event_names.h
// Function: syn_code_name(unsigned short)
const char * syn_code_name(u_int16_t code){
    if (code < sizeof(LOOKUP_SYN_NAME)/sizeof(char *)){
        return LOOKUP_SYN_NAME[code];
    }else{
        return "UNKNOWN_SYN";
    }
}

// Assembly:
movw %di, %ax
movw %ax, -0xa(%rsp)
movzwl -0xa(%rsp), %eax
cmpq $0x4, %rax
jae 0x34ac
movzwl -0xa(%rsp), %eax
movl %eax, %ecx
leaq 0x4ccf(%rip), %rax      # 0x8170
movq (%rax,%rcx,8), %rax
movq %rax, -0x8(%rsp)
jmp 0x34b8
leaq 0x266d(%rip), %rax      # 0x5b20
movq %rax, -0x8(%rsp)
movq -0x8(%rsp), %rax
retq
nop
// File: exrok[P]evdoublebind/./src/input_event_names.h
// Function: evout(input_event const&)
void evout(const input_event &e){
   if (e.type == EV_KEY){
       fprintf(stdout,"EV_KEY(%s:%d, %s:%d)\n",
              key_code_name(e.code), e.code,
              key_state_name(e.value), e.value);
   }else if (e.type == EV_MSC){
       fprintf(stdout,"EV_MSC(%s:%d, %d)\n",
              msc_code_name(e.code), e.code,
              e.value);
   }else if (e.type == EV_SYN){
       fprintf(stdout,"EV_SYN~%s:%d\n",
              syn_code_name(e.code),e.value);
   }
   else{
       fprintf(stderr,"%s\n", ev_code_name(e.type));
   }
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq 0x30(%rsp), %rax
movzwl 0x10(%rax), %eax
cmpl $0x1, %eax
jne 0x3540
movq 0x4ae2(%rip), %rax      # 0x7fc0
movq (%rax), %rax
movq %rax, 0x18(%rsp)
movq 0x30(%rsp), %rax
movzwl 0x12(%rax), %edi
callq 0x3360
movq %rax, 0x20(%rsp)
movq 0x30(%rsp), %rax
movzwl 0x12(%rax), %eax
movl %eax, 0x2c(%rsp)
movq 0x30(%rsp), %rax
movl 0x14(%rax), %edi
callq 0x33a0
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rdx
movl 0x2c(%rsp), %ecx
movq %rax, %r8
movq 0x30(%rsp), %rax
movl 0x14(%rax), %r9d
leaq 0x25f8(%rip), %rsi      # 0x5b2c
movb $0x0, %al
callq 0x3160
jmp 0x3615
movq 0x30(%rsp), %rax
movzwl 0x10(%rax), %eax
cmpl $0x4, %eax
jne 0x3595
movq 0x4a6b(%rip), %rax      # 0x7fc0
movq (%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x30(%rsp), %rax
movzwl 0x12(%rax), %edi
callq 0x3400
movq 0x10(%rsp), %rdi
movq %rax, %rdx
movq 0x30(%rsp), %rax
movzwl 0x12(%rax), %ecx
movq 0x30(%rsp), %rax
movl 0x14(%rax), %r8d
leaq 0x25b6(%rip), %rsi      # 0x5b42
movb $0x0, %al
callq 0x3160
jmp 0x3613
movq 0x30(%rsp), %rax
movzwl 0x10(%rax), %eax
cmpl $0x0, %eax
jne 0x35e0
movq 0x4a16(%rip), %rax      # 0x7fc0
movq (%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x30(%rsp), %rax
movzwl 0x12(%rax), %edi
callq 0x3480
movq 0x8(%rsp), %rdi
movq %rax, %rdx
movq 0x30(%rsp), %rax
movl 0x14(%rax), %ecx
leaq 0x257e(%rip), %rsi      # 0x5b55
movb $0x0, %al
callq 0x3160
jmp 0x3611
movq 0x4a11(%rip), %rax      # 0x7ff8
movq (%rax), %rax
movq %rax, (%rsp)
movq 0x30(%rsp), %rax
movzwl 0x10(%rax), %edi
callq 0x3440
movq (%rsp), %rdi
movq %rax, %rdx
leaq 0x2600(%rip), %rsi      # 0x5c0a
movb $0x0, %al
callq 0x3160
jmp 0x3613
jmp 0x3615
addq $0x38, %rsp
retq
nopw (%rax,%rax)
// File: exrok[P]evdoublebind/./src/inspector.cc
// Function: is_keyboard(int)
int is_keyboard(int fd) {
    errno = 0;
    u_int64_t evbitset = 0;
    u_int64_t keybits[4] = {0};
    ioctl(fd, EVIOCGBIT(0, sizeof(evbitset)), &evbitset);
    if (errno) return 0;
    if (!(evbitset & (1ul << EV_KEY))) {
        return 0;
    }

    errno = 0;
    ioctl(fd, EVIOCGBIT(EV_KEY, sizeof(keybits)), keybits);
    if (errno)
        return 0;

    if (keybits[0] | keybits[1] | keybits[2] | keybits[3]) {
        return 1;
    }
    return 0;
}

// Assembly:
subq $0x38, %rsp
movl %edi, 0x30(%rsp)
callq 0x3040
movl $0x0, (%rax)
movq $0x0, 0x28(%rsp)
movq %rsp, %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x30d0
movl 0x30(%rsp), %edi
movl $0x80084520, %esi       # imm = 0x80084520
leaq 0x28(%rsp), %rdx
movb $0x0, %al
callq 0x30f0
callq 0x3040
cmpl $0x0, (%rax)
je 0x3674
movl $0x0, 0x34(%rsp)
jmp 0x36ea
movq 0x28(%rsp), %rax
andq $0x2, %rax
cmpq $0x0, %rax
jne 0x368d
movl $0x0, 0x34(%rsp)
jmp 0x36ea
callq 0x3040
movl $0x0, (%rax)
movl 0x30(%rsp), %edi
movq %rsp, %rdx
movl $0x80204521, %esi       # imm = 0x80204521
movb $0x0, %al
callq 0x30f0
callq 0x3040
cmpl $0x0, (%rax)
je 0x36bf
movl $0x0, 0x34(%rsp)
jmp 0x36ea
movq (%rsp), %rax
orq 0x8(%rsp), %rax
orq 0x10(%rsp), %rax
orq 0x18(%rsp), %rax
cmpq $0x0, %rax
je 0x36e2
movl $0x1, 0x34(%rsp)
jmp 0x36ea
movl $0x0, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: exrok[P]evdoublebind/./src/inspector.cc
// Function: print_mods(xkb_state*)
void print_mods(xkb_state * state) {
    struct {const char *name; const char *label;} mods[] = {
    {XKB_MOD_NAME_LOGO, "SUPER"},
    {XKB_MOD_NAME_ALT, "ALT"},
    {XKB_MOD_NAME_SHIFT, "SHIFT"},
    {XKB_MOD_NAME_CTRL, "CONTROL"},
    };
    int found = 0;
    for (auto & mod: mods) {
        if (xkb_state_mod_name_is_active(state, mod.name,
                                         XKB_STATE_MODS_EFFECTIVE) > 0) {
            if (found == 0) {
                printf("   XKB MODS: ");
            } else {
                printf(" ");
            }
            found++;
            printf("%s", mod.label);
        }
    }
    if (found > 0) {
        printf(";\n");
    }
}

// Assembly:
subq $0x78, %rsp
movq %rdi, 0x70(%rsp)
leaq 0x30(%rsp), %rdi
leaq 0x442b(%rip), %rsi      # 0x7d80
movl $0x40, %edx
callq 0x3190
movl $0x0, 0x2c(%rsp)
leaq 0x30(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %rax
addq $0x40, %rax
movq %rax, 0x10(%rsp)
movq 0x18(%rsp), %rax
cmpq 0x10(%rsp), %rax
je 0x3a1b
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x70(%rsp), %rdi
movq 0x8(%rsp), %rax
movq (%rax), %rsi
movl $0x8, %edx
callq 0x30a0
cmpl $0x0, %eax
jle 0x3a06
cmpl $0x0, 0x2c(%rsp)
jne 0x39d6
leaq 0x21c5(%rip), %rdi      # 0x5b92
movb $0x0, %al
callq 0x3090
jmp 0x39e4
leaq 0x21c1(%rip), %rdi      # 0x5b9e
movb $0x0, %al
callq 0x3090
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rsi
leaq 0x216a(%rip), %rdi      # 0x5b69
movb $0x0, %al
callq 0x3090
jmp 0x3a08
movq 0x18(%rsp), %rax
addq $0x10, %rax
movq %rax, 0x18(%rsp)
jmp 0x3989
cmpl $0x0, 0x2c(%rsp)
jle 0x3a30
leaq 0x219a(%rip), %rdi      # 0x5bc3
movb $0x0, %al
callq 0x3090
addq $0x78, %rsp
retq
nopw %cs:(%rax,%rax)
// File: exrok[P]evdoublebind/./src/inspector.cc
// Function: parse_arguments(Settings&&, int, char**)
Settings parse_arguments(Settings &&setting, int argc, char **argv){
    opterr = 0;
    optind = 0;
    char *cvalue = NULL;
    int c;
    while ((c = getopt (argc, argv, "hr:m:l:v:o:k")) != -1)
        switch(c){
            case 'h':
                print_usage();
                exit(0);
            case 'l':
                setting.xkb_names.layout = optarg;
                continue;
            case 'm':
                setting.xkb_names.model = optarg;
                continue;
            case 'r':
                setting.xkb_names.rules = optarg;
                continue;
            case 'o':
                setting.xkb_names.options = optarg;
                continue;
            case 'v':
                setting.xkb_names.variant = optarg;
                continue;
            case 'k':
                setting.only_print = true;
                continue;
        }
    return setting;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x10(%rsp)
movq %rdi, 0x18(%rsp)
movq %rsi, 0x40(%rsp)
movl %edx, 0x3c(%rsp)
movq %rcx, 0x30(%rsp)
movq 0x409d(%rip), %rax      # 0x7ff0
movl $0x0, (%rax)
movq 0x4068(%rip), %rax      # 0x7fc8
movl $0x0, (%rax)
movq $0x0, 0x28(%rsp)
movl 0x3c(%rsp), %edi
movq 0x30(%rsp), %rsi
leaq 0x1f33(%rip), %rdx      # 0x5eb2
callq 0x3200
movl %eax, 0x24(%rsp)
cmpl $-0x1, %eax
je 0x4050
movl 0x24(%rsp), %eax
addl $-0x68, %eax
movl %eax, %ecx
movq %rcx, 0x8(%rsp)
subl $0xe, %eax
ja 0x404b
movq 0x8(%rsp), %rax
leaq 0x1050(%rip), %rcx      # 0x5004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
callq 0x3f20
xorl %edi, %edi
callq 0x3220
movq 0x4000(%rip), %rax      # 0x7fd0
movq (%rax), %rcx
movq 0x40(%rsp), %rax
movq %rcx, 0x10(%rax)
jmp 0x3f6f
movq 0x3feb(%rip), %rax      # 0x7fd0
movq (%rax), %rcx
movq 0x40(%rsp), %rax
movq %rcx, 0x8(%rax)
jmp 0x3f6f
movq 0x3fd3(%rip), %rax      # 0x7fd0
movq (%rax), %rcx
movq 0x40(%rsp), %rax
movq %rcx, (%rax)
jmp 0x3f6f
movq 0x3fbc(%rip), %rax      # 0x7fd0
movq (%rax), %rcx
movq 0x40(%rsp), %rax
movq %rcx, 0x20(%rax)
jmp 0x3f6f
movq 0x3fa4(%rip), %rax      # 0x7fd0
movq (%rax), %rcx
movq 0x40(%rsp), %rax
movq %rcx, 0x18(%rax)
jmp 0x3f6f
movq 0x40(%rsp), %rax
movb $0x1, 0x28(%rax)
jmp 0x3f6f
jmp 0x3f6f
movq 0x10(%rsp), %rdi
movq 0x40(%rsp), %rsi
movl $0x30, %edx
callq 0x3190
movq 0x18(%rsp), %rax
addq $0x48, %rsp
retq
nop
// File: exrok[P]evdoublebind/./src/inspector.cc
// Function: main
int main(int argc, char *argv[]) {
    Settings settings = parse_arguments(Settings(), argc, argv);
    KeyboardList keyboards;
    find_keyboard_in(keyboards, "/dev/input/by-id/");
    find_keyboard_in(keyboards, "/dev/input/by-path/");
    if(settings.only_print) {
        keyboards.print();
        exit(1);
    }
    printf("Found %d Possible Keyboards.\n---\n", keyboards.len);
    keyboards.print();
    printf("---\n");
    if (poll_keyboard_events(settings, keyboards)) {
        perror("ERROR");
    }
    return 0;
}

// Assembly:
subq $0x278, %rsp            # imm = 0x278
movl $0x0, 0x274(%rsp)
movl %edi, 0x270(%rsp)
movq %rsi, 0x268(%rsp)
leaq 0x208(%rsp), %rdi
xorl %esi, %esi
movl $0x30, %edx
callq 0x30d0
leaq 0x208(%rsp), %rdi
callq 0x4270
movl 0x270(%rsp), %edx
movq 0x268(%rsp), %rcx
leaq 0x238(%rsp), %rdi
leaq 0x208(%rsp), %rsi
callq 0x3f30
movq %rsp, %rdi
callq 0x42b0
movq %rsp, %rdi
leaq 0x1dd7(%rip), %rsi      # 0x5ebf
callq 0x3760
movq %rsp, %rdi
leaq 0x1dda(%rip), %rsi      # 0x5ed1
callq 0x3760
testb $0x1, 0x260(%rsp)
je 0x4118
movq %rsp, %rdi
callq 0x42d0
movl $0x1, %edi
callq 0x3220
movl 0x200(%rsp), %esi
leaq 0x1dbf(%rip), %rdi      # 0x5ee5
movb $0x0, %al
callq 0x3090
movq %rsp, %rdi
callq 0x42d0
leaq 0x1dc6(%rip), %rdi      # 0x5f02
movb $0x0, %al
callq 0x3090
leaq 0x238(%rsp), %rdi
movq %rsp, %rsi
callq 0x3c40
cmpl $0x0, %eax
je 0x4164
leaq 0x1da8(%rip), %rdi      # 0x5f07
callq 0x31f0
xorl %eax, %eax
addq $0x278, %rsp            # imm = 0x278
retq
nop
// File: exrok[P]evdoublebind/./src/inspector.cc
// Function: KeyboardList::contains_event_number(int)
bool contains_event_number(int event_number) {
        for(int i = 0; i < len; i++) {
            if (keyboards[i].event_number == event_number)
                return true;
        }
        return false;
    }

// Assembly:
movq %rdi, -0x10(%rsp)
movl %esi, -0x14(%rsp)
movq -0x10(%rsp), %rax
movq %rax, -0x20(%rsp)
movl $0x0, -0x18(%rsp)
movq -0x20(%rsp), %rcx
movl -0x18(%rsp), %eax
cmpl 0x200(%rcx), %eax
jge 0x41cb
movq -0x20(%rsp), %rax
movslq -0x18(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl (%rax), %eax
cmpl -0x14(%rsp), %eax
jne 0x41bc
movb $0x1, -0x1(%rsp)
jmp 0x41d0
jmp 0x41be
movl -0x18(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rsp)
jmp 0x418b
movb $0x0, -0x1(%rsp)
movb -0x1(%rsp), %al
andb $0x1, %al
retq
nopw (%rax,%rax)
// File: exrok[P]evdoublebind/./src/inspector.cc
// Function: KeyboardList::append(int, int, char*)
void append(int event_number, int fd, char*name) {
        if (len >= 32) return;
        keyboards[len].event_number = event_number;
        keyboards[len].fd = fd;
        keyboards[len].name = name;
        len++;
    }

// Assembly:
movq %rdi, -0x8(%rsp)
movl %esi, -0xc(%rsp)
movl %edx, -0x10(%rsp)
movq %rcx, -0x18(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x20(%rsp)
cmpl $0x20, 0x200(%rax)
jl 0x4207
jmp 0x4264
movq -0x20(%rsp), %rax
movl -0xc(%rsp), %edx
movslq 0x200(%rax), %rsi
shlq $0x4, %rsi
movq %rax, %rcx
addq %rsi, %rcx
movl %edx, (%rcx)
movl -0x10(%rsp), %edx
movslq 0x200(%rax), %rsi
shlq $0x4, %rsi
movq %rax, %rcx
addq %rsi, %rcx
movl %edx, 0x4(%rcx)
movq -0x18(%rsp), %rdx
movslq 0x200(%rax), %rsi
shlq $0x4, %rsi
movq %rax, %rcx
addq %rsi, %rcx
movq %rdx, 0x8(%rcx)
movl 0x200(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x200(%rax)
retq
nopw %cs:(%rax,%rax)
nop
// File: XDragonSl[P]git-switcher/src/main.cpp
// Function: help()
void help() {
    cout << gsw_info::H_COMMON << endl;
    cout << "Options:" << endl;
    cout << gsw_info::H_VERSION << endl;
    cout << gsw_info::H_HELP << endl;
    cout << gsw_info::H_CURRENT << endl;
    cout << gsw_info::H_LIST << endl;
    cout << gsw_info::H_ADD << endl;
    cout << gsw_info::H_UPDATE << endl;
    cout << gsw_info::H_SWAP << endl;
    cout << gsw_info::H_REMOVE << endl;
    cout << endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0xa345(%rip), %rdi      # 0xffc0
leaq 0xa62e(%rip), %rsi      # 0x102b0
callq 0x31f0
movq %rax, %rdi
movq 0xa317(%rip), %rsi      # 0xffa8
callq 0x3240
movq 0xa323(%rip), %rdi      # 0xffc0
leaq 0x5707(%rip), %rsi      # 0xb3ab
callq 0x3220
movq %rax, %rdi
movq 0xa2f5(%rip), %rsi      # 0xffa8
callq 0x3240
movq 0xa301(%rip), %rdi      # 0xffc0
leaq 0xa60a(%rip), %rsi      # 0x102d0
callq 0x31f0
movq %rax, %rdi
movq 0xa2d3(%rip), %rsi      # 0xffa8
callq 0x3240
movq 0xa2df(%rip), %rdi      # 0xffc0
leaq 0xa608(%rip), %rsi      # 0x102f0
callq 0x31f0
movq %rax, %rdi
movq 0xa2b1(%rip), %rsi      # 0xffa8
callq 0x3240
movq 0xa2bd(%rip), %rdi      # 0xffc0
leaq 0xa606(%rip), %rsi      # 0x10310
callq 0x31f0
movq %rax, %rdi
movq 0xa28f(%rip), %rsi      # 0xffa8
callq 0x3240
movq 0xa29b(%rip), %rdi      # 0xffc0
leaq 0xa604(%rip), %rsi      # 0x10330
callq 0x31f0
movq %rax, %rdi
movq 0xa26d(%rip), %rsi      # 0xffa8
callq 0x3240
movq 0xa279(%rip), %rdi      # 0xffc0
leaq 0xa602(%rip), %rsi      # 0x10350
callq 0x31f0
movq %rax, %rdi
movq 0xa24b(%rip), %rsi      # 0xffa8
callq 0x3240
movq 0xa257(%rip), %rdi      # 0xffc0
leaq 0xa600(%rip), %rsi      # 0x10370
callq 0x31f0
movq %rax, %rdi
movq 0xa229(%rip), %rsi      # 0xffa8
callq 0x3240
movq 0xa235(%rip), %rdi      # 0xffc0
leaq 0xa5fe(%rip), %rsi      # 0x10390
callq 0x31f0
movq %rax, %rdi
movq 0xa207(%rip), %rsi      # 0xffa8
callq 0x3240
movq 0xa213(%rip), %rdi      # 0xffc0
leaq 0xa5fc(%rip), %rsi      # 0x103b0
callq 0x31f0
movq %rax, %rdi
movq 0xa1e5(%rip), %rsi      # 0xffa8
callq 0x3240
movq 0xa1f1(%rip), %rdi      # 0xffc0
movq 0xa1d2(%rip), %rsi      # 0xffa8
callq 0x3240
popq %rbp
retq
nopl (%rax)
// File: XDragonSl[P]git-switcher/src/main.cpp
// Function: add(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void add(const string& name, const string& email) {
    if (name.empty() || email.empty()) {
        cout << EMPTY_NAME_EMAIL_MESSAGE << endl;
        cout << RUN_HELP_MESSAGE;
        return;
    }
    Profile profile(name, email);
    Store store;
    store.append(profile);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x290, %rsp            # imm = 0x290
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3360
testb $0x1, %al
jne 0x5e4f
movq -0x10(%rbp), %rdi
callq 0x3360
testb $0x1, %al
jne 0x5e4f
jmp 0x5e86
movq 0xa16a(%rip), %rdi      # 0xffc0
leaq 0xa633(%rip), %rsi      # 0x10490
callq 0x31f0
movq %rax, %rdi
movq 0xa13c(%rip), %rsi      # 0xffa8
callq 0x3240
movq 0xa148(%rip), %rdi      # 0xffc0
leaq 0xa551(%rip), %rsi      # 0x103d0
callq 0x31f0
jmp 0x5ecc
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rdx
leaq -0x50(%rbp), %rdi
callq 0x8b50
leaq -0x280(%rbp), %rdi
callq 0x8d90
jmp 0x5ea5
leaq -0x280(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x9050
jmp 0x5eb7
leaq -0x280(%rbp), %rdi
callq 0x9220
leaq -0x50(%rbp), %rdi
callq 0x6b30
addq $0x290, %rsp            # imm = 0x290
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x288(%rbp)
movl %eax, -0x28c(%rbp)
jmp 0x5f07
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x288(%rbp)
movl %eax, -0x28c(%rbp)
leaq -0x280(%rbp), %rdi
callq 0x9220
leaq -0x50(%rbp), %rdi
callq 0x6b30
movq -0x288(%rbp), %rdi
callq 0x33d0
nopl (%rax)
// File: XDragonSl[P]git-switcher/src/main.cpp
// Function: update(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void update(int number, const string& name, const string& email) {
    if (name.empty() || email.empty()) {
        cout << EMPTY_NAME_EMAIL_MESSAGE << endl;
        cout << RUN_HELP_MESSAGE;
        return;
    }
    Store store;
    if (number <= 0 || number > store.size()) {
        cout << NONEXISTENT_INDEX_MESSAGE << endl;
        cout << RUN_HELP_MESSAGE;
        return;
    }
    Profile profile(name, email);
    store.update(number - 1, profile);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2b0, %rsp            # imm = 0x2B0
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3360
testb $0x1, %al
jne 0x5f52
movq -0x18(%rbp), %rdi
callq 0x3360
testb $0x1, %al
jne 0x5f52
jmp 0x5f8c
movq 0xa067(%rip), %rdi      # 0xffc0
leaq 0xa530(%rip), %rsi      # 0x10490
callq 0x31f0
movq %rax, %rdi
movq 0xa039(%rip), %rsi      # 0xffa8
callq 0x3240
movq 0xa045(%rip), %rdi      # 0xffc0
leaq 0xa44e(%rip), %rsi      # 0x103d0
callq 0x31f0
jmp 0x6083
leaq -0x248(%rbp), %rdi
callq 0x8d90
cmpl $0x0, -0x4(%rbp)
jle 0x5fcb
movl -0x4(%rbp), %eax
movl %eax, -0x2a0(%rbp)
leaq -0x248(%rbp), %rdi
callq 0x91f0
movl %eax, -0x29c(%rbp)
jmp 0x5fbb
movl -0x2a0(%rbp), %eax
movl -0x29c(%rbp), %ecx
cmpl %ecx, %eax
jle 0x6031
movq 0x9fee(%rip), %rdi      # 0xffc0
leaq 0xa497(%rip), %rsi      # 0x10470
callq 0x31f0
movq %rax, -0x2a8(%rbp)
jmp 0x5fe7
movq -0x2a8(%rbp), %rdi
movq 0x9fb3(%rip), %rsi      # 0xffa8
callq 0x3240
jmp 0x5ffc
movq 0x9fbd(%rip), %rdi      # 0xffc0
leaq 0xa3c6(%rip), %rsi      # 0x103d0
callq 0x31f0
jmp 0x6011
movl $0x1, -0x258(%rbp)
jmp 0x6077
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x250(%rbp)
movl %eax, -0x254(%rbp)
jmp 0x60aa
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq -0x298(%rbp), %rdi
callq 0x8b50
jmp 0x6047
movl -0x4(%rbp), %esi
decl %esi
leaq -0x248(%rbp), %rdi
leaq -0x298(%rbp), %rdx
callq 0x90e0
jmp 0x6061
leaq -0x298(%rbp), %rdi
callq 0x6b30
movl $0x0, -0x258(%rbp)
leaq -0x248(%rbp), %rdi
callq 0x9220
addq $0x2b0, %rsp            # imm = 0x2B0
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x250(%rbp)
movl %eax, -0x254(%rbp)
leaq -0x298(%rbp), %rdi
callq 0x6b30
leaq -0x248(%rbp), %rdi
callq 0x9220
movq -0x250(%rbp), %rdi
callq 0x33d0
nopw %cs:(%rax,%rax)
// File: XDragonSl[P]git-switcher/src/main.cpp
// Function: remove(int)
void remove(int number) {
    Store store;
    if (number <= 0 || number > store.size()) {
        cout << NONEXISTENT_INDEX_MESSAGE << endl;
        cout << RUN_HELP_MESSAGE;
        return;
    }
    store.remove(number - 1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x260, %rsp            # imm = 0x260
movl %edi, -0x4(%rbp)
leaq -0x238(%rbp), %rdi
callq 0x8d90
cmpl $0x0, -0x4(%rbp)
jle 0x647d
movl -0x4(%rbp), %eax
movl %eax, -0x250(%rbp)
leaq -0x238(%rbp), %rdi
callq 0x91f0
movl %eax, -0x24c(%rbp)
jmp 0x646d
movl -0x250(%rbp), %eax
movl -0x24c(%rbp), %ecx
cmpl %ecx, %eax
jle 0x64ef
movq 0x9b3c(%rip), %rdi      # 0xffc0
leaq 0x9fe5(%rip), %rsi      # 0x10470
callq 0x31f0
movq %rax, -0x258(%rbp)
jmp 0x6499
movq -0x258(%rbp), %rdi
movq 0x9b01(%rip), %rsi      # 0xffa8
callq 0x3240
jmp 0x64ae
movq 0x9b0b(%rip), %rdi      # 0xffc0
leaq 0x9f14(%rip), %rsi      # 0x103d0
callq 0x31f0
jmp 0x64c3
movl $0x1, -0x248(%rbp)
jmp 0x650c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x240(%rbp)
movl %eax, -0x244(%rbp)
leaq -0x238(%rbp), %rdi
callq 0x9220
jmp 0x6521
movl -0x4(%rbp), %esi
decl %esi
leaq -0x238(%rbp), %rdi
callq 0x9170
jmp 0x6502
movl $0x0, -0x248(%rbp)
leaq -0x238(%rbp), %rdi
callq 0x9220
addq $0x260, %rsp            # imm = 0x260
popq %rbp
retq
movq -0x240(%rbp), %rdi
callq 0x33d0
nopl (%rax)