// File: /workspace/github_c_makefile_star2_O0/lucvoo[P]sparse-dev/parse.c
// Function: direct_declarator
static struct token *direct_declarator(struct token *token, struct decl_state *ctx)
{
	struct ctype *ctype = &ctx->ctype;
	struct token *next;
	struct ident **p = ctx->ident;

	if (ctx->ident && token_type(token) == TOKEN_IDENT) {
		*ctx->ident = token->ident;
		token = token->next;
	} else if (match_op(token, '(') &&
	    is_nested(token, &next, ctx->prefer_abstract)) {
		struct symbol *base_type = ctype->base_type;
		if (token->next != next)
			next = handle_attributes(token->next, ctx);
		token = declarator(next, ctx);
		token = expect(token, ')', "in nested declarator");
		while (ctype->base_type != base_type)
			ctype = &ctype->base_type->ctype;
		p = NULL;
	}

	if (match_op(token, '(')) {
		enum kind kind = which_func(token, p, ctx->prefer_abstract);
		struct symbol *fn;
		fn = alloc_indirect_symbol(token->pos, ctype, SYM_FN);
		ctype->modifiers |= ctx->f_modifiers;
		token = token->next;
		if (kind == K_R)
			token = identifier_list(token, fn);
		else if (kind == Proto)
			token = parameter_type_list(token, fn);
		token = expect(token, ')', "in function declarator");
		fn->endpos = token->pos;
		return token;
	}

	while (match_op(token, '[')) {
		struct symbol *array;
		array = alloc_indirect_symbol(token->pos, ctype, SYM_ARRAY);
		token = abstract_array_declarator(token->next, array);
		token = expect(token, ']', "in abstract_array_declarator");
		array->endpos = token->pos;
		ctype = &array->ctype;
	}
	return token;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x28e73
movq -0x10(%rbp), %rax
movq (%rax), %rax
andq $0x3f, %rax
cmpl $0x3, %eax
jne 0x28e73
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0x28f2c
movq -0x10(%rbp), %rdi
movl $0x28, %esi
callq 0x22f80
cmpl $0x0, %eax
je 0x28f2a
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movzbl 0x50(%rax), %edx
leaq -0x28(%rbp), %rsi
callq 0x29130
cmpl $0x0, %eax
je 0x28f2a
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
cmpq -0x28(%rbp), %rax
je 0x28ed6
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x24630
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x23620
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movl $0x29, %esi
leaq 0x3dd46(%rip), %rdx     # 0x66c3d
callq 0x22eb0
movq %rax, -0x10(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
cmpq -0x38(%rbp), %rax
je 0x28f22
movq -0x20(%rbp), %rax
movq (%rax), %rax
addq $0x48, %rax
addq $0x18, %rax
movq %rax, -0x20(%rbp)
jmp 0x28f00
movq $0x0, -0x30(%rbp)
jmp 0x28f2c
movq -0x10(%rbp), %rdi
movl $0x28, %esi
callq 0x22f80
cmpl $0x0, %eax
je 0x28ffb
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x18(%rbp), %rax
movzbl 0x50(%rax), %edx
callq 0x291e0
movl %eax, -0x3c(%rbp)
movq -0x10(%rbp), %rax
movq -0x20(%rbp), %rsi
movq (%rax), %rdi
movl $0x5, %edx
callq 0x25f20
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rax
movq 0x40(%rax), %rcx
movq -0x20(%rbp), %rax
orq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x10(%rbp)
cmpl $0x1, -0x3c(%rbp)
jne 0x28fad
movq -0x10(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0x29330
movq %rax, -0x10(%rbp)
jmp 0x28fc6
cmpl $0x2, -0x3c(%rbp)
jne 0x28fc4
movq -0x10(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0x29410
movq %rax, -0x10(%rbp)
jmp 0x28fc6
movq -0x10(%rbp), %rdi
movl $0x29, %esi
leaq 0x3dc7c(%rip), %rdx     # 0x66c52
callq 0x22eb0
movq %rax, -0x10(%rbp)
movq -0x48(%rbp), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
movq %rcx, 0xc(%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x29080
jmp 0x28ffd
movq -0x10(%rbp), %rdi
movl $0x5b, %esi
callq 0x22f80
cmpl $0x0, %eax
je 0x29078
movq -0x10(%rbp), %rax
movq -0x20(%rbp), %rsi
movq (%rax), %rdi
movl $0x6, %edx
callq 0x25f20
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x50(%rbp), %rsi
callq 0x29510
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movl $0x5d, %esi
leaq 0x3dc1b(%rip), %rdx     # 0x66c69
callq 0x22eb0
movq %rax, -0x10(%rbp)
movq -0x50(%rbp), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
movq %rcx, 0xc(%rax)
movq -0x50(%rbp), %rax
addq $0x48, %rax
addq $0x18, %rax
movq %rax, -0x20(%rbp)
jmp 0x28ffd
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)