LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: jliesch[P]ofxget/pugixml/pugixml.cpp
// Function: pugi::xpath_query::evaluate_number(pugi::xpath_node const&) const
PUGI__FN double xpath_query::evaluate_number(const xpath_node& n) const
	{
		if (!_impl) return impl::gen_nan();

		impl::xpath_context c(n, 1, 1);
		impl::xpath_stack_data sd;

		double r = static_cast<impl::xpath_query_impl*>(_impl)->root->eval_number(c, sd.stack);

		if (sd.oom)
		{
		#ifdef PUGIXML_NO_EXCEPTIONS
			return impl::gen_nan();
		#else
			throw std::bad_alloc();
		#endif
		}

		return r;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20e0, %rsp           # imm = 0x20E0
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20c0(%rbp)
cmpq $0x0, (%rax)
jne 0x4c0b3
callq 0x4a250
movsd %xmm0, -0x8(%rbp)
jmp 0x4c186
movq -0x18(%rbp), %rsi
leaq -0x38(%rbp), %rdi
movq %rdi, -0x20d0(%rbp)
movl $0x1, %ecx
movq %rcx, %rdx
callq 0x4b5d0
leaq -0x20a0(%rbp), %rdi
callq 0x4b610
movq -0x20c0(%rbp), %rax
movq -0x20d0(%rbp), %rsi
movq (%rax), %rax
movq (%rax), %rdi
leaq -0x50(%rbp), %rdx
callq 0x4c1a0
movsd %xmm0, -0x20c8(%rbp)
jmp 0x4c102
movsd -0x20c8(%rbp), %xmm0
movsd %xmm0, -0x20a8(%rbp)
testb $0x1, -0x40(%rbp)
je 0x4c16d
movl $0x8, %edi
callq 0x7380
movq %rax, %rdi
movq %rdi, -0x20d8(%rbp)
callq 0x68640
movq -0x20d8(%rbp), %rdi
movq 0x48e51(%rip), %rsi     # 0x94f90
movq 0x48e12(%rip), %rdx     # 0x94f58
callq 0x75e0
jmp 0x4c1a0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20b0(%rbp)
movl %eax, -0x20b4(%rbp)
leaq -0x20a0(%rbp), %rdi
callq 0x4c030
jmp 0x4c194
movsd -0x20a8(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
leaq -0x20a0(%rbp), %rdi
callq 0x4c030
movsd -0x8(%rbp), %xmm0
addq $0x20e0, %rsp           # imm = 0x20E0
popq %rbp
retq
movq -0x20b0(%rbp), %rdi
callq 0x7600
// File: jliesch[P]ofxget/pugixml/pugixml.cpp
// Function: pugi::xpath_query::evaluate_string[abi:cxx11](pugi::xpath_node const&) const
PUGI__FN string_t xpath_query::evaluate_string(const xpath_node& n) const
	{
		if (!_impl) return string_t();

		impl::xpath_context c(n, 1, 1);
		impl::xpath_stack_data sd;

		impl::xpath_string r = static_cast<impl::xpath_query_impl*>(_impl)->root->eval_string(c, sd.stack);

		if (sd.oom)
		{
		#ifdef PUGIXML_NO_EXCEPTIONS
			return string_t();
		#else
			throw std::bad_alloc();
		#endif
		}

		return string_t(r.c_str(), r.length());
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2110, %rsp           # imm = 0x2110
movq %rdi, -0x20e0(%rbp)
movq %rdi, %rax
movq %rax, -0x20d8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20d0(%rbp)
cmpq $0x0, (%rax)
jne 0x4cbfa
movq -0x20e0(%rbp), %rdi
callq 0x7320
jmp 0x4cd43
movq -0x18(%rbp), %rsi
leaq -0x38(%rbp), %rdi
movq %rdi, -0x20e8(%rbp)
movl $0x1, %ecx
movq %rcx, %rdx
callq 0x4b5d0
leaq -0x20a0(%rbp), %rdi
callq 0x4b610
movq -0x20d0(%rbp), %rax
movq -0x20e8(%rbp), %rdx
movq (%rax), %rax
movq (%rax), %rsi
leaq -0x50(%rbp), %rcx
leaq -0x20b8(%rbp), %rdi
callq 0x4cd60
jmp 0x4cc48
testb $0x1, -0x40(%rbp)
je 0x4cc9d
movl $0x8, %edi
callq 0x7380
movq %rax, %rdi
movq %rdi, -0x20f0(%rbp)
callq 0x68640
movq -0x20f0(%rbp), %rdi
movq 0x4831b(%rip), %rsi     # 0x94f90
movq 0x482dc(%rip), %rdx     # 0x94f58
callq 0x75e0
jmp 0x4cd5f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20c0(%rbp)
movl %eax, -0x20c4(%rbp)
jmp 0x4cd35
leaq -0x20b8(%rbp), %rdi
callq 0x4e1e0
movq %rax, -0x20f8(%rbp)
jmp 0x4ccb2
leaq -0x20b8(%rbp), %rdi
callq 0x4e200
movq %rax, -0x2100(%rbp)
jmp 0x4ccc7
leaq -0x20c5(%rbp), %rdi
movq %rdi, -0x2108(%rbp)
callq 0x78f0
movq -0x20e0(%rbp), %rdi
movq -0x20f8(%rbp), %rsi
movq -0x2100(%rbp), %rdx
movq -0x2108(%rbp), %rcx
callq 0x7ad0
jmp 0x4ccfd
leaq -0x20c5(%rbp), %rdi
callq 0x7b70
leaq -0x20a0(%rbp), %rdi
callq 0x4c030
jmp 0x4cd43
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20c0(%rbp)
movl %eax, -0x20c4(%rbp)
leaq -0x20c5(%rbp), %rdi
callq 0x7b70
leaq -0x20a0(%rbp), %rdi
callq 0x4c030
jmp 0x4cd53
movq -0x20d8(%rbp), %rax
addq $0x2110, %rsp           # imm = 0x2110
popq %rbp
retq
movq -0x20c0(%rbp), %rdi
callq 0x7600
nop
// File: jliesch[P]ofxget/pugixml/pugixml.cpp
// Function: pugi::xpath_query::evaluate_string(char*, unsigned long, pugi::xpath_node const&) const
PUGI__FN size_t xpath_query::evaluate_string(char_t* buffer, size_t capacity, const xpath_node& n) const
	{
		impl::xpath_context c(n, 1, 1);
		impl::xpath_stack_data sd;

		impl::xpath_string r = _impl ? static_cast<impl::xpath_query_impl*>(_impl)->root->eval_string(c, sd.stack) : impl::xpath_string();

		if (sd.oom)
		{
		#ifdef PUGIXML_NO_EXCEPTIONS
			r = impl::xpath_string();
		#else
			throw std::bad_alloc();
		#endif
		}

		size_t full_size = r.length() + 1;

		if (capacity > 0)
		{
			size_t size = (full_size < capacity) ? full_size : capacity;
			assert(size > 0);

			memcpy(buffer, r.c_str(), (size - 1) * sizeof(char_t));
			buffer[size - 1] = 0;
		}

		return full_size;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2120, %rsp           # imm = 0x2120
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20e8(%rbp)
movq -0x20(%rbp), %rsi
leaq -0x40(%rbp), %rdi
movl $0x1, %ecx
movq %rcx, %rdx
callq 0x4b5d0
leaq -0x20a8(%rbp), %rdi
callq 0x4b610
movq -0x20e8(%rbp), %rax
cmpq $0x0, (%rax)
je 0x4e2c9
movq -0x20e8(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rsi
leaq -0x58(%rbp), %rcx
leaq -0x20c0(%rbp), %rdi
leaq -0x40(%rbp), %rdx
callq 0x4cd60
jmp 0x4e2c7
jmp 0x4e2d9
leaq -0x20c0(%rbp), %rdi
callq 0x4e460
jmp 0x4e2d7
jmp 0x4e2d9
testb $0x1, -0x48(%rbp)
je 0x4e33a
movl $0x8, %edi
callq 0x7380
movq %rax, %rdi
movq %rdi, -0x20f0(%rbp)
callq 0x68640
movq -0x20f0(%rbp), %rdi
movq 0x46c8a(%rip), %rsi     # 0x94f90
movq 0x46c4b(%rip), %rdx     # 0x94f58
callq 0x75e0
jmp 0x4e458
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20c8(%rbp)
movl %eax, -0x20cc(%rbp)
leaq -0x20a8(%rbp), %rdi
callq 0x4c030
jmp 0x4e44c
leaq -0x20c0(%rbp), %rdi
callq 0x4e200
movq %rax, -0x20f8(%rbp)
jmp 0x4e34f
movq -0x20f8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20d8(%rbp)
cmpq $0x0, -0x18(%rbp)
jbe 0x4e422
movq -0x20d8(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x4e389
movq -0x20d8(%rbp), %rax
movq %rax, -0x2100(%rbp)
jmp 0x4e394
movq -0x18(%rbp), %rax
movq %rax, -0x2100(%rbp)
movq -0x2100(%rbp), %rax
movq %rax, -0x20e0(%rbp)
cmpq $0x0, -0x20e0(%rbp)
jbe 0x4e3ae
jmp 0x4e3cd
leaq 0x1da02(%rip), %rdi     # 0x6bdb7
leaq 0x1cf99(%rip), %rsi     # 0x6b355
movl $0x3149, %edx           # imm = 0x3149
leaq 0x1d9f8(%rip), %rcx     # 0x6bdc0
callq 0x7180
movq -0x10(%rbp), %rax
movq %rax, -0x2110(%rbp)
leaq -0x20c0(%rbp), %rdi
callq 0x4e1e0
movq %rax, -0x2108(%rbp)
jmp 0x4e3ed
movq -0x2108(%rbp), %rsi
movq -0x2110(%rbp), %rdi
movq -0x20e0(%rbp), %rdx
subq $0x1, %rdx
shlq $0x0, %rdx
callq 0x70b0
movq -0x10(%rbp), %rax
movq -0x20e0(%rbp), %rcx
subq $0x1, %rcx
movb $0x0, (%rax,%rcx)
movq -0x20d8(%rbp), %rax
movq %rax, -0x2118(%rbp)
leaq -0x20a8(%rbp), %rdi
callq 0x4c030
movq -0x2118(%rbp), %rax
addq $0x2120, %rsp           # imm = 0x2120
popq %rbp
retq
movq -0x20c8(%rbp), %rdi
callq 0x7600
nopl (%rax,%rax)
// File: jliesch[P]ofxget/pugixml/pugixml.cpp
// Function: pugi::xpath_query::evaluate_node_set(pugi::xpath_node const&) const
PUGI__FN xpath_node_set xpath_query::evaluate_node_set(const xpath_node& n) const
	{
		impl::xpath_ast_node* root = impl::evaluate_node_set_prepare(static_cast<impl::xpath_query_impl*>(_impl));
		if (!root) return xpath_node_set();

		impl::xpath_context c(n, 1, 1);
		impl::xpath_stack_data sd;

		impl::xpath_node_set_raw r = root->eval_node_set(c, sd.stack, impl::nodeset_eval_all);

		if (sd.oom)
		{
		#ifdef PUGIXML_NO_EXCEPTIONS
			return xpath_node_set();
		#else
			throw std::bad_alloc();
		#endif
		}

		return xpath_node_set(r.begin(), r.end(), r.type());
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2110, %rsp           # imm = 0x2110
movq %rdi, -0x20e8(%rbp)
movq %rdi, %rax
movq %rax, -0x20e0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x4e610
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x4e4e0
movq -0x20e8(%rbp), %rdi
callq 0x49af0
jmp 0x4e5f2
movq -0x18(%rbp), %rsi
leaq -0x40(%rbp), %rdi
movq %rdi, -0x20f0(%rbp)
movl $0x1, %ecx
movq %rcx, %rdx
callq 0x4b5d0
leaq -0x20a8(%rbp), %rdi
callq 0x4b610
movq -0x20f0(%rbp), %rdx
movq -0x20(%rbp), %rsi
leaq -0x58(%rbp), %rcx
leaq -0x20c8(%rbp), %rdi
xorl %r8d, %r8d
callq 0x4e6d0
jmp 0x4e528
testb $0x1, -0x48(%rbp)
je 0x4e586
movl $0x8, %edi
callq 0x7380
movq %rax, %rdi
movq %rdi, -0x20f8(%rbp)
callq 0x68640
movq -0x20f8(%rbp), %rdi
movq 0x46a3b(%rip), %rsi     # 0x94f90
movq 0x469fc(%rip), %rdx     # 0x94f58
callq 0x75e0
jmp 0x4e60e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20d0(%rbp)
movl %eax, -0x20d4(%rbp)
leaq -0x20a8(%rbp), %rdi
callq 0x4c030
jmp 0x4e602
leaq -0x20c8(%rbp), %rdi
callq 0x4ed40
movq %rax, -0x2100(%rbp)
jmp 0x4e59b
leaq -0x20c8(%rbp), %rdi
callq 0x4ed60
movq %rax, -0x2108(%rbp)
jmp 0x4e5b0
leaq -0x20c8(%rbp), %rdi
callq 0x4ed80
movl %eax, -0x210c(%rbp)
jmp 0x4e5c4
movl -0x210c(%rbp), %ecx
movq -0x2108(%rbp), %rdx
movq -0x2100(%rbp), %rsi
movq -0x20e8(%rbp), %rdi
callq 0x49b40
jmp 0x4e5e6
leaq -0x20a8(%rbp), %rdi
callq 0x4c030
movq -0x20e0(%rbp), %rax
addq $0x2110, %rsp           # imm = 0x2110
popq %rbp
retq
movq -0x20d0(%rbp), %rdi
callq 0x7600
nop
// File: jliesch[P]ofxget/pugixml/pugixml.cpp
// Function: pugi::impl::(anonymous namespace)::evaluate_node_set_prepare(pugi::impl::(anonymous namespace)::xpath_query_impl*)
PUGI__FN impl::xpath_ast_node* evaluate_node_set_prepare(xpath_query_impl* impl)
	{
		if (!impl) return 0;

		if (impl->root->rettype() != xpath_type_node_set)
		{
		#ifdef PUGIXML_NO_EXCEPTIONS
			return 0;
		#else
			xpath_parse_result res;
			res.error = "Expression does not evaluate to node set";

			throw xpath_exception(res);
		#endif
		}

		return impl->root;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x4e630
movq $0x0, -0x8(%rbp)
jmp 0x4e6b1
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x4b490
cmpl $0x1, %eax
je 0x4e6a6
leaq -0x20(%rbp), %rdi
movq %rdi, -0x40(%rbp)
callq 0x4a090
leaq 0x200de(%rip), %rax     # 0x6e733
movq %rax, -0x20(%rbp)
movl $0x18, %edi
callq 0x7380
movq -0x40(%rbp), %rsi
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x38(%rbp)
callq 0x49510
jmp 0x4e678
movq -0x38(%rbp), %rdi
leaq 0x46625(%rip), %rsi     # 0x94ca8
leaq 0x19ff6(%rip), %rdx     # 0x68680
callq 0x75e0
movq -0x38(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
callq 0x7840
jmp 0x4e6bb
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
movq -0x28(%rbp), %rdi
callq 0x7600
nopw %cs:(%rax,%rax)
// File: jliesch[P]ofxget/pugixml/pugixml.cpp
// Function: pugi::xpath_query::evaluate_node(pugi::xpath_node const&) const
PUGI__FN xpath_node xpath_query::evaluate_node(const xpath_node& n) const
	{
		impl::xpath_ast_node* root = impl::evaluate_node_set_prepare(static_cast<impl::xpath_query_impl*>(_impl));
		if (!root) return xpath_node();

		impl::xpath_context c(n, 1, 1);
		impl::xpath_stack_data sd;

		impl::xpath_node_set_raw r = root->eval_node_set(c, sd.stack, impl::nodeset_eval_first);

		if (sd.oom)
		{
		#ifdef PUGIXML_NO_EXCEPTIONS
			return xpath_node();
		#else
			throw std::bad_alloc();
		#endif
		}

		return r.first();
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2100, %rsp           # imm = 0x2100
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0x4e610
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x4edc8
leaq -0x10(%rbp), %rdi
callq 0x495c0
jmp 0x4eeac
movq -0x20(%rbp), %rsi
leaq -0x48(%rbp), %rdi
movq %rdi, -0x20e8(%rbp)
movl $0x1, %ecx
movq %rcx, %rdx
callq 0x4b5d0
leaq -0x20b0(%rbp), %rdi
callq 0x4b610
movq -0x20e8(%rbp), %rdx
movq -0x28(%rbp), %rsi
leaq -0x60(%rbp), %rcx
leaq -0x20d0(%rbp), %rdi
movl $0x2, %r8d
callq 0x4e6d0
jmp 0x4ee13
testb $0x1, -0x50(%rbp)
je 0x4ee6e
movl $0x8, %edi
callq 0x7380
movq %rax, %rdi
movq %rdi, -0x20f0(%rbp)
callq 0x68640
movq -0x20f0(%rbp), %rdi
movq 0x46150(%rip), %rsi     # 0x94f90
movq 0x46111(%rip), %rdx     # 0x94f58
callq 0x75e0
jmp 0x4eec9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20d8(%rbp)
movl %eax, -0x20dc(%rbp)
leaq -0x20b0(%rbp), %rdi
callq 0x4c030
jmp 0x4eebd
leaq -0x20d0(%rbp), %rdi
callq 0x4eed0
movq %rdx, -0x2100(%rbp)
movq %rax, -0x20f8(%rbp)
jmp 0x4ee8a
movq -0x2100(%rbp), %rax
movq -0x20f8(%rbp), %rcx
movq %rcx, -0x10(%rbp)
movq %rax, -0x8(%rbp)
leaq -0x20b0(%rbp), %rdi
callq 0x4c030
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rdx
addq $0x2100, %rsp           # imm = 0x2100
popq %rbp
retq
movq -0x20d8(%rbp), %rdi
callq 0x7600
nopl (%rax)
// File: jliesch[P]ofxget/pugixml/pugixml.cpp
// Function: void pugi::impl::(anonymous namespace)::node_copy_string<char*, unsigned long>(char*&, unsigned long&, unsigned long, char*, unsigned long&, pugi::impl::(anonymous namespace)::xml_allocator*)
PUGI__FN void node_copy_string(String& dest, Header& header, uintptr_t header_mask, char_t* source, Header& source_header, xml_allocator* alloc)
	{
		assert(!dest && (header & header_mask) == 0);

		if (source)
		{
			if (alloc && (source_header & header_mask) == 0)
			{
				dest = source;

				// since strcpy_insitu can reuse document buffer memory we need to mark both source and dest as shared
				header |= xml_memory_page_contents_shared_mask;
				source_header |= xml_memory_page_contents_shared_mask;
			}
			else
				strcpy_insitu(dest, header, header_mask, source, strlength(source));
		}
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x8(%rbp), %rcx
xorl %eax, %eax
cmpq $0x0, (%rcx)
movb %al, -0x31(%rbp)
jne 0x4f904
movq -0x10(%rbp), %rax
movq (%rax), %rax
andq -0x18(%rbp), %rax
cmpq $0x0, %rax
sete %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
testb $0x1, %al
jne 0x4f90d
jmp 0x4f90f
jmp 0x4f92e
leaq 0x1c61d(%rip), %rdi     # 0x6bf33
leaq 0x1ba38(%rip), %rsi     # 0x6b355
movl $0x111c, %edx           # imm = 0x111C
leaq 0x1c62f(%rip), %rcx     # 0x6bf58
callq 0x7180
cmpq $0x0, -0x20(%rbp)
je 0x4f9bd
cmpq $0x0, -0x30(%rbp)
je 0x4f97a
movq -0x28(%rbp), %rax
movq (%rax), %rax
andq -0x18(%rbp), %rax
cmpq $0x0, %rax
jne 0x4f97a
movq -0x20(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
orq $0x40, %rcx
movq %rcx, (%rax)
movq -0x28(%rbp), %rax
movq (%rax), %rcx
orq $0x40, %rcx
movq %rcx, (%rax)
jmp 0x4f9bb
movq -0x8(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rdi
callq 0x418f0
movq -0x58(%rbp), %rdi
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq -0x40(%rbp), %rcx
movq %rax, %r8
callq 0x41750
jmp 0x4f9bd
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jliesch[P]ofxget/pugixml/pugixml.cpp
// Function: pugi::impl::(anonymous namespace)::node_copy_contents(pugi::xml_node_struct*, pugi::xml_node_struct*, pugi::impl::(anonymous namespace)::xml_allocator*)
PUGI__FN void node_copy_contents(xml_node_struct* dn, xml_node_struct* sn, xml_allocator* shared_alloc)
	{
		node_copy_string(dn->name, dn->header, xml_memory_page_name_allocated_mask, sn->name, sn->header, shared_alloc);
		node_copy_string(dn->value, dn->header, xml_memory_page_value_allocated_mask, sn->value, sn->header, shared_alloc);

		for (xml_attribute_struct* sa = sn->first_attribute; sa; sa = sa->next_attribute)
		{
			xml_attribute_struct* da = append_new_attribute(dn, get_allocator(dn));

			if (da)
			{
				node_copy_string(da->name, da->header, xml_memory_page_name_allocated_mask, sa->name, sa->header, shared_alloc);
				node_copy_string(da->value, da->header, xml_memory_page_value_allocated_mask, sa->value, sa->header, shared_alloc);
			}
		}
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x10(%rbp), %r8
movq -0x18(%rbp), %r9
movl $0x20, %edx
callq 0x4f8c0
movq -0x8(%rbp), %rdi
addq $0x10, %rdi
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x10(%rbp), %r8
movq -0x18(%rbp), %r9
movl $0x10, %edx
callq 0x4f8c0
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x4fb3e
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
callq 0x42d20
movq -0x30(%rbp), %rdi
movq %rax, %rsi
callq 0x4fbc0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x4fb2b
movq -0x28(%rbp), %rdi
addq $0x8, %rdi
movq -0x28(%rbp), %rsi
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x20(%rbp), %r8
movq -0x18(%rbp), %r9
movl $0x20, %edx
callq 0x4f8c0
movq -0x28(%rbp), %rdi
addq $0x10, %rdi
movq -0x28(%rbp), %rsi
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x20(%rbp), %r8
movq -0x18(%rbp), %r9
movl $0x10, %edx
callq 0x4f8c0
jmp 0x4fb2d
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x4faac
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jliesch[P]ofxget/pugixml/pugixml.cpp
// Function: pugi::impl::(anonymous namespace)::append_new_node(pugi::xml_node_struct*, pugi::impl::(anonymous namespace)::xml_allocator&, pugi::xml_node_type)
PUGI__FN_NO_INLINE xml_node_struct* append_new_node(xml_node_struct* node, xml_allocator& alloc, xml_node_type type = node_element)
	{
		if (!alloc.reserve()) return 0;

		xml_node_struct* child = allocate_node(alloc, type);
		if (!child) return 0;

		append_node(child, node);

		return child;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x18(%rbp), %rdi
callq 0x42d80
testb $0x1, %al
jne 0x4fb7a
movq $0x0, -0x8(%rbp)
jmp 0x4fbb0
movq -0x18(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0x43850
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x4fb9b
movq $0x0, -0x8(%rbp)
jmp 0x4fbb0
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x438b0
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: jliesch[P]ofxget/pugixml/pugixml.cpp
// Function: pugi::impl::(anonymous namespace)::append_new_attribute(pugi::xml_node_struct*, pugi::impl::(anonymous namespace)::xml_allocator&)
PUGI__FN_NO_INLINE xml_attribute_struct* append_new_attribute(xml_node_struct* node, xml_allocator& alloc)
	{
		if (!alloc.reserve()) return 0;

		xml_attribute_struct* attr = allocate_attribute(alloc);
		if (!attr) return 0;

		append_attribute(attr, node);

		return attr;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x42d80
testb $0x1, %al
jne 0x4fbe7
movq $0x0, -0x8(%rbp)
jmp 0x4fc1a
movq -0x18(%rbp), %rdi
callq 0x42d90
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x4fc05
movq $0x0, -0x8(%rbp)
jmp 0x4fc1a
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x42df0
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jliesch[P]ofxget/pugixml/pugixml.cpp
// Function: pugi::impl::(anonymous namespace)::xml_allocator::deallocate_string(char*)
void deallocate_string(char_t* string)
		{
			// this function casts pointers through void* to avoid 'cast increases required alignment of target type' warnings
			// we're guaranteed the proper (pointer-sized) alignment on the input string if it was allocated via allocate_string

			// get header
			xml_memory_string_header* header = static_cast<xml_memory_string_header*>(static_cast<void*>(string)) - 1;
			assert(header);

			// deallocate
			size_t page_offset = sizeof(xml_memory_page) + header->page_offset * xml_memory_block_alignment;
			xml_memory_page* page = reinterpret_cast<xml_memory_page*>(static_cast<void*>(reinterpret_cast<char*>(header) - page_offset));

			// if full_size == 0 then this string occupies the whole page
			size_t full_size = header->full_size == 0 ? page->busy_size : header->full_size * xml_memory_block_alignment;

			deallocate_memory(header, full_size, page);
		}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
addq $-0x4, %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x4fc5d
jmp 0x4fc7c
leaq 0x1c39b(%rip), %rdi     # 0x6bfff
leaq 0x1b6ea(%rip), %rsi     # 0x6b355
movl $0x2a6, %edx            # imm = 0x2A6
leaq 0x1c38f(%rip), %rcx     # 0x6c006
callq 0x7180
movq -0x18(%rbp), %rax
movzwl (%rax), %eax
shlq $0x3, %rax
addq $0x28, %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
xorl %ecx, %ecx
subq -0x20(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movzwl 0x2(%rax), %eax
cmpl $0x0, %eax
jne 0x4fcbb
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x40(%rbp)
jmp 0x4fccb
movq -0x18(%rbp), %rax
movzwl 0x2(%rax), %eax
shlq $0x3, %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rdi
movq -0x40(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rsi
movq -0x30(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq 0x4fcf0
addq $0x40, %rsp
popq %rbp
retq
nop
// File: jliesch[P]ofxget/pugixml/pugixml.cpp
// Function: pugi::impl::(anonymous namespace)::xml_allocator::allocate_memory_oob(unsigned long, pugi::impl::(anonymous namespace)::xml_memory_page*&)
PUGI__FN_NO_INLINE void* xml_allocator::allocate_memory_oob(size_t size, xml_memory_page*& out_page)
	{
		const size_t large_allocation_threshold = xml_memory_page_size / 4;

		xml_memory_page* page = allocate_page(size <= large_allocation_threshold ? xml_memory_page_size : size);
		out_page = page;

		if (!page) return 0;

		if (size <= large_allocation_threshold)
		{
			_root->busy_size = _busy_size;

			// insert page at the end of linked list
			page->prev = _root;
			_root->next = page;
			_root = page;

			_busy_size = size;
		}
		else
		{
			// insert page before the end of linked list, so that it is deleted as soon as possible
			// the last page is not deleted even if it's empty (see deallocate_memory)
			assert(_root->prev);

			page->prev = _root->prev;
			page->next = _root;

			_root->prev->next = page;
			_root->prev = page;

			page->busy_size = size;
		}

		return reinterpret_cast<char*>(page) + sizeof(xml_memory_page);
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq $0x1ff6, -0x28(%rbp)    # imm = 0x1FF6
cmpq $0x1ff6, -0x18(%rbp)    # imm = 0x1FF6
ja 0x4ff19
movl $0x7fd8, %eax           # imm = 0x7FD8
movq %rax, -0x40(%rbp)
jmp 0x4ff21
movq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x50020
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
cmpq $0x0, -0x30(%rbp)
jne 0x4ff51
movq $0x0, -0x8(%rbp)
jmp 0x50010
cmpq $0x1ff6, -0x18(%rbp)    # imm = 0x1FF6
ja 0x4ff91
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rdx
movq (%rax), %rcx
movq %rdx, 0x18(%rcx)
movq (%rax), %rdx
movq -0x30(%rbp), %rcx
movq %rdx, 0x8(%rcx)
movq -0x30(%rbp), %rdx
movq (%rax), %rcx
movq %rdx, 0x10(%rcx)
movq -0x30(%rbp), %rcx
movq %rcx, (%rax)
movq -0x18(%rbp), %rcx
movq %rcx, 0x8(%rax)
jmp 0x50004
movq -0x38(%rbp), %rax
movq (%rax), %rax
cmpq $0x0, 0x8(%rax)
je 0x4ffa1
jmp 0x4ffc0
leaq 0x1c1ef(%rip), %rdi     # 0x6c197
leaq 0x1b3a6(%rip), %rsi     # 0x6b355
movl $0x2db, %edx            # imm = 0x2DB
leaq 0x1c1e8(%rip), %rcx     # 0x6c1a3
callq 0x7180
movq -0x38(%rbp), %rax
movq (%rax), %rcx
movq 0x8(%rcx), %rdx
movq -0x30(%rbp), %rcx
movq %rdx, 0x8(%rcx)
movq (%rax), %rdx
movq -0x30(%rbp), %rcx
movq %rdx, 0x10(%rcx)
movq -0x30(%rbp), %rdx
movq (%rax), %rcx
movq 0x8(%rcx), %rcx
movq %rdx, 0x10(%rcx)
movq -0x30(%rbp), %rcx
movq (%rax), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x30(%rbp), %rax
addq $0x28, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: jliesch[P]ofxget/pugixml/pugixml.cpp
// Function: pugi::impl::(anonymous namespace)::xml_allocator::allocate_page(unsigned long)
xml_memory_page* allocate_page(size_t data_size)
		{
			size_t size = sizeof(xml_memory_page) + data_size;

			// allocate block with some alignment, leaving memory for worst-case padding
			void* memory = xml_memory::allocate(size);
			if (!memory) return 0;

			// prepare page structure
			xml_memory_page* page = xml_memory_page::construct(memory);
			assert(page);

			page->allocator = _root->allocator;

			return page;
		}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
addq $0x28, %rax
movq %rax, -0x20(%rbp)
movq 0x4599d(%rip), %rax     # 0x959e8
movq -0x20(%rbp), %rdi
callq *%rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x50066
movq $0x0, -0x8(%rbp)
jmp 0x500b4
movq -0x28(%rbp), %rdi
callq 0x47e90
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x5007c
jmp 0x5009b
leaq 0x1c10f(%rip), %rdi     # 0x6c192
leaq 0x1b2cb(%rip), %rsi     # 0x6b355
movl $0x20f, %edx            # imm = 0x20F
leaq 0x1c175(%rip), %rcx     # 0x6c20b
callq 0x7180
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nop
// File: jliesch[P]ofxget/pugixml/pugixml.cpp
// Function: pugi::impl::(anonymous namespace)::get_buffer_encoding(pugi::xml_encoding, void const*, unsigned long)
PUGI__FN xml_encoding get_buffer_encoding(xml_encoding encoding, const void* contents, size_t size)
	{
		// replace wchar encoding with utf implementation
		if (encoding == encoding_wchar) return get_wchar_encoding();

		// replace utf16 encoding with utf16 with specific endianness
		if (encoding == encoding_utf16) return is_little_endian() ? encoding_utf16_le : encoding_utf16_be;

		// replace utf32 encoding with utf32 with specific endianness
		if (encoding == encoding_utf32) return is_little_endian() ? encoding_utf32_le : encoding_utf32_be;

		// only do autodetection if no explicit encoding is requested
		if (encoding != encoding_auto) return encoding;

		// try to guess encoding (based on XML specification, Appendix F.1)
		const uint8_t* data = static_cast<const uint8_t*>(contents);

		return guess_buffer_encoding(data, size);
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
cmpl $0x8, -0x8(%rbp)
jne 0x500e3
callq 0x50590
movl %eax, -0x4(%rbp)
jmp 0x5014d
cmpl $0x4, -0x8(%rbp)
jne 0x50105
callq 0x505b0
movb %al, %dl
movl $0x3, %eax
movl $0x2, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x5014d
cmpl $0x7, -0x8(%rbp)
jne 0x50127
callq 0x505b0
movb %al, %dl
movl $0x6, %eax
movl $0x5, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x5014d
cmpl $0x0, -0x8(%rbp)
je 0x50135
movl -0x8(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x5014d
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x505d0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jliesch[P]ofxget/pugixml/pugixml.cpp
// Function: pugi::impl::(anonymous namespace)::get_mutable_buffer(char*&, unsigned long&, void const*, unsigned long, bool)
PUGI__FN bool get_mutable_buffer(char_t*& out_buffer, size_t& out_length, const void* contents, size_t size, bool is_mutable)
	{
		size_t length = size / sizeof(char_t);

		if (is_mutable)
		{
			out_buffer = static_cast<char_t*>(const_cast<void*>(contents));
			out_length = length;
		}
		else
		{
			char_t* buffer = static_cast<char_t*>(xml_memory::allocate((length + 1) * sizeof(char_t)));
			if (!buffer) return false;

			if (contents)
				memcpy(buffer, contents, length * sizeof(char_t));
			else
				assert(length == 0);

			buffer[length] = 0;

			out_buffer = buffer;
			out_length = length + 1;
		}

		return true;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movb %r8b, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
andb $0x1, %al
movb %al, -0x29(%rbp)
movq -0x28(%rbp), %rax
shrq $0x0, %rax
movq %rax, -0x38(%rbp)
testb $0x1, -0x29(%rbp)
je 0x50e6d
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x38(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
jmp 0x50f01
movq 0x44b74(%rip), %rax     # 0x959e8
movq -0x38(%rbp), %rdi
addq $0x1, %rdi
shlq $0x0, %rdi
callq *%rax
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0x50e93
movb $0x0, -0x1(%rbp)
jmp 0x50f05
cmpq $0x0, -0x20(%rbp)
je 0x50eb1
movq -0x40(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x38(%rbp), %rdx
shlq $0x0, %rdx
callq 0x70b0
jmp 0x50edb
cmpq $0x0, -0x38(%rbp)
jne 0x50eba
jmp 0x50ed9
leaq 0x1b435(%rip), %rdi     # 0x6c2f6
leaq 0x1a48d(%rip), %rsi     # 0x6b355
movl $0x809, %edx            # imm = 0x809
leaq 0x1b42e(%rip), %rcx     # 0x6c302
callq 0x7180
jmp 0x50edb
movq -0x40(%rbp), %rax
movq -0x38(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x40(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x38(%rbp), %rcx
addq $0x1, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
// File: jliesch[P]ofxget/pugixml/pugixml.cpp
// Function: bool pugi::impl::(anonymous namespace)::convert_buffer_generic<pugi::impl::(anonymous namespace)::utf16_decoder<pugi::impl::(anonymous namespace)::opt_false>>(char*&, unsigned long&, void const*, unsigned long, pugi::impl::(anonymous namespace)::utf16_decoder<pugi::impl::(anonymous namespace)::opt_false>)
PUGI__FN bool convert_buffer_generic(char_t*& out_buffer, size_t& out_length, const void* contents, size_t size, D)
	{
		const typename D::type* data = static_cast<const typename D::type*>(contents);
		size_t data_length = size / sizeof(typename D::type);

		// first pass: get length in utf8 units
		size_t length = D::process(data, data_length, 0, utf8_counter());

		// allocate buffer of suitable length
		char_t* buffer = static_cast<char_t*>(xml_memory::allocate((length + 1) * sizeof(char_t)));
		if (!buffer) return false;

		// second pass: convert utf16 input to utf8
		uint8_t* obegin = reinterpret_cast<uint8_t*>(buffer);
		uint8_t* oend = D::process(data, data_length, obegin, utf8_writer());

		assert(oend == obegin + length);
		*oend = 0;

		out_buffer = buffer;
		out_length = length + 1;

		return true;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
shrq %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x51480
movq %rax, -0x40(%rbp)
movq 0x44a91(%rip), %rax     # 0x959e8
movq -0x40(%rbp), %rdi
addq $0x1, %rdi
shlq $0x0, %rdi
callq *%rax
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x50(%rbp)
jne 0x50f76
movb $0x0, -0x1(%rbp)
jmp 0x50fea
movq -0x50(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x58(%rbp), %rdx
callq 0x515f0
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq -0x58(%rbp), %rcx
addq -0x40(%rbp), %rcx
cmpq %rcx, %rax
jne 0x50fa6
jmp 0x50fc5
leaq 0x1b3c1(%rip), %rdi     # 0x6c36e
leaq 0x1a3a1(%rip), %rsi     # 0x6b355
movl $0x88e, %edx            # imm = 0x88E
leaq 0x1b3c6(%rip), %rcx     # 0x6c386
callq 0x7180
movq -0x60(%rbp), %rax
movb $0x0, (%rax)
movq -0x50(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x40(%rbp), %rcx
addq $0x1, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jliesch[P]ofxget/pugixml/pugixml.cpp
// Function: pugi::impl::(anonymous namespace)::utf8_writer::low(unsigned char*, unsigned int)
static value_type low(value_type result, uint32_t ch)
		{
			// U+0000..U+007F
			if (ch < 0x80)
			{
				*result = static_cast<uint8_t>(ch);
				return result + 1;
			}
			// U+0080..U+07FF
			else if (ch < 0x800)
			{
				result[0] = static_cast<uint8_t>(0xC0 | (ch >> 6));
				result[1] = static_cast<uint8_t>(0x80 | (ch & 0x3F));
				return result + 2;
			}
			// U+0800..U+FFFF
			else
			{
				result[0] = static_cast<uint8_t>(0xE0 | (ch >> 12));
				result[1] = static_cast<uint8_t>(0x80 | ((ch >> 6) & 0x3F));
				result[2] = static_cast<uint8_t>(0x80 | (ch & 0x3F));
				return result + 3;
			}
		}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
cmpl $0x80, -0x14(%rbp)
jae 0x51800
movl -0x14(%rbp), %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
jmp 0x51888
cmpl $0x800, -0x14(%rbp)     # imm = 0x800
jae 0x5183e
movl -0x14(%rbp), %eax
shrl $0x6, %eax
orl $0xc0, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
movl -0x14(%rbp), %eax
andl $0x3f, %eax
orl $0x80, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x10(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x8(%rbp)
jmp 0x51888
movl -0x14(%rbp), %eax
shrl $0xc, %eax
orl $0xe0, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
movl -0x14(%rbp), %eax
shrl $0x6, %eax
andl $0x3f, %eax
orl $0x80, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x1(%rax)
movl -0x14(%rbp), %eax
andl $0x3f, %eax
orl $0x80, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x10(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nop
// File: jliesch[P]ofxget/pugixml/pugixml.cpp
// Function: pugi::impl::(anonymous namespace)::utf8_writer::high(unsigned char*, unsigned int)
static value_type high(value_type result, uint32_t ch)
		{
			// U+10000..U+10FFFF
			result[0] = static_cast<uint8_t>(0xF0 | (ch >> 18));
			result[1] = static_cast<uint8_t>(0x80 | ((ch >> 12) & 0x3F));
			result[2] = static_cast<uint8_t>(0x80 | ((ch >> 6) & 0x3F));
			result[3] = static_cast<uint8_t>(0x80 | (ch & 0x3F));
			return result + 4;
		}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0xc(%rbp), %eax
shrl $0x12, %eax
orl $0xf0, %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movb %cl, (%rax)
movl -0xc(%rbp), %eax
shrl $0xc, %eax
andl $0x3f, %eax
orl $0x80, %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movb %cl, 0x1(%rax)
movl -0xc(%rbp), %eax
shrl $0x6, %eax
andl $0x3f, %eax
orl $0x80, %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movb %cl, 0x2(%rax)
movl -0xc(%rbp), %eax
andl $0x3f, %eax
orl $0x80, %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0x8(%rbp), %rax
addq $0x4, %rax
popq %rbp
retq
nopw (%rax,%rax)
// File: jliesch[P]ofxget/pugixml/pugixml.cpp
// Function: pugi::impl::(anonymous namespace)::utf8_counter::value_type pugi::impl::(anonymous namespace)::utf32_decoder<pugi::impl::(anonymous namespace)::opt_false>::process<pugi::impl::(anonymous namespace)::utf8_counter>(unsigned int const*, unsigned long, pugi::impl::(anonymous namespace)::utf8_counter::value_type, pugi::impl::(anonymous namespace)::utf8_counter)
static inline typename Traits::value_type process(const uint32_t* data, size_t size, typename Traits::value_type result, Traits)
		{
			while (size)
			{
				uint32_t lead = opt_swap::value ? endian_swap(*data) : *data;

				// U+0000..U+FFFF
				if (lead < 0x10000)
				{
					result = Traits::low(result, lead);
					data += 1;
					size -= 1;
				}
				// U+10000..U+10FFFF
				else
				{
					result = Traits::high(result, lead);
					data += 1;
					size -= 1;
				}
			}

			return result;
		}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x51c91
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x24(%rbp)
cmpl $0x10000, -0x24(%rbp)   # imm = 0x10000
jae 0x51c67
movq -0x20(%rbp), %rdi
movl -0x24(%rbp), %esi
callq 0x51760
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x51c8f
movq -0x20(%rbp), %rdi
movl -0x24(%rbp), %esi
callq 0x517b0
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x51c24
movq -0x20(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: jliesch[P]ofxget/pugixml/pugixml.cpp
// Function: pugi::impl::(anonymous namespace)::get_latin1_7bit_prefix_length(unsigned char const*, unsigned long)
PUGI__FN size_t get_latin1_7bit_prefix_length(const uint8_t* data, size_t size)
	{
		for (size_t i = 0; i < size; ++i)
			if (data[i] > 127)
				return i;

		return size;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x51ed9
movq -0x10(%rbp), %rax
movq -0x20(%rbp), %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x7f, %eax
jle 0x51ec9
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x51ee1
jmp 0x51ecb
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x51ea4
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw (%rax,%rax)
// File: jliesch[P]ofxget/pugixml/pugixml.cpp
// Function: pugi::impl::(anonymous namespace)::utf8_counter::value_type pugi::impl::(anonymous namespace)::latin1_decoder::process<pugi::impl::(anonymous namespace)::utf8_counter>(unsigned char const*, unsigned long, pugi::impl::(anonymous namespace)::utf8_counter::value_type, pugi::impl::(anonymous namespace)::utf8_counter)
static inline typename Traits::value_type process(const uint8_t* data, size_t size, typename Traits::value_type result, Traits)
		{
			while (size)
			{
				result = Traits::low(result, *data);
				data += 1;
				size -= 1;
			}

			return result;
		}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x51f39
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movzbl (%rax), %esi
callq 0x51760
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x51f04
movq -0x20(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jliesch[P]ofxget/pugixml/pugixml.cpp
// Function: pugi::impl::(anonymous namespace)::xml_parser::has_element_node_siblings(pugi::xml_node_struct*)
static bool has_element_node_siblings(xml_node_struct* node)
		{
			while (node)
			{
				if (PUGI__NODETYPE(node) == node_element) return true;

				node = node->next_sibling;
			}

			return false;
		}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x52cd3
movq -0x10(%rbp), %rax
movq (%rax), %rax
andq $0xf, %rax
cmpl $0x2, %eax
jne 0x52cc5
movb $0x1, -0x1(%rbp)
jmp 0x52cd7
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0x52ca8
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
popq %rbp
retq
nop
// File: jliesch[P]ofxget/pugixml/pugixml.cpp
// Function: pugi::impl::(anonymous namespace)::get_strconv_pcdata(unsigned int)
PUGI__FN strconv_pcdata_t get_strconv_pcdata(unsigned int optmask)
	{
		PUGI__STATIC_ASSERT(parse_escapes == 0x10 && parse_eol == 0x20 && parse_trim_pcdata == 0x0800);

		switch (((optmask >> 4) & 3) | ((optmask >> 9) & 4)) // get bitmask for flags (eol escapes trim)
		{
		case 0: return strconv_pcdata_impl<opt_false, opt_false, opt_false>::parse;
		case 1: return strconv_pcdata_impl<opt_false, opt_false, opt_true>::parse;
		case 2: return strconv_pcdata_impl<opt_false, opt_true, opt_false>::parse;
		case 3: return strconv_pcdata_impl<opt_false, opt_true, opt_true>::parse;
		case 4: return strconv_pcdata_impl<opt_true, opt_false, opt_false>::parse;
		case 5: return strconv_pcdata_impl<opt_true, opt_false, opt_true>::parse;
		case 6: return strconv_pcdata_impl<opt_true, opt_true, opt_false>::parse;
		case 7: return strconv_pcdata_impl<opt_true, opt_true, opt_true>::parse;
		default: assert(false); return 0; // unreachable
		}
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0xc(%rbp)
movl -0xc(%rbp), %ecx
movl %ecx, %eax
shrl $0x4, %eax
andl $0x3, %eax
shrl $0x9, %ecx
andl $0x4, %ecx
orl %ecx, %eax
movl %eax, %ecx
movq %rcx, -0x18(%rbp)
subl $0x7, %eax
ja 0x52ed5
movq -0x18(%rbp), %rax
leaq 0x17d7c(%rip), %rcx     # 0x6abe0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x24bc(%rip), %rax      # 0x55330
movq %rax, -0x8(%rbp)
jmp 0x52ef4
leaq 0x264f(%rip), %rax      # 0x554d0
movq %rax, -0x8(%rbp)
jmp 0x52ef4
leaq 0x2802(%rip), %rax      # 0x55690
movq %rax, -0x8(%rbp)
jmp 0x52ef4
leaq 0x29d5(%rip), %rax      # 0x55870
movq %rax, -0x8(%rbp)
jmp 0x52ef4
leaq 0x2bc8(%rip), %rax      # 0x55a70
movq %rax, -0x8(%rbp)
jmp 0x52ef4
leaq 0x2deb(%rip), %rax      # 0x55ca0
movq %rax, -0x8(%rbp)
jmp 0x52ef4
leaq 0x302e(%rip), %rax      # 0x55ef0
movq %rax, -0x8(%rbp)
jmp 0x52ef4
leaq 0x3291(%rip), %rax      # 0x56160
movq %rax, -0x8(%rbp)
jmp 0x52ef4
leaq 0x199dc(%rip), %rdi     # 0x6c8b8
leaq 0x18472(%rip), %rsi     # 0x6b355
movl $0xaa2, %edx            # imm = 0xAA2
leaq 0x19ab8(%rip), %rcx     # 0x6c9a7
callq 0x7180
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: jliesch[P]ofxget/pugixml/pugixml.cpp
// Function: pugi::impl::(anonymous namespace)::strconv_attribute_impl<pugi::impl::(anonymous namespace)::opt_true>::parse_simple(char*, char)
static char_t* parse_simple(char_t* s, char_t end_quote)
		{
			gap g;

			while (true)
			{
				PUGI__SCANWHILE_UNROLL(!PUGI__IS_CHARTYPE(ss, ct_parse_attr));

				if (*s == end_quote)
				{
					*g.flush(s) = 0;

					return s + 1;
				}
				else if (opt_escape::value && *s == '&')
				{
					s = strconv_escape(s, g);
				}
				else if (!*s)
				{
					return 0;
				}
				else ++s;
			}
		}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %sil, %al
movq %rdi, -0x10(%rbp)
movb %al, -0x11(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x54ca0
jmp 0x53dfd
movq -0x10(%rbp), %rax
movb (%rax), %al
movb %al, -0x29(%rbp)
movzbl -0x29(%rbp), %eax
movl %eax, %ecx
leaq 0x172bd(%rip), %rax     # 0x6b0d0
movzbl (%rax,%rcx), %eax
andl $0x2, %eax
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x53e2a
jmp 0x53e2f
jmp 0x53ef7
movq -0x10(%rbp), %rax
movb 0x1(%rax), %al
movb %al, -0x29(%rbp)
movzbl -0x29(%rbp), %eax
movl %eax, %ecx
leaq 0x1728a(%rip), %rax     # 0x6b0d0
movzbl (%rax,%rcx), %eax
andl $0x2, %eax
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x53e5d
jmp 0x53e6e
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x53ef7
movq -0x10(%rbp), %rax
movb 0x2(%rax), %al
movb %al, -0x29(%rbp)
movzbl -0x29(%rbp), %eax
movl %eax, %ecx
leaq 0x1724b(%rip), %rax     # 0x6b0d0
movzbl (%rax,%rcx), %eax
andl $0x2, %eax
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x53e9c
jmp 0x53eaa
movq -0x10(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x10(%rbp)
jmp 0x53ef7
movq -0x10(%rbp), %rax
movb 0x3(%rax), %al
movb %al, -0x29(%rbp)
movzbl -0x29(%rbp), %eax
movl %eax, %ecx
leaq 0x1720f(%rip), %rax     # 0x6b0d0
movzbl (%rax,%rcx), %eax
andl $0x2, %eax
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x53ed8
jmp 0x53ee6
movq -0x10(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x10(%rbp)
jmp 0x53ef7
movq -0x10(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x10(%rbp)
jmp 0x53dfd
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
movsbl -0x11(%rbp), %ecx
cmpl %ecx, %eax
jne 0x53f24
movq -0x10(%rbp), %rsi
leaq -0x28(%rbp), %rdi
callq 0x54cc0
movb $0x0, (%rax)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
jmp 0x53f6b
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x26, %eax
jne 0x53f43
movq -0x10(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x54d60
movq %rax, -0x10(%rbp)
jmp 0x53f64
movq -0x10(%rbp), %rax
cmpb $0x0, (%rax)
jne 0x53f56
movq $0x0, -0x8(%rbp)
jmp 0x53f6b
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x53f64
jmp 0x53f66
jmp 0x53dfb
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jliesch[P]ofxget/pugixml/pugixml.cpp
// Function: pugi::impl::(anonymous namespace)::gap::flush(char*)
char_t* flush(char_t* s)
		{
			if (end)
			{
				// Move [old_gap_end, current_pos) to [old_gap_start, ...)
				assert(s >= end);
				memmove(end - size, end, reinterpret_cast<char*>(s) - reinterpret_cast<char*>(end));

				return s - size;
			}
			else return s;
		}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, (%rax)
je 0x54d45
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
cmpq (%rcx), %rax
jb 0x54ced
jmp 0x54d0c
leaq 0x17c25(%rip), %rdi     # 0x6c919
leaq 0x1665a(%rip), %rsi     # 0x6b355
movl $0x985, %edx            # imm = 0x985
leaq 0x17c1b(%rip), %rcx     # 0x6c922
callq 0x7180
movq -0x20(%rbp), %rax
movq (%rax), %rdi
xorl %ecx, %ecx
subq 0x8(%rax), %rcx
addq %rcx, %rdi
movq (%rax), %rsi
movq -0x18(%rbp), %rdx
movq (%rax), %rax
subq %rax, %rdx
callq 0x7170
movq -0x20(%rbp), %rdx
movq -0x18(%rbp), %rax
xorl %ecx, %ecx
subq 0x8(%rdx), %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x54d4d
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: jliesch[P]ofxget/pugixml/pugixml.cpp
// Function: pugi::impl::(anonymous namespace)::gap::push(char*&, unsigned long)
void push(char_t*& s, size_t count)
		{
			if (end) // there was a gap already; collapse it
			{
				// Move [old_gap_end, new_gap_start) to [old_gap_start, ...)
				assert(s >= end);
				memmove(end - size, end, reinterpret_cast<char*>(s) - reinterpret_cast<char*>(end));
			}

			s += count; // end of current gap

			// "merge" two gaps
			end = s;
			size += count;
		}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, (%rax)
je 0x552f8
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpq (%rcx), %rax
jb 0x552b4
jmp 0x552d3
leaq 0x1765e(%rip), %rdi     # 0x6c919
leaq 0x16093(%rip), %rsi     # 0x6b355
movl $0x974, %edx            # imm = 0x974
leaq 0x17694(%rip), %rcx     # 0x6c962
callq 0x7180
movq -0x20(%rbp), %rax
movq (%rax), %rdi
xorl %ecx, %ecx
subq 0x8(%rax), %rcx
addq %rcx, %rdi
movq (%rax), %rsi
movq -0x10(%rbp), %rcx
movq (%rcx), %rdx
movq (%rax), %rax
subq %rax, %rdx
callq 0x7170
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rdx
movq -0x10(%rbp), %rcx
addq (%rcx), %rdx
movq %rdx, (%rcx)
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
movq %rcx, (%rax)
movq -0x18(%rbp), %rcx
addq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)