// File: /workspace/github_c_makefile_star2_O3/enzo1982[P]smooth/classes/gui/widgets/special/cursor.cpp
// Function: smooth::GUI::Cursor::DrawWidget()
S::Int S::GUI::Cursor::DrawWidget()
{
	Int	 nMaxScrollPos = Math::Max(0, (Int) Math::Ceil((Float) (font.GetUnscaledTextSizeY(text) - GetHeight()) / (font.GetUnscaledTextSizeY() + 3)));

	if (nMaxScrollPos != maxScrollPos)
	{
		maxScrollPos = nMaxScrollPos;

		if (maxScrollPos == 0) scrollPos = 0;

		onScroll.Emit(scrollPos, maxScrollPos);
	}

	Int	 textLength = text.Length();

	if (lineIndices.Length() == 0)
	{
		lineIndices.Add(0);

		for (Int i = 0; i <= textLength; i++)
		{
			if (text[i] != '\n' && text[i] != 0) continue;

			lineIndices.Add(i + 1);
		}
	}

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

	surface->StartPaint(GetVisibleArea());

	surface->Box(frame, GetBackgroundColor(), Rect::Filled);

	Int	 lineNumber = scrollPos;

	for (Int lineStart = lineIndices.GetNth(lineNumber); lineStart <= textLength; lineStart = lineIndices.GetNth(++lineNumber))
	{
		if ((lineNumber - scrollPos) * (font.GetUnscaledTextSizeY() + 3) >= frame.GetHeight()) break;

		Int	 lineLength = lineIndices.GetNth(lineNumber + 1) - lineStart - 1;
		String	 line	    = text.SubString(lineStart, lineLength);

		if (!Binary::IsFlagSet(container->GetFlags(), EDB_ASTERISK)) surface->SetText(ConvertTabs(line, tabSize),      frame + Point(-visibleOffset, (lineNumber - scrollPos) * (font.GetScaledTextSizeY() + 3)) + Point(0, 1) * surface->GetSurfaceDPI() / 96.0 + Size(visibleOffset, -2), font);
		else							     surface->SetText(String().FillN('*', lineLength), frame + Point(-visibleOffset, (lineNumber - scrollPos) * (font.GetScaledTextSizeY() + 3)) + Point(0, 1) * surface->GetSurfaceDPI() / 96.0 + Size(visibleOffset, -2), font);

		if (markStart != markEnd && markStart >= 0 && markEnd >= 0)
		{
			Int	 lineMarkStart = Math::Max(0, Math::Min(markStart, markEnd) - lineStart);
			Int	 lineMarkEnd   = Math::Min(lineLength, Math::Max(markStart, markEnd) - lineStart);

			if (lineMarkStart < lineLength && lineMarkEnd > 0)
			{
				Array<Int>	 markRegionStarts;
				Array<Int>	 markRegionEnds;

				if (Setup::useIconv && ContainsRTLCharacters(line))
				{
					FriBidiStrIndex	 length = lineLength;

					/* Get visual positions.
					 */
					FriBidiStrIndex	*positions = new FriBidiStrIndex [length + 1];
					FriBidiParType	 type = (IsRightToLeft() ? FRIBIDI_PAR_RTL : FRIBIDI_PAR_LTR);

					fribidi_log2vis((FriBidiChar *) line.ConvertTo("UCS-4LE"), length, &type, NIL, positions, NIL, NIL);

					/* Find marked regions in visual string.
					 */
					for (Int i = lineMarkStart; i < lineMarkEnd; i++)
					{
						Bool	 done = False;

						for (Int j = 0; j < markRegionStarts.Length(); j++)
						{
							if	(markRegionStarts.GetNth(j) == positions[i] + 1) { markRegionStarts.SetNth(j, markRegionStarts.GetNth(j) - 1); done = True; break; }
							else if (markRegionEnds.GetNth(j)   == positions[i]    ) { markRegionEnds.SetNth(j, markRegionEnds.GetNth(j) + 1);     done = True; break; }
						}

						if (!done)
						{
							markRegionStarts.Add(positions[i]);
							markRegionEnds.Add(positions[i] + 1);
						}
					}

					delete [] positions;

					/* Consolidate adjacent regions into one.
					 */
					for (Int i = 0; i < markRegionStarts.Length() - 1; i++)
					{
						for (Int j = i + 1; j < markRegionStarts.Length(); j++)
						{
							if (markRegionStarts.GetNth(i) < markRegionStarts.GetNth(j) &&
							    markRegionEnds.GetNth(i) >= markRegionStarts.GetNth(j))
							{
								markRegionEnds.SetNth(i, markRegionEnds.GetNth(j));

								markRegionStarts.RemoveNth(j);
								markRegionEnds.RemoveNth(j);

								j--;
							}
							else if (markRegionStarts.GetNth(j) < markRegionStarts.GetNth(i) &&
								 markRegionEnds.GetNth(j) >= markRegionStarts.GetNth(i))
							{
								markRegionStarts.SetNth(i, markRegionStarts.GetNth(j));

								markRegionStarts.RemoveNth(j);
								markRegionEnds.RemoveNth(j);

								j--;
							}
						}
					}
				}
				else
				{
					markRegionStarts.Add(lineMarkStart);
					markRegionEnds.Add(lineMarkEnd);
				}

				/* Draw marked regions.
				 */
				for (Int i = 0; i < markRegionStarts.Length(); i++)
				{
					Int	 markRegionStart = GetDisplayCursorPositionFromVisual(line, markRegionStarts.GetNth(i));
					Int	 markRegionEnd	 = GetDisplayCursorPositionFromVisual(line, markRegionEnds.GetNth(i));

					Rect	 markRect = Rect(realPos + Point(Math::Min(markRegionStart, markRegionEnd), (lineNumber - scrollPos) * (font.GetScaledTextSizeY() + 3)) + Point(0, 1) * surface->GetSurfaceDPI() / 96.0 - Point(0, 1), Size(Math::Abs(markRegionEnd - markRegionStart), font.GetScaledTextSizeY() + 3));
					Font	 nFont = font;

					nFont.SetColor(Setup::HighlightTextColor);

					surface->StartPaint(markRect);

					surface->Box(markRect, Setup::HighlightColor, Rect::Filled);

					if (!Binary::IsFlagSet(container->GetFlags(), EDB_ASTERISK)) surface->SetText(ConvertTabs(line, tabSize),      frame + Point(-visibleOffset, (lineNumber - scrollPos) * (font.GetScaledTextSizeY() + 3)) + Point(0, 1) * surface->GetSurfaceDPI() / 96.0 + Size(visibleOffset, -2), nFont);
					else							     surface->SetText(String().FillN('*', lineLength), frame + Point(-visibleOffset, (lineNumber - scrollPos) * (font.GetScaledTextSizeY() + 3)) + Point(0, 1) * surface->GetSurfaceDPI() / 96.0 + Size(visibleOffset, -2), nFont);

					surface->EndPaint();
				}
			}
		}
	}

	surface->EndPaint();

	return Success();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1d8, %rsp            # imm = 0x1D8
movq %rdi, %r13
leaq 0x140(%rdi), %rbx
leaq 0xf0(%rdi), %rsi
movq %rbx, %rdi
movq %rsi, 0x78(%rsp)
callq 0x58a50
subl 0xb4(%r13), %eax
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x10(%rsp)
movq 0xdb099(%rip), %rsi     # 0x16bdb8
movq %rbx, 0x18(%rsp)
movq %rbx, %rdi
callq 0x58a50
addl $0x3, %eax
cvtsi2sd %eax, %xmm1
movsd 0x10(%rsp), %xmm0
divsd %xmm1, %xmm0
callq 0x56cb0
xorl %edx, %edx
testl %eax, %eax
cmovgl %eax, %edx
cmpl 0x5d8(%r13), %edx
je 0x90d7f
movl %edx, 0x5d8(%r13)
testl %eax, %eax
jle 0x90d66
movl 0x5d4(%r13), %esi
jmp 0x90d73
movl $0x0, 0x5d4(%r13)
xorl %esi, %esi
leaq 0x748(%r13), %rdi
callq 0x72b08
movq 0x78(%rsp), %rdi
callq 0x57180
movq %rax, 0x70(%rsp)
leaq 0x5e8(%r13), %rax
movq %rax, 0x40(%rsp)
cmpl $0x0, 0x5f0(%r13)
jne 0x90e15
leaq 0xe8(%rsp), %rsi
movl $0x0, (%rsi)
movq 0x40(%rsp), %rdi
callq 0x8641a
cmpl $0x0, 0x70(%rsp)
js 0x90e15
movq 0x70(%rsp), %rax
leal 0x1(%rax), %ebx
xorl %ebp, %ebp
leaq 0xe8(%rsp), %r14
movq 0x78(%rsp), %rdi
movl %ebp, %esi
callq 0x58990
cmpl $0xa, (%rax)
je 0x90dfb
movq 0x78(%rsp), %rdi
movl %ebp, %esi
callq 0x58990
cmpl $0x0, (%rax)
je 0x90dfb
incl %ebp
jmp 0x90e11
incl %ebp
movl %ebp, 0xe8(%rsp)
movq 0x40(%rsp), %rdi
movq %r14, %rsi
callq 0x8641a
cmpl %ebx, %ebp
jne 0x90dd5
movq (%r13), %rax
movq %r13, %rdi
callq *0x40(%rax)
movq %rax, %r15
movq (%r13), %rax
movq %r13, %rdi
callq *0x48(%rax)
movq %rax, %r14
movq %rax, %r12
shrq $0x20, %r12
movq (%r13), %rax
movq %r13, %rdi
callq *0x50(%rax)
leal (%rax,%r14), %ecx
shrq $0x20, %rax
leaq 0x2c(%rsp), %rbx
movq %r14, 0xe0(%rsp)
movl %r14d, (%rbx)
movl %r12d, 0x4(%rbx)
movl %ecx, 0x8(%rbx)
movq %r12, 0x80(%rsp)
addl %r12d, %eax
movl %eax, 0xc(%rbx)
movq (%r13), %rax
movq %r13, %rdi
callq *0x130(%rax)
leaq 0xe8(%rsp), %r14
movq %rax, (%r14)
movq %rdx, 0x8(%r14)
movq %r15, %rdi
movq %r14, %rsi
callq 0x55160
movq (%r13), %rax
movq %r13, %rdi
callq *0x140(%rax)
movq 0xdb100(%rip), %rcx     # 0x16bfa8
movl (%rcx), %ecx
movq $0x0, (%r14)
leaq 0xe8(%rsp), %r8
movq %r15, 0x10(%rsp)
movq %r15, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x57930
movl 0x5d4(%r13), %r14d
movq 0x40(%rsp), %rdi
movl %r14d, %esi
callq 0x8661e
movl (%rax), %ebp
cmpl 0x70(%rsp), %ebp
jg 0x91c1f
movq 0x80(%rsp), %rax
decl %eax
movq %rax, 0x80(%rsp)
leaq 0xe8(%rsp), %r12
movq %r13, 0x58(%rsp)
movl %r14d, %ebx
subl 0x5d4(%r13), %ebx
movq 0x18(%rsp), %rdi
movq 0xdae97(%rip), %rsi     # 0x16bdb8
callq 0x58a50
addl $0x3, %eax
imull %ebx, %eax
movl 0x38(%rsp), %ecx
subl 0x30(%rsp), %ecx
cmpl %ecx, %eax
jge 0x91c1f
leal 0x1(%r14), %ebx
movq 0x40(%rsp), %rdi
movl %ebx, %esi
callq 0x8661e
movslq (%rax), %rax
movslq %ebp, %rdx
subq %rdx, %rax
movq %rax, 0x50(%rsp)
leal -0x1(%rax), %ecx
leaq 0xb8(%rsp), %rdi
movq 0x78(%rsp), %rsi
movl %ecx, 0x24(%rsp)
callq 0x58f50
movq 0x190(%r13), %rax
movl 0x30(%rax), %edi
movl $0x2, %esi
callq 0x583f0
testb %al, %al
movq %r14, 0x60(%rsp)
movl %ebx, 0xa4(%rsp)
movl %ebp, 0x28(%rsp)
je 0x91137
movq %r12, %rdi
xorl %esi, %esi
callq 0x58e20
movq %r12, %rdi
movl $0x2a, %esi
movl 0x24(%rsp), %edx
callq 0x57bf0
movq %rax, 0x48(%rsp)
movl 0x5d0(%r13), %ebp
movl 0x5d4(%r13), %r13d
movq 0x18(%rsp), %rdi
movq 0xdaddf(%rip), %rsi     # 0x16bdb8
callq 0x57680
movl %eax, %r14d
movl 0x2c(%rsp), %r15d
movl 0x30(%rsp), %ebx
movl 0x34(%rsp), %r12d
movl 0x38(%rsp), %eax
movl %eax, 0xa0(%rsp)
movq 0x10(%rsp), %rdi
callq 0x58930
movsd 0x62384(%rip), %xmm0    # 0xf3390
testw %ax, %ax
js 0x91019
movsd 0x6237f(%rip), %xmm0    # 0xf3398
movq 0x60(%rsp), %rcx
subl %r13d, %ecx
addl $0x3, %r14d
imull %ecx, %r14d
subl %ebp, %r12d
addl %r14d, %ebx
cwtl
cvtsi2sd %eax, %xmm1
addsd %xmm1, %xmm0
andpd 0x62470(%rip), %xmm1    # 0xf34b0
movsd 0x62350(%rip), %xmm3    # 0xf3398
addsd %xmm3, %xmm1
cvttsd2si %xmm1, %rax
cvttsd2si %xmm0, %rcx
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd 0x62653(%rip), %xmm5    # 0xf36b8
divsd %xmm5, %xmm0
movapd %xmm0, %xmm1
xorpd %xmm6, %xmm6
cmpltsd %xmm6, %xmm1
movapd %xmm1, %xmm2
movsd 0x6230e(%rip), %xmm4    # 0xf3390
andpd %xmm4, %xmm2
andnpd %xmm3, %xmm1
orpd %xmm2, %xmm1
addsd %xmm0, %xmm1
cvttsd2si %xmm1, %rax
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
subl %ebp, %r15d
divsd %xmm5, %xmm0
movapd %xmm0, %xmm1
cmpltsd %xmm6, %xmm1
movapd %xmm1, %xmm2
andpd %xmm4, %xmm2
andnpd %xmm3, %xmm1
orpd %xmm2, %xmm1
addsd %xmm0, %xmm1
cvttsd2si %xmm1, %rcx
addl %eax, %r15d
addl %ecx, %ebx
shlq $0x20, %rbx
addl %eax, %r12d
orq %rbx, %r15
movq 0x58(%rsp), %r13
addl 0x5d0(%r13), %r12d
addl 0xa0(%rsp), %r14d
leal (%rcx,%r14), %eax
addl $-0x2, %eax
shlq $0x20, %rax
orq %rax, %r12
movq %r15, 0x140(%rsp)
movq %r12, 0x148(%rsp)
movq 0x10(%rsp), %rdi
movq 0x48(%rsp), %rsi
leaq 0x140(%rsp), %rbp
movq %rbp, %rdx
movq 0x18(%rsp), %rcx
xorl %r8d, %r8d
callq 0x57b80
leaq 0xe8(%rsp), %r12
jmp 0x912b9
movl 0x5e4(%r13), %edx
movq %r12, %rdi
leaq 0xb8(%rsp), %rsi
callq 0x56a60
movl 0x5d0(%r13), %ebp
movl 0x5d4(%r13), %r13d
movq 0x18(%rsp), %rdi
movq 0xdac50(%rip), %rsi     # 0x16bdb8
callq 0x57680
movl %eax, %r14d
movl 0x2c(%rsp), %r15d
movl 0x30(%rsp), %ebx
movl 0x34(%rsp), %r12d
movl 0x38(%rsp), %eax
movl %eax, 0x48(%rsp)
movq 0x10(%rsp), %rdi
callq 0x58930
movsd 0x621f8(%rip), %xmm0    # 0xf3390
testw %ax, %ax
js 0x911a5
movsd 0x621f3(%rip), %xmm0    # 0xf3398
movq 0x60(%rsp), %rcx
subl %r13d, %ecx
addl $0x3, %r14d
imull %ecx, %r14d
subl %ebp, %r12d
addl %r14d, %ebx
cwtl
cvtsi2sd %eax, %xmm1
addsd %xmm1, %xmm0
andpd 0x622e4(%rip), %xmm1    # 0xf34b0
movsd 0x621c4(%rip), %xmm3    # 0xf3398
addsd %xmm3, %xmm1
cvttsd2si %xmm1, %rax
cvttsd2si %xmm0, %rcx
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd 0x624c7(%rip), %xmm5    # 0xf36b8
divsd %xmm5, %xmm0
movapd %xmm0, %xmm1
xorpd %xmm6, %xmm6
cmpltsd %xmm6, %xmm1
movapd %xmm1, %xmm2
movsd 0x62182(%rip), %xmm4    # 0xf3390
andpd %xmm4, %xmm2
andnpd %xmm3, %xmm1
orpd %xmm2, %xmm1
addsd %xmm0, %xmm1
cvttsd2si %xmm1, %rax
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
subl %ebp, %r15d
divsd %xmm5, %xmm0
movapd %xmm0, %xmm1
cmpltsd %xmm6, %xmm1
movapd %xmm1, %xmm2
andpd %xmm4, %xmm2
andnpd %xmm3, %xmm1
orpd %xmm2, %xmm1
addsd %xmm0, %xmm1
cvttsd2si %xmm1, %rcx
addl %eax, %r15d
addl %ecx, %ebx
shlq $0x20, %rbx
addl %eax, %r12d
orq %rbx, %r15
movq 0x58(%rsp), %r13
addl 0x5d0(%r13), %r12d
addl 0x48(%rsp), %r14d
leal (%rcx,%r14), %eax
addl $-0x2, %eax
shlq $0x20, %rax
orq %rax, %r12
movq %r15, 0x140(%rsp)
movq %r12, 0x148(%rsp)
movq 0x10(%rsp), %rdi
leaq 0xe8(%rsp), %r12
movq %r12, %rsi
leaq 0x140(%rsp), %rbp
movq %rbp, %rdx
movq 0x18(%rsp), %rcx
xorl %r8d, %r8d
callq 0x57b80
movq %r12, %rdi
callq 0x59200
movl 0x5c8(%r13), %ecx
movl 0x5cc(%r13), %eax
cmpl %eax, %ecx
sete %dl
movl %eax, %esi
orl %ecx, %esi
sets %sil
orb %dl, %sil
jne 0x91bf0
cmpl %eax, %ecx
movl %eax, %edx
cmovbl %ecx, %edx
cmoval %ecx, %eax
movl 0x28(%rsp), %esi
subl %esi, %edx
testl %edx, %edx
movl $0x0, %ecx
cmovlel %ecx, %edx
movl %edx, 0x6c(%rsp)
subl %esi, %eax
movl 0x24(%rsp), %ecx
cmpl %eax, %ecx
cmovll %ecx, %eax
movl %eax, 0x3c(%rsp)
cmpl %ecx, %edx
jge 0x91bf0
testl %eax, %eax
jle 0x91bf0
movq %r12, %rdi
callq 0x55d90
leaq 0xd42ef(%rip), %rbx     # 0x165620
movq %rbx, 0x128(%rsp)
leaq 0x130(%rsp), %rax
xorpd %xmm0, %xmm0
movupd %xmm0, (%rax)
leaq 0xd4230(%rip), %r14     # 0x165580
movq %r14, 0xe8(%rsp)
movq %rbp, %rdi
callq 0x55d90
movq %rbx, 0x180(%rsp)
leaq 0x188(%rsp), %rax
xorpd %xmm0, %xmm0
movupd %xmm0, (%rax)
movq %r14, 0x140(%rsp)
movq 0xd9fd9(%rip), %rax     # 0x16b360
cmpb $0x1, (%rax)
jne 0x9163b
leaq 0xb8(%rsp), %rdi
callq 0x57460
testb %al, %al
je 0x9163b
movq 0x50(%rsp), %rdi
shlq $0x2, %rdi
callq 0x56670
movq %rax, %r14
movq (%r13), %rax
movq %r13, %rdi
callq *0x160(%rax)
movzbl %al, %eax
orl $0x110, %eax            # imm = 0x110
movl %eax, 0x198(%rsp)
leaq 0xb8(%rsp), %rdi
leaq 0x65a2c(%rip), %rsi     # 0xf6e0d
callq 0x57940
movq $0x0, (%rsp)
movq %rax, %rdi
movl 0x24(%rsp), %esi
leaq 0x198(%rsp), %rdx
xorl %ecx, %ecx
movq %r14, %r8
xorl %r9d, %r9d
callq 0x56040
movslq 0x6c(%rsp), %r13
cmpl 0x3c(%rsp), %r13d
jge 0x914ed
cmpl $0x0, 0xf0(%rsp)
jle 0x9145c
xorl %r15d, %r15d
movq %r12, %rdi
movl %r15d, %esi
callq 0x8661e
movl (%r14,%r13,4), %ecx
incl %ecx
cmpl %ecx, (%rax)
je 0x91488
movq %rbp, %rdi
movl %r15d, %esi
callq 0x8661e
movl (%rax), %eax
cmpl (%r14,%r13,4), %eax
je 0x914b3
incl %r15d
cmpl 0xf0(%rsp), %r15d
jl 0x91427
leaq (%r14,%r13,4), %rbx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x8641a
movl (%rbx), %eax
incl %eax
movl %eax, 0x88(%rsp)
movq %rbp, %rdi
leaq 0x88(%rsp), %rsi
callq 0x8641a
jmp 0x914dc
movq %r12, %rdi
movl %r15d, %esi
callq 0x8661e
movl (%rax), %eax
decl %eax
movl %eax, 0x88(%rsp)
movq %r12, %rdi
movl %r15d, %esi
leaq 0x88(%rsp), %rdx
callq 0x8667a
jmp 0x914dc
movq %rbp, %rdi
movl %r15d, %esi
callq 0x8661e
movl (%rax), %eax
incl %eax
movl %eax, 0x88(%rsp)
movq %rbp, %rdi
movl %r15d, %esi
leaq 0x88(%rsp), %rdx
callq 0x8667a
incq %r13
movslq 0x3c(%rsp), %rax
cmpq %rax, %r13
jl 0x9141a
movq %r14, %rdi
callq 0x561e0
movl 0xf0(%rsp), %eax
cmpl $0x2, %eax
jl 0x9162c
xorl %ebx, %ebx
movl %ebx, %r13d
leal 0x1(%r13), %ebx
movl %ebx, %r14d
cmpl %eax, %ebx
jge 0x91621
movq %r12, %rdi
movl %r13d, %esi
callq 0x8661e
movl (%rax), %ebp
movq %r12, %rdi
movl %r14d, %esi
callq 0x8661e
cmpl (%rax), %ebp
jge 0x91556
leaq 0x140(%rsp), %rdi
movl %r13d, %esi
callq 0x8661e
movl (%rax), %ebp
movq %r12, %rdi
movl %r14d, %esi
callq 0x8661e
cmpl (%rax), %ebp
jge 0x915cd
movq %r12, %rdi
movl %r14d, %esi
callq 0x8661e
movl (%rax), %ebp
movq %r12, %rdi
movl %r13d, %esi
callq 0x8661e
cmpl (%rax), %ebp
jge 0x9160e
leaq 0x140(%rsp), %rdi
movl %r14d, %esi
callq 0x8661e
movl (%rax), %ebp
movq %r12, %rdi
movl %r13d, %esi
callq 0x8661e
cmpl (%rax), %ebp
jl 0x9160e
movq %r12, %rdi
movl %r14d, %esi
callq 0x8661e
movq %r12, %rdi
movl %r13d, %esi
movq %rax, %rdx
callq 0x8667a
movq %r12, %rdi
movl %r14d, %esi
callq 0x861ca
leaq 0x140(%rsp), %rdi
movl %r14d, %esi
callq 0x861ca
jmp 0x9160b
leaq 0x140(%rsp), %rdi
movl %r14d, %esi
callq 0x8661e
leaq 0x140(%rsp), %rdi
movl %r13d, %esi
movq %rax, %rdx
callq 0x8667a
movq %r12, %rdi
movl %r14d, %esi
callq 0x861ca
leaq 0x140(%rsp), %rdi
movl %r14d, %esi
callq 0x861ca
decl %r14d
incl %r14d
movl 0xf0(%rsp), %eax
cmpl %eax, %r14d
jl 0x91519
leal -0x1(%rax), %ecx
cmpl %ecx, %ebx
jl 0x91507
movq 0x58(%rsp), %r13
leaq 0x140(%rsp), %rbp
jmp 0x9165c
movq %r12, %rdi
leaq 0x6c(%rsp), %rsi
callq 0x8641a
movq %rbp, %rdi
leaq 0x3c(%rsp), %rsi
callq 0x8641a
movl 0xf0(%rsp), %eax
testl %eax, %eax
jle 0x91be0
xorl %r14d, %r14d
movq %r12, %rdi
movl %r14d, %esi
callq 0x8661e
movl (%rax), %edx
movq %r13, %rdi
leaq 0xb8(%rsp), %rsi
callq 0x55350
movl %eax, %r15d
movq %rbp, %rdi
movl %r14d, 0x28(%rsp)
movl %r14d, %esi
callq 0x8661e
movl (%rax), %edx
movq %r13, %rdi
leaq 0xb8(%rsp), %rsi
callq 0x55350
movl %eax, %ebp
movl 0x5d4(%r13), %r12d
movq 0x18(%rsp), %rdi
movq 0xda6fa(%rip), %rsi     # 0x16bdb8
callq 0x57680
movl %eax, %r14d
movq 0x10(%rsp), %rdi
callq 0x58930
movl %eax, %ebx
movq 0x18(%rsp), %rdi
movq 0xda6da(%rip), %rsi     # 0x16bdb8
callq 0x57680
movl %r15d, %esi
subl %ebp, %esi
movl %ebp, %edx
cmovll %r15d, %edx
negl %esi
movl %esi, %ecx
sarl $0x1f, %ecx
orl $0x1, %ecx
cmpl %r15d, %ebp
movl $0x0, %edi
cmovel %edi, %ecx
movsd 0x61c85(%rip), %xmm0    # 0xf3390
testw %bx, %bx
js 0x91718
movsd 0x61c80(%rip), %xmm0    # 0xf3398
imull %esi, %ecx
movswl %bx, %esi
cvtsi2sd %esi, %xmm1
addsd %xmm1, %xmm0
andpd 0x61d82(%rip), %xmm1    # 0xf34b0
movsd 0x61c62(%rip), %xmm4    # 0xf3398
addsd %xmm4, %xmm1
cvttsd2si %xmm1, %rsi
xorps %xmm1, %xmm1
cvtsi2sd %esi, %xmm1
movsd 0x61f6a(%rip), %xmm6    # 0xf36b8
divsd %xmm6, %xmm1
movapd %xmm1, %xmm2
xorpd %xmm7, %xmm7
cmpltsd %xmm7, %xmm2
movapd %xmm2, %xmm3
movsd 0x61c25(%rip), %xmm5    # 0xf3390
andpd %xmm5, %xmm3
andnpd %xmm4, %xmm2
orpd %xmm3, %xmm2
addsd %xmm1, %xmm2
cvttsd2si %xmm2, %rsi
addl 0xe0(%rsp), %edx
addl %edx, %esi
movq 0x60(%rsp), %rdx
subl %r12d, %edx
addl $0x3, %r14d
imull %edx, %r14d
cvttsd2si %xmm0, %rdx
xorps %xmm0, %xmm0
cvtsi2sd %edx, %xmm0
divsd %xmm6, %xmm0
movapd %xmm0, %xmm1
cmpltsd %xmm7, %xmm1
movapd %xmm1, %xmm2
andpd %xmm5, %xmm2
andnpd %xmm4, %xmm1
orpd %xmm2, %xmm1
addsd %xmm0, %xmm1
cvttsd2si %xmm1, %rdx
addl 0x80(%rsp), %r14d
addl %r14d, %edx
movl %esi, 0xd0(%rsp)
movl %edx, 0xd4(%rsp)
addl %ecx, %esi
movl %esi, 0xd8(%rsp)
addl %edx, %eax
addl $0x3, %eax
movl %eax, 0xdc(%rsp)
leaq 0x198(%rsp), %rbx
movq %rbx, %rdi
movq 0x18(%rsp), %rsi
callq 0x55b70
movq %rbx, %rdi
movq 0xd9ed8(%rip), %rsi     # 0x16b6f0
callq 0x58650
leaq 0x88(%rsp), %rbx
movq 0x10(%rsp), %rdi
leaq 0xd0(%rsp), %rsi
callq 0x55160
movq 0xda76a(%rip), %rax     # 0x16bfa8
movl (%rax), %ecx
movq $0x0, 0x88(%rsp)
movq 0x10(%rsp), %rdi
leaq 0xd0(%rsp), %rsi
movq 0xd9c00(%rip), %rdx     # 0x16b460
movq %rbx, %r8
callq 0x57930
movq 0x190(%r13), %rax
movl 0x30(%rax), %edi
movl $0x2, %esi
callq 0x583f0
testb %al, %al
je 0x91a1a
movq %rbx, %rdi
xorl %esi, %esi
callq 0x58e20
movq %rbx, %rdi
movl $0x2a, %esi
movl 0x24(%rsp), %edx
callq 0x57bf0
movq %rax, 0x50(%rsp)
movq %r13, %rax
movl 0x5d0(%r13), %r13d
movl 0x5d4(%rax), %ebp
movq 0x18(%rsp), %rdi
movq 0xda4f8(%rip), %rsi     # 0x16bdb8
callq 0x57680
movl %eax, %r15d
movl 0x2c(%rsp), %ebx
movl 0x30(%rsp), %r14d
movl 0x34(%rsp), %r12d
movl 0x38(%rsp), %eax
movl %eax, 0x48(%rsp)
movq 0x10(%rsp), %rdi
callq 0x58930
movsd 0x61aa0(%rip), %xmm0    # 0xf3390
testw %ax, %ax
js 0x918fd
movsd 0x61a9b(%rip), %xmm0    # 0xf3398
movq 0x60(%rsp), %rcx
subl %ebp, %ecx
addl $0x3, %r15d
imull %ecx, %r15d
subl %r13d, %r12d
addl %r15d, %r14d
cwtl
cvtsi2sd %eax, %xmm1
addsd %xmm1, %xmm0
andpd 0x61b8d(%rip), %xmm1    # 0xf34b0
movsd 0x61a6d(%rip), %xmm3    # 0xf3398
addsd %xmm3, %xmm1
cvttsd2si %xmm1, %rax
cvttsd2si %xmm0, %rcx
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd 0x61d70(%rip), %xmm5    # 0xf36b8
divsd %xmm5, %xmm0
movapd %xmm0, %xmm1
xorpd %xmm6, %xmm6
cmpltsd %xmm6, %xmm1
movapd %xmm1, %xmm2
movsd 0x61a2b(%rip), %xmm4    # 0xf3390
andpd %xmm4, %xmm2
andnpd %xmm3, %xmm1
orpd %xmm2, %xmm1
addsd %xmm0, %xmm1
cvttsd2si %xmm1, %rax
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
subl %r13d, %ebx
divsd %xmm5, %xmm0
movapd %xmm0, %xmm1
cmpltsd %xmm6, %xmm1
movapd %xmm1, %xmm2
andpd %xmm4, %xmm2
andnpd %xmm3, %xmm1
orpd %xmm2, %xmm1
addsd %xmm0, %xmm1
cvttsd2si %xmm1, %rcx
addl %eax, %ebx
addl %ecx, %r14d
shlq $0x20, %r14
addl %eax, %r12d
orq %r14, %rbx
movq 0x58(%rsp), %r13
addl 0x5d0(%r13), %r12d
addl 0x48(%rsp), %r15d
leal (%rcx,%r15), %eax
addl $-0x2, %eax
shlq $0x20, %rax
orq %rax, %r12
movq %rbx, 0xa8(%rsp)
movq %r12, 0xb0(%rsp)
movq 0x10(%rsp), %rdi
movq 0x50(%rsp), %rsi
leaq 0xa8(%rsp), %rdx
leaq 0x198(%rsp), %rbx
movq %rbx, %rcx
xorl %r8d, %r8d
callq 0x57b80
leaq 0x88(%rsp), %rdi
jmp 0x91ba3
movl 0x5e4(%r13), %edx
movq %rbx, %rdi
leaq 0xb8(%rsp), %rsi
callq 0x56a60
movq %r13, %rax
movl 0x5d0(%r13), %r13d
movl 0x5d4(%rax), %ebp
movq 0x18(%rsp), %rdi
movq 0xda36b(%rip), %rsi     # 0x16bdb8
callq 0x57680
movl %eax, %r14d
movl 0x2c(%rsp), %ebx
movl 0x30(%rsp), %r12d
movl 0x34(%rsp), %r15d
movl 0x38(%rsp), %eax
movl %eax, 0x50(%rsp)
movq 0x10(%rsp), %rdi
callq 0x58930
movsd 0x61913(%rip), %xmm0    # 0xf3390
testw %ax, %ax
js 0x91a8a
movsd 0x6190e(%rip), %xmm0    # 0xf3398
movq 0x60(%rsp), %rcx
subl %ebp, %ecx
addl $0x3, %r14d
imull %ecx, %r14d
subl %r13d, %r15d
addl %r14d, %r12d
cwtl
cvtsi2sd %eax, %xmm1
addsd %xmm1, %xmm0
andpd 0x61a00(%rip), %xmm1    # 0xf34b0
movsd 0x618e0(%rip), %xmm3    # 0xf3398
addsd %xmm3, %xmm1
cvttsd2si %xmm1, %rax
cvttsd2si %xmm0, %rcx
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd 0x61be3(%rip), %xmm5    # 0xf36b8
divsd %xmm5, %xmm0
movapd %xmm0, %xmm1
xorpd %xmm6, %xmm6
cmpltsd %xmm6, %xmm1
movapd %xmm1, %xmm2
movsd 0x6189e(%rip), %xmm4    # 0xf3390
andpd %xmm4, %xmm2
andnpd %xmm3, %xmm1
orpd %xmm2, %xmm1
addsd %xmm0, %xmm1
cvttsd2si %xmm1, %rax
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
subl %r13d, %ebx
divsd %xmm5, %xmm0
movapd %xmm0, %xmm1
cmpltsd %xmm6, %xmm1
movapd %xmm1, %xmm2
andpd %xmm4, %xmm2
andnpd %xmm3, %xmm1
orpd %xmm2, %xmm1
addsd %xmm0, %xmm1
cvttsd2si %xmm1, %rcx
addl %eax, %ebx
addl %ecx, %r12d
shlq $0x20, %r12
addl %eax, %r15d
orq %r12, %rbx
movq 0x58(%rsp), %r13
addl 0x5d0(%r13), %r15d
addl 0x50(%rsp), %r14d
leal (%rcx,%r14), %eax
addl $-0x2, %eax
shlq $0x20, %rax
orq %rax, %r15
movq %rbx, 0xa8(%rsp)
movq %r15, 0xb0(%rsp)
movq 0x10(%rsp), %rdi
leaq 0x88(%rsp), %r14
movq %r14, %rsi
leaq 0xa8(%rsp), %rdx
leaq 0x198(%rsp), %rbx
movq %rbx, %rcx
xorl %r8d, %r8d
callq 0x57b80
movq %r14, %rdi
callq 0x59200
leaq 0xe8(%rsp), %r12
leaq 0x140(%rsp), %rbp
movl 0x28(%rsp), %r14d
movq 0x10(%rsp), %rdi
callq 0x58780
movq %rbx, %rdi
callq 0x56720
incl %r14d
cmpl 0xf0(%rsp), %r14d
jl 0x91667
movq %rbp, %rdi
callq 0x86004
movq %r12, %rdi
callq 0x86004
leaq 0xb8(%rsp), %rdi
callq 0x59200
movq 0x40(%rsp), %rdi
movl 0xa4(%rsp), %ebx
movl %ebx, %esi
callq 0x8661e
movl (%rax), %ebp
movl %ebx, %r14d
cmpl 0x70(%rsp), %ebp
jle 0x90f0b
movq 0x10(%rsp), %rdi
callq 0x58780
xorl %eax, %eax
addq $0x1d8, %rsp            # imm = 0x1D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x91cc3
jmp 0x91cc3
movq %rax, %rbx
jmp 0x91cd3
jmp 0x91c7a
jmp 0x91cc3
jmp 0x91cc3
jmp 0x91c7a
jmp 0x91c64
jmp 0x91c64
jmp 0x91c64
jmp 0x91c64
jmp 0x91c7a
jmp 0x91c64
jmp 0x91c64
jmp 0x91cc3
movq %rax, %rbx
leaq 0xe8(%rsp), %rdi
callq 0x59200
jmp 0x91ce0
jmp 0x91cc3
jmp 0x91cc3
movq %rax, %rbx
jmp 0x91ce0
jmp 0x91c8f
jmp 0x91cb1
jmp 0x91c8f
jmp 0x91c8f
jmp 0x91cb1
jmp 0x91c8f
jmp 0x91c8f
jmp 0x91c8f
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
callq 0x59200
jmp 0x91cb4
jmp 0x91cb1
jmp 0x91cc3
jmp 0x91cc3
jmp 0x91cc3
jmp 0x91cc3
jmp 0x91cc3
jmp 0x91cc3
jmp 0x91cc3
movq %rax, %rbx
leaq 0x198(%rsp), %rdi
callq 0x56720
jmp 0x91cc6
movq %rax, %rbx
leaq 0x140(%rsp), %rdi
callq 0x86004
leaq 0xe8(%rsp), %rdi
callq 0x86004
leaq 0xb8(%rsp), %rdi
callq 0x59200
movq %rbx, %rdi
callq 0x57090
nop