LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/jliesch[P]ofxget/pugixml/pugixml.cpp
// Function: pugi::impl::(anonymous namespace)::xpath_parser::parse_node_test_type(pugi::impl::(anonymous namespace)::xpath_lexer_string const&)
nodetest_t parse_node_test_type(const xpath_lexer_string& name)
		{
			switch (name.begin[0])
			{
			case 'c':
				if (name == PUGIXML_TEXT("comment"))
					return nodetest_type_comment;

				break;

			case 'n':
				if (name == PUGIXML_TEXT("node"))
					return nodetest_type_node;

				break;

			case 'p':
				if (name == PUGIXML_TEXT("processing-instruction"))
					return nodetest_type_pi;

				break;

			case 't':
				if (name == PUGIXML_TEXT("text"))
					return nodetest_type_text;

				break;

			default:
				break;
			}

			return nodetest_none;
		}

// Assembly:
pushq %rax
movq (%rdi), %rax
movzbl (%rax), %eax
cmpl $0x74, %eax
je 0x269e5
cmpl $0x6e, %eax
je 0x269bd
cmpl $0x70, %eax
je 0x269d1
cmpl $0x63, %eax
jne 0x269fa
leaq 0x5a68(%rip), %rsi      # 0x2c418
callq 0x26b58
testb %al, %al
je 0x269fa
pushq $0x3
jmp 0x269f7
leaq 0x6b62(%rip), %rsi      # 0x2d526
callq 0x26b58
testb %al, %al
je 0x269fa
pushq $0x2
jmp 0x269f7
leaq 0x72c3(%rip), %rsi      # 0x2dc9b
callq 0x26b58
testb %al, %al
je 0x269fa
pushq $0x4
jmp 0x269f7
leaq 0x72c6(%rip), %rsi      # 0x2dcb2
callq 0x26b58
testb %al, %al
je 0x269fa
pushq $0x5
popq %rax
jmp 0x269fc
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_cpp_makefile_star2_O2/jliesch[P]ofxget/pugixml/pugixml.cpp
// Function: pugi::impl::(anonymous namespace)::xpath_parser::parse_relative_location_path(pugi::impl::(anonymous namespace)::xpath_ast_node*)
xpath_ast_node* parse_relative_location_path(xpath_ast_node* set)
		{
			xpath_ast_node* n = parse_step(set);
			if (!n) return 0;

			while (_lexer.current() == lex_slash || _lexer.current() == lex_double_slash)
			{
				lexeme_t l = _lexer.current();
				_lexer.next();

				if (l == lex_double_slash)
				{
					n = alloc_node(ast_step, n, axis_descendant_or_self, nodetest_type_node, 0);
					if (!n) return 0;
				}

				n = parse_step(n);
				if (!n) return 0;
			}

			return n;
		}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x26d70
testq %rax, %rax
je 0x26af7
movq %rax, %r12
leaq 0x8(%rbx), %r15
movq $0x0, (%rsp)
pushq $0x5
popq %rbp
pushq $0x2
popq %r13
movl 0x28(%rbx), %r14d
movl %r14d, %eax
andl $-0x2, %eax
cmpl $0x10, %eax
jne 0x26b01
movq %r15, %rdi
callq 0x25a0e
cmpl $0x11, %r14d
jne 0x26ae2
movq %rbx, %rdi
movq %r12, %rsi
movl %ebp, %edx
movl %r13d, %ecx
xorl %r8d, %r8d
callq 0x26a38
movq %rax, %r12
testq %rax, %rax
je 0x26b05
movq %rbx, %rdi
movq %r12, %rsi
callq 0x26d70
movq %rax, %r12
testq %rax, %rax
jne 0x26aaa
jmp 0x26b05
movq $0x0, (%rsp)
jmp 0x26b05
movq %r12, (%rsp)
movq (%rsp), %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jliesch[P]ofxget/pugixml/pugixml.cpp
// Function: pugi::impl::(anonymous namespace)::xpath_parser::alloc_string(pugi::impl::(anonymous namespace)::xpath_lexer_string const&)
const char_t* alloc_string(const xpath_lexer_string& value)
		{
			if (!value.begin)
				return PUGIXML_TEXT("");

			size_t length = static_cast<size_t>(value.end - value.begin);

			char_t* c = static_cast<char_t*>(_alloc->allocate((length + 1) * sizeof(char_t)));
			if (!c) return 0;

			memcpy(c, value.begin, length * sizeof(char_t));
			c[length] = 0;

			return c;
		}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq (%rsi), %rax
testq %rax, %rax
je 0x26c3c
movq %rsi, %r15
movq 0x8(%rsi), %r14
subq %rax, %r14
movq (%rdi), %rdi
leaq 0x1(%r14), %rsi
callq 0x26c58
testq %rax, %rax
je 0x26c45
movq %rax, %rbx
movq (%r15), %rsi
movq %rax, %rdi
movq %r14, %rdx
callq 0x6080
movb $0x0, (%rbx,%r14)
jmp 0x26c47
leaq 0x34c6(%rip), %rbx      # 0x2a109
jmp 0x26c47
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/jliesch[P]ofxget/pugixml/pugixml.cpp
// Function: pugi::impl::(anonymous namespace)::xpath_allocator::allocate(unsigned long)
void* allocate(size_t size)
		{
			// round size up to block alignment boundary
			size = (size + xpath_memory_block_alignment - 1) & ~(xpath_memory_block_alignment - 1);

			if (_root_size + size <= _root->capacity)
			{
				void* buf = &_root->data[0] + _root_size;
				_root_size += size;
				return buf;
			}
			else
			{
				// make sure we have at least 1/4th of the page free after allocation to satisfy subsequent allocation requests
				size_t block_capacity_base = sizeof(_root->data);
				size_t block_capacity_req = size + block_capacity_base / 4;
				size_t block_capacity = (block_capacity_base > block_capacity_req) ? block_capacity_base : block_capacity_req;

				size_t block_size = block_capacity + offsetof(xpath_memory_block, data);

				xpath_memory_block* block = static_cast<xpath_memory_block*>(xml_memory::allocate(block_size));
				if (!block)
				{
					if (_error) *_error = true;
					return 0;
				}

				block->next = _root;
				block->capacity = block_capacity;

				_root = block;
				_root_size = size;

				return block->data;
			}
		}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
addq $0x7, %r14
andq $-0x8, %r14
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
leaq (%rcx,%r14), %rdx
cmpq 0x8(%rax), %rdx
jbe 0x26cb9
leaq 0x400(%r14), %rax
cmpq $0x1001, %rax           # imm = 0x1001
movl $0x1000, %r15d          # imm = 0x1000
cmovaeq %rax, %r15
leaq 0x10(%r15), %rdi
callq *0x1cbcb(%rip)          # 0x43868
testq %rax, %rax
je 0x26cc6
movq (%rbx), %rcx
movq %rcx, (%rax)
movq %r15, 0x8(%rax)
movq %rax, (%rbx)
movq %r14, 0x8(%rbx)
addq $0x10, %rax
jmp 0x26cd4
addq %rcx, %rax
addq $0x10, %rax
movq %rdx, 0x8(%rbx)
jmp 0x26cd4
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0x26cd2
movb $0x1, (%rax)
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/jliesch[P]ofxget/pugixml/pugixml.cpp
// Function: pugi::impl::(anonymous namespace)::convert_string_to_number(char const*)
PUGI__FN bool check_string_to_number_format(const char_t* string)
	{
		// parse leading whitespace
		while (PUGI__IS_CHARTYPE(*string, ct_space)) ++string;

		// parse sign
		if (*string == '-') ++string;

		if (!*string) return false;

		// if there is no integer part, there should be a decimal part with at least one digit
		if (!PUGI__IS_CHARTYPEX(string[0], ctx_digit) && (string[0] != '.' || !PUGI__IS_CHARTYPEX(string[1], ctx_digit))) return false;

		// parse integer part
		while (PUGI__IS_CHARTYPEX(*string, ctx_digit)) ++string;

		// parse decimal part
		if (*string == '.')
		{
			++string;

			while (PUGI__IS_CHARTYPEX(*string, ctx_digit)) ++string;
		}

		// parse trailing whitespace
		while (PUGI__IS_CHARTYPE(*string, ct_space)) ++string;

		return *string == 0;
	}

