// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0xa0, %rsp
movl %edi, -0xc(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
leaq -0x80(%rbp), %rdi
xorl %esi, %esi
movl $0x58, %edx
callq 0x11130
movq -0x18(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x24630
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
andq $0x3f, %rax
cmpl $0x3, %eax
jne 0x255ee
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
movl $0x4, %esi
callq 0x3f450
movq %rax, -0x88(%rbp)
cmpq $0x0, -0x88(%rbp)
je 0x254c5
movq -0x88(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0x321c0
cmpl $0x0, %eax
je 0x254f4
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdi
movl $0x3b, %esi
callq 0x22f80
cmpl $0x0, %eax
jne 0x254c5
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdi
movl $0x7b, %esi
callq 0x22f80
cmpl $0x0, %eax
je 0x254f4
movq -0x18(%rbp), %rax
movl -0xc(%rbp), %esi
movq (%rax), %rdi
callq 0x3f4d0
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rsi
movl $0x4, %edx
callq 0x40a40
movq -0x88(%rbp), %rax
movl (%rax), %eax
andl $0xff, %eax
cmpl -0xc(%rbp), %eax
je 0x25539
movq -0x18(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x88(%rbp), %rdi
callq 0x33340
movq %rax, %rdx
movq -0x98(%rbp), %rax
movq (%rax), %rdi
leaq 0x3f80d(%rip), %rsi     # 0x64d3f
movb $0x0, %al
callq 0x170e0
movq -0x88(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movl $0x7b, %esi
callq 0x22f80
cmpl $0x0, %eax
jne 0x2557e
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x2570b
movq -0x88(%rbp), %rax
cmpq $0x0, 0x98(%rax)
je 0x255c1
movq -0x18(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0x88(%rbp), %rdi
callq 0x33340
movq %rax, %rdx
movq -0xa0(%rbp), %rax
movq (%rax), %rdi
leaq 0x3f79f(%rip), %rsi     # 0x64d59
movb $0x0, %al
callq 0x170e0
movq -0x88(%rbp), %rax
movq -0x90(%rbp), %rcx
movq (%rcx), %rcx
movq %rcx, 0x4(%rax)
movq -0x88(%rbp), %rax
movl 0x54(%rax), %ecx
andl $0xfffff7ff, %ecx       # imm = 0xFFFFF7FF
orl $0x0, %ecx
movl %ecx, 0x54(%rax)
jmp 0x25665
movq -0x18(%rbp), %rdi
movl $0x7b, %esi
callq 0x22f80
cmpl $0x0, %eax
je 0x25633
movq -0x18(%rbp), %rax
movl -0xc(%rbp), %esi
movq (%rax), %rdi
callq 0x3f4d0
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rdi
callq 0x31d70
movq -0x88(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
jmp 0x25663
movq -0x18(%rbp), %rax
movq (%rax), %rdi
leaq 0x3f72b(%rip), %rsi     # 0x64d6c
movb $0x0, %al
callq 0x16f90
movq -0x20(%rbp), %rax
leaq 0x6d645(%rip), %rcx     # 0x92c98
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x2570b
jmp 0x25665
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
movq 0x8(%rcx), %rdi
movq -0x88(%rbp), %rsi
callq *%rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movl $0x7d, %esi
leaq 0x3f6f3(%rip), %rdx     # 0x64d81
callq 0x22eb0
movq %rax, -0x18(%rbp)
movq -0x88(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x18(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x24630
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x88(%rbp), %rsi
addq $0x48, %rsi
addq $0x18, %rsi
leaq -0x80(%rbp), %rdx
movq (%rax), %rdi
callq 0x24fe0
movzbl -0x2d(%rbp), %edx
movq -0x88(%rbp), %rax
movl 0x54(%rax), %ecx
andl $0x1, %edx
shll $0x15, %edx
andl $0xffdfffff, %ecx       # imm = 0xFFDFFFFF
orl %edx, %ecx
movl %ecx, 0x54(%rax)
movq -0x88(%rbp), %rax
movq -0x18(%rbp), %rcx
movq (%rcx), %rcx
movq %rcx, 0xc(%rax)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0xa0, %rsp
popq %rbp
retq
nopl (%rax,%rax)