// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/classes/gui/widgets/special/cursor.cpp
// Function: smooth::GUI::Cursor::OnSpecialKey(int)
S::Bool S::GUI::Cursor::OnSpecialKey(Int keyCode)
{
	/* Called when a special key such as
	 * return or an arrow key is hit.
	 */
	if (!focussed) return False;

#if defined __APPLE__
	Input::Keyboard::Key	 commandKey = Input::Keyboard::KeyCommand;
#elif defined __HAIKU__
	Input::Keyboard::Key	 commandKey = Input::Keyboard::KeyAlt;
#else
	Input::Keyboard::Key	 commandKey = Input::Keyboard::KeyControl;
#endif

	/* Make sure no other modifiers are pressed along with command key.
	 */
	if (Input::Keyboard::GetKeyState(commandKey) && !(Input::Keyboard::GetKeyState(Input::Keyboard::KeyCommand) ^
							  Input::Keyboard::GetKeyState(Input::Keyboard::KeyControl) ^
							  Input::Keyboard::GetKeyState(Input::Keyboard::KeyAlt))) return False;

	/* Evaluate key code.
	 */
	Int	 newPos	 = 0;
	Int	 linePos = 0;

	Int	 i	 = 0;

	switch (keyCode)
	{
		case Input::Keyboard::KeyLeft:
		case Input::Keyboard::KeyRight:
			if (!Input::Keyboard::GetKeyState(Input::Keyboard::KeyShift)) MarkText(-1, -1);

			/* Calculate new cursor pos.
			 */
			if (Input::Keyboard::GetKeyState(commandKey))
			{
				Bool	 isLeft = ((keyCode == Input::Keyboard::KeyLeft  && !IsRightToLeft()) || (keyCode == Input::Keyboard::KeyRight && IsRightToLeft()));

				if (isLeft)
				{
					newPos = 0;

					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'))) { newPos = i + 1; break; }
					}
				}
				else
				{
					newPos = text.Length();

					for (Int i = promptPos; i < text.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'))) { newPos = i + 1; break; }
					}
				}
			}
			else
			{
				Bool	 isLeft = ((keyCode == Input::Keyboard::KeyLeft  && !IsRightToLeft()) || (keyCode == Input::Keyboard::KeyRight && IsRightToLeft()));

				if (isLeft) { if (promptPos == 0)	      break; newPos = promptPos - 1; }
				else	    { if (promptPos >= text.Length()) break; newPos = promptPos + 1; }
			}

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

				MarkText(markStart, newPos);
			}

			SetCursorPos(newPos);

			break;
		case Input::Keyboard::KeyHome:
		case Input::Keyboard::KeyEnd:
			if (!Input::Keyboard::GetKeyState(Input::Keyboard::KeyShift)) MarkText(-1, -1);

			/* Calculate new cursor pos.
			 */
			if (Input::Keyboard::GetKeyState(commandKey))
			{
				if	(keyCode == Input::Keyboard::KeyHome)	{ if (promptPos == 0)		  break; newPos = 0;		 }
				else if (keyCode == Input::Keyboard::KeyEnd)	{ if (promptPos >= text.Length()) break; newPos = text.Length(); }
			}
			else
			{
				if (keyCode == Input::Keyboard::KeyHome)
				{
					newPos = 0;

					for (Int i = promptPos - 1; i >= 0; i--)
					{
						if (text[i] == '\n') { newPos = i + 1; break; }
					}
				}
				else
				{
					newPos = text.Length();

					for (Int i = promptPos; i < text.Length(); i++)
					{
						if (text[i] == '\n') { newPos = i; break; }
					}
				}
			}

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

				MarkText(markStart, newPos);
			}

			SetCursorPos(newPos);

			break;
		case Input::Keyboard::KeyUp:
		case Input::Keyboard::KeyDown:
			if (!Binary::IsFlagSet(GetFlags(), CF_MULTILINE)) break;

			if (!Input::Keyboard::GetKeyState(Input::Keyboard::KeyShift)) MarkText(-1, -1);

			/* Calculate new cursor pos.
			 */
			linePos	= promptPos;
			newPos	= promptPos;

			for (i = promptPos - 1; i >= 0; i--)
			{
				if (text[i] == '\n') { linePos -= (i + 1); break; }
			}

			if (keyCode == Input::Keyboard::KeyUp)
			{
				if (i == 0) newPos = 0;

				for (Int j = i - 1; j >= 0; j--)
				{
					if (text[j] == '\n' || j == 0) { newPos = Math::Min(i, j + linePos + (j == 0 ? 0 : 1)); break; }
				}
			}
			else
			{
				for (Int j = promptPos; j < text.Length(); j++)
				{
					if (text[j] == '\n')
					{
						for (Int k = j + 1; k <= j + 1 + linePos; k++)
						{
							newPos = k;

							if (text[k] == '\n' || text[k] == 0) break;
						}

						break;
					}
				}
			}

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

				MarkText(markStart, newPos);
			}

			SetCursorPos(newPos);

			break;
		case Input::Keyboard::KeyReturn:
			if (!IsActive()) break;

			if (Binary::IsFlagSet(GetFlags(), CF_MULTILINE))
			{
				Bool	 selected = (markStart != markEnd && markStart >= 0 && markEnd >= 0);

				flags |= CF_NOINPUT;

				DeleteSelectedText();

				flags ^= CF_NOINPUT;

				if (selected) RemoveHistoryEntry();

				String	 insertText;

				insertText[0] = '\n';

				InsertText(insertText);

				onInput.Emit(text);
			}
			else
			{
				focussed = False;

				onLoseFocus.Emit();

				onEnter.Emit(text);
			}

			break;
		case Input::Keyboard::KeyEscape:
			if (!IsActive()) break;

			focussed = False;

			onLoseFocus.Emit();

			return True;
		case Input::Keyboard::KeyInsert:
