// File: /workspace/github_c_makefile_star2_O2/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 $0x1f8, %rsp            # imm = 0x1F8
movq %rdi, %r12
leaq 0x140(%rdi), %r13
leaq 0xf0(%rdi), %rsi
movq %r13, %rdi
movq %rsi, 0x60(%rsp)
callq 0x59d90
subl 0xb4(%r12), %eax
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x10(%rsp)
movq 0xd4578(%rip), %rsi     # 0x161db8
movq %r13, %rdi
callq 0x59d90
addl $0x3, %eax
cvtsi2sd %eax, %xmm1
movsd 0x10(%rsp), %xmm0
divsd %xmm1, %xmm0
callq 0x57e30
xorl %edx, %edx
testl %eax, %eax
cmovgl %eax, %edx
cmpl 0x5d8(%r12), %edx
je 0x8d89d
movl %edx, 0x5d8(%r12)
testl %eax, %eax
jle 0x8d885
movl 0x5d4(%r12), %esi
jmp 0x8d890
andl $0x0, 0x5d4(%r12)
xorl %esi, %esi
leaq 0x748(%r12), %rdi
callq 0x7260e
movq 0x60(%rsp), %rdi
callq 0x58370
movl %eax, 0x4c(%rsp)
leaq 0x5e8(%r12), %rax
movq %rax, 0x38(%rsp)
cmpl $0x0, 0x5f0(%r12)
je 0x8e4f8
movq (%r12), %rax
movq %r12, %rdi
callq *0x40(%rax)
movq %rax, %rbx
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
leaq 0xc0(%rsp), %rbp
movq %r14, 0x158(%rsp)
movl %r14d, (%rbp)
movl %r15d, 0x4(%rbp)
movl %ecx, 0x8(%rbp)
addl %r15d, %eax
movl %eax, 0xc(%rbp)
movq (%r12), %rax
movq %r12, %rdi
callq *0x130(%rax)
leaq 0xf0(%rsp), %r14
movq %rax, (%r14)
movq %rdx, 0x8(%r14)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x56160
movq (%r12), %rax
movq %r12, %rdi
callq *0x140(%rax)
movq 0xd4652(%rip), %rcx     # 0x161fa8
movl (%rcx), %ecx
andq $0x0, (%r14)
leaq 0xf0(%rsp), %r8
movq %rbx, 0x10(%rsp)
movq %rbx, %rdi
movq %rbp, %rsi
movq %rax, %rdx
callq 0x58b80
movl 0x5d4(%r12), %r14d
movq 0x38(%rsp), %rdi
movl %r14d, %esi
callq 0x840de
decl %r15d
movq %r15, 0x150(%rsp)
movq %r12, 0x148(%rsp)
movq %r13, 0xd0(%rsp)
movslq (%rax), %r15
cmpl 0x4c(%rsp), %r15d
jg 0x8e4da
movl %r14d, %ebx
subl 0x5d4(%r12), %ebx
movq %r13, %rdi
movq 0xd43ee(%rip), %rsi     # 0x161db8
callq 0x59d90
addl $0x3, %eax
imull %ebx, %eax
movl 0xcc(%rsp), %ecx
subl 0xc4(%rsp), %ecx
cmpl %ecx, %eax
jge 0x8e4da
movq %r14, 0x40(%rsp)
leal 0x1(%r14), %esi
movq 0x38(%rsp), %rdi
movl %esi, 0xb4(%rsp)
callq 0x840de
movslq (%rax), %rbp
subq %r15, %rbp
leal -0x1(%rbp), %ecx
leaq 0xd8(%rsp), %rdi
movq 0x60(%rsp), %rsi
movl %r15d, %edx
movl %ecx, 0x1c(%rsp)
callq 0x5a2c0
movq 0x190(%r12), %rax
movl 0x30(%rax), %edi
pushq $0x2
popq %rsi
callq 0x596b0
testb %al, %al
je 0x8db8a
leaq 0xf0(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5a180
movq %r15, %r14
movq %rbx, %rdi
pushq $0x2a
popq %rsi
movl 0x1c(%rsp), %edx
callq 0x58e70
movq %rax, 0x68(%rsp)
movl 0x5d0(%r12), %ebx
movl 0x5d4(%r12), %r15d
movq %r13, %rdi
movq 0xd4333(%rip), %rsi     # 0x161db8
callq 0x588a0
movq 0x40(%rsp), %rcx
subl %r15d, %ecx
negl %ebx
addl $0x3, %eax
imull %ecx, %eax
movl %ebx, 0x20(%rsp)
movl %eax, 0x24(%rsp)
leaq 0xc0(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x58930
movq %rax, 0x160(%rsp)
movq %rdx, 0x168(%rsp)
movabsq $0x100000000, %rax      # imm = 0x100000000
movq %rax, 0x70(%rsp)
movq 0x10(%rsp), %rdi
callq 0x59c60
movq %r14, %r15
cwtl
cvtsi2sd %eax, %xmm0
leaq 0x70(%rsp), %rdi
callq 0x570c0
movq %rax, 0x80(%rsp)
leaq 0x80(%rsp), %rdi
movsd 0x55a09(%rip), %xmm0    # 0xe3510
callq 0x59600
movq %rax, 0x90(%rsp)
leaq 0x160(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x58930
movl 0x5d0(%r12), %ecx
addl %edx, %ecx
movabsq $-0x100000000, %rsi     # imm = 0xFFFFFFFF00000000
andq %rsi, %rdx
movabsq $-0x200000000, %rsi     # imm = 0xFFFFFFFE00000000
addq %rsi, %rdx
orq %rdx, %rcx
movq %rax, 0x1a0(%rsp)
movq %rcx, 0x1a8(%rsp)
movq 0x10(%rsp), %rdi
movq 0x68(%rsp), %rsi
leaq 0x1a0(%rsp), %rdx
movq %r13, %rcx
xorl %r8d, %r8d
callq 0x58df0
leaq 0xf0(%rsp), %rdi
jmp 0x8dcbf
movl 0x5e4(%r12), %edx
leaq 0xf0(%rsp), %rdi
leaq 0xd8(%rsp), %rsi
callq 0x57bc0
movl 0x5d0(%r12), %ebx
movl 0x5d4(%r12), %r14d
movq %r13, %rdi
movq 0xd41f7(%rip), %rsi     # 0x161db8
callq 0x588a0
movq 0x40(%rsp), %rcx
subl %r14d, %ecx
negl %ebx
addl $0x3, %eax
imull %ecx, %eax
movl %ebx, 0x20(%rsp)
movl %eax, 0x24(%rsp)
leaq 0xc0(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x58930
movq %rax, 0x160(%rsp)
movq %rdx, 0x168(%rsp)
movabsq $0x100000000, %rax      # imm = 0x100000000
movq %rax, 0x70(%rsp)
movq 0x10(%rsp), %rdi
callq 0x59c60
cwtl
cvtsi2sd %eax, %xmm0
leaq 0x70(%rsp), %rdi
callq 0x570c0
movq %rax, 0x80(%rsp)
leaq 0x80(%rsp), %rdi
movsd 0x558d0(%rip), %xmm0    # 0xe3510
callq 0x59600
movq %rax, 0x90(%rsp)
leaq 0x160(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x58930
movl 0x5d0(%r12), %ecx
addl %edx, %ecx
movabsq $-0x100000000, %rsi     # imm = 0xFFFFFFFF00000000
andq %rsi, %rdx
movabsq $-0x200000000, %rsi     # imm = 0xFFFFFFFE00000000
addq %rsi, %rdx
orq %rdx, %rcx
movq %rax, 0x1a0(%rsp)
movq %rcx, 0x1a8(%rsp)
movq 0x10(%rsp), %rdi
leaq 0xf0(%rsp), %rbx
movq %rbx, %rsi
leaq 0x1a0(%rsp), %rdx
movq %r13, %rcx
xorl %r8d, %r8d
callq 0x58df0
movq %rbx, %rdi
callq 0x5a588
movl 0x5c8(%r12), %ecx
movl 0x5cc(%r12), %eax
cmpl %eax, %ecx
sete %dl
movl %eax, %esi
orl %ecx, %esi
sets %sil
orb %dl, %sil
jne 0x8e340
cmpl %eax, %ecx
movl %eax, %edx
cmovbl %ecx, %edx
cmoval %ecx, %eax
subl %r15d, %edx
testl %edx, %edx
movl $0x0, %ecx
cmovlel %ecx, %edx
movl %edx, 0x5c(%rsp)
subl %r15d, %eax
movl 0x1c(%rsp), %ecx
cmpl %eax, %ecx
cmovll %ecx, %eax
movl %eax, 0x58(%rsp)
cmpl %ecx, %edx
jge 0x8e340
testl %eax, %eax
jle 0x8e340
leaq 0xf0(%rsp), %rdi
callq 0x839de
leaq 0x1a0(%rsp), %rdi
callq 0x839de
movq 0xd361a(%rip), %rax     # 0x161360
cmpb $0x1, (%rax)
jne 0x8de9e
leaq 0xd8(%rsp), %rdi
callq 0x58660
testb %al, %al
je 0x8de9e
shlq $0x2, %rbp
movq %rbp, %rdi
callq 0x577a0
movq %rax, %r14
movq (%r12), %rax
movq %r12, %rdi
callq *0x160(%rax)
movzbl %al, %eax
orl $0x110, %eax            # imm = 0x110
movl %eax, 0x160(%rsp)
leaq 0xd8(%rsp), %rdi
leaq 0x58f6f(%rip), %rsi     # 0xe6d0d
callq 0x58b90
andq $0x0, (%rsp)
movq %rax, %rdi
movl 0x1c(%rsp), %esi
leaq 0x160(%rsp), %rdx
xorl %ecx, %ecx
movq %r14, %r8
xorl %r9d, %r9d
callq 0x57120
movslq 0x5c(%rsp), %r15
movslq 0x58(%rsp), %rax
cmpq %rax, %r15
jge 0x8e368
leaq (%r14,%r15,4), %rbx
xorl %ebp, %ebp
cmpl 0xf8(%rsp), %ebp
jge 0x8de16
leaq 0xf0(%rsp), %rdi
movl %ebp, %esi
callq 0x840de
movl (%rbx), %ecx
incl %ecx
cmpl %ecx, (%rax)
je 0x8de42
leaq 0x1a0(%rsp), %rdi
movl %ebp, %esi
callq 0x840de
movl (%rax), %eax
cmpl (%rbx), %eax
je 0x8de6d
incl %ebp
jmp 0x8dddd
leaq 0xf0(%rsp), %rdi
movq %rbx, %rsi
callq 0x83f0a
movl (%rbx), %eax
incl %eax
movl %eax, 0x20(%rsp)
leaq 0x1a0(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x83f0a
jmp 0x8de96
leaq 0xf0(%rsp), %rbx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x840de
movl (%rax), %eax
decl %eax
movl %eax, 0x20(%rsp)
movq %rbx, %rdi
movl %ebp, %esi
leaq 0x20(%rsp), %rdx
callq 0x84130
jmp 0x8de96
leaq 0x1a0(%rsp), %rbx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x840de
movl (%rax), %eax
incl %eax
movl %eax, 0x20(%rsp)
movq %rbx, %rdi
movl %ebp, %esi
leaq 0x20(%rsp), %rdx
callq 0x84130
incq %r15
jmp 0x8ddc9
leaq 0xf0(%rsp), %rdi
leaq 0x5c(%rsp), %rsi
callq 0x83f0a
leaq 0x1a0(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0x83f0a
xorl %ebp, %ebp
cmpl 0xf8(%rsp), %ebp
jge 0x8e326
leaq 0xf0(%rsp), %rdi
movl %ebp, %esi
callq 0x840de
movl (%rax), %edx
movq %r12, %rdi
leaq 0xd8(%rsp), %rsi
callq 0x56380
movl %eax, %r14d
leaq 0x1a0(%rsp), %rdi
movl %ebp, %esi
callq 0x840de
movl (%rax), %edx
movq %r12, %rdi
leaq 0xd8(%rsp), %rsi
callq 0x56380
movl %eax, %ebx
movl %ebp, 0x68(%rsp)
movl 0x5d4(%r12), %r12d
movq %r13, %rdi
movq 0xd3e8a(%rip), %rsi     # 0x161db8
callq 0x588a0
movl %eax, %r13d
cmpl %ebx, %r14d
movl %ebx, %ebp
cmovll %r14d, %ebp
movabsq $0x100000000, %rax      # imm = 0x100000000
movq %rax, 0x20(%rsp)
movq 0x10(%rsp), %rdi
callq 0x59c60
cwtl
cvtsi2sd %eax, %xmm0
leaq 0x20(%rsp), %rdi
callq 0x570c0
movq %rax, 0x160(%rsp)
leaq 0x160(%rsp), %rdi
movsd 0x55591(%rip), %xmm0    # 0xe3510
callq 0x59600
movq %rax, %r15
movq 0xd0(%rsp), %rdi
movq 0xd3e22(%rip), %rsi     # 0x161db8
callq 0x588a0
movl %ebx, %edx
subl %r14d, %edx
xorl %ecx, %ecx
subl %r14d, %ebx
je 0x8dfaf
sarl $0x1f, %edx
orl $0x1, %edx
movl %edx, %ecx
imull %ebx, %ecx
movq 0x40(%rsp), %rdx
subl %r12d, %edx
addl $0x3, %r13d
imull %edx, %r13d
addl 0x150(%rsp), %r13d
addl 0x158(%rsp), %ebp
leal (%r15,%rbp), %edx
shrq $0x20, %r15
addl %r13d, %r15d
movl %edx, 0x90(%rsp)
movl %r15d, 0x94(%rsp)
addl %edx, %ecx
movl %ecx, 0x98(%rsp)
addl %r15d, %eax
addl $0x3, %eax
movl %eax, 0x9c(%rsp)
leaq 0x160(%rsp), %rbx
movq %rbx, %rdi
movq 0xd0(%rsp), %r13
movq %r13, %rsi
callq 0x56bf0
movq %rbx, %rdi
movq 0xd36ca(%rip), %rsi     # 0x1616f0
callq 0x59940
movq 0x148(%rsp), %r12
movq 0x10(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x56160
movq 0xd3f5c(%rip), %rax     # 0x161fa8
movl (%rax), %ecx
andq $0x0, 0x20(%rsp)
movq 0x10(%rsp), %rdi
leaq 0x90(%rsp), %rsi
movq 0xd33f8(%rip), %rdx     # 0x161460
leaq 0x20(%rsp), %r8
callq 0x58b80
movq 0x190(%r12), %rax
movl 0x30(%rax), %edi
pushq $0x2
popq %rsi
callq 0x596b0
testb %al, %al
je 0x8e1cf
leaq 0x20(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5a180
movq %rbx, %rdi
pushq $0x2a
popq %rsi
movl 0x1c(%rsp), %edx
callq 0x58e70
movq %rax, %r14
movl 0x5d0(%r12), %ebx
movl 0x5d4(%r12), %ebp
movq %r13, %rdi
movq 0xd3cf0(%rip), %rsi     # 0x161db8
callq 0x588a0
movq 0x40(%rsp), %rcx
subl %ebp, %ecx
negl %ebx
addl $0x3, %eax
imull %ecx, %eax
movl %ebx, 0x50(%rsp)
movl %eax, 0x54(%rsp)
leaq 0xc0(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x58930
movq %rax, 0x70(%rsp)
movq %rdx, 0x78(%rsp)
movabsq $0x100000000, %rax      # imm = 0x100000000
movq %rax, 0xb8(%rsp)
movq 0x10(%rsp), %rdi
callq 0x59c60
movl 0x68(%rsp), %ebp
cwtl
cvtsi2sd %eax, %xmm0
leaq 0xb8(%rsp), %rdi
callq 0x570c0
movq %rax, 0xa0(%rsp)
leaq 0xa0(%rsp), %rdi
movsd 0x553c6(%rip), %xmm0    # 0xe3510
callq 0x59600
movq %rax, 0xa8(%rsp)
leaq 0x70(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0x58930
movl 0x5d0(%r12), %ecx
addl %edx, %ecx
movabsq $-0x100000000, %rsi     # imm = 0xFFFFFFFF00000000
andq %rsi, %rdx
movabsq $-0x200000000, %rsi     # imm = 0xFFFFFFFE00000000
addq %rsi, %rdx
orq %rdx, %rcx
movq %rax, 0x80(%rsp)
movq %rcx, 0x88(%rsp)
movq 0x10(%rsp), %rdi
movq %r14, %rsi
leaq 0x80(%rsp), %rdx
leaq 0x160(%rsp), %rcx
xorl %r8d, %r8d
callq 0x58df0
leaq 0x20(%rsp), %rdi
callq 0x5a588
jmp 0x8e308
movl 0x5e4(%r12), %edx
leaq 0x20(%rsp), %rdi
leaq 0xd8(%rsp), %rsi
callq 0x57bc0
movl 0x5d0(%r12), %ebx
movl 0x5d4(%r12), %ebp
movq %r13, %rdi
movq 0xd3bb5(%rip), %rsi     # 0x161db8
callq 0x588a0
movq 0x40(%rsp), %rcx
subl %ebp, %ecx
negl %ebx
addl $0x3, %eax
imull %ecx, %eax
movl %ebx, 0x50(%rsp)
movl %eax, 0x54(%rsp)
leaq 0xc0(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x58930
movq %rax, 0x70(%rsp)
movq %rdx, 0x78(%rsp)
movabsq $0x100000000, %rax      # imm = 0x100000000
movq %rax, 0xb8(%rsp)
movq 0x10(%rsp), %rdi
callq 0x59c60
cwtl
cvtsi2sd %eax, %xmm0
leaq 0xb8(%rsp), %rdi
callq 0x570c0
movq %rax, 0xa0(%rsp)
leaq 0xa0(%rsp), %rdi
movsd 0x5528f(%rip), %xmm0    # 0xe3510
callq 0x59600
movq %rax, 0xa8(%rsp)
leaq 0x70(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0x58930
movl 0x5d0(%r12), %ecx
addl %edx, %ecx
movabsq $-0x100000000, %rsi     # imm = 0xFFFFFFFF00000000
andq %rsi, %rdx
movabsq $-0x200000000, %rsi     # imm = 0xFFFFFFFE00000000
addq %rsi, %rdx
orq %rdx, %rcx
movq %rax, 0x80(%rsp)
movq %rcx, 0x88(%rsp)
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rbx
movq %rbx, %rsi
leaq 0x80(%rsp), %rdx
leaq 0x160(%rsp), %rcx
xorl %r8d, %r8d
callq 0x58df0
movq %rbx, %rdi
callq 0x5a588
movl 0x68(%rsp), %ebp
movq 0x10(%rsp), %rdi
callq 0x59a80
leaq 0x160(%rsp), %rdi
callq 0x57860
incl %ebp
jmp 0x8dec4
leaq 0x1a0(%rsp), %rdi
callq 0x83b2c
leaq 0xf0(%rsp), %rdi
callq 0x83b2c
leaq 0xd8(%rsp), %rdi
callq 0x5a588
movq 0x38(%rsp), %rdi
movl 0xb4(%rsp), %ebx
movl %ebx, %esi
callq 0x840de
movl %ebx, %r14d
jmp 0x8d9a7
movq %r14, %rdi
callq 0x572d0
xorl %ebp, %ebp
movl 0xf8(%rsp), %eax
leal -0x1(%rax), %ecx
cmpl %ecx, %ebp
jge 0x8dec2
leal 0x1(%rbp), %ebx
movl %ebx, %r14d
cmpl %eax, %r14d
jge 0x8e4d3
leaq 0xf0(%rsp), %rdi
movl %ebp, %esi
callq 0x840de
movl (%rax), %r15d
leaq 0xf0(%rsp), %rdi
movl %r14d, %esi
callq 0x840de
cmpl (%rax), %r15d
jge 0x8e3e5
leaq 0x1a0(%rsp), %rdi
movl %ebp, %esi
callq 0x840de
movl (%rax), %r15d
leaq 0xf0(%rsp), %rdi
movl %r14d, %esi
callq 0x840de
cmpl (%rax), %r15d
jge 0x8e47f
leaq 0xf0(%rsp), %rdi
movl %r14d, %esi
callq 0x840de
movl (%rax), %r15d
leaq 0xf0(%rsp), %rdi
movl %ebp, %esi
callq 0x840de
cmpl (%rax), %r15d
jge 0x8e4c4
leaq 0x1a0(%rsp), %rdi
movl %r14d, %esi
callq 0x840de
movl (%rax), %r15d
leaq 0xf0(%rsp), %rdi
movl %ebp, %esi
callq 0x840de
cmpl (%rax), %r15d
jl 0x8e4c4
leaq 0xf0(%rsp), %rdi
movl %r14d, %esi
callq 0x840de
leaq 0xf0(%rsp), %rdi
movl %ebp, %esi
movq %rax, %rdx
callq 0x84130
leaq 0xf0(%rsp), %rdi
movl %r14d, %esi
callq 0x83d0a
leaq 0x1a0(%rsp), %rdi
movl %r14d, %esi
callq 0x83d0a
jmp 0x8e4c1
leaq 0x1a0(%rsp), %rdi
movl %r14d, %esi
callq 0x840de
leaq 0x1a0(%rsp), %rdi
movl %ebp, %esi
movq %rax, %rdx
callq 0x84130
leaq 0xf0(%rsp), %rdi
movl %r14d, %esi
callq 0x83d0a
leaq 0x1a0(%rsp), %rdi
movl %r14d, %esi
callq 0x83d0a
decl %r14d
incl %r14d
movl 0xf8(%rsp), %eax
jmp 0x8e38a
movl %ebx, %ebp
jmp 0x8e379
movq 0x10(%rsp), %rdi
callq 0x59a80
xorl %eax, %eax
addq $0x1f8, %rsp            # imm = 0x1F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xf0(%rsp), %rbx
andl $0x0, (%rbx)
movq 0x38(%rsp), %rdi
movq %rbx, %rsi
callq 0x83f0a
xorl %ebp, %ebp
cmpl 0x4c(%rsp), %ebp
jg 0x8d8c7
movq 0x60(%rsp), %rdi
movl %ebp, %esi
callq 0x59cc0
cmpl $0xa, (%rax)
je 0x8e542
movq 0x60(%rsp), %rdi
movl %ebp, %esi
callq 0x59cc0
cmpl $0x0, (%rax)
je 0x8e542
incl %ebp
jmp 0x8e512
incl %ebp
movl %ebp, 0xf0(%rsp)
movq 0x38(%rsp), %rdi
movq %rbx, %rsi
callq 0x83f0a
jmp 0x8e512
jmp 0x8e5da
jmp 0x8e5da
movq %rax, %rbx
jmp 0x8e5ea
jmp 0x8e57c
jmp 0x8e5da
jmp 0x8e587
jmp 0x8e57c
jmp 0x8e57c
jmp 0x8e587
jmp 0x8e587
jmp 0x8e5da
jmp 0x8e5da
jmp 0x8e587
jmp 0x8e587
movq %rax, %rbx
jmp 0x8e5f7
jmp 0x8e5da
jmp 0x8e5da
jmp 0x8e587
movq %rax, %rbx
leaq 0xf0(%rsp), %rdi
callq 0x5a588
jmp 0x8e5f7
jmp 0x8e5b1
jmp 0x8e5c6
jmp 0x8e5b1
jmp 0x8e5c6
jmp 0x8e5b1
jmp 0x8e5b1
jmp 0x8e5c6
jmp 0x8e5da
jmp 0x8e5da
jmp 0x8e5b1
jmp 0x8e5da
jmp 0x8e5b1
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x5a588
jmp 0x8e5c9
jmp 0x8e5da
jmp 0x8e5da
jmp 0x8e5da
movq %rax, %rbx
leaq 0x160(%rsp), %rdi
callq 0x57860
jmp 0x8e5dd
jmp 0x8e5da
movq %rax, %rbx
leaq 0x1a0(%rsp), %rdi
callq 0x83b2c
leaq 0xf0(%rsp), %rdi
callq 0x83b2c
leaq 0xd8(%rsp), %rdi
callq 0x5a588
movq %rbx, %rdi
callq 0x58260