// File: /workspace/github_c_makefile_star2_O2/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 0x26819
movq %rdi, %rbx
movl 0x54(%rdi), %eax
btl $0xb, %eax
jb 0x2681b
orl $0x800, %eax            # imm = 0x800
movl %eax, 0x54(%rbx)
movl (%rbx), %eax
movzbl %al, %edx
cmpb $0xe, %dl
ja 0x26a16
leaq 0x19fa6(%rip), %rax     # 0x407ac
movslq (%rax,%rdx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq %rbx, %rdi
callq 0x26ffa
jmp 0x2681b
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 0x26ffa
movq 0x68(%rax), %rcx
andl $0xe000, %ecx           # imm = 0xE000
orq %rcx, 0x68(%rbx)
leaq 0x37eea(%rip), %rcx     # 0x5e734
movl (%rcx), %ecx
movl %ecx, 0x50(%rbx)
movl 0x50(%rax), %edx
cmpl %ecx, %edx
cmovgl %edx, %ecx
movl %ecx, 0x50(%rbx)
leaq 0x37ed7(%rip), %rcx     # 0x5e738
movslq (%rcx), %rcx
movq %rcx, 0x70(%rbx)
movq 0x70(%rax), %rax
cmpq %rcx, %rax
cmovaq %rax, %rcx
movq %rcx, 0x70(%rbx)
jmp 0x2681b
pushq $0x1
popq %rsi
movq %rbx, %rdi
jmp 0x268c5
movq 0xb0(%rbx), %rdi
callq 0x2d0ed
testq %rax, %rax
leaq 0x40021(%rip), %r14     # 0x668b8
cmovneq %rax, %r14
movzbl (%r14), %eax
cmpl $0x3, %eax
jne 0x26a2d
movq 0x68(%r14), %r15
movq 0x60(%r14), %r14
andl $0x400fe00, %r15d       # imm = 0x400FE00
movzbl (%r14), %eax
jmp 0x26a30
movq %rbx, %rdi
xorl %esi, %esi
callq 0x26dc4
jmp 0x2681b
cmpl $0x0, 0x50(%rbx)
jne 0x268e1
leaq 0x37e50(%rip), %rax     # 0x5e72c
movl (%rax), %eax
movl %eax, 0x50(%rbx)
cmpq $0x0, 0x70(%rbx)
jne 0x2681b
leaq 0x37e3d(%rip), %rax     # 0x5e730
movslq (%rax), %rax
movq %rax, 0x70(%rbx)
jmp 0x2681b
movq %rbx, %rdi
callq 0x26ffa
testq %rax, %rax
je 0x2681b
movq %rax, %r14
movq 0x58(%rbx), %r15
pushq $-0x1
popq %r13
testq %r15, %r15
je 0x26a7d
movslq 0x50(%r14), %r12
movq %r15, %rdi
callq 0xfed5
movq %r12, %rdi
movl %eax, %esi
callq 0x27a88
cmpb $0x1, (%r15)
jne 0x26a5f
movq %rax, %r13
jmp 0x26a7d
movq %rbx, %rdi
callq 0x26ffa
testq %rax, %rax
je 0x2681b
movq %rax, %r14
movl 0x50(%rbx), %eax
cmpl 0x50(%r14), %eax
jle 0x2699e
movq 0x18(%rbx), %rdi
callq 0x2936d
movq %rax, %r15
movl 0x50(%rbx), %ebp
movq %r14, %rdi
callq 0x20b5a
movq 0x4(%rbx), %rdi
leaq 0x1a10f(%rip), %rsi     # 0x40a9a
movq %r15, %rdx
movl %ebp, %ecx
movq %rax, %r8
xorl %eax, %eax
callq 0x1120e
orl $-0x1, 0x50(%rbx)
cmpq $0x0, 0x70(%rbx)
jne 0x269ad
movq 0x70(%r14), %rax
movq %rax, 0x70(%rbx)
movq 0x68(%r14), %rax
leaq 0x3a420(%rip), %rcx     # 0x60dd8
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 0x2681b
movq 0x18(%rbx), %rdi
callq 0x2936d
movq 0x4(%rbx), %rdi
leaq 0x19e3c(%rip), %rsi     # 0x4082c
jmp 0x26a05
movq %rbx, %rdi
callq 0x20b5a
movq 0x4(%rbx), %rdi
leaq 0x19e4b(%rip), %rsi     # 0x40850
xorl %ebx, %ebx
movq %rax, %rdx
xorl %eax, %eax
callq 0x1120e
jmp 0x2681b
movq 0x4(%rbx), %rdi
leaq 0x19e52(%rip), %rsi     # 0x40873
xorl %eax, %eax
callq 0x1120e
jmp 0x2681b
xorl %r15d, %r15d
cmpl $0xb, %eax
jne 0x26a47
movq 0x4(%r14), %rdi
leaq 0x1a089(%rip), %rsi     # 0x40ac9
xorl %eax, %eax
callq 0x1108a
movb $0x3, (%rbx)
movq %r15, 0x68(%rbx)
movq %r14, 0x60(%rbx)
movq %rbx, %rdi
callq 0x26abf
jmp 0x2681b
leaq 0x33b86(%rip), %rax     # 0x5a5ec
cmpl $0x0, (%rax)
je 0x26a7d
movq 0x8(%r15), %rdi
leaq 0x19f1b(%rip), %rsi     # 0x40991
xorl %eax, %eax
callq 0x1108a
movq %r14, %rdi
callq 0x27aaf
testl %eax, %eax
je 0x26aa7
leaq 0x33b1c(%rip), %rax     # 0x5a5ac
cmpl $0x0, (%rax)
je 0x26aa7
movq 0x4(%rbx), %rdi
leaq 0x19f10(%rip), %rsi     # 0x409b0
xorl %eax, %eax
callq 0x1108a
cmpq $0x0, 0x70(%rbx)
jne 0x26ab6
movq 0x70(%r14), %rax
movq %rax, 0x70(%rbx)
movl %r13d, 0x50(%rbx)
jmp 0x2681b