// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/classes/system/dynamicloader.cpp
// Function: smooth::System::DynamicLoader::GetLibraryDirectories()
const S::Array<S::String> &S::System::DynamicLoader::GetLibraryDirectories()
{
	static Array<String>	 directories;

#ifndef __WIN32__
	if (directories.Length() == 0)
	{
		/* Look for /usr/lib and /usr/local/lib on all systems.
		 */
		if (Directory("/usr/lib").Exists())	    directories.Add("/usr/lib");
		if (Directory("/usr/local/lib").Exists())   directories.Add("/usr/local/lib");

#if defined __APPLE__
		/* Look for library directories of ports projects.
		 */
		if (Directory("/opt/local/lib").Exists())   directories.Add("/opt/local/lib");
		if (Directory("/sw/lib").Exists())	    directories.Add("/sw/lib");
#elif defined __linux__
		/* Query X11 library path to handle architecture-specific library paths on Linux.
		 */
		Dl_info	 info = { 0 };

		dladdr((void *) &X11::XOpenDisplay, &info);

		const String	 libraryPath = File(info.dli_fname).GetFilePath();

		directories.Add(libraryPath);
#elif defined __HAIKU__
		/* Query smooth library path to handle architecture suffix on Haiku.
		 */
		Dl_info	 info = { 0 };

		dladdr((void *) &S::System::DynamicLoader::GetLibraryDirectories, &info);

		const String	 libraryPath = File(info.dli_fname).GetFilePath();

		directories.Add(libraryPath);

		if	(libraryPath.Contains("/system/non-packaged/")) directories.Add(libraryPath.Replace("/system/non-packaged/", "/system/"));
		else if (libraryPath.Contains("/system/"))		directories.Add(libraryPath.Replace("/system/", "/system/non-packaged/"));
#elif defined __NetBSD__
		/* Packages live in /usr/pkg on NetBSD.
		 */
		if (Directory("/usr/pkg/lib").Exists())	    directories.Add("/usr/pkg/lib");
#endif

		/* Parse /etc/ld.so.conf if it exists.
		 */
		if (File("/etc/ld.so.conf").Exists())	    ParseDirectoryList("/etc/ld.so.conf", directories);

		/* Parse LD_LIBRARY_PATH environment variable.
		 */
		const Array<String>	&paths = String(getenv("LD_LIBRARY_PATH")).Explode(":");

		foreach (const String &path, paths) if (Directory(path).Exists()) directories.Add(path);
	}
#endif

	return directories;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x570, %rsp            # imm = 0x570
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x520(%rbp)
cmpb $0x0, 0x10c0cf(%rip)    # 0x213bf0
jne 0x107b68
leaq 0x10c0c6(%rip), %rdi    # 0x213bf0
callq 0x5a4e0
cmpl $0x0, %eax
je 0x107b68
leaq 0x10c05d(%rip), %rdi    # 0x213b98
callq 0x74650
jmp 0x107b42
leaq -0x934b9(%rip), %rdi    # 0x74690
leaq 0x10c048(%rip), %rsi    # 0x213b98
leaq 0x103ba9(%rip), %rdx    # 0x20b700
callq 0x5c700
leaq 0x10c08d(%rip), %rdi    # 0x213bf0
callq 0x5b0c0
leaq 0x10c029(%rip), %rdi    # 0x213b98
callq 0x5c990
cmpl $0x0, %eax
jne 0x1082ec
leaq 0x9e280(%rip), %rsi     # 0x1a5e04
leaq -0x110(%rbp), %rdi
callq 0x5c1f0
leaq -0x128(%rbp), %rdi
xorl %esi, %esi
callq 0x5da90
jmp 0x107ba0
leaq -0xf8(%rbp), %rdi
leaq -0x110(%rbp), %rsi
leaq -0x128(%rbp), %rdx
callq 0x5d860
jmp 0x107bbc
leaq -0xf8(%rbp), %rdi
callq 0x59570
movb %al, -0x521(%rbp)
jmp 0x107bd0
leaq -0xf8(%rbp), %rdi
callq 0x5df10
leaq -0x128(%rbp), %rdi
callq 0x5df00
leaq -0x110(%rbp), %rdi
callq 0x5df00
movb -0x521(%rbp), %al
testb $0x1, %al
jne 0x107c03
jmp 0x107cce
leaq 0x9e1fa(%rip), %rsi     # 0x1a5e04
leaq -0x140(%rbp), %rdi
movq %rdi, -0x530(%rbp)
callq 0x5c1f0
movq -0x530(%rbp), %rsi
leaq 0x10bf6d(%rip), %rdi    # 0x213b98
callq 0x74750
jmp 0x107c32
leaq -0x140(%rbp), %rdi
callq 0x5df00
jmp 0x107cce
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
leaq 0x10bf9a(%rip), %rdi    # 0x213bf0
callq 0x5a860
jmp 0x1082fc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0x107ca0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0x107c94
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
leaq -0xf8(%rbp), %rdi
callq 0x5df10
leaq -0x128(%rbp), %rdi
callq 0x5df00
leaq -0x110(%rbp), %rdi
callq 0x5df00
jmp 0x1082fc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
leaq -0x140(%rbp), %rdi
callq 0x5df00
jmp 0x1082fc
leaq 0x9e138(%rip), %rsi     # 0x1a5e0d
leaq -0x238(%rbp), %rdi
callq 0x5c1f0
leaq -0x250(%rbp), %rdi
xorl %esi, %esi
callq 0x5da90
jmp 0x107cf1
leaq -0x220(%rbp), %rdi
leaq -0x238(%rbp), %rsi
leaq -0x250(%rbp), %rdx
callq 0x5d860
jmp 0x107d0d
leaq -0x220(%rbp), %rdi
callq 0x59570
movb %al, -0x531(%rbp)
jmp 0x107d21
leaq -0x220(%rbp), %rdi
callq 0x5df10
leaq -0x250(%rbp), %rdi
callq 0x5df00
leaq -0x238(%rbp), %rdi
callq 0x5df00
movb -0x531(%rbp), %al
testb $0x1, %al
jne 0x107d54
jmp 0x107dff
leaq 0x9e0b2(%rip), %rsi     # 0x1a5e0d
leaq -0x268(%rbp), %rdi
movq %rdi, -0x540(%rbp)
callq 0x5c1f0
movq -0x540(%rbp), %rsi
leaq 0x10be1c(%rip), %rdi    # 0x213b98
callq 0x74750
jmp 0x107d83
leaq -0x268(%rbp), %rdi
callq 0x5df00
jmp 0x107dff
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0x107dd1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0x107dc5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
leaq -0x220(%rbp), %rdi
callq 0x5df10
leaq -0x250(%rbp), %rdi
callq 0x5df00
leaq -0x238(%rbp), %rdi
callq 0x5df00
jmp 0x1082fc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
leaq -0x268(%rbp), %rdi
callq 0x5df00
jmp 0x1082fc
xorps %xmm0, %xmm0
movaps %xmm0, -0x280(%rbp)
movaps %xmm0, -0x290(%rbp)
movq 0x100749(%rip), %rdi    # 0x208560
leaq -0x290(%rbp), %rsi
callq 0x5cc40
movq -0x290(%rbp), %rsi
leaq -0x2f0(%rbp), %rdi
callq 0x5c1f0
leaq -0x308(%rbp), %rdi
xorl %esi, %esi
callq 0x5da90
jmp 0x107e46
leaq -0x2d8(%rbp), %rdi
leaq -0x2f0(%rbp), %rsi
leaq -0x308(%rbp), %rdx
callq 0x5acf0
jmp 0x107e62
leaq -0x2d8(%rbp), %rdi
callq 0x5ca70
movq %rax, -0x548(%rbp)
jmp 0x107e77
movq -0x548(%rbp), %rsi
leaq -0x2a8(%rbp), %rdi
callq 0x5b6d0
jmp 0x107e8c
leaq -0x2d8(%rbp), %rdi
callq 0x5de78
leaq -0x308(%rbp), %rdi
callq 0x5df00
leaq -0x2f0(%rbp), %rdi
callq 0x5df00
leaq 0x10bce1(%rip), %rdi    # 0x213b98
leaq -0x2a8(%rbp), %rsi
callq 0x74750
jmp 0x107ec5
leaq 0x9df50(%rip), %rsi     # 0x1a5e1c
leaq -0x350(%rbp), %rdi
callq 0x5c1f0
jmp 0x107eda
leaq -0x368(%rbp), %rdi
xorl %esi, %esi
callq 0x5da90
jmp 0x107eea
leaq -0x338(%rbp), %rdi
leaq -0x350(%rbp), %rsi
leaq -0x368(%rbp), %rdx
callq 0x5acf0
jmp 0x107f06
leaq -0x338(%rbp), %rdi
callq 0x5b4b0
movb %al, -0x549(%rbp)
jmp 0x107f1a
leaq -0x338(%rbp), %rdi
callq 0x5de78
leaq -0x368(%rbp), %rdi
callq 0x5df00
leaq -0x350(%rbp), %rdi
callq 0x5df00
movb -0x549(%rbp), %al
testb $0x1, %al
jne 0x107f4d
jmp 0x10805f
leaq 0x9dec8(%rip), %rsi     # 0x1a5e1c
leaq -0x380(%rbp), %rdi
callq 0x5c1f0
jmp 0x107f62
movq -0x520(%rbp), %rdi
leaq 0x10bc28(%rip), %rdx    # 0x213b98
leaq -0x380(%rbp), %rsi
callq 0x5a570
jmp 0x107f7e
leaq -0x380(%rbp), %rdi
callq 0x5df00
jmp 0x10805f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0x107fcf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0x107fc3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
leaq -0x2d8(%rbp), %rdi
callq 0x5de78
leaq -0x308(%rbp), %rdi
callq 0x5df00
leaq -0x2f0(%rbp), %rdi
callq 0x5df00
jmp 0x1082fc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0x1082de
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0x108031
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0x108025
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
leaq -0x338(%rbp), %rdi
callq 0x5de78
leaq -0x368(%rbp), %rdi
callq 0x5df00
leaq -0x350(%rbp), %rdi
callq 0x5df00
jmp 0x1082de
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
leaq -0x380(%rbp), %rdi
callq 0x5df00
jmp 0x1082de
leaq 0x9ddc6(%rip), %rdi     # 0x1a5e2c
callq 0x5bea0
movq %rax, %rsi
leaq -0x3f8(%rbp), %rdi
callq 0x5c1f0
jmp 0x10807c
leaq 0x7f04b(%rip), %rsi     # 0x1870ce
leaq -0x410(%rbp), %rdi
callq 0x5c1f0
jmp 0x108091
leaq -0x3e0(%rbp), %rdi
leaq -0x3f8(%rbp), %rsi
leaq -0x410(%rbp), %rdx
callq 0x5c820
jmp 0x1080ad
leaq -0x410(%rbp), %rdi
callq 0x5df00
leaq -0x3f8(%rbp), %rdi
callq 0x5df00
leaq -0x3e0(%rbp), %rax
movq %rax, -0x388(%rbp)
movl $0x0, -0x414(%rbp)
movl $0xffffffff, -0x418(%rbp) # imm = 0xFFFFFFFF
xorl %eax, %eax
cmpl $0x0, -0x414(%rbp)
movb %al, -0x54a(%rbp)
jne 0x108132
movl -0x418(%rbp), %eax
movl %eax, -0x554(%rbp)
movq -0x388(%rbp), %rdi
callq 0x5c990
movl %eax, -0x550(%rbp)
jmp 0x108118
movl -0x554(%rbp), %eax
movl -0x550(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
setl %al
movb %al, -0x54a(%rbp)
movb -0x54a(%rbp), %al
testb $0x1, %al
jne 0x108141
jmp 0x1082b8
movq -0x388(%rbp), %rdi
movl -0x418(%rbp), %esi
incl %esi
movl %esi, -0x418(%rbp)
callq 0x74720
movq %rax, -0x560(%rbp)
jmp 0x108164
movq -0x560(%rbp), %rax
movq %rax, -0x420(%rbp)
cmpl $0x0, -0x414(%rbp)
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x108187
jmp 0x1082a2
movq -0x420(%rbp), %rax
movq %rax, -0x568(%rbp)
leaq -0x518(%rbp), %rdi
xorl %esi, %esi
callq 0x5da90
jmp 0x1081a5
movq -0x568(%rbp), %rsi
leaq -0x500(%rbp), %rdi
leaq -0x518(%rbp), %rdx
callq 0x5d860
jmp 0x1081c1
leaq -0x500(%rbp), %rdi
callq 0x59570
movb %al, -0x569(%rbp)
jmp 0x1081d5
leaq -0x500(%rbp), %rdi
callq 0x5df10
leaq -0x518(%rbp), %rdi
callq 0x5df00
movb -0x569(%rbp), %al
testb $0x1, %al
jne 0x1081fc
jmp 0x10828c
movq -0x420(%rbp), %rsi
leaq 0x10b98e(%rip), %rdi    # 0x213b98
callq 0x74750
jmp 0x108211
jmp 0x10828c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0x108239
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
leaq -0x410(%rbp), %rdi
callq 0x5df00
leaq -0x3f8(%rbp), %rdi
callq 0x5df00
jmp 0x1082de
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0x1082d2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0x10827e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
leaq -0x500(%rbp), %rdi
callq 0x5df10
leaq -0x518(%rbp), %rdi
callq 0x5df00
jmp 0x1082d2
jmp 0x10828e
movl -0x414(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x414(%rbp)
jmp 0x108172
jmp 0x1082a4
movl -0x414(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x414(%rbp)
jmp 0x1080e7
leaq -0x3e0(%rbp), %rdi
callq 0x74690
leaq -0x2a8(%rbp), %rdi
callq 0x5df00
jmp 0x1082ec
leaq -0x3e0(%rbp), %rdi
callq 0x74690
leaq -0x2a8(%rbp), %rdi
callq 0x5df00
jmp 0x1082fc
leaq 0x10b8a5(%rip), %rax    # 0x213b98
addq $0x570, %rsp            # imm = 0x570
popq %rbp
retq
movq -0x10(%rbp), %rdi
callq 0x5b6b0
nopw %cs:(%rax,%rax)