// File: /workspace/github_c_makefile_star2_O2/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 $0x108, %rsp            # imm = 0x108
movl %esi, %ebx
movq %rdi, %r12
movq (%rdi), %rax
callq *0x88(%rax)
testb %al, %al
je 0x846ec
movq (%r12), %rax
movq %r12, %rdi
callq *0x90(%rax)
xorl %ebp, %ebp
testb %al, %al
je 0x85215
movq (%r12), %rax
movq %r12, %rdi
callq *0x40(%rax)
movq %rax, 0x8(%rsp)
movq (%r12), %rax
movq %r12, %rdi
callq *0x48(%rax)
movq %rax, %r14
movq %rax, %r15
shrq $0x20, %r15
movq (%r12), %rax
movq %r12, %rdi
callq *0x50(%rax)
leal (%rax,%r14), %ecx
shrq $0x20, %rax
movl %r14d, 0x78(%rsp)
movl %r15d, 0x7c(%rsp)
movl %ecx, 0x80(%rsp)
addl %r15d, %eax
movl %eax, 0x84(%rsp)
movq 0x190(%r12), %r14
leaq 0x140(%r12), %rsi
leaq 0xb0(%rsp), %rdi
callq 0x56bf0
cmpl $0x3, %ebx
ja 0x8470e
cmpl $0x1, %ebx
je 0x8470e
cmpb $0x1, 0xd4(%r12)
movq 0x8(%rsp), %r15
jne 0x84661
movq 0xdd4dc(%rip), %rsi     # 0x161b30
leaq 0xb0(%rsp), %rdi
callq 0x59940
movq (%r12), %rax
movq %r12, %rdi
callq *0x98(%rax)
testb %al, %al
jne 0x84686
movq 0xdd2d7(%rip), %rsi     # 0x161950
leaq 0xb0(%rsp), %rdi
callq 0x59940
leaq 0xf0(%r12), %r13
movq 0xdd51b(%rip), %rsi     # 0x161bb0
movq %r13, %rdi
callq 0x56180
movl %eax, %ebp
movq (%r12), %rax
movq %r12, %rdi
callq *0x130(%rax)
leaq 0x40(%rsp), %rsi
movq %rax, (%rsi)
movq %rdx, 0x8(%rsi)
movq %r15, %rdi
callq 0x56160
cmpb $0x1, 0xd4(%r12)
jne 0x846f4
movq 0xdd8e6(%rip), %rdx     # 0x161fb8
movq 0xdd847(%rip), %rcx     # 0x161f20
leaq 0x78(%rsp), %rsi
pushq $0x1
popq %r8
movq %r15, %rdi
callq 0x59a40
jmp 0x84745
pushq $-0x1
popq %rbp
jmp 0x85215
movq (%r12), %rax
movq %r12, %rdi
callq *0x98(%rax)
testb %al, %al
je 0x8471f
movq 0xdcf64(%rip), %rdx     # 0x161670
jmp 0x84726
movq %r12, %rdi
movl %ebx, %esi
callq 0x57910
movl %eax, %ebp
jmp 0x85208
movq 0xdcdaa(%rip), %rdx     # 0x1614d0
movq 0xdd87b(%rip), %rax     # 0x161fa8
movl (%rax), %ecx
leaq 0x40(%rsp), %r8
andq $0x0, (%r8)
leaq 0x78(%rsp), %rsi
movq %r15, %rdi
callq 0x58b80
cmpb $0x1, 0x5b9(%r12)
jne 0x84776
movq 0xdd739(%rip), %rax     # 0x161e90
movl (%rax), %ecx
leaq 0x40(%rsp), %r8
andq $0x0, (%r8)
movq 0xdd687(%rip), %rdx     # 0x161df0
leaq 0x78(%rsp), %rsi
movq %r15, %rdi
callq 0x58b80
movq 0x190(%r12), %rax
testb $0x4, 0x30(%rax)
movq %r12, 0x28(%rsp)
je 0x84b08
movq %r14, 0x20(%rsp)
movq (%r12), %rax
movq %r12, %rdi
callq *0x48(%rax)
movq %rax, %rbx
movabsq $0x300000002, %rax      # imm = 0x300000002
movq %rax, 0x60(%rsp)
movq %r15, %rdi
callq 0x59c60
cwtl
cvtsi2sd %eax, %xmm0
leaq 0x60(%rsp), %rdi
callq 0x570c0
leaq 0x10(%rsp), %rdi
movq %rax, (%rdi)
movsd 0x5ed3b(%rip), %xmm0    # 0xe3510
callq 0x59600
movq %rax, %r14
movabsq $0x900000009, %rax      # imm = 0x900000009
movq %rax, 0x30(%rsp)
movq %r15, %rdi
callq 0x59c60
cwtl
cvtsi2sd %eax, %xmm0
leaq 0x30(%rsp), %rdi
callq 0x57480
leaq 0x38(%rsp), %rdi
movq %rax, (%rdi)
movsd 0x5ecfd(%rip), %xmm0    # 0xe3510
callq 0x59050
movq %rbx, %rcx
shrq $0x20, %rcx
movq %r14, %rdx
shrq $0x20, %rdx
leal (%r14,%rbx), %esi
addl %ecx, %edx
movq %rax, %rcx
shrq $0x20, %rcx
movl %esi, 0x40(%rsp)
movl %edx, 0x44(%rsp)
addl %eax, %esi
movl %esi, 0x48(%rsp)
addl %ecx, %edx
movl %edx, 0x4c(%rsp)
testl %ecx, %ecx
movq 0x20(%rsp), %r14
jle 0x84b08
movq 0xdd74d(%rip), %rax     # 0x161fa8
movl (%rax), %ecx
leaq 0x10(%rsp), %r8
andq $0x0, (%r8)
movq 0xdce03(%rip), %rdx     # 0x161670
leaq 0x40(%rsp), %rsi
movq %r15, %rdi
callq 0x58b80
movq 0xdcf9f(%rip), %rax     # 0x161820
movl (%rax), %ecx
leaq 0x10(%rsp), %r8
andq $0x0, (%r8)
movq 0xdd0bd(%rip), %rbx     # 0x161950
leaq 0x40(%rsp), %rsi
movq %r15, %rdi
movq %rbx, %rdx
callq 0x58b80
cmpb $0x1, 0x5b8(%r12)
jne 0x84b08
movl 0x4c(%rsp), %eax
addl $-0x3, %eax
cmpl %eax, 0x44(%rsp)
jg 0x84b08
movq 0x8(%rbx), %rax
movq %rax, 0x18(%rsp)
movl (%rbx), %eax
movl %eax, 0x10(%rsp)
movq 0xdd517(%rip), %rax     # 0x161df0
movq 0x8(%rax), %rcx
movq %rcx, 0x68(%rsp)
movl (%rax), %eax
movl %eax, 0x60(%rsp)
movq (%r12), %rax
movq %r12, %rdi
callq *0x98(%rax)
testb %al, %al
jne 0x84903
movupd (%rbx), %xmm0
movapd %xmm0, 0x60(%rsp)
movq %r13, 0x90(%rsp)
movl 0x40(%rsp), %r15d
movq (%r12), %rax
movq %r12, %rdi
callq *0x160(%rax)
movl %eax, %ebx
movl 0x44(%rsp), %r14d
movl 0x48(%rsp), %r13d
movq (%r12), %rax
movq %r12, %rdi
callq *0x160(%rax)
movzbl %bl, %ecx
leal (%r15,%rcx), %r12d
addl $0x2, %r12d
leal 0x2(%r14), %ebx
movzbl %al, %eax
leal (%rax,%r13), %ecx
addl $-0x2, %ecx
movl 0x4c(%rsp), %r13d
leal -0x2(%r13), %r15d
shlq $0x20, %rbx
movl %r12d, %eax
movq %rax, 0x70(%rsp)
addq %rbx, %rax
leaq 0x38(%rsp), %rsi
movq %rax, (%rsi)
shlq $0x20, %r15
movq %rcx, 0x58(%rsp)
leaq (%r15,%rcx), %rax
leaq 0x30(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x60(%rsp), %rcx
movq 0x8(%rsp), %rdi
callq 0x595b0
incl %r12d
orq %r12, %rbx
leaq 0x38(%rsp), %rsi
movq %rbx, (%rsi)
addl $-0x3, %r13d
shlq $0x20, %r13
movq 0x58(%rsp), %rbx
orq %rbx, %r13
leaq 0x30(%rsp), %rdx
movq %r13, (%rdx)
leaq 0x10(%rsp), %rcx
movq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x595b0
addl $0x3, %r14d
shlq $0x20, %r14
addq 0x70(%rsp), %r14
leaq 0x38(%rsp), %rsi
movq %r14, (%rsi)
decl %ebx
orq %rbx, %r15
leaq 0x30(%rsp), %rdx
movq %r15, (%rdx)
leaq 0x10(%rsp), %rcx
movq %r12, %rdi
callq 0x595b0
movq 0x28(%rsp), %r14
movl 0x48(%rsp), %r15d
movq (%r14), %rax
movq %r14, %rdi
callq *0x160(%rax)
movl %eax, %ebx
movq %r14, %rdi
movl 0x40(%rsp), %r12d
movl 0x44(%rsp), %r14d
movq (%rdi), %rax
callq *0x160(%rax)
movzbl %bl, %ecx
leal (%r15,%rcx), %edx
addl $-0x3, %edx
leal 0x2(%r14), %r13d
movzbl %al, %eax
leal (%r12,%rax), %ecx
incl %ecx
movl 0x4c(%rsp), %ebx
leal -0x2(%rbx), %r12d
shlq $0x20, %r13
movq %rdx, 0x88(%rsp)
movl %edx, %eax
movq %rax, 0x70(%rsp)
addq %r13, %rax
leaq 0x38(%rsp), %rsi
movq %rax, (%rsi)
shlq $0x20, %r12
movq %rcx, 0x58(%rsp)
leaq (%r12,%rcx), %rax
leaq 0x30(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x60(%rsp), %rcx
movq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x595b0
addl $0x3, %r14d
shlq $0x20, %r14
addq 0x70(%rsp), %r14
leaq 0x38(%rsp), %rsi
movq %r14, (%rsi)
movq 0x58(%rsp), %r14
leal 0x1(%r14), %eax
orq %rax, %r12
leaq 0x30(%rsp), %rdx
movq %r12, (%rdx)
leaq 0x10(%rsp), %rcx
movq %r15, %rdi
callq 0x595b0
movq 0x88(%rsp), %rax
decl %eax
orq %rax, %r13
leaq 0x38(%rsp), %rsi
movq %r13, (%rsi)
addl $-0x3, %ebx
shlq $0x20, %rbx
orq %r14, %rbx
leaq 0x30(%rsp), %rdx
movq %rbx, (%rdx)
leaq 0x10(%rsp), %rcx
movq %r15, %rdi
callq 0x595b0
movq 0x28(%rsp), %r12
movq 0x20(%rsp), %r14
movq 0x90(%rsp), %r13
movq 0xdd459(%rip), %rax     # 0x161f68
movswl (%rax), %ebx
leaq 0x20(%r14), %rdi
movl %ebx, %esi
callq 0x5a150
testb %al, %al
je 0x84b30
movq 0x190(%r14), %r14
testq %r14, %r14
jne 0x84b12
xorl %r14d, %r14d
movl 0x18c(%r12), %eax
movl %eax, 0x58(%rsp)
leaq 0x7cde4(%rip), %rsi     # 0x101927
leaq 0x40(%rsp), %rdi
callq 0x58c40
leaq 0x40(%rsp), %rsi
movq %r13, %rdi
callq 0x56180
movl %eax, %ebx
leaq 0x40(%rsp), %rdi
callq 0x5a588
testb %bl, %bl
je 0x84b82
movq 0xdd247(%rip), %rsi     # 0x161db8
leaq 0xb0(%rsp), %rdi
callq 0x588a0
movl %eax, 0x58(%rsp)
testq %r14, %r14
je 0x84ff3
movq %r14, %rdi
callq 0x56760
testl %eax, %eax
setle %al
xorb $0x1, %bpl
orb %al, %bpl
jne 0x84ff3
xorl %ebx, %ebx
movq %r14, %rdi
callq 0x56760
cmpl %eax, %ebx
jge 0x851f2
movq 0x28(%rsp), %rdi
movq (%rdi), %rax
callq *0x48(%rax)
movq %rax, %r13
movq %r14, %r12
movl 0x84(%rsp), %eax
movl 0x7c(%rsp), %ecx
addl 0x58(%rsp), %ecx
subl %ecx, %eax
cvtsi2sd %eax, %xmm0
mulsd 0x5e79b(%rip), %xmm0    # 0xe3380
callq 0x57e30
movq %rax, %rbp
movabsq $0x100000001, %rax      # imm = 0x100000001
movq %rax, 0x60(%rsp)
movq %r15, %rdi
callq 0x59c60
cwtl
cvtsi2sd %eax, %xmm0
leaq 0x60(%rsp), %rdi
callq 0x570c0
movq %rax, 0x40(%rsp)
leaq 0x40(%rsp), %rdi
movsd 0x5e8eb(%rip), %xmm0    # 0xe3510
callq 0x59600
movq %rax, %r14
movq %rbx, 0x20(%rsp)
testl %ebx, %ebx
je 0x84c71
movl $0x0, %ebx
movq 0x28(%rsp), %rax
cmpq 0x190(%rax), %r12
je 0x84c73
movq %r12, %rdi
movq (%r12), %rax
callq *0x48(%rax)
movq %rax, %rbx
movq 0x28(%rsp), %rax
movq 0x190(%rax), %rdi
movq (%rdi), %rax
callq *0x48(%rax)
subq %rax, %rbx
addq $0x2, %rbx
jmp 0x84c73
xorl %ebx, %ebx
movq 0x28(%rsp), %rdi
movq (%rdi), %rax
callq *0x50(%rax)
movq %rax, %r15
movabsq $0x100000001, %rax      # imm = 0x100000001
movq %rax, 0x98(%rsp)
movq 0x8(%rsp), %rdi
callq 0x59c60
cwtl
cvtsi2sd %eax, %xmm0
leaq 0x98(%rsp), %rdi
callq 0x57480
movq %rax, 0x30(%rsp)
leaq 0x30(%rsp), %rdi
movsd 0x5e84f(%rip), %xmm0    # 0xe3510
callq 0x59050
movq %rax, 0x38(%rsp)
leaq 0x38(%rsp), %rdi
movsd 0x5e6b8(%rip), %xmm0    # 0xe3390
callq 0x57480
movq %r14, %rcx
shrq $0x20, %rcx
addq %r13, %r14
shrq $0x20, %r13
addl %ebp, %r13d
addl %r13d, %ecx
addl $-0x2, %ecx
addl %ebx, %r14d
movq %r15, %rdx
shrq $0x20, %rdx
movq %rax, %rsi
shrq $0x20, %rsi
subl %eax, %r15d
movl %r14d, 0x10(%rsp)
movl %ecx, 0x14(%rsp)
leal (%r14,%r15), %eax
decl %eax
movl %eax, 0x18(%rsp)
addl %ecx, %edx
subl %esi, %edx
movl %edx, 0x1c(%rsp)
movq %r12, %rdi
movq 0x20(%rsp), %rsi
callq 0x596f0
movl %eax, %ebx
movq 0x8(%rsp), %rdi
callq 0x59c60
cwtl
imull %eax, %ebx
cvtsi2sd %ebx, %xmm0
divsd 0x5e7c4(%rip), %xmm0    # 0xe3510
xorl %eax, %eax
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
seta %al
leaq 0x5ec10(%rip), %rcx     # 0xe3970
addsd (%rcx,%rax,8), %xmm0
cvttsd2si %xmm0, %rax
addl 0x10(%rsp), %eax
xorl %ecx, %ecx
movl %eax, 0x10(%rsp)
cmpl $0x0, 0x20(%rsp)
jne 0x84dcc
movq 0x28(%rsp), %rdx
movq 0x190(%rdx), %rdx
testb $0x4, 0x30(%rdx)
movq %r12, %rdi
je 0x84dcf
movq 0x8(%rsp), %rdi
callq 0x59c60
cwtl
imull $0xc, %eax, %eax
cvtsi2sd %eax, %xmm0
divsd 0x5e766(%rip), %xmm0    # 0xe3510
xorl %eax, %eax
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
seta %al
leaq 0x5ebb2(%rip), %rcx     # 0xe3970
addsd (%rcx,%rax,8), %xmm0
cvttsd2si %xmm0, %rcx
movl 0x10(%rsp), %eax
movq %r12, %rdi
addl %ecx, %eax
movl %eax, 0x10(%rsp)
callq 0x56760
movq 0x20(%rsp), %rsi
leal 0x2(%rsi), %ecx
cmpl %ecx, %eax
jge 0x84e14
movq %r12, %rdi
callq 0x59730
cmpl $0x20, %eax
movq 0x8(%rsp), %r15
movq %r12, %r14
movq 0x20(%rsp), %rbx
leaq 0x40(%rsp), %r12
jne 0x84f44
movl 0x18(%rsp), %eax
incl %eax
jmp 0x84f40
movl 0x10(%rsp), %r14d
incl %esi
movq %r12, %rdi
callq 0x596f0
movl %eax, %ebx
movq 0x8(%rsp), %rdi
callq 0x59c60
cwtl
imull %eax, %ebx
cvtsi2sd %ebx, %xmm1
divsd 0x5e6d1(%rip), %xmm1    # 0xe3510
xorl %r15d, %r15d
xorpd %xmm0, %xmm0
movsd %xmm1, 0x70(%rsp)
ucomisd %xmm1, %xmm0
seta %bpl
movq %r12, %rdi
movq 0x20(%rsp), %rsi
callq 0x596f0
movl %eax, %ebx
movq 0x8(%rsp), %rdi
callq 0x59c60
cwtl
imull %eax, %ebx
cvtsi2sd %ebx, %xmm1
divsd 0x5e693(%rip), %xmm1    # 0xe3510
xorl %ebx, %ebx
xorpd %xmm0, %xmm0
movsd %xmm1, 0x90(%rsp)
ucomisd %xmm1, %xmm0
seta %al
cmpl $0x0, 0x20(%rsp)
movb %al, 0x88(%rsp)
jne 0x84eb7
movq 0x28(%rsp), %rax
movq 0x190(%rax), %rax
testb $0x4, 0x30(%rax)
jne 0x84fb6
xorl %r13d, %r13d
movq 0x8(%rsp), %rdi
callq 0x59c60
movb %bpl, %r15b
leaq 0x5eaa2(%rip), %rsi     # 0xe3970
movsd 0x70(%rsp), %xmm0
addsd (%rsi,%r15,8), %xmm0
cvttsd2si %xmm0, %rcx
movb 0x88(%rsp), %dl
movb %dl, %bl
movsd 0x90(%rsp), %xmm0
addsd (%rsi,%rbx,8), %xmm0
cvttsd2si %xmm0, %rdx
addl %r14d, %ecx
addl %edx, %r13d
cwtl
cvtsi2sd %eax, %xmm0
divsd 0x5e602(%rip), %xmm0    # 0xe3510
xorl %eax, %eax
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
seta %al
addsd (%rsi,%rax,8), %xmm0
cvttsd2si %xmm0, %rax
leal (%r13,%rax,2), %eax
notl %eax
addl %ecx, %eax
movq 0x8(%rsp), %r15
movq %r12, %r14
movq 0x20(%rsp), %rbx
leaq 0x40(%rsp), %r12
movl %eax, 0x18(%rsp)
movq %r12, %rdi
movq 0x28(%rsp), %rsi
movl %ebx, %edx
callq 0x5a020
movq %r14, %rdi
movl %ebx, %esi
callq 0x59730
cmpl $0x20, %eax
jne 0x84f87
movl 0x10(%rsp), %ebx
movl 0x18(%rsp), %ebp
leaq 0xb0(%rsp), %rdi
movq %r12, %rsi
callq 0x57870
notl %eax
addl %eax, %ebp
cmpl %ebp, %ebx
cmovgl %ebx, %ebp
movl %ebp, 0x10(%rsp)
movq %r15, %rdi
movq %r12, %rsi
leaq 0x10(%rsp), %rdx
leaq 0xb0(%rsp), %rcx
xorl %r8d, %r8d
callq 0x58df0
movq %r12, %rdi
callq 0x5a588
movq 0x20(%rsp), %rbx
incl %ebx
jmp 0x84ba7
movq 0x8(%rsp), %rdi
callq 0x59c60
cwtl
imull $0xc, %eax, %eax
cvtsi2sd %eax, %xmm0
divsd 0x5e540(%rip), %xmm0    # 0xe3510
xorl %eax, %eax
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
seta %al
leaq 0x5e98c(%rip), %rcx     # 0xe3970
addsd (%rcx,%rax,8), %xmm0
cvttsd2si %xmm0, %r13
jmp 0x84eba
movl 0x84(%rsp), %eax
movl 0x58(%rsp), %ecx
addl 0x7c(%rsp), %ecx
subl %ecx, %eax
cvtsi2sd %eax, %xmm0
mulsd 0x5e370(%rip), %xmm0    # 0xe3380
callq 0x57e30
addl $-0x2, %eax
leaq 0x38(%rsp), %rsi
andl $0x0, (%rsi)
movl %eax, 0x4(%rsi)
leaq 0x78(%rsp), %rdi
callq 0x58930
movq %rax, 0x60(%rsp)
movq %rdx, 0x68(%rsp)
movabsq $0x100000001, %rax      # imm = 0x100000001
movq %rax, 0xa8(%rsp)
movq %r15, %rdi
callq 0x59c60
cwtl
cvtsi2sd %eax, %xmm0
leaq 0xa8(%rsp), %rdi
callq 0x570c0
leaq 0x98(%rsp), %rdi
movq %rax, (%rdi)
movsd 0x5e49a(%rip), %xmm0    # 0xe3510
callq 0x59600
leaq 0x30(%rsp), %rsi
movq %rax, (%rsi)
leaq 0x60(%rsp), %rdi
callq 0x58930
movq %rax, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
movq 0x190(%r12), %rcx
xorl %eax, %eax
testb $0x4, 0x30(%rcx)
je 0x850df
movq 0x8(%rsp), %rdi
callq 0x59c60
cwtl
imull $0xc, %eax, %eax
cvtsi2sd %eax, %xmm0
divsd 0x5e44f(%rip), %xmm0    # 0xe3510
xorpd %xmm1, %xmm1
xorl %eax, %eax
ucomisd %xmm0, %xmm1
seta %al
leaq 0x5e89b(%rip), %rcx     # 0xe3970
addsd (%rcx,%rax,8), %xmm0
cvttsd2si %xmm0, %rax
leaq 0x100(%rsp), %rsi
movl %eax, (%rsi)
andl $0x0, 0x4(%rsi)
leaq 0x10(%rsp), %rdi
callq 0x58930
movq %rax, %r14
movq %rdx, %r15
movabsq $0x100000001, %rax      # imm = 0x100000001
movq %rax, 0xa0(%rsp)
movq 0x8(%rsp), %rdi
callq 0x59c60
cwtl
cvtsi2sd %eax, %xmm0
leaq 0xa0(%rsp), %rdi
callq 0x57480
leaq 0xf0(%rsp), %rdi
movq %rax, (%rdi)
movsd 0x5e3d2(%rip), %xmm0    # 0xe3510
callq 0x59050
leaq 0xf8(%rsp), %rdi
movq %rax, (%rdi)
movsd 0x5e23a(%rip), %xmm0    # 0xe3390
callq 0x57480
movq %rax, %rbx
movq 0x190(%r12), %rax
testb $0x4, 0x30(%rax)
jne 0x85170
xorl %eax, %eax
jmp 0x851a8
movq 0x8(%rsp), %rdi
callq 0x59c60
cwtl
imull $0xc, %eax, %eax
cvtsi2sd %eax, %xmm0
divsd 0x5e386(%rip), %xmm0    # 0xe3510
xorpd %xmm1, %xmm1
xorl %eax, %eax
ucomisd %xmm0, %xmm1
seta %al
leaq 0x5e7d2(%rip), %rcx     # 0xe3970
addsd (%rcx,%rax,8), %xmm0
cvttsd2si %xmm0, %rax
movabsq $-0x100000000, %rcx     # imm = 0xFFFFFFFF00000000
movq %rbx, %rdx
andq %rcx, %rdx
movq %r15, %rsi
subq %rdx, %rsi
andq %rcx, %rsi
addl %ebx, %eax
subl %eax, %r15d
orq %rsi, %r15
leaq 0x40(%rsp), %rdx
movq %r14, (%rdx)
movq %r15, 0x8(%rdx)
leaq 0xb0(%rsp), %rcx
movq 0x8(%rsp), %rdi
movq %r13, %rsi
xorl %r8d, %r8d
callq 0x58df0
movq 0x8(%rsp), %r15
xorl %ebp, %ebp
movq 0x28(%rsp), %rdi
xorl %esi, %esi
callq 0x57910
movq %r15, %rdi
callq 0x59a80
leaq 0xb0(%rsp), %rdi
callq 0x57860
movl %ebp, %eax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x85284
jmp 0x85284
jmp 0x85284
jmp 0x85284
jmp 0x85284
jmp 0x85284
jmp 0x85284
jmp 0x85284
jmp 0x85284
jmp 0x85284
jmp 0x85284
jmp 0x85284
jmp 0x85284
jmp 0x85284
jmp 0x85284
jmp 0x85284
jmp 0x85271
jmp 0x85284
jmp 0x85284
jmp 0x85284
jmp 0x85284
jmp 0x85284
jmp 0x85284
jmp 0x85284
jmp 0x85284
jmp 0x85284
jmp 0x85284
jmp 0x85284
jmp 0x85284
jmp 0x85284
jmp 0x85284
jmp 0x85284
jmp 0x85284
jmp 0x85284
jmp 0x85284
jmp 0x85284
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x5a588
jmp 0x85287
jmp 0x85284
jmp 0x85284
movq %rax, %rbx
leaq 0xb0(%rsp), %rdi
callq 0x57860
movq %rbx, %rdi
callq 0x58260