// Assembly:
leaq -0x2(%rdi), %rax
leaq 0x4fdb(%rip), %rcx      # 0x2bcc0
movzbl 0x2(%rax), %esi
incq %rax
testb $0x8, (%rsi,%rcx)
jne 0x26ce5
xorl %edx, %edx
cmpb $0x2d, %sil
sete %dl
movzbl 0x1(%rax,%rdx), %esi
testq %rsi, %rsi
je 0x26d60
leaq -0x3a(%rsi), %r8
cmpq $-0xb, %r8
ja 0x26d23
cmpl $0x2e, %esi
jne 0x26d60
movzbl 0x2(%rax,%rdx), %esi
addq $-0x3a, %rsi
cmpq $-0xa, %rsi
jb 0x26d60
movzbl 0x1(%rax,%rdx), %esi
leaq -0x3a(%rsi), %r8
incq %rax
cmpq $-0xb, %r8
ja 0x26d23
cmpb $0x2e, %sil
jne 0x26d4d
movzbl 0x1(%rax,%rdx), %esi
addq $-0x3a, %rsi
incq %rax
cmpq $-0xb, %rsi
ja 0x26d3b
addq %rdx, %rax
movzbl (%rax), %edx
incq %rax
testb $0x8, (%rdx,%rcx)
jne 0x26d50
testb %dl, %dl
je 0x26d69
movsd 0x4a28(%rip), %xmm0     # 0x2b790
retq
xorl %esi, %esi
jmp 0x6870
// File: /workspace/github_cpp_makefile_star2_O2/jliesch[P]ofxget/pugixml/pugixml.cpp
// Function: pugi::impl::(anonymous namespace)::xpath_ast_node::is_posinv_expr() const
bool is_posinv_expr() const
		{
			switch (_type)
			{
			case ast_func_position:
			case ast_func_last:
				return false;

			case ast_string_constant:
			case ast_number_constant:
			case ast_variable:
				return true;

			case ast_step:
			case ast_step_root:
				return true;

			case ast_predicate:
			case ast_filter:
				return true;

			default:
				if (_left && !_left->is_posinv_expr()) return false;

				for (xpath_ast_node* n = _right; n; n = n->_next)
					if (!n->is_posinv_expr()) return false;

				return true;
			}
		}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movb (%rdi), %cl
