// File: /workspace/github_c_makefile_star2_O3/enzo1982[P]smooth/classes/gui/widgets/multi/list/listentry.cpp
// Function: smooth::GUI::ListEntry::Paint(int)
S::Int S::GUI::ListEntry::Paint(Int message)
{
	if (!IsRegistered()) return Error();
	if (!IsVisible())    return Success();

	Surface	*surface = GetDrawSurface();
	Rect	 frame	 = Rect(GetRealPosition(), GetRealSize());

	Widget	*listBox = container;

	Font	 nFont	 = font;
	Bool	 gotTabs = False;

	switch (message)
	{
		case SP_PAINT:
		case SP_MOUSEIN:
		case SP_MOUSEOUT:
			if (mouseOver) nFont.SetColor(Setup::GradientTextColor);
			if (!IsActive()) nFont.SetColor(Setup::InactiveTextColor);

			gotTabs = text.Contains(tabDelimiter);

			surface->StartPaint(GetVisibleArea());

			/* Draw background and frame.
			 */
			if (mouseOver)	surface->Gradient(frame, Setup::GradientStartColor, Setup::GradientEndColor, OR_HORZ);
			else		surface->Box(frame, IsActive() ? Setup::ClientColor : Setup::BackgroundColor, Rect::Filled);

			if (selected)	surface->Box(frame, Setup::ClientTextColor, Rect::Dotted);

			/* Draw checkbox if necessary.
			 */
			if (container->GetFlags() & LF_MULTICHECKBOX)
			{
				Rect	 cbRect = Rect(GetRealPosition() + Point(2, 3) * surface->GetSurfaceDPI() / 96.0, Size(9, 9) * surface->GetSurfaceDPI() / 96.0);

				if (cbRect.top <= cbRect.bottom - 1)
				{
					surface->Box(cbRect, Setup::ClientColor, Rect::Filled);
					surface->Box(cbRect, Setup::InactiveTextColor, Rect::Outlined);

					if (marked && cbRect.top <= cbRect.bottom - 3)
					{
						Color	 lightColor = Setup::InactiveTextColor;
						Color	 darkColor = Setup::ClientTextColor;

						if (!IsActive()) darkColor = Setup::InactiveTextColor;

						Point	 p1 = Point(cbRect.left + 2 + (IsRightToLeft() ? 1 : 0), cbRect.top + 2);
						Point	 p2 = Point(cbRect.right - 2 + (IsRightToLeft() ? 1 : 0), cbRect.bottom - 2);

						surface->Line(p1 + Point(0, 0), p2 + Point(0, 0), darkColor);
						surface->Line(p1 + Point(1, 0), p2 + Point(0, -1), lightColor);
						surface->Line(p1 + Point(0, 1), p2 + Point(-1, 0), lightColor);

						p1 = Point(cbRect.right - 3 + (IsRightToLeft() ? 1 : 0), cbRect.top + 2);
						p2 = Point(cbRect.left + 1 + (IsRightToLeft() ? 1 : 0), cbRect.bottom - 2);

						surface->Line(p1 + Point(0, 0), p2 + Point(0, 0), darkColor);
						surface->Line(p1 + Point(0, 1), p2 + Point(1, 0), lightColor);
						surface->Line(p1 + Point(-1, 0), p2 + Point(0, -1), lightColor);
					}
				}
			}

			/* Get parent ListBox widget.
			 */
			while (listBox->GetObjectType() != ListBox::classID)
			{
				listBox = listBox->GetContainer();

				if (listBox == NIL) break;
			}

			/* Draw entry text.
			 */
			Int	 lineHeight = scaledTextSize.cy;

			if (text.Contains("\n")) lineHeight = nFont.GetScaledTextSizeY();

			if (listBox != NIL && ((ListBox *) listBox)->GetNOfTabs() > 0 && gotTabs)
			{
				for (Int i = 0; i < ((ListBox *) listBox)->GetNOfTabs(); i++)
				{
					Rect	 rect = Rect(GetRealPosition() + Point(0, Math::Ceil(Float(frame.GetHeight() - lineHeight) / 2) - 2) + Point(1, 1) * surface->GetSurfaceDPI() / 96.0 + Point(i > 0 && listBox != container ? listBox->GetRealPosition().x - container->GetRealPosition().x + 2 : 0, 0), GetRealSize() - Size(1, 1) * surface->GetSurfaceDPI() / 96.0 * 2 - Size(1, 0));

					rect.left += Math::Round(((ListBox *) listBox)->GetNthTabOffset(i) * surface->GetSurfaceDPI() / 96.0);
					rect.left += (i == 0 ? (container->GetFlags() & LF_MULTICHECKBOX ? Math::Round(12 * surface->GetSurfaceDPI() / 96.0) : 0) : 0);

					if	(((ListBox *) listBox)->GetNOfTabs() >= i + 2)		     rect.right  = rect.left + (Math::Round(((ListBox *) listBox)->GetNthTabOffset(i + 1) * surface->GetSurfaceDPI() / 96.0) - Math::Round(((ListBox *) listBox)->GetNthTabOffset(i) * surface->GetSurfaceDPI() / 96.0)) - (i == 0 ? (container->GetFlags() & LF_MULTICHECKBOX ? Math::Round(12 * surface->GetSurfaceDPI() / 96.0) : 0) : 0) - Math::Round(1 * surface->GetSurfaceDPI() / 96.0) * 2 - 1;
					else if (((ListBox *) listBox)->GetNthTabOrientation(i) == OR_RIGHT) rect.right += 1;

					String	 tabText = GetNthTabText(i);

					if (((ListBox *) listBox)->GetNthTabOrientation(i) == OR_RIGHT)
					{
						rect.left = Math::Max(rect.left, rect.right - nFont.GetScaledTextSizeX(tabText) - 1);
					}

					surface->SetText(tabText, rect, nFont);
				}
			}
			else
			{
				surface->SetText(text, frame + Point(0, Math::Ceil(Float(frame.GetHeight() - lineHeight) / 2) - 2) + Point(1, 1) * surface->GetSurfaceDPI() / 96.0 + Point(container->GetFlags() & LF_MULTICHECKBOX ? Math::Round(12 * surface->GetSurfaceDPI() / 96.0) : 0, 0) - Size(1, 1) * surface->GetSurfaceDPI() / 96.0 * 2 - Size(container->GetFlags() & LF_MULTICHECKBOX ? Math::Round(12 * surface->GetSurfaceDPI() / 96.0) : 0, 0), nFont);
			}

			Widget::Paint(SP_PAINT);

			surface->EndPaint();

			return Success();
	}

	return Widget::Paint(message);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movl %esi, %ebp
movq %rdi, %r12
movq (%rdi), %rax
callq *0x88(%rax)
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testb %al, %al
je 0x8795d
movq (%r12), %rax
movq %r12, %rdi
callq *0x90(%rax)
xorl %ebx, %ebx
testb %al, %al
je 0x8795d
movq (%r12), %rax
movq %r12, %rdi
callq *0x40(%rax)
movq %rax, (%rsp)
movq (%r12), %rax
movq %r12, %rdi
callq *0x48(%rax)
movq %rax, %rbx
movq %rax, %r14
shrq $0x20, %r14
movq (%r12), %rax
movq %r12, %rdi
callq *0x50(%rax)
leal (%rax,%rbx), %ecx
shrq $0x20, %rax
movl %ebx, 0x48(%rsp)
movl %r14d, 0x4c(%rsp)
movl %ecx, 0x50(%rsp)
addl %r14d, %eax
movl %eax, 0x54(%rsp)
movq 0x190(%r12), %r15
leaq 0x140(%r12), %rsi
leaq 0x98(%rsp), %rdi
callq 0x55b70
cmpl $0x3, %ebp
ja 0x86ca7
cmpl $0x1, %ebp
je 0x86ca7
cmpb $0x1, 0xd4(%r12)
movq (%rsp), %r14
jne 0x86c00
movq 0xe4f3d(%rip), %rsi     # 0x16bb30
leaq 0x98(%rsp), %rdi
callq 0x58650
movq (%r12), %rax
movq %r12, %rdi
callq *0x98(%rax)
testb %al, %al
jne 0x86c25
movq 0xe4d38(%rip), %rsi     # 0x16b950
leaq 0x98(%rsp), %rdi
callq 0x58650
leaq 0xf0(%r12), %r13
movq 0xe4f7c(%rip), %rsi     # 0x16bbb0
movq %r13, %rdi
callq 0x55180
movl %eax, %ebp
movq (%r12), %rax
movq %r12, %rdi
callq *0x130(%rax)
leaq 0x30(%rsp), %rsi
movq %rax, (%rsi)
movq %rdx, 0x8(%rsi)
movq %r14, %rdi
callq 0x55160
cmpb $0x1, 0xd4(%r12)
jne 0x86c8d
movq 0xe5347(%rip), %rdx     # 0x16bfb8
movq 0xe52a8(%rip), %rcx     # 0x16bf20
leaq 0x48(%rsp), %rsi
movq %r14, %rdi
movl $0x1, %r8d
callq 0x58750
jmp 0x86ce1
movq (%r12), %rax
movq %r12, %rdi
callq *0x98(%rax)
testb %al, %al
je 0x86cb8
movq 0xe49cb(%rip), %rdx     # 0x16b670
jmp 0x86cbf
movq %r12, %rdi
movl %ebp, %esi
callq 0x567d0
movl %eax, %ebx
jmp 0x87950
movq 0xe4811(%rip), %rdx     # 0x16b4d0
movq 0xe52e2(%rip), %rax     # 0x16bfa8
movl (%rax), %ecx
leaq 0x30(%rsp), %r8
movq $0x0, (%r8)
leaq 0x48(%rsp), %rsi
movq %r14, %rdi
callq 0x57930
cmpb $0x1, 0x5b9(%r12)
jne 0x86d15
movq 0xe519d(%rip), %rax     # 0x16be90
movl (%rax), %ecx
leaq 0x30(%rsp), %r8
movq $0x0, (%r8)
movq 0xe50e8(%rip), %rdx     # 0x16bdf0
leaq 0x48(%rsp), %rsi
movq %r14, %rdi
callq 0x57930
movq 0x190(%r12), %rax
testb $0x4, 0x30(%rax)
movq %r12, 0x8(%rsp)
je 0x87164
movq (%r12), %rax
movq %r12, %rdi
callq *0x48(%rax)
movq %rax, %rbx
movq %r14, %rdi
callq 0x58930
movq %r14, %rdi
movl %eax, %r14d
callq 0x58930
pxor %xmm1, %xmm1
pinsrw $0x1, %r14d, %xmm1
pinsrw $0x3, %eax, %xmm1
xorpd %xmm0, %xmm0
psrad $0x10, %xmm1
cvtdq2pd %xmm1, %xmm1
movapd %xmm1, %xmm2
addsd %xmm1, %xmm2
xorpd %xmm3, %xmm3
movapd %xmm2, %xmm4
cmpltsd %xmm3, %xmm4
movsd 0x6c60b(%rip), %xmm5    # 0xf3390
movapd %xmm4, %xmm6
andpd %xmm5, %xmm6
movsd 0x6c603(%rip), %xmm7    # 0xf3398
andnpd %xmm7, %xmm4
orpd %xmm6, %xmm4
addsd %xmm2, %xmm4
cvttsd2si %xmm4, %rax
xorps %xmm2, %xmm2
cvtsi2sd %eax, %xmm2
divsd 0x6c903(%rip), %xmm2    # 0xf36b8
movapd %xmm2, %xmm4
cmpltsd %xmm3, %xmm4
andpd %xmm4, %xmm5
andnpd %xmm7, %xmm4
orpd %xmm5, %xmm4
addsd %xmm2, %xmm4
cvttsd2si %xmm4, %rax
addl %ebx, %eax
shrq $0x20, %rbx
movd %eax, %xmm3
movd %ebx, %xmm2
mulpd 0x6fa97(%rip), %xmm1    # 0xf6880
punpckldq %xmm3, %xmm2    # xmm2 = xmm2[0],xmm3[0],xmm2[1],xmm3[1]
movapd %xmm1, %xmm3
cmpltpd %xmm0, %xmm3
movapd 0x6c732(%rip), %xmm4    # 0xf3530
movapd 0x6c73a(%rip), %xmm5    # 0xf3540
movapd %xmm5, %xmm6
andpd %xmm3, %xmm6
andnpd %xmm4, %xmm3
orpd %xmm6, %xmm3
addpd %xmm1, %xmm3
cvttsd2si %xmm3, %rcx
movq %rcx, %xmm1
unpckhpd %xmm3, %xmm3            # xmm3 = xmm3[1,1]
cvttsd2si %xmm3, %rcx
movq %rcx, %xmm3
punpckldq %xmm3, %xmm1    # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
cvtdq2pd %xmm1, %xmm1
divpd 0x6c6de(%rip), %xmm1    # 0xf3520
movapd %xmm1, %xmm3
cmpltpd %xmm0, %xmm3
andpd %xmm3, %xmm5
andnpd %xmm4, %xmm3
orpd %xmm5, %xmm3
addpd %xmm1, %xmm3
cvttsd2si %xmm3, %rcx
movq %rcx, %xmm0
unpckhpd %xmm3, %xmm3            # xmm3 = xmm3[1,1]
cvttsd2si %xmm3, %rcx
movq %rcx, %xmm1
punpcklqdq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0]
pshufd $0xe8, %xmm0, %xmm0     # xmm0 = xmm0[0,2,2,3]
paddd %xmm2, %xmm0
movl %eax, 0x30(%rsp)
movq %xmm0, 0x34(%rsp)
movd %xmm0, %eax
addl %ecx, %eax
movl %eax, 0x3c(%rsp)
testl %ecx, %ecx
movq (%rsp), %r14
jle 0x87164
movq 0xe5101(%rip), %rax     # 0x16bfa8
movl (%rax), %ecx
leaq 0x18(%rsp), %r8
movq $0x0, (%r8)
movq 0xe47b4(%rip), %rdx     # 0x16b670
leaq 0x30(%rsp), %rsi
movq %r14, %rdi
callq 0x57930
movq 0xe4950(%rip), %rax     # 0x16b820
movl (%rax), %ecx
leaq 0x18(%rsp), %r8
movq $0x0, (%r8)
movq 0xe4a6b(%rip), %rbx     # 0x16b950
leaq 0x30(%rsp), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x57930
cmpb $0x1, 0x5b8(%r12)
jne 0x87164
movl 0x3c(%rsp), %eax
addl $-0x3, %eax
cmpl %eax, 0x34(%rsp)
jg 0x87164
movq 0x8(%rbx), %rax
movq %rax, 0x20(%rsp)
movl (%rbx), %eax
movl %eax, 0x18(%rsp)
movq 0xe4ec5(%rip), %rax     # 0x16bdf0
movq 0x8(%rax), %rcx
movq %rcx, 0x88(%rsp)
movl (%rax), %eax
movl %eax, 0x80(%rsp)
movq (%r12), %rax
movq %r12, %rdi
callq *0x98(%rax)
movb %bpl, 0x60(%rsp)
testb %al, %al
jne 0x86f63
movdqu (%rbx), %xmm0
movdqa %xmm0, 0x80(%rsp)
movq %r13, 0x68(%rsp)
movl 0x30(%rsp), %r12d
movq 0x8(%rsp), %rbp
movq (%rbp), %rax
movq %rbp, %rdi
callq *0x160(%rax)
movl %eax, %ebx
movl 0x34(%rsp), %r14d
movl 0x38(%rsp), %r13d
movq (%rbp), %rax
movq %rbp, %rdi
callq *0x160(%rax)
movzbl %bl, %ecx
leal (%r12,%rcx), %ebx
addl $0x2, %ebx
leal 0x2(%r14), %ebp
movzbl %al, %eax
leal (%rax,%r13), %ecx
addl $-0x2, %ecx
movl 0x3c(%rsp), %r13d
leal -0x2(%r13), %r12d
shlq $0x20, %rbp
movl %ebx, %eax
movq %rax, 0x28(%rsp)
addq %rbp, %rax
leaq 0x78(%rsp), %rsi
movq %rax, (%rsi)
shlq $0x20, %r12
movq %rcx, 0x10(%rsp)
leaq (%r12,%rcx), %rax
leaq 0x70(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x80(%rsp), %rcx
movq (%rsp), %rdi
callq 0x58300
incl %ebx
orq %rbx, %rbp
leaq 0x78(%rsp), %rsi
movq %rbp, (%rsi)
addl $-0x3, %r13d
shlq $0x20, %r13
movq 0x10(%rsp), %rbx
orq %rbx, %r13
leaq 0x70(%rsp), %rdx
movq %r13, (%rdx)
leaq 0x18(%rsp), %rcx
movq (%rsp), %r13
movq %r13, %rdi
callq 0x58300
addl $0x3, %r14d
shlq $0x20, %r14
addq 0x28(%rsp), %r14
leaq 0x78(%rsp), %rsi
movq %r14, (%rsi)
decl %ebx
orq %rbx, %r12
leaq 0x70(%rsp), %rdx
movq %r12, (%rdx)
leaq 0x18(%rsp), %rcx
movq %r13, %rdi
callq 0x58300
movl 0x38(%rsp), %r12d
movq 0x8(%rsp), %r13
movq (%r13), %rax
movq %r13, %rdi
callq *0x160(%rax)
movl %eax, %ebx
movl 0x30(%rsp), %ebp
movl 0x34(%rsp), %r14d
movq (%r13), %rax
movq %r13, %rdi
callq *0x160(%rax)
movzbl %bl, %ecx
leal (%r12,%rcx), %edx
addl $-0x3, %edx
leal 0x2(%r14), %r13d
movzbl %al, %eax
leal (%rax,%rbp), %ecx
incl %ecx
movl 0x3c(%rsp), %ebx
leal -0x2(%rbx), %r12d
shlq $0x20, %r13
movq %rdx, 0x58(%rsp)
movl %edx, %eax
movq %rax, 0x28(%rsp)
addq %r13, %rax
leaq 0x78(%rsp), %rsi
movq %rax, (%rsi)
shlq $0x20, %r12
movq %rcx, 0x10(%rsp)
leaq (%r12,%rcx), %rax
leaq 0x70(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x80(%rsp), %rcx
movq (%rsp), %rbp
movq %rbp, %rdi
callq 0x58300
addl $0x3, %r14d
shlq $0x20, %r14
addq 0x28(%rsp), %r14
leaq 0x78(%rsp), %rsi
movq %r14, (%rsi)
movq 0x10(%rsp), %rax
incl %eax
orq %rax, %r12
leaq 0x70(%rsp), %rdx
movq %r12, (%rdx)
leaq 0x18(%rsp), %rcx
movq %rbp, %rdi
callq 0x58300
movq %rbp, %r14
movq 0x58(%rsp), %rax
decl %eax
orq %rax, %r13
leaq 0x78(%rsp), %rsi
movq %r13, (%rsi)
addl $-0x3, %ebx
shlq $0x20, %rbx
addq 0x10(%rsp), %rbx
leaq 0x70(%rsp), %rdx
movq %rbx, (%rdx)
leaq 0x18(%rsp), %rcx
movq %rbp, %rdi
callq 0x58300
movq 0x8(%rsp), %r12
movb 0x60(%rsp), %bpl
movq 0x68(%rsp), %r13
movq 0xe4dfd(%rip), %rax     # 0x16bf68
movswl (%rax), %ebx
leaq 0x20(%r15), %rdi
movl %ebx, %esi
callq 0x57520
testb %al, %al
jne 0x8718c
movq 0x190(%r15), %r15
testq %r15, %r15
jne 0x8716e
xorl %r15d, %r15d
movl 0x18c(%r12), %eax
movl %eax, 0x28(%rsp)
leaq 0x8a888(%rip), %rsi     # 0x111a27
leaq 0x30(%rsp), %rdi
callq 0x579f0
leaq 0x30(%rsp), %rsi
movq %r13, %rdi
callq 0x55180
movl %eax, %ebx
leaq 0x30(%rsp), %rdi
callq 0x59200
testb %bl, %bl
je 0x871de
movq 0xe4beb(%rip), %rsi     # 0x16bdb8
leaq 0x98(%rsp), %rdi
callq 0x57680
movl %eax, 0x28(%rsp)
testq %r15, %r15
je 0x876ba
movq 0x6d8(%r15), %rdi
callq 0x55530
testl %eax, %eax
setle %al
xorb $0x1, %bpl
orb %al, %bpl
jne 0x876ba
xorl %r12d, %r12d
movq 0x6d8(%r15), %rdi
callq 0x55530
cmpl %eax, %r12d
jge 0x8793a
movq 0x8(%rsp), %rdi
movq (%rdi), %rax
callq *0x48(%rax)
movq %rax, %r13
movl 0x54(%rsp), %eax
movl 0x4c(%rsp), %ecx
addl 0x28(%rsp), %ecx
subl %ecx, %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd 0x6c150(%rip), %xmm1    # 0xf3398
mulsd %xmm1, %xmm0
callq 0x56cb0
movq %rax, %rbp
movq %r14, %rdi
callq 0x58930
movsd 0x6c12c(%rip), %xmm0    # 0xf3390
testw %ax, %ax
js 0x87271
movsd 0x6c127(%rip), %xmm0    # 0xf3398
cwtl
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
addsd %xmm0, %xmm1
cvttsd2si %xmm1, %rax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
divsd 0x6c427(%rip), %xmm0    # 0xf36b8
testl %r12d, %r12d
movsd %xmm0, 0x10(%rsp)
je 0x872d6
movl $0x0, %ebx
movq 0x8(%rsp), %rax
cmpq 0x190(%rax), %r15
je 0x872d8
movq (%r15), %rax
movq %r15, %rdi
callq *0x48(%rax)
movq %rax, %rbx
movq 0x8(%rsp), %rax
movq 0x190(%rax), %rdi
movq (%rdi), %rax
callq *0x48(%rax)
subq %rax, %rbx
addq $0x2, %rbx
jmp 0x872d8
xorl %ebx, %ebx
movq 0x8(%rsp), %rdi
movq (%rdi), %rax
callq *0x50(%rax)
movq %rax, %r14
movq (%rsp), %rdi
callq 0x58930
movsd 0x6c099(%rip), %xmm0    # 0xf3390
testw %ax, %ax
js 0x87304
movsd 0x6c094(%rip), %xmm0    # 0xf3398
movq %r13, %rcx
shrq $0x20, %rcx
movsd 0x10(%rsp), %xmm6
movapd %xmm6, %xmm1
xorpd %xmm5, %xmm5
cmpltsd %xmm5, %xmm1
movapd %xmm1, %xmm2
movsd 0x6c066(%rip), %xmm4    # 0xf3390
andpd %xmm4, %xmm2
movsd 0x6c062(%rip), %xmm3    # 0xf3398
andnpd %xmm3, %xmm1
orpd %xmm2, %xmm1
addsd %xmm6, %xmm1
cvttsd2si %xmm1, %rdx
addq %rdx, %r13
addl %ebp, %ecx
addl %edx, %ecx
addl $-0x2, %ecx
addl %ebx, %r13d
movq %r14, %rdx
cwtl
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
addsd %xmm0, %xmm1
cvttsd2si %xmm1, %rax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
divsd 0x6c341(%rip), %xmm0    # 0xf36b8
movapd %xmm0, %xmm1
cmpltsd %xmm5, %xmm1
movapd %xmm1, %xmm2
andpd %xmm4, %xmm2
andnpd %xmm3, %xmm1
orpd %xmm2, %xmm1
addsd %xmm0, %xmm1
cvttsd2si %xmm1, %rax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
shrq $0x20, %rdx
addsd %xmm0, %xmm0
movapd %xmm0, %xmm1
cmpltsd %xmm5, %xmm1
movapd %xmm1, %xmm2
andpd %xmm4, %xmm2
andnpd %xmm3, %xmm1
orpd %xmm2, %xmm1
addsd %xmm0, %xmm1
cvttsd2si %xmm1, %rax
subl %eax, %r14d
movl %r13d, 0x18(%rsp)
movl %ecx, 0x1c(%rsp)
leal (%r14,%r13), %esi
decl %esi
movl %esi, 0x20(%rsp)
addl %ecx, %edx
subl %eax, %edx
movl %edx, 0x24(%rsp)
movq 0x6d8(%r15), %rdi
movl %r12d, %esi
callq 0x57a40
movl %eax, %ebx
movq (%rsp), %rdi
callq 0x58930
cwtl
imull %eax, %ebx
xorps %xmm0, %xmm0
cvtsi2sd %ebx, %xmm0
divsd 0x6c2a3(%rip), %xmm0    # 0xf36b8
xorl %eax, %eax
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
seta %al
leaq 0x6c3c7(%rip), %rcx     # 0xf37f0
addsd (%rcx,%rax,8), %xmm0
cvttsd2si %xmm0, %rax
addl 0x18(%rsp), %eax
xorl %ecx, %ecx
movl %eax, 0x18(%rsp)
testl %r12d, %r12d
jne 0x87495
movq 0x8(%rsp), %rdx
movq 0x190(%rdx), %rdx
testb $0x4, 0x30(%rdx)
je 0x87495
movq (%rsp), %rdi
callq 0x58930
cwtl
shll $0x2, %eax
leal (%rax,%rax,2), %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
divsd 0x6c245(%rip), %xmm0    # 0xf36b8
xorl %eax, %eax
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
seta %al
leaq 0x6c369(%rip), %rcx     # 0xf37f0
addsd (%rcx,%rax,8), %xmm0
cvttsd2si %xmm0, %rcx
movl 0x18(%rsp), %eax
addl %ecx, %eax
movl %eax, 0x18(%rsp)
movq 0x6d8(%r15), %rdi
callq 0x55530
leal 0x2(%r12), %ecx
cmpl %ecx, %eax
jge 0x874d7
movq 0x6d8(%r15), %rdi
movl %r12d, %esi
callq 0x56ba0
cmpl $0x20, %eax
movq (%rsp), %r14
jne 0x875fc
movl 0x20(%rsp), %eax
incl %eax
jmp 0x875f8
movl 0x18(%rsp), %eax
movq %rax, 0x10(%rsp)
leal 0x1(%r12), %esi
movq 0x6d8(%r15), %rdi
callq 0x57a40
movl %eax, %ebx
movq (%rsp), %rdi
callq 0x58930
cwtl
imull %eax, %ebx
xorps %xmm1, %xmm1
cvtsi2sd %ebx, %xmm1
divsd 0x6c1a9(%rip), %xmm1    # 0xf36b8
xorl %r13d, %r13d
xorpd %xmm0, %xmm0
movsd %xmm1, 0x68(%rsp)
ucomisd %xmm1, %xmm0
seta %bpl
movq 0x6d8(%r15), %rdi
movl %r12d, %esi
callq 0x57a40
movl %eax, %ebx
movq (%rsp), %rdi
callq 0x58930
cwtl
imull %eax, %ebx
xorps %xmm1, %xmm1
cvtsi2sd %ebx, %xmm1
divsd 0x6c167(%rip), %xmm1    # 0xf36b8
xorl %ebx, %ebx
xorpd %xmm0, %xmm0
movsd %xmm1, 0x60(%rsp)
ucomisd %xmm1, %xmm0
seta 0x58(%rsp)
testl %r12d, %r12d
jne 0x87581
movq 0x8(%rsp), %rax
movq 0x190(%rax), %rax
testb $0x4, 0x30(%rax)
jne 0x87678
xorl %r14d, %r14d
movq (%rsp), %rdi
callq 0x58930
movb %bpl, %r13b
leaq 0x6c259(%rip), %rsi     # 0xf37f0
movsd 0x68(%rsp), %xmm0
addsd (%rsi,%r13,8), %xmm0
cvttsd2si %xmm0, %rcx
movb 0x58(%rsp), %dl
movb %dl, %bl
movsd 0x60(%rsp), %xmm0
addsd (%rsi,%rbx,8), %xmm0
cvttsd2si %xmm0, %rdx
addl 0x10(%rsp), %ecx
addl %edx, %r14d
cwtl
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
divsd 0x6c0e3(%rip), %xmm0    # 0xf36b8
xorl %eax, %eax
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
seta %al
addsd (%rsi,%rax,8), %xmm0
cvttsd2si %xmm0, %rax
leal (%r14,%rax,2), %eax
notl %eax
addl %ecx, %eax
movq (%rsp), %r14
movl %eax, 0x20(%rsp)
leaq 0x30(%rsp), %rdi
movq 0x8(%rsp), %rsi
movl %r12d, %edx
callq 0x58cd0
movq 0x6d8(%r15), %rdi
movl %r12d, %esi
callq 0x56ba0
cmpl $0x20, %eax
jne 0x87649
movl 0x18(%rsp), %ebx
movl 0x20(%rsp), %ebp
leaq 0x98(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x56730
notl %eax
addl %eax, %ebp
cmpl %ebp, %ebx
cmovgl %ebx, %ebp
movl %ebp, 0x18(%rsp)
movq %r14, %rdi
leaq 0x30(%rsp), %rsi
leaq 0x18(%rsp), %rdx
leaq 0x98(%rsp), %rcx
xorl %r8d, %r8d
callq 0x57b80
leaq 0x30(%rsp), %rdi
callq 0x59200
incl %r12d
jmp 0x87208
movq (%rsp), %rdi
callq 0x58930
cwtl
shll $0x2, %eax
leal (%rax,%rax,2), %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
divsd 0x6c021(%rip), %xmm0    # 0xf36b8
xorl %eax, %eax
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
seta %al
leaq 0x6c145(%rip), %rcx     # 0xf37f0
addsd (%rcx,%rax,8), %xmm0
cvttsd2si %xmm0, %r14
jmp 0x87584
movq %r13, 0x68(%rsp)
movl 0x54(%rsp), %eax
movl 0x28(%rsp), %ecx
addl 0x4c(%rsp), %ecx
subl %ecx, %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
mulsd 0x6bcbc(%rip), %xmm0    # 0xf3398
callq 0x56cb0
movq %rax, %r15
movl 0x48(%rsp), %r13d
movl 0x4c(%rsp), %eax
movq %rax, 0x60(%rsp)
movl 0x50(%rsp), %ebx
movl 0x54(%rsp), %eax
movq %rax, 0x28(%rsp)
movq %r14, %rdi
callq 0x58930
movl %eax, %ebp
movsd 0x6bc7f(%rip), %xmm0    # 0xf3390
movsd %xmm0, 0x10(%rsp)
testw %ax, %ax
js 0x8772a
movsd 0x6bc74(%rip), %xmm0    # 0xf3398
movsd %xmm0, 0x10(%rsp)
movq 0x190(%r12), %rax
xorl %r12d, %r12d
testb $0x4, 0x30(%rax)
je 0x87777
movq %r14, %rdi
callq 0x58930
cwtl
shll $0x2, %eax
leal (%rax,%rax,2), %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
divsd 0x6bf5f(%rip), %xmm0    # 0xf36b8
pxor %xmm1, %xmm1
xorl %eax, %eax
ucomisd %xmm0, %xmm1
seta %al
leaq 0x6c083(%rip), %rcx     # 0xf37f0
addsd (%rcx,%rax,8), %xmm0
cvttsd2si %xmm0, %r12
movq %r14, %rdi
callq 0x58930
movl %eax, %r14d
movsd 0x6bc06(%rip), %xmm0    # 0xf3390
movsd 0x6bc06(%rip), %xmm1    # 0xf3398
testw %ax, %ax
js 0x8779b
movapd %xmm1, %xmm0
movsd %xmm0, 0x58(%rsp)
movq 0x8(%rsp), %rax
movq 0x190(%rax), %rcx
xorl %eax, %eax
testb $0x4, 0x30(%rcx)
je 0x877f2
movq (%rsp), %rdi
callq 0x58930
cwtl
shll $0x2, %eax
leal (%rax,%rax,2), %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
divsd 0x6bee4(%rip), %xmm0    # 0xf36b8
xorpd %xmm1, %xmm1
xorl %eax, %eax
ucomisd %xmm0, %xmm1
seta %al
leaq 0x6c008(%rip), %rcx     # 0xf37f0
addsd (%rcx,%rax,8), %xmm0
cvttsd2si %xmm0, %rax
movswl %bp, %ecx
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
movsd 0x10(%rsp), %xmm1
addsd %xmm0, %xmm1
cvttsd2si %xmm1, %rcx
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
divsd 0x6be9e(%rip), %xmm0    # 0xf36b8
xorpd %xmm1, %xmm1
movapd %xmm0, %xmm2
cmpltsd %xmm1, %xmm2
movsd 0x6bb61(%rip), %xmm1    # 0xf3390
andpd %xmm2, %xmm1
movsd 0x6bb5d(%rip), %xmm3    # 0xf3398
andnpd %xmm3, %xmm2
orpd %xmm1, %xmm2
addsd %xmm0, %xmm2
cvttsd2si %xmm2, %rsi
movq 0x60(%rsp), %rcx
leal (%rcx,%r15), %edx
addl $-0x2, %edx
movq 0x28(%rsp), %rcx
addl %r15d, %ecx
addl $-0x2, %ecx
addl %esi, %edx
movswl %r14w, %edi
addl %esi, %r13d
addl %esi, %ecx
xorps %xmm0, %xmm0
cvtsi2sd %edi, %xmm0
movsd 0x58(%rsp), %xmm1
addsd %xmm0, %xmm1
shlq $0x20, %rdx
cvttsd2si %xmm1, %rdi
xorps %xmm0, %xmm0
cvtsi2sd %edi, %xmm0
divsd 0x6be21(%rip), %xmm0    # 0xf36b8
xorpd %xmm1, %xmm1
movapd %xmm0, %xmm2
cmpltsd %xmm1, %xmm2
movapd %xmm2, %xmm3
movsd 0x6bae0(%rip), %xmm4    # 0xf3390
andpd %xmm4, %xmm3
movsd 0x6badc(%rip), %xmm5    # 0xf3398
andnpd %xmm5, %xmm2
orpd %xmm3, %xmm2
addsd %xmm0, %xmm2
cvttsd2si %xmm2, %rdi
addl %r12d, %r13d
xorps %xmm0, %xmm0
cvtsi2sd %edi, %xmm0
addsd %xmm0, %xmm0
movapd %xmm0, %xmm2
cmpltsd %xmm1, %xmm2
andpd %xmm2, %xmm4
andnpd %xmm5, %xmm2
orpd %xmm4, %xmm2
addsd %xmm0, %xmm2
cvttsd2si %xmm2, %rdi
subl %edi, %ecx
shlq $0x20, %rcx
addl %esi, %ebx
addl %r12d, %ebx
addl %edi, %eax
subl %eax, %ebx
movl %r13d, %eax
orq %rdx, %rax
orq %rcx, %rbx
leaq 0x30(%rsp), %rdx
movq %rax, (%rdx)
movq %rbx, 0x8(%rdx)
leaq 0x98(%rsp), %rcx
movq (%rsp), %rdi
movq 0x68(%rsp), %rsi
xorl %r8d, %r8d
callq 0x57b80
movq (%rsp), %r14
xorl %ebx, %ebx
movq 0x8(%rsp), %rdi
xorl %esi, %esi
callq 0x567d0
movq %r14, %rdi
callq 0x58780
leaq 0x98(%rsp), %rdi
callq 0x56720
movl %ebx, %eax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x879cc
jmp 0x879cc
jmp 0x879cc
jmp 0x879cc
jmp 0x879cc
jmp 0x879cc
jmp 0x879cc
jmp 0x879cc
jmp 0x879cc
jmp 0x879cc
jmp 0x879cc
jmp 0x879cc
jmp 0x879cc
jmp 0x879cc
jmp 0x879cc
jmp 0x879cc
jmp 0x879cc
jmp 0x879cc
jmp 0x879cc
jmp 0x879cc
jmp 0x879cc
jmp 0x879cc
jmp 0x879bd
jmp 0x879cc
jmp 0x879cc
jmp 0x879cc
jmp 0x879cc
jmp 0x879cc
jmp 0x879cc
jmp 0x879cc
jmp 0x879cc
jmp 0x879cc
jmp 0x879cc
jmp 0x879cc
jmp 0x879cc
jmp 0x879cc
jmp 0x879cc
jmp 0x879cc
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x59200
jmp 0x879cf
movq %rax, %rbx
leaq 0x98(%rsp), %rdi
callq 0x56720
movq %rbx, %rdi
callq 0x57090