// File: /workspace/github_cpp_makefile_star2_O3/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 0x44c1(%rip), %rdi      # 0xe531
movq %rdx, 0x50(%rsp)
movq %rdx, %rsi
xorl %eax, %eax
callq 0x2470
movq %rbx, %rdi
callq 0x8da2
movq %rbx, 0x48(%rsp)
movl 0x10(%r13), %eax
testl %eax, %eax
jle 0xa390
movl $0x2, %r15d
leaq 0x46d2(%rip), %r14      # 0xe777
xorl %ebp, %ebp
movl $0x0, 0xc(%rsp)
xorl %ebx, %ebx
movl $0x0, 0x8(%rsp)
movl $0x0, 0x4(%rsp)
movq 0x8(%r13), %rcx
movq (%rcx,%rbp,8), %rdx
movl (%rdx), %edx
cmpl %r15d, %edx
jne 0xa0e1
cmpl $0x2, %r15d
jne 0xa107
movl $0x2, %r15d
jmp 0xa37e
movslq %eax, %rsi
movl %edx, %r15d
cmpq %rsi, %rbp
jl 0xa107
movq %r14, %rdi
movl %ebp, %esi
xorl %eax, %eax
callq 0x286c
movq 0x8(%r13), %rcx
movq (%rcx,%rbp,8), %rax
movl (%rax), %r15d
movl 0x10(%r13), %eax
cltq
cmpq %rax, %rbp
jl 0xa11e
movq %r14, %rdi
movl %ebp, %esi
xorl %eax, %eax
callq 0x286c
movq 0x8(%r13), %rcx
movq (%rcx,%rbp,8), %rax
movl (%rax), %ecx
cmpl $0x2, %ecx
je 0xa262
cmpl $0x1, %ecx
je 0xa1a4
testl %ecx, %ecx
jne 0xa37e
testl %ebx, %ebx
cmovel %ebp, %ebx
movslq 0x10(%r13), %rcx
cmpq %rcx, %rbp
jl 0xa15c
movq %r14, %rdi
movl %ebp, %esi
xorl %eax, %eax
callq 0x286c
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 0xc7c2
cmpl $0x1, 0x1c(%rsp)
jne 0xa19b
movq 0x30(%rsp), %rcx
movl %eax, %eax
shlq $0x4, %rax
movl %ebp, 0x8(%rcx,%rax)
incl 0xc(%rsp)
jmp 0xa37e
cmpb $0x0, 0xa0b6(%rip)      # 0x14261
jne 0xa37e
movslq 0x10(%r13), %rcx
cmpq %rcx, %rbp
jl 0xa1ce
movq %r14, %rdi
movl %ebp, %esi
xorl %eax, %eax
callq 0x286c
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 0xccf2
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 0xa21d
leaq 0x20(%rsp), %rdi
movl %r12d, %esi
callq 0xce76
testl %r12d, %r12d
jns 0xa259
cmpb $0x1, 0xa03e(%rip)      # 0x14262
jne 0xa259
movslq 0x10(%r13), %rax
cmpq %rax, %rbp
jl 0xa23b
movq %r14, %rdi
movl %ebp, %esi
xorl %eax, %eax
callq 0x286c
movq 0x8(%r13), %rax
movq (%rax,%rbp,8), %rax
movq 0x28(%rax), %rsi
addq $0xc, %rsi
leaq 0x4395(%rip), %rdi      # 0xe5e7
xorl %eax, %eax
callq 0x2470
incl 0x4(%rsp)
jmp 0xa37e
cmpb $0x1, 0x9ff8(%rip)      # 0x14261
jne 0xa343
movslq %ebx, %r12
cmpq %r12, %rbp
jle 0xa343
testq %r12, %r12
js 0xa289
movslq 0x10(%r13), %rax
cmpq %rax, %r12
jl 0xa296
movq %r14, %rdi
movl %r12d, %esi
xorl %eax, %eax
callq 0x286c
movq 0x8(%r13), %rax
movq (%rax,%r12,8), %rax
cmpl $0x0, (%rax)
jne 0xa336
testq %r12, %r12
js 0xa2b5
movslq 0x10(%r13), %rcx
cmpq %rcx, %r12
jl 0xa2ca
movq %r14, %rdi
movl %r12d, %esi
xorl %eax, %eax
callq 0x286c
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 0xccf2
movq 0x30(%rsp), %rcx
movl %eax, %eax
shlq $0x4, %rax
cmpl 0x8(%rcx,%rax), %r12d
je 0xa336
testq %r12, %r12
js 0xa306
movslq 0x10(%r13), %rax
cmpq %rax, %r12
jl 0xa313
movq %r14, %rdi
movl %r12d, %esi
xorl %eax, %eax
callq 0x286c
movq 0x8(%r13), %rax
movq (%rax,%r12,8), %rax
movq 0x28(%rax), %rdx
addq $0xc, %rdx
leaq 0x426a(%rip), %rdi      # 0xe594
movq 0x50(%rsp), %rsi
xorl %eax, %eax
callq 0x286c
addq $0x3, %r12
cmpq %rbp, %r12
jl 0xa27b
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0xa378
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 0xa0c1
jmp 0xa3a8
movl $0x0, 0x4(%rsp)
movl $0x0, 0x8(%rsp)
movl $0x0, 0xc(%rsp)
movq 0x48(%rsp), %rdi
callq 0x8e36
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0xa3e7
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 0x41d0(%rip), %rdi      # 0xe5be
movl 0xc(%rsp), %esi
movl 0x4(%rsp), %edx
movl 0x8(%rsp), %ecx
xorl %eax, %eax
callq 0x2470
leaq 0x20(%rsp), %rdi
callq 0xb83c
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xa424
jmp 0xa424
jmp 0xa424
jmp 0xa424
jmp 0xa424
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0xb83c
movq %rbx, %rdi
callq 0x2400