// File: /workspace/github_cpp_makefile_star2_O1/lhydave[P]SysYCompilerLab/back/no_alloc.cpp
// Function: no_alloc::gen_assign(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::shared_ptr<eeyore_AST::op_node> const&)
void gen_assign(const string &lval, const shared_ptr<op_node> &rval)
{
	if (rval->exp_type == EXP_NUM) // number!
	{
		auto rnum = std::static_pointer_cast<num_node>(rval);
		tigger_dst << emit_exp_assign(lval, to_string(rnum->val));
		return;
	}
	if (rval->exp_type == EXP_VAR) // variable!
	{
		auto rreg = alloc_temp_reg(rval, 2);
		tigger_dst << emit_exp_assign(lval, rreg);
		return;
	}
	if (rval->exp_type == EXP_ARRAY) // array!
	{
		gen_array(rval, 2, 3);
		string right = temp_prefix + to_string(2) + "[0]";
		tigger_dst << emit_exp_assign(lval, right);
		return;
	}
	if (rval->exp_type == EXP_CALL) // call!
	{
		gen_call(std::static_pointer_cast<call_node>(rval), lval);
		return;
	}
	if (!rval->right) // unary operator
	{
		gen_unary(rval, 2);
		tigger_dst << emit_exp_assign(lval, temp_prefix + to_string(2));
		return;
	}
	// binary operator
	gen_binary(rval, 2, 3);
	tigger_dst << emit_exp_assign(lval, temp_prefix + to_string(2));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdi, %rbx
movq (%rsi), %rax
movl 0x8(%rax), %ecx
decl %ecx
cmpl $0x4, %ecx
ja 0x208bd
leaq 0x8fcf(%rip), %rdx      # 0x29744
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
leaq 0x28(%rsp), %r14
movq %r14, %rdi
movl $0x2, %edx
callq 0x20e25
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x1c354
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
leaq 0x14c47(%rip), %rdi     # 0x353f8
callq 0x52a0
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x207d1
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x5240
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x20ab5
jmp 0x20cdc
movq 0x8(%rsi), %r14
testq %r14, %r14
je 0x20ac4
movq 0x147d4(%rip), %rcx     # 0x34fd0
cmpb $0x0, (%rcx)
je 0x20abf
incl 0x8(%r14)
jmp 0x20ac4
movq %rsi, %rdi
movl $0x2, %esi
movl $0x3, %edx
callq 0x21600
leaq 0x58(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x48(%rsp), %r14
movl $0x1, %esi
movq %r14, %rdi
movl $0x2d, %edx
callq 0x52b0
movq (%r14), %rax
movb $0x32, (%rax)
movq 0x15203(%rip), %rcx     # 0x35a50
movq 0x15204(%rip), %r8      # 0x35a58
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5290
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x209c3
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x209ca
movq %rax, 0x28(%rsp)
movq 0x8(%rsi), %rax
movq %rax, 0x30(%rsp)
testq %rax, %rax
je 0x20b33
movq 0x14724(%rip), %rcx     # 0x34fd0
cmpb $0x0, (%rcx)
je 0x20b2f
incl 0x8(%rax)
jmp 0x20b33
cmpq $0x0, 0x40(%rax)
je 0x20948
movq %rsi, %rdi
movl $0x2, %esi
movl $0x3, %edx
callq 0x22604
leaq 0x58(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x48(%rsp), %r14
movl $0x1, %esi
movq %r14, %rdi
movl $0x2d, %edx
callq 0x52b0
movq (%r14), %rax
movb $0x32, (%rax)
movq 0x15149(%rip), %rcx     # 0x35a50
movq 0x1514a(%rip), %r8      # 0x35a58
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5290
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x20b53
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x20b5a
movq %rsi, %rdi
movl $0x2, %esi
callq 0x224e7
leaq 0x58(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x48(%rsp), %r14
movl $0x1, %esi
movq %r14, %rdi
movl $0x2d, %edx
callq 0x52b0
movq (%r14), %rax
movb $0x32, (%rax)
movq 0x150ce(%rip), %rcx     # 0x35a50
movq 0x150cf(%rip), %r8      # 0x35a58
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5290
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x20b9b
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x20ba2
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
leaq 0x8(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x8d6b(%rip), %rsi      # 0x29758
callq 0x5510
leaq 0x38(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x20a1a
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x20a22
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rdx, 0x30(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x20a51
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x5240
movq 0x48(%rsp), %rdi
cmpq %r15, %rdi
je 0x20a68
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x5240
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rdx
movq %rbx, %rsi
callq 0x1c354
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
leaq 0x1496d(%rip), %rdi     # 0x353f8
callq 0x52a0
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x20aa7
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x5240
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x20cdc
movq 0x38(%rsp), %rsi
jmp 0x20c26
lock
incl 0x8(%r14)
movl 0x50(%rax), %r15d
movl %r15d, %ebp
negl %ebp
cmovsl %r15d, %ebp
movl $0x1, %r12d
cmpl $0xa, %ebp
jb 0x20c3c
movl $0x4, %r12d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %ebp, %ecx
cmpl $0x63, %ecx
jbe 0x20c33
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x20c39
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x20c3c
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r12d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x20aed
addl $-0x3, %r12d
jmp 0x20c3c
lock
incl 0x8(%rax)
leaq 0x28(%rsp), %rdi
movq %rbx, %rsi
callq 0x204ea
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
jne 0x20cd7
jmp 0x20cdc
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rsi
leaq 0x8(%rsp), %rdx
movq %rsi, 0x8(%rdx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x28(%rsp), %rdi
movq %rbx, %rsi
callq 0x1c354
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
leaq 0x14864(%rip), %rdi     # 0x353f8
callq 0x52a0
jmp 0x20be1
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rsi
leaq 0x8(%rsp), %rdx
movq %rsi, 0x8(%rdx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x28(%rsp), %rdi
movq %rbx, %rsi
callq 0x1c354
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
leaq 0x1481c(%rip), %rdi     # 0x353f8
callq 0x52a0
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x20bfc
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x5240
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x20c13
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x5240
movq 0x48(%rsp), %rdi
cmpq %r15, %rdi
je 0x20cdc
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x5240
jmp 0x20cdc
addl $-0x2, %r12d
jmp 0x20c3c
decl %r12d
shrl $0x1f, %r15d
leal (%r12,%r15), %esi
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x8(%rsp), %rdi
movl $0x2d, %edx
callq 0x52b0
leaq 0x8(%rsp), %r13
addq (%r13), %r15
movq %r15, %rdi
movl %r12d, %esi
movl %ebp, %edx
callq 0x1230e
leaq 0x28(%rsp), %rdi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x1c354
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
leaq 0x14765(%rip), %rdi     # 0x353f8
callq 0x52a0
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x20cb3
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x5240
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x20ccf
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x5240
testq %r14, %r14
je 0x20cdc
movq %r14, %rdi
callq 0x18722
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x20cf4
jmp 0x20d6d
jmp 0x20dd9
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x20d70
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x5240
jmp 0x20d70
jmp 0x20d6d
jmp 0x20dd9
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x20d3a
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x5240
jmp 0x20d3a
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
jne 0x20dfe
jmp 0x20e1d
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x20dac
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x5240
jmp 0x20dac
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x20ddc
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x5240
jmp 0x20ddc
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x20df0
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x5240
jmp 0x20df0
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x20e10
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x5240
jmp 0x20e10
movq %rax, %rbx
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
jne 0x20e18
jmp 0x20e1d
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r15, %rdi
je 0x20e1d
movq 0x58(%rsp), %rsi
jmp 0x20e03
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x20e1d
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x5240
jmp 0x20e1d
movq %rax, %rbx
testq %r14, %r14
je 0x20e1d
movq %r14, %rdi
callq 0x18722
movq %rbx, %rdi
callq 0x54c0