// File: /workspace/github_c_makefile_star2_O3/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 0x12215
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 0x12215
movq %rsi, %rbx
leaq 0x60(%r12), %rbp
leaq 0x333c4(%rip), %r13     # 0x45474
movzbl (%r15), %eax
addl $-0x4, %eax
cmpl $0x6, %eax
ja 0x12215
movslq (%r13,%rax,4), %rax
addq %r13, %rax
jmpq *%rax
movb $0x66, 0xd0(%r12)
jmp 0x120f7
movq 0xb0(%r15), %rsi
xorl %edi, %edi
callq 0x1230d
movq %rax, (%rbp)
jmp 0x120fa
movq 0x58(%r15), %rsi
movl $0x4, %edi
callq 0x1230d
movq %r15, %r12
leaq 0x60(%r12), %rbp
movq 0x60(%r12), %r15
testq %r15, %r15
jne 0x120b0
jmp 0x12215
movb 0xd1(%r15), %al
testb $0x2, %al
jne 0x12215
orb $0x2, %al
movb %al, 0xd1(%r15)
movb $0x73, 0xd0(%r15)
cmpq $0x0, 0x98(%r15)
je 0x12215
movq 0x5aa8d(%rip), %r12     # 0x6cbd0
movq 0x30(%r15), %rax
leaq 0x57afa(%rip), %rcx     # 0x69c48
cmpq %rax, (%rcx)
je 0x1215f
leaq 0x57af6(%rip), %rcx     # 0x69c50
cmpq %rax, (%rcx)
jne 0x1216a
movq $0x0, 0x5aa66(%rip) # 0x6cbd0
cmpq $0x0, 0x18(%r15)
jne 0x12183
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x12a84
testb %al, %al
je 0x1218f
movq 0x5aa3e(%rip), %rax     # 0x6cbc8
movq %r15, %rdi
callq *(%rax)
cmpq $0x0, 0x18(%r15)
cmovneq %r15, %rbx
movq 0x98(%r15), %r15
testq %r15, %r15
je 0x1220e
movq %r15, %r13
movzwl (%r13), %eax
testb %al, %al
jle 0x12205
xorl %ebp, %ebp
movq 0x18(%r13,%rbp,8), %r14
movzwl %ax, %eax
cmpl $0x100, %eax            # imm = 0x100
jb 0x121c6
testq %r14, %r14
je 0x121f5
movq %r14, %rdi
movq %rbx, %rsi
callq 0x12065
movb $0x6d, 0xd0(%r14)
testq %rbx, %rbx
je 0x121f5
cmpq $0x0, 0x18(%r14)
je 0x121f5
movq 0x5a9dc(%rip), %rax     # 0x6cbc8
movq %rbx, %rdi
movq %r14, %rsi
callq *0x8(%rax)
incq %rbp
movl (%r13), %eax
movsbq %al, %rcx
cmpq %rcx, %rbp
jl 0x121b2
movq 0x10(%r13), %r13
cmpq %r15, %r13
jne 0x121a7
movq %r12, 0x5a9bb(%rip)     # 0x6cbd0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq