// File: /workspace/github_cpp_makefile_star2_O3/yanlinlin82[P]icpp/icpp.cpp
// Function: parse()
void parse()
{
	init_symbol();

	for (next(); !token.empty();) {
		if (token == "using") {
			next(); while (!token.empty() && token != ";") next();
			if (token.empty()) { err("missing ';' for 'using'!\n"); }
			log<3>("[DEBUG] => 'using' statement skipped\n");
			next();
		} else if (token == "typedef") {
			skip_until(";", token);
			log<3>("[DEBUG] => 'typedef' statement skipped\n");
			next();
		} else if (token == "enum") {
			parse_enum();
		} else if (token == "union" || token == "struct" || token == "class" || token == "namespace") {
			string keyword = token;
			next();
			string name = token;
			next();
			expect_token("{", keyword + " " + name);
			scopes.push_back(make_pair(keyword, name));
			log<3>("[DEBUG] => (%s %s) start\n", keyword.c_str(), name.c_str());
			next();
		} else if (token == "template") {
			skip_until(";", token);
			log<3>("[DEBUG] => 'template' statement skipped\n");
			next();
		} else if (token == ";") {
			log<3>("[DEBUG] => ';' - end of statement\n");
			next();
		} else if (token == "}") {
			string scope_type;
			string scope_name;
			if (!scopes.empty()) {
				scope_type = scopes.back().first;
				scope_name = scopes.back().second;
				scopes.pop_back();
			}
			log<3>("[DEBUG] => '}' - end of block (%s,%s)\n", scope_type.c_str(), scope_name.c_str());
			if (scope_type == "function") {
				if (returned_functions.find(scope_name) == returned_functions.end()) {
					add_assembly_code(LEAVE);
					add_assembly_code(RET, get<3>(current_function));
				}
				current_function = make_tuple("", "", "", 0);
				stack_frame_table.pop_back();
			}
			next();
		} else {
			parse_statements();
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x188, %rsp            # imm = 0x188
callq 0x12507
callq 0x572d
cmpq $0x0, 0x101fe(%rip)     # 0x232a8
je 0x137c3
leaq 0x101e9(%rip), %rbx     # 0x232a0
leaq 0x8151(%rip), %r13      # 0x1b20f
leaq -0x188(%rbp), %r14
movq %rbx, %rdi
leaq 0x8edb(%rip), %rsi      # 0x1bfaa
callq 0x30b0
testl %eax, %eax
je 0x131b3
movq %rbx, %rdi
leaq 0x8c2e(%rip), %rsi      # 0x1bd14
callq 0x30b0
testl %eax, %eax
je 0x131f5
movq %rbx, %rdi
leaq 0x8f1b(%rip), %rsi      # 0x1c018
callq 0x30b0
testl %eax, %eax
je 0x133a5
movq %rbx, %rdi
leaq 0x8f09(%rip), %rsi      # 0x1c01d
callq 0x30b0
testl %eax, %eax
je 0x132b8
movq %rbx, %rdi
leaq 0x8ef8(%rip), %rsi      # 0x1c023
callq 0x30b0
testl %eax, %eax
je 0x132b8
movq %rbx, %rdi
leaq 0x8ee8(%rip), %rsi      # 0x1c02a
callq 0x30b0
testl %eax, %eax
je 0x132b8
movq %rbx, %rdi
leaq 0x8ed7(%rip), %rsi      # 0x1c030
callq 0x30b0
testl %eax, %eax
je 0x132b8
movq %rbx, %rdi
leaq 0x8ee4(%rip), %rsi      # 0x1c054
callq 0x30b0
testl %eax, %eax
je 0x134fb
movq %rbx, %rdi
movq %r13, %rsi
callq 0x30b0
testl %eax, %eax
je 0x135ab
movq %rbx, %rdi
leaq 0x8073(%rip), %rsi      # 0x1b20d
callq 0x30b0
testl %eax, %eax
je 0x135b7
xorl %edi, %edi
callq 0xff3a
jmp 0x132a5
callq 0x572d
cmpq $0x0, 0x100e8(%rip)     # 0x232a8
je 0x131db
movq %rbx, %rdi
movq %r13, %rsi
callq 0x30b0
testl %eax, %eax
jne 0x131b3
cmpq $0x0, 0x100cf(%rip)     # 0x232a8
jne 0x131e9
leaq 0x8dce(%rip), %rdi      # 0x1bfb0
xorl %eax, %eax
callq 0x1546f
leaq 0x8dda(%rip), %rdi      # 0x1bfca
jmp 0x13299
leaq -0x198(%rbp), %rax
movq %rax, -0x1a8(%rbp)
leaq -0x1a8(%rbp), %r15
movq %r15, %rdi
movq %r13, %rsi
leaq 0x7ff9(%rip), %rdx      # 0x1b210
callq 0x169e0
leaq -0x178(%rbp), %rax
movq %rax, -0x188(%rbp)
movq 0x1006f(%rip), %rsi     # 0x232a0
movq 0x10070(%rip), %rdx     # 0x232a8
addq %rsi, %rdx
movq %r14, %rdi
callq 0x16942
movq %r15, %rdi
movq %r14, %rsi
callq 0x5cae
movq -0x188(%rbp), %rdi
leaq -0x178(%rbp), %rax
cmpq %rax, %rdi
je 0x13270
movq -0x178(%rbp), %rsi
incq %rsi
callq 0x31d0
movq -0x1a8(%rbp), %rdi
leaq -0x198(%rbp), %rax
cmpq %rax, %rdi
je 0x13292
movq -0x198(%rbp), %rsi
incq %rsi
callq 0x31d0
leaq 0x8d57(%rip), %rdi      # 0x1bff0
xorl %eax, %eax
callq 0x151ad
callq 0x572d
cmpq $0x0, 0xfffb(%rip)      # 0x232a8
jne 0x130c5
jmp 0x137c3
leaq -0x38(%rbp), %rax
movq %rax, -0x48(%rbp)
movq 0xffd9(%rip), %rsi      # 0x232a0
movq 0xffda(%rip), %rdx      # 0x232a8
addq %rsi, %rdx
leaq -0x48(%rbp), %rdi
callq 0x16942
callq 0x572d
leaq -0x58(%rbp), %rax
movq %rax, -0x68(%rbp)
movq 0xffb2(%rip), %rsi      # 0x232a0
movq 0xffb3(%rip), %rdx      # 0x232a8
addq %rsi, %rdx
leaq -0x68(%rbp), %rdi
callq 0x16942
callq 0x572d
leaq -0xd8(%rbp), %rax
movq %rax, -0xe8(%rbp)
leaq -0xe8(%rbp), %rdi
leaq 0x814d(%rip), %rsi      # 0x1b46f
leaq 0x8147(%rip), %rdx      # 0x1b470
callq 0x169e0
leaq -0x98(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
addq %rsi, %rdx
leaq -0xa8(%rbp), %r15
movq %r15, %rdi
callq 0x16942
movq %r15, %rdi
leaq 0x7f1d(%rip), %rsi      # 0x1b27d
callq 0x3360
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
movq %r15, %rdi
callq 0x30c0
leaq -0xb8(%rbp), %rsi
movq %rsi, -0xc8(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x133af
movq %rdx, -0xc8(%rbp)
movq (%rcx), %rdx
movq %rdx, -0xb8(%rbp)
jmp 0x133b5
callq 0x11a33
jmp 0x132a5
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, -0xc0(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq -0xe8(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
callq 0x5c40
movq -0xc8(%rbp), %rdi
leaq -0xb8(%rbp), %rax
cmpq %rax, %rdi
je 0x13404
movq -0xb8(%rbp), %rsi
incq %rsi
callq 0x31d0
movq -0xa8(%rbp), %rdi
leaq -0x98(%rbp), %rax
cmpq %rax, %rdi
je 0x13426
movq -0x98(%rbp), %rsi
incq %rsi
callq 0x31d0
movq -0xe8(%rbp), %rdi
leaq -0xd8(%rbp), %rax
cmpq %rax, %rdi
je 0x13448
movq -0xd8(%rbp), %rsi
incq %rsi
callq 0x31d0
movq %r15, %rdi
leaq -0x48(%rbp), %rsi
leaq -0x68(%rbp), %rdx
callq 0x1651e
leaq 0xfe61(%rip), %rdi      # 0x232c0
movq %r15, %rsi
callq 0x19880
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x13483
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x31d0
movq -0xa8(%rbp), %rdi
leaq -0x98(%rbp), %rax
cmpq %rax, %rdi
je 0x134a5
movq -0x98(%rbp), %rsi
incq %rsi
callq 0x31d0
movq -0x48(%rbp), %rsi
movq -0x68(%rbp), %rdx
leaq 0x8b86(%rip), %rdi      # 0x1c03a
xorl %eax, %eax
callq 0x151ad
callq 0x572d
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x134d9
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x31d0
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x132a5
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x31d0
jmp 0x132a5
leaq -0x158(%rbp), %rax
movq %rax, -0x168(%rbp)
leaq -0x168(%rbp), %r15
movq %r15, %rdi
movq %r13, %rsi
leaq 0x7cf3(%rip), %rdx      # 0x1b210
callq 0x169e0
leaq -0x138(%rbp), %rax
movq %rax, -0x148(%rbp)
movq 0xfd69(%rip), %rsi      # 0x232a0
movq 0xfd6a(%rip), %rdx      # 0x232a8
addq %rsi, %rdx
leaq -0x148(%rbp), %r12
movq %r12, %rdi
callq 0x16942
movq %r15, %rdi
movq %r12, %rsi
callq 0x5cae
movq -0x148(%rbp), %rdi
leaq -0x138(%rbp), %rax
cmpq %rax, %rdi
je 0x1357d
movq -0x138(%rbp), %rsi
incq %rsi
callq 0x31d0
movq -0x168(%rbp), %rdi
leaq -0x158(%rbp), %rax
cmpq %rax, %rdi
je 0x1359f
movq -0x158(%rbp), %rsi
incq %rsi
callq 0x31d0
leaq 0x8ab7(%rip), %rdi      # 0x1c05d
jmp 0x13299
leaq 0x8ad4(%rip), %rdi      # 0x1c086
jmp 0x13299
leaq -0x98(%rbp), %rsi
movq %rsi, -0xa8(%rbp)
xorl %eax, %eax
movq %rax, -0xa0(%rbp)
movb %al, -0x98(%rbp)
leaq -0x38(%rbp), %rdx
movq %rdx, -0x48(%rbp)
movq %rax, -0x40(%rbp)
movb %al, -0x38(%rbp)
movq 0xfcde(%rip), %rax      # 0x232c8
cmpq %rax, 0xfccf(%rip)      # 0x232c0
je 0x13643
addq $-0x40, %rax
leaq -0xa8(%rbp), %rdi
movq %rax, %rsi
callq 0x3110
movq 0xfcbb(%rip), %rsi      # 0x232c8
addq $-0x20, %rsi
leaq -0x48(%rbp), %rdi
callq 0x3110
movq 0xfca7(%rip), %rsi      # 0x232c8
addq $-0x40, %rsi
movq %rsi, 0xfc9c(%rip)      # 0x232c8
leaq 0xfc8d(%rip), %rdi      # 0x232c0
callq 0x19aca
movq -0xa8(%rbp), %rsi
movq -0x48(%rbp), %rdx
leaq 0x8a5f(%rip), %rdi      # 0x1c0a9
xorl %eax, %eax
callq 0x151ad
leaq -0xa8(%rbp), %rdi
leaq 0x80ca(%rip), %rsi      # 0x1b729
callq 0x30b0
testl %eax, %eax
jne 0x13782
leaq 0xfc65(%rip), %rdi      # 0x232d8
leaq -0x48(%rbp), %rsi
callq 0x1acb6
testq %rax, %rax
jne 0x1373d
leaq -0x118(%rbp), %rax
movq %rax, -0x128(%rbp)
leaq -0x128(%rbp), %r15
movq %r15, %rdi
leaq 0x8ddd(%rip), %rdx      # 0x1c481
movq %rdx, %rsi
callq 0x169e0
movl $0x24, %edi
xorl %esi, %esi
movq %r15, %rdx
callq 0x4d40
movq -0x128(%rbp), %rdi
leaq -0x118(%rbp), %rax
cmpq %rax, %rdi
je 0x136dd
movq -0x118(%rbp), %rsi
incq %rsi
callq 0x31d0
movl 0xfe0c(%rip), %r12d     # 0x234f0
leaq -0xf8(%rbp), %rax
movq %rax, -0x108(%rbp)
leaq -0x108(%rbp), %r15
movq %r15, %rdi
leaq 0x8d7e(%rip), %rdx      # 0x1c481
movq %rdx, %rsi
callq 0x169e0
movl $0x26, %edi
movl %r12d, %esi
movq %r15, %rdx
callq 0x4d40
movq -0x108(%rbp), %rdi
leaq -0xf8(%rbp), %rax
cmpq %rax, %rdi
je 0x1373d
movq -0xf8(%rbp), %rsi
incq %rsi
callq 0x31d0
movl $0x0, -0x68(%rbp)
leaq 0x8d36(%rip), %rax      # 0x1c481
movq %rax, -0x60(%rbp)
movq %rax, -0x58(%rbp)
movq %rax, -0x50(%rbp)
leaq 0xfd92(%rip), %rdi      # 0x234f0
leaq -0x68(%rbp), %rsi
callq 0x1acfa
movq 0xfbea(%rip), %rdi      # 0x23358
leaq -0x40(%rdi), %rax
movq %rax, 0xfbdf(%rip)      # 0x23358
addq $-0x38, %rdi
callq 0x16714
callq 0x572d
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x137a0
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x31d0
movq -0xa8(%rbp), %rdi
leaq -0x98(%rbp), %rax
cmpq %rax, %rdi
je 0x132a5
movq -0x98(%rbp), %rsi
jmp 0x134ee
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x108(%rbp), %rdi
leaq -0xf8(%rbp), %rax
cmpq %rax, %rdi
je 0x13877
movq -0xf8(%rbp), %rsi
jmp 0x13817
jmp 0x13874
movq %rax, %rbx
movq -0x128(%rbp), %rdi
leaq -0x118(%rbp), %rax
cmpq %rax, %rdi
je 0x13877
movq -0x118(%rbp), %rsi
incq %rsi
callq 0x31d0
jmp 0x13877
jmp 0x13874
jmp 0x13874
jmp 0x13874
movq %rax, %rbx
movq -0x148(%rbp), %rdi
leaq -0x138(%rbp), %rax
cmpq %rax, %rdi
je 0x13851
movq -0x138(%rbp), %rsi
incq %rsi
callq 0x31d0
jmp 0x13851
movq %rax, %rbx
movq -0x168(%rbp), %rdi
leaq -0x158(%rbp), %rax
cmpq %rax, %rdi
je 0x139c4
movq -0x158(%rbp), %rsi
jmp 0x139bc
movq %rax, %rbx
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x13890
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x31d0
movq -0xa8(%rbp), %rdi
leaq -0x98(%rbp), %rax
cmpq %rax, %rdi
je 0x139c4
movq -0x98(%rbp), %rsi
jmp 0x139bc
jmp 0x1398f
movq %rax, %rbx
movq -0xc8(%rbp), %rdi
leaq -0xb8(%rbp), %rax
cmpq %rax, %rdi
je 0x138e4
movq -0xb8(%rbp), %rsi
incq %rsi
callq 0x31d0
jmp 0x138e4
jmp 0x138e1
movq %rax, %rbx
movq -0xa8(%rbp), %rdi
leaq -0x98(%rbp), %rax
cmpq %rax, %rdi
je 0x1390b
movq -0x98(%rbp), %rsi
incq %rsi
callq 0x31d0
jmp 0x1390b
movq %rax, %rbx
movq -0xe8(%rbp), %rdi
leaq -0xd8(%rbp), %rax
cmpq %rax, %rdi
je 0x13992
movq -0xd8(%rbp), %rsi
incq %rsi
callq 0x31d0
jmp 0x13992
jmp 0x1398f
jmp 0x13933
movq %rax, %rbx
jmp 0x139ab
movq %rax, %rbx
leaq -0xa8(%rbp), %rdi
callq 0x157ec
jmp 0x13992
movq %rax, %rbx
movq -0x188(%rbp), %rdi
leaq -0x178(%rbp), %rax
cmpq %rax, %rdi
je 0x13973
movq -0x178(%rbp), %rsi
incq %rsi
callq 0x31d0
jmp 0x13973
movq %rax, %rbx
movq -0x1a8(%rbp), %rdi
leaq -0x198(%rbp), %rax
cmpq %rax, %rdi
je 0x139c4
movq -0x198(%rbp), %rsi
jmp 0x139bc
movq %rax, %rbx
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x139ab
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x31d0
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x139c4
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x31d0
movq %rbx, %rdi
callq 0x3320