// File: /workspace/github_cpp_makefile_star2_O1/gpertea[P]gclib/htest.cpp
// Function: run_GxxHashMap(GResUsage&, GPVec<HStrData>&, char const*)
void run_GxxHashMap(GResUsage& swatch, GPVec<HStrData> & hstrs, const char* label) {
  int num_add=0, num_rm=0, num_clr=0;
  //GHash<int> khset;
  GHashMap<const char*, int, GHashKey_xxHash32<const char*>,
          GHashKey_Eq<const char*>, uint32_t > 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 $0x58, %rsp
movq %rsi, %r13
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x2d(%rsp)
movaps %xmm0, 0x20(%rsp)
leaq 0x419d(%rip), %rdi      # 0xe461
movq %rdx, 0x50(%rsp)
movq %rdx, %rsi
xorl %eax, %eax
callq 0x2470
movq %rbx, %rdi
callq 0x8fd6
movq %rbx, 0x48(%rsp)
cmpl $0x0, 0x10(%r13)
jle 0xa5dd
movl $0x2, %r15d
leaq 0x43af(%rip), %r14      # 0xe6a7
xorl %ebp, %ebp
movl $0x0, 0xc(%rsp)
xorl %ebx, %ebx
movl $0x0, 0x8(%rsp)
movl $0x0, 0x4(%rsp)
movq 0x8(%r13), %rax
movq (%rax,%rbp,8), %rax
cmpl %r15d, (%rax)
jne 0xa332
cmpl $0x2, %r15d
jne 0xa352
movl $0x2, %r15d
jmp 0xa5cb
movslq 0x10(%r13), %rax
cmpq %rax, %rbp
jl 0xa347
movq %r14, %rdi
movl %ebp, %esi
xorl %eax, %eax
callq 0x289c
movq 0x8(%r13), %rax
movq (%rax,%rbp,8), %rax
movl (%rax), %r15d
movslq 0x10(%r13), %rax
cmpq %rax, %rbp
jl 0xa367
movq %r14, %rdi
movl %ebp, %esi
xorl %eax, %eax
callq 0x289c
movq 0x8(%r13), %rax
movq (%rax,%rbp,8), %rax
movl (%rax), %eax
cmpl $0x2, %eax
je 0xa4af
cmpl $0x1, %eax
je 0xa3f1
testl %eax, %eax
jne 0xa5cb
testl %ebx, %ebx
cmovel %ebp, %ebx
movslq 0x10(%r13), %rax
cmpq %rax, %rbp
jl 0xa3a1
movq %r14, %rdi
movl %ebp, %esi
xorl %eax, %eax
callq 0x289c
movq 0x8(%r13), %rax
movq (%rax,%rbp,8), %rax
movq 0x28(%rax), %rax
addq $0xc, %rax
movq %rax, 0x10(%rsp)
movl $0xffffffff, 0x1c(%rsp) # imm = 0xFFFFFFFF
leaq 0x20(%rsp), %rdi
leaq 0x10(%rsp), %rsi
leaq 0x1c(%rsp), %rdx
callq 0xc91c
cmpl $0x1, 0x1c(%rsp)
jne 0xa3e8
movq 0x30(%rsp), %rcx
movl %eax, %eax
shlq $0x4, %rax
movl %ebp, 0x8(%rcx,%rax)
incl 0xc(%rsp)
jmp 0xa5cb
cmpb $0x0, 0x9e69(%rip)      # 0x14261
jne 0xa5cb
movslq 0x10(%r13), %rax
cmpq %rax, %rbp
jl 0xa413
movq %r14, %rdi
movl %ebp, %esi
xorl %eax, %eax
callq 0x289c
movq 0x8(%r13), %rax
movq (%rax,%rbp,8), %rax
movq 0x28(%rax), %rax
addq $0xc, %rax
movq %rax, 0x10(%rsp)
leaq 0x20(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0xce34
movl %eax, %r12d
movb 0x20(%rsp), %cl
movl $0x1, %eax
shll %cl, %eax
cmpq $0x0, 0x28(%rsp)
movl $0x0, %ecx
cmovel %ecx, %eax
cmpl %eax, %r12d
je 0xa46a
leaq 0x20(%rsp), %rdi
movl %r12d, %esi
callq 0xcf7c
testl %r12d, %r12d
jns 0xa4a6
cmpb $0x1, 0x9df1(%rip)      # 0x14262
jne 0xa4a6
movslq 0x10(%r13), %rax
cmpq %rax, %rbp
jl 0xa488
movq %r14, %rdi
movl %ebp, %esi
xorl %eax, %eax
callq 0x289c
movq 0x8(%r13), %rax
movq (%rax,%rbp,8), %rax
movq 0x28(%rax), %rsi
addq $0xc, %rsi
leaq 0x4078(%rip), %rdi      # 0xe517
xorl %eax, %eax
callq 0x2470
incl 0x4(%rsp)
jmp 0xa5cb
cmpb $0x1, 0x9dab(%rip)      # 0x14261
jne 0xa590
movslq %ebx, %r12
cmpq %r12, %rbp
jle 0xa590
testq %r12, %r12
js 0xa4d6
movslq 0x10(%r13), %rax
cmpq %rax, %r12
jl 0xa4e3
movq %r14, %rdi
movl %r12d, %esi
xorl %eax, %eax
callq 0x289c
movq 0x8(%r13), %rax
movq (%rax,%r12,8), %rax
cmpl $0x0, (%rax)
jne 0xa583
testq %r12, %r12
js 0xa502
movslq 0x10(%r13), %rax
cmpq %rax, %r12
jl 0xa50f
movq %r14, %rdi
movl %r12d, %esi
xorl %eax, %eax
callq 0x289c
movq 0x8(%r13), %rax
movq (%rax,%r12,8), %rax
movq 0x28(%rax), %rax
addq $0xc, %rax
movq %rax, 0x10(%rsp)
leaq 0x20(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0xce34
movq 0x30(%rsp), %rcx
movl %eax, %eax
shlq $0x4, %rax
cmpl 0x8(%rcx,%rax), %r12d
je 0xa583
testq %r12, %r12
js 0xa553
movslq 0x10(%r13), %rax
cmpq %rax, %r12
jl 0xa560
movq %r14, %rdi
movl %r12d, %esi
xorl %eax, %eax
callq 0x289c
movq 0x8(%r13), %rax
movq (%rax,%r12,8), %rax
movq 0x28(%rax), %rdx
addq $0xc, %rdx
leaq 0x3f4d(%rip), %rdi      # 0xe4c4
movq 0x50(%rsp), %rsi
xorl %eax, %eax
callq 0x289c
addq $0x3, %r12
cmpq %rbp, %r12
jl 0xa4c8
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0xa5c5
movl 0x20(%rsp), %ecx
movl $0x1, %edx
shll %cl, %edx
shrl $0x3, %edx
andl $-0x4, %edx
cmpl $0x5, %ecx
movl $0x4, %eax
cmovbl %eax, %edx
xorl %esi, %esi
callq 0x2190
movl $0x0, 0x24(%rsp)
incl 0x8(%rsp)
xorl %ebx, %ebx
incq %rbp
movslq 0x10(%r13), %rax
cmpq %rax, %rbp
jl 0xa314
jmp 0xa5f5
movl $0x0, 0x4(%rsp)
movl $0x0, 0x8(%rsp)
movl $0x0, 0xc(%rsp)
movq 0x48(%rsp), %rdi
callq 0x906a
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0xa634
movl 0x20(%rsp), %ecx
movl $0x1, %eax
shll %cl, %eax
shrl $0x3, %eax
andl $-0x4, %eax
cmpl $0x5, %ecx
movl $0x4, %edx
cmovael %eax, %edx
xorl %esi, %esi
callq 0x2190
movl $0x0, 0x24(%rsp)
leaq 0x3eb3(%rip), %rdi      # 0xe4ee
movl 0xc(%rsp), %esi
movl 0x4(%rsp), %edx
movl 0x8(%rsp), %ecx
xorl %eax, %eax
callq 0x2470
leaq 0x20(%rsp), %rdi
callq 0xba54
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xa671
jmp 0xa671
jmp 0xa671
jmp 0xa671
jmp 0xa671
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0xba54
movq %rbx, %rdi
callq 0x2400