// File: /workspace/github_c_makefile_star2_O2/nimble-code[P]Modex/Src/symtab.c
// Function: find_symbol
int
find_symbol(scopetab_t *st, symentry_t *se)
{	int i;
	hashtab_t *h;
	symentry_t *e;

	if (!st || !se) { printf("<%p,%p> ",st,se); return 0; }

	h = st->htab;

	if (h)
	for (i = 0; i < h->tsize; i++)
	for (e = h->tab[i]; e; e = e->next)
	{	if (e == se)
		{
same:			printf("%s:%d: (scopetab %p symentry %p)", se->fn, se->ln, st, se);

			if (se->container)
			{	printf("cont:<%s> ",
					x_stmnt(se->container));
			}

			if (Verbose&2)
			{	switch (st->level) {
				case  0: printf("Top"); break;
				case  1: printf("Global"); break;
				case  2: printf("File"); break;
				case  3: printf("Struct/FctParams"); break;
				default: printf("Block"); break;
				}
			}
			return 1;
		} else if (strcmp(e->nme->str, se->nme->str) == 0)
		{	if (1 || (Verbose&2))
			{	printf("<rogue match> ");
				goto same;
			}
			return 0;
	}	}

	if (find_symbol(st->parent, se))
		return 1;

	printf("\n===couldn't find it:===\n");
	visu = 1;
	show_scopetab(st, 0, stdout);
	visu = 0;
	printf("===\n\t");

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
testq %rdi, %rdi
setne %al
testq %rsi, %rsi
setne %cl
testb %cl, %al
je 0x4d3f
movq 0x8(%rbx), %r15
testq %r15, %r15
je 0x4d5a
movl (%r15), %r12d
xorl %r13d, %r13d
testl %r12d, %r12d
cmovlel %r13d, %r12d
cmpq %r12, %r13
je 0x4d5a
leaq (,%r13,8), %rbp
addq 0x8(%r15), %rbp
movq (%rbp), %rbp
testq %rbp, %rbp
je 0x4d3a
cmpq %r14, %rbp
je 0x4d84
movq 0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq 0x8(%r14), %rax
movq 0x8(%rax), %rsi
callq 0x41b0
addq $0x38, %rbp
testl %eax, %eax
jne 0x4d0d
jmp 0x4d76
incq %r13
jmp 0x4cfc
leaq 0x1b337(%rip), %rdi     # 0x2007d
xorl %ebp, %ebp
movq %rbx, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0x4140
jmp 0x4e59
movq 0x10(%rbx), %rdi
movq %r14, %rsi
callq 0x4cc5
testl %eax, %eax
je 0x4df4
pushq $0x1
popq %rbp
jmp 0x4e59
leaq 0x1b35c(%rip), %rdi     # 0x200d9
xorl %eax, %eax
callq 0x4140
movq 0x28(%r14), %rsi
movl 0x24(%r14), %edx
leaq 0x1b2f3(%rip), %rdi     # 0x20086
movq %rbx, %rcx
movq %r14, %r8
xorl %eax, %eax
callq 0x4140
movq 0x30(%r14), %rdi
testq %rdi, %rdi
je 0x4dbf
callq 0x8c38
leaq 0x1b2f2(%rip), %rdi     # 0x200a7
movq %rax, %rsi
xorl %eax, %eax
callq 0x4140
leaq 0x31cb6(%rip), %rax     # 0x36a7c
pushq $0x1
popq %rbp
testb $0x2, (%rax)
je 0x4e59
movl 0x4(%rbx), %eax
cmpq $0x3, %rax
ja 0x4e4b
leaq 0x1b266(%rip), %rcx     # 0x20048
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x1b2c0(%rip), %rdi     # 0x200b2
jmp 0x4e52
leaq 0x1b3f5(%rip), %rdi     # 0x201f0
callq 0x40d0
movl $0x1, 0x31bce(%rip)     # 0x369d8
movq 0x2f1bf(%rip), %rax     # 0x33fd0
movq (%rax), %rdx
xorl %ebp, %ebp
movq %rbx, %rdi
xorl %esi, %esi
callq 0x4e6a
andl $0x0, 0x31bb1(%rip)     # 0x369d8
leaq 0x1b2ba(%rip), %rdi     # 0x200e8
jmp 0x4e52
leaq 0x1b286(%rip), %rdi     # 0x200bd
jmp 0x4e52
leaq 0x1b282(%rip), %rdi     # 0x200c2
jmp 0x4e52
leaq 0x1b26d(%rip), %rdi     # 0x200b6
jmp 0x4e52
leaq 0x1b281(%rip), %rdi     # 0x200d3
xorl %eax, %eax
callq 0x4140
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq