// File: /workspace/github_c_makefile_star2_O0/lucvoo[P]sparse-dev/parse.c
// Function: declaration_specifiers
static struct token *declaration_specifiers(struct token *token, struct decl_state *ctx)
{
	int seen = 0;
	int class = CInt;
	int rank = 0;

	while (token_type(token) == TOKEN_IDENT) {
		struct symbol *s = lookup_symbol(token->ident,
						 NS_TYPEDEF | NS_SYMBOL);
		if (!s || !(s->namespace & NS_TYPEDEF))
			break;
		if (s->type != SYM_KEYWORD) {
			if (seen & Set_Any)
				break;
			seen |= Set_S | Set_T;
			ctx->ctype.base_type = s->ctype.base_type;
			apply_ctype(token->pos, &ctx->ctype, &s->ctype);
			token = token->next;
			continue;
		}
		if (s->op->type & KW_SPECIFIER) {
			if (seen & s->op->test) {
				specifier_conflict(token->pos,
						   seen & s->op->test,
						   token->ident);
				break;
			}
			seen |= s->op->set;
			class += s->op->class;
			if (s->op->set & Set_Int128)
				rank = 3;
			else if (s->op->set & Set_Char)
				rank = -2;
			if (s->op->set & (Set_Short|Set_Float)) {
				rank = -1;
			} else if (s->op->set & Set_Long && rank++) {
				if (class == CReal) {
					specifier_conflict(token->pos,
							   Set_Vlong,
							   &double_ident);
					break;
				}
				seen |= Set_Vlong;
			}
		}
		token = token->next;
		if (s->op->declarator)	// Note: this eats attributes
			token = s->op->declarator(token, s, ctx);
		if (s->op->type & KW_EXACT) {
			ctx->ctype.base_type = s->ctype.base_type;
			ctx->ctype.modifiers |= s->ctype.modifiers;
		}
	}

	if (!(seen & Set_S)) {	/* not set explicitly? */
		struct symbol *base = &incomplete_ctype;
		if (seen & Set_Any)
			base = types[class][rank];
		ctx->ctype.base_type = base;
	}

