// File: /workspace/github_cpp_makefile_star2_O2/pranavmodx[P]modlang/src/lexer.cpp
// Function: Lexer::nextToken()
Token Lexer::nextToken()
{
	Token token;

	skipWhitespace();

	switch (curChar)
	{
	case '=':
		if (peekChar() == '=')
		{
			token = Token(EQ, "==");
			readChar();
		}
		else
			token = Token(ASSIGN, curChar);

		readChar();
		break;

	case '!':
		if (peekChar() == '=')
		{
			token = Token(NEQ, "!=");
			readChar();
		}
		else
			token = Token(BANG, curChar);

		readChar();
		break;

	case '<':
		if (peekChar() == '=')
		{
			token = Token(LTEQ, "<=");
			readChar();
		}
		else
			token = Token(LT, curChar);

		readChar();
		break;

	case '>':
		if (peekChar() == '=')
		{
			token = Token(GTEQ, ">=");
			readChar();
		}
		else
			token = Token(GT, curChar);

		readChar();
		break;

	case '+':
		token = Token(PLUS, curChar);
		readChar();
		break;

	case '-':
		token = Token(MINUS, curChar);
		readChar();
		break;

	case '*':
		token = Token(ASTERISK, curChar);
		readChar();
		break;

	case '/':
		token = Token(SLASH, curChar);
		readChar();
		break;

	case '%':
		token = Token(MODULO, curChar);
		readChar();
		break;

	case ',':
		token = Token(COMMA, curChar);
		readChar();
		break;

	case ';':
		token = Token(SEMICOLON, curChar);
		readChar();
		break;

	case ':':
		token = Token(COLON, curChar);
		readChar();
		break;

	case '(':
		token = Token(LPAREN, curChar);
		readChar();
		break;

	case ')':
		token = Token(RPAREN, curChar);
		readChar();
		break;

	case '{':
		token = Token(LBRACE, curChar);
		readChar();
		break;

	case '}':
		token = Token(RBRACE, curChar);
		readChar();
		break;

	case '[':
		token = Token(LBRACKET, curChar);
		readChar();
		break;

	case ']':
		token = Token(RBRACKET, curChar);
		readChar();
		break;

	case '"':
		token = Token(STRING, readString());
		readChar();
		break;

	case 0:
		token = Token(END, "");
		readChar();
		break;

	default:
		if (isLetter(curChar))
		{
			token.literal = readIdentifier();
			token.type = LookupIdentifier(token.literal);
			return token;
		}
		else if (isDigit(curChar))
		{
			token.type = INTEGER;
			token.literal = readNumber();
			return token;
		}
		else
		{
			token = Token(ILLEGAL, curChar);
			readChar();
		}
		break;
	}

	return token;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x448, %rsp            # imm = 0x448
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
xorl %eax, %eax
movb %al, 0x10(%rdi)
leaq 0x30(%rdi), %rcx
movq %rcx, 0x20(%rdi)
andq $0x0, 0x28(%rdi)
movb %al, 0x30(%rdi)
movq %rsi, %rdi
callq 0x536a
movzbl 0x28(%r14), %eax
leal -0x21(%rax), %ecx
cmpl $0x1d, %ecx
ja 0x476b
leaq 0x1a7e(%rip), %rdx      # 0x614c
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movslq 0x24(%r14), %rax
cmpq %rax, 0x8(%r14)
jbe 0x4fbe
movq (%r14), %rcx
cmpb $0x3d, (%rcx,%rax)
jne 0x4fbe
leaq 0x56cf(%rip), %rsi      # 0x9dc8
leaq 0x3c8(%rsp), %rdi
callq 0x21a0
leaq 0x1931(%rip), %rsi      # 0x603e
leaq 0x3a8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x3b56
leaq 0x8(%rsp), %rdi
leaq 0x3c8(%rsp), %rsi
leaq 0x3a8(%rsp), %rdx
callq 0x5486
leaq 0x8(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3b92
movq %r15, %rdi
callq 0x3bbc
leaq 0x3a8(%rsp), %rdi
callq 0x2218
leaq 0x3c8(%rsp), %rdi
jmp 0x4d03
testl %eax, %eax
je 0x4ea5
cmpl $0x5b, %eax
je 0x4db5
cmpl $0x5d, %eax
je 0x4e55
cmpl $0x7b, %eax
je 0x4e05
cmpl $0x7d, %eax
jne 0x47e3
leaq 0x570e(%rip), %rsi      # 0x9ea8
leaq 0x148(%rsp), %rdi
callq 0x21a0
movsbl 0x28(%r14), %edx
leaq 0x8(%rsp), %rdi
leaq 0x148(%rsp), %rsi
callq 0x54bc
leaq 0x8(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3b92
movq %r15, %rdi
callq 0x3bbc
leaq 0x148(%rsp), %rdi
jmp 0x50de
leaq 0x20(%rbx), %r15
movsbl %al, %ebp
movl %ebp, %edi
callq 0x4620
testb %al, %al
je 0x505e
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x53fc
leaq 0x8(%rsp), %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0x2180
movq %r14, %rdi
callq 0x2218
leaq 0x68(%rsp), %rdi
movq %r15, %rsi
callq 0x21a0
leaq 0x8(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x3cb4
leaq 0x8(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2180
movq %r14, %rdi
callq 0x2218
leaq 0x68(%rsp), %rdi
jmp 0x5095
leaq 0x5405(%rip), %rsi      # 0x9c68
leaq 0x2a8(%rsp), %rdi
callq 0x21a0
movsbl 0x28(%r14), %edx
leaq 0x8(%rsp), %rdi
leaq 0x2a8(%rsp), %rsi
callq 0x54bc
leaq 0x8(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3b92
movq %r15, %rdi
callq 0x3bbc
leaq 0x2a8(%rsp), %rdi
jmp 0x50de
leaq 0x53d5(%rip), %rsi      # 0x9c88
leaq 0x288(%rsp), %rdi
callq 0x21a0
movsbl 0x28(%r14), %edx
leaq 0x8(%rsp), %rdi
leaq 0x288(%rsp), %rsi
callq 0x54bc
leaq 0x8(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3b92
movq %r15, %rdi
callq 0x3bbc
leaq 0x288(%rsp), %rdi
jmp 0x50de
movslq 0x24(%r14), %rax
cmpq %rax, 0x8(%r14)
jbe 0x4f1e
movq (%r14), %rcx
cmpb $0x3d, (%rcx,%rax)
jne 0x4f1e
leaq 0x544a(%rip), %rsi      # 0x9d68
leaq 0x368(%rsp), %rdi
callq 0x21a0
leaq 0x1703(%rip), %rsi      # 0x6035
leaq 0x348(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x3b56
leaq 0x8(%rsp), %rdi
leaq 0x368(%rsp), %rsi
leaq 0x348(%rsp), %rdx
callq 0x5486
leaq 0x8(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3b92
movq %r15, %rdi
callq 0x3bbc
leaq 0x348(%rsp), %rdi
callq 0x2218
leaq 0x368(%rsp), %rdi
jmp 0x4d03
leaq 0x5371(%rip), %rsi      # 0x9d08
leaq 0x228(%rsp), %rdi
callq 0x21a0
movsbl 0x28(%r14), %edx
leaq 0x8(%rsp), %rdi
leaq 0x228(%rsp), %rsi
callq 0x54bc
leaq 0x8(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3b92
movq %r15, %rdi
callq 0x3bbc
leaq 0x228(%rsp), %rdi
jmp 0x50de
leaq 0x5441(%rip), %rsi      # 0x9e28
leaq 0x1c8(%rsp), %rdi
callq 0x21a0
movsbl 0x28(%r14), %edx
leaq 0x8(%rsp), %rdi
leaq 0x1c8(%rsp), %rsi
callq 0x54bc
leaq 0x8(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3b92
movq %r15, %rdi
callq 0x3bbc
leaq 0x1c8(%rsp), %rdi
jmp 0x50de
leaq 0x5431(%rip), %rsi      # 0x9e68
leaq 0x188(%rsp), %rdi
callq 0x21a0
movsbl 0x28(%r14), %edx
leaq 0x8(%rsp), %rdi
leaq 0x188(%rsp), %rsi
callq 0x54bc
leaq 0x8(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3b92
movq %r15, %rdi
callq 0x3bbc
leaq 0x188(%rsp), %rdi
jmp 0x50de
movslq 0x24(%r14), %rax
cmpq %rax, 0x8(%r14)
jbe 0x4f6e
movq (%r14), %rcx
cmpb $0x3d, (%rcx,%rax)
jne 0x4f6e
leaq 0x52e6(%rip), %rsi      # 0x9d88
leaq 0x308(%rsp), %rdi
callq 0x21a0
leaq 0x1582(%rip), %rsi      # 0x6038
leaq 0x2e8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x3b56
leaq 0x8(%rsp), %rdi
leaq 0x308(%rsp), %rsi
leaq 0x2e8(%rsp), %rdx
callq 0x5486
leaq 0x8(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3b92
movq %r15, %rdi
callq 0x3bbc
leaq 0x2e8(%rsp), %rdi
callq 0x2218
leaq 0x308(%rsp), %rdi
jmp 0x4d03
leaq 0x51cd(%rip), %rsi      # 0x9ce8
leaq 0x248(%rsp), %rdi
callq 0x21a0
movsbl 0x28(%r14), %edx
leaq 0x8(%rsp), %rdi
leaq 0x248(%rsp), %rsi
callq 0x54bc
leaq 0x8(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3b92
movq %r15, %rdi
callq 0x3bbc
leaq 0x248(%rsp), %rdi
jmp 0x50de
leaq 0x50bd(%rip), %rsi      # 0x9c28
leaq 0xe8(%rsp), %rdi
callq 0x21a0
leaq 0xc8(%rsp), %rdi
movq %r14, %rsi
callq 0x53b2
leaq 0x8(%rsp), %rdi
leaq 0xe8(%rsp), %rsi
leaq 0xc8(%rsp), %rdx
callq 0x5486
leaq 0x8(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3b92
movq %r15, %rdi
callq 0x3bbc
leaq 0xc8(%rsp), %rdi
callq 0x2218
leaq 0xe8(%rsp), %rdi
jmp 0x50de
leaq 0x50ed(%rip), %rsi      # 0x9cc8
leaq 0x268(%rsp), %rdi
callq 0x21a0
movsbl 0x28(%r14), %edx
leaq 0x8(%rsp), %rdi
leaq 0x268(%rsp), %rsi
callq 0x54bc
leaq 0x8(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3b92
movq %r15, %rdi
callq 0x3bbc
leaq 0x268(%rsp), %rdi
jmp 0x50de
leaq 0x521d(%rip), %rsi      # 0x9e48
leaq 0x1a8(%rsp), %rdi
callq 0x21a0
movsbl 0x28(%r14), %edx
leaq 0x8(%rsp), %rdi
leaq 0x1a8(%rsp), %rsi
callq 0x54bc
leaq 0x8(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3b92
movq %r15, %rdi
callq 0x3bbc
leaq 0x1a8(%rsp), %rdi
jmp 0x50de
movslq 0x24(%r14), %rax
cmpq %rax, 0x8(%r14)
jbe 0x500e
movq (%r14), %rcx
cmpb $0x3d, (%rcx,%rax)
jne 0x500e
leaq 0x5112(%rip), %rsi      # 0x9da8
leaq 0x428(%rsp), %rdi
callq 0x21a0
leaq 0x1391(%rip), %rsi      # 0x603b
leaq 0x408(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x3b56
leaq 0x8(%rsp), %rdi
leaq 0x428(%rsp), %rsi
leaq 0x408(%rsp), %rdx
callq 0x5486
leaq 0x8(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3b92
movq %r15, %rdi
callq 0x3bbc
leaq 0x408(%rsp), %rdi
callq 0x2218
leaq 0x428(%rsp), %rdi
callq 0x2218
movq %r14, %rdi
callq 0x4658
jmp 0x50e3
leaq 0x50cc(%rip), %rsi      # 0x9de8
leaq 0x208(%rsp), %rdi
callq 0x21a0
movsbl 0x28(%r14), %edx
leaq 0x8(%rsp), %rdi
leaq 0x208(%rsp), %rsi
callq 0x54bc
leaq 0x8(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3b92
movq %r15, %rdi
callq 0x3bbc
leaq 0x208(%rsp), %rdi
jmp 0x50de
leaq 0x509c(%rip), %rsi      # 0x9e08
leaq 0x1e8(%rsp), %rdi
callq 0x21a0
movsbl 0x28(%r14), %edx
leaq 0x8(%rsp), %rdi
leaq 0x1e8(%rsp), %rsi
callq 0x54bc
leaq 0x8(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3b92
movq %r15, %rdi
callq 0x3bbc
leaq 0x1e8(%rsp), %rdi
jmp 0x50de
leaq 0x510c(%rip), %rsi      # 0x9ec8
leaq 0x128(%rsp), %rdi
callq 0x21a0
movsbl 0x28(%r14), %edx
leaq 0x8(%rsp), %rdi
leaq 0x128(%rsp), %rsi
callq 0x54bc
leaq 0x8(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3b92
movq %r15, %rdi
callq 0x3bbc
leaq 0x128(%rsp), %rdi
jmp 0x50de
leaq 0x507c(%rip), %rsi      # 0x9e88
leaq 0x168(%rsp), %rdi
callq 0x21a0
movsbl 0x28(%r14), %edx
leaq 0x8(%rsp), %rdi
leaq 0x168(%rsp), %rsi
callq 0x54bc
leaq 0x8(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3b92
movq %r15, %rdi
callq 0x3bbc
leaq 0x168(%rsp), %rdi
jmp 0x50de
leaq 0x508c(%rip), %rsi      # 0x9ee8
leaq 0x108(%rsp), %rdi
callq 0x21a0
movsbl 0x28(%r14), %edx
leaq 0x8(%rsp), %rdi
leaq 0x108(%rsp), %rsi
callq 0x54bc
leaq 0x8(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3b92
movq %r15, %rdi
callq 0x3bbc
leaq 0x108(%rsp), %rdi
jmp 0x50de
leaq 0x4d1c(%rip), %rsi      # 0x9bc8
leaq 0xa8(%rsp), %rdi
callq 0x21a0
leaq 0x11f6(%rip), %rsi      # 0x60b6
leaq 0x88(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x3b56
leaq 0x8(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
leaq 0x88(%rsp), %rdx
callq 0x5486
leaq 0x8(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3b92
movq %r15, %rdi
callq 0x3bbc
leaq 0x88(%rsp), %rdi
callq 0x2218
leaq 0xa8(%rsp), %rdi
jmp 0x50de
leaq 0x4e03(%rip), %rsi      # 0x9d28
leaq 0x328(%rsp), %rdi
callq 0x21a0
movsbl 0x28(%r14), %edx
leaq 0x8(%rsp), %rdi
leaq 0x328(%rsp), %rsi
callq 0x54bc
leaq 0x8(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3b92
movq %r15, %rdi
callq 0x3bbc
leaq 0x328(%rsp), %rdi
jmp 0x50de
leaq 0x4dd3(%rip), %rsi      # 0x9d48
leaq 0x2c8(%rsp), %rdi
callq 0x21a0
movsbl 0x28(%r14), %edx
leaq 0x8(%rsp), %rdi
leaq 0x2c8(%rsp), %rsi
callq 0x54bc
leaq 0x8(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3b92
movq %r15, %rdi
callq 0x3bbc
leaq 0x2c8(%rsp), %rdi
jmp 0x50de
leaq 0x4ce3(%rip), %rsi      # 0x9ca8
leaq 0x388(%rsp), %rdi
callq 0x21a0
movsbl 0x28(%r14), %edx
leaq 0x8(%rsp), %rdi
leaq 0x388(%rsp), %rsi
callq 0x54bc
leaq 0x8(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3b92
movq %r15, %rdi
callq 0x3bbc
leaq 0x388(%rsp), %rdi
jmp 0x50de
leaq 0x4c33(%rip), %rsi      # 0x9c48
leaq 0x3e8(%rsp), %rdi
callq 0x21a0
movsbl 0x28(%r14), %edx
leaq 0x8(%rsp), %rdi
leaq 0x3e8(%rsp), %rsi
callq 0x54bc
leaq 0x8(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3b92
movq %r15, %rdi
callq 0x3bbc
leaq 0x3e8(%rsp), %rdi
jmp 0x50de
addl $-0x30, %ebp
cmpl $0x9, %ebp
ja 0x509c
leaq 0x4b9b(%rip), %rsi      # 0x9c08
movq %rbx, %rdi
callq 0x20b0
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x5442
leaq 0x8(%rsp), %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0x2180
movq %r14, %rdi
callq 0x2218
jmp 0x50eb
leaq 0x4b05(%rip), %rsi      # 0x9ba8
leaq 0x48(%rsp), %rdi
callq 0x21a0
movsbl 0x28(%r14), %edx
leaq 0x8(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x54bc
leaq 0x8(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3b92
movq %r15, %rdi
callq 0x3bbc
leaq 0x48(%rsp), %rdi
callq 0x2218
movq %r14, %rdi
callq 0x4658
movq %rbx, %rax
addq $0x448, %rsp            # imm = 0x448
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq 0x408(%rsp), %rdi
callq 0x2218
jmp 0x5147
movq %rax, %r14
leaq 0x2e8(%rsp), %rdi
callq 0x2218
jmp 0x5157
movq %rax, %r14
leaq 0x348(%rsp), %rdi
callq 0x2218
jmp 0x5167
movq %rax, %r14
leaq 0x3a8(%rsp), %rdi
callq 0x2218
jmp 0x5177
movq %rax, %r14
leaq 0x428(%rsp), %rdi
jmp 0x533c
movq %rax, %r14
leaq 0x308(%rsp), %rdi
jmp 0x533c
movq %rax, %r14
leaq 0x368(%rsp), %rdi
jmp 0x533c
movq %rax, %r14
leaq 0x3c8(%rsp), %rdi
jmp 0x533c
jmp 0x5357
jmp 0x5357
jmp 0x5357
jmp 0x5357
movq %rax, %r14
leaq 0x48(%rsp), %rdi
jmp 0x533c
jmp 0x5357
jmp 0x5357
jmp 0x5357
movq %rax, %r14
leaq 0x68(%rsp), %rdi
jmp 0x533c
jmp 0x5357
jmp 0x5357
movq %rax, %r14
leaq 0x3e8(%rsp), %rdi
jmp 0x533c
movq %rax, %r14
leaq 0x388(%rsp), %rdi
jmp 0x533c
movq %rax, %r14
leaq 0x2c8(%rsp), %rdi
jmp 0x533c
movq %rax, %r14
leaq 0x328(%rsp), %rdi
jmp 0x533c
jmp 0x5357
jmp 0x5357
jmp 0x5357
jmp 0x5357
movq %rax, %r14
leaq 0x88(%rsp), %rdi
callq 0x2218
jmp 0x5234
movq %rax, %r14
leaq 0xa8(%rsp), %rdi
jmp 0x533c
movq %rax, %r14
leaq 0x148(%rsp), %rdi
jmp 0x533c
movq %rax, %r14
leaq 0x108(%rsp), %rdi
jmp 0x533c
movq %rax, %r14
leaq 0x168(%rsp), %rdi
jmp 0x533c
movq %rax, %r14
leaq 0x128(%rsp), %rdi
jmp 0x533c
jmp 0x5357
jmp 0x5357
jmp 0x5357
jmp 0x5357
jmp 0x5357
movq %rax, %r14
leaq 0xc8(%rsp), %rdi
callq 0x2218
jmp 0x52e6
movq %rax, %r14
leaq 0x1e8(%rsp), %rdi
jmp 0x533c
movq %rax, %r14
leaq 0x208(%rsp), %rdi
jmp 0x533c
movq %rax, %r14
leaq 0x1a8(%rsp), %rdi
jmp 0x533c
movq %rax, %r14
leaq 0x268(%rsp), %rdi
jmp 0x533c
movq %rax, %r14
leaq 0xe8(%rsp), %rdi
jmp 0x533c
movq %rax, %r14
leaq 0x248(%rsp), %rdi
jmp 0x533c
movq %rax, %r14
leaq 0x188(%rsp), %rdi
jmp 0x533c
movq %rax, %r14
leaq 0x1c8(%rsp), %rdi
jmp 0x533c
movq %rax, %r14
leaq 0x228(%rsp), %rdi
jmp 0x533c
movq %rax, %r14
leaq 0x288(%rsp), %rdi
jmp 0x533c
movq %rax, %r14
leaq 0x2a8(%rsp), %rdi
callq 0x2218
jmp 0x535a
jmp 0x5357
jmp 0x5357
jmp 0x5357
jmp 0x5357
jmp 0x5357
jmp 0x5357
jmp 0x5357
jmp 0x5357
jmp 0x5357
jmp 0x5357
movq %rax, %r14
movq %rbx, %rdi
callq 0x3bbc
movq %r14, %rdi
callq 0x21f0