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

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

	switch (message)
	{
		case SP_MOUSEIN:
		case SP_MOUSEUP:
			surface->Frame(frame, FRAME_UP);

			break;
		case SP_MOUSEDOWN:
			surface->Frame(frame, FRAME_DOWN);

			break;
		case SP_MOUSEOUT:
			surface->Box(frame, GetBackgroundColor(), Rect::Outlined);

			break;
	}

	return Success();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x90(%rbp)
movq (%rdi), %rax
callq *0x88(%rax)
testb $0x1, %al
jne 0xa95e4
leaq -0x28(%rbp), %rdi
movq %rdi, -0xa0(%rbp)
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x5a9c0
movq -0xa0(%rbp), %rdi
callq 0x59680
movl %eax, -0x94(%rbp)
jmp 0xa95b3
movl -0x94(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x5b5b0
jmp 0xa97a5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x5b5b0
jmp 0xa97b1
movq -0x90(%rbp), %rdi
movq (%rdi), %rax
callq *0x90(%rax)
testb $0x1, %al
jne 0xa964d
leaq -0x48(%rbp), %rdi
movq %rdi, -0xb0(%rbp)
callq 0x5ca80
movq -0xb0(%rbp), %rdi
callq 0x59680
movl %eax, -0xa4(%rbp)
jmp 0xa961c
movl -0xa4(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x5a410
jmp 0xa97a5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x5a410
jmp 0xa97b1
movq -0x90(%rbp), %rdi
movq (%rdi), %rax
movq 0x40(%rax), %rax
callq *%rax
movq -0x90(%rbp), %rdi
movq %rax, -0x50(%rbp)
movq (%rdi), %rax
movq 0x48(%rax), %rax
callq *%rax
movq -0x90(%rbp), %rdi
movq %rax, -0x68(%rbp)
movq (%rdi), %rax
movq 0x50(%rax), %rax
callq *%rax
movq %rax, -0x70(%rbp)
leaq -0x60(%rbp), %rdi
leaq -0x68(%rbp), %rsi
leaq -0x70(%rbp), %rdx
callq 0x59ff0
movl -0x14(%rbp), %eax
addl $-0x2, %eax
movl %eax, %ecx
movq %rcx, -0xb8(%rbp)
subl $0x3, %eax
ja 0xa974d
movq -0xb8(%rbp), %rax
leaq 0xe0b48(%rip), %rcx     # 0x18a208
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x50(%rbp), %rdi
leaq -0x60(%rbp), %rsi
xorl %edx, %edx
callq 0x5c050
jmp 0xa974d
movq -0x50(%rbp), %rdi
leaq -0x60(%rbp), %rsi
movl $0x1, %edx
callq 0x5c050
jmp 0xa974d
movq -0x90(%rbp), %rdi
movq -0x50(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq (%rdi), %rax
callq *0x140(%rax)
movq %rax, -0xc8(%rbp)
movq 0x15f0e1(%rip), %rax    # 0x2087f8
movl (%rax), %eax
movl %eax, -0xbc(%rbp)
leaq -0x78(%rbp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x59260
movq -0xd0(%rbp), %rdi
movq -0xc8(%rbp), %rdx
movl -0xbc(%rbp), %ecx
leaq -0x60(%rbp), %rsi
leaq -0x78(%rbp), %r8
callq 0x5c110
leaq -0x88(%rbp), %rdi
movq %rdi, -0xe0(%rbp)
callq 0x5ca80
movq -0xe0(%rbp), %rdi
callq 0x59680
movl %eax, -0xd4(%rbp)
jmp 0xa9774
movl -0xd4(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x5a410
jmp 0xa97a5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x5a410
jmp 0xa97b1
movl -0x4(%rbp), %eax
addq $0xe0, %rsp
popq %rbp
retq
movq -0x30(%rbp), %rdi
callq 0x5b6b0
nopw (%rax,%rax)