// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/classes/gui/widgets/basic/text.cpp
// Function: smooth::GUI::Text::SetText(smooth::String const&)
S::Int S::GUI::Text::SetText(const String &nText)
{
	if (text == nText) return Success();

	Surface	*surface    = GetDrawSurface();

	Bool	 registered = IsRegistered();
	Bool	 visible    = IsVisible();

	if (registered && visible)
	{
		Rect	 oldRect = Rect(GetRealPosition(), GetRealSize());
		Rect	 newRect = Rect(oldRect.GetPosition(), Size(font.GetScaledTextSizeX(nText), font.GetScaledTextSizeY(nText)));

		surface->StartPaint(Rect::EncloseRect(oldRect, newRect));
	}

	Widget::SetText(nText);

	SetSize(scaledTextSize * 96.0 / Surface().GetSurfaceDPI() + Size(0, 2));

	Paint(SP_PAINT);

	if (registered && visible) surface->EndPaint();

	return Success();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0xe0(%rbp)
addq $0xf0, %rdi
movq -0x18(%rbp), %rsi
callq 0x59ac0
testb $0x1, %al
jne 0xa7e74
jmp 0xa7ec9
leaq -0x28(%rbp), %rdi
movq %rdi, -0xf0(%rbp)
callq 0x5ca80
movq -0xf0(%rbp), %rdi
callq 0x59680
movl %eax, -0xe4(%rbp)
jmp 0xa7e98
movl -0xe4(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x5a410
jmp 0xa818c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x5a410
jmp 0xa8198
movq -0xe0(%rbp), %rdi
movq (%rdi), %rax
callq *0x40(%rax)
movq -0xe0(%rbp), %rdi
movq %rax, -0x40(%rbp)
movq (%rdi), %rax
callq *0x88(%rax)
movq -0xe0(%rbp), %rdi
andb $0x1, %al
movb %al, -0x41(%rbp)
movq (%rdi), %rax
callq *0x90(%rax)
andb $0x1, %al
movb %al, -0x42(%rbp)
testb $0x1, -0x41(%rbp)
je 0xa7fed
testb $0x1, -0x42(%rbp)
je 0xa7fed
movq -0xe0(%rbp), %rdi
movq (%rdi), %rax
callq *0x48(%rax)
movq -0xe0(%rbp), %rdi
movq %rax, -0x5c(%rbp)
movq (%rdi), %rax
callq *0x50(%rax)
movq %rax, -0x64(%rbp)
leaq -0x54(%rbp), %rdi
leaq -0x5c(%rbp), %rsi
leaq -0x64(%rbp), %rdx
callq 0x59ff0
leaq -0x54(%rbp), %rdi
callq 0x5d510
movq -0xe0(%rbp), %rdi
movq %rax, -0x7c(%rbp)
addq $0x140, %rdi            # imm = 0x140
movq -0x18(%rbp), %rsi
callq 0x5ac00
movq -0xe0(%rbp), %rdi
movl %eax, -0xfc(%rbp)
addq $0x140, %rdi            # imm = 0x140
movq -0x18(%rbp), %rsi
callq 0x5bde0
movl -0xfc(%rbp), %esi
movl %eax, %edx
leaq -0x84(%rbp), %rdi
callq 0x59260
leaq -0x74(%rbp), %rdi
leaq -0x7c(%rbp), %rsi
leaq -0x84(%rbp), %rdx
callq 0x59ff0
movq -0x40(%rbp), %rax
movq %rax, -0xf8(%rbp)
leaq -0x54(%rbp), %rdi
leaq -0x74(%rbp), %rsi
callq 0x5bb40
movq -0xf8(%rbp), %rdi
movq %rax, -0x94(%rbp)
movq %rdx, -0x8c(%rbp)
leaq -0x94(%rbp), %rsi
callq 0x591b0
movq -0xe0(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x5b380
movq -0xe0(%rbp), %rdi
addq $0x188, %rdi            # imm = 0x188
movsd 0xdf4ad(%rip), %xmm0    # 0x1874c0
callq 0x5a7b0
movq %rax, -0xac(%rbp)
leaq -0xc0(%rbp), %rdi
movq %rdi, -0x110(%rbp)
callq 0x59230
movq -0x110(%rbp), %rdx
xorl %eax, %eax
movl %eax, %esi
leaq -0xb8(%rbp), %rdi
movq %rdi, -0x108(%rbp)
callq 0x5b7d0
movq -0x108(%rbp), %rdi
callq 0x5d470
movw %ax, -0xfe(%rbp)
jmp 0xa8065
movw -0xfe(%rbp), %ax
cwtl
cvtsi2sd %eax, %xmm0
leaq -0xac(%rbp), %rdi
callq 0x5c6b0
movq %rax, -0x118(%rbp)
jmp 0xa8086
movq -0x118(%rbp), %rax
movq %rax, -0xa4(%rbp)
leaq -0xc8(%rbp), %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x59260
jmp 0xa80a9
leaq -0xa4(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
callq 0x590b0
movq %rax, -0x120(%rbp)
jmp 0xa80c5
movq -0xe0(%rbp), %rdi
movq -0x120(%rbp), %rax
movq %rax, -0x9c(%rbp)
leaq -0x9c(%rbp), %rsi
callq 0x5de18
jmp 0xa80e8
leaq -0xb8(%rbp), %rdi
callq 0x5c380
movq -0xe0(%rbp), %rdi
movq (%rdi), %rax
xorl %esi, %esi
callq *0x78(%rax)
testb $0x1, -0x41(%rbp)
je 0xa8134
testb $0x1, -0x42(%rbp)
je 0xa8134
movq -0x40(%rbp), %rdi
callq 0x5d270
jmp 0xa8134
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0xb8(%rbp), %rdi
callq 0x5c380
jmp 0xa8198
leaq -0xd8(%rbp), %rdi
movq %rdi, -0x130(%rbp)
callq 0x5ca80
movq -0x130(%rbp), %rdi
callq 0x59680
movl %eax, -0x124(%rbp)
jmp 0xa815b
movl -0x124(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0xd8(%rbp), %rdi
callq 0x5a410
jmp 0xa818c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0xd8(%rbp), %rdi
callq 0x5a410
jmp 0xa8198
movl -0x4(%rbp), %eax
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
movq -0x30(%rbp), %rdi
callq 0x5b6b0
nopw %cs:(%rax,%rax)