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

	switch (message)
	{
		case SP_PAINT:
		{
			Surface	*surface	 = GetDrawSurface();
			Rect	 frame		 = Rect(GetRealPosition(), GetRealSize());
			Color	 backgroundColor = IsActive() ? Setup::ClientColor : Setup::BackgroundColor;

			surface->StartPaint(GetVisibleArea());

			cursor->SetBackgroundColor(backgroundColor);

			surface->Box(frame, backgroundColor, Rect::Filled);
			surface->Frame(frame, FRAME_DOWN);

			Widget::Paint(message);

			surface->EndPaint();

			return Success();
		}
	}

	return Widget::Paint(message);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x120, %rsp            # imm = 0x120
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0xb0(%rbp)
movq (%rdi), %rax
callq *0x88(%rax)
testb $0x1, %al
jne 0x96c74
leaq -0x28(%rbp), %rdi
movq %rdi, -0xc0(%rbp)
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x5a9c0
movq -0xc0(%rbp), %rdi
callq 0x59680
movl %eax, -0xb4(%rbp)
jmp 0x96c43
movl -0xb4(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x5b5b0
jmp 0x96ece
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x5b5b0
jmp 0x96eda
movq -0xb0(%rbp), %rdi
movq (%rdi), %rax
callq *0x90(%rax)
testb $0x1, %al
jne 0x96cdd
leaq -0x48(%rbp), %rdi
movq %rdi, -0xd0(%rbp)
callq 0x5ca80
movq -0xd0(%rbp), %rdi
callq 0x59680
movl %eax, -0xc4(%rbp)
jmp 0x96cac
movl -0xc4(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x5a410
jmp 0x96ece
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x5a410
jmp 0x96eda
movl -0x14(%rbp), %eax
testl %eax, %eax
jne 0x96ebc
jmp 0x96cea
movq -0xb0(%rbp), %rdi
movq (%rdi), %rax
callq *0x40(%rax)
movq -0xb0(%rbp), %rdi
movq %rax, -0x50(%rbp)
movq (%rdi), %rax
callq *0x48(%rax)
movq -0xb0(%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 -0xb0(%rbp), %rdi
movq (%rdi), %rax
callq *0x98(%rax)
testb $0x1, %al
jne 0x96d44
jmp 0x96d54
movq 0x1718fd(%rip), %rax    # 0x208648
movq %rax, -0xd8(%rbp)
jmp 0x96d64
movq 0x17174d(%rip), %rax    # 0x2084a8
movq %rax, -0xd8(%rbp)
jmp 0x96d64
movq -0xd8(%rbp), %rsi
leaq -0x80(%rbp), %rdi
movq %rdi, -0x108(%rbp)
callq 0x5c720
movq -0xb0(%rbp), %rdi
movq -0x50(%rbp), %rax
movq %rax, -0x118(%rbp)
movq (%rdi), %rax
movq 0x130(%rax), %rax
callq *%rax
movq -0x118(%rbp), %rdi
movq %rax, -0x90(%rbp)
movq %rdx, -0x88(%rbp)
leaq -0x90(%rbp), %rsi
callq 0x591b0
movq -0x108(%rbp), %rsi
movq -0xb0(%rbp), %rax
movq 0x5b8(%rax), %rdi
movq (%rdi), %rax
movq 0x138(%rax), %rax
callq *%rax
movq -0x50(%rbp), %rax
movq %rax, -0x110(%rbp)
movq 0x1721b3(%rip), %rax    # 0x208fa0
movl (%rax), %eax
movl %eax, -0xfc(%rbp)
leaq -0x98(%rbp), %rdi
movq %rdi, -0xf8(%rbp)
xorl %edx, %edx
movl %edx, %esi
callq 0x59260
movq -0x110(%rbp), %rdi
movq -0x108(%rbp), %rdx
movl -0xfc(%rbp), %ecx
movq -0xf8(%rbp), %r8
leaq -0x60(%rbp), %rsi
movq %rsi, -0xf0(%rbp)
callq 0x5c110
movq -0xf0(%rbp), %rsi
movq -0x50(%rbp), %rdi
movl $0x1, %edx
callq 0x5c050
movq -0xb0(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x5acb0
movq -0x50(%rbp), %rdi
callq 0x5d270
leaq -0xa8(%rbp), %rdi
movq %rdi, -0xe8(%rbp)
callq 0x5ca80
movq -0xe8(%rbp), %rdi
callq 0x59680
movl %eax, -0xdc(%rbp)
jmp 0x96e8b
movl -0xdc(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x5a410
jmp 0x96ece
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x5a410
jmp 0x96eda
movq -0xb0(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x5acb0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x120, %rsp            # imm = 0x120
popq %rbp
retq
movq -0x30(%rbp), %rdi
callq 0x5b6b0
nopw %cs:(%rax,%rax)