// File: /workspace/github_c_makefile_star2_O0/markdryan[P]subtilis/frontend/parser_call.c
// Function: prv_proc_name_and_type
static char *prv_proc_name_and_type(subtilis_parser_t *p, subtilis_token_t *t,
				    subtilis_type_t *type, bool keep_prefix,
				    subtilis_error_t *err)
{
	const char *tbuf;
	char *name = NULL;

	tbuf = subtilis_token_get_text(t);
	if ((t->type != SUBTILIS_TOKEN_KEYWORD) ||
	    ((t->tok.keyword.type != SUBTILIS_KEYWORD_PROC) &&
	     (t->tok.keyword.type != SUBTILIS_KEYWORD_FN))) {
		subtilis_error_set_expected(err, "PROC or FN", tbuf,
					    p->l->stream->name, p->l->line);
		return NULL;
	}

	if (!keep_prefix) {
		if (t->tok.keyword.type == SUBTILIS_KEYWORD_PROC)
			tbuf += 4;
		else if (t->tok.keyword.type == SUBTILIS_KEYWORD_FN)
			tbuf += 2;
	}

	name = malloc(strlen(tbuf) + 1);
	if (!name) {
		subtilis_error_set_oom(err);
		return NULL;
	}

	subtilis_type_copy(type, &t->tok.keyword.id_type, err);
	if (err->type != SUBTILIS_ERROR_OK) {
		free(name);
		return NULL;
	}

	if ((type->type == SUBTILIS_TYPE_FN) ||
	    (type->type == SUBTILIS_TYPE_REC)) {
		subtilis_complete_custom_type(p, tbuf, type, err);
		if (err->type != SUBTILIS_ERROR_OK) {
			free(name);
			return NULL;
		}
	}
	strcpy(name, tbuf);

	return name;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movb %cl, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
andb $0x1, %al
movb %al, -0x21(%rbp)
movq %r8, -0x30(%rbp)
movq $0x0, -0x40(%rbp)
movq -0x18(%rbp), %rdi
callq 0x12d70
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x1, (%rax)
jne 0x1e7a1
movq -0x18(%rbp), %rax
cmpl $0x1, 0x8(%rax)
je 0x1e7f0
movq -0x18(%rbp), %rax
cmpl $0x0, 0x8(%rax)
je 0x1e7f0
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rcx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x30(%rax), %r8
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl 0x38(%rax), %r9d
movl $0x1d, %esi
leaq 0x8bd27(%rip), %rdx     # 0xaa4f2
leaq 0x8be5e(%rip), %rax     # 0xaa630
movq %rax, (%rsp)
movl $0xf1, 0x8(%rsp)
callq 0x156d0
movq $0x0, -0x8(%rbp)
jmp 0x1e8fe
testb $0x1, -0x21(%rbp)
jne 0x1e828
movq -0x18(%rbp), %rax
cmpl $0x1, 0x8(%rax)
jne 0x1e80e
movq -0x38(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x38(%rbp)
jmp 0x1e826
movq -0x18(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jne 0x1e824
movq -0x38(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x38(%rbp)
jmp 0x1e826
jmp 0x1e828
movq -0x38(%rbp), %rdi
callq 0x120d0
movq %rax, %rdi
addq $0x1, %rdi
callq 0x121b0
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0x1e86f
movq -0x30(%rbp), %rdi
movl $0x1, %esi
leaq 0x8bdd8(%rip), %rdx     # 0xaa630
movl $0xfe, %ecx
callq 0x158e0
movq $0x0, -0x8(%rbp)
jmp 0x1e8fe
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq $0x8, %rsi
addq $0x8, %rsi
movq -0x30(%rbp), %rdx
callq 0x3e4f0
movq -0x30(%rbp), %rax
cmpl $0x0, (%rax)
je 0x1e8a4
movq -0x40(%rbp), %rdi
callq 0x12290
movq $0x0, -0x8(%rbp)
jmp 0x1e8fe
movq -0x20(%rbp), %rax
cmpl $0x9, (%rax)
je 0x1e8b6
movq -0x20(%rbp), %rax
cmpl $0x16, (%rax)
jne 0x1e8e9
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x30(%rbp), %rcx
callq 0x25e50
movq -0x30(%rbp), %rax
cmpl $0x0, (%rax)
je 0x1e8e7
movq -0x40(%rbp), %rdi
callq 0x12290
movq $0x0, -0x8(%rbp)
jmp 0x1e8fe
jmp 0x1e8e9
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x12060
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)