// File: /workspace/github_cpp_makefile_star2_O3/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, %rbx
movq %rdi, %r15
movq %rsi, 0x10(%rsp)
testq %rsi, %rsi
jne 0xbcac
leaq 0x2be3(%rip), %rdi      # 0xe888
xorl %eax, %eax
callq 0x286c
cmpl $0x0, 0x14(%r15)
je 0xbdec
movq 0x10(%rsp), %rdi
callq 0x3d9c
movl %eax, %esi
testl %eax, %eax
movq %rsi, (%rsp)
jns 0xbce7
leaq 0x2b03(%rip), %rdi      # 0xe7d5
leaq 0x2af1(%rip), %rsi      # 0xe7ca
movl $0x1c7, %edx            # imm = 0x1C7
callq 0x282c
movq (%rsp), %rsi
leal (%rsi,%rsi,2), %eax
leal (%rsi,%rax,4), %eax
movl 0x10(%r15), %r14d
xorl %edx, %edx
divl %r14d
movl %edx, %ebp
testl %edx, %edx
setns %al
cmpl %r14d, %edx
setl %cl
testb %cl, %al
jne 0xbd27
leaq 0x2acc(%rip), %rdi      # 0xe7da
leaq 0x2ab5(%rip), %rsi      # 0xe7ca
movl $0x1c9, %edx            # imm = 0x1C9
callq 0x282c
movq (%rsp), %rsi
movl 0x10(%r15), %r14d
movl %esi, %eax
shll $0x4, %eax
addl %esi, %eax
leal -0x1(%r14), %ecx
xorl %edx, %edx
divl %ecx
movl %edx, %ecx
orl $0x1, %ecx
testl %edx, %edx
setns %al
movl %ecx, 0xc(%rsp)
cmpl %r14d, %ecx
setl %cl
testb %cl, %al
jne 0xbd6e
leaq 0x2a99(%rip), %rdi      # 0xe7ee
leaq 0x2a6e(%rip), %rsi      # 0xe7ca
movl $0x1cb, %edx            # imm = 0x1CB
callq 0x282c
movq (%rsp), %rsi
movl 0x10(%r15), %r14d
cmpl %r14d, 0x14(%r15)
jl 0xbd94
leaq 0x2a3e(%rip), %rdi      # 0xe7b9
leaq 0x2a48(%rip), %rsi      # 0xe7ca
movl $0x1cc, %edx            # imm = 0x1CC
callq 0x282c
movq (%rsp), %rsi
movl 0x10(%r15), %r14d
testl %r14d, %r14d
je 0xbdec
movq %rbx, 0x20(%rsp)
movq %r15, 0x18(%rsp)
movq 0x8(%r15), %r15
movl %r14d, %r12d
movslq %ebp, %rax
leaq (%rax,%rax,2), %r13
movl 0xc(%r15,%r13,8), %eax
cmpl $-0x1, %eax
je 0xbdec
cmpl %esi, %eax
jne 0xbddb
leaq (%r15,%r13,8), %rax
movq (%rax), %rbx
movq %rbx, %rdi
movq 0x10(%rsp), %rsi
callq 0x2350
movq (%rsp), %rsi
testl %eax, %eax
je 0xbdfd
addl 0xc(%rsp), %ebp
movl %ebp, %eax
cltd
idivl %r14d
movl %edx, %ebp
decl %r12d
jne 0xbdaa
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0xbe13
movq %rbx, (%rax)
movq 0x18(%rsp), %rax
movq 0x8(%rax), %r15
movq 0x10(%r15,%r13,8), %rax
jmp 0xbdee