// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/classes/xml/document.cpp
// Function: smooth::XML::Document::LoadNode(_xmlTextReader*, smooth::XML::Node*)
S::Int S::XML::Document::LoadNode(xmlTextReaderPtr reader, Node *node)
{
	node->SetName((const char *) xmlTextReaderConstName(reader));

	if (xmlTextReaderHasAttributes(reader))
	{
		while (xmlTextReaderMoveToNextAttribute(reader) == 1) node->SetAttribute((const char *) xmlTextReaderConstName(reader), (const char *) xmlTextReaderConstValue(reader));

		xmlTextReaderMoveToElement(reader);
	}

	if (!xmlTextReaderIsEmptyElement(reader))
	{
		Int	 nodeType = 0;

		if (xmlTextReaderRead(reader) == -1) return Error();

		while ((nodeType = xmlTextReaderNodeType(reader)) != XML_ELEMENT_DECL)
		{
			if	(nodeType == XML_ELEMENT_NODE)					  LoadNode(reader, node->AddNode(NIL));
			else if (nodeType == XML_TEXT_NODE || nodeType == XML_CDATA_SECTION_NODE) node->SetContent((const char *) xmlTextReaderConstValue(reader));

			if (xmlTextReaderRead(reader) == -1) return Error();
		}
	}

	return Success();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x180, %rsp            # imm = 0x180
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x110(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x108(%rbp)
movq -0x18(%rbp), %rdi
callq 0x59ae0
movq %rax, %rsi
leaq -0x38(%rbp), %rdi
movq %rdi, -0x100(%rbp)
callq 0x5c1f0
movq -0x108(%rbp), %rdi
movq -0x100(%rbp), %rsi
callq 0x5b220
jmp 0x10e83e
leaq -0x38(%rbp), %rdi
callq 0x5df00
movq -0x18(%rbp), %rdi
callq 0x5a740
cmpl $0x0, %eax
je 0x10e92f
jmp 0x10e85b
movq -0x18(%rbp), %rdi
callq 0x5b100
cmpl $0x1, %eax
jne 0x10e926
movq -0x20(%rbp), %rax
movq %rax, -0x120(%rbp)
movq -0x18(%rbp), %rdi
callq 0x59ae0
movq %rax, %rsi
leaq -0x60(%rbp), %rdi
callq 0x5c1f0
movq -0x18(%rbp), %rdi
callq 0x5cb00
movq %rax, -0x118(%rbp)
jmp 0x10e89f
movq -0x118(%rbp), %rsi
leaq -0x78(%rbp), %rdi
callq 0x5c1f0
jmp 0x10e8b1
movq -0x120(%rbp), %rdi
leaq -0x60(%rbp), %rsi
leaq -0x78(%rbp), %rdx
callq 0x5cb70
jmp 0x10e8c7
leaq -0x78(%rbp), %rdi
callq 0x5df00
leaq -0x60(%rbp), %rdi
callq 0x5df00
jmp 0x10e85b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x5df00
jmp 0x10ebf9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x10e918
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x5df00
leaq -0x60(%rbp), %rdi
callq 0x5df00
jmp 0x10ebf9
movq -0x18(%rbp), %rdi
callq 0x5b580
movq -0x18(%rbp), %rdi
callq 0x5a290
cmpl $0x0, %eax
jne 0x10eb95
movl $0x0, -0x7c(%rbp)
movq -0x18(%rbp), %rdi
callq 0x5c870
cmpl $-0x1, %eax
jne 0x10e9b9
leaq -0x90(%rbp), %rdi
movq %rdi, -0x130(%rbp)
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x5a9c0
movq -0x130(%rbp), %rdi
callq 0x59680
movl %eax, -0x124(%rbp)
jmp 0x10e982
movl -0x124(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x5b5b0
jmp 0x10ebed
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x5b5b0
jmp 0x10ebf9
jmp 0x10e9bb
movq -0x18(%rbp), %rdi
callq 0x5b000
movl %eax, -0x7c(%rbp)
cmpl $0xf, %eax
je 0x10eb93
cmpl $0x1, -0x7c(%rbp)
jne 0x10eaab
movq -0x18(%rbp), %rax
movq %rax, -0x148(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x140(%rbp)
leaq -0xa8(%rbp), %rdi
xorl %esi, %esi
movl %esi, -0x134(%rbp)
callq 0x5da90
movl -0x134(%rbp), %esi
leaq -0xc0(%rbp), %rdi
callq 0x5da90
jmp 0x10ea18
movq -0x140(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
leaq -0xc0(%rbp), %rdx
callq 0x599e0
movq %rax, -0x150(%rbp)
jmp 0x10ea3b
movq -0x150(%rbp), %rdx
movq -0x148(%rbp), %rsi
movq -0x110(%rbp), %rdi
callq 0x5bdb0
jmp 0x10ea57
leaq -0xc0(%rbp), %rdi
callq 0x5df00
leaq -0xa8(%rbp), %rdi
callq 0x5df00
jmp 0x10eb23
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x10ea9a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0xc0(%rbp), %rdi
callq 0x5df00
leaq -0xa8(%rbp), %rdi
callq 0x5df00
jmp 0x10ebf9
cmpl $0x3, -0x7c(%rbp)
je 0x10eab7
cmpl $0x4, -0x7c(%rbp)
jne 0x10eb21
movq -0x20(%rbp), %rax
movq %rax, -0x160(%rbp)
movq -0x18(%rbp), %rdi
callq 0x5cb00
movq %rax, %rsi
leaq -0xd8(%rbp), %rdi
movq %rdi, -0x158(%rbp)
callq 0x5c1f0
movq -0x160(%rbp), %rdi
movq -0x158(%rbp), %rsi
callq 0x59ab0
jmp 0x10eaf6
leaq -0xd8(%rbp), %rdi
callq 0x5df00
jmp 0x10eb21
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0xd8(%rbp), %rdi
callq 0x5df00
jmp 0x10ebf9
jmp 0x10eb23
movq -0x18(%rbp), %rdi
callq 0x5c870
cmpl $-0x1, %eax
jne 0x10eb8e
leaq -0xe8(%rbp), %rdi
movq %rdi, -0x170(%rbp)
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x5a9c0
movq -0x170(%rbp), %rdi
callq 0x59680
movl %eax, -0x164(%rbp)
jmp 0x10eb5d
movl -0x164(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0xe8(%rbp), %rdi
callq 0x5b5b0
jmp 0x10ebed
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0xe8(%rbp), %rdi
callq 0x5b5b0
jmp 0x10ebf9
jmp 0x10e9bb
jmp 0x10eb95
leaq -0xf8(%rbp), %rdi
movq %rdi, -0x180(%rbp)
callq 0x5ca80
movq -0x180(%rbp), %rdi
callq 0x59680
movl %eax, -0x174(%rbp)
jmp 0x10ebbc
movl -0x174(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0xf8(%rbp), %rdi
callq 0x5a410
jmp 0x10ebed
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0xf8(%rbp), %rdi
callq 0x5a410
jmp 0x10ebf9
movl -0x4(%rbp), %eax
addq $0x180, %rsp            # imm = 0x180
popq %rbp
retq
movq -0x40(%rbp), %rdi
callq 0x5b6b0
nopw %cs:(%rax,%rax)