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

	switch (message)
	{
		case SP_PAINT:
			{
				Surface	*surface  = GetDrawSurface();
				Rect	 frame	  = Rect(GetRealPosition(), GetRealSize());

				surface->Frame(frame, FRAME_DOWN);
				surface->Frame(frame + Point(1, 1) - Size(2, 2), FRAME_UP);

				Rect	 textRect = Rect(GetRealPosition() + Point(10 * surface->GetSurfaceDPI() / 96.0, -Math::Ceil(Float(scaledTextSize.cy) / 2)), Size(scaledTextSize.cx, Math::Round(scaledTextSize.cy * 1.2)) + Size(3, 0) * surface->GetSurfaceDPI() / 96.0);

				surface->Box(textRect, Setup::BackgroundColor, Rect::Filled);

				Font	 nFont	  = font;

				if (!IsActive()) nFont.SetColor(Setup::InactiveTextColor);

				surface->SetText(text, textRect + Point(1, 0) * surface->GetSurfaceDPI() / 96.0, nFont);
			}

			break;
	}

	return Layer::Paint(message);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x250, %rsp            # imm = 0x250
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x168(%rbp)
movq (%rdi), %rax
callq *0x88(%rax)
testb $0x1, %al
jne 0x98814
leaq -0x28(%rbp), %rdi
movq %rdi, -0x178(%rbp)
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x5a9c0
movq -0x178(%rbp), %rdi
callq 0x59680
movl %eax, -0x16c(%rbp)
jmp 0x987e3
movl -0x16c(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x5b5b0
jmp 0x98d06
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x5b5b0
jmp 0x98d12
movq -0x168(%rbp), %rdi
movq (%rdi), %rax
callq *0x90(%rax)
testb $0x1, %al
jne 0x9887d
leaq -0x48(%rbp), %rdi
movq %rdi, -0x188(%rbp)
callq 0x5ca80
movq -0x188(%rbp), %rdi
callq 0x59680
movl %eax, -0x17c(%rbp)
jmp 0x9884c
movl -0x17c(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x5a410
jmp 0x98d06
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x5a410
jmp 0x98d12
movl -0x14(%rbp), %eax
testl %eax, %eax
jne 0x98cf4
jmp 0x9888a
movq -0x168(%rbp), %rdi
movq (%rdi), %rax
movq 0x40(%rax), %rax
callq *%rax
movq -0x168(%rbp), %rdi
movq %rax, -0x50(%rbp)
movq (%rdi), %rax
movq 0x48(%rax), %rax
callq *%rax
movq -0x168(%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, -0x208(%rbp)
leaq -0x68(%rbp), %rsi
leaq -0x70(%rbp), %rdx
callq 0x59ff0
movq -0x208(%rbp), %rsi
movq -0x50(%rbp), %rdi
movl $0x1, %edx
movl %edx, -0x20c(%rbp)
callq 0x5c050
movl -0x20c(%rbp), %edx
movq -0x50(%rbp), %rax
movq %rax, -0x1f0(%rbp)
leaq -0x98(%rbp), %rdi
movq %rdi, -0x200(%rbp)
movl %edx, %esi
callq 0x5c2c0
movq -0x208(%rbp), %rdi
movq -0x200(%rbp), %rsi
callq 0x5be80
movq %rax, -0x90(%rbp)
movq %rdx, -0x88(%rbp)
leaq -0xa0(%rbp), %rdi
movq %rdi, -0x1f8(%rbp)
movl $0x2, %edx
movl %edx, %esi
callq 0x59260
movq -0x1f8(%rbp), %rsi
leaq -0x90(%rbp), %rdi
callq 0x5c040
movq -0x1f0(%rbp), %rdi
movq %rax, -0x80(%rbp)
movq %rdx, -0x78(%rbp)
leaq -0x80(%rbp), %rsi
xorl %edx, %edx
movl %edx, -0x1b4(%rbp)
callq 0x5c050
movq -0x168(%rbp), %rdi
movq (%rdi), %rax
movq 0x48(%rax), %rax
callq *%rax
movq %rax, -0xc0(%rbp)
movq -0x50(%rbp), %rdi
callq 0x5d470
movw %ax, %cx
movq -0x168(%rbp), %rax
movswl %cx, %edx
addl %edx, %edx
movl %edx, %ecx
leal (%rcx,%rcx,4), %ecx
cvtsi2sd %ecx, %xmm0
movsd 0xeeaf3(%rip), %xmm1    # 0x1874c0
movsd %xmm1, -0x1c8(%rbp)
divsd %xmm1, %xmm0
cvttsd2si %xmm0, %ecx
movl %ecx, -0x1e4(%rbp)
cvtsi2sdl 0x18c(%rax), %xmm0
movsd 0xee995(%rip), %xmm1    # 0x187388
mulsd %xmm1, %xmm0
callq 0x5b240
movl -0x1e4(%rbp), %esi
movl %eax, %edx
negl %edx
leaq -0xc8(%rbp), %rdi
movq %rdi, -0x1e0(%rbp)
callq 0x5c2c0
movq -0x1e0(%rbp), %rsi
leaq -0xc0(%rbp), %rdi
callq 0x5ca20
movq %rax, %rcx
movq -0x168(%rbp), %rax
movq %rcx, -0xb8(%rbp)
movl 0x188(%rax), %ecx
movl %ecx, -0x1d4(%rbp)
cvtsi2sdl 0x18c(%rax), %xmm0
movsd 0xf1087(%rip), %xmm1    # 0x189ae0
mulsd %xmm1, %xmm0
callq 0x5a970
movl -0x1d4(%rbp), %esi
movl %eax, %edx
leaq -0xd8(%rbp), %rdi
movq %rdi, -0x1c0(%rbp)
callq 0x59260
movl -0x1b4(%rbp), %edx
leaq -0xf0(%rbp), %rdi
movq %rdi, -0x1d0(%rbp)
movl $0x3, %esi
callq 0x59260
movq -0x50(%rbp), %rdi
callq 0x5d470
movq -0x1d0(%rbp), %rdi
cwtl
cvtsi2sd %eax, %xmm0
callq 0x5a7b0
movsd -0x1c8(%rbp), %xmm0
movq %rax, -0xe8(%rbp)
leaq -0xe8(%rbp), %rdi
callq 0x5c6b0
movq -0x1c0(%rbp), %rdi
movq %rax, -0xe0(%rbp)
leaq -0xe0(%rbp), %rsi
callq 0x590b0
movq %rax, -0xd0(%rbp)
leaq -0xb0(%rbp), %rdi
movq %rdi, -0x1a8(%rbp)
leaq -0xb8(%rbp), %rsi
leaq -0xd0(%rbp), %rdx
callq 0x59ff0
movl -0x1b4(%rbp), %edx
movq -0x50(%rbp), %rax
movq %rax, -0x1b0(%rbp)
movq 0x170476(%rip), %rax    # 0x208fa0
movl (%rax), %eax
movl %eax, -0x19c(%rbp)
leaq -0xf8(%rbp), %rdi
movq %rdi, -0x198(%rbp)
movl %edx, %esi
callq 0x59260
movq -0x1b0(%rbp), %rdi
movq -0x1a8(%rbp), %rsi
movl -0x19c(%rbp), %ecx
movq -0x198(%rbp), %r8
movq 0x16f93f(%rip), %rdx    # 0x2084a8
callq 0x5c110
movq -0x168(%rbp), %rsi
addq $0x140, %rsi            # imm = 0x140
leaq -0x138(%rbp), %rdi
callq 0x59da0
movq -0x168(%rbp), %rdi
movq (%rdi), %rax
movq 0x98(%rax), %rax
callq *%rax
movb %al, -0x189(%rbp)
jmp 0x98ba3
movb -0x189(%rbp), %al
testb $0x1, %al
jne 0x98be3
jmp 0x98baf
movq 0x16fd7a(%rip), %rsi    # 0x208930
leaq -0x138(%rbp), %rdi
callq 0x5d110
jmp 0x98bc4
jmp 0x98be3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x138(%rbp), %rdi
callq 0x5abf0
jmp 0x98d12
movq -0x168(%rbp), %rax
movq -0x50(%rbp), %rcx
movq %rcx, -0x220(%rbp)
addq $0xf0, %rax
movq %rax, -0x218(%rbp)
leaq -0x160(%rbp), %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0x5c2c0
jmp 0x98c17
movq -0x50(%rbp), %rdi
callq 0x5d470
movw %ax, -0x222(%rbp)
jmp 0x98c29
movw -0x222(%rbp), %ax
cwtl
cvtsi2sd %eax, %xmm0
leaq -0x160(%rbp), %rdi
callq 0x5a300
movq %rax, -0x230(%rbp)
jmp 0x98c4a
movq -0x230(%rbp), %rax
movq %rax, -0x158(%rbp)
leaq -0x158(%rbp), %rdi
movsd 0xee859(%rip), %xmm0    # 0x1874c0
callq 0x5cd70
movq %rax, -0x238(%rbp)
jmp 0x98c75
movq -0x238(%rbp), %rax
movq %rax, -0x150(%rbp)
leaq -0xb0(%rbp), %rdi
leaq -0x150(%rbp), %rsi
callq 0x5be80
movq %rdx, -0x248(%rbp)
movq %rax, -0x240(%rbp)
jmp 0x98ca6
movq -0x218(%rbp), %rsi
movq -0x220(%rbp), %rdi
movq -0x248(%rbp), %rax
movq -0x240(%rbp), %rcx
movq %rcx, -0x148(%rbp)
movq %rax, -0x140(%rbp)
leaq -0x148(%rbp), %rdx
leaq -0x138(%rbp), %rcx
xorl %r8d, %r8d
callq 0x5c3f0
jmp 0x98ce8
leaq -0x138(%rbp), %rdi
callq 0x5abf0
movq -0x168(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x5a930
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x250, %rsp            # imm = 0x250
popq %rbp
retq
movq -0x30(%rbp), %rdi
callq 0x5b6b0
nopl (%rax,%rax)