// File: pranavmodx[P]modlang/test/lexer_test.cpp
// Function: testNextToken()
void testNextToken()
{
	std::string input =
		"let five = 5; "
		"let ten = 10; "

		"let add = def(x, y) { "
		"x + y; "
		"}; "
		"let result = add(five, ten); "

		"!-/*5; "
		"5 < 10 > 5; "

		"if (5 < 10) { "
		"return true; "
		"} else { "
		"return false; "
		"} "

		"10 == 10; "
		"10 != 9; "

		"\"foobar\" "
		"\"foo bar\" "

		"[1, 2]; "
		"{\"foo\": \"bar\"} ";

	std::vector<std::pair<TokenType, std::string>> tests;
	tests.reserve(100);

	tests = {
		{LET, "let"},
		{IDENT, "five"},
		{ASSIGN, "="},
		{INTEGER, "5"},
		{SEMICOLON, ";"},
		{LET, "let"},
		{IDENT, "ten"},
		{ASSIGN, "="},
		{INTEGER, "10"},
		{SEMICOLON, ";"},
		{LET, "let"},
		{IDENT, "add"},
		{ASSIGN, "="},
		{FUNCTION, "def"},
		{LPAREN, "("},
		{IDENT, "x"},
		{COMMA, ","},
		{IDENT, "y"},
		{RPAREN, ")"},
		{LBRACE, "{"},
		{IDENT, "x"},
		{PLUS, "+"},
		{IDENT, "y"},
		{SEMICOLON, ";"},
		{RBRACE, "}"},
		{SEMICOLON, ";"},
		{LET, "let"},
		{IDENT, "result"},
		{ASSIGN, "="},
		{IDENT, "add"},
		{LPAREN, "("},
		{IDENT, "five"},
		{COMMA, ","},
		{IDENT, "ten"},
		{RPAREN, ")"},
		{SEMICOLON, ";"},
		{BANG, "!"},
		{MINUS, "-"},
		{SLASH, "/"},
		{ASTERISK, "*"},
		{INTEGER, "5"},
		{SEMICOLON, ";"},
		{INTEGER, "5"},
		{LT, "<"},
		{INTEGER, "10"},
		{GT, ">"},
		{INTEGER, "5"},
		{SEMICOLON, ";"},
		{IF, "if"},
		{LPAREN, "("},
		{INTEGER, "5"},
		{LT, "<"},
		{INTEGER, "10"},
		{RPAREN, ")"},
		{LBRACE, "{"},
		{RETURN, "return"},
		{TRUE, "true"},
		{SEMICOLON, ";"},
		{RBRACE, "}"},
		{ELSE, "else"},
		{LBRACE, "{"},
		{RETURN, "return"},
		{FALSE, "false"},
		{SEMICOLON, ";"},
		{RBRACE, "}"},
		{INTEGER, "10"},
		{EQ, "=="},
		{INTEGER, "10"},
		{SEMICOLON, ";"},
		{INTEGER, "10"},
		{NEQ, "!="},
		{INTEGER, "9"},
		{SEMICOLON, ";"},
		{STRING, "foobar"},
		{STRING, "foo bar"},
		{LBRACKET, "["},
		{INTEGER, "1"},
		{COMMA, ","},
		{INTEGER, "2"},
		{RBRACKET, "]"},
		{SEMICOLON, ";"},
		{LBRACE, "{"},
		{STRING, "foo"},
		{COLON, ":"},
		{STRING, "bar"},
		{RBRACE, "}"},
		{END, ""}};

	Lexer lexer;
	lexer.New(input);

	Token token;
	for (int i = 0; i < tests.size(); i++)
	{
		token = lexer.nextToken();

		if (token.type != tests[i].first)
			std::cout << i << "expected " << tests[i].first << ", got " << token.type << std::endl;

		if (token.literal != tests[i].second)
			std::cout << i << "expected " << tests[i].second << ", got " << token.literal << std::endl;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x17a0, %rsp           # imm = 0x17A0
leaq -0x21(%rbp), %rdi
movq %rdi, -0x16e8(%rbp)
callq 0x22f0
movq -0x16e8(%rbp), %rdx
leaq 0x7801(%rip), %rsi      # 0xe0aa
leaq -0x20(%rbp), %rdi
callq 0x7930
jmp 0x68b4
leaq -0x21(%rbp), %rdi
callq 0x21f0
leaq -0x50(%rbp), %rdi
movq %rdi, -0x16f0(%rbp)
callq 0x79e0
movq -0x16f0(%rbp), %rdi
movl $0x64, %esi
callq 0x7a00
jmp 0x68e0
leaq -0x1620(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xec63(%rip), %rsi      # 0x15558
leaq 0x788c(%rip), %rdx      # 0xe188
callq 0x7b00
jmp 0x6903
leaq -0x15e0(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xe8e0(%rip), %rsi      # 0x151f8
leaq 0x786d(%rip), %rdx      # 0xe18c
callq 0x7b90
jmp 0x6926
leaq -0x15a0(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xe91d(%rip), %rsi      # 0x15258
leaq 0x76fd(%rip), %rdx      # 0xe03f
callq 0x7c20
jmp 0x6949
leaq -0x1560(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xe8ba(%rip), %rsi      # 0x15218
leaq 0x782c(%rip), %rdx      # 0xe191
callq 0x7c20
jmp 0x696c
leaq -0x1520(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xea97(%rip), %rsi      # 0x15418
leaq 0x76bb(%rip), %rdx      # 0xe043
callq 0x7c20
jmp 0x698f
leaq -0x14e0(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xebb4(%rip), %rsi      # 0x15558
leaq 0x77dd(%rip), %rdx      # 0xe188
callq 0x7b00
jmp 0x69b2
leaq -0x14a0(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xe831(%rip), %rsi      # 0x151f8
leaq 0x77c5(%rip), %rdx      # 0xe193
callq 0x7b00
jmp 0x69d5
leaq -0x1460(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xe86e(%rip), %rsi      # 0x15258
leaq 0x764e(%rip), %rdx      # 0xe03f
callq 0x7c20
jmp 0x69f8
leaq -0x1420(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xe80b(%rip), %rsi      # 0x15218
leaq 0x7783(%rip), %rdx      # 0xe197
callq 0x7cb0
jmp 0x6a1b
leaq -0x13e0(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xe9e8(%rip), %rsi      # 0x15418
leaq 0x760c(%rip), %rdx      # 0xe043
callq 0x7c20
jmp 0x6a3e
leaq -0x13a0(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xeb05(%rip), %rsi      # 0x15558
leaq 0x772e(%rip), %rdx      # 0xe188
callq 0x7b00
jmp 0x6a61
leaq -0x1360(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xe782(%rip), %rsi      # 0x151f8
leaq 0x771d(%rip), %rdx      # 0xe19a
callq 0x7b00
jmp 0x6a84
leaq -0x1320(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xe7bf(%rip), %rsi      # 0x15258
leaq 0x759f(%rip), %rdx      # 0xe03f
callq 0x7c20
jmp 0x6aa7
leaq -0x12e0(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xeb1c(%rip), %rsi      # 0x155d8
leaq 0x76db(%rip), %rdx      # 0xe19e
callq 0x7b00
jmp 0x6aca
leaq -0x12a0(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xe979(%rip), %rsi      # 0x15458
leaq 0x7561(%rip), %rdx      # 0xe047
callq 0x7c20
jmp 0x6aed
leaq -0x1260(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xe6f6(%rip), %rsi      # 0x151f8
leaq 0x7699(%rip), %rdx      # 0xe1a2
callq 0x7c20
jmp 0x6b10
leaq -0x1220(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xe8d3(%rip), %rsi      # 0x153f8
leaq 0x7515(%rip), %rdx      # 0xe041
callq 0x7c20
jmp 0x6b33
leaq -0x11e0(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xe6b0(%rip), %rsi      # 0x151f8
leaq 0x7655(%rip), %rdx      # 0xe1a4
callq 0x7c20
jmp 0x6b56
leaq -0x11a0(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xe90d(%rip), %rsi      # 0x15478
leaq 0x76e8(%rip), %rdx      # 0xe25a
callq 0x7c20
jmp 0x6b79
leaq -0x1160(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xe90a(%rip), %rsi      # 0x15498
leaq 0x74b4(%rip), %rdx      # 0xe049
callq 0x7c20
jmp 0x6b9c
leaq -0x1120(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xe647(%rip), %rsi      # 0x151f8
leaq 0x75ea(%rip), %rdx      # 0xe1a2
callq 0x7c20
jmp 0x6bbf
leaq -0x10e0(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xe6a4(%rip), %rsi      # 0x15278
leaq 0x744a(%rip), %rdx      # 0xe025
callq 0x7c20
jmp 0x6be2
leaq -0x10a0(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xe601(%rip), %rsi      # 0x151f8
leaq 0x75a6(%rip), %rdx      # 0xe1a4
callq 0x7c20
jmp 0x6c05
leaq -0x1060(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xe7fe(%rip), %rsi      # 0x15418
leaq 0x7422(%rip), %rdx      # 0xe043
callq 0x7c20
jmp 0x6c28
leaq -0x1020(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xe87b(%rip), %rsi      # 0x154b8
leaq 0x7407(%rip), %rdx      # 0xe04b
callq 0x7c20
jmp 0x6c4b
leaq -0xfe0(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xe7b8(%rip), %rsi      # 0x15418
leaq 0x73dc(%rip), %rdx      # 0xe043
callq 0x7c20
jmp 0x6c6e
leaq -0xfa0(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xe8d5(%rip), %rsi      # 0x15558
leaq 0x74fe(%rip), %rdx      # 0xe188
callq 0x7b00
jmp 0x6c91
leaq -0xf60(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xe552(%rip), %rsi      # 0x151f8
leaq 0x74f9(%rip), %rdx      # 0xe1a6
callq 0x7d40
jmp 0x6cb4
leaq -0xf20(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xe58f(%rip), %rsi      # 0x15258
leaq 0x736f(%rip), %rdx      # 0xe03f
callq 0x7c20
jmp 0x6cd7
leaq -0xee0(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xe50c(%rip), %rsi      # 0x151f8
leaq 0x74a7(%rip), %rdx      # 0xe19a
callq 0x7b00
jmp 0x6cfa
leaq -0xea0(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xe749(%rip), %rsi      # 0x15458
leaq 0x7331(%rip), %rdx      # 0xe047
callq 0x7c20
jmp 0x6d1d
leaq -0xe60(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xe4c6(%rip), %rsi      # 0x151f8
leaq 0x7453(%rip), %rdx      # 0xe18c
callq 0x7b90
jmp 0x6d40
leaq -0xe20(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xe6a3(%rip), %rsi      # 0x153f8
leaq 0x72e5(%rip), %rdx      # 0xe041
callq 0x7c20
jmp 0x6d63
leaq -0xde0(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xe480(%rip), %rsi      # 0x151f8
leaq 0x7414(%rip), %rdx      # 0xe193
callq 0x7b00
jmp 0x6d86
leaq -0xda0(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xe6dd(%rip), %rsi      # 0x15478
leaq 0x74b8(%rip), %rdx      # 0xe25a
callq 0x7c20
jmp 0x6da9
leaq -0xd60(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xe65a(%rip), %rsi      # 0x15418
leaq 0x727e(%rip), %rdx      # 0xe043
callq 0x7c20
jmp 0x6dcc
leaq -0xd20(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xe4d7(%rip), %rsi      # 0x152b8
leaq 0x7241(%rip), %rdx      # 0xe029
callq 0x7c20
jmp 0x6def
leaq -0xce0(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xe494(%rip), %rsi      # 0x15298
leaq 0x721c(%rip), %rdx      # 0xe027
callq 0x7c20
jmp 0x6e12
leaq -0xca0(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xe4d1(%rip), %rsi      # 0x152f8
leaq 0x71ff(%rip), %rdx      # 0xe02d
callq 0x7c20
jmp 0x6e35
leaq -0xc60(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xe48e(%rip), %rsi      # 0x152d8
leaq 0x71da(%rip), %rdx      # 0xe02b
callq 0x7c20
jmp 0x6e58
leaq -0xc20(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xe3ab(%rip), %rsi      # 0x15218
leaq 0x731d(%rip), %rdx      # 0xe191
callq 0x7c20
jmp 0x6e7b
leaq -0xbe0(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xe588(%rip), %rsi      # 0x15418
leaq 0x71ac(%rip), %rdx      # 0xe043
callq 0x7c20
jmp 0x6e9e
leaq -0xba0(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xe365(%rip), %rsi      # 0x15218
leaq 0x72d7(%rip), %rdx      # 0xe191
callq 0x7c20
jmp 0x6ec1
leaq -0xb60(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xe462(%rip), %rsi      # 0x15338
leaq 0x7154(%rip), %rdx      # 0xe031
callq 0x7c20
jmp 0x6ee4
leaq -0xb20(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xe31f(%rip), %rsi      # 0x15218
leaq 0x7297(%rip), %rdx      # 0xe197
callq 0x7cb0
jmp 0x6f07
leaq -0xae0(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xe43c(%rip), %rsi      # 0x15358
leaq 0x7110(%rip), %rdx      # 0xe033
callq 0x7c20
jmp 0x6f2a
leaq -0xaa0(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xe2d9(%rip), %rsi      # 0x15218
leaq 0x724b(%rip), %rdx      # 0xe191
callq 0x7c20
jmp 0x6f4d
leaq -0xa60(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xe4b6(%rip), %rsi      # 0x15418
leaq 0x70da(%rip), %rdx      # 0xe043
callq 0x7c20
jmp 0x6f70
leaq -0xa20(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xe5f3(%rip), %rsi      # 0x15578
leaq 0x7221(%rip), %rdx      # 0xe1ad
callq 0x7cb0
jmp 0x6f93
leaq -0x9e0(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xe4b0(%rip), %rsi      # 0x15458
leaq 0x7098(%rip), %rdx      # 0xe047
callq 0x7c20
jmp 0x6fb6
leaq -0x9a0(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xe24d(%rip), %rsi      # 0x15218
leaq 0x71bf(%rip), %rdx      # 0xe191
callq 0x7c20
jmp 0x6fd9
leaq -0x960(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xe34a(%rip), %rsi      # 0x15338
leaq 0x703c(%rip), %rdx      # 0xe031
callq 0x7c20
jmp 0x6ffc
leaq -0x920(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xe207(%rip), %rsi      # 0x15218
leaq 0x717f(%rip), %rdx      # 0xe197
callq 0x7cb0
jmp 0x701f
leaq -0x8e0(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xe444(%rip), %rsi      # 0x15478
leaq 0x721f(%rip), %rdx      # 0xe25a
callq 0x7c20
jmp 0x7042
leaq -0x8a0(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xe441(%rip), %rsi      # 0x15498
leaq 0x6feb(%rip), %rdx      # 0xe049
callq 0x7c20
jmp 0x7065
leaq -0x860(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xe57e(%rip), %rsi      # 0x155f8
leaq 0x712f(%rip), %rdx      # 0xe1b0
callq 0x7d40
jmp 0x7088
leaq -0x820(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xe47b(%rip), %rsi      # 0x15518
leaq 0x7113(%rip), %rdx      # 0xe1b7
callq 0x7b90
jmp 0x70ab
leaq -0x7e0(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xe358(%rip), %rsi      # 0x15418
leaq 0x6f7c(%rip), %rdx      # 0xe043
callq 0x7c20
jmp 0x70ce
leaq -0x7a0(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xe3d5(%rip), %rsi      # 0x154b8
leaq 0x6f61(%rip), %rdx      # 0xe04b
callq 0x7c20
jmp 0x70f1
leaq -0x760(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xe492(%rip), %rsi      # 0x15598
leaq 0x70af(%rip), %rdx      # 0xe1bc
callq 0x7b90
jmp 0x7114
leaq -0x720(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xe36f(%rip), %rsi      # 0x15498
leaq 0x6f19(%rip), %rdx      # 0xe049
callq 0x7c20
jmp 0x7137
leaq -0x6e0(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xe4ac(%rip), %rsi      # 0x155f8
leaq 0x705d(%rip), %rdx      # 0xe1b0
callq 0x7d40
jmp 0x715a
leaq -0x6a0(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xe3c9(%rip), %rsi      # 0x15538
leaq 0x704b(%rip), %rdx      # 0xe1c1
callq 0x7dd0
jmp 0x717d
leaq -0x660(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xe286(%rip), %rsi      # 0x15418
leaq 0x6eaa(%rip), %rdx      # 0xe043
callq 0x7c20
jmp 0x71a0
leaq -0x620(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xe303(%rip), %rsi      # 0x154b8
leaq 0x6e8f(%rip), %rdx      # 0xe04b
callq 0x7c20
jmp 0x71c3
leaq -0x5e0(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xe040(%rip), %rsi      # 0x15218
leaq 0x6fb8(%rip), %rdx      # 0xe197
callq 0x7cb0
jmp 0x71e6
leaq -0x5a0(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xe1bd(%rip), %rsi      # 0x153b8
leaq 0x6e39(%rip), %rdx      # 0xe03b
callq 0x7cb0
jmp 0x7209
leaq -0x560(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xdffa(%rip), %rsi      # 0x15218
leaq 0x6f72(%rip), %rdx      # 0xe197
callq 0x7cb0
jmp 0x722c
leaq -0x520(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xe1d7(%rip), %rsi      # 0x15418
leaq 0x6dfb(%rip), %rdx      # 0xe043
callq 0x7c20
jmp 0x724f
leaq -0x4e0(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xdfb4(%rip), %rsi      # 0x15218
leaq 0x6f2c(%rip), %rdx      # 0xe197
callq 0x7cb0
jmp 0x7272
leaq -0x4a0(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xe151(%rip), %rsi      # 0x153d8
leaq 0x6db0(%rip), %rdx      # 0xe03e
callq 0x7cb0
jmp 0x7295
leaq -0x460(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xdf6e(%rip), %rsi      # 0x15218
leaq 0x6f16(%rip), %rdx      # 0xe1c7
callq 0x7c20
jmp 0x72b8
leaq -0x420(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xe14b(%rip), %rsi      # 0x15418
leaq 0x6d6f(%rip), %rdx      # 0xe043
callq 0x7c20
jmp 0x72db
leaq -0x3e0(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xdf48(%rip), %rsi      # 0x15238
leaq 0x6ed2(%rip), %rdx      # 0xe1c9
callq 0x7d40
jmp 0x72fe
leaq -0x3a0(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xdf25(%rip), %rsi      # 0x15238
leaq 0x6eb6(%rip), %rdx      # 0xe1d0
callq 0x7e60
jmp 0x7321
leaq -0x360(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xe1a2(%rip), %rsi      # 0x154d8
leaq 0x6d10(%rip), %rdx      # 0xe04d
callq 0x7c20
jmp 0x7344
leaq -0x320(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xdebf(%rip), %rsi      # 0x15218
leaq 0x6e78(%rip), %rdx      # 0xe1d8
callq 0x7c20
jmp 0x7367
leaq -0x2e0(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xe07c(%rip), %rsi      # 0x153f8
leaq 0x6cbe(%rip), %rdx      # 0xe041
callq 0x7c20
jmp 0x738a
leaq -0x2a0(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xde79(%rip), %rsi      # 0x15218
leaq 0x6e34(%rip), %rdx      # 0xe1da
callq 0x7c20
jmp 0x73ad
leaq -0x260(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xe136(%rip), %rsi      # 0x154f8
leaq 0x6c86(%rip), %rdx      # 0xe04f
callq 0x7c20
jmp 0x73d0
leaq -0x220(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xe033(%rip), %rsi      # 0x15418
leaq 0x6c57(%rip), %rdx      # 0xe043
callq 0x7c20
jmp 0x73f3
leaq -0x1e0(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xe090(%rip), %rsi      # 0x15498
leaq 0x6c3a(%rip), %rdx      # 0xe049
callq 0x7c20
jmp 0x7416
leaq -0x1a0(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xde0d(%rip), %rsi      # 0x15238
leaq 0x6daa(%rip), %rdx      # 0xe1dc
callq 0x7b00
jmp 0x7439
leaq -0x160(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xdfea(%rip), %rsi      # 0x15438
leaq 0x6bf0(%rip), %rdx      # 0xe045
callq 0x7c20
jmp 0x745c
leaq -0x120(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xddc7(%rip), %rsi      # 0x15238
leaq 0x6d5c(%rip), %rdx      # 0xe1d4
callq 0x7b00
jmp 0x747f
leaq -0xe0(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xe024(%rip), %rsi      # 0x154b8
leaq 0x6bb0(%rip), %rdx      # 0xe04b
callq 0x7c20
jmp 0x74a2
leaq -0xa0(%rbp), %rdi
movq %rdi, -0x1628(%rbp)
leaq 0xdd21(%rip), %rsi      # 0x151d8
leaq 0x6d2b(%rip), %rdx      # 0xe1e9
callq 0x7ef0
jmp 0x74c5
leaq -0x1620(%rbp), %rax
movq %rax, -0x60(%rbp)
movq $0x57, -0x58(%rbp)
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rdx
leaq -0x50(%rbp), %rdi
callq 0x7fb0
jmp 0x74eb
leaq -0x1620(%rbp), %rax
movq %rax, -0x1700(%rbp)
addq $0x15c0, %rax           # imm = 0x15C0
movq %rax, -0x16f8(%rbp)
movq -0x16f8(%rbp), %rdi
addq $-0x40, %rdi
movq %rdi, -0x1708(%rbp)
callq 0x7f80
movq -0x1700(%rbp), %rcx
movq -0x1708(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x16f8(%rbp)
jne 0x7506
leaq -0x1658(%rbp), %rdi
movq %rdi, -0x1710(%rbp)
callq 0x8000
movq -0x1710(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0xbd60
jmp 0x755c
leaq -0x1698(%rbp), %rdi
callq 0x8020
jmp 0x756a
movl $0x0, -0x169c(%rbp)
movslq -0x169c(%rbp), %rax
movq %rax, -0x1718(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x8050
movq %rax, %rcx
movq -0x1718(%rbp), %rax
cmpq %rcx, %rax
jae 0x78d1
leaq -0x16e0(%rbp), %rdi
leaq -0x1658(%rbp), %rsi
callq 0xbe10
jmp 0x75b3
leaq -0x1698(%rbp), %rdi
leaq -0x16e0(%rbp), %rsi
callq 0x8070
leaq -0x16e0(%rbp), %rdi
callq 0x80b0
leaq -0x1698(%rbp), %rax
movq %rax, -0x1720(%rbp)
movslq -0x169c(%rbp), %rsi
leaq -0x50(%rbp), %rdi
callq 0x8110
movq -0x1720(%rbp), %rdi
movq %rax, %rsi
callq 0x80e0
testb $0x1, %al
jne 0x7608
jmp 0x77cb
movl -0x169c(%rbp), %esi
movq 0xd9c3(%rip), %rdi      # 0x14fd8
callq 0x22d0
movq %rax, -0x1728(%rbp)
jmp 0x7623
movq -0x1728(%rbp), %rdi
leaq 0x6baf(%rip), %rsi      # 0xe1e0
callq 0x2190
movq %rax, -0x1730(%rbp)
jmp 0x763f
movslq -0x169c(%rbp), %rsi
leaq -0x50(%rbp), %rdi
callq 0x8110
movq -0x1730(%rbp), %rdi
movq %rax, %rsi
callq 0x2170
movq %rax, -0x1738(%rbp)
jmp 0x7667
movq -0x1738(%rbp), %rdi
leaq 0x6b75(%rip), %rsi      # 0xe1ea
callq 0x2190
movq %rax, -0x1740(%rbp)
jmp 0x7683
movq -0x1740(%rbp), %rdi
leaq -0x1698(%rbp), %rsi
callq 0x2170
movq %rax, -0x1748(%rbp)
jmp 0x769f
movq -0x1748(%rbp), %rdi
movq 0xd913(%rip), %rsi      # 0x14fc0
callq 0x21d0
jmp 0x76b4
jmp 0x77cb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x21(%rbp), %rdi
callq 0x21f0
jmp 0x7922
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x7910
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
movq -0x1628(%rbp), %rax
leaq -0x1620(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x1750(%rbp)
je 0x773b
movq -0x1750(%rbp), %rdi
addq $-0x40, %rdi
movq %rdi, -0x1758(%rbp)
callq 0x7f80
movq -0x1758(%rbp), %rax
leaq -0x1620(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x1750(%rbp)
jne 0x770a
jmp 0x7910
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x1620(%rbp), %rax
movq %rax, -0x1768(%rbp)
addq $0x15c0, %rax           # imm = 0x15C0
movq %rax, -0x1760(%rbp)
movq -0x1760(%rbp), %rdi
addq $-0x40, %rdi
movq %rdi, -0x1770(%rbp)
callq 0x7f80
movq -0x1768(%rbp), %rcx
movq -0x1770(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x1760(%rbp)
jne 0x7767
jmp 0x7910
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x7904
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x1698(%rbp), %rdi
callq 0x80b0
jmp 0x7904
leaq -0x1698(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x1778(%rbp)
movslq -0x169c(%rbp), %rsi
leaq -0x50(%rbp), %rdi
callq 0x8110
movq -0x1778(%rbp), %rdi
movq %rax, %rsi
addq $0x20, %rsi
callq 0x80e0
testb $0x1, %al
jne 0x7809
jmp 0x78bb
movl -0x169c(%rbp), %esi
movq 0xd7c2(%rip), %rdi      # 0x14fd8
callq 0x22d0
movq %rax, -0x1780(%rbp)
jmp 0x7824
movq -0x1780(%rbp), %rdi
leaq 0x69ae(%rip), %rsi      # 0xe1e0
callq 0x2190
movq %rax, -0x1788(%rbp)
jmp 0x7840
movslq -0x169c(%rbp), %rsi
leaq -0x50(%rbp), %rdi
callq 0x8110
movq -0x1788(%rbp), %rdi
movq %rax, %rsi
addq $0x20, %rsi
callq 0x2170
movq %rax, -0x1790(%rbp)
jmp 0x786c
movq -0x1790(%rbp), %rdi
leaq 0x6970(%rip), %rsi      # 0xe1ea
callq 0x2190
movq %rax, -0x1798(%rbp)
jmp 0x7888
movq -0x1798(%rbp), %rdi
leaq -0x1678(%rbp), %rsi
callq 0x2170
movq %rax, -0x17a0(%rbp)
jmp 0x78a4
movq -0x17a0(%rbp), %rdi
movq 0xd70e(%rip), %rsi      # 0x14fc0
callq 0x21d0
jmp 0x78b9
jmp 0x78bb
jmp 0x78bd
movl -0x169c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x169c(%rbp)
jmp 0x7574
leaq -0x1698(%rbp), %rdi
callq 0x80b0
leaq -0x1658(%rbp), %rdi
callq 0x8130
leaq -0x50(%rbp), %rdi
callq 0x8150
leaq -0x20(%rbp), %rdi
callq 0x2338
addq $0x17a0, %rsp           # imm = 0x17A0
popq %rbp
retq
leaq -0x1658(%rbp), %rdi
callq 0x8130
leaq -0x50(%rbp), %rdi
callq 0x8150
leaq -0x20(%rbp), %rdi
callq 0x2338
movq -0x30(%rbp), %rdi
callq 0x22e0
nopl (%rax,%rax)