// File: /workspace/github_c_makefile_star2_O0/markdryan[P]subtilis/frontend/parser_call.c
// Function: prv_initial_lambda_proc_fn_type
static char *prv_initial_lambda_proc_fn_type(subtilis_parser_t *p,
					     subtilis_token_t *t,
					     subtilis_type_t *ftype,
					     bool keep_prefix,
					     subtilis_error_t *err)
{
	subtilis_type_t fn_type;
	size_t name_len;
	char new_name[64];
	char *name = NULL;

	fn_type.type = SUBTILIS_TYPE_VOID;

	subtilis_lexer_get(p->l, t, err);
	if (err->type != SUBTILIS_ERROR_OK)
		return NULL;

	name = prv_proc_name_and_type(p, t, &fn_type, keep_prefix, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto on_error;

	name_len = strlen(name);
	if (fn_type.type == SUBTILIS_TYPE_VOID ||
	    fn_type.type == SUBTILIS_TYPE_REAL) {
		if (name_len > 0) {
			subtilis_error_set_bad_lambda_name(
			    err, name, p->l->stream->name, p->l->line);
			goto on_error;
		}
	} else if ((fn_type.type != SUBTILIS_TYPE_FN &&
		    fn_type.type != SUBTILIS_TYPE_REC) &&
		   (strlen(name) != 1)) {
		subtilis_error_set_bad_lambda_name(
		    err, name, p->l->stream->name, p->l->line);
		goto on_error;
	}

	if (p->prog->lambdas >= INT_MAX) {
		subtilis_error_set_assertion_failed(err);
		goto on_error;
	}

	free(name);
	sprintf(new_name, "!%d", (int)p->prog->lambdas++);
	name = malloc(strlen(new_name) + 1);
	if (!name) {
		subtilis_error_set_oom(err);
		goto on_error;
	}
	strcpy(name, new_name);

	prv_complete_proc_fn_type(p, t, &fn_type, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto on_error;

	subtilis_type_copy(ftype, &fn_type, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto on_error;

	subtilis_type_free(&fn_type);

	return name;

on_error:
	subtilis_type_free(&fn_type);
	free(name);

	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1e0, %rsp            # imm = 0x1E0
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, -0x1c8(%rbp)
movl $0x8, -0x178(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x133f0
movq -0x30(%rbp), %rax
cmpl $0x0, (%rax)
je 0x22d21
movq $0x0, -0x8(%rbp)
jmp 0x22f7f
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movb -0x21(%rbp), %al
movq -0x30(%rbp), %r8
leaq -0x178(%rbp), %rdx
andb $0x1, %al
movzbl %al, %ecx
callq 0x1e750
movq %rax, -0x1c8(%rbp)
movq -0x30(%rbp), %rax
cmpl $0x0, (%rax)
je 0x22d56
jmp 0x22f5f
movq -0x1c8(%rbp), %rdi
callq 0x120d0
movq %rax, -0x180(%rbp)
cmpl $0x8, -0x178(%rbp)
je 0x22d7b
cmpl $0x4, -0x178(%rbp)
jne 0x22dd1
cmpq $0x0, -0x180(%rbp)
jbe 0x22dcf
movq -0x30(%rbp), %rdi
movq -0x1c8(%rbp), %rdx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x30(%rax), %r8
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl 0x38(%rax), %r9d
movl $0xd, %esi
leaq 0x884c4(%rip), %rcx     # 0xab276
leaq 0x87877(%rip), %rax     # 0xaa630
movq %rax, (%rsp)
movl $0x474, 0x8(%rsp)       # imm = 0x474
callq 0x156d0
jmp 0x22f5f
jmp 0x22e41
cmpl $0x9, -0x178(%rbp)
je 0x22e3f
cmpl $0x16, -0x178(%rbp)
je 0x22e3f
movq -0x1c8(%rbp), %rdi
callq 0x120d0
cmpq $0x1, %rax
je 0x22e3f
movq -0x30(%rbp), %rdi
movq -0x1c8(%rbp), %rdx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x30(%rax), %r8
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl 0x38(%rax), %r9d
movl $0xd, %esi
leaq 0x88454(%rip), %rcx     # 0xab276
leaq 0x87807(%rip), %rax     # 0xaa630
movq %rax, (%rsp)
movl $0x47b, 0x8(%rsp)       # imm = 0x47B
callq 0x156d0
jmp 0x22f5f
jmp 0x22e41
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
cmpq $0x7fffffff, 0x30(%rax) # imm = 0x7FFFFFFF
jb 0x22e72
movq -0x30(%rbp), %rdi
movl $0xf, %esi
leaq 0x877cd(%rip), %rdx     # 0xaa630
movl $0x480, %ecx            # imm = 0x480
callq 0x158e0
jmp 0x22f5f
movq -0x1c8(%rbp), %rdi
callq 0x12290
leaq -0x1c0(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rcx
movq 0x30(%rcx), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0x30(%rcx)
movl %eax, %edx
leaq 0x877b5(%rip), %rsi     # 0xaa65a
movb $0x0, %al
callq 0x12250
leaq -0x1c0(%rbp), %rdi
callq 0x120d0
movq %rax, %rdi
addq $0x1, %rdi
callq 0x121b0
movq %rax, -0x1c8(%rbp)
cmpq $0x0, -0x1c8(%rbp)
jne 0x22ef1
movq -0x30(%rbp), %rdi
movl $0x1, %esi
leaq 0x8774b(%rip), %rdx     # 0xaa630
movl $0x488, %ecx            # imm = 0x488
callq 0x158e0
jmp 0x22f5f
movq -0x1c8(%rbp), %rdi
leaq -0x1c0(%rbp), %rsi
callq 0x12060
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x30(%rbp), %rcx
leaq -0x178(%rbp), %rdx
callq 0x219f0
movq -0x30(%rbp), %rax
cmpl $0x0, (%rax)
je 0x22f27
jmp 0x22f5f
movq -0x20(%rbp), %rdi
movq -0x30(%rbp), %rdx
leaq -0x178(%rbp), %rsi
callq 0x3e4f0
movq -0x30(%rbp), %rax
cmpl $0x0, (%rax)
je 0x22f46
jmp 0x22f5f
leaq -0x178(%rbp), %rdi
callq 0x3e100
movq -0x1c8(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x22f7f
leaq -0x178(%rbp), %rdi
callq 0x3e100
movq -0x1c8(%rbp), %rdi
callq 0x12290
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x1e0, %rsp            # imm = 0x1E0
popq %rbp
retq
nopl (%rax)