// File: /workspace/github_c_makefile_star2_O0/Ihsoh[P]ilang/compiler/backend/semantics.c
// Function: get_param_info
static void _get_param_info(
	ParserContext *ctx,
	ParserASTNode *node_param,
	_GetParamInfoResult *result
) {
	assert(ctx);
	assert(node_param);
	assert(result);

	ParserASTNode *node_type = NULL;
	uint8_t type = BE_TYPE_UNKNOWN;

	if (node_param->type == BE_NODE_IDENTIFIER) {
		ParserSymbol *symbol = _get_symbol_by_id_node(ctx, node_param);
		if (symbol->type == BE_SYM_VAR) {
			node_type = BE_VAR_SYMBOL_GET_TYPE_NODE(symbol);
		} else if (symbol->type == BE_SYM_FUNC) {
			node_type = BE_FUNC_SYMBOL_GET_FUNC_POINTER_TYPE_NODE(symbol);
		} else {
			_SYNERR_NODE(
				ctx,
				node_param,
				"expect variable name or function name."
			);
		}
	} else if (node_param->type == BE_NODE_EXPR) {
		_expr_wrapper(ctx, node_param);
		node_type = BE_EXPR_AST_NODE_GET_TYPE_NODE(node_param);
	} else {
		assert(0);
	}
	type = _get_type_by_type_node(ctx, node_type);

	result->node_type = node_type;
	result->type = type;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x430, %rsp            # imm = 0x430
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x5efe0
jmp 0x5efff
leaq 0x2117a(%rip), %rdi     # 0x80161
leaq 0x23892(%rip), %rsi     # 0x82880
movl $0x105d, %edx           # imm = 0x105D
leaq 0x25b70(%rip), %rcx     # 0x84b6a
callq 0x30a0
cmpq $0x0, -0x10(%rbp)
je 0x5f008
jmp 0x5f027
leaq 0x25ba9(%rip), %rdi     # 0x84bb8
leaq 0x2386a(%rip), %rsi     # 0x82880
movl $0x105e, %edx           # imm = 0x105E
leaq 0x25b48(%rip), %rcx     # 0x84b6a
callq 0x30a0
cmpq $0x0, -0x18(%rbp)
je 0x5f030
jmp 0x5f04f
leaq 0x2674e(%rip), %rdi     # 0x85785
leaq 0x23842(%rip), %rsi     # 0x82880
movl $0x105f, %edx           # imm = 0x105F
leaq 0x25b20(%rip), %rcx     # 0x84b6a
callq 0x30a0
movq $0x0, -0x20(%rbp)
movb $0x0, -0x21(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x200, (%rax)          # imm = 0x200
jne 0x5f0d8
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x5f300
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpl $0x1, (%rax)
jne 0x5f08f
movq -0x30(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x5f0d6
movq -0x30(%rbp), %rax
cmpl $0x3, (%rax)
jne 0x5f0a6
movq -0x30(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x5f0d4
leaq -0x430(%rbp), %rdi
leaq 0x25b0f(%rip), %rsi     # 0x84bc3
movb $0x0, %al
callq 0x3160
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x430(%rbp), %rdx
callq *%rax
jmp 0x5f0d6
jmp 0x5f120
movq -0x10(%rbp), %rax
cmpl $0xe00, (%rax)          # imm = 0xE00
jne 0x5f0ff
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x4f5d0
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x5f11e
leaq 0x14354(%rip), %rdi     # 0x7345a
leaq 0x23773(%rip), %rsi     # 0x82880
movl $0x1075, %edx           # imm = 0x1075
leaq 0x25a51(%rip), %rcx     # 0x84b6a
callq 0x30a0
jmp 0x5f120
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x56560
movb %al, -0x21(%rbp)
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movb -0x21(%rbp), %cl
movq -0x18(%rbp), %rax
movb %cl, 0x8(%rax)
addq $0x430, %rsp            # imm = 0x430
popq %rbp
retq
nop