LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/enzo1982[P]smooth/classes/gui/widgets/special/cursor.cpp
// Function: smooth::GUI::Cursor::ContainsRTLCharacters(smooth::String const&)
S::Bool S::GUI::Cursor::ContainsRTLCharacters(const String &line)
{
	FriBidiStrIndex	 length = line.Length();

	if (length == 0) return False;

	Bool		 rtlCharacters = False;

	if (Setup::useIconv)
	{
		/* Get BiDi types for input string.
		 */
		FriBidiCharType	*types = new FriBidiCharType [length + 1];

		fribidi_get_bidi_types((FriBidiChar *) line.ConvertTo("UCS-4LE"), length, types);

		/* Check if the input string contains RTL characters.
		 */
		for (Int i = 0; i < length; i++)
		{
			if (FRIBIDI_IS_RTL(types[i])) { rtlCharacters = True; break; }
		}

		delete [] types;
	}
	else
	{
		for (Int i = 0; i < length; i++)
		{
			if (line[i] >= 0x0590 && line[i] <= 0x08FF) { rtlCharacters = True; break; }
		}
	}

	return rtlCharacters;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0x57180
testl %eax, %eax
je 0x93dbc
movl %eax, %ebx
movq 0xd7640(%rip), %rax     # 0x16b360
cmpb $0x0, (%rax)
je 0x93d8e
leal 0x1(%rbx), %eax
shlq $0x2, %rax
cmpl $-0x1, %ebx
movq $-0x1, %rdi
cmovgeq %rax, %rdi
callq 0x56670
movq %rax, %r15
leaq 0x630c4(%rip), %rsi     # 0xf6e0d
movq %r14, %rdi
callq 0x57940
movq %rax, %rdi
movl %ebx, %esi
movq %r15, %rdx
callq 0x57cc0
testl %ebx, %ebx
jle 0x93dc0
movb $0x1, %bpl
testb $0x1, (%r15)
jne 0x93dc2
movl %ebx, %eax
movl $0x1, %edx
movq %rdx, %rcx
cmpq %rdx, %rax
je 0x93d85
leaq 0x1(%rcx), %rdx
testb $0x1, (%r15,%rcx,4)
je 0x93d72
cmpq %rax, %rcx
setb %bpl
jmp 0x93dc2
xorl %ebp, %ebp
testl %ebx, %ebx
jle 0x93dca
movq %r14, %rdi
movl %ebp, %esi
callq 0x57fe0
cmpl $0x590, %eax            # imm = 0x590
jl 0x93db6
movq %r14, %rdi
movl %ebp, %esi
callq 0x57fe0
cmpl $0x900, %eax            # imm = 0x900
jl 0x93dd7
incl %ebp
cmpl %ebp, %ebx
jne 0x93d94
xorl %ebp, %ebp
jmp 0x93dca
xorl %ebp, %ebp
movq %r15, %rdi
callq 0x561e0
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movb $0x1, %bpl
jmp 0x93dca
// File: /workspace/github_c_makefile_star2_O3/enzo1982[P]smooth/classes/gui/widgets/special/cursor.cpp
// Function: smooth::GUI::Cursor::ShowCursor(bool)
S::Void S::GUI::Cursor::ShowCursor(Bool visible)
{
	/* Cancel if cursor is displayed by the IME.
	 */
	if (imeCursor) return;

	/* Cancel if cursor is already in the desired state.
	 */
	if (promptVisible == visible) return;

	Surface	*surface = GetDrawSurface();
	Point	 point	 = GetRealPosition();

	Int	 line = 0;

	if (Binary::IsFlagSet(GetFlags(), CF_MULTILINE))
	{
		for (Int j = promptPos - 1; j >= 0; j--)
		{
			if (text[j] == '\n') line++;
		}
	}

	point.x += GetDisplayCursorPositionFromLogical(promptPos) + imeAdvance;
	point.y += (font.GetScaledTextSizeY() + 3) * (line - scrollPos);

	if (!(Binary::IsFlagSet(GetFlags(), CF_MULTILINE) && (line - scrollPos < 0 || (font.GetUnscaledTextSizeY() + 3) * (line - scrollPos + 1) > GetHeight())))
	{
		if (IsVisible()) surface->Box(Rect(point, Size(1, font.GetScaledTextSizeY() + 3)), 0, Rect::Inverted);

		promptVisible = visible;
	}
}

// Assembly:
cmpb $0x0, 0x5e0(%rdi)
jne 0x942ee
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %esi, %ebx
movq %rdi, %r14
cmpb %bl, 0x5c4(%rdi)
je 0x942e0
movq (%r14), %rax
movq %r14, %rdi
callq *0x40(%rax)
movq %rax, 0x18(%rsp)
movq (%r14), %rax
movq %r14, %rdi
callq *0x48(%rax)
movq %rax, 0x10(%rsp)
movl 0x30(%r14), %edi
movl $0x1, %esi
callq 0x583f0
xorl %r12d, %r12d
testb %al, %al
je 0x941d2
movl 0x5c0(%r14), %r13d
testl %r13d, %r13d
jle 0x941d2
leaq 0xf0(%r14), %r15
incl %r13d
xorl %r12d, %r12d
leal -0x2(%r13), %esi
movq %r15, %rdi
callq 0x58990
xorl %ecx, %ecx
cmpl $0xa, (%rax)
sete %cl
addl %ecx, %r12d
decl %r13d
cmpl $0x1, %r13d
ja 0x941b2
movl 0x5c0(%r14), %esi
movq %r14, %rdi
callq 0x580d0
movl %eax, %ebp
addl 0x10(%rsp), %ebp
addl 0x5dc(%r14), %ebp
leaq 0x140(%r14), %r13
movq 0xd7bbc(%rip), %rsi     # 0x16bdb8
movq %r13, %rdi
callq 0x57680
movl %eax, 0xc(%rsp)
movl %r12d, %r15d
subl 0x5d4(%r14), %r15d
movl 0x30(%r14), %edi
movl $0x1, %esi
callq 0x583f0
testb %al, %al
je 0x9425e
cmpl 0x5d4(%r14), %r12d
jl 0x942e0
movq 0xd7b80(%rip), %rsi     # 0x16bdb8
movq %r13, %rdi
callq 0x58a50
addl $0x3, %eax
subl 0x5d4(%r14), %r12d
incl %r12d
imull %eax, %r12d
cmpl 0xb4(%r14), %r12d
jg 0x942e0
movq (%r14), %rax
movq %r14, %rdi
callq *0x90(%rax)
testb %al, %al
je 0x942d9
movq 0x10(%rsp), %rax
shrq $0x20, %rax
movl 0xc(%rsp), %ecx
addl $0x3, %ecx
imull %ecx, %r15d
addl %eax, %r15d
movq 0xd7b2c(%rip), %rsi     # 0x16bdb8
movq %r13, %rdi
callq 0x57680
leaq 0x38(%rsp), %rsi
movl %ebp, (%rsi)
movl %r15d, 0x4(%rsi)
incl %ebp
movl %ebp, 0x8(%rsi)
addl %r15d, %eax
addl $0x3, %eax
movl %eax, 0xc(%rsi)
xorl %eax, %eax
leaq 0x28(%rsp), %rdx
movq %rax, 0x8(%rdx)
movl $0x0, (%rdx)
movq 0xd7a53(%rip), %rcx     # 0x16bd18
movl (%rcx), %ecx
leaq 0x20(%rsp), %r8
movq %rax, (%r8)
movq 0x18(%rsp), %rdi
callq 0x57930
movb %bl, 0x5c4(%r14)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/enzo1982[P]smooth/classes/gui/widgets/special/cursor.cpp
// Function: smooth::GUI::Cursor::GetDisplayCursorPositionFromLogical(int) const
S::Int S::GUI::Cursor::GetDisplayCursorPositionFromLogical(Int promptPos) const
{
	FriBidiStrIndex	 length = text.Length();

	if (length == 0) return 0;

	String	 wText = text;
	Int	 wPromptPos = promptPos;

	if (Binary::IsFlagSet(GetFlags(), CF_MULTILINE))
	{
		Int	 lineStart  = promptPos;
		Int	 lineLength = 0;

		for (Int i = promptPos - 1; i >= 0;	 i--) { if (text[i] == '\n')		     break; lineStart--;  }
		for (Int i = lineStart;	    i <  length; i++) { if (text[i] == '\n' || text[i] == 0) break; lineLength++; }

		wText = text.SubString(lineStart, lineLength);
		wPromptPos = promptPos - lineStart;
	}

	return GetDisplayCursorPositionFromLogical(wText, wPromptPos);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %esi, %ebp
movq %rdi, %rbx
leaq 0xf0(%rdi), %r14
movq %r14, %rdi
callq 0x57180
testl %eax, %eax
je 0x9441c
movl %eax, %r12d
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x570b0
movl 0x30(%rbx), %edi
movl $0x1, %esi
callq 0x583f0
testb %al, %al
je 0x943f0
movl %ebp, %r15d
movl %ebp, (%rsp)
testl %ebp, %ebp
jle 0x94372
movl (%rsp), %eax
movl %eax, %r15d
leal -0x1(%r15), %r13d
movq %r14, %rdi
movl %r13d, %esi
callq 0x57fe0
cmpl $0xa, %eax
je 0x94372
leal 0x1(%r13), %eax
movl %r13d, %r15d
cmpl $0x1, %eax
ja 0x9434f
xorl %r15d, %r15d
xorl %r13d, %r13d
movl %r12d, %eax
subl %r15d, %eax
jle 0x943be
movl %eax, 0x4(%rsp)
movl %r15d, %ebp
subl %r12d, %ebp
xorl %r13d, %r13d
leal (%r15,%r13), %r12d
movq %r14, %rdi
movl %r12d, %esi
callq 0x57fe0
cmpl $0xa, %eax
je 0x943be
movq %r14, %rdi
movl %r12d, %esi
callq 0x57fe0
testl %eax, %eax
je 0x943be
incl %r13d
movl %ebp, %eax
addl %r13d, %eax
jne 0x9438a
movl 0x4(%rsp), %eax
movl %eax, %r13d
leaq 0x20(%rsp), %rdi
movq %r14, %rsi
movl %r15d, %edx
movl %r13d, %ecx
callq 0x58f50
leaq 0x8(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x555f0
leaq 0x20(%rsp), %rdi
callq 0x59200
movl (%rsp), %ebp
subl %r15d, %ebp
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
movl %ebp, %edx
callq 0x58a90
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
movl %eax, %edx
callq 0x55350
movl %eax, %ebx
leaq 0x8(%rsp), %rdi
callq 0x59200
jmp 0x9441e
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x59200
jmp 0x94447
jmp 0x94444
jmp 0x94444
jmp 0x94444
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x59200
movq %rbx, %rdi
callq 0x57090
nop
// File: /workspace/github_c_makefile_star2_O3/enzo1982[P]smooth/classes/gui/widgets/special/cursor.cpp
// Function: smooth::GUI::Cursor::SetText(smooth::String const&)
S::Int S::GUI::Cursor::SetText(const String &newText)
{
	if (text == newText) return Success();

	Surface	*surface = GetDrawSurface();
	Rect	 frame	 = Rect(GetRealPosition(), GetRealSize());

	Bool	 visible = IsVisible();

	if (visible) surface->StartPaint(frame);

	ShowCursor(False);

	MarkText(-1, -1);

	lineIndices.RemoveAll();

	if (timer != NIL)
	{
		DeleteObject(timer);

		timer = NIL;
	}

	promptPos	= newText.Length();
	visibleOffset	= 0;
	scrollPos	= 0;

	ClearHistory();

	Widget::SetText(newText);

	if (IsActive()) AddHistoryEntry();

	if (visible) surface->EndPaint();

	return Success();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r15
movq %rdi, %rbx
addq $0xf0, %rdi
callq 0x55900
testb %al, %al
jne 0x94595
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x40(%rax)
movq %rax, %r14
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x48(%rax)
movq %rax, %r12
movq %rax, %r13
shrq $0x20, %r13
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x50(%rax)
leal (%rax,%r12), %ecx
shrq $0x20, %rax
movl %r12d, 0x8(%rsp)
movl %r13d, 0xc(%rsp)
movl %ecx, 0x10(%rsp)
addl %r13d, %eax
movl %eax, 0x14(%rsp)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x90(%rax)
movl %eax, %ebp
testb %al, %al
je 0x944e6
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x55160
movq %rbx, %rdi
xorl %esi, %esi
callq 0x58970
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x56ae0
leaq 0x5e8(%rbx), %rdi
callq 0x8603c
movq 0x5b8(%rbx), %rdi
testq %rdi, %rdi
je 0x9452a
callq 0x58cc0
movq $0x0, 0x5b8(%rbx)
movq %r15, %rdi
callq 0x57180
movl %eax, 0x5c0(%rbx)
movq $0x0, 0x5d0(%rbx)
leaq 0x650(%rbx), %rdi
callq 0x64126
leaq 0x6a8(%rbx), %rdi
callq 0x8603c
movl $0x0, 0x700(%rbx)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x56dd0
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x98(%rax)
testb %al, %al
je 0x94588
movq %rbx, %rdi
callq 0x587f0
testb %bpl, %bpl
je 0x94595
movq %r14, %rdi
callq 0x58780
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/enzo1982[P]smooth/classes/gui/widgets/special/cursor.cpp
// Function: smooth::GUI::Cursor::InsertFromClipboard()
S::Void S::GUI::Cursor::InsertFromClipboard()
{
	Bool	 selected = (markStart != markEnd && markStart >= 0 && markEnd >= 0);

	flags |= CF_NOINPUT;

	DeleteSelectedText();

	flags ^= CF_NOINPUT;

	String	 insertText = Clipboard(container->GetContainerWindow()).GetClipboardText();

	if (insertText.Length() > 0 && (insertText.Length() + text.Length()) <= maxSize)
	{
		if (Binary::IsFlagSet(container->GetFlags(), EDB_NUMERIC) && (insertText.ToInt() == 0 && insertText[0] != '0')) return;

		if (selected) RemoveHistoryEntry();

		InsertText(insertText);
	}

	onInput.Emit(text);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
movl 0x5c8(%rdi), %eax
movl 0x5cc(%rdi), %ecx
cmpl %ecx, %eax
setne %r15b
orl %eax, %ecx
setns %r12b
orb $0x40, 0x33(%rdi)
callq 0x591d8
xorb $0x40, 0x33(%rbx)
movq 0x190(%rbx), %rdi
callq 0x559e0
leaq 0x20(%rsp), %r14
movq %r14, %rdi
movq %rax, %rsi
callq 0x581d0
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x56980
leaq 0x20(%rsp), %rdi
callq 0x586c0
leaq 0x8(%rsp), %rdi
callq 0x57180
testl %eax, %eax
jle 0x947b7
leaq 0x8(%rsp), %rdi
callq 0x57180
movl %eax, %ebp
leaq 0xf0(%rbx), %rdi
callq 0x57180
addl %ebp, %eax
cmpl 0x640(%rbx), %eax
jg 0x947b7
movq 0x190(%rbx), %rax
movl 0x30(%rax), %edi
movl $0x1, %esi
callq 0x583f0
testb %al, %al
je 0x9479d
leaq 0x8(%rsp), %rdi
callq 0x568c0
testq %rax, %rax
jne 0x9479d
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
callq 0x58990
cmpl $0x30, (%rax)
jne 0x947cd
andb %r12b, %r15b
je 0x947aa
movq %rbx, %rdi
callq 0x56870
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x56070
leaq 0x708(%rbx), %rdi
addq $0xf0, %rbx
movq %rbx, %rsi
callq 0x76794
leaq 0x8(%rsp), %rdi
callq 0x59200
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x586c0
jmp 0x94800
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x59200
movq %rbx, %rdi
callq 0x57090
// File: /workspace/github_c_makefile_star2_O3/enzo1982[P]smooth/classes/gui/widgets/special/cursor.cpp
// Function: smooth::GUI::Cursor::Undo()
S::Void S::GUI::Cursor::Undo()
{
	if (historyPos <= 1) return;

	lineIndices.RemoveAll();

	Surface	*surface = GetDrawSurface();

	surface->StartPaint(GetVisibleArea());

	Int	 index	 = --historyPos - 1;

	Widget::SetText(history.GetNth(index));
	SetCursorPos(historyPrompt.GetNth(index));

	surface->EndPaint();

	onInput.Emit(text);
}

// Assembly:
cmpl $0x2, 0x700(%rdi)
jl 0x9492c
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
addq $0x5e8, %rdi            # imm = 0x5E8
callq 0x8603c
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x40(%rax)
movq %rax, %r14
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x130(%rax)
movq %rsp, %rsi
movq %rax, (%rsi)
movq %rdx, 0x8(%rsi)
movq %r14, %rdi
callq 0x55160
movl 0x700(%rbx), %r15d
leal -0x1(%r15), %eax
movl %eax, 0x700(%rbx)
addl $-0x2, %r15d
leaq 0x650(%rbx), %rdi
movl %r15d, %esi
callq 0x6b610
movq %rbx, %rdi
movq %rax, %rsi
callq 0x56dd0
leaq 0x6a8(%rbx), %rdi
movl %r15d, %esi
callq 0x8661e
movl (%rax), %esi
movq %rbx, %rdi
callq 0x58a30
movq %r14, %rdi
callq 0x58780
leaq 0x708(%rbx), %rdi
addq $0xf0, %rbx
movq %rbx, %rsi
callq 0x76794
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O3/enzo1982[P]smooth/classes/gui/widgets/special/cursor.cpp
// Function: smooth::GUI::Cursor::Redo()
S::Void S::GUI::Cursor::Redo()
{
	if (historyPos >= history.Length()) return;

	lineIndices.RemoveAll();

	Surface	*surface = GetDrawSurface();

	surface->StartPaint(GetVisibleArea());

	Int	 index	 = historyPos++;

	Widget::SetText(history.GetNth(index));
	SetCursorPos(historyPrompt.GetNth(index));

	surface->EndPaint();

	onInput.Emit(text);
}

// Assembly:
movl 0x700(%rdi), %eax
cmpl 0x658(%rdi), %eax
jge 0x949f7
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x650(%rdi), %r15
addq $0x5e8, %rdi            # imm = 0x5E8
callq 0x8603c
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x40(%rax)
movq %rax, %r14
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x130(%rax)
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
movq %rdx, 0x8(%rsi)
movq %r14, %rdi
callq 0x55160
movl 0x700(%rbx), %r12d
leal 0x1(%r12), %eax
movl %eax, 0x700(%rbx)
movq %r15, %rdi
movl %r12d, %esi
callq 0x6b610
movq %rbx, %rdi
movq %rax, %rsi
callq 0x56dd0
leaq 0x6a8(%rbx), %rdi
movl %r12d, %esi
callq 0x8661e
movl (%rax), %esi
movq %rbx, %rdi
callq 0x58a30
movq %r14, %rdi
callq 0x58780
leaq 0x708(%rbx), %rdi
addq $0xf0, %rbx
movq %rbx, %rsi
callq 0x76794
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/enzo1982[P]smooth/classes/gui/widgets/special/dragcontrol.cpp
// Function: smooth::GUI::DragControl::DragControl()
S::GUI::DragControl::DragControl() : Widget(Point(), Size(4096, 4096))
{
	type		= classID;
	orientation	= OR_CENTER;

	dragHotspot	= new Hotspot(GetPosition(), GetSize());

	dragHotspot->onMouseDragStart.Connect(&DragControl::OnMouseDragStart, this);
	dragHotspot->onMouseDrag.Connect(&DragControl::OnMouseDrag, this);

	Add(dragHotspot);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
xorl %r14d, %r14d
leaq 0x8(%rsp), %rsi
movq %r14, (%rsi)
movabsq $0x100000001000, %rax   # imm = 0x100000001000
movq %rsp, %rdx
movq %rax, (%rdx)
callq 0x57a30
movq 0xd6a2d(%rip), %rax     # 0x16bf98
addq $0x10, %rax
movq %rax, (%rbx)
movq %r14, 0x5b8(%rbx)
movq 0xd68d8(%rip), %rax     # 0x16be58
movzwl (%rax), %eax
movw %ax, 0x20(%rbx)
movw $0x40, 0xd0(%rbx)
movl $0x5b8, %edi            # imm = 0x5B8
callq 0x556b0
movq %rax, %r14
leaq 0xa8(%rbx), %rsi
leaq 0xb0(%rbx), %rdx
movq %rax, %rdi
callq 0x55a30
movq %r14, 0x5c0(%rbx)
addq $0x3f8, %r14            # imm = 0x3F8
movq 0xd62a0(%rip), %rsi     # 0x16b868
movq %r14, %rdi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x95746
movl $0x418, %edi            # imm = 0x418
addq 0x5c0(%rbx), %rdi
movq 0xd63c0(%rip), %rsi     # 0x16b9a8
xorl %edx, %edx
movq %rbx, %rcx
callq 0x95746
movq 0x5c0(%rbx), %rsi
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x30(%rax)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r15
movl $0x5b8, %esi            # imm = 0x5B8
movq %r14, %rdi
callq 0x55480
jmp 0x95621
movq %rax, %r15
movq %rbx, %rdi
callq 0x57640
movq %r15, %rdi
callq 0x57090
nop
// File: /workspace/github_c_makefile_star2_O3/enzo1982[P]smooth/classes/gui/widgets/special/droparea.cpp
// Function: smooth::GUI::DropArea::DropArea(smooth::GUI::Point const&, smooth::GUI::Size const&)
S::GUI::DropArea::DropArea(const Point &iPos, const Size &iSize) : Widget(iPos, iSize)
{
	type	    = classID;
	dropTarget  = True;
	orientation = OR_FREE;

	if (GetSize() == Size(0, 0)) SetSize(Size(4096, 4096));

	onDropFile.SetParentObject(this);
	onDropFiles.SetParentObject(this);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x57a30
movq 0xd5b51(%rip), %rax     # 0x16b3f0
addq $0x10, %rax
movq %rax, (%rbx)
xorl %eax, %eax
movq %rax, 0x5c0(%rbx)
leaq 0xccf0a(%rip), %rcx     # 0x1627c0
movq %rcx, 0x5b8(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x5c8(%rbx)
movq %rax, 0x5e0(%rbx)
leaq 0xd1d33(%rip), %rax     # 0x167608
movq %rax, 0x5d8(%rbx)
movups %xmm0, 0x5e8(%rbx)
movq 0xd5cd6(%rip), %rax     # 0x16b5c0
movzwl (%rax), %eax
movw %ax, 0x20(%rbx)
movb $0x1, 0xd3(%rbx)
movw $0x80, 0xd0(%rbx)
movl 0xb4(%rbx), %eax
orl 0xb0(%rbx), %eax
jne 0x9593c
leaq 0x5b8(%rbx), %r14
leaq 0x5d8(%rbx), %r15
movabsq $0x100000001000, %rax   # imm = 0x100000001000
movq %rsp, %rdx
movq %rax, (%rdx)
leaq 0xa8(%rbx), %rsi
movq %rbx, %rdi
callq 0x57080
movq %rbx, 0x5c0(%rbx)
movq %rbx, 0x5e0(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r12
movq %r15, %rdi
callq 0x95b32
movq %r14, %rdi
callq 0x76616
movq %rbx, %rdi
callq 0x57640
movq %r12, %rdi
callq 0x57090
nop
// File: /workspace/github_c_makefile_star2_O3/enzo1982[P]smooth/classes/gui/widgets/special/droparea.cpp
// Function: smooth::GUI::DropArea::Process(int, int, int)
S::Int S::GUI::DropArea::Process(Int message, Int wParam, Int lParam)
{
	if (!IsRegistered())		 return Error();
	if (!IsActive() || !IsVisible()) return Success();

	switch (message)
	{
		case SM_DROPFILES:
			{
				Point	 mousePos = Point(wParam, lParam);

				Point	 realPos  = GetRealPosition();
				Size	 realSize = GetRealSize();

				if (mousePos.x > realPos.x && mousePos.x < (realPos.x + realSize.cx) && mousePos.y > realPos.y && mousePos.y < (realPos.y + realSize.cy))
				{
					const Array<String>	&fileNames = GetContainerWindow()->GetDroppedFiles();

					EnterProtectedRegion();

					foreach (const String &fileName, fileNames) onDropFile.Emit(fileName);

					onDropFiles.Emit(fileNames);

					LeaveProtectedRegion();

					return MessageProcessed;
				}
			}

			break;
	}

	return Widget::Process(message, wParam, lParam);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %ebp
movl %edx, %r14d
movl %esi, %r15d
movq %rdi, %rbx
movq (%rdi), %rax
callq *0x88(%rax)
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
testb %al, %al
je 0x95b0e
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x98(%rax)
xorl %r12d, %r12d
testb %al, %al
je 0x95b0e
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x90(%rax)
testb %al, %al
je 0x95b0e
cmpl $0x7814, %r15d          # imm = 0x7814
jne 0x95b1a
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x48(%rax)
movq %rax, %r12
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x50(%rax)
cmpl %r14d, %r12d
jge 0x95b1a
leal (%rax,%r12), %ecx
cmpl %r14d, %ecx
jle 0x95b1a
shrq $0x20, %r12
cmpl %ebp, %r12d
jge 0x95b1a
shrq $0x20, %rax
addl %r12d, %eax
cmpl %ebp, %eax
jle 0x95b1a
movq %rbx, %rdi
callq 0x559e0
movq %rax, %rdi
callq 0x583a0
movq %rax, %r15
leaq 0x1c(%rbx), %r14
movq %r14, %rdi
callq 0x578f0
cmpl $0x0, 0x8(%r15)
jle 0x95aee
leaq 0x5b8(%rbx), %r12
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
incl %ebp
movq %r15, %rdi
movl %ebp, %esi
callq 0x64250
movq %r12, %rdi
movq %rax, %rsi
callq 0x76794
movl 0x8(%r15), %eax
decl %eax
cmpl %eax, %ebp
jl 0x95acd
addq $0x5d8, %rbx            # imm = 0x5D8
movq %rbx, %rdi
movq %r15, %rsi
callq 0x95b4c
movq %r14, %rdi
callq 0x55cc0
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
movl %r12d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
movl %r15d, %esi
movl %r14d, %edx
movl %ebp, %ecx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x58220
// File: /workspace/github_c_makefile_star2_O3/enzo1982[P]smooth/classes/gui/widgets/special/shortcut.cpp
// Function: smooth::GUI::Shortcut::Shortcut(int, int, smooth::GUI::Widget*, int)
S::GUI::Shortcut::Shortcut(Int iFlags, Int iKey, Widget *iRef, Int iParam) : Widget(Point(), Size())
{
	type		= classID;
	orientation	= OR_FREE;

	key		= iKey;
	flags		= iFlags;
	param		= iParam;
	ref		= iRef;

	onKeyDown.SetParentObject(this);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %r8d, %ebp
movq %rcx, %rbx
movl %edx, %r14d
movl %esi, %r15d
movq %rdi, %r12
xorl %eax, %eax
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
movq %rsp, %rdx
movq %rax, (%rdx)
callq 0x57a30
movq 0xd6029(%rip), %rax     # 0x16bd60
addq $0x10, %rax
movq %rax, (%r12)
leaq 0xcc032(%rip), %rax     # 0x161d78
movq %rax, 0x5c8(%r12)
xorps %xmm0, %xmm0
movups %xmm0, 0x5d8(%r12)
movq 0xd5837(%rip), %rax     # 0x16b598
movzwl (%rax), %eax
movw %ax, 0x20(%r12)
movw $0x80, 0xd0(%r12)
movl %r14d, 0x5b8(%r12)
movl %r15d, 0x30(%r12)
movl %ebp, 0x5bc(%r12)
movq %rbx, 0x5c0(%r12)
movq %r12, 0x5d0(%r12)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/enzo1982[P]smooth/classes/gui/widgets/special/shortcut.cpp
// Function: smooth::GUI::Shortcut::Process(int, int, int)
S::Int S::GUI::Shortcut::Process(Int message, Int wParam, Int lParam)
{
	if (!IsRegistered()) return Error();
	if (!IsActive())     return Success();

	if (ref != NIL && !ref->IsActive()) return Success();

	switch (message)
	{
		case SM_KEYDOWN:
			if (wParam == key)
			{
				if ((((flags & SC_ALT) 	 && Input::Keyboard::GetKeyState(Input::Keyboard::KeyAlt))     || (!(flags & SC_ALT)   && !Input::Keyboard::GetKeyState(Input::Keyboard::KeyAlt)))     &&
				    (((flags & SC_CTRL)  && Input::Keyboard::GetKeyState(Input::Keyboard::KeyControl)) || (!(flags & SC_CTRL)  && !Input::Keyboard::GetKeyState(Input::Keyboard::KeyControl))) &&
				    (((flags & SC_CMD)   && Input::Keyboard::GetKeyState(Input::Keyboard::KeyCommand)) || (!(flags & SC_CMD)   && !Input::Keyboard::GetKeyState(Input::Keyboard::KeyCommand))) &&
				    (((flags & SC_SHIFT) && Input::Keyboard::GetKeyState(Input::Keyboard::KeyShift))   || (!(flags & SC_SHIFT) && !Input::Keyboard::GetKeyState(Input::Keyboard::KeyShift))))
				{
					onKeyDown.Emit(param);

					return MessageProcessed;
				}
			}

			break;
	}

	return Widget::Process(message, wParam, lParam);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %ebx
movl %edx, %ebp
movl %esi, %r15d
movq %rdi, %r14
movq (%rdi), %rax
callq *0x88(%rax)
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
testb %al, %al
je 0x95f60
movq (%r14), %rax
movq %r14, %rdi
callq *0x98(%rax)
xorl %r12d, %r12d
testb %al, %al
je 0x95f60
movq 0x5c0(%r14), %rdi
testq %rdi, %rdi
je 0x95e5b
movq (%rdi), %rax
callq *0x98(%rax)
testb %al, %al
je 0x95f60
cmpl $0x780e, %r15d          # imm = 0x780E
jne 0x95f2d
cmpl %ebp, 0x5b8(%r14)
jne 0x95f2d
movl 0x30(%r14), %eax
testb $0x1, %al
je 0x95e8f
movl $0x12, %edi
callq 0x57510
testb %al, %al
jne 0x95ea9
movl 0x30(%r14), %eax
testb $0x1, %al
jne 0x95f2d
movl $0x12, %edi
callq 0x57510
testb %al, %al
jne 0x95f2d
movl 0x30(%r14), %eax
testb $0x2, %al
je 0x95ec3
movl $0x11, %edi
callq 0x57510
testb %al, %al
jne 0x95ed5
movl 0x30(%r14), %eax
testb $0x2, %al
jne 0x95f2d
movl $0x11, %edi
callq 0x57510
testb %al, %al
jne 0x95f2d
movl 0x30(%r14), %eax
testb $0x4, %al
je 0x95eef
movl $0x5b, %edi
callq 0x57510
testb %al, %al
jne 0x95f01
movl 0x30(%r14), %eax
testb $0x4, %al
jne 0x95f2d
movl $0x5b, %edi
callq 0x57510
testb %al, %al
jne 0x95f2d
movl 0x30(%r14), %eax
testb $0x8, %al
je 0x95f1b
movl $0x10, %edi
callq 0x57510
testb %al, %al
jne 0x95f44
movl 0x30(%r14), %eax
testb $0x8, %al
jne 0x95f2d
movl $0x10, %edi
callq 0x57510
testb %al, %al
je 0x95f44
movq %r14, %rdi
movl %r15d, %esi
movl %ebp, %edx
movl %ebx, %ecx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x58220
movl 0x5bc(%r14), %esi
addq $0x5c8, %r14            # imm = 0x5C8
movq %r14, %rdi
callq 0x72a62
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
movl %r12d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/enzo1982[P]smooth/classes/gui/widgets/special/tooltip.cpp
// Function: smooth::GUI::Tooltip::Tooltip()
S::GUI::Tooltip::Tooltip() : Widget(Point(), Size())
{
	type		= classID;
	orientation	= OR_FREE;
	toolWindow	= NIL;
	timeOut		= 5000;
	timer		= NIL;

	layer		= NIL;

	font.SetColor(Setup::TooltipTextColor);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
xorl %r14d, %r14d
leaq 0x10(%rsp), %rsi
movq %r14, (%rsi)
leaq 0x8(%rsp), %rdx
movq %r14, (%rdx)
callq 0x57a30
movq 0xd5487(%rip), %rax     # 0x16bd48
addq $0x10, %rax
movq %rax, (%rbx)
movq 0xd4d79(%rip), %rax     # 0x16b648
movzwl (%rax), %eax
movw %ax, 0x20(%rbx)
movw $0x80, 0xd0(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x5b8(%rbx)
movl $0x1388, 0x5c8(%rbx)    # imm = 0x1388
movq %r14, 0x5d0(%rbx)
leaq 0x140(%rbx), %rdi
movq 0xd4f88(%rip), %rsi     # 0x16b890
callq 0x58650
addq $0x18, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x57640
movq %r14, %rdi
callq 0x57090
// File: /workspace/github_c_makefile_star2_O3/enzo1982[P]smooth/classes/gui/widgets/special/tooltip.cpp
// Function: smooth::GUI::Tooltip::~Tooltip()
S::GUI::Tooltip::~Tooltip()
{
	if (timer != NIL)
	{
		timer->Stop();

		DeleteObject(timer);
	}

	if (toolWindow != NIL) DeleteObject(toolWindow);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0xd5415(%rip), %rax     # 0x16bd48
addq $0x10, %rax
movq %rax, (%rdi)
movq 0x5c0(%rdi), %rdi
testq %rdi, %rdi
je 0x96957
callq 0x59190
movq 0x5c0(%rbx), %rdi
callq 0x58cc0
movq 0x5b8(%rbx), %rdi
testq %rdi, %rdi
je 0x96968
callq 0x58cc0
movq %rbx, %rdi
popq %rbx
jmp 0x57640
movq %rax, %rdi
callq 0x5aeae
nop
// File: /workspace/github_c_makefile_star2_O3/enzo1982[P]smooth/classes/gui/widgets/special/tooltip.cpp
// Function: smooth::GUI::Tooltip::OnToolWindowPaint()
S::Void S::GUI::Tooltip::OnToolWindowPaint()
{
	Surface	*surface = toolWindow->GetDrawSurface();
	Rect	 tRect	 = Rect(Point(0, 0), surface->GetSize());

	surface->Box(tRect, Color(0, 0, 0), Rect::Outlined);

	surface->SetText(text, tRect + Point(2, 1), font);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq 0x5b8(%rdi), %rdi
movq (%rdi), %rax
callq *0x40(%rax)
movq %rax, %r14
movq %rax, %rdi
callq 0x57a60
xorl %edx, %edx
leaq 0x18(%rsp), %r12
movq %rdx, (%r12)
movq (%rax), %rax
movq %rax, 0x8(%r12)
movq %rsp, %r15
movq %rdx, 0x8(%r15)
movl $0x0, (%r15)
movq 0xd4af4(%rip), %rax     # 0x16b820
movl (%rax), %ecx
leaq 0x10(%rsp), %r8
movq %rdx, (%r8)
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x57930
leaq 0xf0(%rbx), %rsi
movl (%r12), %eax
movl 0x4(%r12), %ecx
addl $0x2, %eax
incl %ecx
shlq $0x20, %rcx
movl 0x8(%r12), %edx
movl 0xc(%r12), %edi
addl $0x2, %edx
incl %edi
orq %rcx, %rax
shlq $0x20, %rdi
orq %rdi, %rdx
movq %rax, (%r15)
movq %rdx, 0x8(%r15)
addq $0x140, %rbx            # imm = 0x140
movq %rsp, %rdx
movq %r14, %rdi
movq %rbx, %rcx
xorl %r8d, %r8d
callq 0x57b80
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O3/enzo1982[P]smooth/classes/gui/widgets/special/tooltip.cpp
// Function: smooth::GUI::Tooltip::OnToolWindowEvent(int, int, int)
S::Void S::GUI::Tooltip::OnToolWindowEvent(Int message, Int wParam, Int lParam)
{
	static Bool	 forwarding = False;

	if (forwarding) return;

	Window	*window	= container ? container->GetContainerWindow() : NIL;

	if (window == NIL) return;

	forwarding = True;

	EnterProtectedRegion();

	switch (message)
	{
		/* Forward mouse wheel messages posted to
		 * the tool window to our parent window.
		 */
		case SM_MOUSEWHEEL:
			window->Process(message, wParam, lParam);

			break;

		/* Pass on keyboard events as well and hide
		 * the tooltip immediately after char events.
		 */
		case SM_KEYDOWN:
		case SM_KEYUP:
#ifdef __WIN32__
			window->Process(message, wParam, lParam);
#endif
			break;
		case SM_CHAR:
#ifdef __WIN32__
			window->Process(message, wParam, lParam);
#endif
			Hide();

			break;
	}

	LeaveProtectedRegion();

	forwarding = False;
}

// Assembly:
cmpb $0x0, 0xd7c97(%rip)     # 0x16ea40
jne 0x96e40
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r15
movq 0x190(%rdi), %rdi
testq %rdi, %rdi
je 0x96e32
movl %ecx, %ebx
movl %edx, %ebp
movl %esi, %r12d
callq 0x559e0
testq %rax, %rax
je 0x96e32
movq %rax, %r13
movb $0x1, 0xd7c5c(%rip)     # 0x16ea40
leaq 0x1c(%r15), %r14
movq %r14, %rdi
callq 0x578f0
cmpl $0x7810, %r12d          # imm = 0x7810
je 0x96e1a
cmpl $0x780c, %r12d          # imm = 0x780C
jne 0x96e23
movq (%r13), %rax
movq %r13, %rdi
movl $0x780c, %esi           # imm = 0x780C
movl %ebp, %edx
movl %ebx, %ecx
callq *0x80(%rax)
jmp 0x96e23
movq (%r15), %rax
movq %r15, %rdi
callq *0x60(%rax)
movq %r14, %rdi
callq 0x55cc0
movb $0x0, 0xd7c0e(%rip)     # 0x16ea40
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/enzo1982[P]smooth/classes/gui/widgets/special/tooltip.cpp
// Function: smooth::GUI::Tooltip::Hide()
S::Int S::GUI::Tooltip::Hide()
{
	if (!visible) return Success();

	visible = False;

	if (!IsRegistered()) return Success();

	if (toolWindow != NIL)
	{
		toolWindow->Close();

		Remove(toolWindow);

		if (layer != NIL) toolWindow->Remove(layer);

		toolWindow->onPaint.Disconnect(&Tooltip::OnToolWindowPaint, this);
		toolWindow->onEvent.Disconnect(&Tooltip::OnToolWindowEvent, this);

		DeleteObject(toolWindow);

		toolWindow = NIL;
	}

	onHide.Emit();

	return Success();
}

// Assembly:
cmpb $0x1, 0xcb(%rdi)
jne 0x96f36
pushq %rbx
movq %rdi, %rbx
movb $0x0, 0xcb(%rdi)
movq (%rdi), %rax
callq *0x88(%rax)
testb %al, %al
je 0x96f35
movq 0x5b8(%rbx), %rdi
testq %rdi, %rdi
je 0x96f26
callq 0x58420
movq 0x5b8(%rbx), %rsi
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x38(%rax)
movq 0x5d0(%rbx), %rsi
testq %rsi, %rsi
je 0x96ed5
movq 0x5b8(%rbx), %rdi
movq (%rdi), %rax
callq *0x38(%rax)
movl $0x648, %edi            # imm = 0x648
addq 0x5b8(%rbx), %rdi
movq 0xd4470(%rip), %rsi     # 0x16b358
xorl %edx, %edx
movq %rbx, %rcx
callq 0x970ba
movl $0x668, %edi            # imm = 0x668
addq 0x5b8(%rbx), %rdi
movq 0xd4d43(%rip), %rsi     # 0x16bc48
xorl %edx, %edx
movq %rbx, %rcx
callq 0x97126
movq 0x5b8(%rbx), %rdi
callq 0x58cc0
movq $0x0, 0x5b8(%rbx)
addq $0x218, %rbx            # imm = 0x218
movq %rbx, %rdi
callq 0x701aa
popq %rbx
xorl %eax, %eax
retq
nop
// File: /workspace/github_c_makefile_star2_O3/enzo1982[P]smooth/classes/gui/window/toolwindow.cpp
// Function: smooth::GUI::ToolWindow::ToolWindow(smooth::GUI::Point const&, smooth::GUI::Size const&)
S::GUI::ToolWindow::ToolWindow(const Point &iPos, const Size &iSize) : Window("smooth ToolWindow", iPos, iSize)
{
	type		= classID;
	orientation	= OR_FREE;
	visible		= True;

	frameWidth	= 0;

	backend->SetSizeModifier(Size());

	SetFlags(WF_TOPMOST | WF_NOTASKBUTTON | WF_THINBORDER);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x5fddb(%rip), %rsi     # 0xf70e2
movq %rsp, %r12
movq %r12, %rdi
callq 0x579f0
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
xorl %r8d, %r8d
callq 0x58c10
movq %rsp, %r14
movq %r14, %rdi
callq 0x59200
movq 0xd4280(%rip), %rax     # 0x16b5b8
addq $0x10, %rax
movq %rax, (%rbx)
movq 0xd4992(%rip), %rax     # 0x16bcd8
movzwl (%rax), %eax
movw %ax, 0x20(%rbx)
movw $0x80, 0xd0(%rbx)
movb $0x1, 0xcb(%rbx)
movl $0x0, 0x5e8(%rbx)
movq 0x5c0(%rbx), %rdi
movq $0x0, (%r14)
movq %rsp, %rsi
callq 0x9a4f4
movl $0x1a, 0x30(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x559c0
jmp 0x973a8
movq %rax, %r14
movq %rsp, %rdi
callq 0x59200
movq %r14, %rdi
callq 0x57090
// File: /workspace/github_c_makefile_star2_O3/enzo1982[P]smooth/classes/gui/window/toolwindow.cpp
// Function: smooth::GUI::ToolWindow::Create()
S::Bool S::GUI::ToolWindow::Create()
{
	if (IsRegistered())
	{
		Window	*containerWindow = container->GetContainerWindow();

		if (containerWindow != NIL)
		{
			if (IsRightToLeft()) Window::SetMetrics(Point(containerWindow->GetRealSize().cx - (GetX() + GetRealSize().cx), GetY()), GetSize());

			Window::SetMetrics(GetPosition() + containerWindow->GetPosition(), GetSize());
		}
	}

	return Window::Create();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rax
callq *0x88(%rax)
testb %al, %al
je 0x97485
movq 0x190(%rbx), %rdi
callq 0x559e0
testq %rax, %rax
je 0x97485
movq %rax, %r14
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x160(%rax)
testb %al, %al
je 0x9744f
movq (%r14), %rax
movq %r14, %rdi
callq *0x50(%rax)
movq %rax, %r15
movl 0xa8(%rbx), %ebp
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x50(%rax)
addl %ebp, %eax
subl %eax, %r15d
movl 0xac(%rbx), %eax
movq %rsp, %rsi
movl %r15d, (%rsi)
movl %eax, 0x4(%rsi)
leaq 0xb0(%rbx), %rdx
movq %rbx, %rdi
callq 0x55bf0
movl 0xa8(%r14), %eax
addl 0xa8(%rbx), %eax
movl 0xac(%r14), %ecx
addl 0xac(%rbx), %ecx
shlq $0x20, %rcx
orq %rcx, %rax
movq %rsp, %rsi
movq %rax, (%rsi)
leaq 0xb0(%rbx), %rdx
movq %rbx, %rdi
callq 0x55bf0
movq %rbx, %rdi
callq 0x553f0
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/enzo1982[P]smooth/classes/gui/window/toolwindow.cpp
// Function: smooth::GUI::ToolWindow::SetMetrics(smooth::GUI::Point const&, smooth::GUI::Size const&)
S::Int S::GUI::ToolWindow::SetMetrics(const Point &nPos, const Size &nSize)
{
	Point	 position = nPos;

	if (IsRegistered() && created)
	{
		Window	*containerWindow = container->GetContainerWindow();

		if (containerWindow != NIL)
		{
			if (IsRightToLeft())
			{
				Surface	*surface  = GetDrawSurface();
				Float	 fontSize = surface->GetSurfaceDPI() / 96.0;

				position.x = containerWindow->GetRealSize().cx - (nPos.x + Math::Round(nSize.cx * fontSize));
			}

			position += containerWindow->GetPosition();
		}
	}

	return Window::SetMetrics(position, nSize);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq (%rsi), %r13
movq %r13, 0x8(%rsp)
movq (%rdi), %rax
callq *0x88(%rax)
testb %al, %al
je 0x97583
cmpb $0x1, 0x5ca(%r14)
jne 0x97583
movq 0x190(%r14), %rdi
callq 0x559e0
testq %rax, %rax
je 0x97583
movq %rax, %r12
movq %r13, %rbp
shrq $0x20, %rbp
movq (%r14), %rax
movq %r14, %rdi
callq *0x160(%rax)
testb %al, %al
je 0x9756a
movq (%r14), %rax
movq %r14, %rdi
callq *0x40(%rax)
movq %rax, %rdi
callq 0x58930
cwtl
cvtsi2sd %eax, %xmm0
divsd 0x5c195(%rip), %xmm0    # 0xf36b8
movsd %xmm0, 0x10(%rsp)
movq (%r12), %rax
movq %r12, %rdi
callq *0x50(%rax)
xorps %xmm0, %xmm0
cvtsi2sdl (%rbx), %xmm0
movq %rax, %r13
mulsd 0x10(%rsp), %xmm0
xorpd %xmm1, %xmm1
xorl %eax, %eax
ucomisd %xmm0, %xmm1
seta %al
movl (%r15), %ecx
leaq 0x5e5de(%rip), %rdx     # 0xf5b38
addsd (%rdx,%rax,8), %xmm0
cvttsd2si %xmm0, %rax
addq %rcx, %rax
subq %rax, %r13
addl 0xa8(%r12), %r13d
movl %r13d, 0x8(%rsp)
addl 0xac(%r12), %ebp
movl %ebp, 0xc(%rsp)
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x55bf0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/enzo1982[P]smooth/classes/gui/window/toolwindow.cpp
// Function: smooth::GUI::ToolWindow::IsRightToLeft() const
S::Bool S::GUI::ToolWindow::IsRightToLeft() const
{
	if (IsRegistered() && layoutDirection == LD_DEFAULT)
	{
		Window	*containerWindow = container->GetContainerWindow();

		if (containerWindow != NIL) return containerWindow->IsRightToLeft();
	}

	return Window::IsRightToLeft();
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rax
callq *0x88(%rax)
testb %al, %al
je 0x975da
cmpl $0x0, 0x618(%rbx)
jne 0x975da
movq 0x190(%rbx), %rdi
callq 0x559e0
testq %rax, %rax
je 0x975da
movq (%rax), %rcx
movq %rax, %rdi
popq %rbx
jmpq *0x160(%rcx)
movq %rbx, %rdi
popq %rbx
jmp 0x57440
nop
// File: /workspace/github_c_makefile_star2_O3/enzo1982[P]smooth/classes/gui/window/window.cpp
// Function: smooth::GUI::Window::~Window()
S::GUI::Window::~Window()
{
	backend->onEvent.Disconnect(&Window::Process, this);

	if (created && !destroyed) backend->Close();

	Remove(mainLayer);
	DeleteObject(mainLayer);

	windows.Remove(GetHandle());

	delete backend;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0xd3d2e(%rip), %rax     # 0x16b748
addq $0x10, %rax
movq %rax, (%rdi)
movq 0x5c0(%rdi), %rdi
addq $0x58, %rdi
movl $0x81, %esi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x997ce
cmpb $0x1, 0x5ca(%rbx)
jne 0x97a5a
cmpb $0x0, 0x5cb(%rbx)
jne 0x97a5a
movq 0x5c0(%rbx), %rdi
movq (%rdi), %rax
callq *0x28(%rax)
movq 0x620(%rbx), %rsi
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x38(%rax)
movq 0x620(%rbx), %rdi
callq 0x58cc0
movl 0x8(%rbx), %esi
movq 0xd3c30(%rip), %rdi     # 0x16b6b0
callq 0x58bb0
movq 0x5c0(%rbx), %rdi
testq %rdi, %rdi
je 0x97a97
movq (%rdi), %rax
callq *0x8(%rax)
leaq 0x6b0(%rbx), %rdi
leaq 0xd039b(%rip), %rax     # 0x167e40
movq %rax, 0x6b0(%rbx)
callq 0x999a0
leaq 0x688(%rbx), %rdi
leaq 0xd0311(%rip), %rax     # 0x167dd0
movq %rax, 0x688(%rbx)
callq 0x6b38c
leaq 0x668(%rbx), %rdi
leaq 0xd03d7(%rip), %rax     # 0x167eb0
movq %rax, 0x668(%rbx)
callq 0x99ac8
leaq 0x648(%rbx), %rdi
leaq 0xc9c55(%rip), %r14     # 0x161748
movq %r14, 0x648(%rbx)
callq 0x70a9a
leaq 0x628(%rbx), %rdi
movq %r14, 0x628(%rbx)
callq 0x70a9a
leaq 0x600(%rbx), %rdi
callq 0x59200
leaq 0x5d0(%rbx), %rdi
callq 0x59148
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x57640
jmp 0x97b43
jmp 0x97b43
jmp 0x97b43
jmp 0x97b43
jmp 0x97b43
movq %rax, %rdi
callq 0x5aeae
nop
// File: /workspace/github_c_makefile_star2_O3/enzo1982[P]smooth/classes/gui/window/window.cpp
// Function: smooth::GUI::Window::SetMetrics(smooth::GUI::Point const&, smooth::GUI::Size const&)
S::Int S::GUI::Window::SetMetrics(const Point &nPos, const Size &nSize)
{
	if (created && visible) backend->SetMetrics(nPos, nSize);

	Bool	 resized     = (GetSize() != nSize);
	Bool	 prevVisible = visible;

	visible = False;

	Widget::SetMetrics(nPos, nSize);

	if (resized) CalculateOffsets();

	visible = prevVisible;

	return Success();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rdi, %rbx
cmpb $0x1, 0x5ca(%rdi)
jne 0x97ba0
cmpb $0x1, 0xcb(%rbx)
jne 0x97ba0
movq 0x5c0(%rbx), %rdi
movq (%rdi), %rax
movq %rsi, %r15
movq %r14, %rdx
callq *0x90(%rax)
movq %r15, %rsi
movl (%r14), %ebp
movl 0xb0(%rbx), %r15d
movl 0xb4(%rbx), %r12d
movl 0x4(%r14), %r13d
movb 0xcb(%rbx), %al
movb %al, 0x7(%rsp)
movb $0x0, 0xcb(%rbx)
movq %rbx, %rdi
movq %r14, %rdx
callq 0x57080
cmpl %ebp, %r15d
jne 0x97bdb
cmpl %r13d, %r12d
je 0x97be3
movq %rbx, %rdi
callq 0x55ef0
movb 0x7(%rsp), %al
movb %al, 0xcb(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/enzo1982[P]smooth/classes/gui/window/window.cpp
// Function: smooth::GUI::Window::SetText(smooth::String const&)
S::Int S::GUI::Window::SetText(const String &nTitle)
{
	text = nTitle;

	if (created && !destroyed)
	{
		Process(SM_WINDOWTITLECHANGED, 0, 0);

		backend->SetTitle(text);
	}

	return Success();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0xf0(%rdi), %rbx
movq %rbx, %rdi
callq 0x555f0
cmpb $0x1, 0x5ca(%r14)
jne 0x98037
cmpb $0x0, 0x5cb(%r14)
jne 0x98037
movq (%r14), %rax
movq %r14, %rdi
movl $0x780a, %esi           # imm = 0x780A
xorl %edx, %edx
xorl %ecx, %ecx
callq *0x80(%rax)
movq 0x5c0(%r14), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x38(%rax)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O3/enzo1982[P]smooth/classes/gui/window/window.cpp
// Function: smooth::GUI::Window::SetStatusText(smooth::String const&)
S::Int S::GUI::Window::SetStatusText(const String &nStatus)
{
	for (Int i = 0; i < GetNOfObjects(); i++)
	{
		Widget *widget = GetNthObject(i);

		if (widget == NIL) continue;

		if (widget->GetObjectType() == Statusbar::classID)
		{
			widget->SetText(nStatus);

			return Success();
		}
	}

	return Error();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpl $0x0, 0x40(%rdi)
jle 0x980ae
movq %rdi, %r15
movq %rsi, (%rsp)
leaq 0x38(%rdi), %r12
movq 0xd3426(%rip), %rax     # 0x16b490
xorl %ebp, %ebp
movswl (%rax), %r13d
movq %r12, %rdi
movl %ebp, %esi
callq 0x5b074
movq (%rax), %r14
testq %r14, %r14
je 0x98092
leaq 0x20(%r14), %rdi
movl %r13d, %esi
callq 0x57520
testb %al, %al
jne 0x9809c
incl %ebp
cmpl 0x40(%r15), %ebp
jl 0x98070
jmp 0x980ae
movq (%r14), %rax
movq %r14, %rdi
movq (%rsp), %rsi
callq *0xa0(%rax)
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/enzo1982[P]smooth/classes/gui/window/window.cpp
// Function: smooth::GUI::Window::GetStatusText() const
const S::String &S::GUI::Window::GetStatusText() const
{
	for (Int i = 0; i < GetNOfObjects(); i++)
	{
		Widget *widget = GetNthObject(i);

		if (widget == NIL) continue;

		if (widget->GetObjectType() == Statusbar::classID) return widget->GetText();
	}

	return defaultStatus;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
cmpl $0x0, 0x40(%rdi)
jle 0x9810c
leaq 0x38(%rbx), %r14
movq 0xd33b4(%rip), %rax     # 0x16b490
xorl %ebp, %ebp
movswl (%rax), %r15d
movq %r14, %rdi
movl %ebp, %esi
callq 0x5b074
movq (%rax), %r12
testq %r12, %r12
je 0x98105
leaq 0x20(%r12), %rdi
movl %r15d, %esi
callq 0x57520
testb %al, %al
jne 0x9811f
incl %ebp
cmpl 0x40(%rbx), %ebp
jl 0x980e2
addq $0x600, %rbx            # imm = 0x600
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq (%r12), %rax
movq %r12, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmpq *0xa8(%rax)
// File: /workspace/github_c_makefile_star2_O3/enzo1982[P]smooth/classes/gui/window/window.cpp
// Function: smooth::GUI::Window::RestoreDefaultStatusText()
S::Int S::GUI::Window::RestoreDefaultStatusText()
{
	for (Int i = 0; i < GetNOfObjects(); i++)
	{
		Widget *widget = GetNthObject(i);

		if (widget == NIL) continue;

		if (widget->GetObjectType() == Statusbar::classID)
		{
			widget->SetText(defaultStatus);

			break;
		}
	}

	return Success();
}

// Assembly:
cmpl $0x0, 0x40(%rdi)
jle 0x981bd
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq 0x38(%rdi), %r14
movq 0xd3324(%rip), %rax     # 0x16b490
xorl %ebp, %ebp
movswl (%rax), %r15d
movq %r14, %rdi
movl %ebp, %esi
callq 0x5b074
movq (%rax), %r12
testq %r12, %r12
je 0x98195
leaq 0x20(%r12), %rdi
movl %r15d, %esi
callq 0x57520
testb %al, %al
jne 0x9819e
incl %ebp
cmpl 0x40(%rbx), %ebp
jl 0x98172
jmp 0x981b5
addq $0x600, %rbx            # imm = 0x600
movq (%r12), %rax
movq %r12, %rdi
movq %rbx, %rsi
callq *0xa0(%rax)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/enzo1982[P]smooth/classes/gui/window/window.cpp
// Function: smooth::GUI::Window::Show()
S::Int S::GUI::Window::Show()
{
	order = Object::RequestObjectHandle();

	if (!created) Create();

	backend->SetMetrics(GetPosition(), GetSize());

	onChangePosition.Emit(GetPosition());
	onChangeSize.Emit(GetSize());

	if (maximized && !visibilitySet)
	{
		backend->Hide();

		maximized = False;
		Maximize();
	}

	if (minimized && !visibilitySet)
	{
		backend->Hide();

		minimized = False;
		Minimize();
	}

	visible	      = True;
	visibilitySet = True;

	backend->Show();

	onShow.Emit();

	return Success();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x55bd0
movl %eax, 0x5b8(%rbx)
cmpb $0x0, 0x5ca(%rbx)
jne 0x98252
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x168(%rax)
movq 0x5c0(%rbx), %rdi
leaq 0xa8(%rbx), %r14
leaq 0xb0(%rbx), %r15
movq (%rdi), %rax
movq %r14, %rsi
movq %r15, %rdx
callq *0x90(%rax)
leaq 0x278(%rbx), %rdi
movq %r14, %rsi
callq 0x703b0
leaq 0x298(%rbx), %rdi
movq %r15, %rsi
callq 0x70698
cmpb $0x1, 0x5c8(%rbx)
jne 0x982df
cmpb $0x0, 0x5cc(%rbx)
jne 0x982df
movq 0x5c0(%rbx), %rdi
movq (%rdi), %rax
callq *0x80(%rax)
movb $0x0, 0x5c8(%rbx)
cmpb $0x0, 0x5ca(%rbx)
je 0x982d8
movq 0x5c0(%rbx), %rdi
movq (%rdi), %rax
callq *0xa0(%rax)
jmp 0x982df
movb $0x1, 0x5c8(%rbx)
cmpb $0x1, 0x5c9(%rbx)
jne 0x9832a
cmpb $0x0, 0x5cc(%rbx)
jne 0x9832a
movq 0x5c0(%rbx), %rdi
movq (%rdi), %rax
callq *0x80(%rax)
movb $0x0, 0x5c9(%rbx)
cmpb $0x0, 0x5ca(%rbx)
je 0x98323
movq 0x5c0(%rbx), %rdi
movq (%rdi), %rax
callq *0x98(%rax)
jmp 0x9832a
movb $0x1, 0x5c9(%rbx)
movb $0x1, %al
movb %al, 0xcb(%rbx)
movb %al, 0x5cc(%rbx)
movq 0x5c0(%rbx), %rdi
movq (%rdi), %rax
callq *0x78(%rax)
addq $0x1f8, %rbx            # imm = 0x1F8
movq %rbx, %rdi
callq 0x701aa
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/enzo1982[P]smooth/classes/gui/window/window.cpp
// Function: smooth::GUI::Window::Maximize()
S::Int S::GUI::Window::Maximize()
{
	if (maximized) return Success();

	if (!created)
	{
		maximized = True;

		return Success();
	}

	backend->Maximize();

	return Success();
}

// Assembly:
cmpb $0x0, 0x5c8(%rdi)
jne 0x9838c
cmpb $0x0, 0x5ca(%rdi)
je 0x98385
pushq %rax
movq 0x5c0(%rdi), %rdi
movq (%rdi), %rax
callq *0xa0(%rax)
addq $0x8, %rsp
jmp 0x9838c
movb $0x1, 0x5c8(%rdi)
xorl %eax, %eax
retq
nop
// File: /workspace/github_c_makefile_star2_O3/enzo1982[P]smooth/classes/gui/window/window.cpp
// Function: smooth::GUI::Window::Minimize()
S::Int S::GUI::Window::Minimize()
{
	if (minimized) return Success();

	if (!created)
	{
		minimized = True;

		return Success();
	}

	backend->Minimize();

	return Success();
}

// Assembly:
cmpb $0x0, 0x5c9(%rdi)
jne 0x983c0
cmpb $0x0, 0x5ca(%rdi)
je 0x983b9
pushq %rax
movq 0x5c0(%rdi), %rdi
movq (%rdi), %rax
callq *0x98(%rax)
addq $0x8, %rsp
jmp 0x983c0
movb $0x1, 0x5c9(%rdi)
xorl %eax, %eax
retq
nop
// File: /workspace/github_c_makefile_star2_O3/enzo1982[P]smooth/classes/gui/window/window.cpp
// Function: smooth::GUI::Window::Hide()
S::Int S::GUI::Window::Hide()
{
	if (!visible) return Success();

	if (created) backend->Hide();

	visible	      = False;
	visibilitySet = True;

	onHide.Emit();

	return Success();
}

// Assembly:
cmpb $0x1, 0xcb(%rdi)
jne 0x98408
pushq %rbx
movq %rdi, %rbx
cmpb $0x1, 0x5ca(%rdi)
jne 0x983ea
movq 0x5c0(%rbx), %rdi
movq (%rdi), %rax
callq *0x80(%rax)
movb $0x0, 0xcb(%rbx)
movb $0x1, 0x5cc(%rbx)
addq $0x218, %rbx            # imm = 0x218
movq %rbx, %rdi
callq 0x701aa
popq %rbx
xorl %eax, %eax
retq
nop
// File: /workspace/github_c_makefile_star2_O3/enzo1982[P]smooth/classes/gui/window/window.cpp
// Function: smooth::GUI::Window::Restore()
S::Int S::GUI::Window::Restore()
{
	if (!maximized && !minimized) return Success();

	if (!created)
	{
		maximized = False;
		minimized = False;

		return Success();
	}

	backend->Restore();

	return Success();
}

// Assembly:
cmpb $0x0, 0x5c8(%rdi)
jne 0x9841e
cmpb $0x1, 0x5c9(%rdi)
jne 0x98447
cmpb $0x0, 0x5ca(%rdi)
je 0x9843e
pushq %rax
movq 0x5c0(%rdi), %rdi
movq (%rdi), %rax
callq *0xa8(%rax)
addq $0x8, %rsp
jmp 0x98447
movw $0x0, 0x5c8(%rdi)
xorl %eax, %eax
retq