// File: /workspace/github_cpp_makefile_star2_O1/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 0xaf74
leaq 0x4ce3(%rip), %rdi      # 0xe461
movq %r14, 0x18(%rsp)
movq %r14, %rsi
xorl %eax, %eax
callq 0x2470
leaq 0x28(%rsp), %rdi
callq 0xaffa
movq %rbx, %rdi
callq 0x8fd6
movq %rbx, 0x20(%rsp)
cmpl $0x0, 0x10(%r15)
jle 0x9a42
movl $0x2, %r13d
xorl %r12d, %r12d
movl $0x0, 0x14(%rsp)
xorl %ebp, %ebp
movl $0x0, 0x10(%rsp)
movl $0x0, 0xc(%rsp)
movq 0x8(%r15), %rax
movq (%rax,%r12,8), %rax
cmpl %r13d, (%rax)
jne 0x97f3
cmpl $0x2, %r13d
jne 0x9818
movl %ebp, %r14d
movl $0x2, %r13d
jmp 0x9a2d
movslq 0x10(%r15), %rax
cmpq %rax, %r12
jl 0x980d
leaq 0x4ea4(%rip), %rdi      # 0xe6a7
movl %r12d, %esi
xorl %eax, %eax
callq 0x289c
movq 0x8(%r15), %rax
movq (%rax,%r12,8), %rax
movl (%rax), %r13d
movslq 0x10(%r15), %rax
cmpq %rax, %r12
jl 0x9832
leaq 0x4e7f(%rip), %rdi      # 0xe6a7
movl %r12d, %esi
xorl %eax, %eax
callq 0x289c
movq 0x8(%r15), %rax
movq (%rax,%r12,8), %rax
movl (%rax), %eax
cmpl $0x2, %eax
je 0x98f4
cmpl $0x1, %eax
je 0x98ab
testl %eax, %eax
jne 0x98ec
testl %ebp, %ebp
movl %r12d, %r14d
cmovnel %ebp, %r14d
movslq 0x10(%r15), %rax
cmpq %rax, %r12
jl 0x9875
leaq 0x4e3c(%rip), %rdi      # 0xe6a7
movl %r12d, %esi
xorl %eax, %eax
callq 0x289c
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 0xb0f2
incl 0x14(%rsp)
jmp 0x9a2d
cmpb $0x0, 0xa9af(%rip)      # 0x14261
jne 0x98ec
movslq 0x10(%r15), %rax
cmpq %rax, %r12
jl 0x98ce
leaq 0x4de3(%rip), %rdi      # 0xe6a7
movl %r12d, %esi
xorl %eax, %eax
callq 0x289c
movq 0x8(%r15), %rax
movq (%rax,%r12,8), %rax
movq 0x28(%rax), %rsi
addq $0xc, %rsi
leaq 0x28(%rsp), %rdi
callq 0xb3a6
incl 0xc(%rsp)
movl %ebp, %r14d
jmp 0x9a2d
cmpb $0x1, 0xa966(%rip)      # 0x14261
jne 0x9a1c
movslq %ebp, %rbx
cmpq %rbx, %r12
jle 0x9a1c
testq %rbx, %rbx
js 0x991b
movslq 0x10(%r15), %rax
cmpq %rax, %rbx
jl 0x992b
leaq 0x4d85(%rip), %rdi      # 0xe6a7
movl %ebx, %esi
xorl %eax, %eax
callq 0x289c
movq 0x8(%r15), %rax
movq (%rax,%rbx,8), %rax
cmpl $0x0, (%rax)
jne 0x9a0f
testq %rbx, %rbx
js 0x994a
movslq 0x10(%r15), %rax
cmpq %rax, %rbx
jl 0x995a
leaq 0x4d56(%rip), %rdi      # 0xe6a7
movl %ebx, %esi
xorl %eax, %eax
callq 0x289c
movq 0x8(%r15), %rax
movq (%rax,%rbx,8), %rax
movq 0x28(%rax), %rsi
addq $0xc, %rsi
leaq 0x28(%rsp), %rdi
xorl %edx, %edx
callq 0xbdb2
movq %rax, %r14
testq %rax, %rax
jne 0x99c9
testq %rbx, %rbx
js 0x998c
movslq 0x10(%r15), %rax
cmpq %rax, %rbx
jl 0x999c
leaq 0x4d14(%rip), %rdi      # 0xe6a7
movl %ebx, %esi
xorl %eax, %eax
callq 0x289c
movq 0x8(%r15), %rax
movq (%rax,%rbx,8), %rax
movq 0x28(%rax), %rdx
addq $0xc, %rdx
movl 0x3c(%rsp), %ecx
leaq 0x4ad1(%rip), %rdi      # 0xe488
movq 0x18(%rsp), %rsi
movl %ebp, %r8d
movl %r12d, %r9d
xorl %eax, %eax
callq 0x289c
cmpl (%r14), %ebx
je 0x9a0f
testq %rbx, %rbx
js 0x99dc
movslq 0x10(%r15), %rax
cmpq %rax, %rbx
jl 0x99ec
leaq 0x4cc4(%rip), %rdi      # 0xe6a7
movl %ebx, %esi
xorl %eax, %eax
callq 0x289c
movq 0x8(%r15), %rax
movq (%rax,%rbx,8), %rax
movq 0x28(%rax), %rdx
addq $0xc, %rdx
leaq 0x4ac1(%rip), %rdi      # 0xe4c4
movq 0x18(%rsp), %rsi
xorl %eax, %eax
callq 0x289c
addq $0x3, %rbx
cmpq %r12, %rbx
jl 0x990d
leaq 0x28(%rsp), %rdi
callq 0xaffa
incl 0x10(%rsp)
xorl %r14d, %r14d
incq %r12
movslq 0x10(%r15), %rax
movl %r14d, %ebp
cmpq %rax, %r12
jl 0x97d2
jmp 0x9a5a
movl $0x0, 0xc(%rsp)
movl $0x0, 0x10(%rsp)
movl $0x0, 0x14(%rsp)
movq 0x20(%rsp), %rdi
callq 0x906a
leaq 0x28(%rsp), %rdi
callq 0xaffa
leaq 0x4a79(%rip), %rdi      # 0xe4ee
movl 0x14(%rsp), %esi
movl 0xc(%rsp), %edx
movl 0x10(%rsp), %ecx
xorl %eax, %eax
callq 0x2470
leaq 0x28(%rsp), %rdi
callq 0xb5b4
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x9aa9
jmp 0x9aa9
jmp 0x9aa9
jmp 0x9aa9
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0xb5b4
movq %rbx, %rdi
callq 0x2400