// File: /workspace/github_c_makefile_star2_O3/lucvoo[P]sparse-dev/symbol.c
// Function: examine_symbol_type
struct symbol *examine_symbol_type(struct symbol * sym)
{
	if (!sym)
		return sym;

	/* Already done? */
	if (sym->examined)
		return sym;
	sym->examined = 1;

	switch (sym->type) {
	case SYM_FN:
	case SYM_NODE:
		return examine_node_type(sym);
	case SYM_ARRAY:
		return examine_array_type(sym);
	case SYM_STRUCT:
		return examine_struct_union_type(sym, 1);
	case SYM_UNION:
		return examine_struct_union_type(sym, 0);
	case SYM_PTR:
		return examine_pointer_type(sym);
	case SYM_ENUM:
		return examine_enum_type(sym);
	case SYM_BITFIELD:
		return examine_bitfield_type(sym);
	case SYM_BASETYPE:
		/* Size and alignment had better already be set up */
		return sym;
	case SYM_TYPEOF:
		return examine_typeof(sym);
	case SYM_PREPROCESSOR:
		sparse_error(sym->pos, "ctype on preprocessor command? (%s)", show_ident(sym->ident));
		return NULL;
	case SYM_UNINITIALIZED:
		sparse_error(sym->pos, "ctype on uninitialized symbol '%s'", show_typename(sym));
		return NULL;
	case SYM_RESTRICT:
		examine_base_type(sym);
		return sym;
	case SYM_FOULED:
		examine_base_type(sym);
		return sym;
	default:
		sparse_error(sym->pos, "Examining unknown symbol type %d", sym->type);
		break;
	}
	return sym;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x2b104
movq %rdi, %rbx
movl 0x54(%rdi), %eax
btl $0xb, %eax
jb 0x2b106
orl $0x800, %eax            # imm = 0x800
movl %eax, 0x54(%rbx)
movl (%rbx), %eax
movzbl %al, %edx
cmpb $0xe, %dl
ja 0x2b322
leaq 0x1c4eb(%rip), %rax     # 0x475dc
movslq (%rax,%rdx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq %rbx, %rdi
callq 0x2b965
jmp 0x2b106
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x2b965
movq 0x68(%rax), %rcx
andl $0xe000, %ecx           # imm = 0xE000
orq %rcx, 0x68(%rbx)
leaq 0x395ff(%rip), %rcx     # 0x64734
movl (%rcx), %ecx
movl %ecx, 0x50(%rbx)
movl 0x50(%rax), %edx
cmpl %ecx, %edx
cmovgl %edx, %ecx
movl %ecx, 0x50(%rbx)
leaq 0x395ec(%rip), %rcx     # 0x64738
movslq (%rcx), %rcx
movq %rcx, 0x70(%rbx)
movq 0x70(%rax), %rax
cmpq %rcx, %rax
cmovaq %rax, %rcx
movq %rcx, 0x70(%rbx)
jmp 0x2b106
movq %rbx, %rdi
movl $0x1, %esi
jmp 0x2b1b2
movq 0xb0(%rbx), %rdi
callq 0x32223
testq %rax, %rax
leaq 0x41734(%rip), %r14     # 0x6c8b8
cmovneq %rax, %r14
movzbl (%r14), %eax
cmpl $0x3, %eax
jne 0x2b339
movq 0x68(%r14), %r15
movq 0x60(%r14), %r14
andl $0x400fe00, %r15d       # imm = 0x400FE00
movzbl (%r14), %eax
jmp 0x2b33c
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2b6f1
jmp 0x2b106
cmpl $0x0, 0x50(%rbx)
jne 0x2b1ce
leaq 0x39563(%rip), %rax     # 0x6472c
movl (%rax), %eax
movl %eax, 0x50(%rbx)
cmpq $0x0, 0x70(%rbx)
jne 0x2b106
leaq 0x39550(%rip), %rax     # 0x64730
movslq (%rax), %rax
movq %rax, 0x70(%rbx)
jmp 0x2b106
movq %rbx, %rdi
callq 0x2b965
testq %rax, %rax
je 0x2b106
movq %rax, %r14
movq 0x58(%rbx), %r15
movq $-0x1, %r13
testq %r15, %r15
je 0x2b389
movslq 0x50(%r14), %r12
movq %r15, %rdi
callq 0xf4bf
movq %rax, %rcx
leaq 0x394d6(%rip), %rax     # 0x64700
movslq (%rax), %rsi
movq %r12, %rax
xorl %edx, %edx
divq %rsi
subl %edx, %esi
testl %edx, %edx
cmovel %edx, %esi
cmpb $0x1, (%r15)
jne 0x2b36b
addq %r12, %rsi
movslq %ecx, %r13
imulq %rsi, %r13
jmp 0x2b389
movq %rbx, %rdi
callq 0x2b965
testq %rax, %rax
je 0x2b106
movq %rax, %r14
movl 0x50(%rbx), %eax
cmpl 0x50(%r14), %eax
jle 0x2b2aa
movq 0x18(%rbx), %rdi
callq 0x2de35
movq %rax, %r15
movl 0x50(%rbx), %ebp
movq %r14, %rdi
callq 0x237c5
movq 0x4(%rbx), %rdi
leaq 0x1c636(%rip), %rsi     # 0x478ca
movq %r15, %rdx
movl %ebp, %ecx
movq %rax, %r8
xorl %eax, %eax
callq 0x11a80
movl $0xffffffff, 0x50(%rbx) # imm = 0xFFFFFFFF
cmpq $0x0, 0x70(%rbx)
jne 0x2b2b9
movq 0x70(%r14), %rax
movq %rax, 0x70(%rbx)
movq 0x68(%r14), %rax
leaq 0x3bb14(%rip), %rcx     # 0x66dd8
movl %eax, %edx
andl $0xe000, %edx           # imm = 0xE000
cmpl $0x0, (%rcx)
movl $0x4000, %ecx           # imm = 0x4000
cmoveq %rdx, %rcx
testw %ax, %ax
cmovsq %rdx, %rcx
orq %rcx, 0x68(%rbx)
jmp 0x2b106
movq 0x18(%rbx), %rdi
callq 0x2de35
movq 0x4(%rbx), %rdi
leaq 0x1c360(%rip), %rsi     # 0x4765c
jmp 0x2b311
movq %rbx, %rdi
callq 0x237c5
movq 0x4(%rbx), %rdi
leaq 0x1c36f(%rip), %rsi     # 0x47680
xorl %ebx, %ebx
movq %rax, %rdx
xorl %eax, %eax
callq 0x11a80
jmp 0x2b106
movq 0x4(%rbx), %rdi
leaq 0x1c376(%rip), %rsi     # 0x476a3
xorl %eax, %eax
callq 0x11a80
jmp 0x2b106
xorl %r15d, %r15d
cmpl $0xb, %eax
jne 0x2b353
movq 0x4(%r14), %rdi
leaq 0x1c5ad(%rip), %rsi     # 0x478f9
xorl %eax, %eax
callq 0x118fc
movb $0x3, (%rbx)
movq %r15, 0x68(%rbx)
movq %r14, 0x60(%rbx)
movq %rbx, %rdi
callq 0x2b3d2
jmp 0x2b106
leaq 0x3527a(%rip), %rax     # 0x605ec
cmpl $0x0, (%rax)
je 0x2b389
movq 0x8(%r15), %rdi
leaq 0x1c43f(%rip), %rsi     # 0x477c1
xorl %eax, %eax
callq 0x118fc
cmpb $0x3, (%r14)
movq %r14, %rax
jne 0x2b396
movq 0x60(%r14), %rax
testb $0x40, 0x55(%rax)
je 0x2b3ba
leaq 0x35209(%rip), %rax     # 0x605ac
cmpl $0x0, (%rax)
je 0x2b3ba
movq 0x4(%rbx), %rdi
leaq 0x1c42d(%rip), %rsi     # 0x477e0
xorl %eax, %eax
callq 0x118fc
cmpq $0x0, 0x70(%rbx)
jne 0x2b3c9
movq 0x70(%r14), %rax
movq %rax, 0x70(%rbx)
movl %r13d, 0x50(%rbx)
jmp 0x2b106