// File: /workspace/github_cpp_makefile_star2_O3/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 0x205da
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 0x204f4
movl $0x4, %ebp
movl %r15d, %eax
cmpl $0x63, %eax
jbe 0x204ed
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0x204f2
cmpl $0x2710, %eax           # imm = 0x2710
jb 0x204f4
movl %eax, %ecx
imulq %rbx, %rcx
shrq $0x2d, %rcx
addl $0x4, %ebp
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0x204bf
addl $-0x3, %ebp
jmp 0x204f4
addl $-0x2, %ebp
jmp 0x204f4
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 0x1205c
movq 0x154ad(%rip), %rcx     # 0x359d0
movq 0x154ae(%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 0x20557
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x2055f
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 0x206d5
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x205a3
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x5240
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x205bf
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 0x204ac
addq $0x68, %rsi
movq %rsp, %r14
movq %r14, %rdi
callq 0x1cd20
movq (%r14), %rsi
movq 0x8(%r14), %rdx
leaq 0x14e01(%rip), %rdi     # 0x353f8
callq 0x52a0
leaq 0x10(%rsp), %rbx
movq -0x10(%rbx), %rdi
cmpq %rbx, %rdi
je 0x20617
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x5240
movq 0x40(%rsp), %rsi
cmpq $0x0, 0x8(%rsi)
je 0x2065e
leaq 0x153e6(%rip), %rdx     # 0x35a10
movq %rsp, %r14
movq %r14, %rdi
callq 0x1c338
movq (%r14), %rsi
movq 0x8(%r14), %rdx
leaq 0x14db5(%rip), %rdi     # 0x353f8
callq 0x52a0
movq (%rsp), %rdi
cmpq %rbx, %rdi
je 0x2065e
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 0x2068c
jmp 0x206cd
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x206cd
movq 0x10(%rsp), %rsi
jmp 0x206c5
movq %rax, %r14
jmp 0x206b1
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x206b1
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x5240
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x206cd
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x5240
movq %r14, %rdi
callq 0x54c0