// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/classes/misc/config.cpp
// Function: smooth::Configuration::Open(smooth::String const&, bool)
S::Int S::Configuration::Open(const String &file, Bool create)
{
	if (configFile != NIL) Close();

	configFile = new XML::Document();

	if (configFile->LoadFile(file) == Success())
	{
		fileName = file;
	}
	else if (configFile->LoadFile(GUI::Application::GetStartupDirectory().Append(file)) == Success())
	{
		fileName = GUI::Application::GetStartupDirectory().Append(file);
	}
	else if (configFile->LoadFile(GUI::Application::GetApplicationDirectory().Append(file)) == Success())
	{
		fileName = GUI::Application::GetApplicationDirectory().Append(file);
	}
	else
	{
		if (!create)
		{
			Close();

			return Error();
		}
		else
		{
			ownRoot = new XML::Node("ConfigFile");

			configFile->SetRootNode(ownRoot);

			ownRoot->AddNode(NodeConfigurationID)->SetAttribute(AttributeNameID, ConfigurationDefaultID);

			if (file[1] == ':' ||
			    file[0] == '/' ||
			    file[0] == '\\') fileName = file;
			else		     fileName = GUI::Application::GetApplicationDirectory().Append(file);
		}
	}

	/* Check XML file type.
	 */
	XML::Node	*root = configFile->GetRootNode();

	if (root == NIL || root->GetNodeByName(NodeConfigurationID) == NIL)
	{
		Close();

		return Error();
	}

	return Success();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x250, %rsp            # imm = 0x250
movb %dl, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
andb $0x1, %al
movb %al, -0x19(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x168(%rbp)
cmpq $0x0, 0x30(%rax)
je 0xee2c8
movq -0x168(%rbp), %rdi
callq 0x5a110
movl $0x28, %edi
callq 0x59820
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x170(%rbp)
callq 0x5c470
jmp 0xee2e6
movq -0x168(%rbp), %rax
movq -0x170(%rbp), %rcx
movq %rcx, 0x30(%rax)
movq 0x30(%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x59670
movl %eax, -0x184(%rbp)
leaq -0x40(%rbp), %rdi
movq %rdi, -0x180(%rbp)
callq 0x5ca80
movq -0x180(%rbp), %rdi
callq 0x59680
movl %eax, -0x174(%rbp)
jmp 0xee32f
leaq -0x40(%rbp), %rdi
callq 0x5a410
movl -0x174(%rbp), %ecx
movl -0x184(%rbp), %eax
cmpl %ecx, %eax
jne 0xee399
movq -0x168(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x59760
jmp 0xee8d8
movq -0x170(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
movl $0x28, %esi
callq 0x595b0
jmp 0xee9df
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x5a410
jmp 0xee9df
movq -0x168(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x1a0(%rbp)
leaq -0x58(%rbp), %rdi
movq %rdi, -0x198(%rbp)
callq 0x5cfc0
movq -0x198(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x5a710
movq %rax, -0x190(%rbp)
jmp 0xee3d4
movq -0x190(%rbp), %rsi
movq -0x1a0(%rbp), %rdi
callq 0x59670
movl %eax, -0x1a4(%rbp)
jmp 0xee3ef
leaq -0x68(%rbp), %rdi
callq 0x5ca80
jmp 0xee3fa
leaq -0x68(%rbp), %rdi
callq 0x59680
movl %eax, -0x1a8(%rbp)
jmp 0xee40b
leaq -0x68(%rbp), %rdi
callq 0x5a410
leaq -0x58(%rbp), %rdi
callq 0x5df00
movl -0x1a8(%rbp), %ecx
movl -0x1a4(%rbp), %eax
cmpl %ecx, %eax
jne 0xee4c8
leaq -0x80(%rbp), %rdi
movq %rdi, -0x1b8(%rbp)
callq 0x5cfc0
movq -0x1b8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x5a710
movq %rax, -0x1b0(%rbp)
jmp 0xee45a
movq -0x1b0(%rbp), %rsi
movq -0x168(%rbp), %rdi
callq 0x59760
jmp 0xee46f
leaq -0x80(%rbp), %rdi
callq 0x5df00
jmp 0xee8d6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0xee4a0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x5a410
leaq -0x58(%rbp), %rdi
callq 0x5df00
jmp 0xee9df
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x5df00
jmp 0xee9df
movq -0x168(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x1d0(%rbp)
leaq -0x98(%rbp), %rdi
movq %rdi, -0x1c8(%rbp)
callq 0x5c270
movq -0x1c8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x5a710
movq %rax, -0x1c0(%rbp)
jmp 0xee506
movq -0x1c0(%rbp), %rsi
movq -0x1d0(%rbp), %rdi
callq 0x59670
movl %eax, -0x1d4(%rbp)
jmp 0xee521
leaq -0xa8(%rbp), %rdi
callq 0x5ca80
jmp 0xee52f
leaq -0xa8(%rbp), %rdi
callq 0x59680
movl %eax, -0x1d8(%rbp)
jmp 0xee543
leaq -0xa8(%rbp), %rdi
callq 0x5a410
leaq -0x98(%rbp), %rdi
callq 0x5df00
movl -0x1d8(%rbp), %ecx
movl -0x1d4(%rbp), %eax
cmpl %ecx, %eax
jne 0xee615
leaq -0xc0(%rbp), %rdi
movq %rdi, -0x1e8(%rbp)
callq 0x5c270
movq -0x1e8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x5a710
movq %rax, -0x1e0(%rbp)
jmp 0xee59b
movq -0x1e0(%rbp), %rsi
movq -0x168(%rbp), %rdi
callq 0x59760
jmp 0xee5b0
leaq -0xc0(%rbp), %rdi
callq 0x5df00
jmp 0xee8d4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0xee5e7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x5a410
leaq -0x98(%rbp), %rdi
callq 0x5df00
jmp 0xee9df
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0xc0(%rbp), %rdi
callq 0x5df00
jmp 0xee9df
testb $0x1, -0x19(%rbp)
jne 0xee68a
movq -0x168(%rbp), %rdi
callq 0x5a110
leaq -0xd0(%rbp), %rdi
movq %rdi, -0x1f8(%rbp)
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x5a9c0
movq -0x1f8(%rbp), %rdi
callq 0x59680
movl %eax, -0x1ec(%rbp)
jmp 0xee653
movl -0x1ec(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0xd0(%rbp), %rdi
callq 0x5b5b0
jmp 0xee9d3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0xd0(%rbp), %rdi
callq 0x5b5b0
jmp 0xee9df
movl $0x30, %edi
callq 0x59820
movq %rax, -0x200(%rbp)
movb $0x1, -0x101(%rbp)
leaq 0xb7331(%rip), %rsi     # 0x1a59da
leaq -0xe8(%rbp), %rdi
callq 0x5c1f0
jmp 0xee6b7
leaq -0x100(%rbp), %rdi
xorl %esi, %esi
callq 0x5da90
jmp 0xee6c7
movq -0x200(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
leaq -0x100(%rbp), %rdx
callq 0x5ac90
jmp 0xee6e3
movq -0x168(%rbp), %rax
movq -0x200(%rbp), %rcx
movb $0x0, -0x101(%rbp)
movq %rcx, 0x38(%rax)
leaq -0x100(%rbp), %rdi
callq 0x5df00
leaq -0xe8(%rbp), %rdi
callq 0x5df00
movq -0x168(%rbp), %rax
movq 0x30(%rax), %rdi
movq 0x38(%rax), %rsi
callq 0x5dda0
movq -0x168(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x218(%rbp)
leaq -0x120(%rbp), %rdi
movq %rdi, -0x210(%rbp)
xorl %esi, %esi
callq 0x5da90
movq -0x218(%rbp), %rdi
movq -0x210(%rbp), %rdx
leaq 0x11e234(%rip), %rsi    # 0x20c998
callq 0x599e0
movq %rax, -0x208(%rbp)
jmp 0xee772
movq -0x208(%rbp), %rdi
leaq 0x11e278(%rip), %rsi    # 0x20c9f8
leaq 0x11e1f9(%rip), %rdx    # 0x20c980
callq 0x5cb70
jmp 0xee78e
leaq -0x120(%rbp), %rdi
callq 0x5df00
movq -0x18(%rbp), %rdi
movl $0x1, %esi
callq 0x5c900
cmpl $0x3a, %eax
je 0xee7d1
movq -0x18(%rbp), %rdi
xorl %esi, %esi
callq 0x5c900
cmpl $0x2f, %eax
je 0xee7d1
movq -0x18(%rbp), %rdi
xorl %esi, %esi
callq 0x5c900
cmpl $0x5c, %eax
jne 0xee864
movq -0x168(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x59760
jmp 0xee8d0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0xee826
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0xee81a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x100(%rbp), %rdi
callq 0x5df00
leaq -0xe8(%rbp), %rdi
callq 0x5df00
testb $0x1, -0x101(%rbp)
jne 0xee831
jmp 0xee842
movq -0x200(%rbp), %rdi
movl $0x30, %esi
callq 0x595b0
jmp 0xee9df
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x120(%rbp), %rdi
callq 0x5df00
jmp 0xee9df
leaq -0x138(%rbp), %rdi
movq %rdi, -0x228(%rbp)
callq 0x5c270
movq -0x228(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x5a710
movq %rax, -0x220(%rbp)
jmp 0xee890
movq -0x220(%rbp), %rsi
movq -0x168(%rbp), %rdi
callq 0x59760
jmp 0xee8a5
leaq -0x138(%rbp), %rdi
callq 0x5df00
jmp 0xee8d0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x138(%rbp), %rdi
callq 0x5df00
jmp 0xee9df
jmp 0xee8d2
jmp 0xee8d4
jmp 0xee8d6
jmp 0xee8d8
movq -0x168(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0x5b410
movq %rax, -0x140(%rbp)
cmpq $0x0, -0x140(%rbp)
je 0xee912
movq -0x140(%rbp), %rdi
leaq 0x11e091(%rip), %rsi    # 0x20c998
callq 0x5ad00
cmpq $0x0, %rax
jne 0xee97b
movq -0x168(%rbp), %rdi
callq 0x5a110
leaq -0x150(%rbp), %rdi
movq %rdi, -0x238(%rbp)
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x5a9c0
movq -0x238(%rbp), %rdi
callq 0x59680
movl %eax, -0x22c(%rbp)
jmp 0xee94a
movl -0x22c(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0x150(%rbp), %rdi
callq 0x5b5b0
jmp 0xee9d3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x150(%rbp), %rdi
callq 0x5b5b0
jmp 0xee9df
leaq -0x160(%rbp), %rdi
movq %rdi, -0x248(%rbp)
callq 0x5ca80
movq -0x248(%rbp), %rdi
callq 0x59680
movl %eax, -0x23c(%rbp)
jmp 0xee9a2
movl -0x23c(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0x160(%rbp), %rdi
callq 0x5a410
jmp 0xee9d3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x160(%rbp), %rdi
callq 0x5a410
jmp 0xee9df
movl -0x4(%rbp), %eax
addq $0x250, %rsp            # imm = 0x250
popq %rbp
retq
movq -0x28(%rbp), %rdi
callq 0x5b6b0
nopl (%rax,%rax)