LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/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 0xb59bb(%rip), %al      # 0x16cd18
testb %al, %al
je 0xb7465
leaq 0xb5994(%rip), %rdi     # 0x16cd00
xorl %esi, %esi
callq 0x56280
testb %al, %al
jne 0xb744b
leaq 0xb597e(%rip), %rsi     # 0x16cd00
leaq 0x30(%rsp), %rdi
callq 0x58280
leaq 0x4ba53(%rip), %rsi     # 0x102de6
leaq 0x18(%rsp), %rdi
callq 0x58c40
leaq 0x30(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x573e0
movq %rax, %rdi
movq %r15, %rsi
callq 0x573e0
movq %rax, %r15
leaq 0x610cf(%rip), %rsi     # 0x118490
movq %rsp, %rdi
callq 0x58c40
movq %rsp, %rsi
movq %r15, %rdi
callq 0x573e0
movq %rax, %rdi
movq %r14, %rsi
callq 0x573e0
movq %rax, %rdi
callq 0x598d0
leaq 0x4b813(%rip), %rsi     # 0x102c01
movq %rax, %rdi
callq 0x58dd0
movq %rax, %r14
movq %rsp, %rdi
callq 0x5a588
leaq 0x18(%rsp), %rdi
callq 0x5a588
leaq 0x30(%rsp), %rdi
callq 0x5a588
testq %r14, %r14
je 0xb744b
leaq 0x30(%rsp), %rdi
movl $0x100, %esi            # imm = 0x100
movq %r14, %rdx
callq 0x580d0
movq %rax, %r15
movq %r14, %rdi
callq 0x562d0
testq %r15, %r15
je 0xb744b
leaq 0x30(%rsp), %rsi
movq %rbx, %rdi
callq 0x58c40
jmp 0xb7455
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5a180
movq %rbx, %rax
addq $0x130, %rsp            # imm = 0x130
popq %rbx
popq %r14
popq %r15
retq
leaq 0xb58ac(%rip), %rdi     # 0x16cd18
callq 0x57210
testl %eax, %eax
je 0xb7365
leaq 0x4b95c(%rip), %rsi     # 0x102ddc
leaq 0x30(%rsp), %rdi
callq 0x58c40
leaq 0xb586f(%rip), %rdi     # 0x16cd00
leaq 0x30(%rsp), %rsi
callq 0xb7120
leaq 0x30(%rsp), %rdi
callq 0x5a588
movq 0xaaa84(%rip), %rdi     # 0x161f30
leaq 0xb584d(%rip), %rsi     # 0x16cd00
leaq 0xacd86(%rip), %rdx     # 0x164240
callq 0x590a0
leaq 0xb5852(%rip), %rdi     # 0x16cd18
callq 0x57cf0
jmp 0xb7365
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x5a588
jmp 0xb74e2
movq %rax, %rbx
leaq 0xb582f(%rip), %rdi     # 0x16cd18
callq 0x57520
jmp 0xb751b
jmp 0xb74f7
movq %rax, %rbx
jmp 0xb7511
movq %rax, %rbx
jmp 0xb7507
movq %rax, %rbx
movq %rsp, %rdi
callq 0x5a588
leaq 0x18(%rsp), %rdi
callq 0x5a588
leaq 0x30(%rsp), %rdi
callq 0x5a588
movq %rbx, %rdi
callq 0x58260
nop
// File: /workspace/github_c_makefile_star2_O2/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 0xb5465(%rip), %al      # 0x16cd38
testb %al, %al
je 0xb79db
leaq 0xb543e(%rip), %rdi     # 0x16cd20
xorl %esi, %esi
callq 0x56280
testb %al, %al
jne 0xb79c1
leaq 0xb5428(%rip), %rsi     # 0x16cd20
leaq 0x30(%rsp), %rdi
callq 0x58280
leaq 0x4b4fb(%rip), %rsi     # 0x102e04
leaq 0x18(%rsp), %rdi
callq 0x58c40
leaq 0x30(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x573e0
movq %rax, %rdi
movq %r15, %rsi
callq 0x573e0
movq %rax, %r15
leaq 0x4b4d2(%rip), %rsi     # 0x102e09
movq %rsp, %rdi
callq 0x58c40
movq %rsp, %rsi
movq %r15, %rdi
callq 0x573e0
movq %rax, %rdi
movq %r14, %rsi
callq 0x573e0
movq %rax, %rdi
callq 0x598d0
leaq 0x4b29d(%rip), %rsi     # 0x102c01
movq %rax, %rdi
callq 0x58dd0
movq %rax, %r14
movq %rsp, %rdi
callq 0x5a588
leaq 0x18(%rsp), %rdi
callq 0x5a588
leaq 0x30(%rsp), %rdi
callq 0x5a588
testq %r14, %r14
je 0xb79c1
leaq 0x30(%rsp), %rdi
movl $0x100, %esi            # imm = 0x100
movq %r14, %rdx
callq 0x580d0
movq %rax, %r15
movq %r14, %rdi
callq 0x562d0
testq %r15, %r15
je 0xb79c1
leaq 0x30(%rsp), %rsi
movq %rbx, %rdi
callq 0x58c40
jmp 0xb79cb
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5a180
movq %rbx, %rax
addq $0x130, %rsp            # imm = 0x130
popq %rbx
popq %r14
popq %r15
retq
leaq 0xb5356(%rip), %rdi     # 0x16cd38
callq 0x57210
testl %eax, %eax
je 0xb78db
leaq 0x4b401(%rip), %rsi     # 0x102df7
leaq 0x30(%rsp), %rdi
callq 0x58c40
leaq 0xb5319(%rip), %rdi     # 0x16cd20
leaq 0x30(%rsp), %rsi
callq 0xb7120
leaq 0x30(%rsp), %rdi
callq 0x5a588
movq 0xaa50e(%rip), %rdi     # 0x161f30
leaq 0xb52f7(%rip), %rsi     # 0x16cd20
leaq 0xac810(%rip), %rdx     # 0x164240
callq 0x590a0
leaq 0xb52fc(%rip), %rdi     # 0x16cd38
callq 0x57cf0
jmp 0xb78db
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x5a588
jmp 0xb7a58
movq %rax, %rbx
leaq 0xb52d9(%rip), %rdi     # 0x16cd38
callq 0x57520
jmp 0xb7a91
jmp 0xb7a6d
movq %rax, %rbx
jmp 0xb7a87
movq %rax, %rbx
jmp 0xb7a7d
movq %rax, %rbx
movq %rsp, %rdi
callq 0x5a588
leaq 0x18(%rsp), %rdi
callq 0x5a588
leaq 0x30(%rsp), %rdi
callq 0x5a588
movq %rbx, %rdi
callq 0x58260
nop
// File: /workspace/github_c_makefile_star2_O2/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:
pushq %rbx
movq %rdi, %rbx
movq 0x28(%rdi), %rdi
testq %rdi, %rdi
je 0xb7f5d
movq 0x10(%rdi), %rax
testq %rax, %rax
je 0xb7f40
movq %rax, %rdi
callq 0x572d0
movq 0x28(%rbx), %rdi
andq $0x0, 0x10(%rdi)
callq *0x60(%rdi)
andq $0x0, 0x28(%rbx)
andw $0x0, 0xa(%rbx)
movb $0x0, 0xc(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
movb $0x1, %al
popq %rbx
retq
nop
// File: /workspace/github_c_makefile_star2_O2/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 0xb7fb9
testq %rbx, %rbx
je 0xb7fb0
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 0x562f0
jmp 0xb7fb9
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_O2/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 0xb80a1
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x8(%rsp), %rdi
pushq $0x1
popq %rax
movq %rdx, %rsi
movl %eax, %edx
callq 0x58f90
movzbl 0xa(%r14), %eax
cmpl $0x20, %eax
je 0xb806b
cmpl $0x18, %eax
je 0xb803f
cmpl $0x10, %eax
jne 0xb809a
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 0xb8097
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 0xb8097
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_O2/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 0xb80f4
movq %rsi, %r14
movl (%rdx), %esi
movl 0x4(%rdx), %edx
callq *0x68(%rdi)
movzbl 0xa(%r14), %ecx
cmpl $0x20, %ecx
je 0xb8119
cmpl $0x18, %ecx
je 0xb80f8
cmpl $0x10, %ecx
jne 0xb80f4
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 0xb8135
xorl %eax, %eax
jmp 0xb8135
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 0xb8135
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)
andl $0x0, (%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O2/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 $0x118, %rsp            # imm = 0x118
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 0x59ae0
movq %r15, %rdi
callq 0x56ed0
leaq 0x58(%rsp), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x59170
movq 0x78(%rsp), %rdi
callq 0xb8c8e
testq %rax, %rax
je 0xb827d
movq %rax, %rdi
movq %r12, %rsi
callq 0xb8e6e
cmpl $0x1f, 0x58(%rsp)
jne 0xb8258
leaq 0x38(%rsp), %r12
andq $0x0, (%r12)
movq %r12, 0x28(%rsp)
leaq 0x40(%rsp), %r13
movq %r13, 0x20(%rsp)
leaq 0x50(%rsp), %rbp
movq %rbp, 0x18(%rsp)
leaq 0x34(%rsp), %rax
movq %rax, 0x10(%rsp)
andq $0x0, (%rsp)
leaq 0x48(%rsp), %rax
movq %rax, 0x8(%rsp)
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x59410
movl %eax, %ecx
movq (%r12), %rax
testl %ecx, %ecx
jne 0xb8341
testq %rax, %rax
je 0xb82f3
movq %rax, %rdi
callq 0x59110
andq $0x0, 0x38(%rsp)
movq 0x40(%rsp), %r8
testq %r8, %r8
je 0xb833f
movq %r12, 0x28(%rsp)
movq %r13, 0x20(%rsp)
movq %rbp, 0x18(%rsp)
andq $0x0, (%rsp)
leaq 0x34(%rsp), %rax
movq %rax, 0x10(%rsp)
leaq 0x48(%rsp), %rax
movq %rax, 0x8(%rsp)
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
xorl %r9d, %r9d
callq 0x59410
movq 0x38(%rsp), %rax
jmp 0xb8341
xorl %eax, %eax
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/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 0x5a180
testq %r12, %r12
je 0xb8410
movq 0x18(%r15), %rdi
callq 0x562a0
movq %rax, %r12
movq 0x10(%r15), %rdi
movq %r14, %rsi
callq 0x59800
testq %rax, %rax
je 0xb8410
movq 0x10(%r15), %r13
leaq 0x4aab0(%rip), %rsi     # 0x102e52
pushq $0x1
popq %rdx
movq %r13, %rdi
callq 0x59130
movq %r13, %rsi
movq %r12, %rdx
movq %r14, %rcx
movq %rax, %r8
callq 0xb821a
movq %rax, %r13
testq %rax, %rax
je 0xb83e2
leaq 0x49df9(%rip), %rsi     # 0x1021c6
movq %rbx, %rdi
movq %r13, %rdx
callq 0x57ab0
movq %r13, %rdi
callq 0x59110
jmp 0xb8410
movq 0x10(%r15), %rsi
pushq $0x1f
popq %r8
movq %r12, %rdx
movq %r14, %rcx
callq 0xb821a
movq %rax, %r14
testq %rax, %rax
je 0xb8410
movq %rbx, %rdi
movq %r14, %rsi
callq 0x57010
movq %r14, %rdi
callq 0x59110
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0xb8423
jmp 0xb8423
jmp 0xb8423
movq %rax, %r14
movq %rbx, %rdi
callq 0x5a588
movq %r14, %rdi
callq 0x58260
// File: /workspace/github_c_makefile_star2_O2/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 0xb84be
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %r14
movq %rbx, %rdi
callq 0x562a0
movq %rax, %r13
movq %rax, %rdi
callq 0xb8c8e
testq %rax, %rax
je 0xb84a4
movq %rax, %rbp
movl $0x1b8, %ecx            # imm = 0x1B8
cmpq $0x1, %r15
je 0xb8496
movq 0x10(%r14), %rdi
leaq 0x4a9da(%rip), %rsi     # 0x102e5e
pushq $0x1
popq %rdx
callq 0x59130
movl $0x1d0, %ecx            # imm = 0x1D0
cmpq %r15, %rax
jne 0xb84a4
addq %rcx, %rbp
movq %rbp, %rdi
movq %r12, %rsi
callq 0x56630
movq 0x10(%r14), %rdi
movq %r15, %rsi
movq %r13, %rdx
xorl %ecx, %ecx
callq 0x56090
movq 0x10(%r14), %rdi
callq 0x56ed0
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_O2/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 0x56a50
movq %rax, %rdi
callq 0x562a0
movq %rax, %rdi
callq 0xb8c8e
testq %rax, %rax
je 0xb8718
movq %rax, %r15
movq 0xb477c(%rip), %rdi     # 0x16cdc8
cmpq %r14, %rdi
sete %al
testq %rdi, %rdi
sete %cl
orb %al, %cl
jne 0xb8661
callq 0xb8738
movq %r15, %rdi
callq 0xbc154
cmpq $0x0, 0x148(%r15)
je 0xb8718
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 0xa9713(%rip), %rsi     # 0x161db8
movq %rax, %rdi
callq 0x588a0
leal (%r12,%rax), %ecx
incl %ecx
movq (%rsp), %rdi
movq %r13, %rsi
movl %ebp, %edx
callq 0x560b0
leaq 0x10(%rsp), %r12
andq $0x0, (%r12)
leaq 0xc(%rsp), %rdx
andl $0x0, (%rdx)
movq 0x120(%r15), %rdi
movq %r12, %rsi
callq 0x56a90
movq 0x150(%r15), %rsi
cmpq %rsi, (%r12)
je 0xb870c
movq 0x120(%r15), %rdi
pushq $0x2
popq %rdx
xorl %ecx, %ecx
callq 0x57c10
movq 0x120(%r15), %rdi
callq 0x56ed0
movq 0x148(%r15), %rdi
callq 0x56730
movq %r14, 0xb46a9(%rip)     # 0x16cdc8
movq (%rbx), %rax
movq %rax, 0xb46a7(%rip)     # 0x16cdd0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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, 0xb4689(%rip)     # 0x16cdc8
je 0xb8742
retq
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
callq 0x56a50
movq %rax, %rdi
callq 0x562a0
movq %rax, %rdi
callq 0xb8c8e
testq %rax, %rax
je 0xb88a9
movq %rax, %rbx
cmpq $0x0, 0x148(%rax)
je 0xb88a9
movq %rbx, %rdi
callq 0xbb006
movq 0xb463c(%rip), %rdi     # 0x16cdc8
movq (%rdi), %rax
callq *0x90(%rax)
testb %al, %al
je 0xb88a9
movl 0xb462c(%rip), %r14d    # 0x16cdd0
leal -0x1(%r14), %ebp
movl 0xb4625(%rip), %r15d    # 0x16cdd4
leal -0x1(%r15), %r12d
movq 0xb460e(%rip), %rdi     # 0x16cdc8
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 0xb45e0(%rip), %rdi     # 0x16cdc8
movq (%rdi), %rax
callq *0x48(%rax)
movq %rax, %r15
movq %rax, %r12
shrq $0x20, %r12
movq 0xb45c9(%rip), %rdi     # 0x16cdc8
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 0x59e30
leaq 0x10(%rsp), %r15
movq %rax, (%r15)
movq %rdx, 0x8(%r15)
movq 0xb458b(%rip), %rdi     # 0x16cdc8
pushq $0x1
popq %rsi
callq 0x58ec0
movq 0x10(%rbx), %rdi
movq %r15, %rsi
callq 0x56160
movq 0x10(%rbx), %r12
movq 0xb456c(%rip), %rdi     # 0x16cdc8
movq (%rdi), %rax
callq *0x140(%rax)
movq 0xa973c(%rip), %rcx     # 0x161fa8
movl (%rcx), %ecx
andq $0x0, (%r14)
movq %rsp, %r8
movq %r12, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x58b80
movq 0xb453e(%rip), %rdi     # 0x16cdc8
movq (%rdi), %rax
xorl %esi, %esi
callq *0x78(%rax)
movq 0x10(%rbx), %rdi
callq 0x59a80
movq 0xb4526(%rip), %rdi     # 0x16cdc8
xorl %esi, %esi
callq 0x58ec0
andq $0x0, 0xb4517(%rip)     # 0x16cdc8
andq $0x0, 0xb4517(%rip)     # 0x16cdd0
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x962ae
leaq 0xa7186(%rip), %rax     # 0x15fa68
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 0x5a180
leaq 0x1d0(%rbx), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x5a180
movw $0x2, 0x8(%rbx)
callq 0xb7110
movq %rax, 0x120(%rbx)
callq 0xb7118
movq %rax, 0x128(%rbx)
cmpq $0x0, 0x120(%rbx)
je 0xb89fe
xorps %xmm0, %xmm0
movups %xmm0, 0x148(%rbx)
movups %xmm0, 0x138(%rbx)
leaq 0x8(%rsp), %rsi
movq %rbx, (%rsi)
leaq 0xb4405(%rip), %rdi     # 0x16cd70
callq 0xbc4e8
movl %eax, 0x130(%rbx)
movabsq $0x18000000a0, %rax     # imm = 0x18000000A0
movq %rax, 0x190(%rbx)
movb $0x0, 0x1a0(%rbx)
leaq 0x10(%rsp), %rdx
andq $0x0, (%rdx)
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
callq 0x58340
leaq 0x8(%rsp), %rdi
callq 0x59c60
cwtl
cvtsi2sd %eax, %xmm0
divsd 0x2ab56(%rip), %xmm0    # 0xe3510
movsd %xmm0, 0x178(%rbx)
leaq 0x8(%rsp), %rdi
callq 0x58d90
andl $0x0, 0x1b4(%rbx)
andq $0x0, 0x158(%rbx)
andl $0x0, 0x160(%rbx)
andq $0x0, 0x168(%rbx)
andw $0x0, 0x170(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0xa8ec3(%rip), %rax     # 0x1618c8
movq (%rax), %rcx
leaq 0x4a711(%rip), %rdi     # 0x103120
pushq $0x1f
popq %rsi
pushq $0x1
popq %rdx
callq 0x59c00
pushq $0x1
popq %rdi
callq 0x58310
movq %rax, %r12
leaq 0x8(%rsp), %rdi
callq 0x58d90
jmp 0xb8a42
jmp 0xb8a3f
jmp 0xb8a3f
movq %rax, %r12
jmp 0xb8a4a
movq %rax, %r12
jmp 0xb8a52
movq %rax, %r12
movq %r15, %rdi
callq 0x5a588
movq %r14, %rdi
callq 0x5a588
movq %rbx, %rdi
callq 0x9640c
movq %r12, %rdi
callq 0x58260
// File: /workspace/github_c_makefile_star2_O2/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 0xa6ffb(%rip), %rax     # 0x15fa68
movq %rax, (%rdi)
movq 0x158(%rdi), %rdi
testq %rdi, %rdi
je 0xb8a90
callq 0x572d0
andq $0x0, 0x158(%rbx)
andl $0x0, 0x160(%rbx)
movl 0x130(%rbx), %esi
leaq 0xb42d3(%rip), %rdi     # 0x16cd70
callq 0x59f00
leaq 0x1d0(%rbx), %rdi
callq 0x5a588
leaq 0x1b8(%rbx), %rdi
callq 0x5a588
movq %rbx, %rdi
popq %rbx
jmp 0x9640c
movq %rax, %rdi
callq 0x5bffa
nop
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/gui/window/backends/xlib/windowxlib.cpp
// Function: smooth::GUI::WindowXLib::UpdateWMNormalHints()
S::Void S::GUI::WindowXLib::UpdateWMNormalHints()
{
	if (wnd == None) return;

	XSizeHints	 normal;

	normal.flags	   = (minSize != Size() ? PMinSize : 0) |
			     (maxSize != Size() ? PMaxSize : 0) |
			     (flags & WF_NORESIZE ? PPosition | PSize : 0);

	normal.x	   = pos.x;
	normal.y	   = pos.y;

	normal.width	   = Math::Round(size.cx * fontSize) + sizeModifier.cx;
	normal.height	   = Math::Round(size.cy * fontSize) + sizeModifier.cy;

	normal.min_width   = Math::Round(minSize.cx * fontSize) + sizeModifier.cx;
	normal.min_height  = Math::Round(minSize.cy * fontSize) + sizeModifier.cy;

	normal.max_width   = Math::Round(maxSize.cx * fontSize) + sizeModifier.cx;
	normal.max_height  = Math::Round(maxSize.cy * fontSize) + sizeModifier.cy;

	XSetWMNormalHints(display, wnd, &normal);
}

// Assembly:
movq 0x138(%rdi), %rsi
testq %rsi, %rsi
je 0xb8c85
subq $0x58, %rsp
xorl %ecx, %ecx
testb $0x4, 0x1b4(%rdi)
pushq $0xc
popq %rax
cmoveq %rcx, %rax
movq 0x180(%rdi), %rcx
leaq 0x8(%rsp), %rdx
movq %rcx, 0x8(%rdx)
movdqu 0x188(%rdi), %xmm5
movq 0x18(%rdi), %xmm0
pshufd $0xee, %xmm5, %xmm1     # xmm1 = xmm5[2,3,2,3]
cvtdq2pd %xmm1, %xmm8
pshufd $0x44, %xmm0, %xmm6     # xmm6 = xmm0[0,1,0,1]
cvtdq2pd %xmm5, %xmm9
movsd 0x178(%rdi), %xmm1
unpcklpd %xmm1, %xmm1            # xmm1 = xmm1[0,0]
mulpd %xmm1, %xmm9
mulpd %xmm1, %xmm8
xorpd %xmm2, %xmm2
movapd %xmm8, %xmm7
cmpltpd %xmm2, %xmm7
movapd %xmm9, %xmm10
cmpltpd %xmm2, %xmm10
movapd 0x4a320(%rip), %xmm4    # 0x102e90
movapd 0x4a328(%rip), %xmm3    # 0x102ea0
movapd %xmm3, %xmm11
andpd %xmm10, %xmm11
andnpd %xmm4, %xmm10
orpd %xmm11, %xmm10
movapd %xmm3, %xmm11
andpd %xmm7, %xmm11
andnpd %xmm4, %xmm7
orpd %xmm11, %xmm7
addpd %xmm8, %xmm7
addpd %xmm9, %xmm10
cvttsd2si %xmm10, %rcx
movq %rcx, %xmm8
unpckhpd %xmm10, %xmm10          # xmm10 = xmm10[1,1]
cvttsd2si %xmm10, %rcx
movq %rcx, %xmm9
punpcklqdq %xmm9, %xmm8    # xmm8 = xmm8[0],xmm9[0]
cvttsd2si %xmm7, %rcx
movq %rcx, %xmm9
unpckhpd %xmm7, %xmm7            # xmm7 = xmm7[1,1]
cvttsd2si %xmm7, %rcx
movq %rcx, %xmm7
punpcklqdq %xmm7, %xmm9    # xmm9 = xmm9[0],xmm7[0]
shufps $0x88, %xmm9, %xmm8     # xmm8 = xmm8[0,2],xmm9[0,2]
paddd %xmm6, %xmm8
movdqu %xmm8, 0x10(%rdx)
movsd 0x198(%rdi), %xmm6
cvtdq2pd %xmm6, %xmm7
shufps $0xb1, %xmm5, %xmm6     # xmm6 = xmm6[1,0],xmm5[3,2]
pcmpeqd %xmm2, %xmm6
movmskps %xmm6, %ecx
xorl $0xf, %ecx
xorl %r8d, %r8d
testb $0xc, %cl
setne %r8b
shll $0x4, %r8d
xorl %r9d, %r9d
testb $0x3, %cl
setne %r9b
shll $0x5, %r9d
orl %r8d, %r9d
orq %rax, %r9
movq %r9, (%rdx)
mulpd %xmm1, %xmm7
movapd %xmm7, %xmm1
cmpltpd %xmm2, %xmm1
andpd %xmm1, %xmm3
andnpd %xmm4, %xmm1
orpd %xmm3, %xmm1
addpd %xmm7, %xmm1
cvttsd2si %xmm1, %rax
movq %rax, %xmm2
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
cvttsd2si %xmm1, %rax
movq %rax, %xmm1
punpckldq %xmm1, %xmm2    # xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1]
paddd %xmm0, %xmm2
movq %xmm2, 0x20(%rdx)
movq 0x120(%rdi), %rdi
callq 0x576f0
addq $0x58, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0xb8ce8
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0xb40ce(%rip), %r14     # 0x16cd70
xorl %r15d, %r15d
leal -0x1(%r15), %eax
movl 0xb40c9(%rip), %ecx     # 0x16cd78
decl %ecx
cmpl %ecx, %eax
jge 0xb8ceb
movq %r14, %rdi
movl %r15d, %esi
callq 0x6180a
movq (%rax), %rax
testq %rax, %rax
je 0xb8ce3
cmpq %rbx, 0x138(%rax)
je 0xb8ced
cmpq %rbx, 0x150(%rax)
je 0xb8ced
cmpq %rbx, 0x140(%rax)
je 0xb8ced
incl %r15d
jmp 0xb8ca5
xorl %eax, %eax
retq
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O2/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:
testb $0x2, 0x1b4(%rdi)
jne 0xba5f6
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0xb27bc(%rip), %r15d    # 0x16cd78
leaq 0xb27ad(%rip), %r14     # 0x16cd70
testl %r15d, %r15d
jle 0xba5ff
leal -0x1(%r15), %ebp
movq %r14, %rdi
movl %ebp, %esi
callq 0x6180a
movq (%rax), %rax
cmpq %rbx, %rax
je 0xba5f9
cmpq $0x0, 0x138(%rax)
je 0xba5f1
testb $0x1, 0x1b4(%rax)
jne 0xba5fd
movl %ebp, %r15d
jmp 0xba5c3
xorl %eax, %eax
retq
xorl %ecx, %ecx
jmp 0xba5ff
movb $0x1, %cl
testl %r15d, %r15d
setg %al
andb %cl, %al
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/gui/window/backends/xlib/windowxlib.cpp
// Function: smooth::GUI::WindowXLib::FindLeaderWindow()
S::GUI::WindowXLib *S::GUI::WindowXLib::FindLeaderWindow()
{
	/* The leader window is the newest non topmost window.
	 */
	foreachreverse (WindowXLib *backend, windowBackends)
	{
		if (  backend->id    <	id   &&
		      backend->wnd   != None &&
		    !(backend->flags &	WF_TOPMOST)) return backend;
	}

	return NIL;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl 0xb1e49(%rip), %ebp     # 0x16cd78
leaq 0xb1e3a(%rip), %r14     # 0x16cd70
testl %ebp, %ebp
jle 0xbaf6c
decl %ebp
movq %r14, %rdi
movl %ebp, %esi
callq 0x6180a
movq (%rax), %rax
movl 0x130(%rax), %ecx
cmpl 0x130(%rbx), %ecx
jge 0xbaf36
cmpq $0x0, 0x138(%rax)
je 0xbaf36
testb $0x2, 0x1b4(%rax)
jne 0xbaf36
jmp 0xbaf6e
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/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 0xbb002
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rdi), %r14
testq %r14, %r14
je 0xbafa5
movq %r14, %rdi
callq 0x58d90
pushq $0x8
popq %rsi
movq %r14, %rdi
callq 0x564c0
andq $0x0, 0x10(%rbx)
movq %rbx, %rdi
callq 0xbb006
movq 0x150(%rbx), %rsi
testq %rsi, %rsi
je 0xbafd2
movq 0x120(%rbx), %rdi
callq 0x58090
andq $0x0, 0x150(%rbx)
movq 0x120(%rbx), %rdi
movq 0x138(%rbx), %rsi
callq 0x58090
movq 0x138(%rbx), %rax
movq %rax, 0x140(%rbx)
andq $0x0, 0x138(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
xorl %eax, %eax
retq
nop
// File: /workspace/github_c_makefile_star2_O2/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 0xbb06f
pushq %rbx
movq %rdi, %rbx
movq 0x120(%rdi), %rdi
callq 0x5a230
movq 0x120(%rbx), %rdi
movq 0x150(%rbx), %rsi
xorl %edx, %edx
callq 0x598f0
movq 0x148(%rbx), %rdi
callq 0x59bb0
testq %rax, %rax
je 0xbb04e
movq %rax, %rdi
callq 0x59110
movq 0x148(%rbx), %rdi
callq 0x5a0d0
andq $0x0, 0x148(%rbx)
movq 0x120(%rbx), %rdi
popq %rbx
jmp 0x578a0
retq
// File: /workspace/github_c_makefile_star2_O2/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 0xbb1a9
movq %rsi, %r14
movq %rdi, %rbx
movb 0xb1f65(%rip), %al      # 0x16d018
testb %al, %al
je 0xbb1b6
movb 0xb1f67(%rip), %al      # 0x16d028
testb %al, %al
je 0xbb1fa
leaq 0x46a71(%rip), %rsi     # 0x101b41
movq %r14, %rdi
callq 0x58b90
leaq 0x8(%rsp), %r15
movq %rax, (%r15)
leaq 0x470df(%rip), %rsi     # 0x1021c6
movq %r14, %rdi
callq 0x58b90
movq %rax, (%rsp)
pushq $0x1
popq %rsi
leaq 0x30(%rsp), %rdx
movq %r15, %rdi
callq 0x57ff0
testl %eax, %eax
je 0xbb140
movq 0x120(%rbx), %rdi
movq 0x138(%rbx), %rsi
leaq 0x30(%rsp), %r14
movq %r14, %rdx
callq 0x567e0
movq 0x120(%rbx), %rdi
movq 0x138(%rbx), %rsi
movq %r14, %rdx
callq 0x57de0
movq (%r14), %rdi
callq 0x59110
movq 0x120(%rbx), %rdi
movq %rsp, %rsi
pushq $0x1
popq %rdx
pushq $0x4
popq %rcx
leaq 0x10(%rsp), %r8
callq 0x58e90
testl %eax, %eax
jne 0xbb1a5
movq 0x120(%rbx), %rdi
movq 0x138(%rbx), %rsi
movq 0xb1e9d(%rip), %rcx     # 0x16d010
leaq 0x10(%rsp), %r14
movq %r14, %rdx
callq 0x56470
movq 0x120(%rbx), %rdi
movq 0x138(%rbx), %rsi
movq 0xb1e8b(%rip), %rcx     # 0x16d020
movq %r14, %rdx
callq 0x56470
movq (%r14), %rdi
callq 0x59110
xorl %eax, %eax
jmp 0xbb1ac
pushq $-0x1
popq %rax
addq $0x50, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0xb1e5b(%rip), %r15     # 0x16d018
movq %r15, %rdi
callq 0x57210
testl %eax, %eax
je 0xbb0bb
movq 0x120(%rbx), %rdi
leaq 0x480e7(%rip), %rsi     # 0x1032c2
xorl %edx, %edx
callq 0x59130
movq %rax, 0xb1e27(%rip)     # 0x16d010
leaq 0xb1e28(%rip), %rdi     # 0x16d018
callq 0x57cf0
jmp 0xbb0bb
leaq 0xb1e27(%rip), %r15     # 0x16d028
movq %r15, %rdi
callq 0x57210
testl %eax, %eax
je 0xbb0c9
movq 0x120(%rbx), %rdi
leaq 0x480b0(%rip), %rsi     # 0x1032cf
xorl %edx, %edx
callq 0x59130
movq %rax, 0xb1df3(%rip)     # 0x16d020
leaq 0xb1df4(%rip), %rdi     # 0x16d028
callq 0x57cf0
jmp 0xbb0c9
jmp 0xbb240
movq %rax, %rbx
movq %r15, %rdi
callq 0x57520
movq %rbx, %rdi
callq 0x58260
nop
// File: /workspace/github_c_makefile_star2_O2/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 0xbb467
movq %rdi, %rbx
movb 0xb1c1b(%rip), %al      # 0x16d038
testb %al, %al
je 0xbb46f
movl $0x5, 0xc(%rsp)
movq 0x120(%rbx), %rdi
movq 0x138(%rbx), %rsi
movq 0xb1bf2(%rip), %rdx     # 0x16d030
cmpb $0x1, 0x171(%rbx)
jne 0xbb462
leaq 0xc(%rsp), %rax
pushq $0x4
popq %rcx
pushq $0x20
popq %r8
xorl %r9d, %r9d
pushq $0x1
pushq %rax
callq 0x58960
popq %rcx
popq %rdx
jmp 0xbb467
callq 0x598a0
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
retq
leaq 0xb1bc2(%rip), %rdi     # 0x16d038
callq 0x57210
testl %eax, %eax
je 0xbb421
movq 0x120(%rbx), %rdi
leaq 0x47e54(%rip), %rsi     # 0x1032e1
xorl %edx, %edx
callq 0x59130
movq %rax, 0xb1b95(%rip)     # 0x16d030
leaq 0xb1b96(%rip), %rdi     # 0x16d038
callq 0x57cf0
jmp 0xbb421
movq %rax, %rbx
leaq 0xb1b82(%rip), %rdi     # 0x16d038
callq 0x57520
movq %rbx, %rdi
callq 0x58260
nop
// File: /workspace/github_c_makefile_star2_O2/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 0xb8ae4
movq 0x138(%rbx), %rsi
testq %rsi, %rsi
je 0xbba56
movupd 0x178(%rbx), %xmm0
movq 0x188(%rbx), %xmm1
movq 0x190(%rbx), %xmm2
movdqa %xmm1, %xmm3
pcmpgtd %xmm2, %xmm3
pand %xmm3, %xmm1
pandn %xmm2, %xmm3
por %xmm1, %xmm3
cvtdq2pd %xmm3, %xmm1
unpcklpd %xmm0, %xmm0            # xmm0 = xmm0[0,0]
mulpd %xmm1, %xmm0
xorpd %xmm1, %xmm1
movapd %xmm0, %xmm2
cmpltpd %xmm1, %xmm2
movmskpd %xmm2, %eax
movsd 0x27972(%rip), %xmm1    # 0xe3378
movsd 0x27972(%rip), %xmm2    # 0xe3380
movapd %xmm1, %xmm3
testb $0x1, %al
jne 0xbba1a
movapd %xmm2, %xmm3
addsd %xmm0, %xmm3
cvttsd2si %xmm3, %rdx
movq 0x120(%rbx), %rdi
addl 0x18(%rbx), %edx
testb $0x2, %al
jne 0xbba35
movapd %xmm2, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %rcx
addl 0x1c(%rbx), %ecx
callq 0x59c70
movq 0x120(%rbx), %rdi
callq 0x56ed0
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/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 0xb8ae4
movq 0x138(%rbx), %rsi
testq %rsi, %rsi
je 0xbbb1e
movupd 0x178(%rbx), %xmm0
movq 0x188(%rbx), %xmm1
movq 0x198(%rbx), %xmm2
movdqa %xmm2, %xmm3
pcmpgtd %xmm1, %xmm3
pand %xmm3, %xmm1
pandn %xmm2, %xmm3
por %xmm1, %xmm3
cvtdq2pd %xmm3, %xmm1
unpcklpd %xmm0, %xmm0            # xmm0 = xmm0[0,0]
mulpd %xmm1, %xmm0
xorpd %xmm1, %xmm1
movapd %xmm0, %xmm2
cmpltpd %xmm1, %xmm2
movmskpd %xmm2, %eax
movsd 0x278aa(%rip), %xmm1    # 0xe3378
movsd 0x278aa(%rip), %xmm2    # 0xe3380
movapd %xmm1, %xmm3
testb $0x1, %al
jne 0xbbae2
movapd %xmm2, %xmm3
addsd %xmm0, %xmm3
cvttsd2si %xmm3, %rdx
movq 0x120(%rbx), %rdi
addl 0x18(%rbx), %edx
testb $0x2, %al
jne 0xbbafd
movapd %xmm2, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %rcx
addl 0x1c(%rbx), %ecx
callq 0x59c70
movq 0x120(%rbx), %rdi
callq 0x56ed0
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/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 0xbbc1b
pushq %rbx
movq %rdi, %rbx
cvtdq2pd (%rdx), %xmm1
movupd 0x178(%rdi), %xmm0
unpcklpd %xmm0, %xmm0            # xmm0 = xmm0[0,0]
mulpd %xmm1, %xmm0
xorpd %xmm1, %xmm1
movapd %xmm0, %xmm2
cmpltpd %xmm1, %xmm2
movmskpd %xmm2, %r9d
movsd 0x277b9(%rip), %xmm1    # 0xe3378
movsd 0x277b9(%rip), %xmm2    # 0xe3380
movapd %xmm1, %xmm3
testb $0x1, %r9b
jne 0xbbbd5
movapd %xmm2, %xmm3
movq 0x120(%rbx), %rdi
movl (%rax), %edx
addsd %xmm0, %xmm3
cvttsd2si %xmm3, %r8
movl 0x4(%rax), %ecx
addl 0x18(%rbx), %r8d
testb $0x2, %r9b
jne 0xbbbf8
movapd %xmm2, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %r9
addl 0x1c(%rbx), %r9d
callq 0x58110
movq 0x120(%rbx), %rdi
callq 0x56ed0
popq %rbx
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/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 0xbbca9
movq %rdi, %rbx
movb 0xb1493(%rip), %al      # 0x16d0c8
testb %al, %al
je 0xbbcb3
movb 0xb1499(%rip), %al      # 0x16d0d8
testb %al, %al
je 0xbbcf7
movb 0xb149b(%rip), %al      # 0x16d0e8
testb %al, %al
je 0xbbd3b
movb 0xb14a5(%rip), %al      # 0x16d100
testb %al, %al
je 0xbbd7f
cmpb $0x0, 0x1a0(%rbx)
jne 0xbbca9
movq 0x120(%rbx), %rdi
movq 0x138(%rbx), %rsi
movq 0xb143f(%rip), %rdx     # 0x16d0c0
leaq 0xb1468(%rip), %rax     # 0x16d0f0
pushq $0x4
popq %rcx
pushq $0x20
popq %r8
pushq $0x2
popq %r9
pushq $0x2
pushq %rax
callq 0x58960
popq %rcx
popq %rdx
movq 0x120(%rbx), %rdi
callq 0x56ed0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0xb140e(%rip), %r14     # 0x16d0c8
movq %r14, %rdi
callq 0x57210
testl %eax, %eax
je 0xbbc39
movq 0x120(%rbx), %rdi
leaq 0x474a1(%rip), %rsi     # 0x103179
xorl %edx, %edx
callq 0x59130
movq %rax, 0xb13da(%rip)     # 0x16d0c0
leaq 0xb13db(%rip), %rdi     # 0x16d0c8
callq 0x57cf0
jmp 0xbbc39
leaq 0xb13da(%rip), %r14     # 0x16d0d8
movq %r14, %rdi
callq 0x57210
testl %eax, %eax
je 0xbbc47
movq 0x120(%rbx), %rdi
leaq 0x4746b(%rip), %rsi     # 0x103187
xorl %edx, %edx
callq 0x59130
movq %rax, 0xb13a6(%rip)     # 0x16d0d0
leaq 0xb13a7(%rip), %rdi     # 0x16d0d8
callq 0x57cf0
jmp 0xbbc47
leaq 0xb13a6(%rip), %r14     # 0x16d0e8
movq %r14, %rdi
callq 0x57210
testl %eax, %eax
je 0xbbc55
movq 0x120(%rbx), %rdi
leaq 0x47444(%rip), %rsi     # 0x1031a4
xorl %edx, %edx
callq 0x59130
movq %rax, 0xb1372(%rip)     # 0x16d0e0
leaq 0xb1373(%rip), %rdi     # 0x16d0e8
callq 0x57cf0
jmp 0xbbc55
leaq 0xb137a(%rip), %rdi     # 0x16d100
callq 0x57210
testl %eax, %eax
je 0xbbc63
movq 0xb1336(%rip), %rax     # 0x16d0d0
movq %rax, 0xb134f(%rip)     # 0x16d0f0
movq 0xb1338(%rip), %rax     # 0x16d0e0
movq %rax, 0xb1349(%rip)     # 0x16d0f8
leaq 0xb134a(%rip), %rdi     # 0x16d100
callq 0x57cf0
jmp 0xbbc63
jmp 0xbbdc4
jmp 0xbbdc4
movq %rax, %rbx
movq %r14, %rdi
callq 0x57520
movq %rbx, %rdi
callq 0x58260
nop
// File: /workspace/github_c_makefile_star2_O2/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 0xbc482
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0xa3759(%rip), %rcx     # 0x15fb98
movq %rsp, %r14
movq %rcx, (%r14)
movq %rsi, 0x8(%r14)
movl 0x8(%rax), %ebp
testl %ebp, %ebp
jle 0xbc477
decl %ebp
movq 0x10(%rbx), %rdi
movl %ebp, %esi
callq 0x5c1b6
movq (%rax), %rdi
movq (%rdi), %rax
movq %r14, %rsi
callq *0x20(%rax)
testb %al, %al
je 0xbc44c
movq %rbx, %rdi
movl %ebp, %esi
callq 0x91792
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
pushq $-0x1
popq %rax
retq