// File: /workspace/github_c_makefile_star2_O0/markdryan[P]subtilis/frontend/parser_call.c
// Function: prv_complete_array_type
static bool prv_complete_array_type(subtilis_parser_t *p, subtilis_token_t *t,
				    subtilis_type_t *fn_type,
				    subtilis_error_t *err)
{
	subtilis_type_t id_type;
	size_t i;
	const char *tbuf;

	id_type.type = SUBTILIS_TYPE_VOID;

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

	if ((t->type == SUBTILIS_TOKEN_INTEGER) &&
	    (fn_type->type != SUBTILIS_TYPE_VOID) &&
	    (!subtilis_type_if_is_vector(fn_type))) {
		/*
		 * We have a function returning an array.
		 */

		if ((t->tok.integer < 1) ||
		    (t->tok.integer > SUBTILIS_MAX_DIMENSIONS)) {
			subtilis_error_bad_dim(err, "return type",
					       p->l->stream->name, p->l->line);
			return false;
		}
		subtilis_type_init_copy(&id_type, fn_type, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return false;
		subtilis_type_if_array_of(&id_type, fn_type, err);
		subtilis_type_free(&id_type);
		if (err->type != SUBTILIS_ERROR_OK)
			return false;
		fn_type->params.array.num_dims = t->tok.integer;
		for (i = 0; i < fn_type->params.array.num_dims; i++)
			fn_type->params.array.dims[i] =
			    SUBTILIS_DYNAMIC_DIMENSION;

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

		if ((t->type != SUBTILIS_TOKEN_OPERATOR) || strcmp(tbuf, ")")) {
			subtilis_error_set_right_bkt_expected(
			    err, tbuf, p->l->stream->name, p->l->line);
			return false;
		}

		subtilis_lexer_get(p->l, t, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return false;
		tbuf = subtilis_token_get_text(t);
		if ((t->type != SUBTILIS_TOKEN_OPERATOR) || strcmp(tbuf, "("))
			return false;
		subtilis_lexer_get(p->l, t, err);
		if (err->type != SUBTILIS_ERROR_OK)
			return false;
	}

	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x190, %rsp            # imm = 0x190
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movl $0x8, -0x170(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x133f0
movq -0x28(%rbp), %rax
cmpl $0x0, (%rax)
je 0x205fb
movb $0x0, -0x1(%rbp)
jmp 0x2085c
movq -0x18(%rbp), %rax
cmpl $0x4, (%rax)
jne 0x20858
movq -0x20(%rbp), %rax
cmpl $0x8, (%rax)
je 0x20858
movq -0x20(%rbp), %rdi
callq 0x4a040
testb $0x1, %al
jne 0x20858
movq -0x18(%rbp), %rax
cmpl $0x1, 0x8(%rax)
jl 0x2063a
movq -0x18(%rbp), %rax
cmpl $0xa, 0x8(%rax)
jle 0x20688
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x30(%rax), %r8
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl 0x38(%rax), %r9d
movl $0x38, %esi
leaq 0x89fe7(%rip), %rdx     # 0xaa647
leaq 0x8ac0f(%rip), %rcx     # 0xab276
leaq 0x89fc2(%rip), %rax     # 0xaa630
movq %rax, (%rsp)
movl $0x2dc, 0x8(%rsp)       # imm = 0x2DC
callq 0x156d0
movb $0x0, -0x1(%rbp)
jmp 0x2085c
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
leaq -0x170(%rbp), %rdi
callq 0x3dec0
movq -0x28(%rbp), %rax
cmpl $0x0, (%rax)
je 0x206ae
movb $0x0, -0x1(%rbp)
jmp 0x2085c
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
leaq -0x170(%rbp), %rdi
callq 0x479c0
leaq -0x170(%rbp), %rdi
callq 0x3e100
movq -0x28(%rbp), %rax
cmpl $0x0, (%rax)
je 0x206e0
movb $0x0, -0x1(%rbp)
jmp 0x2085c
movq -0x18(%rbp), %rax
movl 0x8(%rax), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x8(%rax)
movq $0x0, -0x178(%rbp)
movq -0x178(%rbp), %rax
movq -0x20(%rbp), %rcx
movslq 0x8(%rcx), %rcx
cmpq %rcx, %rax
jae 0x20734
movq -0x20(%rbp), %rax
movq -0x178(%rbp), %rcx
movl $0xffffffff, 0xc(%rax,%rcx,4) # imm = 0xFFFFFFFF
movq -0x178(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x178(%rbp)
jmp 0x206f9
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x133f0
movq -0x28(%rbp), %rax
cmpl $0x0, (%rax)
je 0x2075a
movb $0x0, -0x1(%rbp)
jmp 0x2085c
movq -0x18(%rbp), %rdi
callq 0x12d70
movq %rax, -0x180(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x2, (%rax)
jne 0x2078b
movq -0x180(%rbp), %rdi
leaq 0x8a3d0(%rip), %rsi     # 0xaab51
callq 0x12140
cmpl $0x0, %eax
je 0x207d9
movq -0x28(%rbp), %rdi
movq -0x180(%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 $0x16, %esi
leaq 0x8aabe(%rip), %rcx     # 0xab276
leaq 0x89e71(%rip), %rax     # 0xaa630
movq %rax, (%rsp)
movl $0x2f2, 0x8(%rsp)       # imm = 0x2F2
callq 0x156d0
movb $0x0, -0x1(%rbp)
jmp 0x2085c
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x133f0
movq -0x28(%rbp), %rax
cmpl $0x0, (%rax)
je 0x207fc
movb $0x0, -0x1(%rbp)
jmp 0x2085c
movq -0x18(%rbp), %rdi
callq 0x12d70
movq %rax, -0x180(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x2, (%rax)
jne 0x2082d
movq -0x180(%rbp), %rdi
leaq 0x8aa79(%rip), %rsi     # 0xab29c
callq 0x12140
cmpl $0x0, %eax
je 0x20833
movb $0x0, -0x1(%rbp)
jmp 0x2085c
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x133f0
movq -0x28(%rbp), %rax
cmpl $0x0, (%rax)
je 0x20856
movb $0x0, -0x1(%rbp)
jmp 0x2085c
jmp 0x20858
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x190, %rsp            # imm = 0x190
popq %rbp
retq
nopw (%rax,%rax)