// File: /workspace/github_c_makefile_star2_O1/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 0xa7c5b(%rip), %rsi     # 0x112883
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 0x89ac9(%rip), %xmm4    # 0xf4768
mulsd %xmm3, %xmm4
xorpd %xmm2, %xmm2
movapd %xmm4, %xmm5
cmpltsd %xmm2, %xmm5
movsd 0x896d8(%rip), %xmm0    # 0xf4390
movapd %xmm5, %xmm6
andpd %xmm0, %xmm6
movsd 0x896d0(%rip), %xmm1    # 0xf4398
andnpd %xmm1, %xmm5
orpd %xmm6, %xmm5
addsd %xmm4, %xmm5
cvttsd2si %xmm5, %rcx
mulsd 0x89bef(%rip), %xmm3    # 0xf48d0
movq %r12, %rsi
movapd %xmm3, %xmm4
cmpltsd %xmm2, %xmm4
movapd %xmm4, %xmm5
andpd %xmm0, %xmm5
andnpd %xmm1, %xmm4
orpd %xmm5, %xmm4
addsd %xmm3, %xmm4
cvttsd2si %xmm4, %rdx
xorps %xmm3, %xmm3
cvtsi2sd %ecx, %xmm3
shrq $0x20, %rsi
movsd 0x897d7(%rip), %xmm7    # 0xf44f0
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, %rcx
xorps %xmm3, %xmm3
cvtsi2sd %edx, %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, %rdx
addl %r12d, %ecx
cwtl
xorps %xmm3, %xmm3
cvtsi2sd %eax, %xmm3
movsd 0x89b59(%rip), %xmm4    # 0xf48d8
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 %esi, %edx
mulsd 0x89b1d(%rip), %xmm3    # 0xf48d0
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 %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, %rdi
xorps %xmm3, %xmm3
cvtsi2sd %esi, %xmm3
divsd %xmm7, %xmm3
movapd %xmm3, %xmm4
cmpltsd %xmm2, %xmm4
andpd %xmm4, %xmm0
andnpd %xmm1, %xmm4
orpd %xmm0, %xmm4
addsd %xmm3, %xmm4
cvttsd2si %xmm4, %rsi
shrq $0x20, %rdi
subl %eax, %r15d
movl %ecx, (%rsp)
movl %edx, 0x4(%rsp)
addl %ecx, %r15d
movl %r15d, 0x8(%rsp)
addl %edx, %edi
subl %esi, %edi
movl %edi, 0xc(%rsp)
movl $0x5b8, %edi            # imm = 0x5B8
addq 0x608(%r14), %rdi
xorl %esi, %esi
callq 0x563f0
testb %al, %al
je 0x6aefe
cmpl $0x1, 0x58(%rsp)
jne 0x6aeab
movq %rbx, %rdi
callq 0x58930
cwtl
shll $0x3, %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
divsd 0x89667(%rip), %xmm0    # 0xf44f0
xorpd %xmm1, %xmm1
xorl %eax, %eax
ucomisd %xmm0, %xmm1
seta %al
leaq 0x89a23(%rip), %rcx     # 0xf48c0
addsd (%rcx,%rax,8), %xmm0
cvttsd2si %xmm0, %rax
addl %eax, 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 0x89617(%rip), %xmm0    # 0xf44f0
xorpd %xmm1, %xmm1
xorl %eax, %eax
ucomisd %xmm0, %xmm1
seta %al
leaq 0x899d3(%rip), %rcx     # 0xf48c0
addsd (%rcx,%rax,8), %xmm0
cvttsd2si %xmm0, %rax
addl %eax, %r14d
addl %r14d, (%rsp)
movq 0x101f93(%rip), %rax    # 0x16ce98
movswl (%rax), %edx
movq 0x101871(%rip), %rax    # 0x16c780
movswl (%rax), %ecx
leaq 0xa8(%rsp), %r9
movq $0x0, 0x8(%r9)
movl $0x0, (%r9)
movq 0x101e88(%rip), %rsi    # 0x16cdb8
leaq 0x10(%rsp), %rdi
movl %ecx, %r8d
callq 0x57270
movq 0x101aa4(%rip), %rsi    # 0x16c9e8
leaq 0x10(%rsp), %rdi
callq 0x58650
cmpl $0x0, 0x58(%rsp)
jle 0x6afd0
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
leaq 0x50(%rsp), %r14
movq %rsp, %r15
leaq 0x10(%rsp), %r12
leaq 0x89952(%rip), %r13     # 0xf48c0
incl %ebp
movq %r14, %rdi
movl %ebp, %esi
callq 0x64224
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 0x89547(%rip), %xmm0    # 0xf44f0
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 0x6af6e
leaq 0x10(%rsp), %rdi
callq 0x56720
leaq 0x50(%rsp), %rdi
callq 0x63e08
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6b01c
jmp 0x6b015
jmp 0x6b015
jmp 0x6b015
jmp 0x6b015
jmp 0x6b015
jmp 0x6b015
jmp 0x6b015
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x59200
jmp 0x6b033
movq %rax, %rbx
jmp 0x6b029
jmp 0x6b01c
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x56720
leaq 0x50(%rsp), %rdi
callq 0x63e08
movq %rbx, %rdi
callq 0x57090
nop