// File: /workspace/github_c_makefile_star2_O0/markdryan[P]subtilis/frontend/parser_call.c
// Function: prv_call_parameters
static subtilis_parser_param_t *
prv_call_parameters(subtilis_parser_t *p, subtilis_exp_t **args,
		    size_t num_args, subtilis_check_args_t **check_args,
		    subtilis_error_t *err)
{
	size_t nop;
	size_t i;
	subtilis_parser_param_t *params = NULL;
	subtilis_exp_t *e = NULL;
	subtilis_check_args_t *an = 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) {
			if (!an) {
				an = calloc(num_args, sizeof(*an));
				if (!an) {
					subtilis_error_set_oom(err);
					goto on_error;
				}
			}
			an[i].arg_name =
			    malloc(strlen(args[i]->partial_name) + 1);
			if (!an[i].arg_name) {
				subtilis_error_set_oom(err);
				goto on_error;
			}
			strcpy(an[i].arg_name, args[i]->partial_name);
			an[i].call_site = args[i]->call_site;
		}
		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;
		nop = subtilis_ir_section_add_nop(p->current, err);
		if (err->type != SUBTILIS_ERROR_OK)
			goto on_error;
		params[i].reg = e->exp.ir_op.reg;
		params[i].nop = nop;
		subtilis_exp_delete(e);
		e = NULL;
	}

	*check_args = an;

	return params;

on_error:

	if (an) {
		for (i = 0; i < num_args; i++)
			free(an[i].arg_name);
		free(an);
	}

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq $0x0, -0x48(%rbp)
movq $0x0, -0x50(%rbp)
movq $0x0, -0x58(%rbp)
imulq $0x158, -0x20(%rbp), %rdi # imm = 0x158
callq 0x121b0
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
jne 0x1ec03
movq -0x30(%rbp), %rdi
movl $0x1, %esi
leaq 0x8ba44(%rip), %rdx     # 0xaa630
movl $0x7a, %ecx
callq 0x158e0
movq $0x0, -0x8(%rbp)
jmp 0x1eec2
movq $0x0, -0x40(%rbp)
movq -0x40(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x1ec38
movq -0x48(%rbp), %rax
imulq $0x158, -0x40(%rbp), %rcx # imm = 0x158
addq %rcx, %rax
movl $0x8, (%rax)
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x1ec0b
movq $0x0, -0x40(%rbp)
movq -0x40(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x1ee48
movq -0x18(%rbp), %rax
movq -0x40(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cmpq $0x0, 0x160(%rax)
je 0x1ed66
cmpq $0x0, -0x58(%rbp)
jne 0x1eca9
movq -0x20(%rbp), %rdi
movl $0x10, %esi
callq 0x12130
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x58(%rbp)
jne 0x1eca7
movq -0x30(%rbp), %rdi
movl $0x1, %esi
leaq 0x8b998(%rip), %rdx     # 0xaa630
movl $0x85, %ecx
callq 0x158e0
jmp 0x1ee5d
jmp 0x1eca9
movq -0x18(%rbp), %rax
movq -0x40(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x160(%rax), %rdi
callq 0x120d0
movq %rax, %rdi
addq $0x1, %rdi
callq 0x121b0
movq %rax, %rcx
movq -0x58(%rbp), %rax
movq -0x40(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, (%rax)
movq -0x58(%rbp), %rax
movq -0x40(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
cmpq $0x0, (%rax)
jne 0x1ed16
movq -0x30(%rbp), %rdi
movl $0x1, %esi
leaq 0x8b929(%rip), %rdx     # 0xaa630
movl $0x8c, %ecx
callq 0x158e0
jmp 0x1ee5d
movq -0x58(%rbp), %rax
movq -0x40(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movq -0x40(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x160(%rax), %rsi
callq 0x12060
movq -0x18(%rbp), %rax
movq -0x40(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x168(%rax), %rcx
movq -0x58(%rbp), %rax
movq -0x40(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq -0x40(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movq -0x30(%rbp), %rdx
callq 0x47c10
movq %rax, -0x50(%rbp)
movq -0x18(%rbp), %rax
movq -0x40(%rbp), %rcx
movq $0x0, (%rax,%rcx,8)
movq -0x30(%rbp), %rax
cmpl $0x0, (%rax)
je 0x1eda1
jmp 0x1ee5d
movq -0x48(%rbp), %rdi
imulq $0x158, -0x40(%rbp), %rax # imm = 0x158
addq %rax, %rdi
movq -0x50(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x3dec0
movq -0x30(%rbp), %rax
cmpl $0x0, (%rax)
je 0x1edcb
jmp 0x1ee5d
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rdi
movq -0x30(%rbp), %rsi
callq 0x38800
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
cmpl $0x0, (%rax)
je 0x1edeb
jmp 0x1ee5d
movq -0x50(%rbp), %rax
movq 0x148(%rax), %rcx
movq -0x48(%rbp), %rax
imulq $0x158, -0x40(%rbp), %rdx # imm = 0x158
addq %rdx, %rax
movq %rcx, 0x148(%rax)
movq -0x38(%rbp), %rcx
movq -0x48(%rbp), %rax
imulq $0x158, -0x40(%rbp), %rdx # imm = 0x158
addq %rdx, %rax
movq %rcx, 0x150(%rax)
movq -0x50(%rbp), %rdi
callq 0x36ee0
movq $0x0, -0x50(%rbp)
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x1ec40
movq -0x58(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movq -0x48(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x1eec2
cmpq $0x0, -0x58(%rbp)
je 0x1eea4
movq $0x0, -0x40(%rbp)
movq -0x40(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x1ee9b
movq -0x58(%rbp), %rax
movq -0x40(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rdi
callq 0x12290
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x1ee6c
movq -0x58(%rbp), %rdi
callq 0x12290
movq -0x50(%rbp), %rdi
callq 0x36ee0
movq -0x48(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x1f090
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)