// File: /workspace/github_cpp_makefile_star2_O1/lhydave[P]SysYCompilerLab/front/symtab.cpp
// Function: sysY_AST::reg_var(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool, bool, bool, std::vector<int, std::allocator<int>> const&, std::vector<int, std::allocator<int>> const&)
void reg_var(const string &name, bool is_const, bool is_array, bool is_param,
	const vector<int> &dim, const vector<int> &val)
{
	assert(!name.empty());
	if (defined(name))
	{
		string msg = "identifier '" + name + "' was already defined";
		yyerror(msg.c_str());
	}
	var_entry new_entry(is_array, is_const, is_param, dim, val, name);
	if (is_param)
		new_entry.eeyore_name = "p" + to_string(param_id++);
	else if (name[0] != '#')
		new_entry.eeyore_name = "T" + to_string(var_id++);
	else
		new_entry.eeyore_name = name.substr(1);
	if (blk_id) // defined in the function!
	{
		assert(!now_func_name.empty());
		func_table[now_func_name].func_var_table.push_back(new_entry);
		if (is_param) // a parameter!
			func_table[now_func_name].params.push_back(new_entry);
	}
	var_stack[blk_id][name] = new_entry;
	return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %r9, %r14
movq %r8, %r15
movl %ecx, 0xc(%rsp)
movl %edx, %r13d
movl %esi, %r12d
movq %rdi, %rbx
callq 0x14929
testb %al, %al
je 0x14b14
leaq 0x1401a(%rip), %rsi     # 0x28a84
leaq 0x10(%rsp), %rbp
movq %rbp, %rdi
movq %rbx, %rdx
callq 0x11eb4
leaq 0x1445d(%rip), %rsi     # 0x28ede
movq %rbp, %rdi
callq 0x5510
leaq 0x60(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x14ab0
movq %rdx, 0x50(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x60(%rsp)
jmp 0x14ab7
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
movq 0x8(%rax), %rdx
movq %rdx, 0x58(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x14aea
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x5240
movq 0x50(%rsp), %rdi
leaq 0x207ba(%rip), %rax     # 0x352b0
movl (%rax), %esi
callq 0x81dc
movq 0x50(%rsp), %rdi
cmpq %rbp, %rdi
je 0x14b14
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x5240
movq %rbx, (%rsp)
movzbl %r13b, %esi
movzbl %r12b, %edx
movzbl 0xc(%rsp), %ebp
leaq 0x50(%rsp), %rdi
movl %ebp, %ecx
movq %r15, %r8
movq %r14, %r9
callq 0x13314
testb %bpl, %bpl
je 0x14bb7
movl 0x20899(%rip), %r14d    # 0x353dc
leal 0x1(%r14), %eax
movl %eax, 0x2088f(%rip)     # 0x353dc
movl %r14d, %r15d
negl %r15d
cmovsl %r14d, %r15d
movl $0x1, %r12d
cmpl $0xa, %r15d
jb 0x14c86
movl $0x4, %r12d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %r15d, %ecx
cmpl $0x63, %ecx
jbe 0x14c7d
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x14c83
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x14c86
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r12d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x14b75
addl $-0x3, %r12d
jmp 0x14c86
movq (%rbx), %rax
cmpb $0x23, (%rax)
jne 0x14c05
leaq 0x10(%rsp), %rdi
movl $0x1, %edx
movq %rbx, %rsi
movq $-0x1, %rcx
callq 0x5260
leaq 0x50(%rsp), %rdi
leaq 0x10(%rsp), %r14
movq %r14, %rsi
callq 0x5310
movq (%r14), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x14db4
movq 0x20(%rsp), %rsi
jmp 0x14dac
movl 0x207d4(%rip), %r14d    # 0x353e0
leal 0x1(%r14), %eax
movl %eax, 0x207ca(%rip)     # 0x353e0
movl %r14d, %r15d
negl %r15d
cmovsl %r14d, %r15d
movl $0x1, %r12d
cmpl $0xa, %r15d
jb 0x14ce1
movl $0x4, %r12d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %r15d, %ecx
cmpl $0x63, %ecx
jbe 0x14cd8
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x14cde
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x14ce1
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r12d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x14c3e
addl $-0x3, %r12d
jmp 0x14ce1
addl $-0x2, %r12d
jmp 0x14c86
decl %r12d
shrl $0x1f, %r14d
leal (%r12,%r14), %esi
leaq 0x40(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0x30(%rsp), %rdi
movl $0x2d, %edx
callq 0x52b0
leaq 0x30(%rsp), %r13
addq (%r13), %r14
movq %r14, %rdi
movl %r12d, %esi
movl %r15d, %edx
callq 0x1230e
leaq 0x14230(%rip), %rcx     # 0x28ef4
movl $0x1, %r8d
movq %r13, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5290
jmp 0x14d31
addl $-0x2, %r12d
jmp 0x14ce1
decl %r12d
shrl $0x1f, %r14d
leal (%r12,%r14), %esi
leaq 0x40(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0x30(%rsp), %rdi
movl $0x2d, %edx
callq 0x52b0
leaq 0x30(%rsp), %r13
addq (%r13), %r14
movq %r14, %rdi
movl %r12d, %esi
movl %r15d, %edx
callq 0x1230e
leaq 0x141d7(%rip), %rcx     # 0x28ef6
movl $0x1, %r8d
movq %r13, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5290
leaq 0x20(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x14d58
movq %rdx, 0x10(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x20(%rsp)
jmp 0x14d5f
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
leaq 0x10(%rsp), %r14
movq %rdx, 0x8(%r14)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
callq 0x5310
movq (%r14), %rdi
cmpq %r15, %rdi
je 0x14d9d
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x5240
movq 0x30(%rsp), %rdi
cmpq %rbp, %rdi
je 0x14db4
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x5240
cmpl $0x0, 0x2061d(%rip)     # 0x353d8
je 0x14e0c
leaq 0x205bc(%rip), %rdi     # 0x35380
leaq 0x205ed(%rip), %rsi     # 0x353b8
callq 0x12e54
addq $0x38, %rax
leaq 0x50(%rsp), %rsi
movq %rax, %rdi
callq 0x15386
cmpb $0x0, 0xc(%rsp)
je 0x14e0c
leaq 0x20591(%rip), %rdi     # 0x35380
leaq 0x205c2(%rip), %rsi     # 0x353b8
callq 0x12e54
addq $0x20, %rax
leaq 0x50(%rsp), %rsi
movq %rax, %rdi
callq 0x15386
movslq 0x205c5(%rip), %rax     # 0x353d8
imulq $0x38, %rax, %rdi
addq 0x2054a(%rip), %rdi     # 0x35368
movq %rbx, %rsi
callq 0x1610e
movq %rax, %rbx
leaq 0x50(%rsp), %rsi
movq %rax, %rdi
callq 0x5140
leaq 0x20(%rbx), %rdi
leaq 0x70(%rsp), %rsi
callq 0x5140
leaq 0x98(%rsp), %rsi
movb -0x6(%rsi), %al
movb %al, 0x42(%rbx)
movzwl -0x8(%rsi), %eax
movw %ax, 0x40(%rbx)
leaq 0x48(%rbx), %rdi
callq 0x152b0
addq $0x60, %rbx
leaq 0xb0(%rsp), %rsi
movq %rbx, %rdi
callq 0x152b0
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0x14e94
movq 0xc0(%rsp), %rsi
subq %rdi, %rsi
callq 0x5240
movq 0x98(%rsp), %rdi
testq %rdi, %rdi
je 0x14eb1
movq 0xa8(%rsp), %rsi
subq %rdi, %rsi
callq 0x5240
leaq 0x80(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x14ed2
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x5240
leaq 0x60(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x14eed
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x5240
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x14f05
jmp 0x14f57
jmp 0x14f57
movq %rax, %rbx
movq 0x30(%rsp), %rdi
cmpq %rbp, %rdi
je 0x14f5a
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x5240
jmp 0x14f5a
movq %rax, %rbx
movq 0x50(%rsp), %rdi
cmpq %rbp, %rdi
je 0x14f64
movq 0x60(%rsp), %rsi
jmp 0x14f4d
jmp 0x14f57
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x14f64
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x5240
jmp 0x14f64
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x11f96
movq %rbx, %rdi
callq 0x54c0