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

	Surface	*surface = GetDrawSurface();
	Rect	 frame	 = Rect(GetRealPosition(), GetRealSize());

	surface->StartPaint(frame);

	PopupMenuEntry::Paint(message);

	switch (message)
	{
		case SP_PAINT:
		case SP_MOUSEIN:
		case SP_MOUSEOUT:
			if (*bVar == True)
			{
				Float	 scaleFactor = surface->GetSurfaceDPI() / 96.0;

				for (Int i = 0; i < 2; i++)
				{
					Color	 color	= (IsActive() ? Setup::TextColor : Setup::InactiveTextColor);

					if (message == SP_MOUSEIN) color = Setup::GradientTextColor;
					if (i == 0)		   color = Color(color.GetRed() + (255 - color.GetRed()) * 0.6, color.GetGreen() + (255 - color.GetGreen()) * 0.6, color.GetBlue() + (255 - color.GetBlue()) * 0.6);

					Int	 width  = 4 * scaleFactor;
					Point	 offset = Point(IsRightToLeft() ? 1 : 0, 0);

					if (i == 0) offset += Point(IsRightToLeft() ? -1 : 1, 1);

					Point	 p1	= Point(frame.left		       + width, frame.top    + width) + offset;
					Point	 p2	= Point(frame.left + frame.GetHeight() - width, frame.bottom - width) + offset;

					surface->Line(p1 + Point(0, 0), p2 + Point( 0,  0), color);
					surface->Line(p1 + Point(1, 0), p2 + Point( 0, -1), color);
					surface->Line(p1 + Point(0, 1), p2 + Point(-1,  0), color);

					p1 = Point(frame.left + frame.GetHeight() - width - 1, frame.top    + width) + offset;
					p2 = Point(frame.left			  + width - 1, frame.bottom - width) + offset;

					surface->Line(p1 + Point( 0, 0), p2 + Point(0,  0), color);
					surface->Line(p1 + Point( 0, 1), p2 + Point(1,  0), color);
					surface->Line(p1 + Point(-1, 0), p2 + Point(0, -1), color);
				}
			}

			break;
	}

	surface->EndPaint();

	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, -0x1d0(%rbp)
