// File: /workspace/github_cpp_makefile_star2_O3/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 0x1db49(%rip), %rbx     # 0x23288
movq 0x1db32(%rip), %rax     # 0x23278
movq 0x1db23(%rip), %rcx     # 0x23270
subq %rcx, %rax
sarq $0x5, %rax
movq 0x1db35(%rip), %rsi     # 0x23290
xorl %edx, %edx
movq %rbx, %rdi
movq %rsi, %r8
testq %rdi, %rdi
je 0x5770
movb (%rdi), %r9b
testb %r9b, %r9b
jne 0x57d1
cmpq %rax, %r8
jae 0x592d
leaq 0x1(%r8), %rsi
movq %rsi, 0x1db0c(%rip)     # 0x23290
shlq $0x5, %r8
movq (%rcx,%r8), %rbx
leaq 0x1(%rbx), %rdi
movq %rbx, 0x1daf1(%rip)     # 0x23288
movb (%rbx), %r9b
movzbl %r9b, %r8d
cmpl $0x1f, %r8d
jg 0x57ac
cmpl $0x9, %r8d
je 0x57b2
jmp 0x57ba
cmpl $0x20, %r8d
jne 0x57c1
incq %rbx
incq %rdi
jmp 0x5790
testl %r8d, %r8d
je 0x575d
jmp 0x57cb
cmpl $0x23, %r8d
je 0x5885
movq %rbx, %rdi
movq %rsi, %r8
testb $0x1, %dl
je 0x580a
leaq 0x1(%rdi), %r10
cmpb $0x2a, %r9b
je 0x57eb
movzbl %r9b, %r9d
testl %r9d, %r9d
jne 0x57f5
jmp 0x5843
cmpb $0x2f, (%r10)
je 0x589a
incq %rdi
movq %r10, 0x1da89(%rip)     # 0x23288
movb (%r10), %r9b
incq %r10
movq %rdi, %rbx
jmp 0x57da
movzbl %r9b, %r10d
cmpl $0x2e, %r10d
jg 0x584e
cmpl $0x9, %r10d
je 0x5824
cmpl $0x20, %r10d
jne 0x59d9
incq %rdi
movq %rdi, %rbx
movq %rbx, 0x1da57(%rip)     # 0x23288
movzbl (%rbx), %edi
cmpl $0x20, %edi
je 0x583e
cmpl $0x9, %edi
jne 0x587d
incq %rbx
jmp 0x582a
decq %r10
movq %r10, %rdi
jmp 0x5763
cmpl $0x2f, %r10d
jne 0x59d3
movzbl 0x1(%rdi), %r9d
cmpl $0x2f, %r9d
jne 0x58b6
addq $0x2, %rdi
movq %rdi, %rbx
movq %rbx, 0x1da17(%rip)     # 0x23288
cmpb $0x0, (%rbx)
leaq 0x1(%rbx), %rbx
jne 0x586a
decq %rbx
movq %rbx, %rdi
jmp 0x5763
movq %rdi, 0x1d9fc(%rip)     # 0x23288
cmpb $0x0, (%rdi)
leaq 0x1(%rdi), %rdi
jne 0x5885
decq %rdi
jmp 0x58ae
decq %r10
movq %r10, %rdi
xorb $0x1, %dl
addq $0x2, %rdi
movq %rdi, 0x1d9da(%rip)     # 0x23288
movq %rdi, %rbx
jmp 0x5760
cmpl $0x2a, %r9d
je 0x58a0
leaq 0x1591f(%rip), %r14     # 0x1b1e2
leaq 0x1d34e(%rip), %r12     # 0x22c18
movq %r14, %rdi
callq 0x30f0
movq %rax, %r15
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x31e0
testl %eax, %eax
je 0x5a76
movq (%r12), %r14
addq $0x8, %r12
testq %r14, %r14
jne 0x58ca
movl $0x0, 0x1d996(%rip)     # 0x23298
leaq 0x1(%rbx), %rax
movq %rax, 0x1d97b(%rip)     # 0x23288
movsbl (%rbx), %r8d
movq 0x1d990(%rip), %rdx     # 0x232a8
leaq 0x1d981(%rip), %rdi     # 0x232a0
movl $0x1, %ecx
xorl %esi, %esi
callq 0x3350
jmp 0x5956
movq 0x1d974(%rip), %rdx     # 0x232a8
leaq 0x1d965(%rip), %rdi     # 0x232a0
leaq 0x16b3f(%rip), %rcx     # 0x1c481
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x32a0
movl $0x0, 0x1d942(%rip)     # 0x23298
cmpl $0x3, 0x1dc83(%rip)     # 0x235e0
jl 0x599f
movq 0x1d92a(%rip), %rsi     # 0x23290
cmpq %rsi, 0x1dbf3(%rip)     # 0x23560
jae 0x599f
leaq 0x15afb(%rip), %rdi     # 0x1b471
xorl %eax, %eax
callq 0x15114
movq 0x1dbdc(%rip), %rdi     # 0x23560
cmpq 0x1d905(%rip), %rdi     # 0x23290
jae 0x59a8
leaq 0x1(%rdi), %rax
movq %rax, 0x1dbc8(%rip)     # 0x23560
callq 0x40eb
jmp 0x597d
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x15af6(%rip), %rdi     # 0x1b4a5
xorl %eax, %eax
callq 0x15114
xorl %edi, %edi
callq 0x416a
leaq 0x16afe(%rip), %rdi     # 0x1c4c2
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x15114
cmpl $0x5f, %r10d
je 0x59e5
leal -0x61(%r9), %eax
cmpb $0x19, %al
ja 0x5ab5
movl $0x1, 0x1d8a9(%rip)     # 0x23298
leaq 0x1(%rdi), %rax
movq %rax, 0x1d88e(%rip)     # 0x23288
movsbl (%rdi), %r8d
movq 0x1d8a3(%rip), %rdx     # 0x232a8
leaq 0x1d894(%rip), %rdi     # 0x232a0
movl $0x1, %ecx
xorl %esi, %esi
callq 0x3350
movq 0x1d869(%rip), %rax     # 0x23288
movb (%rax), %cl
cmpb $0x5f, %cl
setne %dl
addb $-0x61, %cl
cmpb $0x1a, %cl
setae %cl
testb %cl, %dl
jne 0x5956
leaq 0x1d861(%rip), %rbx     # 0x232a0
leaq 0x1(%rax), %rcx
movq %rcx, 0x1d83e(%rip)     # 0x23288
movsbl (%rax), %esi
movq %rbx, %rdi
callq 0x3190
movq 0x1d82c(%rip), %rax     # 0x23288
movb (%rax), %cl
cmpb $0x5f, %cl
sete %dl
addb $-0x61, %cl
cmpb $0x1a, %cl
setb %cl
orb %dl, %cl
jne 0x5a3f
jmp 0x5956
movl $0x4, 0x1d818(%rip)     # 0x23298
movq 0x1d821(%rip), %rbx     # 0x232a8
leaq 0x1d812(%rip), %r12     # 0x232a0
movq %r14, %rdi
callq 0x30f0
movq %r12, %rdi
xorl %esi, %esi
movq %rbx, %rdx
movq %r14, %rcx
movq %rax, %r8
callq 0x32a0
addq %r15, 0x1d7d8(%rip)     # 0x23288
jmp 0x5956
leal -0x30(%r9), %eax
cmpb $0xa, %al
jae 0x5b60
movl $0x2, 0x1d7cd(%rip)     # 0x23298
leaq 0x1(%rdi), %rax
movq %rax, 0x1d7b2(%rip)     # 0x23288
movsbl (%rdi), %r8d
movq 0x1d7c7(%rip), %rdx     # 0x232a8
leaq 0x1d7b8(%rip), %rdi     # 0x232a0
movl $0x1, %ecx
xorl %esi, %esi
callq 0x3350
movq 0x1d78d(%rip), %rax     # 0x23288
movb (%rax), %cl
movl %ecx, %edx
andb $-0x21, %dl
addb $-0x41, %dl
cmpb $0x1a, %dl
jb 0x5b1b
cmpb $0x2e, %cl
je 0x5b1b
addb $-0x30, %cl
cmpb $0x9, %cl
ja 0x5956
leaq 0x1d77e(%rip), %rbx     # 0x232a0
leaq 0x1(%rax), %rcx
movq %rcx, 0x1d75b(%rip)     # 0x23288
movsbl (%rax), %esi
movq %rbx, %rdi
callq 0x3190
movq 0x1d749(%rip), %rax     # 0x23288
movb (%rax), %cl
movl %ecx, %edx
andb $-0x21, %dl
addb $-0x41, %dl
cmpb $0x1a, %dl
jb 0x5b22
cmpb $0x2e, %cl
je 0x5b22
addb $-0x30, %cl
cmpb $0xa, %cl
jb 0x5b22
jmp 0x5956
cmpb $0x22, %r9b
je 0x5b88
cmpl $0x27, %r10d
je 0x5b88
cmpl $0x2e, %r10d
jne 0x58bc
movb 0x1(%rdi), %al
addb $-0x30, %al
cmpb $0x9, %al
ja 0x58bc
jmp 0x5ac1
movl $0x3, 0x1d706(%rip)     # 0x23298
movb (%rdi), %r14b
leaq 0x1(%rdi), %rax
movq %rax, 0x1d6e8(%rip)     # 0x23288
movsbl (%rdi), %r8d
movq 0x1d6fd(%rip), %rdx     # 0x232a8
leaq 0x1d6ee(%rip), %rdi     # 0x232a0
movl $0x1, %ecx
xorl %esi, %esi
callq 0x3350
movq 0x1d6c3(%rip), %rax     # 0x23288
movb (%rax), %cl
testb %cl, %cl
je 0x5c21
cmpb %r14b, %cl
je 0x5c21
leaq 0x1d6c9(%rip), %rbx     # 0x232a0
cmpb $0x5c, %cl
jne 0x5bf9
leaq 0x1(%rax), %rcx
movq %rcx, 0x1d6a1(%rip)     # 0x23288
movsbl (%rax), %esi
movq %rbx, %rdi
callq 0x3190
movq 0x1d68f(%rip), %rax     # 0x23288
leaq 0x1(%rax), %rcx
movq %rcx, 0x1d684(%rip)     # 0x23288
movsbl (%rax), %esi
movq %rbx, %rdi
callq 0x3190
movq 0x1d672(%rip), %rax     # 0x23288
movb (%rax), %cl
testb %cl, %cl
je 0x5c21
cmpb %r14b, %cl
jne 0x5bd7
leaq 0x1(%rax), %rcx
movq %rcx, 0x1d65c(%rip)     # 0x23288
movsbl (%rax), %esi
leaq 0x1d66a(%rip), %rdi     # 0x232a0
callq 0x3190
jmp 0x5956