// File: /workspace/github_cpp_makefile_star2_O1/gpertea[P]gclib/htest.cpp
// Function: run_GHashMap(GResUsage&, GPVec<HStrData>&, char const*)
void run_GHashMap(GResUsage& swatch, GPVec<HStrData> & hstrs, const char* label) {
  int num_add=0, num_rm=0, num_clr=0;
  //GKHashSet<const char*> khset;
  //GHashSet<> khset;
  //GHash<int, cstr_hash, GHashKey_Eq<const char*>, uint32_t> khset;
  GHashMap<const char*, int> khset;
  GMessage("----------------- %s ----------------\n", label);
  int cl_i=0;
  swatch.start();
  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;
			khset.Add(hstrs[i]->str.chars(), i); num_add++; break;
		case 1:if (qryMode) break;
			if (khset.Remove(hstrs[i]->str.chars())<0)
				if (checkRM) GMessage("Warning: key %s could not be removed!\n", hstrs[i]->str.chars());
			num_rm++;
			break;
		case 2:
			if (qryMode) {
				//run some query tests here
				//with strings from hstrs[cl_i .. i-1] range
				for(int j=cl_i;j<i;j+=3) {
					if (hstrs[j]->cmd) continue;
					int* v=khset[hstrs[j]->str.chars()];
					if (*v!=j)
						GError("Error at <%s>, invalid value for key %s!\n",label, hstrs[j]->str.chars() );
				}
			}
			cl_i=0;
			khset.Clear(); num_clr++; break;
	  }
  }
  swatch.stop();
  khset.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 $0x78, %rsp
