// File: /workspace/github_c_makefile_star2_O3/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
testq %rsi, %rsi
je 0x33d59
movq %rsi, %r12
cmpl $0xbd2, (%rsi)          # imm = 0xBD2
jne 0x33d78
cmpl $0x2, 0x44(%r12)
jne 0x33d97
movq %rdi, %rbx
movq 0x48(%r12), %rax
movq (%rax), %r15
movl (%r15), %eax
cmpl $0xe00, %eax            # imm = 0xE00
je 0x33b0a
cmpl $0x200, %eax            # imm = 0x200
jne 0x33df4
movq %rbx, %rdi
movq %r15, %rsi
callq 0x33790
movl (%rax), %ecx
cmpl $0x1, %ecx
je 0x33b1b
cmpl $0x3, %ecx
jne 0x33b21
movq 0x48(%rax), %r14
jmp 0x33b49
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2db00
movq 0x68(%r15), %r14
jmp 0x33b49
movq 0x38(%rax), %r14
jmp 0x33b49
movups 0x1af5d(%rip), %xmm0    # 0x4ea85
leaq -0x450(%rbp), %rdx
movaps %xmm0, 0x10(%rdx)
movups 0x1af3b(%rip), %xmm0    # 0x4ea75
movaps %xmm0, (%rdx)
movq %rbx, %rdi
movq %r15, %rsi
callq *0x58(%rbx)
xorl %r14d, %r14d
cmpl $0x440, (%r14)          # imm = 0x440
jne 0x33b61
movq 0x48(%r14), %rax
movq (%rax), %rcx
cmpl $0x430, (%rcx)          # imm = 0x430
je 0x33b8d
movups 0x1af3c(%rip), %xmm0    # 0x4eaa4
leaq -0x450(%rbp), %rdx
movups %xmm0, 0xf(%rdx)
movups 0x1af1b(%rip), %xmm0    # 0x4ea95
movaps %xmm0, (%rdx)
movq %rbx, %rdi
movq %r15, %rsi
callq *0x58(%rbx)
movq 0x48(%r14), %rax
movq (%rax), %rcx
movq 0x48(%rcx), %rax
movq (%rax), %r13
testq %r13, %r13
je 0x33db6
movq %r12, -0x30(%rbp)
movq 0x48(%r12), %rax
movq 0x8(%rax), %r12
testq %r12, %r12
je 0x33dd5
movq %rcx, -0x38(%rbp)
movl 0x44(%r12), %eax
movl 0x44(%r13), %ecx
testl %ecx, %ecx
jle 0x33c82
movq 0x48(%r13), %rdx
leal -0x1(%rcx), %esi
movq (%rdx,%rsi,8), %rdx
cmpl $0xa03, (%rdx)          # imm = 0xA03
sete %dl
cmpl %esi, %eax
setge %sil
testb %sil, %dl
jne 0x33bef
cmpl %ecx, %eax
jne 0x33cf0
xorl %r15d, %r15d
movq 0x48(%r13), %rax
movq (%rax,%r15,8), %r14
cmpl $0xa03, (%r14)          # imm = 0xA03
je 0x33c7b
movq 0x48(%r12), %rax
movq (%rax,%r15,8), %rsi
movq %rbx, %rdi
leaq -0x48(%rbp), %rdx
callq 0x335cc
movq -0x48(%rbp), %rdx
movq 0x48(%r14), %rax
movq 0x8(%rax), %rsi
movq %rbx, %rdi
callq 0x2db8a
testb %al, %al
jne 0x33c6b
movups 0x1af1c(%rip), %xmm0    # 0x4eb53
movups %xmm0, -0x435(%rbp)
movups 0x1af03(%rip), %xmm0    # 0x4eb48
movaps %xmm0, -0x440(%rbp)
movups 0x1aee5(%rip), %xmm0    # 0x4eb38
movaps %xmm0, -0x450(%rbp)
movq %rbx, %rdi
movq -0x30(%rbp), %rsi
leaq -0x450(%rbp), %rdx
callq *0x58(%rbx)
incq %r15
movslq 0x44(%r13), %rax
cmpq %rax, %r15
jl 0x33bf2
movl 0x44(%r12), %eax
jmp 0x33c89
xorl %r15d, %r15d
cmpl %ecx, %eax
jne 0x33cf0
cmpl %eax, %r15d
jge 0x33d21
movl %r15d, %r14d
leaq -0x48(%rbp), %r15
leaq -0x450(%rbp), %r13
movq 0x48(%r12), %rax
movq (%rax,%r14,8), %rsi
movq %rbx, %rdi
movq %r15, %rdx
callq 0x335cc
movq -0x48(%rbp), %rdi
callq 0x31d4d
addb $-0xd, %al
cmpb $0x2, %al
ja 0x33ce4
movl $0x4d, %edx
movq %r13, %rdi
leaq 0x1ae91(%rip), %rsi     # 0x4eb63
callq 0x3110
movq %rbx, %rdi
movq -0x30(%rbp), %rsi
movq %r13, %rdx
callq *0x58(%rbx)
incq %r14
cmpl %r14d, 0x44(%r12)
jg 0x33ca0
jmp 0x33d21
movups 0x1aed4(%rip), %xmm0    # 0x4ebcb
leaq -0x450(%rbp), %rdx
movups %xmm0, 0x1b(%rdx)
movups 0x1aeb7(%rip), %xmm0    # 0x4ebc0
movaps %xmm0, 0x10(%rdx)
movups 0x1ae9c(%rip), %xmm0    # 0x4ebb0
movaps %xmm0, (%rdx)
movq %rbx, %rdi
movq -0x30(%rbp), %rsi
callq *0x58(%rbx)
movq -0x38(%rbp), %rcx
movl 0x44(%rcx), %eax
cmpl $0x1, %eax
je 0x33d40
cmpl $0x2, %eax
jne 0x33e13
movq 0x48(%rcx), %rax
movq 0x8(%rax), %rax
jmp 0x33d47
leaq 0x26b59(%rip), %rax     # 0x5a8a0
addq $0x428, %rsp            # imm = 0x428
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xd1ab(%rip), %rdi      # 0x40f0b
leaq 0x183d9(%rip), %rsi     # 0x4c140
leaq 0x1acc6(%rip), %rcx     # 0x4ea34
movl $0x1349, %edx           # imm = 0x1349
callq 0x30a0
leaq 0xef3d(%rip), %rdi      # 0x42cbc
leaq 0x183ba(%rip), %rsi     # 0x4c140
leaq 0x1aca7(%rip), %rcx     # 0x4ea34
movl $0x134a, %edx           # imm = 0x134A
callq 0x30a0
leaq 0x18837(%rip), %rdi     # 0x4c5d5
leaq 0x1839b(%rip), %rsi     # 0x4c140
leaq 0x1ac88(%rip), %rcx     # 0x4ea34
movl $0x134b, %edx           # imm = 0x134B
callq 0x30a0
leaq 0x1ad55(%rip), %rdi     # 0x4eb12
leaq 0x1837c(%rip), %rsi     # 0x4c140
leaq 0x1ace9(%rip), %rcx     # 0x4eab4
movl $0x130d, %edx           # imm = 0x130D
callq 0x30a0
leaq 0x1ad4b(%rip), %rdi     # 0x4eb27
leaq 0x1835d(%rip), %rsi     # 0x4c140
leaq 0x1acca(%rip), %rcx     # 0x4eab4
movl $0x130e, %edx           # imm = 0x130E
callq 0x30a0
leaq 0xa56e(%rip), %rdi      # 0x3e369
leaq 0x1833e(%rip), %rsi     # 0x4c140
leaq 0x1ac2b(%rip), %rcx     # 0x4ea34
movl $0x135c, %edx           # imm = 0x135C
callq 0x30a0
leaq 0xa54f(%rip), %rdi      # 0x3e369
leaq 0x1831f(%rip), %rsi     # 0x4c140
leaq 0x1ac0c(%rip), %rcx     # 0x4ea34
movl $0x136d, %edx           # imm = 0x136D
callq 0x30a0