LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/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, %rbx
movq %rsi, %r14
movq %rdi, (%rsp)
movq 0x18(%rsi), %r12
addq $0x8, %r14
xorl %r13d, %r13d
cmpq %r14, %r12
je 0x47ca
leaq 0x20(%r12), %rsi
movq (%rsp), %rdi
callq 0x9b18
testq %rax, %rax
je 0x47bd
movq %rax, %r15
movq %rbx, %rdi
callq 0x9c8e
movq %rax, %rbp
leaq 0x20(%rax), %rsi
movl 0x28(%r15), %eax
movl %eax, 0x20(%rbp)
movl $0x1, 0x24(%rbp)
movq %rbx, %rdi
callq 0x9be8
testq %rdx, %rdx
je 0x47af
movb $0x1, %r13b
movq %rbx, %rdi
movq %rax, %rsi
movq %rbp, %rcx
callq 0x9c48
jmp 0x47bd
movq %rbp, %rdi
pushq $0x28
popq %rsi
callq 0x2260
movb $0x1, %r13b
movq %r12, %rdi
callq 0x22b0
movq %rax, %r12
jmp 0x4757
andb $0x1, %r13b
movl %r13d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x47e2
movq %rax, %rdi
callq 0x2100
pushq $0x28
popq %rsi
movq %rbp, %rdi
callq 0x2260
callq 0x2340
movq %rax, %rbx
callq 0x23a0
movq %rbx, %rdi
callq 0x23c0
movq %rax, %rdi
callq 0x6423
// File: /workspace/github_cpp_makefile_star2_O2/ksherlock[P]wdc-utils/link.cpp
// Function: parse_ft(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
bool parse_ft(const std::string &s) {

	// gcc doesn't like std::xdigit w/ std::all_of

	if (s.length() != 2 && s.length() != 7) return false;
	if (!std::all_of(s.begin(), s.begin() + 2, isxdigit)) return false;
	if (s.length() == 7) {
		if (s[2] != ',' && s[2] != ':') return false;
		if (!std::all_of(s.begin() + 3, s.end(), isxdigit)) return false;
	}

	auto lambda = [](int lhs, uint8_t rhs){
		lhs <<= 4;
		if (rhs <= '9') return lhs + rhs - '0';
		return lhs + (rhs | 0x20) - 'a' + 10;
	};

	flags.file_type = std::accumulate(s.begin(), s.begin() + 2, 0, lambda);
	flags.aux_type = 0;

	if (s.length() == 7)
		flags.aux_type = std::accumulate(s.begin() + 3, s.end(), 0, lambda);

	return true;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rax
cmpq $0x7, %rax
je 0x4cba
cmpq $0x2, %rax
jne 0x4d0c
movq (%rbx), %rdi
leaq 0x2(%rdi), %rsi
movq 0x102f0(%rip), %rdx     # 0x14fb8
callq 0x637b
testb %al, %al
je 0x4d0c
cmpq $0x7, 0x8(%rbx)
jne 0x4d15
movq (%rbx), %rsi
movzbl 0x2(%rsi), %eax
cmpl $0x3a, %eax
je 0x4ce9
cmpl $0x2c, %eax
jne 0x4d0c
leaq 0x3(%rsi), %rdi
addq $0x7, %rsi
movq 0x102c0(%rip), %rdx     # 0x14fb8
callq 0x637b
testb %al, %al
je 0x4d0c
cmpq $0x7, 0x8(%rbx)
sete %bpl
jmp 0x4d17
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
xorl %ebp, %ebp
movq (%rbx), %r14
leaq 0x2(%r14), %rsi
movq %r14, %rdi
callq 0x4d53
movw %ax, 0x1059f(%rip)      # 0x152cc
andl $0x0, 0x1059c(%rip)     # 0x152d0
movb $0x1, %bl
testb %bpl, %bpl
je 0x4d0e
leaq 0x3(%r14), %rdi
addq $0x7, %r14
movq %r14, %rsi
callq 0x4d53
movl %eax, 0x1057f(%rip)     # 0x152d0
jmp 0x4d0e
// File: /workspace/github_cpp_makefile_star2_O2/ksherlock[P]wdc-utils/link.cpp
// Function: parenthesize(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
inline std::string parenthesize(const std::string &s) {
	std::string tmp;
	tmp.push_back('(');
	tmp.append(s);
	tmp.push_back(')');
	return tmp;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
pushq $0x28
popq %rsi
callq 0x2220
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2470
pushq $0x29
popq %rsi
movq %rbx, %rdi
callq 0x2220
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x2130
movq %r14, %rdi
callq 0x23c0
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq $0x1
popq %rcx
movl %ecx, %eax
testl %esi, %esi
je 0xa388
testb $0x1, %sil
movl %edi, %edx
cmovel %ecx, %edx
imull %edx, %eax
imull %edi, %edi
shrl %esi
jmp 0xa371
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0xa39d
cmpl $0x2, -0xc(%rax)
je 0xa3b1
leaq 0x4(%rsp), %rax
movq %rsi, %rdi
movq %rax, %rsi
callq 0xa9a8
xorl %eax, %eax
popq %rcx
retq
leaq 0x3678(%rip), %rsi      # 0xda30
pushq $0x46
popq %rdi
pushq $0x2
popq %rdx
xorl %eax, %eax
callq 0x2430
// File: /workspace/github_cpp_makefile_star2_O2/ksherlock[P]wdc-utils/expression.cpp
// Function: evaluate_expression(expression&, bool)
optional<uint32_t> evaluate_expression(expression &e, bool force) {
	std::vector<expr> tmp;
	for (const auto &t : e.stack) {
		if (t.tag == OP_LOC && force) {
			tmp.emplace_back(OP_VAL, t.value);
			continue;				
		}
		if (t.tag >= OP_BIN) {
			binary_op(t.tag, tmp);
		} else if (t.tag >= OP_UNA) {
			unary_op(t.tag, tmp);
		} else {
			tmp.emplace_back(t);
		}
	}

	if (tmp.size() == 1 && tmp.front().tag == OP_VAL) return optional<uint32_t>(tmp.front().value);
	return optional<uint32_t>();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %edx, %ebx
movq %rdi, 0x20(%rsp)
movq %rsp, %rax
andq $0x0, 0x10(%rax)
xorps %xmm0, %xmm0
movaps %xmm0, (%rax)
movq 0x10(%rsi), %r15
movq 0x18(%rsi), %r14
xorb $0x1, %bl
movl %ebx, 0x1c(%rsp)
movq %r14, 0x30(%rsp)
cmpq %r14, %r15
je 0xa945
movl (%r15), %edi
cmpl $0x3, %edi
setne %al
orb %bl, %al
jne 0xa837
movq 0x8(%rsp), %rbp
cmpq 0x10(%rsp), %rbp
je 0xa85f
movl 0x4(%r15), %eax
movl $0x2, (%rbp)
movl %eax, 0x4(%rbp)
andl $0x0, 0x8(%rbp)
addq $0xc, %rbp
movq %rbp, 0x8(%rsp)
jmp 0xa93c
cmpl $0x14, %edi
jl 0xa849
movq %rsp, %rsi
callq 0xa3c5
jmp 0xa93c
cmpl $0xa, %edi
jl 0xa931
movq %rsp, %rsi
callq 0xa389
jmp 0xa93c
movq %rsp, %rdi
pushq $0x1
popq %rsi
leaq 0x3073(%rip), %rdx      # 0xd8df
callq 0x8474
movq %rax, 0x28(%rsp)
movq (%rsp), %r13
movq 0x8(%rsp), %rbx
movq %rsp, %rdi
movq 0x28(%rsp), %rsi
callq 0x7974
movq %rax, %r12
movq %rbp, %rax
subq %r13, %rax
movl 0x4(%r15), %ecx
movl $0x2, (%r12,%rax)
movl %ecx, 0x4(%r12,%rax)
andl $0x0, 0x8(%r12,%rax)
leaq 0xc(%r12), %r14
movq %r13, %rax
movq %r12, %rcx
cmpq %rbp, %rax
je 0xa8ec
movl 0x8(%rax), %edx
movl %edx, 0x8(%rcx)
movq (%rax), %rdx
movq %rdx, (%rcx)
addq $0xc, %rax
addq $0xc, %rcx
addq $0xc, %r14
jmp 0xa8b7
movl 0x8(%rbp), %eax
movl %eax, 0x8(%r14)
movq (%rbp), %rax
movq %rax, (%r14)
addq $0xc, %rbp
addq $0xc, %r14
cmpq %rbx, %rbp
jne 0xa8d6
movq 0x10(%rsp), %rax
subq %r13, %rax
cqto
pushq $0xc
popq %rcx
idivq %rcx
movq %rsp, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x6932
movq %r12, (%rsp)
movq %r14, 0x8(%rsp)
imulq $0xc, 0x28(%rsp), %rax
addq %rax, %r12
movq %r12, 0x10(%rsp)
movl 0x1c(%rsp), %ebx
movq 0x30(%rsp), %r14
jmp 0xa93c
movq %rsp, %rdi
movq %r15, %rsi
callq 0xaa20
addq $0xc, %r15
jmp 0xa7f5
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
subq %rax, %rcx
cmpq $0xc, %rcx
jne 0xa96b
cmpl $0x2, (%rax)
jne 0xa96b
movl 0x4(%rax), %eax
movq 0x20(%rsp), %rbx
movl %eax, 0x4(%rbx)
movb $0x1, %al
jmp 0xa976
movq 0x20(%rsp), %rbx
andq $0x0, (%rbx)
xorl %eax, %eax
movb %al, (%rbx)
movq %rsp, %rdi
callq 0x690c
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xa994
movq %rax, %rbx
movq %rsp, %rdi
callq 0x690c
movq %rbx, %rdi
callq 0x23c0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0xc122
movb %bh, 0x4(%rsp)
leaq 0x4(%rsp), %rsi
movq %r14, %rdi
callq 0xc122
movl %ebx, %eax
shrl $0x10, %eax
leaq 0x6(%rsp), %rsi
movb %al, (%rsi)
movq %r14, %rdi
callq 0xc122
shrl $0x18, %ebx
leaq 0x5(%rsp), %rsi
movb %bl, (%rsi)
movq %r14, %rdi
callq 0xc122
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0xb491
movl %eax, %ebp
movq 0x80(%r14), %rax
movq 0x88(%r14), %rdx
cmpq %rdx, %rax
je 0xb465
movl 0x8(%rax), %esi
addl %r15d, %esi
movb 0x1(%rax), %dil
xorl %ecx, %ecx
subb %dil, %cl
shrl %cl, %esi
movl 0x4(%rax), %ecx
movzbl (%rax), %edi
subl $0x1, %edi
jb 0xb45f
movl %ecx, %r8d
incl %ecx
movq 0x50(%r14), %r9
movb %sil, (%r9,%r8)
shrl $0x8, %esi
jmp 0xb448
addq $0xc, %rax
jmp 0xb42c
movq 0x50(%r14), %rsi
movq 0x58(%r14), %rdx
subq %rsi, %rdx
movl %ebp, %edi
callq 0x20e0
movq %rax, %r14
movl %ebp, %edi
callq 0x2480
testq %r14, %r14
js 0xb49f
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq (%rbx), %rdx
leaq 0x20e2(%rip), %rsi      # 0xd57d
pushq $0x49
jmp 0xb4ab
movq (%rbx), %rdx
leaq 0x2627(%rip), %rsi      # 0xdad0
pushq $0x47
popq %rdi
xorl %eax, %eax
callq 0x2240
// File: /workspace/github_cpp_makefile_star2_O2/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 %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %r15d
shrl $0x8, %r15d
movl 0x18(%rdi), %eax
movl %r15d, %r12d
subl %eax, %r12d
jb 0xbf8e
movl %esi, %ebp
movq %rdi, %rbx
jne 0xbef7
movl 0x1c(%rbx), %eax
testl %eax, %eax
je 0xbf5c
movq 0x8(%rbx), %rcx
movl %eax, %edx
notl %edx
movslq %edx, %rdx
movb %al, (%rcx,%rdx)
jmp 0xbf6c
movl 0x1c(%rbx), %ecx
xorl %edx, %edx
testl %ecx, %ecx
setne %dl
subl %edx, %r12d
je 0xbf54
cmpl $0x1, %ecx
movl %r15d, %r13d
adcb $-0x1, %r13b
subb %al, %r13b
addb $-0x80, %r13b
leaq 0x4(%rsp), %r14
cmpl $0x80, %r12d
jb 0xbf3f
movb $-0x1, 0x4(%rsp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0xc122
addl $-0x7f, %r12d
addb $-0x7f, %r13b
jmp 0xbf1c
testl %r12d, %r12d
je 0xbf54
leaq 0x7(%rsp), %rsi
movb %r13b, (%rsi)
movq %rbx, %rdi
callq 0xc122
movl %r15d, 0x18(%rbx)
andl $0x0, 0x1c(%rbx)
leaq 0x6(%rsp), %rsi
movb $0x0, (%rsi)
movq %rbx, %rdi
callq 0xc122
leaq 0x5(%rsp), %rsi
movb %bpl, (%rsi)
movq %rbx, %rdi
callq 0xc122
incl 0x1c(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1b51(%rip), %rdi      # 0xdae6
leaq 0x1b58(%rip), %rsi      # 0xdaf4
leaq 0x1b59(%rip), %rcx      # 0xdafc
movl $0xd0, %edx
callq 0x21c0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0xc914
movq %rsp, %r12
andl $0x0, (%r12)
callq 0x2180
movq %rax, 0x8(%r12)
pushq $0x3
popq %rdx
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rcx
callq 0xc9f2
testb %al, %al
je 0xc8e2
movzwl %bp, %esi
leaq 0x14(%rsp), %rdi
movl %ebx, %edx
callq 0xcd76
leaq 0x14(%rsp), %rdi
movq %rsp, %rsi
callq 0xcc94
movzbl %al, %ebx
decl %ebx
jmp 0xc8e5
pushq $-0x1
popq %rbx
leaq 0x14(%rsp), %rdi
callq 0xc9e2
movl %ebx, %eax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x14(%rsp), %rdi
callq 0xc9e2
movq %rbx, %rdi
callq 0x23c0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0xc9ad
movq %rsi, %r14
movq %rbx, %rdi
callq 0xc9b8
movl (%rbx), %eax
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_O2/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 %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0xcfae
movl (%r14), %edi
addq $0xc, %r14
leaq 0xe6c(%rip), %rsi       # 0xdb20
pushq $0x20
popq %rcx
movq %r14, %rdx
callq 0xcfce
movq %rax, %rdi
movq %rbx, %rsi
callq 0xcc69
cmpl $0x0, (%rbx)
sete %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq %rdx, %rdi
callq 0xcfae
movq (%r15), %rdi
xorl %r15d, %r15d
xorl %esi, %esi
xorl %eax, %eax
callq 0x21f0
movl %eax, %ebp
movl %eax, %edi
movq %rbx, %rsi
callq 0xcd4f
cmpl $0x0, (%rbx)
jne 0xcd41
addq $0xc, %r14
leaq 0xe05(%rip), %rsi       # 0xdb20
pushq $0x20
popq %rcx
movl %ebp, %edi
movq %r14, %rdx
callq 0xcfce
movq %rax, %rdi
movq %rbx, %rsi
callq 0xcc69
movl %ebp, %edi
callq 0x2480
cmpl $0x0, (%rbx)
sete %r15b
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0xcf04
xorl %eax, %eax
retq
movzwl 0x4(%rdi), %ecx
xorl %eax, %eax
cmpl $0x4, %ecx
je 0xcf03
cmpl $0xb0, %ecx
je 0xcf03
movb $0x1, %al
testw %cx, %cx
jne 0xcf03
cmpl $0x0, 0x8(%rdi)
jne 0xcf03
addq $0xc, %rdi
cmpq $0x0, (%rdi)
setne %al
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
cmpq $0x4, %rcx
je 0xcf49
shll $0x8, %eax
movzbl 0xc(%rdi,%rcx), %edx
orl %edx, %eax
incq %rcx
jmp 0xcf34
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
cmpq $0x4, %rcx
je 0xcf63
shll $0x8, %eax
movzbl 0x10(%rdi,%rcx), %edx
orl %edx, %eax
incq %rcx
jmp 0xcf4e
retq
// File: /workspace/github_cpp_makefile_star2_O2/ksherlock[P]wdc-utils/afp/src/finder_info.cpp
// Function: (anonymous namespace)::hex(unsigned char)
int hex(uint8_t c)
	{
		if (c >= '0' && c <= '9') return c - '0';
		if (c >= 'a' && c <= 'f') return c + 10 - 'a';
		if (c >= 'A' && c <= 'F') return c + 10 - 'A';
		return 0;
	}

// Assembly:
movl %edi, %eax
leal -0x30(%rax), %ecx
cmpb $0x9, %cl
ja 0xcf90
addl $-0x30, %eax
retq
leal -0x61(%rax), %ecx
cmpb $0x5, %cl
ja 0xcf9c
addl $-0x57, %eax
retq
leal -0x41(%rax), %ecx
addl $-0x37, %eax
xorl %edx, %edx
cmpb $0x6, %cl
cmovbl %eax, %edx
movl %edx, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/davidjosepha[P]slitherlink/src/shared/contour.cpp
// Function: Contour::addContour(Contour&)
void Contour::addContour(Contour & contour) {
    if (start_.i == contour.start_.i && start_.j == contour.start_.j) {
        start_.i = contour.end_.i;
        start_.j = contour.end_.j;
        length_++;
    } else if (start_.i == contour.end_.i && start_.j == contour.end_.j) {
        start_.i = contour.start_.i;
        start_.j = contour.start_.j;
        length_++;
    } else if (end_.i == contour.start_.i && end_.j == contour.start_.j) {
        end_.i = contour.end_.i;
        end_.j = contour.end_.j;
        length_++;
    } else if (end_.i == contour.end_.i && end_.j == contour.end_.j) {
        end_.i = contour.start_.i;
        end_.j = contour.start_.j;
        length_++;
    }

    if (start_.i == end_.i && start_.j == end_.j) {
        closed_ = true;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl 0x8(%rdi), %ecx
movl 0x8(%rsi), %eax
cmpl %eax, %ecx
jne 0x25c8
movl 0xc(%rdi), %edx
cmpl 0xc(%rsi), %edx
jne 0x25c8
leaq 0xc(%rdi), %rdx
movl 0x10(%rsi), %eax
movl %eax, 0x8(%rdi)
movl $0x14, %r8d
jmp 0x2625
movl 0x10(%rsi), %r8d
cmpl %r8d, %ecx
jne 0x25e8
movl 0xc(%rdi), %edx
cmpl 0x14(%rsi), %edx
jne 0x25e8
leaq 0xc(%rdi), %rdx
movl %eax, 0x8(%rdi)
movl $0xc, %r8d
jmp 0x2625
movl 0x10(%rdi), %edx
cmpl %eax, %edx
jne 0x2609
movl 0x14(%rdi), %r9d
cmpl 0xc(%rsi), %r9d
jne 0x2609
leaq 0x14(%rdi), %rdx
movl %r8d, 0x10(%rdi)
movl $0x14, %r8d
jmp 0x2623
cmpl %r8d, %edx
jne 0x262f
movl 0x14(%rdi), %edx
cmpl 0x14(%rsi), %edx
jne 0x262f
leaq 0x14(%rdi), %rdx
movl %eax, 0x10(%rdi)
movl $0xc, %r8d
movl %ecx, %eax
movl (%rsi,%r8), %ecx
movl %ecx, (%rdx)
incl (%rdi)
movl %eax, %ecx
cmpl 0x10(%rdi), %ecx
jne 0x2640
movl 0xc(%rdi), %eax
cmpl 0x14(%rdi), %eax
jne 0x2640
movb $0x1, 0x4(%rdi)
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/davidjosepha[P]slitherlink/src/shared/grid.cpp
// Function: Grid::~Grid()
Grid::~Grid() {
    if (init_) {
        for (int i = 0; i < m_; i++) {
            delete [] updateMatrix_[i];
        }
        delete [] updateMatrix_;

        for (int i = 0; i < m_; i++) {
            delete [] contraMatrix_[i];
        }
        delete [] contraMatrix_;

        for (int i = 0; i < m_+1; i++) {
            delete [] contourMatrix_[i];
        }
        delete [] contourMatrix_;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x102e3(%rip), %rax     # 0x12d48
movq %rax, (%rdi)
cmpb $0x1, 0x49(%rdi)
jne 0x2b1f
movl 0xc(%rbx), %eax
testl %eax, %eax
jle 0x2a9c
xorl %r14d, %r14d
movq 0x30(%rbx), %rcx
movq (%rcx,%r14,8), %rdi
testq %rdi, %rdi
je 0x2a91
callq 0x21e0
movl 0xc(%rbx), %eax
incq %r14
movslq %eax, %rcx
cmpq %rcx, %r14
jl 0x2a7c
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0x2aad
callq 0x21e0
movl 0xc(%rbx), %eax
testl %eax, %eax
jle 0x2ad4
xorl %r14d, %r14d
movq 0x38(%rbx), %rcx
movq (%rcx,%r14,8), %rdi
testq %rdi, %rdi
je 0x2ac9
callq 0x21e0
movl 0xc(%rbx), %eax
incq %r14
movslq %eax, %rcx
cmpq %rcx, %r14
jl 0x2ab4
movq 0x38(%rbx), %rdi
testq %rdi, %rdi
je 0x2ae5
callq 0x21e0
movl 0xc(%rbx), %eax
testl %eax, %eax
js 0x2b11
movq $-0x1, %r14
movq 0x40(%rbx), %rcx
movq 0x8(%rcx,%r14,8), %rdi
testq %rdi, %rdi
je 0x2b06
callq 0x21e0
movl 0xc(%rbx), %eax
movslq %eax, %rcx
incq %r14
cmpq %rcx, %r14
jl 0x2af0
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0x2b1f
callq 0x21e0
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x4094
nop
// File: /workspace/github_cpp_makefile_star2_O3/davidjosepha[P]slitherlink/src/shared/grid.cpp
// Function: Grid::resetGrid()
void Grid::resetGrid() {
    for (int i = 1; i < getHeight(); i++) {
        for (int j = 1; j < getWidth()-1; j++) {
            hlines_[i][j] = EMPTY;
        }
    }

    for (int i = 1; i < getHeight()-1; i++) {
        for (int j = 1; j < getWidth(); j++) {
            vlines_[i][j] = EMPTY;
        }
    }

    for (int i = 0; i < getHeight(); i++) {
        for (int j = 0; j < getWidth(); j++) {
            setUpdateMatrix(i, j, true);
            setContraMatrix(i, j, true);
        }
    }

    for (int i = 0; i < getHeight()+1; i++) {
        for (int j = 0; j < getWidth()+1; j++) {
            setContourMatrix(i, j, std::make_pair(-1,-1));
        }
    }

    numClosedLoops_ = 0;
    numOpenLoops_ = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, -0x30(%rbp)
movslq 0xc(%rdi), %r15
cmpq $0x2, %r15
jl 0x2bd2
movq -0x30(%rbp), %rax
movl 0x10(%rax), %ebx
movq 0x20(%rax), %r12
leal -0x2(%rbx), %r14d
shlq $0x2, %r14
movl $0x1, %r13d
cmpl $0x3, %ebx
jl 0x2b7f
movq (%r12,%r13,8), %rdi
addq $0x4, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x20e0
incq %r13
cmpq %r13, %r15
jne 0x2b68
cmpl $0x2, %r15d
je 0x2bd2
leal -0x1(%r15), %r12d
movq -0x30(%rbp), %rax
movl 0x10(%rax), %r13d
movq 0x28(%rax), %rax
movq %rax, -0x38(%rbp)
leal -0x1(%r13), %r14d
shlq $0x2, %r14
movl $0x1, %ebx
cmpl $0x2, %r13d
jl 0x2bca
movq -0x38(%rbp), %rax
movq (%rax,%rbx,8), %rdi
addq $0x4, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x20e0
incq %rbx
cmpq %rbx, %r12
jne 0x2bae
testl %r15d, %r15d
jle 0x2c12
movq -0x30(%rbp), %rdx
movl 0x10(%rdx), %eax
movq 0x30(%rdx), %rcx
movq 0x38(%rdx), %rdx
xorl %esi, %esi
movb $0x1, %dil
testl %eax, %eax
jle 0x2c0a
movq (%rcx,%rsi,8), %r8
movq (%rdx,%rsi,8), %r9
xorl %r10d, %r10d
movb %dil, (%r8,%r10)
movb %dil, (%r9,%r10)
incq %r10
cmpq %r10, %rax
jne 0x2bfa
incq %rsi
cmpq %r15, %rsi
jne 0x2beb
testl %r15d, %r15d
js 0x2c50
movq -0x30(%rbp), %rax
movl 0x10(%rax), %r12d
movq 0x40(%rax), %r13
leal 0x1(%r12), %r14d
shlq $0x3, %r14
incl %r15d
xorl %ebx, %ebx
testl %r12d, %r12d
js 0x2c48
movq (%r13,%rbx,8), %rdi
movl $0xff, %esi
movq %r14, %rdx
callq 0x20e0
incq %rbx
cmpq %rbx, %r15
jne 0x2c31
movq -0x30(%rbp), %rax
movq $0x0, 0x4c(%rax)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/davidjosepha[P]slitherlink/src/shared/grid.cpp
// Function: Grid::numberSatisfied(int, int) const
bool Grid::numberSatisfied(int i, int j) const {
    assert(0 <= i && i < m_ && 0 <= j && j < n_);

    Number number = numbers_[i][j];

    /* determine number of lines around number */
    int numLines = (hlines_[i][j] == LINE)
                 + (hlines_[i+1][j] == LINE)
                 + (vlines_[i][j] == LINE)
                 + (vlines_[i][j+1] == LINE);

    switch (number) {
        case NONE:
            return true;
        case ZERO:
            return numLines == 0;
        case ONE:
            return numLines == 1;
        case TWO:
            return numLines == 2;
        case THREE:
            return numLines == 3;
    }
}

// Assembly:
testl %esi, %esi
js 0x377f
testl %edx, %edx
js 0x377f
cmpl %esi, 0xc(%rdi)
jle 0x377f
cmpl %edx, 0x10(%rdi)
jle 0x377f
movl %esi, %ecx
movq 0x18(%rdi), %rax
movq 0x20(%rdi), %rsi
movq (%rax,%rcx,8), %rax
movl %edx, %edx
movl (%rax,%rdx,4), %eax
movq (%rsi,%rcx,8), %r8
movq 0x8(%rsi,%rcx,8), %rsi
xorl %r9d, %r9d
cmpl $0x1, (%r8,%rdx,4)
sete %r9b
xorl %r8d, %r8d
cmpl $0x1, (%rsi,%rdx,4)
sete %r8b
addl %r9d, %r8d
movq 0x28(%rdi), %rsi
movq (%rsi,%rcx,8), %rsi
xorl %edi, %edi
cmpl $0x1, (%rsi,%rdx,4)
sete %dil
xorl %ecx, %ecx
cmpl $0x1, 0x4(%rsi,%rdx,4)
sete %cl
addl %edi, %ecx
addl %r8d, %ecx
leaq 0xb8a6(%rip), %rdx      # 0xf004
movslq (%rdx,%rax,4), %rax
addq %rdx, %rax
jmpq *%rax
movb $0x1, %al
retq
cmpl $0x3, %ecx
jmp 0x377b
cmpl $0x1, %ecx
jmp 0x377b
cmpl $0x2, %ecx
jmp 0x377b
testl %ecx, %ecx
sete %al
retq
pushq %rbp
movq %rsp, %rbp
leaq 0xb9ac(%rip), %rdi      # 0xf136
leaq 0xb8b4(%rip), %rsi      # 0xf045
leaq 0xb9c3(%rip), %rcx      # 0xf15b
movl $0xeb, %edx
callq 0x2100
// File: /workspace/github_cpp_makefile_star2_O3/davidjosepha[P]slitherlink/src/shared/grid.cpp
// Function: Grid::isSolved() const
bool Grid::isSolved() const {
    if (numOpenLoops_ != 0 || numClosedLoops_ != 1) {
        return false;
    }

    for (int i = 0; i < m_; i++) {
        for (int j = 0; j < n_; j++) {
            if (!numberSatisfied(i,j)) {
                return false;
            }
        }
    }

    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
xorl %ebx, %ebx
cmpl $0x0, 0x4c(%rdi)
jne 0x3804
movq %rdi, %r14
cmpl $0x1, 0x50(%rdi)
jne 0x3804
movl 0xc(%r14), %ecx
movb $0x1, %bl
testl %ecx, %ecx
jle 0x3804
movl 0x10(%r14), %eax
xorl %r15d, %r15d
testl %eax, %eax
jle 0x37f8
xorl %r12d, %r12d
movq %r14, %rdi
movl %r15d, %esi
movl %r12d, %edx
callq 0x36e2
testb %al, %al
je 0x3802
incl %r12d
movl 0x10(%r14), %eax
cmpl %eax, %r12d
jl 0x37d6
movl 0xc(%r14), %ecx
incl %r15d
cmpl %ecx, %r15d
jl 0x37cf
jmp 0x3804
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/davidjosepha[P]slitherlink/src/shared/import.cpp
// Function: Import::buildEmptyLattice(int, int)
void Import::buildEmptyLattice(int m, int n) {

    lattice_->initArrays(m+2, n+2);
    lattice_->initUpdateMatrix();

    for (int i = 0; i < m+1; i++) {
        lattice_->setHLine(i+1, 0, NLINE);
    }

    for (int i = 0; i < m+2; i++) {
        lattice_->setVLine(i, 0, NLINE);
        lattice_->setVLine(i, n+2, NLINE);
    }

    for (int j = 0; j < n+3; j++) {
        lattice_->setVLine(0, j, NLINE);
        lattice_->setVLine(m+1, j, NLINE);
    }

    for (int j = 0; j < n+2; j++) {
        lattice_->setHLine(0, j, NLINE);
        lattice_->setHLine(m+2, j, NLINE);
    }

    for (int j = 0; j < m+3; j++) {
        lattice_->setHLine(j, 0, NLINE);
        lattice_->setHLine(j, n+1, NLINE);
    }

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %ebx
movq %rdi, %r15
movq (%rdi), %rdi
leal 0x2(%rbx), %esi
movq %rdx, -0x40(%rbp)
leal 0x2(%rdx), %r13d
movl %esi, -0x2c(%rbp)
movl %r13d, %edx
callq 0x414a
movq (%r15), %rdi
callq 0x2e0c
movq %rbx, -0x38(%rbp)
testl %ebx, %ebx
js 0x3d95
movq -0x38(%rbp), %r14
negl %r14d
movl $0x1, %ebx
movq (%r15), %rdi
movq (%rdi), %rax
movl %ebx, %esi
xorl %edx, %edx
movl $0x2, %ecx
callq *(%rax)
leal (%r14,%rbx), %eax
incl %eax
movl %ebx, %ecx
incl %ecx
movl %ecx, %ebx
cmpl $0x2, %eax
jne 0x3d73
movq -0x38(%rbp), %r14
cmpl $-0x1, %r14d
movl -0x2c(%rbp), %r12d
jl 0x3dd1
xorl %ebx, %ebx
movq (%r15), %rdi
movq (%rdi), %rax
movl %ebx, %esi
xorl %edx, %edx
movl $0x2, %ecx
callq *0x8(%rax)
movq (%r15), %rdi
movq (%rdi), %rax
movl %ebx, %esi
movl %r13d, %edx
movl $0x2, %ecx
callq *0x8(%rax)
incl %ebx
cmpl %ebx, %r12d
jne 0x3da5
cmpl $-0x2, -0x40(%rbp)
jl 0x3e56
leal 0x1(%r14), %ebx
xorl %r14d, %r14d
testl %r13d, %r13d
movl $0x0, %r12d
cmovgl %r13d, %r12d
incl %r12d
movq (%r15), %rdi
movq (%rdi), %rax
xorl %esi, %esi
movl %r14d, %edx
movl $0x2, %ecx
callq *0x8(%rax)
movq (%r15), %rdi
movq (%rdi), %rax
movl %ebx, %esi
movl %r14d, %edx
movl $0x2, %ecx
callq *0x8(%rax)
incl %r14d
cmpl %r14d, %r12d
jne 0x3dee
cmpl $-0x2, -0x40(%rbp)
movq -0x38(%rbp), %r14
movl -0x2c(%rbp), %r12d
je 0x3e56
xorl %ebx, %ebx
movq (%r15), %rdi
movq (%rdi), %rax
xorl %esi, %esi
movl %ebx, %edx
movl $0x2, %ecx
callq *(%rax)
movq (%r15), %rdi
movq (%rdi), %rax
movl %r12d, %esi
movl %ebx, %edx
movl $0x2, %ecx
callq *(%rax)
incl %ebx
cmpl %ebx, %r13d
jne 0x3e2c
cmpl $-0x2, %r14d
movq -0x40(%rbp), %r12
jl 0x3e93
incl %r12d
addl $0x3, %r14d
xorl %ebx, %ebx
movq (%r15), %rdi
movq (%rdi), %rax
movl %ebx, %esi
xorl %edx, %edx
movl $0x2, %ecx
callq *(%rax)
movq (%r15), %rdi
movq (%rdi), %rax
movl %ebx, %esi
movl %r12d, %edx
movl $0x2, %ecx
callq *(%rax)
incl %ebx
cmpl %ebx, %r14d
jne 0x3e69
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/davidjosepha[P]slitherlink/src/shared/import.cpp
// Function: Import::importNumberRow(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void Import::importNumberRow(int i, std::string row) {
    for (std::string::size_type j = 0; j < row.size(); j++) {
        char c = row[j];
        switch (c) {
            case '0':
                lattice_->setNumber(i, j+1, ZERO);
                break;
            case '1':
                lattice_->setNumber(i, j+1, ONE);
                break;
            case '2':
                lattice_->setNumber(i, j+1, TWO);
                break;
            case '3':
                lattice_->setNumber(i, j+1, THREE);
                break;
            default:
                lattice_->setNumber(i, j+1, NONE);
                break;
        }
    }
}

// Assembly:
cmpq $0x0, 0x8(%rdx)
je 0x3f00
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %r14d
movq %rdi, %r15
xorl %r13d, %r13d
xorl %r12d, %r12d
movq (%rbx), %rax
movb (%rax,%r12), %al
movq (%r15), %rdi
incq %r12
addb $-0x30, %al
movzbl %al, %eax
leal 0x1(%rax), %ecx
cmpb $0x4, %al
cmovael %r13d, %ecx
movl %r14d, %esi
movl %r12d, %edx
callq 0x43de
cmpq 0x8(%rbx), %r12
jb 0x3ec6
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/davidjosepha[P]slitherlink/src/shared/import.cpp
// Function: Import::importHLineRow(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void Import::importHLineRow(int i, std::string row) {
  lattice_->setHLine(i, 0, NLINE);
    for (std::string::size_type j = 0; j < row.size(); j++) {

        char c = row[j];
        switch (c) {
            case '-':
                lattice_->setHLine(i, j+1, LINE);
                break;
            case 'x':
                lattice_->setHLine(i, j+1, NLINE);
                break;
            default:
                lattice_->setHLine(i, j+1, EMPTY);
                break;
        }
    }
    lattice_->setHLine(i, row.size()+1, NLINE);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movl %esi, %ebx
movq %rdi, %r14
movq (%rdi), %rdi
movq (%rdi), %rax
xorl %edx, %edx
movl $0x2, %ecx
callq *(%rax)
cmpq $0x0, 0x8(%r15)
je 0x3f6b
xorl %r12d, %r12d
movl $0x1, %r13d
movq (%r15), %rax
movb (%rax,%r12), %al
movq (%r14), %rdi
incq %r12
movq (%rdi), %r8
xorl %ecx, %ecx
cmpb $0x78, %al
sete %cl
addl %ecx, %ecx
cmpb $0x2d, %al
cmovel %r13d, %ecx
movl %ebx, %esi
movl %r12d, %edx
callq *(%r8)
movq 0x8(%r15), %rdx
cmpq %rdx, %r12
jb 0x3f37
incl %edx
jmp 0x3f70
movl $0x1, %edx
movq (%r14), %rdi
movq (%rdi), %rax
movq (%rax), %rax
movl %ebx, %esi
movl $0x2, %ecx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%rax
// File: /workspace/github_cpp_makefile_star2_O3/davidjosepha[P]slitherlink/src/shared/import.cpp
// Function: Import::importVLineRow(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void Import::importVLineRow(int i, std::string row) {

    for (std::string::size_type j = 0; j < row.size(); j++) {
        char c = row[j];
        switch (c) {
            case '-':
                lattice_->setVLine(i, j+1, LINE);
                break;
            case 'x':
                lattice_->setVLine(i, j+1, NLINE);
                break;
            default:
                lattice_->setVLine(i, j+1, EMPTY);
                break;
        }
    }
}

// Assembly:
cmpq $0x0, 0x8(%rdx)
je 0x3ff4
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %r14d
movq %rdi, %r15
xorl %r12d, %r12d
movl $0x1, %r13d
movq (%rbx), %rax
movb (%rax,%r12), %al
movq (%r15), %rdi
incq %r12
movq (%rdi), %r8
xorl %ecx, %ecx
cmpb $0x78, %al
sete %cl
addl %ecx, %ecx
cmpb $0x2d, %al
cmovel %r13d, %ecx
movl %r14d, %esi
movl %r12d, %edx
callq *0x8(%r8)
cmpq 0x8(%rbx), %r12
jb 0x3fb7
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/davidjosepha[P]slitherlink/src/shared/lattice.cpp
// Function: Lattice::destroyArrays()
void Lattice::destroyArrays() {
    if (init_) {
        for (int i = 0; i < m_; i++) {
            delete [] numbers_[i];
            delete [] hlines_[i];
            delete [] vlines_[i];
        }
        // hlines_ needs one extra
        delete [] hlines_[m_];
        // and delete the outer arrays
        delete [] numbers_;
        delete [] hlines_;
        delete [] vlines_;
    }
}

// Assembly:
cmpb $0x1, 0x8(%rdi)
jne 0x4149
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movslq 0xc(%rdi), %rax
testq %rax, %rax
jle 0x410a
xorl %r14d, %r14d
movq 0x18(%rbx), %rax
movq (%rax,%r14,8), %rdi
testq %rdi, %rdi
je 0x40da
callq 0x21e0
movq 0x20(%rbx), %rax
movq (%rax,%r14,8), %rdi
testq %rdi, %rdi
je 0x40ec
callq 0x21e0
movq 0x28(%rbx), %rax
movq (%rax,%r14,8), %rdi
testq %rdi, %rdi
je 0x40fe
callq 0x21e0
incq %r14
movslq 0xc(%rbx), %rax
cmpq %rax, %r14
jl 0x40c8
movq 0x20(%rbx), %rcx
movq (%rcx,%rax,8), %rdi
testq %rdi, %rdi
je 0x411c
callq 0x21e0
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x412a
callq 0x21e0
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x4138
callq 0x21e0
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
popq %rbx
popq %r14
popq %rbp
jne 0x21e0
retq
// File: /workspace/github_cpp_makefile_star2_O3/davidjosepha[P]slitherlink/src/shared/lattice.cpp
// Function: Lattice::initArrays(int, int)
void Lattice::initArrays(int m, int n) {
    assert(m > 0 && n > 0);

    destroyArrays();

    m_ = m;
    n_ = n;

    numbers_ = new Number*[m_];
    hlines_ = new Edge*[m_+1];
    vlines_ = new Edge*[m_];
    for (int i = 0; i < m_; i++) {
        numbers_[i] = new Number[n_];
        hlines_[i] = new Edge[n_];
        vlines_[i] = new Edge[n_+1];
    }
    // hlines_ needs one extra
    hlines_[m_] = new Edge[n_];

    init_ = true;

    cleanArrays();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testl %esi, %esi
jle 0x4226
movl %edx, %r14d
testl %edx, %edx
jle 0x4226
movl %esi, %r15d
movq %rdi, %rbx
callq 0x40a8
movl %r15d, 0xc(%rbx)
movl %r14d, 0x10(%rbx)
movl %r15d, %r12d
leaq (,%r12,8), %r15
movq %r15, %rdi
callq 0x2030
movq %rax, 0x18(%rbx)
leaq 0x8(,%r12,8), %rdi
callq 0x2030
movq %rax, 0x20(%rbx)
movq %r15, %rdi
callq 0x2030
movq %rax, 0x28(%rbx)
movl %r14d, %r14d
leaq 0x4(,%r14,4), %r15
shlq $0x2, %r14
xorl %r13d, %r13d
movq %r14, %rdi
callq 0x2030
movq 0x18(%rbx), %rcx
movq %rax, (%rcx,%r13,8)
movq %r14, %rdi
callq 0x2030
movq 0x20(%rbx), %rcx
movq %rax, (%rcx,%r13,8)
movq %r15, %rdi
callq 0x2030
movq 0x28(%rbx), %rcx
movq %rax, (%rcx,%r13,8)
incq %r13
cmpq %r13, %r12
jne 0x41c4
movq %r14, %rdi
callq 0x2030
movq 0x20(%rbx), %rcx
movq %rax, (%rcx,%r12,8)
movb $0x1, 0x8(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4246
leaq 0xaf98(%rip), %rdi      # 0xf1c5
leaq 0xafa0(%rip), %rsi      # 0xf1d4
leaq 0xafb0(%rip), %rcx      # 0xf1eb
movl $0x17, %edx
callq 0x2100
nop
// File: /workspace/github_cpp_makefile_star2_O3/davidjosepha[P]slitherlink/src/shared/lattice.cpp
// Function: Lattice::cleanArrays()
void Lattice::cleanArrays() {
    if (init_) {
        for (int i = 0; i < m_; i++) {
            for (int j = 0; j < n_; j++) {
                numbers_[i][j] = NONE;
                hlines_[i][j] = EMPTY;
                vlines_[i][j] = EMPTY;
            }
            vlines_[i][n_] = EMPTY;
        }

        for (int j = 0; j < n_; j++) {
            hlines_[m_][j] = EMPTY;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
cmpb $0x1, 0x8(%rdi)
jne 0x42d3
movslq 0xc(%rdi), %rax
movslq 0x10(%rdi), %rcx
movl %ecx, %edx
testq %rax, %rax
jle 0x42b4
movq 0x18(%rdi), %rsi
movq 0x20(%rdi), %r8
movq 0x28(%rdi), %r9
xorl %r10d, %r10d
xorl %r11d, %r11d
testl %ecx, %ecx
jle 0x42a1
movq (%rsi,%r11,8), %r14
movq (%r8,%r11,8), %r15
movq (%r9,%r11,8), %rbx
xorl %r12d, %r12d
movl %r10d, (%r14,%r12,4)
movl %r10d, (%r15,%r12,4)
movl %r10d, (%rbx,%r12,4)
incq %r12
cmpq %r12, %rdx
jne 0x428b
jmp 0x42a5
movq (%r9,%r11,8), %rbx
movl $0x0, (%rbx,%rcx,4)
incq %r11
cmpq %rax, %r11
jne 0x4278
testl %edx, %edx
jle 0x42d3
movq 0x20(%rdi), %rcx
movq (%rcx,%rax,8), %rdi
shlq $0x2, %rdx
xorl %esi, %esi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x20e0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/davidjosepha[P]slitherlink/src/solver/epq.cpp
// Function: EPQ::initEPQ(int, int)
void EPQ::initEPQ(int m, int n)  {
    assert(m > 0 && n > 0);

    m_ = m;
    n_ = n;

    for (int i = 1; i < m-1; i++) {
        for (int j = 1; j < n-1; j++) {
            pq_.push(createPrioEdge(0, i, j, true));
            pq_.push(createPrioEdge(0, i, j, false));
        }
        pq_.push(createPrioEdge(0, i, n-1, false));
    }

    for (int j = 1; j < n-1; j++) {
        pq_.push(createPrioEdge(0, m-1, j, true));
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, -0x50(%rbp)
testl %esi, %esi
jle 0x58ef
testl %edx, %edx
jle 0x58ef
movq %rdi, %r14
movq -0x50(%rbp), %rax
movl %eax, (%rdi)
movl %edx, 0x4(%rdi)
leal -0x1(%rax), %ecx
movl %ecx, -0x48(%rbp)
leal -0x1(%rdx), %ecx
movl %ecx, -0x44(%rbp)
cmpl $0x3, %eax
jb 0x5858
leaq 0x8(%r14), %r12
leal -0x2(%rdx), %eax
movl %eax, -0x54(%rbp)
movl $0x2, %eax
subl %edx, %eax
movq %rax, -0x68(%rbp)
movl $0x1, %ebx
leaq -0x40(%rbp), %r13
movq %rdx, -0x60(%rbp)
cmpl $0x3, %edx
jb 0x5813
movl $0x1, %r15d
cmpl (%r14), %ebx
jg 0x58d0
cmpl 0x4(%r14), %r15d
jge 0x58d0
movl %ebx, -0x40(%rbp)
movl %r15d, -0x3c(%rbp)
movq $0x0, -0x38(%rbp)
movb $0x1, -0x30(%rbp)
movq %r12, %rdi
movq %r13, %rsi
callq 0x5bbc
cmpl (%r14), %ebx
jge 0x58d0
cmpl 0x4(%r14), %r15d
jg 0x58d0
movl %ebx, -0x40(%rbp)
movl %r15d, -0x3c(%rbp)
movq $0x0, -0x38(%rbp)
movb $0x0, -0x30(%rbp)
movq %r12, %rdi
movq %r13, %rsi
callq 0x5bbc
movq -0x68(%rbp), %rax
addl %r15d, %eax
incl %eax
movl %r15d, %ecx
incl %ecx
movl %ecx, %r15d
cmpl $0x1, %eax
jne 0x579b
cmpl (%r14), %ebx
jge 0x58d0
movl -0x54(%rbp), %eax
cmpl 0x4(%r14), %eax
jge 0x58d0
movl %ebx, -0x40(%rbp)
movl -0x44(%rbp), %eax
movl %eax, -0x3c(%rbp)
movq $0x0, -0x38(%rbp)
movb $0x0, -0x30(%rbp)
movq %r12, %rdi
movq %r13, %rsi
callq 0x5bbc
incl %ebx
cmpl -0x48(%rbp), %ebx
movq -0x60(%rbp), %rdx
jne 0x5790
cmpl $0x2, -0x44(%rbp)
jb 0x58c1
leaq 0x8(%r14), %r12
movq -0x50(%rbp), %rax
addl $-0x2, %eax
movq %rax, -0x50(%rbp)
movl $0x2, %ebx
subl %edx, %ebx
movl $0x1, %r13d
leaq -0x40(%rbp), %r15
movq -0x50(%rbp), %rax
cmpl (%r14), %eax
jge 0x58d0
cmpl 0x4(%r14), %r13d
jge 0x58d0
movl -0x48(%rbp), %eax
movl %eax, -0x40(%rbp)
movl %r13d, -0x3c(%rbp)
movq $0x0, -0x38(%rbp)
movb $0x1, -0x30(%rbp)
movq %r12, %rdi
movq %r15, %rsi
callq 0x5bbc
leal (%rbx,%r13), %eax
incl %eax
movl %r13d, %ecx
incl %ecx
movl %ecx, %r13d
cmpl $0x1, %eax
jne 0x587e
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x9aa8(%rip), %rdi      # 0xf37f
leaq 0x9a72(%rip), %rsi      # 0xf350
leaq 0x9ad4(%rip), %rcx      # 0xf3b9
movl $0x1a, %edx
callq 0x2100
leaq 0x98cf(%rip), %rdi      # 0xf1c5
leaq 0x9a53(%rip), %rsi      # 0xf350
leaq 0x9a5f(%rip), %rcx      # 0xf363
movl $0x7, %edx
callq 0x2100
// File: /workspace/github_cpp_makefile_star2_O3/davidjosepha[P]slitherlink/src/solver/epq.cpp
// Function: EPQ::copyPQToVector() const
std::vector<PrioEdge> EPQ::copyPQToVector() const {
    std::priority_queue<PrioEdge, std::vector<PrioEdge>, ComparePrioEdge> newPQ;
    std::vector<PrioEdge> outputvec(pq_.size());
    std::copy(&(pq_.top()), &(pq_.top()) + pq_.size(), &outputvec[0]);
    return outputvec;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq 0x10(%rsi), %rax
subq 0x8(%rsi), %rax
movq %rdi, %rbx
sarq $0x3, %rax
movabsq $-0x5555555555555555, %rsi # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %rsi
leaq -0x11(%rbp), %rdx
callq 0x5dc6
movq 0x8(%r14), %rsi
movq 0x10(%r14), %rdx
subq %rsi, %rdx
je 0x5a59
movq (%rbx), %rdi
callq 0x2240
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/davidjosepha[P]slitherlink/src/solver/epq.cpp
// Function: EPQ::copySubsetPQ(EPQ)
void EPQ::copySubsetPQ(EPQ orig) {
    PrioEdge pe = orig.top();
    std::vector<PrioEdge> prioEdgeVec = orig.copyPQToVector();
    for (int i = 0; i < prioEdgeVec.size(); i++) {
        PrioEdge cur = prioEdgeVec[i];
        if (cur.coords.i < pe.coords.i && cur.coords.j < pe.coords.j)
            pq_.push(prioEdgeVec[i]);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq 0x8(%rsi), %rax
movl (%rax), %r15d
movl 0x4(%rax), %r12d
leaq -0x48(%rbp), %r14
movq %r14, %rdi
callq 0x5a10
movq (%r14), %rsi
movq 0x8(%r14), %rax
cmpq %rsi, %rax
je 0x5b87
addq $0x8, %rbx
movq %rbx, -0x30(%rbp)
xorl %r14d, %r14d
movabsq $-0x5555555555555555, %r13 # imm = 0xAAAAAAAAAAAAAAAB
xorl %ebx, %ebx
cmpl %r15d, (%rsi,%r14)
jge 0x5b6d
cmpl %r12d, 0x4(%rsi,%r14)
jge 0x5b6d
addq %r14, %rsi
movq -0x30(%rbp), %rdi
callq 0x5c80
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rax
incq %rbx
movq %rax, %rcx
subq %rsi, %rcx
sarq $0x3, %rcx
imulq %r13, %rcx
addq $0x18, %r14
cmpq %rbx, %rcx
ja 0x5b4c
testq %rsi, %rsi
je 0x5b94
movq %rsi, %rdi
callq 0x2180
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x48(%rbp), %rdi
testq %rdi, %rdi
je 0x5bb4
callq 0x2180
movq %rbx, %rdi
callq 0x2260
// File: /workspace/github_cpp_makefile_star2_O3/davidjosepha[P]slitherlink/src/solver/rotate.cpp
// Function: rotateNumber(int, int, int, int, Orientation)
Coordinates rotateNumber(int i, int j, int m, int n, Orientation orient) {
    switch (orient) {
        case UPFLIP:
            i = m - i - 1;
        case UP:
            return Coordinates { i, j };
        case DOWNFLIP:
            i = m - i - 1;
        case DOWN:
            return Coordinates { m-i-1, n-j-1 };
        case LEFTFLIP:
            i = m - i - 1;
        case LEFT:
            return Coordinates { n-j-1, i };
        case RIGHTFLIP:
            i = m - i - 1;
        case RIGHT:
            return Coordinates { j, m-i-1 };
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %r8d, %eax
leaq 0x9202(%rip), %r8       # 0xf420
movslq (%r8,%rax,4), %rax
addq %r8, %rax
jmpq *%rax
notl %edi
addl %edx, %edi
jmp 0x6255
notl %edi
addl %edx, %edi
notl %edi
movl %edi, %eax
addl %edx, %eax
jmp 0x6251
notl %edi
addl %edx, %edi
notl %edi
addl %edx, %edi
notl %esi
addl %ecx, %esi
jmp 0x6255
notl %edi
addl %edx, %edi
movl %edi, %eax
notl %esi
addl %ecx, %esi
movl %esi, %edi
movl %eax, %esi
shlq $0x20, %rsi
movl %edi, %eax
orq %rsi, %rax
popq %rbp
retq