// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/classes/gui/widgets/multi/menu/menubarentry.cpp
// Function: smooth::GUI::MenubarEntry::MenubarEntry(smooth::String const&, smooth::GUI::Bitmap const&, smooth::GUI::PopupMenu*, bool*, int*, int)
S::GUI::MenubarEntry::MenubarEntry(const String &iText, const Bitmap &iBitmap, PopupMenu *iPopup, Bool *ibVar, Int *iiVar, Int iiCode) : MenuEntry(iText, iBitmap, iPopup, ibVar, iiVar, iiCode)
{
	type		= classID;

	if	(text == NIL && bitmap == NIL) SetSize(Size(4, 15));
	else if (text != NIL && bitmap == NIL) SetSize(Size(unscaledTextSize.cx + 7, 16));
	else if (text == NIL && bitmap != NIL) SetSize(bitmap.GetSize() + Size(4 + (popup != NIL ? 12 : 0), 4));

	hotspot		= NIL;
	actionHotspot	= NIL;

	if (text != NIL || bitmap != NIL)
	{
		hotspot	= new HotspotSimpleButton(Point(), GetSize());
		hotspot->onMouseOver.Connect(&MenubarEntry::OnMouseOver, this);
		hotspot->onLeftButtonDown.Connect(&MenubarEntry::OpenPopupMenu, this);

		actionHotspot = new Hotspot(Point(), GetSize() - Size((text == NIL && bitmap != NIL && popup != NIL ? 12 : 0), 0));
		actionHotspot->onLeftButtonClick.Connect(&onAction);

		if (text == NIL && bitmap != NIL && popup != NIL) actionHotspot->onLeftButtonDown.Connect(&MenubarEntry::ClosePopupMenu, this);

		Add(hotspot);
		Add(actionHotspot);
	}

	popupMenuClosed	= 0;

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
movl 0x10(%rbp), %eax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0xc8(%rbp)
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
movq -0x30(%rbp), %r9
movl 0x10(%rbp), %r10d
movq %rsp, %rax
movl %r10d, (%rax)
callq 0x5add0
movq -0xc8(%rbp), %rdi
movq 0x14d2c6(%rip), %rax    # 0x208b38
addq $0x10, %rax
movq %rax, (%rdi)
movq 0x14cc50(%rip), %rax    # 0x2084d0
movswl (%rax), %esi
addq $0x20, %rdi
callq 0x5a2e0
jmp 0xbb88e
movq -0xc8(%rbp), %rdi
addq $0xf0, %rdi
xorl %esi, %esi
callq 0x59320
movb %al, -0xc9(%rbp)
jmp 0xbb8ab
movb -0xc9(%rbp), %al
testb $0x1, %al
jne 0xbb8b7
jmp 0xbb91d
movq -0xc8(%rbp), %rdi
addq $0x5c0, %rdi            # imm = 0x5C0
xorl %esi, %esi
callq 0x5c730
movb %al, -0xca(%rbp)
jmp 0xbb8d4
movb -0xca(%rbp), %al
testb $0x1, %al
jne 0xbb8e0
jmp 0xbb91d
leaq -0x44(%rbp), %rdi
movl $0x4, %esi
movl $0xf, %edx
callq 0x59260
jmp 0xbb8f5
movq -0xc8(%rbp), %rdi
leaq -0x44(%rbp), %rsi
callq 0x5de18
jmp 0xbb907
jmp 0xbba7e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0xbbe7f
movq -0xc8(%rbp), %rdi
addq $0xf0, %rdi
xorl %esi, %esi
callq 0x5b110
movb %al, -0xcb(%rbp)
jmp 0xbb93a
movb -0xcb(%rbp), %al
testb $0x1, %al
jne 0xbb946
jmp 0xbb9a6
movq -0xc8(%rbp), %rdi
addq $0x5c0, %rdi            # imm = 0x5C0
xorl %esi, %esi
callq 0x5c730
movb %al, -0xcc(%rbp)
jmp 0xbb963
movb -0xcc(%rbp), %al
testb $0x1, %al
jne 0xbb96f
jmp 0xbb9a6
movq -0xc8(%rbp), %rax
movl 0x180(%rax), %esi
addl $0x7, %esi
leaq -0x4c(%rbp), %rdi
movl $0x10, %edx
callq 0x59260
jmp 0xbb98f
movq -0xc8(%rbp), %rdi
leaq -0x4c(%rbp), %rsi
callq 0x5de18
jmp 0xbb9a1
jmp 0xbba7c
movq -0xc8(%rbp), %rdi
addq $0xf0, %rdi
xorl %esi, %esi
callq 0x59320
movb %al, -0xcd(%rbp)
jmp 0xbb9c3
movb -0xcd(%rbp), %al
testb $0x1, %al
jne 0xbb9d2
jmp 0xbba7a
movq -0xc8(%rbp), %rdi
addq $0x5c0, %rdi            # imm = 0x5C0
xorl %esi, %esi
callq 0x5a830
movb %al, -0xce(%rbp)
jmp 0xbb9ef
movb -0xce(%rbp), %al
testb $0x1, %al
jne 0xbb9fb
jmp 0xbba7a
movq -0xc8(%rbp), %rdi
addq $0x5c0, %rdi            # imm = 0x5C0
callq 0x5ce60
movq %rax, -0xd8(%rbp)
jmp 0xbba17
movq -0xc8(%rbp), %rax
movq 0x5b8(%rax), %rax
testq %rax, %rax
movl $0x10, %eax
movl $0x4, %edx
movl %edx, %esi
cmovnel %eax, %esi
leaq -0x5c(%rbp), %rdi
callq 0x59260
jmp 0xbba42
movq -0xd8(%rbp), %rdi
leaq -0x5c(%rbp), %rsi
callq 0x590b0
movq %rax, -0xe0(%rbp)
jmp 0xbba5b
movq -0xc8(%rbp), %rdi
movq -0xe0(%rbp), %rax
movq %rax, -0x54(%rbp)
leaq -0x54(%rbp), %rsi
callq 0x5de18
jmp 0xbba78
jmp 0xbba7a
jmp 0xbba7c
jmp 0xbba7e
movq -0xc8(%rbp), %rdi
movq $0x0, 0x5f8(%rdi)
movq $0x0, 0x600(%rdi)
addq $0xf0, %rdi
xorl %esi, %esi
callq 0x5b110
movb %al, -0xe1(%rbp)
jmp 0xbbab1
movb -0xe1(%rbp), %al
testb $0x1, %al
jne 0xbbae9
jmp 0xbbabd
movq -0xc8(%rbp), %rdi
addq $0x5c0, %rdi            # imm = 0x5C0
xorl %esi, %esi
callq 0x5a830
movb %al, -0xe2(%rbp)
jmp 0xbbada
movb -0xe2(%rbp), %al
testb $0x1, %al
jne 0xbbae9
jmp 0xbbe2c
movl $0x5b8, %edi            # imm = 0x5B8
callq 0x59820
movq %rax, -0xf0(%rbp)
jmp 0xbbafc
leaq -0x64(%rbp), %rdi
callq 0x5b530
jmp 0xbbb07
movq -0xc8(%rbp), %rdi
callq 0x5bf70
movq %rax, -0xf8(%rbp)
jmp 0xbbb1c
movq -0xf8(%rbp), %rdx
movq -0xf0(%rbp), %rdi
leaq -0x64(%rbp), %rsi
callq 0x59c60
jmp 0xbbb35
movq -0xc8(%rbp), %rcx
movq -0xf0(%rbp), %rax
movq %rax, 0x5f8(%rcx)
movq 0x5f8(%rcx), %rdi
addq $0x2b8, %rdi            # imm = 0x2B8
movq 0x14d471(%rip), %rax    # 0x208fd0
movq %rax, -0x78(%rbp)
movq $0x0, -0x70(%rbp)
movq -0x78(%rbp), %rsi
movq -0x70(%rbp), %rdx
callq 0xbda00
jmp 0xbbb7a
movq -0xc8(%rbp), %rcx
movq 0x5f8(%rcx), %rdi
addq $0x2f8, %rdi            # imm = 0x2F8
movq 0x14c86a(%rip), %rax    # 0x208400
movq %rax, -0x88(%rbp)
movq $0x0, -0x80(%rbp)
movq -0x88(%rbp), %rsi
movq -0x80(%rbp), %rdx
callq 0xbdb40
jmp 0xbbbb7
movl $0x5b8, %edi            # imm = 0x5B8
callq 0x59820
movq %rax, -0x100(%rbp)
jmp 0xbbbca
leaq -0x90(%rbp), %rdi
callq 0x5b530
jmp 0xbbbd8
movq -0xc8(%rbp), %rdi
callq 0x5bf70
movq %rax, -0x108(%rbp)
jmp 0xbbbed
movq -0xc8(%rbp), %rdi
addq $0xf0, %rdi
xorl %esi, %esi
callq 0x59320
movb %al, -0x109(%rbp)
jmp 0xbbc0a
movb -0x109(%rbp), %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x10a(%rbp)
jne 0xbbc1f
jmp 0xbbc69
movq -0xc8(%rbp), %rdi
addq $0x5c0, %rdi            # imm = 0x5C0
xorl %esi, %esi
callq 0x5a830
movb %al, -0x10b(%rbp)
jmp 0xbbc3c
movb -0x10b(%rbp), %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x10a(%rbp)
jne 0xbbc51
jmp 0xbbc69
movq -0xc8(%rbp), %rax
cmpq $0x0, 0x5b8(%rax)
setne %al
movb %al, -0x10a(%rbp)
movb -0x10a(%rbp), %al
xorl %edx, %edx
testb $0x1, %al
movl $0xc, %eax
movl %edx, %esi
cmovnel %eax, %esi
leaq -0xa0(%rbp), %rdi
callq 0x59260
jmp 0xbbc8b
movq -0x108(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x5db90
movq %rax, -0x118(%rbp)
jmp 0xbbca7
movq -0x100(%rbp), %rdi
movq -0x118(%rbp), %rax
movq %rax, -0x98(%rbp)
leaq -0x90(%rbp), %rsi
leaq -0x98(%rbp), %rdx
callq 0x59c30
jmp 0xbbcd1
movq -0xc8(%rbp), %rsi
movq -0x100(%rbp), %rax
movq %rax, 0x600(%rsi)
movq 0x600(%rsi), %rdi
addq $0x338, %rdi            # imm = 0x338
addq $0x478, %rsi            # imm = 0x478
callq 0x8e210
jmp 0xbbd02
movq -0xc8(%rbp), %rdi
addq $0xf0, %rdi
xorl %esi, %esi
callq 0x59320
movb %al, -0x119(%rbp)
jmp 0xbbd1f
movb -0x119(%rbp), %al
testb $0x1, %al
jne 0xbbd2e
jmp 0xbbdf8
movq -0xc8(%rbp), %rdi
addq $0x5c0, %rdi            # imm = 0x5C0
xorl %esi, %esi
callq 0x5a830
movb %al, -0x11a(%rbp)
jmp 0xbbd4b
movb -0x11a(%rbp), %al
testb $0x1, %al
jne 0xbbd5a
jmp 0xbbdf8
movq -0xc8(%rbp), %rax
cmpq $0x0, 0x5b8(%rax)
je 0xbbdf8
movq -0xc8(%rbp), %rcx
movq 0x600(%rcx), %rdi
addq $0x2f8, %rdi            # imm = 0x2F8
movq 0x14d0ed(%rip), %rax    # 0x208e78
movq %rax, -0xb0(%rbp)
movq $0x0, -0xa8(%rbp)
movq -0xb0(%rbp), %rsi
movq -0xa8(%rbp), %rdx
callq 0xbdb40
jmp 0xbbdb2
jmp 0xbbdf8
movq -0xf0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
movl $0x5b8, %esi            # imm = 0x5B8
callq 0x595b0
jmp 0xbbe7f
movq -0x100(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
movl $0x5b8, %esi            # imm = 0x5B8
callq 0x595b0
jmp 0xbbe7f
movq -0xc8(%rbp), %rdi
movq 0x5f8(%rdi), %rsi
movq (%rdi), %rax
movq 0x30(%rax), %rax
callq *%rax
jmp 0xbbe11
movq -0xc8(%rbp), %rdi
movq 0x600(%rdi), %rsi
movq (%rdi), %rax
movq 0x30(%rax), %rax
callq *%rax
jmp 0xbbe2a
jmp 0xbbe2c
movq -0xc8(%rbp), %rcx
movq $0x0, 0x5f0(%rcx)
movq %rcx, %rdi
addq $0x298, %rdi            # imm = 0x298
movq 0x14cf69(%rip), %rax    # 0x208db8
movq %rax, -0xc0(%rbp)
movq $0x0, -0xb8(%rbp)
movq -0xc0(%rbp), %rsi
movq -0xb8(%rbp), %rdx
callq 0xbdc80
jmp 0xbbe76
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
movq -0xc8(%rbp), %rdi
callq 0x5a3f0
movq -0x38(%rbp), %rdi
callq 0x5b6b0
nopw %cs:(%rax,%rax)