// File: /workspace/github_c_makefile_star2_O0/lucvoo[P]sparse-dev/symbol.c
// Function: examine_struct_union_type
static struct symbol * examine_struct_union_type(struct symbol *sym, int advance)
{
	struct struct_union_info info = {
		.packed = sym->packed,
		.max_align = 1,
		.bit_size = 0,
		.align_size = 1
	};
	unsigned long bit_size, bit_align;
	void (*fn)(struct symbol *, struct struct_union_info *);
	struct symbol *member;

	fn = advance ? lay_out_struct : lay_out_union;
	FOR_EACH_PTR(sym->symbol_list, member) {
		if (member->ctype.base_type == &autotype_ctype) {
			sparse_error(member->pos, "member '%s' has __auto_type", show_ident(member->ident));
			member->ctype.base_type = &incomplete_ctype;
		}
		if (info.flex_array)
			sparse_error(info.flex_array->pos, "flexible array member '%s' is not last", show_ident(info.flex_array->ident));
		examine_symbol_type(member);
		if (!member->ident)
			examine_anonymous_member(member);

		if (member->ctype.alignment > info.max_align && !sym->packed) {
			// Unnamed bitfields do not affect alignment.
			if (member->ident || !is_bitfield_type(member))
				info.max_align = member->ctype.alignment;
		}

		if (has_flexible_array(member))
			info.has_flex_array = 1;
		if (has_flexible_array(member) && Wflexible_array_nested)
			warning(member->pos, "nested flexible array");
		fn(member, &info);
	} END_FOR_EACH_PTR(member);

	if (!sym->ctype.alignment)
		sym->ctype.alignment = info.max_align;
	bit_size = info.bit_size;
	if (info.align_size) {
		bit_align = bytes_to_bits(sym->ctype.alignment)-1;
		bit_size = (bit_size + bit_align) & ~bit_align;
	}
	if (info.flex_array) {
		info.has_flex_array = 1;
	}
	if (info.has_flex_array && (!is_union_type(sym) || Wflexible_array_union))
		sym->has_flex_array = 1;
	sym->bit_size = bit_size;
	return sym;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq $0x1, -0x30(%rbp)
movq $0x0, -0x28(%rbp)
movl $0x1, -0x20(%rbp)
movb $0x0, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movl 0x54(%rax), %eax
shrl $0x15, %eax
andl $0x1, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movb %al, -0x1b(%rbp)
movq $0x0, -0x18(%rbp)
movl -0xc(%rbp), %edx
leaq 0x1f29(%rip), %rax      # 0x41a10
leaq 0x1d12(%rip), %rcx      # 0x41800
cmpl $0x0, %edx
cmovneq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rax
movq 0x98(%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x68(%rbp)
cmpq $0x0, -0x58(%rbp)
jne 0x3fb24
jmp 0x3fcd5
jmp 0x3fb26
movl $0x0, -0x6c(%rbp)
movl -0x6c(%rbp), %eax
movq -0x60(%rbp), %rcx
movw (%rcx), %cx
shlw $0x8, %cx
sarw $0x8, %cx
movswl %cx, %ecx
cmpl %ecx, %eax
jge 0x3fcbd
movq -0x60(%rbp), %rax
movslq -0x6c(%rbp), %rcx
movq 0x18(%rax,%rcx,8), %rax
movq %rax, -0x50(%rbp)
movq -0x60(%rbp), %rax
movw (%rax), %ax
sarw $0x8, %ax
cwtl
cmpl $0x0, %eax
je 0x3fb78
cmpq $0x0, -0x50(%rbp)
jne 0x3fb78
jmp 0x3fcaf
movq -0x50(%rbp), %rax
leaq 0x532d5(%rip), %rcx     # 0x92e58
cmpq %rcx, 0x60(%rax)
jne 0x3fbc6
movq -0x50(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x50(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x44150
movq %rax, %rdx
movq -0x78(%rbp), %rax
movq 0x4(%rax), %rdi
leaq 0x299a5(%rip), %rsi     # 0x69555
movb $0x0, %al
callq 0x16f90
movq -0x50(%rbp), %rax
leaq 0x52f16(%rip), %rcx     # 0x92ad8
movq %rcx, 0x60(%rax)
cmpq $0x0, -0x18(%rbp)
je 0x3fbfb
movq -0x18(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x44150
movq %rax, %rdx
movq -0x80(%rbp), %rax
movq 0x4(%rax), %rdi
leaq 0x2997d(%rip), %rsi     # 0x69571
movb $0x0, %al
callq 0x16f90
movq -0x50(%rbp), %rdi
callq 0x3f650
movq -0x50(%rbp), %rax
cmpq $0x0, 0x18(%rax)
jne 0x3fc18
movq -0x50(%rbp), %rdi
callq 0x41aa0
movq -0x50(%rbp), %rax
movq 0x70(%rax), %rax
cmpq -0x30(%rbp), %rax
jbe 0x3fc5f
movq -0x8(%rbp), %rax
movl 0x54(%rax), %eax
shrl $0x15, %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x3fc5f
movq -0x50(%rbp), %rax
cmpq $0x0, 0x18(%rax)
jne 0x3fc51
movq -0x50(%rbp), %rdi
callq 0x40700
cmpl $0xb, %eax
je 0x3fc5d
movq -0x50(%rbp), %rax
movq 0x70(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x3fc5f
movq -0x50(%rbp), %rdi
callq 0x417c0
cmpl $0x0, %eax
je 0x3fc71
movb $0x1, -0x1c(%rbp)
movq -0x50(%rbp), %rdi
callq 0x417c0
cmpl $0x0, %eax
je 0x3fca1
leaq 0x4d55a(%rip), %rax     # 0x8d1e0
cmpl $0x0, (%rax)
je 0x3fca1
movq -0x50(%rbp), %rax
movq 0x4(%rax), %rdi
leaq 0x298fe(%rip), %rsi     # 0x69598
movb $0x0, %al
callq 0x16d80
movq -0x48(%rbp), %rax
movq -0x50(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq *%rax
movl -0x6c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x6c(%rbp)
jmp 0x3fb2d
jmp 0x3fcbf
movq -0x60(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x60(%rbp)
cmpq -0x58(%rbp), %rax
jne 0x3fb26
movq -0x8(%rbp), %rax
cmpq $0x0, 0x70(%rax)
jne 0x3fcec
movq -0x30(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x70(%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x38(%rbp)
cmpl $0x0, -0x20(%rbp)
je 0x3fd29
movq -0x8(%rbp), %rax
movq 0x70(%rax), %rax
movl %eax, %edi
callq 0x41c00
subl $0x1, %eax
cltq
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rax
addq -0x40(%rbp), %rax
movq -0x40(%rbp), %rcx
xorq $-0x1, %rcx
andq %rcx, %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x3fd34
movb $0x1, -0x1c(%rbp)
movsbl -0x1c(%rbp), %eax
cmpl $0x0, %eax
je 0x3fd6d
movq -0x8(%rbp), %rdi
callq 0x41c20
cmpl $0x0, %eax
je 0x3fd57
leaq 0x4d496(%rip), %rax     # 0x8d1e8
cmpl $0x0, (%rax)
je 0x3fd6d
movq -0x8(%rbp), %rax
movl 0x54(%rax), %ecx
andl $0xffffbfff, %ecx       # imm = 0xFFFFBFFF
orl $0x4000, %ecx           # imm = 0x4000
movl %ecx, 0x54(%rax)
movq -0x38(%rbp), %rax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x50(%rax)
movq -0x8(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
nopw (%rax,%rax)