// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/classes/system/system.cpp
// Function: smooth::System::System::OpenURL(smooth::String const&)
S::Bool S::System::System::OpenURL(const String &url)
{
#if defined __WIN32__
	ShellExecute(NULL, (wchar_t *) L"open", url, NULL, NULL, SW_SHOW);
#elif defined __APPLE__
	const char	*args = url;

	if (!fork()) { execl("/usr/bin/open", "open", args, NULL); exit(0); }
#elif defined __HAIKU__
	const char	*args = url;

	if (!fork()) { execl("/boot/system/bin/open", "open", args, NULL); exit(0); }
#else
	/* Try the open commands from freedesktop.org and the Gnome, KDE
	 * and Xfce desktops first, then try some widely used browsers.
	 */
	static const char	*browsers[] = { "xdg-open", "gnome-open", "kde-open", "exo-open",
						"firefox", "safari", "chrome", "opera", "mozilla", "netscape", "epiphany", "konqueror",
						NIL };

	String	 command;

	for (int i = 0; browsers[i] != NIL; i++)
	{
		if (i > 0) command.Append(" || ");

		command.Append(browsers[i]).Append(" \"").Append(url).Append("\"");
	}

	const char	*cmd = command;

	if (!fork()) { execl("/bin/sh", "sh", "-c", cmd, NULL); exit(0); }
#endif

	return True;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x8(%rbp)
leaq -0x20(%rbp), %rdi
xorl %esi, %esi
callq 0x5da90
movl $0x0, -0x24(%rbp)
movslq -0x24(%rbp), %rcx
leaq 0x102724(%rip), %rax    # 0x20bb90
cmpq $0x0, (%rax,%rcx,8)
je 0x1095e6
cmpl $0x0, -0x24(%rbp)
jle 0x1094d4
leaq 0x9cccd(%rip), %rsi     # 0x1a6151
leaq -0x40(%rbp), %rdi
callq 0x5c1f0
jmp 0x10948f
leaq -0x20(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x5a710
jmp 0x10949e
leaq -0x40(%rbp), %rdi
callq 0x5df00
jmp 0x1094d4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x109655
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x5df00
jmp 0x109655
movslq -0x24(%rbp), %rcx
leaq 0x1026b1(%rip), %rax    # 0x20bb90
movq (%rax,%rcx,8), %rsi
leaq -0x68(%rbp), %rdi
callq 0x5c1f0
jmp 0x1094ee
leaq -0x20(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x5a710
movq %rax, -0xa8(%rbp)
jmp 0x109504
leaq 0x9cc4b(%rip), %rsi     # 0x1a6156
leaq -0x80(%rbp), %rdi
callq 0x5c1f0
jmp 0x109516
movq -0xa8(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x5a710
movq %rax, -0xb0(%rbp)
jmp 0x10952f
movq -0xb0(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x5a710
movq %rax, -0xb8(%rbp)
jmp 0x109548
leaq 0x9cc08(%rip), %rsi     # 0x1a6157
leaq -0x98(%rbp), %rdi
callq 0x5c1f0
jmp 0x10955d
movq -0xb8(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0x5a710
jmp 0x109572
leaq -0x98(%rbp), %rdi
callq 0x5df00
leaq -0x80(%rbp), %rdi
callq 0x5df00
leaq -0x68(%rbp), %rdi
callq 0x5df00
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x109461
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x1095db
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x1095d2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x5df00
leaq -0x80(%rbp), %rdi
callq 0x5df00
leaq -0x68(%rbp), %rdi
callq 0x5df00
jmp 0x109655
leaq -0x20(%rbp), %rdi
callq 0x5d090
movq %rax, -0xc0(%rbp)
jmp 0x1095f8
movq -0xc0(%rbp), %rax
movq %rax, -0xa0(%rbp)
callq 0x5ce10
cmpl $0x0, %eax
jne 0x10963f
movq -0xa0(%rbp), %rcx
leaq 0x9c8a2(%rip), %rdi     # 0x1a5ec0
leaq 0x9c8a0(%rip), %rsi     # 0x1a5ec5
leaq 0x9c89c(%rip), %rdx     # 0x1a5ec8
xorl %eax, %eax
movl %eax, %r8d
movb $0x0, %al
callq 0x5dd50
xorl %edi, %edi
callq 0x5b780
leaq -0x20(%rbp), %rdi
callq 0x5df00
movb $0x1, %al
andb $0x1, %al
addq $0xc0, %rsp
popq %rbp
retq
leaq -0x20(%rbp), %rdi
callq 0x5df00
movq -0x48(%rbp), %rdi
callq 0x5b6b0
nopw (%rax,%rax)