// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/classes/system/system.cpp
// Function: smooth::System::System::GetResourcesDirectory()
S::String S::System::System::GetResourcesDirectory()
{
	static String	 resourcesDir;

	if (resourcesDir != NIL) return resourcesDir;

	resourcesDir = GUI::Application::GetApplicationDirectory();

#if !defined __WIN32__
	resourcesDir[resourcesDir.Length() - 1]					    = 0;
	resourcesDir[resourcesDir.FindLast(Directory::GetDirectoryDelimiter()) + 1] = 0;

#if defined __HAIKU__
	resourcesDir.Append("data");
#else
	resourcesDir.Append("share");
#endif

	if (!Directory(resourcesDir).Exists()) resourcesDir = GUI::Application::GetApplicationDirectory();
#endif

	if (!resourcesDir.EndsWith(Directory::GetDirectoryDelimiter())) resourcesDir.Append(Directory::GetDirectoryDelimiter());
	if ( resourcesDir == Directory::GetDirectoryDelimiter())	resourcesDir = NIL;

	return resourcesDir;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x220, %rsp            # imm = 0x220
movq %rdi, -0x1b0(%rbp)
movq %rdi, %rax
movq %rax, -0x1a8(%rbp)
movq %rdi, -0x8(%rbp)
cmpb $0x0, 0x1090a9(%rip)    # 0x213da0
jne 0x10ad40
leaq 0x1090a0(%rip), %rdi    # 0x213da0
callq 0x5a4e0
cmpl $0x0, %eax
je 0x10ad40
leaq 0x109077(%rip), %rdi    # 0x213d88
xorl %esi, %esi
callq 0x5da90
jmp 0x10ad1a
movq 0xfe207(%rip), %rdi     # 0x208f28
leaq 0x109060(%rip), %rsi    # 0x213d88
leaq 0x1009d1(%rip), %rdx    # 0x20b700
callq 0x5c700
leaq 0x109065(%rip), %rdi    # 0x213da0
callq 0x5b0c0
leaq 0x109041(%rip), %rdi    # 0x213d88
xorl %esi, %esi
callq 0x5b110
testb $0x1, %al
jne 0x10ad54
jmp 0x10ad89
movq -0x1b0(%rbp), %rdi
leaq 0x109026(%rip), %rsi    # 0x213d88
callq 0x5b6d0
jmp 0x10b0d9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
leaq 0x109021(%rip), %rdi    # 0x213da0
callq 0x5a860
jmp 0x10b0e9
leaq -0x30(%rbp), %rdi
movq %rdi, -0x1b8(%rbp)
callq 0x5c270
movq -0x1b8(%rbp), %rsi
leaq 0x108fe1(%rip), %rdi    # 0x213d88
callq 0x59760
jmp 0x10adae
leaq -0x30(%rbp), %rdi
callq 0x5df00
leaq 0x108fca(%rip), %rdi    # 0x213d88
movq %rdi, -0x1d0(%rbp)
callq 0x5b800
movq -0x1d0(%rbp), %rdi
movl %eax, %esi
decl %esi
callq 0x5d4e0
movl $0x0, (%rax)
callq 0x59460
movq %rax, %rsi
leaq -0x48(%rbp), %rdi
movq %rdi, -0x1c8(%rbp)
callq 0x5c1f0
movq -0x1d0(%rbp), %rdi
movq -0x1c8(%rbp), %rsi
callq 0x5d590
movl %eax, -0x1bc(%rbp)
jmp 0x10ae13
movl -0x1bc(%rbp), %esi
incl %esi
leaq 0x108f66(%rip), %rdi    # 0x213d88
callq 0x5d4e0
movq %rax, -0x1d8(%rbp)
jmp 0x10ae30
movq -0x1d8(%rbp), %rax
movl $0x0, (%rax)
leaq -0x48(%rbp), %rdi
callq 0x5df00
leaq 0x9b3a3(%rip), %rsi     # 0x1a61f0
leaq -0x60(%rbp), %rdi
movq %rdi, -0x1e0(%rbp)
callq 0x5c1f0
movq -0x1e0(%rbp), %rsi
leaq 0x108f1d(%rip), %rdi    # 0x213d88
callq 0x5a710
jmp 0x10ae72
leaq -0x60(%rbp), %rdi
callq 0x5df00
leaq -0x158(%rbp), %rdi
movq %rdi, -0x1e8(%rbp)
xorl %esi, %esi
callq 0x5da90
movq -0x1e8(%rbp), %rdx
leaq 0x108eea(%rip), %rsi    # 0x213d88
leaq -0x140(%rbp), %rdi
callq 0x5d860
jmp 0x10aeac
leaq -0x140(%rbp), %rdi
callq 0x59570
movb %al, -0x1e9(%rbp)
jmp 0x10aec0
movb -0x1e9(%rbp), %al
xorb $-0x1, %al
movb %al, -0x1ea(%rbp)
leaq -0x140(%rbp), %rdi
callq 0x5df10
leaq -0x158(%rbp), %rdi
callq 0x5df00
movb -0x1ea(%rbp), %al
testb $0x1, %al
jne 0x10aef5
jmp 0x10afd0
leaq -0x170(%rbp), %rdi
movq %rdi, -0x1f8(%rbp)
callq 0x5c270
movq -0x1f8(%rbp), %rsi
leaq 0x108e72(%rip), %rdi    # 0x213d88
callq 0x59760
jmp 0x10af1d
leaq -0x170(%rbp), %rdi
callq 0x5df00
jmp 0x10afd0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x5df00
jmp 0x10b0e9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x5df00
jmp 0x10b0e9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x5df00
jmp 0x10b0e9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0x10afa2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
leaq -0x140(%rbp), %rdi
callq 0x5df10
leaq -0x158(%rbp), %rdi
callq 0x5df00
jmp 0x10b0e9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
leaq -0x170(%rbp), %rdi
callq 0x5df00
jmp 0x10b0e9
callq 0x59460
movq %rax, %rsi
leaq -0x188(%rbp), %rdi
movq %rdi, -0x208(%rbp)
callq 0x5c1f0
movq -0x208(%rbp), %rsi
leaq 0x108d8f(%rip), %rdi    # 0x213d88
callq 0x5d6c0
movb %al, -0x1f9(%rbp)
jmp 0x10b006
movb -0x1f9(%rbp), %al
xorb $-0x1, %al
movb %al, -0x209(%rbp)
leaq -0x188(%rbp), %rdi
callq 0x5df00
movb -0x209(%rbp), %al
testb $0x1, %al
jne 0x10b02c
jmp 0x10b09e
callq 0x59460
movq %rax, %rsi
leaq -0x1a0(%rbp), %rdi
movq %rdi, -0x218(%rbp)
callq 0x5c1f0
movq -0x218(%rbp), %rsi
leaq 0x108d33(%rip), %rdi    # 0x213d88
callq 0x5a710
jmp 0x10b05c
leaq -0x1a0(%rbp), %rdi
callq 0x5df00
jmp 0x10b09e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
leaq -0x188(%rbp), %rdi
callq 0x5df00
jmp 0x10b0e9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
leaq -0x1a0(%rbp), %rdi
callq 0x5df00
jmp 0x10b0e9
callq 0x59460
movq %rax, %rsi
leaq 0x108cdb(%rip), %rdi    # 0x213d88
callq 0x5c7f0
testb $0x1, %al
jne 0x10b0b8
jmp 0x10b0c6
leaq 0x108cc9(%rip), %rdi    # 0x213d88
xorl %esi, %esi
callq 0x5c1e0
movq -0x1b0(%rbp), %rdi
leaq 0x108cb4(%rip), %rsi    # 0x213d88
callq 0x5b6d0
movq -0x1a8(%rbp), %rax
addq $0x220, %rsp            # imm = 0x220
popq %rbp
retq
movq -0x10(%rbp), %rdi
callq 0x5b6b0
nopw %cs:(%rax,%rax)