// File: /workspace/github_cpp_makefile_star2_O2/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, %r14
movq %rsi, 0x10(%rsp)
testq %rsi, %rsi
jne 0xa91a
leaq 0x1f25(%rip), %rdi      # 0xc838
xorl %eax, %eax
callq 0x25ca
cmpl $0x0, 0x14(%r14)
je 0xaa54
movq %rbx, 0x20(%rsp)
movq 0x10(%rsp), %rdi
callq 0x3a8c
movl %eax, %esi
testl %eax, %eax
movl %eax, 0x8(%rsp)
jns 0xa95a
leaq 0x1e40(%rip), %rdi      # 0xc785
leaq 0x1e2e(%rip), %rsi      # 0xc77a
movl $0x1c7, %edx            # imm = 0x1C7
callq 0x258c
movl 0x8(%rsp), %esi
imull $0xd, %esi, %eax
movl 0x10(%r14), %r13d
xorl %edx, %edx
divl %r13d
movl %edx, %r12d
testl %edx, %edx
setns %al
cmpl %r13d, %edx
setl %cl
testb %cl, %al
jne 0xa998
leaq 0x1e0b(%rip), %rdi      # 0xc78a
leaq 0x1df4(%rip), %rsi      # 0xc77a
movl $0x1c9, %edx            # imm = 0x1C9
callq 0x258c
movl 0x8(%rsp), %esi
movl 0x10(%r14), %r13d
imull $0x11, %esi, %eax
leal -0x1(%r13), %ecx
xorl %edx, %edx
divl %ecx
movl %edx, %ecx
orl $0x1, %ecx
testl %edx, %edx
setns %al
movl %ecx, 0xc(%rsp)
cmpl %r13d, %ecx
setl %cl
testb %cl, %al
jne 0xa9db
leaq 0x1ddc(%rip), %rdi      # 0xc79e
leaq 0x1db1(%rip), %rsi      # 0xc77a
movl $0x1cb, %edx            # imm = 0x1CB
callq 0x258c
movl 0x8(%rsp), %esi
movl 0x10(%r14), %r13d
cmpl %r13d, 0x14(%r14)
jl 0xaa01
leaq 0x1d81(%rip), %rdi      # 0xc769
leaq 0x1d8b(%rip), %rsi      # 0xc77a
movl $0x1cc, %edx            # imm = 0x1CC
callq 0x258c
movl 0x8(%rsp), %esi
movl 0x10(%r14), %r13d
movq %r14, 0x18(%rsp)
movq 0x8(%r14), %r15
movl %r13d, %ebp
subl $0x1, %ebp
jb 0xaa54
movslq %r12d, %rax
imulq $0x18, %rax, %r14
movl 0xc(%r15,%r14), %eax
cmpl $-0x1, %eax
je 0xaa54
cmpl %esi, %eax
jne 0xaa43
leaq (%r15,%r14), %rax
movq (%rax), %rbx
movq %rbx, %rdi
movq 0x10(%rsp), %rsi
callq 0x2350
movl 0x8(%rsp), %esi
testl %eax, %eax
je 0xaa65
addl 0xc(%rsp), %r12d
movl %r12d, %eax
cltd
idivl %r13d
movl %edx, %r12d
jmp 0xaa0d
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 0xaa7b
movq %rbx, (%rax)
movq 0x18(%rsp), %rax
movq 0x8(%rax), %r15
movq 0x10(%r15,%r14), %rax
jmp 0xaa56