// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/classes/xml/document.cpp
// Function: smooth::XML::Document::LoadFile(smooth::String const&)
S::Int S::XML::Document::LoadFile(const String &fileName)
{
	if (!File(fileName).Exists()) return Error();

	xmlTextReaderPtr reader = xmlNewTextReaderFilename(fileName.ConvertTo("UTF-8"));

	if (reader == NIL) 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);

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x170, %rsp            # imm = 0x170
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x128(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x120(%rbp)
leaq -0x60(%rbp), %rdi
movq %rdi, -0x118(%rbp)
xorl %esi, %esi
callq 0x5da90
movq -0x120(%rbp), %rsi
movq -0x118(%rbp), %rdx
leaq -0x48(%rbp), %rdi
callq 0x5acf0
jmp 0x10e424
leaq -0x48(%rbp), %rdi
callq 0x5b4b0
movb %al, -0x129(%rbp)
jmp 0x10e435
movb -0x129(%rbp), %al
xorb $-0x1, %al
movb %al, -0x12a(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x5de78
leaq -0x60(%rbp), %rdi
callq 0x5df00
movb -0x12a(%rbp), %al
testb $0x1, %al
jne 0x10e464
jmp 0x10e4ef
leaq -0x80(%rbp), %rdi
movq %rdi, -0x138(%rbp)
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x5a9c0
movq -0x138(%rbp), %rdi
callq 0x59680
movl %eax, -0x130(%rbp)
jmp 0x10e48d
movl -0x130(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x5b5b0
jmp 0x10e7c9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x10e4c7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x5de78
leaq -0x60(%rbp), %rdi
callq 0x5df00
jmp 0x10e7d5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x5b5b0
jmp 0x10e7d5
movq -0x18(%rbp), %rdi
leaq 0x976ec(%rip), %rsi     # 0x1a5be6
callq 0x5c120
movq %rax, %rdi
callq 0x5d240
movq %rax, -0x88(%rbp)
cmpq $0x0, -0x88(%rbp)
jne 0x10e57b
leaq -0x98(%rbp), %rdi
movq %rdi, -0x148(%rbp)
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x5a9c0
movq -0x148(%rbp), %rdi
callq 0x59680
movl %eax, -0x13c(%rbp)
jmp 0x10e544
movl -0x13c(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x5b5b0
jmp 0x10e7c9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x5b5b0
jmp 0x10e7d5
movl $0x1, -0x9c(%rbp)
movq -0x88(%rbp), %rdi
callq 0x5c870
movl %eax, -0x9c(%rbp)
cmpl $0x1, %eax
jne 0x10e6ff
movq -0x88(%rbp), %rdi
callq 0x5b000
cmpl $0x1, %eax
jne 0x10e6fa
leaq 0x9762a(%rip), %rsi     # 0x1a5be6
leaq -0xb8(%rbp), %rdi
callq 0x5ddc0
movl $0x30, %edi
callq 0x59820
movq %rax, -0x150(%rbp)
jmp 0x10e5db
movb $0x1, -0xe9(%rbp)
leaq -0xd0(%rbp), %rdi
xorl %esi, %esi
callq 0x5da90
jmp 0x10e5f2
leaq -0xe8(%rbp), %rdi
xorl %esi, %esi
callq 0x5da90
jmp 0x10e602
movq -0x150(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
leaq -0xe8(%rbp), %rdx
callq 0x5ac90
jmp 0x10e61e
movq -0x128(%rbp), %rax
movq -0x150(%rbp), %rcx
movb $0x0, -0xe9(%rbp)
movq %rcx, 0x18(%rax)
leaq -0xe8(%rbp), %rdi
callq 0x5df00
leaq -0xd0(%rbp), %rdi
callq 0x5df00
movq -0x128(%rbp), %rdi
movb $0x1, 0x20(%rdi)
movq -0x88(%rbp), %rsi
movq 0x18(%rdi), %rdx
callq 0x5bdb0
jmp 0x10e66c
leaq -0xb8(%rbp), %rdi
callq 0x5af60
jmp 0x10e6ff
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x10e6e9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x10e6cb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x10e6bf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0xe8(%rbp), %rdi
callq 0x5df00
leaq -0xd0(%rbp), %rdi
callq 0x5df00
testb $0x1, -0xe9(%rbp)
jne 0x10e6d6
jmp 0x10e6e7
movq -0x150(%rbp), %rdi
movl $0x30, %esi
callq 0x595b0
jmp 0x10e6e9
leaq -0xb8(%rbp), %rdi
callq 0x5af60
jmp 0x10e7d5
jmp 0x10e585
movq -0x88(%rbp), %rdi
callq 0x59fb0
cmpl $0x0, -0x9c(%rbp)
jl 0x10e76c
leaq -0x100(%rbp), %rdi
movq %rdi, -0x160(%rbp)
callq 0x5ca80
movq -0x160(%rbp), %rdi
callq 0x59680
movl %eax, -0x154(%rbp)
jmp 0x10e73b
movl -0x154(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0x100(%rbp), %rdi
callq 0x5a410
jmp 0x10e7c9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x100(%rbp), %rdi
callq 0x5a410
jmp 0x10e7d5
leaq -0x110(%rbp), %rdi
movq %rdi, -0x170(%rbp)
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x5a9c0
movq -0x170(%rbp), %rdi
callq 0x59680
movl %eax, -0x164(%rbp)
jmp 0x10e798
movl -0x164(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0x110(%rbp), %rdi
callq 0x5b5b0
jmp 0x10e7c9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x110(%rbp), %rdi
callq 0x5b5b0
jmp 0x10e7d5
movl -0x4(%rbp), %eax
addq $0x170, %rsp            # imm = 0x170
popq %rbp
retq
movq -0x68(%rbp), %rdi
callq 0x5b6b0
nop