// File: /workspace/github_c_makefile_star2_O3/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 0x1aed1
movq %rax, %rbx
movq (%rax), %rdi
movl %edi, %eax
andl $0x3f, %eax
cmpq $0x12, %rax
je 0x1bb7f
cmpl $0x3, %eax
jne 0x1bc03
movq 0x10(%rbx), %rdi
movl $0x4, %esi
callq 0x2afd5
testq %rax, %rax
je 0x1bb15
movq %rax, %r15
movq 0x30(%rax), %rdi
callq 0x22f25
testl %eax, %eax
je 0x1bb33
movq 0x8(%rbx), %rax
movl (%rax), %ecx
andl $0x3f, %ecx
cmpl $0x12, %ecx
jne 0x1bb33
movl 0x10(%rax), %eax
orl $0x40, %eax
cmpl $0x7b, %eax
jne 0x1bb33
movq (%rbx), %rdi
movl %ebp, %esi
callq 0x2b00b
movq %rax, %r15
movq 0x10(%rbx), %rsi
movq %rax, %rdi
movl $0x4, %edx
callq 0x2beca
movzbl (%r15), %eax
cmpl %ebp, %eax
jne 0x1bc31
movq %r15, (%r12)
movq 0x8(%rbx), %r12
movl (%r12), %eax
andl $0x3f, %eax
cmpl $0x12, %eax
jne 0x1bc1e
cmpl $0x7b, 0x10(%r12)
jne 0x1bc1e
cmpq $0x0, 0x98(%r15)
jne 0x1bc4d
movq (%rbx), %rax
movq %rax, 0x4(%r15)
andb $-0x9, 0x55(%r15)
jmp 0x1bb9e
cmpl $0x7b, 0x10(%rbx)
jne 0x1bc03
movl %ebp, %esi
callq 0x2b00b
movq %rax, %r15
movq %rax, %rdi
callq 0x22c94
movq %r15, (%r12)
movq %rbx, %r12
movq 0x8(%r12), %rdi
movq %r15, %rsi
callq *%r14
leaq 0x27868(%rip), %rdx     # 0x43418
movq %rax, %rdi
movl $0x7d, %esi
callq 0x1950f
movq %rsp, %r14
movq %r15, (%r14)
movq %rax, %rdi
movq %r14, %rsi
callq 0x1aed1
movq %rax, %rbx
leaq 0x60(%r15), %rsi
movq (%rax), %rdi
movq %r14, %rdx
callq 0x1b7b3
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 0x1bc21
leaq 0x277f9(%rip), %rsi     # 0x43403
xorl %eax, %eax
callq 0x11a80
leaq 0x50ca0(%rip), %rax     # 0x6c8b8
movq %rax, (%r12)
jmp 0x1bc21
movq %r12, %rbx
movq %rbx, %rax
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %rdi
callq 0x237c5
movq (%rbx), %rdi
leaq 0x27793(%rip), %rsi     # 0x433d6
movq %rax, %rdx
xorl %eax, %eax
callq 0x11b9c
movq %r15, %rdi
callq 0x237c5
movq (%r12), %rdi
leaq 0x27790(%rip), %rsi     # 0x433f0
jmp 0x1bc43