LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/magmastonealex[P]fbkeyboard/src/Input.cpp
// Function: Input::getNextEvent()
Touch Input::getNextEvent() {
	inputEvent event;
	eventStream.read((char*)&event, sizeof(event));
	int keepLooping = 1;
	int touchX;
	int touchY;
	int isDown = 0;
	while(isDown == 0) {
		while(keepLooping) {
			if(event.code == 57 && ((int)event.value != -1)) {
				isDown = 1;
			}
			if(event.code == 0x35) {
				touchX = event.value;
			}
			if(event.code == 0x36) {
				touchY = event.value;
			}
			eventStream.read((char*)&event, sizeof(event));
			if(event.type == 0 && event.code == 0 && event.value == 0) {
				keepLooping = 0;
			}
		}
		keepLooping = 1;
	}
	return Touch(touchX, touchY);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq %rsp, %rsi
pushq $0x18
popq %rdx
movq %rdx, %r15
callq 0x21c0
xorl %r14d, %r14d
pushq $0x1
popq %r13
testl %r14d, %r14d
jne 0x2eb7
xorl %eax, %eax
xorl %r14d, %r14d
testb $0x1, %al
jne 0x2e58
movl 0x14(%rsp), %eax
cmpl $-0x1, %eax
movl %r14d, %ecx
cmovnel %r13d, %ecx
movzwl 0x12(%rsp), %edx
cmpw $0x39, %dx
cmovel %ecx, %r14d
cmpw $0x35, %dx
cmovel %eax, %ebp
cmpw $0x36, %dx
cmovel %eax, %r12d
movq %rbx, %rdi
movq %rsp, %rsi
movq %r15, %rdx
callq 0x21c0
movzwl 0x12(%rsp), %eax
orw 0x10(%rsp), %ax
sete %cl
cmpl $0x0, 0x14(%rsp)
sete %al
andb %cl, %al
jmp 0x2e62
shlq $0x20, %r12
movl %ebp, %eax
orq %r12, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/aadityanaik[P]LongNums/src/longnums.cpp
// Function: LongNumber::LongNumber(LongNumber const&)
LongNumber::LongNumber(const LongNumber& X) {
	//equating the two vectors
	digits = X.digits;

	//equating the booleans
	negative = X.negative;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
callq 0x49be
movb 0x18(%r14), %al
movb %al, 0x18(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x4d9a
movq %r14, %rdi
callq 0x2190
// File: /workspace/github_cpp_makefile_star2_O2/aadityanaik[P]LongNums/src/longnums.cpp
// Function: LongNumber::absolute()
LongNumber LongNumber::absolute() {
	LongNumber ans;

	ans.digits = digits;
	ans.negative = false;

	return ans;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x2720
movq %rbx, %rdi
movq %r14, %rsi
callq 0x49be
movb $0x0, 0x18(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x4d9a
movq %r14, %rdi
callq 0x2190
// File: /workspace/github_cpp_makefile_star2_O2/aadityanaik[P]LongNums/src/longnums.cpp
// Function: operator>>(std::istream&, LongNumber&)
std::istream& operator>>(std::istream& input, LongNumber& X) {
	std::string number;
	input >> number;
	X = number;

	return input;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x8(%rsp), %rsi
callq 0x2120
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x27d2
leaq 0x8(%rsp), %rdi
callq 0x2070
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x2070
movq %rbx, %rdi
callq 0x2190
// File: /workspace/github_cpp_makefile_star2_O2/aadityanaik[P]LongNums/src/longnums.cpp
// Function: operator<<(std::ostream&, LongNumber const&)
std::ostream& operator<<(std::ostream& output, const LongNumber& X) {
	std::string printed;
	if (X.negative) {
		output << "-";
	}

	output << *(X.digits.end()-1);

	for(int i = X.digits.size() - 2; i >= 0; i--) {
		printed = std::to_string(X.digits[i]);
		while(printed.length() < 9) {
			printed = "0" + printed;
		}
		output << printed;
	}

	return output;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movq %rdi, %rbx
movb $0x0, (%rax)
cmpb $0x1, 0x18(%rsi)
jne 0x2aed
leaq 0x359b(%rip), %rsi      # 0x6080
movq %rbx, %rdi
callq 0x20e0
movq 0x8(%r14), %rax
movl -0x4(%rax), %esi
movq %rbx, %rdi
callq 0x2170
movq 0x8(%r14), %rbp
subq (%r14), %rbp
shrq $0x2, %rbp
addl $-0x2, %ebp
leaq 0x28(%rsp), %r15
leaq 0x8(%rsp), %r12
leaq 0x3580(%rip), %r13      # 0x609b
testl %ebp, %ebp
js 0x2b69
movl %ebp, %eax
movq (%r14), %rcx
movl (%rcx,%rax,4), %esi
movq %r15, %rdi
callq 0x4965
movq %r12, %rdi
movq %r15, %rsi
callq 0x2110
movq %r15, %rdi
callq 0x2070
cmpq $0x8, 0x10(%rsp)
ja 0x2b5a
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x4b3d
jmp 0x2b2f
movq %rbx, %rdi
movq %r12, %rsi
callq 0x20c0
decl %ebp
jmp 0x2b1b
leaq 0x8(%rsp), %rdi
callq 0x2070
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2b8d
jmp 0x2b8d
jmp 0x2b8d
jmp 0x2b8d
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x2070
movq %rbx, %rdi
callq 0x2190
// File: /workspace/github_cpp_makefile_star2_O2/aadityanaik[P]LongNums/src/longnums.cpp
// Function: LongNumber::operator<(LongNumber const&)
bool LongNumber::operator<(const LongNumber& X) {
	if (!negative) {
		if (X.negative) {
			return false;
		}

		else {
			if (digits.size() > X.digits.size()) {
				return false;
			} else if (digits.size() == X.digits.size()) {
				for (int i = digits.size() - 1; i >= 0; i--) {
					if (digits[i] < X.digits[i]) {
						return true;
					} else if(digits[i] > X.digits[i]){
						return false;
					}
				}

				return false;
			} else {
				return true;
			}
		}
	}

	else {
		if (!X.negative) {
			return true;
		}

		else {
			if (digits.size() > X.digits.size()) {
				return true;
			} else if (digits.size() == X.digits.size()) {
				for (int i = digits.size() - 1; i >= 0; i--) {
					if (digits[i] > X.digits[i]) {
						return true;
					} else if (digits[i] < X.digits[i]) {
						return false;
					}
				}

				return false;
			} else {
				return false;
			}
		}
	}
}

// Assembly:
movb 0x18(%rsi), %cl
cmpb $0x0, 0x18(%rdi)
je 0x2c07
movb $0x1, %al
testb %cl, %cl
je 0x2c2e
movq (%rdi), %rcx
movq 0x8(%rdi), %rdi
subq %rcx, %rdi
sarq $0x2, %rdi
movq (%rsi), %rdx
movq 0x8(%rsi), %rsi
subq %rdx, %rsi
sarq $0x2, %rsi
cmpq %rsi, %rdi
ja 0x2c2e
jne 0x2c2c
movl %edi, %esi
decq %rsi
movq %rsi, %rax
testl %eax, %eax
js 0x2c67
movl %eax, %esi
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
shlq $0x2, %rsi
movl (%rcx,%rsi), %edi
movl (%rdx,%rsi), %r8d
cmpl %r8d, %edi
jg 0x2c64
leaq -0x1(%rax), %rsi
cmpl %r8d, %edi
jge 0x2bd9
jmp 0x2c60
testb %cl, %cl
jne 0x2c2c
movq (%rdi), %rcx
movq 0x8(%rdi), %rdi
subq %rcx, %rdi
sarq $0x2, %rdi
movq (%rsi), %rdx
movq 0x8(%rsi), %rax
subq %rdx, %rax
sarq $0x2, %rax
cmpq %rax, %rdi
jbe 0x2c2f
xorl %eax, %eax
retq
movb $0x1, %al
jne 0x2c2e
movl %edi, %esi
decq %rsi
movq %rsi, %rax
testl %eax, %eax
js 0x2c67
movl %eax, %esi
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
shlq $0x2, %rsi
movl (%rcx,%rsi), %edi
movl (%rdx,%rsi), %r8d
cmpl %r8d, %edi
jl 0x2c64
leaq -0x1(%rax), %rsi
cmpl %r8d, %edi
jle 0x2c38
xorl %esi, %esi
jmp 0x2c67
movb $0x1, %sil
testl %eax, %eax
setns %al
andb %sil, %al
retq
// File: /workspace/github_cpp_makefile_star2_O2/aadityanaik[P]LongNums/src/longnums.cpp
// Function: LongNumber::operator*(long)
LongNumber LongNumber::operator*(long int X) {
	if(X == 0) {
		return LongNumber();
	} else {
	LongNumber answer;
	long int product = 0, carry = 0;
	answer.digits.erase(answer.digits.begin(), answer.digits.end());

	for(int i = 0; i < digits.size(); i++) {
		product = X * (digits)[i] + carry;
		carry = product / BASE;
		product = product % BASE;
		answer.digits.push_back(product);
	}
	while (carry > 0) {
		answer.digits.push_back(carry % BASE);
		carry /= BASE;
	}

	return answer;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
callq 0x2720
testq %r14, %r14
je 0x3e0b
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %rbx, %rdi
callq 0x4ae0
xorl %ebp, %ebp
leaq 0x4(%rsp), %r13
xorl %r12d, %r12d
movq (%r15), %rax
movq 0x8(%r15), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
cmpq %rbp, %rcx
jbe 0x3dd2
movslq (%rax,%rbp,4), %rax
imulq %r14, %rax
addq %r12, %rax
movslq 0x5342(%rip), %rcx      # 0x90f8
cqto
idivq %rcx
movl %edx, 0x4(%rsp)
movq %rax, %r12
movq %rbx, %rdi
movq %r13, %rsi
callq 0x4da8
incq %rbp
jmp 0x3d91
movq %rsp, %r14
testq %r12, %r12
jle 0x3e0b
movslq 0x5317(%rip), %rcx      # 0x90f8
movq %r12, %rax
cqto
idivq %rcx
movl %edx, (%rsp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4da8
movslq 0x52fa(%rip), %rcx      # 0x90f8
movq %r12, %rax
cqto
idivq %rcx
movq %rax, %r12
jmp 0x3dd5
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3e21
jmp 0x3e21
movq %rax, %r14
movq %rbx, %rdi
callq 0x4d9a
movq %r14, %rdi
callq 0x2190
// File: /workspace/github_cpp_makefile_star2_O2/aadityanaik[P]LongNums/src/longnums.cpp
// Function: LongNumber::operator%(LongNumber)
LongNumber LongNumber::operator%(LongNumber X) {
	LongNumber quotient;
	LongNumber remainder;

	quotient = (*this) / X;
	
	remainder = (*this) - (X * quotient);

	return remainder;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xa0, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x20(%rsp), %rdi
callq 0x2720
movq %rbx, %rdi
callq 0x2720
leaq 0x80(%rsp), %rdi
movq %r15, %rsi
callq 0x2764
movq %rsp, %rdi
leaq 0x80(%rsp), %rdx
movq %r14, %rsi
callq 0x3e34
leaq 0x20(%rsp), %rdi
movq %rsp, %rsi
callq 0x4bdc
movq %rsp, %rdi
callq 0x4d9a
leaq 0x80(%rsp), %rdi
callq 0x4d9a
leaq 0x40(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x2764
leaq 0x60(%rsp), %rdi
leaq 0x40(%rsp), %rdx
movq %r15, %rsi
callq 0x321e
movq %rsp, %rdi
leaq 0x60(%rsp), %rdx
movq %r14, %rsi
callq 0x2f36
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x4bdc
movq %rsp, %rdi
callq 0x4d9a
leaq 0x60(%rsp), %rdi
callq 0x4d9a
leaq 0x40(%rsp), %rdi
callq 0x4d9a
leaq 0x20(%rsp), %rdi
callq 0x4d9a
movq %rbx, %rax
addq $0xa0, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq %rsp, %rdi
callq 0x4d9a
jmp 0x4564
movq %rax, %r14
leaq 0x60(%rsp), %rdi
callq 0x4d9a
jmp 0x4573
movq %rax, %r14
leaq 0x40(%rsp), %rdi
jmp 0x4594
jmp 0x459b
movq %rax, %r14
movq %rsp, %rdi
callq 0x4d9a
jmp 0x458c
movq %rax, %r14
leaq 0x80(%rsp), %rdi
callq 0x4d9a
jmp 0x459e
movq %rax, %r14
movq %rbx, %rdi
callq 0x4d9a
leaq 0x20(%rsp), %rdi
callq 0x4d9a
movq %r14, %rdi
callq 0x2190
movq %rax, %r14
jmp 0x45a6
nop
// File: /workspace/github_cpp_makefile_star2_O2/WeiqiangZhou[P]BIRD/source/create_library_function.cpp
// Function: ReadVector_d(char*, double*)
int ReadVector_d(char *infile, double *data)
{
	FILE *p_in;
	int i = 0;
	double temp_double;
	p_in = fopen(infile, "r");
	if (p_in != NULL)
	{
		std::cout << "Reading " << infile << "..." << std::endl;
		while (!feof(p_in) && fscanf(p_in, "%lf", &temp_double) == 1)
		{
			data[i] = temp_double;
			i++;
		}
		fclose(p_in);
	}
	else
	{
		std::cout << "Error! File "<<infile<<" not found!" << std::endl;
		return 1;
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x1ac3(%rip), %rsi      # 0x53ce
callq 0x2130
testq %rax, %rax
je 0x3994
movq %rax, %r14
movq 0x36b9(%rip), %rdi      # 0x6fd8
leaq 0x1a5c(%rip), %rsi      # 0x5382
callq 0x2100
movq %rax, %rdi
movq %r15, %rsi
callq 0x2100
leaq 0x1a07(%rip), %rsi      # 0x5344
movq %rax, %rdi
callq 0x2100
movq %rax, %rdi
callq 0x2090
leaq 0x1c00(%rip), %r15      # 0x5554
leaq -0x28(%rbp), %r12
movq %r14, %rdi
callq 0x2170
testl %eax, %eax
jne 0x3988
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
xorl %eax, %eax
callq 0x21d0
cmpl $0x1, %eax
jne 0x3988
movsd -0x28(%rbp), %xmm0
movsd %xmm0, (%rbx)
addq $0x8, %rbx
jmp 0x3958
movq %r14, %rdi
callq 0x2110
xorl %eax, %eax
jmp 0x39cc
movq 0x363d(%rip), %rdi      # 0x6fd8
leaq 0x1b75(%rip), %rsi      # 0x5517
callq 0x2100
movq %rax, %rdi
movq %r15, %rsi
callq 0x2100
leaq 0x1b6b(%rip), %rsi      # 0x5524
movq %rax, %rdi
callq 0x2100
movq %rax, %rdi
callq 0x2090
pushq $0x1
popq %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/WeiqiangZhou[P]BIRD/source/create_library_function.cpp
// Function: ReadVector_i(char*, int*)
int ReadVector_i(char *infile, int *data)
{
	FILE *p_in;
	int i = 0;
	int temp_int;
	p_in = fopen(infile, "r");
	if (p_in != NULL)
	{
		std::cout << "Reading " << infile << "..." << std::endl;
		while (!feof(p_in) && fscanf(p_in, "%d", &temp_int) == 1)
		{
			data[i] = temp_int;
			i++;
		}
		fclose(p_in);
	}
	else
	{
		std::cout << "Error! File " << infile << " not found!" << std::endl;
		return 1;
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x19d9(%rip), %rsi      # 0x53ce
callq 0x2130
testq %rax, %rax
je 0x3a7a
movq %rax, %r14
movq 0x35cf(%rip), %rdi      # 0x6fd8
leaq 0x1972(%rip), %rsi      # 0x5382
callq 0x2100
movq %rax, %rdi
movq %r15, %rsi
callq 0x2100
leaq 0x191d(%rip), %rsi      # 0x5344
movq %rax, %rdi
callq 0x2100
movq %rax, %rdi
callq 0x2090
leaq 0x1950(%rip), %r15      # 0x538e
leaq -0x24(%rbp), %r12
movq %r14, %rdi
callq 0x2170
testl %eax, %eax
jne 0x3a6e
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
xorl %eax, %eax
callq 0x21d0
cmpl $0x1, %eax
jne 0x3a6e
movl -0x24(%rbp), %eax
movl %eax, (%rbx)
addq $0x4, %rbx
jmp 0x3a42
movq %r14, %rdi
callq 0x2110
xorl %eax, %eax
jmp 0x3ab2
movq 0x3557(%rip), %rdi      # 0x6fd8
leaq 0x1a8f(%rip), %rsi      # 0x5517
callq 0x2100
movq %rax, %rdi
movq %r15, %rsi
callq 0x2100
leaq 0x1a85(%rip), %rsi      # 0x5524
movq %rax, %rdi
callq 0x2100
movq %rax, %rdi
callq 0x2090
pushq $0x1
popq %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/WeiqiangZhou[P]BIRD/source/create_library_function.cpp
// Function: ReadMatrix_d(char*, double**)
int ReadMatrix_d(char *file, double **data)
{
	std::ifstream infile(file);
	std::string line_temp;
	std::string line_token;
	int m, k;
	m = 0;
	if (infile.is_open())
	{
		std::cout << "Reading " << file << "..." << std::endl;
		while (!infile.eof())
		{
			std::getline(infile, line_temp);
			if (line_temp.empty()){ break; }
			std::stringstream each_line(line_temp);
			k = 0;
			while (std::getline(each_line, line_token, '\t'))
			{
				data[k][m] = atof(line_token.c_str());
				k++;
			}
			m++;
		}

		infile.close();
	}
	else
	{
		std::cout << "Error! File " << file << " not found!" << std::endl;
		return 1;
	}

	return 0;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3d8, %rsp            # imm = 0x3D8
movq %rsi, -0x30(%rbp)
movq %rdi, %r14
leaq -0x278(%rbp), %rdi
pushq $0x8
popq %rdx
movq %r14, %rsi
callq 0x21c0
leaq -0x40(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
leaq -0x60(%rbp), %rcx
movq %rcx, -0x10(%rcx)
andq $0x0, -0x8(%rcx)
xorl %edx, %edx
movb %dl, (%rax)
movb %dl, (%rcx)
leaq -0x200(%rbp), %rdi
callq 0x2060
testb %al, %al
je 0x3bf6
movq 0x34b1(%rip), %rdi      # 0x6fd8
leaq 0x1854(%rip), %rsi      # 0x5382
callq 0x2100
movq %rax, %rdi
movq %r14, %rsi
callq 0x2100
leaq 0x17ff(%rip), %rsi      # 0x5344
movq %rax, %rdi
callq 0x2100
movq %rax, %rdi
callq 0x2090
xorl %ebx, %ebx
leaq -0x50(%rbp), %r15
leaq -0x400(%rbp), %r12
leaq -0x70(%rbp), %r13
pushq $0x9
popq %r14
movq -0x278(%rbp), %rax
movq -0x18(%rax), %rax
testb $0x2, -0x258(%rbp,%rax)
jne 0x3c30
leaq -0x278(%rbp), %rdi
movq %r15, %rsi
callq 0x2040
cmpq $0x0, -0x48(%rbp)
je 0x3c30
movq %r12, %rdi
movq %r15, %rsi
pushq $0x18
popq %rdx
callq 0x2190
movq -0x30(%rbp), %r15
movq %r12, %rdi
movq %r13, %rsi
movl %r14d, %edx
callq 0x21e0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x3be2
movq -0x70(%rbp), %rdi
callq 0x2140
movq (%r15), %rax
movsd %xmm0, (%rax,%rbx,8)
addq $0x8, %r15
jmp 0x3baf
incq %rbx
movq %r12, %rdi
callq 0x20c0
leaq -0x50(%rbp), %r15
jmp 0x3b6a
movq 0x33db(%rip), %rdi      # 0x6fd8
leaq 0x1913(%rip), %rsi      # 0x5517
callq 0x2100
movq %rax, %rdi
movq %r14, %rsi
callq 0x2100
leaq 0x1909(%rip), %rsi      # 0x5524
movq %rax, %rdi
callq 0x2100
movq %rax, %rdi
callq 0x2090
pushq $0x1
popq %rbx
jmp 0x3c3e
xorl %ebx, %ebx
leaq -0x278(%rbp), %rdi
callq 0x2050
leaq -0x70(%rbp), %rdi
callq 0x2080
leaq -0x50(%rbp), %rdi
callq 0x2080
leaq -0x278(%rbp), %rdi
callq 0x2070
movl %ebx, %eax
addq $0x3d8, %rsp            # imm = 0x3D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3c74
jmp 0x3c74
movq %rax, %rbx
jmp 0x3c88
movq %rax, %rbx
leaq -0x400(%rbp), %rdi
callq 0x20c0
leaq -0x70(%rbp), %rdi
callq 0x2080
leaq -0x50(%rbp), %rdi
callq 0x2080
leaq -0x278(%rbp), %rdi
callq 0x2070
movq %rbx, %rdi
callq 0x21b0
// File: /workspace/github_cpp_makefile_star2_O2/WeiqiangZhou[P]BIRD/source/create_library_function.cpp
// Function: ReadMatrix_i(char*, int**)
int ReadMatrix_i(char *file, int **data)
{
	std::ifstream infile(file);
	std::string line_temp;
	std::string line_token;
	int m, k;
	m = 0;
	if (infile.is_open())
	{
		std::cout << "Reading " << file << "..." << std::endl;
		while (!infile.eof())
		{
			std::getline(infile, line_temp);
			if (line_temp.empty()){ break; }
			std::stringstream each_line(line_temp);
			k = 0;
			while (std::getline(each_line, line_token, '\t'))
			{
				data[k][m] = atoi(line_token.c_str());
				k++;
			}
			m++;
		}

		infile.close();
	}
	else
	{
		std::cout << "Error! File " << file << " not found!" << std::endl;
		return 1;
	}

	return 0;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3d8, %rsp            # imm = 0x3D8
movq %rsi, -0x30(%rbp)
movq %rdi, %r14
leaq -0x278(%rbp), %rdi
pushq $0x8
popq %rdx
movq %r14, %rsi
callq 0x21c0
leaq -0x40(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
leaq -0x60(%rbp), %rcx
movq %rcx, -0x10(%rcx)
andq $0x0, -0x8(%rcx)
xorl %edx, %edx
movb %dl, (%rax)
movb %dl, (%rcx)
leaq -0x200(%rbp), %rdi
callq 0x2060
testb %al, %al
je 0x3de3
movq 0x32c2(%rip), %rdi      # 0x6fd8
leaq 0x1665(%rip), %rsi      # 0x5382
callq 0x2100
movq %rax, %rdi
movq %r14, %rsi
callq 0x2100
leaq 0x1610(%rip), %rsi      # 0x5344
movq %rax, %rdi
callq 0x2100
movq %rax, %rdi
callq 0x2090
xorl %ebx, %ebx
leaq -0x50(%rbp), %r15
leaq -0x400(%rbp), %r12
leaq -0x70(%rbp), %r13
pushq $0x9
popq %r14
movq -0x278(%rbp), %rax
movq -0x18(%rax), %rax
testb $0x2, -0x258(%rbp,%rax)
jne 0x3e1d
leaq -0x278(%rbp), %rdi
movq %r15, %rsi
callq 0x2040
cmpq $0x0, -0x48(%rbp)
je 0x3e1d
movq %r12, %rdi
movq %r15, %rsi
pushq $0x18
popq %rdx
callq 0x2190
movq -0x30(%rbp), %r15
movq %r12, %rdi
movq %r13, %rsi
movl %r14d, %edx
callq 0x21e0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x3dcf
movq -0x70(%rbp), %rdi
callq 0x2180
movq (%r15), %rcx
movl %eax, (%rcx,%rbx,4)
addq $0x8, %r15
jmp 0x3d9e
incq %rbx
movq %r12, %rdi
callq 0x20c0
leaq -0x50(%rbp), %r15
jmp 0x3d59
movq 0x31ee(%rip), %rdi      # 0x6fd8
leaq 0x1726(%rip), %rsi      # 0x5517
callq 0x2100
movq %rax, %rdi
movq %r14, %rsi
callq 0x2100
leaq 0x171c(%rip), %rsi      # 0x5524
movq %rax, %rdi
callq 0x2100
movq %rax, %rdi
callq 0x2090
pushq $0x1
popq %rbx
jmp 0x3e2b
xorl %ebx, %ebx
leaq -0x278(%rbp), %rdi
callq 0x2050
leaq -0x70(%rbp), %rdi
callq 0x2080
leaq -0x50(%rbp), %rdi
callq 0x2080
leaq -0x278(%rbp), %rdi
callq 0x2070
movl %ebx, %eax
addq $0x3d8, %rsp            # imm = 0x3D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3e61
jmp 0x3e61
movq %rax, %rbx
jmp 0x3e75
movq %rax, %rbx
leaq -0x400(%rbp), %rdi
callq 0x20c0
leaq -0x70(%rbp), %rdi
callq 0x2080
leaq -0x50(%rbp), %rdi
callq 0x2080
leaq -0x278(%rbp), %rdi
callq 0x2070
movq %rbx, %rdi
callq 0x21b0
// File: /workspace/github_cpp_makefile_star2_O2/WeiqiangZhou[P]BIRD/source/create_library_function.cpp
// Function: ReadName(char*, char**)
int ReadName(char *file, char **data)
{
	std::ifstream infile(file);
	std::string line_temp;
	int m = 0;
	if (infile.is_open())
	{
		std::cout << "Reading " << file << "..." << std::endl;
		while (!infile.eof())
		{
			std::getline(infile, line_temp);
			if (line_temp.empty()){ break; }
			strncpy(data[m], line_temp.c_str(), 30);
			m++;
		}
		infile.close();
	}
	else
	{
		std::cout << "Error! File " << file << " not found!" << std::endl;
		return 1;
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x230, %rsp            # imm = 0x230
movq %rsi, %rbx
movq %rdi, %r14
leaq -0x248(%rbp), %rdi
pushq $0x8
popq %rdx
movq %r14, %rsi
callq 0x21c0
leaq -0x30(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq -0x1d0(%rbp), %rdi
callq 0x2060
testb %al, %al
je 0x3f69
movq 0x30e8(%rip), %rdi      # 0x6fd8
leaq 0x148b(%rip), %rsi      # 0x5382
callq 0x2100
movq %rax, %rdi
movq %r14, %rsi
callq 0x2100
leaq 0x1436(%rip), %rsi      # 0x5344
movq %rax, %rdi
callq 0x2100
movq %rax, %rdi
callq 0x2090
leaq -0x248(%rbp), %r14
leaq -0x40(%rbp), %r15
pushq $0x1e
popq %r12
movq -0x248(%rbp), %rax
movq -0x18(%rax), %rax
testb $0x2, -0x228(%rbp,%rax)
jne 0x3fa3
movq %r14, %rdi
movq %r15, %rsi
callq 0x2040
cmpq $0x0, -0x38(%rbp)
je 0x3fa3
movq (%rbx), %rdi
movq -0x40(%rbp), %rsi
movq %r12, %rdx
callq 0x20a0
addq $0x8, %rbx
jmp 0x3f2d
movq 0x3068(%rip), %rdi      # 0x6fd8
leaq 0x15a0(%rip), %rsi      # 0x5517
callq 0x2100
movq %rax, %rdi
movq %r14, %rsi
callq 0x2100
leaq 0x1596(%rip), %rsi      # 0x5524
movq %rax, %rdi
callq 0x2100
movq %rax, %rdi
callq 0x2090
pushq $0x1
popq %rbx
jmp 0x3fb1
xorl %ebx, %ebx
leaq -0x248(%rbp), %rdi
callq 0x2050
leaq -0x40(%rbp), %rdi
callq 0x2080
leaq -0x248(%rbp), %rdi
callq 0x2070
movl %ebx, %eax
addq $0x230, %rsp            # imm = 0x230
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3fda
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x2080
leaq -0x248(%rbp), %rdi
callq 0x2070
movq %rbx, %rdi
callq 0x21b0
// File: /workspace/github_cpp_makefile_star2_O2/ashlall[P]StreamStats/Test/Chi_Square_test.cpp
// Function: get_frequencies(double*, double*, double*, int, int)
int* get_frequencies(double *upper, double *lower, double *items, int num_buckets, int stream_size)
{
  int *frequencies = new int[num_buckets];
  for (int i = 0; i < num_buckets; i++)
    frequencies[i] = 0;
  for (int i = 0; i < stream_size; i++)
  {
    //cout << "item: " << items[i] << " ***" << endl;
    int lo = 0, hi = num_buckets;
    while (lo <= hi)
    {
      int mid = (lo + hi) / 2;
      //cout << "mid: " << endl;
      if (items[i] <= upper[mid] && items[i] >= lower[mid])
      {
	frequencies[mid]++;
	break;
      }
      /*else if (items[i] < upper[0])
      {
	cout << "hello" << endl;
	frequencies[0]++;
	break;
      }
      else if (items[i] > lower[num_buckets-1])
      {
	cout << "hi" << endl;
	frequencies[num_buckets-1]++;
	break;
	}*/
      else if (items[i] < lower[mid])
	{
	  //	  cout << "lower, " << endl;
	hi = mid;
	}
      else
	lo = mid + 1;
    }
  }
  return frequencies;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, -0x38(%rbp)
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
movl %ecx, %eax
shlq $0x2, %rax
xorl %r14d, %r14d
testl %ecx, %ecx
pushq $-0x1
popq %rdi
cmovnsq %rax, %rdi
movl $0x0, %ebx
movl %ecx, -0x2c(%rbp)
cmovgl %ecx, %ebx
callq 0x2030
movq %rax, %rcx
cmpq %r14, %rbx
je 0x515a
andl $0x0, (%rcx,%r14,4)
incq %r14
jmp 0x514b
xorl %esi, %esi
movq -0x38(%rbp), %r10
testl %r10d, %r10d
cmovlel %esi, %r10d
pushq $0x2
popq %rdi
movl -0x2c(%rbp), %r11d
cmpq %r10, %rsi
je 0x51c3
xorl %r9d, %r9d
movl %r11d, %r8d
cmpl %r8d, %r9d
jg 0x51be
leal (%r8,%r9), %eax
cltd
idivl %edi
movsd (%r15,%rsi,8), %xmm0
movslq %eax, %rdx
movsd (%r13,%rdx,8), %xmm1
ucomisd %xmm0, %xmm1
movsd (%r12,%rdx,8), %xmm1
jb 0x51a7
ucomisd %xmm1, %xmm0
jae 0x51bb
ucomisd %xmm0, %xmm1
leal 0x1(%rax), %edx
cmoval %r9d, %edx
cmoval %eax, %r8d
movl %edx, %r9d
jmp 0x5179
incl (%rcx,%rdx,4)
incq %rsi
jmp 0x516e
movq %rcx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/iZhangHui[P]CppPrimer/CH12_DynamicMemory/examples/UP.cc
// Function: main
int main()
{
	// up points to an array of ten uninitialized ints
	unique_ptr<int[]> up(new int[10]);
	for (size_t i = 0; i != 10; ++i)
		up[i] = i;  // assign a new value to each of the elements
	up.release();   // automatically uses delete[] to destroy its pointer

	// to use a shared_ptr we must supply a deleter
	shared_ptr<int> sp(new int[10],
						[](int *p) {
							cout << "lambda call." << endl;
							delete[] p;
						});
	// shared_ptrs don't have subscript operator
	// and don't support pointer arithmetic
	for (size_t i = 0; i != 10; ++i)
		*(sp.get() + i) = i;  // use get to get a built-in pointer
	sp.reset(); // uses the lambda we supplied
	            // that uses delete[] to free the array
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
andq $0x0, -0x20(%rbp)
pushq $0x28
popq %rdi
callq 0x1030
movq %rax, %rbx
movq %rax, -0x30(%rbp)
pushq $0x18
popq %rdi
callq 0x1090
leaq -0x28(%rbp), %r14
leaq -0x11(%rbp), %rcx
leaq -0x40(%rbp), %rdi
movq %rcx, (%rdi)
movabsq $0x100000001, %rcx      # imm = 0x100000001
movq %rcx, 0x8(%rax)
leaq 0x2aa1(%rip), %rcx      # 0x3d38
movq %rcx, (%rax)
movq %rbx, 0x10(%rax)
movq %rax, (%r14)
andq $0x0, 0x8(%rdi)
callq 0x131c
xorl %eax, %eax
cmpq $0xa, %rax
je 0x12bb
movl %eax, (%rbx,%rax,4)
incq %rax
jmp 0x12ad
leaq -0x30(%rbp), %rdi
callq 0x13fe
movq %r14, %rdi
callq 0x1450
leaq -0x20(%rbp), %rdi
callq 0x142c
xorl %eax, %eax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rdi
callq 0x1050
movq %rbx, %rdi
callq 0x133c
callq 0x10d0
movq %rax, %rbx
callq 0x10f0
jmp 0x130a
movq %rax, %rdi
callq 0x14e0
movq %rax, %rbx
leaq -0x20(%rbp), %rdi
callq 0x142c
movq %rbx, %rdi
callq 0x1100
nop
// File: /workspace/github_cpp_makefile_star2_O2/philipperemy[P]digital-setting-circles/Calc.cpp
// Function: Calc::YY1toFH(bool)
void Calc::YY1toFH(bool flipped)
{
  double C = MathLib::sqrt(sqr(YY[1][1])+sqr(YY[2][1]));

  // Since C is always non-negative, H will be between -90 and 90 degrees.
  if (C==0 && YY[3][1]==0)
    H = 0;  // Undefined result!
  else
    H = MathLib::atan2(YY[3][1], C);

  if (C==0)
    F = 1; // Elevation is +-90 deg, so az is arbitrary.
  else {
    // Note: Since C>0, both YY[2][1] and YY[1][1] must be != 0.
    F = MathLib::atan2(YY[2][1], YY[1][1]);
    // The atan2() function provides a 4-quadrant result, but in
    // the -p...pi range instead of 0...2*pi.
    if (F<0)
      F += (2*pi);
  }

  // No longer any need to clip F to 0..2*pi.

  // If desired, convert the result to flipped mode.
  if (flipped) {
    // Flip the elevation to the other side of the zenith.
    if (H >= 0)
      H = pi - H;
    else
      H = -pi - H;

    // Rotate (not flip) the azimuth 180 degrees.
    F -= pi;
    if (F<0)
      F += (2*pi);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %esi, %r14d
movq %rdi, %rbx
movsd 0x228(%rdi), %xmm1
movsd 0x248(%rdi), %xmm0
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
callq 0x564c
movapd %xmm0, %xmm3
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm3
movsd 0x268(%rbx), %xmm1
jne 0x39bc
jp 0x39bc
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm1
jne 0x39bc
jnp 0x39d3
movapd %xmm1, %xmm0
movapd %xmm3, %xmm1
movsd %xmm3, -0x18(%rbp)
callq 0x557a
movsd -0x18(%rbp), %xmm3
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm3
movsd %xmm0, 0x288(%rbx)
jne 0x3a02
jp 0x3a02
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x280(%rbx)
movsd 0x1c610(%rip), %xmm0    # 0x20010
jmp 0x3a39
movsd 0x228(%rbx), %xmm1
movsd 0x248(%rbx), %xmm0
callq 0x557a
movsd %xmm0, 0x280(%rbx)
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
jbe 0x3a39
addsd 0x1c5d7(%rip), %xmm0    # 0x20008
movsd %xmm0, 0x280(%rbx)
testb %r14b, %r14b
je 0x3a91
movsd 0x288(%rbx), %xmm1
xorpd %xmm2, %xmm2
xorl %eax, %eax
ucomisd %xmm2, %xmm1
setb %al
leaq 0x1c626(%rip), %rcx     # 0x20080
movsd (%rcx,%rax,8), %xmm3
subsd %xmm1, %xmm3
addsd 0x1c5ad(%rip), %xmm0    # 0x20018
movsd %xmm3, 0x288(%rbx)
movsd %xmm0, 0x280(%rbx)
ucomisd %xmm0, %xmm2
jbe 0x3a91
addsd 0x1c57f(%rip), %xmm0    # 0x20008
movsd %xmm0, 0x280(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/philipperemy[P]digital-setting-circles/Calc.cpp
// Function: Calc::AzEltoYY0()
void Calc::AzEltoYY0()
{
  H += Z3;
  YY[1][0] = MathLib::cos(F)*MathLib::cos(H) - MathLib::sin(F)*Z2 + MathLib::sin(F)*MathLib::sin(H)*Z1;
  YY[2][0] = MathLib::sin(F)*MathLib::cos(H) + MathLib::cos(F)*Z2 - MathLib::cos(F)*MathLib::sin(H)*Z1;
  YY[3][0] = MathLib::sin(H);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movsd 0x280(%rdi), %xmm0
movsd 0x308(%rdi), %xmm1
addsd 0x288(%rdi), %xmm1
movsd %xmm1, 0x288(%rdi)
callq 0x5584
movsd %xmm0, -0x10(%rbp)
movsd 0x288(%rbx), %xmm0
callq 0x5584
movsd %xmm0, -0x18(%rbp)
movsd 0x280(%rbx), %xmm0
callq 0x558e
mulsd 0x300(%rbx), %xmm0
movsd -0x18(%rbp), %xmm1
mulsd -0x10(%rbp), %xmm1
subsd %xmm0, %xmm1
movsd %xmm1, -0x18(%rbp)
movsd 0x280(%rbx), %xmm0
callq 0x558e
movsd %xmm0, -0x10(%rbp)
movsd 0x288(%rbx), %xmm0
callq 0x558e
mulsd -0x10(%rbp), %xmm0
mulsd 0x2f8(%rbx), %xmm0
addsd -0x18(%rbp), %xmm0
movsd %xmm0, 0x220(%rbx)
movsd 0x280(%rbx), %xmm0
callq 0x558e
movsd %xmm0, -0x10(%rbp)
movsd 0x288(%rbx), %xmm0
callq 0x5584
movsd %xmm0, -0x18(%rbp)
movsd 0x280(%rbx), %xmm0
callq 0x5584
mulsd 0x300(%rbx), %xmm0
movsd -0x18(%rbp), %xmm1
mulsd -0x10(%rbp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, -0x18(%rbp)
movsd 0x280(%rbx), %xmm0
callq 0x5584
movsd %xmm0, -0x10(%rbp)
movsd 0x288(%rbx), %xmm0
callq 0x558e
mulsd -0x10(%rbp), %xmm0
mulsd 0x2f8(%rbx), %xmm0
movsd -0x18(%rbp), %xmm1
subsd %xmm0, %xmm1
movsd %xmm1, 0x240(%rbx)
movsd 0x288(%rbx), %xmm0
callq 0x558e
movsd %xmm0, 0x260(%rbx)
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/philipperemy[P]digital-setting-circles/Calc.cpp
// Function: Calc::ApparentToTrueAzEl()
void Calc::ApparentToTrueAzEl()
{
  int J;

  AzEltoYY0();
  for (J=1; J<=3; J++)
    YY[J][1] = YY[J][0];
  YY1toFH(false);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x3a9a
movl $0x228, %eax            # imm = 0x228
cmpq $0x288, %rax            # imm = 0x288
je 0x3d86
movsd -0x8(%rbx,%rax), %xmm0
movsd %xmm0, (%rbx,%rax)
addq $0x20, %rax
jmp 0x3d6d
movq %rbx, %rdi
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x3966
// File: /workspace/github_cpp_makefile_star2_O2/philipperemy[P]digital-setting-circles/Calc.cpp
// Function: Calc::calcApparentSeparation()
double Calc::calcApparentSeparation()
{
  double corrAz1, corrAz2, corrEl1, corrEl2;

  F = alignAz[1];
  H = alignEl[1];
  ApparentToTrueAzEl();
  corrAz1 = F;
  corrEl1 = H;

  F = alignAz[2];
  H = alignEl[2];
  ApparentToTrueAzEl();
  corrAz2 = F;
  corrEl2 = H;

  return calcSeparation(corrAz1, corrEl1, corrAz2, corrEl2);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movsd 0x2a0(%rdi), %xmm0
movsd 0x2b8(%rdi), %xmm1
movsd %xmm0, 0x280(%rdi)
movsd %xmm1, 0x288(%rdi)
callq 0x3d5a
movsd 0x280(%rbx), %xmm0
movsd %xmm0, -0x18(%rbp)
movsd 0x288(%rbx), %xmm0
movsd %xmm0, -0x10(%rbp)
movsd 0x2a8(%rbx), %xmm0
movsd %xmm0, 0x280(%rbx)
movsd 0x2c0(%rbx), %xmm0
movsd %xmm0, 0x288(%rbx)
movq %rbx, %rdi
callq 0x3d5a
movsd 0x280(%rbx), %xmm2
movsd 0x288(%rbx), %xmm3
movsd -0x18(%rbp), %xmm0
movsd -0x10(%rbp), %xmm1
addq $0x18, %rsp
popq %rbx
popq %rbp
jmp 0x3e2e
// File: /workspace/github_cpp_makefile_star2_O2/philipperemy[P]digital-setting-circles/Calc.cpp
// Function: Calc::calcSeparation(double, double, double, double)
double Calc::calcSeparation(double az1, double el1, double az2, double el2)
{
  double cossep;

  cossep = (MathLib::sin(el1)*MathLib::sin(el2)) + (MathLib::cos(el1)*MathLib::cos(el2)*MathLib::cos(az1-az2));

  // Avoid a domain error for acos due to rounding.
  if (cossep >= 1.0)
    return 0.0;
  if (cossep <= -1.0)
    return pi;

  return MathLib::acos(cossep);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movsd %xmm3, -0x8(%rbp)
movsd %xmm2, -0x28(%rbp)
movsd %xmm1, -0x10(%rbp)
movsd %xmm0, -0x20(%rbp)
movaps %xmm1, %xmm0
callq 0x558e
movsd %xmm0, -0x30(%rbp)
movsd -0x8(%rbp), %xmm0
callq 0x558e
movsd %xmm0, -0x18(%rbp)
movsd -0x10(%rbp), %xmm0
callq 0x5584
movsd %xmm0, -0x10(%rbp)
movsd -0x8(%rbp), %xmm0
callq 0x5584
mulsd -0x10(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
movsd -0x20(%rbp), %xmm0
subsd -0x28(%rbp), %xmm0
callq 0x5584
movsd -0x18(%rbp), %xmm1
mulsd -0x8(%rbp), %xmm0
mulsd -0x30(%rbp), %xmm1
addsd %xmm0, %xmm1
xorpd %xmm0, %xmm0
ucomisd 0x1c159(%rip), %xmm1    # 0x20010
jae 0x3edd
movsd 0x1c16f(%rip), %xmm0    # 0x20030
ucomisd %xmm1, %xmm0
jae 0x3ed5
movapd %xmm1, %xmm0
addq $0x30, %rsp
popq %rbp
jmp 0x555c
movsd 0x1c14b(%rip), %xmm0    # 0x20028
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/philipperemy[P]digital-setting-circles/Calc.cpp
// Function: Calc::setAlignmentData(int, double, double, double, double, double)
void Calc::setAlignmentData(int i, double ra, double dec,
		      double az, double el, double time)
{

  if (i<0 || i>1)
    return;

  i++;  // I must be 1 or 2 to index the arrays!

  // This entire package measures azimuth backwards!
  alignAz[i] = (360.0-az)*radPerDeg;
  alignEl[i] = el*radPerDeg;
  alignRA[i] =  (ra-degreesPerMinute*time)/degPerRad;
  alignDec[i] =  dec/degPerRad;
}

// Assembly:
cmpl $0x1, %esi
ja 0x435e
pushq %rbp
movq %rsp, %rbp
movsd 0x1bd61(%rip), %xmm5    # 0x20068
subsd %xmm2, %xmm5
movsd 0x1bd4d(%rip), %xmm2    # 0x20060
mulsd %xmm2, %xmm5
movl %esi, %eax
movsd %xmm5, 0x2a0(%rdi,%rax,8)
mulsd %xmm2, %xmm3
movsd %xmm3, 0x2b8(%rdi,%rax,8)
mulsd 0x1bd39(%rip), %xmm4    # 0x20070
addsd %xmm0, %xmm4
movsd 0x1bd15(%rip), %xmm0    # 0x20058
divsd %xmm0, %xmm4
movsd %xmm4, 0x2d0(%rdi,%rax,8)
divsd %xmm0, %xmm1
movsd %xmm1, 0x2e8(%rdi,%rax,8)
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/philipperemy[P]digital-setting-circles/Calc.cpp
// Function: Calc::EqToAzEl(double, double, double, bool, double*, double*)
void Calc::EqToAzEl(double ra, double dec, double time, bool flipped, double *azptr, double *elptr)
{
  int I, J;

  double RA = ra;
  double DEC = dec;

  DEC=DEC/degPerRad;
  RA=(RA-degreesPerMinute*time)/degPerRad;
  XX[1][1]=MathLib::cos(DEC)*MathLib::cos(RA);
  XX[2][1]=MathLib::cos(DEC)*MathLib::sin(RA);
  XX[3][1]=MathLib::sin(DEC);

  YY[1][1]=0; YY[2][1]=0; YY[3][1]=0;
  for (I=1; I<=3; I++) {
    for (J=1; J<=3; J++) {
      YY[I][1] += (RR[I][J]*XX[J][1]);
    }
  }

  YY1toFH(flipped);

  TrueToApparentAzEl(flipped);

  F *= degPerRad;
  H *= degPerRad;

  // This code measures azimuth backwards!
  F = 360.0-F;

  if (azptr)
    *azptr = F;

  if (elptr)
    *elptr = H;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rcx, %rbx
movq %rdx, %r15
movl %esi, %r12d
movq %rdi, %r14
movsd 0x1b671(%rip), %xmm3    # 0x20058
divsd %xmm3, %xmm1
movsd %xmm1, -0x38(%rbp)
mulsd 0x1b678(%rip), %xmm2    # 0x20070
addsd %xmm2, %xmm0
divsd %xmm3, %xmm0
movsd %xmm0, -0x30(%rbp)
movapd %xmm1, %xmm0
callq 0x5584
movsd %xmm0, -0x28(%rbp)
movsd -0x30(%rbp), %xmm0
callq 0x5584
mulsd -0x28(%rbp), %xmm0
movsd %xmm0, 0x1a8(%r14)
movsd -0x38(%rbp), %xmm0
callq 0x5584
movsd %xmm0, -0x28(%rbp)
movsd -0x30(%rbp), %xmm0
callq 0x558e
mulsd -0x28(%rbp), %xmm0
movsd %xmm0, 0x1c8(%r14)
movsd -0x38(%rbp), %xmm0
callq 0x558e
movsd %xmm0, 0x1e8(%r14)
andq $0x0, 0x228(%r14)
andq $0x0, 0x248(%r14)
andq $0x0, 0x268(%r14)
leaq 0x200(%r14), %rax
leaq 0x128(%r14), %rcx
pushq $0x1
popq %rdx
cmpq $0x4, %rdx
je 0x4ad4
movq %rdx, %rsi
shlq $0x5, %rsi
addq %rax, %rsi
addq $0x8, %rsi
movsd (%rsi), %xmm0
xorl %edi, %edi
cmpq $0x18, %rdi
je 0x4acb
movsd (%rcx,%rdi), %xmm1
mulsd 0x1a8(%r14,%rdi,4), %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, (%rsi)
addq $0x8, %rdi
jmp 0x4aa8
incq %rdx
addq $0x20, %rcx
jmp 0x4a8e
movzbl %r12b, %r12d
movq %r14, %rdi
movl %r12d, %esi
callq 0x3966
movq %r14, %rdi
movl %r12d, %esi
callq 0x3d1e
movsd 0x280(%r14), %xmm1
movsd 0x1b559(%rip), %xmm0    # 0x20058
mulsd %xmm0, %xmm1
mulsd 0x288(%r14), %xmm0
movsd %xmm0, 0x288(%r14)
movsd 0x1b54b(%rip), %xmm0    # 0x20068
subsd %xmm1, %xmm0
movsd %xmm0, 0x280(%r14)
testq %r15, %r15
je 0x4b34
movsd %xmm0, (%r15)
testq %rbx, %rbx
je 0x4b46
movsd 0x288(%r14), %xmm0
movsd %xmm0, (%rbx)
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/philipperemy[P]digital-setting-circles/Calc.cpp
// Function: Calc::AzElToEq(double, double, double, double*, double*)
void Calc::AzElToEq(double az, double el, double time, double *raptr, double *decptr)
{
  int I, J;

  F = 360.0 - az; // This code measures azimuth backwards!
  H = el;

  F *= radPerDeg;
  H *= radPerDeg;

  AzEltoYY0();
  XX[1][1]=YY[1][0]; XX[2][1]=YY[2][0]; XX[3][1]=YY[3][0];
  YY[1][1]=0; YY[2][1]=0; YY[3][1]=0;

  for (I=1; I<=3; I++) {
    for (J=1; J<=3; J++) {
      YY[I][1] += (QQ[I][J]*XX[J][1]);
    }
  }
  YY1toFH(false);

  F *= degPerRad;
  H *= degPerRad;

  F += degreesPerMinute*time;

  F=F-MathLib::floor(F/360)*360;
  //F = fmod(F, 360.0);

  if (raptr)
    *raptr = F;

  if (decptr)
    *decptr = H;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movsd %xmm2, -0x20(%rbp)
movq %rdi, %r14
movsd 0x1b4f4(%rip), %xmm2    # 0x20068
subsd %xmm0, %xmm2
movsd 0x1b4e0(%rip), %xmm0    # 0x20060
mulsd %xmm0, %xmm2
movsd %xmm2, 0x280(%rdi)
mulsd %xmm0, %xmm1
movsd %xmm1, 0x288(%rdi)
callq 0x3a9a
movsd 0x220(%r14), %xmm0
movsd 0x240(%r14), %xmm1
movsd %xmm0, 0x1a8(%r14)
movsd %xmm1, 0x1c8(%r14)
movsd 0x260(%r14), %xmm0
movsd %xmm0, 0x1e8(%r14)
andq $0x0, 0x228(%r14)
andq $0x0, 0x248(%r14)
andq $0x0, 0x268(%r14)
leaq 0x200(%r14), %rax
leaq 0x28(%r14), %rcx
pushq $0x1
popq %rdx
cmpq $0x4, %rdx
je 0x4c3f
movq %rdx, %rsi
shlq $0x5, %rsi
addq %rax, %rsi
addq $0x8, %rsi
movsd (%rsi), %xmm0
xorl %edi, %edi
cmpq $0x18, %rdi
je 0x4c36
movsd (%rcx,%rdi), %xmm1
mulsd 0x1a8(%r14,%rdi,4), %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, (%rsi)
addq $0x8, %rdi
jmp 0x4c13
incq %rdx
addq $0x20, %rcx
jmp 0x4bf9
movq %r14, %rdi
xorl %esi, %esi
callq 0x3966
movsd 0x1b407(%rip), %xmm0    # 0x20058
movsd 0x280(%r14), %xmm1
mulsd %xmm0, %xmm1
mulsd 0x288(%r14), %xmm0
movsd %xmm0, 0x288(%r14)
movsd -0x20(%rbp), %xmm0
mulsd 0x1b3fb(%rip), %xmm0    # 0x20078
addsd %xmm1, %xmm0
movsd %xmm0, -0x20(%rbp)
movsd %xmm0, 0x280(%r14)
movsd 0x1b3d1(%rip), %xmm1    # 0x20068
divsd %xmm1, %xmm0
callq 0x569e
movsd -0x20(%rbp), %xmm1
mulsd 0x1b3bb(%rip), %xmm0    # 0x20068
subsd %xmm0, %xmm1
movsd %xmm1, 0x280(%r14)
testq %r15, %r15
je 0x4cc4
movsd %xmm1, (%r15)
testq %rbx, %rbx
je 0x4cd6
movsd 0x288(%r14), %xmm0
movsd %xmm0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/philipperemy[P]digital-setting-circles/Data.cpp
// Function: Data::Data(StarData&, StarData&)
Data::Data(StarData& starData1, StarData& starData2)
: starData1(starData1), starData2(starData2),
epochReference(0), elEncoderOffset(0)
{
    //ctor
    curAz = NAN;
    curEl = NAN;

    aligned = false;

    targetRA = 0.0;
    targetDec = 0.0;

    targetAz = NAN;
    targetEl = NAN;

    //Avoid diving by 0
    azEncoderRes = 8192;

    Z1 = 0.0;
    Z2 = 0.0;
    Z3 = 0.0;

    //Default is 10
    encoderReadRate = 10;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rsi, (%rdi)
movq %rdx, 0x8(%rdi)
andq $0x0, 0x318(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x308(%rdi)
leaq 0x358(%rdi), %rax
movq %rax, 0x348(%rdi)
andq $0x0, 0x350(%rdi)
xorl %eax, %eax
movb %al, 0x358(%rdi)
andl $0x0, 0x368(%rdi)
andl $0x0, 0x3ac(%rdi)
movabsq $0x7ff8000000000000, %rcx # imm = 0x7FF8000000000000
movq %rcx, 0x378(%rdi)
movq %rcx, 0x380(%rdi)
movb %al, 0x320(%rdi)
movups %xmm0, 0x328(%rdi)
movq %rcx, 0x338(%rdi)
movq %rcx, 0x340(%rdi)
movl $0x2000, 0x388(%rdi)    # imm = 0x2000
movups %xmm0, 0x390(%rdi)
andq $0x0, 0x3a0(%rdi)
movl $0xa, 0x3a8(%rdi)
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/philipperemy[P]digital-setting-circles/Data.cpp
// Function: Data::updateCurrentAzEl(int, int)
void Data::updateCurrentAzEl(int azpos, int elpos)
{
    curAzCount = azpos;
    curElCount = elpos;

    // Get the az value into the 0 .. res-1 range
    while (azpos >= azEncoderRes)
    {
        azpos -= azEncoderRes;
    }

    while (azpos < 0)
    {
        azpos += azEncoderRes;
    }

    // Convert az to 0..360.0 range
    curAz = (double)azpos / azEncoderRes * 360.0;

    // Apply the elevation zero correction that was established during
    // encoder reset.
    elpos -= elEncoderOffset;

    while (elpos >= (elEncoderRes/2))
    {
      elpos -= elEncoderRes;
    }

    while (elpos < -(elEncoderRes/2))
    {
      elpos += elEncoderRes;
    }

    curEl = (double)elpos / elEncoderRes * 360.0;
}

// Assembly:
movl %edx, %ecx
movl %esi, 0x36c(%rdi)
movl %edx, 0x370(%rdi)
movl 0x388(%rdi), %r8d
addl %r8d, %esi
movl %esi, %edx
negl %edx
subl %r8d, %esi
addl %r8d, %edx
cmpl %r8d, %esi
jge 0x4f9a
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
testl %esi, %esi
cmovgl %esi, %eax
xorl %r9d, %r9d
cmpl %esi, %eax
setne %r9b
cmpl $0x1, %r8d
movl %r8d, %r10d
adcl $0x0, %r10d
subl %r9d, %eax
addl %edx, %eax
xorl %edx, %edx
divl %r10d
addl %r9d, %eax
imull %r8d, %eax
addl %esi, %eax
cvtsi2sd %eax, %xmm0
cvtsi2sd %r8d, %xmm1
divsd %xmm1, %xmm0
mulsd 0x1b07c(%rip), %xmm0    # 0x20068
movsd %xmm0, 0x378(%rdi)
movl 0x38c(%rdi), %esi
movl 0x3ac(%rdi), %r9d
movl $0x2, %r8d
movl %esi, %eax
cltd
idivl %r8d
leal (%rsi,%rcx), %r8d
subl %r9d, %r8d
subl %esi, %r9d
subl %ecx, %r9d
subl %esi, %r8d
addl %esi, %r9d
cmpl %eax, %r8d
jge 0x501a
movl $0xfffffffe, %ecx       # imm = 0xFFFFFFFE
movl %esi, %eax
cltd
idivl %ecx
cmpl %r8d, %eax
cmovlel %r8d, %eax
xorl %ecx, %ecx
cmpl %eax, %r8d
setne %cl
cmpl $0x1, %esi
movl %esi, %r10d
adcl $0x0, %r10d
subl %ecx, %eax
addl %r9d, %eax
xorl %edx, %edx
divl %r10d
addl %ecx, %eax
imull %esi, %eax
addl %r8d, %eax
cvtsi2sd %eax, %xmm0
cvtsi2sd %esi, %xmm1
divsd %xmm1, %xmm0
mulsd 0x1affa(%rip), %xmm0    # 0x20068
movsd %xmm0, 0x380(%rdi)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/philipperemy[P]digital-setting-circles/Data.cpp
// Function: Data::calculateTargetAzEl()
void Data::calculateTargetAzEl()
{
    targetAz = NAN;
    targetEl = NAN;

    // If we have valid alignment data,
    // recalculate everything based on the current position and time,
    // and update the form's result fields.

    if(isAligned() && finite(targetRA) && finite(targetDec))
    {
        calc.EqToAzEl(targetRA, targetDec, Util::getEffectiveTime(),
	      false, &targetAz, &targetEl);

        setTargetAzEl(targetAz, targetEl);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movabsq $0x7ff8000000000000, %rax # imm = 0x7FF8000000000000
movq %rax, 0x338(%rdi)
movq %rax, 0x340(%rdi)
cmpb $0x1, 0x320(%rdi)
jne 0x50e1
movq %rdi, %rbx
movq 0x328(%rdi), %xmm0
movq %xmm0, %rcx
btrq $0x3f, %rcx
movabsq $0x7fefffffffffffff, %rax # imm = 0x7FEFFFFFFFFFFFFF
cmpq %rax, %rcx
jg 0x50e1
movq 0x330(%rbx), %xmm1
movq %xmm1, %rcx
btrq $0x3f, %rcx
cmpq %rax, %rcx
jle 0x50ec
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x338(%rbx), %r14
leaq 0x340(%rbx), %r15
addq $0x10, %rbx
movq %xmm0, -0x20(%rbp)
movq %xmm1, -0x28(%rbp)
callq 0x1efb8
cvtsi2sd %rax, %xmm2
movq %rbx, %rdi
movsd -0x20(%rbp), %xmm0
movsd -0x28(%rbp), %xmm1
xorl %esi, %esi
movq %r14, %rdx
movq %r15, %rcx
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x49c4
// File: /workspace/github_cpp_makefile_star2_O2/philipperemy[P]digital-setting-circles/Data.cpp
// Function: Data::CalculateAzElError(double*, double*)
void Data::CalculateAzElError(double *azPtr, double *elPtr)
{
    double azErr, elErr;

    if (finite(curAz) &&
        finite(curEl) &&
        finite(targetAz) &&
        finite(targetEl)) {

            azErr = Util::diff180(targetAz, curAz);
            elErr = Util::diff180(targetEl, curEl);

      } else {

            azErr = NAN;
            elErr = NAN;
      }

    //If pointers are not NULL, affect them
    if (azPtr)
    {
        *azPtr = azErr;
    }
    if (elPtr)
    {
        *elPtr = elErr;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq 0x378(%rdi), %xmm1
movq %xmm1, %rcx
btrq $0x3f, %rcx
movsd 0x1b028(%rip), %xmm3    # 0x20188
movabsq $0x7fefffffffffffff, %rax # imm = 0x7FEFFFFFFFFFFFFF
cmpq %rax, %rcx
jg 0x51a3
movq %rdi, %r15
movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF
movq 0x380(%rdi), %rdx
andq %rcx, %rdx
cmpq %rax, %rdx
jg 0x51a3
movq 0x338(%r15), %xmm2
movq %xmm2, %rdx
btrq $0x3f, %rdx
cmpq %rax, %rdx
jle 0x51c4
movaps %xmm3, %xmm0
testq %r14, %r14
je 0x51b0
movsd %xmm3, (%r14)
testq %rbx, %rbx
je 0x51b9
movsd %xmm0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
andq 0x340(%r15), %rcx
movaps %xmm3, %xmm0
cmpq %rax, %rcx
jg 0x51a6
movdqa %xmm2, %xmm0
callq 0x1ee44
movq %xmm0, -0x20(%rbp)
movsd 0x340(%r15), %xmm0
movq 0x380(%r15), %xmm1
callq 0x1ee44
movsd -0x20(%rbp), %xmm3
jmp 0x51a6
// File: /workspace/github_cpp_makefile_star2_O2/philipperemy[P]digital-setting-circles/./StarData.h
// Function: starDataNamespace::validStarData(StarData&)
static bool validStarData(StarData& sd)
    {
      return (  MathLib::finite(sd.ra) &&
                MathLib::finite(sd.dec) &&
                MathLib::finite(sd.az) &&
                MathLib::finite(sd.el) &&
                sd.time >= 0.0 &&
                sd.ra >= 0.0);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movsd 0x18(%rdi), %xmm0
callq 0x56d4
testl %eax, %eax
je 0x5261
movsd 0x20(%rbx), %xmm0
callq 0x56d4
testl %eax, %eax
je 0x5261
movsd 0x8(%rbx), %xmm0
callq 0x56d4
testl %eax, %eax
je 0x5261
movsd 0x10(%rbx), %xmm0
callq 0x56d4
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
je 0x5263
movsd 0x28(%rbx), %xmm1
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm1
jb 0x5263
movsd 0x18(%rbx), %xmm1
ucomisd %xmm0, %xmm1
setae %al
jmp 0x5263
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/philipperemy[P]digital-setting-circles/Encoder.cpp
// Function: Encoder::update_encoder()
void Encoder::update_encoder()
{
    int MSB = digitalRead(pin_a);
    int LSB = digitalRead(pin_b);

    int encoded = (MSB << 1) | LSB;
    int sum = (last_encoded << 2) | encoded;

    if(sum == 0b1101 || sum == 0b0100 || sum == 0b0010 || sum == 0b1011)
    {
        value++;
    }

    if(sum == 0b1110 || sum == 0b0111 || sum == 0b0001 || sum == 0b1000)
    {
        value--;
    }

    last_encoded = encoded;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl 0x29068(%rip), %eax     # 0x2e318
leal 0x1(%rax), %ecx
leal 0x2(%rax), %edx
movl %edx, 0x2905c(%rip)     # 0x2e318
addl %eax, %eax
orl %ecx, %eax
movl 0x10(%rdi), %ecx
shll $0x2, %ecx
orl %eax, %ecx
cmpl $0xe, %ecx
ja 0x52e5
movl $0x2814, %edx           # imm = 0x2814
btl %ecx, %edx
jb 0x52ea
movl $0x4182, %edx           # imm = 0x4182
btl %ecx, %edx
jae 0x52e5
decq 0x8(%rdi)
movl %eax, 0x10(%rdi)
popq %rbp
retq
incq 0x8(%rdi)
addl $-0x7, %ecx
cmpl $0x1, %ecx
jbe 0x52e1
jmp 0x52e5