LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/gui/widgets/multi/menu/popupmenuentry.cpp
// Function: smooth::GUI::PopupMenuEntry::PopupMenuEntry(smooth::String const&, smooth::GUI::Bitmap const&, smooth::GUI::PopupMenu*)
S::GUI::PopupMenuEntry::PopupMenuEntry(const String &iText, const Bitmap &iBitmap, PopupMenu *iPopup) : MenuEntry(iText, iBitmap, iPopup)
{
	type		= classID;
	orientation	= OR_UPPERLEFT;
	hotspot		= NIL;
	owner		= NIL;
	timer		= NIL;

	popupMenuClosed = 0;

	shortcutOffset	= 0;

	SetSize(GetMinimumSize());

	if (text != NIL)
	{
		hotspot	= new Hotspot(Point(), GetSize());

		hotspot->onMouseOver.Connect(&PopupMenuEntry::OnMouseOver, this);
		hotspot->onMouseOut.Connect(&PopupMenuEntry::OnMouseOut, this);
		hotspot->onLeftButtonDown.Connect(&PopupMenuEntry::OpenPopupMenu, this);
		hotspot->onLeftButtonUp.Connect(&PopupMenuEntry::OnClickEntry, this);

		Add(hotspot);

		onChangeSize.Connect(&PopupMenuEntry::OnChangeSize, this);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
andl $0x0, (%rsp)
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x57a20
movq 0xd85b2(%rip), %rax     # 0x161af8
addq $0x10, %rax
movq %rax, (%rbx)
movq 0xd8134(%rip), %rax     # 0x161688
movzwl (%rax), %eax
movw %ax, 0x20(%rbx)
movw $0x14, 0xd0(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x5f0(%rbx)
movups %xmm0, 0x600(%rbx)
andl $0x0, 0x610(%rbx)
movq %rbx, %rdi
callq 0x57c40
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0xa8(%rbx), %rsi
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x150(%rax)
leaq 0xf0(%rbx), %rdi
xorl %esi, %esi
callq 0x57d40
testb %al, %al
je 0x89673
movl $0x5b8, %edi            # imm = 0x5B8
callq 0x56700
movq %rax, %r14
leaq 0x8(%rsp), %rsi
andq $0x0, (%rsi)
leaq 0xb0(%rbx), %rdx
movq %rax, %rdi
callq 0x56aa0
movq %r14, 0x5f8(%rbx)
addq $0x2b8, %r14            # imm = 0x2B8
movl $0x169, %esi            # imm = 0x169
movq %r14, %rdi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x8a80e
movl $0x2d8, %edi            # imm = 0x2D8
addq 0x5f8(%rbx), %rdi
movl $0x171, %esi            # imm = 0x171
xorl %edx, %edx
movq %rbx, %rcx
callq 0x8a80e
movl $0x2f8, %edi            # imm = 0x2F8
addq 0x5f8(%rbx), %rdi
movq 0xd8318(%rip), %rsi     # 0x161940
xorl %edx, %edx
movq %rbx, %rcx
callq 0x8a8aa
movl $0x318, %edi            # imm = 0x318
addq 0x5f8(%rbx), %rdi
movl $0x179, %esi            # imm = 0x179
xorl %edx, %edx
movq %rbx, %rcx
callq 0x8a8aa
movq 0x5f8(%rbx), %rsi
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x30(%rax)
leaq 0x298(%rbx), %rdi
movl $0x181, %esi            # imm = 0x181
xorl %edx, %edx
movq %rbx, %rcx
callq 0x8a946
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r15
movl $0x5b8, %esi            # imm = 0x5B8
movq %r14, %rdi
callq 0x564c0
jmp 0x89694
jmp 0x89691
movq %rax, %r15
movq %rbx, %rdi
callq 0x57180
movq %r15, %rdi
callq 0x58260
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/gui/widgets/multi/menu/popupmenuentry.cpp
// Function: smooth::GUI::PopupMenuEntry::~PopupMenuEntry()
S::GUI::PopupMenuEntry::~PopupMenuEntry()
{
	if (hotspot != NIL) DeleteObject(hotspot);

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

		timer = NIL;
	}
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0xd8097(%rip), %rax     # 0x161af8
addq $0x10, %rax
movq %rax, (%rdi)
movq 0x5f8(%rdi), %rdi
testq %rdi, %rdi
je 0x89a79
callq 0x5a010
movq 0x608(%rbx), %rdi
testq %rdi, %rdi
je 0x89a92
callq 0x5a010
andq $0x0, 0x608(%rbx)
movq %rbx, %rdi
popq %rbx
jmp 0x57180
movq %rax, %rdi
callq 0x5bffa
nop
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/gui/widgets/multi/menu/popupmenuentry.cpp
// Function: smooth::GUI::PopupMenuEntry::Hide()
S::Int S::GUI::PopupMenuEntry::Hide()
{
	if (popup != NIL)
	{
		if (popup->GetContainer() == this) ClosePopupMenu();
	}

	visible = False;

	if (hotspot != NIL) hotspot->Hide();

	return Success();
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x5b8(%rdi), %rax
testq %rax, %rax
je 0x8a4e3
cmpq %rbx, 0x190(%rax)
jne 0x8a4e3
movq %rbx, %rdi
callq 0x5a510
movb $0x0, 0xcb(%rbx)
movq 0x5f8(%rbx), %rdi
testq %rdi, %rdi
je 0x8a4fc
movq (%rdi), %rax
callq *0x60(%rax)
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/gui/widgets/multi/menu/popupmenuentry.cpp
// Function: smooth::GUI::PopupMenuEntry::ClosePopupMenu()
S::Void S::GUI::PopupMenuEntry::ClosePopupMenu()
{
	if (popup == NIL || popup->GetContainer() != this) return;

	if (IsRegistered()) owner->SetFlags(owner->GetFlags() & ~MB_POPUPOPEN);

	popup->internalRequestClose.Disconnect(&PopupMenuEntry::ClosePopupMenu, this);

	Remove(popup);

	hotspot->Activate();

	if (IsRegistered())
	{
		if (popup->IsClosedByClick())
		{
			owner->SetClosedByClick(True);
			owner->internalRequestClose.Emit();
		}
		else
		{
			if (!container->GetContainerWindow()->IsMouseOn(Rect(Point(), container->GetRealSize()))) owner->internalRequestClose.Emit();
			else											  container->GetContainerWindow()->Raise();
		}
	}

	popupMenuClosed = S::System::System::Clock();
}

// Assembly:
movq 0x5b8(%rdi), %rax
testq %rax, %rax
je 0x8a62c
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
cmpq %rdi, 0x190(%rax)
jne 0x8a625
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x88(%rax)
testb %al, %al
je 0x8a542
movq 0x600(%rbx), %rax
andl $-0x3, 0x30(%rax)
movl $0x698, %edi            # imm = 0x698
addq 0x5b8(%rbx), %rdi
movq 0xd7503(%rip), %rsi     # 0x161a58
xorl %edx, %edx
movq %rbx, %rcx
callq 0x8a9e2
movq 0x5b8(%rbx), %rsi
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x38(%rax)
movq 0x5f8(%rbx), %rdi
movq (%rdi), %rax
callq *0x68(%rax)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x88(%rax)
testb %al, %al
je 0x8a619
movq 0x5b8(%rbx), %rax
cmpb $0x1, 0x690(%rax)
jne 0x8a5b7
movq 0x600(%rbx), %rdi
movb $0x1, 0x690(%rdi)
addq $0x698, %rdi            # imm = 0x698
jmp 0x8a614
movq 0x190(%rbx), %rdi
callq 0x56a50
movq %rax, %r14
movq 0x190(%rbx), %rdi
movq (%rdi), %rax
callq *0x50(%rax)
leaq 0x8(%rsp), %rsi
andq $0x0, (%rsi)
movl %eax, 0x8(%rsi)
shrq $0x20, %rax
movl %eax, 0xc(%rsi)
movq %r14, %rdi
callq 0x58ae0
testb %al, %al
je 0x8a608
movq 0x190(%rbx), %rdi
callq 0x56a50
movq %rax, %rdi
callq 0x59e90
jmp 0x8a619
movl $0x698, %edi            # imm = 0x698
addq 0x600(%rbx), %rdi
callq 0x70196
callq 0x582b0
movq %rax, 0x5f0(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/gui/widgets/multi/menu/popupmenuentry.cpp
// Function: smooth::GUI::PopupMenuEntry::OnMouseOver()
S::Void S::GUI::PopupMenuEntry::OnMouseOver()
{
	if (popup == NIL || IsMouseOver()) return;

	if (Binary::IsFlagSet(owner->GetFlags(), MB_POPUPOPEN))
	{
		container->GetContainerWindow()->Raise();

		OpenPopupMenu();
	}
	else
	{
		if (timer != NIL) DeleteObject(timer);

		timer = new System::Timer();

		timer->onInterval.Connect(&PopupMenuEntry::OpenPopupMenu, this);
		timer->Start(500);
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpq $0x0, 0x5b8(%rdi)
je 0x8a6b0
movq %rdi, %rbx
cmpb $0x0, 0xd4(%rdi)
je 0x8a6b8
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x600(%rbx), %rax
movl 0x30(%rax), %edi
pushq $0x2
popq %rsi
callq 0x596b0
testb %al, %al
je 0x8a6f1
movq 0x190(%rbx), %rdi
callq 0x56a50
movq %rax, %rdi
callq 0x59e90
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x5a4f0
movq 0x608(%rbx), %rdi
testq %rdi, %rdi
je 0x8a702
callq 0x5a010
pushq $0x68
popq %rdi
callq 0x56700
movq %rax, %r14
movq %rax, %rdi
callq 0x56c00
movq %r14, 0x608(%rbx)
addq $0x48, %r14
movq 0xd7219(%rip), %rsi     # 0x161940
movq %r14, %rdi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x8a80e
movq 0x608(%rbx), %rdi
movl $0x1f4, %esi            # imm = 0x1F4
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x56100
movq %rax, %rbx
pushq $0x68
popq %rsi
movq %r14, %rdi
callq 0x564c0
movq %rbx, %rdi
callq 0x58260
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/gui/widgets/multi/menu/popupmenuentry.cpp
// Function: smooth::GUI::PopupMenuEntry::OnClickEntry()
S::Void S::GUI::PopupMenuEntry::OnClickEntry()
{
	if (popup != NIL) return;

	EnterProtectedRegion();

	owner->SetClosedByClick(True);
	owner->internalRequestClose.Emit();

	onAction.Emit();

	LeaveProtectedRegion();
}

// Assembly:
cmpq $0x0, 0x5b8(%rdi)
je 0x8a78d
retq
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x1c(%rdi), %r14
movq %r14, %rdi
callq 0x58b40
movq 0x600(%rbx), %rdi
movb $0x1, 0x690(%rdi)
addq $0x698, %rdi            # imm = 0x698
callq 0x70196
addq $0x478, %rbx            # imm = 0x478
movq %rbx, %rdi
callq 0x70196
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x56d60
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/gui/widgets/multi/tree/tree.cpp
// Function: smooth::GUI::Tree::OnToggleMark(bool)
S::Void S::GUI::Tree::OnToggleMark(Bool marked)
{
	if (marked) onOpen.Emit();
	else	    onClose.Emit();

	CalculateHeight();

	if (IsRegistered())
	{
		/* Find ListBox container and repaint it.
		 */
		Widget	*widget = container;

		while (widget != NIL && widget->GetObjectType() != ListBox::classID) widget = widget->GetContainer();

		if (widget != NIL) widget->Paint(SP_PAINT);
	}
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorb $0x1, %sil
movzbl %sil, %eax
shll $0x5, %eax
addq %rax, %rdi
addq $0xd20, %rdi            # imm = 0xD20
callq 0x70196
movq %rbx, %rdi
callq 0x59b40
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x88(%rax)
testb %al, %al
je 0x8b7d7
movq 0xd67c3(%rip), %rax     # 0x161f68
movswl (%rax), %ebp
movq 0x190(%rbx), %rbx
testq %rbx, %rbx
je 0x8b7d7
leaq 0x20(%rbx), %rdi
movl %ebp, %esi
callq 0x5a150
testb %al, %al
jne 0x8b7a8
movq (%rbx), %rax
movq 0x78(%rax), %rax
movq %rbx, %rdi
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmpq *%rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/gui/widgets/multi/tree/tree.cpp
// Function: smooth::GUI::Tree::CalculateHeight()
S::Void S::GUI::Tree::CalculateHeight()
{
	/* Calculate tree height.
	 */
	Int	 height	= 16;

	if (IsMarked())
	{
		for (Int i = 0; i < Length(); i++) height += GetNthEntry(i)->GetHeight();
	}

	/* Set new height if changed.
	 */
	if (height == GetHeight()) return;

	SetHeight(height);

	/* Recalculate parent trees.
	 */
	if (!IsRegistered()) return;

	Widget	*widget = container;

	while (widget->GetObjectType() != ListBox::classID)
	{
		if (widget->GetObjectType() == Tree::classID)
		{
			((Tree *) widget)->CalculateHeight();

			break;
		}

		widget = widget->GetContainer();
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0xd6609(%rip), %rax     # 0x161f68
pushq $0x10
popq %r15
movswl (%rax), %ebp
movq 0xd6263(%rip), %r13     # 0x161bd0
cmpb $0x1, 0x5b8(%rbx)
movl %r15d, %r14d
jne 0x8b9aa
movl %r15d, %r14d
leaq 0x630(%rbx), %r15
xorl %r12d, %r12d
cmpl 0xc48(%rbx), %r12d
jge 0x8b9a6
movq %r15, %rdi
movl %r12d, %esi
callq 0x59ef0
addl 0xb4(%rax), %r14d
incl %r12d
jmp 0x8b986
pushq $0x10
popq %r15
cmpl 0xb4(%rbx), %r14d
je 0x8b9fd
movq %rbx, %rdi
movl %r14d, %esi
callq 0x58980
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x88(%rax)
testb %al, %al
je 0x8b9fd
movq 0x190(%rbx), %rbx
leaq 0x20(%rbx), %r14
movq %r14, %rdi
movl %ebp, %esi
callq 0x5a150
testb %al, %al
je 0x8b9fd
movswl (%r13), %esi
movq %r14, %rdi
callq 0x58720
testb %al, %al
je 0x8b9ce
jmp 0x8b96d
addq $0x8, %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/widgets/special/cursor.cpp
// Function: smooth::GUI::Cursor::Cursor(smooth::GUI::Point const&, smooth::GUI::Size const&)
S::GUI::Cursor::Cursor(const Point &iPos, const Size &iSize) : Widget(iPos, iSize)
{
	type		= classID;
	markStart	= -1;
	markEnd		= -1;
	maxSize		= 32768;
	promptPos	= 0;
	promptVisible	= False;
	timer		= NIL;
	marking		= False;
	visibleOffset	= 0;
	scrollPos	= 0;
	maxScrollPos	= 0;
	contextMenu	= NIL;
	historyPos	= 0;
	tabSize		= 4;

	imeAdvance	= 0;
	imeCursor	= False;

	SetTabstopCapable(True);

	onGetFocus.Connect(&Cursor::OnGetFocus, this);
	onGetFocusByKeyboard.Connect(&Cursor::OnGetFocusByKeyboard, this);
	onLoseFocus.Connect(&Cursor::OnLoseFocus, this);

	getContextMenu.Connect(&Cursor::GetContextMenu, this);

	onInput.SetParentObject(this);
	onEnter.SetParentObject(this);
	onScroll.SetParentObject(this);

	AddHistoryEntry();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
callq 0x58c80
movq 0xd485b(%rip), %rax     # 0x161880
addq $0x10, %rax
movq %rax, (%rbx)
leaq 0x5e8(%rbx), %r14
movq %r14, %rdi
callq 0x839de
leaq 0x650(%rbx), %r15
movq %r15, %rdi
callq 0x64972
leaq 0x6a8(%rbx), %r12
movq %r12, %rdi
callq 0x839de
andq $0x0, 0x710(%rbx)
leaq 0xcb778(%rip), %rax     # 0x1587e0
movq %rax, 0x708(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x718(%rbx)
andq $0x0, 0x730(%rbx)
movq %rax, 0x728(%rbx)
movups %xmm0, 0x738(%rbx)
andq $0x0, 0x750(%rbx)
leaq 0xcacc2(%rip), %rax     # 0x157d60
movq %rax, 0x748(%rbx)
movups %xmm0, 0x758(%rbx)
movq 0xd4ac5(%rip), %rax     # 0x161b78
movzwl (%rax), %eax
movw %ax, 0x20(%rbx)
movl $0x8000, 0x640(%rbx)    # imm = 0x8000
movsd 0x59b74(%rip), %xmm0    # 0xe6c40
movups %xmm0, 0x5c8(%rbx)
andq $0x0, 0x5d8(%rbx)
andq $0x0, 0x648(%rbx)
leaq 0x708(%rbx), %rax
movq %rax, 0x10(%rsp)
andl $0x0, 0x700(%rbx)
leaq 0x728(%rbx), %rbp
andq $0x0, 0x5b8(%rbx)
leaq 0x748(%rbx), %r13
andq $0x0, 0x5be(%rbx)
movl $0x4, 0x5e4(%rbx)
movb $0x0, 0x5e0(%rbx)
movb $0x1, 0xd2(%rbx)
leaq 0x4d8(%rbx), %rdi
movq 0xd420e(%rip), %rsi     # 0x161348
xorl %edx, %edx
movq %rbx, %rcx
callq 0x91462
leaq 0x4f8(%rbx), %rdi
movq 0xd4d26(%rip), %rsi     # 0x161e78
xorl %edx, %edx
movq %rbx, %rcx
callq 0x91462
leaq 0x518(%rbx), %rdi
movq 0xd4c2e(%rip), %rsi     # 0x161d98
xorl %edx, %edx
movq %rbx, %rcx
callq 0x91462
leaq 0x1d0(%rbx), %rdi
movq 0xd4936(%rip), %rsi     # 0x161ab8
xorl %edx, %edx
movq %rbx, %rcx
callq 0x914fe
movq %rbx, 0x710(%rbx)
movq %rbx, 0x730(%rbx)
movq %rbx, 0x750(%rbx)
movq %rbx, %rdi
callq 0x59b00
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, 0x8(%rsp)
jmp 0x8d1f4
movq %rax, 0x8(%rsp)
jmp 0x8d1fc
movq %rax, 0x8(%rsp)
jmp 0x8d204
movq %rax, 0x8(%rsp)
movq %r13, %rdi
callq 0x724e0
movq %rbp, %rdi
callq 0x75a62
movq 0x10(%rsp), %rdi
callq 0x75a62
movq %r12, %rdi
callq 0x83b2c
movq %r15, %rdi
callq 0x64988
movq %r14, %rdi
callq 0x83b2c
movq %rbx, %rdi
callq 0x58860
movq 0x8(%rsp), %rdi
callq 0x58260
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/gui/widgets/special/cursor.cpp
// Function: smooth::GUI::Cursor::OnLoseFocus()
S::Void S::GUI::Cursor::OnLoseFocus()
{
	ShowCursor(False);

	MarkText(-1, -1);

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

		timer = NIL;
	}

	/* Notify listeners of removed cursor.
	 */
	internalRemoveCursor.Emit(this);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
xorl %esi, %esi
callq 0x59ca0
pushq $-0x1
popq %rdx
movq %rbx, %rdi
movl %edx, %esi
callq 0x57c50
movq 0x5b8(%rbx), %rdi
testq %rdi, %rdi
je 0x8d259
callq 0x5a010
andq $0x0, 0x5b8(%rbx)
movq 0xd4388(%rip), %rdi     # 0x1615e8
movq %rbx, %rsi
popq %rbx
jmp 0x91534
nop
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/gui/widgets/special/cursor.cpp
// Function: smooth::GUI::Cursor::AddHistoryEntry()
S::Void S::GUI::Cursor::AddHistoryEntry()
{
	while (history.Length() > historyPos)
	{
		history.RemoveNth(history.Length() - 1);
		historyPrompt.RemoveNth(historyPrompt.Length() - 1);
	}

	history.Add(text);
	historyPrompt.Add(promptPos);
	historyPos++;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x650(%rdi), %r15
leaq 0x6a8(%rdi), %r14
movl 0x658(%rbx), %esi
cmpl 0x700(%rbx), %esi
jle 0x8d6b0
decl %esi
movq %r15, %rdi
callq 0x64bc8
movl 0x6b0(%rbx), %esi
decl %esi
movq %r14, %rdi
callq 0x83d0a
jmp 0x8d686
leaq 0xf0(%rbx), %rsi
movq %r15, %rdi
callq 0x64dee
leaq 0x5c0(%rbx), %rsi
movq %r14, %rdi
callq 0x83f0a
incl 0x700(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/gui/widgets/special/cursor.cpp
// Function: smooth::GUI::Cursor::Paint(int)
S::Int S::GUI::Cursor::Paint(Int message)
{
	if (!IsRegistered()) return Error();
	if (!IsVisible())    return Success();

	switch (message)
	{
		case SP_PAINT:
			DrawWidget();

			break;
		case SP_MOUSEIN:
			Input::Pointer::SetCursor(container->GetContainerWindow(), Input::Pointer::CursorTextEdit);

			break;
		case SP_MOUSEOUT:
			Input::Pointer::SetCursor(container->GetContainerWindow(), Input::Pointer::CursorArrow);

			break;
	}

	return Success();
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %r14
movq (%rdi), %rax
callq *0x88(%rax)
testb %al, %al
je 0x8d7c0
movq (%r14), %rax
movq %r14, %rdi
callq *0x90(%rax)
xorl %ebx, %ebx
testb %al, %al
je 0x8d7c3
cmpl $0x3, %ebp
je 0x8d7de
cmpl $0x2, %ebp
je 0x8d7ca
testl %ebp, %ebp
jne 0x8d7c3
movq %r14, %rdi
callq 0x5a2b0
jmp 0x8d7c3
pushq $-0x1
popq %rbx
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
movq 0x190(%r14), %rdi
callq 0x56a50
pushq $0x1
popq %rsi
movq %rax, %rdi
jmp 0x8d7f1
movq 0x190(%r14), %rdi
callq 0x56a50
xorl %ebx, %ebx
movq %rax, %rdi
xorl %esi, %esi
callq 0x56de0
jmp 0x8d7c3
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/gui/widgets/special/cursor.cpp
// Function: smooth::GUI::Cursor::GetLogicalCursorPositionFromDisplay(smooth::String const&, int) const
S::Int S::GUI::Cursor::GetLogicalCursorPositionFromDisplay(const String &line, Int displayPos) const
{
	FriBidiStrIndex	 length = line.Length();

	if (length == 0) return 0;

	/* Find best position using binary search.
	 */
	Int	 bestPos   = 0;
	Int	 bestValue = 2147483647;

	Int	 startPos  = 0;
	Int	 endPos	   = length;

	while (endPos >= startPos)
	{
		/* Select element to compare and perform comparison.
		 */
		Int	 m   = (startPos + endPos) / 2;
		Int	 pos = GetDisplayCursorPositionFromVisual(line, m);

		if ((!IsRightToLeft() && pos > displayPos) ||
		    ( IsRightToLeft() && pos < displayPos)) endPos   = m - 1;
		else					    startPos = m + 1;

		if (Math::Abs(pos - displayPos) < bestValue)
		{
			bestPos	  = m;
			bestValue = Math::Abs(pos - displayPos);
		}
	}

	return GetLogicalCursorPositionFromVisual(line, bestPos);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, 0xc(%rsp)
movq %rdi, %r14
movq %rsi, 0x10(%rsp)
movq %rsi, %rdi
callq 0x58370
testl %eax, %eax
je 0x8f09b
movl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
xorl %r15d, %r15d
xorl %esi, %esi
cmpl %esi, %eax
jl 0x8f07d
movq %rax, 0x18(%rsp)
movq %rsi, 0x20(%rsp)
leal (%rax,%rsi), %r13d
shrl %r13d
movq %r14, %rdi
movq 0x10(%rsp), %rsi
movl %r13d, %edx
callq 0x56380
movl %eax, %ebp
movq (%r14), %rax
movq %r14, %rdi
callq *0x160(%rax)
movl %ebp, %ebx
subl 0xc(%rsp), %ebx
jle 0x8f02e
testb %al, %al
je 0x8f044
movq (%r14), %rax
movq %r14, %rdi
callq *0x160(%rax)
cmpl 0xc(%rsp), %ebp
jge 0x8f04f
testb %al, %al
je 0x8f04f
leal -0x1(%r13), %eax
movq 0x20(%rsp), %rsi
jmp 0x8f058
leal 0x1(%r13), %esi
movq 0x18(%rsp), %rax
sarl $0x1f, %ebx
orl $0x1, %ebx
subl 0xc(%rsp), %ebp
movl $0x0, %ecx
cmovel %ecx, %ebx
imull %ebp, %ebx
cmpl %r12d, %ebx
cmovll %r13d, %r15d
cmovll %ebx, %r12d
jmp 0x8efeb
movq %r14, %rdi
movq 0x10(%rsp), %rsi
movl %r15d, %edx
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x571d0
xorl %eax, %eax
addq $0x28, %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/widgets/special/cursor.cpp
// Function: smooth::GUI::Cursor::MarkText(int, int)
S::Void S::GUI::Cursor::MarkText(Int newMarkStart, Int newMarkEnd)
{
	if (newMarkStart == markStart && newMarkEnd == markEnd) return;

	ShowCursor(False);

	markStart	= newMarkStart;
	markEnd		= newMarkEnd;

	Paint(SP_PAINT);

	/* Copy selected text to selection clipboard.
	 */
	if (Math::Abs(markEnd - markStart) > 0) Clipboard(container->GetContainerWindow()).SetSelectionText(text.SubString(Math::Min(markStart, markEnd), Math::Abs(markEnd - markStart)));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %rbx
cmpl %esi, 0x5c8(%rdi)
jne 0x8f0d2
cmpl %ebp, 0x5cc(%rbx)
je 0x8f18c
xorl %r15d, %r15d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x59ca0
movl %r14d, 0x5c8(%rbx)
movl %ebp, 0x5cc(%rbx)
movq (%rbx), %rax
movq %rbx, %rdi
xorl %esi, %esi
callq *0x78(%rax)
movl 0x5cc(%rbx), %eax
movl 0x5c8(%rbx), %ecx
movl %eax, %edx
subl %ecx, %edx
sarl $0x1f, %edx
orl $0x1, %edx
subl %ecx, %eax
cmovel %r15d, %edx
imull %eax, %edx
testl %edx, %edx
jle 0x8f18c
movq 0x190(%rbx), %rdi
callq 0x56a50
movq %rsp, %rdi
movq %rax, %rsi
callq 0x59470
movl 0x5c8(%rbx), %eax
movl 0x5cc(%rbx), %esi
movl %eax, %edi
subl %esi, %edi
movl %esi, %edx
cmovll %eax, %edx
negl %edi
movl %edi, %ecx
sarl $0x1f, %ecx
orl $0x1, %ecx
cmpl %eax, %esi
cmovel %r15d, %ecx
imull %edi, %ecx
addq $0xf0, %rbx
leaq 0x10(%rsp), %rdi
movq %rbx, %rsi
callq 0x5a2c0
movq %rsp, %rdi
leaq 0x10(%rsp), %rsi
callq 0x58770
leaq 0x10(%rsp), %rdi
callq 0x5a588
movq %rsp, %rdi
callq 0x599b0
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x5a588
jmp 0x8f1a9
movq %rax, %rbx
movq %rsp, %rdi
callq 0x599b0
movq %rbx, %rdi
callq 0x58260
nop
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/gui/widgets/special/cursor.cpp
// Function: smooth::GUI::Cursor::OnInput(int, int)
S::Void S::GUI::Cursor::OnInput(Int character, Int flags)
{
	/* Called when a character is entered.
	 */
	if (!focussed)					      return;
	if (text.Length() == maxSize && markStart == markEnd) return;

	if (character >= 0x20 && character != 0x7F && IsActive())
	{
		Bool	 selected = (markStart != markEnd && markStart >= 0 && markEnd >= 0);

		this->flags |= CF_NOINPUT;

		DeleteSelectedText();

		this->flags ^= CF_NOINPUT;

		if (!Binary::IsFlagSet(container->GetFlags(), EDB_NUMERIC) || (character >= '0' && character <= '9') || character == '-' || character == '.')
		{
			String	 insertText;

			insertText[0] = character;

			if (selected) RemoveHistoryEntry();

			InsertText(insertText);
		}

		onInput.Emit(text);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
cmpb $0x1, 0xcd(%rdi)
jne 0x902ff
movl %esi, %r15d
movq %rdi, %rbx
leaq 0xf0(%rdi), %r14
movq %r14, %rdi
callq 0x58370
cmpl 0x640(%rbx), %eax
jne 0x90233
cmpl $0x7f, %r15d
je 0x902ff
cmpl $0x20, %r15d
jl 0x902ff
movl 0x5cc(%rbx), %eax
cmpl %eax, 0x5c8(%rbx)
jne 0x90249
jmp 0x902ff
cmpl $0x20, %r15d
setl %al
cmpl $0x7f, %r15d
sete %cl
orb %al, %cl
jne 0x902ff
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x98(%rax)
testb %al, %al
je 0x902ff
movl 0x5c8(%rbx), %eax
movl 0x5cc(%rbx), %ecx
cmpl %ecx, %eax
setne %bpl
orl %eax, %ecx
setns %r13b
orb $0x40, 0x33(%rbx)
movq %rbx, %rdi
callq 0x5a560
xorb $0x40, 0x33(%rbx)
movq 0x190(%rbx), %rax
movl 0x30(%rax), %edi
pushq $0x1
popq %rsi
callq 0x596b0
testb %al, %al
je 0x902b3
leal -0x30(%r15), %eax
cmpl $0xa, %eax
setae %al
leal -0x2d(%r15), %ecx
cmpl $0x2, %ecx
setae %cl
testb %cl, %al
jne 0x902ed
movq %rsp, %r12
movq %r12, %rdi
xorl %esi, %esi
callq 0x5a180
movq %r12, %rdi
xorl %esi, %esi
callq 0x59cc0
movl %r15d, (%rax)
andb %r13b, %bpl
je 0x902da
movq %rbx, %rdi
callq 0x579b0
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x57150
movq %rsp, %rdi
callq 0x5a588
addq $0x708, %rbx            # imm = 0x708
movq %rbx, %rdi
movq %r14, %rsi
callq 0x75b8e
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x5a588
movq %rbx, %rdi
callq 0x58260
nop
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/gui/widgets/special/cursor.cpp
// Function: smooth::GUI::Cursor::ConvertTabs(smooth::String const&, int)
S::String S::GUI::Cursor::ConvertTabs(const String &line, Int tabSize)
{
	String	 string	      = line;
	Int	 stringLength = string.Length();

	for (Int i = 0; i < stringLength; i++)
	{
		if (string[i] != '\t') continue;

		Int	 spaces = tabSize - i % tabSize;

		string	      = string.Head(i).Append(String().FillN(' ', spaces)).Append(string.Tail(stringLength - i - 1));
		stringLength += spaces - 1;
	}

	return string;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl %edx, %r13d
movq %rdi, %rbx
callq 0x58280
movq %rbx, 0x8(%rsp)
movq %rbx, %rdi
callq 0x58370
movq %rax, 0x10(%rsp)
xorl %r15d, %r15d
pushq $-0x1
popq %rbp
leaq 0x50(%rsp), %r14
movl %r13d, 0x1c(%rsp)
cmpl 0x10(%rsp), %r15d
jge 0x90435
movq 0x8(%rsp), %rdi
movl %r15d, %esi
callq 0x59cc0
cmpl $0x9, (%rax)
jne 0x9042b
movl %r15d, %eax
cltd
idivl %r13d
movl %edx, %r12d
leaq 0x20(%rsp), %rdi
movq 0x8(%rsp), %rsi
movl %r15d, %edx
callq 0x59e40
movq %r14, %rdi
xorl %esi, %esi
callq 0x5a180
movq %r14, %rdi
subl %r12d, %r13d
pushq $0x20
popq %rsi
movl %r13d, %edx
callq 0x58e70
leaq 0x20(%rsp), %rdi
movq %rax, %rsi
callq 0x573e0
movq %rax, %r12
movq 0x10(%rsp), %rax
movq %rbp, %rbx
leal (%rax,%rbp), %edx
leaq 0x38(%rsp), %rbp
movq %rbp, %rdi
movq 0x8(%rsp), %rsi
callq 0x59220
movq %r12, %rdi
movq %rbp, %rsi
callq 0x573e0
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x56630
movq %rbp, %rdi
callq 0x5a588
movq %r14, %rdi
callq 0x5a588
leaq 0x20(%rsp), %rdi
callq 0x5a588
movq 0x10(%rsp), %rax
addl %r13d, %eax
decl %eax
movq %rax, 0x10(%rsp)
movl 0x1c(%rsp), %r13d
movq %rbx, %rbp
incl %r15d
decl %ebp
jmp 0x9035d
movq 0x8(%rsp), %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x90454
jmp 0x90454
movq %rax, %r14
jmp 0x90475
jmp 0x90459
movq %rax, %r14
jmp 0x9047f
movq %rax, %r14
jmp 0x9046b
movq %rax, %r14
leaq 0x38(%rsp), %rdi
callq 0x5a588
leaq 0x50(%rsp), %rdi
callq 0x5a588
leaq 0x20(%rsp), %rdi
callq 0x5a588
movq 0x8(%rsp), %rdi
callq 0x5a588
movq %r14, %rdi
callq 0x58260
nop
// File: /workspace/github_c_makefile_star2_O2/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 0x58370
testl %eax, %eax
je 0x90516
movl %eax, %ebx
movq 0xd0eb2(%rip), %rax     # 0x161360
cmpb $0x0, (%rax)
je 0x90525
leal 0x1(%rbx), %eax
shlq $0x2, %rax
cmpl $-0x1, %ebx
pushq $-0x1
popq %rdi
cmovgeq %rax, %rdi
callq 0x577a0
movq %rax, %r15
leaq 0x5683a(%rip), %rsi     # 0xe6d0d
movq %r14, %rdi
callq 0x58b90
movq %rax, %rdi
movl %ebx, %esi
movq %r15, %rdx
callq 0x58f40
movslq %ebx, %rax
xorl %ecx, %ecx
testl %ebx, %ebx
cmovlel %ecx, %ebx
movq %rcx, %rdx
cmpq %rcx, %rbx
je 0x90505
leaq 0x1(%rdx), %rcx
testb $0x1, (%r15,%rdx,4)
je 0x904f2
cmpq %rax, %rdx
setl %bpl
movq %r15, %rdi
callq 0x572d0
jmp 0x90518
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
xorl %r15d, %r15d
testl %ebx, %ebx
cmovlel %r15d, %ebx
cmpl %r15d, %ebx
setne %bpl
je 0x90518
movq %r14, %rdi
movl %r15d, %esi
callq 0x59270
cmpl $0x590, %eax            # imm = 0x590
jl 0x9055b
movq %r14, %rdi
movl %r15d, %esi
callq 0x59270
cmpl $0x900, %eax            # imm = 0x900
jl 0x90518
incl %r15d
jmp 0x9052e
// File: /workspace/github_c_makefile_star2_O2/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 0x90a3c
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 0x90a2e
movq (%r14), %rax
movq %r14, %rdi
callq *0x40(%rax)
movq %rax, 0x18(%rsp)
movq (%r14), %rax
movq %r14, %rdi
callq *0x48(%rax)
movq %rax, %r13
movl 0x30(%r14), %edi
pushq $0x1
popq %rsi
callq 0x596b0
xorl %r12d, %r12d
testb %al, %al
je 0x90925
movl 0x5c0(%r14), %ebp
leaq 0xf0(%r14), %r15
xorl %r12d, %r12d
testl %ebp, %ebp
jle 0x90925
decl %ebp
movq %r15, %rdi
movl %ebp, %esi
callq 0x59cc0
xorl %ecx, %ecx
cmpl $0xa, (%rax)
sete %cl
addl %ecx, %r12d
jmp 0x90908
movl 0x5c0(%r14), %esi
movq %r14, %rdi
callq 0x59360
movl %eax, %ebp
movq %r13, 0x10(%rsp)
addl %r13d, %ebp
addl 0x5dc(%r14), %ebp
leaq 0x140(%r14), %r13
movq 0xd1465(%rip), %rsi     # 0x161db8
movq %r13, %rdi
callq 0x588a0
movl %eax, 0xc(%rsp)
movl %r12d, %r15d
subl 0x5d4(%r14), %r15d
movl 0x30(%r14), %edi
pushq $0x1
popq %rsi
callq 0x596b0
testb %al, %al
je 0x909af
cmpl 0x5d4(%r14), %r12d
jl 0x90a2e
movq 0xd142b(%rip), %rsi     # 0x161db8
movq %r13, %rdi
callq 0x59d90
addl $0x3, %eax
subl 0x5d4(%r14), %r12d
incl %r12d
imull %eax, %r12d
cmpl 0xb4(%r14), %r12d
jg 0x90a2e
movq (%r14), %rax
movq %r14, %rdi
callq *0x90(%rax)
testb %al, %al
je 0x90a27
movq 0x10(%rsp), %rax
shrq $0x20, %rax
movl 0xc(%rsp), %ecx
addl $0x3, %ecx
imull %ecx, %r15d
addl %eax, %r15d
movq 0xd13db(%rip), %rsi     # 0x161db8
movq %r13, %rdi
callq 0x588a0
leaq 0x38(%rsp), %rsi
movl %ebp, (%rsi)
movl %r15d, 0x4(%rsi)
incl %ebp
leaq 0x28(%rsp), %rdx
andq $0x0, 0x8(%rdx)
movl %ebp, 0x8(%rsi)
andl $0x0, (%rdx)
addl %r15d, %eax
addl $0x3, %eax
movl %eax, 0xc(%rsi)
movq 0xd1306(%rip), %rax     # 0x161d18
movl (%rax), %ecx
leaq 0x20(%rsp), %r8
andq $0x0, (%r8)
movq 0x18(%rsp), %rdi
callq 0x58b80
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_O2/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, %r13d
movq %rdi, %r14
leaq 0xf0(%rdi), %r15
movq %r15, %rdi
callq 0x58370
testl %eax, %eax
je 0x90ae2
movl %eax, %ebp
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0x58280
movl 0x30(%r14), %edi
pushq $0x1
popq %rsi
callq 0x596b0
testb %al, %al
je 0x90b1a
movl %r13d, %r12d
sarl $0x1f, %r12d
andl %r13d, %r12d
movl %r13d, 0x4(%rsp)
testl %r13d, %r13d
jle 0x90ab5
decl %r13d
movq %r15, %rdi
movl %r13d, %esi
callq 0x59270
cmpl $0xa, %eax
jne 0x90a97
incl %r13d
movl %r13d, %r12d
xorl %r13d, %r13d
leal (%r12,%r13), %ebx
cmpl %ebp, %ebx
jge 0x90ae6
movq %r15, %rdi
movl %ebx, %esi
callq 0x59270
cmpl $0xa, %eax
je 0x90ae6
movq %r15, %rdi
movl %ebx, %esi
callq 0x59270
testl %eax, %eax
je 0x90ae6
incl %r13d
jmp 0x90ab8
xorl %ebx, %ebx
jmp 0x90b36
leaq 0x20(%rsp), %rdi
movq %r15, %rsi
movl %r12d, %edx
movl %r13d, %ecx
callq 0x5a2c0
leaq 0x8(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x56630
leaq 0x20(%rsp), %rdi
callq 0x5a588
movl 0x4(%rsp), %r13d
subl %r12d, %r13d
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
movl %r13d, %edx
callq 0x56230
movl %eax, %ebx
leaq 0x8(%rsp), %rdi
callq 0x5a588
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 0x5a588
jmp 0x90b5f
jmp 0x90b5c
jmp 0x90b5c
jmp 0x90b5c
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x5a588
movq %rbx, %rdi
callq 0x58260
nop
// File: /workspace/github_c_makefile_star2_O2/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 0x56960
testb %al, %al
jne 0x90c88
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 0x90bfe
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x56160
movq %rbx, %rdi
xorl %esi, %esi
callq 0x59ca0
pushq $-0x1
popq %rdx
movq %rbx, %rdi
movl %edx, %esi
callq 0x57c50
leaq 0x5e8(%rbx), %rdi
callq 0x83b5a
movq 0x5b8(%rbx), %rdi
testq %rdi, %rdi
je 0x90c3a
callq 0x5a010
andq $0x0, 0x5b8(%rbx)
movq %r15, %rdi
callq 0x58370
movl %eax, 0x5c0(%rbx)
andq $0x0, 0x5d0(%rbx)
movq %rbx, %rdi
callq 0x594c0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x57f80
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x98(%rax)
testb %al, %al
je 0x90c7b
movq %rbx, %rdi
callq 0x59b00
testb %bpl, %bpl
je 0x90c88
movq %r14, %rdi
callq 0x59a80
xorl %eax, %eax
addq $0x18, %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/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 0x5a560
xorb $0x40, 0x33(%rbx)
movq 0x190(%rbx), %rdi
callq 0x56a50
leaq 0x20(%rsp), %r14
movq %r14, %rdi
movq %rax, %rsi
callq 0x59470
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x57ae0
leaq 0x20(%rsp), %rdi
callq 0x599b0
leaq 0x8(%rsp), %rdi
callq 0x58370
testl %eax, %eax
jle 0x90ea7
leaq 0x8(%rsp), %rdi
callq 0x58370
movl %eax, %ebp
leaq 0xf0(%rbx), %rdi
callq 0x58370
addl %ebp, %eax
cmpl 0x640(%rbx), %eax
jg 0x90ea7
movq 0x190(%rbx), %rax
movl 0x30(%rax), %edi
pushq $0x1
popq %rsi
callq 0x596b0
testb %al, %al
je 0x90e8d
leaq 0x8(%rsp), %rdi
callq 0x57a10
testq %rax, %rax
jne 0x90e8d
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
callq 0x59cc0
cmpl $0x30, (%rax)
jne 0x90ebd
andb %r12b, %r15b
je 0x90e9a
movq %rbx, %rdi
callq 0x579b0
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x57150
leaq 0x708(%rbx), %rdi
addq $0xf0, %rbx
movq %rbx, %rsi
callq 0x75b8e
leaq 0x8(%rsp), %rdi
callq 0x5a588
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x599b0
jmp 0x90ef0
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x5a588
movq %rbx, %rdi
callq 0x58260
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/gui/widgets/special/cursor.cpp
// Function: smooth::GUI::Cursor::Scroll(int)
S::Int S::GUI::Cursor::Scroll(Int nScrollPos)
{
	ShowCursor(False);

	scrollPos = Math::Max(0, Math::Min(nScrollPos, maxScrollPos));

	Paint(SP_PAINT);

	onScroll.Emit(scrollPos, maxScrollPos);

	return Success();
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
xorl %ebp, %ebp
xorl %esi, %esi
callq 0x59ca0
movl 0x5d8(%r14), %eax
cmpl %eax, %ebx
cmovll %ebx, %eax
testl %eax, %eax
cmovlel %ebp, %eax
movl %eax, 0x5d4(%r14)
movq (%r14), %rax
movq %r14, %rdi
xorl %esi, %esi
callq *0x78(%rax)
leaq 0x748(%r14), %rdi
movl 0x5d4(%r14), %esi
movl 0x5d8(%r14), %edx
callq 0x7260e
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x9101c
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
addq $0x5e8, %rdi            # imm = 0x5E8
callq 0x83b5a
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 0x56160
movl 0x700(%rbx), %r15d
leal -0x1(%r15), %eax
movl %eax, 0x700(%rbx)
addl $-0x2, %r15d
leaq 0x650(%rbx), %rdi
movl %r15d, %esi
callq 0x6bb28
movq %rbx, %rdi
movq %rax, %rsi
callq 0x57f80
leaq 0x6a8(%rbx), %rdi
movl %r15d, %esi
callq 0x840de
movl (%rax), %esi
movq %rbx, %rdi
callq 0x59d70
movq %r14, %rdi
callq 0x59a80
leaq 0x708(%rbx), %rdi
addq $0xf0, %rbx
movq %rbx, %rsi
callq 0x75b8e
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O2/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 0x910e7
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x650(%rdi), %r15
addq $0x5e8, %rdi            # imm = 0x5E8
callq 0x83b5a
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 0x56160
movl 0x700(%rbx), %r12d
leal 0x1(%r12), %eax
movl %eax, 0x700(%rbx)
movq %r15, %rdi
movl %r12d, %esi
callq 0x6bb28
movq %rbx, %rdi
movq %rax, %rsi
callq 0x57f80
leaq 0x6a8(%rbx), %rdi
movl %r12d, %esi
callq 0x840de
movl (%rax), %esi
movq %rbx, %rdi
callq 0x59d70
movq %r14, %rdi
callq 0x59a80
leaq 0x708(%rbx), %rdi
addq $0xf0, %rbx
movq %rbx, %rsi
callq 0x75b8e
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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
leaq 0x8(%rsp), %rsi
andq $0x0, (%rsi)
movq %rdi, %rbx
movabsq $0x100000001000, %rax   # imm = 0x100000001000
movq %rsp, %rdx
movq %rax, (%rdx)
callq 0x58c80
movq 0xd046b(%rip), %rax     # 0x161f98
addq $0x10, %rax
movq %rax, (%rbx)
andq $0x0, 0x5b8(%rbx)
movq 0xd0315(%rip), %rax     # 0x161e58
movzwl (%rax), %eax
movw %ax, 0x20(%rbx)
movw $0x40, 0xd0(%rbx)
movl $0x5b8, %edi            # imm = 0x5B8
callq 0x56700
movq %rax, %r14
leaq 0xa8(%rbx), %rsi
leaq 0xb0(%rbx), %rdx
movq %rax, %rdi
callq 0x56aa0
movq %r14, 0x5c0(%rbx)
addq $0x3f8, %r14            # imm = 0x3F8
movq 0xcfcdd(%rip), %rsi     # 0x161868
movq %r14, %rdi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x91d08
movl $0x418, %edi            # imm = 0x418
addq 0x5c0(%rbx), %rdi
movq 0xcfdfd(%rip), %rsi     # 0x1619a8
xorl %edx, %edx
movq %rbx, %rcx
callq 0x91d08
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 0x564c0
jmp 0x91be4
movq %rax, %r15
movq %rbx, %rdi
callq 0x58860
movq %r15, %rdi
callq 0x58260
// File: /workspace/github_c_makefile_star2_O2/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 0x58c80
movq 0xcf5cd(%rip), %rax     # 0x1613f0
addq $0x10, %rax
movq %rax, (%rbx)
andq $0x0, 0x5c0(%rbx)
leaq 0xc69a7(%rip), %rax     # 0x1587e0
movq %rax, 0x5b8(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x5c8(%rbx)
andq $0x0, 0x5e0(%rbx)
leaq 0xcb7cf(%rip), %rax     # 0x15d628
movq %rax, 0x5d8(%rbx)
movups %xmm0, 0x5e8(%rbx)
movq 0xcf752(%rip), %rax     # 0x1615c0
movzwl (%rax), %eax
movw %ax, 0x20(%rbx)
movb $0x1, 0xd3(%rbx)
movw $0x80, 0xd0(%rbx)
movl 0xb4(%rbx), %eax
orl 0xb0(%rbx), %eax
jne 0x91ec0
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 0x58250
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 0x9209a
movq %r14, %rdi
callq 0x75a62
movq %rbx, %rdi
callq 0x58860
movq %r12, %rdi
callq 0x58260
nop
// File: /workspace/github_c_makefile_star2_O2/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 %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebp
movl %edx, %r14d
movl %esi, %r15d
movq %rdi, %rbx
movq (%rdi), %rax
callq *0x88(%rax)
pushq $-0x1
popq %r13
testb %al, %al
je 0x92047
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x98(%rax)
xorl %r12d, %r12d
testb %al, %al
je 0x9204a
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x90(%rax)
testb %al, %al
je 0x9204a
cmpl $0x7814, %r15d          # imm = 0x7814
jne 0x9205c
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 0x9205c
leal (%rax,%r12), %ecx
cmpl %r14d, %ecx
jle 0x9205c
shrq $0x20, %r12
cmpl %ebp, %r12d
jge 0x9205c
shrq $0x20, %rax
addl %r12d, %eax
cmpl %ebp, %eax
jle 0x9205c
movl %r13d, %ebp
movq %rbx, %rdi
callq 0x56a50
movq %rax, %rdi
callq 0x59660
movq %rax, %r15
leaq 0x1c(%rbx), %r14
movq %r14, %rdi
callq 0x58b40
leaq 0x5b8(%rbx), %r12
xorl %r13d, %r13d
leal -0x1(%r13), %eax
movl 0x8(%r15), %ecx
decl %ecx
cmpl %ecx, %eax
jge 0x9207a
movq %r15, %rdi
movl %r13d, %esi
callq 0x64d9c
movq %r12, %rdi
movq %rax, %rsi
callq 0x75b8e
incl %r13d
jmp 0x9201e
movl %r13d, %r12d
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
movl %r15d, %esi
movl %r14d, %edx
movl %ebp, %ecx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x594d0
addq $0x5d8, %rbx            # imm = 0x5D8
movq %rbx, %rdi
movq %r15, %rsi
callq 0x920b4
movq %r14, %rdi
callq 0x56d60
movl %ebp, %r12d
jmp 0x9204a
nop
// File: /workspace/github_c_makefile_star2_O2/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, %ebx
movq %rcx, %r14
movl %edx, %ebp
movl %esi, %r15d
movq %rdi, %r12
leaq 0x8(%rsp), %rsi
andq $0x0, (%rsi)
movq %rsp, %rdx
andq $0x0, (%rdx)
callq 0x58c80
movq 0xcfb0a(%rip), %rax     # 0x161d60
addq $0x10, %rax
movq %rax, (%r12)
leaq 0xc5b33(%rip), %rax     # 0x157d98
movq %rax, 0x5c8(%r12)
xorps %xmm0, %xmm0
movups %xmm0, 0x5d8(%r12)
movq 0xcf318(%rip), %rax     # 0x161598
movzwl (%rax), %eax
movw %ax, 0x20(%r12)
movw $0x80, 0xd0(%r12)
movl %ebp, 0x5b8(%r12)
movl %r15d, 0x30(%r12)
movl %ebx, 0x5bc(%r12)
movq %r14, 0x5c0(%r12)
movq %r12, 0x5d0(%r12)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq