// File: /workspace/github_cpp_makefile_star2_O1/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
testq %r12, %r12
je 0x2d76f
movq 0x10(%r12), %rcx
testq %rcx, %rcx
leaq 0x39bf(%rip), %rax      # 0x31109
cmovneq %rcx, %rax
movq %rax, (%rbx)
movb $0x0, 0x8(%rbx)
movq $0x0, 0x10(%rbx)
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rdx, %r14
movq (%rsi), %r12
testq %r12, %r12
je 0x2d783
movl (%r12), %ecx
andl $0xf, %ecx
jmp 0x2d785
xorl %ecx, %ecx
leaq 0x397d(%rip), %rax      # 0x31109
leal -0x3(%rcx), %edx
cmpl $0x4, %edx
jae 0x2d79b
testq %r12, %r12
jne 0x2d73b
jmp 0x2d74e
decl %ecx
cmpl $0x2, %ecx
jae 0x2d74e
leaq 0x3960(%rip), %rax      # 0x31109
movq %rax, (%rbx)
movb $0x0, 0x8(%rbx)
movq $0x0, 0x10(%rbx)
testq %r12, %r12
je 0x2d7d0
movq 0x10(%r12), %rcx
testq %rcx, %rcx
leaq 0x393d(%rip), %rax      # 0x31109
cmovneq %rcx, %rax
cmpb $0x0, (%rax)
je 0x2d813
testq %r12, %r12
je 0x2d7ef
movq 0x10(%r12), %rcx
testq %rcx, %rcx
leaq 0x3920(%rip), %rax      # 0x31109
cmovneq %rcx, %rax
jmp 0x2d7f6
leaq 0x3913(%rip), %rax      # 0x31109
movq %rsp, %rsi
movq %rax, (%rsi)
movb $0x0, 0x8(%rsi)
movq $0x0, 0x10(%rsi)
movq %rbx, %rdi
movq %r14, %rdx
callq 0x2d900
testq %r12, %r12
je 0x2d81f
movq 0x20(%r12), %rbp
jmp 0x2d821
xorl %ebp, %ebp
testq %rbp, %rbp
sete %al
cmpq %r12, %rbp
sete %cl
orb %al, %cl
jne 0x2d75d
leaq 0x38cd(%rip), %r13      # 0x31109
movq %rsp, %r15
movl (%rbp), %eax
andl $0xf, %eax
cmpl $0x3, %eax
je 0x2d855
movl (%rbp), %eax
andl $0xf, %eax
cmpl $0x4, %eax
jne 0x2d880
movq 0x10(%rbp), %rax
testq %rax, %rax
cmoveq %r13, %rax
movq %rax, (%rsp)
movb $0x0, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x2d900
cmpq $0x0, 0x20(%rbp)
je 0x2d88d
addq $0x20, %rbp
jmp 0x2d8e5
cmpq $0x0, 0x30(%rbp)
je 0x2d8a8
addq $0x30, %rbp
jmp 0x2d8e5
movl $0x0, %ebp
testq %rax, %rax
je 0x2d8a8
movq 0x18(%rax), %rbp
movq %rbp, %rax
testq %rbp, %rbp
je 0x2d8ba
cmpq $0x0, 0x30(%rax)
sete %cl
jmp 0x2d8bc
movb $0x1, %cl
cmpq %r12, %rax
je 0x2d8c5
testb %cl, %cl
jne 0x2d89a
testq %rax, %rax
sete %cl
cmpq %r12, %rax
sete %dl
movl $0x0, %ebp
cmoveq %rax, %rbp
orb %cl, %dl
jne 0x2d8e9
addq $0x30, %rax
movq %rax, %rbp
movq (%rbp), %rbp
testq %rbp, %rbp
je 0x2d75d
cmpq %r12, %rbp
jne 0x2d83f
jmp 0x2d75d