// File: 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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rcx
movq %rcx, -0x30(%rbp)
movl 0x14(%rcx), %eax
cmpl 0x10(%rcx), %eax
jg 0x116d1
jmp 0x116e9
leaq 0x30ed(%rip), %rdi      # 0x147c5
leaq 0x308b(%rip), %rsi      # 0x1476a
movl $0xab, %edx
callq 0x25e0
cmpl $0x20, -0xc(%rbp)
jge 0x116f6
movl $0x20, -0xc(%rbp)
movq -0x30(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
sarl $0x2, %eax
cmpl -0xc(%rbp), %eax
jle 0x11715
movl -0x14(%rbp), %eax
sarl %eax
movl %eax, -0x14(%rbp)
jmp 0x11700
jmp 0x11717
movl -0x14(%rbp), %eax
sarl %eax
cmpl -0xc(%rbp), %eax
jge 0x1172b
movl -0x14(%rbp), %eax
shll %eax
movl %eax, -0x14(%rbp)
jmp 0x11717
movl -0xc(%rbp), %eax
movl -0x14(%rbp), %ecx
sarl %ecx
cmpl %ecx, %eax
jg 0x11739
jmp 0x11751
leaq 0x3097(%rip), %rdi      # 0x147d7
leaq 0x3023(%rip), %rsi      # 0x1476a
movl $0xb0, %edx
callq 0x25e0
movl $0x20, %eax
cmpl -0x14(%rbp), %eax
jg 0x1175d
jmp 0x11775
leaq 0x307d(%rip), %rdi      # 0x147e1
leaq 0x2fff(%rip), %rsi      # 0x1476a
movl $0xb1, %edx
callq 0x25e0
movq -0x30(%rbp), %rcx
movl -0x14(%rbp), %eax
cmpl 0x10(%rcx), %eax
je 0x11965
movl -0xc(%rbp), %eax
cmpl -0x14(%rbp), %eax
jg 0x1178f
jmp 0x117a7
leaq 0x305c(%rip), %rdi      # 0x147f2
leaq 0x2fcd(%rip), %rsi      # 0x1476a
movl $0xb3, %edx
callq 0x25e0
movslq -0x14(%rbp), %rax
imulq $0x18, %rax, %rsi
leaq -0x28(%rbp), %rdi
callq 0x58f0
testb $0x1, %al
jne 0x117ca
leaq 0x2860(%rip), %rdi      # 0x14023
movb $0x0, %al
callq 0x2640
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x117fa
movq -0x28(%rbp), %rax
movslq -0x10(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl $0xffffffff, 0xc(%rax)  # imm = 0xFFFFFFFF
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x117d1
movl $0x0, -0x10(%rbp)
movq -0x30(%rbp), %rcx
movl -0x10(%rbp), %eax
cmpl 0x10(%rcx), %eax
jge 0x11946
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x10(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
movl %eax, -0x20(%rbp)
cmpl $0x0, -0x20(%rbp)
jl 0x11936
imull $0xd, -0x20(%rbp), %eax
xorl %edx, %edx
divl -0x14(%rbp)
movl %edx, -0x18(%rbp)
xorl %eax, %eax
cmpl -0x18(%rbp), %eax
jg 0x11851
movl -0x18(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x11851
jmp 0x11869
leaq 0x2f9f(%rip), %rdi      # 0x147f7
leaq 0x2f0b(%rip), %rsi      # 0x1476a
movl $0xba, %edx
callq 0x25e0
imull $0x11, -0x20(%rbp), %eax
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
xorl %edx, %edx
divl %ecx
orl $0x1, %edx
movl %edx, -0x1c(%rbp)
movl $0x1, %eax
cmpl -0x1c(%rbp), %eax
jg 0x11891
movl -0x1c(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x11891
jmp 0x118a9
leaq 0x2f6b(%rip), %rdi      # 0x14803
leaq 0x2ecb(%rip), %rsi      # 0x1476a
movl $0xbc, %edx
callq 0x25e0
jmp 0x118ab
movq -0x28(%rbp), %rax
movslq -0x18(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
cmpl $-0x1, 0xc(%rax)
je 0x118cf
movl -0x18(%rbp), %eax
addl -0x1c(%rbp), %eax
cltd
idivl -0x14(%rbp)
movl %edx, -0x18(%rbp)
jmp 0x118ab
movq -0x28(%rbp), %rax
movslq -0x18(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0xc(%rax)
jge 0x118e6
jmp 0x118fe
leaq 0x2f22(%rip), %rdi      # 0x1480f
leaq 0x2e76(%rip), %rsi      # 0x1476a
movl $0xbe, %edx
callq 0x25e0
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rcx
movslq -0x10(%rbp), %rax
imulq $0x18, %rax, %rax
addq %rax, %rcx
movq -0x28(%rbp), %rax
movslq -0x18(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rax)
jmp 0x11938
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x11801
movq -0x30(%rbp), %rdi
addq $0x8, %rdi
callq 0x5a90
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl -0x14(%rbp), %ecx
movl %ecx, 0x10(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)