// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movb 0xd1(%rax), %al
andb $0x1, %al
cmpb $0x0, %al
je 0x15181
jmp 0x153c3
movq -0x8(%rbp), %rax
movb 0xd1(%rax), %cl
andb $-0x2, %cl
orb $0x1, %cl
movb %cl, 0xd1(%rax)
movq -0x8(%rbp), %rax
movb $0x76, 0xd0(%rax)
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x153c3
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
addl $-0x4, %eax
movl %eax, %ecx
movq %rcx, -0x58(%rbp)
subl $0x6, %eax
ja 0x153bc
movq -0x58(%rbp), %rax
leaq 0x53318(%rip), %rcx     # 0x684f4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x20(%rbp), %rax
movq 0xb0(%rax), %rsi
xorl %edi, %edi
callq 0x15540
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x60(%rax)
jmp 0x153be
movq -0x20(%rbp), %rax
movq 0x58(%rax), %rsi
movl $0x4, %edi
callq 0x15540
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x153be
movq -0x8(%rbp), %rax
movb $0x66, 0xd0(%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x153be
movq -0x20(%rbp), %rax
movb 0xd1(%rax), %al
shrb %al
andb $0x1, %al
cmpb $0x0, %al
je 0x15255
jmp 0x153c3
movq -0x20(%rbp), %rax
movb 0xd1(%rax), %cl
andb $-0x3, %cl
orb $0x2, %cl
movb %cl, 0xd1(%rax)
movq -0x20(%rbp), %rax
movb $0x73, 0xd0(%rax)
movq -0x20(%rbp), %rax
cmpq $0x0, 0x98(%rax)
jne 0x15289
jmp 0x153c3
movq 0x7fd80(%rip), %rax     # 0x95010
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0x15dd0
cmpl $0x0, %eax
je 0x152b1
movq $0x0, 0x7fd5f(%rip) # 0x95010
movq -0x20(%rbp), %rax
cmpq $0x0, 0x18(%rax)
jne 0x152d3
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rdx
callq 0x15e10
testb $0x1, %al
jne 0x152d3
jmp 0x152e3
movq 0x7fd2e(%rip), %rax     # 0x95008
movq (%rax), %rax
movq -0x20(%rbp), %rdi
callq *%rax
movq -0x20(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x152f6
movq -0x20(%rbp), %rax
movq %rax, -0x10(%rbp)
jmp 0x152f8
jmp 0x152fa
movq -0x20(%rbp), %rax
movq 0x98(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x15325
jmp 0x153af
jmp 0x15327
movl $0x0, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
movq -0x40(%rbp), %rcx
movw (%rcx), %cx
shlw $0x8, %cx
sarw $0x8, %cx
movswl %cx, %ecx
cmpl %ecx, %eax
jge 0x15397
movq -0x40(%rbp), %rax
movslq -0x4c(%rbp), %rcx
movq 0x18(%rax,%rcx,8), %rax
movq %rax, -0x30(%rbp)
movq -0x40(%rbp), %rax
movw (%rax), %ax
sarw $0x8, %ax
cwtl
cmpl $0x0, %eax
je 0x15372
cmpq $0x0, -0x30(%rbp)
jne 0x15372
jmp 0x1538c
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x15150
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x15f40
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x1532e
jmp 0x15399
movq -0x40(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x40(%rbp)
cmpq -0x38(%rbp), %rax
jne 0x15327
jmp 0x153b1
movq -0x28(%rbp), %rax
movq %rax, 0x7fc54(%rip)     # 0x95010
jmp 0x153c3
jmp 0x151a2
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)