// File: /workspace/github_c_makefile_star2_O1/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 0x2b640
movq %rdi, %rbx
movl 0x54(%rdi), %eax
btl $0xb, %eax
jb 0x2b642
orl $0x800, %eax            # imm = 0x800
movl %eax, 0x54(%rbx)
movl (%rbx), %eax
movzbl %al, %edx
cmpb $0xe, %dl
ja 0x2b857
leaq 0x1d02f(%rip), %rax     # 0x4865c
movslq (%rax,%rdx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq %rbx, %rdi
callq 0x2be9c
jmp 0x2b642
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 0x2be9c
movq 0x68(%rax), %rcx
andl $0xe000, %ecx           # imm = 0xE000
orq %rcx, 0x68(%rbx)
leaq 0x3a0c3(%rip), %rcx     # 0x65734
movl (%rcx), %ecx
movl %ecx, 0x50(%rbx)
movl 0x50(%rax), %edx
cmpl %ecx, %edx
cmovgl %edx, %ecx
movl %ecx, 0x50(%rbx)
leaq 0x3a0b0(%rip), %rcx     # 0x65738
movslq (%rcx), %rcx
movq %rcx, 0x70(%rbx)
movq 0x70(%rax), %rax
cmpq %rcx, %rax
cmovaq %rax, %rcx
movq %rcx, 0x70(%rbx)
jmp 0x2b642
movq %rbx, %rdi
movl $0x1, %esi
jmp 0x2b6e7
movq 0xb0(%rbx), %rdi
callq 0x32c63
testq %rax, %rax
leaq 0x421f8(%rip), %r14     # 0x6d8b8
cmovneq %rax, %r14
cmpb $0x3, (%r14)
jne 0x2b86e
movq 0x68(%r14), %r15
movq 0x60(%r14), %r14
andl $0x400fe00, %r15d       # imm = 0x400FE00
jmp 0x2b871
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2bc3e
jmp 0x2b642
cmpl $0x0, 0x50(%rbx)
jne 0x2b703
leaq 0x3a02e(%rip), %rax     # 0x6572c
movl (%rax), %eax
movl %eax, 0x50(%rbx)
cmpq $0x0, 0x70(%rbx)
jne 0x2b642
leaq 0x3a01b(%rip), %rax     # 0x65730
movslq (%rax), %rax
movq %rax, 0x70(%rbx)
jmp 0x2b642
movq %rbx, %rdi
callq 0x2be9c
testq %rax, %rax
je 0x2b642
movq %rax, %r14
movq 0x58(%rbx), %r15
movq $-0x1, %r13
testq %r15, %r15
je 0x2b8bf
movslq 0x50(%r14), %r12
movq %r15, %rdi
callq 0xf2fb
movq %rax, %rcx
leaq 0x39fa1(%rip), %rax     # 0x65700
movslq (%rax), %rsi
movq %r12, %rax
xorl %edx, %edx
divq %rsi
subl %edx, %esi
testl %edx, %edx
cmovel %edx, %esi
cmpb $0x1, (%r15)
jne 0x2b8a1
addq %r12, %rsi
movslq %ecx, %r13
imulq %rsi, %r13
jmp 0x2b8bf
movq %rbx, %rdi
callq 0x2be9c
testq %rax, %rax
je 0x2b642
movq %rax, %r14
movl 0x50(%rbx), %eax
cmpl 0x50(%r14), %eax
jle 0x2b7df
movq 0x18(%rbx), %rdi
callq 0x2e465
movq %rax, %r15
movl 0x50(%rbx), %ebp
movq %r14, %rdi
callq 0x2386c
movq 0x4(%rbx), %rdi
leaq 0x1d181(%rip), %rsi     # 0x4894a
movq %r15, %rdx
movl %ebp, %ecx
movq %rax, %r8
xorl %eax, %eax
callq 0x11a38
movl $0xffffffff, 0x50(%rbx) # imm = 0xFFFFFFFF
cmpq $0x0, 0x70(%rbx)
jne 0x2b7ee
movq 0x70(%r14), %rax
movq %rax, 0x70(%rbx)
movq 0x68(%r14), %rax
leaq 0x3c5df(%rip), %rcx     # 0x67dd8
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 0x2b642
movq 0x18(%rbx), %rdi
callq 0x2e465
movq 0x4(%rbx), %rdi
leaq 0x1ceab(%rip), %rsi     # 0x486dc
jmp 0x2b846
movq %rbx, %rdi
callq 0x2386c
movq 0x4(%rbx), %rdi
leaq 0x1ceba(%rip), %rsi     # 0x48700
xorl %ebx, %ebx
movq %rax, %rdx
xorl %eax, %eax
callq 0x11a38
jmp 0x2b642
movq 0x4(%rbx), %rdi
leaq 0x1cec1(%rip), %rsi     # 0x48723
xorl %eax, %eax
callq 0x11a38
jmp 0x2b642
xorl %r15d, %r15d
cmpb $0xb, (%r14)
jne 0x2b889
movq 0x4(%r14), %rdi
leaq 0x1d0f7(%rip), %rsi     # 0x48979
xorl %eax, %eax
callq 0x118b4
movb $0x3, (%rbx)
movq %r15, 0x68(%rbx)
movq %r14, 0x60(%rbx)
movq %rbx, %rdi
callq 0x2b908
jmp 0x2b642
leaq 0x35d44(%rip), %rax     # 0x615ec
cmpl $0x0, (%rax)
je 0x2b8bf
movq 0x8(%r15), %rdi
leaq 0x1cf89(%rip), %rsi     # 0x48841
xorl %eax, %eax
callq 0x118b4
cmpb $0x3, (%r14)
movq %r14, %rax
jne 0x2b8cc
movq 0x60(%r14), %rax
testb $0x40, 0x55(%rax)
je 0x2b8f0
leaq 0x35cd3(%rip), %rax     # 0x615ac
cmpl $0x0, (%rax)
je 0x2b8f0
movq 0x4(%rbx), %rdi
leaq 0x1cf77(%rip), %rsi     # 0x48860
xorl %eax, %eax
callq 0x118b4
cmpq $0x0, 0x70(%rbx)
jne 0x2b8ff
movq 0x70(%r14), %rax
movq %rax, 0x70(%rbx)
movl %r13d, 0x50(%rbx)
jmp 0x2b642