// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/gui/dialogs/messagebox.cpp
// Function: smooth::GUI::Dialogs::MessageDlg::MessagePaintProc()
S::Void S::GUI::Dialogs::MessageDlg::MessagePaintProc()
{
	const Array<String>	&lines = text.Explode("\n");

	/* Get text bounds.
	 */
	Layer	*mainLayer = msgbox->GetMainLayer();
	Surface	*surface   = msgbox->GetDrawSurface();

	Rect	 textRect  = Rect(mainLayer->GetRealPosition() + Point(14, 19) * surface->GetSurfaceDPI() / 96.0, mainLayer->GetRealSize() - Size(28, 19) * surface->GetSurfaceDPI() / 96.0);

	if (icon->GetBitmap() != NIL)
	{
		if (lines.Length() == 1) textRect.top += Math::Round(8 * surface->GetSurfaceDPI() / 96.0);

		textRect.left += icon->GetRealSize().cx + Math::Round(20 * surface->GetSurfaceDPI() / 96.0);
	}

	/* Draw message text.
	 */
	Font	 font;

	font.SetColor(Setup::TextColor);

	foreach (const String &line, lines)
	{
		surface->SetText(line, textRect, font);

		textRect.top += Math::Round(16 * surface->GetSurfaceDPI() / 96.0);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rdi, %r14
leaq 0xf0(%rdi), %rbx
leaq 0x96771(%rip), %rsi     # 0x101927
leaq 0x28(%rsp), %r15
movq %r15, %rdi
callq 0x58c40
leaq 0x70(%rsp), %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x591a0
leaq 0x28(%rsp), %rdi
callq 0x5a588
movq 0x5f0(%r14), %rdi
movq 0x620(%rdi), %r12
movq (%rdi), %rax
callq *0x40(%rax)
movq %rax, %rbx
movq (%r12), %rax
movq %r12, %rdi
callq *0x48(%rax)
movq %rax, %r15
movabsq $0x130000000e, %rax     # imm = 0x130000000E
movq %rax, 0x18(%rsp)
movq %rbx, %rdi
callq 0x59c60
cwtl
cvtsi2sd %eax, %xmm0
leaq 0x18(%rsp), %rdi
callq 0x570c0
leaq 0x28(%rsp), %rdi
movq %rax, (%rdi)
movsd 0x782d9(%rip), %xmm0    # 0xe3510
callq 0x59600
movq %rax, %rbp
movq (%r12), %rax
movq %r12, %rdi
callq *0x50(%rax)
movq %rax, %r12
movabsq $0x130000001c, %rax     # imm = 0x130000001C
movq %rax, 0x10(%rsp)
movq %rbx, %rdi
callq 0x59c60
cwtl
cvtsi2sd %eax, %xmm0
leaq 0x10(%rsp), %rdi
callq 0x57480
leaq 0x68(%rsp), %rdi
movq %rax, (%rdi)
movsd 0x7828e(%rip), %xmm0    # 0xe3510
callq 0x59050
movq %r15, %rcx
shrq $0x20, %rcx
movq %rbp, %r13
shrq $0x20, %r13
addl %r15d, %ebp
addl %ecx, %r13d
movq %r12, %rcx
shrq $0x20, %rcx
movq %rax, %rdx
shrq $0x20, %rdx
subl %eax, %r12d
movl %ebp, (%rsp)
movl %r13d, 0x4(%rsp)
addl %ebp, %r12d
movl %r12d, 0x8(%rsp)
addl %r13d, %ecx
subl %edx, %ecx
movl %ecx, 0xc(%rsp)
movl $0x5b8, %edi            # imm = 0x5B8
addq 0x608(%r14), %rdi
xorl %esi, %esi
callq 0x574f0
testb %al, %al
je 0x6b374
cmpl $0x1, 0x78(%rsp)
jne 0x6b325
movq %rbx, %rdi
callq 0x59c60
cwtl
shll $0x3, %eax
cvtsi2sd %eax, %xmm0
divsd 0x78211(%rip), %xmm0    # 0xe3510
xorpd %xmm1, %xmm1
xorl %eax, %eax
ucomisd %xmm0, %xmm1
seta %al
leaq 0x7865d(%rip), %rcx     # 0xe3970
addsd (%rcx,%rax,8), %xmm0
cvttsd2si %xmm0, %rax
addl %eax, %r13d
movl %r13d, 0x4(%rsp)
movq 0x608(%r14), %rdi
movq (%rdi), %rax
callq *0x50(%rax)
movq %rax, %r14
movq %rbx, %rdi
callq 0x59c60
cwtl
imull $0x14, %eax, %eax
cvtsi2sd %eax, %xmm0
divsd 0x781c3(%rip), %xmm0    # 0xe3510
xorpd %xmm1, %xmm1
xorl %eax, %eax
ucomisd %xmm0, %xmm1
seta %al
leaq 0x7860f(%rip), %rcx     # 0xe3970
addsd (%rcx,%rax,8), %xmm0
cvttsd2si %xmm0, %rax
addl %eax, %r14d
addl %r14d, %ebp
movl %ebp, (%rsp)
movq 0xf6b1d(%rip), %rax     # 0x161e98
movswl (%rax), %edx
movq 0xf63fb(%rip), %rax     # 0x161780
leaq 0x18(%rsp), %r9
andq $0x0, 0x8(%r9)
movswl (%rax), %ecx
andl $0x0, (%r9)
movq 0xf6a1b(%rip), %rsi     # 0x161db8
leaq 0x28(%rsp), %rdi
movl %ecx, %r8d
callq 0x58460
movq 0xf6637(%rip), %rsi     # 0x1619e8
leaq 0x28(%rsp), %rdi
callq 0x59940
xorl %r14d, %r14d
leaq 0x70(%rsp), %r15
movq %rsp, %r12
leaq 0x28(%rsp), %r13
leaq 0x7859e(%rip), %rbp     # 0xe3970
leal -0x1(%r14), %eax
movl 0x78(%rsp), %ecx
decl %ecx
cmpl %ecx, %eax
jge 0x6b438
movq %r15, %rdi
movl %r14d, %esi
callq 0x64d9c
movq %rbx, %rdi
movq %rax, %rsi
movq %r12, %rdx
movq %r13, %rcx
xorl %r8d, %r8d
callq 0x58df0
movq %rbx, %rdi
callq 0x59c60
cwtl
shll $0x4, %eax
cvtsi2sd %eax, %xmm0
divsd 0x780f9(%rip), %xmm0    # 0xe3510
xorl %eax, %eax
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
seta %al
addsd (%rbp,%rax,8), %xmm0
cvttsd2si %xmm0, %rax
addl %eax, 0x4(%rsp)
incl %r14d
jmp 0x6b3d2
leaq 0x28(%rsp), %rdi
callq 0x57860
leaq 0x70(%rsp), %rdi
callq 0x64988
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6b482
jmp 0x6b47d
jmp 0x6b47d
jmp 0x6b47d
jmp 0x6b47d
jmp 0x6b47d
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x5a588
jmp 0x6b499
jmp 0x6b47d
jmp 0x6b47d
movq %rax, %rbx
jmp 0x6b48f
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x57860
leaq 0x70(%rsp), %rdi
callq 0x64988
movq %rbx, %rdi
callq 0x58260
nop