// File: /workspace/github_c_makefile_star2_O2/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)
andq $0x0, 0x50(%rsi)
movq %rax, %rdi
callq 0x18eca
movq %rax, %rbx
movq (%rax), %rdi
movl %edi, %eax
andl $0x3f, %eax
cmpq $0x12, %rax
je 0x19839
cmpl $0x3, %eax
jne 0x198bb
movq 0x10(%rbx), %rdi
pushq $0x4
popq %rsi
callq 0x266e9
testq %rax, %rax
je 0x197d1
movq %rax, %r15
movq 0x30(%rax), %rdi
callq 0x20196
testl %eax, %eax
je 0x197ed
movq 0x8(%rbx), %rax
movl (%rax), %ecx
andl $0x3f, %ecx
cmpl $0x12, %ecx
jne 0x197ed
movl 0x10(%rax), %eax
orl $0x40, %eax
cmpl $0x7b, %eax
jne 0x197ed
movq (%rbx), %rdi
movl %ebp, %esi
callq 0x2671f
movq %rax, %r15
movq 0x10(%rbx), %rsi
pushq $0x4
popq %rdx
movq %rax, %rdi
callq 0x274ad
movzbl (%r15), %eax
cmpl %ebp, %eax
jne 0x198e9
movq %r15, (%r12)
movq 0x8(%rbx), %r12
movl (%r12), %eax
andl $0x3f, %eax
cmpl $0x12, %eax
jne 0x198d6
cmpl $0x7b, 0x10(%r12)
jne 0x198d6
cmpq $0x0, 0x98(%r15)
jne 0x19905
movq (%rbx), %rax
movq %rax, 0x4(%r15)
andb $-0x9, 0x55(%r15)
jmp 0x19858
cmpl $0x7b, 0x10(%rbx)
jne 0x198bb
movl %ebp, %esi
callq 0x2671f
movq %rax, %r15
movq %rax, %rdi
callq 0x1ff68
movq %r15, (%r12)
movq %rbx, %r12
movq 0x8(%r12), %rdi
movq %r15, %rsi
callq *%r14
leaq 0x22c0e(%rip), %rdx     # 0x3c478
pushq $0x7d
popq %rsi
movq %rax, %rdi
callq 0x17480
movq %rsp, %r14
movq %r15, (%r14)
movq %rax, %rdi
movq %r14, %rsi
callq 0x18eca
movq %rax, %rbx
leaq 0x60(%r15), %rsi
movq (%rax), %rdi
movq %r14, %rdx
callq 0x194b8
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 0x198d9
leaq 0x22ba1(%rip), %rsi     # 0x3c463
xorl %eax, %eax
callq 0x1120e
leaq 0x4cfe8(%rip), %rax     # 0x668b8
movq %rax, (%r12)
jmp 0x198d9
movq %r12, %rbx
movq %rbx, %rax
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %rdi
callq 0x20b5a
movq (%rbx), %rdi
leaq 0x22b3b(%rip), %rsi     # 0x3c436
movq %rax, %rdx
xorl %eax, %eax
callq 0x1132a
movq %r15, %rdi
callq 0x20b5a
movq (%r12), %rdi
leaq 0x22b38(%rip), %rsi     # 0x3c450
jmp 0x198fb