// File: exrd[P]neteruhsp/neteruhsp/neteruhsp.cc
// Function: neteruhsp::get_token(neteruhsp::tokenize_context_t&)
token_t* get_token( tokenize_context_t& c )
{
	token_t* res = reinterpret_cast<token_t*>( xmalloc( sizeof( token_t ) ) );
	res->tag_ = TOKEN_UNKNOWN;
	res->content_ = nullptr;
	res->cursor_begin_ = c.cursor_;
	res->cursor_end_ = c.cursor_;
	res->left_space_ =false;
	res->right_space_ =false;

	const auto is_space = []( char c ) { return ( c==' ' || c=='\t' ); };
	const auto is_number = []( char c ) { return ( c>='0' && c<='9' ); };
	const auto is_alpha = []( char c ) { return ( ( c>='a' && c<='z' ) || ( c>='A' && c<='Z' ) ); };
	const auto is_rest_ident = [&]( char c ) { return ( is_number(c) || is_alpha(c) || c=='_' ); };

	const auto pp = c.script_ +c.cursor_;
	const char* p = c.script_ +c.cursor_;

restart:
	const auto prev_p = p;
	const auto prev_cursor = static_cast<int>( p - c.script_ );
	res->appear_line_ = c.line_;
	switch( p[0] )
	{
			// EOF
		case '\0':	res->tag_ = TOKEN_EOF; break;

			// 行終わり
		case '\r':
		case '\f':
			++p;
			goto restart;

		case '\n':
			// この位置はマーキング
			++p;
			++c.line_;
			c.line_head_ = p;
			res->tag_ = TOKEN_EOL;
			break;

			// ステートメント終わり
		case ':':
			++p;
			res->tag_ = TOKEN_EOS;
			break;

			// プリプロセッサで使う
		case '%':	++p; res->tag_ = TOKEN_PP_ARG_INDICATOR; break;

			// 微妙な文字
		case '{':	++p; res->tag_ = TOKEN_LBRACE; break;
		case '}':	++p; res->tag_ = TOKEN_RBRACE; break;
		case '(':	++p; res->tag_ = TOKEN_LPARENTHESIS; break;
		case ')':	++p; res->tag_ = TOKEN_RPARENTHESIS; break;
		case ',':	++p; res->tag_ = TOKEN_COMMA; break;

			// 演算子
		case '|':	++p; if ( p[0] == '=' ) { ++p; res->tag_ = TOKEN_BOR_ASSIGN; } else { res->tag_ = TOKEN_OP_BOR; } break;
		case '&':	++p; if ( p[0] == '=' ) { ++p; res->tag_ = TOKEN_BAND_ASSIGN; } else { res->tag_ = TOKEN_OP_BAND; } break;
		case '^':	++p; if ( p[0] == '=' ) { ++p; res->tag_ = TOKEN_BXOR_ASSIGN; } else { res->tag_ = TOKEN_OP_BXOR; } break;
		case '!':	++p; if ( p[0]=='=' ) { ++p; } res->tag_ = TOKEN_OP_NEQ; break;
		case '>':
			++p;
			if ( p[0] == '=' )
			{ ++p; res->tag_ = TOKEN_OP_GTOE; }
			else
			{ res->tag_ = TOKEN_OP_GT; }
			break;
		case '<':
			++p;
			if ( p[0] == '=' )
			{ ++p; res->tag_ = TOKEN_OP_LTOE; }
			else
			{ res->tag_ = TOKEN_OP_LT; }
			break;
		case '+':	++p; if ( p[0] == '=' ) { ++p; res->tag_ = TOKEN_ADD_ASSIGN; } else { res->tag_ = TOKEN_OP_ADD; } break;
		case '-':	++p; if ( p[0] == '=' ) { ++p; res->tag_ = TOKEN_SUB_ASSIGN; } else { res->tag_ = TOKEN_OP_SUB; } break;
		case '*':	++p; if ( p[0] == '=' ) { ++p; res->tag_ = TOKEN_MUL_ASSIGN; } else { res->tag_ = TOKEN_OP_MUL; } break;
		case '/':
			++p;
			if ( p[0] == '/' )// 一行コメント
			{
				++p;
				while( p[0]!='\n' && p[0]!='\0' )
				{ ++p; }
				goto restart;
			}
			if ( p[0] == '*' )// 複数行コメント
			{
				++p;
				for( ; ; )
				{
					if ( p[0] == '\0' )
					{
						raise_error( "複数行コメントの読み取り中にEOFが検出されました@@ %d行目", c.line_ );
						break;
					}
					if ( p[0] == '\n' )
					{
						++p;
						++c.line_;
						c.line_head_ = p;
						continue;
					}
					if ( p[0]=='*' && p[1]=='/' )
					{
						p += 2;
						break;
					}
					++p;
				}
				goto restart;
			}
			if ( p[0] == '=' )
			{
				++p;
				res->tag_ = TOKEN_DIV_ASSIGN;
			}
			else
			{ 
				res->tag_ = TOKEN_OP_DIV;
			}
			break;
		case '\\':	++p; if ( p[0] == '=' ) { ++p; res->tag_ = TOKEN_MOD_ASSIGN; } else { res->tag_ = TOKEN_OP_MOD; } break;

			// 代入
		case '=':
			++p;
			if ( p[0] == '=' )
			{
				++p;
				res->tag_ = TOKEN_OP_EQ;
			}
			else
			{
				res->tag_ = TOKEN_ASSIGN;
			}
			break;

			// 文字列
		case '\"':
		{
			++p;
			const auto s = p;
			while( p[0]!='\"' )
			{
				if ( p[0] == '\0' )
				{
					raise_error( "文字列の読み取り中にEOFが検出されました@@ %d行目", c.line_ );
				}
				if ( p[0]=='\\' && p[1]=='\"' )
				{
					++p;
				}
				++p;
			}
			const auto e = p;
			res->content_ = create_token_string( s, e -s );
			res->tag_ = TOKEN_STRING;
			++p;
			break;
		}

			// コメント
		case ';':
			++p;
			while( p[0]!='\n' && p[0]!='\0' )
			{
				++p;
			}
			goto restart;

		default:
			if ( is_space( p[0] ) )
			{
				// スペース
				++p;
				res->left_space_ =true;
				while( is_space(p[0]) )
				{
					++p;
				}
				goto restart;
			}
			else if ( is_number( p[0] ) )
			{
				// 数値
				if ( p[0] == '0' )
				{
					++p;
				}
				else
				{
					while( is_number(p[0]) )
					{
						++p;
					}
				}
				if ( p[0] == '.' )
				{
					++p;
					while( is_number(p[0]) )
					{
						++p;
					}
					res->tag_ = TOKEN_REAL;
				}
				else
				{
					res->tag_ = TOKEN_INTEGER;
				}
			}
			else if ( is_alpha( p[0] ) )
			{
				// 何らかの識別子
				++p;
				while( is_rest_ident( p[0] ) )
				{
					++p;
				}
				res->tag_ = TOKEN_IDENTIFIER;
				const auto shadow =query_token_shadow( c.script_ +prev_cursor, p -prev_p );
				if ( shadow != -1 )
				{
					res->tag_ = static_cast<token_tag>( shadow );
				}
			}
			else
			{
				// もう読めない
				raise_error( "読み取れない文字[%c]@@ %d行目", p[0], c.line_ );
			}
			break;
	}

	if ( is_space( p[0] ) )
	{
		res->right_space_ = true;
	}

	c.cursor_ += static_cast<int>( p - pp );
	res->cursor_begin_ = prev_cursor;
	res->cursor_end_ = c.cursor_;

	// contentが埋まってないなら埋める
	if ( res->content_ == nullptr )
	{
		const auto len = res->cursor_end_ -res->cursor_begin_;
		res->content_ = create_string( len );
		memcpy( res->content_, c.script_ +res->cursor_begin_, len );
		res->content_[len] = '\0';
	}

	return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movl $0x20, %edi
callq 0x3800
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
movq -0x10(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x8(%rbp), %rax
movl 0x8(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x8(%rbp), %rax
movl 0x8(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x14(%rax)
movq -0x10(%rbp), %rax
movb $0x0, 0x1c(%rax)
movq -0x10(%rbp), %rax
movb $0x0, 0x1d(%rax)
leaq -0x12(%rbp), %rax
movq %rax, -0x28(%rbp)
leaq -0x13(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
movslq 0x8(%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
movslq 0x8(%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x40(%rbp)
movl -0x38(%rbp), %eax
movq -0x8(%rbp), %rcx
movl (%rcx), %ecx
subl %ecx, %eax
movl %eax, -0x44(%rbp)
movq -0x8(%rbp), %rax
movl 0xc(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x18(%rax)
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
movl %eax, %ecx
movq %rcx, -0x68(%rbp)
subl $0x7d, %eax
ja 0x4a5f
movq -0x68(%rbp), %rax
leaq 0xdeeb(%rip), %rcx      # 0x12348
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x10(%rbp), %rax
movl $0x0, (%rax)
jmp 0x4c08
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x4418
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movl 0xc(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0xc(%rax)
movq -0x38(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
movl $0x1, (%rax)
jmp 0x4c08
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movl $0x2, (%rax)
jmp 0x4c08
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movl $0x3, (%rax)
jmp 0x4c08
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movl $0x4, (%rax)
jmp 0x4c08
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movl $0x5, (%rax)
jmp 0x4c08
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movl $0x6, (%rax)
jmp 0x4c08
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movl $0x7, (%rax)
jmp 0x4c08
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movl $0x8, (%rax)
jmp 0x4c08
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3d, %eax
jne 0x45a4
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movl $0x20, (%rax)
jmp 0x45ae
movq -0x10(%rbp), %rax
movl $0xc, (%rax)
jmp 0x4c08
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3d, %eax
jne 0x45e3
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movl $0x21, (%rax)
jmp 0x45ed
movq -0x10(%rbp), %rax
movl $0xd, (%rax)
jmp 0x4c08
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3d, %eax
jne 0x4622
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movl $0x22, (%rax)
jmp 0x462c
movq -0x10(%rbp), %rax
movl $0xe, (%rax)
jmp 0x4c08
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3d, %eax
jne 0x4655
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movl $0x10, (%rax)
jmp 0x4c08
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3d, %eax
jne 0x4694
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movl $0x12, (%rax)
jmp 0x469e
movq -0x10(%rbp), %rax
movl $0x11, (%rax)
jmp 0x4c08
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3d, %eax
jne 0x46d3
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movl $0x14, (%rax)
jmp 0x46dd
movq -0x10(%rbp), %rax
movl $0x13, (%rax)
jmp 0x4c08
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3d, %eax
jne 0x4712
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movl $0x1b, (%rax)
jmp 0x471c
movq -0x10(%rbp), %rax
movl $0x15, (%rax)
jmp 0x4c08
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3d, %eax
jne 0x4751
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movl $0x1c, (%rax)
jmp 0x475b
movq -0x10(%rbp), %rax
movl $0x16, (%rax)
jmp 0x4c08
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3d, %eax
jne 0x4790
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movl $0x1d, (%rax)
jmp 0x479a
movq -0x10(%rbp), %rax
movl $0x17, (%rax)
jmp 0x4c08
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
jne 0x4800
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0xa, %ecx
movb %al, -0x69(%rbp)
je 0x47e4
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x69(%rbp)
movb -0x69(%rbp), %al
testb $0x1, %al
jne 0x47ed
jmp 0x47fb
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x47c3
jmp 0x4418
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2a, %eax
jne 0x48af
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x483f
movq -0x8(%rbp), %rax
movl 0xc(%rax), %esi
leaq 0xe4b7(%rip), %rdi      # 0x12ced
movb $0x0, %al
callq 0x4cd0
jmp 0x48aa
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
cmpl $0xa, %eax
jne 0x4872
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movl 0xc(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0xc(%rax)
movq -0x38(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x10(%rax)
jmp 0x481c
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2a, %eax
jne 0x4899
movq -0x38(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x2f, %eax
jne 0x4899
movq -0x38(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x38(%rbp)
jmp 0x48aa
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x481c
jmp 0x4418
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3d, %eax
jne 0x48d3
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movl $0x1e, (%rax)
jmp 0x48dd
movq -0x10(%rbp), %rax
movl $0x18, (%rax)
jmp 0x4c08
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3d, %eax
jne 0x4912
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movl $0x1f, (%rax)
jmp 0x491c
movq -0x10(%rbp), %rax
movl $0x19, (%rax)
jmp 0x4c08
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3d, %eax
jne 0x4951
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movl $0xf, (%rax)
jmp 0x495b
movq -0x10(%rbp), %rax
movl $0x1a, (%rax)
jmp 0x4c08
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x22, %eax
je 0x49d4
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x49a1
movq -0x8(%rbp), %rax
movl 0xc(%rax), %esi
leaq 0xe3a4(%rip), %rdi      # 0x12d3e
movb $0x0, %al
callq 0x4cd0
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x5c, %eax
jne 0x49c6
movq -0x38(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x22, %eax
jne 0x49c6
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x4974
movq -0x38(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x50(%rbp), %rdi
movq -0x58(%rbp), %rsi
movq -0x50(%rbp), %rax
subq %rax, %rsi
callq 0x4d90
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movl $0xb, (%rax)
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x4c08
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0xa, %ecx
movb %al, -0x6a(%rbp)
je 0x4a43
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x6a(%rbp)
movb -0x6a(%rbp), %al
testb $0x1, %al
jne 0x4a4c
jmp 0x4a5a
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x4a22
jmp 0x4418
movq -0x38(%rbp), %rax
leaq -0x11(%rbp), %rdi
movsbl (%rax), %esi
callq 0x4ed0
testb $0x1, %al
jne 0x4a75
jmp 0x4ab2
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movb $0x1, 0x1c(%rax)
movq -0x38(%rbp), %rax
leaq -0x11(%rbp), %rdi
movsbl (%rax), %esi
callq 0x4ed0
testb $0x1, %al
jne 0x4a9f
jmp 0x4aad
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x4a89
jmp 0x4418
movq -0x38(%rbp), %rax
leaq -0x12(%rbp), %rdi
movsbl (%rax), %esi
callq 0x4f00
testb $0x1, %al
jne 0x4acb
jmp 0x4b64
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x30, %eax
jne 0x4ae5
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x4b0d
jmp 0x4ae7
movq -0x38(%rbp), %rax
leaq -0x12(%rbp), %rdi
movsbl (%rax), %esi
callq 0x4f00
testb $0x1, %al
jne 0x4afd
jmp 0x4b0b
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x4ae7
jmp 0x4b0d
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2e, %eax
jne 0x4b55
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
leaq -0x12(%rbp), %rdi
movsbl (%rax), %esi
callq 0x4f00
testb $0x1, %al
jne 0x4b3b
jmp 0x4b49
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x4b25
movq -0x10(%rbp), %rax
movl $0xa, (%rax)
jmp 0x4b5f
movq -0x10(%rbp), %rax
movl $0x9, (%rax)
jmp 0x4c04
movq -0x38(%rbp), %rax
leaq -0x13(%rbp), %rdi
movsbl (%rax), %esi
callq 0x4f30
testb $0x1, %al
jne 0x4b7a
jmp 0x4be6
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
leaq -0x28(%rbp), %rdi
movsbl (%rax), %esi
callq 0x4f80
testb $0x1, %al
jne 0x4b9c
jmp 0x4baa
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x4b86
movq -0x10(%rbp), %rax
movl $0x23, (%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movslq -0x44(%rbp), %rax
addq %rax, %rdi
movq -0x38(%rbp), %rsi
movq -0x40(%rbp), %rax
subq %rax, %rsi
callq 0x4270
movl %eax, -0x5c(%rbp)
cmpl $-0x1, -0x5c(%rbp)
je 0x4be4
movl -0x5c(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
jmp 0x4c02
movq -0x38(%rbp), %rax
movsbl (%rax), %esi
movq -0x8(%rbp), %rax
movl 0xc(%rax), %edx
leaq 0xe188(%rip), %rdi      # 0x12d83
movb $0x0, %al
callq 0x4cd0
jmp 0x4c04
jmp 0x4c06
jmp 0x4c08
movq -0x38(%rbp), %rax
leaq -0x11(%rbp), %rdi
movsbl (%rax), %esi
callq 0x4ed0
testb $0x1, %al
jne 0x4c1e
jmp 0x4c26
movq -0x10(%rbp), %rax
movb $0x1, 0x1d(%rax)
movq -0x38(%rbp), %rax
movq -0x30(%rbp), %rcx
subq %rcx, %rax
movl %eax, %ecx
movq -0x8(%rbp), %rax
addl 0x8(%rax), %ecx
movl %ecx, 0x8(%rax)
movl -0x44(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x8(%rbp), %rax
movl 0x8(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x14(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x4cb8
movq -0x10(%rbp), %rax
movl 0x14(%rax), %eax
movq -0x10(%rbp), %rcx
subl 0x10(%rcx), %eax
movl %eax, -0x60(%rbp)
movslq -0x60(%rbp), %rdi
callq 0x3b30
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rsi
movq -0x10(%rbp), %rax
movslq 0x10(%rax), %rax
addq %rax, %rsi
movslq -0x60(%rbp), %rdx
callq 0x3120
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x60(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x10(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)