// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0xa0, %rsp
movl 0x10(%rbp), %eax
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x68(%rbp)
movq $0x0, -0x40(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0xc078c
movl $0x618, %edi            # imm = 0x618
callq 0x59820
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x70(%rbp)
movq -0x18(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x5aa70
jmp 0xc0760
movq -0x70(%rbp), %rax
movq %rax, -0x40(%rbp)
jmp 0xc0834
movq -0x70(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
movl $0x618, %esi            # imm = 0x618
callq 0x595b0
jmp 0xc0903
cmpq $0x0, -0x38(%rbp)
je 0xc07e2
movl $0x618, %edi            # imm = 0x618
callq 0x59820
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x78(%rbp)
movq -0x18(%rbp), %rsi
movq -0x38(%rbp), %rdx
movl 0x10(%rbp), %ecx
callq 0x5a090
jmp 0xc07b9
movq -0x78(%rbp), %rax
movq %rax, -0x40(%rbp)
jmp 0xc0832
movq -0x78(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
movl $0x618, %esi            # imm = 0x618
callq 0x595b0
jmp 0xc0903
movl $0x618, %edi            # imm = 0x618
callq 0x59820
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x80(%rbp)
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq 0x5d700
jmp 0xc0809
movq -0x80(%rbp), %rax
movq %rax, -0x40(%rbp)
jmp 0xc0832
movq -0x80(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
movl $0x618, %esi            # imm = 0x618
callq 0x595b0
jmp 0xc0903
jmp 0xc0834
movq -0x68(%rbp), %rsi
movq -0x40(%rbp), %rdi
callq 0x5c910
movq -0x68(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq (%rdi), %rax
movq 0x30(%rax), %rax
callq *%rax
movl %eax, -0x94(%rbp)
leaq -0x60(%rbp), %rdi
movq %rdi, -0x90(%rbp)
callq 0x5ca80
movq -0x90(%rbp), %rdi
callq 0x59680
movl %eax, -0x84(%rbp)
jmp 0xc087c
leaq -0x60(%rbp), %rdi
callq 0x5a410
movl -0x84(%rbp), %ecx
movl -0x94(%rbp), %eax
cmpl %ecx, %eax
jne 0xc08e5
movq -0x68(%rbp), %rax
addq $0x5b8, %rax            # imm = 0x5B8
movq %rax, -0xa0(%rbp)
movq -0x40(%rbp), %rdi
callq 0x5d050
movq -0xa0(%rbp), %rdi
movl %eax, %esi
leaq 0xca005(%rip), %rdx     # 0x18a8c4
callq 0xb0fa0
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xc08f6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x5a410
jmp 0xc0903
movq -0x40(%rbp), %rdi
callq 0x5d8d0
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0xa0, %rsp
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0x5b6b0
nopl (%rax)