#ifndef __APPLE__
			if (		   Input::Keyboard::GetKeyState(commandKey) && !Input::Keyboard::GetKeyState(Input::Keyboard::KeyShift)) CopyToClipboard();
			if (IsActive() && !Input::Keyboard::GetKeyState(commandKey) &&  Input::Keyboard::GetKeyState(Input::Keyboard::KeyShift)) InsertFromClipboard();
#endif
			break;
		case Input::Keyboard::KeyBack:
			if (!IsActive() || Input::Keyboard::GetKeyState(commandKey) || Input::Keyboard::GetKeyState(Input::Keyboard::KeyShift)) break;

			if (markStart != markEnd) { DeleteSelectedText(); break; }

			if (promptPos == 0) break;

			markStart = promptPos - 1;
			markEnd	  = promptPos;

			DeleteSelectedText();

			break;
		case Input::Keyboard::KeyDelete:
			if (!IsActive() || Input::Keyboard::GetKeyState(commandKey)) break;
#ifdef __APPLE__
			if (Input::Keyboard::GetKeyState(Input::Keyboard::KeyShift)) break;
#endif
			if (markStart != markEnd)
			{
				if (Input::Keyboard::GetKeyState(Input::Keyboard::KeyShift)) CopyToClipboard();

				DeleteSelectedText();

				break;
			}

			if (Input::Keyboard::GetKeyState(Input::Keyboard::KeyShift)) break;

			if (promptPos == text.Length()) break;

			markStart = promptPos;
			markEnd	  = promptPos + 1;

			DeleteSelectedText();

			break;
		case Input::Keyboard::KeyA:
			if (		  Input::Keyboard::GetKeyState(commandKey))   MarkAll();

			break;
		case Input::Keyboard::KeyC:
			if (		  Input::Keyboard::GetKeyState(commandKey))   CopyToClipboard();

			break;
		case Input::Keyboard::KeyX:
			if (IsActive() && Input::Keyboard::GetKeyState(commandKey)) { CopyToClipboard(); DeleteSelectedText(); }

			break;
		case Input::Keyboard::KeyV:
			if (IsActive() && Input::Keyboard::GetKeyState(commandKey))   InsertFromClipboard();

			break;
		case Input::Keyboard::KeyZ:

			if (IsActive() && Input::Keyboard::GetKeyState(commandKey))   Undo();

			break;
		case Input::Keyboard::KeyY:
			if (IsActive() && Input::Keyboard::GetKeyState(commandKey))   Redo();

			break;
	}

	return False;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x80(%rbp)
