// File: /workspace/github_cpp_makefile_star2_O1/gpertea[P]gclib/./GHash.hh
// Function: old::GHash<int>::Find(char const*, char**)
OBJ* GHash<OBJ>::Find(const char* ky, char** keyptr){
	int p,x,h,n;
	if(!ky){ GError("GHash::find: NULL key argument.\n"); }
	if (fCount==0) return NULL;
	h=GSTR_HASH(ky);
	GASSERT(0<=h);
	p=HASH1(h,fCapacity);
	GASSERT(0<=p && p<fCapacity);
	x=HASH2(h,fCapacity);
	GASSERT(1<=x && x<fCapacity);
	GASSERT(fCount<fCapacity);
	n=fCapacity;
#ifdef HASH_DBG_PRINT
	int iterations=0;
	int init_p=p;
	int init_x=x;
#endif
	while(n && hash[p].hash!=-1){
		if(hash[p].hash==h && strcmp(hash[p].key,ky)==0){
			if (keyptr!=NULL) *keyptr = hash[p].key;
#ifdef HASH_DBG_PRINT
			GMessage("Found \t%s\t%d,%d,%d\t%d\t%d\t%d\n",
					ky, h,init_p,init_x, iterations,  fCount, fCapacity);
#endif
			return (OBJ*)hash[p].data;
		}
		p=(p+x)%fCapacity;
		n--;
#ifdef HASH_DBG_PRINT
		++iterations;
#endif
	}
#ifdef HASH_DBG_PRINT
	GMessage("Nfound\t%s\t%d,%d,%d\t%d\t%d\t%d\n",
			ky, h,init_p,init_x, iterations,  fCount, fCapacity);
#endif
	return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r14
movq %rdi, %rbx
movq %rsi, 0x10(%rsp)
testq %rsi, %rsi
jne 0xbdde
leaq 0x29e1(%rip), %rdi      # 0xe7b8
xorl %eax, %eax
callq 0x289c
cmpl $0x0, 0x14(%rbx)
je 0xbf15
movq 0x10(%rsp), %rdi
callq 0x3e1e
movl %eax, %edi
testl %eax, %eax
movq %rdi, (%rsp)
jns 0xbe18
leaq 0x2902(%rip), %rdi      # 0xe705
leaq 0x28f0(%rip), %rsi      # 0xe6fa
movl $0x1c7, %edx            # imm = 0x1C7
callq 0x285c
movq (%rsp), %rdi
leal (%rdi,%rdi,2), %eax
leal (%rdi,%rax,4), %eax
movl 0x10(%rbx), %ecx
xorl %edx, %edx
divl %ecx
movl %edx, %ebp
testl %edx, %edx
setns %al
cmpl %ecx, %edx
setl %cl
testb %cl, %al
jne 0xbe51
leaq 0x28ce(%rip), %rdi      # 0xe70a
leaq 0x28b7(%rip), %rsi      # 0xe6fa
movl $0x1c9, %edx            # imm = 0x1C9
callq 0x285c
movq (%rsp), %rdi
movl %edi, %eax
shll $0x4, %eax
addl %edi, %eax
movl 0x10(%rbx), %ecx
leal -0x1(%rcx), %esi
xorl %edx, %edx
divl %esi
movl %edx, %esi
orl $0x1, %esi
testl %edx, %edx
setns %al
movl %esi, 0xc(%rsp)
cmpl %ecx, %esi
setl %cl
testb %cl, %al
jne 0xbe95
leaq 0x289e(%rip), %rdi      # 0xe71e
leaq 0x2873(%rip), %rsi      # 0xe6fa
movl $0x1cb, %edx            # imm = 0x1CB
callq 0x285c
movq (%rsp), %rdi
movl 0x14(%rbx), %eax
cmpl 0x10(%rbx), %eax
jl 0xbeb9
leaq 0x2845(%rip), %rdi      # 0xe6e9
leaq 0x284f(%rip), %rsi      # 0xe6fa
movl $0x1cc, %edx            # imm = 0x1CC
callq 0x285c
movq (%rsp), %rdi
movl 0x10(%rbx), %r12d
testl %r12d, %r12d
je 0xbf15
movq %r14, 0x18(%rsp)
movq %rbx, 0x20(%rsp)
movq 0x8(%rbx), %rbx
movl %r12d, %r15d
movslq %ebp, %rax
leaq (%rax,%rax,2), %r13
movl 0xc(%rbx,%r13,8), %eax
cmpl $-0x1, %eax
je 0xbf15
cmpl %edi, %eax
jne 0xbf04
leaq (%rbx,%r13,8), %rax
movq (%rax), %r14
movq %r14, %rdi
movq 0x10(%rsp), %rsi
callq 0x2350
movq (%rsp), %rdi
testl %eax, %eax
je 0xbf26
addl 0xc(%rsp), %ebp
movl %ebp, %eax
cltd
idivl %r12d
movl %edx, %ebp
decl %r15d
jne 0xbed3
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x18(%rsp), %rax
testq %rax, %rax
je 0xbf33
movq %r14, (%rax)
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax,%r13,8), %rax
jmp 0xbf17
nop