movq %rsi, %r13
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x49(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
leaq 0x45f7(%rip), %rdi      # 0xe461
movq %rdx, 0x70(%rsp)
movq %rdx, %rsi
xorl %eax, %eax
callq 0x2470
movq %rbx, %rdi
callq 0x8fd6
movq %rbx, 0x68(%rsp)
cmpl $0x0, 0x10(%r13)
jle 0xa1e3
movl $0x2, %r14d
leaq 0x4809(%rip), %rbp      # 0xe6a7
xorl %r12d, %r12d
movl $0x0, 0x10(%rsp)
xorl %r15d, %r15d
movl $0x0, 0xc(%rsp)
movl $0x0, 0x8(%rsp)
movq 0x8(%r13), %rax
movq (%rax,%r12,8), %rax
cmpl %r14d, (%rax)
jne 0x9eda
cmpl $0x2, %r14d
jne 0x9efb
movl $0x2, %r14d
jmp 0xa1d1
movslq 0x10(%r13), %rax
cmpq %rax, %r12
jl 0x9ef0
movq %rbp, %rdi
movl %r12d, %esi
xorl %eax, %eax
callq 0x289c
movq 0x8(%r13), %rax
movq (%rax,%r12,8), %rax
movl (%rax), %r14d
movslq 0x10(%r13), %rax
cmpq %rax, %r12
jl 0x9f11
movq %rbp, %rdi
movl %r12d, %esi
xorl %eax, %eax
callq 0x289c
movq 0x8(%r13), %rax
movq (%rax,%r12,8), %rax
movl (%rax), %eax
cmpl $0x2, %eax
je 0xa091
cmpl $0x1, %eax
je 0x9fba
testl %eax, %eax
jne 0xa1d1
testl %r15d, %r15d
cmovel %r12d, %r15d
movslq 0x10(%r13), %rax
cmpq %rax, %r12
jl 0x9f52
movq %rbp, %rdi
movl %r12d, %esi
xorl %eax, %eax
callq 0x289c
movq 0x8(%r13), %rax
movq (%rax,%r12,8), %rax
movq 0x28(%rax), %rsi
addq $0xc, %rsi
movl $0xffffffff, 0x4(%rsp)  # imm = 0xFFFFFFFF
movq %rsi, 0x18(%rsp)
movl $0x0, 0x20(%rsp)
leaq 0x17(%rsp), %rdi
callq 0x25d0
movl %eax, %eax
movq %rax, 0x28(%rsp)
leaq 0x30(%rsp), %rdi
leaq 0x18(%rsp), %rsi
leaq 0x4(%rsp), %rdx
callq 0xc3b6
cmpl $0x1, 0x4(%rsp)
jne 0x9fb1
movq 0x48(%rsp), %rcx
leaq (%rax,%rax,2), %rax
movl %r12d, 0x8(%rcx,%rax,8)
incl 0x10(%rsp)
jmp 0xa1d1
cmpb $0x0, 0xa2a0(%rip)      # 0x14261
jne 0xa1d1
movslq 0x10(%r13), %rax
cmpq %rax, %r12
jl 0x9fdd
movq %rbp, %rdi
movl %r12d, %esi
xorl %eax, %eax
callq 0x289c
movq 0x8(%r13), %rax
movq (%rax,%r12,8), %rax
movq 0x28(%rax), %rsi
addq $0xc, %rsi
movq %rsi, 0x18(%rsp)
movl $0x0, 0x20(%rsp)
leaq 0x4(%rsp), %rdi
callq 0x25d0
movl %eax, %eax
movq %rax, 0x28(%rsp)
leaq 0x30(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0xc868
movq %rax, %rbx
movq 0x40(%rsp), %rax
movb 0x30(%rsp), %cl
movl $0x1, %edx
shlq %cl, %rdx
testq %rax, %rax
cmoveq %rax, %rdx
cmpq %rdx, %rbx
je 0xa04b
leaq 0x30(%rsp), %rdi
movq %rbx, %rsi
callq 0xc78c
testl %ebx, %ebx
jns 0xa088
cmpb $0x1, 0xa210(%rip)      # 0x14262
jne 0xa088
movslq 0x10(%r13), %rax
cmpq %rax, %r12
jl 0xa06a
movq %rbp, %rdi
movl %r12d, %esi
xorl %eax, %eax
callq 0x289c
movq 0x8(%r13), %rax
movq (%rax,%r12,8), %rax
movq 0x28(%rax), %rsi
addq $0xc, %rsi
leaq 0x4496(%rip), %rdi      # 0xe517
xorl %eax, %eax
callq 0x2470
incl 0x8(%rsp)
jmp 0xa1d1
cmpb $0x1, 0xa1c9(%rip)      # 0x14261
jne 0xa185
movslq %r15d, %rbx
cmpq %rbx, %r12
jle 0xa185
testq %rbx, %rbx
js 0xa0b8
movslq 0x10(%r13), %rax
cmpq %rax, %rbx
jl 0xa0c4
movq %rbp, %rdi
movl %ebx, %esi
xorl %eax, %eax
callq 0x289c
movq 0x8(%r13), %rax
movq (%rax,%rbx,8), %rax
cmpl $0x0, (%rax)
jne 0xa178
testq %rbx, %rbx
js 0xa0e3
movslq 0x10(%r13), %rax
cmpq %rax, %rbx
jl 0xa0ef
movq %rbp, %rdi
movl %ebx, %esi
xorl %eax, %eax
callq 0x289c
movq 0x8(%r13), %rax
movq (%rax,%rbx,8), %rax
movq 0x28(%rax), %rsi
addq $0xc, %rsi
movq %rsi, 0x18(%rsp)
movl $0x0, 0x20(%rsp)
leaq 0x4(%rsp), %rdi
callq 0x25d0
movl %eax, %eax
movq %rax, 0x28(%rsp)
leaq 0x30(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0xc868
movq 0x48(%rsp), %rcx
leaq (%rax,%rax,2), %rax
cmpl 0x8(%rcx,%rax,8), %ebx
je 0xa178
testq %rbx, %rbx
js 0xa149
movslq 0x10(%r13), %rax
cmpq %rax, %rbx
jl 0xa155
movq %rbp, %rdi
movl %ebx, %esi
xorl %eax, %eax
callq 0x289c
movq 0x8(%r13), %rax
movq (%rax,%rbx,8), %rax
movq 0x28(%rax), %rdx
addq $0xc, %rdx
leaq 0x4358(%rip), %rdi      # 0xe4c4
movq 0x70(%rsp), %rsi
xorl %eax, %eax
callq 0x289c
addq $0x3, %rbx
cmpq %r12, %rbx
jl 0xa0aa
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0xa1ca
movq 0x30(%rsp), %rcx
movl $0x1, %edx
shlq %cl, %rdx
shrq $0x3, %rdx
movabsq $0x1ffffffffffffffc, %rax # imm = 0x1FFFFFFFFFFFFFFC
andq %rax, %rdx
cmpq $0x5, %rcx
movl $0x4, %eax
cmovbq %rax, %rdx
xorl %esi, %esi
callq 0x2190
movq $0x0, 0x38(%rsp)
incl 0xc(%rsp)
xorl %r15d, %r15d
incq %r12
movslq 0x10(%r13), %rax
cmpq %rax, %r12
jl 0x9ebc
jmp 0xa1fb
movl $0x0, 0x8(%rsp)
movl $0x0, 0xc(%rsp)
movl $0x0, 0x10(%rsp)
movq 0x68(%rsp), %rdi
callq 0x906a
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0xa24a
movq 0x30(%rsp), %rcx
movl $0x1, %eax
shlq %cl, %rax
shrq $0x3, %rax
movabsq $0x1ffffffffffffffc, %rdx # imm = 0x1FFFFFFFFFFFFFFC
andq %rdx, %rax
cmpq $0x5, %rcx
movl $0x4, %edx
cmovaeq %rax, %rdx
xorl %esi, %esi
callq 0x2190
movq $0x0, 0x38(%rsp)
leaq 0x429d(%rip), %rdi      # 0xe4ee
movl 0x10(%rsp), %esi
movl 0x8(%rsp), %edx
movl 0xc(%rsp), %ecx
xorl %eax, %eax
callq 0x2470
leaq 0x30(%rsp), %rdi
callq 0xb9d2
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xa287
jmp 0xa287
jmp 0xa287
jmp 0xa287
jmp 0xa287
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0xb9d2
movq %rbx, %rdi
callq 0x2400