// File: /workspace/github_cpp_makefile_star2_O2/gpertea[P]gclib/./GHash.hh
// Function: old::GHash<int>::Resize(int)
void GHash<OBJ>::Resize(int m) {
	int i,n,p,x,h;
	GHashEntry *k;
	GASSERT(fCount<=fCapacity);
	if(m<DEF_HASH_SIZE) m=DEF_HASH_SIZE;
	n=fCapacity;
	while((n>>2)>m) n>>=1;            // Shrink until n/4 <= m
	while((n>>1)<m) n<<=1;            // Grow until m <= n/2
	GASSERT(m<=(n>>1));
	GASSERT(DEF_HASH_SIZE<=n);
	if(n!=fCapacity){
		GASSERT(m<=n);
		GMALLOC(k, sizeof(GHashEntry)*n);
		for(i=0; i<n; i++) k[i].hash=-1;
		for(i=0; i<fCapacity; i++){
			h=hash[i].hash;
			if(h>=0){
				p=HASH1(h,n);
				GASSERT(0<=p && p<n);
				x=HASH2(h,n);
				GASSERT(1<=x && x<n);
				while(k[p].hash!=-1) p=(p+x)%n;
				GASSERT(k[p].hash<0);
				k[p]=hash[i];
			}
		}
		GFREE(hash);
		hash=k;
		fCapacity=n;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %ebp
movl 0x10(%rdi), %eax
movq %rdi, (%rsp)
cmpl %eax, 0x14(%rdi)
jle 0xa737
leaq 0x20b6(%rip), %rdi      # 0xc7d5
leaq 0x2054(%rip), %rsi      # 0xc77a
movl $0xab, %edx
callq 0x258c
movq (%rsp), %rax
movl 0x10(%rax), %eax
cmpl $0x21, %ebp
pushq $0x20
popq %r14
cmovgel %ebp, %r14d
movl %eax, %edx
movl %edx, %ecx
movl %edx, %esi
sarl $0x2, %esi
sarl %edx
cmpl %r14d, %esi
jg 0xa744
movl %ecx, %r15d
movl %ecx, %edx
sarl %edx
leal (%r15,%r15), %ecx
cmpl %r14d, %edx
jl 0xa752
cmpl $0x1f, %r15d
jg 0xa787
leaq 0x2078(%rip), %rdi      # 0xc7e7
leaq 0x2004(%rip), %rsi      # 0xc77a
movl $0xb1, %edx
callq 0x258c
movq (%rsp), %rax
movl 0x10(%rax), %eax
cmpl %eax, %r15d
je 0xa8df
cmpl %r15d, %r14d
jle 0xa7ad
leaq 0x205c(%rip), %rdi      # 0xc7f8
leaq 0x1fd7(%rip), %rsi      # 0xc77a
movl $0xb3, %edx
callq 0x258c
movslq %r15d, %rax
imulq $0x18, %rax, %rsi
leaq 0x8(%rsp), %rdi
callq 0x415c
testb %al, %al
jne 0xa7d0
leaq 0x1857(%rip), %rdi      # 0xc020
xorl %eax, %eax
callq 0x25ca
movq 0x8(%rsp), %rax
xorl %ecx, %ecx
testl %r15d, %r15d
movl $0x0, %edx
cmovgl %r15d, %edx
imulq $0x18, %rdx, %rdx
cmpq %rcx, %rdx
je 0xa7f7
orl $-0x1, 0xc(%rax,%rcx)
addq $0x18, %rcx
jmp 0xa7e7
movq (%rsp), %rax
leaq 0x8(%rax), %r14
leal -0x1(%r15), %eax
movl %eax, 0x14(%rsp)
xorl %r12d, %r12d
movq (%rsp), %rax
movslq 0x10(%rax), %rax
cmpq %rax, %r12
jge 0xa8c6
movq (%r14), %rax
imulq $0x18, %r12, %r13
movl 0xc(%rax,%r13), %ebx
testl %ebx, %ebx
js 0xa8be
imull $0xd, %ebx, %eax
xorl %edx, %edx
divl %r15d
movl %edx, %ebp
testl %edx, %edx
js 0xa842
cmpl %r15d, %ebp
jl 0xa85a
leaq 0x1fb4(%rip), %rdi      # 0xc7fd
leaq 0x1f2a(%rip), %rsi      # 0xc77a
movl $0xba, %edx
callq 0x258c
imull $0x11, %ebx, %eax
xorl %edx, %edx
divl 0x14(%rsp)
movl %edx, %ebx
orl $0x1, %ebx
testl %edx, %edx
js 0xa871
cmpl %r15d, %ebx
jl 0xa889
leaq 0x1f91(%rip), %rdi      # 0xc809
leaq 0x1efb(%rip), %rsi      # 0xc77a
movl $0xbc, %edx
callq 0x258c
movq 0x8(%rsp), %rcx
movslq %ebp, %rax
imulq $0x18, %rax, %rax
cmpl $-0x1, 0xc(%rcx,%rax)
je 0xa8a8
addl %ebx, %ebp
movl %ebp, %eax
cltd
idivl %r15d
movl %edx, %ebp
jmp 0xa88e
movq (%r14), %rdx
movq 0x10(%rdx,%r13), %rsi
movq %rsi, 0x10(%rcx,%rax)
movups (%rdx,%r13), %xmm0
movups %xmm0, (%rcx,%rax)
incq %r12
jmp 0xa80a
movq %r14, %rdi
callq 0x420d
movq 0x8(%rsp), %rax
movq (%rsp), %rcx
movq %rax, 0x8(%rcx)
movl %r15d, 0x10(%rcx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq