// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x56ae
cmpq $0x0, -0x18(%rbp)
jne 0x56d0
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq 0x2d9b7(%rip), %rdi     # 0x33074
movb $0x0, %al
callq 0x4120
movl $0x0, -0x4(%rbp)
jmp 0x58d3
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x5868
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x5866
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x5856
movq -0x30(%rbp), %rax
cmpq -0x18(%rbp), %rax
jne 0x580c
jmp 0x572c
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rsi
movq -0x18(%rbp), %rax
movl 0x24(%rax), %edx
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %r8
leaq 0x2d933(%rip), %rdi     # 0x3307d
movb $0x0, %al
callq 0x4120
movq -0x18(%rbp), %rax
cmpq $0x0, 0x30(%rax)
je 0x577a
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0xacc0
movq %rax, %rsi
leaq 0x2d92b(%rip), %rdi     # 0x3309e
movb $0x0, %al
callq 0x4120
leaq 0x424cb(%rip), %rax     # 0x47c4c
movl (%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x5800
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
movq %rax, -0x38(%rbp)
subq $0x3, %rax
ja 0x57f0
movq -0x38(%rbp), %rax
leaq 0x2d885(%rip), %rcx     # 0x3302c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x2d8f2(%rip), %rdi     # 0x330a9
movb $0x0, %al
callq 0x4120
jmp 0x57fe
leaq 0x2d8e6(%rip), %rdi     # 0x330ad
movb $0x0, %al
callq 0x4120
jmp 0x57fe
leaq 0x2d8dd(%rip), %rdi     # 0x330b4
movb $0x0, %al
callq 0x4120
jmp 0x57fe
leaq 0x2d8d2(%rip), %rdi     # 0x330b9
movb $0x0, %al
callq 0x4120
jmp 0x57fe
leaq 0x2d8d3(%rip), %rdi     # 0x330ca
movb $0x0, %al
callq 0x4120
jmp 0x5800
movl $0x1, -0x4(%rbp)
jmp 0x58d3
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rsi
callq 0x4180
cmpl $0x0, %eax
jne 0x5841
leaq 0x2d89b(%rip), %rdi     # 0x330d0
movb $0x0, %al
callq 0x4120
jmp 0x572c
jmp 0x5843
jmp 0x5845
movq -0x30(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x5711
jmp 0x5858
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x56ee
jmp 0x5868
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x5690
cmpl $0x0, %eax
je 0x5887
movl $0x1, -0x4(%rbp)
jmp 0x58d3
leaq 0x2d851(%rip), %rdi     # 0x330df
movb $0x0, %al
callq 0x4120
movl $0x1, 0x42301(%rip)     # 0x47ba0
movq -0x10(%rbp), %rdi
movq 0x3f726(%rip), %rax     # 0x44fd0
movq (%rax), %rdx
xorl %esi, %esi
callq 0x58e0
movl $0x0, 0x422e2(%rip)     # 0x47ba0
leaq 0x2d834(%rip), %rdi     # 0x330f9
movb $0x0, %al
callq 0x4120
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)