// File: /workspace/github_cpp_makefile_star2_O3/gpertea[P]gclib/htest.cpp
// Function: run_GHash(GResUsage&, GPVec<HStrData>&, char const*)
void run_GHash(GResUsage& swatch, GPVec<HStrData> & hstrs, const char* label) {
	old::GHash<int> ghash; // @suppress("Type cannot be resolved")
	int num_add=0, num_rm=0, num_clr=0;
	GMessage("----------------- %s ----------------\n", label);
	ghash.Clear();
	swatch.start();
	int cl_i=0;
	int prevcmd=2;
	for (int i=0;i<hstrs.Count();i++) {
			  if (hstrs[i]->cmd==prevcmd) {
				  if (prevcmd==2) continue;
			  } else prevcmd=hstrs[i]->cmd;
			  switch (hstrs[i]->cmd) {
				case 0:
					if (cl_i==0) cl_i=i;
					ghash.fAdd(hstrs[i]->str.chars(), new int(i));
					num_add++;
					break;
				case 1:
					if (qryMode) break;
					ghash.Remove(hstrs[i]->str.chars());
					num_rm++;
					break;
				case 2:
					//run tests here
					if (qryMode) {
						//run some query tests here
						for(int j=cl_i;j<i;j+=3) {
							if (hstrs[j]->cmd) continue;
							int* v=ghash[hstrs[j]->str.chars()];
							if (v==NULL)
								GError("Error at <%s>, key %s not found (count:%d, cl_i=%d, i=%d)!\n",label, hstrs[j]->str.chars(),
										ghash.Count(), cl_i, i );
							if (*v!=j)
								GError("Error at <%s>, invalid value for key %s!\n",label, hstrs[j]->str.chars() );
						}
					}
					cl_i=0;
					ghash.Clear();
					num_clr++;
					break;
			  }
	}
	swatch.stop();
	ghash.Clear();
	GMessage("  (%d inserts, %d deletions, %d clears)\n", num_add, num_rm, num_clr);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x28(%rsp), %rdi
movl $0x1, %esi
callq 0xad2e
leaq 0x5003(%rip), %rdi      # 0xe531
movq %r14, 0x18(%rsp)
movq %r14, %rsi
xorl %eax, %eax
callq 0x2470
leaq 0x28(%rsp), %rdi
callq 0xadac
movq %rbx, %rdi
callq 0x8da2
movq %rbx, 0x20(%rsp)
movl 0x10(%r15), %eax
testl %eax, %eax
jle 0x97e9
movl $0x2, %ebp
leaq 0x520b(%rip), %r13      # 0xe777
xorl %r12d, %r12d
movl $0x0, 0x14(%rsp)
movl $0x0, 0x8(%rsp)
movl $0x0, 0x10(%rsp)
movl $0x0, 0xc(%rsp)
movq 0x8(%r15), %rcx
movq (%rcx,%r12,8), %rdx
movl (%rdx), %edx
cmpl %ebp, %edx
jne 0x95ac
cmpl $0x2, %ebp
jne 0x95d1
movl $0x2, %ebp
jmp 0x97d7
movslq %eax, %rsi
movl %edx, %ebp
cmpq %rsi, %r12
jl 0x95d1
movq %r13, %rdi
movl %r12d, %esi
xorl %eax, %eax
callq 0x286c
movq 0x8(%r15), %rcx
movq (%rcx,%r12,8), %rax
movl (%rax), %ebp
movl 0x10(%r15), %eax
cltq
cmpq %rax, %r12
jl 0x95e9
movq %r13, %rdi
movl %r12d, %esi
xorl %eax, %eax
callq 0x286c
movq 0x8(%r15), %rcx
movq (%rcx,%r12,8), %rax
movl (%rax), %ecx
cmpl $0x2, %ecx
je 0x96a5
cmpl $0x1, %ecx
je 0x965f
testl %ecx, %ecx
jne 0x97d7
movl 0x8(%rsp), %ecx
testl %ecx, %ecx
cmovel %r12d, %ecx
movl %ecx, 0x8(%rsp)
movslq 0x10(%r15), %rcx
cmpq %rcx, %r12
jl 0x9631
movq %r13, %rdi
movl %r12d, %esi
xorl %eax, %eax
callq 0x286c
movq 0x8(%r15), %rax
movq (%rax,%r12,8), %rax
movq 0x28(%rax), %rbx
movl $0x4, %edi
callq 0x2240
addq $0xc, %rbx
movl %r12d, (%rax)
leaq 0x28(%rsp), %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0xae72
incl 0x14(%rsp)
jmp 0x97d7
cmpb $0x0, 0xabfb(%rip)      # 0x14261
jne 0x97d7
movslq 0x10(%r15), %rcx
cmpq %rcx, %r12
jl 0x968a
movq %r13, %rdi
movl %r12d, %esi
xorl %eax, %eax
callq 0x286c
movq 0x8(%r15), %rax
movq (%rax,%r12,8), %rax
movq 0x28(%rax), %rsi
addq $0xc, %rsi
leaq 0x28(%rsp), %rdi
callq 0xb11e
incl 0xc(%rsp)
jmp 0x97d7
cmpb $0x1, 0xabb5(%rip)      # 0x14261
jne 0x97c1
movslq 0x8(%rsp), %rbx
cmpq %rbx, %r12
jle 0x97c1
testq %rbx, %rbx
js 0x96ce
movslq 0x10(%r15), %rax
cmpq %rax, %rbx
jl 0x96da
movq %r13, %rdi
movl %ebx, %esi
xorl %eax, %eax
callq 0x286c
movq 0x8(%r15), %rax
movq (%rax,%rbx,8), %rax
cmpl $0x0, (%rax)
jne 0x97b4
testq %rbx, %rbx
js 0x96f9
movslq 0x10(%r15), %rcx
cmpq %rcx, %rbx
jl 0x970d
movq %r13, %rdi
movl %ebx, %esi
xorl %eax, %eax
callq 0x286c
movq 0x8(%r15), %rax
movq (%rax,%rbx,8), %rax
movq 0x28(%rax), %rsi
addq $0xc, %rsi
leaq 0x28(%rsp), %rdi
xorl %edx, %edx
callq 0xbc80
movq %rax, %r14
testq %rax, %rax
jne 0x9772
testq %rbx, %rbx
js 0x9737
movslq 0x10(%r15), %rax
cmpq %rax, %rbx
jl 0x9743
movq %r13, %rdi
movl %ebx, %esi
xorl %eax, %eax
callq 0x286c
movq 0x8(%r15), %rax
movq (%rax,%rbx,8), %rax
movq 0x28(%rax), %rdx
addq $0xc, %rdx
movl 0x3c(%rsp), %ecx
leaq 0x4dfa(%rip), %rdi      # 0xe558
movq 0x18(%rsp), %rsi
movl 0x8(%rsp), %r8d
movl %r12d, %r9d
xorl %eax, %eax
callq 0x286c
cmpl (%r14), %ebx
je 0x97b4
testq %rbx, %rbx
js 0x9785
movslq 0x10(%r15), %rax
cmpq %rax, %rbx
jl 0x9791
movq %r13, %rdi
movl %ebx, %esi
xorl %eax, %eax
callq 0x286c
movq 0x8(%r15), %rax
movq (%rax,%rbx,8), %rax
movq 0x28(%rax), %rdx
addq $0xc, %rdx
leaq 0x4dec(%rip), %rdi      # 0xe594
movq 0x18(%rsp), %rsi
xorl %eax, %eax
callq 0x286c
addq $0x3, %rbx
cmpq %r12, %rbx
jl 0x96c0
leaq 0x28(%rsp), %rdi
callq 0xadac
incl 0x10(%rsp)
movl $0x0, 0x8(%rsp)
incq %r12
movslq 0x10(%r15), %rax
cmpq %rax, %r12
jl 0x958f
jmp 0x9801
movl $0x0, 0xc(%rsp)
movl $0x0, 0x10(%rsp)
movl $0x0, 0x14(%rsp)
movq 0x20(%rsp), %rdi
callq 0x8e36
leaq 0x28(%rsp), %rdi
callq 0xadac
leaq 0x4da2(%rip), %rdi      # 0xe5be
movl 0x14(%rsp), %esi
movl 0xc(%rsp), %edx
movl 0x10(%rsp), %ecx
xorl %eax, %eax
callq 0x2470
leaq 0x28(%rsp), %rdi
callq 0xb342
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x9850
jmp 0x9850
jmp 0x9850
jmp 0x9850
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0xb342
movq %rbx, %rdi
callq 0x2400