// File: /workspace/github_cpp_makefile_star2_O1/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 0x126c4
callq 0x5790
cmpq $0x0, 0x11041(%rip)     # 0x242a8
je 0x1397d
leaq 0x1102c(%rip), %rbx     # 0x242a0
leaq 0x8f94(%rip), %r13      # 0x1c20f
leaq -0x188(%rbp), %r14
movq %rbx, %rdi
leaq 0x9d1e(%rip), %rsi      # 0x1cfaa
callq 0x30b0
testl %eax, %eax
je 0x13370
movq %rbx, %rdi
leaq 0x9a71(%rip), %rsi      # 0x1cd14
callq 0x30b0
testl %eax, %eax
je 0x133b2
movq %rbx, %rdi
leaq 0x9d5e(%rip), %rsi      # 0x1d018
callq 0x30b0
testl %eax, %eax
je 0x13562
movq %rbx, %rdi
leaq 0x9d4c(%rip), %rsi      # 0x1d01d
callq 0x30b0
testl %eax, %eax
je 0x13475
movq %rbx, %rdi
leaq 0x9d3b(%rip), %rsi      # 0x1d023
callq 0x30b0
testl %eax, %eax
je 0x13475
movq %rbx, %rdi
leaq 0x9d2b(%rip), %rsi      # 0x1d02a
callq 0x30b0
testl %eax, %eax
je 0x13475
movq %rbx, %rdi
leaq 0x9d1a(%rip), %rsi      # 0x1d030
callq 0x30b0
testl %eax, %eax
je 0x13475
movq %rbx, %rdi
leaq 0x9d27(%rip), %rsi      # 0x1d054
callq 0x30b0
testl %eax, %eax
je 0x136b8
movq %rbx, %rdi
movq %r13, %rsi
callq 0x30b0
testl %eax, %eax
je 0x13768
movq %rbx, %rdi
leaq 0x8eb6(%rip), %rsi      # 0x1c20d
callq 0x30b0
testl %eax, %eax
je 0x13774
xorl %edi, %edi
callq 0x100e5
jmp 0x13462
callq 0x5790
cmpq $0x0, 0x10f2b(%rip)     # 0x242a8
je 0x1338e
movq %rbx, %rdi
movq %r13, %rsi
callq 0x30b0
testl %eax, %eax
jne 0x13370
cmpq $0x0, 0x10f12(%rip)     # 0x242a8
jne 0x133a6
leaq 0x9c11(%rip), %rdi      # 0x1cfb0
xorl %eax, %eax
callq 0x1585f
leaq 0x9c1d(%rip), %rdi      # 0x1cfca
jmp 0x13456
leaq -0x198(%rbp), %rax
movq %rax, -0x1a8(%rbp)
leaq -0x1a8(%rbp), %r15
movq %r15, %rdi
movq %r13, %rsi
leaq 0x8e3c(%rip), %rdx      # 0x1c210
callq 0x16dc8
leaq -0x178(%rbp), %rax
movq %rax, -0x188(%rbp)
movq 0x10eb2(%rip), %rsi     # 0x242a0
movq 0x10eb3(%rip), %rdx     # 0x242a8
addq %rsi, %rdx
movq %r14, %rdi
callq 0x16d2e
movq %r15, %rdi
movq %r14, %rsi
callq 0x5d5d
movq -0x188(%rbp), %rdi
leaq -0x178(%rbp), %rax
cmpq %rax, %rdi
je 0x1342d
movq -0x178(%rbp), %rsi
incq %rsi
callq 0x31d0
movq -0x1a8(%rbp), %rdi
leaq -0x198(%rbp), %rax
cmpq %rax, %rdi
je 0x1344f
movq -0x198(%rbp), %rsi
incq %rsi
callq 0x31d0
leaq 0x9b9a(%rip), %rdi      # 0x1cff0
xorl %eax, %eax
callq 0x1559d
callq 0x5790
cmpq $0x0, 0x10e3e(%rip)     # 0x242a8
jne 0x13282
jmp 0x1397d
leaq -0x38(%rbp), %rax
movq %rax, -0x48(%rbp)
movq 0x10e1c(%rip), %rsi     # 0x242a0
movq 0x10e1d(%rip), %rdx     # 0x242a8
addq %rsi, %rdx
leaq -0x48(%rbp), %rdi
callq 0x16d2e
callq 0x5790
leaq -0x58(%rbp), %rax
movq %rax, -0x68(%rbp)
movq 0x10df5(%rip), %rsi     # 0x242a0
movq 0x10df6(%rip), %rdx     # 0x242a8
addq %rsi, %rdx
leaq -0x68(%rbp), %rdi
callq 0x16d2e
callq 0x5790
leaq -0xd8(%rbp), %rax
movq %rax, -0xe8(%rbp)
leaq -0xe8(%rbp), %rdi
leaq 0x8f90(%rip), %rsi      # 0x1c46f
leaq 0x8f8a(%rip), %rdx      # 0x1c470
callq 0x16dc8
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 0x16d2e
movq %r15, %rdi
leaq 0x8d60(%rip), %rsi      # 0x1c27d
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 0x1356c
movq %rdx, -0xc8(%rbp)
movq (%rcx), %rdx
movq %rdx, -0xb8(%rbp)
jmp 0x13572
callq 0x11bde
jmp 0x13462
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 0x5d07
movq -0xc8(%rbp), %rdi
leaq -0xb8(%rbp), %rax
cmpq %rax, %rdi
je 0x135c1
movq -0xb8(%rbp), %rsi
incq %rsi
callq 0x31d0
movq -0xa8(%rbp), %rdi
leaq -0x98(%rbp), %rax
cmpq %rax, %rdi
je 0x135e3
movq -0x98(%rbp), %rsi
incq %rsi
callq 0x31d0
movq -0xe8(%rbp), %rdi
leaq -0xd8(%rbp), %rax
cmpq %rax, %rdi
je 0x13605
movq -0xd8(%rbp), %rsi
incq %rsi
callq 0x31d0
movq %r15, %rdi
leaq -0x48(%rbp), %rsi
leaq -0x68(%rbp), %rdx
callq 0x16906
leaq 0x10ca4(%rip), %rdi     # 0x242c0
movq %r15, %rsi
callq 0x19c9a
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x13640
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x31d0
movq -0xa8(%rbp), %rdi
leaq -0x98(%rbp), %rax
cmpq %rax, %rdi
je 0x13662
movq -0x98(%rbp), %rsi
incq %rsi
callq 0x31d0
movq -0x48(%rbp), %rsi
movq -0x68(%rbp), %rdx
leaq 0x99c9(%rip), %rdi      # 0x1d03a
xorl %eax, %eax
callq 0x1559d
callq 0x5790
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x13696
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x31d0
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x13462
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x31d0
jmp 0x13462
leaq -0x158(%rbp), %rax
movq %rax, -0x168(%rbp)
leaq -0x168(%rbp), %r15
movq %r15, %rdi
movq %r13, %rsi
leaq 0x8b36(%rip), %rdx      # 0x1c210
callq 0x16dc8
leaq -0x138(%rbp), %rax
movq %rax, -0x148(%rbp)
movq 0x10bac(%rip), %rsi     # 0x242a0
movq 0x10bad(%rip), %rdx     # 0x242a8
addq %rsi, %rdx
leaq -0x148(%rbp), %r12
movq %r12, %rdi
callq 0x16d2e
movq %r15, %rdi
movq %r12, %rsi
callq 0x5d5d
movq -0x148(%rbp), %rdi
leaq -0x138(%rbp), %rax
cmpq %rax, %rdi
je 0x1373a
movq -0x138(%rbp), %rsi
incq %rsi
callq 0x31d0
movq -0x168(%rbp), %rdi
leaq -0x158(%rbp), %rax
cmpq %rax, %rdi
je 0x1375c
movq -0x158(%rbp), %rsi
incq %rsi
callq 0x31d0
leaq 0x98fa(%rip), %rdi      # 0x1d05d
jmp 0x13456
leaq 0x9917(%rip), %rdi      # 0x1d086
jmp 0x13456
leaq -0x98(%rbp), %rax
movq %rax, -0xa8(%rbp)
xorl %ecx, %ecx
movq %rcx, -0xa0(%rbp)
movb %cl, -0x98(%rbp)
leaq -0x38(%rbp), %rax
movq %rax, -0x48(%rbp)
movq %rcx, -0x40(%rbp)
movb %cl, -0x38(%rbp)
movq 0x10b21(%rip), %rsi     # 0x242c8
cmpq %rsi, 0x10b12(%rip)     # 0x242c0
je 0x137f2
addq $-0x40, %rsi
leaq -0xa8(%rbp), %rdi
callq 0x3110
movq 0x10b01(%rip), %rsi     # 0x242c8
addq $-0x20, %rsi
leaq -0x48(%rbp), %rdi
callq 0x3110
movq 0x10aed(%rip), %rsi     # 0x242c8
addq $-0x40, %rsi
movq %rsi, 0x10ae2(%rip)     # 0x242c8
leaq 0x10ad3(%rip), %rdi     # 0x242c0
callq 0x19ede
movq -0xa8(%rbp), %rsi
movq -0x48(%rbp), %rdx
leaq 0x98a5(%rip), %rdi      # 0x1d0a9
xorl %eax, %eax
callq 0x1559d
leaq -0xa8(%rbp), %rdi
leaq 0x8f10(%rip), %rsi      # 0x1c729
callq 0x30b0
testl %eax, %eax
jne 0x1393c
leaq 0x10aab(%rip), %rdi     # 0x242d8
leaq -0x48(%rbp), %rsi
callq 0x1b114
testq %rax, %rax
jne 0x138f7
leaq -0x118(%rbp), %rax
movq %rax, -0x128(%rbp)
leaq -0x128(%rbp), %r15
movq %r15, %rdi
leaq 0x9c23(%rip), %rdx      # 0x1d481
movq %rdx, %rsi
callq 0x16dc8
movl $0x24, %edi
xorl %esi, %esi
movq %r15, %rdx
callq 0x4d8b
movq -0x128(%rbp), %rdi
leaq -0x118(%rbp), %rax
cmpq %rax, %rdi
je 0x13897
movq -0x118(%rbp), %rsi
incq %rsi
callq 0x31d0
movl 0x10c52(%rip), %r12d    # 0x244f0
leaq -0xf8(%rbp), %rax
movq %rax, -0x108(%rbp)
leaq -0x108(%rbp), %r15
movq %r15, %rdi
leaq 0x9bc4(%rip), %rdx      # 0x1d481
movq %rdx, %rsi
callq 0x16dc8
movl $0x26, %edi
movl %r12d, %esi
movq %r15, %rdx
callq 0x4d8b
movq -0x108(%rbp), %rdi
leaq -0xf8(%rbp), %rax
cmpq %rax, %rdi
je 0x138f7
movq -0xf8(%rbp), %rsi
incq %rsi
callq 0x31d0
movl $0x0, -0x68(%rbp)
leaq 0x9b7c(%rip), %rax      # 0x1d481
movq %rax, -0x60(%rbp)
movq %rax, -0x58(%rbp)
movq %rax, -0x50(%rbp)
leaq 0x10bd8(%rip), %rdi     # 0x244f0
leaq -0x68(%rbp), %rsi
callq 0x1b158
movq 0x10a30(%rip), %rdi     # 0x24358
leaq -0x40(%rdi), %rax
movq %rax, 0x10a25(%rip)     # 0x24358
addq $-0x38, %rdi
callq 0x16afe
callq 0x5790
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x1395a
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x31d0
movq -0xa8(%rbp), %rdi
leaq -0x98(%rbp), %rax
cmpq %rax, %rdi
je 0x13462
movq -0x98(%rbp), %rsi
jmp 0x136ab
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 0x13a31
movq -0xf8(%rbp), %rsi
jmp 0x139d1
jmp 0x13a2e
movq %rax, %rbx
movq -0x128(%rbp), %rdi
leaq -0x118(%rbp), %rax
cmpq %rax, %rdi
je 0x13a31
movq -0x118(%rbp), %rsi
incq %rsi
callq 0x31d0
jmp 0x13a31
jmp 0x13a2e
jmp 0x13a2e
jmp 0x13a2e
movq %rax, %rbx
movq -0x148(%rbp), %rdi
leaq -0x138(%rbp), %rax
cmpq %rax, %rdi
je 0x13a0b
movq -0x138(%rbp), %rsi
incq %rsi
callq 0x31d0
jmp 0x13a0b
movq %rax, %rbx
movq -0x168(%rbp), %rdi
leaq -0x158(%rbp), %rax
cmpq %rax, %rdi
je 0x13b7e
movq -0x158(%rbp), %rsi
jmp 0x13b76
movq %rax, %rbx
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x13a4a
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x31d0
movq -0xa8(%rbp), %rdi
leaq -0x98(%rbp), %rax
cmpq %rax, %rdi
je 0x13b7e
movq -0x98(%rbp), %rsi
jmp 0x13b76
jmp 0x13b49
movq %rax, %rbx
movq -0xc8(%rbp), %rdi
leaq -0xb8(%rbp), %rax
cmpq %rax, %rdi
je 0x13a9e
movq -0xb8(%rbp), %rsi
incq %rsi
callq 0x31d0
jmp 0x13a9e
jmp 0x13a9b
movq %rax, %rbx
movq -0xa8(%rbp), %rdi
leaq -0x98(%rbp), %rax
cmpq %rax, %rdi
je 0x13ac5
movq -0x98(%rbp), %rsi
incq %rsi
callq 0x31d0
jmp 0x13ac5
movq %rax, %rbx
movq -0xe8(%rbp), %rdi
leaq -0xd8(%rbp), %rax
cmpq %rax, %rdi
je 0x13b4c
movq -0xd8(%rbp), %rsi
incq %rsi
callq 0x31d0
jmp 0x13b4c
jmp 0x13b49
jmp 0x13aed
movq %rax, %rbx
jmp 0x13b65
movq %rax, %rbx
leaq -0xa8(%rbp), %rdi
callq 0x15bda
jmp 0x13b4c
movq %rax, %rbx
movq -0x188(%rbp), %rdi
leaq -0x178(%rbp), %rax
cmpq %rax, %rdi
je 0x13b2d
movq -0x178(%rbp), %rsi
incq %rsi
callq 0x31d0
jmp 0x13b2d
movq %rax, %rbx
movq -0x1a8(%rbp), %rdi
leaq -0x198(%rbp), %rax
cmpq %rax, %rdi
je 0x13b7e
movq -0x198(%rbp), %rsi
jmp 0x13b76
movq %rax, %rbx
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x13b65
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x31d0
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x13b7e
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x31d0
movq %rbx, %rdi
callq 0x3320