// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/classes/gui/widgets/basic/arrows.cpp
// Function: smooth::GUI::Arrows::Paint(int)
S::Int S::GUI::Arrows::Paint(Int message)
{
	if (!IsRegistered()) return Error();
	if (!IsVisible())    return Success();

	Surface	*surface    = GetDrawSurface();
	Rect	 frame	    = Rect(GetRealPosition(), GetRealSize());
	Int	 arrowColor = Setup::TextColor;

	if (!IsActive()) arrowColor = Setup::InactiveTextColor;

	switch (message)
	{
		case SP_PAINT:
			surface->StartPaint(frame);

			surface->Frame(frame, FRAME_UP);

			if (subtype == OR_HORZ)
			{
				Point	 lineStart	= Point((frame.left + frame.right) / 2 - 1, frame.top + 1);
				Point	 lineEnd	= Point(lineStart.x, frame.bottom - 1);

				surface->Line(lineStart, lineEnd, Setup::DividerDarkColor);
				surface->Line(lineStart + Point(1, 0), lineEnd + Point(1, 0), Setup::DividerLightColor);

				Int	 size		= Math::Round(3 * surface->GetSurfaceDPI() / 96.0);
				Point	 offset		= Point((size % 2) ? 1 : 0, (frame.GetHeight() % 2) ? 0 : 1);

				for (Int i = 0; i < size; i++)
				{
					lineStart	= Point((frame.left + frame.GetWidth() / 4) - size / 2 + i - offset.x, frame.top + frame.GetHeight() / 2 - i - offset.y);
					lineEnd		= lineStart + Point(0, 2 * i + 1);

					surface->Line(lineStart, lineEnd, arrowColor);
				}

				for (Int j = 0; j < size; j++)
				{
					lineStart	= Point((frame.right - frame.GetWidth() / 4) - (size + 1) / 2 + j, frame.top + frame.GetHeight() / 2 - size + 1 + j - offset.y);
					lineEnd		= lineStart + Point(0, 2 * (size - j) - 1);

					surface->Line(lineStart, lineEnd, arrowColor);
				}
			}
			else if (subtype == OR_VERT)
			{
				Point	 lineStart	= Point(frame.left + 1, (frame.top + frame.bottom) / 2 - 1);
				Point	 lineEnd	= Point(frame.right - 1, lineStart.y);

				surface->Line(lineStart, lineEnd, Setup::DividerDarkColor);
				surface->Line(lineStart + Point(0, 1), lineEnd + Point(0, 1), Setup::DividerLightColor);

				Int	 size		= Math::Round(3 * surface->GetSurfaceDPI() / 96.0);

				for (Int i = 0; i < size; i++)
				{
					lineStart	= Point(frame.left + frame.GetWidth() / 2 + (IsRightToLeft() ? 1 : 0) - i, (frame.top + frame.GetHeight() / 4) - size / 2 + i);
					lineEnd		= lineStart + Point(2 * i + 1, 0);

					surface->Line(lineStart, lineEnd, arrowColor);
				}

				for (Int j = 0; j < size; j++)
				{
					lineStart	= Point(frame.left + frame.GetWidth() / 2 + (IsRightToLeft() ? 1 : 0) - size + 1 + j, (frame.bottom - frame.GetHeight() / 4) - (size + 1) / 2 + j);
					lineEnd		= lineStart + Point(2 * (size - j) - 1, 0);

					surface->Line(lineStart, lineEnd, arrowColor);
				}
			}

			surface->EndPaint();

			break;
	}

	return Success();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x270, %rsp            # imm = 0x270
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x1b8(%rbp)
movq (%rdi), %rax
callq *0x88(%rax)
testb $0x1, %al
jne 0x8f584
leaq -0x28(%rbp), %rdi
movq %rdi, -0x1c8(%rbp)
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x5a9c0
movq -0x1c8(%rbp), %rdi
callq 0x59680
movl %eax, -0x1bc(%rbp)
jmp 0x8f553
movl -0x1bc(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x5b5b0
jmp 0x8ff13
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x5b5b0
jmp 0x8ff1f
movq -0x1b8(%rbp), %rdi
movq (%rdi), %rax
callq *0x90(%rax)
testb $0x1, %al
jne 0x8f5ed
leaq -0x48(%rbp), %rdi
movq %rdi, -0x1d8(%rbp)
callq 0x5ca80
movq -0x1d8(%rbp), %rdi
callq 0x59680
movl %eax, -0x1cc(%rbp)
jmp 0x8f5bc
movl -0x1cc(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x5a410
jmp 0x8ff13
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x5a410
jmp 0x8ff1f
movq -0x1b8(%rbp), %rdi
movq (%rdi), %rax
callq *0x40(%rax)
movq -0x1b8(%rbp), %rdi
movq %rax, -0x50(%rbp)
movq (%rdi), %rax
callq *0x48(%rax)
movq -0x1b8(%rbp), %rdi
movq %rax, -0x68(%rbp)
movq (%rdi), %rax
callq *0x50(%rax)
movq %rax, -0x70(%rbp)
leaq -0x60(%rbp), %rdi
leaq -0x68(%rbp), %rsi
leaq -0x70(%rbp), %rdx
callq 0x59ff0
movq 0x179390(%rip), %rdi    # 0x2089c8
callq 0x59210
movq -0x1b8(%rbp), %rdi
movl %eax, -0x74(%rbp)
movq (%rdi), %rax
callq *0x98(%rax)
testb $0x1, %al
jne 0x8f663
movq 0x1792d5(%rip), %rdi    # 0x208930
callq 0x59210
movl %eax, -0x74(%rbp)
movl -0x14(%rbp), %eax
testl %eax, %eax
jne 0x8febb
jmp 0x8f670
movq -0x50(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x591b0
movq -0x50(%rbp), %rdi
leaq -0x60(%rbp), %rsi
xorl %edx, %edx
callq 0x5c050
movq -0x1b8(%rbp), %rax
movswl 0x1a0(%rax), %eax
cmpl $0x1, %eax
jne 0x8fa94
movl -0x60(%rbp), %eax
addl -0x58(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %esi
subl $0x1, %esi
movl -0x5c(%rbp), %edx
addl $0x1, %edx
leaq -0x7c(%rbp), %rdi
callq 0x5c2c0
movl -0x7c(%rbp), %esi
movl -0x54(%rbp), %edx
subl $0x1, %edx
leaq -0x84(%rbp), %rdi
callq 0x5c2c0
movq -0x50(%rbp), %rdi
leaq -0x7c(%rbp), %rsi
leaq -0x84(%rbp), %rdx
movq 0x179170(%rip), %rcx    # 0x208860
callq 0x5cce0
movq -0x50(%rbp), %rax
movq %rax, -0x1e8(%rbp)
leaq -0x94(%rbp), %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0x5c2c0
leaq -0x7c(%rbp), %rdi
leaq -0x94(%rbp), %rsi
callq 0x5ca20
movq %rax, -0x8c(%rbp)
leaq -0xa4(%rbp), %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0x5c2c0
leaq -0x84(%rbp), %rdi
leaq -0xa4(%rbp), %rsi
callq 0x5ca20
movq -0x1e8(%rbp), %rdi
movq %rax, -0x9c(%rbp)
leaq -0x8c(%rbp), %rsi
leaq -0x9c(%rbp), %rdx
movq 0x1790dd(%rip), %rcx    # 0x208850
callq 0x5cce0
movq -0x50(%rbp), %rdi
callq 0x5d470
cwtl
imull $0x3, %eax, %eax
cvtsi2sd %eax, %xmm0
movsd 0xf7d2f(%rip), %xmm1    # 0x1874c0
divsd %xmm1, %xmm0
callq 0x5a970
movl %eax, -0xa8(%rbp)
movl -0xa8(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
xorl %eax, %eax
movl $0x1, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl %eax, -0x1dc(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x591a0
movl -0x1dc(%rbp), %esi
movl $0x2, %ecx
cltd
idivl %ecx
movl %edx, %ecx
movl $0x1, %edx
xorl %eax, %eax
cmpl $0x0, %ecx
cmovnel %eax, %edx
leaq -0xb0(%rbp), %rdi
callq 0x5c2c0
movl $0x0, -0xb4(%rbp)
movl -0xb4(%rbp), %eax
cmpl -0xa8(%rbp), %eax
jge 0x8f93b
movl -0x60(%rbp), %eax
movl %eax, -0x200(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x5a5a0
movl $0x4, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x200(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x1fc(%rbp)
movl -0xa8(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x1fc(%rbp), %eax
subl %ecx, %eax
addl -0xb4(%rbp), %eax
subl -0xb0(%rbp), %eax
movl %eax, -0x1f8(%rbp)
movl -0x5c(%rbp), %eax
movl %eax, -0x1f4(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x591a0
movl -0x1f8(%rbp), %esi
movl $0x2, %ecx
cltd
idivl %ecx
movl -0x1f4(%rbp), %edx
addl %eax, %edx
subl -0xb4(%rbp), %edx
subl -0xac(%rbp), %edx
leaq -0xbc(%rbp), %rdi
callq 0x5c2c0
movq -0xbc(%rbp), %rax
movq %rax, -0x7c(%rbp)
movl -0xb4(%rbp), %edx
shll %edx
addl $0x1, %edx
leaq -0xcc(%rbp), %rdi
xorl %esi, %esi
callq 0x5c2c0
leaq -0x7c(%rbp), %rdi
leaq -0xcc(%rbp), %rsi
callq 0x5ca20
movq %rax, -0xc4(%rbp)
movq -0xc4(%rbp), %rax
movq %rax, -0x84(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x1f0(%rbp)
movslq -0x74(%rbp), %rsi
leaq -0xe0(%rbp), %rdi
xorl %edx, %edx
callq 0x59be0
movq -0x1f0(%rbp), %rdi
leaq -0x7c(%rbp), %rsi
leaq -0x84(%rbp), %rdx
leaq -0xe0(%rbp), %rcx
callq 0x5cce0
movl -0xb4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xb4(%rbp)
jmp 0x8f7fd
movl $0x0, -0xe4(%rbp)
movl -0xe4(%rbp), %eax
cmpl -0xa8(%rbp), %eax
jge 0x8fa8f
movl -0x58(%rbp), %eax
movl %eax, -0x218(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x5a5a0
movl $0x4, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x218(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x214(%rbp)
movl -0xa8(%rbp), %eax
addl $0x1, %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x214(%rbp), %eax
subl %ecx, %eax
addl -0xe4(%rbp), %eax
movl %eax, -0x210(%rbp)
movl -0x5c(%rbp), %eax
movl %eax, -0x20c(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x591a0
movl -0x210(%rbp), %esi
movl $0x2, %ecx
cltd
idivl %ecx
movl -0x20c(%rbp), %edx
addl %eax, %edx
subl -0xa8(%rbp), %edx
addl $0x1, %edx
addl -0xe4(%rbp), %edx
subl -0xac(%rbp), %edx
leaq -0xec(%rbp), %rdi
callq 0x5c2c0
movq -0xec(%rbp), %rax
movq %rax, -0x7c(%rbp)
movl -0xa8(%rbp), %edx
subl -0xe4(%rbp), %edx
shll %edx
subl $0x1, %edx
leaq -0xfc(%rbp), %rdi
xorl %esi, %esi
callq 0x5c2c0
leaq -0x7c(%rbp), %rdi
leaq -0xfc(%rbp), %rsi
callq 0x5ca20
movq %rax, -0xf4(%rbp)
movq -0xf4(%rbp), %rax
movq %rax, -0x84(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x208(%rbp)
movslq -0x74(%rbp), %rsi
leaq -0x110(%rbp), %rdi
xorl %edx, %edx
callq 0x59be0
movq -0x208(%rbp), %rdi
leaq -0x7c(%rbp), %rsi
leaq -0x84(%rbp), %rdx
leaq -0x110(%rbp), %rcx
callq 0x5cce0
movl -0xe4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xe4(%rbp)
jmp 0x8f945
jmp 0x8feb2
movq -0x1b8(%rbp), %rax
movswl 0x1a0(%rax), %eax
cmpl $0x2, %eax
jne 0x8feb0
movl -0x60(%rbp), %esi
addl $0x1, %esi
movl -0x5c(%rbp), %eax
addl -0x54(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %edx
subl $0x1, %edx
leaq -0x118(%rbp), %rdi
callq 0x5c2c0
movl -0x58(%rbp), %esi
subl $0x1, %esi
movl -0x114(%rbp), %edx
leaq -0x120(%rbp), %rdi
callq 0x5c2c0
movq -0x50(%rbp), %rdi
leaq -0x118(%rbp), %rsi
leaq -0x120(%rbp), %rdx
movq 0x178d5f(%rip), %rcx    # 0x208860
callq 0x5cce0
movq -0x50(%rbp), %rax
movq %rax, -0x220(%rbp)
leaq -0x130(%rbp), %rdi
xorl %esi, %esi
movl $0x1, %edx
callq 0x5c2c0
leaq -0x118(%rbp), %rdi
leaq -0x130(%rbp), %rsi
callq 0x5ca20
movq %rax, -0x128(%rbp)
leaq -0x140(%rbp), %rdi
xorl %esi, %esi
movl $0x1, %edx
callq 0x5c2c0
leaq -0x120(%rbp), %rdi
leaq -0x140(%rbp), %rsi
callq 0x5ca20
movq -0x220(%rbp), %rdi
movq %rax, -0x138(%rbp)
leaq -0x128(%rbp), %rsi
leaq -0x138(%rbp), %rdx
movq 0x178cc9(%rip), %rcx    # 0x208850
callq 0x5cce0
movq -0x50(%rbp), %rdi
callq 0x5d470
cwtl
imull $0x3, %eax, %eax
cvtsi2sd %eax, %xmm0
movsd 0xf791b(%rip), %xmm1    # 0x1874c0
divsd %xmm1, %xmm0
callq 0x5a970
movl %eax, -0x144(%rbp)
movl $0x0, -0x148(%rbp)
movl -0x148(%rbp), %eax
cmpl -0x144(%rbp), %eax
jge 0x8fd28
movl -0x60(%rbp), %eax
movl %eax, -0x23c(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x5a5a0
movq -0x1b8(%rbp), %rdi
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x23c(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x238(%rbp)
movq (%rdi), %rax
callq *0x160(%rax)
movb %al, %sil
movl -0x238(%rbp), %eax
xorl %ecx, %ecx
movl $0x1, %edx
testb $0x1, %sil
cmovnel %edx, %ecx
addl %ecx, %eax
subl -0x148(%rbp), %eax
movl %eax, -0x234(%rbp)
movl -0x5c(%rbp), %eax
movl %eax, -0x230(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x591a0
movl -0x234(%rbp), %esi
movl $0x4, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x230(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x22c(%rbp)
movl -0x144(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl -0x22c(%rbp), %edx
subl %eax, %edx
addl -0x148(%rbp), %edx
leaq -0x150(%rbp), %rdi
callq 0x5c2c0
movq -0x150(%rbp), %rax
movq %rax, -0x118(%rbp)
movl -0x148(%rbp), %esi
shll %esi
addl $0x1, %esi
leaq -0x160(%rbp), %rdi
xorl %edx, %edx
callq 0x5c2c0
leaq -0x118(%rbp), %rdi
leaq -0x160(%rbp), %rsi
callq 0x5ca20
movq %rax, -0x158(%rbp)
movq -0x158(%rbp), %rax
movq %rax, -0x120(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x228(%rbp)
movslq -0x74(%rbp), %rsi
leaq -0x170(%rbp), %rdi
xorl %edx, %edx
callq 0x59be0
movq -0x228(%rbp), %rdi
leaq -0x118(%rbp), %rsi
leaq -0x120(%rbp), %rdx
leaq -0x170(%rbp), %rcx
callq 0x5cce0
movl -0x148(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x148(%rbp)
jmp 0x8fbbe
movl $0x0, -0x174(%rbp)
movl -0x174(%rbp), %eax
cmpl -0x144(%rbp), %eax
jge 0x8feae
movl -0x60(%rbp), %eax
movl %eax, -0x25c(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x5a5a0
movq -0x1b8(%rbp), %rdi
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x25c(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x258(%rbp)
movq (%rdi), %rax
callq *0x160(%rax)
movb %al, %sil
movl -0x258(%rbp), %eax
xorl %ecx, %ecx
movl $0x1, %edx
testb $0x1, %sil
cmovnel %edx, %ecx
addl %ecx, %eax
subl -0x144(%rbp), %eax
addl $0x1, %eax
addl -0x174(%rbp), %eax
movl %eax, -0x254(%rbp)
movl -0x54(%rbp), %eax
movl %eax, -0x250(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x591a0
movl -0x254(%rbp), %esi
movl $0x4, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x250(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x24c(%rbp)
movl -0x144(%rbp), %eax
addl $0x1, %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl -0x24c(%rbp), %edx
subl %eax, %edx
addl -0x174(%rbp), %edx
leaq -0x17c(%rbp), %rdi
callq 0x5c2c0
movq -0x17c(%rbp), %rax
movq %rax, -0x118(%rbp)
movl -0x144(%rbp), %esi
subl -0x174(%rbp), %esi
shll %esi
subl $0x1, %esi
leaq -0x18c(%rbp), %rdi
xorl %edx, %edx
callq 0x5c2c0
leaq -0x118(%rbp), %rdi
leaq -0x18c(%rbp), %rsi
callq 0x5ca20
movq %rax, -0x184(%rbp)
movq -0x184(%rbp), %rax
movq %rax, -0x120(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x248(%rbp)
movslq -0x74(%rbp), %rsi
leaq -0x1a0(%rbp), %rdi
xorl %edx, %edx
callq 0x59be0
movq -0x248(%rbp), %rdi
leaq -0x118(%rbp), %rsi
leaq -0x120(%rbp), %rdx
leaq -0x1a0(%rbp), %rcx
callq 0x5cce0
movl -0x174(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x174(%rbp)
jmp 0x8fd32
jmp 0x8feb0
jmp 0x8feb2
movq -0x50(%rbp), %rdi
callq 0x5d270
leaq -0x1b0(%rbp), %rdi
movq %rdi, -0x268(%rbp)
callq 0x5ca80
movq -0x268(%rbp), %rdi
callq 0x59680
movl %eax, -0x260(%rbp)
jmp 0x8fee2
movl -0x260(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0x1b0(%rbp), %rdi
callq 0x5a410
jmp 0x8ff13
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x1b0(%rbp), %rdi
callq 0x5a410
jmp 0x8ff1f
movl -0x4(%rbp), %eax
addq $0x270, %rsp            # imm = 0x270
popq %rbp
retq
movq -0x30(%rbp), %rdi
callq 0x5b6b0
nopl (%rax,%rax)