// File: /workspace/github_cpp_makefile_star2_O2/yanlinlin82[P]icpp/icpp.cpp
// Function: parse_array_element(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, bool, bool, int)
string parse_array_element(string name, string symbol_type_name,
		int offset, bool is_global, bool generate_code, int depth)
{
	assert(symbol_type_name.substr(symbol_type_name.size() - 1) == "]");
	auto it = symbol_dim.find(name);
	if (it == symbol_dim.end()) {
		err("symbol '%s' (type = '%s') is not an array!\n",
				name.c_str(), symbol_type_name.c_str());
	}
	const auto& dim = it->second.second;
	if (is_global) {
		if (generate_code) add_assembly_code(LEA, offset, name + "\t" + symbol_type_name);
	} else {
		if (generate_code) add_assembly_code(LLEA, offset, name + "\t" + symbol_type_name);
	}
	if (generate_code) add_assembly_code(PUSH);
	next();
	for (size_t i = 0; ; ++i) {
		if (i > 0) {
			if (generate_code) add_assembly_code(PUSH);
			if (generate_code) add_assembly_code(MOV, dim[i]);
			if (generate_code) add_assembly_code(MUL);
		}
		parse_expression(";", depth, generate_code);
		if (i > 0) {
			if (generate_code) add_assembly_code(ADD);
		}
		expect_token("]", "[");
		next();
		if (token != "[") {
			int factor = 1;
			for (++i; i + 1 < dim.size(); ++i) {
				factor *= dim[i];
			}
			if (factor > 1) {
				if (generate_code) add_assembly_code(PUSH);
				if (generate_code) add_assembly_code(MOV, factor);
				if (generate_code) add_assembly_code(MUL);
			}
			break;
		}
		next();
	}
	if (generate_code) add_assembly_code(ADD);
	if (generate_code) add_assembly_code(PUSH);
	if (generate_code) add_assembly_code(SGET);
	if (!symbol_type_name.empty()) {
		if (symbol_type_name[symbol_type_name.size() - 1] == '*') {
			symbol_type_name = symbol_type_name.substr(0, symbol_type_name.size() - 1);
			while (!symbol_type_name.empty() && symbol_type_name[symbol_type_name.size() - 1] == ' ') {
				symbol_type_name = symbol_type_name.substr(0, symbol_type_name.size() - 1);
			}
		}
	}
	return symbol_type_name;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x268, %rsp            # imm = 0x268
movl %r9d, -0x2c(%rbp)
movl %r8d, %r15d
movl %ecx, %ebx
movq %rdx, %rax
movq %rsi, %r14
movq %rdi, -0x70(%rbp)
movq 0x8(%rdx), %rdx
decq %rdx
leaq -0x58(%rbp), %r12
pushq $-0x1
popq %rcx
movq %r12, %rdi
movq %rax, -0x38(%rbp)
movq %rax, %rsi
callq 0x3200
leaq 0xc897(%rip), %rsi      # 0x1620e
movq %r12, %rdi
callq 0xf4c8
testb %al, %al
je 0x9e51
leaq -0x58(%rbp), %rdi
callq 0x3368
leaq 0x17ad9(%rip), %rdi     # 0x21470
movq %r14, %rsi
callq 0x1393a
movq %rax, -0x68(%rbp)
testq %rax, %rax
jne 0x99c0
movq (%r14), %rsi
movq -0x38(%rbp), %rax
movq (%rax), %rdx
leaq 0xcf08(%rip), %rdi      # 0x168c1
xorl %eax, %eax
callq 0xf410
testb %r15b, %r15b
je 0x9a12
cmpb $0x0, -0x2c(%rbp)
je 0x9a9f
leaq 0xdaad(%rip), %rdx      # 0x17483
leaq -0x58(%rbp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0xf35b
leaq -0x190(%rbp), %rdi
movq %r15, %rsi
movq -0x38(%rbp), %rdx
callq 0xf332
pushq $0x5
popq %rdi
leaq -0x190(%rbp), %rdx
movl %ebx, %esi
callq 0x4a27
leaq -0x190(%rbp), %rdi
jmp 0x9a5d
cmpb $0x0, -0x2c(%rbp)
je 0x9a9f
leaq 0xda60(%rip), %rdx      # 0x17483
leaq -0x58(%rbp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0xf35b
leaq -0x170(%rbp), %rdi
movq %r15, %rsi
movq -0x38(%rbp), %rdx
callq 0xf332
pushq $0x8
popq %rdi
leaq -0x170(%rbp), %rdx
movl %ebx, %esi
callq 0x4a27
leaq -0x170(%rbp), %rdi
callq 0x3368
leaq -0x58(%rbp), %rdi
callq 0x3368
leaq 0xda12(%rip), %rsi      # 0x17484
leaq -0x150(%rbp), %rdi
leaq -0x58(%rbp), %rdx
callq 0xf1f8
pushq $0x1
popq %rdi
leaq -0x150(%rbp), %rdx
xorl %esi, %esi
callq 0x4a27
leaq -0x150(%rbp), %rdi
callq 0x3368
callq 0x4fdf
pushq $0x2
popq %r14
pushq $0x1
popq %r13
movzbl -0x2c(%rbp), %eax
movl %eax, -0x5c(%rbp)
cmpq $0x2, %r14
setne %r12b
andb -0x2c(%rbp), %r12b
cmpb $0x1, %r12b
jne 0x9b6a
leaq -0x270(%rbp), %r15
movq %r15, %rdi
leaq 0xd9aa(%rip), %rsi      # 0x17484
leaq -0x58(%rbp), %rdx
callq 0xf1f8
movl %r13d, %ebx
movl %r13d, %edi
xorl %esi, %esi
movq %r15, %rdx
callq 0x4a27
movq %r15, %rdi
callq 0x3368
movq -0x68(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x8(%rax,%r14,4), %r15d
leaq -0x250(%rbp), %r13
movq %r13, %rdi
leaq 0xd96b(%rip), %rsi      # 0x17484
leaq -0x58(%rbp), %rdx
callq 0xf1f8
pushq $0x4
popq %rdi
movl %r15d, %esi
movq %r13, %rdx
callq 0x4a27
movq %r13, %rdi
callq 0x3368
leaq -0x230(%rbp), %r15
movq %r15, %rdi
leaq 0xd93b(%rip), %rsi      # 0x17484
leaq -0x58(%rbp), %rdx
callq 0xf1f8
pushq $0xf
popq %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x4a27
movl %ebx, %r13d
movq %r15, %rdi
callq 0x3368
leaq -0x210(%rbp), %rbx
movq %rbx, %rdi
leaq 0xc697(%rip), %rsi      # 0x16212
leaq -0x58(%rbp), %rdx
callq 0xf1f8
leaq -0x290(%rbp), %r15
movq %r15, %rdi
movq %rbx, %rsi
movl 0x10(%rbp), %edx
movl -0x5c(%rbp), %ecx
callq 0x7431
movq %r15, %rdi
callq 0x3368
movq %rbx, %rdi
callq 0x3368
testb %r12b, %r12b
leaq -0x1f0(%rbp), %rbx
leaq -0x1d0(%rbp), %r15
leaq 0xcf9e(%rip), %r12      # 0x16b62
je 0x9bee
movq %rbx, %rdi
leaq 0xd8b4(%rip), %rsi      # 0x17484
leaq -0x58(%rbp), %rdx
callq 0xf1f8
pushq $0xd
popq %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x4a27
movq %rbx, %rdi
callq 0x3368
movq %r15, %rdi
leaq 0xc616(%rip), %rsi      # 0x1620e
leaq -0x58(%rbp), %rdx
callq 0xf1f8
leaq -0x1b0(%rbp), %rbx
movq %rbx, %rdi
movq %r12, %rsi
leaq -0x2d(%rbp), %rdx
callq 0xf1f8
movq %r15, %rdi
movq %rbx, %rsi
callq 0x540c
movq %rbx, %rdi
callq 0x3368
movq %r15, %rdi
callq 0x3368
callq 0x4fdf
leaq 0x17652(%rip), %rdi     # 0x21290
movq %r12, %rsi
callq 0xf65a
testb %al, %al
jne 0x9c57
callq 0x4fdf
incq %r14
jmp 0x9ab3
movq -0x68(%rbp), %rcx
movq 0x30(%rcx), %rax
movq 0x38(%rcx), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
cmpq %rcx, %r14
jae 0x9c7a
imull -0x4(%rax,%r14,4), %r13d
incq %r14
jmp 0x9c6a
cmpl $0x2, %r13d
jl 0x9d31
cmpb $0x0, -0x2c(%rbp)
movq -0x38(%rbp), %r14
je 0x9ddb
leaq 0xd7eb(%rip), %rsi      # 0x17484
leaq -0x130(%rbp), %rdi
leaq -0x58(%rbp), %rdx
callq 0xf1f8
pushq $0x1
popq %rdi
leaq -0x130(%rbp), %rdx
xorl %esi, %esi
callq 0x4a27
leaq -0x130(%rbp), %rdi
callq 0x3368
leaq 0xd7b7(%rip), %rsi      # 0x17484
leaq -0x110(%rbp), %rdi
leaq -0x58(%rbp), %rdx
callq 0xf1f8
pushq $0x4
popq %rdi
leaq -0x110(%rbp), %rdx
movl %r13d, %esi
callq 0x4a27
leaq -0x110(%rbp), %rdi
callq 0x3368
leaq 0xd782(%rip), %rsi      # 0x17484
leaq -0xf0(%rbp), %rdi
leaq -0x58(%rbp), %rdx
callq 0xf1f8
pushq $0xf
popq %rdi
leaq -0xf0(%rbp), %rdx
xorl %esi, %esi
callq 0x4a27
leaq -0xf0(%rbp), %rdi
callq 0x3368
jmp 0x9d3f
cmpb $0x0, -0x2c(%rbp)
movq -0x38(%rbp), %r14
je 0x9ddb
leaq 0xd73e(%rip), %rsi      # 0x17484
leaq -0xd0(%rbp), %rdi
leaq -0x58(%rbp), %rdx
callq 0xf1f8
pushq $0xd
popq %rdi
leaq -0xd0(%rbp), %rdx
xorl %esi, %esi
callq 0x4a27
leaq -0xd0(%rbp), %rdi
callq 0x3368
leaq 0xd70a(%rip), %rsi      # 0x17484
leaq -0xb0(%rbp), %rdi
leaq -0x58(%rbp), %rdx
callq 0xf1f8
pushq $0x1
popq %rdi
leaq -0xb0(%rbp), %rdx
xorl %esi, %esi
callq 0x4a27
leaq -0xb0(%rbp), %rdi
callq 0x3368
leaq 0xd6d6(%rip), %rsi      # 0x17484
leaq -0x90(%rbp), %rdi
leaq -0x58(%rbp), %rdx
callq 0xf1f8
pushq $0xb
popq %rdi
leaq -0x90(%rbp), %rdx
xorl %esi, %esi
callq 0x4a27
leaq -0x90(%rbp), %rdi
callq 0x3368
movq 0x8(%r14), %rcx
testq %rcx, %rcx
je 0x9e2d
movq (%r14), %rax
cmpb $0x2a, -0x1(%rax,%rcx)
jne 0x9e2d
decq %rcx
leaq -0x58(%rbp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x3200
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3230
movq %rbx, %rdi
callq 0x3368
movq 0x8(%r14), %rcx
testq %rcx, %rcx
je 0x9e2d
movq (%r14), %rax
cmpb $0x20, -0x1(%rax,%rcx)
jne 0x9e2d
decq %rcx
jmp 0x9df5
movq -0x70(%rbp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3240
movq %rbx, %rax
addq $0x268, %rsp            # imm = 0x268
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xc9ec(%rip), %rdi      # 0x16844
leaq 0xc5d8(%rip), %rsi      # 0x16437
leaq 0xca1a(%rip), %rcx      # 0x16880
movl $0x302, %edx            # imm = 0x302
callq 0x3150
movq %rax, %rbx
leaq -0xf0(%rbp), %rdi
jmp 0x9f7b
jmp 0x9f5b
movq %rax, %rbx
leaq -0x110(%rbp), %rdi
jmp 0x9f7b
jmp 0x9f5b
movq %rax, %rbx
leaq -0x130(%rbp), %rdi
jmp 0x9f7b
jmp 0x9f5b
movq %rax, %rbx
leaq -0x170(%rbp), %rdi
jmp 0x9ec2
movq %rax, %rbx
leaq -0x190(%rbp), %rdi
callq 0x3368
jmp 0x9ece
jmp 0x9ecb
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
jmp 0x9f7b
movq %rax, %rbx
leaq -0x90(%rbp), %rdi
jmp 0x9f7b
jmp 0x9f5b
movq %rax, %rbx
leaq -0xb0(%rbp), %rdi
jmp 0x9f7b
jmp 0x9f5b
movq %rax, %rbx
leaq -0xd0(%rbp), %rdi
jmp 0x9f7b
jmp 0x9f5b
movq %rax, %rbx
leaq -0x150(%rbp), %rdi
jmp 0x9f7b
jmp 0x9f5b
jmp 0x9f5b
jmp 0x9f5b
jmp 0x9f5b
jmp 0x9f5b
movq %rax, %rbx
leaq -0x270(%rbp), %rdi
jmp 0x9f7b
movq %rax, %rbx
leaq -0x250(%rbp), %rdi
jmp 0x9f7b
movq %rax, %rbx
leaq -0x230(%rbp), %rdi
jmp 0x9f7b
movq %rax, %rbx
leaq -0x1f0(%rbp), %rdi
jmp 0x9f7b
jmp 0x9f5b
movq %rax, %rbx
leaq -0x210(%rbp), %rdi
jmp 0x9f7b
movq %rax, %rbx
jmp 0x9f80
movq %rax, %rbx
jmp 0x9f74
movq %rax, %rbx
leaq -0x1b0(%rbp), %rdi
callq 0x3368
leaq -0x1d0(%rbp), %rdi
callq 0x3368
movq %rbx, %rdi
callq 0x3310