// File: /workspace/github_cpp_makefile_star2_O3/lhydave[P]SysYCompilerLab/front/node.cpp
// Function: sysY_AST::vardef_node::gen_code()
void vardef_node::gen_code()
{
	if (is_param) // do nothing for parameters
		return;
	var_entry query;
	find_var(name, query);
	if (blk_id == 0) // only declare global variables
		code = gen_vardecl(query, false);
	else if (!val.empty()) // generate initial values
	{
		if (!is_array) // variable
		{
			code += val[0]->code;
			code +=
				"\t" + query.eeyore_name + " = " + val[0]->eeyore_name + "\n";
		}
		else // an array
			for (auto i = 0; i < val.size(); i++)
			{
				code += val[i]->code;
				code += "\t" + query.eeyore_name + "[" +
					to_string(i * int_size) + "] = " + val[i]->eeyore_name +
					"\n";
			}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x158, %rsp            # imm = 0x158
cmpb $0x0, 0xa1(%rdi)
jne 0x950d
movq %rdi, %rbx
leaq 0xf0(%rsp), %rcx
movq %rcx, -0x10(%rcx)
xorl %eax, %eax
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq 0x110(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rcx)
movups %xmm0, 0x28(%rcx)
movups %xmm0, 0x38(%rcx)
addq $0x48, %rdi
leaq 0xe0(%rsp), %rsi
callq 0x151f8
leaq 0x2c580(%rip), %rax     # 0x353d8
cmpl $0x0, (%rax)
je 0x929a
movq 0x88(%rbx), %rax
cmpq 0x90(%rbx), %rax
je 0x9489
cmpb $0x1, 0x6a(%rbx)
jne 0x92d9
leaq 0x18(%rbx), %r14
leaq 0xb0(%rsp), %r13
xorl %r12d, %r12d
leaq 0xc0(%rsp), %rbp
movl $0xd1b71759, %r15d      # imm = 0xD1B71759
movq (%rax,%r12,8), %rax
movq 0x18(%rax), %rsi
movq 0x20(%rax), %rdx
movq %r14, %rdi
callq 0x50c0
movq %rbp, %rdi
leaq 0x20a76(%rip), %rsi     # 0x29930
leaq 0xe0(%rsp), %rdx
callq 0x11c02
movq %rbp, %rdi
leaq 0x204de(%rip), %rsi     # 0x293af
callq 0x5510
movq %r13, 0xa0(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x8f02
movq %rdx, 0xa0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xb0(%rsp)
jmp 0x8f0a
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
movq %rdx, 0xa8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leal (,%r12,4), %ebp
movl $0x1, %r13d
cmpl $0xa, %ebp
jb 0x8f79
movl $0x4, %r13d
movl %ebp, %eax
cmpl $0x63, %eax
jbe 0x8f70
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0x8f76
cmpl $0x2710, %eax           # imm = 0x2710
jb 0x8f79
movl %eax, %ecx
imulq %r15, %rcx
shrq $0x2d, %rcx
addl $0x4, %r13d
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0x8f40
addl $-0x3, %r13d
jmp 0x8f79
addl $-0x2, %r13d
jmp 0x8f79
decl %r13d
movl %r13d, %esi
leaq 0x90(%rsp), %rax
movq %rax, 0x80(%rsp)
leaq 0x80(%rsp), %rdi
movl $0x2d, %edx
callq 0x52b0
movq 0x80(%rsp), %rdi
movl %r13d, %esi
movl %ebp, %edx
callq 0x1205c
movq 0xa0(%rsp), %rcx
movl $0xf, %edi
leaq 0xb0(%rsp), %r13
cmpq %r13, %rcx
je 0x8fd2
movq 0xb0(%rsp), %rdi
movq 0xa8(%rsp), %r8
movq 0x80(%rsp), %rsi
movq 0x88(%rsp), %rdx
leaq (%rdx,%r8), %rax
cmpq %rdi, %rax
leaq 0x30(%rsp), %rbp
jbe 0x9017
movl $0xf, %edi
leaq 0x90(%rsp), %r9
cmpq %r9, %rsi
je 0x9012
movq 0x90(%rsp), %rdi
cmpq %rdi, %rax
jbe 0x9026
leaq 0xa0(%rsp), %rdi
callq 0x50c0
jmp 0x9037
leaq 0x80(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5290
movq %rbp, 0x20(%rsp)
movq (%rax), %rdx
leaq 0x10(%rax), %rcx
cmpq %rcx, %rdx
je 0x9057
movq %rdx, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
jmp 0x905e
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x28(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x20(%rsp), %rdi
leaq 0x1f8da(%rip), %rsi     # 0x28961
callq 0x5510
leaq 0x50(%rsp), %rsi
movq %rsi, 0x40(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x90b4
movq %rdx, 0x40(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x50(%rsp)
jmp 0x90ba
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x48(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x88(%rbx), %rax
movq (%rax,%r12,8), %rax
movq 0x70(%rax), %rsi
movq 0x78(%rax), %rdx
leaq 0x40(%rsp), %rdi
callq 0x50c0
leaq 0x70(%rsp), %rsi
movq %rsi, 0x60(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x9117
movq %rdx, 0x60(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x70(%rsp)
jmp 0x911d
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x68(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x60(%rsp), %rdi
leaq 0x1f8d2(%rip), %rsi     # 0x28a13
callq 0x5510
leaq 0x10(%rsp), %rsi
movq %rsi, (%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x916c
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x9172
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %r14, %rdi
callq 0x50c0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x91b6
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x5240
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x91d2
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x5240
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x91ee
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x5240
movq 0x20(%rsp), %rdi
cmpq %rbp, %rdi
je 0x9205
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x5240
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
leaq 0xc0(%rsp), %rbp
je 0x9232
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x5240
movq 0xa0(%rsp), %rdi
cmpq %r13, %rdi
je 0x924f
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x5240
movq 0xc0(%rsp), %rdi
leaq 0xd0(%rsp), %rax
cmpq %rax, %rdi
je 0x9274
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x5240
incq %r12
movq 0x88(%rbx), %rax
movq 0x90(%rbx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r12, %rcx
ja 0x8e9c
jmp 0x9489
movq %rsp, %rdi
leaq 0xe0(%rsp), %rsi
xorl %edx, %edx
callq 0x96be
addq $0x18, %rbx
movq %rsp, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5310
movq (%r14), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x9489
movq 0x10(%rsp), %rsi
jmp 0x9481
movq (%rax), %rax
leaq 0x18(%rbx), %r14
movq 0x18(%rax), %rsi
movq 0x20(%rax), %rdx
movq %r14, %rdi
callq 0x50c0
leaq 0x20639(%rip), %rsi     # 0x29930
leaq 0x20(%rsp), %rdi
leaq 0xe0(%rsp), %rdx
callq 0x11c02
leaq 0x1f652(%rip), %rsi     # 0x28962
leaq 0x20(%rsp), %rdi
callq 0x5510
leaq 0x50(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x9341
movq %rdx, 0x40(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x50(%rsp)
jmp 0x9348
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
leaq 0x40(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x88(%rbx), %rax
movq (%rax), %rax
movq 0x70(%rax), %rsi
movq 0x78(%rax), %rdx
callq 0x50c0
leaq 0x70(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x93a3
movq %rdx, 0x60(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x70(%rsp)
jmp 0x93ab
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
leaq 0x60(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x1f645(%rip), %rsi     # 0x28a13
callq 0x5510
leaq 0x10(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x93f9
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x9401
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %r14, %rdi
callq 0x50c0
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x9440
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x5240
movq 0x60(%rsp), %rdi
cmpq %r12, %rdi
je 0x9457
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x5240
movq 0x40(%rsp), %rdi
cmpq %r15, %rdi
je 0x946e
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x5240
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9489
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x5240
movq 0x140(%rsp), %rdi
testq %rdi, %rdi
je 0x94a6
movq 0x150(%rsp), %rsi
subq %rdi, %rsi
callq 0x5240
movq 0x128(%rsp), %rdi
testq %rdi, %rdi
je 0x94c3
movq 0x138(%rsp), %rsi
subq %rdi, %rsi
callq 0x5240
movq 0x100(%rsp), %rdi
leaq 0x110(%rsp), %rax
cmpq %rax, %rdi
je 0x94e8
movq 0x110(%rsp), %rsi
incq %rsi
callq 0x5240
movq 0xe0(%rsp), %rdi
leaq 0xf0(%rsp), %rax
cmpq %rax, %rdi
je 0x950d
movq 0xf0(%rsp), %rsi
incq %rsi
callq 0x5240
addq $0x158, %rsp            # imm = 0x158
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x953d
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x5240
jmp 0x953d
movq %rax, %rbx
movq 0x60(%rsp), %rdi
cmpq %r12, %rdi
je 0x9559
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x5240
jmp 0x9559
movq %rax, %rbx
movq 0x40(%rsp), %rdi
cmpq %r15, %rdi
je 0x9575
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x5240
jmp 0x9575
movq %rax, %rbx
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x96a9
movq 0x30(%rsp), %rsi
jmp 0x96a1
jmp 0x9599
jmp 0x9599
jmp 0x9599
jmp 0x9599
movq %rax, %rbx
jmp 0x96a9
movq %rax, %rbx
jmp 0x9684
movq %rax, %rbx
jmp 0x965f
movq %rax, %rbx
jmp 0x963a
movq %rax, %rbx
jmp 0x961e
movq %rax, %rbx
jmp 0x9602
movq %rax, %rbx
jmp 0x95e6
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x95e6
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x5240
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x9602
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x5240
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x961e
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x5240
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x963a
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x5240
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x965f
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x5240
movq 0xa0(%rsp), %rdi
leaq 0xb0(%rsp), %rax
cmpq %rax, %rdi
je 0x9684
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x5240
movq 0xc0(%rsp), %rdi
leaq 0xd0(%rsp), %rax
cmpq %rax, %rdi
je 0x96a9
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x5240
leaq 0xe0(%rsp), %rdi
callq 0x11ce4
movq %rbx, %rdi
callq 0x54c0