testb $0x1, 0xcd(%rax)
jne 0xcdf6c
movb $0x0, -0x1(%rbp)
jmp 0xcec25
movl $0x11, -0x18(%rbp)
movl -0x18(%rbp), %edi
callq 0x5bc00
testb $0x1, %al
jne 0xcdf81
jmp 0xcdfde
movl $0x5b, %edi
callq 0x5bc00
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x88(%rbp)
movl $0x11, %edi
callq 0x5bc00
movb %al, %cl
movl -0x88(%rbp), %eax
andb $0x1, %cl
movzbl %cl, %ecx
xorl %ecx, %eax
movl %eax, -0x84(%rbp)
movl $0x12, %edi
callq 0x5bc00
movb %al, %cl
movl -0x84(%rbp), %eax
andb $0x1, %cl
movzbl %cl, %ecx
xorl %ecx, %eax
cmpl $0x0, %eax
jne 0xcdfde
movb $0x0, -0x1(%rbp)
jmp 0xcec25
movl $0x0, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x14(%rbp), %eax
addl $-0x8, %eax
movl %eax, %ecx
movq %rcx, -0x90(%rbp)
subl $0x52, %eax
ja 0xcec21
movq -0x90(%rbp), %rax
leaq 0xbcb1f(%rip), %rcx     # 0x18ab38
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x10, %edi
callq 0x5bc00
testb $0x1, %al
jne 0xce040
movq -0x80(%rbp), %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl %edx, %esi
callq 0x5b020
movl -0x18(%rbp), %edi
callq 0x5bc00
testb $0x1, %al
jne 0xce051
jmp 0xce2d5
cmpl $0x25, -0x14(%rbp)
jne 0xce075
movq -0x80(%rbp), %rdi
movq (%rdi), %rax
callq *0x160(%rax)
movb %al, %cl
movb $0x1, %al
testb $0x1, %cl
movb %al, -0x91(%rbp)
jne 0xce075
jmp 0xce0a2
xorl %eax, %eax
cmpl $0x27, -0x14(%rbp)
movb %al, -0x92(%rbp)
jne 0xce096
movq -0x80(%rbp), %rdi
movq (%rdi), %rax
callq *0x160(%rax)
movb %al, -0x92(%rbp)
movb -0x92(%rbp), %al
movb %al, -0x91(%rbp)
movb -0x91(%rbp), %al
andb $0x1, %al
movb %al, -0x25(%rbp)
testb $0x1, -0x25(%rbp)
je 0xce1b0
movq -0x80(%rbp), %rax
movl $0x0, -0x1c(%rbp)
movl 0x5c0(%rax), %eax
subl $0x2, %eax
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
jl 0xce1ab
movq -0x80(%rbp), %rdi
addq $0xf0, %rdi
movl -0x2c(%rbp), %esi
addl $0x1, %esi
callq 0x5d4e0
cmpl $0xa, (%rax)
je 0xce190
movq -0x80(%rbp), %rdi
addq $0xf0, %rdi
movl -0x2c(%rbp), %esi
callq 0x5d4e0
cmpl $0x20, (%rax)
je 0xce13f
movq -0x80(%rbp), %rdi
addq $0xf0, %rdi
movl -0x2c(%rbp), %esi
callq 0x5d4e0
cmpl $0x9, (%rax)
je 0xce13f
movq -0x80(%rbp), %rdi
addq $0xf0, %rdi
movl -0x2c(%rbp), %esi
callq 0x5d4e0
cmpl $0xa, (%rax)
jne 0xce19b
movq -0x80(%rbp), %rdi
addq $0xf0, %rdi
movl -0x2c(%rbp), %esi
addl $0x1, %esi
callq 0x5d4e0
cmpl $0x20, (%rax)
je 0xce19b
movq -0x80(%rbp), %rdi
addq $0xf0, %rdi
movl -0x2c(%rbp), %esi
addl $0x1, %esi
callq 0x5d4e0
cmpl $0x9, (%rax)
je 0xce19b
movq -0x80(%rbp), %rdi
addq $0xf0, %rdi
movl -0x2c(%rbp), %esi
addl $0x1, %esi
callq 0x5d4e0
cmpl $0xa, (%rax)
je 0xce19b
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xce1ab
jmp 0xce19d
movl -0x2c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xce0ce
jmp 0xce2d0
movq -0x80(%rbp), %rdi
addq $0xf0, %rdi
callq 0x5b800
movl %eax, %ecx
movq -0x80(%rbp), %rax
movl %ecx, -0x1c(%rbp)
movl 0x5c0(%rax), %eax
movl %eax, -0x30(%rbp)
movq -0x80(%rbp), %rdi
movl -0x30(%rbp), %eax
movl %eax, -0x98(%rbp)
addq $0xf0, %rdi
callq 0x5b800
movl %eax, %ecx
movl -0x98(%rbp), %eax
cmpl %ecx, %eax
jge 0xce2ce
movq -0x80(%rbp), %rdi
addq $0xf0, %rdi
movl -0x30(%rbp), %esi
addl $0x1, %esi
callq 0x5d4e0
cmpl $0xa, (%rax)
je 0xce2b3
movq -0x80(%rbp), %rdi
addq $0xf0, %rdi
movl -0x30(%rbp), %esi
callq 0x5d4e0
cmpl $0x20, (%rax)
je 0xce262
movq -0x80(%rbp), %rdi
addq $0xf0, %rdi
movl -0x30(%rbp), %esi
callq 0x5d4e0
cmpl $0x9, (%rax)
je 0xce262
movq -0x80(%rbp), %rdi
addq $0xf0, %rdi
movl -0x30(%rbp), %esi
callq 0x5d4e0
cmpl $0xa, (%rax)
jne 0xce2be
movq -0x80(%rbp), %rdi
addq $0xf0, %rdi
movl -0x30(%rbp), %esi
addl $0x1, %esi
callq 0x5d4e0
cmpl $0x20, (%rax)
je 0xce2be
movq -0x80(%rbp), %rdi
addq $0xf0, %rdi
movl -0x30(%rbp), %esi
addl $0x1, %esi
callq 0x5d4e0
cmpl $0x9, (%rax)
je 0xce2be
movq -0x80(%rbp), %rdi
addq $0xf0, %rdi
movl -0x30(%rbp), %esi
addl $0x1, %esi
callq 0x5d4e0
cmpl $0xa, (%rax)
je 0xce2be
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xce2ce
jmp 0xce2c0
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0xce1d2
jmp 0xce2d0
jmp 0xce39a
cmpl $0x25, -0x14(%rbp)
jne 0xce2f9
movq -0x80(%rbp), %rdi
movq (%rdi), %rax
callq *0x160(%rax)
movb %al, %cl
movb $0x1, %al
testb $0x1, %cl
movb %al, -0x99(%rbp)
jne 0xce2f9
jmp 0xce326
xorl %eax, %eax
cmpl $0x27, -0x14(%rbp)
movb %al, -0x9a(%rbp)
jne 0xce31a
movq -0x80(%rbp), %rdi
movq (%rdi), %rax
callq *0x160(%rax)
movb %al, -0x9a(%rbp)
movb -0x9a(%rbp), %al
movb %al, -0x99(%rbp)
movb -0x99(%rbp), %al
andb $0x1, %al
movb %al, -0x31(%rbp)
testb $0x1, -0x31(%rbp)
je 0xce35b
movq -0x80(%rbp), %rax
cmpl $0x0, 0x5c0(%rax)
jne 0xce349
jmp 0xcec21
movq -0x80(%rbp), %rax
movl 0x5c0(%rax), %eax
subl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xce398
movq -0x80(%rbp), %rdi
movl 0x5c0(%rdi), %eax
movl %eax, -0xa0(%rbp)
addq $0xf0, %rdi
callq 0x5b800
movl %eax, %ecx
movl -0xa0(%rbp), %eax
cmpl %ecx, %eax
jl 0xce388
jmp 0xcec21
movq -0x80(%rbp), %rax
movl 0x5c0(%rax), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xce39a
movl $0x10, %edi
callq 0x5bc00
testb $0x1, %al
jne 0xce3aa
jmp 0xce3d9
movq -0x80(%rbp), %rax
cmpl $-0x1, 0x5c8(%rax)
jne 0xce3c7
movq -0x80(%rbp), %rax
movl 0x5c0(%rax), %ecx
movl %ecx, 0x5c8(%rax)
movq -0x80(%rbp), %rdi
movl 0x5c8(%rdi), %esi
movl -0x1c(%rbp), %edx
callq 0x5b020
movq -0x80(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0x5d5c0
jmp 0xcec21
movl $0x10, %edi
callq 0x5bc00
testb $0x1, %al
jne 0xce408
movq -0x80(%rbp), %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl %edx, %esi
callq 0x5b020
movl -0x18(%rbp), %edi
callq 0x5bc00
testb $0x1, %al
jne 0xce416
jmp 0xce484
cmpl $0x24, -0x14(%rbp)
jne 0xce437
movq -0x80(%rbp), %rax
cmpl $0x0, 0x5c0(%rax)
jne 0xce42e
jmp 0xcec21
movl $0x0, -0x1c(%rbp)
jmp 0xce47f
cmpl $0x23, -0x14(%rbp)
jne 0xce47d
movq -0x80(%rbp), %rdi
movl 0x5c0(%rdi), %eax
movl %eax, -0xa4(%rbp)
addq $0xf0, %rdi
callq 0x5b800
movl %eax, %ecx
movl -0xa4(%rbp), %eax
cmpl %ecx, %eax
jl 0xce46a
jmp 0xcec21
movq -0x80(%rbp), %rdi
addq $0xf0, %rdi
callq 0x5b800
movl %eax, -0x1c(%rbp)
jmp 0xce47f
jmp 0xce551
cmpl $0x24, -0x14(%rbp)
jne 0xce4d9
movq -0x80(%rbp), %rax
movl $0x0, -0x1c(%rbp)
movl 0x5c0(%rax), %eax
subl $0x1, %eax
movl %eax, -0x38(%rbp)
cmpl $0x0, -0x38(%rbp)
jl 0xce4d7
movq -0x80(%rbp), %rdi
addq $0xf0, %rdi
movl -0x38(%rbp), %esi
callq 0x5d4e0
cmpl $0xa, (%rax)
jne 0xce4ca
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xce4d7
jmp 0xce4cc
movl -0x38(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0xce4a1
jmp 0xce54f
movq -0x80(%rbp), %rdi
addq $0xf0, %rdi
callq 0x5b800
movl %eax, %ecx
movq -0x80(%rbp), %rax
movl %ecx, -0x1c(%rbp)
movl 0x5c0(%rax), %eax
movl %eax, -0x3c(%rbp)
movq -0x80(%rbp), %rdi
movl -0x3c(%rbp), %eax
movl %eax, -0xa8(%rbp)
addq $0xf0, %rdi
callq 0x5b800
movl %eax, %ecx
movl -0xa8(%rbp), %eax
cmpl %ecx, %eax
jge 0xce54d
movq -0x80(%rbp), %rdi
addq $0xf0, %rdi
movl -0x3c(%rbp), %esi
callq 0x5d4e0
cmpl $0xa, (%rax)
jne 0xce540
movl -0x3c(%rbp), %eax
movl %eax, -0x1c(%rbp)
jmp 0xce54d
jmp 0xce542
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0xce4fb
jmp 0xce54f
jmp 0xce551
movl $0x10, %edi
callq 0x5bc00
testb $0x1, %al
jne 0xce561
jmp 0xce590
movq -0x80(%rbp), %rax
cmpl $-0x1, 0x5c8(%rax)
jne 0xce57e
movq -0x80(%rbp), %rax
movl 0x5c0(%rax), %ecx
movl %ecx, 0x5c8(%rax)
movq -0x80(%rbp), %rdi
movl 0x5c8(%rdi), %esi
movl -0x1c(%rbp), %edx
callq 0x5b020
movq -0x80(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0x5d5c0
jmp 0xcec21
movq -0x80(%rbp), %rdi
callq 0x5a120
movl %eax, %edi
movl $0x1, %esi
callq 0x5ce30
testb $0x1, %al
jne 0xce5bf
jmp 0xcec21
movl $0x10, %edi
callq 0x5bc00
testb $0x1, %al
jne 0xce5dd
movq -0x80(%rbp), %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl %edx, %esi
callq 0x5b020
movq -0x80(%rbp), %rax
movl 0x5c0(%rax), %ecx
movl %ecx, -0x20(%rbp)
movl 0x5c0(%rax), %ecx
movl %ecx, -0x1c(%rbp)
movl 0x5c0(%rax), %eax
subl $0x1, %eax
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jl 0xce63a
movq -0x80(%rbp), %rdi
addq $0xf0, %rdi
movl -0x24(%rbp), %esi
callq 0x5d4e0
cmpl $0xa, (%rax)
jne 0xce62d
movl -0x24(%rbp), %ecx
addl $0x1, %ecx
movl -0x20(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x20(%rbp)
jmp 0xce63a
jmp 0xce62f
movl -0x24(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0xce5ff
cmpl $0x26, -0x14(%rbp)
jne 0xce6b1
cmpl $0x0, -0x24(%rbp)
jne 0xce64d
movl $0x0, -0x1c(%rbp)
movl -0x24(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x40(%rbp)
cmpl $0x0, -0x40(%rbp)
jl 0xce6ac
movq -0x80(%rbp), %rdi
addq $0xf0, %rdi
movl -0x40(%rbp), %esi
callq 0x5d4e0
cmpl $0xa, (%rax)
je 0xce67a
cmpl $0x0, -0x40(%rbp)
jne 0xce69f
movl -0x24(%rbp), %edi
movl -0x40(%rbp), %esi
addl -0x20(%rbp), %esi
movl -0x40(%rbp), %edx
movl $0x1, %eax
xorl %ecx, %ecx
cmpl $0x0, %edx
cmovel %ecx, %eax
addl %eax, %esi
callq 0x5ce90
movl %eax, -0x1c(%rbp)
jmp 0xce6ac
jmp 0xce6a1
movl -0x40(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0xce656
jmp 0xce771
movq -0x80(%rbp), %rax
movl 0x5c0(%rax), %eax
movl %eax, -0x44(%rbp)
movq -0x80(%rbp), %rdi
movl -0x44(%rbp), %eax
movl %eax, -0xac(%rbp)
addq $0xf0, %rdi
callq 0x5b800
movl %eax, %ecx
movl -0xac(%rbp), %eax
cmpl %ecx, %eax
jge 0xce76f
movq -0x80(%rbp), %rdi
addq $0xf0, %rdi
movl -0x44(%rbp), %esi
callq 0x5d4e0
cmpl $0xa, (%rax)
jne 0xce75f
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
movl -0x48(%rbp), %eax
movl -0x44(%rbp), %ecx
addl $0x1, %ecx
addl -0x20(%rbp), %ecx
cmpl %ecx, %eax
jg 0xce75d
movq -0x80(%rbp), %rdi
movl -0x48(%rbp), %eax
movl %eax, -0x1c(%rbp)
addq $0xf0, %rdi
movl -0x48(%rbp), %esi
callq 0x5d4e0
cmpl $0xa, (%rax)
je 0xce74e
movq -0x80(%rbp), %rdi
addq $0xf0, %rdi
movl -0x48(%rbp), %esi
callq 0x5d4e0
cmpl $0x0, (%rax)
jne 0xce750
jmp 0xce75d
jmp 0xce752
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0xce708
jmp 0xce76f
jmp 0xce761
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0xce6be
jmp 0xce771
movl $0x10, %edi
callq 0x5bc00
testb $0x1, %al
jne 0xce781
jmp 0xce7b0
movq -0x80(%rbp), %rax
cmpl $-0x1, 0x5c8(%rax)
jne 0xce79e
movq -0x80(%rbp), %rax
movl 0x5c0(%rax), %ecx
movl %ecx, 0x5c8(%rax)
movq -0x80(%rbp), %rdi
movl 0x5c8(%rdi), %esi
movl -0x1c(%rbp), %edx
callq 0x5b020
movq -0x80(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0x5d5c0
jmp 0xcec21
movq -0x80(%rbp), %rdi
movq (%rdi), %rax
callq *0x98(%rax)
testb $0x1, %al
jne 0xce7d7
jmp 0xcec21
movq -0x80(%rbp), %rdi
callq 0x5a120
movl %eax, %edi
movl $0x1, %esi
callq 0x5ce30
testb $0x1, %al
jne 0xce7f5
jmp 0xce906
movq -0x80(%rbp), %rdx
movl 0x5c8(%rdx), %ecx
xorl %eax, %eax
cmpl 0x5cc(%rdx), %ecx
movb %al, -0xad(%rbp)
je 0xce838
movq -0x80(%rbp), %rcx
xorl %eax, %eax
cmpl $0x0, 0x5c8(%rcx)
movb %al, -0xad(%rbp)
jl 0xce838
movq -0x80(%rbp), %rax
cmpl $0x0, 0x5cc(%rax)
setge %al
movb %al, -0xad(%rbp)
movq -0x80(%rbp), %rdi
movb -0xad(%rbp), %al
andb $0x1, %al
movb %al, -0x49(%rbp)
movl 0x30(%rdi), %eax
orl $0x40000000, %eax       # imm = 0x40000000
movl %eax, 0x30(%rdi)
callq 0x5ded8
movq -0x80(%rbp), %rax
movl 0x30(%rax), %ecx
xorl $0x40000000, %ecx       # imm = 0x40000000
movl %ecx, 0x30(%rax)
testb $0x1, -0x49(%rbp)
je 0xce876
movq -0x80(%rbp), %rdi
callq 0x5ad60
leaq -0x68(%rbp), %rdi
movq %rdi, -0xc8(%rbp)
xorl %esi, %esi
movl %esi, -0xbc(%rbp)
callq 0x5da90
movq -0xc8(%rbp), %rdi
movl -0xbc(%rbp), %esi
callq 0x5d4e0
movq %rax, -0xb8(%rbp)
jmp 0xce8a9
movq -0x80(%rbp), %rdi
movq -0xb8(%rbp), %rax
movl $0xa, (%rax)
leaq -0x68(%rbp), %rsi
callq 0x5a3c0
jmp 0xce8c5
movq -0x80(%rbp), %rsi
movq %rsi, %rdi
addq $0x708, %rdi            # imm = 0x708
addq $0xf0, %rsi
callq 0x97960
jmp 0xce8e1
leaq -0x68(%rbp), %rdi
callq 0x5df00
jmp 0xce937
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x5df00
jmp 0xcec33
movq -0x80(%rbp), %rdi
movb $0x0, 0xcd(%rdi)
addq $0x518, %rdi            # imm = 0x518
callq 0x8af60
movq -0x80(%rbp), %rsi
movq %rsi, %rdi
addq $0x728, %rdi            # imm = 0x728
addq $0xf0, %rsi
callq 0x97960
jmp 0xcec21
movq -0x80(%rbp), %rdi
movq (%rdi), %rax
callq *0x98(%rax)
testb $0x1, %al
jne 0xce952
jmp 0xcec21
movq -0x80(%rbp), %rdi
movb $0x0, 0xcd(%rdi)
addq $0x518, %rdi            # imm = 0x518
callq 0x8af60
movb $0x1, -0x1(%rbp)
jmp 0xcec25
movl -0x18(%rbp), %edi
callq 0x5bc00
testb $0x1, %al
jne 0xce980
jmp 0xce997
movl $0x10, %edi
callq 0x5bc00
testb $0x1, %al
jne 0xce997
movq -0x80(%rbp), %rdi
callq 0x5ded0
movq -0x80(%rbp), %rdi
movq (%rdi), %rax
callq *0x98(%rax)
testb $0x1, %al
jne 0xce9aa
jmp 0xce9cf
movl -0x18(%rbp), %edi
callq 0x5bc00
testb $0x1, %al
jne 0xce9cf
movl $0x10, %edi
callq 0x5bc00
testb $0x1, %al
jne 0xce9c6
jmp 0xce9cf
movq -0x80(%rbp), %rdi
callq 0x5c2a0
jmp 0xcec21
movq -0x80(%rbp), %rdi
movq (%rdi), %rax
callq *0x98(%rax)
testb $0x1, %al
jne 0xce9e7
jmp 0xcea03
movl -0x18(%rbp), %edi
callq 0x5bc00
testb $0x1, %al
jne 0xcea03
movl $0x10, %edi
callq 0x5bc00
testb $0x1, %al
jne 0xcea03
jmp 0xcea08
jmp 0xcec21
movq -0x80(%rbp), %rcx
movl 0x5c8(%rcx), %eax
cmpl 0x5cc(%rcx), %eax
je 0xcea28
movq -0x80(%rbp), %rdi
callq 0x5ded8
jmp 0xcec21
movq -0x80(%rbp), %rax
cmpl $0x0, 0x5c0(%rax)
jne 0xcea3a
jmp 0xcec21
movq -0x80(%rbp), %rdi
movl 0x5c0(%rdi), %eax
subl $0x1, %eax
movl %eax, 0x5c8(%rdi)
movl 0x5c0(%rdi), %eax
movl %eax, 0x5cc(%rdi)
callq 0x5ded8
jmp 0xcec21
movq -0x80(%rbp), %rdi
movq (%rdi), %rax
callq *0x98(%rax)
testb $0x1, %al
jne 0xcea76
jmp 0xcea84
movl -0x18(%rbp), %edi
callq 0x5bc00
testb $0x1, %al
jne 0xcea84
jmp 0xcea89
jmp 0xcec21
movq -0x80(%rbp), %rcx
movl 0x5c8(%rcx), %eax
cmpl 0x5cc(%rcx), %eax
je 0xceac2
movl $0x10, %edi
callq 0x5bc00
testb $0x1, %al
jne 0xceaab
jmp 0xceab4
movq -0x80(%rbp), %rdi
callq 0x5ded0
movq -0x80(%rbp), %rdi
callq 0x5ded8
jmp 0xcec21
movl $0x10, %edi
callq 0x5bc00
testb $0x1, %al
jne 0xcead2
jmp 0xcead7
jmp 0xcec21
movq -0x80(%rbp), %rdi
movl 0x5c0(%rdi), %eax
movl %eax, -0xcc(%rbp)
addq $0xf0, %rdi
callq 0x5b800
movl %eax, %ecx
movl -0xcc(%rbp), %eax
cmpl %ecx, %eax
jne 0xceb04
jmp 0xcec21
movq -0x80(%rbp), %rdi
movl 0x5c0(%rdi), %eax
movl %eax, 0x5c8(%rdi)
movl 0x5c0(%rdi), %eax
addl $0x1, %eax
movl %eax, 0x5cc(%rdi)
callq 0x5ded8
jmp 0xcec21
movl -0x18(%rbp), %edi
callq 0x5bc00
testb $0x1, %al
jne 0xceb3b
jmp 0xceb44
movq -0x80(%rbp), %rdi
callq 0x5deb8
jmp 0xcec21
movl -0x18(%rbp), %edi
callq 0x5bc00
testb $0x1, %al
jne 0xceb57
jmp 0xceb60
movq -0x80(%rbp), %rdi
callq 0x5ded0
jmp 0xcec21
movq -0x80(%rbp), %rdi
movq (%rdi), %rax
callq *0x98(%rax)
testb $0x1, %al
jne 0xceb78
jmp 0xceb98
movl -0x18(%rbp), %edi
callq 0x5bc00
testb $0x1, %al
jne 0xceb86
jmp 0xceb98
movq -0x80(%rbp), %rdi
callq 0x5ded0
movq -0x80(%rbp), %rdi
callq 0x5ded8
jmp 0xcec21
movq -0x80(%rbp), %rdi
movq (%rdi), %rax
callq *0x98(%rax)
testb $0x1, %al
jne 0xcebb0
jmp 0xcebc7
movl -0x18(%rbp), %edi
callq 0x5bc00
testb $0x1, %al
jne 0xcebbe
jmp 0xcebc7
movq -0x80(%rbp), %rdi
callq 0x5c2a0
jmp 0xcec21
movq -0x80(%rbp), %rdi
movq (%rdi), %rax
callq *0x98(%rax)
testb $0x1, %al
jne 0xcebdc
jmp 0xcebf3
movl -0x18(%rbp), %edi
callq 0x5bc00
testb $0x1, %al
jne 0xcebea
jmp 0xcebf3
movq -0x80(%rbp), %rdi
callq 0x5de10
jmp 0xcec21
movq -0x80(%rbp), %rdi
movq (%rdi), %rax
callq *0x98(%rax)
testb $0x1, %al
jne 0xcec08
jmp 0xcec1f
movl -0x18(%rbp), %edi
callq 0x5bc00
testb $0x1, %al
jne 0xcec16
jmp 0xcec1f
movq -0x80(%rbp), %rdi
callq 0x5c0f0
jmp 0xcec21
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0xd0, %rsp
popq %rbp
retq
movq -0x70(%rbp), %rdi
callq 0x5b6b0
nopl (%rax)