	if (ctx->ctype.modifiers & MOD_BITWISE) {
		struct symbol *type;
		ctx->ctype.modifiers &= ~MOD_BITWISE;
		if (!is_int_type(ctx->ctype.base_type)) {
			sparse_error(token->pos, "invalid modifier");
			return token;
		}
		type = alloc_symbol(token->pos, SYM_BASETYPE);
		*type = *ctx->ctype.base_type;
		type->ctype.modifiers &= ~MOD_SPECIFIER;
		type->ctype.base_type = ctx->ctype.base_type;
		type->type = SYM_RESTRICT;
		ctx->ctype.base_type = type;
		create_fouled(type);
	}
	return token;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
andq $0x3f, %rax
cmpl $0x3, %eax
jne 0x234ee
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
movl $0x12, %esi
callq 0x3f450
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x232ec
movq -0x30(%rbp), %rax
movl (%rax), %eax
shrl $0x8, %eax
andl $0x1ff, %eax            # imm = 0x1FF
andl $0x2, %eax
cmpl $0x0, %eax
jne 0x232f1
jmp 0x234ee
movq -0x30(%rbp), %rax
movl (%rax), %eax
andl $0xff, %eax
cmpl $0xf, %eax
je 0x23358
movl -0x1c(%rbp), %eax
andl $0x3c1, %eax            # imm = 0x3C1
cmpl $0x0, %eax
je 0x23313
jmp 0x234ee
movl -0x1c(%rbp), %eax
orl $0x3, %eax
movl %eax, -0x1c(%rbp)
movq -0x30(%rbp), %rax
movq 0x60(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rsi
movq -0x30(%rbp), %rdx
addq $0x48, %rdx
addq $0x18, %rdx
movq (%rax), %rdi
callq 0x24fe0
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0x232a5
movq -0x30(%rbp), %rax
movq 0x40(%rax), %rax
movl (%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x23479
movl -0x1c(%rbp), %eax
movq -0x30(%rbp), %rcx
movq 0x40(%rcx), %rcx
andl 0x58(%rcx), %eax
cmpl $0x0, %eax
je 0x233a8
movq -0x10(%rbp), %rax
movl -0x1c(%rbp), %esi
movq -0x30(%rbp), %rcx
movq 0x40(%rcx), %rcx
andl 0x58(%rcx), %esi
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rdx
movq (%rax), %rdi
callq 0x28be0
jmp 0x234ee
movq -0x30(%rbp), %rax
movq 0x40(%rax), %rax
movl 0x5c(%rax), %eax
orl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movq -0x30(%rbp), %rax
movq 0x40(%rax), %rax
movl 0x60(%rax), %eax
addl -0x20(%rbp), %eax
movl %eax, -0x20(%rbp)
movq -0x30(%rbp), %rax
movq 0x40(%rax), %rax
movl 0x5c(%rax), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
je 0x233e8
movl $0x3, -0x24(%rbp)
jmp 0x23404
movq -0x30(%rbp), %rax
movq 0x40(%rax), %rax
movl 0x5c(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x23402
movl $0xfffffffe, -0x24(%rbp) # imm = 0xFFFFFFFE
jmp 0x23404
movq -0x30(%rbp), %rax
movq 0x40(%rax), %rax
movl 0x5c(%rax), %eax
andl $0x120, %eax            # imm = 0x120
cmpl $0x0, %eax
je 0x23422
movl $0xffffffff, -0x24(%rbp) # imm = 0xFFFFFFFF
jmp 0x23477
movq -0x30(%rbp), %rax
movq 0x40(%rax), %rax
movl 0x5c(%rax), %eax
andl $0x200, %eax            # imm = 0x200
cmpl $0x0, %eax
je 0x23475
movl -0x24(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x24(%rbp)
cmpl $0x0, %eax
je 0x23475
cmpl $0x3, -0x20(%rbp)
jne 0x2346a
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movl $0x400, %esi            # imm = 0x400
leaq 0x66b68(%rip), %rdx     # 0x89fc8
callq 0x28be0
jmp 0x234ee
movl -0x1c(%rbp), %eax
orl $0x400, %eax            # imm = 0x400
movl %eax, -0x1c(%rbp)
jmp 0x23477
jmp 0x23479
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x30(%rbp), %rax
movq 0x40(%rax), %rax
cmpq $0x0, 0x28(%rax)
je 0x234b2
movq -0x30(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x28(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq *%rax
movq %rax, -0x10(%rbp)
movq -0x30(%rbp), %rax
movq 0x40(%rax), %rax
movl (%rax), %eax
andl $0x200, %eax            # imm = 0x200
cmpl $0x0, %eax
je 0x234e9
movq -0x30(%rbp), %rax
movq 0x60(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x30(%rbp), %rax
movq 0x68(%rax), %rcx
movq -0x18(%rbp), %rax
orq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
jmp 0x232a5
movl -0x1c(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
jne 0x23537
leaq 0x6f5d8(%rip), %rax     # 0x92ad8
movq %rax, -0x38(%rbp)
movl -0x1c(%rbp), %eax
andl $0x3c1, %eax            # imm = 0x3C1
cmpl $0x0, %eax
je 0x2352c
movslq -0x20(%rbp), %rcx
leaq 0x5a584(%rip), %rax     # 0x7daa0
movq (%rax,%rcx,8), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
andq $0x2000000, %rax        # imm = 0x2000000
cmpq $0x0, %rax
je 0x23603
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rcx
andq $-0x2000001, %rcx       # imm = 0xFDFFFFFF
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0x25ea0
cmpl $0x0, %eax
jne 0x23592
movq -0x10(%rbp), %rax
movq (%rax), %rdi
leaq 0x43649(%rip), %rsi     # 0x66bca
movb $0x0, %al
callq 0x16f90
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x2360b
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movl $0x2, %esi
callq 0x3f4d0
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
movl $0xe0, %edx
callq 0x111d0
movq -0x40(%rbp), %rax
movq 0x68(%rax), %rcx
andq $-0xe001, %rcx          # imm = 0xFFFF1FFF
movq %rcx, 0x68(%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x60(%rax)
movq -0x40(%rbp), %rax
movl (%rax), %ecx
andl $0xffffff00, %ecx       # imm = 0xFFFFFF00
orl $0xd, %ecx
movl %ecx, (%rax)
movq -0x40(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x40(%rbp), %rdi
callq 0x40280
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)