// File: /workspace/github_c_makefile_star2_O3/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 $0xb8, %rsp
movq %rdi, %r14
leaq 0xf0(%rdi), %rbx
leaq 0xa6e8f(%rip), %rsi     # 0x111a27
leaq 0x10(%rsp), %r15
movq %r15, %rdi
callq 0x579f0
leaq 0x50(%rsp), %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x57f10
leaq 0x10(%rsp), %rdi
callq 0x59200
movq 0x5f0(%r14), %rdi
movq 0x620(%rdi), %r15
movq (%rdi), %rax
callq *0x40(%rax)
movq %rax, %rbx
movq (%r15), %rax
movq %r15, %rdi
callq *0x48(%rax)
movq %rax, %r12
movq %rbx, %rdi
callq 0x58930
movl %eax, %ebp
movq (%r15), %rax
movq %r15, %rdi
callq *0x50(%rax)
movq %rax, %r15
movq %rbx, %rdi
callq 0x58930
movswl %bp, %ecx
cvtsi2sd %ecx, %xmm3
movsd 0x88bb9(%rip), %xmm4    # 0xf37c8
mulsd %xmm3, %xmm4
xorpd %xmm2, %xmm2
movapd %xmm4, %xmm5
cmpltsd %xmm2, %xmm5
movsd 0x88768(%rip), %xmm0    # 0xf3390
movapd %xmm5, %xmm6
andpd %xmm0, %xmm6
movsd 0x88760(%rip), %xmm1    # 0xf3398
andnpd %xmm1, %xmm5
orpd %xmm6, %xmm5
addsd %xmm4, %xmm5
cvttsd2si %xmm5, %rdx
mulsd 0x88cf7(%rip), %xmm3    # 0xf3948
movq %r12, %rcx
movapd %xmm3, %xmm4
cmpltsd %xmm2, %xmm4
movapd %xmm4, %xmm5
andpd %xmm0, %xmm5
andnpd %xmm1, %xmm4
orpd %xmm5, %xmm4
addsd %xmm3, %xmm4
cvttsd2si %xmm4, %rsi
xorps %xmm3, %xmm3
cvtsi2sd %edx, %xmm3
shrq $0x20, %rcx
movsd 0x88a2f(%rip), %xmm7    # 0xf36b8
divsd %xmm7, %xmm3
movapd %xmm3, %xmm4
cmpltsd %xmm2, %xmm4
movapd %xmm4, %xmm5
andpd %xmm0, %xmm5
andnpd %xmm1, %xmm4
orpd %xmm5, %xmm4
addsd %xmm3, %xmm4
cvttsd2si %xmm4, %r13
xorps %xmm3, %xmm3
cvtsi2sd %esi, %xmm3
divsd %xmm7, %xmm3
movapd %xmm3, %xmm4
cmpltsd %xmm2, %xmm4
movapd %xmm4, %xmm2
andpd %xmm0, %xmm2
andnpd %xmm1, %xmm4
orpd %xmm2, %xmm4
addsd %xmm3, %xmm4
cvttsd2si %xmm4, %rbp
addl %r12d, %r13d
cwtl
xorps %xmm3, %xmm3
cvtsi2sd %eax, %xmm3
movsd 0x88c61(%rip), %xmm4    # 0xf3950
mulsd %xmm3, %xmm4
xorpd %xmm2, %xmm2
movapd %xmm4, %xmm5
cmpltsd %xmm2, %xmm5
movapd %xmm5, %xmm6
andpd %xmm0, %xmm6
andnpd %xmm1, %xmm5
orpd %xmm6, %xmm5
addsd %xmm4, %xmm5
cvttsd2si %xmm5, %rax
addl %ecx, %ebp
mulsd 0x88c25(%rip), %xmm3    # 0xf3948
movapd %xmm3, %xmm4
cmpltsd %xmm2, %xmm4
movapd %xmm4, %xmm5
andpd %xmm0, %xmm5
andnpd %xmm1, %xmm4
orpd %xmm5, %xmm4
addsd %xmm3, %xmm4
cvttsd2si %xmm4, %rcx
xorps %xmm3, %xmm3
cvtsi2sd %eax, %xmm3
divsd %xmm7, %xmm3
movapd %xmm3, %xmm4
cmpltsd %xmm2, %xmm4
movapd %xmm4, %xmm5
andpd %xmm0, %xmm5
andnpd %xmm1, %xmm4
orpd %xmm5, %xmm4
addsd %xmm3, %xmm4
cvttsd2si %xmm4, %rax
movq %r15, %rdx
xorps %xmm3, %xmm3
cvtsi2sd %ecx, %xmm3
divsd %xmm7, %xmm3
movapd %xmm3, %xmm4
cmpltsd %xmm2, %xmm4
andpd %xmm4, %xmm0
andnpd %xmm1, %xmm4
orpd %xmm0, %xmm4
addsd %xmm3, %xmm4
cvttsd2si %xmm4, %rcx
shrq $0x20, %rdx
subl %eax, %r15d
movl %r13d, (%rsp)
movl %ebp, 0x4(%rsp)
addl %r13d, %r15d
movl %r15d, 0x8(%rsp)
addl %ebp, %edx
subl %ecx, %edx
movl %edx, 0xc(%rsp)
movl $0x5b8, %edi            # imm = 0x5B8
addq 0x608(%r14), %rdi
xorl %esi, %esi
callq 0x563f0
testb %al, %al
je 0x6ae74
cmpl $0x1, 0x58(%rsp)
jne 0x6ae1e
movq %rbx, %rdi
callq 0x58930
cwtl
shll $0x3, %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
divsd 0x888be(%rip), %xmm0    # 0xf36b8
xorpd %xmm1, %xmm1
xorl %eax, %eax
ucomisd %xmm0, %xmm1
seta %al
leaq 0x889e2(%rip), %rcx     # 0xf37f0
addsd (%rcx,%rax,8), %xmm0
cvttsd2si %xmm0, %rax
addl %eax, %ebp
movl %ebp, 0x4(%rsp)
movq 0x608(%r14), %rdi
movq (%rdi), %rax
callq *0x50(%rax)
movq %rax, %r14
movq %rbx, %rdi
callq 0x58930
cwtl
shll $0x2, %eax
leal (%rax,%rax,4), %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
divsd 0x8886c(%rip), %xmm0    # 0xf36b8
xorpd %xmm1, %xmm1
xorl %eax, %eax
ucomisd %xmm0, %xmm1
seta %al
leaq 0x88990(%rip), %rcx     # 0xf37f0
addsd (%rcx,%rax,8), %xmm0
cvttsd2si %xmm0, %rax
addl %eax, %r14d
addl %r14d, %r13d
movl %r13d, (%rsp)
movq 0x10101d(%rip), %rax    # 0x16be98
movswl (%rax), %edx
movq 0x1008fb(%rip), %rax    # 0x16b780
movswl (%rax), %ecx
leaq 0xa8(%rsp), %r9
movq $0x0, 0x8(%r9)
movl $0x0, (%r9)
movq 0x100f12(%rip), %rsi    # 0x16bdb8
leaq 0x10(%rsp), %rdi
movl %ecx, %r8d
callq 0x57270
movq 0x100b2e(%rip), %rsi    # 0x16b9e8
leaq 0x10(%rsp), %rdi
callq 0x58650
cmpl $0x0, 0x58(%rsp)
jle 0x6af46
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
leaq 0x50(%rsp), %r14
movq %rsp, %r15
leaq 0x10(%rsp), %r12
leaq 0x8890c(%rip), %r13     # 0xf37f0
incl %ebp
movq %r14, %rdi
movl %ebp, %esi
callq 0x64250
movq %rbx, %rdi
movq %rax, %rsi
movq %r15, %rdx
movq %r12, %rcx
xorl %r8d, %r8d
callq 0x57b80
movq %rbx, %rdi
callq 0x58930
cwtl
shll $0x4, %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
divsd 0x88799(%rip), %xmm0    # 0xf36b8
xorl %eax, %eax
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
seta %al
addsd (%r13,%rax,8), %xmm0
cvttsd2si %xmm0, %rax
addl %eax, 0x4(%rsp)
movl 0x58(%rsp), %eax
decl %eax
cmpl %eax, %ebp
jl 0x6aee4
leaq 0x10(%rsp), %rdi
callq 0x56720
leaq 0x50(%rsp), %rdi
callq 0x63e3c
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6af90
jmp 0x6af8b
jmp 0x6af8b
jmp 0x6af8b
jmp 0x6af8b
jmp 0x6af8b
jmp 0x6af8b
jmp 0x6af8b
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x59200
jmp 0x6afa7
movq %rax, %rbx
jmp 0x6af9d
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x56720
leaq 0x50(%rsp), %rdi
callq 0x63e3c
movq %rbx, %rdi
callq 0x57090
nop