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

	Surface	*surface  = GetDrawSurface();
	Point	 realPos  = GetRealPosition();
	Size	 realSize = GetRealSize();

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

			surface->Box(Rect(realPos, realSize), Setup::ClientColor, Rect::Filled);
			image->Paint(SP_PAINT);

			surface->EndPaint();

			break;
		case SP_MOUSEIN:
			surface->StartPaint(GetVisibleArea());

			surface->Box(Rect(realPos,				Size(realSize.cx, 2)), Setup::GradientStartColor, Rect::Filled);
			surface->Box(Rect(realPos,				Size(2, realSize.cy)), Setup::GradientStartColor, Rect::Filled);
			surface->Box(Rect(realPos + Point(realSize.cx - 2, 0),	Size(2, realSize.cy)), Setup::GradientStartColor, Rect::Filled);
			surface->Box(Rect(realPos + Point(0, realSize.cy - 2),	Size(realSize.cx, 2)), Setup::GradientStartColor, Rect::Filled);

			surface->EndPaint();

			break;
		case SP_MOUSEOUT:
			surface->StartPaint(GetVisibleArea());

			surface->Box(Rect(realPos,				Size(realSize.cx, 2)), Setup::ClientColor, Rect::Filled);
			surface->Box(Rect(realPos,				Size(2, realSize.cy)), Setup::ClientColor, Rect::Filled);
			surface->Box(Rect(realPos + Point(realSize.cx - 2, 0),	Size(2, realSize.cy)), Setup::ClientColor, Rect::Filled);
			surface->Box(Rect(realPos + Point(0, realSize.cy - 2),	Size(realSize.cx, 2)), Setup::ClientColor, Rect::Filled);

			surface->EndPaint();

			break;
	}

	return Success();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2e0, %rsp            # imm = 0x2E0
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x200(%rbp)
movq (%rdi), %rax
callq *0x88(%rax)
testb $0x1, %al
jne 0xacc54
leaq -0x28(%rbp), %rdi
movq %rdi, -0x210(%rbp)
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x5a9c0
movq -0x210(%rbp), %rdi
callq 0x59680
movl %eax, -0x204(%rbp)
jmp 0xacc23
movl -0x204(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x5b5b0
jmp 0xad362
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x5b5b0
jmp 0xad36e
movq -0x200(%rbp), %rdi
movq (%rdi), %rax
callq *0x90(%rax)
testb $0x1, %al
jne 0xaccbd
leaq -0x48(%rbp), %rdi
movq %rdi, -0x220(%rbp)
callq 0x5ca80
movq -0x220(%rbp), %rdi
callq 0x59680
movl %eax, -0x214(%rbp)
jmp 0xacc8c
movl -0x214(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x5a410
jmp 0xad362
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x5a410
jmp 0xad36e
movq -0x200(%rbp), %rdi
movq (%rdi), %rax
movq 0x40(%rax), %rax
callq *%rax
movq -0x200(%rbp), %rdi
movq %rax, -0x50(%rbp)
movq (%rdi), %rax
movq 0x48(%rax), %rax
callq *%rax
movq -0x200(%rbp), %rdi
movq %rax, -0x58(%rbp)
movq (%rdi), %rax
movq 0x50(%rax), %rax
callq *%rax
movq %rax, -0x60(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x224(%rbp)
testl %eax, %eax
je 0xacd2d
jmp 0xacd08
movl -0x224(%rbp), %eax
subl $0x2, %eax
je 0xacde3
jmp 0xacd19
movl -0x224(%rbp), %eax
subl $0x3, %eax
je 0xad079
jmp 0xad30a
movq -0x200(%rbp), %rdi
movq -0x50(%rbp), %rax
movq %rax, -0x238(%rbp)
movq (%rdi), %rax
callq *0x130(%rax)
movq -0x238(%rbp), %rdi
movq %rax, -0x70(%rbp)
movq %rdx, -0x68(%rbp)
leaq -0x70(%rbp), %rsi
callq 0x591b0
movq -0x50(%rbp), %rax
movq %rax, -0x230(%rbp)
leaq -0x80(%rbp), %rdi
leaq -0x58(%rbp), %rsi
leaq -0x60(%rbp), %rdx
callq 0x59ff0
movq 0x15c21d(%rip), %rax    # 0x208fa0
movl (%rax), %eax
movl %eax, -0x228(%rbp)
leaq -0x88(%rbp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x59260
movq -0x230(%rbp), %rdi
movl -0x228(%rbp), %ecx
leaq -0x80(%rbp), %rsi
movq 0x15b895(%rip), %rdx    # 0x208648
leaq -0x88(%rbp), %r8
callq 0x5c110
movq -0x200(%rbp), %rax
movq 0x630(%rax), %rdi
movq (%rdi), %rax
xorl %esi, %esi
callq *0x78(%rax)
movq -0x50(%rbp), %rdi
callq 0x5d270
jmp 0xad30a
movq -0x200(%rbp), %rdi
movq -0x50(%rbp), %rax
movq %rax, -0x280(%rbp)
movq (%rdi), %rax
callq *0x130(%rax)
movq -0x280(%rbp), %rdi
movq %rax, -0x98(%rbp)
movq %rdx, -0x90(%rbp)
leaq -0x98(%rbp), %rsi
callq 0x591b0
movq -0x50(%rbp), %rax
movq %rax, -0x278(%rbp)
movl -0x60(%rbp), %esi
leaq -0xb0(%rbp), %rdi
movl $0x2, %edx
callq 0x59260
leaq -0xa8(%rbp), %rdi
leaq -0x58(%rbp), %rsi
leaq -0xb0(%rbp), %rdx
callq 0x59ff0
movq 0x15c144(%rip), %rax    # 0x208fa0
movl (%rax), %eax
movl %eax, -0x26c(%rbp)
leaq -0xb8(%rbp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x59260
movq -0x278(%rbp), %rdi
movl -0x26c(%rbp), %ecx
leaq -0xa8(%rbp), %rsi
movq 0x15c129(%rip), %rdx    # 0x208fb8
leaq -0xb8(%rbp), %r8
callq 0x5c110
movq -0x50(%rbp), %rax
movq %rax, -0x268(%rbp)
movl -0x5c(%rbp), %edx
leaq -0xd0(%rbp), %rdi
movl $0x2, %esi
callq 0x59260
leaq -0xc8(%rbp), %rdi
leaq -0x58(%rbp), %rsi
leaq -0xd0(%rbp), %rdx
callq 0x59ff0
movq 0x15c0c8(%rip), %rax    # 0x208fa0
movl (%rax), %eax
movl %eax, -0x25c(%rbp)
leaq -0xd8(%rbp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x59260
movq -0x268(%rbp), %rdi
movl -0x25c(%rbp), %ecx
leaq -0xc8(%rbp), %rsi
movq 0x15c0ad(%rip), %rdx    # 0x208fb8
leaq -0xd8(%rbp), %r8
callq 0x5c110
movq -0x50(%rbp), %rax
movq %rax, -0x258(%rbp)
movl -0x60(%rbp), %esi
subl $0x2, %esi
leaq -0xf8(%rbp), %rdi
xorl %edx, %edx
callq 0x5c2c0
leaq -0x58(%rbp), %rdi
leaq -0xf8(%rbp), %rsi
callq 0x5ca20
movq %rax, -0xf0(%rbp)
movl -0x5c(%rbp), %edx
leaq -0x100(%rbp), %rdi
movl $0x2, %esi
callq 0x59260
leaq -0xe8(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
leaq -0x100(%rbp), %rdx
callq 0x59ff0
movq 0x15c01e(%rip), %rax    # 0x208fa0
movl (%rax), %eax
movl %eax, -0x24c(%rbp)
leaq -0x108(%rbp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x59260
movq -0x258(%rbp), %rdi
movl -0x24c(%rbp), %ecx
leaq -0xe8(%rbp), %rsi
movq 0x15c003(%rip), %rdx    # 0x208fb8
leaq -0x108(%rbp), %r8
callq 0x5c110
movq -0x50(%rbp), %rax
movq %rax, -0x248(%rbp)
movl -0x5c(%rbp), %edx
subl $0x2, %edx
leaq -0x128(%rbp), %rdi
xorl %esi, %esi
callq 0x5c2c0
leaq -0x58(%rbp), %rdi
leaq -0x128(%rbp), %rsi
callq 0x5ca20
movq %rax, -0x120(%rbp)
movl -0x60(%rbp), %esi
leaq -0x130(%rbp), %rdi
movl $0x2, %edx
callq 0x59260
leaq -0x118(%rbp), %rdi
leaq -0x120(%rbp), %rsi
leaq -0x130(%rbp), %rdx
callq 0x59ff0
movq 0x15bf74(%rip), %rax    # 0x208fa0
movl (%rax), %eax
movl %eax, -0x23c(%rbp)
leaq -0x138(%rbp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x59260
movq -0x248(%rbp), %rdi
movl -0x23c(%rbp), %ecx
leaq -0x118(%rbp), %rsi
movq 0x15bf59(%rip), %rdx    # 0x208fb8
leaq -0x138(%rbp), %r8
callq 0x5c110
movq -0x50(%rbp), %rdi
callq 0x5d270
jmp 0xad30a
movq -0x200(%rbp), %rdi
movq -0x50(%rbp), %rax
movq %rax, -0x2c8(%rbp)
movq (%rdi), %rax
callq *0x130(%rax)
movq -0x2c8(%rbp), %rdi
movq %rax, -0x148(%rbp)
movq %rdx, -0x140(%rbp)
leaq -0x148(%rbp), %rsi
callq 0x591b0
movq -0x50(%rbp), %rax
movq %rax, -0x2c0(%rbp)
movl -0x60(%rbp), %esi
leaq -0x160(%rbp), %rdi
movl $0x2, %edx
callq 0x59260
leaq -0x158(%rbp), %rdi
leaq -0x58(%rbp), %rsi
leaq -0x160(%rbp), %rdx
callq 0x59ff0
movq 0x15beae(%rip), %rax    # 0x208fa0
movl (%rax), %eax
movl %eax, -0x2b4(%rbp)
leaq -0x168(%rbp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x59260
movq -0x2c0(%rbp), %rdi
movl -0x2b4(%rbp), %ecx
leaq -0x158(%rbp), %rsi
movq 0x15b523(%rip), %rdx    # 0x208648
leaq -0x168(%rbp), %r8
callq 0x5c110
movq -0x50(%rbp), %rax
movq %rax, -0x2b0(%rbp)
movl -0x5c(%rbp), %edx
leaq -0x180(%rbp), %rdi
movl $0x2, %esi
callq 0x59260
leaq -0x178(%rbp), %rdi
leaq -0x58(%rbp), %rsi
leaq -0x180(%rbp), %rdx
callq 0x59ff0
movq 0x15be32(%rip), %rax    # 0x208fa0
movl (%rax), %eax
movl %eax, -0x2a4(%rbp)
leaq -0x188(%rbp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x59260
movq -0x2b0(%rbp), %rdi
movl -0x2a4(%rbp), %ecx
leaq -0x178(%rbp), %rsi
movq 0x15b4a7(%rip), %rdx    # 0x208648
leaq -0x188(%rbp), %r8
callq 0x5c110
movq -0x50(%rbp), %rax
movq %rax, -0x2a0(%rbp)
movl -0x60(%rbp), %esi
subl $0x2, %esi
leaq -0x1a8(%rbp), %rdi
xorl %edx, %edx
callq 0x5c2c0
leaq -0x58(%rbp), %rdi
leaq -0x1a8(%rbp), %rsi
callq 0x5ca20
movq %rax, -0x1a0(%rbp)
movl -0x5c(%rbp), %edx
leaq -0x1b0(%rbp), %rdi
movl $0x2, %esi
callq 0x59260
leaq -0x198(%rbp), %rdi
leaq -0x1a0(%rbp), %rsi
leaq -0x1b0(%rbp), %rdx
callq 0x59ff0
movq 0x15bd88(%rip), %rax    # 0x208fa0
movl (%rax), %eax
movl %eax, -0x294(%rbp)
leaq -0x1b8(%rbp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x59260
movq -0x2a0(%rbp), %rdi
movl -0x294(%rbp), %ecx
leaq -0x198(%rbp), %rsi
movq 0x15b3fd(%rip), %rdx    # 0x208648
leaq -0x1b8(%rbp), %r8
callq 0x5c110
movq -0x50(%rbp), %rax
movq %rax, -0x290(%rbp)
movl -0x5c(%rbp), %edx
subl $0x2, %edx
leaq -0x1d8(%rbp), %rdi
xorl %esi, %esi
callq 0x5c2c0
leaq -0x58(%rbp), %rdi
leaq -0x1d8(%rbp), %rsi
callq 0x5ca20
movq %rax, -0x1d0(%rbp)
movl -0x60(%rbp), %esi
leaq -0x1e0(%rbp), %rdi
movl $0x2, %edx
callq 0x59260
leaq -0x1c8(%rbp), %rdi
leaq -0x1d0(%rbp), %rsi
leaq -0x1e0(%rbp), %rdx
callq 0x59ff0
movq 0x15bcde(%rip), %rax    # 0x208fa0
movl (%rax), %eax
movl %eax, -0x284(%rbp)
leaq -0x1e8(%rbp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x59260
movq -0x290(%rbp), %rdi
movl -0x284(%rbp), %ecx
leaq -0x1c8(%rbp), %rsi
movq 0x15b353(%rip), %rdx    # 0x208648
leaq -0x1e8(%rbp), %r8
callq 0x5c110
movq -0x50(%rbp), %rdi
callq 0x5d270
leaq -0x1f8(%rbp), %rdi
movq %rdi, -0x2d8(%rbp)
callq 0x5ca80
movq -0x2d8(%rbp), %rdi
callq 0x59680
movl %eax, -0x2cc(%rbp)
jmp 0xad331
movl -0x2cc(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0x1f8(%rbp), %rdi
callq 0x5a410
jmp 0xad362
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x1f8(%rbp), %rdi
callq 0x5a410
jmp 0xad36e
movl -0x4(%rbp), %eax
addq $0x2e0, %rsp            # imm = 0x2E0
popq %rbp
retq
movq -0x30(%rbp), %rdi
callq 0x5b6b0
nopw (%rax,%rax)