// File: /workspace/github_cpp_makefile_star2_O3/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 0x215c7
movq 0x13a17(%rip), %rax     # 0x34fd0
cmpb $0x0, (%rax)
je 0x215c3
incl 0x8(%rsi)
jmp 0x215c7
lock
incl 0x8(%rsi)
movl %r12d, %r13d
negl %r13d
cmovsl %r12d, %r13d
movl $0x1, %ebx
cmpl $0xa, %r13d
jb 0x21621
movl $0x4, %ebx
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %r13d, %ecx
cmpl $0x63, %ecx
jbe 0x2161a
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x2161f
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x21621
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %ebx
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x215e9
addl $-0x3, %ebx
jmp 0x21621
addl $-0x2, %ebx
jmp 0x21621
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 0x1205c
movq 0x143ed(%rip), %rcx     # 0x35a50
movq 0x143ee(%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 0x216a2
movq %rdx, 0x68(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x78(%rsp)
jmp 0x216a8
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 0x216d7
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x5240
movl %ebp, %r12d
negl %r12d
cmovsl %ebp, %r12d
movl $0x1, %ebx
cmpl $0xa, %r12d
jb 0x21731
movl $0x4, %ebx
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %r12d, %ecx
cmpl $0x63, %ecx
jbe 0x2172a
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x2172f
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x21731
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %ebx
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x216f9
addl $-0x3, %ebx
jmp 0x21731
addl $-0x2, %ebx
jmp 0x21731
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 0x1205c
movq 0x142e3(%rip), %rcx     # 0x35a50
movq 0x142e4(%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 0x217ad
movq %rdx, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
jmp 0x217b5
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 0x217e3
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x5240
addq $0x50, %r15
movq %r15, %rdi
callq 0x16a6c
testb %al, %al
je 0x2186b
leaq 0x142ee(%rip), %rdi     # 0x35ae8
movq %r15, %rsi
callq 0x2318c
movl (%rax), %r15d
movl %r15d, %r12d
negl %r12d
cmovsl %r15d, %r12d
movl $0x1, %ebx
cmpl $0xa, %r12d
jb 0x21912
movl $0x4, %ebx
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %r12d, %ecx
cmpl $0x63, %ecx
jbe 0x2190b
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x21910
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x21912
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %ebx
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x2182b
addl $-0x3, %ebx
jmp 0x21912
movq %r15, %rdi
callq 0x16afe
testb %al, %al
jne 0x218c1
leaq 0x14212(%rip), %rdi     # 0x35a90
movq %r15, %rsi
callq 0x18dca
cmpb $0x1, 0x24(%rax)
jne 0x218c1
leaq 0x1428d(%rip), %rdi     # 0x35b20
movq %r15, %rsi
callq 0x2318c
movl (%rax), %esi
movq %rsp, %rdi
leaq 0x68(%rsp), %rdx
callq 0x1db61
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
leaq 0x13b3e(%rip), %rdi     # 0x353f8
callq 0x52a0
jmp 0x218f4
leaq 0x14258(%rip), %rdi     # 0x35b20
movq %r15, %rsi
callq 0x2318c
movl (%rax), %esi
movq %rsp, %rdi
leaq 0x68(%rsp), %rdx
callq 0x1d4dc
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
leaq 0x13b09(%rip), %rdi     # 0x353f8
callq 0x52a0
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x21a32
movq 0x10(%rsp), %rsi
jmp 0x21a2a
addl $-0x2, %ebx
jmp 0x21912
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 0x1205c
movq 0x14061(%rip), %rcx     # 0x359b0
movq 0x14062(%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 0x21997
movq %rdx, 0x88(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x98(%rsp)
jmp 0x2199d
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 0x1d906
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
leaq 0x13a1a(%rip), %rdi     # 0x353f8
callq 0x52a0
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x219f9
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x5240
movq 0x88(%rsp), %rdi
cmpq %rbx, %rdi
je 0x21a16
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x5240
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x21a32
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x5240
movq (%r14), %rsi
addq $0x40, %rsi
movq %rsp, %rdi
movl %ebp, %edx
callq 0x20dae
leaq 0xb8(%rsp), %rbx
movq %rbx, -0x10(%rbx)
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdx
addq %rsi, %rdx
leaq 0xa8(%rsp), %rdi
callq 0x121f8
leaq 0x711b(%rip), %rsi      # 0x28b8b
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 0x21abb
movq %rdx, 0x40(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x50(%rsp)
jmp 0x21ac2
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 0x1c338
movq 0x88(%rsp), %rsi
movq 0x90(%rsp), %rdx
leaq 0x138f1(%rip), %rdi     # 0x353f8
callq 0x52a0
leaq 0x98(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x21b2d
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x5240
movq 0x40(%rsp), %rdi
cmpq %r15, %rdi
je 0x21b44
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x5240
movq 0xa8(%rsp), %rdi
cmpq %rbx, %rdi
je 0x21b61
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x5240
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x21b77
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x5240
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0x21b8e
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x5240
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x21baa
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x5240
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x21bb9
callq 0x18806
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x21bd2
jmp 0x21d0e
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r13, %rdi
jne 0x21cc0
jmp 0x21d11
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x21c05
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x5240
jmp 0x21c05
movq %rax, %r14
movq 0x88(%rsp), %rdi
cmpq %rbx, %rdi
je 0x21c27
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x5240
jmp 0x21c27
movq %rax, %r14
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x21d11
movq 0x50(%rsp), %rsi
jmp 0x21cc5
jmp 0x21d0e
movq %rax, %r14
leaq 0x98(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x21c72
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x5240
jmp 0x21c72
movq %rax, %r14
movq 0x40(%rsp), %rdi
cmpq %r15, %rdi
je 0x21c90
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x5240
jmp 0x21c90
jmp 0x21c8d
movq %rax, %r14
movq 0xa8(%rsp), %rdi
cmpq %rbx, %rdi
je 0x21cb2
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x5240
jmp 0x21cb2
movq %rax, %r14
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x21d11
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x5240
jmp 0x21d11
jmp 0x21d0e
jmp 0x21d0e
movq %rax, %r14
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x21d2d
movq 0x10(%rsp), %rsi
jmp 0x21d25
movq %rax, %r14
jmp 0x21d2d
movq %rax, %r14
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x21d49
movq 0x30(%rsp), %rsi
jmp 0x21d41
movq %rax, %r14
jmp 0x21d49
movq %rax, %r14
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x21d2d
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x5240
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x21d49
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x5240
cmpq $0x0, 0x60(%rsp)
je 0x21d5b
movq 0x60(%rsp), %rdi
callq 0x18806
movq %r14, %rdi
callq 0x54c0