// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/classes/xml/document.cpp
// Function: smooth::XML::Document::ParseMemory(void const*, int)
S::Int S::XML::Document::ParseMemory(const Void *memory, Int size)
{
	xmlParserInputBufferPtr	 buffer = xmlParserInputBufferCreateMem((char *) memory, size, XML_CHAR_ENCODING_NONE);

	if (buffer == NIL) { return Error(); }

	xmlTextReaderPtr	 reader = xmlNewTextReader(buffer, NIL);

	if (reader == NIL) { xmlFreeParserInputBuffer(buffer); return Error(); }

	Int	 ret = 1;

	while ((ret = xmlTextReaderRead(reader)) == 1)
	{
		if (xmlTextReaderNodeType(reader) == XML_ELEMENT_NODE)
		{
			String::InputFormat	 inputFormat("UTF-8");

			rootNode = new Node(NIL);
			ownRoot	 = True;

			LoadNode(reader, rootNode);

			break;
		}
	}

	xmlFreeTextReader(reader);
	xmlFreeParserInputBuffer(buffer);

	if (ret >= 0)	return Success();
	else		return Error();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq -0x18(%rbp), %rdi
movl -0x1c(%rbp), %esi
xorl %edx, %edx
callq 0x5b250
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x10eca4
leaq -0x38(%rbp), %rdi
movq %rdi, -0xf0(%rbp)
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x5a9c0
movq -0xf0(%rbp), %rdi
callq 0x59680
movl %eax, -0xe4(%rbp)
jmp 0x10ec73
movl -0xe4(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x5b5b0
jmp 0x10ef55
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x5b5b0
jmp 0x10ef61
movq -0x28(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x5c010
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x50(%rbp)
jne 0x10ed1f
movq -0x28(%rbp), %rdi
callq 0x5cc00
leaq -0x60(%rbp), %rdi
movq %rdi, -0x100(%rbp)
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x5a9c0
movq -0x100(%rbp), %rdi
callq 0x59680
movl %eax, -0xf4(%rbp)
jmp 0x10ecee
movl -0xf4(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x5b5b0
jmp 0x10ef55
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x5b5b0
jmp 0x10ef61
movl $0x1, -0x64(%rbp)
movq -0x50(%rbp), %rdi
callq 0x5c870
movl %eax, -0x64(%rbp)
cmpl $0x1, %eax
jne 0x10ee88
movq -0x50(%rbp), %rdi
callq 0x5b000
cmpl $0x1, %eax
jne 0x10ee83
leaq 0x96e92(%rip), %rsi     # 0x1a5be6
leaq -0x80(%rbp), %rdi
callq 0x5ddc0
movl $0x30, %edi
callq 0x59820
movq %rax, -0x108(%rbp)
jmp 0x10ed70
movb $0x1, -0xb1(%rbp)
leaq -0x98(%rbp), %rdi
xorl %esi, %esi
callq 0x5da90
jmp 0x10ed87
leaq -0xb0(%rbp), %rdi
xorl %esi, %esi
callq 0x5da90
jmp 0x10ed97
movq -0x108(%rbp), %rdi
leaq -0x98(%rbp), %rsi
leaq -0xb0(%rbp), %rdx
callq 0x5ac90
jmp 0x10edb3
movq -0xe0(%rbp), %rax
movq -0x108(%rbp), %rcx
movb $0x0, -0xb1(%rbp)
movq %rcx, 0x18(%rax)
leaq -0xb0(%rbp), %rdi
callq 0x5df00
leaq -0x98(%rbp), %rdi
callq 0x5df00
movq -0xe0(%rbp), %rdi
movb $0x1, 0x20(%rdi)
movq -0x50(%rbp), %rsi
movq 0x18(%rdi), %rdx
callq 0x5bdb0
jmp 0x10edfe
leaq -0x80(%rbp), %rdi
callq 0x5af60
jmp 0x10ee88
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x10ee75
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x10ee57
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x10ee4b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0xb0(%rbp), %rdi
callq 0x5df00
leaq -0x98(%rbp), %rdi
callq 0x5df00
testb $0x1, -0xb1(%rbp)
jne 0x10ee62
jmp 0x10ee73
movq -0x108(%rbp), %rdi
movl $0x30, %esi
callq 0x595b0
jmp 0x10ee75
leaq -0x80(%rbp), %rdi
callq 0x5af60
jmp 0x10ef61
jmp 0x10ed26
movq -0x50(%rbp), %rdi
callq 0x59fb0
movq -0x28(%rbp), %rdi
callq 0x5cc00
cmpl $0x0, -0x64(%rbp)
jl 0x10eef8
leaq -0xc8(%rbp), %rdi
movq %rdi, -0x118(%rbp)
callq 0x5ca80
movq -0x118(%rbp), %rdi
callq 0x59680
movl %eax, -0x10c(%rbp)
jmp 0x10eec7
movl -0x10c(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x5a410
jmp 0x10ef55
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x5a410
jmp 0x10ef61
leaq -0xd8(%rbp), %rdi
movq %rdi, -0x128(%rbp)
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x5a9c0
movq -0x128(%rbp), %rdi
callq 0x59680
movl %eax, -0x11c(%rbp)
jmp 0x10ef24
movl -0x11c(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0xd8(%rbp), %rdi
callq 0x5b5b0
jmp 0x10ef55
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0xd8(%rbp), %rdi
callq 0x5b5b0
jmp 0x10ef61
movl -0x4(%rbp), %eax
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
movq -0x40(%rbp), %rdi
callq 0x5b6b0
nopw (%rax,%rax)