LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/Nallantli[P]Rossa/main/rossa/instruction/instruction.cpp
// Function: AllocI::evaluate(object_t const*, std::vector<std::pair<token_t, function_t>, std::allocator<std::pair<token_t, function_t>>>&) const
const symbol_t AllocI::evaluate(const object_t *scope, trace_t &stack_trace) const
{
	const long_int_t evalA = a->evaluate(scope, stack_trace).getNumber(&token, stack_trace).getLong();
	if (evalA < 0)
		throw rossa_error_t(_FAILURE_ALLOC_, token, stack_trace);
	if (setall)
	{
		auto evalB = setall->evaluate(scope, stack_trace);
		return symbol_t::allocateAs(evalA, &evalB, &token, stack_trace);
	}
	return symbol_t::allocate(evalA);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %rbx
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %r14
movq 0x90(%rsi), %rsi
movq (%rsi), %rax
movq %rsp, %rbp
movq %rbp, %rdi
callq *(%rax)
leaq 0x8(%r13), %r15
movq %rbp, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x40b0c
movq %rax, %rdi
callq 0x479d4
movq %rax, %rbp
movq %rsp, %rdi
callq 0x404da
testq %rbp, %rbp
js 0x743c2
movq 0xa0(%r13), %rsi
testq %rsi, %rsi
je 0x743a2
movq (%rsi), %rax
movq %rsp, %r13
movq %r13, %rdi
movq %r12, %rdx
movq %rbx, %rcx
callq *(%rax)
leaq 0x20(%rsp), %rsi
movq %rbp, (%rsi)
movq %r14, %rdi
movq %r13, %rdx
movq %r15, %rcx
movq %rbx, %r8
callq 0x405b0
movq %rsp, %rdi
callq 0x404da
jmp 0x743b0
movq %rsp, %rsi
movq %rbp, (%rsi)
movq %r14, %rdi
callq 0x4055c
movq %r14, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0xa8, %edi
callq 0x101e0
movq %rax, %r14
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x143c0(%rip), %rsi     # 0x887a0
leaq 0x143e0(%rip), %rdx     # 0x887c7
movq %rsp, %rdi
callq 0x1e7ca
movb $0x1, %bpl
movq %rsp, %rsi
movq %r14, %rdi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x476dc
xorl %ebp, %ebp
leaq 0x3e8d4(%rip), %rsi     # 0xb2ce0
leaq -0x3cc5f(%rip), %rdx    # 0x377b4
movq %r14, %rdi
callq 0x106d0
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x7443c
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x103d0
jmp 0x7443c
movq %rax, %rbx
movb $0x1, %bpl
testb %bpl, %bpl
je 0x74458
movq %r14, %rdi
callq 0x102d0
jmp 0x74458
jmp 0x7444d
movq %rax, %rbx
movq %rsp, %rdi
callq 0x404da
movq %rbx, %rdi
callq 0x106f0
// File: /workspace/github_cpp_makefile_star2_O1/Nallantli[P]Rossa/main/rossa/instruction/instruction.cpp
// Function: ScopeI::evaluate(object_t const*, std::vector<std::pair<token_t, function_t>, std::allocator<std::pair<token_t, function_t>>>&) const
const symbol_t ScopeI::evaluate(const object_t *scope, trace_t &stack_trace) const
{
	for (const ptr_instruction_t &e : children)
	{
		const symbol_t eval = e->evaluate(scope, stack_trace);
		if (eval.getSymbolType() != symbol_t::type_t::ID_CASUAL)
			return eval;
	}
	return symbol_t();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x90(%rsi), %r12
movq 0x98(%rsi), %r13
cmpq %r13, %r12
sete %bpl
je 0x74955
movq %rcx, %r14
movq %rdx, %r15
movq (%r12), %rsi
movq (%rsi), %rax
movq %rbx, %rdi
movq %r15, %rdx
movq %r14, %rcx
callq *(%rax)
movq %rbx, %rdi
callq 0x40b02
cmpl $0x3, %eax
jne 0x7494f
movq %rbx, %rdi
callq 0x404da
addq $0x10, %r12
cmpq %r13, %r12
sete %bpl
jne 0x74919
jmp 0x74955
testb $0x1, %bpl
je 0x7495d
movq %rbx, %rdi
callq 0x400a4
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x404da
movq %r14, %rdi
callq 0x106f0
// File: /workspace/github_cpp_makefile_star2_O1/Nallantli[P]Rossa/main/rossa/instruction/instruction.cpp
// Function: MapI::evaluate(object_t const*, std::vector<std::pair<token_t, function_t>, std::allocator<std::pair<token_t, function_t>>>&) const
const symbol_t MapI::evaluate(const object_t *scope, trace_t &stack_trace) const
{
	std::map<const std::string, const symbol_t> evals;
	for (auto &&e : children)
	{
		const symbol_t eval = e.second->evaluate(scope, stack_trace);
		if (eval.getValueType() == value_type_enum::NIL)
			continue;
		evals.insert({e.first, eval});
	}
	return symbol_t::Dictionary(evals);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rcx, %r14
movq %rsi, %r12
movq %rdi, (%rsp)
leaq 0x50(%rsp), %rax
movl $0x0, (%rax)
xorl %ecx, %ecx
movq %rcx, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rcx, 0x20(%rax)
movq 0xa8(%rsi), %r13
addq $0x98, %r12
cmpq %r12, %r13
je 0x74aa6
movq %rdx, %r15
leaq 0x38(%rsp), %rbx
leaq 0x8(%rsp), %rbp
movq 0x40(%r13), %rsi
movq (%rsi), %rax
movq %rbx, %rdi
movq %r15, %rdx
movq %r14, %rcx
callq *(%rax)
movq %rbx, %rdi
callq 0x41262
cmpl $-0x1, %eax
je 0x74a8e
leaq 0x20(%r13), %rsi
movq %rbp, %rdi
movq %rbx, %rdx
callq 0x77520
leaq 0x48(%rsp), %rdi
movq %rbp, %rsi
callq 0x465c6
leaq 0x28(%rsp), %rdi
callq 0x404da
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x74a8e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x103d0
movq %rbx, %rdi
callq 0x404da
movq %r13, %rdi
callq 0x104b0
movq %rax, %r13
cmpq %r12, %rax
jne 0x74a2d
leaq 0x48(%rsp), %rsi
movq (%rsp), %rbx
movq %rbx, %rdi
callq 0x404ba
leaq 0x48(%rsp), %rdi
callq 0x443fa
movq %rbx, %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x74ae6
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x58306
jmp 0x74aee
jmp 0x74aeb
movq %rax, %rbx
jmp 0x74af8
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x404da
leaq 0x48(%rsp), %rdi
callq 0x443fa
movq %rbx, %rdi
callq 0x106f0
// File: /workspace/github_cpp_makefile_star2_O1/Nallantli[P]Rossa/main/rossa/instruction/instruction.cpp
// Function: SwitchI::evaluate(object_t const*, std::vector<std::pair<token_t, function_t>, std::allocator<std::pair<token_t, function_t>>>&) const
const symbol_t SwitchI::evaluate(const object_t *scope, trace_t &stack_trace) const
{
	const object_t newScope(scope, 0);
	const symbol_t eval = switchs->evaluate(&newScope, stack_trace);
	size_t index = 0;
	const auto it = cases_solved.find(eval);
	if (it != cases_solved.end())
	{
		index = it->second;
	}
	else if (!cases_unsolved.empty())
	{
		for (auto &&e : cases_unsolved)
		{
			const symbol_t evalE = e.first->evaluate(&newScope, stack_trace);
			if (evalE.equals(&eval, &token, stack_trace))
			{
				index = e.second;
				break;
			}
		}
	}

	if (index > 0)
	{
		return cases[index - 1]->evaluate(&newScope, stack_trace);
	}
	else if (elses)
	{
		return elses->evaluate(&newScope, stack_trace);
	}

	return symbol_t();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rcx, %r14
movq %rsi, %r15
movq %rdi, %r12
leaq 0x8(%rsp), %rax
movq $0x0, (%rax)
leaq 0x18(%rsp), %rbx
movq %rbx, %rdi
movq %rdx, %rsi
movq %rax, %rdx
callq 0x3cf90
movq 0x90(%r15), %rsi
movq (%rsi), %rax
leaq 0x8(%rsp), %rdi
movq %rbx, %rdx
movq %r14, %rcx
callq *(%rax)
leaq 0xa0(%r15), %rdi
leaq 0x8(%rsp), %rsi
callq 0x79b72
leaq 0xa8(%r15), %rcx
cmpq %rcx, %rax
movq %r12, (%rsp)
je 0x74d17
movq 0x30(%rax), %r13
jmp 0x74da2
cmpq $0x0, 0xf8(%r15)
je 0x74d9f
movq 0xe8(%r15), %r12
leaq 0xd8(%r15), %rax
movq %rax, 0x30(%rsp)
cmpq %rax, %r12
je 0x74d9f
leaq 0x8(%r15), %rax
movq %rax, 0x28(%rsp)
xorl %r13d, %r13d
leaq 0x38(%rsp), %rbp
movq 0x20(%r12), %rsi
movq (%rsi), %rax
movq %rbp, %rdi
leaq 0x18(%rsp), %rdx
movq %r14, %rcx
callq *(%rax)
movq %rbp, %rdi
leaq 0x8(%rsp), %rsi
movq 0x28(%rsp), %rdx
movq %r14, %rcx
callq 0x433ac
movl %eax, %ebx
testb %al, %al
je 0x74d7f
movq 0x30(%r12), %r13
movq %rbp, %rdi
callq 0x404da
testb %bl, %bl
jne 0x74da2
movq %r12, %rdi
callq 0x104b0
movq %rax, %r12
cmpq 0x30(%rsp), %rax
jne 0x74d4a
jmp 0x74da2
xorl %r13d, %r13d
testq %r13, %r13
je 0x74db9
movq 0x100(%r15), %rax
shlq $0x4, %r13
movq -0x10(%rax,%r13), %rsi
jmp 0x74dc5
movq 0x118(%r15), %rsi
testq %rsi, %rsi
je 0x74dff
movq (%rsi), %rax
leaq 0x18(%rsp), %rdx
movq (%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rcx
callq *(%rax)
leaq 0x8(%rsp), %rdi
callq 0x404da
leaq 0x18(%rsp), %rdi
callq 0x3d168
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%rsp), %rbx
movq %rbx, %rdi
callq 0x400a4
jmp 0x74dd9
movq %rax, %rbx
jmp 0x74e30
jmp 0x74e14
movq %rax, %rbx
jmp 0x74e26
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x404da
leaq 0x8(%rsp), %rdi
callq 0x404da
leaq 0x18(%rsp), %rdi
callq 0x3d168
movq %rbx, %rdi
callq 0x106f0
// File: /workspace/github_cpp_makefile_star2_O1/Nallantli[P]Rossa/main/rossa/instruction/instruction.cpp
// Function: TryCatchI::evaluate(object_t const*, std::vector<std::pair<token_t, function_t>, std::allocator<std::pair<token_t, function_t>>>&) const
const symbol_t TryCatchI::evaluate(const object_t *scope, trace_t &stack_trace) const
{
	try
	{
		const object_t newScope(scope, 0);
		return a->evaluate(&newScope, stack_trace);
	}
	catch (const rossa_error_t &e)
	{
		const object_t newScope(scope, 0);
		newScope.createVariable(key, symbol_t::String(std::string(e.what())), &token);
		return b->evaluate(&newScope, stack_trace);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rcx, %r14
movq %rdx, %r13
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x8(%rsp), %rdx
movq $0x0, (%rdx)
leaq 0x18(%rsp), %rdi
movq %r13, %rsi
callq 0x3cf90
movq 0x90(%r15), %rsi
movq (%rsi), %rax
leaq 0x18(%rsp), %rdx
movq %rbx, %rdi
movq %r14, %rcx
callq *(%rax)
leaq 0x18(%rsp), %rdi
callq 0x3d168
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rdx, %rbp
movq %rax, %r12
leaq 0x18(%rsp), %rdi
callq 0x3d168
jmp 0x74f00
movq %rdx, %rbp
movq %rax, %r12
cmpl $0x1, %ebp
jne 0x75005
movq %r12, %rdi
callq 0x101a0
movq %rax, %r12
leaq 0x18(%rsp), %rdx
movq $0x0, (%rdx)
leaq 0x8(%rsp), %rdi
movq %r13, %rsi
callq 0x3cf90
movq (%r12), %rax
movq %r12, %rdi
callq *0x10(%rax)
leaq 0x18(%rsp), %rdi
leaq 0x7(%rsp), %rdx
movq %rax, %rsi
callq 0x1d238
leaq 0x38(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x404ac
leaq 0xb0(%r15), %rsi
leaq 0x8(%r15), %rcx
leaq 0x8(%rsp), %rdi
leaq 0x38(%rsp), %rdx
callq 0x3d512
leaq 0x38(%rsp), %rdi
callq 0x404da
leaq 0x28(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x74f97
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x103d0
movq 0xa0(%r15), %rsi
movq (%rsi), %rax
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movq %r14, %rcx
callq *(%rax)
leaq 0x8(%rsp), %rdi
callq 0x3d168
callq 0x10690
jmp 0x74ed6
jmp 0x74ff3
movq %rax, %r12
leaq 0x38(%rsp), %rdi
callq 0x404da
jmp 0x74fd6
movq %rax, %r12
leaq 0x28(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x74ff6
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x103d0
jmp 0x74ff6
movq %rax, %r12
leaq 0x8(%rsp), %rdi
callq 0x3d168
callq 0x10690
movq %r12, %rdi
callq 0x106f0
movq %rax, %r12
jmp 0x75000
movq %rax, %rdi
callq 0x1d76e
// File: /workspace/github_cpp_makefile_star2_O1/Nallantli[P]Rossa/main/rossa/instruction/instruction.cpp
// Function: CharNI::evaluate(object_t const*, std::vector<std::pair<token_t, function_t>, std::allocator<std::pair<token_t, function_t>>>&) const
const symbol_t CharNI::evaluate(const object_t *scope, trace_t &stack_trace) const
{
	const std::string evalA = a->evaluate(scope, stack_trace).getString(&token, stack_trace);
	std::vector<symbol_t> nv;
	for (auto &&c : evalA)
		nv.push_back(symbol_t::Number(number_t::Long(c)));
	return symbol_t::Array(nv);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rcx, %r14
movq %rsi, %r15
movq %rdi, 0x18(%rsp)
movq 0x90(%rsi), %rsi
movq (%rsi), %rax
movq %rsp, %r12
movq %r12, %rdi
callq *(%rax)
addq $0x8, %r15
leaq 0x28(%rsp), %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0x41004
movq %rsp, %r14
movq %r14, %rdi
callq 0x404da
xorps %xmm0, %xmm0
movaps %xmm0, (%r14)
movq $0x0, 0x10(%r14)
movq 0x30(%rsp), %rbp
testq %rbp, %rbp
je 0x753be
movq 0x28(%rsp), %rbx
xorl %r14d, %r14d
leaq 0x58(%rsp), %r15
leaq 0x48(%rsp), %r12
movq %rsp, %r13
movsbq (%rbx,%r14), %rax
movq %rax, 0x20(%rsp)
leaq 0x20(%rsp), %rdi
callq 0x47868
movq %rax, 0x48(%rsp)
movl %edx, 0x50(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x40458
movq %r13, %rdi
movq %r15, %rsi
callq 0x209ac
movq %r15, %rdi
callq 0x404da
incq %r14
cmpq %r14, %rbp
jne 0x7537b
movq %rsp, %rsi
movq 0x18(%rsp), %rbx
movq %rbx, %rdi
callq 0x40474
movq %rsp, %rdi
callq 0x20a84
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x753f1
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x103d0
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x75412
movq %rax, %rbx
movq %rsp, %rdi
callq 0x404da
jmp 0x75447
movq %rax, %rbx
jmp 0x75424
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0x404da
movq %rsp, %rdi
callq 0x20a84
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x75447
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x103d0
movq %rbx, %rdi
callq 0x106f0
nop
// File: /workspace/github_cpp_makefile_star2_O1/Nallantli[P]Rossa/main/rossa/instruction/instruction.cpp
// Function: DeclareVarsI::evaluate(object_t const*, std::vector<std::pair<token_t, function_t>, std::allocator<std::pair<token_t, function_t>>>&) const
const symbol_t DeclareVarsI::evaluate(const object_t *scope, trace_t &stack_trace) const
{
	std::vector<symbol_t> newvs;
	for (const hash_ull &k : keys)
		newvs.push_back(scope->createVariable(k, &token));
	return symbol_t::Array(newvs);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
movq 0x90(%rsi), %r12
movq 0x98(%rsi), %rbp
cmpq %rbp, %r12
je 0x75775
movq %rdx, %r14
movq %rsi, %r15
addq $0x8, %r15
movq %rsp, %r13
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x3d50a
movq %r13, %rdi
movq %rax, %rsi
callq 0x209ac
addq $0x8, %r12
cmpq %rbp, %r12
jne 0x75753
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x40474
movq %rsp, %rdi
callq 0x20a84
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x7579c
movq %rax, %rbx
movq %rsp, %rdi
callq 0x20a84
movq %rbx, %rdi
callq 0x106f0
nop
// File: /workspace/github_cpp_makefile_star2_O1/Nallantli[P]Rossa/main/rossa/instruction/instruction.cpp
// Function: BNotI::evaluate(object_t const*, std::vector<std::pair<token_t, function_t>, std::allocator<std::pair<token_t, function_t>>>&) const
const symbol_t BNotI::evaluate(const object_t *scope, trace_t &stack_trace) const
{
	return operation::bnot(
		scope,
		a->evaluate(scope, stack_trace),
		&token,
		stack_trace);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq 0x90(%rsi), %rsi
movq (%rsi), %rax
movq %rsp, %r13
movq %r13, %rdi
callq *(%rax)
addq $0x8, %r12
movq %rbx, %rdi
movq %r15, %rsi
movq %r13, %rdx
movq %r12, %rcx
movq %r14, %r8
callq 0x8195f
movq %rsp, %rdi
callq 0x404da
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x404da
movq %rbx, %rdi
callq 0x106f0
nop
// File: /workspace/github_cpp_makefile_star2_O1/Nallantli[P]Rossa/main/rossa/instruction/instruction.cpp
// Function: SetIndexI::evaluate(object_t const*, std::vector<std::pair<token_t, function_t>, std::allocator<std::pair<token_t, function_t>>>&) const
const symbol_t SetIndexI::evaluate(const object_t *scope, trace_t &stack_trace) const
{
	auto evalA = a->evaluate(scope, stack_trace);
	auto evalAVector = evalA.getVector(&token, stack_trace);
	auto evalBVector = b->evaluate(scope, stack_trace).getVector(&token, stack_trace);
	if (evalAVector.size() != evalBVector.size())
	{
		throw rossa_error_t(_INCOMPATIBLE_VECTOR_SIZES_, token, stack_trace);
	}
	for (size_t i = 0; i < evalAVector.size(); i++)
	{
		evalAVector[i].set(&evalBVector[i], &token, stack_trace);
	}
	return evalA;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rcx, %r14
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbx
movq 0x90(%rsi), %rsi
movq (%rsi), %rax
callq *(%rax)
leaq 0x8(%r13), %r15
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x40f46
leaq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x43f8e
movq 0xa0(%r13), %rsi
movq (%rsi), %rax
leaq 0x20(%rsp), %rdi
movq %r12, %rdx
movq %r14, %rcx
callq *(%rax)
leaq 0x20(%rsp), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x40f46
leaq 0x40(%rsp), %rdi
movq %rax, %rsi
callq 0x43f8e
leaq 0x20(%rsp), %rdi
callq 0x404da
movq 0x10(%rsp), %rax
subq 0x8(%rsp), %rax
movq 0x48(%rsp), %rcx
subq 0x40(%rsp), %rcx
cmpq %rcx, %rax
jne 0x76cc5
movq 0x8(%rsp), %rdi
cmpq %rdi, 0x10(%rsp)
je 0x76c9f
xorl %r12d, %r12d
xorl %r13d, %r13d
addq %r12, %rdi
movq 0x40(%rsp), %rsi
addq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0x40674
incq %r13
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rax
subq %rdi, %rax
sarq $0x4, %rax
addq $0x10, %r12
cmpq %rax, %r13
jb 0x76c6c
leaq 0x40(%rsp), %rdi
callq 0x20a84
leaq 0x8(%rsp), %rdi
callq 0x20a84
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0xa8, %edi
callq 0x101e0
movq %rax, %r12
leaq 0x30(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x11b08(%rip), %rsi     # 0x887ea
leaq 0x11b28(%rip), %rdx     # 0x88811
leaq 0x20(%rsp), %rdi
callq 0x1e7ca
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %r12, %rdi
movq %r15, %rdx
movq %r14, %rcx
callq 0x476dc
xorl %ebp, %ebp
leaq 0x3bfce(%rip), %rsi     # 0xb2ce0
leaq -0x3f565(%rip), %rdx    # 0x377b4
movq %r12, %rdi
callq 0x106d0
movq %rax, %r14
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0x76d43
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x103d0
jmp 0x76d43
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x76d6e
movq %r12, %rdi
callq 0x102d0
jmp 0x76d6e
movq %rax, %r14
jmp 0x76d78
movq %rax, %r14
leaq 0x20(%rsp), %rdi
callq 0x404da
jmp 0x76d78
movq %rax, %r14
jmp 0x76d82
movq %rax, %r14
leaq 0x40(%rsp), %rdi
callq 0x20a84
leaq 0x8(%rsp), %rdi
callq 0x20a84
movq %rbx, %rdi
callq 0x404da
movq %r14, %rdi
callq 0x106f0
// File: /workspace/github_cpp_makefile_star2_O1/Nallantli[P]Rossa/main/rossa/operation/operation.cpp
// Function: operation::call(object_t const*, std::shared_ptr<Instruction const> const&, std::vector<symbol_t, std::allocator<symbol_t>> const&, token_t const*, std::vector<std::pair<token_t, function_t>, std::allocator<std::pair<token_t, function_t>>>&)
const symbol_t operation::call(const object_t *scope, const ptr_instruction_t &a, const std::vector<symbol_t> &args, const token_t *token, trace_t &stack_trace)
{
	const symbol_t evalA = a->evaluate(scope, stack_trace);

	if (evalA.getValueType() == value_type_enum::OBJECT)
	{
		const auto &o = evalA.getObject(token, stack_trace);
		if (o->hasValue(parser_t::HASH_CALL))
			return o->getVariable(parser_t::HASH_CALL, token, stack_trace).call(args, token, stack_trace);
	}

	return evalA.call(args, token, stack_trace);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, %r14
movq %r8, %r15
movq %rcx, %r12
movq %rsi, %rax
movq %rdi, %rbx
movq (%rdx), %rsi
movq (%rsi), %r8
leaq 0x8(%rsp), %r13
movq %r13, %rdi
movq %rax, %rdx
movq %r9, %rcx
callq *(%r8)
movq %r13, %rdi
callq 0x41262
cmpl $-0x8, %eax
jne 0x7a1f9
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x411a4
movq %rax, %r13
leaq 0x3d81b(%rip), %rsi     # 0xb79d8
movq %rax, %rdi
callq 0x3d498
movl %eax, %ebp
testb %al, %al
je 0x7a1f9
leaq 0x3d806(%rip), %rsi     # 0xb79d8
movq %r13, %rdi
movq %r15, %rdx
movq %r14, %rcx
callq 0x3d502
movq %rbx, %rdi
movq %rax, %rsi
movq %r12, %rdx
movq %r15, %rcx
movq %r14, %r8
callq 0x42736
testb %bpl, %bpl
jne 0x7a20f
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
movq %r12, %rdx
movq %r15, %rcx
movq %r14, %r8
callq 0x42736
leaq 0x8(%rsp), %rdi
callq 0x404da
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x7a22f
jmp 0x7a22f
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x404da
movq %rbx, %rdi
callq 0x106f0
// File: /workspace/github_cpp_makefile_star2_O1/Nallantli[P]Rossa/main/rossa/operation/operation.cpp
// Function: operation::hash(object_t const*, symbol_t const&, token_t const*, std::vector<std::pair<token_t, function_t>, std::allocator<std::pair<token_t, function_t>>>&)
const symbol_t operation::hash(const object_t *scope, const symbol_t &evalA, const token_t *token, trace_t &stack_trace)
{
	if (evalA.getValueType() == value_type_enum::OBJECT)
	{
		const auto &o = evalA.getObject(token, stack_trace);
		if (o->hasValue(parser_t::HASH_HASH))
			return o->getVariable(parser_t::HASH_HASH, token, stack_trace).call({}, token, stack_trace);
		if (scope != NULL)
			return scope->getVariable(parser_t::HASH_HASH, token, stack_trace).call({evalA}, token, stack_trace);
	}

	return symbol_t::Number(number_t::Long(evalA.hash()));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbx
movq %rdx, %rdi
callq 0x41262
cmpl $-0x8, %eax
jne 0x83237
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x411a4
movq %rax, %rbp
leaq 0x348a4(%rip), %rsi     # 0xb7a18
movq %rax, %rdi
callq 0x3d498
testb %al, %al
je 0x831c8
leaq 0x34891(%rip), %rsi     # 0xb7a18
movq %rbp, %rdi
movq %r15, %rdx
movq %r14, %rcx
callq 0x3d502
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rdx
movaps %xmm0, (%rdx)
movq $0x0, 0x10(%rdx)
movq %rbx, %rdi
movq %rax, %rsi
movq %r15, %rcx
movq %r14, %r8
callq 0x42736
leaq 0x10(%rsp), %rdi
callq 0x20a84
jmp 0x83261
testq %r13, %r13
je 0x83237
leaq 0x34844(%rip), %rsi     # 0xb7a18
movq %r13, %rdi
movq %r15, %rdx
movq %r14, %rcx
callq 0x3d502
movq %rax, %r13
leaq 0x28(%rsp), %rdi
movq %r12, %rsi
callq 0x404c8
leaq 0x10(%rsp), %rdi
leaq 0x28(%rsp), %rsi
leaq 0xf(%rsp), %rcx
movl $0x1, %edx
callq 0x43e3c
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movq %r13, %rsi
movq %r15, %rcx
movq %r14, %r8
callq 0x42736
leaq 0x10(%rsp), %rdi
callq 0x20a84
leaq 0x28(%rsp), %rdi
callq 0x404da
jmp 0x83261
movq %r12, %rdi
callq 0x40554
movl %eax, %eax
leaq 0x28(%rsp), %rdi
movq %rax, (%rdi)
callq 0x47868
leaq 0x10(%rsp), %rsi
movq %rax, (%rsi)
movl %edx, 0x8(%rsi)
movq %rbx, %rdi
callq 0x40458
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x20a84
jmp 0x83285
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x404da
jmp 0x832a3
movq %rax, %rbx
jmp 0x832a3
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x20a84
movq %rbx, %rdi
callq 0x106f0
// File: /workspace/github_cpp_makefile_star2_O1/pollow[P]MIPSClide/simulator.cpp
// Function: Simulator::run()
void Simulator::run() {
    while (pc < statements.size()) {
        cout << statements[pc] << endl;
        tick();
    }

    for(auto i : reg_name) {
        cout << i.first << " : " << dec << regs[i.second] << endl;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq 0x98(%rdi), %rax
movq 0x20(%rdi), %rcx
movq 0x28(%rdi), %rdx
subq %rcx, %rdx
sarq $0x5, %rdx
cmpq %rdx, %rax
jae 0xa5f0
movq 0x23a0a(%rip), %r14     # 0x2df98
shlq $0x5, %rax
movq (%rcx,%rax), %rsi
movq 0x8(%rcx,%rax), %rdx
movq %r14, %rdi
callq 0x5390
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x52f0
movsbl %al, %esi
movq %r15, %rdi
callq 0x5040
movq %rax, %rdi
callq 0x5220
movq %rbx, %rdi
callq 0xa6f2
movq 0x98(%rbx), %rax
movq 0x20(%rbx), %rcx
movq 0x28(%rbx), %rdx
subq %rcx, %rdx
sarq $0x5, %rdx
cmpq %rdx, %rax
jb 0xa58e
movq 0x24171(%rip), %r14     # 0x2e768
leaq 0x2415a(%rip), %r13     # 0x2e758
cmpq %r13, %r14
je 0xa6ca
leaq -0x40(%rbp), %r12
movq %r12, -0x50(%rbp)
movq 0x20(%r14), %rsi
movq 0x28(%r14), %rdx
addq %rsi, %rdx
leaq -0x50(%rbp), %rdi
callq 0x9c8e
movl 0x40(%r14), %eax
movl %eax, -0x30(%rbp)
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq 0x2395f(%rip), %rdi     # 0x2df98
callq 0x5390
movq %rax, %r15
movl $0x3, %edx
movq %rax, %rdi
leaq 0x18ac3(%rip), %rsi     # 0x23113
callq 0x5390
movq (%r15), %rax
movq -0x18(%rax), %rax
movl 0x18(%r15,%rax), %ecx
andl $-0x4b, %ecx
orl $0x2, %ecx
movl %ecx, 0x18(%r15,%rax)
movl -0x30(%rbp), %eax
movl 0xc0(%rbx,%rax,4), %esi
movq %r15, %rdi
callq 0x5530
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x52f0
movsbl %al, %esi
movq %r15, %rdi
callq 0x5040
movq %rax, %rdi
callq 0x5220
movq -0x50(%rbp), %rdi
cmpq %r12, %rdi
je 0xa6b6
callq 0x52d0
movq %r14, %rdi
callq 0x5230
movq %rax, %r14
cmpq %r13, %rax
jne 0xa60b
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x50(%rbp), %rdi
cmpq %r12, %rdi
je 0xa6ea
callq 0x52d0
movq %rbx, %rdi
callq 0x5570
// File: /workspace/github_cpp_makefile_star2_O1/pollow[P]MIPSClide/simulator.cpp
// Function: Simulator::init()
void Simulator::init() {
    origin.assign(statements.begin(), statements.end());
    split();
    trim();
    format();
    calc_label();
    parse();
    
    memory = new int32_t[300000];
    memset(memory, 0, sizeof(int32_t) * 300000);
    memset(regs, 0, sizeof(int32_t) * 32);
    pc = 0;

    print("plain", cout);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
addq $0xa0, %rdi
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %rdx
callq 0xb724
movq %rbx, %rdi
callq 0xfd8c
movq %rbx, %rdi
callq 0xfb9e
movq %rbx, %rdi
callq 0xfeac
movq %rbx, %rdi
callq 0xf98c
movq %rbx, %rdi
callq 0xd4b8
movl $0x124f80, %edi         # imm = 0x124F80
callq 0x5030
movq %rax, 0xb8(%rbx)
movl $0x124f80, %edx         # imm = 0x124F80
movq %rax, %rdi
xorl %esi, %esi
callq 0x51c0
xorps %xmm0, %xmm0
movups %xmm0, 0xc0(%rbx)
movups %xmm0, 0xd0(%rbx)
movups %xmm0, 0xe0(%rbx)
movups %xmm0, 0xf0(%rbx)
movups %xmm0, 0x100(%rbx)
movups %xmm0, 0x110(%rbx)
movups %xmm0, 0x120(%rbx)
movups %xmm0, 0x130(%rbx)
movq $0x0, 0x98(%rbx)
leaq -0x28(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x17ff2(%rip), %rsi     # 0x23117
leaq 0x17ff0(%rip), %rdx     # 0x2311c
leaq -0x38(%rbp), %r14
movq %r14, %rdi
callq 0xa0b0
movq 0x22e59(%rip), %rdx     # 0x2df98
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1028a
movq -0x38(%rbp), %rdi
cmpq %r15, %rdi
je 0xb158
callq 0x52d0
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x38(%rbp), %rdi
cmpq %r15, %rdi
je 0xb174
callq 0x52d0
movq %rbx, %rdi
callq 0x5570
// File: /workspace/github_cpp_makefile_star2_O1/ksherlock[P]wdc-utils/link.cpp
// Function: reserve_symbol(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool)
symbol &reserve_symbol(const std::string &name, bool open = true) {

	auto iter = symbol_map.find(name);
	if (iter != symbol_map.end()) return symbols[iter->second];

	if (open) undefined_symbols.emplace(name);
	else undefined_symbols.erase(name);

	symbols.emplace_back();
	auto &sym = symbols.back();

	sym.name = name;
	sym.type = S_UND;
	sym.section = symbols.size() - 1;

	symbol_map.emplace(name, sym.section);

	return sym;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x110bf(%rip), %rdi     # 0x15318
movq %rbx, %rsi
callq 0x7f18
testq %rax, %rax
je 0x427e
movslq 0x28(%rax), %rax
leaq (%rax,%rax,2), %r14
shlq $0x4, %r14
addq 0x110d7(%rip), %r14     # 0x15350
jmp 0x430c
testb %bpl, %bpl
je 0x4294
leaq 0x110de(%rip), %rdi     # 0x15368
movq %rbx, %rsi
callq 0x9c62
jmp 0x42b1
leaq 0x110cd(%rip), %r14     # 0x15368
movq %r14, %rdi
movq %rbx, %rsi
callq 0x8e3e
movq %r14, %rdi
movq %rax, %rsi
callq 0x8ee6
leaq 0x11098(%rip), %rdi     # 0x15350
callq 0x6eba
movq 0x11094(%rip), %r15     # 0x15358
leaq -0x30(%r15), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2160
movb $0x0, -0x10(%r15)
movq 0x11079(%rip), %rax     # 0x15358
subq 0x1106a(%rip), %rax     # 0x15350
shrq $0x4, %rax
imull $0xaaaaaaab, %eax, %eax # imm = 0xAAAAAAAB
decl %eax
movl %eax, -0x8(%r15)
addq $-0x8, %r15
leaq 0x11017(%rip), %rdi     # 0x15318
movq %rbx, %rsi
movq %r15, %rdx
callq 0x9f26
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/ksherlock[P]wdc-utils/link.cpp
// Function: one_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
bool one_file(const std::string &name) {

	if (flags.v) printf("Processing %s\n", name.c_str());

	int fd = open(name.c_str(), O_RDONLY | O_BINARY);
	if (fd < 0) {
		warn("Unable to open %s", name.c_str());
		return false;
	}
	bool rv = false;

	Header h;
	ssize_t ok;

	ok = read(fd, &h, sizeof(h));
	if (ok != sizeof(h)) {
		warnx("Invalid object file: %s", name.c_str());
		close(fd);
		return false;
	}

	le_to_host(h.magic);
	le_to_host(h.version);
	le_to_host(h.filetype);

	if (h.magic != MOD_MAGIC || h.version != MOD_VERSION || h.filetype < MOD_OBJECT || h.filetype > MOD_LIBRARY) {
		warnx("Invalid object file: %s", name.c_str());
		close(fd);
		return false;
	}

	if (h.filetype == MOD_LIBRARY) {
		warnx("%s is a library", name.c_str());
		close(fd);
		// todo -- add to library list...
		return true;
	}

	lseek(fd, 0, SEEK_SET);
	while(one_module(name, fd)) ;

	close(fd);
	return true;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
cmpb $0x1, 0x10367(%rip)     # 0x15260
jne 0x4f0c
movq (%rbx), %rsi
leaq 0xa5b1(%rip), %rdi      # 0xf4b6
xorl %eax, %eax
callq 0x2050
movq (%rbx), %rdi
xorl %esi, %esi
xorl %eax, %eax
callq 0x21f0
testl %eax, %eax
js 0x4f79
movl %eax, %ebp
leaq 0x8(%rsp), %rsi
movl $0x7, %edx
movl %eax, %edi
callq 0x2320
leaq 0xa4c1(%rip), %rdi      # 0xf3f7
cmpq $0x7, %rax
jne 0x4f63
cmpl $0x5a44525a, 0x8(%rsp)  # imm = 0x5A44525A
setne %al
cmpw $0x1, 0xc(%rsp)
setne %cl
orb %al, %cl
movb 0xe(%rsp), %al
leal -0x3(%rax), %edx
cmpb $-0x2, %dl
setb %dl
orb %cl, %dl
je 0x4f99
xorl %r14d, %r14d
movq (%rbx), %rsi
xorl %eax, %eax
callq 0x2290
movl %ebp, %edi
callq 0x2460
jmp 0x4f8d
movq (%rbx), %rsi
leaq 0xa542(%rip), %rdi      # 0xf4c5
xorl %r14d, %r14d
xorl %eax, %eax
callq 0x20f0
movl %r14d, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
cmpb $0x2, %al
jne 0x4fa9
movb $0x1, %r14b
leaq 0xa530(%rip), %rdi      # 0xf4d7
jmp 0x4f66
movl %ebp, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2420
movq %rbx, %rdi
movl %ebp, %esi
xorl %edx, %edx
callq 0x4b7b
testb %al, %al
jne 0x4fb4
movb $0x1, %r14b
jmp 0x4f70
// File: /workspace/github_cpp_makefile_star2_O1/ksherlock[P]wdc-utils/link.cpp
// Function: intersection(std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, unsigned int, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, unsigned int>>> const&, std::set<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::map<unsigned int, int, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, int>>>&)
bool intersection(const std::unordered_map<std::string, uint32_t> &a,
	const std::set<std::string> &b, 
	std::map<uint32_t, int> &c)
{
	bool rv = false;

	for (const auto &name : b) {
		auto iter = a.find(name);
		if (iter == a.end()) continue;
		rv = true;
		c.emplace(iter->second, kPending);		
	}

	return rv;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, (%rsp)
movq %rsi, %r14
movq 0x18(%rsi), %r12
addq $0x8, %r14
cmpq %r14, %r12
je 0x5066
movq %rdi, %r15
xorl %ebp, %ebp
leaq 0x20(%r12), %rsi
movq %r15, %rdi
callq 0xadfc
testq %rax, %rax
je 0x5054
movq %rax, %rbx
movl $0x28, %edi
callq 0x2250
movq %rax, %r13
leaq 0x20(%rax), %rsi
movl 0x28(%rbx), %eax
movl %eax, 0x20(%r13)
movl $0x1, 0x24(%r13)
movq (%rsp), %rdi
callq 0xaef8
testq %rdx, %rdx
je 0x5044
movb $0x1, %bpl
movq (%rsp), %rdi
movq %rax, %rsi
movq %r13, %rcx
callq 0xaf5e
jmp 0x5054
movl $0x28, %esi
movq %r13, %rdi
callq 0x2260
movb $0x1, %bpl
movq %r12, %rdi
callq 0x22c0
movq %rax, %r12
cmpq %r14, %rax
jne 0x4fed
jmp 0x5068
xorl %ebp, %ebp
andb $0x1, %bpl
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x507f
movq %rax, %rdi
callq 0x2120
movl $0x28, %esi
movq %r13, %rdi
callq 0x2260
callq 0x2330
movq %rax, %rbx
callq 0x23a0
movq %rbx, %rdi
callq 0x23c0
movq %rax, %rdi
callq 0x7315
// File: /workspace/github_cpp_makefile_star2_O1/ksherlock[P]wdc-utils/expression.cpp
// Function: power(unsigned int, unsigned int)
uint32_t power(uint32_t a, uint32_t b) {

	uint32_t rv = 1;
	for( ; b; b >>= 1) {
		if (b & 0x01) rv *= a;
		a = a * a;
	}
	return rv; 
}

// Assembly:
testl %esi, %esi
je 0xb6b8
movl $0x1, %ecx
movl $0x1, %eax
movl %esi, %edx
testb $0x1, %sil
movl %edi, %r8d
cmovel %ecx, %r8d
imull %r8d, %eax
imull %edi, %edi
shrl %edx
cmpl $0x1, %esi
movl %edx, %esi
ja 0xb69c
retq
movl $0x1, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/ksherlock[P]wdc-utils/expression.cpp
// Function: unary_op(unsigned int, std::vector<expr, std::allocator<expr>>&)
bool unary_op(unsigned op, std::vector<expr> &v) {
	if (v.size() >=1 ) {
		expr &a = v.back();
		if (a.tag == OP_VAL) {
			switch(a.tag) {
			case OP_NOT: a.value = !a.value; break;
			case OP_NEG: a.value = -a.value; break;
			case OP_FLP: a.value = ~a.value; break;
			default:
				errx(EX_SOFTWARE, "Unsupported unary op %02x", a.tag);
			}
			return true;
		}
	}
	v.emplace_back(op);
	return false;
}

// Assembly:
pushq %rax
movl %edi, 0x4(%rsp)
movq 0x8(%rsi), %rax
cmpq (%rsi), %rax
je 0xb6d2
cmpl $0x2, -0xc(%rax)
je 0xb6e6
leaq 0x4(%rsp), %rax
movq %rsi, %rdi
movq %rax, %rsi
callq 0xbe64
xorl %eax, %eax
popq %rcx
retq
leaq 0x428b(%rip), %rsi      # 0xf978
movl $0x46, %edi
movl $0x2, %edx
xorl %eax, %eax
callq 0x2430
// File: /workspace/github_cpp_makefile_star2_O1/ksherlock[P]wdc-utils/expression.cpp
// Function: simplify_expression(expression&)
bool simplify_expression(expression &e) {
	std::vector<expr> tmp;
	bool rv = false;
	for (auto &t : e.stack) {
		if (t.tag >= OP_BIN) {
			rv = binary_op(t.tag, tmp) || rv;
		} else if (t.tag >= OP_UNA) {
			rv = unary_op(t.tag, tmp) || rv;
		} else {
			tmp.emplace_back(t);
		}
	}
	if (rv) e.stack = std::move(tmp);
	return rv;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r14
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
movq 0x10(%rdi), %r15
movq 0x18(%rdi), %r13
xorl %ebx, %ebx
cmpq %r13, %r15
je 0xbba1
movq %rsp, %r12
movl $0x1, %ebp
movl (%r15), %edi
cmpl $0x14, %edi
jl 0xbb5d
movq %r12, %rsi
callq 0xb6fe
movzbl %bl, %ebx
testb %al, %al
cmovnel %ebp, %ebx
jmp 0xbb98
cmpl $0xa, %edi
jl 0xbb6c
movq %r12, %rsi
callq 0xb6be
jmp 0xbb98
movq 0x8(%rsp), %rsi
cmpq 0x10(%rsp), %rsi
je 0xbb8d
movl 0x8(%r15), %eax
movl %eax, 0x8(%rsi)
movq (%r15), %rax
movq %rax, (%rsi)
addq $0xc, 0x8(%rsp)
jmp 0xbb98
movq %r12, %rdi
movq %r15, %rdx
callq 0xbfb6
addq $0xc, %r15
cmpq %r13, %r15
jne 0xbb43
testb $0x1, %bl
je 0xbbb5
addq $0x10, %r14
movq %rsp, %rsi
movq %r14, %rdi
callq 0xc0ce
movq (%rsp), %rdi
testq %rdi, %rdi
je 0xbbcb
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x2260
andb $0x1, %bl
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0xbbf8
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x2260
movq %rbx, %rdi
callq 0x23c0
// File: /workspace/github_cpp_makefile_star2_O1/ksherlock[P]wdc-utils/omf.cpp
// Function: push(std::vector<unsigned char, std::allocator<unsigned char>>&, unsigned int)
void push(std::vector<uint8_t> &v, uint32_t x) {
	v.push_back(x & 0xff);
	x >>= 8;
	v.push_back(x & 0xff);
	x >>= 8;
	v.push_back(x & 0xff);
	x >>= 8;
	v.push_back(x & 0xff);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
leaq 0x7(%rsp), %rsi
movb %bl, (%rsi)
callq 0xd76c
movb %bh, 0x4(%rsp)
leaq 0x4(%rsp), %rsi
movq %r14, %rdi
callq 0xd76c
movl %ebx, %eax
shrl $0x10, %eax
leaq 0x6(%rsp), %rsi
movb %al, (%rsi)
movq %r14, %rdi
callq 0xd76c
shrl $0x18, %ebx
leaq 0x5(%rsp), %rsi
movb %bl, (%rsi)
movq %r14, %rdi
callq 0xd76c
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/ksherlock[P]wdc-utils/omf.cpp
// Function: save_bin(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, omf::segment&, unsigned int)
void save_bin(const std::string &path, omf::segment &segment, uint32_t org) {

	int fd;
	fd = open(path.c_str(), O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, 0666);
	if (fd < 0) {
		err(EX_CANTCREAT, "Unable to open %s", path.c_str());
	}

	auto &data = segment.data;

	for (auto &r : segment.relocs) {

		uint32_t value = r.value + org;
		value >>= -(int8_t)r.shift;

		unsigned offset = r.offset;
		unsigned size = r.size;
		while (size--) {
			data[offset++] = value & 0xff;
			value >>= 8;
		}
	}

	auto ok = write(fd, data.data(), data.size());
	if (ok < 0) {
		close(fd);
		err(EX_OSERR, "write %s", path.c_str());
	}
	close(fd);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %r15d
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rdi
movl $0x241, %esi            # imm = 0x241
movl $0x1b6, %edx            # imm = 0x1B6
xorl %eax, %eax
callq 0x21f0
testl %eax, %eax
js 0xcb10
movl %eax, %ebp
movq 0x80(%r14), %rax
movq 0x88(%r14), %rdx
cmpq %rdx, %rax
je 0xcae4
movzbl (%rax), %esi
testl %esi, %esi
je 0xcade
movl 0x4(%rax), %r8d
movl 0x8(%rax), %edi
addl %r15d, %edi
movb 0x1(%rax), %r9b
xorl %ecx, %ecx
subb %r9b, %cl
shrl %cl, %edi
movl %edi, %ecx
movl %r8d, %r9d
incl %r8d
shrl $0x8, %ecx
movq 0x50(%r14), %r10
movb %dil, (%r10,%r9)
movl %ecx, %edi
decl %esi
jne 0xcac7
addq $0xc, %rax
jmp 0xcaa4
movq 0x50(%r14), %rsi
movq 0x58(%r14), %rdx
subq %rsi, %rdx
movl %ebp, %edi
callq 0x2100
movq %rax, %r14
movl %ebp, %edi
callq 0x2460
testq %r14, %r14
js 0xcb21
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq (%rbx), %rdx
leaq 0x29ab(%rip), %rsi      # 0xf4c5
movl $0x49, %edi
jmp 0xcb30
movq (%rbx), %rdx
leaq 0x2e82(%rip), %rsi      # 0xf9ad
movl $0x47, %edi
xorl %eax, %eax
callq 0x2240
// File: /workspace/github_cpp_makefile_star2_O1/ksherlock[P]wdc-utils/omf.cpp
// Function: super_helper::append(unsigned int)
void append(uint32_t pc) {
		unsigned offset = pc & 0xff;
		unsigned page = pc >> 8;
		assert(page >= _page);

		if (page != _page) {
			unsigned skip = page - _page;
			if (_count) --skip;
			if (skip) {
				
				while (skip >= 0x80) {
					_data.push_back(0xff);
					skip -= 0x7f;
				}
				if (skip)
					_data.push_back(0x80 | skip);
			}
			_page = page;
			_count = 0;
		}

		if (!_count) {
			_data.push_back(0); // count-1 place holder.
		} else {
			_data[_data.size() - _count - 1] = _count; // count is count - 1 at this point,
		}

		_data.push_back(offset);
		++_count;
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %esi, %r15d
shrl $0x8, %r15d
movl %r15d, %r12d
subl 0x18(%rdi), %r12d
jb 0xd618
movl %esi, %ebp
movq %rdi, %rbx
je 0xd5d1
xorl %eax, %eax
cmpl $0x0, 0x1c(%rbx)
setne %al
subl %eax, %r12d
je 0xd5c6
cmpl $0x80, %r12d
jb 0xd5ad
leaq 0xc(%rsp), %r14
movb $-0x1, 0xc(%rsp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0xd76c
addl $-0x7f, %r12d
cmpl $0x7f, %r12d
ja 0xd593
testl %r12d, %r12d
je 0xd5c6
orb $-0x80, %r12b
leaq 0xf(%rsp), %rsi
movb %r12b, (%rsi)
movq %rbx, %rdi
callq 0xd76c
movl %r15d, 0x18(%rbx)
movl $0x0, 0x1c(%rbx)
movl 0x1c(%rbx), %eax
testl %eax, %eax
je 0xd5e8
movq 0x8(%rbx), %rcx
movl %eax, %edx
notl %edx
movslq %edx, %rdx
movb %al, (%rcx,%rdx)
jmp 0xd5f8
leaq 0xe(%rsp), %rsi
movb $0x0, (%rsi)
movq %rbx, %rdi
callq 0xd76c
leaq 0xd(%rsp), %rsi
movb %bpl, (%rsi)
movq %rbx, %rdi
callq 0xd76c
incl 0x1c(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x23a4(%rip), %rdi      # 0xf9c3
leaq 0x23ab(%rip), %rsi      # 0xf9d1
leaq 0x23ac(%rip), %rcx      # 0xf9d9
movl $0xd0, %edx
callq 0x21c0
nop
// File: /workspace/github_cpp_makefile_star2_O1/ksherlock[P]wdc-utils/set_file_type.cpp
// Function: set_file_type(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned short, unsigned int)
int set_file_type(const std::string &path, uint16_t file_type, uint32_t aux_type) {

	afp::finder_info fi;
	std::error_code ec;

	if (!fi.open(path, afp::finder_info::read_write, ec))
		return -1;

	fi.set_prodos_file_type(file_type, aux_type);
	if (!fi.write(ec))
		return -1;

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
leaq 0x14(%rsp), %r15
movq %r15, %rdi
callq 0xe0ec
movq %rsp, %r12
movl $0x0, (%r12)
callq 0x2180
movq %rax, 0x8(%r12)
movq %r15, %rdi
movq %r14, %rsi
movl $0x3, %edx
movq %r12, %rcx
callq 0xe200
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
testb %al, %al
je 0xe0bd
movzwl %bp, %esi
leaq 0x14(%rsp), %rdi
movl %ebx, %edx
callq 0xe5f8
leaq 0x14(%rsp), %rdi
movq %rsp, %rsi
callq 0xe514
movzbl %al, %r14d
decl %r14d
leaq 0x14(%rsp), %rdi
callq 0xe1e0
movl %r14d, %eax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x14(%rsp), %rdi
callq 0xe1e0
movq %rbx, %rdi
callq 0x23c0
// File: /workspace/github_cpp_makefile_star2_O1/ksherlock[P]wdc-utils/afp/src/finder_info.cpp
// Function: afp::finder_info::finder_info(afp::finder_info&&)
finder_info::finder_info(finder_info &&rhs) {
	std::swap(_fd, rhs._fd);
	std::memcpy(_finder_info, rhs._finder_info, sizeof(_finder_info));
	_prodos_file_type = rhs._prodos_file_type;
	_prodos_aux_type = rhs._prodos_aux_type;
}

// Assembly:
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, (%rdi)
movw $0x0, 0x4(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movups %xmm0, 0x18(%rdi)
movl $0x0, 0x28(%rdi)
movl (%rsi), %ecx
movl %ecx, (%rdi)
movl %eax, (%rsi)
movups 0xc(%rsi), %xmm0
movups 0x1c(%rsi), %xmm1
movups %xmm1, 0x1c(%rdi)
movups %xmm0, 0xc(%rdi)
movzwl 0x4(%rsi), %eax
movw %ax, 0x4(%rdi)
movl 0x8(%rsi), %eax
movl %eax, 0x8(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O1/ksherlock[P]wdc-utils/afp/src/finder_info.cpp
// Function: afp::finder_info::operator=(afp::finder_info&&)
finder_info &finder_info::operator=(finder_info &&rhs) {
	if (this != &rhs) {
		close();
		std::swap(_fd, rhs._fd);
		std::memcpy(_finder_info, &rhs._finder_info, sizeof(_finder_info));
		_prodos_file_type = rhs._prodos_file_type;
		_prodos_aux_type = rhs._prodos_aux_type;
	}
	return *this;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq %rsi, %rdi
je 0xe1a3
movq %rsi, %r14
movl (%rbx), %edi
testl %edi, %edi
js 0xe172
callq 0x2460
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, (%rbx)
movl (%r14), %ecx
movl %ecx, (%rbx)
movl %eax, (%r14)
movups 0xc(%r14), %xmm0
movups 0x1c(%r14), %xmm1
movups %xmm1, 0x1c(%rbx)
movups %xmm0, 0xc(%rbx)
movzwl 0x4(%r14), %eax
movw %ax, 0x4(%rbx)
movl 0x8(%r14), %eax
movl %eax, 0x8(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/ksherlock[P]wdc-utils/afp/src/finder_info.cpp
// Function: afp::finder_info::write(std::error_code&)
bool finder_info::write(std::error_code &ec) {
	ec.clear();
	// n.b. no way to differentiate closed vs opened read-only.
	auto ok = _(::write_xattr(_fd, XATTR_FINDERINFO_NAME, _finder_info, 32), ec);
	if (ec) {
		remap_enoattr(ec);
		return false;
	}
	return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r15
callq 0x2180
movq %rax, %r14
movl $0x0, (%rbx)
movq %rax, 0x8(%rbx)
movl (%r15), %edi
addq $0xc, %r15
leaq 0x14be(%rip), %rsi      # 0xf9fd
movl $0x20, %ecx
movq %r15, %rdx
callq 0xe826
testq %rax, %rax
jns 0xe55e
callq 0x2040
movl (%rax), %eax
movl %eax, (%rbx)
movq %r14, 0x8(%rbx)
cmpl $0x0, (%rbx)
sete %al
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/ksherlock[P]wdc-utils/afp/src/finder_info.cpp
// Function: afp::finder_info::write(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::error_code&)
bool finder_info::write(const std::string &path, std::error_code &ec) {
	ec.clear();

	int fd = _(::open(path.c_str(), O_RDONLY), ec);
	if (ec) return false;

	auto ok = _(::write_xattr(fd, XATTR_FINDERINFO_NAME, _finder_info, 32), ec);
	::close(fd);
	if (ec) {
		remap_enoattr(ec);
		return false;
	}

	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %r15
callq 0x2180
movq %rax, %r14
movl $0x0, (%rbx)
movq %rax, 0x8(%rbx)
movq (%r12), %rdi
xorl %esi, %esi
xorl %eax, %eax
callq 0x21f0
movl %eax, %ebp
testl %eax, %eax
jns 0xe5ad
callq 0x2040
movl (%rax), %eax
movl %eax, (%rbx)
movq %r14, 0x8(%rbx)
cmpl $0x0, (%rbx)
je 0xe5b6
xorl %eax, %eax
jmp 0xe5ef
addq $0xc, %r15
leaq 0x143c(%rip), %rsi      # 0xf9fd
movl $0x20, %ecx
movl %ebp, %edi
movq %r15, %rdx
callq 0xe826
testq %rax, %rax
jns 0xe5e2
callq 0x2040
movl (%rax), %eax
movl %eax, (%rbx)
movq %r14, 0x8(%rbx)
movl %ebp, %edi
callq 0x2460
cmpl $0x0, (%rbx)
sete %al
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/ksherlock[P]wdc-utils/afp/src/finder_info.cpp
// Function: afp::finder_info::is_binary() const
bool finder_info::is_text() const {
	if (memcmp(_finder_info, "TEXT", 4) == 0) return true;
	if (_prodos_file_type == 0x04) return true;
	if (_prodos_file_type == 0xb0) return true;

	return false;
}

// Assembly:
cmpl $0x54584554, 0xc(%rdi)  # imm = 0x54584554
jne 0xe796
xorl %eax, %eax
retq
movzwl 0x4(%rdi), %ecx
xorl %eax, %eax
cmpl $0x4, %ecx
je 0xe795
cmpl $0xb0, %ecx
je 0xe795
cmpw $0x0, 0x4(%rdi)
movb $0x1, %al
jne 0xe795
cmpl $0x0, 0x8(%rdi)
jne 0xe795
cmpq $0x0, 0xc(%rdi)
setne %al
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/ksherlock[P]wdc-utils/afp/src/finder_info.cpp
// Function: afp::finder_info::file_type() const
uint32_t finder_info::file_type() const {
	uint32_t rv = 0;
	for (unsigned i = 0; i < 4; ++i) {
		rv <<= 8;
		rv |= _finder_info[i];
	}
	return rv;
}

// Assembly:
xorl %ecx, %ecx
xorl %eax, %eax
movl %eax, %edx
shll $0x8, %edx
movzbl 0xc(%rdi,%rcx), %eax
orl %edx, %eax
incq %rcx
cmpq $0x4, %rcx
jne 0xe7c6
retq
// File: /workspace/github_cpp_makefile_star2_O1/ksherlock[P]wdc-utils/afp/src/finder_info.cpp
// Function: afp::finder_info::creator_type() const
uint32_t finder_info::creator_type() const {
	uint32_t rv = 0;
	for (unsigned i = 4; i < 8; ++i) {
		rv <<= 8;
		rv |= _finder_info[i];
	}
	return rv;
}

// Assembly:
xorl %ecx, %ecx
xorl %eax, %eax
movl %eax, %edx
shll $0x8, %edx
movzbl 0x10(%rdi,%rcx), %eax
orl %edx, %eax
incq %rcx
cmpq $0x4, %rcx
jne 0xe7e0
retq
// File: /workspace/github_cpp_makefile_star2_O2/davidjosepha[P]slitherlink/src/shared/contour.cpp
// Function: Contour::sharesEndpoint(Contour const&) const
bool Contour::sharesEndpoint(Contour const & contour) const {
    return ((start_.i == contour.start_.i && start_.j == contour.start_.j) ||
            (start_.i == contour.end_.i && start_.j == contour.end_.j) ||
            (end_.i == contour.start_.i && end_.j == contour.start_.j) ||
            (end_.i == contour.end_.i && end_.j == contour.end_.j));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl 0x8(%rdi), %r8d
movl 0x8(%rsi), %ecx
cmpl %ecx, %r8d
jne 0x2464
movl 0xc(%rdi), %edx
movb $0x1, %al
cmpl 0xc(%rsi), %edx
je 0x249d
movl 0x10(%rsi), %edx
cmpl %edx, %r8d
jne 0x2478
movl 0xc(%rdi), %r8d
movb $0x1, %al
cmpl 0x14(%rsi), %r8d
je 0x249d
movl 0x10(%rdi), %r8d
cmpl %ecx, %r8d
jne 0x248b
movl 0x14(%rdi), %ecx
movb $0x1, %al
cmpl 0xc(%rsi), %ecx
je 0x249d
cmpl %edx, %r8d
jne 0x249b
movl 0x14(%rdi), %eax
cmpl 0x14(%rsi), %eax
sete %al
jmp 0x249d
xorl %eax, %eax
popq %rbp
retq
nop