// File: /workspace/github_c_makefile_star2_O2/Ihsoh[P]ilang/compiler/backend/semantics.c
// Function: stat_func_call
static ParserASTNode * _stat_func_call(
	ParserContext *ctx,
	ParserASTNode *node
) {
	assert(ctx);
	assert(node);
	assert(node->type == BE_NODE_STAT_FUNC_CALL);
	assert(node->nchilds == 2);

	ParserASTNode *node_func = node->childs[0];
	ParserASTNode *node_func_pointer_type = NULL;
	if (node_func->type == BE_NODE_IDENTIFIER) {
		ParserSymbol *symbol_func = _get_symbol_by_id_node(ctx, node_func);
		if (symbol_func->type == BE_SYM_FUNC) {
			node_func_pointer_type = BE_FUNC_SYMBOL_GET_FUNC_POINTER_TYPE_NODE(symbol_func);
		} else if (symbol_func->type == BE_SYM_VAR) {
			node_func_pointer_type = BE_VAR_SYMBOL_GET_TYPE_NODE(symbol_func);
		} else {
			_SYNERR_NODE(ctx, node_func, "must be a function or variable.");
		}
	} else if (node_func->type == BE_NODE_EXPR) {
		_expr_wrapper(ctx, node_func);
		node_func_pointer_type = BE_EXPR_AST_NODE_GET_TYPE_NODE(node_func);
	} else {
		assert(0);
	}
	if (node_func_pointer_type->type != BE_NODE_TYPE_POINTER
			|| node_func_pointer_type->childs[0]->type != BE_NODE_TYPE_FUNC) {
		_SYNERR_NODE(ctx, node_func, "must be function pointer type.");
	}
	ParserASTNode *node_func_type = node_func_pointer_type->childs[0];
	ParserASTNode *node_func_params = node_func_type->childs[0];

	ParserASTNode *node_func_call_params = node->childs[1];
	_check_fncall_params(ctx, node, node_func_params, node_func_call_params);

	if (node_func_type->nchilds == 1) {
		return _NODE_TYPE_VOID;
	} else if (node_func_type->nchilds == 2) {
		return node_func_type->childs[1];
	} else {
		assert(0);
		return NULL;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x428, %rsp            # imm = 0x428
movq %rdi, -0x30(%rbp)
testq %rsi, %rsi
je 0x31161
movq %rsi, %r14
cmpl $0xbd2, (%rsi)          # imm = 0xBD2
jne 0x31180
cmpl $0x2, 0x44(%r14)
jne 0x3119f
movq 0x48(%r14), %rax
movq (%rax), %r15
movl (%r15), %eax
cmpl $0xe00, %eax            # imm = 0xE00
je 0x30f17
cmpl $0x200, %eax            # imm = 0x200
jne 0x311fc
movq -0x30(%rbp), %rdi
movq %r15, %rsi
callq 0x30ba0
movl (%rax), %ecx
cmpl $0x1, %ecx
je 0x30f29
cmpl $0x3, %ecx
jne 0x30f2f
movq 0x48(%rax), %r12
jmp 0x30f58
movq -0x30(%rbp), %rdi
movq %r15, %rsi
callq 0x2b0cf
movq 0x68(%r15), %r12
jmp 0x30f58
movq 0x38(%rax), %r12
jmp 0x30f58
movups 0x1ab7f(%rip), %xmm0    # 0x4bab5
leaq -0x450(%rbp), %rdx
movaps %xmm0, 0x10(%rdx)
movups 0x1ab5d(%rip), %xmm0    # 0x4baa5
movaps %xmm0, (%rdx)
movq -0x30(%rbp), %rdi
movq %r15, %rsi
callq *0x58(%rdi)
xorl %r12d, %r12d
cmpl $0x440, (%r12)          # imm = 0x440
jne 0x30f72
movq 0x48(%r12), %rax
movq (%rax), %rax
cmpl $0x430, (%rax)          # imm = 0x430
je 0x30fa0
movups 0x1ab5b(%rip), %xmm0    # 0x4bad4
leaq -0x450(%rbp), %rdx
movups %xmm0, 0xf(%rdx)
movups 0x1ab3a(%rip), %xmm0    # 0x4bac5
movaps %xmm0, (%rdx)
movq -0x30(%rbp), %rdi
movq %r15, %rsi
callq *0x58(%rdi)
movq 0x48(%r12), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq 0x48(%rax), %rax
movq (%rax), %rbx
testq %rbx, %rbx
je 0x311be
movq 0x48(%r14), %rax
movq 0x8(%rax), %r13
testq %r13, %r13
je 0x311dd
movl 0x44(%r13), %ecx
movl 0x44(%rbx), %eax
testl %eax, %eax
jle 0x30fef
movq 0x48(%rbx), %rdx
leal -0x1(%rax), %esi
movq (%rdx,%rsi,8), %rdx
cmpl $0xa03, (%rdx)          # imm = 0xA03
sete %dl
cmpl %esi, %ecx
setge %sil
testb %sil, %dl
jne 0x31029
cmpl %eax, %ecx
je 0x31029
movups 0x1ac01(%rip), %xmm0    # 0x4bbfb
leaq -0x450(%rbp), %rdx
movups %xmm0, 0x1b(%rdx)
movups 0x1abe4(%rip), %xmm0    # 0x4bbf0
movaps %xmm0, 0x10(%rdx)
movups 0x1abc9(%rip), %xmm0    # 0x4bbe0
movaps %xmm0, (%rdx)
movq -0x30(%rbp), %rdi
movq %r14, %rsi
callq *0x58(%rdi)
jmp 0x31129
xorl %r12d, %r12d
movq %r13, -0x40(%rbp)
cltq
cmpq %rax, %r12
jge 0x31120
movq %r14, %r15
movq 0x48(%rbx), %rax
movq (%rax,%r12,8), %r14
cmpl $0xa03, (%r14)          # imm = 0xA03
je 0x310cc
movq 0x48(%r13), %rax
movq (%rax,%r12,8), %rsi
movq -0x30(%rbp), %r13
movq %r13, %rdi
leaq -0x50(%rbp), %rdx
callq 0x309dc
movq -0x50(%rbp), %rdx
movq 0x48(%r14), %rax
movq 0x8(%rax), %rsi
movq %r13, %rdi
callq 0x2b159
testb %al, %al
movq %r15, %r14
jne 0x310bd
movups 0x1aafa(%rip), %xmm0    # 0x4bb83
movups %xmm0, -0x435(%rbp)
movups 0x1aae1(%rip), %xmm0    # 0x4bb78
movaps %xmm0, -0x440(%rbp)
movups 0x1aac3(%rip), %xmm0    # 0x4bb68
movaps %xmm0, -0x450(%rbp)
movq -0x30(%rbp), %rdi
movq %r14, %rsi
leaq -0x450(%rbp), %rdx
callq *0x58(%rdi)
incq %r12
movl 0x44(%rbx), %eax
movq -0x40(%rbp), %r13
jmp 0x31030
movq %r15, %r14
jmp 0x31120
movq 0x48(%r13), %rax
movq (%rax,%r12,8), %rsi
leaq -0x50(%rbp), %r15
movq -0x30(%rbp), %rdi
movq %r15, %rdx
callq 0x309dc
movq (%r15), %rdi
callq 0x2f1bd
addb $-0xd, %al
cmpb $0x2, %al
ja 0x3111d
leaq 0x1aa95(%rip), %rsi     # 0x4bb93
leaq -0x450(%rbp), %r15
pushq $0x4d
popq %rdx
movq %r15, %rdi
callq 0x3100
movq -0x30(%rbp), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq *0x58(%rdi)
incq %r12
movslq 0x44(%r13), %rax
cmpq %rax, %r12
jl 0x310d1
movq -0x38(%rbp), %rcx
movl 0x44(%rcx), %eax
cmpl $0x1, %eax
je 0x31148
cmpl $0x2, %eax
jne 0x3121b
movq 0x48(%rcx), %rax
movq 0x8(%rax), %rax
jmp 0x3114f
leaq 0x26751(%rip), %rax     # 0x578a0
addq $0x428, %rsp            # imm = 0x428
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xcda2(%rip), %rdi      # 0x3df0a
leaq 0x18001(%rip), %rsi     # 0x49170
leaq 0x1a8ee(%rip), %rcx     # 0x4ba64
movl $0x1349, %edx           # imm = 0x1349
callq 0x30a0
leaq 0xeb67(%rip), %rdi      # 0x3fcee
leaq 0x17fe2(%rip), %rsi     # 0x49170
leaq 0x1a8cf(%rip), %rcx     # 0x4ba64
movl $0x134a, %edx           # imm = 0x134A
callq 0x30a0
leaq 0x1845f(%rip), %rdi     # 0x49605
leaq 0x17fc3(%rip), %rsi     # 0x49170
leaq 0x1a8b0(%rip), %rcx     # 0x4ba64
movl $0x134b, %edx           # imm = 0x134B
callq 0x30a0
leaq 0x1a97d(%rip), %rdi     # 0x4bb42
leaq 0x17fa4(%rip), %rsi     # 0x49170
leaq 0x1a911(%rip), %rcx     # 0x4bae4
movl $0x130d, %edx           # imm = 0x130D
callq 0x30a0
leaq 0x1a973(%rip), %rdi     # 0x4bb57
leaq 0x17f85(%rip), %rsi     # 0x49170
leaq 0x1a8f2(%rip), %rcx     # 0x4bae4
movl $0x130e, %edx           # imm = 0x130E
callq 0x30a0
leaq 0xa166(%rip), %rdi      # 0x3b369
leaq 0x17f66(%rip), %rsi     # 0x49170
leaq 0x1a853(%rip), %rcx     # 0x4ba64
movl $0x135c, %edx           # imm = 0x135C
callq 0x30a0
leaq 0xa147(%rip), %rdi      # 0x3b369
leaq 0x17f47(%rip), %rsi     # 0x49170
leaq 0x1a834(%rip), %rcx     # 0x4ba64
movl $0x136d, %edx           # imm = 0x136D
callq 0x30a0