// File: /workspace/github_cpp_makefile_star2_O3/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 0x4922(%rip), %rdi      # 0xe531
movq %rdx, 0x70(%rsp)
movq %rdx, %rsi
xorl %eax, %eax
callq 0x2470
movq %rbx, %rdi
callq 0x8da2
movq %rbx, 0x68(%rsp)
movl 0x10(%r13), %eax
testl %eax, %eax
jle 0x9f8f
movl $0x2, %r14d
leaq 0x4b33(%rip), %rbp      # 0xe777
xorl %r12d, %r12d
movl $0x0, 0x10(%rsp)
xorl %r15d, %r15d
movl $0x0, 0xc(%rsp)
movl $0x0, 0x8(%rsp)
movq 0x8(%r13), %rcx
movq (%rcx,%r12,8), %rdx
movl (%rdx), %edx
cmpl %r14d, %edx
jne 0x9c82
cmpl $0x2, %r14d
jne 0x9ca9
movl $0x2, %r14d
jmp 0x9f7d
movslq %eax, %rsi
movl %edx, %r14d
cmpq %rsi, %r12
jl 0x9ca9
movq %rbp, %rdi
movl %r12d, %esi
xorl %eax, %eax
callq 0x286c
movq 0x8(%r13), %rcx
movq (%rcx,%r12,8), %rax
movl (%rax), %r14d
movl 0x10(%r13), %eax
cltq
cmpq %rax, %r12
jl 0x9cc1
movq %rbp, %rdi
movl %r12d, %esi
xorl %eax, %eax
callq 0x286c
movq 0x8(%r13), %rcx
movq (%rcx,%r12,8), %rax
movl (%rax), %ecx
cmpl $0x2, %ecx
je 0x9e3d
cmpl $0x1, %ecx
je 0x9d66
testl %ecx, %ecx
jne 0x9f7d
testl %r15d, %r15d
cmovel %r12d, %r15d
movslq 0x10(%r13), %rcx
cmpq %rcx, %r12
jl 0x9d06
movq %rbp, %rdi
movl %r12d, %esi
xorl %eax, %eax
callq 0x286c
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 0x258c
movl %eax, %eax
movq %rax, 0x28(%rsp)
leaq 0x30(%rsp), %rdi
leaq 0x18(%rsp), %rsi
leaq 0x4(%rsp), %rdx
callq 0xc266
cmpl $0x1, 0x4(%rsp)
jne 0x9d5d
movq 0x48(%rsp), %rcx
leaq (%rax,%rax,2), %rax
movl %r12d, 0x8(%rcx,%rax,8)
incl 0x10(%rsp)
jmp 0x9f7d
cmpb $0x0, 0xa4f4(%rip)      # 0x14261
jne 0x9f7d
movslq 0x10(%r13), %rcx
cmpq %rcx, %r12
jl 0x9d91
movq %rbp, %rdi
movl %r12d, %esi
xorl %eax, %eax
callq 0x286c
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 0x258c
movl %eax, %eax
movq %rax, 0x28(%rsp)
leaq 0x30(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0xc70e
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 0x9df7
leaq 0x30(%rsp), %rdi
movq %rbx, %rsi
callq 0xc62e
testl %ebx, %ebx
jns 0x9e34
cmpb $0x1, 0xa464(%rip)      # 0x14262
jne 0x9e34
movslq 0x10(%r13), %rax
cmpq %rax, %r12
jl 0x9e16
movq %rbp, %rdi
movl %r12d, %esi
xorl %eax, %eax
callq 0x286c
movq 0x8(%r13), %rax
movq (%rax,%r12,8), %rax
movq 0x28(%rax), %rsi
addq $0xc, %rsi
leaq 0x47ba(%rip), %rdi      # 0xe5e7
xorl %eax, %eax
callq 0x2470
incl 0x8(%rsp)
jmp 0x9f7d
cmpb $0x1, 0xa41d(%rip)      # 0x14261
jne 0x9f31
movslq %r15d, %rbx
cmpq %rbx, %r12
jle 0x9f31
testq %rbx, %rbx
js 0x9e64
movslq 0x10(%r13), %rax
cmpq %rax, %rbx
jl 0x9e70
movq %rbp, %rdi
movl %ebx, %esi
xorl %eax, %eax
callq 0x286c
movq 0x8(%r13), %rax
movq (%rax,%rbx,8), %rax
cmpl $0x0, (%rax)
jne 0x9f24
testq %rbx, %rbx
js 0x9e8f
movslq 0x10(%r13), %rcx
cmpq %rcx, %rbx
jl 0x9ea3
movq %rbp, %rdi
movl %ebx, %esi
xorl %eax, %eax
callq 0x286c
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 0x258c
movl %eax, %eax
movq %rax, 0x28(%rsp)
leaq 0x30(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0xc70e
movq 0x48(%rsp), %rcx
leaq (%rax,%rax,2), %rax
cmpl 0x8(%rcx,%rax,8), %ebx
je 0x9f24
testq %rbx, %rbx
js 0x9ef5
movslq 0x10(%r13), %rax
cmpq %rax, %rbx
jl 0x9f01
movq %rbp, %rdi
movl %ebx, %esi
xorl %eax, %eax
callq 0x286c
movq 0x8(%r13), %rax
movq (%rax,%rbx,8), %rax
movq 0x28(%rax), %rdx
addq $0xc, %rdx
leaq 0x467c(%rip), %rdi      # 0xe594
movq 0x70(%rsp), %rsi
xorl %eax, %eax
callq 0x286c
addq $0x3, %rbx
cmpq %r12, %rbx
jl 0x9e56
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x9f76
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 0x9c62
jmp 0x9fa7
movl $0x0, 0x8(%rsp)
movl $0x0, 0xc(%rsp)
movl $0x0, 0x10(%rsp)
movq 0x68(%rsp), %rdi
callq 0x8e36
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x9ff6
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 0x45c1(%rip), %rdi      # 0xe5be
movl 0x10(%rsp), %esi
movl 0x8(%rsp), %edx
movl 0xc(%rsp), %ecx
xorl %eax, %eax
callq 0x2470
leaq 0x30(%rsp), %rdi
callq 0xb7b6
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xa033
jmp 0xa033
jmp 0xa033
jmp 0xa033
jmp 0xa033
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0xb7b6
movq %rbx, %rdi
callq 0x2400