// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/classes/gui/widgets/basic/divider.cpp
// Function: smooth::GUI::Divider::UpdateMetrics()
S::Void S::GUI::Divider::UpdateMetrics()
{
	Window	*wnd = GetContainerWindow();
	Rect	 rect;

	if (wnd == NIL) return;

	if (Binary::IsFlagSet(flags, OR_VERT))
	{
		Bool	 afterMe = False;

		if (container->GetObjectType() == Window::classID)
		{
			if (Binary::IsFlagSet(flags, OR_RIGHT))	rect.left = ((Window *) container)->GetClientRect().right - position;
			else					rect.left = ((Window *) container)->GetClientRect().left + position;

			rect.top	= wnd->GetClientRect().top;
			rect.bottom	= wnd->GetClientRect().bottom;
		}
		else
		{
			if (Binary::IsFlagSet(flags, OR_RIGHT))	rect.left = container->GetWidth() - position;
			else					rect.left = position;

			rect.top	= 3;
			rect.bottom	= container->GetHeight() - 3;
		}

		rect.right = rect.left + 2;

		for (Int i = container->GetNOfObjects() - 1; i >= 0; i--)
		{
			if (container->GetNthObject(i)->GetObjectType() != classID) continue;

			Divider	*divider = (Divider *) container->GetNthObject(i);

			if (afterMe && !Binary::IsFlagSet(divider->flags, OR_VERT))
			{
				if (Binary::IsFlagSet(divider->flags, OR_BOTTOM))
				{
					if (container->GetHeight() - divider->GetY() <= rect.bottom + 1) rect.bottom = container->GetHeight() - divider->GetY() - 2;
				}
				else
				{
					if (divider->GetY() >= rect.top - 2) rect.top = divider->GetY() + 3;
				}
			}

			if (divider == this) afterMe = True;
		}
	}
	else
	{
		Bool	 afterMe = False;

		if (container->GetObjectType() == Window::classID)
		{
			if (Binary::IsFlagSet(flags, OR_BOTTOM)) rect.top = ((Window *) container)->GetClientRect().bottom - position;
			else					 rect.top = ((Window *) container)->GetClientRect().top	   + position;

			rect.left	= wnd->GetClientRect().left;
			rect.right	= wnd->GetClientRect().right;
		}
		else
		{
			if (Binary::IsFlagSet(flags, OR_BOTTOM)) rect.top = container->GetHeight() - position;
			else					 rect.top = 			     position;

			rect.left	= 3;
			rect.right	= container->GetWidth() - 3;
		}

		rect.bottom = rect.top + 2;

		for (Int i = container->GetNOfObjects() - 1; i >= 0; i--)
		{
			if (container->GetNthObject(i)->GetObjectType() != classID) continue;

			Divider	*divider = (Divider *) container->GetNthObject(i);

			if (afterMe && Binary::IsFlagSet(divider->flags, OR_VERT))
			{
				if (Binary::IsFlagSet(divider->flags, OR_RIGHT))
				{
					if (container->GetWidth() - divider->GetX() <= rect.right + 1) rect.right = container->GetWidth() - divider->GetX() - 2;
				}
				else
				{
					if (divider->GetX() >= rect.left - 2) rect.left = divider->GetX() + 3;
				}
			}

			if (divider == this) afterMe = True;
		}
	}

	SetMetrics(rect.GetPosition(), rect.GetSize());

	if (Binary::IsFlagSet(flags, OR_VERT))	dragHotspot->SetMetrics(Point(-1, 0), rect.GetSize() + Size(2, 1));
	else					dragHotspot->SetMetrics(Point(0, -1), rect.GetSize() + Size(1, 2));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x140, %rsp            # imm = 0x140
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x118(%rbp)
callq 0x59bc0
movq %rax, -0x10(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x5c030
cmpq $0x0, -0x10(%rbp)
jne 0x952c8
jmp 0x95a0b
movq -0x118(%rbp), %rax
movl 0x30(%rax), %edi
movl $0x2, %esi
callq 0x5ce30
testb $0x1, %al
jne 0x952e5
jmp 0x9559f
movq -0x118(%rbp), %rax
movb $0x0, -0x21(%rbp)
movq 0x190(%rax), %rdi
callq 0x5bb10
movq %rax, %rdi
movq 0x1734fa(%rip), %rax    # 0x208800
movswl (%rax), %esi
callq 0x5bc10
testb $0x1, %al
jne 0x95317
jmp 0x953bf
movq -0x118(%rbp), %rax
movl 0x30(%rax), %edi
movl $0x20, %esi
callq 0x5ce30
testb $0x1, %al
jne 0x95331
jmp 0x95361
movq -0x118(%rbp), %rax
movq 0x190(%rax), %rdi
callq 0x5a750
movq -0x118(%rbp), %rcx
movq %rax, -0x34(%rbp)
movq %rdx, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
subl 0x5c8(%rcx), %eax
movl %eax, -0x20(%rbp)
jmp 0x9538f
movq -0x118(%rbp), %rax
movq 0x190(%rax), %rdi
callq 0x5a750
movq -0x118(%rbp), %rcx
movq %rax, -0x44(%rbp)
movq %rdx, -0x3c(%rbp)
movl -0x44(%rbp), %eax
addl 0x5c8(%rcx), %eax
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0x5a750
movq %rax, -0x54(%rbp)
movq %rdx, -0x4c(%rbp)
movl -0x50(%rbp), %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
callq 0x5a750
movq %rax, -0x64(%rbp)
movq %rdx, -0x5c(%rbp)
movl -0x58(%rbp), %eax
movl %eax, -0x14(%rbp)
jmp 0x9542e
movq -0x118(%rbp), %rax
movl 0x30(%rax), %edi
movl $0x20, %esi
callq 0x5ce30
testb $0x1, %al
jne 0x953d9
jmp 0x953fe
movq -0x118(%rbp), %rax
movq 0x190(%rax), %rdi
callq 0x5a210
movq -0x118(%rbp), %rcx
subl 0x5c8(%rcx), %eax
movl %eax, -0x20(%rbp)
jmp 0x9540e
movq -0x118(%rbp), %rax
movl 0x5c8(%rax), %eax
movl %eax, -0x20(%rbp)
movq -0x118(%rbp), %rax
movl $0x3, -0x1c(%rbp)
movq 0x190(%rax), %rdi
callq 0x5b860
subl $0x3, %eax
movl %eax, -0x14(%rbp)
movq -0x118(%rbp), %rax
movl -0x20(%rbp), %ecx
addl $0x2, %ecx
movl %ecx, -0x18(%rbp)
movq 0x190(%rax), %rdi
callq 0x5b470
subl $0x1, %eax
movl %eax, -0x68(%rbp)
cmpl $0x0, -0x68(%rbp)
jl 0x9559a
movq -0x118(%rbp), %rax
movq 0x190(%rax), %rdi
movl -0x68(%rbp), %esi
callq 0x5c230
movq %rax, %rdi
callq 0x5bb10
movq %rax, %rdi
movq 0x17364e(%rip), %rax    # 0x208ad0
movswl (%rax), %esi
callq 0x5da50
testb $0x1, %al
jne 0x95490
jmp 0x95495
jmp 0x9558c
movq -0x118(%rbp), %rax
movq 0x190(%rax), %rdi
movl -0x68(%rbp), %esi
callq 0x5c230
movq %rax, -0x70(%rbp)
testb $0x1, -0x21(%rbp)
je 0x95579
movq -0x70(%rbp), %rax
movl 0x30(%rax), %edi
movl $0x2, %esi
callq 0x5ce30
testb $0x1, %al
jne 0x95579
movq -0x70(%rbp), %rax
movl 0x30(%rax), %edi
movl $0x8, %esi
callq 0x5ce30
testb $0x1, %al
jne 0x954e9
jmp 0x95553
movq -0x118(%rbp), %rax
movq 0x190(%rax), %rdi
callq 0x5b860
movl %eax, -0x11c(%rbp)
movq -0x70(%rbp), %rdi
callq 0x5ddb0
movl %eax, %ecx
movl -0x11c(%rbp), %eax
subl %ecx, %eax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jg 0x95551
movq -0x118(%rbp), %rax
movq 0x190(%rax), %rdi
callq 0x5b860
movl %eax, -0x120(%rbp)
movq -0x70(%rbp), %rdi
callq 0x5ddb0
movl %eax, %ecx
movl -0x120(%rbp), %eax
subl %ecx, %eax
subl $0x2, %eax
movl %eax, -0x14(%rbp)
jmp 0x95577
movq -0x70(%rbp), %rdi
callq 0x5ddb0
movl -0x1c(%rbp), %ecx
subl $0x2, %ecx
cmpl %ecx, %eax
jl 0x95575
movq -0x70(%rbp), %rdi
callq 0x5ddb0
addl $0x3, %eax
movl %eax, -0x1c(%rbp)
jmp 0x95577
jmp 0x95579
movq -0x118(%rbp), %rax
cmpq %rax, -0x70(%rbp)
jne 0x9558a
movb $0x1, -0x21(%rbp)
jmp 0x9558c
movl -0x68(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x68(%rbp)
jmp 0x95450
jmp 0x9589f
movq -0x118(%rbp), %rax
movb $0x0, -0x71(%rbp)
movq 0x190(%rax), %rdi
callq 0x5bb10
movq %rax, %rdi
movq 0x173240(%rip), %rax    # 0x208800
movswl (%rax), %esi
callq 0x5bc10
testb $0x1, %al
jne 0x955d1
jmp 0x95697
movq -0x118(%rbp), %rax
movl 0x30(%rax), %edi
movl $0x8, %esi
callq 0x5ce30
testb $0x1, %al
jne 0x955eb
jmp 0x9561e
movq -0x118(%rbp), %rax
movq 0x190(%rax), %rdi
callq 0x5a750
movq -0x118(%rbp), %rcx
movq %rax, -0x84(%rbp)
movq %rdx, -0x7c(%rbp)
movl -0x78(%rbp), %eax
subl 0x5c8(%rcx), %eax
movl %eax, -0x1c(%rbp)
jmp 0x95655
movq -0x118(%rbp), %rax
movq 0x190(%rax), %rdi
callq 0x5a750
movq -0x118(%rbp), %rcx
movq %rax, -0x94(%rbp)
movq %rdx, -0x8c(%rbp)
movl -0x90(%rbp), %eax
addl 0x5c8(%rcx), %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
callq 0x5a750
movq %rax, -0xa4(%rbp)
movq %rdx, -0x9c(%rbp)
movl -0xa4(%rbp), %eax
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0x5a750
movq %rax, -0xb4(%rbp)
movq %rdx, -0xac(%rbp)
movl -0xac(%rbp), %eax
movl %eax, -0x18(%rbp)
jmp 0x95706
movq -0x118(%rbp), %rax
movl 0x30(%rax), %edi
movl $0x8, %esi
callq 0x5ce30
testb $0x1, %al
jne 0x956b1
jmp 0x956d6
movq -0x118(%rbp), %rax
movq 0x190(%rax), %rdi
callq 0x5b860
movq -0x118(%rbp), %rcx
subl 0x5c8(%rcx), %eax
movl %eax, -0x1c(%rbp)
jmp 0x956e6
movq -0x118(%rbp), %rax
movl 0x5c8(%rax), %eax
movl %eax, -0x1c(%rbp)
movq -0x118(%rbp), %rax
movl $0x3, -0x20(%rbp)
movq 0x190(%rax), %rdi
callq 0x5a210
subl $0x3, %eax
movl %eax, -0x18(%rbp)
movq -0x118(%rbp), %rax
movl -0x1c(%rbp), %ecx
addl $0x2, %ecx
movl %ecx, -0x14(%rbp)
movq 0x190(%rax), %rdi
callq 0x5b470
subl $0x1, %eax
movl %eax, -0xb8(%rbp)
cmpl $0x0, -0xb8(%rbp)
jl 0x9589d
movq -0x118(%rbp), %rax
movq 0x190(%rax), %rdi
movl -0xb8(%rbp), %esi
callq 0x5c230
movq %rax, %rdi
callq 0x5bb10
movq %rax, %rdi
movq 0x17336d(%rip), %rax    # 0x208ad0
movswl (%rax), %esi
callq 0x5da50
testb $0x1, %al
jne 0x95771
jmp 0x95776
jmp 0x95889
movq -0x118(%rbp), %rax
movq 0x190(%rax), %rdi
movl -0xb8(%rbp), %esi
callq 0x5c230
movq %rax, -0xc0(%rbp)
testb $0x1, -0x71(%rbp)
je 0x95873
movq -0xc0(%rbp), %rax
movl 0x30(%rax), %edi
movl $0x2, %esi
callq 0x5ce30
testb $0x1, %al
jne 0x957bd
jmp 0x95873
movq -0xc0(%rbp), %rax
movl 0x30(%rax), %edi
movl $0x20, %esi
callq 0x5ce30
testb $0x1, %al
jne 0x957d7
jmp 0x95847
movq -0x118(%rbp), %rax
movq 0x190(%rax), %rdi
callq 0x5a210
movl %eax, -0x124(%rbp)
movq -0xc0(%rbp), %rdi
callq 0x5dab0
movl %eax, %ecx
movl -0x124(%rbp), %eax
subl %ecx, %eax
movl -0x18(%rbp), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jg 0x95845
movq -0x118(%rbp), %rax
movq 0x190(%rax), %rdi
callq 0x5a210
movl %eax, -0x128(%rbp)
movq -0xc0(%rbp), %rdi
callq 0x5dab0
movl %eax, %ecx
movl -0x128(%rbp), %eax
subl %ecx, %eax
subl $0x2, %eax
movl %eax, -0x18(%rbp)
jmp 0x95871
movq -0xc0(%rbp), %rdi
callq 0x5dab0
movl -0x20(%rbp), %ecx
subl $0x2, %ecx
cmpl %ecx, %eax
jl 0x9586f
movq -0xc0(%rbp), %rdi
callq 0x5dab0
addl $0x3, %eax
movl %eax, -0x20(%rbp)
jmp 0x95871
jmp 0x95873
movq -0x118(%rbp), %rax
cmpq %rax, -0xc0(%rbp)
jne 0x95887
movb $0x1, -0x71(%rbp)
jmp 0x95889
movl -0xb8(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xb8(%rbp)
jmp 0x9572b
jmp 0x9589f
leaq -0x20(%rbp), %rdi
callq 0x5d510
movq %rax, -0xc8(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x59e00
movq -0x118(%rbp), %rdi
movq %rax, -0xd0(%rbp)
movq (%rdi), %rax
leaq -0xc8(%rbp), %rsi
leaq -0xd0(%rbp), %rdx
callq *0x150(%rax)
movq -0x118(%rbp), %rax
movl 0x30(%rax), %edi
movl $0x2, %esi
callq 0x5ce30
testb $0x1, %al
jne 0x958fa
jmp 0x95985
movq -0x118(%rbp), %rax
movq 0x5d0(%rax), %rax
movq %rax, -0x130(%rbp)
leaq -0xd8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
callq 0x5c2c0
leaq -0x20(%rbp), %rdi
callq 0x59e00
movq %rax, -0xe8(%rbp)
leaq -0xf0(%rbp), %rdi
movl $0x2, %esi
movl $0x1, %edx
callq 0x59260
leaq -0xe8(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
callq 0x590b0
movq -0x130(%rbp), %rdi
movq %rax, -0xe0(%rbp)
movq (%rdi), %rax
leaq -0xd8(%rbp), %rsi
leaq -0xe0(%rbp), %rdx
callq *0x150(%rax)
jmp 0x95a0b
movq -0x118(%rbp), %rax
movq 0x5d0(%rax), %rax
movq %rax, -0x138(%rbp)
leaq -0xf8(%rbp), %rdi
xorl %esi, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x5c2c0
leaq -0x20(%rbp), %rdi
callq 0x59e00
movq %rax, -0x108(%rbp)
leaq -0x110(%rbp), %rdi
movl $0x1, %esi
movl $0x2, %edx
callq 0x59260
leaq -0x108(%rbp), %rdi
leaq -0x110(%rbp), %rsi
callq 0x590b0
movq -0x138(%rbp), %rdi
movq %rax, -0x100(%rbp)
movq (%rdi), %rax
leaq -0xf8(%rbp), %rsi
leaq -0x100(%rbp), %rdx
callq *0x150(%rax)
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop