// File: /workspace/github_c_makefile_star2_O1/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 0xdbb09(%rip), %rsi     # 0x16cdb8
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 0x9130b
movl %edx, 0x5d8(%r13)
testl %eax, %eax
jg 0x912f8
movl $0x0, 0x5d4(%r13)
leaq 0x748(%r13), %rdi
movl 0x5d4(%r13), %esi
callq 0x72e5c
movq 0x78(%rsp), %rdi
callq 0x57180
movq %rax, 0x70(%rsp)
leaq 0x5e8(%r13), %rax
movq %rax, 0x48(%rsp)
cmpl $0x0, 0x5f0(%r13)
jne 0x913a6
leaq 0xe0(%rsp), %rsi
movl $0x0, (%rsi)
movq 0x48(%rsp), %rdi
callq 0x86944
cmpl $0x0, 0x70(%rsp)
js 0x913a6
movq 0x70(%rsp), %rax
leal 0x1(%rax), %ebp
xorl %r14d, %r14d
leaq 0xe0(%rsp), %rbx
movq 0x78(%rsp), %rdi
movl %r14d, %esi
callq 0x58990
cmpl $0xa, (%rax)
je 0x91386
movq 0x78(%rsp), %rdi
movl %r14d, %esi
callq 0x58990
cmpl $0x0, (%rax)
jne 0x9139e
leal 0x1(%r14), %eax
movl %eax, 0xe0(%rsp)
movq 0x48(%rsp), %rdi
movq %rbx, %rsi
callq 0x86944
incl %r14d
cmpl %r14d, %ebp
jne 0x91362
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, 0x138(%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 0xe0(%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 0xdbb6f(%rip), %rcx     # 0x16cfa8
movl (%rcx), %ecx
movq $0x0, (%r14)
leaq 0xe0(%rsp), %r8
movq %r15, 0x10(%rsp)
movq %r15, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x57930
movl 0x5d4(%r13), %r14d
movq 0x48(%rsp), %rdi
movl %r14d, %esi
callq 0x86b48
movl (%rax), %ebp
cmpl 0x70(%rsp), %ebp
jg 0x921e0
movq 0x80(%rsp), %rax
decl %eax
movq %rax, 0x80(%rsp)
leaq 0xe0(%rsp), %r12
movq %r13, 0x40(%rsp)
movl %r14d, %ebx
subl 0x5d4(%r13), %ebx
movq 0x18(%rsp), %rdi
movq 0xdb906(%rip), %rsi     # 0x16cdb8
callq 0x58a50
addl $0x3, %eax
imull %ebx, %eax
movl 0x38(%rsp), %ecx
subl 0x30(%rsp), %ecx
cmpl %ecx, %eax
jge 0x921e0
leal 0x1(%r14), %ebx
movq 0x48(%rsp), %rdi
movl %ebx, %esi
callq 0x86b48
movslq (%rax), %rax
movslq %ebp, %rdx
subq %rdx, %rax
movq %rax, 0x58(%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 0x916c6
movq %r12, %rdi
xorl %esi, %esi
callq 0x58e20
movq %r12, %rdi
movl $0x2a, %esi
movl 0x24(%rsp), %edx
callq 0x57bf0
movq %rax, 0x50(%rsp)
movl 0x5d0(%r13), %ebx
movl 0x5d4(%r13), %r15d
movq 0x18(%rsp), %rdi
movq 0xdb84e(%rip), %rsi     # 0x16cdb8
callq 0x57680
movl %eax, %r13d
movl 0x2c(%rsp), %r12d
movl 0x30(%rsp), %r14d
movl 0x34(%rsp), %ebp
movl 0x38(%rsp), %eax
movl %eax, 0xa0(%rsp)
movq 0x10(%rsp), %rdi
callq 0x58930
movsd 0x62df3(%rip), %xmm0    # 0xf4390
testw %ax, %ax
js 0x915aa
movsd 0x62dee(%rip), %xmm0    # 0xf4398
movq 0x60(%rsp), %rcx
subl %r15d, %ecx
addl $0x3, %r13d
imull %ecx, %r13d
subl %ebx, %ebp
addl %r13d, %r14d
cwtl
cvtsi2sd %eax, %xmm1
addsd %xmm1, %xmm0
andpd 0x65860(%rip), %xmm1    # 0xf6e30
movsd 0x62dc0(%rip), %xmm3    # 0xf4398
addsd %xmm3, %xmm1
cvttsd2si %xmm1, %rax
cvttsd2si %xmm0, %rcx
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd 0x62efb(%rip), %xmm5    # 0xf44f0
divsd %xmm5, %xmm0
movapd %xmm0, %xmm1
xorpd %xmm6, %xmm6
cmpltsd %xmm6, %xmm1
movapd %xmm1, %xmm2
movsd 0x62d7e(%rip), %xmm4    # 0xf4390
andpd %xmm4, %xmm2
andnpd %xmm3, %xmm1
orpd %xmm2, %xmm1
addsd %xmm0, %xmm1
cvttsd2si %xmm1, %rax
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
subl %ebx, %r12d
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, %r12d
addl %ecx, %r14d
addl %eax, %ebp
movq 0x40(%rsp), %rax
addl 0x5d0(%rax), %ebp
shlq $0x20, %r14
addl 0xa0(%rsp), %r13d
leal (%rcx,%r13), %eax
addl $-0x2, %eax
orq %r14, %r12
shlq $0x20, %rax
orq %rax, %rbp
movq %r12, 0x140(%rsp)
movq %rbp, 0x148(%rsp)
movq 0x10(%rsp), %rdi
movq 0x50(%rsp), %rsi
leaq 0x140(%rsp), %rbp
movq %rbp, %rdx
movq 0x18(%rsp), %rcx
xorl %r8d, %r8d
callq 0x57b80
leaq 0xe0(%rsp), %r12
jmp 0x91848
movl 0x5e4(%r13), %edx
movq %r12, %rdi
leaq 0xb8(%rsp), %rsi
callq 0x56a60
movl 0x5d0(%r13), %ebx
movl 0x5d4(%r13), %r15d
movq 0x18(%rsp), %rdi
movq 0xdb6c1(%rip), %rsi     # 0x16cdb8
callq 0x57680
movl %eax, %r14d
movl 0x2c(%rsp), %r12d
movl 0x30(%rsp), %ebp
movl 0x34(%rsp), %r13d
movl 0x38(%rsp), %eax
movl %eax, 0x50(%rsp)
movq 0x10(%rsp), %rdi
callq 0x58930
movsd 0x62c69(%rip), %xmm0    # 0xf4390
testw %ax, %ax
js 0x91734
movsd 0x62c64(%rip), %xmm0    # 0xf4398
movq 0x60(%rsp), %rcx
subl %r15d, %ecx
addl $0x3, %r14d
imull %ecx, %r14d
subl %ebx, %r13d
addl %r14d, %ebp
cwtl
cvtsi2sd %eax, %xmm1
addsd %xmm1, %xmm0
andpd 0x656d5(%rip), %xmm1    # 0xf6e30
movsd 0x62c35(%rip), %xmm3    # 0xf4398
addsd %xmm3, %xmm1
cvttsd2si %xmm1, %rax
cvttsd2si %xmm0, %rcx
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd 0x62d70(%rip), %xmm5    # 0xf44f0
divsd %xmm5, %xmm0
movapd %xmm0, %xmm1
xorpd %xmm6, %xmm6
cmpltsd %xmm6, %xmm1
movapd %xmm1, %xmm2
movsd 0x62bf3(%rip), %xmm4    # 0xf4390
andpd %xmm4, %xmm2
andnpd %xmm3, %xmm1
orpd %xmm2, %xmm1
addsd %xmm0, %xmm1
cvttsd2si %xmm1, %rax
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
subl %ebx, %r12d
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, %r12d
addl %ecx, %ebp
addl %eax, %r13d
movq 0x40(%rsp), %rax
addl 0x5d0(%rax), %r13d
shlq $0x20, %rbp
addl 0x50(%rsp), %r14d
leal (%rcx,%r14), %eax
addl $-0x2, %eax
orq %rbp, %r12
shlq $0x20, %rax
orq %rax, %r13
movq %r12, 0x140(%rsp)
movq %r13, 0x148(%rsp)
movq 0x10(%rsp), %rdi
leaq 0xe0(%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
movq 0x40(%rsp), %r13
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 0x921b1
cmpl %eax, %ecx
movl %eax, %edx
cmovll %ecx, %edx
cmovgl %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 0x921b1
testl %eax, %eax
jle 0x921b1
movq %r12, %rdi
callq 0x55d90
leaq 0xd4d23(%rip), %rbx     # 0x1665e8
movq %rbx, 0xe0(%rsp)
leaq 0xd4d4c(%rip), %r14     # 0x166620
movq %r14, 0x120(%rsp)
leaq 0x128(%rsp), %rax
xorpd %xmm0, %xmm0
movupd %xmm0, (%rax)
leaq 0xd4c8d(%rip), %r15     # 0x166580
movq %r15, 0xe0(%rsp)
movq %rbp, %rdi
callq 0x55d90
movq %rbx, 0x140(%rsp)
movq %r14, 0x180(%rsp)
leaq 0x188(%rsp), %rax
xorpd %xmm0, %xmm0
movupd %xmm0, (%rax)
movq %r15, 0x140(%rsp)
movq 0xdaa2e(%rip), %rax     # 0x16c360
cmpb $0x1, (%rax)
jne 0x91bfd
leaq 0xb8(%rsp), %rdi
callq 0x57460
testb %al, %al
je 0x91bfd
movq 0x58(%rsp), %rax
movq %rax, %rdi
shlq $0x2, %rdi
testl %eax, %eax
movq $-0x1, %rax
cmovsq %rax, %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 0x662cd(%rip), %rsi     # 0xf7c69
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 0x91aa8
cmpl $0x0, 0xe8(%rsp)
jle 0x91a17
xorl %r15d, %r15d
movq %r12, %rdi
movl %r15d, %esi
callq 0x86b48
movl (%r14,%r13,4), %ecx
incl %ecx
cmpl %ecx, (%rax)
je 0x91a43
movq %rbp, %rdi
movl %r15d, %esi
callq 0x86b48
movl (%rax), %eax
cmpl (%r14,%r13,4), %eax
je 0x91a6e
incl %r15d
cmpl 0xe8(%rsp), %r15d
jl 0x919e2
leaq (%r14,%r13,4), %rbx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x86944
movl (%rbx), %eax
incl %eax
movl %eax, 0x88(%rsp)
movq %rbp, %rdi
leaq 0x88(%rsp), %rsi
callq 0x86944
jmp 0x91a97
movq %r12, %rdi
movl %r15d, %esi
callq 0x86b48
movl (%rax), %eax
decl %eax
movl %eax, 0x88(%rsp)
movq %r12, %rdi
movl %r15d, %esi
leaq 0x88(%rsp), %rdx
callq 0x86ba4
jmp 0x91a97
movq %rbp, %rdi
movl %r15d, %esi
callq 0x86b48
movl (%rax), %eax
incl %eax
movl %eax, 0x88(%rsp)
movq %rbp, %rdi
movl %r15d, %esi
leaq 0x88(%rsp), %rdx
callq 0x86ba4
incq %r13
movslq 0x3c(%rsp), %rax
cmpq %rax, %r13
jl 0x919d5
movq %r14, %rdi
callq 0x561e0
cmpl $0x2, 0xe8(%rsp)
jl 0x91bee
xorl %ebx, %ebx
movl %ebx, %r13d
leal 0x1(%r13), %ebx
movl %ebx, %r14d
cmpl 0xe8(%rsp), %ebx
jge 0x91bdd
movq %r12, %rdi
movl %r13d, %esi
callq 0x86b48
movl (%rax), %ebp
movq %r12, %rdi
movl %r14d, %esi
callq 0x86b48
cmpl (%rax), %ebp
jge 0x91b14
leaq 0x140(%rsp), %rdi
movl %r13d, %esi
callq 0x86b48
movl (%rax), %ebp
movq %r12, %rdi
movl %r14d, %esi
callq 0x86b48
cmpl (%rax), %ebp
jge 0x91b8b
movq %r12, %rdi
movl %r14d, %esi
callq 0x86b48
movl (%rax), %ebp
movq %r12, %rdi
movl %r13d, %esi
callq 0x86b48
cmpl (%rax), %ebp
jge 0x91bcc
leaq 0x140(%rsp), %rdi
movl %r14d, %esi
callq 0x86b48
movl (%rax), %ebp
movq %r12, %rdi
movl %r13d, %esi
callq 0x86b48
cmpl (%rax), %ebp
jl 0x91bcc
movq %r12, %rdi
movl %r14d, %esi
callq 0x86b48
movq %r12, %rdi
movl %r13d, %esi
movq %rax, %rdx
callq 0x86ba4
movq %r12, %rdi
movl %r14d, %esi
callq 0x866e4
leaq 0x140(%rsp), %rdi
movl %r14d, %esi
callq 0x866e4
jmp 0x91bc9
leaq 0x140(%rsp), %rdi
movl %r14d, %esi
callq 0x86b48
leaq 0x140(%rsp), %rdi
movl %r13d, %esi
movq %rax, %rdx
callq 0x86ba4
movq %r12, %rdi
movl %r14d, %esi
callq 0x866e4
leaq 0x140(%rsp), %rdi
movl %r14d, %esi
callq 0x866e4
decl %r14d
incl %r14d
cmpl 0xe8(%rsp), %r14d
jl 0x91ad7
movl 0xe8(%rsp), %eax
decl %eax
cmpl %eax, %ebx
jl 0x91ac0
movq 0x40(%rsp), %r13
leaq 0x140(%rsp), %rbp
jmp 0x91c17
movq %r12, %rdi
leaq 0x6c(%rsp), %rsi
callq 0x86944
movq %rbp, %rdi
leaq 0x3c(%rsp), %rsi
callq 0x86944
cmpl $0x0, 0xe8(%rsp)
jle 0x921a1
xorl %r14d, %r14d
movq %r12, %rdi
movl %r14d, %esi
callq 0x86b48
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 0x86b48
movl (%rax), %edx
movq %r13, %rdi
leaq 0xb8(%rsp), %rsi
callq 0x55350
movl %eax, %ebp
movl 0x5d4(%r13), %r12d
movq 0x18(%rsp), %rdi
movq 0xdb139(%rip), %rsi     # 0x16cdb8
callq 0x57680
movl %eax, %r14d
movq 0x10(%rsp), %rdi
callq 0x58930
movl %eax, %ebx
movq 0x18(%rsp), %rdi
movq 0xdb119(%rip), %rsi     # 0x16cdb8
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 0x626c4(%rip), %xmm0    # 0xf4390
testw %bx, %bx
js 0x91cd9
movsd 0x626bf(%rip), %xmm0    # 0xf4398
imull %esi, %ecx
movswl %bx, %esi
cvtsi2sd %esi, %xmm1
addsd %xmm1, %xmm0
andpd 0x65141(%rip), %xmm1    # 0xf6e30
movsd 0x626a1(%rip), %xmm4    # 0xf4398
addsd %xmm4, %xmm1
cvttsd2si %xmm1, %rsi
xorps %xmm1, %xmm1
cvtsi2sd %esi, %xmm1
movsd 0x627e1(%rip), %xmm6    # 0xf44f0
divsd %xmm6, %xmm1
movapd %xmm1, %xmm2
xorpd %xmm7, %xmm7
cmpltsd %xmm7, %xmm2
movapd %xmm2, %xmm3
movsd 0x62664(%rip), %xmm5    # 0xf4390
andpd %xmm5, %xmm3
andnpd %xmm4, %xmm2
orpd %xmm3, %xmm2
addsd %xmm1, %xmm2
cvttsd2si %xmm2, %rsi
addl 0x138(%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 0xda917(%rip), %rsi     # 0x16c6f0
callq 0x58650
leaq 0x88(%rsp), %rbx
movq 0x10(%rsp), %rdi
leaq 0xd0(%rsp), %rsi
callq 0x55160
movq 0xdb1a9(%rip), %rax     # 0x16cfa8
movl (%rax), %ecx
movq $0x0, 0x88(%rsp)
movq 0x10(%rsp), %rdi
leaq 0xd0(%rsp), %rsi
movq 0xda63f(%rip), %rdx     # 0x16c460
movq %rbx, %r8
callq 0x57930
movq 0x190(%r13), %rax
movl 0x30(%rax), %edi
movl $0x2, %esi
callq 0x583f0
testb %al, %al
je 0x91fdb
movq %rbx, %rdi
xorl %esi, %esi
callq 0x58e20
movq %rbx, %rdi
movl $0x2a, %esi
movl 0x24(%rsp), %edx
callq 0x57bf0
movq %rax, 0x58(%rsp)
movq %r13, %rax
movl 0x5d0(%r13), %r13d
movl 0x5d4(%rax), %r14d
movq 0x18(%rsp), %rdi
movq 0xdaf36(%rip), %rsi     # 0x16cdb8
callq 0x57680
movl %eax, %r15d
movl 0x2c(%rsp), %ebx
movl 0x30(%rsp), %ebp
movl 0x34(%rsp), %r12d
movl 0x38(%rsp), %eax
movl %eax, 0x50(%rsp)
movq 0x10(%rsp), %rdi
callq 0x58930
movsd 0x624df(%rip), %xmm0    # 0xf4390
testw %ax, %ax
js 0x91ebe
movsd 0x624da(%rip), %xmm0    # 0xf4398
movq 0x60(%rsp), %rcx
subl %r14d, %ecx
addl $0x3, %r15d
imull %ecx, %r15d
subl %r13d, %r12d
addl %r15d, %ebp
cwtl
cvtsi2sd %eax, %xmm1
addsd %xmm1, %xmm0
andpd 0x64f4b(%rip), %xmm1    # 0xf6e30
movsd 0x624ab(%rip), %xmm3    # 0xf4398
addsd %xmm3, %xmm1
cvttsd2si %xmm1, %rax
cvttsd2si %xmm0, %rcx
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd 0x625e6(%rip), %xmm5    # 0xf44f0
divsd %xmm5, %xmm0
movapd %xmm0, %xmm1
xorpd %xmm6, %xmm6
cmpltsd %xmm6, %xmm1
movapd %xmm1, %xmm2
movsd 0x62469(%rip), %xmm4    # 0xf4390
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, %ebp
addl %eax, %r12d
movq 0x40(%rsp), %r13
addl 0x5d0(%r13), %r12d
shlq $0x20, %rbp
addl 0x50(%rsp), %r15d
leal (%rcx,%r15), %eax
addl $-0x2, %eax
orq %rbp, %rbx
shlq $0x20, %rax
orq %rax, %r12
movq %rbx, 0xa8(%rsp)
movq %r12, 0xb0(%rsp)
movq 0x10(%rsp), %rdi
movq 0x58(%rsp), %rsi
leaq 0xa8(%rsp), %rdx
leaq 0x198(%rsp), %rbx
movq %rbx, %rcx
xorl %r8d, %r8d
callq 0x57b80
leaq 0x88(%rsp), %rdi
jmp 0x92164
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 0xdadaa(%rip), %rsi     # 0x16cdb8
callq 0x57680
movl %eax, %r14d
movl 0x2c(%rsp), %ebx
movl 0x30(%rsp), %r12d
movl 0x34(%rsp), %r15d
movl 0x38(%rsp), %eax
movl %eax, 0x58(%rsp)
movq 0x10(%rsp), %rdi
callq 0x58930
movsd 0x62352(%rip), %xmm0    # 0xf4390
testw %ax, %ax
js 0x9204b
movsd 0x6234d(%rip), %xmm0    # 0xf4398
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 0x64dbf(%rip), %xmm1    # 0xf6e30
movsd 0x6231f(%rip), %xmm3    # 0xf4398
addsd %xmm3, %xmm1
cvttsd2si %xmm1, %rax
cvttsd2si %xmm0, %rcx
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd 0x6245a(%rip), %xmm5    # 0xf44f0
divsd %xmm5, %xmm0
movapd %xmm0, %xmm1
xorpd %xmm6, %xmm6
cmpltsd %xmm6, %xmm1
movapd %xmm1, %xmm2
movsd 0x622dd(%rip), %xmm4    # 0xf4390
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
addl %eax, %r15d
movq 0x40(%rsp), %r13
addl 0x5d0(%r13), %r15d
shlq $0x20, %r12
addl 0x58(%rsp), %r14d
leal (%rcx,%r14), %eax
addl $-0x2, %eax
orq %r12, %rbx
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 0xe0(%rsp), %r12
leaq 0x140(%rsp), %rbp
movl 0x28(%rsp), %r14d
movq 0x10(%rsp), %rdi
callq 0x58780
movq %rbx, %rdi
callq 0x56720
incl %r14d
cmpl 0xe8(%rsp), %r14d
jl 0x91c28
movq %rbp, %rdi
callq 0x8651c
movq %r12, %rdi
callq 0x8651c
leaq 0xb8(%rsp), %rdi
callq 0x59200
movq 0x48(%rsp), %rdi
movl 0xa4(%rsp), %ebx
movl %ebx, %esi
callq 0x86b48
movl (%rax), %ebp
movl %ebx, %r14d
cmpl 0x70(%rsp), %ebp
jle 0x9149c
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 0x92284
jmp 0x92284
movq %rax, %rbx
jmp 0x92294
jmp 0x9223b
jmp 0x92284
jmp 0x92284
jmp 0x9223b
jmp 0x92225
jmp 0x92225
jmp 0x92225
jmp 0x92225
jmp 0x9223b
jmp 0x92225
jmp 0x92225
jmp 0x92284
movq %rax, %rbx
leaq 0xe0(%rsp), %rdi
callq 0x59200
jmp 0x922a1
jmp 0x92284
jmp 0x92284
movq %rax, %rbx
jmp 0x922a1
jmp 0x92250
jmp 0x92272
jmp 0x92250
jmp 0x92250
jmp 0x92272
jmp 0x92250
jmp 0x92250
jmp 0x92250
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
callq 0x59200
jmp 0x92275
jmp 0x92272
jmp 0x92284
jmp 0x92284
jmp 0x92284
jmp 0x92284
jmp 0x92284
jmp 0x92284
jmp 0x92284
movq %rax, %rbx
leaq 0x198(%rsp), %rdi
callq 0x56720
jmp 0x92287
movq %rax, %rbx
leaq 0x140(%rsp), %rdi
callq 0x8651c
leaq 0xe0(%rsp), %rdi
callq 0x8651c
leaq 0xb8(%rsp), %rdi
callq 0x59200
movq %rbx, %rdi
callq 0x57090