// File: /workspace/github_cpp_makefile_star2_O2/lhydave[P]SysYCompilerLab/front/node.cpp
// Function: sysY_AST::func_call_exp_node::func_call_exp_node(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, sysY_AST::exp_node*)
func_call_exp_node::func_call_exp_node(
	const string &func_name, exp_node *first_param) :
	exp_node(EXP_FUNC_CALL)
{
	sysy_func_name = func_name;
	// tackle marcos
	if (sysy_func_name == "starttime" || sysy_func_name == "stoptime")
	{
		sysy_func_name = "_sysy_" + sysy_func_name;
		if (first_param)
		{
			string msg =
				"too many arguments provided to function-like macro '" +
				func_name + "'";
			yyerror(msg.c_str());
		}
		first_param = new exp_node(EXP_NUM, "", yylineno);
	}
	dbg_printf("func call to %s \n", sysy_func_name.c_str());
	while (first_param)
	{
		params.push_back(first_param);
		first_param = first_param->next;
	}
	check_valid();
	reduce();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbx
movq %rdx, (%rsp)
leaq 0x14110(%rip), %rsi     # 0x1f91c
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rdx
callq 0x68d2
pushq $0x3
popq %rsi
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xa466
leaq 0x8(%rsp), %rdi
callq 0x5548
leaq 0x21d94(%rip), %rax     # 0x2d5d8
movq %rax, (%rbx)
leaq 0xa0(%rbx), %r14
xorps %xmm0, %xmm0
andq $0x0, 0xb0(%rbx)
movups %xmm0, 0xa0(%rbx)
leaq 0xb8(%rbx), %r15
leaq 0xc8(%rbx), %rax
movq %rax, 0xb8(%rbx)
andq $0x0, 0xc0(%rbx)
movb $0x0, 0xc8(%rbx)
movq %r15, %rdi
movq %r13, %rsi
callq 0x5150
leaq 0x13619(%rip), %rsi     # 0x1eeaf
movq %r15, %rdi
callq 0xc8ce
testb %al, %al
jne 0xb8b9
leaq 0x13616(%rip), %rsi     # 0x1eebf
movq %r15, %rdi
callq 0xc8ce
testb %al, %al
je 0xb98d
leaq 0x132b3(%rip), %rsi     # 0x1eb73
leaq 0x8(%rsp), %rdi
movq %r15, %rdx
callq 0xc598
leaq 0x8(%rsp), %rbp
movq %r15, %rdi
movq %rbp, %rsi
callq 0x5300
movq %rbp, %rdi
callq 0x5548
testq %r12, %r12
je 0xb93d
leaq 0x13289(%rip), %rsi     # 0x1eb7a
leaq 0x28(%rsp), %rdi
movq %r13, %rdx
callq 0xc598
leaq 0x130c5(%rip), %rdx     # 0x1e9ca
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0xc579
leaq 0x28(%rsp), %rdi
callq 0x5548
leaq 0x8(%rsp), %r12
movq (%r12), %rdi
leaq 0x2298a(%rip), %rax     # 0x2e2b8
movl (%rax), %esi
callq 0x79c8
movq %r12, %rdi
callq 0x5548
movl $0xa0, %edi
callq 0x5240
movq %rax, %r12
leaq 0x13fcb(%rip), %rsi     # 0x1f91c
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rdx
callq 0x68d2
leaq 0x22951(%rip), %rax     # 0x2e2b8
movl (%rax), %ecx
pushq $0x2
popq %rsi
leaq 0x8(%rsp), %rdx
movq %r12, %rdi
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xa466
movq %r12, (%rsp)
leaq 0x8(%rsp), %rdi
callq 0x5548
movq %rsp, %r13
testq %r12, %r12
je 0xb9ae
movq %r14, %rdi
movq %r13, %rsi
callq 0xc754
movq (%rsp), %rax
movq 0x40(%rax), %r12
movq %r12, (%rsp)
jmp 0xb990
movq %rbx, %rdi
callq 0xba3c
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x18(%rax)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r13
leaq 0x28(%rsp), %rdi
callq 0x5548
jmp 0xba1b
jmp 0xba18
movq %rax, %r13
leaq 0x8(%rsp), %rdi
callq 0x5548
jmp 0xb9f1
movq %rax, %r13
movl $0xa0, %esi
movq %r12, %rdi
callq 0x5260
jmp 0xba1b
jmp 0xba18
movq %rax, %r13
leaq 0x8(%rsp), %rdi
callq 0x5548
jmp 0xba33
movq %rax, %r13
jmp 0xba33
jmp 0xba18
movq %rax, %r13
movq %r15, %rdi
callq 0x5548
movq %r14, %rdi
callq 0xcbde
movq %rbx, %rdi
callq 0xc984
movq %r13, %rdi
callq 0x54c0
nop