// File: /workspace/github_c_makefile_star2_O0/markdryan[P]subtilis/frontend/parser_call.c
// Function: prv_call_ptr_parameters
static subtilis_parser_param_t *
prv_call_ptr_parameters(subtilis_parser_t *p, subtilis_exp_t **args,
			size_t num_args, const subtilis_type_t *expected,
			subtilis_error_t *err)
{
	size_t i;
	subtilis_parser_param_t *params = NULL;
	subtilis_exp_t *e = NULL;

	params = malloc(num_args * sizeof(*params));
	if (!params) {
		subtilis_error_set_oom(err);
		return NULL;
	}
	for (i = 0; i < num_args; i++)
		params[i].type.type = SUBTILIS_TYPE_VOID;

	for (i = 0; i < num_args; i++) {
		if (args[i]->partial_name) {
			subtilis_parser_call_add_addr(
			    p, expected->params.fn.params[i], args[i], err);
			e = args[i];
		} else {
			args[i] = subtilis_type_if_coerce_type(
			    p, args[i], expected->params.fn.params[i], err);
			if (err->type != SUBTILIS_ERROR_OK)
				goto on_error;
			e = subtilis_type_if_exp_to_var(p, args[i], err);
		}
		args[i] = NULL;
		if (err->type != SUBTILIS_ERROR_OK)
			goto on_error;
		subtilis_type_init_copy(&params[i].type, &e->type, err);
		if (err->type != SUBTILIS_ERROR_OK)
			goto on_error;
		params[i].reg = e->exp.ir_op.reg;
		params[i].nop = SIZE_MAX;
		subtilis_exp_delete(e);
		e = NULL;
	}

	return params;

on_error:

	subtilis_exp_delete(e);
	prv_delete_params(params, num_args);
	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq $0x0, -0x40(%rbp)
movq $0x0, -0x48(%rbp)
imulq $0x158, -0x20(%rbp), %rdi # imm = 0x158
callq 0x121b0
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0x1febb
movq -0x30(%rbp), %rdi
movl $0x1, %esi
leaq 0x8a78c(%rip), %rdx     # 0xaa630
movl $0xbe, %ecx
callq 0x158e0
movq $0x0, -0x8(%rbp)
jmp 0x2007e
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x1fef0
movq -0x40(%rbp), %rax
imulq $0x158, -0x38(%rbp), %rcx # imm = 0x158
addq %rcx, %rax
movl $0x8, (%rax)
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x1fec3
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x20056
movq -0x18(%rbp), %rax
movq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cmpq $0x0, 0x160(%rax)
je 0x1ff54
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rax
movq -0x38(%rbp), %rcx
movq 0x18(%rax,%rcx,8), %rsi
movq -0x18(%rbp), %rax
movq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
movq -0x30(%rbp), %rcx
callq 0x21910
movq -0x18(%rbp), %rax
movq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x48(%rbp)
jmp 0x1ffb4
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movq -0x28(%rbp), %rax
movq -0x38(%rbp), %rcx
movq 0x18(%rax,%rcx,8), %rdx
movq -0x30(%rbp), %rcx
callq 0x4a2e0
movq %rax, %rdx
movq -0x18(%rbp), %rax
movq -0x38(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x30(%rbp), %rax
cmpl $0x0, (%rax)
je 0x1ff97
jmp 0x20060
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movq -0x30(%rbp), %rdx
callq 0x47c10
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rax
movq -0x38(%rbp), %rcx
movq $0x0, (%rax,%rcx,8)
movq -0x30(%rbp), %rax
cmpl $0x0, (%rax)
je 0x1ffd2
jmp 0x20060
movq -0x40(%rbp), %rdi
imulq $0x158, -0x38(%rbp), %rax # imm = 0x158
addq %rax, %rdi
movq -0x48(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x3dec0
movq -0x30(%rbp), %rax
cmpl $0x0, (%rax)
je 0x1fff9
jmp 0x20060
movq -0x48(%rbp), %rax
movq 0x148(%rax), %rcx
movq -0x40(%rbp), %rax
imulq $0x158, -0x38(%rbp), %rdx # imm = 0x158
addq %rdx, %rax
movq %rcx, 0x148(%rax)
movq -0x40(%rbp), %rax
imulq $0x158, -0x38(%rbp), %rcx # imm = 0x158
addq %rcx, %rax
movq $-0x1, 0x150(%rax)
movq -0x48(%rbp), %rdi
callq 0x36ee0
movq $0x0, -0x48(%rbp)
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x1fef8
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x2007e
movq -0x48(%rbp), %rdi
callq 0x36ee0
movq -0x40(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x1f090
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)