// File: /workspace/github_cpp_makefile_star2_O2/yanlinlin82[P]icpp/icpp.cpp
// Function: next()
void next()
{
	bool in_comment = false;
retry:
	if (!p || !*p) {
		if (line_no >= src.size()) { token = ""; type = unknown; goto end; } // end of source code
		p = src[line_no++].c_str(); while (*p == ' ' || *p == '\t') ++p;   // next line and skip leading spaces
		if (*p == '#') { while (*p) ++p; goto retry; }                     // skip '#'-leading line
		if (!*p) goto retry;
	}
	if (in_comment) { while (*p) { if (*p == '*' && *(p+1) == '/') { p += 2; in_comment = false; goto retry; }; ++p; }; goto retry; } // skip '/* ... */' comments
	if (*p == ' ' || *p == '\t') { ++p; while (*p && (*p == ' ' || *p == '\t')) ++p; goto retry; } // skip spaces
	if (*p == '/' && *(p+1) == '/') { p += 2; while (*p) ++p; goto retry; } // skip '// ...' comments
	if (*p == '/' && *(p+1) == '*') { p += 2; in_comment = true; goto retry; } // found '/* ... */' comments
	if (*p == '_' || (*p >= 'a' && *p <= 'z') || (*p >= 'a' && *p <= 'z')) { // symbol
		type = symbol; token = *p++; while (*p == '_' || (*p >= 'a' && *p <= 'z') || (*p >= 'a' && *p <= 'z')) token += *p++;
	} else if ((*p >= '0' && *p <= '9') || (*p == '.' && *(p+1) >= '0' && *(p+1) <= '9')) { // number
		type = number; token = *p++; while ((*p >= '0' && *p <= '9') || (*p == '.') || (*p >= 'A' && *p <= 'Z') || (*p >= 'a' && *p <= 'z')) token += *p++;
	} else if (*p == '\"' || *p == '\'') { // string
		type = text; char c = *p; token = *p++; while (*p && *p != c) { if (*p == '\\') { token += *p++; }; token += *p++; } token += *p++;
	} else { // operator
		static const char* ops[] = { "==", "=", "!=", "!", "++", "+=", "+", "--", "-=", "->*", "->", "-", "<=>", "<=", "<<=", "<<", "<", ">=", ">>=", ">>", ">",
			"||", "|=", "|", "&&", "&=", "&", "::", ":", "^", "*=", "*", "/=", "/", "%=", "%", "?", "~=", "~", ";", ".*", ".", "{", "}", "[", "]", "(", ")", ",", nullptr };
		for (const char** q = ops; *q; ++q) { size_t l = strlen(*q); if (memcmp(p, *q, l) == 0) { type = op; token = *q; p += l; goto end; } }
		type = unknown; token = *p++;
	}
end:
	if (verbose >= 3) {
		if (next_display_source_code < line_no) {
			log("[DEBUG] parsing source code (up to line %zd):\n" COLOR_GREEN, line_no);
			while (next_display_source_code < line_no) {
				print_source_code_line(next_display_source_code++);
			}
			log(COLOR_YELLOW);
			print_current(false);
			log(COLOR_NORMAL);
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0x1c287(%rip), %rbx     # 0x21278
movq 0x1c270(%rip), %rax     # 0x21268
movq 0x1c261(%rip), %rcx     # 0x21260
subq %rcx, %rax
sarq $0x5, %rax
movq 0x1c273(%rip), %rsi     # 0x21280
xorl %edx, %edx
movq %rbx, %rdi
movq %rsi, %r8
testq %rdi, %rdi
je 0x5022
movb (%rdi), %r9b
testb %r9b, %r9b
jne 0x5076
cmpq %rax, %r8
jae 0x51b3
leaq 0x1(%r8), %rsi
movq %rsi, 0x1c24a(%rip)     # 0x21280
shlq $0x5, %r8
movq (%rcx,%r8), %rbx
leaq 0x1(%rbx), %rdi
movq %rbx, 0x1c22f(%rip)     # 0x21278
movzbl (%rbx), %r9d
cmpl $0x9, %r9d
je 0x5059
cmpl $0x20, %r9d
jne 0x5061
incq %rbx
incq %rdi
jmp 0x5042
testl %r9d, %r9d
je 0x500f
cmpl $0x23, %r9d
je 0x5130
movq %rbx, %rdi
movq %rsi, %r8
testb $0x1, %dl
je 0x50b2
leaq 0x1(%rdi), %r10
cmpb $0x2a, %r9b
je 0x5093
movzbl %r9b, %r9d
testl %r9d, %r9d
jne 0x509d
jmp 0x5118
cmpb $0x2f, (%r10)
je 0x513a
incq %rdi
movq %r10, 0x1c1d1(%rip)     # 0x21278
movb (%r10), %r9b
incq %r10
movq %rdi, %rbx
jmp 0x507f
cmpb $0x9, %r9b
je 0x50f9
movzbl %r9b, %r10d
cmpl $0x20, %r10d
je 0x50f9
cmpl $0x2f, %r10d
jne 0x524a
movzbl 0x1(%rdi), %r9d
cmpl $0x2f, %r9d
jne 0x5156
addq $0x2, %rdi
movq %rdi, %rbx
movq %rbx, 0x1c193(%rip)     # 0x21278
cmpb $0x0, (%rbx)
leaq 0x1(%rbx), %rbx
jne 0x50de
decq %rbx
movq %rbx, %rdi
jmp 0x5015
incq %rdi
movq %rdi, %rbx
movq %rbx, 0x1c172(%rip)     # 0x21278
movzbl (%rbx), %edi
cmpl $0x20, %edi
je 0x5113
cmpl $0x9, %edi
jne 0x50f1
incq %rbx
jmp 0x50ff
decq %r10
movq %r10, %rdi
jmp 0x5015
movq %rdi, 0x1c14e(%rip)     # 0x21278
movb (%rdi), %r9b
incq %rdi
testb %r9b, %r9b
jne 0x5123
decq %rdi
jmp 0x514e
decq %r10
movq %r10, %rdi
xorb $0x1, %dl
addq $0x2, %rdi
movq %rdi, 0x1c12a(%rip)     # 0x21278
movq %rdi, %rbx
jmp 0x5012
cmpl $0x2a, %r9d
je 0x5140
leaq 0x1baad(%rip), %r12     # 0x20c10
movq (%r12), %r14
testq %r14, %r14
je 0x52bb
movq %r14, %rdi
callq 0x30f0
movq %rax, %r15
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x31f0
addq $0x8, %r12
testl %eax, %eax
jne 0x5163
movl $0x4, 0x1c0ed(%rip)     # 0x21288
leaq 0x1c0ee(%rip), %rdi     # 0x21290
movq %r14, %rsi
callq 0x3340
addq %r15, 0x1c0c7(%rip)     # 0x21278
jmp 0x51cd
leaq 0x1c0d6(%rip), %rdi     # 0x21290
leaq 0x122c3(%rip), %rsi     # 0x17484
callq 0x3340
andl $0x0, 0x1c0bb(%rip)     # 0x21288
cmpl $0x3, 0x1c3fc(%rip)     # 0x215d0
jl 0x5216
movq 0x1c0a3(%rip), %rsi     # 0x21280
cmpq %rsi, 0x1c36c(%rip)     # 0x21550
jae 0x5216
leaq 0x11287(%rip), %rdi     # 0x16474
xorl %eax, %eax
callq 0xf09e
movq 0x1c355(%rip), %rdi     # 0x21550
cmpq 0x1c07e(%rip), %rdi     # 0x21280
jae 0x521f
leaq 0x1(%rdi), %rax
movq %rax, 0x1c341(%rip)     # 0x21550
callq 0x40ad
jmp 0x51f4
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x11282(%rip), %rdi     # 0x164a8
xorl %eax, %eax
callq 0xf09e
xorl %edi, %edi
callq 0x412c
leaq 0x1228a(%rip), %rdi     # 0x174c5
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xf09e
cmpl $0x5f, %r10d
je 0x525c
leal -0x61(%r9), %eax
cmpb $0x19, %al
ja 0x52e1
movl $0x1, 0x1c022(%rip)     # 0x21288
leaq 0x1(%rdi), %rax
movq %rax, 0x1c007(%rip)     # 0x21278
movsbl (%rdi), %esi
leaq 0x1c015(%rip), %rbx     # 0x21290
movq %rbx, %rdi
callq 0x32f0
movq 0x1bfee(%rip), %rax     # 0x21278
movb (%rax), %cl
cmpb $0x5f, %cl
setne %dl
addb $-0x61, %cl
cmpb $0x1a, %cl
setae %cl
testb %cl, %dl
jne 0x51cd
leaq 0x1(%rax), %rcx
movq %rcx, 0x1bfca(%rip)     # 0x21278
movsbl (%rax), %esi
movq %rbx, %rdi
callq 0x31a0
jmp 0x5283
andl $0x0, 0x1bfc6(%rip)     # 0x21288
leaq 0x1(%rbx), %rax
movq %rax, 0x1bfab(%rip)     # 0x21278
movsbl (%rbx), %esi
leaq 0x1bfb9(%rip), %rdi     # 0x21290
callq 0x32f0
jmp 0x51cd
leal -0x30(%r9), %eax
cmpb $0xa, %al
jae 0x534f
movl $0x2, 0x1bf95(%rip)     # 0x21288
leaq 0x1(%rdi), %rax
movq %rax, 0x1bf7a(%rip)     # 0x21278
movsbl (%rdi), %esi
leaq 0x1bf88(%rip), %rbx     # 0x21290
movq %rbx, %rdi
callq 0x32f0
movq 0x1bf61(%rip), %rax     # 0x21278
movb (%rax), %cl
movl %ecx, %edx
andb $-0x21, %dl
addb $-0x41, %dl
cmpb $0x1a, %dl
jb 0x5337
cmpb $0x2e, %cl
je 0x5337
addb $-0x30, %cl
cmpb $0x9, %cl
ja 0x51cd
leaq 0x1(%rax), %rcx
movq %rcx, 0x1bf36(%rip)     # 0x21278
movsbl (%rax), %esi
movq %rbx, %rdi
callq 0x31a0
jmp 0x5310
cmpb $0x22, %r9b
je 0x5377
cmpl $0x27, %r10d
je 0x5377
cmpl $0x2e, %r10d
jne 0x515c
movb 0x1(%rdi), %al
addb $-0x30, %al
cmpb $0x9, %al
ja 0x515c
jmp 0x52e9
movl $0x3, 0x1bf07(%rip)     # 0x21288
movb (%rdi), %r14b
leaq 0x1(%rdi), %rax
movq %rax, 0x1bee9(%rip)     # 0x21278
movsbl (%rdi), %esi
leaq 0x1bef7(%rip), %rbx     # 0x21290
movq %rbx, %rdi
callq 0x32f0
movq 0x1bed0(%rip), %rax     # 0x21278
movb (%rax), %cl
testb %cl, %cl
je 0x53ed
cmpb %r14b, %cl
je 0x53ed
cmpb $0x5c, %cl
jne 0x53d5
leaq 0x1(%rax), %rcx
movq %rcx, 0x1beb5(%rip)     # 0x21278
movsbl (%rax), %esi
movq %rbx, %rdi
callq 0x31a0
movq 0x1bea3(%rip), %rax     # 0x21278
leaq 0x1(%rax), %rcx
movq %rcx, 0x1be98(%rip)     # 0x21278
movsbl (%rax), %esi
movq %rbx, %rdi
callq 0x31a0
jmp 0x53a1
leaq 0x1(%rax), %rcx
movq %rcx, 0x1be80(%rip)     # 0x21278
movsbl (%rax), %esi
leaq 0x1be8e(%rip), %rdi     # 0x21290
callq 0x31a0
jmp 0x51cd