// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/classes/gui/widgets/widget.cpp
// Function: smooth::GUI::Widget::~Widget()
S::GUI::Widget::~Widget()
{
	/* Clean up everything in case this widget
	 * is not deleted using DeleteObject.
	 */
	DeactivateTooltip();

	CloseContextMenu();

	while (widgets.Length()) Remove(widgets.GetFirst());

	widgets.RemoveAll();

	if (registered && container != NIL) container->Remove(this);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x10(%rbp)
movq 0x1820dd(%rip), %rax    # 0x208a28
addq $0x10, %rax
movq %rax, (%rdi)
callq 0x5df08
jmp 0x86959
movq -0x10(%rbp), %rdi
callq 0x5de20
jmp 0x86964
jmp 0x86966
movq -0x10(%rbp), %rdi
addq $0x38, %rdi
callq 0x5c990
movl %eax, -0x14(%rbp)
jmp 0x86978
movl -0x14(%rbp), %eax
cmpl $0x0, %eax
je 0x869ab
movq -0x10(%rbp), %rdi
addq $0x38, %rdi
callq 0x8af10
movq %rax, -0x20(%rbp)
jmp 0x86993
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movq (%rax), %rsi
movq (%rdi), %rax
movq 0x38(%rax), %rax
callq *%rax
jmp 0x869a9
jmp 0x86966
movq -0x10(%rbp), %rdi
addq $0x38, %rdi
callq 0x619b0
jmp 0x869ba
movq -0x10(%rbp), %rax
testb $0x1, 0xca(%rax)
je 0x869ed
movq -0x10(%rbp), %rax
cmpq $0x0, 0x190(%rax)
je 0x869ed
movq -0x10(%rbp), %rsi
movq 0x190(%rsi), %rdi
movq (%rdi), %rax
movq 0x38(%rax), %rax
callq *%rax
jmp 0x869eb
jmp 0x869ed
movq -0x10(%rbp), %rdi
addq $0x598, %rdi            # imm = 0x598
callq 0x8ad70
movq -0x10(%rbp), %rdi
addq $0x578, %rdi            # imm = 0x578
callq 0x8adb0
movq -0x10(%rbp), %rdi
addq $0x558, %rdi            # imm = 0x558
callq 0x8adb0
movq -0x10(%rbp), %rdi
addq $0x538, %rdi            # imm = 0x538
callq 0x8ad70
movq -0x10(%rbp), %rdi
addq $0x518, %rdi            # imm = 0x518
callq 0x8ad70
movq -0x10(%rbp), %rdi
addq $0x4f8, %rdi            # imm = 0x4F8
callq 0x8ad70
movq -0x10(%rbp), %rdi
addq $0x4d8, %rdi            # imm = 0x4D8
callq 0x8ad70
movq -0x10(%rbp), %rdi
addq $0x4b8, %rdi            # imm = 0x4B8
callq 0x8ad70
movq -0x10(%rbp), %rdi
addq $0x498, %rdi            # imm = 0x498
callq 0x8ad70
movq -0x10(%rbp), %rdi
addq $0x478, %rdi            # imm = 0x478
callq 0x8ad70
movq -0x10(%rbp), %rdi
addq $0x458, %rdi            # imm = 0x458
callq 0x8adf0
movq -0x10(%rbp), %rdi
addq $0x438, %rdi            # imm = 0x438
callq 0x8ae30
movq -0x10(%rbp), %rdi
addq $0x418, %rdi            # imm = 0x418
callq 0x8ae30
movq -0x10(%rbp), %rdi
addq $0x3f8, %rdi            # imm = 0x3F8
callq 0x8ae30
movq -0x10(%rbp), %rdi
addq $0x3d8, %rdi            # imm = 0x3D8
callq 0x8ae30
movq -0x10(%rbp), %rdi
addq $0x3b8, %rdi            # imm = 0x3B8
callq 0x8ae30
movq -0x10(%rbp), %rdi
addq $0x398, %rdi            # imm = 0x398
callq 0x8ae30
movq -0x10(%rbp), %rdi
addq $0x378, %rdi            # imm = 0x378
callq 0x8ae30
movq -0x10(%rbp), %rdi
addq $0x358, %rdi            # imm = 0x358
callq 0x8ae30
movq -0x10(%rbp), %rdi
addq $0x338, %rdi            # imm = 0x338
callq 0x8ae30
movq -0x10(%rbp), %rdi
addq $0x318, %rdi            # imm = 0x318
callq 0x8ae30
movq -0x10(%rbp), %rdi
addq $0x2f8, %rdi            # imm = 0x2F8
callq 0x8ae30
movq -0x10(%rbp), %rdi
addq $0x2d8, %rdi            # imm = 0x2D8
callq 0x8ad70
movq -0x10(%rbp), %rdi
addq $0x2b8, %rdi            # imm = 0x2B8
callq 0x8ad70
movq -0x10(%rbp), %rdi
addq $0x298, %rdi            # imm = 0x298
callq 0x8ae70
movq -0x10(%rbp), %rdi
addq $0x278, %rdi            # imm = 0x278
callq 0x8ae30
movq -0x10(%rbp), %rdi
addq $0x258, %rdi            # imm = 0x258
callq 0x8ad70
movq -0x10(%rbp), %rdi
addq $0x238, %rdi            # imm = 0x238
callq 0x8ad70
movq -0x10(%rbp), %rdi
addq $0x218, %rdi            # imm = 0x218
callq 0x8ad70
movq -0x10(%rbp), %rdi
addq $0x1f8, %rdi            # imm = 0x1F8
callq 0x8ad70
movq -0x10(%rbp), %rdi
addq $0x1d0, %rdi            # imm = 0x1D0
callq 0x8aeb0
movq -0x10(%rbp), %rdi
addq $0x1a8, %rdi            # imm = 0x1A8
callq 0x8aed0
movq -0x10(%rbp), %rdi
addq $0x140, %rdi            # imm = 0x140
callq 0x5abf0
movq -0x10(%rbp), %rdi
addq $0x120, %rdi            # imm = 0x120
callq 0x5df00
movq -0x10(%rbp), %rdi
addq $0x108, %rdi            # imm = 0x108
callq 0x5df00
movq -0x10(%rbp), %rdi
addq $0xf0, %rdi
callq 0x5df00
movq -0x10(%rbp), %rdi
addq $0x38, %rdi
callq 0x8aef0
movq -0x10(%rbp), %rdi
callq 0x59ec0
addq $0x20, %rsp
popq %rbp
retq
movq %rax, %rdi
callq 0x61c50
nopw %cs:(%rax,%rax)