addb $-0x10, %cl
cmpb $0x2a, %cl
jae 0x273b3
movzbl %cl, %eax
movabsq $0x3000000007f, %rdx    # imm = 0x3000000007F
btq %rax, %rdx
jae 0x273b3
movabsq $0x3000000001f, %r14    # imm = 0x3000000001F
shrq %cl, %r14
jmp 0x273ea
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x273c5
callq 0x27380
testb %al, %al
je 0x273e7
addq $0x10, %rbx
movq (%rbx), %rbx
testq %rbx, %rbx
sete %r14b
je 0x273ea
movq %rbx, %rdi
callq 0x27380
addq $0x18, %rbx
testb %al, %al
jne 0x273c9
jmp 0x273ea
xorl %r14d, %r14d
andb $0x1, %r14b
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/jliesch[P]ofxget/pugixml/pugixml.cpp
// Function: pugi::impl::(anonymous namespace)::string_value(pugi::xpath_node const&, pugi::impl::(anonymous namespace)::xpath_allocator*)
PUGI__FN xpath_string string_value(const xpath_node& na, xpath_allocator* alloc)
	{
		if (na.attribute())
			return xpath_string::from_const(na.attribute().value());
		else
		{
			xml_node n = na.node();

			switch (n.type())
			{
			case node_pcdata:
			case node_cdata:
			case node_comment:
			case node_pi:
				return xpath_string::from_const(n.value());

			case node_document:
			case node_element:
			{
				xpath_string result;

				// element nodes can have value if parse_embed_pcdata was used
				if (n.value()[0])
					result.append(xpath_string::from_const(n.value()), alloc);

				xml_node cur = n.first_child();

				while (cur && cur != n)
				{
					if (cur.type() == node_pcdata || cur.type() == node_cdata)
						result.append(xpath_string::from_const(cur.value()), alloc);

					if (cur.first_child())
						cur = cur.first_child();
					else if (cur.next_sibling())
						cur = cur.next_sibling();
					else
					{
						while (!cur.next_sibling() && cur != n)
							cur = cur.parent();

						if (cur != n) cur = cur.next_sibling();
					}
				}

				return result;
			}

			default:
				return xpath_string();
			}
		}
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq 0x8(%rsi), %r12
leaq 0x24a0(%rip), %rax      # 0x2a109
testq %r12, %r12
je 0x27c98
movq 0x10(%r12), %rcx
testq %rcx, %rcx
cmovneq %rcx, %rax
movq %rax, (%rbx)
movb $0x0, 0x8(%rbx)
andq $0x0, 0x10(%rbx)
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%rsi), %r12
testq %r12, %r12
je 0x27c7a
movq %rdx, %r14
movl (%r12), %ecx
andl $0xf, %ecx
leal -0x3(%rcx), %edx
cmpl $0x4, %edx
jb 0x27c6e
decl %ecx
cmpl $0x1, %ecx
ja 0x27c7a
leaq 0x2449(%rip), %r13      # 0x2a109
movq %r13, (%rbx)
movb $0x0, 0x8(%rbx)
andq $0x0, 0x10(%rbx)
movq 0x10(%r12), %rax
testq %rax, %rax
cmoveq %r13, %rax
cmpb $0x0, (%rax)
je 0x27cf7
movq %rsp, %rsi
movq %rax, (%rsi)
movb $0x0, 0x8(%rsi)
andq $0x0, 0x10(%rsi)
movq %rbx, %rdi
movq %r14, %rdx
callq 0x27d88
movq 0x20(%r12), %rax
movq %rsp, %r15
testq %rax, %rax
je 0x27c86
movq %rax, %rbp
cmpq %r12, %rax
je 0x27c86
movq (%rbp), %rax
andl $0xf, %eax
addq $-0x3, %rax
cmpq $0x1, %rax
ja 0x27d49
movq 0x10(%rbp), %rax
testq %rax, %rax
cmoveq %r13, %rax
movq %rax, (%rsp)
movb $0x0, 0x8(%rsp)
andq $0x0, 0x10(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x27d88
movq 0x20(%rbp), %rax
testq %rax, %rax
jne 0x27cff
movq 0x30(%rbp), %rax
testq %rax, %rax
jne 0x27cff
jmp 0x27d61
movq 0x18(%rax), %rbp
movq %rbp, %rax
movl $0x0, %ebp
testq %rax, %rax
je 0x27d61
cmpq %r12, %rax
je 0x27d7a
cmpq $0x0, 0x30(%rax)
je 0x27d5d
cmpq %r12, %rax
je 0x27cff
movq 0x30(%rax), %rax
jmp 0x27cff
// File: /workspace/github_cpp_makefile_star2_O2/jliesch[P]ofxget/pugixml/pugixml.cpp
// Function: pugi::impl::(anonymous namespace)::xpath_string::append(pugi::impl::(anonymous namespace)::xpath_string const&, pugi::impl::(anonymous namespace)::xpath_allocator*)
void append(const xpath_string& o, xpath_allocator* alloc)
		{
			// skip empty sources
			if (!*o._buffer) return;

			// fast append for constant empty target and constant source
			if (!*_buffer && !_uses_heap && !o._uses_heap)
			{
				_buffer = o._buffer;
			}
			else
			{
				// need to make heap copy
				size_t target_length = length();
				size_t source_length = o.length();
				size_t result_length = target_length + source_length;

				// allocate new buffer
				char_t* result = static_cast<char_t*>(alloc->reallocate(_uses_heap ? const_cast<char_t*>(_buffer) : 0, (target_length + 1) * sizeof(char_t), (result_length + 1) * sizeof(char_t)));
				if (!result) return;

				// append first string to the new buffer in case there was no reallocation
				if (!_uses_heap) memcpy(result, _buffer, target_length * sizeof(char_t));

				// append second string to the new buffer
				memcpy(result + target_length, o._buffer, source_length * sizeof(char_t));
				result[result_length] = 0;

				// finalize
				_buffer = result;
				_uses_heap = true;
				_length_heap = result_length;
			}
		}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq (%rsi), %rax
cmpb $0x0, (%rax)
je 0x27e3b
movq %rdx, %r13
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rcx
cmpb $0x0, (%rcx)
jne 0x27dc1
cmpb $0x0, 0x8(%rbx)
jne 0x27dc1
cmpb $0x0, 0x8(%r14)
je 0x27e4a
movq %rbx, %rdi
callq 0x214ba
movq %rax, %r15
movq %r14, %rdi
callq 0x214ba
movq %rax, %r12
cmpb $0x0, 0x8(%rbx)
je 0x27de2
movq (%rbx), %rsi
jmp 0x27de4
xorl %esi, %esi
leaq 0x1(%r15), %rdx
leaq (%r12,%r15), %rcx
incq %rcx
movq %r13, %rdi
callq 0x27e50
testq %rax, %rax
je 0x27e3b
movq %rax, %r13
movq %r12, %rbp
addq %r15, %rbp
cmpb $0x0, 0x8(%rbx)
jne 0x27e19
movq (%rbx), %rsi
movq %r13, %rdi
movq %r15, %rdx
callq 0x6080
movq %r13, %rdi
addq %r15, %rdi
movq (%r14), %rsi
movq %r12, %rdx
callq 0x6080
movb $0x0, (%r13,%rbp)
movq %r13, (%rbx)
movb $0x1, 0x8(%rbx)
movq %rbp, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, (%rbx)
jmp 0x27e3b
nop
// File: /workspace/github_cpp_makefile_star2_O2/jliesch[P]ofxget/pugixml/pugixml.cpp
// Function: pugi::impl::(anonymous namespace)::xpath_string::from_heap(char const*, char const*, pugi::impl::(anonymous namespace)::xpath_allocator*)
static xpath_string from_heap(const char_t* begin, const char_t* end, xpath_allocator* alloc)
		{
			assert(begin <= end);

			if (begin == end)
				return xpath_string();

			size_t length = static_cast<size_t>(end - begin);
			const char_t* data = duplicate_string(begin, length, alloc);

			return data ? xpath_string(data, true, length) : xpath_string();
		}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpq %rdx, %rsi
ja 0x28144
movq %rdi, %rbx
je 0x28126
movq %rdx, %r14
subq %rsi, %r14
movq %rsi, %rdi
movq %r14, %rsi
movq %rcx, %rdx
callq 0x28310
testq %rax, %rax
je 0x28126
movq %rax, (%rbx)
movb $0x1, 0x8(%rbx)
movq %r14, 0x10(%rbx)
jmp 0x28139
leaq 0x1fdc(%rip), %rax      # 0x2a109
movq %rax, (%rbx)
movb $0x0, 0x8(%rbx)
andq $0x0, 0x10(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x69c2(%rip), %rdi      # 0x2eb0d
leaq 0x3de3(%rip), %rsi      # 0x2bf35
leaq 0x69c1(%rip), %rcx      # 0x2eb1a
movl $0x1e19, %edx           # imm = 0x1E19
callq 0x6100
nop
// File: /workspace/github_cpp_makefile_star2_O2/jliesch[P]ofxget/pugixml/pugixml.cpp
// Function: pugi::impl::(anonymous namespace)::xpath_string::data(pugi::impl::(anonymous namespace)::xpath_allocator*)
char_t* data(xpath_allocator* alloc)
		{
			// make private heap copy
			if (!_uses_heap)
			{
				size_t length_ = strlength(_buffer);
				const char_t* data_ = duplicate_string(_buffer, length_, alloc);

				if (!data_) return 0;

				_buffer = data_;
				_uses_heap = true;
				_length_heap = length_;
			}

			return const_cast<char_t*>(_buffer);
		}

// Assembly:
movq (%rdi), %rax
cmpb $0x0, 0x8(%rdi)
jne 0x281aa
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
movq %rax, %rdi
callq 0x18462
movq %rax, %r14
movq (%rbx), %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x28310
testq %rax, %rax
je 0x281a3
movq %rax, (%rbx)
movb $0x1, 0x8(%rbx)
movq %r14, 0x10(%rbx)
jmp 0x281a5
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/jliesch[P]ofxget/pugixml/pugixml.cpp
// Function: pugi::impl::(anonymous namespace)::normalize_space(char*)
PUGI__FN char_t* normalize_space(char_t* buffer)
	{
		char_t* write = buffer;

		for (char_t* it = buffer; *it; )
		{
			char_t ch = *it++;

			if (PUGI__IS_CHARTYPE(ch, ct_space))
			{
				// replace whitespace sequence with single space
				while (PUGI__IS_CHARTYPE(*it, ct_space)) it++;

				// avoid leading spaces
				if (write != buffer) *write++ = ' ';
			}
			else *write++ = ch;
		}

		// remove trailing space
		if (write != buffer && PUGI__IS_CHARTYPE(write[-1], ct_space)) write--;

		// zero-terminate
		*write = 0;

		return write;
	}

// Assembly:
movq %rdi, %rax
leaq 0x3b0b(%rip), %rcx      # 0x2bcc0
movq %rdi, %rsi
movq %rdi, %r8
movq %r8, %rdx
movzbl (%rsi), %edi
testq %rdi, %rdi
je 0x281f4
testb $0x8, (%rdi,%rcx)
jne 0x281d1
incq %rsi
jmp 0x281e9
movzbl 0x1(%rsi), %edi
incq %rsi
testb $0x8, (%rdi,%rcx)
jne 0x281d1
movb $0x20, %dil
movq %rax, %r8
cmpq %rax, %rdx
je 0x281bb
movb %dil, (%rdx)
incq %rdx
movq %rdx, %r8
jmp 0x281bb
cmpq %rax, %rdx
je 0x28209
leaq -0x1(%rdx), %rax
movzbl -0x1(%rdx), %esi
testb $0x8, (%rsi,%rcx)
cmoveq %rdx, %rax
movb $0x0, (%rax)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/jliesch[P]ofxget/pugixml/pugixml.hpp
// Function: pugi::xml_attribute pugi::xml_node::find_attribute<pugi::impl::(anonymous namespace)::namespace_uri_predicate>(pugi::impl::(anonymous namespace)::namespace_uri_predicate) const
xml_attribute find_attribute(Predicate pred) const
		{
			if (!_root) return xml_attribute();

			for (xml_attribute attrib = first_attribute(); attrib; attrib = attrib.next_attribute())
				if (pred(attrib))
					return attrib;

			return xml_attribute();
		}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq (%rdi), %rbx
testq %rbx, %rbx
je 0x282fc
movq %rdx, %r14
movq %rsi, %r15
addq $0x38, %rbx
leaq 0x1e65(%rip), %rbp      # 0x2a109
leaq 0x6632(%rip), %r12      # 0x2e8dd
movq (%rbx), %rbx
testq %rbx, %rbx
je 0x282fc
movq 0x8(%rbx), %r13
testq %r13, %r13
cmoveq %rbp, %r13
movq %r13, %rdi
movq %r12, %rsi
callq 0x27bcd
testb %al, %al
je 0x282f6
movb 0x5(%r13), %al
testq %r15, %r15
je 0x282f2
cmpb $0x3a, %al
jne 0x282f6
addq $0x6, %r13
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1b8b5
testb %al, %al
je 0x282f6
jmp 0x282fe
testb %al, %al
je 0x282fe
addq $0x20, %rbx
jmp 0x282ab
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jliesch[P]ofxget/pugixml/pugixml.cpp
// Function: pugi::impl::(anonymous namespace)::xpath_string::duplicate_string(char const*, unsigned long, pugi::impl::(anonymous namespace)::xpath_allocator*)
static char_t* duplicate_string(const char_t* string, size_t length, xpath_allocator* alloc)
		{
			char_t* result = static_cast<char_t*>(alloc->allocate((length + 1) * sizeof(char_t)));
			if (!result) return 0;

			memcpy(result, string, length * sizeof(char_t));
			result[length] = 0;

			return result;
		}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
incq %rsi
movq %rdx, %rdi
callq 0x26c58
movq %rax, %r15
testq %rax, %rax
je 0x28341
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x6080
movb $0x0, (%r15,%rbx)
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/jliesch[P]ofxget/pugixml/pugixml.cpp
// Function: pugi::impl::(anonymous namespace)::xpath_node_set_raw::append(pugi::xpath_node const*, pugi::xpath_node const*, pugi::impl::(anonymous namespace)::xpath_allocator*)
void append(const xpath_node* begin_, const xpath_node* end_, xpath_allocator* alloc)
		{
			if (begin_ == end_) return;

			size_t size_ = static_cast<size_t>(_end - _begin);
			size_t capacity = static_cast<size_t>(_eos - _begin);
			size_t count = static_cast<size_t>(end_ - begin_);

			if (size_ + count > capacity)
			{
				// reallocate the old array or allocate a new one
				xpath_node* data = static_cast<xpath_node*>(alloc->reallocate(_begin, capacity * sizeof(xpath_node), (size_ + count) * sizeof(xpath_node)));
				if (!data) return;

				// finalize
				_begin = data;
				_end = data + size_;
				_eos = data + size_ + count;
			}

			memcpy(_end, begin_, count * sizeof(xpath_node));
			_end += count;
		}

// Assembly:
cmpq %rdx, %rsi
je 0x283dd
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq 0x8(%rdi), %rsi
movq 0x10(%rdi), %rdi
movq %rdi, %r12
subq %rsi, %r12
movq %r12, %r8
sarq $0x4, %r8
movq 0x18(%r14), %rdx
subq %rsi, %rdx
movq %rdx, %r9
sarq $0x4, %r9
subq %r15, %rbx
movq %rbx, %rax
sarq $0x4, %rax
addq %r8, %rax
cmpq %r9, %rax
jbe 0x283c3
shlq $0x4, %rax
movq %rcx, %rdi
movq %rax, %rcx
callq 0x27e50
testq %rax, %rax
je 0x283d2
movq %rax, 0x8(%r14)
addq %rax, %r12
movq %r12, 0x10(%r14)
leaq (%r12,%rbx), %rax
movq %rax, 0x18(%r14)
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x6080
addq %rbx, 0x10(%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/jliesch[P]ofxget/pugixml/pugixml.cpp
// Function: void pugi::impl::(anonymous namespace)::xpath_ast_node::step_fill<pugi::impl::(anonymous namespace)::axis_to_type<(pugi::impl::(anonymous namespace)::axis_t)6>>(pugi::impl::(anonymous namespace)::xpath_node_set_raw&, pugi::xpath_node const&, pugi::impl::(anonymous namespace)::xpath_allocator*, bool, pugi::impl::(anonymous namespace)::axis_to_type<(pugi::impl::(anonymous namespace)::axis_t)6>)
void step_fill(xpath_node_set_raw& ns, const xpath_node& xn, xpath_allocator* alloc, bool once, T v)
		{
			const axis_t axis = T::axis;
			const bool axis_has_attributes = (axis == axis_ancestor || axis == axis_ancestor_or_self || axis == axis_descendant_or_self || axis == axis_following || axis == axis_parent || axis == axis_preceding || axis == axis_self);

			if (xn.node())
				step_fill(ns, xn.node().internal_object(), alloc, once, v);
			else if (axis_has_attributes && xn.attribute() && xn.parent())
				step_fill(ns, xn.attribute().internal_object(), xn.parent().internal_object(), alloc, once, v);
		}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %r8d, %ebx
movq %rcx, %r14
movq %rsi, %r15
movq %rdi, %r12
movq (%rdx), %rcx
movq 0x8(%rdx), %rax
testq %rax, %rax
setne %dl
testq %rcx, %rcx
sete %sil
orb %dl, %sil
je 0x28fcc
testq %rax, %rax
setne %al
testq %rcx, %rcx
setne %dl
andb %al, %dl
cmpb $0x1, %dl
jne 0x28fde
movq 0x20(%rcx), %r13
testq %r13, %r13
jne 0x28fb0
jmp 0x28fa7
movq 0x18(%rcx), %rcx
testq %rcx, %rcx
je 0x28fde
movq 0x30(%rcx), %r13
testq %r13, %r13
je 0x28f9e
movq %r12, %rdi
movq %r15, %rsi
movq %r13, %rdx
movq %r14, %rcx
callq 0x28ae0
andb %bl, %al
movq %r13, %rcx
cmpb $0x1, %al
jne 0x28f93
jmp 0x28fde
movq 0x30(%rcx), %rax
testq %rax, %rax
jne 0x29005
movq 0x18(%rcx), %rcx
testq %rcx, %rcx
jne 0x28fcc
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq 0x20(%r13), %rax
testq %rax, %rax
jne 0x29005
jmp 0x28ffc
movq 0x18(%r13), %r13
testq %r13, %r13
je 0x28fde
movq 0x30(%r13), %rax
testq %rax, %rax
je 0x28ff3
movq %rax, %r13
movq %r12, %rdi
movq %r15, %rsi
movq %rax, %rdx
movq %r14, %rcx
callq 0x28ae0
testb %bl, %al
je 0x28fe8
jmp 0x28fde
nop
// File: /workspace/github_cpp_makefile_star2_O2/jliesch[P]ofxget/pugixml/pugixml.cpp
// Function: pugi::impl::(anonymous namespace)::xpath_ast_node::step_push(pugi::impl::(anonymous namespace)::xpath_node_set_raw&, pugi::xml_node_struct*, pugi::impl::(anonymous namespace)::xpath_allocator*)
bool step_push(xpath_node_set_raw& ns, xml_node_struct* n, xpath_allocator* alloc)
		{
			assert(n);

			xml_node_type type = PUGI__NODETYPE(n);

			switch (_test)
			{
			case nodetest_name:
				if (type == node_element && n->name && strequal(n->name, _data.nodetest))
				{
					ns.push_back(xml_node(n), alloc);
					return true;
				}
				break;

			case nodetest_type_node:
				ns.push_back(xml_node(n), alloc);
				return true;

			case nodetest_type_comment:
				if (type == node_comment)
				{
					ns.push_back(xml_node(n), alloc);
					return true;
				}
				break;

			case nodetest_type_text:
				if (type == node_pcdata || type == node_cdata)
				{
					ns.push_back(xml_node(n), alloc);
					return true;
				}
				break;

			case nodetest_type_pi:
				if (type == node_pi)
				{
					ns.push_back(xml_node(n), alloc);
					return true;
				}
				break;

			case nodetest_pi:
				if (type == node_pi && n->name && strequal(n->name, _data.nodetest))
				{
					ns.push_back(xml_node(n), alloc);
					return true;
				}
				break;

			case nodetest_all:
				if (type == node_element)
				{
					ns.push_back(xml_node(n), alloc);
					return true;
				}
				break;

			case nodetest_all_in_namespace:
				if (type == node_element && n->name && starts_with(n->name, _data.nodetest))
				{
					ns.push_back(xml_node(n), alloc);
					return true;
				}
				break;

			default:
				assert(false && "Unknown axis"); // unreachable
			}

			return false;
		}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
testq %rdx, %rdx
je 0x28ba3
movq %rcx, %rbx
movzbl 0x3(%rdi), %ecx
decl %ecx
cmpl $0x7, %ecx
ja 0x28bc2
movq %rdx, %r15
movq %rsi, %r14
movl (%rdx), %eax
andl $0xf, %eax
leaq 0x3102(%rip), %rdx      # 0x2bc18
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
cmpl $0x2, %eax
je 0x28b5f
jmp 0x28b78
addl $-0x3, %eax
cmpl $0x1, %eax
ja 0x28b78
jmp 0x28b81
cmpl $0x5, %eax
jne 0x28b78
jmp 0x28b81
cmpl $0x6, %eax
jne 0x28b78
jmp 0x28b81
cmpl $0x2, %eax
jne 0x28b78
movq 0x8(%r15), %rax
testq %rax, %rax
je 0x28b78
movq 0x20(%rdi), %rsi
movq %rax, %rdi
callq 0x27bcd
jmp 0x28b74
cmpl $0x6, %eax
jne 0x28b78
movq 0x8(%r15), %rax
testq %rax, %rax
je 0x28b78
movq 0x20(%rdi), %rsi
movq %rax, %rdi
callq 0x1888f
testb %al, %al
jne 0x28b81
xorl %eax, %eax
jmp 0x28b99
cmpl $0x2, %eax
jne 0x28b78
movq %rsp, %rsi
movq %r15, (%rsi)
andq $0x0, 0x8(%rsi)
movq %r14, %rdi
movq %rbx, %rdx
callq 0x28774
movb $0x1, %al
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x5384(%rip), %rdi      # 0x2df2e
leaq 0x3384(%rip), %rsi      # 0x2bf35
leaq 0x6640(%rip), %rcx      # 0x2f1f8
movl $0x25f6, %edx           # imm = 0x25F6
callq 0x6100
leaq 0x620f(%rip), %rdi      # 0x2edd8
leaq 0x3365(%rip), %rsi      # 0x2bf35
leaq 0x6621(%rip), %rcx      # 0x2f1f8
movl $0x2639, %edx           # imm = 0x2639
callq 0x6100
nop
// File: /workspace/github_cpp_makefile_star2_O2/jliesch[P]ofxget/pugixml/pugixml.cpp
// Function: pugi::impl::(anonymous namespace)::xpath_ast_node::step_push(pugi::impl::(anonymous namespace)::xpath_node_set_raw&, pugi::xml_attribute_struct*, pugi::xml_node_struct*, pugi::impl::(anonymous namespace)::xpath_allocator*)
bool step_push(xpath_node_set_raw& ns, xml_attribute_struct* a, xml_node_struct* parent, xpath_allocator* alloc)
		{
			assert(a);

			const char_t* name = a->name ? a->name + 0 : PUGIXML_TEXT("");

			switch (_test)
			{
			case nodetest_name:
				if (strequal(name, _data.nodetest) && is_xpath_attribute(name))
				{
					ns.push_back(xpath_node(xml_attribute(a), xml_node(parent)), alloc);
					return true;
				}
				break;

			case nodetest_type_node:
			case nodetest_all:
				if (is_xpath_attribute(name))
				{
					ns.push_back(xpath_node(xml_attribute(a), xml_node(parent)), alloc);
					return true;
				}
				break;

			case nodetest_all_in_namespace:
				if (starts_with(name, _data.nodetest) && is_xpath_attribute(name))
				{
					ns.push_back(xpath_node(xml_attribute(a), xml_node(parent)), alloc);
					return true;
				}
				break;

			default:
				;
			}

			return false;
		}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
testq %rdx, %rdx
je 0x28d2a
movq %rcx, %r12
movq %rdx, %r15
movq 0x8(%rdx), %rax
testq %rax, %rax
leaq 0x1459(%rip), %r13      # 0x2a109
cmovneq %rax, %r13
movzbl 0x3(%rdi), %ecx
xorl %eax, %eax
decl %ecx
cmpl $0x7, %ecx
ja 0x28d1c
movq %r8, %rbx
movq %rsi, %r14
leaq 0x2f6a(%rip), %rdx      # 0x2bc38
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movq 0x20(%rdi), %rsi
movq %r13, %rdi
callq 0x1888f
jmp 0x28cf1
movq 0x20(%rdi), %rsi
movq %r13, %rdi
callq 0x27bcd
testb %al, %al
je 0x28d1a
movq %r13, %rdi
callq 0x27c24
testb %al, %al
je 0x28d1a
movq %rsp, %rsi
movq %r12, (%rsi)
movq %r15, 0x8(%rsi)
movq %r14, %rdi
movq %rbx, %rdx
callq 0x28774
movb $0x1, %al
jmp 0x28d1c
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x1d1b(%rip), %rdi      # 0x2aa4c
leaq 0x31fd(%rip), %rsi      # 0x2bf35
leaq 0x6537(%rip), %rcx      # 0x2f276
movl $0x25ce, %edx           # imm = 0x25CE
callq 0x6100
nop
// File: /workspace/github_cpp_makefile_star2_O2/jliesch[P]ofxget/pugixml/pugixml.cpp
// Function: pugi::impl::(anonymous namespace)::xpath_node_set_raw::push_back_grow(pugi::xpath_node const&, pugi::impl::(anonymous namespace)::xpath_allocator*)
PUGI__FN_NO_INLINE void xpath_node_set_raw::push_back_grow(const xpath_node& node, xpath_allocator* alloc)
	{
		size_t capacity = static_cast<size_t>(_eos - _begin);

		// get new capacity (1.5x rule)
		size_t new_capacity = capacity + capacity / 2 + 1;

		// reallocate the old array or allocate a new one
		xpath_node* data = static_cast<xpath_node*>(alloc->reallocate(_begin, capacity * sizeof(xpath_node), new_capacity * sizeof(xpath_node)));
		if (!data) return;

		// finalize
		_begin = data;
		_end = data + capacity;
		_eos = data + new_capacity;

		// push
		*_end++ = node;
	}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r15
movq 0x8(%rdi), %rsi
movq 0x18(%rdi), %r14
subq %rsi, %r14
movq %r14, %rax
sarq $0x4, %rax
movq %rax, %rcx
shrq %rcx
leaq (%rax,%rcx), %r12
incq %r12
shlq $0x4, %r12
movq %rdx, %rdi
movq %r14, %rdx
movq %r12, %rcx
callq 0x27e50
testq %rax, %rax
je 0x292ab
movq %rax, 0x8(%r15)
addq %rax, %r12
movq %r12, 0x18(%r15)
leaq (%rax,%r14), %rcx
addq $0x10, %rcx
movq %rcx, 0x10(%r15)
movups (%rbx), %xmm0
movups %xmm0, (%rax,%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/jliesch[P]ofxget/ofxhome_test.cc
// Function: main
int main() {
  assertEq(AnonymizeRequest("<USERID>123"), "<USERID>X\n");
  assertEq(AnonymizeRequest("sdf\n<USERID>123<OTHER>"), "sdf\n<USERID>X\n<OTHER>");
  assertEq(AnonymizeRequest("<USERID>123<USERID>456"), "<USERID>X\n<USERID>X\n");
  assertEq(AnonymizeRequest("<ACCTID>123"), "<ACCTID>X\n");
  assertEq(AnonymizeRequest("<USERPASS>123"), "<USERPASS>X\n");
  return 0;
}

// Assembly:
pushq %rbx
subq $0x70, %rsp
leaq 0x6499(%rip), %rsi      # 0x2f93d
leaq 0x30(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x66e0
leaq 0x50(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x9928
leaq 0x64ce(%rip), %rsi      # 0x2f997
leaq 0x10(%rsp), %rdi
leaq 0xe(%rsp), %rdx
callq 0x66e0
leaq 0x50(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x29420
leaq 0x10(%rsp), %rdi
callq 0x6890
leaq 0x50(%rsp), %rdi
callq 0x6890
leaq 0x30(%rsp), %rdi
callq 0x6890
leaq 0x643d(%rip), %rsi      # 0x2f949
leaq 0x30(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x66e0
leaq 0x50(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x9928
leaq 0x642f(%rip), %rsi      # 0x2f960
leaq 0x10(%rsp), %rdi
leaq 0xe(%rsp), %rdx
callq 0x66e0
leaq 0x50(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x29420
leaq 0x10(%rsp), %rdi
callq 0x6890
leaq 0x50(%rsp), %rdi
callq 0x6890
leaq 0x30(%rsp), %rdi
callq 0x6890
leaq 0x6402(%rip), %rsi      # 0x2f976
leaq 0x30(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x66e0
leaq 0x50(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x9928
leaq 0x63f4(%rip), %rsi      # 0x2f98d
leaq 0x10(%rsp), %rdi
leaq 0xe(%rsp), %rdx
callq 0x66e0
leaq 0x50(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x29420
leaq 0x10(%rsp), %rdi
callq 0x6890
leaq 0x50(%rsp), %rdi
callq 0x6890
leaq 0x30(%rsp), %rdi
callq 0x6890
leaq 0x63c6(%rip), %rsi      # 0x2f9a2
leaq 0x30(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x66e0
leaq 0x50(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x9928
leaq 0xf70(%rip), %rsi       # 0x2a571
leaq 0x10(%rsp), %rdi
leaq 0xe(%rsp), %rdx
callq 0x66e0
leaq 0x50(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x29420
leaq 0x10(%rsp), %rdi
callq 0x6890
leaq 0x50(%rsp), %rdi
callq 0x6890
leaq 0x30(%rsp), %rdi
callq 0x6890
leaq 0x636a(%rip), %rsi      # 0x2f9ae
leaq 0x30(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x66e0
leaq 0x50(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x9928
leaq 0xf13(%rip), %rsi       # 0x2a57c
leaq 0x10(%rsp), %rdi
leaq 0xe(%rsp), %rdx
callq 0x66e0
leaq 0x50(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x29420
leaq 0x10(%rsp), %rdi
callq 0x6890
leaq 0x50(%rsp), %rdi
callq 0x6890
leaq 0x30(%rsp), %rdi
callq 0x6890
xorl %eax, %eax
addq $0x70, %rsp
popq %rbx
retq
jmp 0x296cd
jmp 0x296dc
jmp 0x296eb
jmp 0x296fa
jmp 0x296cd
jmp 0x296dc
jmp 0x296eb
jmp 0x296fa
jmp 0x296cd
jmp 0x296dc
jmp 0x296eb
jmp 0x296fa
jmp 0x296cd
jmp 0x296dc
jmp 0x296eb
jmp 0x296fa
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x6890
jmp 0x296df
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x6890
jmp 0x296ee
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x6890
jmp 0x296fd
movq %rax, %rbx
movq %rbx, %rdi
callq 0x6460
// File: /workspace/github_cpp_makefile_star2_O2/sundale[P]gcode/driver.cc
// Function: report_error(int, int)
void report_error( /* ARGUMENTS                            */
 int error_code,   /* the code number of the error message */
 int print_stack)  /* print stack if ON, otherwise not     */
{
  char interp_error_text_buf[LINELEN];
  int k;

  error_text(error_code, interp_error_text_buf, 5); /* for coverage of code */
  error_text(error_code, interp_error_text_buf, LINELEN);
  fprintf(stderr, "%s\n",
          ((interp_error_text_buf[0] == 0) ? "Unknown error, bad error code" : interp_error_text_buf));
  line_text(interp_error_text_buf, LINELEN);
  fprintf(stderr, "%s\n", interp_error_text_buf);
  if (print_stack == ON)
    {
      for (k = 0; ; k++)
        {
          stack_name(k, interp_error_text_buf, LINELEN);
          if (interp_error_text_buf[0] != 0)
            fprintf(stderr, "%s\n", interp_error_text_buf);
          else
            break;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movl %esi, %ebx
movl %edi, %r12d
leaq 0x8d74(%rip), %r15      # 0xd1d0
leaq -0x130(%rbp), %r14
pushq $0x5
popq %rcx
movq %r15, %rdi
movl %r12d, %esi
movq %r14, %rdx
callq 0x4110
movq %r15, %rdi
movl %r12d, %esi
movq %r14, %rdx
movl $0xff, %ecx
callq 0x4110
movq 0x8b52(%rip), %r13      # 0xcfe0
cmpb $0x0, (%r14)
movq (%r13), %rdi
leaq 0x4b6b(%rip), %rdx      # 0x9008
cmovneq %r14, %rdx
leaq 0x4b5c(%rip), %r12      # 0x9004
movq %r12, %rsi
xorl %eax, %eax
callq 0x4240
movq %r15, %rdi
movq %r14, %rsi
movl $0xff, %edx
callq 0x4260
movq (%r13), %rdi
movq %r12, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0x4240
cmpl $0x1, %ebx
jne 0x451b
leaq 0x8cf1(%rip), %rbx      # 0xd1d0
leaq 0x4b1e(%rip), %r15      # 0x9004
xorl %r12d, %r12d
movq %rbx, %rdi
movl %r12d, %esi
movq %r14, %rdx
movl $0xff, %ecx
callq 0x41a0
cmpb $0x0, -0x130(%rbp)
je 0x451b
movq (%r13), %rdi
movq %r15, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0x4240
incl %r12d
jmp 0x44e9
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/sundale[P]gcode/driver.cc
// Function: read_tool_file(char const*)
int read_tool_file(  /* ARGUMENTS         */
 const char * tool_file_name)   /* name of tool file */
{
  char buffer[1000];

  if (tool_file_name[0] == 0) /* ask for name if given name is empty string */
    {
      fprintf(stderr, "name of tool file => ");
      fgets(buffer, 1000, stdin);
      buffer[strlen(buffer) - 1] = 0;
      tool_file_name = buffer;
    }

  return loadToolTable(tool_file_name, _tools, 0, 0, 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x3e8, %rsp            # imm = 0x3E8
movq %rdi, %rbx
cmpb $0x0, (%rdi)
je 0x4596
leaq 0x9df3(%rip), %rsi      # 0xe370
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x7f10
addq $0x3e8, %rsp            # imm = 0x3E8
popq %rbx
popq %rbp
retq
movq 0x8a43(%rip), %rax      # 0xcfe0
movq (%rax), %rcx
leaq 0x4a7f(%rip), %rdi      # 0x9026
pushq $0x15
popq %rsi
pushq $0x1
popq %rdx
callq 0x42f0
movq 0x8a17(%rip), %rax      # 0xcfd0
movq (%rax), %rdx
leaq -0x3f0(%rbp), %rbx
movq %rbx, %rdi
movl $0x3e8, %esi            # imm = 0x3E8
callq 0x4280
movq %rbx, %rdi
callq 0x40a0
movb $0x0, -0x1(%rax,%rbx)
jmp 0x4576
// File: /workspace/github_cpp_makefile_star2_O2/sundale[P]gcode/driver.cc
// Function: spi_write_single(int, unsigned short, unsigned short)
static uint16_t spi_write_single(int fd,uint16_t addr,uint16_t dat)
{

	int ret;
	uint8_t tx_temp[4];
	uint8_t rx_temp[4];
	struct spi_ioc_transfer tr[2];

	tr[0].tx_buf = (unsigned long)tx_temp,
	tr[0].rx_buf = (unsigned long)rx_temp,
	tr[0].len = 2,
	tr[0].delay_usecs = 0,//delay,
	tr[0].speed_hz = SPI_SPEED,
	tr[0].bits_per_word = SPI_BITS,
	tr[0].cs_change = 0,
	tr[1].tx_buf = (unsigned long)&tx_temp[2],
	tr[1].rx_buf = (unsigned long)rx_temp,
	tr[1].len = 2,
	tr[1].delay_usecs = 0,//delay,
	tr[1].speed_hz = SPI_SPEED,
	tr[1].bits_per_word = SPI_BITS,
	tr[1].cs_change = 0,

	tx_temp[0] = (addr >> 8) | 0x80;
	tx_temp[1] = (addr & 0x00ff);
	tx_temp[2] = dat >> 8;
	tx_temp[3] = dat & 0x00ff;
	memset(rx_temp,0,4);
	ret = ioctl(fd, SPI_IOC_MESSAGE(2), &tr);
	if (ret < 1)
		pabort("can't send spi message");
	return 0;	
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movl %edx, %eax
leaq -0x4(%rbp), %rcx
leaq -0x50(%rbp), %rdx
movq %rcx, (%rdx)
leaq -0x8(%rbp), %rcx
movq %rcx, 0x8(%rdx)
movabsq $0xf424000000002, %r8   # imm = 0xF424000000002
movq %r8, 0x10(%rdx)
movl $0x80000, %r9d          # imm = 0x80000
movl %r9d, 0x18(%rdx)
leaq -0x2(%rbp), %r10
movq %r10, 0x20(%rdx)
movq %rcx, 0x28(%rdx)
movq %r8, 0x30(%rdx)
movl %r9d, 0x38(%rdx)
movl %esi, %r8d
shrl $0x8, %r8d
orb $-0x80, %r8b
movb %r8b, -0x2(%r10)
movb %sil, -0x1(%r10)
movb %ah, -0x2(%rbp)
movb %al, 0x1(%r10)
andl $0x0, (%rcx)
movl $0x40406b00, %esi       # imm = 0x40406B00
xorl %eax, %eax
callq 0x4230
testl %eax, %eax
jle 0x481c
addq $0x50, %rsp
popq %rbp
retq
leaq 0x4853(%rip), %rdi      # 0x9076
callq 0x48b7
// File: /workspace/github_cpp_makefile_star2_O2/sundale[P]gcode/driver.cc
// Function: fpga_spi_init()
int fpga_spi_init(void)
{
	int err = 0;
	static uint8_t mode = SPI_CPHA;

	spi_fd = open("/dev/spidev0.0",O_RDWR);
	if(spi_fd < 0)
		pabort("/dev/spidev0.0");
	err = ioctl(spi_fd, SPI_IOC_WR_MODE, &mode);
	if (err == -1)
		pabort("set spi mode");
	return spi_fd;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x47d3(%rip), %rdi      # 0x903c
pushq $0x2
popq %rsi
xorl %eax, %eax
callq 0x4120
movl %eax, 0x894f(%rip)      # 0xd1c8
testl %eax, %eax
js 0x489f
leaq 0x8918(%rip), %rdx      # 0xd19c
movl $0x40016b01, %esi       # imm = 0x40016B01
movl %eax, %edi
xorl %eax, %eax
callq 0x4230
cmpl $-0x1, %eax
je 0x48ab
movl 0x892b(%rip), %eax      # 0xd1c8
popq %rbp
retq
leaq 0x4796(%rip), %rdi      # 0x903c
callq 0x48b7
leaq 0x4799(%rip), %rdi      # 0x904b
callq 0x48b7
// File: /workspace/github_cpp_makefile_star2_O2/sundale[P]gcode/driver.cc
// Function: main
int main (int argc, char ** argv)
{
	int status;
	int block_delete = OFF;
	int print_stack = OFF;
	char line[LINELEN];

	if (read_tool_file(TOOL_CONFIGURE_PATH) != 0)
		exit(1);

	if ((status = interp_init()) != INTERP_OK)
	{
		report_error(status, print_stack);
		exit(1);
	}
	spi_fd = fpga_spi_init();
	for(; ;)
	{
		char *result;
		printf("READ => ");
		memset(line, 0, sizeof(line));
		result = fgets(line, LINELEN, stdin);
		if (!result || strcmp (line, "quit\n") == 0)
			return 0;
		interpret_one_line(block_delete, print_stack, line);
	}
	close(spi_fd);
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
leaq 0x4780(%rip), %rdi      # 0x9058
callq 0x4562
testl %eax, %eax
jne 0x496f
leaq 0x88e4(%rip), %rdi      # 0xd1d0
callq 0x42b0
testl %eax, %eax
jne 0x4966
callq 0x485e
movl %eax, 0x88c8(%rip)      # 0xd1c8
leaq 0x4760(%rip), %rdi      # 0x9067
xorl %eax, %eax
callq 0x4030
leaq -0x110(%rbp), %rbx
movl $0xff, %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x40e0
movq 0x86a5(%rip), %rax      # 0xcfd0
movq (%rax), %rdx
movq %rbx, %rdi
movl $0xff, %esi
callq 0x4280
testq %rax, %rax
je 0x495a
leaq 0x4729(%rip), %rsi      # 0x9070
leaq -0x110(%rbp), %rdi
pushq $0x6
popq %rdx
callq 0x4180
testl %eax, %eax
jne 0x4977
xorl %eax, %eax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %rbp
retq
movl %eax, %edi
xorl %esi, %esi
callq 0x443c
pushq $0x1
popq %rdi
callq 0x41e0
leaq -0x110(%rbp), %rdx
xorl %edi, %edi
xorl %esi, %esi
callq 0x452d
nop
// File: /workspace/github_cpp_makefile_star2_O2/sundale[P]gcode/inifile.cc
// Function: IniFile::IniFile(int, _IO_FILE*)
IniFile::IniFile(int _errMask, FILE *_fp)
{
    fp = _fp;
    errMask = _errMask;
    owned = false;

    if(fp != NULL)
        LockFile();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdx, (%rdi)
movl %esi, 0x50(%rdi)
movb $0x0, 0x28(%rdi)
testq %rdx, %rdx
je 0x49a1
popq %rbp
jmp 0x49a4
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/sundale[P]gcode/inifile.cc
// Function: IniFile::LockFile()
bool
IniFile::LockFile(void)
{
    lock.l_type = F_RDLCK;
    lock.l_whence = SEEK_SET;
    lock.l_start = 0;
    lock.l_len = 0;

    if(fcntl(fileno(fp), F_SETLK, &lock) == -1){
        if(owned)
            fclose(fp);

        fp = NULL;
        return(false);
    }

    return(true);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
andl $0x0, 0x8(%rdi)
leaq 0x8(%rdi), %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
movq (%rdi), %rdi
callq 0x4190
pushq $0x6
popq %rsi
movl %eax, %edi
movq %r14, %rdx
xorl %eax, %eax
callq 0x4100
movl %eax, %r14d
cmpl $-0x1, %eax
jne 0x49ee
cmpb $0x1, 0x28(%rbx)
jne 0x49ea
movq (%rbx), %rdi
callq 0x4170
andq $0x0, (%rbx)
cmpl $-0x1, %r14d
setne %al
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/sundale[P]gcode/inifile.cc
// Function: IniFile::Open(char const*)
bool
IniFile::Open(const char *file)
{
    char                        path[LINELEN] = "";

    if(IsOpen()) Close();

    TildeExpansion(file, path);

    if((fp = fopen(path, "r")) == NULL)
        return(false);

    owned = true;

    if(!LockFile())
        return(false);

    return(true);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x120(%rbp), %rdi
movl $0xff, %edx
xorl %esi, %esi
callq 0x40e0
cmpq $0x0, (%rbx)
je 0x4a31
movq %rbx, %rdi
callq 0x4a78
leaq -0x120(%rbp), %r15
movq %r14, %rsi
movq %r15, %rdx
callq 0x4aca
leaq 0x466a(%rip), %rsi      # 0x90b4
movq %r15, %rdi
callq 0x41c0
movq %rax, (%rbx)
testq %rax, %rax
je 0x4a68
movb $0x1, 0x28(%rbx)
movq %rbx, %rdi
callq 0x49a4
jmp 0x4a6a
xorl %eax, %eax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/sundale[P]gcode/inifile.cc
// Function: IniFile::Close()
bool
IniFile::Close()
{
    int                         rVal = 0;

    if(fp != NULL){
        lock.l_type = F_UNLCK;
        fcntl(fileno(fp), F_SETLKW, &lock);

        if(owned)
            rVal = fclose(fp);

        fp = NULL;
    }

    return(rVal == 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x4ac3
leaq 0x8(%rbx), %r14
movw $0x2, 0x8(%rbx)
callq 0x4190
pushq $0x7
popq %rsi
movl %eax, %edi
movq %r14, %rdx
xorl %eax, %eax
callq 0x4100
movb $0x1, %al
cmpb $0x1, 0x28(%rbx)
jne 0x4abd
movq (%rbx), %rdi
callq 0x4170
testl %eax, %eax
sete %al
andq $0x0, (%rbx)
jmp 0x4ac5
movb $0x1, %al
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/sundale[P]gcode/inifile.cc
// Function: IniFile::TildeExpansion(char const*, char*)
void
IniFile::TildeExpansion(const char *file, char *path)
{
    char                        *home;

    strncpy(path, file, LINELEN);
    if (strlen(file) < 2 || !(file[0] == '~' && file[1] == '/')) {
	/* no tilde expansion required, or unsupported
           tilde expansion type requested */
	return;
    }

    home = getenv("HOME");
    if (!home || strlen(home) + strlen(file) > LINELEN) {
	return;
    }

    /* Buffer overflow has already been checked. */

    strcpy(path, home);
    strcat(path, file + 1);
    return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %rbx
movl $0xff, %edx
movq %r14, %rdi
callq 0x40d0
movq %rbx, %rdi
callq 0x40a0
cmpq $0x2, %rax
jb 0x4b2b
cmpb $0x7e, (%rbx)
jne 0x4b2b
cmpb $0x2f, 0x1(%rbx)
jne 0x4b2b
movq %rax, %r15
leaq 0x45b7(%rip), %rdi      # 0x90c2
callq 0x41f0
testq %rax, %rax
je 0x4b2b
movq %rax, %r12
movq %rax, %rdi
callq 0x40a0
addq %r15, %rax
cmpq $0xff, %rax
jbe 0x4b34
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
incq %rbx
movq %r14, %rdi
movq %r12, %rsi
callq 0x4150
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x42d0
nop
// File: /workspace/github_cpp_makefile_star2_O2/sundale[P]gcode/inifile.cc
// Function: IniFile::Find(int*, int, int, char const*, char const*, int)
IniFile::ErrorCode                   
IniFile::Find(int *result, int min, int max,
              const char *tag, const char *section, int num)
{
    ErrorCode                   errCode;
    int                         tmp;

    if((errCode = Find(&tmp, tag, section, num)) != ERR_NONE)
        return(errCode);

    if((tmp > max) || (tmp < min))
        return(ERR_LIMITS);

    *result = tmp;

    return(ERR_NONE);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %r8, %rax
movl %ecx, %r15d
movl %edx, %r14d
movq %rsi, %rbx
movl 0x10(%rbp), %r8d
leaq -0x1c(%rbp), %rsi
movq %rax, %rdx
movq %r9, %rcx
callq 0x4baa
testl %eax, %eax
jne 0x4b9f
movl -0x1c(%rbp), %eax
cmpl %r15d, %eax
setg %cl
cmpl %r14d, %eax
setl %dl
orb %cl, %dl
je 0x4b9b
pushq $0x10
popq %rax
jmp 0x4b9f
movl %eax, (%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/sundale[P]gcode/inifile.cc
// Function: IniFile::Find(int*, char const*, char const*, int)
IniFile::ErrorCode                   
IniFile::Find(int *result, const char *tag, const char *section, int num)
{
    const char                  *pStr;
    int                         tmp;

    if((pStr = Find(tag, section, num)) == NULL){
        // We really need an ErrorCode return from Find() and should be passing
        // in a buffer. Just pick a suitable ErrorCode for now.
        return(ERR_TAG_NOT_FOUND);
    }

    if(sscanf(pStr, "%i", &tmp) != 1){
        ThrowException(ERR_CONVERSION);
        return(ERR_CONVERSION);
    }

    *result = tmp;

    return(ERR_NONE);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq %rdx, %rsi
movq %rcx, %rdx
movl %r8d, %ecx
callq 0x4c16
testq %rax, %rax
je 0x4bf2
leaq 0x44e2(%rip), %rsi      # 0x90b6
xorl %r15d, %r15d
leaq -0x1c(%rbp), %rdx
movq %rax, %rdi
xorl %eax, %eax
callq 0x4160
cmpl $0x1, %eax
jne 0x4bf8
movl -0x1c(%rbp), %eax
movl %eax, (%r14)
jmp 0x4c07
pushq $0x4
popq %r15
jmp 0x4c07
pushq $0x8
popq %r15
movq %rbx, %rdi
movl %r15d, %esi
callq 0x4e72
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop