// File: /workspace/github_cpp_makefile_star2_O1/lhydave[P]SysYCompilerLab/back/no_alloc.cpp
// Function: no_alloc::gen_array(std::shared_ptr<eeyore_AST::op_node> const&, int, int)
void gen_array(const shared_ptr<op_node> &temp, int tempid1, int tempid2)
{
	dbg_printf("gen array begin...\n");
	auto base = std::static_pointer_cast<var_node>(temp->left);
	auto temp1 = temp_prefix + to_string(tempid1);
	auto temp2 = temp_prefix + to_string(tempid2);
	if (is_global(base->eeyore_name)) // global
		tigger_dst << emit_loadaddr(
			global_prefix + to_string(global_var2no[base->eeyore_name]), temp1);
	else if (!is_param(base->eeyore_name) &&
		now_func.temps[base->eeyore_name].is_array) // array
		tigger_dst << emit_loadaddr(var2no[base->eeyore_name], temp1);
	else // variable or param
		tigger_dst << emit_load(var2no[base->eeyore_name], temp1);
	auto shift = alloc_temp_reg(temp->right, tempid2);
	tigger_dst << emit_exp_assign(temp1, temp1 + " + " + temp2);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movl %edx, %ebp
movl %esi, %r12d
movq %rdi, %r14
movq (%rdi), %rax
movq 0x30(%rax), %r15
movq 0x38(%rax), %rsi
testq %rsi, %rsi
je 0x2163e
movq 0x139a0(%rip), %rax     # 0x34fd0
cmpb $0x0, (%rax)
je 0x2163a
incl 0x8(%rsi)
jmp 0x2163e
lock
incl 0x8(%rsi)
movl %r12d, %r13d
negl %r13d
cmovsl %r12d, %r13d
movl $0x1, %ebx
cmpl $0xa, %r13d
jb 0x21698
movl $0x4, %ebx
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %r13d, %ecx
cmpl $0x63, %ecx
jbe 0x21691
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x21696
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x21698
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %ebx
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x21660
addl $-0x3, %ebx
jmp 0x21698
addl $-0x2, %ebx
jmp 0x21698
decl %ebx
movq %rsi, 0x60(%rsp)
shrl $0x1f, %r12d
leal (%rbx,%r12), %esi
leaq 0x30(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x20(%rsp), %rdi
movl $0x2d, %edx
callq 0x52b0
movl %r12d, %edi
leaq 0x20(%rsp), %r12
addq (%r12), %rdi
movl %ebx, %esi
movl %r13d, %edx
callq 0x1230e
movq 0x14376(%rip), %rcx     # 0x35a50
movq 0x14377(%rip), %r8      # 0x35a58
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5290
leaq 0x78(%rsp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
leaq 0x30(%rsp), %r8
je 0x21719
movq %rdx, 0x68(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x78(%rsp)
jmp 0x2171f
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x70(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x20(%rsp), %rdi
cmpq %r8, %rdi
je 0x2174e
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x5240
movl %ebp, %r12d
negl %r12d
cmovsl %ebp, %r12d
movl $0x1, %ebx
cmpl $0xa, %r12d
jb 0x217a8
movl $0x4, %ebx
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %r12d, %ecx
cmpl $0x63, %ecx
jbe 0x217a1
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x217a6
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x217a8
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %ebx
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x21770
addl $-0x3, %ebx
jmp 0x217a8
addl $-0x2, %ebx
jmp 0x217a8
decl %ebx
movl %ebp, %r13d
shrl $0x1f, %r13d
leal (%rbx,%r13), %esi
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
movq %rsp, %rdi
movl $0x2d, %edx
callq 0x52b0
movl %r13d, %edi
movq %rsp, %r13
addq (%r13), %rdi
movl %ebx, %esi
movl %r12d, %edx
callq 0x1230e
movq 0x1426c(%rip), %rcx     # 0x35a50
movq 0x1426d(%rip), %r8      # 0x35a58
movq %r13, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5290
leaq 0x30(%rsp), %r12
movq %r12, 0x20(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
leaq 0x10(%rsp), %r13
je 0x21824
movq %rdx, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
jmp 0x2182c
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rdx, 0x28(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x2185a
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x5240
addq $0x50, %r15
movq %r15, %rdi
callq 0x16830
testb %al, %al
je 0x218e2
leaq 0x14277(%rip), %rdi     # 0x35ae8
movq %r15, %rsi
callq 0x231ea
movl (%rax), %r15d
movl %r15d, %r12d
negl %r12d
cmovsl %r15d, %r12d
movl $0x1, %ebx
cmpl $0xa, %r12d
jb 0x21989
movl $0x4, %ebx
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %r12d, %ecx
cmpl $0x63, %ecx
jbe 0x21982
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x21987
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x21989
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %ebx
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x218a2
addl $-0x3, %ebx
jmp 0x21989
movq %r15, %rdi
callq 0x168c2
testb %al, %al
jne 0x21938
leaq 0x1419b(%rip), %rdi     # 0x35a90
movq %r15, %rsi
callq 0x18d04
cmpb $0x1, 0x24(%rax)
jne 0x21938
leaq 0x14216(%rip), %rdi     # 0x35b20
movq %r15, %rsi
callq 0x231ea
movl (%rax), %esi
movq %rsp, %rdi
leaq 0x68(%rsp), %rdx
callq 0x1db94
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
leaq 0x13ac7(%rip), %rdi     # 0x353f8
callq 0x52a0
jmp 0x2196b
leaq 0x141e1(%rip), %rdi     # 0x35b20
movq %r15, %rsi
callq 0x231ea
movl (%rax), %esi
movq %rsp, %rdi
leaq 0x68(%rsp), %rdx
callq 0x1d4fe
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
leaq 0x13a92(%rip), %rdi     # 0x353f8
callq 0x52a0
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x21aa9
movq 0x10(%rsp), %rsi
jmp 0x21aa1
addl $-0x2, %ebx
jmp 0x21989
decl %ebx
shrl $0x1f, %r15d
leal (%rbx,%r15), %esi
leaq 0x50(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x40(%rsp), %rdi
movl $0x2d, %edx
callq 0x52b0
leaq 0x40(%rsp), %r13
addq (%r13), %r15
movq %r15, %rdi
movl %ebx, %esi
movl %r12d, %edx
callq 0x1230e
movq 0x13fea(%rip), %rcx     # 0x359b0
movq 0x13feb(%rip), %r8      # 0x359b8
movq %r13, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5290
leaq 0x98(%rsp), %rbx
movq %rbx, -0x10(%rbx)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
leaq 0x10(%rsp), %r13
je 0x21a0e
movq %rdx, 0x88(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x98(%rsp)
jmp 0x21a14
movups (%rcx), %xmm0
movups %xmm0, (%rbx)
leaq 0x30(%rsp), %r12
movq 0x8(%rax), %rdx
leaq 0x88(%rsp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %rsp, %rdi
leaq 0x68(%rsp), %rdx
callq 0x1d932
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
leaq 0x139a3(%rip), %rdi     # 0x353f8
callq 0x52a0
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x21a70
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x5240
movq 0x88(%rsp), %rdi
cmpq %rbx, %rdi
je 0x21a8d
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x5240
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x21aa9
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x5240
movq (%r14), %rsi
addq $0x40, %rsi
movq %rsp, %rdi
movl %ebp, %edx
callq 0x20e25
leaq 0xb8(%rsp), %rbx
movq %rbx, -0x10(%rbx)
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdx
addq %rsi, %rdx
leaq 0xa8(%rsp), %rdi
callq 0x124aa
leaq 0x706d(%rip), %rsi      # 0x28b54
leaq 0xa8(%rsp), %rdi
callq 0x5510
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
leaq 0xa8(%rsp), %rdi
callq 0x50c0
leaq 0x50(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x21b32
movq %rdx, 0x40(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x50(%rsp)
jmp 0x21b39
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rsi
leaq 0x40(%rsp), %rdx
movq %rsi, 0x8(%rdx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x88(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x1c354
movq 0x88(%rsp), %rsi
movq 0x90(%rsp), %rdx
leaq 0x1387a(%rip), %rdi     # 0x353f8
callq 0x52a0
leaq 0x98(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x21ba4
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x5240
movq 0x40(%rsp), %rdi
cmpq %r15, %rdi
je 0x21bbb
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x5240
movq 0xa8(%rsp), %rdi
cmpq %rbx, %rdi
je 0x21bd8
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x5240
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x21bee
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x5240
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0x21c05
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x5240
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x21c21
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x5240
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x21c30
callq 0x18722
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x21c49
jmp 0x21d85
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r13, %rdi
jne 0x21d37
jmp 0x21d88
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x21c7c
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x5240
jmp 0x21c7c
movq %rax, %r14
movq 0x88(%rsp), %rdi
cmpq %rbx, %rdi
je 0x21c9e
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x5240
jmp 0x21c9e
movq %rax, %r14
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x21d88
movq 0x50(%rsp), %rsi
jmp 0x21d3c
jmp 0x21d85
movq %rax, %r14
leaq 0x98(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x21ce9
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x5240
jmp 0x21ce9
movq %rax, %r14
movq 0x40(%rsp), %rdi
cmpq %r15, %rdi
je 0x21d07
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x5240
jmp 0x21d07
jmp 0x21d04
movq %rax, %r14
movq 0xa8(%rsp), %rdi
cmpq %rbx, %rdi
je 0x21d29
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x5240
jmp 0x21d29
movq %rax, %r14
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x21d88
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x5240
jmp 0x21d88
jmp 0x21d85
jmp 0x21d85
movq %rax, %r14
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x21da4
movq 0x10(%rsp), %rsi
jmp 0x21d9c
movq %rax, %r14
jmp 0x21da4
movq %rax, %r14
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x21dc0
movq 0x30(%rsp), %rsi
jmp 0x21db8
movq %rax, %r14
jmp 0x21dc0
movq %rax, %r14
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x21da4
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x5240
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x21dc0
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x5240
cmpq $0x0, 0x60(%rsp)
je 0x21dd2
movq 0x60(%rsp), %rdi
callq 0x18722
movq %r14, %rdi
callq 0x54c0