// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/classes/gui/widgets/multi/list/listboxheader.cpp
// Function: smooth::GUI::ListBoxHeader::Process(int, int, int)
S::Int S::GUI::ListBoxHeader::Process(Int message, Int wParam, Int lParam)
{
	if (!IsRegistered())		 return Error();
	if (!IsActive() || !IsVisible()) return Success();

	switch (message)
	{
		case SM_MOUSEMOVE:
			if (draggingTab) break;

			{
				Window	*window	  = GetContainerWindow();
				Surface	*surface  = GetDrawSurface();

				Point	 realPos  = GetRealPosition();
				Size	 realSize = GetRealSize();
				Rect	 frame	  = Rect(realPos, realSize);

				frame.left = realPos.x - 2;

				for (Int i = 0; i < tabWidths.Length() - 1; i++)
				{
					frame.left += (Int) Math::Abs(Math::Round(tabWidths.GetNth(i) * surface->GetSurfaceDPI() / 96.0));
					frame.right = frame.left + 4;

					if (window->IsMouseOn(frame))
					{
						if (moveTab != i)
						{
							moveTab = i;

							Input::Pointer::SetCursor(window, Input::Pointer::CursorHSize);
						}
					}
					else if (moveTab == i)
					{
						moveTab = -1;

						Input::Pointer::SetCursor(window, Input::Pointer::CursorArrow);
					}
				}

				frame.left = realPos.x + 1;
				frame.top++;
				frame.bottom--;

				for (Int j = 0; j < tabWidths.Length(); j++)
				{
					frame.right = (Int) Math::Min(frame.left + Math::Abs(Math::Round(tabWidths.GetNth(j) * surface->GetSurfaceDPI() / 96.0)) - 2, realPos.x + GetRealSize().cx - 1);

					if (window->IsMouseOn(frame) && !tabChecked.GetNth(j) && moveTab == -1)
					{
						surface->StartPaint(frame);

						surface->Box(frame, Setup::LightGrayColor, Rect::Filled);
						surface->SetText(tabNames.GetNth(j), frame + Point(2, Math::Ceil(Float(frame.GetHeight() - font.GetScaledTextSizeY()) / 2) - 1) - Size(2, 0), font);

						surface->EndPaint();

						tabChecked.Set(tabChecked.GetNthIndex(j), True);
					}
					else if ((!window->IsMouseOn(frame) || moveTab != -1) && tabChecked.GetNth(j))
					{
						surface->StartPaint(frame);

						surface->Box(frame, Setup::BackgroundColor, Rect::Filled);
						surface->SetText(tabNames.GetNth(j), frame + Point(2, Math::Ceil(Float(frame.GetHeight() - font.GetScaledTextSizeY()) / 2) - 1) - Size(2, 0), font);

						surface->EndPaint();

						tabChecked.Set(tabChecked.GetNthIndex(j), False);
					}

					frame.left += (Int) Math::Abs(Math::Round(tabWidths.GetNth(j) * surface->GetSurfaceDPI() / 96.0));
				}
			}

			break;
	}

	return Widget::Process(message, wParam, lParam);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1b0, %rsp            # imm = 0x1B0
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x108(%rbp)
movq (%rdi), %rax
callq *0x88(%rax)
testb $0x1, %al
jne 0xb4e6a
leaq -0x30(%rbp), %rdi
movq %rdi, -0x118(%rbp)
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x5a9c0
movq -0x118(%rbp), %rdi
callq 0x59680
movl %eax, -0x10c(%rbp)
jmp 0xb4e39
movl -0x10c(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x5b5b0
jmp 0xb5620
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x5b5b0
jmp 0xb562c
movq -0x108(%rbp), %rdi
movq (%rdi), %rax
callq *0x98(%rax)
testb $0x1, %al
jne 0xb4e80
jmp 0xb4e94
movq -0x108(%rbp), %rdi
movq (%rdi), %rax
callq *0x90(%rax)
testb $0x1, %al
jne 0xb4ee9
leaq -0x50(%rbp), %rdi
movq %rdi, -0x128(%rbp)
callq 0x5ca80
movq -0x128(%rbp), %rdi
callq 0x59680
movl %eax, -0x11c(%rbp)
jmp 0xb4eb8
movl -0x11c(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x5a410
jmp 0xb5620
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x5a410
jmp 0xb562c
movl -0x14(%rbp), %eax
subl $0x7800, %eax           # imm = 0x7800
jne 0xb5608
jmp 0xb4ef9
movq -0x108(%rbp), %rax
testb $0x1, 0x5bc(%rax)
je 0xb4f0e
jmp 0xb5608
movq -0x108(%rbp), %rdi
callq 0x59bc0
movq -0x108(%rbp), %rdi
movq %rax, -0x58(%rbp)
movq (%rdi), %rax
callq *0x40(%rax)
movq -0x108(%rbp), %rdi
movq %rax, -0x60(%rbp)
movq (%rdi), %rax
callq *0x48(%rax)
movq -0x108(%rbp), %rdi
movq %rax, -0x68(%rbp)
movq (%rdi), %rax
callq *0x50(%rax)
movq %rax, -0x70(%rbp)
leaq -0x80(%rbp), %rdi
leaq -0x68(%rbp), %rsi
leaq -0x70(%rbp), %rdx
callq 0x59ff0
movl -0x68(%rbp), %eax
subl $0x2, %eax
movl %eax, -0x80(%rbp)
movl $0x0, -0x84(%rbp)
movq -0x108(%rbp), %rdi
movl -0x84(%rbp), %eax
movl %eax, -0x12c(%rbp)
addq $0x630, %rdi            # imm = 0x630
callq 0x5c990
movl %eax, %ecx
movl -0x12c(%rbp), %eax
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0xb50a0
movq -0x108(%rbp), %rdi
addq $0x630, %rdi            # imm = 0x630
movl -0x84(%rbp), %esi
callq 0xb5a70
movl (%rax), %eax
movl %eax, -0x130(%rbp)
movq -0x60(%rbp), %rdi
callq 0x5d470
movw %ax, %cx
movl -0x130(%rbp), %eax
movswl %cx, %ecx
imull %ecx, %eax
cvtsi2sd %eax, %xmm0
movsd 0xd24d4(%rip), %xmm1    # 0x1874c0
divsd %xmm1, %xmm0
callq 0x5a970
movq %rax, %rdi
callq 0x5a5d0
addl -0x80(%rbp), %eax
movl %eax, -0x80(%rbp)
movl -0x80(%rbp), %eax
addl $0x4, %eax
movl %eax, -0x78(%rbp)
movq -0x58(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x5c060
testb $0x1, %al
jne 0xb501f
jmp 0xb5057
movq -0x108(%rbp), %rax
movl 0x5b8(%rax), %eax
cmpl -0x84(%rbp), %eax
je 0xb5055
movq -0x108(%rbp), %rax
movl -0x84(%rbp), %ecx
movl %ecx, 0x5b8(%rax)
movq -0x58(%rbp), %rdi
movl $0x3, %esi
callq 0x59fc0
jmp 0xb508a
movq -0x108(%rbp), %rax
movl 0x5b8(%rax), %eax
cmpl -0x84(%rbp), %eax
jne 0xb5088
movq -0x108(%rbp), %rax
movl $0xffffffff, 0x5b8(%rax) # imm = 0xFFFFFFFF
movq -0x58(%rbp), %rdi
xorl %esi, %esi
callq 0x59fc0
jmp 0xb508a
jmp 0xb508c
movl -0x84(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x84(%rbp)
jmp 0xb4f75
movl -0x68(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x80(%rbp)
movl -0x7c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x7c(%rbp)
movl -0x74(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x74(%rbp)
movl $0x0, -0x88(%rbp)
movq -0x108(%rbp), %rdi
movl -0x88(%rbp), %eax
movl %eax, -0x134(%rbp)
addq $0x630, %rdi            # imm = 0x630
callq 0x5c990
movl %eax, %ecx
movl -0x134(%rbp), %eax
cmpl %ecx, %eax
jge 0xb5606
movq -0x108(%rbp), %rdi
movslq -0x80(%rbp), %rax
movq %rax, -0x150(%rbp)
addq $0x630, %rdi            # imm = 0x630
movl -0x88(%rbp), %esi
callq 0xb5a70
movl (%rax), %eax
movl %eax, -0x154(%rbp)
movq -0x60(%rbp), %rdi
callq 0x5d470
movw %ax, %cx
movl -0x154(%rbp), %eax
movswl %cx, %ecx
imull %ecx, %eax
cvtsi2sd %eax, %xmm0
movsd 0xd237c(%rip), %xmm1    # 0x1874c0
divsd %xmm1, %xmm0
callq 0x5a970
movq %rax, %rdi
callq 0x5a5d0
movq -0x108(%rbp), %rdi
movq %rax, %rcx
movq -0x150(%rbp), %rax
addq %rcx, %rax
subq $0x2, %rax
movq %rax, -0x140(%rbp)
movl -0x68(%rbp), %eax
movl %eax, -0x144(%rbp)
movq (%rdi), %rax
callq *0x50(%rax)
movl -0x144(%rbp), %esi
movq -0x140(%rbp), %rdi
movq %rax, -0x90(%rbp)
addl -0x90(%rbp), %esi
subl $0x1, %esi
callq 0x5ab50
movl %eax, -0x78(%rbp)
movq -0x58(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x5c060
testb $0x1, %al
jne 0xb51be
jmp 0xb53a2
movq -0x108(%rbp), %rdi
addq $0x6e0, %rdi            # imm = 0x6E0
movl -0x88(%rbp), %esi
callq 0xb5b00
testb $0x1, (%rax)
jne 0xb53a2
movq -0x108(%rbp), %rax
cmpl $-0x1, 0x5b8(%rax)
jne 0xb53a2
movq -0x60(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x591b0
movq -0x60(%rbp), %rax
movq %rax, -0x180(%rbp)
movq 0x153d8d(%rip), %rax    # 0x208fa0
movl (%rax), %eax
movl %eax, -0x178(%rbp)
leaq -0x98(%rbp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x59260
movq -0x180(%rbp), %rdi
movl -0x178(%rbp), %ecx
leaq -0x80(%rbp), %rsi
movq 0x15353d(%rip), %rdx    # 0x208780
leaq -0x98(%rbp), %r8
callq 0x5c110
movq -0x108(%rbp), %rdi
movq -0x60(%rbp), %rax
movq %rax, -0x170(%rbp)
addq $0x5d8, %rdi            # imm = 0x5D8
movl -0x88(%rbp), %esi
callq 0x81b20
movq %rax, -0x168(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x591a0
movq -0x108(%rbp), %rdi
movl %eax, -0x174(%rbp)
addq $0x140, %rdi            # imm = 0x140
movq 0x153b0a(%rip), %rsi    # 0x208da8
callq 0x5bde0
movl %eax, %ecx
movl -0x174(%rbp), %eax
subl %ecx, %eax
cvtsi2sd %eax, %xmm0
movsd 0xd20bf(%rip), %xmm1    # 0x187378
divsd %xmm1, %xmm0
callq 0x5b240
subq $0x1, %rax
movl %eax, %edx
leaq -0xc0(%rbp), %rdi
movl $0x2, %esi
callq 0x5c2c0
leaq -0x80(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
callq 0x5be80
movq %rax, -0xb8(%rbp)
movq %rdx, -0xb0(%rbp)
leaq -0xc8(%rbp), %rdi
movl $0x2, %esi
xorl %edx, %edx
callq 0x59260
leaq -0xb8(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
callq 0x5c040
movq -0x170(%rbp), %rdi
movq -0x168(%rbp), %rsi
movq -0x108(%rbp), %rcx
movq %rax, -0xa8(%rbp)
movq %rdx, -0xa0(%rbp)
addq $0x140, %rcx            # imm = 0x140
leaq -0xa8(%rbp), %rdx
xorl %r8d, %r8d
callq 0x5c3f0
movq -0x60(%rbp), %rdi
callq 0x5d270
movq -0x108(%rbp), %rdi
movq %rdi, %rax
addq $0x6e0, %rax            # imm = 0x6E0
movq %rax, -0x160(%rbp)
addq $0x6e0, %rdi            # imm = 0x6E0
movl -0x88(%rbp), %esi
callq 0x5b720
movq -0x160(%rbp), %rdi
movl %eax, %esi
leaq 0xd51e3(%rip), %rdx     # 0x18a57b
callq 0xb0fa0
jmp 0xb5596
movq -0x58(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x5c060
testb $0x1, %al
jne 0xb53b5
jmp 0xb53c9
movq -0x108(%rbp), %rax
cmpl $-0x1, 0x5b8(%rax)
je 0xb5594
movq -0x108(%rbp), %rdi
addq $0x6e0, %rdi            # imm = 0x6E0
movl -0x88(%rbp), %esi
callq 0xb5b00
testb $0x1, (%rax)
je 0xb5594
movq -0x60(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x591b0
movq -0x60(%rbp), %rax
movq %rax, -0x1a8(%rbp)
movq 0x153b96(%rip), %rax    # 0x208fa0
movl (%rax), %eax
movl %eax, -0x1a0(%rbp)
leaq -0xd0(%rbp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x59260
movq -0x1a8(%rbp), %rdi
movl -0x1a0(%rbp), %ecx
leaq -0x80(%rbp), %rsi
movq 0x15306e(%rip), %rdx    # 0x2084a8
leaq -0xd0(%rbp), %r8
callq 0x5c110
movq -0x108(%rbp), %rdi
movq -0x60(%rbp), %rax
movq %rax, -0x198(%rbp)
addq $0x5d8, %rdi            # imm = 0x5D8
movl -0x88(%rbp), %esi
callq 0x81b20
movq %rax, -0x190(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x591a0
movq -0x108(%rbp), %rdi
movl %eax, -0x19c(%rbp)
addq $0x140, %rdi            # imm = 0x140
movq 0x153913(%rip), %rsi    # 0x208da8
callq 0x5bde0
movl %eax, %ecx
movl -0x19c(%rbp), %eax
subl %ecx, %eax
cvtsi2sd %eax, %xmm0
movsd 0xd1ec8(%rip), %xmm1    # 0x187378
divsd %xmm1, %xmm0
callq 0x5b240
subq $0x1, %rax
movl %eax, %edx
leaq -0xf8(%rbp), %rdi
movl $0x2, %esi
callq 0x5c2c0
leaq -0x80(%rbp), %rdi
leaq -0xf8(%rbp), %rsi
callq 0x5be80
movq %rax, -0xf0(%rbp)
movq %rdx, -0xe8(%rbp)
leaq -0x100(%rbp), %rdi
movl $0x2, %esi
xorl %edx, %edx
callq 0x59260
leaq -0xf0(%rbp), %rdi
leaq -0x100(%rbp), %rsi
callq 0x5c040
movq -0x198(%rbp), %rdi
movq -0x190(%rbp), %rsi
movq -0x108(%rbp), %rcx
movq %rax, -0xe0(%rbp)
movq %rdx, -0xd8(%rbp)
addq $0x140, %rcx            # imm = 0x140
leaq -0xe0(%rbp), %rdx
xorl %r8d, %r8d
callq 0x5c3f0
movq -0x60(%rbp), %rdi
callq 0x5d270
movq -0x108(%rbp), %rdi
movq %rdi, %rax
addq $0x6e0, %rax            # imm = 0x6E0
movq %rax, -0x188(%rbp)
addq $0x6e0, %rdi            # imm = 0x6E0
movl -0x88(%rbp), %esi
callq 0x5b720
movq -0x188(%rbp), %rdi
movl %eax, %esi
leaq 0xd4feb(%rip), %rdx     # 0x18a57a
callq 0xb0fa0
jmp 0xb5596
movq -0x108(%rbp), %rdi
addq $0x630, %rdi            # imm = 0x630
movl -0x88(%rbp), %esi
callq 0xb5a70
movl (%rax), %eax
movl %eax, -0x1ac(%rbp)
movq -0x60(%rbp), %rdi
callq 0x5d470
movw %ax, %cx
movl -0x1ac(%rbp), %eax
movswl %cx, %ecx
imull %ecx, %eax
cvtsi2sd %eax, %xmm0
movsd 0xd1ee5(%rip), %xmm1    # 0x1874c0
divsd %xmm1, %xmm0
callq 0x5a970
movq %rax, %rdi
callq 0x5a5d0
addl -0x80(%rbp), %eax
movl %eax, -0x80(%rbp)
movl -0x88(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x88(%rbp)
jmp 0xb50c5
jmp 0xb5608
movq -0x108(%rbp), %rdi
movl -0x14(%rbp), %esi
movl -0x18(%rbp), %edx
movl -0x1c(%rbp), %ecx
callq 0x5cbf0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x1b0, %rsp            # imm = 0x1B0
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x5b6b0
nopw %cs:(%rax,%rax)
nop