LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/ddunbar[P]PDSample/ScallopedSector.cpp
// Function: ScallopedSector::distToCurve(float, int)
float ScallopedSector::distToCurve(float angle, int index)
{
	float alpha = angle - arcs[index].theta;
	float sin_alpha = sin(alpha);
	float t0 = arcs[index].rSqrd - arcs[index].dSqrd*sin_alpha*sin_alpha;
	if (t0<0) {
		return arcs[index].d*cos(alpha);
	} else {
		return arcs[index].d*cos(alpha) + arcs[index].sign*sqrt(t0);
	}
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movslq %esi, %rax
imulq $0x24, %rax, %r14
subss 0x28(%rdi,%r14), %xmm0
movss %xmm0, 0x10(%rsp)
callq 0x2160
movss 0x24(%rbx,%r14), %xmm1
movss %xmm1, 0x14(%rsp)
movss 0x30(%rbx,%r14), %xmm2
movss 0x34(%rbx,%r14), %xmm1
mulss %xmm0, %xmm1
mulss %xmm0, %xmm1
subss %xmm1, %xmm2
movss %xmm2, 0xc(%rsp)
movss 0x10(%rsp), %xmm0
callq 0x2110
movss 0xc(%rsp), %xmm1
movaps %xmm0, %xmm2
xorps %xmm0, %xmm0
ucomiss %xmm1, %xmm0
jbe 0x705a
movss 0x14(%rsp), %xmm0
mulss %xmm2, %xmm0
jmp 0x70a7
leaq (%rbx,%r14), %rax
addq $0x14, %rax
movss 0xc(%rax), %xmm3
ucomiss %xmm0, %xmm1
jb 0x7072
sqrtss %xmm1, %xmm0
jmp 0x7092
movaps %xmm1, %xmm0
movss %xmm2, 0x10(%rsp)
movss %xmm3, 0xc(%rsp)
callq 0x2310
movss 0xc(%rsp), %xmm3
movss 0x10(%rsp), %xmm2
movss 0x14(%rsp), %xmm1
mulss %xmm0, %xmm3
mulss %xmm2, %xmm1
addss %xmm3, %xmm1
movaps %xmm1, %xmm0
addq $0x18, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/ddunbar[P]PDSample/ScallopedSector.cpp
// Function: ScallopedSector::sample(RNG&)
Vec2 ScallopedSector::sample(RNG &rng)
{
	float angle = calcAngleForArea(area*rng.getFloatL(), rng);
	float d1 = distToCurve(angle, 0);
	float d2 = distToCurve(angle, 1);
	float d = sqrt(d1*d1 + (d2*d2 - d1*d1)*rng.getFloat());
	
	return Vec2(P.x + cos(angle)*d, P.y + sin(angle)*d);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x58, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movss 0x10(%rdi), %xmm0
movss %xmm0, 0xc(%rsp)
movq %rsi, %rdi
callq 0x274a
mulss 0xc(%rsp), %xmm0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6f30
movss %xmm0, 0xc(%rsp)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x6fe2
movss %xmm0, 0x10(%rsp)
pushq $0x1
popq %rsi
movq %rbx, %rdi
movss 0xc(%rsp), %xmm0
callq 0x6fe2
mulss %xmm0, %xmm0
movss 0x10(%rsp), %xmm1
mulss %xmm1, %xmm1
movss %xmm1, 0x10(%rsp)
subss %xmm1, %xmm0
movss %xmm0, 0x20(%rsp)
movq %r14, %rdi
callq 0x277c
mulss 0x20(%rsp), %xmm0
addss 0x10(%rsp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jb 0x7148
sqrtss %xmm0, %xmm0
jmp 0x714d
callq 0x2310
movaps %xmm0, 0x10(%rsp)
movups (%rbx), %xmm0
movaps %xmm0, 0x20(%rsp)
movss 0xc(%rsp), %xmm0
callq 0x2110
movaps %xmm0, 0x30(%rsp)
movss 0x4(%rbx), %xmm0
movaps %xmm0, 0x40(%rsp)
movss 0xc(%rsp), %xmm0
callq 0x2160
movaps 0x30(%rsp), %xmm1
unpcklps %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movaps 0x10(%rsp), %xmm2
shufps $0x0, %xmm2, %xmm2      # xmm2 = xmm2[0,0,0,0]
mulps %xmm1, %xmm2
movaps 0x20(%rsp), %xmm1
movaps 0x40(%rsp), %xmm0
movlhps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0]
shufps $0xe2, %xmm1, %xmm0     # xmm0 = xmm0[2,0],xmm1[2,3]
addps %xmm2, %xmm0
addq $0x58, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/ddunbar[P]PDSample/ScallopedSector.cpp
// Function: ScallopedSector::distToCircle(float, Vec2&, float, float*, float*)
void ScallopedSector::distToCircle(float angle, Vec2 &C, float r, float *d1_out, float *d2_out)
{
	Vec2 v(C.x - P.x, C.y - P.y);
	float dSqrd = v.x*v.x + v.y*v.y;
	float theta = atan2(v.y, v.x);
	float alpha = angle - theta;
	float sin_alpha = sin(alpha);
	float xSqrd = r*r - dSqrd*sin_alpha*sin_alpha;

	if (xSqrd<0) {
		*d1_out = *d2_out = -10000000;
	} else {
		float a = sqrt(dSqrd)*cos(alpha);
		float x = sqrt(xSqrd);
		*d1_out = a-x;
		*d2_out = a+x;
	}
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movss %xmm1, 0xc(%rsp)
movss %xmm0, 0x14(%rsp)
movss (%rsi), %xmm1
subss (%rdi), %xmm1
movss 0x4(%rsi), %xmm0
subss 0x4(%rdi), %xmm0
movaps %xmm0, %xmm2
mulss %xmm0, %xmm2
movaps %xmm1, %xmm3
mulss %xmm1, %xmm3
addss %xmm2, %xmm3
movss %xmm3, 0x10(%rsp)
callq 0x2220
movss 0x14(%rsp), %xmm1
subss %xmm0, %xmm1
movss %xmm1, 0x14(%rsp)
movaps %xmm1, %xmm0
callq 0x2160
movss 0x10(%rsp), %xmm2
movaps %xmm0, %xmm1
mulss %xmm2, %xmm1
mulss %xmm0, %xmm1
movss 0xc(%rsp), %xmm0
mulss %xmm0, %xmm0
subss %xmm1, %xmm0
xorps %xmm1, %xmm1
movss %xmm0, 0xc(%rsp)
ucomiss %xmm0, %xmm1
jbe 0x7289
movl $0xcb189680, %eax       # imm = 0xCB189680
movl %eax, (%rbx)
movl %eax, (%r14)
jmp 0x72e9
sqrtss %xmm2, %xmm0
movss %xmm0, 0x10(%rsp)
movss 0x14(%rsp), %xmm0
callq 0x2110
movaps %xmm0, %xmm2
mulss 0x10(%rsp), %xmm2
movss 0xc(%rsp), %xmm0
ucomiss 0x42c0(%rip), %xmm0     # 0xb574
jb 0x72be
sqrtss 0xc(%rsp), %xmm0
jmp 0x72d5
movss 0xc(%rsp), %xmm0
movss %xmm2, 0xc(%rsp)
callq 0x2310
movss 0xc(%rsp), %xmm2
movaps %xmm2, %xmm1
subss %xmm0, %xmm1
movss %xmm1, (%r14)
addss %xmm0, %xmm2
movss %xmm2, (%rbx)
addq $0x18, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/ddunbar[P]PDSample/ScallopedSector.cpp
// Function: ScallopedRegion::sample(RNG&)
Vec2 ScallopedRegion::sample(RNG &rng)
{
	if (!regions->size()) {
		printf("Fatal error, sampled from empty region.");
		exit(1);
		return Vec2(0,0); 
	} else {
		float a = area*rng.getFloatL();
		ScallopedSector &ss = (*regions)[0];

		for (unsigned int i=0; i<regions->size(); i++) {
			ss = (*regions)[i];
			if (a<ss.area)
				break;
			a -= ss.area;
		}

		return ss.sample(rng);
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq (%rdi), %rax
movq 0x8(%rax), %rcx
cmpq (%rax), %rcx
je 0x7c0e
movq %rsi, %rbx
movq %rdi, %r14
movss 0xc(%rdi), %xmm0
movss %xmm0, 0x4(%rsp)
movq %rsi, %rdi
callq 0x274a
mulss 0x4(%rsp), %xmm0
movq (%r14), %rax
movq (%rax), %r8
xorl %r10d, %r10d
pushq $0x5c
popq %r11
pushq $0x17
popq %r9
movq %r8, %rsi
movl %r10d, %r10d
movq 0x8(%rax), %rax
subq %rsi, %rax
cqto
idivq %r11
cmpq %r10, %rax
jbe 0x7bfc
imulq $0x5c, %r10, %rax
addq %rax, %rsi
movq %r9, %rcx
movq %r8, %rdi
rep  movsl (%rsi), %es:(%rdi)
movss 0x10(%r8), %xmm1
ucomiss %xmm0, %xmm1
ja 0x7bfc
subss %xmm1, %xmm0
incl %r10d
movq (%r14), %rax
movq (%rax), %rsi
jmp 0x7bbf
movq %r8, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x70b0
leaq 0x398b(%rip), %rdi      # 0xb5a0
xorl %eax, %eax
callq 0x2040
pushq $0x1
popq %rdi
callq 0x21f0
// File: /workspace/github_cpp_makefile_star2_O2/pokorj54[P]Pathfinder-utilities/src/Helpers/fraction.cpp
// Function: Fraction::Normalize()
Fraction Fraction::Normalize()
{
    int d = gcd(numerator, denominator);
    numerator /= d;
    denominator /= d;
    if(denominator < 0)
    {
        numerator *= -1;
        denominator *= -1;
    }
    return *this;
}

// Assembly:
movl (%rdi), %r8d
movl 0x4(%rdi), %ecx
movl %r8d, %esi
movl %ecx, %r9d
testl %r9d, %r9d
je 0x23a5
movl %esi, %eax
cltd
idivl %r9d
movl %r9d, %esi
movl %edx, %r9d
jmp 0x2392
movl %r8d, %eax
cltd
idivl %esi
movl %eax, %r8d
movl %eax, (%rdi)
movl %ecx, %eax
cltd
idivl %esi
movl %eax, 0x4(%rdi)
testl %eax, %eax
jns 0x23c7
negl %r8d
movl %r8d, (%rdi)
negl %eax
movl %eax, 0x4(%rdi)
movq (%rdi), %rax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/pokorj54[P]Pathfinder-utilities/src/sacredGeometry.cpp
// Function: GetHigherBound(int*, int)
int GetHigherBound(int * values, int size)
{
    int res = 1;
    int ones = 0;
    int twos = 0;
    for(int i = 0; i < size; ++i)
    {
        if(values[i] == 1)
        {
            ++ones;
        }
        else if(values[i] == 2)
        {
            ++twos;
        }
        else
        {
            res *= values[i];
        }
        if(res > PRIMECONSTANTS[(sizeof(PRIMECONSTANTS)/sizeof(*PRIMECONSTANTS))-1][0])
        {
            return res;
        }
    }
    if(ones > twos)
    {
        res *= pow(3, twos+(ones-twos)/3)*2;
    }
    else
    {
        res *= pow(3, ones);
        res *= pow(2, twos-ones);
    }
    return res;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
xorl %eax, %eax
testl %esi, %esi
cmovlel %eax, %esi
pushq $0x1
popq %rbx
xorl %r14d, %r14d
xorl %ebp, %ebp
cmpq %rax, %rsi
je 0x27a3
movl (%rdi,%rax,4), %ecx
cmpl $0x2, %ecx
je 0x2792
cmpl $0x1, %ecx
jne 0x2796
incl %r14d
jmp 0x279e
incl %ebp
jmp 0x279e
imull %ecx, %ebx
cmpl $0x65, %ebx
jg 0x2805
incq %rax
jmp 0x277b
movl %r14d, %eax
subl %ebp, %eax
jle 0x27c9
pushq $0x3
popq %rcx
cltd
idivl %ecx
addl %ebp, %eax
cvtsi2sd %eax, %xmm1
movsd 0x1922(%rip), %xmm0     # 0x40e0
callq 0x2200
addsd %xmm0, %xmm0
jmp 0x27f9
cvtsi2sd %r14d, %xmm1
movsd 0x190a(%rip), %xmm0     # 0x40e0
callq 0x2200
cvtsi2sd %ebx, %xmm1
mulsd %xmm0, %xmm1
cvttsd2si %xmm1, %ebx
subl %r14d, %ebp
movsd 0x18f6(%rip), %xmm0     # 0x40e8
movl %ebp, %edi
callq 0x2190
cvtsi2sd %ebx, %xmm1
mulsd %xmm0, %xmm1
cvttsd2si %xmm1, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/pokorj54[P]Pathfinder-utilities/src/sacredGeometry.cpp
// Function: GetDesiredExpression[abi:cxx11](int, int*, int)
string GetDesiredExpression(int spellLevel, int rolledDices[], int size)
{
    if(GetHigherBound(rolledDices, size) < PRIMECONSTANTS[spellLevel-1][0])
    {
         return "";
    }
    ExprAndValue * exprs = new ExprAndValue[size];
    for(int i = 0; i < size; ++i)
    {
        exprs[i] = ExprAndValue(Fraction(rolledDices[i]), i);
    }
    return CombineExpressions(spellLevel, exprs, size, size);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl %ecx, %ebp
movq %rdx, %r15
movl %esi, %r14d
movq %rdi, %rbx
movq %rdx, %rdi
movl %ecx, %esi
callq 0x2768
leal -0x1(%r14), %ecx
movslq %ecx, %rcx
imulq $0xc, %rcx, %rcx
leaq 0x1113(%rip), %rdx      # 0x40f0
cmpl (%rcx,%rdx), %eax
jge 0x2ffb
leaq 0x1252(%rip), %rsi      # 0x423b
leaq 0x28(%rsp), %rdx
movq %rbx, %rdi
callq 0x2070
jmp 0x30d0
movq %r14, 0x10(%rsp)
movq %rbx, 0x18(%rsp)
movslq %ebp, %r14
movq %r14, %rbx
shlq $0x6, %rbx
leaq 0x8(%rbx), %rax
testl %ebp, %ebp
pushq $-0x1
popq %rdi
cmovnsq %rax, %rdi
callq 0x2030
movq %rax, %r13
movq %r14, (%rax)
testl %ebp, %ebp
je 0x3045
leaq 0x20(%r13), %rcx
movq %rcx, -0x10(%rcx)
andq $0x0, -0x8(%rcx)
movb $0x0, (%rcx)
addq $0x40, %rcx
addq $-0x40, %rbx
jne 0x302f
addq $0x8, %r13
xorl %r14d, %r14d
testl %ebp, %ebp
movl $0x0, %ebx
movl %ebp, 0x4(%rsp)
cmovgl %ebp, %ebx
pushq $0x1
popq %r12
leaq 0x28(%rsp), %rbp
movq %r13, 0x8(%rsp)
cmpq %r14, %rbx
je 0x30b2
movl (%r15,%r14,4), %esi
leaq 0x20(%rsp), %rdi
movl %r12d, %edx
callq 0x237c
movq 0x20(%rsp), %rsi
movq %rbp, %rdi
movl %r14d, %edx
movl %r12d, %ecx
movl %r12d, %r8d
callq 0x32c4
movq %r13, %rdi
movq %rbp, %rsi
callq 0x3282
leaq 0x30(%rsp), %rdi
callq 0x2090
incq %r14
addq $0x40, %r13
jmp 0x3068
movq 0x18(%rsp), %rbx
movq %rbx, %rdi
movq 0x10(%rsp), %rsi
movq 0x8(%rsp), %rdx
movl 0x4(%rsp), %ecx
movl %ecx, %r8d
callq 0x280c
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/pokorj54[P]Pathfinder-utilities/src/SGsearch.cpp
// Function: SGCategory::Print() const
void SGCategory::Print() const
{
    int64_t possibleVariations = pow(maxDiceValue, noDices);
    int64_t possibleLimitedVariations = pow(limitedDiceValue, noDices);
    cout << setprecision(5)  << "NoD: " << noDices << ", SL: " << spellLevel<< " = PC: "
        << possibleVariations << ", SC: " << successfulVariations << ", PLC: " << possibleLimitedVariations 
        << ", SLC: " << successfulLimitedVariations << " -> Rate: "
        << (double)successfulVariations/possibleVariations << "(" << (double)successfulLimitedVariations/possibleLimitedVariations 
        << ")" << endl;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
cvtsi2sdl (%rdi), %xmm0
mulsd 0xba8(%rip), %xmm0      # 0x40e0
callq 0x20e0
cvttsd2si %xmm0, %r15
cvtsi2sdl (%rbx), %xmm1
movsd 0xc1a(%rip), %xmm0      # 0x4168
callq 0x2200
cvttsd2si %xmm0, %r14
movq 0x3a79(%rip), %rdi      # 0x6fd8
movq (%rdi), %rax
movq -0x18(%rax), %rax
movq $0x5, 0x8(%rdi,%rax)
leaq 0xca2(%rip), %rsi       # 0x4218
callq 0x2120
movl (%rbx), %esi
movq %rax, %rdi
callq 0x21f0
leaq 0xc92(%rip), %rsi       # 0x421e
movq %rax, %rdi
callq 0x2120
movl 0x4(%rbx), %esi
movq %rax, %rdi
callq 0x21f0
leaq 0xc7f(%rip), %rsi       # 0x4225
movq %rax, %rdi
callq 0x2120
movq %rax, %rdi
movq %r15, %rsi
callq 0x2110
leaq 0xc6d(%rip), %rsi       # 0x422d
movq %rax, %rdi
callq 0x2120
movq 0x10(%rbx), %rsi
movq %rax, %rdi
callq 0x2110
leaq 0xc59(%rip), %rsi       # 0x4234
movq %rax, %rdi
callq 0x2120
movq %rax, %rdi
movq %r14, %rsi
callq 0x2110
leaq 0xc47(%rip), %rsi       # 0x423c
movq %rax, %rdi
callq 0x2120
movq 0x18(%rbx), %rsi
movq %rax, %rdi
callq 0x2110
leaq 0xc34(%rip), %rsi       # 0x4244
movq %rax, %rdi
callq 0x2120
cvtsi2sdq 0x10(%rbx), %xmm0
cvtsi2sd %r15, %xmm1
divsd %xmm1, %xmm0
movq %rax, %rdi
callq 0x21d0
leaq 0xb2c(%rip), %rsi       # 0x4162
movq %rax, %rdi
callq 0x2120
cvtsi2sdq 0x18(%rbx), %xmm0
cvtsi2sd %r14, %xmm1
divsd %xmm1, %xmm0
movq %rax, %rdi
callq 0x21d0
leaq 0xb08(%rip), %rsi       # 0x4164
movq %rax, %rdi
callq 0x2120
movq %rax, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x20b0
nop
// File: /workspace/github_cpp_makefile_star2_O2/akw0088[P]openssl/aes_enc.cpp
// Function: main
int main(int argc, char *argv[])
{
	if (argc < 3)
	{
		printf("Usage:\taes_enc 256bit_key 128bit_iv plaintext\r\n");
		printf("Example:\taes_enc 01234567890123456789012345678901 0123456789012345 HelloWorld!\r\n");
		return -1;
	}

	/* A 256 bit key */
	unsigned char *key = (unsigned char *)argv[1];

	/* A 128 bit IV */
	unsigned char *iv = (unsigned char *)argv[2];

	/* Message to be encrypted */
	unsigned char *plaintext = (unsigned char *)argv[3];

	/*
	 * Buffer for ciphertext. Ensure the buffer is long enough for the
	 * ciphertext which may be longer than the plaintext, depending on the
	 * algorithm and mode.
	 */
	unsigned char *ciphertext = (unsigned char *)malloc(strlen((char *)plaintext) * 2);
	if (ciphertext == NULL)
	{
		perror("malloc failed");
		return -1;
	}


	int ciphertext_len;

	/* Encrypt the plaintext */
	ciphertext_len = encrypt (plaintext, strlen ((char *)plaintext), key, iv, ciphertext);

	/* Do something useful with the ciphertext here */
	printf("Ciphertext is:\n");
	BIO_dump_fp (stdout, (const char *)ciphertext, ciphertext_len);

	write_file((char *)"file.enc", (char *)ciphertext, ciphertext_len);
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpl $0x2, %edi
jg 0x1403
leaq 0xc7f(%rip), %rdi       # 0x206c
callq 0x1180
leaq 0xca2(%rip), %rdi       # 0x209b
callq 0x1180
pushq $-0x1
popq %rax
jmp 0x1477
movq 0x8(%rsi), %r14
movq 0x10(%rsi), %r15
movq 0x18(%rsi), %r12
movq %r12, %rdi
callq 0x1080
movq %rax, %r13
leaq (%rax,%rax), %rdi
callq 0x1160
testq %rax, %rax
je 0x1486
movq %rax, %rbx
movq %r12, %rdi
movl %r13d, %esi
movq %r14, %rdx
movq %r15, %rcx
movq %rax, %r8
callq 0x1497
movl %eax, %r14d
leaq 0xc14(%rip), %rdi       # 0x205d
callq 0x1180
movq 0x2b73(%rip), %rax      # 0x3fc8
movq (%rax), %rdi
movq %rbx, %rsi
movl %r14d, %edx
callq 0x10c0
leaq 0xbce(%rip), %rdi       # 0x2038
movq %rbx, %rsi
movl %r14d, %edx
callq 0x135a
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xb9d(%rip), %rdi       # 0x202a
callq 0x1100
jmp 0x13fe
// File: /workspace/github_cpp_makefile_star2_O2/jaldhar[P]Lets-Build-a-Simple-Interpreter/calc1.cc
// Function: Interpreter::expression()
long Interpreter::expression() {

    // set current token to the first token taken from the input
    _current_token = get_next_token();

    // we expect the current token to be an integer
    Token left = _current_token;
    eat(TOKENTYPE::INTEGER);

    // we expect the current token to be a '+' or '-' token
    Token op = _current_token;
    if (op.type == TOKENTYPE::PLUS) {
        eat(TOKENTYPE::PLUS);
        return plus(left.value);
    }

    if (op.type == TOKENTYPE::MINUS) {
        eat(TOKENTYPE::MINUS);
        return minus(left.value);
    }

    return 0L; // An exception should have been thrown before we ever get here.
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x13de
movq %rdx, %r14
movl %eax, 0x10(%rbx)
movq %rdx, 0x18(%rbx)
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x15e6
movl 0x10(%rbx), %eax
cmpl $0x3, %eax
je 0x13b7
cmpl $0x2, %eax
jne 0x13d4
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x15e6
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x16a0
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x15e6
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x16b6
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/ctSkennerton[P]fxtract/util/ordhuff_x.c
// Function: main
int
main (int argc, char **argv)
{
    unsigned        freq[MAXTEST], code[MAXTEST], bits[MAXTEST];
    char            zcode[33];
    int             i, ncodes;

    if (argc != 2)
        return fputs ("Usage: ordhuff_x (freqfile | -)\n", stderr);

    FILE           *finp =
        strcmp (argv[1], "-") ? fopen (argv[1], "r") : stdin;

    if (!finp)
        return 1;

    for (ncodes = 0; 
         ncodes < MAXTEST && fscanf (finp, "%ud", &freq[ncodes]) == 1; 
        ++ncodes);

    ordhuff(ncodes, freq, code, bits);

    unsigned        raw = 0, pkd = 0;

    for (i = 0; i < ncodes; ++i) {
        prbits(zcode, (int) code[i], (int) bits[i]);
        printf ("%4d %8d %s\n", i, freq[i], zcode);
        raw += freq[i];
        pkd += freq[i] * strlen (zcode);
    }

    fprintf (stderr, "Exprevbits: %4.2f\n", (float) pkd / raw);
    return 0;
}

// Assembly:
cmpl $0x2, %edi
jne 0x1306
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2f18, %rsp           # imm = 0x2F18
movq 0x8(%rsi), %rdi
cmpb $0x2d, (%rdi)
jne 0x12d1
cmpb $0x0, 0x1(%rdi)
je 0x12fa
leaq 0x2185(%rip), %rsi      # 0x345d
callq 0x10e0
movq %rax, %r14
testq %r14, %r14
jne 0x131c
pushq $0x1
popq %rax
addq $0x2f18, %rsp           # imm = 0x2F18
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x3cd7(%rip), %rax      # 0x4fd8
movq (%rax), %r14
jmp 0x12e0
movq 0x3cd3(%rip), %rax      # 0x4fe0
movq (%rax), %rsi
leaq 0x1ced(%rip), %rdi      # 0x3004
jmp 0x10d0
leaq 0x30(%rsp), %r15
leaq 0x1cfd(%rip), %r12      # 0x3025
xorl %ebx, %ebx
cmpq $0x3e8, %rbx            # imm = 0x3E8
je 0x1351
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0x1190
cmpl $0x1, %eax
jne 0x1356
incq %rbx
addq $0x4, %r15
jmp 0x132a
movl $0x3e8, %ebx            # imm = 0x3E8
leaq 0x30(%rsp), %rsi
leaq 0x1f70(%rsp), %rdx
leaq 0xfd0(%rsp), %rcx
movl %ebx, %edi
callq 0x1420
movl %ebx, %r12d
movq %rsp, %r14
xorl %r15d, %r15d
xorl %ebp, %ebp
xorl %r13d, %r13d
cmpq %r12, %r15
je 0x13e9
movl 0x1f70(%rsp,%r15,4), %eax
movl 0xfd0(%rsp,%r15,4), %ecx
movslq %ecx, %rdx
movb $0x0, (%rsp,%rdx)
testl %ecx, %ecx
jle 0x13b3
movl %eax, %edx
andb $0x1, %dl
orb $0x30, %dl
movb %dl, -0x1(%rsp,%rcx)
decq %rcx
sarl %eax
jmp 0x139c
movl 0x30(%rsp,%r15,4), %edx
leaq 0x1c6a(%rip), %rdi      # 0x3029
movl %r15d, %esi
movq %r14, %rcx
xorl %eax, %eax
callq 0x1030
movl 0x30(%rsp,%r15,4), %ebx
addl %ebx, %ebp
movq %r14, %rdi
callq 0x1060
imull %ebx, %eax
addl %r13d, %eax
incq %r15
movl %eax, %r13d
jmp 0x1380
movl %r13d, %eax
cvtsi2ss %rax, %xmm0
movl %ebp, %eax
cvtsi2ss %rax, %xmm1
movq 0x3be1(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
divss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x1c24(%rip), %rsi      # 0x3035
movb $0x1, %al
callq 0x1170
xorl %eax, %eax
jmp 0x12e8
nop
// File: /workspace/github_cpp_makefile_star2_O2/maramire[P]SP_PSO/parallel_main.cpp
// Function: openInstance(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::vector<Item, std::allocator<Item>>&, int&, int&, int&)
void openInstance(string filepath, Item_vector &items, int &strip_width, int &max_height, int &n_items)
{ 

    ifstream file(filepath);
    Item item;
    
    if (!file.is_open())
    {
        exit(EXIT_FAILURE);
    }

    /* Saving first two lines */
    int col1, col2;


    file >> col1 >> col2;
    strip_width = col1;


    file >> col1;
    n_items = col1;
    
    
    
    
    /* Reading Line */
    while(file >> col1 >> col2)
    {
        item.width = col1;
        max_height+= col2; // Updating max height for setting upper bound.
        item.height = col2;
        item.area = col2 * col1;
        item.rotated = 0;
        items.push_back(item);
    }

    /* Sort by area */
    sort(items.begin(), items.end(), compareByArea);

    /* Set new ID's according to area */ 
    for (int i = 0; i <= items.size(); i++)
    {
        items[i].id = i+1;
    }    
    
    /* Finish */     
    file.close();    
    cout << "Instance ready!"<< endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x238, %rsp            # imm = 0x238
movq %r8, %r15
movq %rcx, %r14
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %rsi
leaq -0x258(%rbp), %rdi
pushq $0x8
popq %rdx
callq 0x2290
leaq -0x1e0(%rbp), %rdi
callq 0x2050
testb %al, %al
je 0x2685
leaq -0x258(%rbp), %rdi
leaq -0x2c(%rbp), %rsi
callq 0x20f0
leaq -0x30(%rbp), %rsi
movq %rax, %rdi
callq 0x20f0
leaq -0x2c(%rbp), %rsi
movl (%rsi), %eax
movl %eax, (%r12)
leaq -0x258(%rbp), %rdi
callq 0x20f0
leaq -0x2c(%rbp), %rax
movl (%rax), %eax
movl %eax, (%r15)
leaq -0x258(%rbp), %r15
leaq -0x30(%rbp), %r13
leaq -0x4c(%rbp), %r12
movq %r15, %rdi
leaq -0x2c(%rbp), %rsi
callq 0x20f0
movq %rax, %rdi
movq %r13, %rsi
callq 0x20f0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x2605
movl -0x2c(%rbp), %eax
movl %eax, -0x44(%rbp)
movl -0x30(%rbp), %ecx
addl %ecx, (%r14)
movl %ecx, -0x48(%rbp)
imull %eax, %ecx
movl %ecx, -0x40(%rbp)
andl $0x0, -0x34(%rbp)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x3624
jmp 0x25ba
movq (%rbx), %rdi
movq 0x8(%rbx), %rsi
leaq -0x107(%rip), %rdx      # 0x250c
callq 0x3fd2
movq (%rbx), %rcx
movq 0x8(%rbx), %rax
subq %rcx, %rax
pushq $0x1c
popq %rsi
cqto
idivq %rsi
pushq $-0x1
popq %rdx
cmpq %rdx, %rax
je 0x2640
leal 0x2(%rdx), %esi
movl %esi, (%rcx)
incq %rdx
addq $0x1c, %rcx
jmp 0x262d
leaq -0x258(%rbp), %rdi
callq 0x2040
movq 0x8985(%rip), %rdi      # 0xafd8
leaq 0x4a06(%rip), %rsi      # 0x7060
callq 0x2190
movq %rax, %rdi
callq 0x20c0
leaq -0x258(%rbp), %rdi
callq 0x2060
addq $0x238, %rsp            # imm = 0x238
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x1
popq %rdi
callq 0x21f0
jmp 0x268f
movq %rax, %rbx
leaq -0x258(%rbp), %rdi
callq 0x2060
movq %rbx, %rdi
callq 0x22f0
// File: /workspace/github_cpp_makefile_star2_O2/maramire[P]SP_PSO/parallel_main.cpp
// Function: particle_init(int, std::vector<Particle, std::allocator<Particle>>&)
void particle_init(int n_items, Swarm &swarm)
{
    Particle particle;

    random_device rd;  
    mt19937 g(rd());  



    /* Define Initial permutation (1,2,3,...n_items) */
    vector<int> permutation(n_items);
    iota(begin(permutation), end(permutation), 1);

    /* Shuffling permutation vector */
    shuffle(begin(permutation), end(permutation), g);

    particle.permutation = permutation;
    
    /* Define Initial velocity (0,0,0,...0) */
    vector<float> velocity(n_items,0);    
    particle.velocity = velocity;
    particle.fitness = 99999999;
    particle.pbest_fitness = 99999999;

    swarm.push_back(particle);

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x27a8, %rsp           # imm = 0x27A8
movq %rsi, %rbx
movl %edi, %r14d
xorps %xmm0, %xmm0
movaps %xmm0, -0xb0(%rbp)
andq $0x0, -0xa0(%rbp)
movaps %xmm0, -0x90(%rbp)
andq $0x0, -0x80(%rbp)
movaps %xmm0, -0x70(%rbp)
andq $0x0, -0x60(%rbp)
leaq -0x1438(%rbp), %rdi
callq 0x3650
leaq -0x1438(%rbp), %rdi
callq 0x2230
movl %eax, %esi
leaq -0x27c0(%rbp), %rdi
callq 0x4740
movslq %r14d, %r14
leaq -0x38(%rbp), %rdi
leaq -0x58(%rbp), %rdx
movq %r14, %rsi
callq 0x36a6
leaq -0x70(%rbp), %r15
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rsi
pushq $0x1
popq %rax
movq %rdi, %rcx
cmpq %rsi, %rcx
je 0x273d
movl %eax, (%rcx)
incl %eax
addq $0x4, %rcx
jmp 0x272e
leaq -0x27c0(%rbp), %rdx
callq 0x36f7
leaq -0xb0(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x3822
leaq -0x3c(%rbp), %rdx
andl $0x0, (%rdx)
leaq -0x58(%rbp), %rdi
leaq -0x19(%rbp), %rcx
movq %r14, %rsi
callq 0x38f6
leaq -0x58(%rbp), %rsi
movq %r15, %rdi
callq 0x3956
movl $0x5f5e0ff, %eax        # imm = 0x5F5E0FF
leaq -0xb0(%rbp), %rsi
movl %eax, 0x18(%rsi)
movl %eax, 0x38(%rsi)
movq %rbx, %rdi
callq 0x3a2a
leaq -0x58(%rbp), %rdi
callq 0x3d62
leaq -0x38(%rbp), %rdi
callq 0x3d24
leaq -0x1438(%rbp), %rdi
callq 0x3a66
leaq -0xb0(%rbp), %rdi
callq 0x35c4
addq $0x27a8, %rsp           # imm = 0x27A8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x27e5
jmp 0x27f3
movq %rax, %rbx
jmp 0x2802
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0x3d62
jmp 0x27e8
movq %rax, %rbx
leaq -0x38(%rbp), %rdi
callq 0x3d24
jmp 0x27f6
movq %rax, %rbx
leaq -0x1438(%rbp), %rdi
callq 0x3a66
leaq -0xb0(%rbp), %rdi
callq 0x35c4
movq %rbx, %rdi
callq 0x22f0
// File: /workspace/github_cpp_makefile_star2_O2/maramire[P]SP_PSO/parallel_main.cpp
// Function: showPermutation(std::vector<int, std::allocator<int>>)
void showPermutation(vector<int> permutation)
{
    for (int i=0; i<permutation.size(); i++){
        cout << permutation[i];
        cout << ", ";
    }
    cout <<endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
xorl %r12d, %r12d
movq 0x8711(%rip), %r14      # 0xafd8
leaq 0x47a2(%rip), %r15      # 0x7070
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
cmpq %r12, %rcx
jbe 0x28fd
movl (%rax,%r12,4), %esi
movq %r14, %rdi
callq 0x22e0
movq %r14, %rdi
movq %r15, %rsi
callq 0x2190
incq %r12
jmp 0x28ce
movq 0x86d4(%rip), %rdi      # 0xafd8
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x20c0
// File: /workspace/github_cpp_makefile_star2_O2/maramire[P]SP_PSO/parallel_main.cpp
// Function: HR(std::vector<Item, std::allocator<Item>>&, Strip&, int, Particle&)
void HR(Item_vector &items, Strip &s, int n_items, Particle &particle)
{

    vector<int> permutation = particle.permutation;
    int fitness = 0;
    int i = 0;

    while(!permutation.empty())
    {
        
        int item_id = permutation[i]-1;
        int original_height;
        
        if (items[item_id].height > items[item_id].width)
        {
            original_height = items[item_id].height;
            items[item_id].height = items[item_id].width;
            items[item_id].width = original_height;
            items[item_id].rotated = 1;
        }           

        /* it is already defined, but convenience */
        items[item_id].x_position = s.x_position;
        items[item_id].y_position = s.y_position; 

        fitness += items[item_id].height;         

        /* Resize strip S1 */
        Strip s1 = {};
        s1.y_position = s.y_position + items[item_id].height;
        s1.x_position = s.x_position;
        s1.height = s.height - items[item_id].height;
        s1.width = s.width;

        /* Generate new strip S2 */
        Strip s2 = {};
        s2.x_position = s.x_position + items[item_id].width;
        s2.y_position = s.y_position;
        s2.height = items[item_id].height;
        s2.width = s.width - items[item_id].width;

        s = s1;

        /* Erase */
        permutation.erase(permutation.begin() + i);

        RecursePacking(s2,permutation,items);

    }      
            
    particle.fitness = fitness;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r14
movq %rdi, %r15
leaq -0x58(%rbp), %rdi
movq %rcx, -0x60(%rbp)
movq %rcx, %rsi
callq 0x3ab4
xorl %ebx, %ebx
movq -0x58(%rbp), %rdi
movq -0x50(%rbp), %rdx
cmpq %rdx, %rdi
je 0x2bbe
movslq (%rdi), %rax
movq (%r15), %rsi
imulq $0x1c, %rax, %r8
leaq (%rsi,%r8), %rax
movl -0x18(%rsi,%r8), %ecx
movl -0x14(%rsi,%r8), %r12d
cmpl %r12d, %ecx
jle 0x2b39
movl %r12d, -0x18(%rax)
movl %ecx, -0x14(%rax)
movl $0x1, -0x4(%rax)
jmp 0x2b3c
movl %ecx, %r12d
movl 0x8(%r14), %ecx
movl %ecx, -0xc(%rax)
movl 0xc(%r14), %esi
movl %esi, -0x8(%rax)
leal (%r12,%rsi), %r8d
movl (%r14), %r9d
movl 0x4(%r14), %r10d
subl %r12d, %r9d
xorps %xmm0, %xmm0
movaps %xmm0, -0x40(%rbp)
movl -0x14(%rax), %r11d
leal (%r11,%rcx), %r13d
movl %r13d, -0x38(%rbp)
movl %esi, -0x34(%rbp)
movl -0x18(%rax), %eax
movl %eax, -0x40(%rbp)
subl %r11d, %r10d
movl %r10d, -0x3c(%rbp)
movl %r9d, (%r14)
movl %ecx, 0x8(%r14)
movl %r8d, 0xc(%r14)
leaq 0x4(%rdi), %rsi
cmpq %rdx, %rsi
je 0x2b9b
subq %rsi, %rdx
callq 0x22a0
movq -0x50(%rbp), %rdx
addq $-0x4, %rdx
movq %rdx, -0x50(%rbp)
leaq -0x40(%rbp), %rdi
leaq -0x58(%rbp), %rsi
movq %r15, %rdx
callq 0x2975
addl %ebx, %r12d
movl %r12d, %ebx
jmp 0x2afb
movq -0x60(%rbp), %rax
movl %ebx, 0x18(%rax)
leaq -0x58(%rbp), %rdi
callq 0x3d24
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0x3d24
movq %rbx, %rdi
callq 0x22f0
// File: /workspace/github_cpp_makefile_star2_O2/maramire[P]SP_PSO/parallel_main.cpp
// Function: showRectangles(std::vector<Item, std::allocator<Item>>)
void showRectangles(Item_vector items)
{
    /* Print all rectangles and its information */
    cout << "-> Printing rectangles of instance and its information!"<<endl;
    cout << "-------------------------------------------------------"<<endl;
    cout << "AreaID, X,      Y,     Width,  Height,  Rotated?"<<endl;
    
    for (int i = 0; i < items.size(); i++)
    {
        cout << items[i].id << "	" << items[i].x_position;
        cout << "	" << items[i].y_position << "	";
        cout << items[i].width << "	" << items[i].height << "	"; 
        cout << items[i].rotated <<endl;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x83cf(%rip), %r14      # 0xafd8
leaq 0x4463(%rip), %rsi      # 0x7073
movq %r14, %rdi
callq 0x2190
movq %rax, %rdi
callq 0x20c0
leaq 0x4484(%rip), %rsi      # 0x70ab
movq %r14, %rdi
callq 0x2190
movq %rax, %rdi
callq 0x20c0
leaq 0x44a5(%rip), %rsi      # 0x70e3
movq %r14, %rdi
callq 0x2190
movq %rax, %rdi
callq 0x20c0
xorl %r12d, %r12d
leaq 0x44bc(%rip), %r15      # 0x7114
xorl %r13d, %r13d
movq (%rbx), %rcx
movq 0x8(%rbx), %rax
subq %rcx, %rax
cqto
pushq $0x1c
popq %rsi
idivq %rsi
cmpq %r13, %rax
jbe 0x2d1d
movl (%rcx,%r12), %esi
movq %r14, %rdi
callq 0x22e0
movq %rax, %rdi
movq %r15, %rsi
callq 0x2190
movq (%rbx), %rcx
movl 0x10(%rcx,%r12), %esi
movq %rax, %rdi
callq 0x22e0
movq %r14, %rdi
movq %r15, %rsi
callq 0x2190
movq (%rbx), %rcx
movl 0x14(%rcx,%r12), %esi
movq %rax, %rdi
callq 0x22e0
movq %rax, %rdi
movq %r15, %rsi
callq 0x2190
movq (%rbx), %rax
movl 0x8(%rax,%r12), %esi
movq %r14, %rdi
callq 0x22e0
movq %rax, %rdi
movq %r15, %rsi
callq 0x2190
movq (%rbx), %rcx
movl 0x4(%rcx,%r12), %esi
movq %rax, %rdi
callq 0x22e0
movq %rax, %rdi
movq %r15, %rsi
callq 0x2190
movq (%rbx), %rax
movl 0x18(%rax,%r12), %esi
movq %r14, %rdi
callq 0x22e0
movq %rax, %rdi
callq 0x20c0
incq %r13
addq $0x1c, %r12
jmp 0x2c5b
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/maramire[P]SP_PSO/parallel_main.cpp
// Function: showSwarm(std::vector<Particle, std::allocator<Particle>>)
void showSwarm(Swarm swarm)
{
    /* print swarm */
    for (int i = 0; i < swarm.size(); i++)
    {
        //showPermutation(swarm[i].permutation);
        cout << "Fitness: " << swarm[i].fitness << endl;
        cout << "Velocity : ";
        for (int j=0; j< swarm[i].velocity.size(); j++){
                cout << swarm[i].velocity[j];
                cout << ", ";
            }
        cout <<endl;
        cout <<endl;
        
    } 
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r15d, %r15d
movq 0x8291(%rip), %r14      # 0xafd8
leaq 0x4322(%rip), %r13      # 0x7070
movq 0x8(%rbx), %rax
subq (%rbx), %rax
cqto
pushq $0x58
popq %rcx
idivq %rcx
cmpq %r15, %rax
jbe 0x2dfa
movq %r14, %rdi
leaq 0x43a6(%rip), %rsi      # 0x7116
callq 0x2190
movq (%rbx), %rcx
movq %r15, -0x30(%rbp)
imulq $0x58, %r15, %r12
movl 0x18(%rcx,%r12), %esi
movq %rax, %rdi
callq 0x22e0
movq %rax, %rdi
callq 0x20c0
movq %r14, %rdi
leaq 0x4381(%rip), %rsi      # 0x7120
callq 0x2190
xorl %r15d, %r15d
movq (%rbx), %rcx
movq 0x40(%rcx,%r12), %rax
movq 0x48(%rcx,%r12), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
cmpq %r15, %rcx
jbe 0x2dde
movss (%rax,%r15,4), %xmm0
movq %r14, %rdi
callq 0x2120
movq %r14, %rdi
movq %r13, %rsi
callq 0x2190
incq %r15
jmp 0x2da7
movq %r14, %rdi
callq 0x20c0
movq %r14, %rdi
callq 0x20c0
movq -0x30(%rbp), %r15
incq %r15
jmp 0x2d4e
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/richardposner[P]BioNetFit2/src/code/Data.cpp
// Function: Data::getColumnAverages()
void Data::getColumnAverages() {
	double sum;
	int counter;
	for(map<string,map<double,double> >::iterator c = dataCurrent->begin(); c != dataCurrent->end(); ++c) {
		//cout << "gca col loop" << endl;

		sum = 0;
		counter = 0;

		for(map<double,double>::iterator v = c->second.begin(); v != c->second.end(); ++v) {
			//cout << "gca tp loop" << endl;
			if (std::isnan(v->second)) {
				continue;
			}

			sum += v->second;
			counter++;
		}
		colAverages.insert(pair<string,double>(c->first,sum/counter));
	}



}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movq (%rdi), %rax
movq 0x18(%rax), %r12
leaq 0x38(%rdi), %r14
leaq 0x10(%rsp), %r15
addq $0x8, %rax
cmpq %rax, %r12
je 0x48a47
movq 0x58(%r12), %rax
leaq 0x48(%r12), %r13
xorps %xmm0, %xmm0
movsd %xmm0, 0x8(%rsp)
xorl %ebp, %ebp
cmpq %r13, %rax
je 0x489f4
movsd 0x28(%rax), %xmm0
xorl %ecx, %ecx
ucomisd %xmm0, %xmm0
setnp %dl
jp 0x489e6
movsd 0x8(%rsp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
movb %dl, %cl
addl %ecx, %ebp
movq %rax, %rdi
callq 0x28700
jmp 0x489c1
leaq 0x20(%r12), %rsi
cvtsi2sd %ebp, %xmm0
movsd 0x8(%rsp), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
movq %r15, %rdi
callq 0x28dd0
movsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x30(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x4bce2
movq %r15, %rdi
callq 0x295a0
movq %r12, %rdi
callq 0x28700
movq %rax, %r12
movq (%rbx), %rax
jmp 0x4899f
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x295a0
movq %rbx, %rdi
callq 0x292f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/richardposner[P]BioNetFit2/src/code/Data.cpp
// Function: Data::divideByInit()
void Data::divideByInit() {
	for(map<string,map<double,double> >::iterator c = dataCurrent->begin(); c != dataCurrent->end(); ++c) {
		for(map<double,double>::iterator v = c->second.begin(); v != c->second.end(); ++v) {
			if (v->second == 0) {
				swarm_->outputError("You chose to divide_by_init, but the first value in the column '" + c->first + "' is 0. We cannot divide by 0.");
			}
			if (std::isnan(v->second)) {
				dataDividedByInit_[c->first][v->first] = nan("1");
				continue;
			}
			dataDividedByInit_[c->first][v->first] = v->second / c->second.begin()->first;
			//cout << "dividing t=" << v->first << " of " << v->second << "by " << c->first << " init of " << c->second.begin()->first << endl;
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq (%rdi), %rax
movq 0x18(%rax), %rdx
movq %rdi, 0x8(%rsp)
leaq 0x120(%rdi), %rcx
movq %rcx, 0x20(%rsp)
leaq 0x48(%rsp), %r15
addq $0x8, %rax
cmpq %rax, %rdx
je 0x48b9e
leaq 0x20(%rdx), %rbp
movq 0x58(%rdx), %rbx
movq %rdx, 0x10(%rsp)
leaq 0x48(%rdx), %r12
cmpq %r12, %rbx
je 0x48b84
movsd 0x28(%rbx), %xmm0
ucomisd 0x8bfb5(%rip), %xmm0    # 0xd4a80
jne 0x48b26
jp 0x48b26
movq 0x8(%rsp), %rax
movq 0x150(%rax), %r13
leaq 0x28(%rsp), %r14
movq %r14, %rdi
leaq 0x8c231(%rip), %rsi     # 0xd4d1b
movq %rbp, %rdx
callq 0x3338b
movq %r15, %rdi
movq %r14, %rsi
leaq 0x8c25d(%rip), %rdx     # 0xd4d5c
callq 0x3336c
movq %r13, %rdi
movq %r15, %rsi
callq 0x6aed2
movq %r15, %rdi
callq 0x295a0
leaq 0x28(%rsp), %rdi
callq 0x295a0
movsd 0x28(%rbx), %xmm0
ucomisd %xmm0, %xmm0
jp 0x48b76
movq 0x10(%rsp), %rax
movq 0x58(%rax), %rax
divsd 0x20(%rax), %xmm0
movsd %xmm0, 0x18(%rsp)
leaq 0x20(%rbx), %r13
movq 0x20(%rsp), %rdi
movq %rbp, %rsi
callq 0x49360
movq %rax, %rdi
movq %r13, %rsi
callq 0x4947e
movsd 0x18(%rsp), %xmm0
movsd %xmm0, (%rax)
movq %rbx, %rdi
callq 0x28700
movq %rax, %rbx
jmp 0x48ab5
leaq 0x9782e(%rip), %rdi     # 0xe03ab
callq 0x28130
jmp 0x48b3a
movq 0x10(%rsp), %rdi
callq 0x28700
movq %rax, %rdx
movq 0x8(%rsp), %rax
movq (%rax), %rax
jmp 0x48a97
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x295a0
jmp 0x48bbf
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x295a0
movq %rbx, %rdi
callq 0x292f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/richardposner[P]BioNetFit2/src/code/Data.cpp
// Function: Data::logTransformData()
void Data::logTransformData() {
	for(map<string,map<double,double> >::iterator c = dataCurrent->begin(); c != dataCurrent->end(); ++c) {
		for(map<double,double>::iterator v = c->second.begin(); v != c->second.end(); ++v) {
			if (v->second == 0) {
				swarm_->outputError("You chose to log transform simulation output, but the first value in the column '" + c->first + "' is 0. We cannot take the log of 0.");
			}
			else if (std::isnan(v->second)) {
				dataLogTransformed_[c->first][v->first] = nan("1");
				continue;
			}
			dataLogTransformed_[c->first][v->first] = log10(v->second)/log10(swarm_->options.logTransformSimData);
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdi, %rbx
movq (%rdi), %rcx
movq 0x18(%rcx), %rax
leaq 0xf0(%rdi), %rdx
movq %rdx, 0x18(%rsp)
leaq 0x48(%rsp), %r15
addq $0x8, %rcx
cmpq %rcx, %rax
je 0x48d1d
leaq 0x20(%rax), %r12
movq 0x58(%rax), %rbp
movq %rax, 0x10(%rsp)
addq $0x48, %rax
movq %rax, 0x20(%rsp)
cmpq 0x20(%rsp), %rbp
je 0x48d0b
movsd 0x28(%rbp), %xmm0
ucomisd 0x8be4a(%rip), %xmm0    # 0xd4a80
jne 0x48c8e
jp 0x48c8e
movq 0x150(%rbx), %r13
leaq 0x28(%rsp), %r14
movq %r14, %rdi
leaq 0x8c12b(%rip), %rsi     # 0xd4d7b
movq %r12, %rdx
callq 0x3338b
movq %r15, %rdi
movq %r14, %rsi
leaq 0x8c168(%rip), %rdx     # 0xd4dcd
callq 0x3336c
movq %r13, %rdi
movq %r15, %rsi
callq 0x6aed2
movq %r15, %rdi
callq 0x295a0
leaq 0x28(%rsp), %rdi
callq 0x295a0
movsd 0x28(%rbp), %xmm0
jmp 0x48c94
ucomisd %xmm0, %xmm0
jp 0x48cf7
callq 0x284f0
movsd %xmm0, 0x8(%rsp)
movq 0x150(%rbx), %rax
movl 0x1640(%rax), %edi
callq 0x494d0
movsd 0x8(%rsp), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
leaq 0x20(%rbp), %r13
movq 0x18(%rsp), %rdi
movq %r12, %rsi
callq 0x49360
movq %rax, %rdi
movq %r13, %rsi
callq 0x4947e
movsd 0x8(%rsp), %xmm0
movsd %xmm0, (%rax)
movq %rbp, %rdi
callq 0x28700
movq %rax, %rbp
jmp 0x48c1e
leaq 0x976ad(%rip), %rdi     # 0xe03ab
callq 0x28130
movsd %xmm0, 0x8(%rsp)
jmp 0x48cc1
movq 0x10(%rsp), %rdi
callq 0x28700
movq (%rbx), %rcx
jmp 0x48bfb
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x295a0
jmp 0x48d3e
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x295a0
movq %rbx, %rdi
callq 0x292f0
// File: /workspace/github_cpp_makefile_star2_O2/richardposner[P]BioNetFit2/src/code/Data.cpp
// Function: Data::standardizeData()
void Data::standardizeData() {
	// This function standardizes our data around a mean of 0

	double mean;
	double sqtotal;
	int counter;
	double stdev;

	// Loop through data map
	for(map<string,map<double,double> >::iterator c = dataCurrent->begin(); c != dataCurrent->end(); ++c) {

		// Grab our mean, which has already been calculated
		mean = colAverages[c->first];
		sqtotal = 0;
		counter = 0;

		// Skip the column if mean is already 0
		if (mean == 0) {
			continue;
		}

		// Here we get the riemann sum squared for use in the stdev calculation
		for(map<double,double>::iterator v = c->second.begin(); v != c->second.end(); ++v) {
			//cout << "sd loop" << endl;
			if (std::isnan(v->second)) {
				continue;
			}
			sqtotal += pow(mean - v->second, 2);
			counter++;
		}

		// Cacualate the standard deviation
		stdev = pow((sqtotal / (counter - 1)), 0.5);

		// Loop through and set values according to formula: val_new = (val_old - column_mean) / (column_stdev)
		for(map<double,double>::iterator v = c->second.begin(); v != c->second.end(); ++v) {
			//cout << "stand loop" << endl;
			if (std::isnan(v->second)) {
				dataStandardized_[c->first][v->first] = nan("1");
				continue;
			}
			//cout << "inserting: " << (v->second - mean) / stdev << endl;
			dataStandardized_[c->first][v->first] = (v->second - mean) / stdev;
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq (%rdi), %rax
movq 0x18(%rax), %r12
leaq 0x38(%rdi), %rcx
movq %rcx, 0x10(%rsp)
movq %rdi, 0x18(%rsp)
leaq 0xc0(%rdi), %r15
addq $0x8, %rax
cmpq %rax, %r12
je 0x48ea7
leaq 0x20(%r12), %rbp
movq 0x10(%rsp), %rdi
movq %rbp, %rsi
callq 0x49418
movsd (%rax), %xmm0
movsd %xmm0, 0x8(%rsp)
ucomisd 0x8bcd5(%rip), %xmm0    # 0xd4a80
jne 0x48dc4
jp 0x48dc4
movq %r12, %rdi
callq 0x28700
movq %rax, %r12
movq 0x18(%rsp), %rax
movq (%rax), %rax
jmp 0x48d7a
movq 0x58(%r12), %rax
leaq 0x48(%r12), %rbx
xorpd %xmm0, %xmm0
movsd %xmm0, (%rsp)
xorl %r14d, %r14d
cmpq %rbx, %rax
je 0x48e1a
movsd 0x28(%rax), %xmm0
xorl %ecx, %ecx
ucomisd %xmm0, %xmm0
setnp %dl
jp 0x48e0b
movsd 0x8(%rsp), %xmm1
subsd %xmm0, %xmm1
mulsd %xmm1, %xmm1
movsd (%rsp), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, (%rsp)
movb %dl, %cl
addl %ecx, %r14d
movq %rax, %rdi
callq 0x28700
jmp 0x48dda
decl %r14d
cvtsi2sd %r14d, %xmm1
movsd (%rsp), %xmm0
divsd %xmm1, %xmm0
movsd 0x8bc55(%rip), %xmm1    # 0xd4a88
callq 0x292b0
movsd %xmm0, 0x20(%rsp)
movq 0x58(%r12), %r13
cmpq %rbx, %r13
je 0x48daf
movsd 0x28(%r13), %xmm0
ucomisd %xmm0, %xmm0
jp 0x48e99
subsd 0x8(%rsp), %xmm0
divsd 0x20(%rsp), %xmm0
movsd %xmm0, (%rsp)
leaq 0x20(%r13), %r14
movq %r15, %rdi
movq %rbp, %rsi
callq 0x49360
movq %rax, %rdi
movq %r14, %rsi
callq 0x4947e
movsd (%rsp), %xmm0
movsd %xmm0, (%rax)
movq %r13, %rdi
callq 0x28700
movq %rax, %r13
jmp 0x48e43
leaq 0x9750b(%rip), %rdi     # 0xe03ab
callq 0x28130
jmp 0x48e64
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/richardposner[P]BioNetFit2/src/code/Data.cpp
// Function: Data::Data(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::map<double, double, std::less<double>, std::allocator<std::pair<double const, double>>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::map<double, double, std::less<double>, std::allocator<std::pair<double const, double>>>>>>&)
Data::Data(map<string, map<double, double> > &dataSet) {
	dataOrig_ = dataSet;
	dataCurrent = &dataOrig_;
	isExp_ = false;
	swarm_ = 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
andl $0x0, 0x10(%rdi)
andq $0x0, 0x18(%rdi)
movq %rax, 0x20(%rdi)
movq %rax, 0x28(%rdi)
andq $0x0, 0x30(%rdi)
andl $0x0, 0x40(%rdi)
andq $0x0, 0x48(%rdi)
leaq 0x40(%rdi), %rax
movq %rax, 0x50(%rdi)
movq %rax, 0x58(%rdi)
andq $0x0, 0x60(%rdi)
leaq 0x80(%rdi), %rax
movq %rax, 0x70(%rdi)
andq $0x0, 0x78(%rdi)
leaq 0x70(%rdi), %r14
movb $0x0, 0x80(%rdi)
leaq 0x90(%rdi), %r15
leaq 0x98(%rdi), %rax
andl $0x0, 0x98(%rdi)
andq $0x0, 0xa0(%rdi)
movq %rax, 0xa8(%rdi)
movq %rax, 0xb0(%rdi)
andq $0x0, 0xb8(%rdi)
leaq 0xc8(%rdi), %rax
andl $0x0, 0xc8(%rdi)
andq $0x0, 0xd0(%rdi)
movq %rax, 0xd8(%rdi)
movq %rax, 0xe0(%rdi)
andq $0x0, 0xe8(%rdi)
leaq 0xf8(%rdi), %rax
andl $0x0, 0xf8(%rdi)
andq $0x0, 0x100(%rdi)
movq %rax, 0x108(%rdi)
movq %rax, 0x110(%rdi)
andq $0x0, 0x118(%rdi)
leaq 0x128(%rdi), %rax
andl $0x0, 0x128(%rdi)
andq $0x0, 0x130(%rdi)
movq %rax, 0x138(%rdi)
movq %rax, 0x140(%rdi)
andq $0x0, 0x148(%rdi)
movq %r15, %rdi
callq 0x49610
movq %r15, (%rbx)
movb $0x0, 0x158(%rbx)
andq $0x0, 0x150(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, (%rsp)
leaq 0x120(%rbx), %rdi
leaq 0xf0(%rbx), %r13
leaq 0xc0(%rbx), %rbp
leaq 0x38(%rbx), %r12
addq $0x8, %rbx
callq 0x494da
movq %r13, %rdi
callq 0x494da
movq %rbp, %rdi
callq 0x494da
movq %r15, %rdi
callq 0x494da
movq %r14, %rdi
callq 0x295a0
movq %r12, %rdi
callq 0x495ac
movq %rbx, %rdi
callq 0x494da
movq (%rsp), %rdi
callq 0x292f0
// File: /workspace/github_cpp_makefile_star2_O2/richardposner[P]BioNetFit2/src/code/Data.cpp
// Function: Data::Data()
Data::Data() {
	map<string, map<double, double> > dummySet;
	dataOrig_ = dummySet;
	dataCurrent = 0;
	isExp_ = false;
	swarm_ = 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
andl $0x0, 0x10(%rdi)
andq $0x0, 0x18(%rdi)
movq %rax, 0x20(%rdi)
movq %rax, 0x28(%rdi)
andq $0x0, 0x30(%rdi)
andl $0x0, 0x40(%rdi)
andq $0x0, 0x48(%rdi)
leaq 0x40(%rdi), %rax
movq %rax, 0x50(%rdi)
movq %rax, 0x58(%rdi)
andq $0x0, 0x60(%rdi)
leaq 0x80(%rdi), %rax
movq %rax, 0x70(%rdi)
andq $0x0, 0x78(%rdi)
leaq 0x70(%rdi), %r14
movb $0x0, 0x80(%rdi)
leaq 0x90(%rdi), %r15
leaq 0x98(%rdi), %rax
andl $0x0, 0x98(%rdi)
andq $0x0, 0xa0(%rdi)
movq %rax, 0xa8(%rdi)
movq %rax, 0xb0(%rdi)
andq $0x0, 0xb8(%rdi)
leaq 0xc8(%rdi), %rax
andl $0x0, 0xc8(%rdi)
andq $0x0, 0xd0(%rdi)
movq %rax, 0xd8(%rdi)
movq %rax, 0xe0(%rdi)
andq $0x0, 0xe8(%rdi)
leaq 0xf8(%rdi), %rax
andl $0x0, 0xf8(%rdi)
andq $0x0, 0x100(%rdi)
movq %rax, 0x108(%rdi)
movq %rax, 0x110(%rdi)
andq $0x0, 0x118(%rdi)
leaq 0x128(%rdi), %rax
andl $0x0, 0x128(%rdi)
andq $0x0, 0x130(%rdi)
movq %rax, 0x138(%rdi)
movq %rax, 0x140(%rdi)
andq $0x0, 0x148(%rdi)
leaq 0x20(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq 0x18(%rsp), %rsi
movq %r15, %rdi
callq 0x49610
andq $0x0, (%rbx)
movb $0x0, 0x158(%rbx)
andq $0x0, 0x150(%rbx)
leaq 0x18(%rsp), %rdi
callq 0x494da
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, 0x10(%rsp)
leaq 0x120(%rbx), %r13
leaq 0xf0(%rbx), %rbp
leaq 0xc0(%rbx), %r12
leaq 0x38(%rbx), %rax
movq %rax, 0x8(%rsp)
addq $0x8, %rbx
leaq 0x18(%rsp), %rdi
callq 0x494da
movq %r13, %rdi
callq 0x494da
movq %rbp, %rdi
callq 0x494da
movq %r12, %rdi
callq 0x494da
movq %r15, %rdi
callq 0x494da
movq %r14, %rdi
callq 0x295a0
movq 0x8(%rsp), %rdi
callq 0x495ac
movq %rbx, %rdi
callq 0x494da
movq 0x10(%rsp), %rdi
callq 0x292f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/richardposner[P]BioNetFit2/src/code/Data.cpp
// Function: Data::getPath[abi:cxx11]()
std::string Data::getPath() {
	if (!dataPath.empty())
		return dataPath;
	else
		return "empty";
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
cmpq $0x0, 0x78(%rsi)
je 0x4924f
addq $0x70, %rsi
movq %rbx, %rdi
callq 0x28dd0
jmp 0x49263
leaq 0x909e4(%rip), %rsi     # 0xd9c3a
leaq 0xf(%rsp), %rdx
movq %rbx, %rdi
callq 0x33402
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/richardposner[P]BioNetFit2/src/code/FreeParam.cpp
// Function: FreeParam::FreeParam(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
FreeParam::FreeParam(string parameterName) {
	parameterName_ = parameterName;
	generationMethod_ = "";
	hasMutation_ = false;
	mutationRate_ = 0;
	mutationFactor_ = 0;
	genMin_ = 0;
	genMax_ = 0;
	isLog_ = false;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
xorl %eax, %eax
movb %al, 0x10(%rdi)
leaq 0x20(%rdi), %r14
leaq 0x30(%rdi), %rcx
movq %rcx, 0x20(%rdi)
andq $0x0, 0x28(%rdi)
movb %al, 0x30(%rdi)
callq 0x28570
leaq 0x88e1c(%rip), %rsi     # 0xd4c01
movq %r14, %rdi
callq 0x29490
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rbx)
andw $0x0, 0x50(%rbx)
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r15
movq %r14, %rdi
callq 0x295a0
movq %rbx, %rdi
callq 0x295a0
movq %r15, %rdi
callq 0x292f0