movq (%rdi), %rax
callq *0x88(%rax)
testb $0x1, %al
jne 0xc48f4
leaq -0x28(%rbp), %rdi
movq %rdi, -0x1e0(%rbp)
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x5a9c0
movq -0x1e0(%rbp), %rdi
callq 0x59680
movl %eax, -0x1d4(%rbp)
jmp 0xc48c3
movl -0x1d4(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x5b5b0
jmp 0xc512b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x5b5b0
jmp 0xc5137
movq -0x1d0(%rbp), %rdi
movq (%rdi), %rax
callq *0x90(%rax)
testb $0x1, %al
jne 0xc495d
leaq -0x48(%rbp), %rdi
movq %rdi, -0x1f0(%rbp)
callq 0x5ca80
movq -0x1f0(%rbp), %rdi
callq 0x59680
movl %eax, -0x1e4(%rbp)
jmp 0xc492c
movl -0x1e4(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x5a410
jmp 0xc512b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x5a410
jmp 0xc5137
movq -0x1d0(%rbp), %rdi
movq (%rdi), %rax
movq 0x40(%rax), %rax
callq *%rax
movq -0x1d0(%rbp), %rdi
movq %rax, -0x50(%rbp)
movq (%rdi), %rax
movq 0x48(%rax), %rax
callq *%rax
movq -0x1d0(%rbp), %rdi
movq %rax, -0x68(%rbp)
movq (%rdi), %rax
movq 0x50(%rax), %rax
callq *%rax
movq %rax, -0x70(%rbp)
leaq -0x60(%rbp), %rdi
movq %rdi, -0x200(%rbp)
leaq -0x68(%rbp), %rsi
leaq -0x70(%rbp), %rdx
callq 0x59ff0
movq -0x200(%rbp), %rsi
movq -0x50(%rbp), %rdi
callq 0x591b0
movq -0x1d0(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x5c0a0
movl -0x14(%rbp), %eax
movl %eax, -0x1f4(%rbp)
testl %eax, %eax
je 0xc49f3
jmp 0xc49df
movl -0x1f4(%rbp), %eax
addl $-0x2, %eax
subl $0x1, %eax
ja 0xc50ca
jmp 0xc49f3
movq -0x1d0(%rbp), %rax
movq 0x5d8(%rax), %rax
movb (%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0xc50c8
movq -0x50(%rbp), %rdi
callq 0x5d470
cwtl
cvtsi2sd %eax, %xmm0
movsd 0xc2a99(%rip), %xmm1    # 0x1874c0
divsd %xmm1, %xmm0
movsd %xmm0, -0x78(%rbp)
movl $0x0, -0x7c(%rbp)
cmpl $0x2, -0x7c(%rbp)
jge 0xc50c6
movq -0x1d0(%rbp), %rdi
movq (%rdi), %rax
callq *0x98(%rax)
testb $0x1, %al
jne 0xc4a57
jmp 0xc4a67
movq 0x143f6a(%rip), %rax    # 0x2089c8
movq %rax, -0x208(%rbp)
jmp 0xc4a77
movq 0x143ec2(%rip), %rax    # 0x208930
movq %rax, -0x208(%rbp)
jmp 0xc4a77
movq -0x208(%rbp), %rsi
leaq -0x90(%rbp), %rdi
callq 0x5c720
cmpl $0x2, -0x14(%rbp)
jne 0xc4aac
movq 0x144081(%rip), %rax    # 0x208b18
movq (%rax), %rcx
movq %rcx, -0x90(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x88(%rbp)
cmpl $0x0, -0x7c(%rbp)
jne 0xc4be0
leaq -0x90(%rbp), %rdi
callq 0x59f20
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0x228(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x59f20
movsd -0x228(%rbp), %xmm1
movl %eax, %ecx
movl $0xff, %eax
subl %ecx, %eax
cvtsi2sd %eax, %xmm0
movsd 0xc5ed9(%rip), %xmm2    # 0x18a9d0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0x210(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x5d920
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0x220(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x5d920
movsd -0x220(%rbp), %xmm1
movl %eax, %ecx
movl $0xff, %eax
subl %ecx, %eax
cvtsi2sd %eax, %xmm0
movsd 0xc5e86(%rip), %xmm2    # 0x18a9d0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0x20c(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x5b650
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0x218(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x5b650
movsd -0x218(%rbp), %xmm1
movl -0x210(%rbp), %esi
movl -0x20c(%rbp), %edx
movl %eax, %ecx
movl $0xff, %eax
subl %ecx, %eax
cvtsi2sd %eax, %xmm0
movsd 0xc5e27(%rip), %xmm2    # 0x18a9d0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %ecx
leaq -0xa0(%rbp), %rdi
xorl %r8d, %r8d
callq 0x5a6b0
movq -0xa0(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x98(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x1d0(%rbp), %rdi
movsd 0xc2781(%rip), %xmm0    # 0x187370
mulsd -0x78(%rbp), %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0xa4(%rbp)
movq (%rdi), %rax
callq *0x160(%rax)
movb %al, %cl
xorl %esi, %esi
movl $0x1, %eax
testb $0x1, %cl
cmovnel %eax, %esi
leaq -0xac(%rbp), %rdi
xorl %edx, %edx
callq 0x5c2c0
cmpl $0x0, -0x7c(%rbp)
jne 0xc4c70
movq -0x1d0(%rbp), %rdi
movq (%rdi), %rax
callq *0x160(%rax)
movb %al, %cl
movl $0x1, %esi
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testb $0x1, %cl
cmovnel %eax, %esi
leaq -0xb4(%rbp), %rdi
movl $0x1, %edx
callq 0x5c2c0
leaq -0xac(%rbp), %rdi
leaq -0xb4(%rbp), %rsi
callq 0x5a510
movl -0x60(%rbp), %esi
addl -0xa4(%rbp), %esi
movl -0x5c(%rbp), %edx
addl -0xa4(%rbp), %edx
leaq -0xc4(%rbp), %rdi
callq 0x5c2c0
leaq -0xc4(%rbp), %rdi
leaq -0xac(%rbp), %rsi
callq 0x5ca20
movq %rax, -0xbc(%rbp)
movl -0x60(%rbp), %eax
movl %eax, -0x264(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x591a0
movl -0x264(%rbp), %esi
addl %eax, %esi
subl -0xa4(%rbp), %esi
movl -0x54(%rbp), %edx
subl -0xa4(%rbp), %edx
leaq -0xd4(%rbp), %rdi
callq 0x5c2c0
leaq -0xd4(%rbp), %rdi
leaq -0xac(%rbp), %rsi
callq 0x5ca20
movq %rax, -0xcc(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x260(%rbp)
leaq -0xe4(%rbp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x5c2c0
leaq -0xbc(%rbp), %rdi
leaq -0xe4(%rbp), %rsi
callq 0x5ca20
movq %rax, -0xdc(%rbp)
leaq -0xf4(%rbp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x5c2c0
leaq -0xcc(%rbp), %rdi
leaq -0xf4(%rbp), %rsi
callq 0x5ca20
movq -0x260(%rbp), %rdi
movq %rax, -0xec(%rbp)
leaq -0xdc(%rbp), %rsi
leaq -0xec(%rbp), %rdx
leaq -0x90(%rbp), %rcx
callq 0x5cce0
movq -0x50(%rbp), %rax
movq %rax, -0x258(%rbp)
leaq -0x104(%rbp), %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0x5c2c0
leaq -0xbc(%rbp), %rdi
leaq -0x104(%rbp), %rsi
callq 0x5ca20
movq %rax, -0xfc(%rbp)
leaq -0x114(%rbp), %rdi
xorl %esi, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x5c2c0
leaq -0xcc(%rbp), %rdi
leaq -0x114(%rbp), %rsi
callq 0x5ca20
movq -0x258(%rbp), %rdi
movq %rax, -0x10c(%rbp)
leaq -0xfc(%rbp), %rsi
leaq -0x10c(%rbp), %rdx
leaq -0x90(%rbp), %rcx
callq 0x5cce0
movq -0x50(%rbp), %rax
movq %rax, -0x250(%rbp)
leaq -0x124(%rbp), %rdi
xorl %esi, %esi
movl $0x1, %edx
callq 0x5c2c0
leaq -0xbc(%rbp), %rdi
leaq -0x124(%rbp), %rsi
callq 0x5ca20
movq %rax, -0x11c(%rbp)
leaq -0x134(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
callq 0x5c2c0
leaq -0xcc(%rbp), %rdi
leaq -0x134(%rbp), %rsi
callq 0x5ca20
movq -0x250(%rbp), %rdi
movq %rax, -0x12c(%rbp)
leaq -0x11c(%rbp), %rsi
leaq -0x12c(%rbp), %rdx
leaq -0x90(%rbp), %rcx
callq 0x5cce0
movl -0x60(%rbp), %eax
movl %eax, -0x244(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x591a0
movl -0x244(%rbp), %esi
addl %eax, %esi
subl -0xa4(%rbp), %esi
subl $0x1, %esi
movl -0x5c(%rbp), %edx
addl -0xa4(%rbp), %edx
leaq -0x144(%rbp), %rdi
callq 0x5c2c0
leaq -0x144(%rbp), %rdi
leaq -0xac(%rbp), %rsi
callq 0x5ca20
movq %rax, -0x13c(%rbp)
movq -0x13c(%rbp), %rax
movq %rax, -0xbc(%rbp)
movl -0x60(%rbp), %esi
addl -0xa4(%rbp), %esi
subl $0x1, %esi
movl -0x54(%rbp), %edx
subl -0xa4(%rbp), %edx
leaq -0x154(%rbp), %rdi
callq 0x5c2c0
leaq -0x154(%rbp), %rdi
leaq -0xac(%rbp), %rsi
callq 0x5ca20
movq %rax, -0x14c(%rbp)
movq -0x14c(%rbp), %rax
movq %rax, -0xcc(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x240(%rbp)
leaq -0x164(%rbp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x5c2c0
leaq -0xbc(%rbp), %rdi
leaq -0x164(%rbp), %rsi
callq 0x5ca20
movq %rax, -0x15c(%rbp)
leaq -0x174(%rbp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x5c2c0
leaq -0xcc(%rbp), %rdi
leaq -0x174(%rbp), %rsi
callq 0x5ca20
movq -0x240(%rbp), %rdi
movq %rax, -0x16c(%rbp)
leaq -0x15c(%rbp), %rsi
leaq -0x16c(%rbp), %rdx
leaq -0x90(%rbp), %rcx
callq 0x5cce0
movq -0x50(%rbp), %rax
movq %rax, -0x238(%rbp)
leaq -0x184(%rbp), %rdi
xorl %esi, %esi
movl $0x1, %edx
callq 0x5c2c0
leaq -0xbc(%rbp), %rdi
leaq -0x184(%rbp), %rsi
callq 0x5ca20
movq %rax, -0x17c(%rbp)
leaq -0x194(%rbp), %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0x5c2c0
leaq -0xcc(%rbp), %rdi
leaq -0x194(%rbp), %rsi
callq 0x5ca20
movq -0x238(%rbp), %rdi
movq %rax, -0x18c(%rbp)
leaq -0x17c(%rbp), %rsi
leaq -0x18c(%rbp), %rdx
leaq -0x90(%rbp), %rcx
callq 0x5cce0
movq -0x50(%rbp), %rax
movq %rax, -0x230(%rbp)
leaq -0x1a4(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
callq 0x5c2c0
leaq -0xbc(%rbp), %rdi
leaq -0x1a4(%rbp), %rsi
callq 0x5ca20
movq %rax, -0x19c(%rbp)
leaq -0x1b4(%rbp), %rdi
xorl %esi, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x5c2c0
leaq -0xcc(%rbp), %rdi
leaq -0x1b4(%rbp), %rsi
callq 0x5ca20
movq -0x230(%rbp), %rdi
movq %rax, -0x1ac(%rbp)
leaq -0x19c(%rbp), %rsi
leaq -0x1ac(%rbp), %rdx
leaq -0x90(%rbp), %rcx
callq 0x5cce0
movl -0x7c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x7c(%rbp)
jmp 0xc4a37
jmp 0xc50c8
jmp 0xc50ca
movq -0x50(%rbp), %rdi
callq 0x5d270
leaq -0x1c8(%rbp), %rdi
movq %rdi, -0x270(%rbp)
callq 0x5ca80
movq -0x270(%rbp), %rdi
callq 0x59680
movl %eax, -0x268(%rbp)
jmp 0xc50fa
movl -0x268(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0x1c8(%rbp), %rdi
callq 0x5a410
jmp 0xc512b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x1c8(%rbp), %rdi
callq 0x5a410
jmp 0xc5137
movl -0x4(%rbp), %eax
addq $0x270, %rsp            # imm = 0x270
popq %rbp
retq
movq -0x30(%rbp), %rdi
callq 0x5b6b0