LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/isaacbrodsky[P]K-means-plus-plus/k-means-multi.cpp
// Function: Cluster_set::Identify_mean_values()
void Cluster_set::Identify_mean_values(void){

	// local variables
	int iCluster_index, iAttribute_index;
	vector<float> vfValues;

	// allocate memory for the local vector
	vfValues.resize(iAttribute_ct);

	if (iIteration < 1) { // if this is the first iteration - initialize the cluster mean values
		if (bUsePlusPlus) {
			Initialize_plus_plus();
		}
		else { // Use the first k instances.
			for (iCluster_index = 0; iCluster_index < iK_count; iCluster_index++){ // read K-instances
				for (iAttribute_index = 0; iAttribute_index < iAttribute_ct; iAttribute_index++){ // read attributes
					vvfMeans[iCluster_index][iAttribute_index]
						= vclInput_data[iCluster_index].vfAttribute[iAttribute_index];
				} // for
			} //for
		}
	} // if

	// save the existing mean values
	for (iCluster_index = 0; iCluster_index < iK_count; iCluster_index++){
		for (iAttribute_index = 0; iAttribute_index < iAttribute_ct; iAttribute_index++){

			// copy the new_means values into the old_means values storage
			vvfOld_means[iCluster_index][iAttribute_index] = vvfMeans[iCluster_index][iAttribute_index];
		} // for
	} //for

	return;
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movq %rsp, %rdi
movaps %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movslq 0x9c(%rbx), %rsi
callq 0x5578
cmpl $0x0, 0x98(%rbx)
jg 0x4396
cmpb $0x0, 0xa1(%rbx)
je 0x4345
movq %rbx, %rdi
callq 0x4bb8
jmp 0x4396
movslq 0x30(%rbx), %rax
testq %rax, %rax
jle 0x4396
movl 0x9c(%rbx), %ecx
movq (%rbx), %rdx
movq 0x80(%rbx), %rsi
xorl %edi, %edi
testl %ecx, %ecx
jle 0x438e
movq %rdi, %r8
shlq $0x6, %r8
movq (%rsi,%r8), %r8
leaq (%rdi,%rdi,2), %r9
movq (%rdx,%r9,8), %r9
xorl %r10d, %r10d
movss (%r8,%r10,4), %xmm0
movss %xmm0, (%r9,%r10,4)
incq %r10
cmpq %r10, %rcx
jne 0x437a
incq %rdi
cmpq %rax, %rdi
jne 0x4360
movslq 0x30(%rbx), %rax
testq %rax, %rax
jle 0x43e5
movl 0x9c(%rbx), %ecx
movq (%rbx), %rdx
movq 0x18(%rbx), %rsi
xorl %edi, %edi
testl %ecx, %ecx
jle 0x43dd
leaq (,%rdi,8), %r8
leaq (%r8,%r8,2), %r9
movq (%rdx,%r9), %r8
movq (%rsi,%r9), %r9
xorl %r10d, %r10d
movss (%r8,%r10,4), %xmm0
movss %xmm0, (%r9,%r10,4)
incq %r10
cmpq %r10, %rcx
jne 0x43c9
incq %rdi
cmpq %rax, %rdi
jne 0x43ae
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x43fb
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x32f0
addq $0x20, %rsp
popq %rbx
retq
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x441a
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x32f0
movq %rbx, %rdi
callq 0x3450
// File: /workspace/github_cpp_makefile_star2_O3/isaacbrodsky[P]K-means-plus-plus/k-means-multi.cpp
// Function: Cluster_set::Cluster_data()
void Cluster_set::Cluster_data(void){
	if (iNumThreads == 1)
	{
		//Don't bother creating more threads.
		Cluster_data_process(0, vclInput_data.size());
	}
	else
	{
		// local variables
		unsigned uPerThread;
		unsigned uData;
		unsigned uDataStart;
		int iThread_index;
		vector<thread> vtThreads;

		uDataStart = 0;
		uData = vclInput_data.size();
		uPerThread = uData / iNumThreads;

		//Split the dataset into parts and launch as individual
		//threads.
		for (iThread_index = 0; iThread_index < iNumThreads; iThread_index++)
		{
			//Force the last thread to take remaining data
			if (iThread_index == iNumThreads - 1)
			{
				uPerThread = uData - uDataStart;
			}

			vtThreads.push_back(thread([=](unsigned uStart, unsigned uLength) { Cluster_data_process(uStart, uLength); }, uDataStart, uPerThread));

			uDataStart += uPerThread;
		} // Launch all threads

		//Wait for all threads to complete.
		for (iThread_index = 0; iThread_index < iNumThreads; iThread_index++)
		{
			vtThreads[iThread_index].join();
		} // Wait for all threads
	}
	return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movl 0x1434(%rdi), %ecx
cmpl $0x1, %ecx
jne 0x4468
movq 0x88(%rbx), %rdx
subq 0x80(%rbx), %rdx
shrq $0x6, %rdx
movq %rbx, %rdi
xorl %esi, %esi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5194
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
jl 0x4555
movq 0x88(%rbx), %r14
subq 0x80(%rbx), %r14
shrq $0x6, %r14
xorl %r12d, %r12d
movl %r14d, %eax
xorl %edx, %edx
divl %ecx
movl %eax, %ebp
movq %rsp, %r15
xorl %r13d, %r13d
movl %ebp, %eax
decl %ecx
movl %r14d, %ebp
subl %r13d, %ebp
cmpl %ecx, %r12d
cmovnel %eax, %ebp
movq $0x0, (%rsp)
movl $0x18, %edi
callq 0x32e0
leaq 0x778c(%rip), %rcx      # 0xbc58
movq %rcx, (%rax)
movl %ebp, 0x8(%rax)
movl %r13d, 0xc(%rax)
movq %rbx, 0x10(%rax)
movq %rax, 0x8(%rsp)
movq %r15, %rdi
leaq 0x8(%rsp), %rsi
xorl %edx, %edx
callq 0x3280
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x44fe
movq (%rdi), %rax
callq *0x8(%rax)
leaq 0x10(%rsp), %rdi
movq %r15, %rsi
callq 0x7218
cmpq $0x0, (%rsp)
jne 0x45a3
addl %ebp, %r13d
incl %r12d
movl 0x1434(%rbx), %ecx
cmpl %ecx, %r12d
jl 0x44a3
testl %ecx, %ecx
jle 0x4555
xorl %r14d, %r14d
xorl %r15d, %r15d
movq 0x10(%rsp), %rdi
addq %r14, %rdi
callq 0x34a8
incq %r15
movslq 0x1434(%rbx), %rax
addq $0x8, %r14
cmpq %rax, %r15
jl 0x4535
leaq 0x10(%rsp), %rdi
callq 0x5822
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x458e
jmp 0x458e
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x4591
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x4591
cmpq $0x0, (%rsp)
jne 0x45a3
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x5822
movq %rbx, %rdi
callq 0x3450
callq 0x3090
// File: /workspace/github_cpp_makefile_star2_O3/isaacbrodsky[P]K-means-plus-plus/k-means-multi.cpp
// Function: Cluster_set::Calculate_cluster_means()
void Cluster_set::Calculate_cluster_means(void){

	// local variables
	int iK_index, iAttribute_index;
	unsigned uInstance_index, uInstance_sz;
	vector<int> viCounts(iK_count);

	uInstance_sz = vclInput_data.size();
	
	for (uInstance_index = 0; uInstance_index < uInstance_sz; uInstance_index++)
	{
		iK_index = vclInput_data[uInstance_index].iCluster;
		//loop through each vector attribute
		for (iAttribute_index = 0; iAttribute_index < iAttribute_ct; iAttribute_index++){
			vvfMeans[iK_index][iAttribute_index] += vclInput_data[uInstance_index].vfAttribute[iAttribute_index];
		} // for

		viCounts[iK_index]++;
	}
	
	// loop thru each cluster
	for (iK_index = 0; iK_index < iK_count; iK_index++){
		//loop through each vector attribute
		for (iAttribute_index = 0; iAttribute_index < iAttribute_ct; iAttribute_index++) {
			//If no elements, default to origin as per old code.
			if (viCounts[iK_index] == 0)
				vvfMeans[iK_index][iAttribute_index] = 0;
			else
				vvfMeans[iK_index][iAttribute_index] /= (float)viCounts[iK_index];
		}
	} // for

	return;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movslq 0x30(%rdi), %rsi
leaq 0x10(%rsp), %r14
leaq 0xf(%rsp), %rdx
movq %r14, %rdi
callq 0x585e
movq 0x80(%rbx), %rax
movq 0x88(%rbx), %rdx
subq %rax, %rdx
shrq $0x6, %rdx
movq (%r14), %rdi
testl %edx, %edx
je 0x463a
movq (%rbx), %rcx
movl %edx, %edx
xorl %esi, %esi
movq %rsi, %r10
shlq $0x6, %r10
movslq 0x38(%rax,%r10), %r8
movslq 0x9c(%rbx), %r9
testq %r9, %r9
jle 0x462e
addq %rax, %r10
movq (%r10), %r10
leaq (%r8,%r8,2), %r11
movq (%rcx,%r11,8), %r11
xorl %r14d, %r14d
movss (%r10,%r14,4), %xmm0
addss (%r11,%r14,4), %xmm0
movss %xmm0, (%r11,%r14,4)
incq %r14
cmpq %r14, %r9
jne 0x4614
incl (%rdi,%r8,4)
incq %rsi
cmpq %rdx, %rsi
jne 0x45eb
movslq 0x30(%rbx), %rax
testq %rax, %rax
jle 0x4690
movl 0x9c(%rbx), %ecx
xorl %edx, %edx
testl %ecx, %ecx
jle 0x4688
movl (%rdi,%rdx,4), %esi
xorps %xmm0, %xmm0
cvtsi2ss %esi, %xmm0
movq (%rbx), %r8
leaq (%rdx,%rdx,2), %r9
movq (%r8,%r9,8), %r8
xorl %r9d, %r9d
testl %esi, %esi
je 0x4677
movss (%r8,%r9,4), %xmm1
divss %xmm0, %xmm1
jmp 0x467a
xorps %xmm1, %xmm1
movss %xmm1, (%r8,%r9,4)
incq %r9
cmpq %r9, %rcx
jne 0x4667
incq %rdx
cmpq %rax, %rdx
jne 0x464b
testq %rdi, %rdi
je 0x46a2
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x32f0
addq $0x28, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/isaacbrodsky[P]K-means-plus-plus/k-means-multi.cpp
// Function: Cluster_set::Compare_mean_values()
bool Cluster_set::Compare_mean_values(void){

	// local variables
	bool bNot_done;
	float sStep_difference;
	float fResult_difference = 0;
	int iCluster_index, iAttribute_index;

	// calculate the difference between the old means and the new means
	for (iCluster_index = 0; iCluster_index < iK_count; iCluster_index++){ // by each cluster
		// compare the attribute mean values
		for (iAttribute_index = 0; iAttribute_index < iAttribute_ct; iAttribute_index++){

			sStep_difference = vvfMeans[iCluster_index][iAttribute_index]
				- vvfOld_means[iCluster_index][iAttribute_index];
			// guarantee a positive value without using squares
			if (sStep_difference < 0) sStep_difference = sStep_difference * (-1);

			// add the step difference to the total difference of means
			fResult_difference = fResult_difference + sStep_difference;

		} // for

	} // for

	// stop clustering if there is little change in  the mean values
	if (fResult_difference < fTolerance) bNot_done = false;
	else bNot_done = true;

	return bNot_done;

}

// Assembly:
movslq 0x30(%rdi), %rax
testq %rax, %rax
jle 0x4714
movl 0x9c(%rdi), %ecx
movq (%rdi), %rdx
movq 0x18(%rdi), %rsi
xorps %xmm0, %xmm0
xorl %r8d, %r8d
movaps 0x39b3(%rip), %xmm1     # 0x8080
testl %ecx, %ecx
jle 0x470a
leaq (,%r8,8), %r9
leaq (%r9,%r9,2), %r10
movq (%rdx,%r10), %r9
movq (%rsi,%r10), %r10
xorl %r11d, %r11d
movss (%r9,%r11,4), %xmm2
subss (%r10,%r11,4), %xmm2
movaps %xmm2, %xmm3
xorps %xmm1, %xmm3
maxss %xmm2, %xmm3
addss %xmm3, %xmm0
incq %r11
cmpq %r11, %rcx
jne 0x46e8
incq %r8
cmpq %rax, %r8
jne 0x46cd
jmp 0x4717
xorps %xmm0, %xmm0
movss 0x78(%rdi), %xmm1
ucomiss %xmm0, %xmm1
setbe %al
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/isaacbrodsky[P]K-means-plus-plus/k-means-multi.cpp
// Function: Cluster_set::Initialize_plus_plus_process(unsigned int, unsigned int, int, std::vector<float, std::allocator<float>>&, std::vector<bool, std::allocator<bool>> const&)
float Cluster_set::Initialize_plus_plus_process(unsigned uIndex, unsigned uLength, int iSelectedPoints, vector<float>& vfDistance, const vector<bool>& vbSkipPoints) {

	unsigned uLastIndex = uIndex + uLength;
	int iAttribute_index;
	int iK_index;
	float fSum_of_squares;
	float fDifference;
	float fTotalDistance = 0;

	// Compute distance to nearest cluster for all data instances.
	for (; uIndex < uLastIndex; uIndex++) {
		// Skip if already selected as a starting point
		if (!vbSkipPoints[uIndex]) {
			// Compute distance to nearest mean
			for (iK_index = 0; iK_index < iSelectedPoints; iK_index++) {
				fSum_of_squares = 0;

				for (iAttribute_index = 0; iAttribute_index < iAttribute_ct; iAttribute_index++) {
					fDifference = (vclInput_data[uIndex].vfAttribute[iAttribute_index] - vvfMeans[iK_index][iAttribute_index]);
					fSum_of_squares += (fDifference * fDifference);
				} // for

				// If this is the first evaluated distance, use it.
				// Otherwise only use the distance if it is better
				// than the previous best distance.
				if (iK_index == 0 || fSum_of_squares < vfDistance[uIndex]) {
					vfDistance[uIndex] = fSum_of_squares;
				}
			}

			// Sum the distance of all points to the closest
			// starting points as each one is calculated.
			fTotalDistance += vfDistance[uIndex];
		}
	}

	return fTotalDistance;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r8, -0x8(%rsp)
addl %esi, %edx
xorps %xmm0, %xmm0
cmpl %esi, %edx
jbe 0x4bad
movq (%r9), %rax
movl 0x9c(%rdi), %r9d
movq -0x8(%rsp), %r8
movq (%r8), %r8
movl %esi, %esi
movl %edx, %edx
movl %ecx, %r11d
movl %esi, %r10d
shrl $0x6, %r10d
movq (%rax,%r10,8), %r10
btq %rsi, %r10
jb 0x4ba1
testl %ecx, %ecx
jle 0x4b9b
movq %rsi, %rbx
shlq $0x6, %rbx
addq 0x80(%rdi), %rbx
movq (%rdi), %r14
movq -0x8(%rsp), %r10
movq (%r10), %r15
xorl %r12d, %r12d
testl %r9d, %r9d
jle 0x4b7a
movq (%rbx), %r13
leaq (%r12,%r12,2), %r10
movq (%r14,%r10,8), %rbp
xorps %xmm1, %xmm1
xorl %r10d, %r10d
movss (%r13,%r10,4), %xmm2
subss (%rbp,%r10,4), %xmm2
mulss %xmm2, %xmm2
addss %xmm2, %xmm1
incq %r10
cmpq %r10, %r9
jne 0x4b5a
jmp 0x4b7d
xorps %xmm1, %xmm1
testq %r12, %r12
je 0x4b8d
movss (%r15,%rsi,4), %xmm2
ucomiss %xmm1, %xmm2
jbe 0x4b93
movss %xmm1, (%r15,%rsi,4)
incq %r12
cmpq %r11, %r12
jne 0x4b44
addss (%r8,%rsi,4), %xmm0
incq %rsi
cmpq %rdx, %rsi
jne 0x4b13
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/isaacbrodsky[P]K-means-plus-plus/k-means-multi.cpp
// Function: Cluster_set::Cluster_data_process(unsigned int, unsigned int)
void Cluster_set::Cluster_data_process(unsigned uIndex, unsigned uLength)
{
	// local variables
	float fDifference;
	float fSquared_difference, fSum_of_squares;
	float fBest_squared_difference;
	int iBest_index;
	int iK_index, iAttribute_index;
	unsigned uLast = uIndex + uLength;

	// loop for all the input data values
	for (; uIndex < uLast; uIndex++) {

		// initialize the tracking variables
		fBest_squared_difference = FLT_MAX; // make this erroneously big
		iBest_index = -1; // Forces taking the first value

		// get the next data vector
		Cluster_instance& clData_instance = vclInput_data[uIndex];

		// loop thru all of the mean values
		for (iK_index = 0; iK_index < iK_count; iK_index++) {

			// initialize the variables
			fDifference = 0;
			fSum_of_squares = 0;

			// compare the data vector to the mean vector
			for (iAttribute_index = 0; iAttribute_index < iAttribute_ct; iAttribute_index++){
				// calculate the difference between the data value and the mean value
				fDifference = (clData_instance.vfAttribute[iAttribute_index] - vvfMeans[iK_index][iAttribute_index]);
				// square the difference
				fSquared_difference = fDifference * fDifference;
				// add to the sum of squares
				fSum_of_squares = fSum_of_squares + fSquared_difference;
			} // for

			// if this value is less than the best squared difference (BSD)
			if (iBest_index == -1 || fSum_of_squares < fBest_squared_difference){
				fBest_squared_difference = fSum_of_squares; // save it as BSD

				// and save the this index as best index
				iBest_index = iK_index;

			} // if
		} // for

		clData_instance.iCluster = iBest_index;
	} // for

}

// Assembly:
addl %esi, %edx
cmpl %esi, %edx
jbe 0x525f
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0x80(%rdi), %rax
movl 0x30(%rdi), %ecx
movl 0x9c(%rdi), %r8d
movl %esi, %esi
movl %edx, %edx
movss 0x2f11(%rip), %xmm0     # 0x80d4
movq %rsi, %r9
shlq $0x6, %r9
addq %rax, %r9
testl %ecx, %ecx
jle 0x5241
movq (%rdi), %r11
movl $0xffffffff, %r10d      # imm = 0xFFFFFFFF
xorl %ebx, %ebx
movaps %xmm0, %xmm1
testl %r8d, %r8d
jle 0x5213
movq (%r9), %r14
leaq (%rbx,%rbx,2), %r15
movq (%r11,%r15,8), %r15
xorps %xmm2, %xmm2
xorl %r12d, %r12d
movss (%r14,%r12,4), %xmm3
subss (%r15,%r12,4), %xmm3
mulss %xmm3, %xmm3
addss %xmm3, %xmm2
incq %r12
cmpq %r12, %r8
jne 0x51f5
jmp 0x5216
xorps %xmm2, %xmm2
cmpl $-0x1, %r10d
sete %bpl
ucomiss %xmm2, %xmm1
seta %r14b
orb %bpl, %r14b
testb %r14b, %r14b
jne 0x5230
movaps %xmm1, %xmm2
cmovnel %ebx, %r10d
incq %rbx
movaps %xmm2, %xmm1
cmpq %rcx, %rbx
jne 0x51df
jmp 0x5247
movl $0xffffffff, %r10d      # imm = 0xFFFFFFFF
movl %r10d, 0x38(%r9)
incq %rsi
cmpq %rdx, %rsi
jne 0x51c3
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/akw0088[P]openssl/rsa_dec.cpp
// Function: createRSA(unsigned char*, bool)
RSA *createRSA(unsigned char *key, bool pub)
{
	RSA *rsa = NULL;
	BIO *keybio = BIO_new_mem_buf(key, -1); // a bio is just a memory buffer, -1 means do strlen of char *key

	if (keybio == NULL)
	{
		printf( "Failed to create key BIO");
		return 0;
	}

	if (pub)
	{
		rsa = PEM_read_bio_RSA_PUBKEY(keybio, &rsa, NULL, NULL);
	}
	else
	{
		rsa = PEM_read_bio_RSAPrivateKey(keybio, &rsa, NULL, NULL);
	}
	BIO_free_all(keybio);

	if (rsa == NULL)
	{
		printf( "Failed to create RSA");
	}
 
	return rsa;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %esi, %r14d
movq $0x0, -0x18(%rbp)
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x1060
testq %rax, %rax
je 0x12bb
movq %rax, %rbx
leaq -0x18(%rbp), %rsi
movq %rax, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
testb %r14b, %r14b
je 0x12cd
callq 0x1170
jmp 0x12d2
leaq 0xd42(%rip), %rdi       # 0x2004
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x1050
jmp 0x12f9
callq 0x1150
movq %rax, -0x18(%rbp)
movq %rbx, %rdi
callq 0x1080
movq -0x18(%rbp), %rbx
testq %rbx, %rbx
jne 0x12f9
leaq 0xd2f(%rip), %rdi       # 0x201d
xorl %eax, %eax
callq 0x1050
movq -0x18(%rbp), %rbx
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/akw0088[P]openssl/rsa_dec.cpp
// Function: main
int main(int argc, char *argv[])
{
	unsigned char *prikey = NULL;
	unsigned int size;

	if (argc < 3)
	{
		printf("Usage: dec private_key encrypted_file\r\n");
		return -1;
	}

	prikey = (unsigned char *)get_file(argv[1], &size);
	if (prikey == NULL)
	{
		printf("Failed to open private key\r\n");
		return -1;
	}

	unsigned int encrypted_length = 0;

	unsigned char *encrypted = (unsigned char *)get_file(argv[2], &encrypted_length);

	printf("Read %d bytes of encrypted file\r\n", encrypted_length);
	unsigned char decrypted[4098]={};

	
	RSA *rsa = createRSA(prikey, false);
	int decrypted_length = RSA_private_decrypt(encrypted_length, encrypted, decrypted, rsa, RSA_PKCS1_PADDING);
	if (decrypted_length == -1)
	{
		char err[130];

		ERR_load_crypto_strings();
		ERR_error_string(ERR_get_error(), err);
		printf("ERROR: %s\n", err);
		return -1;
	}
	RSA_free(rsa);

	printf("Decrypted Text: %s\n", decrypted);
	printf("Decrypted Length: %d\n", decrypted_length);
	write_file((char *)"file.txt", (char *)decrypted, decrypted_length);
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10a8, %rsp           # imm = 0x10A8
cmpl $0x2, %edi
jg 0x1459
leaq 0xc9c(%rip), %rdi       # 0x20f0
jmp 0x1531
movq %rsi, %rbx
movq 0x8(%rsi), %rdi
leaq -0x30(%rbp), %rsi
callq 0x1305
testq %rax, %rax
je 0x152a
movq %rax, %r14
leaq -0x2c(%rbp), %r15
movl $0x0, (%r15)
movq 0x10(%rbx), %rdi
movq %r15, %rsi
callq 0x1305
movq %rax, %r12
movl (%r15), %esi
leaq 0xbbf(%rip), %rdi       # 0x2058
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x1050
leaq -0x10d0(%rbp), %rdi
movl $0x1002, %edx           # imm = 0x1002
xorl %esi, %esi
callq 0x10a0
movq %r14, %rdi
xorl %esi, %esi
callq 0x127c
movq %rax, %r13
movl (%r15), %edi
movq %r12, %rsi
leaq -0x10d0(%rbp), %rdx
movq %rax, %rcx
movl $0x1, %r8d
callq 0x10b0
cmpl $-0x1, %eax
je 0x154f
movl %eax, %r14d
movq %r13, %rdi
callq 0x10f0
leaq 0xb91(%rip), %rdi       # 0x2085
leaq -0x10d0(%rbp), %r15
movq %r15, %rsi
xorl %eax, %eax
callq 0x1050
leaq 0xb8d(%rip), %rdi       # 0x2099
movl %r14d, %esi
xorl %eax, %eax
callq 0x1050
leaq 0xb92(%rip), %rdi       # 0x20af
movq %r15, %rsi
movl %r14d, %edx
callq 0x13b7
jmp 0x153b
leaq 0xba3(%rip), %rdi       # 0x20d4
callq 0x1140
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
addq $0x10a8, %rsp           # imm = 0x10A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x2, %edi
xorl %esi, %esi
callq 0x1090
callq 0x1120
leaq -0xc0(%rbp), %rbx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x1070
leaq 0xb01(%rip), %rdi       # 0x207a
movq %rbx, %rsi
xorl %eax, %eax
callq 0x1050
jmp 0x1536
// File: /workspace/github_cpp_makefile_star2_O3/Neurochrom[P]hours_calc/hours_calc.cpp
// Function: operator-(HourMin const&, HourMin const&)
unsigned operator-(const HourMin& hmLater, const HourMin& hmSooner)
{
   HourMin hmLater2 = hmLater;
   if (hmLater2 < hmSooner)
      hmLater2.h += 24;
   unsigned r = (hmLater2.h - hmSooner.h) * 60;
   if (hmLater2.m >= hmSooner.m)
      r += hmLater2.m - hmSooner.m;
   else
      r -= hmSooner.m - hmLater2.m;
   return r;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq (%rdi), %rcx
movq %rcx, %rax
shrq $0x20, %rax
movl (%rsi), %edx
cmpl %ecx, %edx
jbe 0x3595
movl 0x4(%rsi), %esi
jmp 0x35ab
setae %dil
movl 0x4(%rsi), %esi
cmpl %eax, %esi
seta %r8b
andb %dil, %r8b
cmpb $0x1, %r8b
jne 0x35ae
addl $0x18, %ecx
subl %edx, %ecx
imull $0x3c, %ecx, %ecx
subl %esi, %eax
addl %ecx, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Neurochrom[P]hours_calc/hours_calc.cpp
// Function: isEmptyOrWhitespace(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
bool isEmptyOrWhitespace(const std::string& s)
{
   for (size_t i = 0; i < s.size(); ++i)
      if (!isspace(s[i]))
         return false;
   return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq 0x8(%rdi), %rbx
testq %rbx, %rbx
je 0x36fa
movq (%rdi), %r14
movsbl (%r14), %edi
callq 0x3070
testl %eax, %eax
je 0x36fe
movl $0x1, %ecx
movq %rcx, %r15
cmpq %rcx, %rbx
je 0x36f2
movsbl (%r14,%r15), %edi
callq 0x3070
leaq 0x1(%r15), %rcx
testl %eax, %eax
jne 0x36d8
cmpq %rbx, %r15
setae %al
jmp 0x3700
movb $0x1, %al
jmp 0x3700
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Neurochrom[P]hours_calc/hours_calc.cpp
// Function: lowerCase(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
std::string lowerCase(const std::string& s)
{
   std::string r = s;
   for (size_t i = 0; i < r.size(); ++i)
      if ((r[i] >= 'A') && (r[i] <= 'Z'))
         r[i] = (char)(r[i] - 'A' + 'a');
   return r;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
movq (%rsi), %rax
movq 0x8(%rsi), %rdx
addq %rax, %rdx
movq %rax, %rsi
callq 0x73e6
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x375f
movq (%rbx), %rcx
xorl %edx, %edx
movb (%rcx,%rdx), %sil
leal -0x41(%rsi), %edi
cmpb $0x19, %dil
ja 0x3757
orb $0x20, %sil
movb %sil, (%rcx,%rdx)
movq (%rbx), %rcx
movq 0x8(%rbx), %rax
incq %rdx
cmpq %rax, %rdx
jb 0x373b
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Neurochrom[P]hours_calc/hours_calc.cpp
// Function: upperCase(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
std::string upperCase(const std::string& s)
{
    std::string r = s;
    for (size_t i = 0; i < r.size(); ++i)
        if ((r[i] >= 'a') && (r[i] <= 'z'))
            r[i] = (char)(r[i] - 'a' + 'A');
    return r;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
movq (%rsi), %rax
movq 0x8(%rsi), %rdx
addq %rax, %rdx
movq %rax, %rsi
callq 0x73e6
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x37bd
movq (%rbx), %rcx
xorl %edx, %edx
movb (%rcx,%rdx), %sil
leal -0x61(%rsi), %edi
cmpb $0x19, %dil
ja 0x37b5
addb $-0x20, %sil
movb %sil, (%rcx,%rdx)
movq (%rbx), %rcx
movq 0x8(%rbx), %rax
incq %rdx
cmpq %rax, %rdx
jb 0x3799
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Neurochrom[P]hours_calc/hours_calc.cpp
// Function: expandStr(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long)
std::string expandStr(const std::string& str, size_t size)
{
   size_t strLen = str.length();
   if (strLen >= size)
      return str;
   else
      return str + std::string(size - strLen, ' ');
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rsi), %rax
subq %rax, %rdx
jbe 0x3837
leaq -0x30(%rbp), %r12
movq %r12, -0x10(%r12)
leaq -0x40(%rbp), %r15
movq %r15, %rdi
movq %rdx, %rsi
movl $0x20, %edx
callq 0x32b0
movq (%r14), %rcx
movq 0x8(%r14), %r8
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x3280
leaq 0x10(%rbx), %rdx
movq %rdx, (%rbx)
movq (%rax), %rsi
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rsi
je 0x3851
movq %rsi, (%rbx)
movq (%rcx), %rdx
movq %rdx, 0x10(%rbx)
jmp 0x3857
leaq 0x10(%rbx), %rcx
movq %rcx, (%rbx)
movq (%r14), %rsi
addq %rsi, %rax
movq %rbx, %rdi
movq %rax, %rdx
callq 0x73e6
jmp 0x387c
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rbx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x387c
callq 0x3200
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x389d
callq 0x3200
movq %rbx, %rdi
callq 0x33c0
// File: /workspace/github_cpp_makefile_star2_O3/Neurochrom[P]hours_calc/hours_calc.cpp
// Function: hoursMinsStr[abi:cxx11](unsigned int, unsigned long)
std::string hoursMinsStr(unsigned minutes, size_t size = 0)
{
   std::ostringstream oss;
   oss.precision(2);
   oss << std::fixed << minutes / 60.0 << " h";

   return expandStr(oss.str(), size);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1a0, %rsp            # imm = 0x1A0
movq %rdx, %r14
movl %esi, %r15d
movq %rdi, %rbx
leaq -0x1b8(%rbp), %r12
movq %r12, %rdi
callq 0x3310
movq (%r12), %rax
movq -0x18(%rax), %rcx
movq $0x2, -0x1b0(%rbp,%rcx)
movq -0x18(%rax), %rax
movl $0xfffffefb, %ecx       # imm = 0xFFFFFEFB
andl -0x1a0(%rbp,%rax), %ecx
orl $0x4, %ecx
movl %ecx, -0x1a0(%rbp,%rax)
movl %r15d, %eax
cvtsi2sd %rax, %xmm0
divsd 0x46fb(%rip), %xmm0     # 0x8008
movq %r12, %rdi
callq 0x3390
leaq 0x4734(%rip), %rsi      # 0x8050
movl $0x2, %edx
movq %rax, %rdi
callq 0x3290
leaq -0x1b0(%rbp), %rsi
leaq -0x40(%rbp), %rdi
callq 0x3380
leaq -0x40(%rbp), %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x37c7
leaq -0x30(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x395a
callq 0x3200
movq 0x765f(%rip), %rsi      # 0xafc0
leaq -0x1b8(%rbp), %rdi
callq 0x3140
leaq -0x148(%rbp), %rdi
callq 0x30c0
movq %rbx, %rax
addq $0x1a0, %rsp            # imm = 0x1A0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x30(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x39a8
callq 0x3200
jmp 0x39a8
jmp 0x39a5
movq %rax, %rbx
movq 0x7611(%rip), %rsi      # 0xafc0
leaq -0x1b8(%rbp), %rdi
callq 0x3140
leaq -0x148(%rbp), %rdi
callq 0x30c0
movq %rbx, %rdi
callq 0x33c0
// File: /workspace/github_cpp_makefile_star2_O3/Neurochrom[P]hours_calc/hours_calc.cpp
// Function: parseHourMin(HourMin*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
bool parseHourMin(HourMin* result, const std::string& s)
{
   std::vector<std::string> ss = splitIntoTokens(s, ".:");
   if (ss.size() != 2)
      return false;
   unsigned h,m;
   try
   {
      h = std::stoi(ss[0]);
      m = std::stoi(ss[1]);
   }
   catch (std::exception&)
   {
      return false;
   }
   if (m > 59)
      return false;
   if (h > 47)  // We shall allow 26 instead of 2am the next day but there is a limit
      return false;
   if (result != 0)
      *result = HourMin(h, m);
   return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %r14
leaq 0x44db(%rip), %rdx      # 0x80dd
leaq 0x469b(%rip), %rcx      # 0x82a4
leaq -0x58(%rbp), %rbx
movq %rbx, %rdi
callq 0x39cf
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
subq %rax, %rcx
cmpq $0x40, %rcx
jne 0x3d55
movq %r14, -0x38(%rbp)
movq (%rax), %r12
callq 0x3050
movq %rax, %rbx
movl (%rax), %eax
movl %eax, -0x2c(%rbp)
movl $0x0, (%rbx)
leaq -0x40(%rbp), %r13
movq %r12, %rdi
movq %r13, %rsi
movl $0xa, %edx
callq 0x3320
cmpq %r12, (%r13)
je 0x3cf9
movq %rax, %r15
movslq %r15d, %rax
cmpq %r15, %rax
jne 0x3d05
movl (%rbx), %r14d
cmpl $0x22, %r14d
je 0x3d05
testl %r14d, %r14d
jne 0x3c89
movl -0x2c(%rbp), %r14d
movl %r14d, (%rbx)
movq -0x58(%rbp), %rax
movq 0x20(%rax), %r12
movl $0x0, (%rbx)
movq %r12, %rdi
movq %r13, %rsi
movl $0xa, %edx
callq 0x3320
cmpq %r12, (%r13)
je 0x3d11
movabsq $-0x100000000, %rcx     # imm = 0xFFFFFFFF00000000
leaq -0x80000000(%rax), %rdx
cmpq %rcx, %rdx
jb 0x3d1d
movl (%rbx), %ecx
cmpl $0x22, %ecx
je 0x3d1d
testl %ecx, %ecx
jne 0x3cd1
movl %r14d, (%rbx)
xorl %ebx, %ebx
cmpl $0x2f, %r15d
ja 0x3d57
cmpl $0x3b, %eax
ja 0x3d57
movb $0x1, %bl
movq -0x38(%rbp), %rcx
testq %rcx, %rcx
je 0x3d57
shlq $0x20, %rax
andl $0x3f, %r15d
orq %rax, %r15
movq %r15, (%rcx)
jmp 0x3d57
leaq 0x4667(%rip), %rdi      # 0x8367
callq 0x3160
leaq 0x465b(%rip), %rdi      # 0x8367
callq 0x3330
leaq 0x464f(%rip), %rdi      # 0x8367
callq 0x3160
leaq 0x4643(%rip), %rdi      # 0x8367
callq 0x3330
movq %rax, %r15
cmpl $0x0, (%rbx)
jne 0x3d43
movl %r14d, (%rbx)
jmp 0x3d43
movq %rax, %r15
cmpl $0x0, (%rbx)
jne 0x3d43
movl -0x2c(%rbp), %eax
movl %eax, (%rbx)
cmpl $0x1, %edx
jne 0x3d74
movq %r15, %rdi
callq 0x3100
callq 0x33a0
xorl %ebx, %ebx
leaq -0x58(%rbp), %rdi
callq 0x63b6
movl %ebx, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
leaq -0x58(%rbp), %rdi
callq 0x63b6
movq %r15, %rdi
callq 0x33c0
// File: /workspace/github_cpp_makefile_star2_O3/Neurochrom[P]hours_calc/hours_calc.cpp
// Function: MinutesMap::PersonMonStats::update(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned int)
void update(const std::string& tow, unsigned minutes)
      {
         auto mi = s.find(tow);
         if (mi != s.end())
            mi->second += minutes;
         else
            s[tow] = minutes;
      }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
callq 0x6eb8
leaq 0x8(%r15), %rcx
cmpq %rcx, %rax
je 0x6b8b
addl %ebx, 0x40(%rax)
jmp 0x6b98
movq %r15, %rdi
movq %r14, %rsi
callq 0x6e38
movl %ebx, (%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/shirookad[P]propcpp/include/prop.h
// Function: prop::observable_property<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::set(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
inline T& set(const param_t value) {
			willSet(value);
			T oldValue = std::move(m_value);
			m_value = value;
			didSet(oldValue);
			return m_value;
		}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
cmpq $0x0, 0x30(%rdi)
je 0x1b5c
movq %rsi, %r14
movq %rdi, %rbx
addq $0x20, %rdi
callq *0x38(%rbx)
leaq -0x28(%rbp), %r15
movq %r15, -0x10(%r15)
movq (%rbx), %rcx
leaq 0x10(%rbx), %rax
cmpq %rax, %rcx
je 0x1afe
movq %rcx, -0x38(%rbp)
movq (%rax), %rcx
movq %rcx, -0x28(%rbp)
jmp 0x1b05
movups (%rax), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rbx), %rcx
movq %rcx, -0x30(%rbp)
movq %rax, (%rbx)
movq $0x0, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1080
cmpq $0x0, 0x50(%rbx)
je 0x1b61
leaq 0x40(%rbx), %rdi
leaq -0x38(%rbp), %rsi
callq *0x58(%rbx)
movq -0x38(%rbp), %rdi
cmpq %r15, %rdi
je 0x1b4e
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x10f0
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x1060
callq 0x1060
movq %rax, %rbx
movq -0x38(%rbp), %rdi
cmpq %r15, %rdi
je 0x1b7e
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x10f0
movq %rbx, %rdi
callq 0x1120
// File: /workspace/github_cpp_makefile_star2_O3/shirookad[P]propcpp/main.cpp
// Function: observerTest::~observerTest()
prop::observable_property<int> someOtherVal {
		WILL_SET(newValue) {
			//std::cout << "will set from " << currentValue << " to " << newValue << std::endl;
		},
		DID_SET(oldValue) {
			//std::cout << "did set from " << oldValue << " to " << newValue << std::endl;
		}
	};
	
	prop::computed_property<int> comp {
		GET {
			return 5;
		}
	};
	
	prop::observable_property<std::string> strVal {
		WILL_SET(newValue) { std::cout << "Will set from " << strVal.get() << " to " << newValue << std::endl; },
		DID_SET(oldValue) { std::cout << "Did set from " << oldValue << " to " << strVal.get() << std::endl; }
	};
	
	prop::readonly_property<observerTest, int> intVal { 5 };
	
	observerTest() { intVal.set(3); }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0xb8(%rdi), %rax
testq %rax, %rax
je 0x1bac
leaq 0xa8(%rbx), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x98(%rbx), %rax
testq %rax, %rax
je 0x1bc9
leaq 0x88(%rbx), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x68(%rbx), %rdi
leaq 0x78(%rbx), %rax
cmpq %rax, %rdi
je 0x1be1
movq (%rax), %rsi
incq %rsi
callq 0x10f0
movq 0x58(%rbx), %rax
testq %rax, %rax
je 0x1bf8
leaq 0x48(%rbx), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x38(%rbx), %rax
testq %rax, %rax
je 0x1c0f
leaq 0x28(%rbx), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x18(%rbx), %rax
testq %rax, %rax
je 0x1c29
addq $0x8, %rbx
movq %rbx, %rdi
movq %rbx, %rsi
movl $0x3, %edx
callq *%rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
jmp 0x1c38
jmp 0x1c38
jmp 0x1c38
jmp 0x1c38
movq %rax, %rdi
callq 0x1c40
// File: /workspace/github_cpp_makefile_star2_O3/mrlordkaj[P]i2cdevlib-pi/ADS1115/ADS1115.cpp
// Function: ADS1115::getConversion(bool)
int16_t ADS1115::getConversion(bool triggerAndPoll) {
    if (triggerAndPoll && devMode == ADS1115_MODE_SINGLESHOT) {
      triggerConversion();
      pollConversion(I2CDEV_DEFAULT_READ_TIMEOUT);
    }
    I2Cdev::readWord(devAddr, ADS1115_RA_CONVERSION, buffer);
    return buffer[0];
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
testl %esi, %esi
je 0x20510
cmpb $0x1, 0x6(%rbx)
jne 0x20510
movzbl (%rbx), %edi
movl $0x1, %esi
movl $0xf, %edx
movl $0x1, %ecx
callq 0x1f790
movq %rbx, %rdi
movl $0x3e8, %esi            # imm = 0x3E8
callq 0x1f430
movzbl (%rbx), %edi
leaq 0x2(%rbx), %rdx
movq 0x26a2a(%rip), %rax     # 0x46f48
movzwl (%rax), %ecx
xorl %esi, %esi
callq 0x1f6a0
movzwl 0x2(%rbx), %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/mrlordkaj[P]i2cdevlib-pi/ADS1115/ADS1115.cpp
// Function: createMask(unsigned int, unsigned int)
unsigned createMask(unsigned a, unsigned b) {
   unsigned mask = 0;
   for (unsigned i=a; i<=b; i++)
       mask |= 1 << i;
   return mask;
}

// Assembly:
xorl %eax, %eax
cmpl %esi, %edi
ja 0x20913
xorl %eax, %eax
btsl %edi, %eax
incl %edi
cmpl %esi, %edi
jbe 0x2090a
retq
// File: /workspace/github_cpp_makefile_star2_O3/mrlordkaj[P]i2cdevlib-pi/AK8975/AK8975.cpp
// Function: AK8975::getHeadingX()
int16_t AK8975::getHeadingX() {
    I2Cdev::writeByte(devAddr, AK8975_RA_CNTL, AK8975_MODE_SINGLE);
    delay(10);
    I2Cdev::readBytes(devAddr, AK8975_RA_HXL, 2, buffer);
    return (((int16_t)buffer[1]) << 8) | buffer[0];
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movzbl (%rdi), %edi
movl $0xa, %esi
movl $0x1, %edx
callq 0x1f5d0
movl $0xa, %edi
callq 0x1f460
movzbl (%rbx), %edi
leaq 0x1(%rbx), %rcx
movq 0x24dec(%rip), %rax     # 0x46f48
movzwl (%rax), %r8d
movl $0x3, %esi
movl $0x2, %edx
callq 0x1f630
movzwl 0x1(%rbx), %eax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/mrlordkaj[P]i2cdevlib-pi/AK8975/AK8975.cpp
// Function: AK8975::getHeadingZ()
int16_t AK8975::getHeadingZ() {
    I2Cdev::writeByte(devAddr, AK8975_RA_CNTL, AK8975_MODE_SINGLE);
    delay(10);
    I2Cdev::readBytes(devAddr, AK8975_RA_HZL, 2, buffer);
    return (((int16_t)buffer[1]) << 8) | buffer[0];
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movzbl (%rdi), %edi
movl $0xa, %esi
movl $0x1, %edx
callq 0x1f5d0
movl $0xa, %edi
callq 0x1f460
movzbl (%rbx), %edi
leaq 0x1(%rbx), %rcx
movq 0x24d5c(%rip), %rax     # 0x46f48
movzwl (%rax), %r8d
movl $0x7, %esi
movl $0x2, %edx
callq 0x1f630
movzwl 0x1(%rbx), %eax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/mrlordkaj[P]i2cdevlib-pi/AK8975/AK8975.cpp
// Function: AK8975::getAdjustmentX()
uint8_t AK8975::getAdjustmentX() {
    I2Cdev::writeByte(devAddr, AK8975_RA_CNTL, 0x0F); // Enter Fuse ROM access mode
    delay(10);
    I2Cdev::readByte(devAddr, AK8975_RA_ASAX, buffer);
    return buffer[0];
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movzbl (%rdi), %edi
movl $0xa, %esi
movl $0xf, %edx
callq 0x1f5d0
movl $0xa, %edi
callq 0x1f460
movzbl (%rbx), %edi
leaq 0x1(%rbx), %rdx
movq 0x24b5a(%rip), %rax     # 0x46f48
movzwl (%rax), %ecx
movl $0x10, %esi
callq 0x1f6d0
movb 0x1(%rbx), %al
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/mrlordkaj[P]i2cdevlib-pi/Arduino/Arduino.cpp
// Function: Serial::begin(int)
void _Serial::begin(int baudrate) {
    if (!inRunning) {
        inRunning = true;
        std::thread inThread(getLineFromCin, this);
        inThread.detach();
    }
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
cmpb $0x0, (%rdi)
jne 0x225a8
movb $0x1, (%rdi)
leaq 0x8(%rsp), %rdx
movq %rdi, (%rdx)
leaq 0x34(%rip), %rsi        # 0x225c2
movq %rsp, %rbx
movq %rbx, %rdi
callq 0x1f420
movq %rbx, %rdi
callq 0x1fa30
cmpq $0x0, (%rsp)
jne 0x225bd
addq $0x10, %rsp
popq %rbx
retq
cmpq $0x0, (%rsp)
jne 0x225bd
movq %rax, %rdi
callq 0x1fa40
callq 0x1f130
// File: /workspace/github_cpp_makefile_star2_O3/mrlordkaj[P]i2cdevlib-pi/Arduino/Arduino.cpp
// Function: getLineFromCin(_Serial*)
static void getLineFromCin(_Serial *serial) {
    std::string line;
    while (serial->inRunning) {
        std::getline(std::cin, line);
        serial->inChars.append(line);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq 0x10(%rsp), %r13
movq %r13, -0x10(%r13)
movq $0x0, -0x8(%r13)
movb $0x0, (%r13)
leaq 0x8(%rdi), %r14
movq 0x249dd(%rip), %r15     # 0x46fd0
movq %rsp, %r12
cmpb $0x1, (%rbx)
jne 0x22630
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x1f560
movsbl %al, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x1fa90
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %r14, %rdi
callq 0x1f180
jmp 0x225f6
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x22646
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1f5f0
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x2266d
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1f5f0
movq %rbx, %rdi
callq 0x1fa40
nop
// File: /workspace/github_cpp_makefile_star2_O3/mrlordkaj[P]i2cdevlib-pi/Arduino/Arduino.cpp
// Function: Serial::read()
int _Serial::read() {
    if (inChars.length() > 0) {
        int d = inChars.at(0);
        inChars.erase(0);
        return d;
    }
    return -1;
}

// Assembly:
cmpq $0x0, 0x10(%rdi)
je 0x22698
movq 0x8(%rdi), %rcx
movsbl (%rcx), %eax
movq $0x0, 0x10(%rdi)
movb $0x0, (%rcx)
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
// File: /workspace/github_cpp_makefile_star2_O3/mrlordkaj[P]i2cdevlib-pi/Arduino/Arduino.cpp
// Function: Serial::print(long, int)
void _Serial::print(long val, int format) {
    switch (format) {
        case HEX:
            std::cout << std::hex << std::uppercase << val;
            return;
        case DEC:
            std::cout << std::dec << val;
            return;
        case OCT:
            std::cout << std::oct << val;
            return;
        case BIN:
            std::cout << std::bitset<8>(val);
            return;
    }
}

// Assembly:
addl $-0x2, %edx
rorl %edx
cmpl $0x7, %edx
ja 0x226fb
leaq 0x12989(%rip), %rax     # 0x35060
movslq (%rax,%rdx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
pushq %rax
movzbl %sil, %eax
movq %rsp, %rsi
movq %rax, (%rsi)
movq 0x2489e(%rip), %rdi     # 0x46f90
callq 0x1f760
addq $0x8, %rsp
retq
movq 0x2488d(%rip), %rdi     # 0x46f90
movq (%rdi), %rax
movq -0x18(%rax), %rax
movl 0x18(%rdi,%rax), %ecx
andl $-0x4b, %ecx
orl $0x2, %ecx
jmp 0x2272e
movq 0x24873(%rip), %rdi     # 0x46f90
movq (%rdi), %rax
movq -0x18(%rax), %rax
movl 0x18(%rdi,%rax), %ecx
andl $-0x4b, %ecx
orl $0x40, %ecx
movl %ecx, 0x18(%rdi,%rax)
jmp 0x1f550
movq 0x24852(%rip), %rdi     # 0x46f90
movq (%rdi), %rax
movq -0x18(%rax), %rcx
movl 0x18(%rdi,%rcx), %edx
andl $-0x4b, %edx
orl $0x8, %edx
movl %edx, 0x18(%rdi,%rcx)
movq -0x18(%rax), %rax
orl $0x4000, 0x18(%rdi,%rax) # imm = 0x4000
jmp 0x1f550
// File: /workspace/github_cpp_makefile_star2_O3/mrlordkaj[P]i2cdevlib-pi/Arduino/Wire.cpp
// Function: TwoWire::begin()
void TwoWire::begin() {
    if (fd < 0) {
        int rev = piGpioLayout();
        const char *device = (rev == 1) ? "/dev/i2c-0" : "/dev/i2c-1";
        if ((fd = open(device, O_RDWR)) < 0) {
            std::cerr << "Failed to open I2C port: " << strerror(errno) << "\r\n" << std::flush;
        }
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpl $0x0, 0x4(%rdi)
jns 0x22a2a
movq %rdi, %rbx
callq 0x1fb20
cmpl $0x1, %eax
leaq 0x1272a(%rip), %rax     # 0x35136
leaq 0x1272e(%rip), %rdi     # 0x35141
cmoveq %rax, %rdi
movl $0x2, %esi
xorl %eax, %eax
callq 0x1f3c0
movl %eax, 0x4(%rbx)
testl %eax, %eax
js 0x22a32
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x245b7(%rip), %rbx     # 0x46ff0
leaq 0x1270c(%rip), %rsi     # 0x3514c
movl $0x19, %edx
movq %rbx, %rdi
callq 0x1f680
callq 0x1f040
movl (%rax), %edi
callq 0x1f190
testq %rax, %rax
je 0x22a7d
movq %rax, %r14
movq %rax, %rdi
callq 0x1f200
movq 0x24580(%rip), %rdi     # 0x46ff0
movq %r14, %rsi
movq %rax, %rdx
callq 0x1f680
jmp 0x22a94
movq (%rbx), %rax
movq -0x18(%rax), %rax
leaq (%rbx,%rax), %rdi
movl 0x20(%rbx,%rax), %esi
orl $0x1, %esi
callq 0x1f9e0
movq 0x24555(%rip), %rbx     # 0x46ff0
leaq 0x12709(%rip), %rsi     # 0x351ab
movl $0x2, %edx
movq %rbx, %rdi
callq 0x1f680
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1f390
// File: /workspace/github_cpp_makefile_star2_O3/mrlordkaj[P]i2cdevlib-pi/Arduino/Wire.cpp
// Function: TwoWire::begin(unsigned char)
void TwoWire::begin(uint8_t address) {
    begin();
    if (address != addr) {
        addr = address;
        if (fd < 0 || ioctl(fd, I2C_SLAVE, address) < 0) {
            std::cerr << "Failed to open I2C device: " << strerror(errno) << "\r\n" << std::flush;
            addr = 0;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
callq 0x1f7c0
cmpb %bpl, (%rbx)
je 0x22b81
movb %bpl, (%rbx)
movl 0x4(%rbx), %edi
testl %edi, %edi
js 0x22af8
movl $0x703, %esi            # imm = 0x703
movl %ebp, %edx
xorl %eax, %eax
callq 0x1f840
testl %eax, %eax
jns 0x22b81
movq 0x244f1(%rip), %r14     # 0x46ff0
leaq 0x12660(%rip), %rsi     # 0x35166
movl $0x1b, %edx
movq %r14, %rdi
callq 0x1f680
callq 0x1f040
movl (%rax), %edi
callq 0x1f190
testq %rax, %rax
je 0x22b43
movq %rax, %r15
movq %rax, %rdi
callq 0x1f200
movq 0x244ba(%rip), %rdi     # 0x46ff0
movq %r15, %rsi
movq %rax, %rdx
callq 0x1f680
jmp 0x22b5b
movq (%r14), %rax
movq -0x18(%rax), %rax
leaq (%r14,%rax), %rdi
movl 0x20(%r14,%rax), %esi
orl $0x1, %esi
callq 0x1f9e0
movq 0x2448e(%rip), %r14     # 0x46ff0
leaq 0x12642(%rip), %rsi     # 0x351ab
movl $0x2, %edx
movq %r14, %rdi
callq 0x1f680
movq %r14, %rdi
callq 0x1f390
movb $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/mrlordkaj[P]i2cdevlib-pi/Arduino/Wire.cpp
// Function: TwoWire::end()
void TwoWire::end() {
    if (fd >= 0) {
        close(fd);
        fd = -1;
    }
    addr = 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0x4(%rdi), %edi
testl %edi, %edi
js 0x22bad
callq 0x1fb00
movl $0xffffffff, 0x4(%rbx)  # imm = 0xFFFFFFFF
movb $0x0, (%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/mrlordkaj[P]i2cdevlib-pi/Arduino/Wire.cpp
// Function: TwoWire::endTransmission(bool)
uint8_t TwoWire::endTransmission(bool sendStop) {
    // TODO: sendStop
    if (addr > 0 && fd >= 0) {
        if (writeOffset > 0) {
            int written = i2cWrite(fd, &writeBuffer, writeOffset);
            if (written < 0) {
                return 2; // address send, NACK received
            } else if (written < writeOffset) {
                return 3; // data send, NACK received
            }
        }
        return 0; // success
    }
    return 4; // other error
}

// Assembly:
movb $0x4, %al
cmpb $0x0, (%rdi)
je 0x22c3e
pushq %rbx
movq %rdi, %rbx
movl 0x4(%rdi), %edi
testl %edi, %edi
js 0x22c3d
movslq 0x50(%rbx), %rdx
testq %rdx, %rdx
jle 0x22c3b
leaq 0x30(%rbx), %rsi
callq 0x1f1a0
movq %rax, %rcx
testl %ecx, %ecx
setns %al
orb $0x2, %al
testl %ecx, %ecx
js 0x22c3d
cmpl %ecx, 0x50(%rbx)
jg 0x22c3d
xorl %eax, %eax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/mrlordkaj[P]i2cdevlib-pi/Arduino/Wire.cpp
// Function: TwoWire::write(unsigned char const*, unsigned long)
size_t TwoWire::write(const uint8_t *data, size_t quantity) {
    if (addr > 0) {
        quantity = min(BUFFER_LENGTH-writeOffset, quantity);
        if (quantity > 0) {
            memcpy(writeBuffer+writeOffset, data, quantity);
            writeOffset += quantity;
            return quantity;
        }
        return 0;
    }
    return -1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpb $0x0, (%rdi)
je 0x22c82
movq %rdi, %r14
movslq 0x50(%rdi), %rax
movl $0x20, %ebx
subq %rax, %rbx
cmpq %rdx, %rbx
cmovaeq %rdx, %rbx
testq %rbx, %rbx
je 0x22c8b
leaq (%r14,%rax), %rdi
addq $0x30, %rdi
movq %rbx, %rdx
callq 0x1f480
addl %ebx, 0x50(%r14)
jmp 0x22c8d
movq $-0x1, %rbx
jmp 0x22c8d
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/mrlordkaj[P]i2cdevlib-pi/Arduino/Wire.cpp
// Function: TwoWire::requestFrom(unsigned char, unsigned char, unsigned int, unsigned char, unsigned char)
uint8_t TwoWire::requestFrom(uint8_t address, uint8_t quantity, uint32_t iaddress, uint8_t isize, uint8_t sendStop) {
    // TODO: sendStop
    
    if (isize > 0) {
        // send internal address
        beginTransmission(address);
        // the maximum size of internal address is 3 bytes
        if (isize > 3){
            isize = 3;
        }
        // write internal register address - most significant byte first
        while (isize-- > 0)
            write((uint8_t)(iaddress >> (isize*8)));
        endTransmission(false);
    }
    
    // send data
    beginTransmission(address);
    if (addr > 0) {
        if (quantity > BUFFER_LENGTH) {
            // clamp to buffer length
            quantity = BUFFER_LENGTH;
        }
        readAvailable = i2cRead(fd, (uint8_t*)&readBuffer, quantity);
        return readAvailable;
    }
    return -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebp
movq %rdi, %rbx
movzbl %sil, %r14d
testl %r8d, %r8d
je 0x22d44
movl %r8d, %r12d
movl %ecx, %r15d
movq %rbx, %rdi
movl %r14d, %esi
callq 0x1f4e0
xorl %edx, %edx
movl %edx, 0x2c(%rbx)
movzbl %r12b, %ecx
cmpb $0x3, %cl
movl $0x3, %eax
cmovbl %ecx, %eax
movl %edx, 0x50(%rbx)
leal -0x1(%rax), %ecx
movzbl %cl, %ecx
shll $0x3, %ecx
movl %r15d, %edi
shrl %cl, %edi
cmpb $0x0, (%rbx)
je 0x22d2d
movl $0x20, %esi
cmpl $0x20, %edx
je 0x22d2f
movslq %edx, %rdx
movb %dil, 0x30(%rbx,%rdx)
movl 0x50(%rbx), %esi
incl %esi
movl %esi, 0x50(%rbx)
jmp 0x22d2f
movl %edx, %esi
decb %al
addl $-0x8, %ecx
movl %esi, %edx
testb %al, %al
jne 0x22d07
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1f660
movq %rbx, %rdi
movl %r14d, %esi
callq 0x1f4e0
xorl %eax, %eax
movl %eax, 0x2c(%rbx)
movl %eax, 0x50(%rbx)
cmpb $0x0, (%rbx)
je 0x22d7e
movzbl %bpl, %eax
cmpb $0x20, %al
movl $0x20, %ecx
cmovbl %eax, %ecx
movl 0x4(%rbx), %edi
leaq 0x8(%rbx), %rsi
movzbl %cl, %edx
callq 0x1f890
movl %eax, 0x28(%rbx)
jmp 0x22d80
movb $-0x1, %al
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/mrlordkaj[P]i2cdevlib-pi/Arduino/wiringPi/softPwm.c
// Function: softPwmWrite
void softPwmWrite (int pin, int value)
{
  if (pin < MAX_PINS)
  {
    /**/ if (value < 0)
      value = 0 ;
    else if (value > range [pin])
      value = range [pin] ;

    marks [pin] = value ;
  }
}

// Assembly:
cmpl $0x3f, %edi
jg 0x22ec7
movslq %edi, %rax
testl %esi, %esi
js 0x22ebb
leaq 0x24eb1(%rip), %rcx     # 0x47d60
movl (%rcx,%rax,4), %edx
cmpl %esi, %edx
jge 0x22ebd
movl (%rcx,%rax,4), %esi
jmp 0x22ebd
xorl %esi, %esi
leaq 0x24f9c(%rip), %rcx     # 0x47e60
movl %esi, (%rcx,%rax,4)
retq