// File: /workspace/github_c_makefile_star2_O1/lucvoo[P]sparse-dev/parse.c
// Function: struct_union_enum_specifier
static struct token *struct_union_enum_specifier(enum type type,
	struct token *token, struct decl_state *ctx,
	struct token *(*parse)(struct token *, struct symbol *))
{
	struct decl_state attr = { };
	struct symbol *sym;
	struct position *repos;

	token = handle_attributes(token, &attr);
	if (token_type(token) == TOKEN_IDENT) {
		sym = lookup_symbol(token->ident, NS_STRUCT);
		if (!sym ||
		    (is_outer_scope(sym->scope) &&
		     (match_op(token->next,';') || match_op(token->next,'{')))) {
			// Either a new symbol, or else an out-of-scope
			// symbol being redefined.
			sym = alloc_symbol(token->pos, type);
			bind_symbol(sym, token->ident, NS_STRUCT);
		}
		if (sym->type != type)
			error_die(token->pos, "invalid tag applied to %s", show_typename (sym));
		ctx->ctype.base_type = sym;
		repos = &token->pos;
		token = token->next;
		if (!match_op(token, '{'))
			return token;

		// The following test is actually wrong for empty
		// structs, but (1) they are not C99, (2) gcc does
		// the same thing, and (3) it's easier.
		if (sym->symbol_list)
			error_die(token->pos, "redefinition of %s", show_typename (sym));
		sym->pos = *repos;

		// Mark the structure as needing re-examination
		sym->examined = 0;
	} else if (match_op(token, '{')) {
		// private struct/union/enum type
		sym = alloc_symbol(token->pos, type);
		set_current_scope(sym);		// used by dissect
		ctx->ctype.base_type = sym;
	} else {
		sparse_error(token->pos, "expected declaration");
		ctx->ctype.base_type = &bad_ctype;
		return token;
	}

	token = parse(token->next, sym);
	token = expect(token, '}', "at end of specifier");
	attr.ctype.base_type = sym;
	token = handle_attributes(token, &attr);
	apply_ctype(token->pos, &sym->ctype, &attr.ctype);
	sym->packed = attr.packed;

	sym->endpos = token->pos;

	return token;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x60, %rsp
movq %rcx, %r14
movq %rdx, %r12
movq %rsi, %rax
movl %edi, %ebp
xorps %xmm0, %xmm0
movq %rsp, %rsi
movaps %xmm0, 0x40(%rsi)
movaps %xmm0, 0x30(%rsi)
movaps %xmm0, 0x20(%rsi)
movaps %xmm0, 0x10(%rsi)
movaps %xmm0, (%rsi)
movq $0x0, 0x50(%rsi)
movq %rax, %rdi
callq 0x1afe1
movq %rax, %rbx
movq (%rax), %rdi
movl %edi, %eax
andl $0x3f, %eax
cmpq $0x12, %rax
je 0x1bc6e
cmpl $0x3, %eax
jne 0x1bcf2
movq 0x10(%rbx), %rdi
movl $0x4, %esi
callq 0x2b511
testq %rax, %rax
je 0x1bc04
movq %rax, %r15
movq 0x30(%rax), %rdi
callq 0x22fbe
testl %eax, %eax
je 0x1bc22
movq 0x8(%rbx), %rax
movq (%rax), %rcx
andl $0x3f, %ecx
cmpq $0x12, %rcx
jne 0x1bc22
cmpl $0x3b, 0x10(%rax)
jne 0x1bd20
movq (%rbx), %rdi
movl %ebp, %esi
callq 0x2b547
movq %rax, %r15
movq 0x10(%rbx), %rsi
movq %rax, %rdi
movl $0x4, %edx
callq 0x2c3dd
movzbl (%r15), %eax
cmpl %ebp, %eax
jne 0x1bd38
movq %r15, (%r12)
movq 0x8(%rbx), %r12
movl (%r12), %eax
andl $0x3f, %eax
cmpl $0x12, %eax
jne 0x1bd0d
cmpl $0x7b, 0x10(%r12)
jne 0x1bd0d
cmpq $0x0, 0x98(%r15)
jne 0x1bd54
movq (%rbx), %rax
movq %rax, 0x4(%r15)
andb $-0x9, 0x55(%r15)
jmp 0x1bc8d
cmpl $0x7b, 0x10(%rbx)
jne 0x1bcf2
movl %ebp, %esi
callq 0x2b547
movq %rax, %r15
movq %rax, %rdi
callq 0x22d38
movq %r15, (%r12)
movq %rbx, %r12
movq 0x8(%r12), %rdi
movq %r15, %rsi
callq *%r14
leaq 0x287b9(%rip), %rdx     # 0x44458
movq %rax, %rdi
movl $0x7d, %esi
callq 0x195d7
movq %rsp, %r14
movq %r15, (%r14)
movq %rax, %rdi
movq %r14, %rsi
callq 0x1afe1
movq %rax, %rbx
leaq 0x60(%r15), %rsi
movq (%rax), %rdi
movq %r14, %rdx
callq 0x1b893
movzbl 0x53(%r14), %eax
andl $0x1, %eax
shll $0x15, %eax
movl $0xffdfffff, %ecx       # imm = 0xFFDFFFFF
andl 0x54(%r15), %ecx
orl %eax, %ecx
movl %ecx, 0x54(%r15)
movq (%rbx), %rax
movq %rax, 0xc(%r15)
jmp 0x1bd10
leaq 0x2874a(%rip), %rsi     # 0x44443
xorl %eax, %eax
callq 0x11a38
leaq 0x51bb1(%rip), %rax     # 0x6d8b8
movq %rax, (%r12)
jmp 0x1bd10
movq %r12, %rbx
movq %rbx, %rax
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x12, %ecx
jne 0x1bc22
cmpl $0x7b, 0x10(%rax)
je 0x1bc04
jmp 0x1bc22
movq %r15, %rdi
callq 0x2386c
movq (%rbx), %rdi
leaq 0x286cc(%rip), %rsi     # 0x44416
movq %rax, %rdx
xorl %eax, %eax
callq 0x11b54
movq %r15, %rdi
callq 0x2386c
movq (%r12), %rdi
leaq 0x286c9(%rip), %rsi     # 0x44430
jmp 0x1bd4a