// File: /workspace/github_c_makefile_star2_O0/lucvoo[P]sparse-dev/symbol.c
// Function: examine_base_type
static struct symbol *examine_base_type(struct symbol *sym)
{
	struct symbol *base_type;

	if (sym->ctype.base_type == &autotype_ctype) {
		struct symbol *type = evaluate_expression(sym->initializer);
		if (!type)
			type = &bad_ctype;
		if (is_bitfield_type(type)) {
			warning(sym->pos, "__auto_type on bitfield");
			if (type->type == SYM_NODE)
				type = type->ctype.base_type;
			type = type->ctype.base_type;
		}
		sym->ctype.base_type = type;
	}

	/* Check the base type */
	base_type = examine_symbol_type(sym->ctype.base_type);
	if (!base_type || base_type->type == SYM_PTR)
		return base_type;
	combine_address_space(sym->pos, &sym->ctype.as, base_type->ctype.as);
	sym->ctype.modifiers |= base_type->ctype.modifiers & MOD_PTRINHERIT;
	concat_ptr_list((struct ptr_list *)base_type->ctype.contexts,
			(struct ptr_list **)&sym->ctype.contexts);
	if (base_type->type == SYM_NODE) {
		base_type = base_type->ctype.base_type;
		sym->ctype.base_type = base_type;
		sym->rank = base_type->rank;
	}
	return base_type;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x52dd1(%rip), %rcx     # 0x92e58
cmpq %rcx, 0x60(%rax)
jne 0x4010b
movq -0x10(%rbp), %rax
movq 0xb0(%rax), %rdi
callq 0x4bb70
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x400b3
leaq 0x52be9(%rip), %rax     # 0x92c98
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x40700
cmpl $0xb, %eax
jne 0x400ff
movq -0x10(%rbp), %rax
movq 0x4(%rax), %rdi
leaq 0x295a1(%rip), %rsi     # 0x69671
movb $0x0, %al
callq 0x16d80
movq -0x20(%rbp), %rax
movl (%rax), %eax
andl $0xff, %eax
cmpl $0x3, %eax
jne 0x400f3
movq -0x20(%rbp), %rax
movq 0x60(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq 0x60(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x60(%rax)
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rdi
callq 0x3f650
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x40133
movq -0x18(%rbp), %rax
movl (%rax), %eax
andl $0xff, %eax
cmpl $0x4, %eax
jne 0x40140
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x401f5
movq -0x10(%rbp), %rax
movq -0x10(%rbp), %rsi
addq $0x48, %rsi
addq $0x18, %rsi
addq $0x20, %rsi
movq -0x18(%rbp), %rcx
movq 0x80(%rcx), %rdx
movq 0x4(%rax), %rdi
callq 0x3f5e0
movq -0x18(%rbp), %rax
movq 0x68(%rax), %rcx
andq $0x1c001e00, %rcx       # imm = 0x1C001E00
movq -0x10(%rbp), %rax
orq 0x68(%rax), %rcx
movq %rcx, 0x68(%rax)
movq -0x18(%rbp), %rax
movq 0x78(%rax), %rdi
movq -0x10(%rbp), %rsi
addq $0x48, %rsi
addq $0x18, %rsi
addq $0x18, %rsi
callq 0x31a70
movq -0x18(%rbp), %rax
movl (%rax), %eax
andl $0xff, %eax
cmpl $0x3, %eax
jne 0x401ed
movq -0x18(%rbp), %rax
movq 0x60(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x60(%rax)
movq -0x18(%rbp), %rax
movl 0x54(%rax), %edx
shll $0x6, %edx
sarl $0x1d, %edx
movq -0x10(%rbp), %rax
movl 0x54(%rax), %ecx
andl $0x7, %edx
shll $0x17, %edx
andl $0xfc7fffff, %ecx       # imm = 0xFC7FFFFF
orl %edx, %ecx
movl %ecx, 0x54(%rax)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nop