// File: /workspace/github_cpp_makefile_star2_O1/lhydave[P]SysYCompilerLab/back/no_alloc.cpp
// Function: no_alloc::gen_call(std::shared_ptr<eeyore_AST::call_node> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void gen_call(const shared_ptr<call_node> &stmt, const string &ret_store)
{
	// set parameters
	for (auto i = 0; i < stmt->params.size(); i++)
		gen_assign(param_prefix + to_string(i), stmt->params[i]);
	// call it!
	tigger_dst << emit_call(stmt->func_name);
	if (!ret_store.empty()) // assign
		tigger_dst << emit_exp_assign(ret_store, ret_reg);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, 0x40(%rsp)
movq (%rdi), %rsi
movq 0x58(%rsi), %rax
cmpq 0x50(%rsi), %rax
je 0x20651
movq %rdi, %r14
leaq 0x10(%rsp), %r13
xorl %r15d, %r15d
leaq 0x20(%rsp), %r12
movl $0xd1b71759, %ebx       # imm = 0xD1B71759
movl $0x1, %ebp
cmpq $0xa, %r15
jb 0x2056b
movl $0x4, %ebp
movl %r15d, %eax
cmpl $0x63, %eax
jbe 0x20564
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0x20569
cmpl $0x2710, %eax           # imm = 0x2710
jb 0x2056b
movl %eax, %ecx
imulq %rbx, %rcx
shrq $0x2d, %rcx
addl $0x4, %ebp
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0x20536
addl $-0x3, %ebp
jmp 0x2056b
addl $-0x2, %ebp
jmp 0x2056b
decl %ebp
movl %ebp, %esi
leaq 0x30(%rsp), %rax
movq %rax, 0x20(%rsp)
movq %r12, %rdi
movl $0x2d, %edx
callq 0x52b0
movq 0x20(%rsp), %rdi
movl %ebp, %esi
movl %r15d, %edx
callq 0x1230e
movq 0x15436(%rip), %rcx     # 0x359d0
movq 0x15437(%rip), %r8      # 0x359d8
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5290
movq %r13, (%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x205ce
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x205d6
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 (%r14), %rax
movq %r15, %rsi
shlq $0x4, %rsi
addq 0x50(%rax), %rsi
movq %rsp, %rdi
callq 0x2074c
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x2061a
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x5240
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x20636
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x5240
incq %r15
movq (%r14), %rsi
movq 0x58(%rsi), %rax
subq 0x50(%rsi), %rax
sarq $0x4, %rax
cmpq %r15, %rax
ja 0x20523
addq $0x68, %rsi
movq %rsp, %r14
movq %r14, %rdi
callq 0x1cd39
movq (%r14), %rsi
movq 0x8(%r14), %rdx
leaq 0x14d8a(%rip), %rdi     # 0x353f8
callq 0x52a0
leaq 0x10(%rsp), %rbx
movq -0x10(%rbx), %rdi
cmpq %rbx, %rdi
je 0x2068e
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x5240
movq 0x40(%rsp), %rsi
cmpq $0x0, 0x8(%rsi)
je 0x206d5
leaq 0x1536f(%rip), %rdx     # 0x35a10
movq %rsp, %r14
movq %r14, %rdi
callq 0x1c354
movq (%r14), %rsi
movq 0x8(%r14), %rdx
leaq 0x14d3e(%rip), %rdi     # 0x353f8
callq 0x52a0
movq (%rsp), %rdi
cmpq %rbx, %rdi
je 0x206d5
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x5240
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rsp), %rdi
cmpq %rbx, %rdi
jne 0x20703
jmp 0x20744
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x20744
movq 0x10(%rsp), %rsi
jmp 0x2073c
movq %rax, %r14
jmp 0x20728
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x20728
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x5240
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x20744
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x5240
movq %r14, %rdi
callq 0x54c0