// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/system/dynamicloader.cpp
// Function: smooth::System::DynamicLoader::DynamicLoader(smooth::String const&)
S::System::DynamicLoader::DynamicLoader(const String &module) : handle(NIL)
{
#if defined __WIN32__
	static String	 dllExt		= ".dll";
	static String	 versionPattern	= dllExt;
#elif defined __APPLE__
	static String	 dllExt		= ".dylib";
	static String	 versionPattern	= String(".*").Append(dllExt);
#else
	static String	 dllExt		= ".so";
	static String	 versionPattern	= String(dllExt).Append(".*");
#endif

#ifdef __WIN32__
	if (module[1] != ':')
	{
		/* Try the supplied module name in application directory.
		 */
		handle = LoadLibrary(GUI::Application::GetApplicationDirectory().Append(module).Append(module.EndsWith(dllExt) ? String() : dllExt));
	}

	if (handle == NIL)
	{
		/* Try the supplied module name system wide.
		 */
		handle = LoadLibrary(String(module).Append(module.EndsWith(dllExt) ? String() : dllExt));
	}
#else
	Int	 dlopenFlags = RTLD_NOW | RTLD_LOCAL;

#if defined __FreeBSD__ || defined __NetBSD__
	dlopenFlags |= RTLD_NODELETE;
#endif

	if (!module.StartsWith("/"))
	{
		/* Try the supplied module name in application directory.
		 */
		handle = dlopen(GUI::Application::GetApplicationDirectory().Append(module).Append(module.EndsWith(dllExt) || module.Contains(String(dllExt).Append(".")) ? String() : dllExt), dlopenFlags);
	}

	if (handle == NIL)
	{
		/* Try the supplied module name system wide.
		 */
		handle = dlopen(String(module).Append(module.EndsWith(dllExt) || module.Contains(String(dllExt).Append(".")) ? String() : dllExt), dlopenFlags);
	}

	if (handle == NIL)
	{
		const Array<String> &directories = GetLibraryDirectories();

		/* Try loading an unversioned library.
		 */
		foreach (const String &path, directories)
		{
			Directory		 directory(path);
			const Array<File>	&files = directory.GetFilesByPattern(String(module.StartsWith("lib") || module.Contains("/") ? String() : "lib").Append(module).Append(module.EndsWith(dllExt) || module.Contains(String(dllExt).Append(".")) ? String() : dllExt));

			if (files.Length() > 0)
			{
				handle = dlopen((String) files.GetFirst(), dlopenFlags);
			}

			if (handle != NIL) return;
		}

		/* Try loading a versioned library.
		 */
		foreach (const String &path, directories)
		{
			Directory		 directory(path);
			const Array<File>	&files = directory.GetFilesByPattern(String(module.StartsWith("lib") || module.Contains("/") ? String() : "lib").Append(module).Append(module.EndsWith(dllExt) || module.Contains(String(dllExt).Append(".")) ? String() : versionPattern));

			if (files.Length() > 0)
			{
				handle = dlopen((String) files.GetFirst(), dlopenFlags);
			}

			if (handle != NIL) return;
		}
	}
#endif
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x238, %rsp            # imm = 0x238
movq %rsi, %r14
movq %rdi, %rbx
callq 0x58020
movq 0xb6b39(%rip), %rax     # 0x1617b0
addq $0x10, %rax
movq %rax, (%rbx)
movq %rbx, 0x8(%rsp)
andq $0x0, 0x38(%rbx)
movb 0xc1452(%rip), %al      # 0x16c0e0
testb %al, %al
movq %r14, 0x10(%rsp)
je 0xab3b2
movb 0xc145f(%rip), %al      # 0x16c100
testb %al, %al
je 0xab409
leaq 0x389f8(%rip), %rsi     # 0xe36a8
leaq 0x158(%rsp), %rdi
callq 0x58c40
leaq 0x158(%rsp), %rsi
movq %r14, %rdi
callq 0x58a10
movl %eax, %ebx
leaq 0x158(%rsp), %rdi
callq 0x5a588
testb %bl, %bl
jne 0xaade7
leaq 0x158(%rsp), %rdi
callq 0x58cb0
leaq 0x158(%rsp), %rdi
movq %r14, %rsi
callq 0x573e0
movq %rax, %r15
leaq 0xc13bd(%rip), %rsi     # 0x16c0c8
movq %r14, %rdi
callq 0x59e50
movl %eax, %ebx
testb %al, %al
jne 0xaad65
leaq 0xc13a8(%rip), %rsi     # 0x16c0c8
leaq 0xf8(%rsp), %rdi
callq 0x58280
leaq 0x6e67f(%rip), %rsi     # 0x1193b3
leaq 0xe0(%rsp), %rdi
callq 0x58c40
leaq 0xf8(%rsp), %rdi
leaq 0xe0(%rsp), %rsi
callq 0x573e0
movq %r14, %rdi
movq %rax, %rsi
callq 0x56180
testb %al, %al
je 0xaad76
leaq 0x18(%rsp), %rdi
xorl %esi, %esi
callq 0x5a180
xorb $0x1, %bl
jmp 0xaad89
movb $0x1, %bl
leaq 0xc1349(%rip), %rsi     # 0x16c0c8
leaq 0x18(%rsp), %rdi
callq 0x58280
leaq 0x18(%rsp), %rsi
movq %r15, %rdi
callq 0x573e0
movq %rax, %rdi
callq 0x598d0
pushq $0x2
popq %rsi
movq %rax, %rdi
callq 0x58f70
movq 0x8(%rsp), %rcx
movq %rax, 0x38(%rcx)
leaq 0x18(%rsp), %rdi
callq 0x5a588
testb %bl, %bl
je 0xaadda
leaq 0xe0(%rsp), %rdi
callq 0x5a588
leaq 0xf8(%rsp), %rdi
callq 0x5a588
leaq 0x158(%rsp), %rdi
callq 0x5a588
movq 0x8(%rsp), %rax
cmpq $0x0, 0x38(%rax)
jne 0xab15f
leaq 0x158(%rsp), %rdi
movq 0x10(%rsp), %r14
movq %r14, %rsi
callq 0x58280
leaq 0xc12b5(%rip), %rsi     # 0x16c0c8
movq %r14, %rdi
callq 0x59e50
movl %eax, %ebx
testb %al, %al
jne 0xaae6d
leaq 0xc12a0(%rip), %rsi     # 0x16c0c8
leaq 0xc8(%rsp), %rdi
callq 0x58280
leaq 0x6e577(%rip), %rsi     # 0x1193b3
leaq 0xb0(%rsp), %rdi
callq 0x58c40
leaq 0xc8(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
callq 0x573e0
movq %r14, %rdi
movq %rax, %rsi
callq 0x56180
testb %al, %al
je 0xaae7e
leaq 0x18(%rsp), %rdi
xorl %esi, %esi
callq 0x5a180
xorb $0x1, %bl
jmp 0xaae91
movb $0x1, %bl
leaq 0xc1241(%rip), %rsi     # 0x16c0c8
leaq 0x18(%rsp), %rdi
callq 0x58280
leaq 0x158(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x573e0
movq %rax, %rdi
callq 0x598d0
pushq $0x2
popq %rsi
movq %rax, %rdi
callq 0x58f70
movq 0x8(%rsp), %rcx
movq %rax, 0x38(%rcx)
leaq 0x18(%rsp), %rdi
callq 0x5a588
testb %bl, %bl
je 0xaaee7
leaq 0xb0(%rsp), %rdi
callq 0x5a588
leaq 0xc8(%rsp), %rdi
callq 0x5a588
leaq 0x158(%rsp), %rdi
callq 0x5a588
movq 0x8(%rsp), %rax
cmpq $0x0, 0x38(%rax)
jne 0xab15f
movq 0x8(%rsp), %rdi
callq 0x566d0
pushq $-0x1
popq %rcx
xorl %eax, %eax
leaq 0x18(%rsp), %r12
leaq 0x68(%rsp), %r13
movl %ecx, 0x4(%rsp)
testl %eax, %eax
movl 0x4(%rsp), %esi
jne 0xab171
movl 0xc11dd(%rip), %eax     # 0x16c110
decl %eax
cmpl %eax, %esi
jge 0xab171
incl %esi
leaq 0xc11c2(%rip), %rdi     # 0x16c108
movl %esi, 0x4(%rsp)
callq 0x64d9c
movq %rax, 0x30(%rsp)
movb $0x1, %cl
pushq $-0x1
popq %rax
testb $0x1, %cl
je 0xaaf21
movq %r12, %rdi
xorl %esi, %esi
callq 0x5a180
leaq 0x158(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq %r12, %rdx
callq 0x59fb0
movq %r12, %rdi
callq 0x5a588
movq %r13, %rdi
leaq 0x57469(%rip), %rsi     # 0x1023f8
callq 0x58c40
movq 0x10(%rsp), %rdi
movq %r13, %rbx
movq %r13, %rsi
callq 0x58a10
movl %eax, %ebp
testb %al, %al
movq 0x10(%rsp), %r14
jne 0xaafd5
leaq 0x140(%rsp), %r15
movq %r15, %rdi
leaq 0x386e7(%rip), %rsi     # 0xe36a8
callq 0x58c40
movq %r14, %rdi
movq %r15, %rsi
callq 0x56180
testb %al, %al
je 0xaafe5
movq %r12, %rdi
xorl %esi, %esi
callq 0x5a180
xorb $0x1, %bpl
jmp 0xaaff7
movb $0x1, %bpl
movq %r12, %rdi
leaq 0x57406(%rip), %rsi     # 0x1023f8
callq 0x58c40
movq %r12, %rdi
movq %r14, %rsi
callq 0x573e0
movq %rax, %r15
movq %r14, %rdi
leaq 0xc10b9(%rip), %rsi     # 0x16c0c8
callq 0x59e50
movl %eax, %r13d
testb %al, %al
jne 0xab067
leaq 0x98(%rsp), %rdi
leaq 0xc109e(%rip), %rsi     # 0x16c0c8
callq 0x58280
leaq 0x128(%rsp), %r14
movq %r14, %rdi
leaq 0x6e372(%rip), %rsi     # 0x1193b3
callq 0x58c40
leaq 0x98(%rsp), %rdi
movq %r14, %rsi
callq 0x573e0
movq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0x56180
testb %al, %al
je 0xab079
leaq 0x38(%rsp), %rdi
xorl %esi, %esi
callq 0x5a180
xorb $0x1, %r13b
jmp 0xab08d
movb $0x1, %r13b
leaq 0x38(%rsp), %rdi
leaq 0xc1040(%rip), %rsi     # 0x16c0c8
callq 0x58280
movq %r15, %rdi
leaq 0x38(%rsp), %rsi
callq 0x573e0
leaq 0x158(%rsp), %rdi
movq %rax, %rsi
callq 0x57ec0
movq %rax, %r15
leaq 0x38(%rsp), %rdi
callq 0x5a588
testb %r13b, %r13b
je 0xab0d6
leaq 0x128(%rsp), %rdi
callq 0x5a588
leaq 0x98(%rsp), %rdi
callq 0x5a588
movq %r12, %rdi
callq 0x5a588
testb %bpl, %bpl
je 0xab0f0
leaq 0x140(%rsp), %rdi
callq 0x5a588
movq %rbx, %r13
movq %rbx, %rdi
callq 0x5a588
cmpl $0x0, 0x8(%r15)
jle 0xab139
movq %r15, %rdi
callq 0xabf8c
movq %r12, %rdi
movq %rax, %rsi
callq 0x5a310
movq %r12, %rdi
callq 0x598d0
movq %rax, %rdi
pushq $0x2
popq %rsi
callq 0x58f70
movq 0x8(%rsp), %rcx
movq %rax, 0x38(%rcx)
movq %r12, %rdi
callq 0x5a588
movq 0x8(%rsp), %rax
movq 0x38(%rax), %r15
leaq 0x158(%rsp), %rdi
callq 0x5a598
xorl %ecx, %ecx
movl $0x0, %eax
testq %r15, %r15
je 0xaaf59
addq $0x238, %rsp            # imm = 0x238
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $-0x1
popq %rcx
xorl %eax, %eax
leaq 0x18(%rsp), %r12
movl %ecx, 0x4(%rsp)
movq 0x10(%rsp), %r14
testl %eax, %eax
jne 0xab15f
movl 0xc0f82(%rip), %eax     # 0x16c110
decl %eax
cmpl %eax, 0x4(%rsp)
jge 0xab15f
movl 0x4(%rsp), %esi
incl %esi
leaq 0xc0f65(%rip), %rdi     # 0x16c108
movl %esi, 0x4(%rsp)
callq 0x64d9c
movq %rax, 0x30(%rsp)
movb $0x1, %cl
pushq $-0x1
popq %rax
testb $0x1, %cl
je 0xab184
movq %r12, %rdi
xorl %esi, %esi
callq 0x5a180
leaq 0x68(%rsp), %rbx
leaq 0x158(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq %r12, %rdx
callq 0x59fb0
movq %r12, %rdi
callq 0x5a588
movq %rbx, %rdi
leaq 0x57207(%rip), %rsi     # 0x1023f8
callq 0x58c40
movq %r14, %rdi
movq %rbx, %rsi
callq 0x58a10
movl %eax, %ebx
testb %al, %al
jne 0xab22a
leaq 0x38(%rsp), %r15
movq %r15, %rdi
leaq 0x38492(%rip), %rsi     # 0xe36a8
callq 0x58c40
movq %r14, %rdi
movq %r15, %rsi
callq 0x56180
testb %al, %al
je 0xab239
movq %r12, %rdi
xorl %esi, %esi
callq 0x5a180
xorb $0x1, %bl
jmp 0xab24a
movb $0x1, %bl
movq %r12, %rdi
leaq 0x571b3(%rip), %rsi     # 0x1023f8
callq 0x58c40
movq %r12, %rdi
movq %r14, %rsi
callq 0x573e0
movq %rax, %r15
movq %r14, %rdi
leaq 0xc0e66(%rip), %rsi     # 0x16c0c8
callq 0x59e50
movl %eax, %r13d
testb %al, %al
jne 0xab2ba
leaq 0x80(%rsp), %rdi
leaq 0xc0e4b(%rip), %rsi     # 0x16c0c8
callq 0x58280
leaq 0x110(%rsp), %rbp
movq %rbp, %rdi
leaq 0x6e11f(%rip), %rsi     # 0x1193b3
callq 0x58c40
leaq 0x80(%rsp), %rdi
movq %rbp, %rsi
callq 0x573e0
movq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0x56180
testb %al, %al
je 0xab2cc
leaq 0x50(%rsp), %rdi
xorl %esi, %esi
callq 0x5a180
xorb $0x1, %r13b
jmp 0xab2e0
movb $0x1, %r13b
leaq 0x50(%rsp), %rdi
leaq 0xc0e0d(%rip), %rsi     # 0x16c0e8
callq 0x58280
movq %r15, %rdi
leaq 0x50(%rsp), %rsi
callq 0x573e0
leaq 0x158(%rsp), %rdi
movq %rax, %rsi
callq 0x57ec0
movq %rax, %r15
leaq 0x50(%rsp), %rdi
callq 0x5a588
testb %r13b, %r13b
je 0xab329
leaq 0x110(%rsp), %rdi
callq 0x5a588
leaq 0x80(%rsp), %rdi
callq 0x5a588
movq %r12, %rdi
callq 0x5a588
testb %bl, %bl
je 0xab33f
leaq 0x38(%rsp), %rdi
callq 0x5a588
leaq 0x68(%rsp), %rdi
callq 0x5a588
cmpl $0x0, 0x8(%r15)
jle 0xab387
movq %r15, %rdi
callq 0xabf8c
movq %r12, %rdi
movq %rax, %rsi
callq 0x5a310
movq %r12, %rdi
callq 0x598d0
movq %rax, %rdi
pushq $0x2
popq %rsi
callq 0x58f70
movq 0x8(%rsp), %rcx
movq %rax, 0x38(%rcx)
movq %r12, %rdi
callq 0x5a588
movq 0x8(%rsp), %rax
movq 0x38(%rax), %rbx
leaq 0x158(%rsp), %rdi
callq 0x5a598
xorl %ecx, %ecx
movl $0x0, %eax
testq %rbx, %rbx
je 0xab1b6
jmp 0xab15f
leaq 0xc0d27(%rip), %rdi     # 0x16c0e0
callq 0x57210
testl %eax, %eax
je 0xaac9b
leaq 0xc0cfb(%rip), %rdi     # 0x16c0c8
leaq 0x580f5(%rip), %rsi     # 0x1034c9
callq 0x58c40
movq 0xb6b50(%rip), %rdi     # 0x161f30
leaq 0xc0ce1(%rip), %rsi     # 0x16c0c8
leaq 0xb8e52(%rip), %rdx     # 0x164240
callq 0x590a0
leaq 0xc0ce6(%rip), %rdi     # 0x16c0e0
callq 0x57cf0
movq 0x10(%rsp), %r14
jmp 0xaac9b
leaq 0xc0cf0(%rip), %rdi     # 0x16c100
callq 0x57210
testl %eax, %eax
je 0xaaca9
leaq 0xc0ca4(%rip), %rsi     # 0x16c0c8
leaq 0x158(%rsp), %rdi
callq 0x58280
leaq 0x56fa9(%rip), %rsi     # 0x1023e1
leaq 0x18(%rsp), %rdi
callq 0x58c40
leaq 0x158(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x573e0
leaq 0xc0c8d(%rip), %rdi     # 0x16c0e8
movq %rax, %rsi
callq 0x58280
leaq 0x18(%rsp), %rdi
callq 0x5a588
movq 0xb6abc(%rip), %rbx     # 0x161f30
leaq 0x158(%rsp), %rdi
callq 0x5a588
leaq 0xc0c60(%rip), %rsi     # 0x16c0e8
leaq 0xb8db1(%rip), %rdx     # 0x164240
movq %rbx, %rdi
callq 0x590a0
leaq 0xc0c62(%rip), %rdi     # 0x16c100
callq 0x57cf0
movq 0x10(%rsp), %r14
jmp 0xaaca9
movq %rax, %r14
jmp 0xab4d0
movq %rax, %r14
jmp 0xab4dd
movq %rax, %r14
leaq 0xc0c1f(%rip), %rdi     # 0x16c0e0
jmp 0xab4e4
movq %rax, %r14
leaq 0x18(%rsp), %rdi
callq 0x5a588
leaq 0x158(%rsp), %rdi
callq 0x5a588
leaq 0xc0c1c(%rip), %rdi     # 0x16c100
callq 0x57520
jmp 0xab732
jmp 0xab6a4
jmp 0xab6a4
movq %rax, %r14
jmp 0xab5e4
jmp 0xab663
jmp 0xab6bd
movq %rax, %r14
jmp 0xab60d
jmp 0xab597
movq %rax, %r14
jmp 0xab654
jmp 0xab663
jmp 0xab6a4
movq %rax, %r14
testb %bl, %bl
je 0xab5d7
jmp 0xab666
jmp 0xab67b
movq %rax, %r14
jmp 0xab62c
movq %rax, %r14
testb %bl, %bl
je 0xab62c
jmp 0xab71b
movq %rax, %r14
testb %r13b, %r13b
je 0xab600
jmp 0xab61a
jmp 0xab663
movq %rax, %r14
testb %bl, %bl
je 0xab647
jmp 0xab666
jmp 0xab6a4
jmp 0xab6bd
jmp 0xab6ac
jmp 0xab597
jmp 0xab6c9
jmp 0xab6a4
movq %rax, %r14
jmp 0xab61a
movq %rax, %r14
jmp 0xab5d7
jmp 0xab663
jmp 0xab663
jmp 0xab6a4
jmp 0xab6c9
movq %rax, %r14
jmp 0xab600
movq %rax, %r14
jmp 0xab647
movq %rax, %r14
leaq 0x18(%rsp), %rdi
callq 0x5a588
testb %bl, %bl
je 0xab666
leaq 0xb0(%rsp), %rdi
callq 0x5a588
leaq 0xc8(%rsp), %rdi
jmp 0xab65c
movq %rax, %r14
leaq 0x50(%rsp), %rdi
callq 0x5a588
testb %r13b, %r13b
je 0xab61a
leaq 0x110(%rsp), %rdi
callq 0x5a588
leaq 0x80(%rsp), %rdi
callq 0x5a588
leaq 0x18(%rsp), %rdi
callq 0x5a588
testb %bl, %bl
je 0xab71b
leaq 0x38(%rsp), %rdi
jmp 0xab716
movq %rax, %r14
leaq 0x18(%rsp), %rdi
callq 0x5a588
testb %bl, %bl
je 0xab666
leaq 0xe0(%rsp), %rdi
callq 0x5a588
leaq 0xf8(%rsp), %rdi
callq 0x5a588
jmp 0xab666
movq %rax, %r14
leaq 0x158(%rsp), %rdi
jmp 0xab6b4
jmp 0xab6a4
jmp 0xab6bd
jmp 0xab6c4
movq %rax, %r14
jmp 0xab6f2
movq %rax, %r14
leaq 0x18(%rsp), %rdi
jmp 0xab720
movq %rax, %r14
testb %bpl, %bpl
je 0xab70e
jmp 0xab71b
movq %rax, %r14
jmp 0xab70e
movq %rax, %r14
testb %r13b, %r13b
je 0xab6e5
jmp 0xab6ff
movq %rax, %r14
jmp 0xab732
movq %rax, %r14
leaq 0x18(%rsp), %rdi
callq 0x5a588
jmp 0xab732
jmp 0xab6c9
movq %rax, %r14
jmp 0xab71b
jmp 0xab6c4
movq %rax, %r14
jmp 0xab6ff
movq %rax, %r14
jmp 0xab725
movq %rax, %r14
jmp 0xab6e5
movq %rax, %r14
leaq 0x38(%rsp), %rdi
callq 0x5a588
testb %r13b, %r13b
je 0xab6ff
leaq 0x128(%rsp), %rdi
callq 0x5a588
leaq 0x98(%rsp), %rdi
callq 0x5a588
leaq 0x18(%rsp), %rdi
callq 0x5a588
testb %bpl, %bpl
je 0xab71b
leaq 0x140(%rsp), %rdi
callq 0x5a588
leaq 0x68(%rsp), %rdi
callq 0x5a588
leaq 0x158(%rsp), %rdi
callq 0x5a598
movq 0x8(%rsp), %rdi
callq 0x56d00
movq %r14, %rdi
callq 0x58260