// File: /workspace/github_c_makefile_star2_O0/markdryan[P]subtilis/frontend/parser_os.c
// Function: prv_process_input_args
static size_t *prv_process_input_args(subtilis_parser_t *p,
				      subtilis_exp_t **args, size_t no_args,
				      uint32_t *reg_mask, subtilis_error_t *err)
{
	size_t ptr;
	subtilis_exp_t *e;
	size_t *in_regs = NULL;
	size_t i = 0;

	*reg_mask = 0;

	for (i = 0; i < no_args; i++) {
		e = args[i];
		if (!e)
			continue;
		*reg_mask |= 1 << i;
		if (subtilis_type_if_is_numeric(&e->type)) {
			args[i] = subtilis_type_if_to_int(p, args[i], err);
			if (err->type != SUBTILIS_ERROR_OK)
				goto cleanup;
			args[i] = subtilis_type_if_exp_to_var(p, args[i], err);
		} else if (e->type.type == SUBTILIS_TYPE_STRING) {
			args[i] = subtilis_string_zt_non_const(p, e, err);
		} else if (e->type.type == SUBTILIS_TYPE_CONST_STRING) {
			args[i] = subtilis_string_lca_const_zt(p, e, err);
		} else if ((e->type.type == SUBTILIS_TYPE_ARRAY_BYTE) ||
			   (e->type.type == SUBTILIS_TYPE_ARRAY_INTEGER) ||
			   (e->type.type == SUBTILIS_TYPE_VECTOR_BYTE) ||
			   (e->type.type == SUBTILIS_TYPE_VECTOR_INTEGER)) {
			ptr = subtilis_reference_get_data(p, e->exp.ir_op.reg,
							  0, err);
			if (err->type != SUBTILIS_ERROR_OK)
				goto cleanup;
			subtilis_exp_delete(e);
			args[i] = subtilis_exp_new_int32_var(ptr, err);
		} else if (e->type.type == SUBTILIS_TYPE_REC) {
			args[i] =
			    subtilis_exp_new_int32_var(e->exp.ir_op.reg, err);
			subtilis_exp_delete(e);
		} else {
			subtilis_error_set_sys_bad_args(err, p->l->stream->name,
							p->l->line);
			goto cleanup;
		}
	}

	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	in_regs = calloc(no_args, sizeof(*in_regs));
	if (!in_regs) {
		subtilis_error_set_oom(err);
		goto cleanup;
	}

	for (i = 0; i < no_args; i++)
		if (!args[i])
			in_regs[i] = SIZE_MAX;
		else
			in_regs[i] = args[i]->exp.ir_op.reg;

cleanup:

	for (i = 0; i < no_args; i++)
		subtilis_exp_delete(args[i]);
	free(args);

	return in_regs;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq $0x0, -0x40(%rbp)
movq $0x0, -0x48(%rbp)
movq -0x20(%rbp), %rax
movl $0x0, (%rax)
movq $0x0, -0x48(%rbp)
movq -0x48(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x31f11
movq -0x10(%rbp), %rax
movq -0x48(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x31d28
jmp 0x31f00
movq -0x48(%rbp), %rax
movl %eax, %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, %ecx
movq -0x20(%rbp), %rax
orl (%rax), %ecx
movl %ecx, (%rax)
movq -0x38(%rbp), %rdi
callq 0x49d10
testb $0x1, %al
jne 0x31d4e
jmp 0x31db1
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq -0x48(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movq -0x28(%rbp), %rdx
callq 0x488b0
movq %rax, %rdx
movq -0x10(%rbp), %rax
movq -0x48(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x28(%rbp), %rax
cmpl $0x0, (%rax)
je 0x31d84
jmp 0x31fb8
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq -0x48(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movq -0x28(%rbp), %rdx
callq 0x47c10
movq %rax, %rdx
movq -0x10(%rbp), %rax
movq -0x48(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
jmp 0x31efe
movq -0x38(%rbp), %rax
cmpl $0x7, (%rax)
jne 0x31ddf
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x669b0
movq %rax, %rdx
movq -0x10(%rbp), %rax
movq -0x48(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
jmp 0x31efc
movq -0x38(%rbp), %rax
cmpl $0x3, (%rax)
jne 0x31e0d
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x66470
movq %rax, %rdx
movq -0x10(%rbp), %rax
movq -0x48(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
jmp 0x31efa
movq -0x38(%rbp), %rax
cmpl $0xc, (%rax)
je 0x31e31
movq -0x38(%rbp), %rax
cmpl $0xb, (%rax)
je 0x31e31
movq -0x38(%rbp), %rax
cmpl $0x12, (%rax)
je 0x31e31
movq -0x38(%rbp), %rax
cmpl $0x11, (%rax)
jne 0x31e88
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rax
movq 0x148(%rax), %rsi
movq -0x28(%rbp), %rcx
xorl %eax, %eax
movl %eax, %edx
callq 0x6d1e0
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
cmpl $0x0, (%rax)
je 0x31e5f
jmp 0x31fb8
movq -0x38(%rbp), %rdi
callq 0x36ee0
movq -0x30(%rbp), %rax
movl %eax, %edi
movq -0x28(%rbp), %rsi
callq 0x37770
movq %rax, %rdx
movq -0x10(%rbp), %rax
movq -0x48(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
jmp 0x31ef8
movq -0x38(%rbp), %rax
cmpl $0x16, (%rax)
jne 0x31ec1
movq -0x38(%rbp), %rax
movq 0x148(%rax), %rax
movl %eax, %edi
movq -0x28(%rbp), %rsi
callq 0x37770
movq %rax, %rdx
movq -0x10(%rbp), %rax
movq -0x48(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x38(%rbp), %rdi
callq 0x36ee0
jmp 0x31ef6
movq -0x28(%rbp), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x30(%rax), %rdx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl 0x38(%rax), %ecx
movl $0x4d, %esi
leaq 0x78bcd(%rip), %r8      # 0xaaab3
movl $0x81, %r9d
callq 0x15930
jmp 0x31fb8
jmp 0x31ef8
jmp 0x31efa
jmp 0x31efc
jmp 0x31efe
jmp 0x31f00
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x31cfe
movq -0x28(%rbp), %rax
cmpl $0x0, (%rax)
je 0x31f1f
jmp 0x31fb8
movq -0x18(%rbp), %rdi
movl $0x8, %esi
callq 0x12130
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0x31f54
movq -0x28(%rbp), %rdi
movl $0x1, %esi
leaq 0x78b6b(%rip), %rdx     # 0xaaab3
movl $0x8b, %ecx
callq 0x158e0
jmp 0x31fb8
movq $0x0, -0x48(%rbp)
movq -0x48(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x31fb6
movq -0x10(%rbp), %rax
movq -0x48(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
jne 0x31f87
movq -0x40(%rbp), %rax
movq -0x48(%rbp), %rcx
movq $-0x1, (%rax,%rcx,8)
jmp 0x31fa6
movq -0x10(%rbp), %rax
movq -0x48(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x148(%rax), %rdx
movq -0x40(%rbp), %rax
movq -0x48(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
jmp 0x31fa8
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x31f5c
jmp 0x31fb8
movq $0x0, -0x48(%rbp)
movq -0x48(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x31fe9
movq -0x10(%rbp), %rax
movq -0x48(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x36ee0
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x31fc0
movq -0x10(%rbp), %rdi
callq 0x12290
movq -0x40(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)