// File: /workspace/github_c_makefile_star2_O2/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
subq $0x118, %rsp            # imm = 0x118
movb 0xd1(%rdi), %al
testb $0x1, %al
jne 0x11608
movq %rsi, %rbx
movq %rdi, %r15
movq 0x18(%rdi), %r13
orb $0x1, %al
movb %al, 0xd1(%rdi)
movb $0x76, 0xd0(%rdi)
leaq 0x2d021(%rip), %r12     # 0x3e474
pushq $0x4
popq %rbp
movq 0x60(%r15), %r14
testq %r14, %r14
je 0x11608
movzbl (%r14), %eax
addl $-0x4, %eax
cmpl $0x6, %eax
ja 0x11608
movslq (%r12,%rax,4), %rax
addq %r12, %rax
jmpq *%rax
movq 0xb0(%r14), %rsi
xorl %edi, %edi
callq 0x11701
movq %rax, 0x60(%r15)
jmp 0x11456
movb $0x66, 0xd0(%r15)
jmp 0x114a5
movq 0x58(%r14), %rsi
movl %ebp, %edi
callq 0x11701
movq %r14, %r15
jmp 0x11456
movb 0xd1(%r14), %al
testb $0x2, %al
jne 0x11608
orb $0x2, %al
movb %al, 0xd1(%r14)
movb $0x73, 0xd0(%r14)
movq 0x98(%r14), %r15
testq %r15, %r15
je 0x11608
movq 0x556ff(%rip), %r12     # 0x66be0
movq 0x30(%r14), %rax
leaq 0x5276c(%rip), %rcx     # 0x63c58
cmpq %rax, (%rcx)
je 0x114fd
leaq 0x52768(%rip), %rcx     # 0x63c60
cmpq %rax, (%rcx)
jne 0x11505
andq $0x0, 0x556db(%rip)     # 0x66be0
cmpq $0x0, 0x18(%r14)
jne 0x11581
testq %rbx, %rbx
je 0x1152e
movq 0x18(%rbx), %rcx
testq %r13, %r13
je 0x1153b
testq %rcx, %rcx
je 0x11548
movq %rcx, %r8
movzbl 0x10(%rcx), %eax
addq $0x12, %r8
movl %eax, %ecx
jmp 0x1154d
xorl %ecx, %ecx
movl $0x0, %r8d
testq %r13, %r13
jne 0x1154d
movq %rcx, 0x18(%r14)
testq %rcx, %rcx
cmovneq %r14, %rbx
jmp 0x115a2
xorl %ecx, %ecx
xorl %r8d, %r8d
movzbl 0x10(%r13), %r9d
addq $0x12, %r13
movq %r13, (%rsp)
leaq 0x2d031(%rip), %rdx     # 0x3e592
leaq 0x10(%rsp), %r15
movl $0x100, %esi            # imm = 0x100
movq %r15, %rdi
xorl %eax, %eax
callq 0xf090
movq %r15, %rdi
callq 0x21b51
movq %rax, 0x18(%r14)
movq 0x55650(%rip), %rax     # 0x66bd8
movq %r14, %rdi
callq *(%rax)
cmpq $0x0, 0x18(%r14)
movq 0x98(%r14), %r15
cmovneq %r14, %rbx
testq %r15, %r15
je 0x11601
movq %r15, %r13
xorl %ebp, %ebp
movl (%r13), %eax
movsbq %al, %rcx
cmpq %rcx, %rbp
jge 0x115f8
movq 0x18(%r13,%rbp,8), %r14
cmpw $0x100, %ax             # imm = 0x100
jb 0x115c4
testq %r14, %r14
je 0x115f3
movq %r14, %rdi
movq %rbx, %rsi
callq 0x11414
movb $0x6d, 0xd0(%r14)
testq %rbx, %rbx
je 0x115f3
cmpq $0x0, 0x18(%r14)
je 0x115f3
movq 0x555ee(%rip), %rax     # 0x66bd8
movq %rbx, %rdi
movq %r14, %rsi
callq *0x8(%rax)
incq %rbp
jmp 0x115a7
movq 0x10(%r13), %r13
cmpq %r15, %r13
jne 0x115a5
movq %r12, 0x555d8(%rip)     # 0x66be0
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq