// File: /workspace/github_cpp_makefile_star2_O3/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
movq %rdi, %rbx
movl 0x10(%rdi), %eax
cmpl %eax, 0x14(%rdi)
jle 0xb9c0
leaq 0x2e79(%rip), %rdi      # 0xe825
leaq 0x2e17(%rip), %rsi      # 0xe7ca
movl $0xab, %edx
callq 0x282c
movl 0x10(%rbx), %eax
cmpl $0x21, %ebp
movl $0x20, %r14d
cmovgel %ebp, %r14d
movl %eax, %edx
movl %edx, %ecx
movl %edx, %esi
sarl $0x2, %esi
sarl %edx
cmpl %r14d, %esi
jg 0xb9cf
movl %ecx, %r15d
movl %ecx, %edx
sarl %edx
leal (%r15,%r15), %ecx
cmpl %r14d, %edx
jl 0xb9dd
cmpl $0x1f, %r15d
jg 0xba0e
leaq 0x2e3d(%rip), %rdi      # 0xe837
leaq 0x2dc9(%rip), %rsi      # 0xe7ca
movl $0xb1, %edx
callq 0x282c
movl 0x10(%rbx), %eax
cmpl %eax, %r15d
je 0xbc71
cmpl %r15d, %r14d
jle 0xba34
leaq 0x2e25(%rip), %rdi      # 0xe848
leaq 0x2da0(%rip), %rsi      # 0xe7ca
movl $0xb3, %edx
callq 0x282c
testl %r15d, %r15d
je 0xba51
movslq %r15d, %rax
shlq $0x3, %rax
leaq (%rax,%rax,2), %rdi
callq 0x2330
movq %rax, %r14
testq %rax, %rax
jne 0xba62
leaq 0x25c8(%rip), %rdi      # 0xe020
xorl %r14d, %r14d
xorl %eax, %eax
callq 0x286c
testl %r15d, %r15d
jle 0xbb70
movl %r15d, %eax
leal 0x3(%r15), %ecx
decq %rax
movq %rax, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
shrl $0x2, %ecx
shlq $0x5, %rcx
leaq (%rcx,%rcx,2), %rax
movdqa 0x29be(%rip), %xmm1     # 0xe450
movdqa 0x29c6(%rip), %xmm2     # 0xe460
xorl %ecx, %ecx
movdqa 0x29cc(%rip), %xmm3     # 0xe470
pxor %xmm3, %xmm0
pcmpeqd %xmm4, %xmm4
movdqa 0x29cc(%rip), %xmm5     # 0xe480
movdqa %xmm2, %xmm6
pxor %xmm3, %xmm6
movdqa %xmm6, %xmm7
pcmpgtd %xmm0, %xmm7
pcmpeqd %xmm0, %xmm6
pshufd $0xf5, %xmm6, %xmm8     # xmm8 = xmm6[1,1,3,3]
pand %xmm7, %xmm8
pshufd $0xf5, %xmm7, %xmm6     # xmm6 = xmm7[1,1,3,3]
por %xmm8, %xmm6
movd %xmm6, %edx
notl %edx
testb $0x1, %dl
je 0xbaf1
movl $0xffffffff, 0xc(%r14,%rcx) # imm = 0xFFFFFFFF
pxor %xmm4, %xmm6
pextrw $0x4, %xmm6, %edx
testb $0x1, %dl
je 0xbb08
movl $0xffffffff, 0x24(%r14,%rcx) # imm = 0xFFFFFFFF
movdqa %xmm1, %xmm6
pxor %xmm3, %xmm6
movdqa %xmm6, %xmm7
pcmpgtd %xmm0, %xmm7
pcmpeqd %xmm0, %xmm6
pshufd $0xf5, %xmm6, %xmm8     # xmm8 = xmm6[1,1,3,3]
pand %xmm7, %xmm8
pshufd $0xf5, %xmm7, %xmm6     # xmm6 = xmm7[1,1,3,3]
por %xmm8, %xmm6
pxor %xmm4, %xmm6
pextrw $0x0, %xmm6, %edx
testb $0x1, %dl
je 0xbb48
movl $0xffffffff, 0x3c(%r14,%rcx) # imm = 0xFFFFFFFF
pextrw $0x4, %xmm6, %edx
testb $0x1, %dl
je 0xbb5b
movl $0xffffffff, 0x54(%r14,%rcx) # imm = 0xFFFFFFFF
paddq %xmm5, %xmm2
paddq %xmm5, %xmm1
addq $0x60, %rcx
cmpq %rcx, %rax
jne 0xbab4
movl 0x10(%rbx), %eax
testl %eax, %eax
movq %rbx, 0x10(%rsp)
jle 0xbc56
leal -0x1(%r15), %ecx
movl %ecx, 0xc(%rsp)
movq 0x8(%rbx), %rdi
xorl %r12d, %r12d
leaq (%r12,%r12,2), %r13
movl 0xc(%rdi,%r13,8), %ebx
testl %ebx, %ebx
js 0xbc45
leal (%rbx,%rbx,2), %eax
leal (%rbx,%rax,4), %eax
xorl %edx, %edx
divl %r15d
movl %edx, %ebp
testl %edx, %edx
js 0xbbb6
cmpl %r15d, %ebp
jl 0xbbce
leaq 0x2c90(%rip), %rdi      # 0xe84d
leaq 0x2c06(%rip), %rsi      # 0xe7ca
movl $0xba, %edx
callq 0x282c
movl %ebx, %eax
shll $0x4, %eax
addl %ebx, %eax
xorl %edx, %edx
divl 0xc(%rsp)
movl %edx, %ebx
orl $0x1, %ebx
testl %edx, %edx
js 0xbbe9
cmpl %r15d, %ebx
jl 0xbc01
leaq 0x2c69(%rip), %rdi      # 0xe859
leaq 0x2bd3(%rip), %rsi      # 0xe7ca
movl $0xbc, %edx
callq 0x282c
movslq %ebp, %rax
leaq (%rax,%rax,2), %rcx
cmpl $-0x1, 0xc(%r14,%rcx,8)
je 0xbc1f
addl %ebx, %ebp
movl %ebp, %eax
cltd
idivl %r15d
movl %edx, %ebp
movslq %edx, %rax
jmp 0xbc04
movq 0x10(%rsp), %rdx
movq 0x8(%rdx), %rdi
leaq (%rax,%rax,2), %rax
movq 0x10(%rdi,%r13,8), %rcx
movq %rcx, 0x10(%r14,%rax,8)
movdqu (%rdi,%r13,8), %xmm0
movdqu %xmm0, (%r14,%rax,8)
movl 0x10(%rdx), %eax
incq %r12
movslq %eax, %rcx
cmpq %rcx, %r12
jl 0xbb8f
jmp 0xbc5f
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0xbc64
callq 0x22e0
movq 0x10(%rsp), %rax
movq %r14, 0x8(%rax)
movl %r15d, 0x10(%rax)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq