LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/classes/backends/xlib/backendxlib.cpp
// Function: smooth::Backends::BackendXLib::FindExecutable(smooth::String const&)
S::String S::Backends::BackendXLib::FindExecutable(const String &executable)
{
	/* Search the path for executable.
	 */
	String			 path  = getenv("PATH");
	const Array<String>	&paths = path.Explode(":");

	foreach (const String &path, paths)
	{
		/* Check for executable in this path.
		 */
		File	 file(String(path).Append("/").Append(executable));

		if (file.Exists()) return file;
	}

	return NIL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %rsi, 0x8(%rsp)
movq %rdi, (%rsp)
leaq 0x553f8(%rip), %rdi     # 0x113377
callq 0x57720
leaq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0x579f0
leaq 0x3614f(%rip), %rsi     # 0xf40e7
leaq 0x28(%rsp), %rdi
callq 0x579f0
leaq 0xa0(%rsp), %rdi
leaq 0x10(%rsp), %rsi
leaq 0x28(%rsp), %rdx
callq 0x57f10
leaq 0x28(%rsp), %rdi
callq 0x59200
cmpl $0x0, 0xa8(%rsp)
jle 0xbe0a6
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
leaq 0x88(%rsp), %r12
leaq 0x70(%rsp), %rbx
leaq 0x58(%rsp), %r15
leaq 0x28(%rsp), %r13
incl %ebp
leaq 0xa0(%rsp), %rdi
movl %ebp, %esi
callq 0x64224
movq %r12, %rdi
movq %rax, %rsi
callq 0x570b0
movq %rbx, %rdi
leaq 0x36675(%rip), %rsi     # 0xf4688
callq 0x579f0
movq %r12, %rdi
movq %rbx, %rsi
callq 0x562f0
movq %rax, %rdi
movq 0x8(%rsp), %rsi
callq 0x562f0
movq %rax, %r14
movq %r15, %rdi
xorl %esi, %esi
callq 0x58e20
movq %r13, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x56800
movq %r15, %rdi
callq 0x59200
movq %rbx, %rdi
callq 0x59200
movq %r12, %rdi
callq 0x59200
movq %r13, %rdi
callq 0x56ef0
movl %eax, %r14d
testb %al, %al
je 0xbe08d
movq (%rsp), %rdi
movq %r13, %rsi
callq 0x58fa0
movq %r13, %rdi
callq 0x59178
testb %r14b, %r14b
je 0xbe095
jmp 0xbe0b1
movq %r13, %rdi
callq 0x59178
movl 0xa8(%rsp), %eax
decl %eax
cmpl %eax, %ebp
jl 0xbdfed
movq (%rsp), %rdi
xorl %esi, %esi
callq 0x58e20
leaq 0xa0(%rsp), %rdi
callq 0x63e08
leaq 0x10(%rsp), %rdi
callq 0x59200
movq (%rsp), %rax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xbe0f6
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x59200
jmp 0xbe147
movq %rax, %rbx
jmp 0xbe147
jmp 0xbe0f6
movq %rax, %rbx
jmp 0xbe13a
movq %rax, %rbx
jmp 0xbe12d
jmp 0xbe120
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0x59200
jmp 0xbe123
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x59178
jmp 0xbe13a
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x59200
leaq 0x88(%rsp), %rdi
callq 0x59200
leaq 0xa0(%rsp), %rdi
callq 0x63e08
leaq 0x10(%rsp), %rdi
callq 0x59200
movq %rbx, %rdi
callq 0x57090
nop
// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/classes/backends/xlib/backendxlib.cpp
// Function: smooth::Backends::BackendXLib::QueryGSettings(smooth::String const&, smooth::String const&)
S::String S::Backends::BackendXLib::QueryGSettings(const String &schema, const String &key)
{
	static String	 gsettings = FindExecutable("gsettings");

	if (gsettings == NIL) return NIL;

	/* Execute gsettings to query value.
	 */
	FILE	*pstdin = popen(String(gsettings).Append(" get ").Append(schema).Append(" ").Append(key), "r");

	if (pstdin != NIL)
	{
		char	 value[256];

		if (fgets(value, 256, pstdin) != NIL)
		{
			pclose(pstdin);

			return value;
		}

		pclose(pstdin);
	}

	return NIL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x130, %rsp            # imm = 0x130
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movb 0xb99e3(%rip), %al      # 0x177b58
testb %al, %al
je 0xbe27d
leaq 0xb99bc(%rip), %rdi     # 0x177b40
xorl %esi, %esi
callq 0x55260
testb %al, %al
jne 0xbe263
leaq 0xb99a6(%rip), %rsi     # 0x177b40
leaq 0x30(%rsp), %rdi
callq 0x570b0
leaq 0x55b83(%rip), %rsi     # 0x113d2e
leaq 0x18(%rsp), %rdi
callq 0x579f0
leaq 0x30(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x562f0
movq %rax, %rdi
movq %r15, %rsi
callq 0x562f0
movq %rax, %r15
leaq 0x6b217(%rip), %rsi     # 0x1293f0
movq %rsp, %rdi
callq 0x579f0
movq %rsp, %rsi
movq %r15, %rdi
callq 0x562f0
movq %rax, %rdi
movq %r14, %rsi
callq 0x562f0
movq %rax, %rdi
callq 0x585e0
leaq 0x55947(%rip), %rsi     # 0x113b4d
movq %rax, %rdi
callq 0x57b60
movq %rax, %r14
movq %rsp, %rdi
callq 0x59200
leaq 0x18(%rsp), %rdi
callq 0x59200
leaq 0x30(%rsp), %rdi
callq 0x59200
testq %r14, %r14
je 0xbe263
leaq 0x30(%rsp), %rdi
movl $0x100, %esi            # imm = 0x100
movq %r14, %rdx
callq 0x56f20
movq %rax, %r15
movq %r14, %rdi
callq 0x552b0
testq %r15, %r15
je 0xbe263
leaq 0x30(%rsp), %rsi
movq %rbx, %rdi
callq 0x579f0
jmp 0xbe26d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x58e20
movq %rbx, %rax
addq $0x130, %rsp            # imm = 0x130
popq %rbx
popq %r14
popq %r15
retq
leaq 0xb98d4(%rip), %rdi     # 0x177b58
callq 0x56120
testl %eax, %eax
je 0xbe17d
leaq 0x55a8c(%rip), %rsi     # 0x113d24
leaq 0x30(%rsp), %rdi
callq 0x579f0
leaq 0xb9897(%rip), %rdi     # 0x177b40
leaq 0x30(%rsp), %rsi
callq 0xbdf5e
leaq 0x30(%rsp), %rdi
callq 0x59200
movq 0xaec6c(%rip), %rdi     # 0x16cf30
leaq 0xb9875(%rip), %rsi     # 0x177b40
leaq 0xb0dae(%rip), %rdx     # 0x16f080
callq 0x57e10
leaq 0xb987a(%rip), %rdi     # 0x177b58
callq 0x56b80
jmp 0xbe17d
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x59200
jmp 0xbe2fa
movq %rax, %rbx
leaq 0xb9857(%rip), %rdi     # 0x177b58
callq 0x56420
jmp 0xbe333
jmp 0xbe30f
movq %rax, %rbx
jmp 0xbe329
movq %rax, %rbx
jmp 0xbe31f
movq %rax, %rbx
movq %rsp, %rdi
callq 0x59200
leaq 0x18(%rsp), %rdi
callq 0x59200
leaq 0x30(%rsp), %rdi
callq 0x59200
movq %rbx, %rdi
callq 0x57090
nop
// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/classes/backends/xlib/backendxlib.cpp
// Function: smooth::Backends::BackendXLib::QueryXfConf(smooth::String const&, smooth::String const&)
S::String S::Backends::BackendXLib::QueryXfConf(const String &channel, const String &property)
{
	static String	 xfconfquery = FindExecutable("xfconf-query");

	if (xfconfquery == NIL) return NIL;

	/* Execute xfconf-query to query value.
	 */
	FILE	*pstdin = popen(String(xfconfquery).Append(" -c ").Append(channel).Append(" -p ").Append(property), "r");

	if (pstdin != NIL)
	{
		char	 value[256];

		if (fgets(value, 256, pstdin) != NIL)
		{
			pclose(pstdin);

			return value;
		}

		pclose(pstdin);
	}

	return NIL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x130, %rsp            # imm = 0x130
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movb 0xb9451(%rip), %al      # 0x177b78
testb %al, %al
je 0xbe82f
leaq 0xb942a(%rip), %rdi     # 0x177b60
xorl %esi, %esi
callq 0x55260
testb %al, %al
jne 0xbe815
leaq 0xb9414(%rip), %rsi     # 0x177b60
leaq 0x30(%rsp), %rdi
callq 0x570b0
leaq 0x555ef(%rip), %rsi     # 0x113d4c
leaq 0x18(%rsp), %rdi
callq 0x579f0
leaq 0x30(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x562f0
movq %rax, %rdi
movq %r15, %rsi
callq 0x562f0
movq %rax, %r15
leaq 0x555c6(%rip), %rsi     # 0x113d51
movq %rsp, %rdi
callq 0x579f0
movq %rsp, %rsi
movq %r15, %rdi
callq 0x562f0
movq %rax, %rdi
movq %r14, %rsi
callq 0x562f0
movq %rax, %rdi
callq 0x585e0
leaq 0x55395(%rip), %rsi     # 0x113b4d
movq %rax, %rdi
callq 0x57b60
movq %rax, %r14
movq %rsp, %rdi
callq 0x59200
leaq 0x18(%rsp), %rdi
callq 0x59200
leaq 0x30(%rsp), %rdi
callq 0x59200
testq %r14, %r14
je 0xbe815
leaq 0x30(%rsp), %rdi
movl $0x100, %esi            # imm = 0x100
movq %r14, %rdx
callq 0x56f20
movq %rax, %r15
movq %r14, %rdi
callq 0x552b0
testq %r15, %r15
je 0xbe815
leaq 0x30(%rsp), %rsi
movq %rbx, %rdi
callq 0x579f0
jmp 0xbe81f
movq %rbx, %rdi
xorl %esi, %esi
callq 0x58e20
movq %rbx, %rax
addq $0x130, %rsp            # imm = 0x130
popq %rbx
popq %r14
popq %r15
retq
leaq 0xb9342(%rip), %rdi     # 0x177b78
callq 0x56120
testl %eax, %eax
je 0xbe72f
leaq 0x554f5(%rip), %rsi     # 0x113d3f
leaq 0x30(%rsp), %rdi
callq 0x579f0
leaq 0xb9305(%rip), %rdi     # 0x177b60
leaq 0x30(%rsp), %rsi
callq 0xbdf5e
leaq 0x30(%rsp), %rdi
callq 0x59200
movq 0xae6ba(%rip), %rdi     # 0x16cf30
leaq 0xb92e3(%rip), %rsi     # 0x177b60
leaq 0xb07fc(%rip), %rdx     # 0x16f080
callq 0x57e10
leaq 0xb92e8(%rip), %rdi     # 0x177b78
callq 0x56b80
jmp 0xbe72f
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x59200
jmp 0xbe8ac
movq %rax, %rbx
leaq 0xb92c5(%rip), %rdi     # 0x177b78
callq 0x56420
jmp 0xbe8e5
jmp 0xbe8c1
movq %rax, %rbx
jmp 0xbe8db
movq %rax, %rbx
jmp 0xbe8d1
movq %rax, %rbx
movq %rsp, %rdi
callq 0x59200
leaq 0x18(%rsp), %rdi
callq 0x59200
leaq 0x30(%rsp), %rdi
callq 0x59200
movq %rbx, %rdi
callq 0x57090
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/classes/graphics/backends/xlib/bitmapxlib.cpp
// Function: smooth::GUI::BitmapXLib::DeleteBitmap()
S::Bool S::GUI::BitmapXLib::DeleteBitmap()
{
	if (bitmap != NIL)
	{
		delete [] bitmap->data;

		bitmap->data = NIL;

		XDestroyImage(bitmap);

		bitmap	     = NIL;

		size	     = Size(0, 0);
		depth	     = 0;

		bytes	     = NIL;
		bpp	     = 0;
		align	     = 0;
	}

	return True;
}

// Assembly:
movq 0x28(%rdi), %rax
testq %rax, %rax
je 0xbedde
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rax), %rdi
testq %rdi, %rdi
je 0xbedb4
callq 0x561e0
movq 0x28(%rbx), %rdi
xorl %r14d, %r14d
movq %r14, 0x10(%rdi)
callq *0x60(%rdi)
movq %r14, 0x28(%rbx)
movw $0x0, 0xa(%rbx)
movb $0x0, 0xc(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
movb $0x1, %al
retq
nop
// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/classes/graphics/backends/xlib/bitmapxlib.cpp
// Function: smooth::GUI::BitmapXLib::SetSystemBitmap(void*)
S::Bool S::GUI::BitmapXLib::SetSystemBitmap(Void *nBitmap)
{
	if (nBitmap == GetSystemBitmap()) return True;

	if (nBitmap == NIL)
	{
		DeleteBitmap();
	}
	else
	{
		XImage	*image = (XImage *) nBitmap;

		CreateBitmap(Size(image->width, image->height), image->depth);

		memcpy(bitmap->data, image->data, size_t(image->height) * size_t(image->bytes_per_line));
	}

	return True;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rax
callq *0x28(%rax)
cmpq %rbx, %rax
je 0xbee39
testq %rbx, %rbx
je 0xbee30
movq (%rbx), %rax
movq %rsp, %rsi
movq %rax, (%rsi)
movl 0x28(%rbx), %edx
movq (%r14), %rax
movq %r14, %rdi
callq *0x10(%rax)
movq 0x28(%r14), %rax
movq 0x10(%rax), %rdi
movq 0x10(%rbx), %rsi
movslq 0x4(%rbx), %rax
movslq 0x2c(%rbx), %rdx
imulq %rax, %rdx
callq 0x552d0
jmp 0xbee39
movq (%r14), %rax
movq %r14, %rdi
callq *0x18(%rax)
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/classes/graphics/backends/xlib/bitmapxlib.cpp
// Function: smooth::GUI::BitmapXLib::SetPixel(smooth::GUI::Point const&, smooth::GUI::Color const&)
S::Bool S::GUI::BitmapXLib::SetPixel(const Point &iPoint, const Color &iColor)
{
	if (bitmap == NIL) return Error();

	Color	 color	= iColor.ConvertTo(Color::RGBA);

	if	(depth == 16) XPutPixel(bitmap, iPoint.x, iPoint.y, 			       ((color.GetRed() >> 3) << 11) | ((color.GetGreen() >> 2) << 5) | (color.GetBlue() >> 3));
	else if (depth == 24) XPutPixel(bitmap, iPoint.x, iPoint.y, 			       ( color.GetRed()	      << 16) | ( color.GetGreen()       << 8) | (color.GetBlue()     ));
	else if (depth == 32) XPutPixel(bitmap, iPoint.x, iPoint.y, (color.GetAlpha() << 24) | ( color.GetRed()	      << 16) | ( color.GetGreen()	<< 8) | (color.GetBlue()     ));

	return True;
}

// Assembly:
cmpq $0x0, 0x28(%rdi)
je 0xbef21
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x8(%rsp), %rdi
movq %rdx, %rsi
movl $0x1, %edx
callq 0x57d10
movzbl 0xa(%r14), %eax
cmpl $0x20, %eax
je 0xbeeeb
cmpl $0x18, %eax
je 0xbeebf
cmpl $0x10, %eax
jne 0xbef1a
movq 0x28(%r14), %rdi
movl (%rbx), %esi
movl 0x4(%rbx), %edx
movl 0x10(%rsp), %ecx
movl %ecx, %eax
shll $0x8, %eax
andl $0xf800, %eax           # imm = 0xF800
movl %ecx, %r8d
shrl $0x5, %r8d
andl $0x7e0, %r8d            # imm = 0x7E0
orl %eax, %r8d
shrl $0x13, %ecx
andl $0x1f, %ecx
orl %r8d, %ecx
jmp 0xbef17
movq 0x28(%r14), %rdi
movl (%rbx), %esi
movl 0x4(%rbx), %edx
movq 0x10(%rsp), %rax
movzbl %al, %ecx
shll $0x10, %ecx
movl %eax, %r8d
andl $0xff00, %r8d           # imm = 0xFF00
orq %rcx, %r8
shrl $0x10, %eax
movzbl %al, %ecx
orq %r8, %rcx
jmp 0xbef17
movq 0x28(%r14), %rdi
movl (%rbx), %esi
movl 0x4(%rbx), %edx
movl 0x10(%rsp), %eax
movzbl %al, %ecx
shll $0x10, %ecx
movl %eax, %r8d
andl $0xff00ff00, %r8d       # imm = 0xFF00FF00
orl %ecx, %r8d
shrl $0x10, %eax
movzbl %al, %eax
orl %r8d, %eax
movslq %eax, %rcx
callq *0x70(%rdi)
addq $0x18, %rsp
popq %rbx
popq %r14
movb $0x1, %al
retq
// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/classes/graphics/backends/xlib/bitmapxlib.cpp
// Function: smooth::GUI::BitmapXLib::GetPixel(smooth::GUI::Point const&) const
S::GUI::Color S::GUI::BitmapXLib::GetPixel(const Point &iPoint) const
{
	if (bitmap == NIL) return Color();

	Long	 value = XGetPixel(bitmap, iPoint.x, iPoint.y);

	if	(depth == 16) return				   Color(((value >> 11) &  31) << 3, ((value >> 5) &  63) << 2, (value &  31) << 3, Color::RGB);
	else if (depth == 24) return				   Color( (value >> 16) & 255,	      (value >> 8) & 255,	 value & 255      , Color::RGB);
	else if (depth == 32) return ((value >> 24) & 255) << 24 | Color( (value >> 16) & 255,	      (value >> 8) & 255,	 value & 255      , Color::RGBA);

	return Color();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x28(%rsi), %rdi
testq %rdi, %rdi
je 0xbef74
movq %rsi, %r14
movl (%rdx), %esi
movl 0x4(%rdx), %edx
callq *0x68(%rdi)
movzbl 0xa(%r14), %ecx
cmpl $0x20, %ecx
je 0xbef99
cmpl $0x18, %ecx
je 0xbef78
cmpl $0x10, %ecx
jne 0xbef74
movl %eax, %ecx
shrl $0x8, %ecx
andl $0xf8, %ecx
movl %eax, %edx
andl $0x1f, %edx
shll $0x13, %edx
shll $0x5, %eax
andl $0xfc00, %eax           # imm = 0xFC00
orl %ecx, %eax
orl %edx, %eax
jmp 0xbefb5
xorl %eax, %eax
jmp 0xbefb5
movl %eax, %ecx
shrl $0x10, %ecx
movl $0xff, %edx
andl %edx, %ecx
movl %eax, %esi
andl $0xff00, %esi           # imm = 0xFF00
orq %rcx, %rsi
andl %edx, %eax
shll $0x10, %eax
orq %rsi, %rax
jmp 0xbefb5
movl %eax, %ecx
shrl $0x10, %ecx
movl $0xff, %edx
andl %edx, %ecx
andl %eax, %edx
shll $0x10, %edx
andl $0xff00ff00, %eax       # imm = 0xFF00FF00
orq %rcx, %rax
orq %rdx, %rax
movq %rax, 0x8(%rbx)
movl $0x0, (%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/classes/gui/clipboard/backends/xlib/clipboardxlib.cpp
// Function: smooth::GUI::ClipboardXLib::QueryAtom(X11::_XDisplay*, unsigned long, unsigned long, unsigned long) const
unsigned char *S::GUI::ClipboardXLib::QueryAtom(Display *display, X11::Window self, Atom clipboard, Atom atom) const
{
	XConvertSelection(display, clipboard, atom, atom, self, CurrentTime);
	XFlush(display);

	/* Wait for SelectionNotify event to be sent.
	 */
	XEvent	 e;

	do
	{
		XNextEvent(display, &e);

		WindowXLib	*backend = GUI::WindowXLib::GetWindowBackend(e.xany.window);

		if (backend != NIL) backend->ProcessSystemMessages(&e);
	}
	while (e.type != SelectionNotify);

	Atom		 type;
	int		 format;
	unsigned long	 items, bytes;
	unsigned char	*data = NIL;

	/* Do not get any data yet, see how much data is there.
	 */
	if (XGetWindowProperty(display, self, atom, 0, 0, 0, AnyPropertyType, &type, &format, &items, &bytes, &data) == 0)
	{
		if (data != NIL) { XFree(data); data = NIL; }

		/* Data is there!
		 */
		if (bytes > 0) XGetWindowProperty(display, self, atom, 0, bytes, 0, AnyPropertyType, &type, &format, &items, &bytes, &data);
	}

	return data;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %r8, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rsi, %rdi
movq %rcx, %rsi
movq %r8, %rdx
movq %r8, %rcx
movq %r14, %r8
xorl %r9d, %r9d
callq 0x587e0
movq %r15, %rdi
callq 0x55e10
leaq 0x28(%rsp), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x57ee0
movq 0x48(%rsp), %rdi
callq 0xbfb44
testq %rax, %rax
je 0xbf107
movq %rax, %rdi
movq %r12, %rsi
callq 0xbfdd8
cmpl $0x1f, 0x28(%rsp)
jne 0xbf0e2
xorl %eax, %eax
movq %rsp, %rbp
movq %rax, (%rbp)
leaq 0x10(%rsp), %r13
leaq 0x20(%rsp), %r12
leaq 0xc(%rsp), %r11
leaq 0x18(%rsp), %r10
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq %rbp
pushq %r13
pushq %r12
pushq %r11
pushq %r10
pushq %rax
callq 0x58180
addq $0x30, %rsp
testl %eax, %eax
jne 0xbf19d
movq (%rsp), %rdi
testq %rdi, %rdi
je 0xbf169
callq 0x57e80
movq $0x0, (%rsp)
movq 0x10(%rsp), %r8
testq %r8, %r8
je 0xbf19d
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
xorl %r9d, %r9d
pushq %rbp
pushq %r13
pushq %r12
leaq 0x24(%rsp), %rax
pushq %rax
leaq 0x38(%rsp), %rax
pushq %rax
pushq $0x0
callq 0x58180
addq $0x30, %rsp
movq (%rsp), %rax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/classes/gui/clipboard/backends/xlib/clipboardxlib.cpp
// Function: smooth::GUI::ClipboardXLib::GetText(unsigned long) const
S::String S::GUI::ClipboardXLib::GetText(Atom clipboard) const
{
	if (window == NIL) return NIL;

	String		 text;

	X11::Window	 self  = (X11::Window) window->GetSystemWindow();
	X11::Window	 owner = XGetSelectionOwner(display, clipboard);

	if (owner != None)
	{
		unsigned char *data = QueryAtom(display, self, clipboard, XInternAtom(display, "UTF8_STRING", True));

		if (data != NIL)
		{
			text.ImportFrom("UTF-8", (char *) data);

			XFree(data);
		}
		else
		{
			unsigned char *data = QueryAtom(display, self, clipboard, XA_STRING);

			if (data != NIL)
			{
				text = (char *) data;

				XFree(data);
			}
		}
	}

	return text;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x18(%rsi), %r12
xorl %esi, %esi
callq 0x58e20
testq %r12, %r12
je 0xbf274
movq 0x18(%r15), %rdi
callq 0x55280
movq %rax, %r12
movq 0x10(%r15), %rdi
movq %r14, %rsi
callq 0x58510
testq %rax, %rax
je 0xbf274
movq 0x10(%r15), %r13
leaq 0x54b98(%rip), %rsi     # 0x113d9a
movq %r13, %rdi
movl $0x1, %edx
callq 0x57ea0
movq %r13, %rsi
movq %r12, %rdx
movq %r14, %rcx
movq %rax, %r8
callq 0xbf0a4
movq %rax, %r13
testq %rax, %rax
je 0xbf244
leaq 0x53ef7(%rip), %rsi     # 0x113126
movq %rbx, %rdi
movq %r13, %rdx
callq 0x56950
movq %r13, %rdi
callq 0x57e80
jmp 0xbf274
movq 0x10(%r15), %rsi
movl $0x1f, %r8d
movq %r12, %rdx
movq %r14, %rcx
callq 0xbf0a4
movq %rax, %r14
testq %rax, %rax
je 0xbf274
movq %rbx, %rdi
movq %r14, %rsi
callq 0x55f40
movq %r14, %rdi
callq 0x57e80
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0xbf287
jmp 0xbf287
jmp 0xbf287
movq %rax, %r14
movq %rbx, %rdi
callq 0x59200
movq %r14, %rdi
callq 0x57090
// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/classes/gui/clipboard/backends/xlib/clipboardxlib.cpp
// Function: smooth::GUI::ClipboardXLib::SetText(unsigned long, smooth::String const&)
S::Bool S::GUI::ClipboardXLib::SetText(Atom clipboard, const String &text)
{
	if (window == NIL) return False;

	X11::Window	 self	 = (X11::Window) window->GetSystemWindow();
	WindowXLib	*backend = GUI::WindowXLib::GetWindowBackend(self);

	if (backend != NIL)
	{
		if	(clipboard == XA_PRIMARY)			       backend->SetSelection(text);
		else if (clipboard == XInternAtom(display, "CLIPBOARD", True)) backend->SetClipboard(text);
	}

	XSetSelectionOwner(display, clipboard, self, CurrentTime);
	XFlush(display);

	return True;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x18(%rdi), %rbx
testq %rbx, %rbx
je 0xbf324
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %r14
movq %rbx, %rdi
callq 0x55280
movq %rax, %r13
movq %rax, %rdi
callq 0xbfb44
testq %rax, %rax
je 0xbf30a
movq %rax, %rbp
movl $0x1b8, %ecx            # imm = 0x1B8
cmpq $0x1, %r15
je 0xbf2fc
movq 0x10(%r14), %rdi
leaq 0x54abe(%rip), %rsi     # 0x113da6
movl $0x1, %edx
callq 0x57ea0
movl $0x1d0, %ecx            # imm = 0x1D0
cmpq %r15, %rax
jne 0xbf30a
addq %rcx, %rbp
movq %rbp, %rdi
movq %r12, %rsi
callq 0x555f0
movq 0x10(%r14), %rdi
movq %r15, %rsi
movq %r13, %rdx
xorl %ecx, %ecx
callq 0x55090
movq 0x10(%r14), %rdi
callq 0x55e10
testq %rbx, %rbx
setne %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/classes/gui/window/backends/xlib/windowxlib.cpp
// Function: smooth::GUI::WindowXLib::SetCursor(smooth::GUI::Cursor*, smooth::GUI::Point const&)
S::Void S::GUI::WindowXLib::SetCursor(Cursor *cursor, const Point &point)
{
	WindowXLib	*window = GetWindowBackend((X11::Window) cursor->GetContainerWindow()->GetSystemWindow());

	if (window != NIL)
	{
		/* Remove active cursor.
		 */
		if (cursor != activeCursor && activeCursor != NIL) RemoveCursor(activeCursor);

		/* Create input context.
		 */
		window->CreateInputContext();

		if (window->ic != NIL)
		{
			/* Move input window to cursor position.
			 */
			XMoveWindow(window->display, window->iwnd, point.x - 3, point.y + cursor->GetFont().GetScaledTextSizeY() + 1);

			/* Set input focus on input window.
			 */
			X11::Window	 focusWnd = None;
			int		 revertTo = RevertToNone;

			XGetInputFocus(window->display, &focusWnd, &revertTo);

			if (focusWnd != window->iwnd)
			{
				XSetInputFocus(window->display, window->iwnd, RevertToParent, CurrentTime);
				XFlush(window->display);
			}

			/* Set current input context.
			 */
			XSetICFocus(window->ic);
		}
	}

	activeCursor	= cursor;
	activeCursorPos = point;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
callq 0x559e0
movq %rax, %rdi
callq 0x55280
movq %rax, %rdi
callq 0xbfb44
testq %rax, %rax
je 0xbf590
movq %rax, %r15
movq 0xb874c(%rip), %rdi     # 0x177c08
cmpq %r14, %rdi
sete %al
testq %rdi, %rdi
sete %cl
orb %al, %cl
jne 0xbf4d1
callq 0xbf5b0
movq %r15, %rdi
callq 0xc3380
cmpq $0x0, 0x148(%r15)
je 0xbf590
movq 0x120(%r15), %rax
movq %rax, (%rsp)
movq 0x150(%r15), %r13
movl (%rbx), %ebp
movl 0x4(%rbx), %r12d
addl $-0x3, %ebp
movq (%r14), %rax
movq %r14, %rdi
callq *0xe8(%rax)
movq 0xad8a3(%rip), %rsi     # 0x16cdb8
movq %rax, %rdi
callq 0x57680
leal (%r12,%rax), %ecx
incl %ecx
movq (%rsp), %rdi
movq %r13, %rsi
movl %ebp, %edx
callq 0x550b0
leaq 0x10(%rsp), %r12
movq $0x0, (%r12)
leaq 0xc(%rsp), %rdx
movl $0x0, (%rdx)
movq 0x120(%r15), %rdi
movq %r12, %rsi
callq 0x55a20
movq 0x150(%r15), %rsi
cmpq %rsi, (%r12)
je 0xbf584
movq 0x120(%r15), %rdi
movl $0x2, %edx
xorl %ecx, %ecx
callq 0x56aa0
movq 0x120(%r15), %rdi
callq 0x55e10
movq 0x148(%r15), %rdi
callq 0x556e0
movq %r14, 0xb8671(%rip)     # 0x177c08
movq (%rbx), %rax
movq %rax, 0xb866f(%rip)     # 0x177c10
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/classes/gui/window/backends/xlib/windowxlib.cpp
// Function: smooth::GUI::WindowXLib::RemoveCursor(smooth::GUI::Cursor*)
S::Void S::GUI::WindowXLib::RemoveCursor(Cursor *cursor)
{
	if (activeCursor != cursor) return;

	WindowXLib	*window = GetWindowBackend((X11::Window) cursor->GetContainerWindow()->GetSystemWindow());

	if (window != NIL && window->ic != NIL)
	{
		/* Destroy input context.
		 */
		window->DestroyInputContext();

		/* Clear preediting area.
		 */
		if (activeCursor->IsVisible())
		{
			Rect	 rect = Rect::OverlapRect(Rect(activeCursorPos - Point(1, 1), activeCursor->GetRealSize()), Rect(activeCursor->GetRealPosition(), activeCursor->GetRealSize()));

			activeCursor->SetIMECursor(True);

			window->drawSurface->StartPaint(rect);
			window->drawSurface->Box(rect, activeCursor->GetBackgroundColor(), Rect::Filled);

			activeCursor->Paint(SP_PAINT);

			window->drawSurface->EndPaint();

			activeCursor->SetIMECursor(False);
		}
	}

	activeCursor	= NIL;
	activeCursorPos = Point();
}

// Assembly:
cmpq %rdi, 0xb8651(%rip)     # 0x177c08
je 0xbf5ba
retq
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
callq 0x559e0
movq %rax, %rdi
callq 0x55280
movq %rax, %rdi
callq 0xbfb44
testq %rax, %rax
je 0xbf726
movq %rax, %rbx
cmpq $0x0, 0x148(%rax)
je 0xbf726
movq %rbx, %rdi
callq 0xc21d4
movq 0xb8604(%rip), %rdi     # 0x177c08
movq (%rdi), %rax
callq *0x90(%rax)
testb %al, %al
je 0xbf726
movl 0xb85f4(%rip), %r14d    # 0x177c10
leal -0x1(%r14), %ebp
movl 0xb85ed(%rip), %r15d    # 0x177c14
leal -0x1(%r15), %r12d
movq 0xb85d6(%rip), %rdi     # 0x177c08
movq (%rdi), %rax
callq *0x50(%rax)
leal (%r14,%rax), %ecx
decl %ecx
shrq $0x20, %rax
movq %rsp, %r14
movl %ebp, (%r14)
movl %r12d, 0x4(%r14)
movl %ecx, 0x8(%r14)
leal -0x1(%r15,%rax), %eax
movl %eax, 0xc(%r14)
movq 0xb85a8(%rip), %rdi     # 0x177c08
movq (%rdi), %rax
callq *0x48(%rax)
movq %rax, %r15
movq %rax, %r12
shrq $0x20, %r12
movq 0xb8591(%rip), %rdi     # 0x177c08
movq (%rdi), %rax
callq *0x50(%rax)
leal (%rax,%r15), %ecx
shrq $0x20, %rax
leaq 0x20(%rsp), %rsi
movl %r15d, (%rsi)
movl %r12d, 0x4(%rsi)
movl %ecx, 0x8(%rsi)
addl %r12d, %eax
movl %eax, 0xc(%rsi)
movq %r14, %rdi
callq 0x58af0
leaq 0x10(%rsp), %r15
movq %rax, (%r15)
movq %rdx, 0x8(%r15)
movq 0xb8553(%rip), %rdi     # 0x177c08
movl $0x1, %esi
callq 0x57c40
movq 0x10(%rbx), %rdi
movq %r15, %rsi
callq 0x55160
movq 0x10(%rbx), %r12
movq 0xb8532(%rip), %rdi     # 0x177c08
movq (%rdi), %rax
callq *0x140(%rax)
movq 0xad8c2(%rip), %rcx     # 0x16cfa8
movl (%rcx), %ecx
movq $0x0, (%r14)
movq %rsp, %r8
movq %r12, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x57930
movq 0xb8501(%rip), %rdi     # 0x177c08
movq (%rdi), %rax
xorl %esi, %esi
callq *0x78(%rax)
movq 0x10(%rbx), %rdi
callq 0x58780
movq 0xb84e9(%rip), %rdi     # 0x177c08
xorl %esi, %esi
callq 0x57c40
xorl %eax, %eax
movq %rax, 0xb84d9(%rip)     # 0x177c08
movq %rax, 0xb84da(%rip)     # 0x177c10
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/classes/gui/window/backends/xlib/windowxlib.cpp
// Function: smooth::GUI::WindowXLib::WindowXLib(void*)
S::GUI::WindowXLib::WindowXLib(Void *iWindow)
{
	type		= WINDOW_XLIB;

	display		= Backends::BackendXLib::GetDisplay();
	im		= Backends::BackendXLib::GetIM();

	if (display == NIL)
	{
		fprintf(stderr, "Error: Unable to open display.\n");

		exit(EXIT_FAILURE);
	}

	wnd		= None;
	oldwnd		= None;

	ic		= NIL;
	iwnd		= None;

	id		= windowBackends.Add(this);

	minSize		= Size(160, 24);

	maximized	= False;

	fontSize	= Surface().GetSurfaceDPI() / 96.0;

	flags		= 0;

	sysIcon		= NIL;
	sysIconSize	= 0;

	xdndTimeStamp	= CurrentTime;
	acceptDrop	= False;
	enableDropFiles	= False;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
xorl %esi, %esi
callq 0x9a998
leaq 0xab2e8(%rip), %rax     # 0x16aa48
movq %rax, (%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x1a4(%rbx)
leaq 0x1b8(%rbx), %r14
movups %xmm0, 0x180(%rbx)
movups %xmm0, 0x190(%rbx)
movq %r14, %rdi
xorl %esi, %esi
callq 0x58e20
leaq 0x1d0(%rbx), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x58e20
movw $0x2, 0x8(%rbx)
callq 0xbdf4e
movq %rax, 0x120(%rbx)
callq 0xbdf56
movq %rax, 0x128(%rbx)
cmpq $0x0, 0x120(%rbx)
je 0xbf881
xorps %xmm0, %xmm0
movups %xmm0, 0x148(%rbx)
movups %xmm0, 0x138(%rbx)
leaq 0x8(%rsp), %rsi
movq %rbx, (%rsi)
leaq 0xb83c7(%rip), %rdi     # 0x177bb0
callq 0x5af08
movl %eax, 0x130(%rbx)
movabsq $0x18000000a0, %rax     # imm = 0x18000000A0
movq %rax, 0x190(%rbx)
movb $0x0, 0x1a0(%rbx)
leaq 0x10(%rsp), %rdx
movq $0x0, (%rdx)
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
callq 0x57150
leaq 0x8(%rsp), %rdi
callq 0x58930
cwtl
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
divsd 0x34cb2(%rip), %xmm0    # 0xf44f0
movsd %xmm0, 0x178(%rbx)
leaq 0x8(%rsp), %rdi
callq 0x57b20
xorl %eax, %eax
movl %eax, 0x1b4(%rbx)
movq %rax, 0x158(%rbx)
movl %eax, 0x160(%rbx)
movq %rax, 0x168(%rbx)
movw $0x0, 0x170(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
callq 0x59220
movq %rax, %r12
leaq 0x8(%rsp), %rdi
callq 0x57b20
jmp 0xbf8a6
jmp 0xbf8a3
jmp 0xbf8a3
movq %rax, %r12
jmp 0xbf8ae
movq %rax, %r12
jmp 0xbf8b6
movq %rax, %r12
movq %r15, %rdi
callq 0x59200
movq %r14, %rdi
callq 0x59200
movq %rbx, %rdi
callq 0x9ab10
movq %r12, %rdi
callq 0x57090
// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/classes/gui/window/backends/xlib/windowxlib.cpp
// Function: smooth::GUI::WindowXLib::~WindowXLib()
S::GUI::WindowXLib::~WindowXLib()
{
	if (sysIcon != NIL)
	{
		delete [] sysIcon;

		sysIcon	    = NIL;
		sysIconSize = 0;
	}

	windowBackends.Remove(id);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0xab177(%rip), %rax     # 0x16aa48
movq %rax, (%rdi)
movq 0x158(%rdi), %rdi
testq %rdi, %rdi
je 0xbf8fa
callq 0x561e0
movq $0x0, 0x158(%rbx)
movl $0x0, 0x160(%rbx)
movl 0x130(%rbx), %esi
leaq 0xb82a9(%rip), %rdi     # 0x177bb0
callq 0x58bb0
leaq 0x1d0(%rbx), %rdi
callq 0x59200
leaq 0x1b8(%rbx), %rdi
callq 0x59200
movq %rbx, %rdi
popq %rbx
jmp 0x9ab10
movq %rax, %rdi
callq 0x5aede
nop
// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/classes/gui/window/backends/xlib/windowxlib.cpp
// Function: smooth::GUI::WindowXLib::GetWindowBackend(unsigned long)
S::GUI::WindowXLib *S::GUI::WindowXLib::GetWindowBackend(X11::Window wnd)
{
	if (wnd == None) return NIL;

	foreach (WindowXLib *window, windowBackends)
	{
		if (window == NIL) continue;

		if (window->wnd    == wnd ||
		    window->iwnd   == wnd ||
		    window->oldwnd == wnd) return window;
	}

	return NIL;
}

// Assembly:
testq %rdi, %rdi
je 0xbfbce
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xb8051(%rip), %r14     # 0x177bb0
xorl %r15d, %r15d
xorl %ecx, %ecx
testl %ecx, %ecx
jne 0xbfbc0
leal -0x1(%r15), %eax
movl 0xb8046(%rip), %ecx     # 0x177bb8
decl %ecx
cmpl %ecx, %eax
jge 0xbfbc0
movq %r14, %rdi
movl %r15d, %esi
callq 0x60a40
movq (%rax), %rax
testq %rax, %rax
je 0xbfbad
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movb $0x1, %dl
cmpq %rbx, 0x138(%rax)
je 0xbfbb4
cmpq %rbx, 0x150(%rax)
je 0xbfbb4
cmpq %rbx, 0x140(%rax)
je 0xbfbb4
xorl %edx, %edx
xorl %ecx, %ecx
movq %r12, %rax
incl %r15d
movq %rax, %r12
testb %dl, %dl
je 0xbfb64
jmp 0xbfbc2
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
xorl %eax, %eax
retq
nop
// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/classes/gui/window/backends/xlib/windowxlib.cpp
// Function: smooth::GUI::WindowXLib::IsModalWindowActive()
S::Bool S::GUI::WindowXLib::IsModalWindowActive()
{
	/* Ignore modal windows if this is a topmost window.
	 */
	if (flags & WF_TOPMOST) return False;

	/* Look for modal windows opened after ourselves.
	 */
	foreachreverse (WindowXLib *backend, windowBackends)
	{
		if	(backend == this)				    return False;
		else if (backend->wnd != None && backend->flags & WF_MODAL) return True;
	}

	return False;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testb $0x2, 0x1b4(%rdi)
sete %al
movl 0xb65ce(%rip), %r15d    # 0x177bb8
testl %r15d, %r15d
setg %cl
andb %al, %cl
xorl %r12d, %r12d
movl $0x0, %eax
cmpb $0x1, %cl
jne 0xc1662
movq %rdi, %rbx
leaq 0xb65a7(%rip), %r14     # 0x177bb0
leal -0x1(%r15), %ebp
movq %r14, %rdi
movl %ebp, %esi
callq 0x60a40
movq (%rax), %rcx
cmpq %rbx, %rcx
je 0xc1643
cmpq $0x0, 0x138(%rcx)
je 0xc1636
movb $0x1, %al
testb $0x1, 0x1b4(%rcx)
movb $0x1, %cl
jne 0xc1647
movl $0x1, %r12d
xorl %eax, %eax
movl %r13d, %ecx
jmp 0xc1647
movb $0x1, %al
xorl %ecx, %ecx
testb %al, %al
jne 0xc1660
xorl %eax, %eax
decl %r12d
jne 0xc1662
movl %ecx, %r13d
cmpl $0x2, %r15d
movl %ebp, %r15d
jge 0xc1609
jmp 0xc1662
movl %ecx, %eax
andb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/classes/gui/window/backends/xlib/windowxlib.cpp
// Function: smooth::GUI::WindowXLib::Close()
S::Int S::GUI::WindowXLib::Close()
{
	if (wnd == None) return Success();

	/* Delete surface.
	 */
	if (drawSurface != NIL) delete drawSurface;

	drawSurface = NIL;

	/* Destroy input context.
	 */
	DestroyInputContext();

	/* Destroy input window.
	 */
	if (iwnd != None)
	{
		XDestroyWindow(display, iwnd);

		iwnd = None;
	}

	/* Destroy window.
	 */
	XDestroyWindow(display, wnd);

	oldwnd	= wnd;
	wnd	= None;

	return Success();
}

// Assembly:
cmpq $0x0, 0x138(%rdi)
je 0xc21d1
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rdi), %r14
testq %r14, %r14
je 0xc216b
movq %r14, %rdi
callq 0x57b20
movl $0x8, %esi
movq %r14, %rdi
callq 0x55480
movq $0x0, 0x10(%rbx)
movq %rbx, %rdi
callq 0xc21d4
movq 0x150(%rbx), %rsi
testq %rsi, %rsi
je 0xc219e
movq 0x120(%rbx), %rdi
callq 0x56ee0
movq $0x0, 0x150(%rbx)
movq 0x120(%rbx), %rdi
movq 0x138(%rbx), %rsi
callq 0x56ee0
movq 0x138(%rbx), %rax
movq %rax, 0x140(%rbx)
movq $0x0, 0x138(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/classes/gui/window/backends/xlib/windowxlib.cpp
// Function: smooth::GUI::WindowXLib::DestroyInputContext()
S::Void S::GUI::WindowXLib::DestroyInputContext()
{
	if (ic == NIL) return;

	XLockDisplay(display);

	/* Reset event mask.
	 */
	XSelectInput(display, iwnd, 0);

	/* Clear input context.
	 */
	char *string = Xutf8ResetIC(ic);

	if (string != NIL) XFree(string);

	/* Destroy input context.
	 */
	XDestroyIC(ic);

	ic = NIL;

	XUnlockDisplay(display);
}

// Assembly:
cmpq $0x0, 0x148(%rdi)
je 0xc2240
pushq %rbx
movq %rdi, %rbx
movq 0x120(%rdi), %rdi
callq 0x58ec0
movq 0x120(%rbx), %rdi
movq 0x150(%rbx), %rsi
xorl %edx, %edx
callq 0x58600
movq 0x148(%rbx), %rdi
callq 0x58880
testq %rax, %rax
je 0xc221c
movq %rax, %rdi
callq 0x57e80
movq 0x148(%rbx), %rdi
callq 0x58d80
movq $0x0, 0x148(%rbx)
movq 0x120(%rbx), %rdi
popq %rbx
jmp 0x56760
retq
nop
// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/classes/gui/window/backends/xlib/windowxlib.cpp
// Function: smooth::GUI::WindowXLib::SetTitle(smooth::String const&)
S::Int S::GUI::WindowXLib::SetTitle(const String &nTitle)
{
	if (wnd == None) return Error();

	static Atom	 wmNameAtom	= XInternAtom(display, "_NET_WM_NAME", False);
	static Atom	 wmIconNameAtom = XInternAtom(display, "_NET_WM_ICON_NAME", False);

	XTextProperty	 titleProp;
	XTextProperty	 titlePropUTF8;

	const char	*title	   = nTitle.ConvertTo("ISO-8859-1");
	const char	*titleUTF8 = nTitle.ConvertTo("UTF-8");

	/* Set ISO encoded window name.
	 */
	if (XStringListToTextProperty((char **) &title, 1, &titleProp) != 0)
	{
		XSetWMName(display, wnd, &titleProp);
		XSetWMIconName(display, wnd, &titleProp);

		XFree(titleProp.value);
	}

	/* Set UTF-8 encoded window name.
	 */
	if (Xutf8TextListToTextProperty(display, (char **) &titleUTF8, 1, XUTF8StringStyle, &titlePropUTF8) == 0)
	{
		XSetTextProperty(display, wnd, &titlePropUTF8, wmNameAtom);
		XSetTextProperty(display, wnd, &titlePropUTF8, wmIconNameAtom);

		XFree(titlePropUTF8.value);
	}

	return Success();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x50, %rsp
cmpq $0x0, 0x138(%rdi)
je 0xc2381
movq %rsi, %r14
movq %rdi, %rbx
movb 0xb5bd3(%rip), %al      # 0x177e58
testb %al, %al
je 0xc2390
movb 0xb5bd5(%rip), %al      # 0x177e68
testb %al, %al
je 0xc23d4
leaq 0x507ff(%rip), %rsi     # 0x112aa1
movq %r14, %rdi
callq 0x57940
leaq 0x8(%rsp), %r15
movq %rax, (%r15)
leaq 0x50e6d(%rip), %rsi     # 0x113126
movq %r14, %rdi
callq 0x57940
movq %rax, (%rsp)
leaq 0x30(%rsp), %rdx
movq %r15, %rdi
movl $0x1, %esi
callq 0x56e40
testl %eax, %eax
je 0xc2314
movq 0x120(%rbx), %rdi
movq 0x138(%rbx), %rsi
leaq 0x30(%rsp), %r14
movq %r14, %rdx
callq 0x55780
movq 0x120(%rbx), %rdi
movq 0x138(%rbx), %rsi
movq %r14, %rdx
callq 0x56c60
movq (%r14), %rdi
callq 0x57e80
movq 0x120(%rbx), %rdi
movq %rsp, %rsi
leaq 0x10(%rsp), %r8
movl $0x1, %edx
movl $0x4, %ecx
callq 0x57c10
testl %eax, %eax
jne 0xc237d
movq 0x120(%rbx), %rdi
movq 0x138(%rbx), %rsi
movq 0xb5b05(%rip), %rcx     # 0x177e50
leaq 0x10(%rsp), %r14
movq %r14, %rdx
callq 0x55430
movq 0x120(%rbx), %rdi
movq 0x138(%rbx), %rsi
movq 0xb5af3(%rip), %rcx     # 0x177e60
movq %r14, %rdx
callq 0x55430
movq (%r14), %rdi
callq 0x57e80
xorl %eax, %eax
jmp 0xc2386
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x50, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0xb5ac1(%rip), %r15     # 0x177e58
movq %r15, %rdi
callq 0x56120
testl %eax, %eax
je 0xc228d
movq 0x120(%rbx), %rdi
leaq 0x51e21(%rip), %rsi     # 0x1141d6
xorl %edx, %edx
callq 0x57ea0
movq %rax, 0xb5a8d(%rip)     # 0x177e50
leaq 0xb5a8e(%rip), %rdi     # 0x177e58
callq 0x56b80
jmp 0xc228d
leaq 0xb5a8d(%rip), %r15     # 0x177e68
movq %r15, %rdi
callq 0x56120
testl %eax, %eax
je 0xc229b
movq 0x120(%rbx), %rdi
leaq 0x51dea(%rip), %rsi     # 0x1141e3
xorl %edx, %edx
callq 0x57ea0
movq %rax, 0xb5a59(%rip)     # 0x177e60
leaq 0xb5a5a(%rip), %rdi     # 0x177e68
callq 0x56b80
jmp 0xc229b
jmp 0xc241a
movq %rax, %rbx
movq %r15, %rdi
callq 0x56420
movq %rbx, %rdi
callq 0x57090
nop
// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/classes/gui/window/backends/xlib/windowxlib.cpp
// Function: smooth::GUI::WindowXLib::EnableDropFiles(bool)
S::Int S::GUI::WindowXLib::EnableDropFiles(Bool nEnableDropFiles)
{
	enableDropFiles = nEnableDropFiles;

	if (wnd == None) return Success();

	static Atom	 xdndAwareAtom = XInternAtom(display, "XdndAware", False);

	Int32	 xdndVersion = 5;

	if (enableDropFiles) XChangeProperty(display, wnd, xdndAwareAtom, XA_ATOM, 32, PropModeReplace, (unsigned char *) &xdndVersion, 1);
	else		     XDeleteProperty(display, wnd, xdndAwareAtom);

	return Success();
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movb %sil, 0x171(%rdi)
cmpq $0x0, 0x138(%rdi)
je 0xc2647
movq %rdi, %rbx
movb 0xb5881(%rip), %al      # 0x177e78
testb %al, %al
je 0xc264f
movl $0x5, 0xc(%rsp)
movq 0x120(%rbx), %rdi
movq 0x138(%rbx), %rsi
movq 0xb5858(%rip), %rdx     # 0x177e70
cmpb $0x1, 0x171(%rbx)
jne 0xc2642
leaq 0xc(%rsp), %rax
movl $0x4, %ecx
movl $0x20, %r8d
xorl %r9d, %r9d
pushq $0x1
pushq %rax
callq 0x57730
addq $0x10, %rsp
jmp 0xc2647
callq 0x585b0
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
retq
leaq 0xb5822(%rip), %rdi     # 0x177e78
callq 0x56120
testl %eax, %eax
je 0xc25fb
movq 0x120(%rbx), %rdi
leaq 0x51b88(%rip), %rsi     # 0x1141f5
xorl %edx, %edx
callq 0x57ea0
movq %rax, 0xb57f5(%rip)     # 0x177e70
leaq 0xb57f6(%rip), %rdi     # 0x177e78
callq 0x56b80
jmp 0xc25fb
movq %rax, %rbx
leaq 0xb57e2(%rip), %rdi     # 0x177e78
callq 0x56420
movq %rbx, %rdi
callq 0x57090
nop
// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/classes/gui/window/backends/xlib/windowxlib.cpp
// Function: smooth::GUI::WindowXLib::SetMinimumSize(smooth::GUI::Size const&)
S::Int S::GUI::WindowXLib::SetMinimumSize(const Size &nMinSize)
{
	minSize = nMinSize;

	UpdateWMNormalHints();

	if (wnd != None)
	{
		XResizeWindow(display, wnd, Math::Round(Math::Max(size.cx, minSize.cx) * fontSize) + sizeModifier.cx,
					    Math::Round(Math::Max(size.cy, minSize.cy) * fontSize) + sizeModifier.cy);
		XFlush(display);
	}

	return Success();
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rsi), %rax
movq %rax, 0x190(%rdi)
callq 0xbf94e
movq 0x138(%rbx), %rsi
testq %rsi, %rsi
je 0xc2c62
movl 0x188(%rbx), %eax
movl 0x190(%rbx), %ecx
cmpl %ecx, %eax
cmovgl %eax, %ecx
cvtsi2sd %ecx, %xmm0
movsd 0x178(%rbx), %xmm1
mulsd %xmm1, %xmm0
xorpd %xmm2, %xmm2
movapd %xmm0, %xmm3
cmpltsd %xmm2, %xmm3
movsd 0x317a7(%rip), %xmm4    # 0xf4390
movapd %xmm3, %xmm5
andpd %xmm4, %xmm5
movsd 0x3179f(%rip), %xmm6    # 0xf4398
andnpd %xmm6, %xmm3
orpd %xmm5, %xmm3
addsd %xmm0, %xmm3
cvttsd2si %xmm3, %rdx
addl 0x18(%rbx), %edx
movl 0x18c(%rbx), %eax
movl 0x194(%rbx), %ecx
cmpl %ecx, %eax
cmovgl %eax, %ecx
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
movq 0x120(%rbx), %rdi
mulsd %xmm1, %xmm0
movapd %xmm0, %xmm1
cmpltsd %xmm2, %xmm1
andpd %xmm1, %xmm4
andnpd %xmm6, %xmm1
orpd %xmm4, %xmm1
addsd %xmm0, %xmm1
cvttsd2si %xmm1, %rcx
addl 0x1c(%rbx), %ecx
callq 0x58940
movq 0x120(%rbx), %rdi
callq 0x55e10
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/classes/gui/window/backends/xlib/windowxlib.cpp
// Function: smooth::GUI::WindowXLib::SetMaximumSize(smooth::GUI::Size const&)
S::Int S::GUI::WindowXLib::SetMaximumSize(const Size &nMaxSize)
{
	maxSize = nMaxSize;

	UpdateWMNormalHints();

	if (wnd != None)
	{
		XResizeWindow(display, wnd, Math::Round(Math::Min(size.cx, maxSize.cx) * fontSize) + sizeModifier.cx,
					    Math::Round(Math::Min(size.cy, maxSize.cy) * fontSize) + sizeModifier.cy);
		XFlush(display);
	}

	return Success();
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rsi), %rax
movq %rax, 0x198(%rdi)
callq 0xbf94e
movq 0x138(%rbx), %rsi
testq %rsi, %rsi
je 0xc2d38
movl 0x188(%rbx), %eax
movl 0x198(%rbx), %ecx
cmpl %ecx, %eax
cmovll %eax, %ecx
cvtsi2sd %ecx, %xmm0
movsd 0x178(%rbx), %xmm1
mulsd %xmm1, %xmm0
xorpd %xmm2, %xmm2
movapd %xmm0, %xmm3
cmpltsd %xmm2, %xmm3
movsd 0x316d1(%rip), %xmm4    # 0xf4390
movapd %xmm3, %xmm5
andpd %xmm4, %xmm5
movsd 0x316c9(%rip), %xmm6    # 0xf4398
andnpd %xmm6, %xmm3
orpd %xmm5, %xmm3
addsd %xmm0, %xmm3
cvttsd2si %xmm3, %rdx
addl 0x18(%rbx), %edx
movl 0x18c(%rbx), %eax
movl 0x19c(%rbx), %ecx
cmpl %ecx, %eax
cmovll %eax, %ecx
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
movq 0x120(%rbx), %rdi
mulsd %xmm1, %xmm0
movapd %xmm0, %xmm1
cmpltsd %xmm2, %xmm1
andpd %xmm1, %xmm4
andnpd %xmm6, %xmm1
orpd %xmm4, %xmm1
addsd %xmm0, %xmm1
cvttsd2si %xmm1, %rcx
addl 0x1c(%rbx), %ecx
callq 0x58940
movq 0x120(%rbx), %rdi
callq 0x55e10
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/classes/gui/window/backends/xlib/windowxlib.cpp
// Function: smooth::GUI::WindowXLib::SetMetrics(smooth::GUI::Point const&, smooth::GUI::Size const&)
S::Int S::GUI::WindowXLib::SetMetrics(const Point &nPos, const Size &nSize)
{
	if (wnd == None) return Success();

	XMoveResizeWindow(display, wnd, nPos.x, nPos.y, Math::Round(nSize.cx * fontSize) + sizeModifier.cx, Math::Round(nSize.cy * fontSize) + sizeModifier.cy);
	XFlush(display);

	return Success();
}

// Assembly:
movq %rsi, %rax
movq 0x138(%rdi), %rsi
testq %rsi, %rsi
je 0xc2e44
pushq %rbx
movq %rdx, %rcx
movq %rdi, %rbx
movq 0x120(%rdi), %rdi
movl (%rax), %edx
cvtsi2sdl (%rcx), %xmm0
movsd 0x178(%rbx), %xmm1
mulsd %xmm1, %xmm0
xorpd %xmm2, %xmm2
movapd %xmm0, %xmm3
cmpltsd %xmm2, %xmm3
movsd 0x315b4(%rip), %xmm4    # 0xf4390
movapd %xmm3, %xmm5
andpd %xmm4, %xmm5
movsd 0x315ac(%rip), %xmm6    # 0xf4398
andnpd %xmm6, %xmm3
orpd %xmm5, %xmm3
addsd %xmm0, %xmm3
cvttsd2si %xmm3, %r8
addl 0x18(%rbx), %r8d
xorps %xmm0, %xmm0
cvtsi2sdl 0x4(%rcx), %xmm0
movl 0x4(%rax), %ecx
mulsd %xmm1, %xmm0
movapd %xmm0, %xmm1
cmpltsd %xmm2, %xmm1
andpd %xmm1, %xmm4
andnpd %xmm6, %xmm1
orpd %xmm4, %xmm1
addsd %xmm0, %xmm1
cvttsd2si %xmm1, %r9
addl 0x1c(%rbx), %r9d
callq 0x56f60
movq 0x120(%rbx), %rdi
callq 0x55e10
popq %rbx
xorl %eax, %eax
retq
nop
// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/classes/gui/window/backends/xlib/windowxlib.cpp
// Function: smooth::GUI::WindowXLib::Maximize()
S::Int S::GUI::WindowXLib::Maximize()
{
	if (wnd == None) return Success();

	static Atom	 wmStateAtom		  = XInternAtom(display, "_NET_WM_STATE", False);
	static Atom	 wmStateMaximizedHorzAtom = XInternAtom(display, "_NET_WM_STATE_MAXIMIZED_HORZ", False);
	static Atom	 wmStateMaximizedVertAtom = XInternAtom(display, "_NET_WM_STATE_MAXIMIZED_VERT", False);

	static Atom	 wmStateMaximizedAtoms[2] = { wmStateMaximizedHorzAtom, wmStateMaximizedVertAtom };

	if (!maximized)
	{
		XChangeProperty(display, wnd, wmStateAtom, XA_ATOM, 32, PropModeAppend, (unsigned char *) wmStateMaximizedAtoms, 2);
		XFlush(display);
	}

	return Success();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpq $0x0, 0x138(%rdi)
je 0xc2ee3
movq %rdi, %rbx
movb 0xb50a5(%rip), %al      # 0x177f08
testb %al, %al
je 0xc2eed
movb 0xb50a7(%rip), %al      # 0x177f18
testb %al, %al
je 0xc2f31
movb 0xb50a9(%rip), %al      # 0x177f28
testb %al, %al
je 0xc2f75
movb 0xb50b3(%rip), %al      # 0x177f40
testb %al, %al
je 0xc2fb9
cmpb $0x0, 0x1a0(%rbx)
jne 0xc2ee3
movq 0x120(%rbx), %rdi
movq 0x138(%rbx), %rsi
movq 0xb504d(%rip), %rdx     # 0x177f00
leaq 0xb5076(%rip), %rax     # 0x177f30
movl $0x4, %ecx
movl $0x20, %r8d
movl $0x2, %r9d
pushq $0x2
pushq %rax
callq 0x57730
addq $0x10, %rsp
movq 0x120(%rbx), %rdi
callq 0x55e10
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0xb5014(%rip), %r14     # 0x177f08
movq %r14, %rdi
callq 0x56120
testl %eax, %eax
je 0xc2e6b
movq 0x120(%rbx), %rdi
leaq 0x5117b(%rip), %rsi     # 0x11408d
xorl %edx, %edx
callq 0x57ea0
movq %rax, 0xb4fe0(%rip)     # 0x177f00
leaq 0xb4fe1(%rip), %rdi     # 0x177f08
callq 0x56b80
jmp 0xc2e6b
leaq 0xb4fe0(%rip), %r14     # 0x177f18
movq %r14, %rdi
callq 0x56120
testl %eax, %eax
je 0xc2e79
movq 0x120(%rbx), %rdi
leaq 0x51145(%rip), %rsi     # 0x11409b
xorl %edx, %edx
callq 0x57ea0
movq %rax, 0xb4fac(%rip)     # 0x177f10
leaq 0xb4fad(%rip), %rdi     # 0x177f18
callq 0x56b80
jmp 0xc2e79
leaq 0xb4fac(%rip), %r14     # 0x177f28
movq %r14, %rdi
callq 0x56120
testl %eax, %eax
je 0xc2e87
movq 0x120(%rbx), %rdi
leaq 0x5111e(%rip), %rsi     # 0x1140b8
xorl %edx, %edx
callq 0x57ea0
movq %rax, 0xb4f78(%rip)     # 0x177f20
leaq 0xb4f79(%rip), %rdi     # 0x177f28
callq 0x56b80
jmp 0xc2e87
callq 0x5926c
jmp 0xc2e95
jmp 0xc2fc7
jmp 0xc2fc7
movq %rax, %rbx
movq %r14, %rdi
callq 0x56420
movq %rbx, %rdi
callq 0x57090
// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/classes/gui/window/backends/xlib/../../../../../include/smooth/templates/signals/signal.h
// Function: int smooth::Signal2<void, smooth::GUI::Cursor*, smooth::GUI::Point const&>::Disconnect<void>(void (*)(smooth::GUI::Cursor*, smooth::GUI::Point const&))
Int Disconnect(slotReturnTYPE (*proc)(SIGNALS_ARGUMENT_TYPES))
			{
				if (slotsN == NIL) return Error();

				SIGNALS_SLOT_GLOBAL_CLASS_NAME<slotReturnTYPE SIGNALS_CONDITIONAL_COMMA SIGNALS_ARGUMENT_TYPES>	 slot(proc);

				for (Int i = slotsN->Length() - 1; i >= 0; i--)
				{
					if ((*((SIGNALS_SLOT_BASE_CLASS_NAME<Void SIGNALS_CONDITIONAL_COMMA SIGNALS_ARGUMENT_TYPES> *) slotsN->GetNth(i))) == slot)
					{
						RemoveNthN(i);

						break;
					}
				}

				return Success();
			}

// Assembly:
movq 0x10(%rdi), %rax
testq %rax, %rax
je 0xc36da
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0xa74e1(%rip), %rcx     # 0x16ab78
movq %rsp, %r14
movq %rcx, (%r14)
movq %rsi, 0x8(%r14)
movl 0x8(%rax), %ebp
testl %ebp, %ebp
jle 0xc36cf
decl %ebp
movq 0x10(%rbx), %rdi
movl %ebp, %esi
callq 0x5b0a4
movq (%rax), %rdi
movq (%rdi), %rax
movq %r14, %rsi
callq *0x20(%rax)
testb %al, %al
je 0xc36a4
movq %rbx, %rdi
movl %ebp, %esi
callq 0x95782
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/classes/system/backends/xlib/eventxlib.cpp
// Function: smooth::System::EventXLib::EventXLib()
S::System::EventXLib::EventXLib()
{
	type = EVENT_XLIB;

	display	= Backends::BackendXLib::GetDisplay();

	/* Deny timer interrupts outside of any event loops
	 * to prevent interruption of sensitive code.
	 */
	if (!nested++) EventProcessor::denyTimerInterrupts.Call();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0xb3826
leaq 0xa7195(%rip), %rax     # 0x16ac78
movq %rax, (%rbx)
movw $0x2, 0x8(%rbx)
callq 0xbdf4e
movq %rax, 0x10(%rbx)
movl 0xb4499(%rip), %eax     # 0x177f94
leal 0x1(%rax), %ecx
movl %ecx, 0xb4490(%rip)     # 0x177f94
testl %eax, %eax
jne 0xc3b14
movq 0xa9159(%rip), %rdi     # 0x16cc68
callq 0xc3cc4
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0xb3838
movq %r14, %rdi
callq 0x57090
nop