// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/classes/gui/widgets/special/cursor.cpp
// Function: smooth::GUI::Cursor::Process(int, int, int)
S::Int S::GUI::Cursor::Process(Int message, Int wParam, Int lParam)
{
	if (!IsRegistered()) return Error();
	if (!IsVisible())    return Success();

	Window	*window	= container->GetContainerWindow();

	if (window == NIL) return Success();

	switch (message)
	{
		case SM_LBUTTONDOWN:
			if (mouseOver)
			{
				Rect	 frame = Rect(GetRealPosition(), GetRealSize());

				String	 wText = text;
				Int	 wPromptPos = 0;

				if (Binary::IsFlagSet(GetFlags(), CF_MULTILINE))
				{
					Int	 line	   = (window->GetMousePosition().y - frame.top) / (font.GetScaledTextSizeY() + 3);
					Int	 lineCount = 0;
					Int	 length	   = text.Length();

					for (Int i = 0; i <= length; i++)
					{
						wText[i - wPromptPos] = text[i];

						if (text[i] == '\n' || text[i] == 0)
						{
							wText[i - wPromptPos] = 0;

							if (lineCount - scrollPos == line || text[i] == 0) break;

							wPromptPos = i + 1;
							lineCount++;
						}
					}
				}

				Int	 newPromptPos = GetLogicalCursorPositionFromDisplay(wText, window->GetMousePosition().x - frame.left) + wPromptPos;

				marking = True;

				if (Input::Keyboard::GetKeyState(Input::Keyboard::KeyShift))
				{
					if (markStart == -1) markStart = GetCursorPos();
					if (markStart == -1) markStart = newPromptPos;

					MarkText(markStart, newPromptPos);
				}
				else
				{
					MarkText(newPromptPos, newPromptPos);
				}

				SetCursorPos(newPromptPos);

				if (!focussed)
				{
					focussed = True;

					onGetFocus.Emit();
				}
				else
				{
					onClickInFocus.Emit();
				}
			}
			else
			{
				if (focussed)
				{
					focussed = False;

					onLoseFocus.Emit();
				}
			}

			break;
		case SM_LBUTTONUP:
			if (focussed && markStart != -1)
			{
				if (markStart == markEnd) { markStart = -1; markEnd = -1; }

				marking = False;
			}

			break;
		case SM_LBUTTONDBLCLK:
			if (focussed)
			{
				/* Compute word start and end.
				 */
				Int	 length	   = text.Length();

				Int	 wordStart = 0;
				Int	 wordEnd   = length;

				for (Int i = promptPos - 2; i >= 0; i--)
				{
					if ( (						   text[i + 1] == '\n') ||
					    ((text[i    ] == ' ' || text[i    ] == '\t' || text[i    ] == '\n') &&
					     (text[i + 1] != ' ' && text[i + 1] != '\t' && text[i + 1] != '\n'))) { wordStart = i + 1; break; }
				}

				for (Int i = promptPos - 1; i < length; i++)
				{
					if ( (						   text[i + 1] == '\n') ||
					    ((text[i    ] == ' ' || text[i    ] == '\t' || text[i    ] == '\n') &&
					     (text[i + 1] != ' ' && text[i + 1] != '\t' && text[i + 1] != '\n'))) { wordEnd = i + 1; break; }
				}

				/* Set mark region.
				 */
				if (Input::Keyboard::GetKeyState(Input::Keyboard::KeyShift))
				{
					if (markStart == -1) markStart = promptPos;

					if (promptPos <= markStart)
					{
						MarkText(markStart, wordStart);

						SetCursorPos(wordStart);
					}
					else
					{
						MarkText(markStart, wordEnd);

						SetCursorPos(wordEnd);
					}
				}
				else
				{
					MarkText(wordStart, wordEnd);

					SetCursorPos(wordEnd);
				}
			}

			break;
		case SM_RBUTTONDOWN:
		case SM_RBUTTONDBLCLK:
			if (mouseOver)
			{
				/* Activate this widget before opening the context menu.
				 */
				if (!focussed)
				{
					window->Process(SM_LBUTTONDOWN, 0, 0);
					window->Process(SM_LBUTTONUP, 0, 0);
				}

				/* Enable the context menu even for inactive widgets.
				 */
				if (!IsActive())
				{
					OpenContextMenu();

					/* Force mouseOut event.
					 */
					window->Process(SM_MOUSEMOVE, 0, 0);
				}
			}

			break;
		case SM_MBUTTONDOWN:
			if (focussed && IsActive() && Clipboard(container->GetContainerWindow()).GetSelectionText() != NIL)
			{
				Bool	 selected = (markStart != markEnd && markStart >= 0 && markEnd >= 0);

				flags |= CF_NOINPUT;

				DeleteSelectedText();

				flags ^= CF_NOINPUT;

				String	 insertText = Clipboard(container->GetContainerWindow()).GetSelectionText();

				if (insertText.Length() > 0 && (insertText.Length() + text.Length()) <= maxSize)
				{
					if (Binary::IsFlagSet(container->GetFlags(), EDB_NUMERIC) && (insertText.ToInt() == 0 && insertText[0] != '0')) break;

					if (selected) RemoveHistoryEntry();

					InsertText(insertText);
				}

				onInput.Emit(text);
			}

			break;
		case SM_MOUSEMOVE:
			{
				Rect	 frame = Rect(GetRealPosition(), GetRealSize());

				if (!mouseOver && window->IsMouseOn(frame))
				{
					mouseOver = True;

					Paint(SP_MOUSEIN);
				}
				else if (mouseOver && !window->IsMouseOn(frame))
				{
					mouseOver = False;

					Paint(SP_MOUSEOUT);
				}

				if (focussed && markStart != -1 && marking)
				{
					String	 wText = text;
					Int	 wPromptPos = 0;

					if (Binary::IsFlagSet(GetFlags(), CF_MULTILINE))
					{
						Int	 line	   = (window->GetMousePosition().y - frame.top) / (font.GetScaledTextSizeY() + 3);
						Int	 lineCount = 0;
						Int	 length	   = text.Length();

						if (window->GetMousePosition().y - frame.top < 0) line--;

						for (Int i = 0; i <= length; i++)
						{
							wText[i - wPromptPos] = text[i];

							if (text[i] == '\n' || text[i] == 0)
							{
								wText[i - wPromptPos] = 0;

								if (lineCount - scrollPos == line || text[i] == 0) break;

								wPromptPos = i + 1;
								lineCount++;
							}
						}

						if (lineCount - scrollPos != line) wPromptPos = -1;
					}

					if (wPromptPos >= 0)
					{
						Int	 newMarkEnd = GetLogicalCursorPositionFromDisplay(wText, window->GetMousePosition().x - frame.left) + wPromptPos;

						MarkText(markStart, newMarkEnd);

						SetCursorPos(newMarkEnd);
					}
				}
			}

			break;
		case SM_KEYDOWN:
			if (OnSpecialKey(wParam)) return MessageProcessed;

			break;
		case SM_CHAR:
			OnInput(wParam, lParam);

			break;
	}

	return Widget::Process(message, wParam, lParam);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x310, %rsp            # imm = 0x310
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x1b0(%rbp)
movq (%rdi), %rax
callq *0x88(%rax)
testb $0x1, %al
jne 0xcbdfa
leaq -0x30(%rbp), %rdi
movq %rdi, -0x1c0(%rbp)
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x5a9c0
movq -0x1c0(%rbp), %rdi
callq 0x59680
movl %eax, -0x1b4(%rbp)
jmp 0xcbdc9
movl -0x1b4(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x5b5b0
jmp 0xcd0f0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x5b5b0
jmp 0xcd0fc
movq -0x1b0(%rbp), %rdi
movq (%rdi), %rax
callq *0x90(%rax)
testb $0x1, %al
jne 0xcbe63
leaq -0x50(%rbp), %rdi
movq %rdi, -0x1d0(%rbp)
callq 0x5ca80
movq -0x1d0(%rbp), %rdi
callq 0x59680
movl %eax, -0x1c4(%rbp)
jmp 0xcbe32
movl -0x1c4(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x5a410
jmp 0xcd0f0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x5a410
jmp 0xcd0fc
movq -0x1b0(%rbp), %rax
movq 0x190(%rax), %rdi
callq 0x59bc0
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x58(%rbp)
jne 0xcbed6
leaq -0x68(%rbp), %rdi
movq %rdi, -0x1e0(%rbp)
callq 0x5ca80
movq -0x1e0(%rbp), %rdi
callq 0x59680
movl %eax, -0x1d4(%rbp)
jmp 0xcbea5
movl -0x1d4(%rbp), %eax
movl %eax, -0x4(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x5a410
jmp 0xcd0f0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x5a410
jmp 0xcd0fc
movl -0x14(%rbp), %eax
addl $0xffff8800, %eax       # imm = 0xFFFF8800
movl %eax, %ecx
movq %rcx, -0x1e8(%rbp)
subl $0x10, %eax
ja 0xcd0d8
movq -0x1e8(%rbp), %rax
leaq 0xbebf6(%rip), %rcx     # 0x18aaf4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x1b0(%rbp), %rax
testb $0x1, 0xd4(%rax)
je 0xcc37d
movq -0x1b0(%rbp), %rdi
movq (%rdi), %rax
movq 0x48(%rax), %rax
callq *%rax
movq -0x1b0(%rbp), %rdi
movq %rax, -0x80(%rbp)
movq (%rdi), %rax
movq 0x50(%rax), %rax
callq *%rax
movq %rax, -0x88(%rbp)
leaq -0x78(%rbp), %rdi
leaq -0x80(%rbp), %rsi
leaq -0x88(%rbp), %rdx
callq 0x59ff0
movq -0x1b0(%rbp), %rsi
addq $0xf0, %rsi
leaq -0xa0(%rbp), %rdi
callq 0x5b6d0
movq -0x1b0(%rbp), %rdi
movl $0x0, -0xa4(%rbp)
callq 0x5a120
movl %eax, -0x1ec(%rbp)
jmp 0xcbf92
movl -0x1ec(%rbp), %edi
movl $0x1, %esi
callq 0x5ce30
movb %al, -0x1ed(%rbp)
jmp 0xcbfaa
movb -0x1ed(%rbp), %al
testb $0x1, %al
jne 0xcbfb9
jmp 0xcc202
movq -0x58(%rbp), %rdi
callq 0x5b090
movq %rax, -0x1f8(%rbp)
jmp 0xcbfcb
movq -0x1b0(%rbp), %rdi
movq -0x1f8(%rbp), %rax
movq %rax, -0xb0(%rbp)
movl -0xac(%rbp), %eax
movl -0x74(%rbp), %ecx
subl %ecx, %eax
movl %eax, -0x200(%rbp)
addq $0x140, %rdi            # imm = 0x140
movq 0x13cda9(%rip), %rsi    # 0x208da8
callq 0x5bde0
movl %eax, -0x1fc(%rbp)
jmp 0xcc00c
movq -0x1b0(%rbp), %rdi
movl -0x200(%rbp), %eax
movl -0x1fc(%rbp), %ecx
addl $0x3, %ecx
cltd
idivl %ecx
movl %eax, -0xa8(%rbp)
movl $0x0, -0xb4(%rbp)
addq $0xf0, %rdi
callq 0x5b800
movl %eax, -0x204(%rbp)
jmp 0xcc049
movl -0x204(%rbp), %eax
movl %eax, -0xb8(%rbp)
movl $0x0, -0xbc(%rbp)
movl -0xbc(%rbp), %eax
cmpl -0xb8(%rbp), %eax
jg 0xcc200
movq -0x1b0(%rbp), %rdi
addq $0xf0, %rdi
movl -0xbc(%rbp), %esi
callq 0x5d4e0
movq %rax, -0x210(%rbp)
jmp 0xcc093
movq -0x210(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x21c(%rbp)
movl -0xbc(%rbp), %esi
movl -0xa4(%rbp), %eax
subl %eax, %esi
leaq -0xa0(%rbp), %rdi
callq 0x5d4e0
movq %rax, -0x218(%rbp)
jmp 0xcc0c5
movq -0x1b0(%rbp), %rdi
movq -0x218(%rbp), %rax
movl -0x21c(%rbp), %ecx
movl %ecx, (%rax)
addq $0xf0, %rdi
movl -0xbc(%rbp), %esi
callq 0x5d4e0
movq %rax, -0x228(%rbp)
jmp 0xcc0f6
movq -0x228(%rbp), %rax
cmpl $0xa, (%rax)
je 0xcc134
movq -0x1b0(%rbp), %rdi
addq $0xf0, %rdi
movl -0xbc(%rbp), %esi
callq 0x5d4e0
movq %rax, -0x230(%rbp)
jmp 0xcc124
movq -0x230(%rbp), %rax
cmpl $0x0, (%rax)
jne 0xcc1ea
movl -0xbc(%rbp), %esi
movl -0xa4(%rbp), %eax
subl %eax, %esi
leaq -0xa0(%rbp), %rdi
callq 0x5d4e0
movq %rax, -0x238(%rbp)
jmp 0xcc157
movq -0x1b0(%rbp), %rcx
movq -0x238(%rbp), %rax
movl $0x0, (%rax)
movl -0xb4(%rbp), %eax
subl 0x5d4(%rcx), %eax
cmpl -0xa8(%rbp), %eax
je 0xcc1ad
movq -0x1b0(%rbp), %rdi
addq $0xf0, %rdi
movl -0xbc(%rbp), %esi
callq 0x5d4e0
movq %rax, -0x240(%rbp)
jmp 0xcc1a1
movq -0x240(%rbp), %rax
cmpl $0x0, (%rax)
jne 0xcc1cc
jmp 0xcc200
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x5df00
jmp 0xcd0fc
movl -0xbc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xa4(%rbp)
movl -0xb4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xb4(%rbp)
jmp 0xcc1ec
movl -0xbc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xbc(%rbp)
jmp 0xcc05f
jmp 0xcc202
movq -0x58(%rbp), %rdi
callq 0x5b090
movq %rax, -0x248(%rbp)
jmp 0xcc214
movq -0x1b0(%rbp), %rdi
movq -0x248(%rbp), %rax
movq %rax, -0xc8(%rbp)
movl -0xc8(%rbp), %edx
movl -0x78(%rbp), %eax
subl %eax, %edx
leaq -0xa0(%rbp), %rsi
callq 0x5b040
movl %eax, -0x24c(%rbp)
jmp 0xcc248
movq -0x1b0(%rbp), %rax
movl -0x24c(%rbp), %ecx
movl -0xa4(%rbp), %edx
addl %edx, %ecx
movl %ecx, -0xc0(%rbp)
movb $0x1, 0x5c5(%rax)
movl $0x10, %edi
callq 0x5bc00
movb %al, -0x24d(%rbp)
jmp 0xcc27c
movb -0x24d(%rbp), %al
testb $0x1, %al
jne 0xcc288
jmp 0xcc2fe
movq -0x1b0(%rbp), %rax
cmpl $-0x1, 0x5c8(%rax)
jne 0xcc2bf
movq -0x1b0(%rbp), %rdi
callq 0x5c1d0
movl %eax, -0x254(%rbp)
jmp 0xcc2ac
movq -0x1b0(%rbp), %rax
movl -0x254(%rbp), %ecx
movl %ecx, 0x5c8(%rax)
movq -0x1b0(%rbp), %rax
cmpl $-0x1, 0x5c8(%rax)
jne 0xcc2e2
movq -0x1b0(%rbp), %rax
movl -0xc0(%rbp), %ecx
movl %ecx, 0x5c8(%rax)
movq -0x1b0(%rbp), %rdi
movl 0x5c8(%rdi), %esi
movl -0xc0(%rbp), %edx
callq 0x5b020
jmp 0xcc2fc
jmp 0xcc316
movq -0x1b0(%rbp), %rdi
movl -0xc0(%rbp), %edx
movl %edx, %esi
callq 0x5b020
jmp 0xcc314
jmp 0xcc316
movq -0x1b0(%rbp), %rdi
movl -0xc0(%rbp), %esi
callq 0x5d5c0
jmp 0xcc32a
movq -0x1b0(%rbp), %rax
testb $0x1, 0xcd(%rax)
jne 0xcc358
movq -0x1b0(%rbp), %rdi
movb $0x1, 0xcd(%rdi)
addq $0x4d8, %rdi            # imm = 0x4D8
callq 0x8af60
jmp 0xcc356
jmp 0xcc36f
movq -0x1b0(%rbp), %rdi
addq $0x538, %rdi            # imm = 0x538
callq 0x8af60
jmp 0xcc36d
jmp 0xcc36f
leaq -0xa0(%rbp), %rdi
callq 0x5df00
jmp 0xcc3a9
movq -0x1b0(%rbp), %rax
testb $0x1, 0xcd(%rax)
je 0xcc3a7
movq -0x1b0(%rbp), %rdi
movb $0x0, 0xcd(%rdi)
addq $0x518, %rdi            # imm = 0x518
callq 0x8af60
jmp 0xcc3a9
jmp 0xcd0d8
movq -0x1b0(%rbp), %rax
testb $0x1, 0xcd(%rax)
je 0xcc40c
movq -0x1b0(%rbp), %rax
cmpl $-0x1, 0x5c8(%rax)
je 0xcc40c
movq -0x1b0(%rbp), %rcx
movl 0x5c8(%rcx), %eax
cmpl 0x5cc(%rcx), %eax
jne 0xcc3fe
movq -0x1b0(%rbp), %rax
movl $0xffffffff, 0x5c8(%rax) # imm = 0xFFFFFFFF
movl $0xffffffff, 0x5cc(%rax) # imm = 0xFFFFFFFF
movq -0x1b0(%rbp), %rax
movb $0x0, 0x5c5(%rax)
jmp 0xcd0d8
movq -0x1b0(%rbp), %rax
testb $0x1, 0xcd(%rax)
je 0xcc782
movq -0x1b0(%rbp), %rdi
addq $0xf0, %rdi
callq 0x5b800
movl %eax, %ecx
movq -0x1b0(%rbp), %rax
movl %ecx, -0xcc(%rbp)
movl $0x0, -0xd0(%rbp)
movl -0xcc(%rbp), %ecx
movl %ecx, -0xd4(%rbp)
movl 0x5c0(%rax), %eax
subl $0x2, %eax
movl %eax, -0xd8(%rbp)
cmpl $0x0, -0xd8(%rbp)
jl 0xcc582
movq -0x1b0(%rbp), %rdi
addq $0xf0, %rdi
movl -0xd8(%rbp), %esi
addl $0x1, %esi
callq 0x5d4e0
cmpl $0xa, (%rax)
je 0xcc55b
movq -0x1b0(%rbp), %rdi
addq $0xf0, %rdi
movl -0xd8(%rbp), %esi
callq 0x5d4e0
cmpl $0x20, (%rax)
je 0xcc4f8
movq -0x1b0(%rbp), %rdi
addq $0xf0, %rdi
movl -0xd8(%rbp), %esi
callq 0x5d4e0
cmpl $0x9, (%rax)
je 0xcc4f8
movq -0x1b0(%rbp), %rdi
addq $0xf0, %rdi
movl -0xd8(%rbp), %esi
callq 0x5d4e0
cmpl $0xa, (%rax)
jne 0xcc56c
movq -0x1b0(%rbp), %rdi
addq $0xf0, %rdi
movl -0xd8(%rbp), %esi
addl $0x1, %esi
callq 0x5d4e0
cmpl $0x20, (%rax)
je 0xcc56c
movq -0x1b0(%rbp), %rdi
addq $0xf0, %rdi
movl -0xd8(%rbp), %esi
addl $0x1, %esi
callq 0x5d4e0
cmpl $0x9, (%rax)
je 0xcc56c
movq -0x1b0(%rbp), %rdi
addq $0xf0, %rdi
movl -0xd8(%rbp), %esi
addl $0x1, %esi
callq 0x5d4e0
cmpl $0xa, (%rax)
je 0xcc56c
movl -0xd8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xd0(%rbp)
jmp 0xcc582
jmp 0xcc56e
movl -0xd8(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xd8(%rbp)
jmp 0xcc46c
movq -0x1b0(%rbp), %rax
movl 0x5c0(%rax), %eax
subl $0x1, %eax
movl %eax, -0xdc(%rbp)
movl -0xdc(%rbp), %eax
cmpl -0xcc(%rbp), %eax
jge 0xcc6b3
movq -0x1b0(%rbp), %rdi
addq $0xf0, %rdi
movl -0xdc(%rbp), %esi
addl $0x1, %esi
callq 0x5d4e0
cmpl $0xa, (%rax)
je 0xcc68c
movq -0x1b0(%rbp), %rdi
addq $0xf0, %rdi
movl -0xdc(%rbp), %esi
callq 0x5d4e0
cmpl $0x20, (%rax)
je 0xcc629
movq -0x1b0(%rbp), %rdi
addq $0xf0, %rdi
movl -0xdc(%rbp), %esi
callq 0x5d4e0
cmpl $0x9, (%rax)
je 0xcc629
movq -0x1b0(%rbp), %rdi
addq $0xf0, %rdi
movl -0xdc(%rbp), %esi
callq 0x5d4e0
cmpl $0xa, (%rax)
jne 0xcc69d
movq -0x1b0(%rbp), %rdi
addq $0xf0, %rdi
movl -0xdc(%rbp), %esi
addl $0x1, %esi
callq 0x5d4e0
cmpl $0x20, (%rax)
je 0xcc69d
movq -0x1b0(%rbp), %rdi
addq $0xf0, %rdi
movl -0xdc(%rbp), %esi
addl $0x1, %esi
callq 0x5d4e0
cmpl $0x9, (%rax)
je 0xcc69d
movq -0x1b0(%rbp), %rdi
addq $0xf0, %rdi
movl -0xdc(%rbp), %esi
addl $0x1, %esi
callq 0x5d4e0
cmpl $0xa, (%rax)
je 0xcc69d
movl -0xdc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xd4(%rbp)
jmp 0xcc6b3
jmp 0xcc69f
movl -0xdc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xdc(%rbp)
jmp 0xcc598
movl $0x10, %edi
callq 0x5bc00
testb $0x1, %al
jne 0xcc6c6
jmp 0xcc756
movq -0x1b0(%rbp), %rax
cmpl $-0x1, 0x5c8(%rax)
jne 0xcc6e9
movq -0x1b0(%rbp), %rax
movl 0x5c0(%rax), %ecx
movl %ecx, 0x5c8(%rax)
movq -0x1b0(%rbp), %rcx
movl 0x5c0(%rcx), %eax
cmpl 0x5c8(%rcx), %eax
jg 0xcc72a
movq -0x1b0(%rbp), %rdi
movl 0x5c8(%rdi), %esi
movl -0xd0(%rbp), %edx
callq 0x5b020
movq -0x1b0(%rbp), %rdi
movl -0xd0(%rbp), %esi
callq 0x5d5c0
jmp 0xcc754
movq -0x1b0(%rbp), %rdi
movl 0x5c8(%rdi), %esi
movl -0xd4(%rbp), %edx
callq 0x5b020
movq -0x1b0(%rbp), %rdi
movl -0xd4(%rbp), %esi
callq 0x5d5c0
jmp 0xcc780
movq -0x1b0(%rbp), %rdi
movl -0xd0(%rbp), %esi
movl -0xd4(%rbp), %edx
callq 0x5b020
movq -0x1b0(%rbp), %rdi
movl -0xd4(%rbp), %esi
callq 0x5d5c0
jmp 0xcc782
jmp 0xcd0d8
movq -0x1b0(%rbp), %rax
testb $0x1, 0xd4(%rax)
je 0xcc80b
movq -0x1b0(%rbp), %rax
testb $0x1, 0xcd(%rax)
jne 0xcc7d3
movq -0x58(%rbp), %rdi
movq (%rdi), %rax
movl $0x7801, %esi           # imm = 0x7801
xorl %ecx, %ecx
movl %ecx, %edx
callq *0x80(%rax)
movq -0x58(%rbp), %rdi
movq (%rdi), %rax
movl $0x7802, %esi           # imm = 0x7802
xorl %ecx, %ecx
movl %ecx, %edx
callq *0x80(%rax)
movq -0x1b0(%rbp), %rdi
movq (%rdi), %rax
callq *0x98(%rax)
testb $0x1, %al
jne 0xcc809
movq -0x1b0(%rbp), %rdi
callq 0x5b0d0
movq -0x58(%rbp), %rdi
movq (%rdi), %rax
movl $0x7800, %esi           # imm = 0x7800
xorl %ecx, %ecx
movl %ecx, %edx
callq *0x80(%rax)
jmp 0xcc80b
jmp 0xcd0d8
movq -0x1b0(%rbp), %rax
movb 0xcd(%rax), %cl
movb $0x0, -0x109(%rbp)
movb $0x0, -0x10a(%rbp)
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x255(%rbp)
je 0xcc8cd
movq -0x1b0(%rbp), %rdi
movq (%rdi), %rax
callq *0x98(%rax)
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x255(%rbp)
jne 0xcc85d
jmp 0xcc8cd
movq -0x1b0(%rbp), %rax
movq 0x190(%rax), %rdi
callq 0x59bc0
movq %rax, %rsi
leaq -0x108(%rbp), %rdi
movq %rdi, -0x260(%rbp)
callq 0x5cb80
movq -0x260(%rbp), %rsi
movb $0x1, -0x109(%rbp)
leaq -0xf8(%rbp), %rdi
callq 0x5d550
jmp 0xcc8a2
movb $0x1, -0x10a(%rbp)
leaq -0xf8(%rbp), %rdi
xorl %esi, %esi
callq 0x5b110
movb %al, -0x261(%rbp)
jmp 0xcc8bf
movb -0x261(%rbp), %al
movb %al, -0x255(%rbp)
jmp 0xcc8cd
movb -0x255(%rbp), %al
movb %al, -0x262(%rbp)
testb $0x1, -0x10a(%rbp)
jne 0xcc8e4
jmp 0xcc8f0
leaq -0xf8(%rbp), %rdi
callq 0x5df00
testb $0x1, -0x109(%rbp)
jne 0xcc8fb
jmp 0xcc907
leaq -0x108(%rbp), %rdi
callq 0x5d190
movb -0x262(%rbp), %al
testb $0x1, %al
jne 0xcc916
jmp 0xccbe9
movq -0x1b0(%rbp), %rdx
movl 0x5c8(%rdx), %ecx
xorl %eax, %eax
cmpl 0x5cc(%rdx), %ecx
movb %al, -0x263(%rbp)
je 0xcc962
movq -0x1b0(%rbp), %rcx
xorl %eax, %eax
cmpl $0x0, 0x5c8(%rcx)
movb %al, -0x263(%rbp)
jl 0xcc962
movq -0x1b0(%rbp), %rax
cmpl $0x0, 0x5cc(%rax)
setge %al
movb %al, -0x263(%rbp)
movq -0x1b0(%rbp), %rdi
movb -0x263(%rbp), %al
andb $0x1, %al
movb %al, -0x10b(%rbp)
movb 0x33(%rdi), %al
orb $0x40, %al
movb %al, 0x33(%rdi)
callq 0x5ded8
movq -0x1b0(%rbp), %rax
movb 0x33(%rax), %cl
xorb $0x40, %cl
movb %cl, 0x33(%rax)
movq 0x190(%rax), %rdi
callq 0x59bc0
movq %rax, %rsi
leaq -0x138(%rbp), %rdi
movq %rdi, -0x270(%rbp)
callq 0x5cb80
movq -0x270(%rbp), %rsi
leaq -0x128(%rbp), %rdi
callq 0x5d550
jmp 0xcc9cb
leaq -0x138(%rbp), %rdi
callq 0x5d190
leaq -0x128(%rbp), %rdi
callq 0x5b800
movl %eax, -0x274(%rbp)
jmp 0xcc9eb
movl -0x274(%rbp), %eax
cmpl $0x0, %eax
jle 0xccba1
leaq -0x128(%rbp), %rdi
callq 0x5b800
movl %eax, -0x278(%rbp)
jmp 0xcca0e
movq -0x1b0(%rbp), %rdi
addq $0xf0, %rdi
callq 0x5b800
movl %eax, -0x27c(%rbp)
jmp 0xcca29
movq -0x1b0(%rbp), %rcx
movl -0x27c(%rbp), %edx
movl -0x278(%rbp), %eax
addl %edx, %eax
cmpl 0x640(%rcx), %eax
jg 0xccba1
movq -0x1b0(%rbp), %rax
movq 0x190(%rax), %rdi
callq 0x5a120
movl %eax, -0x280(%rbp)
jmp 0xcca65
movl -0x280(%rbp), %edi
movl $0x1, %esi
callq 0x5ce30
movb %al, -0x281(%rbp)
jmp 0xcca7d
movb -0x281(%rbp), %al
testb $0x1, %al
jne 0xcca8c
jmp 0xccb71
leaq -0x128(%rbp), %rdi
callq 0x5adc0
movq %rax, -0x290(%rbp)
jmp 0xccaa1
movq -0x290(%rbp), %rax
cmpq $0x0, %rax
jne 0xccb71
leaq -0x128(%rbp), %rdi
xorl %esi, %esi
callq 0x5d4e0
movq %rax, -0x298(%rbp)
jmp 0xccac9
movq -0x298(%rbp), %rax
cmpl $0x30, (%rax)
je 0xccb71
movl $0x2, -0x13c(%rbp)
jmp 0xccbca
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0xccb1b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
testb $0x1, -0x10a(%rbp)
jne 0xccb0d
jmp 0xccb19
leaq -0xf8(%rbp), %rdi
callq 0x5df00
jmp 0xccb1b
testb $0x1, -0x109(%rbp)
jne 0xccb26
jmp 0xccb32
leaq -0x108(%rbp), %rdi
callq 0x5d190
jmp 0xcd0fc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x138(%rbp), %rdi
callq 0x5d190
jmp 0xcd0fc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x128(%rbp), %rdi
callq 0x5df00
jmp 0xcd0fc
testb $0x1, -0x10b(%rbp)
je 0xccb8a
movq -0x1b0(%rbp), %rdi
callq 0x5ad60
jmp 0xccb88
jmp 0xccb8a
movq -0x1b0(%rbp), %rdi
leaq -0x128(%rbp), %rsi
callq 0x5a3c0
jmp 0xccb9f
jmp 0xccba1
movq -0x1b0(%rbp), %rsi
movq %rsi, %rdi
addq $0x708, %rdi            # imm = 0x708
addq $0xf0, %rsi
callq 0x97960
jmp 0xccbc0
movl $0x0, -0x13c(%rbp)
leaq -0x128(%rbp), %rdi
callq 0x5df00
movl -0x13c(%rbp), %eax
testl %eax, %eax
je 0xccbe7
jmp 0xccbe2
jmp 0xcd0d8
jmp 0xccbe9
jmp 0xcd0d8
movq -0x1b0(%rbp), %rdi
movq (%rdi), %rax
callq *0x48(%rax)
movq -0x1b0(%rbp), %rdi
movq %rax, -0x154(%rbp)
movq (%rdi), %rax
callq *0x50(%rax)
movq %rax, -0x15c(%rbp)
leaq -0x14c(%rbp), %rdi
leaq -0x154(%rbp), %rsi
leaq -0x15c(%rbp), %rdx
callq 0x59ff0
movq -0x1b0(%rbp), %rax
testb $0x1, 0xd4(%rax)
jne 0xccc71
movq -0x58(%rbp), %rdi
leaq -0x14c(%rbp), %rsi
callq 0x5c060
testb $0x1, %al
jne 0xccc56
jmp 0xccc71
movq -0x1b0(%rbp), %rdi
movb $0x1, 0xd4(%rdi)
movq (%rdi), %rax
movl $0x2, %esi
callq *0x78(%rax)
jmp 0xcccb0
movq -0x1b0(%rbp), %rax
testb $0x1, 0xd4(%rax)
je 0xcccae
movq -0x58(%rbp), %rdi
leaq -0x14c(%rbp), %rsi
callq 0x5c060
testb $0x1, %al
jne 0xcccae
movq -0x1b0(%rbp), %rdi
movb $0x0, 0xd4(%rdi)
movq (%rdi), %rax
movl $0x3, %esi
callq *0x78(%rax)
jmp 0xcccb0
movq -0x1b0(%rbp), %rax
testb $0x1, 0xcd(%rax)
je 0xcd0a4
movq -0x1b0(%rbp), %rax
cmpl $-0x1, 0x5c8(%rax)
je 0xcd0a4
movq -0x1b0(%rbp), %rax
testb $0x1, 0x5c5(%rax)
je 0xcd0a4
movq -0x1b0(%rbp), %rsi
addq $0xf0, %rsi
leaq -0x178(%rbp), %rdi
callq 0x5b6d0
movq -0x1b0(%rbp), %rdi
movl $0x0, -0x17c(%rbp)
callq 0x5a120
movl %eax, -0x29c(%rbp)
jmp 0xccd24
movl -0x29c(%rbp), %edi
movl $0x1, %esi
callq 0x5ce30
movb %al, -0x29d(%rbp)
jmp 0xccd3c
movb -0x29d(%rbp), %al
testb $0x1, %al
jne 0xccd4b
jmp 0xccffe
movq -0x58(%rbp), %rdi
callq 0x5b090
movq %rax, -0x2a8(%rbp)
jmp 0xccd5d
movq -0x1b0(%rbp), %rdi
movq -0x2a8(%rbp), %rax
movq %rax, -0x188(%rbp)
movl -0x184(%rbp), %eax
movl -0x148(%rbp), %ecx
subl %ecx, %eax
movl %eax, -0x2b0(%rbp)
addq $0x140, %rdi            # imm = 0x140
movq 0x13c014(%rip), %rsi    # 0x208da8
callq 0x5bde0
movl %eax, -0x2ac(%rbp)
jmp 0xccda1
movq -0x1b0(%rbp), %rdi
movl -0x2b0(%rbp), %eax
movl -0x2ac(%rbp), %ecx
addl $0x3, %ecx
cltd
idivl %ecx
movl %eax, -0x180(%rbp)
movl $0x0, -0x18c(%rbp)
addq $0xf0, %rdi
callq 0x5b800
movl %eax, -0x2b4(%rbp)
jmp 0xccdde
movl -0x2b4(%rbp), %eax
movl %eax, -0x190(%rbp)
movq -0x58(%rbp), %rdi
callq 0x5b090
movq %rax, -0x2c0(%rbp)
jmp 0xccdfc
movq -0x2c0(%rbp), %rax
movq %rax, -0x198(%rbp)
movl -0x194(%rbp), %eax
subl -0x148(%rbp), %eax
cmpl $0x0, %eax
jge 0xcce49
movl -0x180(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x180(%rbp)
jmp 0xcce49
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x178(%rbp), %rdi
callq 0x5df00
jmp 0xcd0fc
movl $0x0, -0x19c(%rbp)
movl -0x19c(%rbp), %eax
cmpl -0x190(%rbp), %eax
jg 0xccfd7
movq -0x1b0(%rbp), %rdi
addq $0xf0, %rdi
movl -0x19c(%rbp), %esi
callq 0x5d4e0
movq %rax, -0x2c8(%rbp)
jmp 0xcce87
movq -0x2c8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x2d4(%rbp)
movl -0x19c(%rbp), %esi
movl -0x17c(%rbp), %eax
subl %eax, %esi
leaq -0x178(%rbp), %rdi
callq 0x5d4e0
movq %rax, -0x2d0(%rbp)
jmp 0xcceb9
movq -0x1b0(%rbp), %rdi
movq -0x2d0(%rbp), %rax
movl -0x2d4(%rbp), %ecx
movl %ecx, (%rax)
addq $0xf0, %rdi
movl -0x19c(%rbp), %esi
callq 0x5d4e0
movq %rax, -0x2e0(%rbp)
jmp 0xcceea
movq -0x2e0(%rbp), %rax
cmpl $0xa, (%rax)
je 0xccf28
movq -0x1b0(%rbp), %rdi
addq $0xf0, %rdi
movl -0x19c(%rbp), %esi
callq 0x5d4e0
movq %rax, -0x2e8(%rbp)
jmp 0xccf18
movq -0x2e8(%rbp), %rax
cmpl $0x0, (%rax)
jne 0xccfc1
movl -0x19c(%rbp), %esi
movl -0x17c(%rbp), %eax
subl %eax, %esi
leaq -0x178(%rbp), %rdi
callq 0x5d4e0
movq %rax, -0x2f0(%rbp)
jmp 0xccf4b
movq -0x1b0(%rbp), %rcx
movq -0x2f0(%rbp), %rax
movl $0x0, (%rax)
movl -0x18c(%rbp), %eax
subl 0x5d4(%rcx), %eax
cmpl -0x180(%rbp), %eax
je 0xccfa1
movq -0x1b0(%rbp), %rdi
addq $0xf0, %rdi
movl -0x19c(%rbp), %esi
callq 0x5d4e0
movq %rax, -0x2f8(%rbp)
jmp 0xccf95
movq -0x2f8(%rbp), %rax
cmpl $0x0, (%rax)
jne 0xccfa3
jmp 0xccfd7
movl -0x19c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x17c(%rbp)
movl -0x18c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18c(%rbp)
jmp 0xccfc3
movl -0x19c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x19c(%rbp)
jmp 0xcce53
movq -0x1b0(%rbp), %rcx
movl -0x18c(%rbp), %eax
subl 0x5d4(%rcx), %eax
cmpl -0x180(%rbp), %eax
je 0xccffc
movl $0xffffffff, -0x17c(%rbp) # imm = 0xFFFFFFFF
jmp 0xccffe
cmpl $0x0, -0x17c(%rbp)
jl 0xcd098
movq -0x58(%rbp), %rdi
callq 0x5b090
movq %rax, -0x300(%rbp)
jmp 0xcd01d
movq -0x1b0(%rbp), %rdi
movq -0x300(%rbp), %rax
movq %rax, -0x1a8(%rbp)
movl -0x1a8(%rbp), %edx
movl -0x14c(%rbp), %eax
subl %eax, %edx
leaq -0x178(%rbp), %rsi
callq 0x5b040
movl %eax, -0x304(%rbp)
jmp 0xcd054
movq -0x1b0(%rbp), %rdi
movl -0x304(%rbp), %eax
movl -0x17c(%rbp), %ecx
addl %ecx, %eax
movl %eax, -0x1a0(%rbp)
movl 0x5c8(%rdi), %esi
movl -0x1a0(%rbp), %edx
callq 0x5b020
jmp 0xcd082
movq -0x1b0(%rbp), %rdi
movl -0x1a0(%rbp), %esi
callq 0x5d5c0
jmp 0xcd096
jmp 0xcd098
leaq -0x178(%rbp), %rdi
callq 0x5df00
jmp 0xcd0d8
movq -0x1b0(%rbp), %rdi
movl -0x18(%rbp), %esi
callq 0x5c140
testb $0x1, %al
jne 0xcd0bb
jmp 0xcd0c4
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xcd0f0
jmp 0xcd0d8
movq -0x1b0(%rbp), %rdi
movl -0x18(%rbp), %esi
movl -0x1c(%rbp), %edx
callq 0x5b7b0
movq -0x1b0(%rbp), %rdi
movl -0x14(%rbp), %esi
movl -0x18(%rbp), %edx
movl -0x1c(%rbp), %ecx
callq 0x5cbf0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x310, %rsp            # imm = 0x310
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x5b6b0
nopw %cs:(%rax,%rax)