// File: /workspace/github_cpp_makefile_star2_O3/gpertea[P]gclib/htest.cpp
// Function: run_Khashl(GResUsage&, GPVec<HStrData>&, char const*)
void run_Khashl(GResUsage& swatch, GPVec<HStrData> & hstrs, const char* label) {
  int num_add=0, num_rm=0, num_clr=0;
  klib::KHashMapCached<const char*, int, cstr_hash, cstr_eq > khmap;
  GMessage("----------------- %s ----------------\n", label);
  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;
			khmap[hstrs[i]->str.chars()]=i; num_add++; break;
		case 1:if (qryMode) break;
			khmap.del(khmap.get(hstrs[i]->str.chars())); num_rm++; break;
		case 2:
			if (qryMode) {
				//run some query tests here
				for(int j=cl_i;j<i;j+=3) {
					if (hstrs[j]->cmd) continue;
					int v=khmap[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;
			khmap.clear(); num_clr++; break;
	  }
  }
  swatch.stop();
  khmap.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 $0x48, %rsp
movq %rsi, %r13
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movq $0x0, 0x30(%rsp)
leaq 0x4ca0(%rip), %rdi      # 0xe531
movq %rdx, 0x40(%rsp)
movq %rdx, %rsi
xorl %eax, %eax
callq 0x2470
movq %rbx, %rdi
callq 0x8da2
movq %rbx, 0x38(%rsp)
movl 0x10(%r13), %eax
testl %eax, %eax
jle 0x9b21
movl $0x2, %r15d
leaq 0x20(%rsp), %rbx
leaq 0x4eac(%rip), %r14      # 0xe777
xorl %ebp, %ebp
movl $0x0, 0x14(%rsp)
xorl %r12d, %r12d
movl $0x0, 0x10(%rsp)
movl $0x0, 0xc(%rsp)
movq 0x8(%r13), %rcx
movq (%rcx,%rbp,8), %rdx
movl (%rdx), %edx
cmpl %r15d, %edx
jne 0x9908
cmpl $0x2, %r15d
jne 0x992e
movl $0x2, %r15d
jmp 0x9b0f
movslq %eax, %rsi
movl %edx, %r15d
cmpq %rsi, %rbp
jl 0x992e
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 0x9945
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 0x9a01
cmpl $0x1, %ecx
je 0x99aa
testl %ecx, %ecx
jne 0x9b0f
testl %r12d, %r12d
cmovel %ebp, %r12d
movslq 0x10(%r13), %rcx
cmpq %rcx, %rbp
jl 0x9985
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, 0x18(%rsp)
movq %rbx, %rdi
leaq 0x18(%rsp), %rsi
callq 0xb3dc
movl %ebp, (%rax)
incl 0x14(%rsp)
jmp 0x9b0f
cmpb $0x0, 0xa8b0(%rip)      # 0x14261
jne 0x9b0f
movslq 0x10(%r13), %rcx
cmpq %rcx, %rbp
jl 0x99d4
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, 0x18(%rsp)
movq %rbx, %rdi
leaq 0x18(%rsp), %rsi
callq 0xb632
movq %rbx, %rdi
movl %eax, %esi
callq 0xb574
incl 0xc(%rsp)
jmp 0x9b0f
cmpb $0x1, 0xa859(%rip)      # 0x14261
jne 0x9ad3
movslq %r12d, %r12
cmpq %r12, %rbp
jle 0x9ad3
testq %r12, %r12
js 0x9a28
movslq 0x10(%r13), %rax
cmpq %rax, %r12
jl 0x9a35
movq %r14, %rdi
movl %r12d, %esi
xorl %eax, %eax
callq 0x286c
movq 0x8(%r13), %rax
movq (%rax,%r12,8), %rax
cmpl $0x0, (%rax)
jne 0x9ac6
testq %r12, %r12
js 0x9a54
movslq 0x10(%r13), %rcx
cmpq %rcx, %r12
jl 0x9a69
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, 0x18(%rsp)
movq %rbx, %rdi
leaq 0x18(%rsp), %rsi
callq 0xb3dc
cmpl (%rax), %r12d
je 0x9ac6
testq %r12, %r12
js 0x9a96
movslq 0x10(%r13), %rax
cmpq %rax, %r12
jl 0x9aa3
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 0x4ada(%rip), %rdi      # 0xe594
movq 0x40(%rsp), %rsi
xorl %eax, %eax
callq 0x286c
addq $0x3, %r12
cmpq %rbp, %r12
jl 0x9a1a
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x9b08
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 0x10(%rsp)
xorl %r12d, %r12d
incq %rbp
movslq 0x10(%r13), %rax
cmpq %rax, %rbp
jl 0x98e8
jmp 0x9b39
movl $0x0, 0xc(%rsp)
movl $0x0, 0x10(%rsp)
movl $0x0, 0x14(%rsp)
movq 0x38(%rsp), %rdi
callq 0x8e36
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x9b78
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 0x4a3f(%rip), %rdi      # 0xe5be
movl 0x14(%rsp), %esi
movl 0xc(%rsp), %edx
movl 0x10(%rsp), %ecx
xorl %eax, %eax
callq 0x2470
movq 0x28(%rsp), %rdi
callq 0x22e0
movq 0x30(%rsp), %rdi
callq 0x22e0
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x9bc3
jmp 0x9bc3
jmp 0x9bc3
jmp 0x9bc3
jmp 0x9bc3
jmp 0x9bc3
jmp 0x9bc3
movq %rax, %rbx
movq 0x28(%rsp), %rdi
callq 0x22e0
movq 0x30(%rsp), %rdi
callq 0x22e0
movq %rbx, %rdi
callq 0x2400