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

	if (!widget->IsRegistered())
	{
		if (Widget::Add(widget) == Success() && widget->GetObjectType() == Entry::classID)
		{
			elementOrder.Add((Entry *) widget, widget->GetHandle());
			createdEntry.Add(False, widget->GetHandle());

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

			onChangeEntryOrder.Emit();

			return Success();
		}
	}

	return Error();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x78(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0xa9aa6
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 0xa9a78
movl -0x7c(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x5b5b0
jmp 0xa9cc9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x5b5b0
jmp 0xa9cd5
movq -0x18(%rbp), %rdi
movq (%rdi), %rax
callq *0x88(%rax)
testb $0x1, %al
jne 0xa9c75
movq -0x78(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x5c510
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 0xa9af2
movl -0x9c(%rbp), %ecx
movl -0x8c(%rbp), %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0x9d(%rbp)
jne 0xa9b48
movq -0x18(%rbp), %rdi
callq 0x5bb10
movq %rax, -0xa8(%rbp)
jmp 0xa9b1c
movq -0xa8(%rbp), %rdi
movq 0x15e86e(%rip), %rax    # 0x208398
movswl (%rax), %esi
callq 0x5bc10
movb %al, -0xa9(%rbp)
jmp 0xa9b3a
movb -0xa9(%rbp), %al
movb %al, -0x9d(%rbp)
jmp 0xa9b48
movb -0x9d(%rbp), %al
movb %al, -0xaa(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x5a410
movb -0xaa(%rbp), %al
testb $0x1, %al
jne 0xa9b6c
jmp 0xa9c73
movq -0x78(%rbp), %rax
addq $0x610, %rax            # imm = 0x610
movq %rax, -0xc8(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x18(%rbp), %rdi
callq 0x5d050
movq -0xc8(%rbp), %rdi
movl %eax, %edx
leaq -0x50(%rbp), %rsi
callq 0xaa350
movq -0x78(%rbp), %rax
addq $0x5b8, %rax            # imm = 0x5B8
movq %rax, -0xc0(%rbp)
movq -0x18(%rbp), %rdi
callq 0x5d050
movq -0xc0(%rbp), %rdi
movl %eax, %edx
leaq 0xe0671(%rip), %rsi     # 0x18a23b
callq 0xaa390
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 0xa9c2e
movl -0xb0(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x5a410
jmp 0xa9cc9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x5a410
jmp 0xa9cd5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x5a410
jmp 0xa9cd5
jmp 0xa9c75
leaq -0x70(%rbp), %rdi
movq %rdi, -0xd8(%rbp)
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x5a9c0
movq -0xd8(%rbp), %rdi
callq 0x59680
movl %eax, -0xcc(%rbp)
jmp 0xa9c9e
movl -0xcc(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x5b5b0
jmp 0xa9cc9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x5b5b0
jmp 0xa9cd5
movl -0x4(%rbp), %eax
addq $0xe0, %rsp
popq %rbp
retq
movq -0x30(%rbp), %rdi
callq 0x5b6b0
nop