// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/classes/gui/widgets/multi/generic/container.cpp
// Function: smooth::GUI::Container::Remove(smooth::GUI::Widget*)
S::Int S::GUI::Container::Remove(Widget *widget)
{
	if (widget == NIL) return Error();

	if (Widget::Remove(widget) == Success() && widget->GetObjectType() == Entry::classID)
	{
		Int	 entryHandle = widget->GetHandle();

		if (createdEntry.Get(entryHandle)) DeleteObject(widget);

		elementOrder.Remove(entryHandle);
		createdEntry.Remove(entryHandle);

		Paint(SP_UPDATE);
		Process(SM_MOUSEMOVE, 0, 0);

		onChangeEntryOrder.Emit();

		return Success();
	}

	return Error();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x78(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0xa9d56
leaq -0x28(%rbp), %rdi
movq %rdi, -0x88(%rbp)
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x5a9c0
movq -0x88(%rbp), %rdi
callq 0x59680
movl %eax, -0x7c(%rbp)
jmp 0xa9d28
movl -0x7c(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x5b5b0
jmp 0xa9f54
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x5b5b0
jmp 0xa9f60
movq -0x78(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x5b3a0
movl %eax, -0x9c(%rbp)
leaq -0x48(%rbp), %rdi
movq %rdi, -0x98(%rbp)
callq 0x5ca80
movq -0x98(%rbp), %rdi
callq 0x59680
movl %eax, -0x8c(%rbp)
jmp 0xa9d8d
movl -0x9c(%rbp), %ecx
movl -0x8c(%rbp), %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0x9d(%rbp)
jne 0xa9de3
movq -0x18(%rbp), %rdi
callq 0x5bb10
movq %rax, -0xa8(%rbp)
jmp 0xa9db7
movq -0xa8(%rbp), %rdi
movq 0x15e5d3(%rip), %rax    # 0x208398
movswl (%rax), %esi
callq 0x5bc10
movb %al, -0xa9(%rbp)
jmp 0xa9dd5
movb -0xa9(%rbp), %al
movb %al, -0x9d(%rbp)
jmp 0xa9de3
movb -0x9d(%rbp), %al
movb %al, -0xaa(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x5a410
movb -0xaa(%rbp), %al
testb $0x1, %al
jne 0xa9e07
jmp 0xa9f00
movq -0x18(%rbp), %rdi
callq 0x5d050
movq -0x78(%rbp), %rdi
movl %eax, -0x4c(%rbp)
addq $0x5b8, %rdi            # imm = 0x5B8
movl -0x4c(%rbp), %esi
callq 0xaa3c0
testb $0x1, (%rax)
je 0xa9e50
movq -0x18(%rbp), %rdi
callq 0x5d8d0
jmp 0xa9e50
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x5a410
jmp 0xa9f60
movq -0x78(%rbp), %rdi
addq $0x610, %rdi            # imm = 0x610
movl -0x4c(%rbp), %esi
callq 0x5d7a0
movq -0x78(%rbp), %rdi
addq $0x5b8, %rdi            # imm = 0x5B8
movl -0x4c(%rbp), %esi
callq 0x5d7a0
movq -0x78(%rbp), %rdi
movq (%rdi), %rax
movq 0x78(%rax), %rax
movl $0x1, %esi
callq *%rax
movq -0x78(%rbp), %rdi
movq (%rdi), %rax
movq 0x80(%rax), %rax
movl $0x7800, %esi           # imm = 0x7800
xorl %ecx, %ecx
movl %ecx, %edx
callq *%rax
movq -0x78(%rbp), %rdi
addq $0x668, %rdi            # imm = 0x668
callq 0x8af60
leaq -0x60(%rbp), %rdi
movq %rdi, -0xb8(%rbp)
callq 0x5ca80
movq -0xb8(%rbp), %rdi
callq 0x59680
movl %eax, -0xb0(%rbp)
jmp 0xa9ed5
movl -0xb0(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x5a410
jmp 0xa9f54
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x5a410
jmp 0xa9f60
leaq -0x70(%rbp), %rdi
movq %rdi, -0xc8(%rbp)
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x5a9c0
movq -0xc8(%rbp), %rdi
callq 0x59680
movl %eax, -0xbc(%rbp)
jmp 0xa9f29
movl -0xbc(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x5b5b0
jmp 0xa9f54
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x5b5b0
jmp 0xa9f60
movl -0x4(%rbp), %eax
addq $0xd0, %rsp
popq %rbp
retq
movq -0x30(%rbp), %rdi
callq 0x5b6b0
nopl (%rax)