// File: /workspace/github_c_makefile_star2_O1/lucvoo[P]sparse-dev/dissect.c
// Function: examine_sym_node
static void examine_sym_node(struct symbol *node, struct symbol *parent)
{
	struct ident *name = node->ident;
	struct symbol *base, *dctx;

	if (node->visited)
		return;
	node->visited = 1;
	node->kind = 'v';

	while ((base = node->ctype.base_type) != NULL)
		switch (base->type) {
		case SYM_TYPEOF:
			node->ctype.base_type =
				do_expression(U_VOID, base->initializer);
			break;

		case SYM_ARRAY:
			do_expression(U_R_VAL, base->array_size);
		case SYM_PTR:
			node = base;
			break;

		case SYM_FN:
			node->kind = 'f';
			node = base;
			break;

		case SYM_STRUCT: case SYM_UNION: //case SYM_ENUM:
			if (base->inspected)
				return;
			base->inspected = 1;
			base->kind = 's';

			if (!base->symbol_list)
				return;

			dctx = dissect_ctx;
			if (toplevel(base->scope))
				dissect_ctx = NULL;

			if (base->ident || deanon(base, name, parent))
				reporter->r_symdef(base);

			if (base->ident)
				parent = base;
			DO_LIST(base->symbol_list, mem,
				examine_sym_node(mem, parent);
				report_memdef(parent, mem));
			dissect_ctx = dctx;
		default:
			return;
		}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movb 0xd1(%rdi), %al
testb $0x1, %al
jne 0x12264
movq %rdi, %r12
movq 0x18(%rdi), %r14
orb $0x1, %al
movb %al, 0xd1(%rdi)
movb $0x76, 0xd0(%rdi)
movq 0x60(%rdi), %r15
testq %r15, %r15
je 0x12264
movq %rsi, %rbx
leaq 0x60(%r12), %rbp
leaq 0x34375(%rip), %r13     # 0x46474
movzbl (%r15), %eax
addl $-0x4, %eax
cmpl $0x6, %eax
ja 0x12264
movslq (%r13,%rax,4), %rax
addq %r13, %rax
jmpq *%rax
movb $0x66, 0xd0(%r12)
jmp 0x12146
movq 0xb0(%r15), %rsi
xorl %edi, %edi
callq 0x1235c
movq %rax, (%rbp)
jmp 0x12149
movq 0x58(%r15), %rsi
movl $0x4, %edi
callq 0x1235c
movq %r15, %r12
leaq 0x60(%r12), %rbp
movq 0x60(%r12), %r15
testq %r15, %r15
jne 0x120ff
jmp 0x12264
movb 0xd1(%r15), %al
testb $0x2, %al
jne 0x12264
orb $0x2, %al
movb %al, 0xd1(%r15)
movb $0x73, 0xd0(%r15)
cmpq $0x0, 0x98(%r15)
je 0x12264
movq 0x5ca3e(%rip), %r12     # 0x6ebd0
movq 0x30(%r15), %rax
leaq 0x59aab(%rip), %rcx     # 0x6bc48
cmpq %rax, (%rcx)
je 0x121ae
leaq 0x59aa7(%rip), %rcx     # 0x6bc50
cmpq %rax, (%rcx)
jne 0x121b9
movq $0x0, 0x5ca17(%rip) # 0x6ebd0
cmpq $0x0, 0x18(%r15)
jne 0x121d2
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x12a81
testb %al, %al
je 0x121de
movq 0x5c9ef(%rip), %rax     # 0x6ebc8
movq %r15, %rdi
callq *(%rax)
cmpq $0x0, 0x18(%r15)
cmovneq %r15, %rbx
movq 0x98(%r15), %r15
testq %r15, %r15
je 0x1225d
movq %r15, %r13
movzwl (%r13), %eax
testb %al, %al
jle 0x12254
xorl %ebp, %ebp
movq 0x18(%r13,%rbp,8), %r14
movzwl %ax, %eax
cmpl $0x100, %eax            # imm = 0x100
jb 0x12215
testq %r14, %r14
je 0x12244
movq %r14, %rdi
movq %rbx, %rsi
callq 0x120b4
movb $0x6d, 0xd0(%r14)
testq %rbx, %rbx
je 0x12244
cmpq $0x0, 0x18(%r14)
je 0x12244
movq 0x5c98d(%rip), %rax     # 0x6ebc8
movq %rbx, %rdi
movq %r14, %rsi
callq *0x8(%rax)
incq %rbp
movl (%r13), %eax
movsbq %al, %rcx
cmpq %rcx, %rbp
jl 0x12201
movq 0x10(%r13), %r13
cmpq %r15, %r13
jne 0x121f6
movq %r12, 0x5c96c(%rip)     # 0x6ebd0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq