// File: /workspace/github_cpp_makefile_star2_O2/yanlinlin82[P]icpp/icpp.cpp
// Function: parse_type_name[abi:cxx11]()
string parse_type_name()
{
	string prefix;
	if (token == "static" || token == "extern") {
		prefix = token;
		next(); // skip this prefix
	}
	string type_name;
	if (token == "auto") {
		type_name = token; next();
	} else {
		vector<pair<token_type, string>> a;
		int angle_bracket = 0;
		while (token == "const" || is_built_in_type() ||
				token == "*" || token == "&" ||
				token == "<" || token == ">" || token == ">>") {
			if (token == "<") {
				++angle_bracket;
				a.push_back(make_pair(type, token));
				next();
			} else if (token == ">") {
				if (--angle_bracket < 0) { err("unexpected '>'!\n"); }
				a.push_back(make_pair(type, token));
				next();
			} else if (token == ">>") {
				if (angle_bracket < 2) { err("unexpected '>>'!\n"); }
				angle_bracket -= 2;
				a.push_back(make_pair(type, ">"));
				a.push_back(make_pair(type, ">"));
				next();
			} else {
				a.push_back(make_pair(type, token));
				next();
			}
		}
		token_type last_token_type = unknown;
		for (auto e : a) {
			if (e.first == symbol && last_token_type == symbol && !type_name.empty()) {
				type_name += " ";
			}
			type_name += e.second;
			last_token_type = e.first;
		}
	}
	if (type_name == "size_t") { // TODO: support typedef
		type_name = "int";
	}
	return type_name;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdi, -0x30(%rbp)
leaq -0x98(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x1b971(%rip), %rdi     # 0x21290
leaq 0x10c35(%rip), %rsi     # 0x1655b
callq 0xf4c8
testb %al, %al
jne 0x5946
leaq 0x1b95a(%rip), %rdi     # 0x21290
leaq 0x10c25(%rip), %rsi     # 0x16562
callq 0xf4c8
testb %al, %al
je 0x595e
leaq 0x1b943(%rip), %rsi     # 0x21290
leaq -0xa8(%rbp), %rdi
callq 0x3130
callq 0x4fdf
movq -0x30(%rbp), %rbx
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
andq $0x0, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
leaq 0x1b917(%rip), %rdi     # 0x21290
leaq 0x10be9(%rip), %rsi     # 0x16569
callq 0xf4c8
testb %al, %al
je 0x59a2
leaq 0x1b900(%rip), %rsi     # 0x21290
movq %rbx, %rdi
callq 0x3130
callq 0x4fdf
jmp 0x5c24
leaq -0x50(%rbp), %rax
andq $0x0, 0x10(%rax)
xorps %xmm0, %xmm0
movaps %xmm0, (%rax)
leaq 0x1b8d8(%rip), %r12     # 0x21290
leaq 0x1151b(%rip), %rbx     # 0x16eda
leaq -0x88(%rbp), %r14
leaq 0x10aa0(%rip), %r15     # 0x1646d
xorl %r13d, %r13d
movq %r12, %rdi
leaq 0x10b94(%rip), %rsi     # 0x1656e
callq 0xf4c8
testb %al, %al
jne 0x5a47
callq 0x57f6
testb %al, %al
jne 0x5a47
movq %r12, %rdi
leaq 0x107db(%rip), %rsi     # 0x161d1
callq 0xf4c8
testb %al, %al
jne 0x5a47
movq %r12, %rdi
leaq 0x107e2(%rip), %rsi     # 0x161eb
callq 0xf4c8
testb %al, %al
jne 0x5a47
movq %r12, %rdi
movq %rbx, %rsi
callq 0xf4c8
testb %al, %al
jne 0x5a47
movq %r12, %rdi
movq %r15, %rsi
callq 0xf4c8
testb %al, %al
jne 0x5a47
movq %r12, %rdi
leaq 0x107a1(%rip), %rsi     # 0x161db
callq 0xf4c8
testb %al, %al
je 0x5ba6
movq %r12, %rdi
movq %rbx, %rsi
callq 0xf4c8
testb %al, %al
jne 0x5aad
movq %r12, %rdi
movq %r15, %rsi
callq 0xf4c8
testb %al, %al
jne 0x5ae1
movq %r12, %rdi
leaq 0x1076c(%rip), %rsi     # 0x161db
callq 0xf4c8
testb %al, %al
jne 0x5b28
movq %r14, %rdi
leaq 0x1b802(%rip), %rsi     # 0x21288
movq %r12, %rdx
callq 0x1049e
leaq -0x50(%rbp), %rdi
movq %r14, %rsi
callq 0x1345a
leaq -0x80(%rbp), %rdi
callq 0x3368
callq 0x4fdf
jmp 0x59d0
movq %r14, %rdi
leaq 0x1b7d1(%rip), %rsi     # 0x21288
movq %r12, %rdx
callq 0x1049e
leaq -0x50(%rbp), %rdi
movq %r14, %rsi
callq 0x1345a
incl %r13d
leaq -0x80(%rbp), %rdi
callq 0x3368
callq 0x4fdf
jmp 0x59d0
testl %r13d, %r13d
jg 0x5af4
leaq 0x10a87(%rip), %rdi     # 0x16574
xorl %eax, %eax
callq 0xf410
movq %r14, %rdi
leaq 0x1b78a(%rip), %rsi     # 0x21288
movq %r12, %rdx
callq 0x1049e
leaq -0x50(%rbp), %rdi
movq %r14, %rsi
callq 0x1345a
decl %r13d
leaq -0x80(%rbp), %rdi
callq 0x3368
callq 0x4fdf
jmp 0x59d0
cmpl $0x1, %r13d
jg 0x5b3c
leaq 0x10a50(%rip), %rdi     # 0x16585
xorl %eax, %eax
callq 0xf410
movl 0x1b746(%rip), %eax     # 0x21288
movl %eax, -0x60(%rbp)
movq %r15, -0x58(%rbp)
movq %r14, %rdi
leaq -0x60(%rbp), %rsi
callq 0xf4d8
leaq -0x50(%rbp), %rdi
movq %r14, %rsi
callq 0x1345a
leaq -0x80(%rbp), %rdi
callq 0x3368
movl 0x1b718(%rip), %eax     # 0x21288
movl %eax, -0x60(%rbp)
movq %r15, -0x58(%rbp)
movq %r14, %rdi
leaq -0x60(%rbp), %rsi
callq 0xf4d8
leaq -0x50(%rbp), %rdi
movq %r14, %rsi
callq 0x1345a
addl $-0x2, %r13d
leaq -0x80(%rbp), %rdi
callq 0x3368
callq 0x4fdf
jmp 0x59d0
movq -0x50(%rbp), %rbx
movq -0x48(%rbp), %r13
xorl %r12d, %r12d
leaq -0x80(%rbp), %r14
leaq -0x88(%rbp), %r15
cmpq %r13, %rbx
je 0x5c17
movq %r15, %rdi
movq %rbx, %rsi
callq 0xf4fc
cmpl $0x1, -0x88(%rbp)
jne 0x5bf6
cmpl $0x1, %r12d
jne 0x5bf6
movq -0x30(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x5bf6
movq -0x30(%rbp), %rdi
leaq 0x1068f(%rip), %rsi     # 0x16280
callq 0x3330
movq -0x30(%rbp), %rdi
movq %r14, %rsi
callq 0x3350
movl -0x88(%rbp), %r12d
movq %r14, %rdi
callq 0x3368
addq $0x28, %rbx
jmp 0x5bbc
leaq -0x50(%rbp), %rdi
callq 0xf512
movq -0x30(%rbp), %rbx
leaq 0x10929(%rip), %rsi     # 0x16554
movq %rbx, %rdi
callq 0xf4c8
testb %al, %al
je 0x5c46
leaq 0x112a6(%rip), %rsi     # 0x16ee4
movq %rbx, %rdi
callq 0x3340
leaq -0xa8(%rbp), %rdi
callq 0x3368
movq %rbx, %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x5ca9
movq %rax, %rbx
jmp 0x5cb2
jmp 0x5c9d
movq %rax, %rbx
movq %r14, %rdi
jmp 0x5c96
jmp 0x5c9d
jmp 0x5c9d
jmp 0x5c8f
jmp 0x5c8f
jmp 0x5c9d
jmp 0x5c8f
jmp 0x5c8f
jmp 0x5c9d
jmp 0x5c9d
jmp 0x5c9d
movq %rax, %rbx
leaq -0x80(%rbp), %rdi
callq 0x3368
jmp 0x5ca0
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0xf512
movq -0x30(%rbp), %rdi
callq 0x3368
leaq -0xa8(%rbp), %rdi
callq 0x3368
movq %rbx, %rdi
callq 0x3310