// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/classes/gui/widgets/widget.cpp
// Function: smooth::GUI::Widget::SetMetrics(smooth::GUI::Point const&, smooth::GUI::Size const&)
S::Int S::GUI::Widget::SetMetrics(const Point &nPos, const Size &nSize)
{
	if (nPos.x == pos.x && nPos.y == pos.y && nSize.cx == size.cx && nSize.cy == size.cy) return Success();

	DeactivateTooltip();

	Surface	*surface = (IsVisible() ? GetDrawSurface() : NIL);

	if (surface && orientation != OR_FREE) surface->StartPaint(container->GetVisibleArea());
	if (surface			     ) Hide();

	InvalidateMetrics();

	if (nPos.x   != pos.x   || nPos.y   != pos.y  )	{ pos  = nPos;  onChangePosition.Emit(pos); }
	if (nSize.cx != size.cx || nSize.cy != size.cy)	{ size = nSize; onChangeSize.Emit(size);    }

	if (surface			     ) { Show(); Process(SM_MOUSEMOVE, 0, 0); }
	if (surface && orientation != OR_FREE) surface->EndPaint();

	return Success();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rcx
movq %rcx, -0x70(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
cmpl 0xa8(%rcx), %eax
jne 0x8a712
movq -0x70(%rbp), %rcx
movq -0x18(%rbp), %rax
movl 0x4(%rax), %eax
cmpl 0xac(%rcx), %eax
jne 0x8a712
movq -0x70(%rbp), %rcx
movq -0x20(%rbp), %rax
movl (%rax), %eax
cmpl 0xb0(%rcx), %eax
jne 0x8a712
movq -0x70(%rbp), %rcx
movq -0x20(%rbp), %rax
movl 0x4(%rax), %eax
cmpl 0xb4(%rcx), %eax
jne 0x8a712
leaq -0x30(%rbp), %rdi
movq %rdi, -0x80(%rbp)
callq 0x5ca80
movq -0x80(%rbp), %rdi
callq 0x59680
movl %eax, -0x74(%rbp)
jmp 0x8a6e4
movl -0x74(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x5a410
jmp 0x8a8f3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x5a410
jmp 0x8a8ff
movq -0x70(%rbp), %rdi
callq 0x5df08
movq -0x70(%rbp), %rdi
movq (%rdi), %rax
callq *0x90(%rax)
testb $0x1, %al
jne 0x8a72e
jmp 0x8a741
movq -0x70(%rbp), %rdi
movq (%rdi), %rax
callq *0x40(%rax)
movq %rax, -0x88(%rbp)
jmp 0x8a74c
xorl %eax, %eax
movq %rax, -0x88(%rbp)
jmp 0x8a74c
movq -0x88(%rbp), %rax
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
je 0x8a7a7
movq -0x70(%rbp), %rax
movswl 0xd0(%rax), %eax
cmpl $0x80, %eax
je 0x8a7a7
movq -0x70(%rbp), %rax
movq -0x48(%rbp), %rcx
movq %rcx, -0x90(%rbp)
movq 0x190(%rax), %rdi
movq (%rdi), %rax
callq *0x130(%rax)
movq -0x90(%rbp), %rdi
movq %rax, -0x58(%rbp)
movq %rdx, -0x50(%rbp)
leaq -0x58(%rbp), %rsi
callq 0x591b0
cmpq $0x0, -0x48(%rbp)
je 0x8a7b8
movq -0x70(%rbp), %rdi
movq (%rdi), %rax
callq *0x60(%rax)
movq -0x70(%rbp), %rdi
callq 0x5d210
movq -0x70(%rbp), %rcx
movq -0x18(%rbp), %rax
movl (%rax), %eax
cmpl 0xa8(%rcx), %eax
jne 0x8a7e6
movq -0x70(%rbp), %rcx
movq -0x18(%rbp), %rax
movl 0x4(%rax), %eax
cmpl 0xac(%rcx), %eax
je 0x8a80e
movq -0x70(%rbp), %rsi
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, 0xa8(%rsi)
movq %rsi, %rdi
addq $0x278, %rdi            # imm = 0x278
addq $0xa8, %rsi
callq 0x8b580
movq -0x70(%rbp), %rcx
movq -0x20(%rbp), %rax
movl (%rax), %eax
cmpl 0xb0(%rcx), %eax
jne 0x8a833
movq -0x70(%rbp), %rcx
movq -0x20(%rbp), %rax
movl 0x4(%rax), %eax
cmpl 0xb4(%rcx), %eax
je 0x8a85b
movq -0x70(%rbp), %rsi
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, 0xb0(%rsi)
movq %rsi, %rdi
addq $0x298, %rdi            # imm = 0x298
addq $0xb0, %rsi
callq 0x8bd10
cmpq $0x0, -0x48(%rbp)
je 0x8a882
movq -0x70(%rbp), %rdi
movq (%rdi), %rax
callq *0x58(%rax)
movq -0x70(%rbp), %rdi
movq (%rdi), %rax
movl $0x7800, %esi           # imm = 0x7800
xorl %ecx, %ecx
movl %ecx, %edx
callq *0x80(%rax)
cmpq $0x0, -0x48(%rbp)
je 0x8a8a4
movq -0x70(%rbp), %rax
movswl 0xd0(%rax), %eax
cmpl $0x80, %eax
je 0x8a8a4
movq -0x48(%rbp), %rdi
callq 0x5d270
leaq -0x68(%rbp), %rdi
movq %rdi, -0xa0(%rbp)
callq 0x5ca80
movq -0xa0(%rbp), %rdi
callq 0x59680
movl %eax, -0x94(%rbp)
jmp 0x8a8c8
movl -0x94(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x5a410
jmp 0x8a8f3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x5a410
jmp 0x8a8ff
movl -0x4(%rbp), %eax
addq $0xa0, %rsp
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x5b6b0
nopl (%rax,%rax)