LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/gui/widgets/multi/list/listbox.cpp
// Function: smooth::GUI::ListBox::OnChangeSize(smooth::GUI::Size const&)
S::Void S::GUI::ListBox::OnChangeSize(const Size &nSize)
{
	if (scrollbar->IsVisible())
	{
		Int	 headerHeight = (header->IsVisible() ? header->GetHeight() : 0);

		scrollbar->SetHeight(nSize.cy - 2 - headerHeight);
		scrollbar->SetRange(0, GetEntriesHeight() - (GetHeight() - 4 - headerHeight));

		scrollbar->SetPageSize(GetHeight() - 4 - headerHeight);
	}

	header->SetWidth(nSize.cx - 2);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x6c8(%rdi), %rdi
movq (%rdi), %rax
callq *0x90(%rax)
testb %al, %al
je 0x81af5
movq 0x6d8(%r14), %rdi
movq (%rdi), %rax
callq *0x90(%rax)
xorl %r12d, %r12d
testb %al, %al
je 0x81a9f
movq 0x6d8(%r14), %rax
movl 0xb4(%rax), %r12d
movq 0x6c8(%r14), %rdi
movl 0x4(%rbx), %esi
subl %r12d, %esi
addl $-0x2, %esi
callq 0x58980
movq 0x6c8(%r14), %r15
movq %r14, %rdi
callq 0x5a1c0
leal (%rax,%r12), %edx
subl 0xb4(%r14), %edx
addl $0x4, %edx
movq %r15, %rdi
xorl %esi, %esi
callq 0x56840
movq 0x6c8(%r14), %rax
movl 0xb4(%r14), %ecx
subl %r12d, %ecx
addl $-0x4, %ecx
movl %ecx, 0x654(%rax)
movq 0x6d8(%r14), %rdi
movl (%rbx), %esi
addl $-0x2, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x5a1f0
nop
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/gui/widgets/multi/list/listbox.cpp
// Function: smooth::GUI::ListBox::OnScrollbarValueChange()
S::Void S::GUI::ListBox::OnScrollbarValueChange()
{
	if (!IsVisible()) return;

	/* Redraw only the list entries.
	 */
	Surface	*surface = GetDrawSurface();

	Rect	 frame		= Rect(GetRealPosition(), GetRealSize());

	Int	 headerHeight	= (header->IsVisible()	  ? header->GetRealSize().cy	: 0);
	Int	 scrollbarWidth	= (scrollbar->IsVisible() ? scrollbar->GetRealSize().cx : 0);

	surface->StartPaint(frame + Point(2, 2 + headerHeight) - Size(4 + scrollbarWidth, 4 + headerHeight));

	Paint(SP_PAINT);

	surface->EndPaint();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq (%rdi), %rax
callq *0x90(%rax)
testb %al, %al
je 0x81c26
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x40(%rax)
movq %rax, %r14
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x48(%rax)
movq %rax, %r15
movq %rax, %r12
shrq $0x20, %r12
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x50(%rax)
leal (%rax,%r15), %ecx
shrq $0x20, %rax
movl %r15d, (%rsp)
movl %r12d, 0x4(%rsp)
movl %ecx, 0x8(%rsp)
addl %r12d, %eax
movl %eax, 0xc(%rsp)
movq 0x6d8(%rbx), %rdi
movq (%rdi), %rax
callq *0x90(%rax)
xorl %r15d, %r15d
testb %al, %al
je 0x81ba0
movq 0x6d8(%rbx), %rdi
movq (%rdi), %rax
callq *0x50(%rax)
movq %rax, %r15
shrq $0x20, %r15
movq 0x6c8(%rbx), %rdi
movq (%rdi), %rax
callq *0x90(%rax)
testb %al, %al
je 0x81bca
movq 0x6c8(%rbx), %rdi
movq (%rdi), %rax
callq *0x50(%rax)
movq %rax, %r12
addq $0x4, %r12
jmp 0x81bce
pushq $0x4
popq %r12
leal 0x2(%r15), %eax
leaq 0x10(%rsp), %rsi
movl $0x2, (%rsi)
movl %eax, 0x4(%rsi)
movq %rsp, %rdi
callq 0x58930
movq %rdx, %rcx
shrq $0x20, %rcx
subl %r12d, %edx
subl %r15d, %ecx
addl $-0x4, %ecx
shlq $0x20, %rcx
orq %rcx, %rdx
leaq 0x18(%rsp), %rsi
movq %rax, (%rsi)
movq %rdx, 0x8(%rsi)
movq %r14, %rdi
callq 0x56160
movq (%rbx), %rax
movq %rbx, %rdi
xorl %esi, %esi
callq *0x78(%rax)
movq %r14, %rdi
callq 0x59a80
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/gui/widgets/multi/list/listbox.cpp
// Function: smooth::GUI::ListBox::GetEntriesHeight() const
S::Int S::GUI::ListBox::GetEntriesHeight() const
{
	Int	 entriesHeight	= 0;

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

	return entriesHeight;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
xorl %ebx, %ebx
xorl %ebp, %ebp
movq (%r14), %rax
movq %r14, %rdi
callq *0x178(%rax)
cmpl %eax, %ebp
jge 0x82367
movq (%r14), %rax
movq %r14, %rdi
movl %ebp, %esi
callq *0x180(%rax)
addl 0xb4(%rax), %ebx
incl %ebp
jmp 0x8233f
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/gui/widgets/multi/list/listboxheader.cpp
// Function: smooth::GUI::ListBoxHeader::OnMouseDragStart(smooth::GUI::Point const&)
S::Void S::GUI::ListBoxHeader::OnMouseDragStart(const Point &mousePos)
{
	if (moveTab == -1) return;

	startMousePos = mousePos;

	moveTabStartWidth = tabWidths.GetNth(moveTab);
	lastTabStartWidth = tabWidths.GetNth(tabWidths.Length() - 1);

	draggingTab = True;
}

// Assembly:
movq %rsi, %rax
movl 0x5b8(%rdi), %esi
cmpl $-0x1, %esi
je 0x82b7e
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rax), %rax
movq %rax, 0x5c0(%rdi)
leaq 0x630(%rdi), %r14
movq %r14, %rdi
callq 0x840de
movl (%rax), %eax
movl %eax, 0x5c8(%rbx)
movl 0x638(%rbx), %esi
decl %esi
movq %r14, %rdi
callq 0x840de
movl (%rax), %eax
movl %eax, 0x5cc(%rbx)
movb $0x1, 0x5bc(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/gui/widgets/multi/list/listboxheader.cpp
// Function: smooth::GUI::ListBoxHeader::OnMouseDrag(smooth::GUI::Point const&)
S::Void S::GUI::ListBoxHeader::OnMouseDrag(const Point &mousePos)
{
	if (!draggingTab) return;

	Int	 bias = Math::Round((startMousePos.x - mousePos.x) * 96.0 / Surface().GetSurfaceDPI());

	if (bias != 0)
	{
		tabWidths.SetNth(moveTab, (Int) Math::Max(Math::Abs(moveTabStartWidth) - bias, 1) * Math::Sign(moveTabStartWidth));
		tabWidths.SetNth(tabWidths.Length() - 1, (Int) Math::Max(Math::Abs(lastTabStartWidth) + bias, 1) * Math::Sign(lastTabStartWidth));

		OnChangeSize(GetSize());

		container->Paint(SP_PAINT);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
cmpb $0x1, 0x5bc(%rdi)
jne 0x82ca2
movq %rdi, %rbx
movl 0x5c0(%rdi), %ebp
movl (%rsi), %r15d
leaq 0x8(%rsp), %rdx
andq $0x0, (%rdx)
movq %rsp, %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x58340
movq %r14, %rdi
callq 0x59c60
subl %r15d, %ebp
cvtsi2sd %ebp, %xmm0
mulsd 0x6093e(%rip), %xmm0    # 0xe3510
cwtl
cvtsi2sd %eax, %xmm1
divsd %xmm1, %xmm0
xorpd %xmm1, %xmm1
xorl %eax, %eax
ucomisd %xmm0, %xmm1
seta %al
leaq 0x60d81(%rip), %rcx     # 0xe3970
addsd (%rcx,%rax,8), %xmm0
cvttsd2si %xmm0, %r12
movq %rsp, %rdi
callq 0x58d90
testl %r12d, %r12d
je 0x82ca2
leaq 0x630(%rbx), %r14
movl 0x5c8(%rbx), %eax
movl %eax, %ecx
sarl $0x1f, %ecx
pushq $0x1
popq %rbp
orl %ebp, %ecx
testl %eax, %eax
cmovel %eax, %ecx
imull %ecx, %eax
subl %r12d, %eax
cmpl $0x2, %eax
cmovll %ebp, %eax
movl 0x5b8(%rbx), %esi
imull %ecx, %eax
movq %rsp, %r15
movl %eax, (%r15)
movq %r14, %rdi
movq %r15, %rdx
callq 0x84130
movl 0x638(%rbx), %esi
decl %esi
movl 0x5cc(%rbx), %eax
movl %eax, %ecx
sarl $0x1f, %ecx
orl $0x1, %ecx
testl %eax, %eax
cmovel %eax, %ecx
imull %ecx, %eax
addl %r12d, %eax
cmpl $0x2, %eax
cmovll %ebp, %eax
imull %ecx, %eax
movl %eax, (%r15)
movq %rsp, %rdx
movq %r14, %rdi
callq 0x84130
leaq 0xb0(%rbx), %rsi
movq %rbx, %rdi
callq 0x5a550
movq 0x190(%rbx), %rdi
movq (%rdi), %rax
xorl %esi, %esi
callq *0x78(%rax)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x58d90
movq %rbx, %rdi
callq 0x58260
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/gui/widgets/multi/list/listboxheader.cpp
// Function: smooth::GUI::ListBoxHeader::OnLeftButtonClick(smooth::GUI::Point const&)
S::Void S::GUI::ListBoxHeader::OnLeftButtonClick(const Point &mousePos)
{
	if (draggingTab) return;

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

	for (Int n = 0; n < GetNOfTabs(); n++)
	{
		if (mousePos.x - realPos.x >= GetNthTabOffset(n)		      * surface->GetSurfaceDPI() / 96.0 &&
		    mousePos.x - realPos.x < (GetNthTabOffset(n) + GetNthTabWidth(n)) * surface->GetSurfaceDPI() / 96.0)
		{
			onClickTab.Emit(n);

			break;
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
cmpb $0x0, 0x5bc(%rdi)
je 0x82cf0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rax
callq *0x40(%rax)
movq %rax, %r15
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x48(%rax)
movq %rax, %r12
xorl %ebp, %ebp
movq %rax, 0x10(%rsp)
cmpl 0x638(%rbx), %ebp
jge 0x82ce1
movl (%r14), %eax
subl %r12d, %eax
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x8(%rsp)
movq %rbx, %rdi
movl %ebp, %esi
callq 0x58ca0
movl %eax, %r13d
movq %r15, %rdi
callq 0x59c60
movsd 0x607c9(%rip), %xmm1    # 0xe3510
cwtl
imull %r13d, %eax
cvtsi2sd %eax, %xmm0
divsd %xmm1, %xmm0
movsd 0x8(%rsp), %xmm1
ucomisd %xmm0, %xmm1
jb 0x82dbd
movl (%r14), %eax
subl %r12d, %eax
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x8(%rsp)
movq %rbx, %rdi
movl %ebp, %esi
callq 0x58ca0
movl %eax, %r13d
movq %rbx, %rdi
movl %ebp, %esi
callq 0x575c0
movq %r14, %r12
movl %eax, %r14d
addl %r13d, %r14d
movq %r15, %rdi
callq 0x59c60
movsd 0x60770(%rip), %xmm1    # 0xe3510
cwtl
imull %r14d, %eax
movq %r12, %r14
movq 0x10(%rsp), %r12
cvtsi2sd %eax, %xmm0
divsd %xmm1, %xmm0
ucomisd 0x8(%rsp), %xmm0
ja 0x82dc4
incl %ebp
jmp 0x82d12
addq $0x738, %rbx            # imm = 0x738
movq %rbx, %rdi
movl %ebp, %esi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x72596
nop
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/gui/widgets/multi/list/listboxheader.cpp
// Function: smooth::GUI::ListBoxHeader::OnChangeSize(smooth::GUI::Size const&)
S::Void S::GUI::ListBoxHeader::OnChangeSize(const Size &nSize)
{
	Int	 varSizeTabs	  = 0;
	Int	 sumFixedTabSizes = 0;

	for (Int i = 0; i < tabWidths.Length(); i++)
	{
		if (tabWidths.GetNth(i) <= 0)	varSizeTabs++;
		else				sumFixedTabSizes += tabWidths.GetNth(i);
	}

	if (varSizeTabs > 0)
	{
		for (Int i = 0; i < tabWidths.Length(); i++)
		{
			if (tabWidths.GetNth(i) <= 0) tabWidths.SetNth(i, -Math::Max(0, (GetWidth() - sumFixedTabSizes) / varSizeTabs));
		}
	}

	dragHotspot->SetSize(nSize);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, 0x10(%rsp)
movq %rdi, %r14
leaq 0x630(%rdi), %r15
xorl %r13d, %r13d
xorl %ebx, %ebx
xorl %ebp, %ebp
movl 0x638(%r14), %eax
cmpl %eax, %ebp
jge 0x82e37
movq %r15, %rdi
movl %ebp, %esi
callq 0x840de
cmpl $0x0, (%rax)
jle 0x82e30
movq %r15, %rdi
movl %ebp, %esi
callq 0x840de
addl (%rax), %ebx
jmp 0x82e33
incl %r13d
incl %ebp
jmp 0x82e08
testl %r13d, %r13d
jle 0x82e8b
leaq 0xc(%rsp), %r12
xorl %ebp, %ebp
cmpl %eax, %ebp
jge 0x82e8b
movq %r15, %rdi
movl %ebp, %esi
callq 0x840de
cmpl $0x0, (%rax)
jg 0x82e80
movl 0xb0(%r14), %eax
subl %ebx, %eax
cltd
idivl %r13d
testl %eax, %eax
movl $0x0, %ecx
cmovlel %ecx, %eax
negl %eax
movl %eax, 0xc(%rsp)
movq %r15, %rdi
movl %ebp, %esi
movq %r12, %rdx
callq 0x84130
incl %ebp
movl 0x638(%r14), %eax
jmp 0x82e43
movq 0x5d0(%r14), %rdi
leaq 0xa8(%rdi), %rsi
movq (%rdi), %rax
movq 0x10(%rsp), %rdx
callq *0x150(%rax)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/gui/widgets/multi/list/listboxheader.cpp
// Function: smooth::GUI::ListBoxHeader::EnableLocking(bool)
S::Int S::GUI::ListBoxHeader::EnableLocking(Bool enable)
{
	if (enable)
	{
		tabNames.EnableLocking();
		tabWidths.EnableLocking();
		tabOrientations.EnableLocking();
		tabChecked.EnableLocking();
	}
	else
	{
		tabNames.DisableLocking();
		tabWidths.DisableLocking();
		tabOrientations.DisableLocking();
		tabChecked.DisableLocking();
	}

	return Widget::EnableLocking(enable);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
addq $0x5d8, %rdi            # imm = 0x5D8
leaq 0x630(%rbx), %r12
leaq 0x688(%rbx), %r15
leaq 0x6e0(%rbx), %r14
testl %esi, %esi
je 0x82f86
callq 0x583a0
movq %r12, %rdi
callq 0x583a0
movq %r15, %rdi
callq 0x583a0
movq %r14, %rdi
callq 0x583a0
jmp 0x82fa3
callq 0x58a50
movq %r12, %rdi
callq 0x58a50
movq %r15, %rdi
callq 0x58a50
movq %r14, %rdi
callq 0x58a50
movzbl %bpl, %esi
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x5a210
nop
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/gui/widgets/multi/list/listboxheader.cpp
// Function: smooth::GUI::ListBoxHeader::AddTab(smooth::String const&, int, int)
S::Int S::GUI::ListBoxHeader::AddTab(const String &iTabName, Int iTabWidth, Int iTabOrientation)
{
	tabNames.Add(iTabName);
	tabWidths.Add(iTabWidth);
	tabOrientations.Add(iTabOrientation);
	tabChecked.Add(False);

	OnChangeSize(GetSize());

	return Success();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0xc(%rsp), %r14
movl %edx, (%r14)
leaq 0x8(%rsp), %r15
movl %ecx, (%r15)
addq $0x5d8, %rdi            # imm = 0x5D8
callq 0x64dee
leaq 0x630(%rbx), %rdi
movq %r14, %rsi
callq 0x83f0a
leaq 0x688(%rbx), %rdi
movq %r15, %rsi
callq 0x83f0a
leaq 0x6e0(%rbx), %rdi
leaq 0x636a9(%rip), %rsi     # 0xe66b5
callq 0x84084
leaq 0xb0(%rbx), %rsi
movq %rbx, %rdi
callq 0x5a550
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/gui/widgets/multi/list/listboxheader.cpp
// Function: smooth::GUI::ListBoxHeader::RemoveAllTabs()
S::Int S::GUI::ListBoxHeader::RemoveAllTabs()
{
	tabNames.RemoveAll();
	tabWidths.RemoveAll();
	tabOrientations.RemoveAll();
	tabChecked.RemoveAll();

	OnChangeSize(GetSize());

	return Success();
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
addq $0x5d8, %rdi            # imm = 0x5D8
callq 0x64c8c
leaq 0x630(%rbx), %rdi
callq 0x83b5a
leaq 0x688(%rbx), %rdi
callq 0x83b5a
leaq 0x6e0(%rbx), %rdi
callq 0x7ea58
leaq 0xb0(%rbx), %rsi
movq %rbx, %rdi
callq 0x5a550
xorl %eax, %eax
popq %rbx
retq
nop
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/gui/widgets/multi/list/listboxheader.cpp
// Function: smooth::GUI::ListBoxHeader::GetNthTabOffset(int) const
S::Int S::GUI::ListBoxHeader::GetNthTabOffset(Int n) const
{
	if (n >= tabWidths.Length()) return -1;

	Int	 offset = 0;

	for (Int i = 0; i < n; i++)
	{
		offset += (Int) Math::Abs(tabWidths.GetNth(i));
	}

	return offset;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
cmpl %esi, 0x638(%rdi)
jle 0x830ca
movl %esi, %ebp
movq %rdi, %r14
addq $0x630, %r14            # imm = 0x630
xorl %ebx, %ebx
testl %esi, %esi
cmovlel %ebx, %ebp
xorl %r15d, %r15d
cmpl %r15d, %ebp
je 0x830cd
movq %r14, %rdi
movl %r15d, %esi
callq 0x840de
movl (%rax), %eax
movl %eax, %ecx
sarl $0x1f, %ecx
orl $0x1, %ecx
testl %eax, %eax
cmovel %eax, %ecx
imull %eax, %ecx
addl %ecx, %ebx
incl %r15d
jmp 0x830a1
pushq $-0x1
popq %rbx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/gui/widgets/multi/list/listentry.cpp
// Function: smooth::GUI::ListEntry::InitDrag()
S::Void S::GUI::ListEntry::InitDrag()
{
	if (container->GetObjectType() == ListBox::classID)
	{
		Point	 mousePos  = container->GetContainerWindow()->GetMousePosition();
		Point	 entryPos  = GetRealPosition();
		Size	 entrySize = GetRealSize();

		if	(mousePos.y <  entryPos.y		) ((ListBox *) container)->DragSelectedEntry(True);
		else if (mousePos.y >= entryPos.y + entrySize.cy) ((ListBox *) container)->DragSelectedEntry(False);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x190(%rdi), %rdi
addq $0x20, %rdi
movq 0xddb30(%rip), %rax     # 0x161f68
movswl (%rax), %esi
callq 0x58720
testb %al, %al
je 0x84489
movq 0x190(%rbx), %rdi
callq 0x56a50
movq %rax, %rdi
callq 0x57cc0
movq %rax, %r14
shrq $0x20, %r14
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x48(%rax)
movq %rax, %r15
shrq $0x20, %r15
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x50(%rax)
cmpl %r15d, %r14d
jl 0x8448f
shrq $0x20, %rax
addl %r15d, %eax
cmpl %r14d, %eax
jle 0x8448f
popq %rbx
popq %r14
popq %r15
retq
xorl %esi, %esi
cmpl %r15d, %r14d
setl %sil
movq 0x190(%rbx), %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x59aa0
nop
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/gui/widgets/multi/list/listentry.cpp
// Function: smooth::GUI::ListEntry::GetNthTabText(int) const
S::String S::GUI::ListEntry::GetNthTabText(Int i) const
{
	String	 tabText;
	Int	 tabCount = 0;

	for (Int p = 0; p < text.Length(); p++)
	{
		if (tabCount == i)
		{
			for (Int q = p; q < text.Length(); q++)
			{
				if (text[q] == tabDelimiter[0]) break;

				tabText[q - p] = text[q];
			}

			break;
		}

		if (text[p] == tabDelimiter[0]) tabCount++;
	}

	return tabText;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r14
xorl %ebx, %ebx
movq %rdi, (%rsp)
xorl %esi, %esi
callq 0x5a180
addq $0xf0, %r14
movq 0xdc8e9(%rip), %r12     # 0x161bb0
xorl %r15d, %r15d
movq %r14, %rdi
callq 0x58370
cmpl %eax, %r15d
jge 0x8535b
cmpl %ebp, %ebx
je 0x85306
movq %r14, %rdi
movl %r15d, %esi
callq 0x59270
movl %eax, %r13d
movq %r12, %rdi
xorl %esi, %esi
callq 0x59270
xorl %ecx, %ecx
cmpl %eax, %r13d
sete %cl
addl %ecx, %ebx
incl %r15d
jmp 0x852ca
xorl %r12d, %r12d
movq 0xdc8a0(%rip), %rbx     # 0x161bb0
movq %r14, %rdi
callq 0x58370
leal (%r15,%r12), %ebp
cmpl %eax, %ebp
jge 0x8535b
movq %r14, %rdi
movl %ebp, %esi
callq 0x59270
movl %eax, %r13d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x59270
cmpl %eax, %r13d
je 0x8535b
movq %r14, %rdi
movl %ebp, %esi
callq 0x59270
movl %eax, %ebp
movq (%rsp), %rdi
movl %r12d, %esi
callq 0x59cc0
movl %ebp, (%rax)
incl %r12d
jmp 0x85310
movq (%rsp), %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x85370
movq %rax, %r14
movq (%rsp), %rdi
callq 0x5a588
movq %r14, %rdi
callq 0x58260
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/gui/widgets/multi/list/listentry.cpp
// Function: smooth::GUI::ListEntry::SetMark(bool)
S::Int S::GUI::ListEntry::SetMark(Bool nMarked)
{
	if (nMarked == marked) return Success();

	marked = nMarked;

	if (IsRegistered())
	{
		Paint(SP_PAINT);

		((List *) container)->onMarkEntry.Emit(this);
	}

	onToggleMark.Emit(marked);

	return Success();
}

// Assembly:
cmpb %sil, 0x5b8(%rdi)
je 0x853db
pushq %rbx
movq %rdi, %rbx
movb %sil, 0x5b8(%rdi)
movq (%rdi), %rax
callq *0x88(%rax)
testb %al, %al
je 0x853c4
movq (%rbx), %rax
movq %rbx, %rdi
xorl %esi, %esi
callq *0x78(%rax)
movl $0x6a8, %edi            # imm = 0x6A8
addq 0x190(%rbx), %rdi
movq %rbx, %rsi
callq 0x75b18
movzbl 0x5b8(%rbx), %esi
addq $0x610, %rbx            # imm = 0x610
movq %rbx, %rdi
callq 0x8564c
popq %rbx
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/gui/widgets/multi/list/listentry.cpp
// Function: smooth::GUI::ListEntry::Select()
S::Int S::GUI::ListEntry::Select()
{
	selected = True;

	internalOnSelectEntry.Emit(container->GetHandle(), GetHandle());

	Paint(SP_PAINT);

	((List *) container)->onSelectEntry.Emit(this);

	onSelect.Emit();

	return Success();
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movb $0x1, 0x5b9(%rdi)
movq 0x190(%rdi), %rax
movl 0x8(%rax), %esi
movl 0x8(%rdi), %edx
movq 0xdc8ab(%rip), %rdi     # 0x161ca8
callq 0x7260e
movq (%rbx), %rax
movq %rbx, %rdi
xorl %esi, %esi
callq *0x78(%rax)
movl $0x688, %edi            # imm = 0x688
addq 0x190(%rbx), %rdi
movq %rbx, %rsi
callq 0x75b18
addq $0x5d0, %rbx            # imm = 0x5D0
movq %rbx, %rdi
callq 0x70196
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/gui/widgets/multi/list/listentryseparator.cpp
// Function: smooth::GUI::ListEntrySeparator::ListEntrySeparator()
S::GUI::ListEntrySeparator::ListEntrySeparator() : ListEntry(NIL)
{
	type		= classID;

	font.SetColor(Setup::InactiveTextColor);

	SetHeight(3);

	Remove(hotspot);
	Remove(markHotspot);

	internalOnSelectEntry.Disconnect(&ListEntry::OnSelectOtherEntry, this);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq %rsp, %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x5a180
movq %rbx, %rdi
movq %r14, %rsi
callq 0x562b0
movq %rsp, %rdi
callq 0x5a588
movq 0xdbafb(%rip), %rax     # 0x1613c8
addq $0x10, %rax
movq %rax, (%rbx)
movq 0xdc2dd(%rip), %rax     # 0x161bb8
movzwl (%rax), %eax
movw %ax, 0x20(%rbx)
leaq 0x140(%rbx), %rdi
movq 0xdc060(%rip), %rsi     # 0x161950
callq 0x59940
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x58980
movq 0x5c0(%rbx), %rsi
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x38(%rax)
movq 0x5c8(%rbx), %rsi
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x38(%rax)
movq 0xdc381(%rip), %rdi     # 0x161ca8
movq 0xdbbe2(%rip), %rsi     # 0x161510
xorl %edx, %edx
movq %rbx, %rcx
callq 0x85ae6
addq $0x18, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq %rsp, %rdi
callq 0x5a588
jmp 0x85958
movq %rax, %r14
movq %rbx, %rdi
callq 0x5a240
movq %r14, %rdi
callq 0x58260
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/gui/widgets/multi/list/listentryseparator.cpp
// Function: smooth::GUI::ListEntrySeparator::Paint(int)
S::Int S::GUI::ListEntrySeparator::Paint(Int message)
{
	if (!IsRegistered()) return Error();
	if (!IsVisible())    return Success();

	switch (message)
	{
		case SP_PAINT:
			{
				Surface	*surface = GetDrawSurface();
				Rect	 frame	 = Rect(GetRealPosition(), GetRealSize());

				surface->Box(frame + Point(4, 1) - Size(8, 2), font.GetColor(), Rect::Filled);
			}
	}

	return Widget::Paint(message);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x30, %rsp
movl %esi, %ebx
movq %rdi, %r14
movq (%rdi), %rax
callq *0x88(%rax)
testb %al, %al
je 0x85abd
movq (%r14), %rax
movq %r14, %rdi
callq *0x90(%rax)
movl %eax, %ecx
xorl %eax, %eax
testb %cl, %cl
je 0x85ac0
testl %ebx, %ebx
jne 0x85ab1
movq (%r14), %rax
movq %r14, %rdi
callq *0x40(%rax)
movq %rax, %r15
movq (%r14), %rax
movq %r14, %rdi
callq *0x48(%rax)
movq %rax, %r12
movq %rax, %r13
shrq $0x20, %r13
movq (%r14), %rax
movq %r14, %rdi
callq *0x50(%rax)
leal (%rax,%r12), %ecx
shrq $0x20, %rax
leaq 0x20(%rsp), %rdi
movl %r12d, (%rdi)
movl %r13d, 0x4(%rdi)
movl %ecx, 0x8(%rdi)
addl %r13d, %eax
movl %eax, 0xc(%rdi)
movabsq $0x100000004, %rax      # imm = 0x100000004
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
callq 0x58930
leal -0x8(%rdx), %ecx
movabsq $-0x100000000, %rsi     # imm = 0xFFFFFFFF00000000
andq %rdx, %rsi
orq %rsi, %rcx
movabsq $-0x200000000, %rdx     # imm = 0xFFFFFFFE00000000
addq %rcx, %rdx
leaq 0x10(%rsp), %r12
movq %rax, (%r12)
movq %rdx, 0x8(%r12)
leaq 0x140(%r14), %rdi
callq 0x58750
movq 0xdc50e(%rip), %rcx     # 0x161fa8
movl (%rcx), %ecx
movq %rsp, %r8
andq $0x0, (%r8)
movq %r15, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x58b80
movq %r14, %rdi
movl %ebx, %esi
callq 0x57910
jmp 0x85ac0
pushq $-0x1
popq %rax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/gui/widgets/multi/menu/menubar.cpp
// Function: smooth::GUI::Menubar::Menubar()
S::GUI::Menubar::Menubar()
{
	type		= classID;
	orientation	= OR_TOP;
	subtype		= WO_SEPARATOR;

#ifdef __APPLE__
	menubarCocoa = NIL;
#endif

	SetSize(Size(18, 18));

	onRegister.Connect(&Menubar::OnRegister, this);
	onUnregister.Connect(&Menubar::OnUnregister, this);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x58890
movq 0xdc3dd(%rip), %rax     # 0x161f90
addq $0x10, %rax
movq %rax, (%rbx)
movq 0xdbc4f(%rip), %rax     # 0x161810
movzwl (%rax), %eax
movw %ax, 0x20(%rbx)
movw $0x4, 0xd0(%rbx)
movw $0x1, 0x1a0(%rbx)
movabsq $0x1200000012, %rax     # imm = 0x1200000012
movq %rsp, %rdx
movq %rax, (%rdx)
leaq 0xa8(%rbx), %rsi
movq %rbx, %rdi
callq 0x58250
leaq 0x558(%rbx), %rdi
movq 0xdba61(%rip), %rsi     # 0x161668
xorl %edx, %edx
movq %rbx, %rcx
callq 0x8625e
leaq 0x578(%rbx), %rdi
movq 0xdbd99(%rip), %rsi     # 0x1619b8
xorl %edx, %edx
movq %rbx, %rcx
callq 0x8625e
addq $0x8, %rsp
popq %rbx
popq %r14
retq
jmp 0x85c33
movq %rax, %r14
movq %rbx, %rdi
callq 0x56520
movq %r14, %rdi
callq 0x58260
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/gui/widgets/multi/menu/menubar.cpp
// Function: smooth::GUI::Menubar::AddEntryInternal(smooth::String const&, smooth::GUI::Bitmap const&, smooth::GUI::PopupMenu*, bool*, int*, int)
S::GUI::MenuEntry *S::GUI::Menubar::AddEntryInternal(const String &text, const Bitmap &bitmap, PopupMenu *popupMenu, Bool *bVar, Int *iVar, Int iCode)
{
	MenuEntry	*newEntry = new MenubarEntry(text, bitmap, popupMenu, bVar, iVar, iCode);

	if (Add(newEntry) == Success())
	{
		createdEntry.Set(newEntry->GetHandle(), True);

		if (GetHeight() < newEntry->GetHeight() + 2) SetHeight(newEntry->GetHeight() + 2);
		if (GetWidth() < newEntry->GetWidth() + 3) SetWidth(newEntry->GetWidth() + 3);

		return newEntry;
	}

	DeleteObject(newEntry);

	return NIL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, 0x10(%rsp)
movq %r8, %r12
movq %rcx, %r13
movq %rdx, %rbp
movq %rsi, %r15
movq %rdi, %r14
movl $0x608, %edi            # imm = 0x608
callq 0x56700
movq %rax, %rbx
movl 0x50(%rsp), %eax
movl %eax, (%rsp)
movq %rbx, %rdi
movq %r15, %rsi
movq %rbp, %rdx
movq %r13, %rcx
movq %r12, %r8
movq 0x10(%rsp), %r9
callq 0x586f0
movq (%r14), %rax
movq %r14, %rdi
movq %rbx, %rsi
callq *0x30(%rax)
testl %eax, %eax
je 0x85cd3
movq %rbx, %rdi
callq 0x5a010
xorl %ebx, %ebx
jmp 0x85d1d
leaq 0x5b8(%r14), %rdi
movl 0x8(%rbx), %esi
leaq 0x60bad(%rip), %rdx     # 0xe6891
callq 0x816fc
movl 0xb4(%rbx), %esi
addl $0x2, %esi
cmpl %esi, 0xb4(%r14)
jge 0x85d03
movq %r14, %rdi
callq 0x58980
movl 0xb0(%rbx), %esi
addl $0x3, %esi
cmpl %esi, 0xb0(%r14)
jge 0x85d1d
movq %r14, %rdi
callq 0x5a1f0
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movl $0x608, %esi            # imm = 0x608
movq %rbx, %rdi
callq 0x564c0
movq %r14, %rdi
callq 0x58260
nop
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/gui/widgets/multi/menu/menubarentry.cpp
// Function: smooth::GUI::MenubarEntry::ClosePopupMenu()
S::Void S::GUI::MenubarEntry::ClosePopupMenu()
{
	if (popup == NIL || popup->GetContainer() != this) return;

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

	Remove(popup);

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

	if (IsRegistered())
	{
		Window	*window	 = container->GetContainerWindow();
		Surface	*surface = GetDrawSurface();
		Rect	 frame	 = Rect(GetRealPosition(), GetRealSize());

		surface->StartPaint(frame);

		if (!window->IsMouseOn(frame)) Paint(SP_MOUSEOUT);

		hotspot->Activate();

		surface->EndPaint();
	}

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

// Assembly:
movq 0x5b8(%rdi), %rax
testq %rax, %rax
je 0x86b77
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
cmpq %rdi, 0x190(%rax)
jne 0x86b69
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x88(%rax)
testb %al, %al
je 0x86a8b
movq 0x190(%rbx), %rax
andl $-0x3, 0x30(%rax)
movq 0x5b8(%rbx), %rsi
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x38(%rax)
movl $0x698, %edi            # imm = 0x698
addq 0x5b8(%rbx), %rdi
movq 0xdb3d2(%rip), %rsi     # 0x161e80
xorl %edx, %edx
movq %rbx, %rcx
callq 0x878ee
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x88(%rax)
testb %al, %al
je 0x86b5d
movq 0x190(%rbx), %rdi
callq 0x56a50
movq %rax, %r15
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, %rbp
shrq $0x20, %rbp
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x50(%rax)
leal (%rax,%r12), %ecx
shrq $0x20, %rax
leaq 0x8(%rsp), %r13
movl %r12d, (%r13)
movl %ebp, 0x4(%r13)
movl %ecx, 0x8(%r13)
addl %ebp, %eax
movl %eax, 0xc(%r13)
movq %r14, %rdi
movq %r13, %rsi
callq 0x56160
movq %r15, %rdi
movq %r13, %rsi
callq 0x58ae0
testb %al, %al
jne 0x86b48
movq (%rbx), %rax
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq *0x78(%rax)
movq 0x5f8(%rbx), %rdi
movq (%rdi), %rax
callq *0x68(%rax)
movq %r14, %rdi
callq 0x59a80
callq 0x582b0
movq %rax, 0x5f0(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/gui/widgets/multi/menu/../../../../../include/smooth/templates/signals/signal.h
// Function: smooth::Signal0<void>::GetNOfConnectedSlots() const
Int GetNOfConnectedSlots() const
			{
				if (slotsN == NIL && slots0 == NIL) return 0;

				if (slotsN == NIL) return slots0->Length();
				if (slots0 == NIL) return slotsN->Length();

				return slotsN->Length() + slots0->Length();
			}

// Assembly:
movq 0x10(%rdi), %rdx
movq 0x18(%rdi), %rcx
xorl %eax, %eax
movq %rdx, %rsi
orq %rcx, %rsi
je 0x878e8
testq %rdx, %rdx
je 0x878e9
movl 0x8(%rdx), %eax
testq %rcx, %rcx
je 0x878e8
addl 0x8(%rcx), %eax
retq
movl 0x8(%rcx), %eax
retq
nop
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/gui/widgets/multi/menu/menuentry.cpp
// Function: smooth::GUI::MenuEntry::MenuEntry(smooth::String const&, smooth::GUI::Bitmap const&, smooth::GUI::PopupMenu*, bool*, int*, int)
S::GUI::MenuEntry::MenuEntry(const String &iText, const Bitmap &iBitmap, PopupMenu *iPopup, Bool *ibVar, Int *iiVar, Int iiCode)
{
	type	    = classID;

	popup	    = NIL;
	bVar	    = ibVar;
	iVar	    = iiVar;
	iCode	    = iiCode;
	orientation = OR_LEFT;

	shortcut    = NIL;

	SetText(iText);
	SetBitmap(iBitmap);

	SetPopupMenu(iPopup);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, %r14
movq %r8, %r15
movq %rcx, 0x10(%rsp)
movq %rdx, %r12
movq %rsi, %rbp
movq %rdi, %rbx
callq 0x59c20
movq 0xda2a6(%rip), %rax     # 0x161cf8
addq $0x10, %rax
movq %rax, (%rbx)
leaq 0x5c0(%rbx), %rdi
movq %rdi, 0x8(%rsp)
xorl %esi, %esi
callq 0x59c80
leaq 0x5c8(%rbx), %r13
movq %r13, %rdi
xorl %esi, %esi
callq 0x59c80
movl 0x50(%rsp), %eax
movq 0xda1c8(%rip), %rcx     # 0x161c50
movzwl (%rcx), %ecx
movw %cx, 0x20(%rbx)
andq $0x0, 0x5b8(%rbx)
movq %r15, 0x5d8(%rbx)
movq %r14, 0x5e0(%rbx)
movl %eax, 0x5e8(%rbx)
movw $0x10, 0xd0(%rbx)
andq $0x0, 0x5d0(%rbx)
movq (%rbx), %rax
movq %rbx, %rdi
movq %rbp, %rsi
callq *0xa0(%rax)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x57720
movq %rbx, %rdi
movq 0x10(%rsp), %rsi
callq 0x57700
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x87b07
movq %rax, %r14
jmp 0x87b11
movq %rax, %r14
movq %r13, %rdi
callq 0x5a4c8
movq 0x8(%rsp), %rdi
callq 0x5a4c8
movq %rbx, %rdi
callq 0x58200
movq %r14, %rdi
callq 0x58260
nop
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/gui/widgets/multi/menu/menuentry.cpp
// Function: smooth::GUI::MenuEntry::SetBitmap(smooth::GUI::Bitmap const&)
S::Int S::GUI::MenuEntry::SetBitmap(const Bitmap &newBitmap)
{
	bitmap	= newBitmap;
	graymap	= newBitmap;

	if (bitmap == NIL) return Success();

	graymap.GrayscaleBitmap();

	return Success();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x5c0(%rdi), %r15
movq %r15, %rdi
callq 0x59570
addq $0x5c8, %rbx            # imm = 0x5C8
movq %rbx, %rdi
movq %r14, %rsi
callq 0x59570
movq %r15, %rdi
xorl %esi, %esi
callq 0x590c0
testb %al, %al
jne 0x87b64
movq %rbx, %rdi
callq 0x57f60
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/gui/widgets/multi/menu/menuentry.cpp
// Function: smooth::GUI::MenuEntry::SetPopupMenu(smooth::GUI::PopupMenu*)
S::Int S::GUI::MenuEntry::SetPopupMenu(PopupMenu *nPopup)
{
	if (popup != NIL) popup->onEnqueueForDeletion.Disconnect(&MenuEntry::InternalOnDeletePopup, this);

	popup = nPopup;

	if (popup != NIL) popup->onEnqueueForDeletion.Connect(&MenuEntry::InternalOnDeletePopup, this);

	return Success();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x5b8(%rdi), %rdi
testq %rdi, %rdi
je 0x87b9a
addq $0x598, %rdi            # imm = 0x598
movq 0xda280(%rip), %rsi     # 0x161e10
xorl %edx, %edx
movq %rbx, %rcx
callq 0x87d00
movq %r14, 0x5b8(%rbx)
testq %r14, %r14
je 0x87bc1
addq $0x598, %r14            # imm = 0x598
movq 0xda25c(%rip), %rsi     # 0x161e10
movq %r14, %rdi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x87d6a
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/gui/widgets/multi/menu/menuentry.cpp
// Function: smooth::GUI::MenuEntry::SetShortcut(int, int, smooth::GUI::Window*)
S::Int S::GUI::MenuEntry::SetShortcut(Int scFlags, Int scKey, Window *window)
{
	shortcut = new Shortcut(scFlags, scKey, this);
	shortcut->onKeyDown.Connect(&onAction);

	window->Add(shortcut);

	return Success();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %rbx
movl %edx, %ebp
movl %esi, %r12d
movq %rdi, %r14
movl $0x5e8, %edi            # imm = 0x5E8
callq 0x56700
movq %rax, %r15
movq %rax, %rdi
movl %r12d, %esi
movl %ebp, %edx
movq %r14, %rcx
xorl %r8d, %r8d
callq 0x58d00
movq %r15, 0x5d0(%r14)
addq $0x5c8, %r15            # imm = 0x5C8
leaq 0x478(%r14), %rsi
movq %r15, %rdi
callq 0x72300
movq 0x5d0(%r14), %rsi
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x30(%rax)
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movl $0x5e8, %esi            # imm = 0x5E8
movq %r15, %rdi
callq 0x564c0
movq %rbx, %rdi
callq 0x58260
nop
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/gui/widgets/multi/menu/micromenu.cpp
// Function: smooth::GUI::MicroMenu::MicroMenu(smooth::GUI::Point const&, smooth::GUI::Size const&, int)
S::GUI::MicroMenu::MicroMenu(const Point &iPos, const Size &iSize, Int sType)
{
	type	= classID;
	subtype	= sType;

	SetMetrics(iPos, iSize);

	if (GetWidth() == 0) SetWidth(subtype == OR_VERT ? 13 : 7);
	if (GetHeight() == 0) SetHeight(subtype == OR_VERT ? 7 : 13);

	onOpenPopupMenu.SetParentObject(this);
	onClosePopupMenu.SetParentObject(this);

	hotspot	= new HotspotSimpleButton(Point(), GetSize());

	hotspot->onLeftButtonDown.Connect(&MicroMenu::OpenPopupMenu, this);

	Add(hotspot);

	popup = new PopupMenu();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
callq 0x58890
movq 0xd9fd6(%rip), %rax     # 0x161e60
addq $0x10, %rax
movq %rax, (%rbx)
andq $0x0, 0x6a0(%rbx)
leaq 0xcf8c8(%rip), %rax     # 0x157768
movq %rax, 0x698(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x6a8(%rbx)
andq $0x0, 0x6c0(%rbx)
movq %rax, 0x6b8(%rbx)
movups %xmm0, 0x6c8(%rbx)
movq 0xd9baa(%rip), %rax     # 0x161a78
movzwl (%rax), %eax
movw %ax, 0x20(%rbx)
movw %bp, 0x1a0(%rbx)
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x58250
cmpl $0x0, 0xb0(%rbx)
pushq $0xd
popq %rbp
pushq $0x7
popq %r14
jne 0x87f10
cmpw $0x2, 0x1a0(%rbx)
movl %r14d, %esi
cmovel %ebp, %esi
movq %rbx, %rdi
callq 0x5a1f0
cmpl $0x0, 0xb4(%rbx)
jne 0x87f2f
cmpw $0x2, 0x1a0(%rbx)
cmovel %r14d, %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x58980
movq %rbx, 0x6a0(%rbx)
movq %rbx, 0x6c0(%rbx)
movl $0x5b8, %edi            # imm = 0x5B8
callq 0x56700
movq %rax, %r15
leaq 0xb0(%rbx), %rdx
movq %rsp, %rsi
andq $0x0, (%rsi)
movq %rax, %rdi
callq 0x56ad0
movq %r15, 0x688(%rbx)
addq $0x2f8, %r15            # imm = 0x2F8
movq 0xd9c6b(%rip), %rsi     # 0x161be0
movq %r15, %rdi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x8878a
movq 0x688(%rbx), %rsi
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x30(%rax)
movl $0x6b8, %edi            # imm = 0x6B8
callq 0x56700
movq %rax, %r15
movq %rax, %rdi
callq 0x5a050
movq %r15, 0x690(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movl $0x6b8, %esi            # imm = 0x6B8
jmp 0x87fcb
movq %rax, %r14
movl $0x5b8, %esi            # imm = 0x5B8
movq %r15, %rdi
callq 0x564c0
jmp 0x87fd8
movq %rax, %r14
leaq 0x698(%rbx), %r15
leaq 0x6b8(%rbx), %rdi
callq 0x700e0
movq %r15, %rdi
callq 0x700e0
movq %rbx, %rdi
callq 0x56520
movq %r14, %rdi
callq 0x58260
nop
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/gui/widgets/multi/menu/micromenu.cpp
// Function: smooth::GUI::MicroMenu::ClosePopupMenu()
S::Void S::GUI::MicroMenu::ClosePopupMenu()
{
	if (popup == NIL || popup->GetContainer() != this) return;

	Remove(popup);

	onClosePopupMenu.Emit();

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

	hotspot->Activate();
}

// Assembly:
pushq %rbx
movq 0x690(%rdi), %rsi
testq %rsi, %rsi
je 0x88747
movq %rdi, %rbx
cmpq %rdi, 0x190(%rsi)
je 0x88749
popq %rbx
retq
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x38(%rax)
leaq 0x6b8(%rbx), %rdi
callq 0x70196
movl $0x698, %edi            # imm = 0x698
addq 0x690(%rbx), %rdi
movq 0xd92f7(%rip), %rsi     # 0x161a68
xorl %edx, %edx
movq %rbx, %rcx
callq 0x889b4
movq 0x688(%rbx), %rdi
movq (%rdi), %rax
popq %rbx
jmpq *0x68(%rax)
nop
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/gui/widgets/multi/menu/popupmenu.cpp
// Function: smooth::GUI::PopupMenu::PopupMenu()
S::GUI::PopupMenu::PopupMenu()
{
	type		= classID;
	orientation	= OR_FREE;

	closedByClick	= False;

	toolWindow = NIL;

	internalRequestClose.SetParentObject(this);

	internalOnOpenPopupMenu.Connect(&PopupMenu::OnOpenPopupMenu, this);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x58890
movq 0xd8f70(%rip), %rax     # 0x161a08
addq $0x10, %rax
movq %rax, (%rbx)
leaq 0x698(%rbx), %r14
leaq 0xcecbb(%rip), %rax     # 0x157768
movq %rax, 0x698(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x6a8(%rbx)
movq 0xd8efb(%rip), %rax     # 0x1619c0
movzwl (%rax), %eax
movw %ax, 0x20(%rbx)
movw $0x80, 0xd0(%rbx)
movb $0x0, 0x690(%rbx)
andq $0x0, 0x688(%rbx)
movq %rbx, 0x6a0(%rbx)
movq 0xd8c96(%rip), %rdi     # 0x161788
movq 0xd8e97(%rip), %rsi     # 0x161990
xorl %edx, %edx
movq %rbx, %rcx
callq 0x89162
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r15
movq %r14, %rdi
callq 0x700e0
movq %rbx, %rdi
callq 0x56520
movq %r15, %rdi
callq 0x58260
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/gui/widgets/multi/menu/popupmenu.cpp
// Function: smooth::GUI::PopupMenu::AddEntryInternal(smooth::String const&, smooth::GUI::Bitmap const&, smooth::GUI::PopupMenu*, bool*, int*, int)
S::GUI::MenuEntry *S::GUI::PopupMenu::AddEntryInternal(const String &text, const Bitmap &bitmap, PopupMenu *popupMenu, Bool *bVar, Int *iVar, Int iCode)
{
	PopupMenuEntry	*newEntry = NIL;

	if	(bVar != NIL) newEntry = new PopupMenuEntryCheck(text, bVar);
	else if (iVar != NIL) newEntry = new PopupMenuEntryOption(text, iVar, iCode);
	else		      newEntry = new PopupMenuEntry(text, bitmap, popupMenu);

	newEntry->SetOwner(this);

	if (Add(newEntry) == Success())
	{
		createdEntry.Set(newEntry->GetHandle(), True);

		return newEntry;
	}

	DeleteObject(newEntry);

	return NIL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %r14
testq %r8, %r8
je 0x88bd2
movq %r8, %r13
movl $0x618, %edi            # imm = 0x618
callq 0x56700
movq %rax, %rbx
movq %rax, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x57710
jmp 0x88c12
movq %r9, %r12
movq %rdx, %rbp
movq %rcx, %r13
movl $0x618, %edi            # imm = 0x618
callq 0x56700
movq %rax, %rbx
testq %r12, %r12
je 0x88c01
movl 0x40(%rsp), %ecx
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x56e90
jmp 0x88c12
movq %rbx, %rdi
movq %r15, %rsi
movq %rbp, %rdx
movq %r13, %rcx
callq 0x59e80
movq %r14, 0x600(%rbx)
movq (%r14), %rax
movq %r14, %rdi
movq %rbx, %rsi
callq *0x30(%rax)
testl %eax, %eax
je 0x88c35
movq %rbx, %rdi
callq 0x5a010
xorl %ebx, %ebx
jmp 0x88c4e
addq $0x5b8, %r14            # imm = 0x5B8
movl 0x8(%rbx), %esi
leaq 0x5ddbe(%rip), %rdx     # 0xe6a04
movq %r14, %rdi
callq 0x816fc
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x88c64
jmp 0x88c64
movq %rax, %r14
movl $0x618, %esi            # imm = 0x618
movq %rbx, %rdi
callq 0x564c0
movq %r14, %rdi
callq 0x58260
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/gui/widgets/multi/menu/popupmenu.cpp
// Function: smooth::GUI::PopupMenu::Show()
S::Int S::GUI::PopupMenu::Show()
{
	if (IsVisible()) return Success();

	visible = True;

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

	SetFlags(GetFlags() & ~MB_POPUPOPEN);

	closedByClick = False;

	Window	*window = container->GetContainerWindow();

	/* Create tool window, add entries and display it.
	 */
	toolWindow = new ToolWindow(GetPosition(), GetSize());
	toolWindow->onPaint.Connect(&PopupMenu::OnToolWindowPaint, this);
	toolWindow->onLoseFocus.Connect(&internalRequestClose);

	window->onChangePosition.Connect(&internalRequestClose);
	window->onChangeSize.Connect(&internalRequestClose);

	for (Int i = 0; i < Length(); i++)
	{
		MenuEntry	*entry = GetNthEntry(i);

		if (entry->GetObjectType() != PopupMenuEntry::classID) continue;

		entry->SetRegisteredFlag(False);

		toolWindow->Add(entry);
	}

	Add(toolWindow);

	internalOnOpenPopupMenu.Emit(GetHandle());

	toolWindow->Show();

	/* Notify subscribers of popup open.
	 */
	onShow.Emit();

	return Success();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rax
callq *0x90(%rax)
testb %al, %al
jne 0x88de5
movb $0x1, 0xcb(%rbx)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x88(%rax)
testb %al, %al
je 0x88de5
andb $-0x3, 0x30(%rbx)
movb $0x0, 0x690(%rbx)
movq 0x190(%rbx), %rdi
callq 0x56a50
movq %rax, %r15
movl $0x6d8, %edi            # imm = 0x6D8
callq 0x56700
movq %rax, %r12
leaq 0xa8(%rbx), %rsi
leaq 0xb0(%rbx), %rdx
movq %rax, %rdi
callq 0x5a380
movq %r12, 0x688(%rbx)
addq $0x648, %r12            # imm = 0x648
movq 0xd8833(%rip), %rsi     # 0x161538
xorl %r14d, %r14d
movq %r12, %rdi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x89268
movl $0x518, %edi            # imm = 0x518
addq 0x688(%rbx), %rdi
leaq 0x698(%rbx), %r12
movq %r12, %rsi
callq 0x759ba
leaq 0x278(%r15), %rdi
movq %r12, %rsi
callq 0x71412
addq $0x298, %r15            # imm = 0x298
movq %r15, %rdi
movq %r12, %rsi
callq 0x89304
movq 0xd8930(%rip), %rax     # 0x161688
movswl (%rax), %ebp
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x178(%rax)
cmpl %eax, %r14d
jge 0x88daa
movq (%rbx), %rax
movq %rbx, %rdi
movl %r14d, %esi
callq *0x180(%rax)
movq %rax, %r15
leaq 0x20(%rax), %rdi
movl %ebp, %esi
callq 0x5a150
testb %al, %al
jne 0x88da5
movb $0x0, 0xca(%r15)
movq 0x688(%rbx), %rdi
movq (%rdi), %rax
movq %r15, %rsi
callq *0x30(%rax)
incl %r14d
jmp 0x88d5b
movq 0x688(%rbx), %rsi
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x30(%rax)
movl 0x8(%rbx), %esi
movq 0xd89c4(%rip), %rdi     # 0x161788
callq 0x72596
movq 0x688(%rbx), %rdi
movq (%rdi), %rax
callq *0x58(%rax)
addq $0x1f8, %rbx            # imm = 0x1F8
movq %rbx, %rdi
callq 0x70196
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movl $0x6d8, %esi            # imm = 0x6D8
movq %r12, %rdi
callq 0x564c0
movq %rbx, %rdi
callq 0x58260
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/gui/widgets/multi/menu/popupmenu.cpp
// Function: smooth::GUI::PopupMenu::OnToolWindowPaint()
S::Void S::GUI::PopupMenu::OnToolWindowPaint()
{
	if (toolWindow == NIL) return;

	Surface	*surface = toolWindow->GetDrawSurface();
	Rect	 frame = Rect(Point(0, 0), GetRealSize());

	surface->Frame(frame, FRAME_UP);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq 0x688(%rdi), %rdi
testq %rdi, %rdi
je 0x88e4d
movq (%rdi), %rax
callq *0x40(%rax)
movq %rax, %r14
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x50(%rax)
leaq 0x8(%rsp), %rsi
andq $0x0, (%rsi)
movl %eax, 0x8(%rsi)
shrq $0x20, %rax
movl %eax, 0xc(%rsi)
movq %r14, %rdi
xorl %edx, %edx
callq 0x58ad0
addq $0x18, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/gui/widgets/multi/menu/popupmenu.cpp
// Function: smooth::GUI::PopupMenu::Hide()
S::Int S::GUI::PopupMenu::Hide()
{
	if (!visible) return Success();

	visible = False;

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

	Window	*window = container->GetContainerWindow();

	/* Close tool window, remove entries and delete it.
	 */
	toolWindow->Close();

	window->onChangePosition.Disconnect(&internalRequestClose);
	window->onChangeSize.Disconnect(&internalRequestClose);

	for (Int i = 0; i < Length(); i++)
	{
		MenuEntry	*entry = GetNthEntry(i);

		if (entry->GetObjectType() != PopupMenuEntry::classID) continue;

		toolWindow->Remove(entry);

		entry->SetRegisteredFlag(True);
		entry->SetContainer(this);
	}

	DeleteObject(toolWindow);

	toolWindow = NIL;

	/* Notify subscribers of popup close.
	 */
	onHide.Emit();

	return Success();
}

// Assembly:
cmpb $0x1, 0xcb(%rdi)
jne 0x88f56
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movb $0x0, 0xcb(%rdi)
movq (%rdi), %rax
callq *0x88(%rax)
testb %al, %al
je 0x88f4c
movq 0x190(%rbx), %rdi
callq 0x56a50
movq %rax, %r14
movq 0x688(%rbx), %rdi
callq 0x59700
leaq 0x278(%r14), %rdi
leaq 0x698(%rbx), %r15
movq %r15, %rsi
callq 0x89392
addq $0x298, %r14            # imm = 0x298
movq %r14, %rdi
movq %r15, %rsi
callq 0x893f4
movq 0xd87b9(%rip), %rax     # 0x161688
xorl %ebp, %ebp
movswl (%rax), %r14d
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x178(%rax)
cmpl %eax, %ebp
jge 0x88f29
movq (%rbx), %rax
movq %rbx, %rdi
movl %ebp, %esi
callq *0x180(%rax)
movq %rax, %r15
leaq 0x20(%rax), %rdi
movl %r14d, %esi
callq 0x5a150
testb %al, %al
jne 0x88f25
movq 0x688(%rbx), %rdi
movq (%rdi), %rax
movq %r15, %rsi
callq *0x38(%rax)
movb $0x1, 0xca(%r15)
movq %rbx, 0x190(%r15)
incl %ebp
jmp 0x88ed5
movq 0x688(%rbx), %rdi
callq 0x5a010
andq $0x0, 0x688(%rbx)
addq $0x218, %rbx            # imm = 0x218
movq %rbx, %rdi
callq 0x70196
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
xorl %eax, %eax
retq
nop
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/gui/widgets/multi/menu/../../../../../include/smooth/templates/signals/signal.h
// Function: int smooth::Signal1<void, smooth::GUI::Point const&>::Disconnect<void>(smooth::Signal0<void>*)
Int Disconnect(Signal0<slotReturnTYPE> *sig)
			{
				if (slots0 == NIL) return Error();

				SlotSignal0<slotReturnTYPE>	 slot(sig);

				for (Int i = slots0->Length() - 1; i >= 0; i--)
				{
					if ((*((SlotBase0<Void> *) slots0->GetNth(i))) == slot)
					{
						RemoveNth0(i);

						break;
					}
				}

				return Success();
			}

// Assembly:
movq 0x18(%rdi), %rax
testq %rax, %rax
je 0x893f0
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0xce773(%rip), %rcx     # 0x157b20
movq %rsp, %r14
movq %rcx, (%r14)
movq %rsi, 0x8(%r14)
movl 0x8(%rax), %ebp
testl %ebp, %ebp
jle 0x893e5
decl %ebp
movq 0x18(%rbx), %rdi
movl %ebp, %esi
callq 0x5c1b6
movq (%rax), %rdi
movq (%rdi), %rax
movq %r14, %rsi
callq *0x20(%rax)
testb %al, %al
je 0x893ba
movq %rbx, %rdi
movl %ebp, %esi
callq 0x70a2e
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
pushq $-0x1
popq %rax
retq