// File: /workspace/github_cpp_makefile_star2_O1/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 0x1ead6(%rip), %rcx     # 0x24278
movq 0x1eac7(%rip), %rdx     # 0x24270
subq %rdx, %rcx
sarq $0x5, %rcx
movq 0x1ead1(%rip), %rax     # 0x24288
movq 0x1ead2(%rip), %rdi     # 0x24290
xorl %esi, %esi
movq %rdi, %r8
testq %rax, %rax
je 0x57d1
cmpb $0x0, (%rax)
jne 0x5852
cmpq %rcx, %r8
jae 0x5925
leaq 0x1(%r8), %rdi
movq %rdi, 0x1eaab(%rip)     # 0x24290
shlq $0x5, %r8
movq (%rdx,%r8), %rax
leaq 0x1(%rax), %r9
movq %rax, 0x1ea90(%rip)     # 0x24288
movzbl (%rax), %r10d
cmpl $0x1f, %r10d
jg 0x580a
cmpl $0x9, %r10d
je 0x5810
jmp 0x5818
cmpl $0x20, %r10d
jne 0x5822
incq %rax
incq %r9
jmp 0x57f1
movq %rdi, %r8
testl %r10d, %r10d
je 0x57c3
jmp 0x584f
cmpl $0x23, %r10d
jne 0x584f
cmpb $0x0, (%rax)
movq %rdi, %r8
je 0x57c3
movq %r9, 0x1ea51(%rip)      # 0x24288
cmpb $0x0, (%r9)
leaq 0x1(%r9), %r9
jne 0x5830
decq %r9
movq %rdi, %r8
movq %r9, %rax
jmp 0x57c3
movq %rdi, %r8
testb $0x1, %sil
je 0x587b
incq %rax
movzbl -0x1(%rax), %r9d
cmpl $0x2a, %r9d
je 0x586d
testl %r9d, %r9d
jne 0x5872
jmp 0x58d8
cmpb $0x2f, (%rax)
je 0x58e0
movq %rax, 0x1ea0f(%rip)     # 0x24288
jmp 0x5858
movzbl (%rax), %r9d
cmpl $0x2e, %r9d
jg 0x58b4
cmpl $0x9, %r9d
je 0x5895
cmpl $0x20, %r9d
jne 0x59d1
incq %rax
movq %rax, 0x1e9e9(%rip)     # 0x24288
movzbl (%rax), %r9d
cmpl $0x20, %r9d
je 0x5895
cmpl $0x9, %r9d
je 0x5895
jmp 0x57c3
cmpl $0x2f, %r9d
jne 0x59cb
cmpb $0x2f, 0x1(%rax)
jne 0x58f7
addq $0x2, %rax
movq %rax, 0x1e9b9(%rip)     # 0x24288
cmpb $0x0, (%rax)
leaq 0x1(%rax), %rax
jne 0x58c8
decq %rax
jmp 0x57c3
decq %rax
addq $0x2, %rax
movq %rax, 0x1e99a(%rip)     # 0x24288
xorb $0x1, %sil
jmp 0x57c0
cmpl $0x2f, %r9d
jne 0x59cb
cmpb $0x2a, 0x1(%rax)
je 0x58e3
cmpl $0x5f, %r9d
sete %cl
leal -0x61(%r9), %edx
cmpb $0x1a, %dl
setb %dl
orb %cl, %dl
jne 0x59de
jmp 0x5a6f
movq 0x1e97c(%rip), %rdx     # 0x242a8
leaq 0x1e96d(%rip), %rdi     # 0x242a0
leaq 0x17b47(%rip), %rcx     # 0x1d481
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x32a0
movl $0x0, 0x1e94a(%rip)     # 0x24298
cmpl $0x3, 0x1ec8b(%rip)     # 0x245e0
jl 0x5997
movq 0x1e932(%rip), %rsi     # 0x24290
cmpq %rsi, 0x1ebfb(%rip)     # 0x24560
jae 0x5997
leaq 0x16b03(%rip), %rdi     # 0x1c471
xorl %eax, %eax
callq 0x15504
movq 0x1ebe4(%rip), %rdi     # 0x24560
cmpq 0x1e90d(%rip), %rdi     # 0x24290
jae 0x59a0
leaq 0x1(%rdi), %rax
movq %rax, 0x1ebd0(%rip)     # 0x24560
callq 0x40eb
jmp 0x5975
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x16afe(%rip), %rdi     # 0x1c4a5
xorl %eax, %eax
callq 0x15504
xorl %edi, %edi
callq 0x416a
leaq 0x17b06(%rip), %rdi     # 0x1d4c2
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x15504
cmpl $0x5f, %r9d
je 0x59de
leal -0x61(%r9), %ecx
cmpb $0x19, %cl
ja 0x5a6f
movl $0x1, 0x1e8b0(%rip)     # 0x24298
leaq 0x1(%rax), %rcx
movq %rcx, 0x1e895(%rip)     # 0x24288
movsbl (%rax), %r8d
movq 0x1e8aa(%rip), %rdx     # 0x242a8
leaq 0x1e89b(%rip), %rdi     # 0x242a0
movl $0x1, %ecx
xorl %esi, %esi
callq 0x3350
movq 0x1e870(%rip), %rax     # 0x24288
movb (%rax), %cl
cmpb $0x5f, %cl
setne %dl
addb $-0x61, %cl
cmpb $0x1a, %cl
setae %cl
testb %cl, %dl
jne 0x594e
leaq 0x1e868(%rip), %rbx     # 0x242a0
leaq 0x1(%rax), %rcx
movq %rcx, 0x1e845(%rip)     # 0x24288
movsbl (%rax), %esi
movq %rbx, %rdi
callq 0x3190
movq 0x1e833(%rip), %rax     # 0x24288
movb (%rax), %cl
cmpb $0x5f, %cl
sete %dl
addb $-0x61, %cl
cmpb $0x1a, %cl
setb %cl
orb %dl, %cl
jne 0x5a38
jmp 0x594e
leal -0x30(%r9), %ecx
cmpb $0xa, %cl
jae 0x5b1b
movl $0x2, 0x1e812(%rip)     # 0x24298
leaq 0x1(%rax), %rcx
movq %rcx, 0x1e7f7(%rip)     # 0x24288
movsbl (%rax), %r8d
movq 0x1e80c(%rip), %rdx     # 0x242a8
leaq 0x1e7fd(%rip), %rdi     # 0x242a0
movl $0x1, %ecx
xorl %esi, %esi
callq 0x3350
movq 0x1e7d2(%rip), %rax     # 0x24288
movb (%rax), %cl
movl %ecx, %edx
andb $-0x21, %dl
addb $-0x41, %dl
cmpb $0x1a, %dl
jb 0x5ad6
cmpb $0x2e, %cl
je 0x5ad6
addb $-0x30, %cl
cmpb $0x9, %cl
ja 0x594e
leaq 0x1e7c3(%rip), %rbx     # 0x242a0
leaq 0x1(%rax), %rcx
movq %rcx, 0x1e7a0(%rip)     # 0x24288
movsbl (%rax), %esi
movq %rbx, %rdi
callq 0x3190
movq 0x1e78e(%rip), %rax     # 0x24288
movb (%rax), %cl
movl %ecx, %edx
andb $-0x21, %dl
addb $-0x41, %dl
cmpb $0x1a, %dl
jb 0x5add
cmpb $0x2e, %cl
je 0x5add
addb $-0x30, %cl
cmpb $0xa, %cl
jb 0x5add
jmp 0x594e
cmpl $0x22, %r9d
je 0x5b50
cmpl $0x27, %r9d
je 0x5b50
cmpl $0x2e, %r9d
jne 0x5c08
movb 0x1(%rax), %cl
addb $-0x30, %cl
cmpb $0x9, %cl
jbe 0x5a7c
cmpl $0x27, %r9d
je 0x5b50
cmpl $0x22, %r9d
jne 0x5c08
movl $0x3, 0x1e73e(%rip)     # 0x24298
movb (%rax), %r14b
leaq 0x1(%rax), %rcx
movq %rcx, 0x1e720(%rip)     # 0x24288
movsbl (%rax), %r8d
movq 0x1e735(%rip), %rdx     # 0x242a8
leaq 0x1e726(%rip), %rdi     # 0x242a0
movl $0x1, %ecx
xorl %esi, %esi
callq 0x3350
movq 0x1e6fb(%rip), %rax     # 0x24288
movb (%rax), %cl
testb %cl, %cl
je 0x5be9
cmpb %r14b, %cl
je 0x5be9
leaq 0x1e701(%rip), %rbx     # 0x242a0
cmpb $0x5c, %cl
jne 0x5bba
leaq 0x1(%rax), %rcx
movq %rcx, 0x1e6d9(%rip)     # 0x24288
movsbl (%rax), %esi
movq %rbx, %rdi
callq 0x3190
movq 0x1e6c7(%rip), %rax     # 0x24288
leaq 0x1(%rax), %rcx
movq %rcx, 0x1e6bc(%rip)     # 0x24288
movsbl (%rax), %esi
movq %rbx, %rdi
callq 0x3190
movq 0x1e6aa(%rip), %rax     # 0x24288
movb (%rax), %cl
testb %cl, %cl
je 0x5be9
cmpb %r14b, %cl
jne 0x5b9f
leaq 0x1(%rax), %rcx
movq %rcx, 0x1e694(%rip)     # 0x24288
movsbl (%rax), %esi
leaq 0x1e6a2(%rip), %rdi     # 0x242a0
callq 0x3190
jmp 0x594e
movq 0x1e679(%rip), %r15     # 0x24288
cmpw $0x3d3d, (%r15)         # imm = 0x3D3D
je 0x5cce
leaq 0x1dff6(%rip), %r12     # 0x23c18
movq (%r12), %rbx
testq %rbx, %rbx
je 0x5c8f
movq %rbx, %rdi
callq 0x30f0
movq %rax, %r14
movq %r15, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x31e0
addq $0x8, %r12
testl %eax, %eax
jne 0x5c22
movl $0x4, 0x1e642(%rip)     # 0x24298
movq 0x1e64b(%rip), %r15     # 0x242a8
leaq 0x1e63c(%rip), %r12     # 0x242a0
movq %rbx, %rdi
callq 0x30f0
movq %r12, %rdi
xorl %esi, %esi
movq %r15, %rdx
movq %rbx, %rcx
movq %rax, %r8
callq 0x32a0
addq %r14, 0x1e602(%rip)     # 0x24288
testq %rbx, %rbx
jne 0x594e
movl $0x0, 0x1e5ff(%rip)     # 0x24298
movq 0x1e5e8(%rip), %rax     # 0x24288
leaq 0x1(%rax), %rcx
movq %rcx, 0x1e5dd(%rip)     # 0x24288
movsbl (%rax), %r8d
movq 0x1e5f2(%rip), %rdx     # 0x242a8
leaq 0x1e5e3(%rip), %rdi     # 0x242a0
movl $0x1, %ecx
xorl %esi, %esi
callq 0x3350
jmp 0x594e
movl $0x4, 0x1e5c0(%rip)     # 0x24298
movq 0x1e5c9(%rip), %rdx     # 0x242a8
leaq 0x1e5ba(%rip), %rdi     # 0x242a0
leaq 0x164f5(%rip), %rcx     # 0x1c1e2
movl $0x2, %r8d
xorl %esi, %esi
callq 0x32a0
addq $0x2, 0x1e586(%rip)     # 0x24288
jmp 0x594e