// File: /workspace/github_cpp_makefile_star2_O1/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 0x969b
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 0x14f6c
leaq 0x2c40c(%rip), %rax     # 0x353d8
cmpl $0x0, (%rax)
je 0x9428
movq 0x88(%rbx), %rax
cmpq 0x90(%rbx), %rax
je 0x9617
cmpb $0x1, 0x6a(%rbx)
jne 0x9467
movq 0x88(%rbx), %rax
cmpq %rax, 0x90(%rbx)
je 0x9617
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 0x20896(%rip), %rsi     # 0x298d8
leaq 0xe0(%rsp), %rdx
callq 0x11eb4
movq %rbp, %rdi
leaq 0x202fe(%rip), %rsi     # 0x29357
callq 0x5510
movq %r13, 0xa0(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x908a
movq %rdx, 0xa0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xb0(%rsp)
jmp 0x9092
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)
leaq (,%r12,4), %rbp
movl $0x1, %r13d
cmpq $0xa, %rbp
jb 0x9102
movl $0x4, %r13d
movl %ebp, %eax
cmpl $0x63, %eax
jbe 0x90f9
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0x90ff
cmpl $0x2710, %eax           # imm = 0x2710
jb 0x9102
movl %eax, %ecx
imulq %r15, %rcx
shrq $0x2d, %rcx
addl $0x4, %r13d
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0x90c9
addl $-0x3, %r13d
jmp 0x9102
addl $-0x2, %r13d
jmp 0x9102
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 0x1230e
movq 0xa0(%rsp), %rcx
movl $0xf, %esi
leaq 0xb0(%rsp), %r13
cmpq %r13, %rcx
je 0x915b
movq 0xb0(%rsp), %rsi
movq 0xa8(%rsp), %r8
movq 0x88(%rsp), %rdx
leaq (%rdx,%r8), %rax
cmpq %rsi, %rax
leaq 0x30(%rsp), %rbp
jbe 0x919d
movl $0xf, %esi
leaq 0x90(%rsp), %rdi
cmpq %rdi, 0x80(%rsp)
je 0x9198
movq 0x90(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x91b4
movq 0x80(%rsp), %rsi
leaq 0xa0(%rsp), %rdi
callq 0x50c0
jmp 0x91c5
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 0x91e5
movq %rdx, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
jmp 0x91ec
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 0x1f715(%rip), %rsi     # 0x2892a
callq 0x5510
leaq 0x50(%rsp), %rsi
movq %rsi, 0x40(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x9242
movq %rdx, 0x40(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x50(%rsp)
jmp 0x9248
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 0x92a5
movq %rdx, 0x60(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x70(%rsp)
jmp 0x92ab
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 0x1f70d(%rip), %rsi     # 0x289dc
callq 0x5510
leaq 0x10(%rsp), %rsi
movq %rsi, (%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x92fa
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x9300
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 0x9344
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x5240
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x9360
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x5240
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x937c
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x5240
movq 0x20(%rsp), %rdi
cmpq %rbp, %rdi
je 0x9393
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x5240
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
leaq 0xc0(%rsp), %rbp
je 0x93c0
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x5240
movq 0xa0(%rsp), %rdi
cmpq %r13, %rdi
je 0x93dd
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x5240
movq 0xc0(%rsp), %rdi
leaq 0xd0(%rsp), %rax
cmpq %rax, %rdi
je 0x9402
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 0x9024
jmp 0x9617
movq %rsp, %rdi
leaq 0xe0(%rsp), %rsi
xorl %edx, %edx
callq 0x984c
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 0x9617
movq 0x10(%rsp), %rsi
jmp 0x960f
movq (%rax), %rax
leaq 0x18(%rbx), %r14
movq 0x18(%rax), %rsi
movq 0x20(%rax), %rdx
movq %r14, %rdi
callq 0x50c0
leaq 0x20453(%rip), %rsi     # 0x298d8
leaq 0x20(%rsp), %rdi
leaq 0xe0(%rsp), %rdx
callq 0x11eb4
leaq 0x1f48d(%rip), %rsi     # 0x2892b
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 0x94cf
movq %rdx, 0x40(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x50(%rsp)
jmp 0x94d6
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 0x9531
movq %rdx, 0x60(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x70(%rsp)
jmp 0x9539
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 0x1f480(%rip), %rsi     # 0x289dc
callq 0x5510
leaq 0x10(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x9587
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x958f
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 0x95ce
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x5240
movq 0x60(%rsp), %rdi
cmpq %r12, %rdi
je 0x95e5
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x5240
movq 0x40(%rsp), %rdi
cmpq %r15, %rdi
je 0x95fc
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x5240
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9617
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x5240
movq 0x140(%rsp), %rdi
testq %rdi, %rdi
je 0x9634
movq 0x150(%rsp), %rsi
subq %rdi, %rsi
callq 0x5240
movq 0x128(%rsp), %rdi
testq %rdi, %rdi
je 0x9651
movq 0x138(%rsp), %rsi
subq %rdi, %rsi
callq 0x5240
movq 0x100(%rsp), %rdi
leaq 0x110(%rsp), %rax
cmpq %rax, %rdi
je 0x9676
movq 0x110(%rsp), %rsi
incq %rsi
callq 0x5240
movq 0xe0(%rsp), %rdi
leaq 0xf0(%rsp), %rax
cmpq %rax, %rdi
je 0x969b
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 0x96cb
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x5240
jmp 0x96cb
movq %rax, %rbx
movq 0x60(%rsp), %rdi
cmpq %r12, %rdi
je 0x96e7
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x5240
jmp 0x96e7
movq %rax, %rbx
movq 0x40(%rsp), %rdi
cmpq %r15, %rdi
je 0x9703
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x5240
jmp 0x9703
movq %rax, %rbx
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9837
movq 0x30(%rsp), %rsi
jmp 0x982f
jmp 0x9727
jmp 0x9727
jmp 0x9727
jmp 0x9727
movq %rax, %rbx
jmp 0x9837
movq %rax, %rbx
jmp 0x9812
movq %rax, %rbx
jmp 0x97ed
movq %rax, %rbx
jmp 0x97c8
movq %rax, %rbx
jmp 0x97ac
movq %rax, %rbx
jmp 0x9790
movq %rax, %rbx
jmp 0x9774
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x9774
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x5240
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x9790
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x5240
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x97ac
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x5240
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x97c8
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x5240
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x97ed
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x5240
movq 0xa0(%rsp), %rdi
leaq 0xb0(%rsp), %rax
cmpq %rax, %rdi
je 0x9812
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x5240
movq 0xc0(%rsp), %rdi
leaq 0xd0(%rsp), %rax
cmpq %rax, %rdi
je 0x9837
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x5240
leaq 0xe0(%rsp), %rdi
callq 0x11f96
movq %rbx, %rdi
callq 0x54c0