// File: /workspace/github_cpp_makefile_star2_O1/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 0x4977(%rip), %rdi      # 0xe461
movq %rdx, 0x40(%rsp)
movq %rdx, %rsi
xorl %eax, %eax
callq 0x2470
movq %rbx, %rdi
callq 0x8fd6
movq %rbx, 0x38(%rsp)
cmpl $0x0, 0x10(%r13)
jle 0x9d7c
movl $0x2, %r15d
leaq 0x4b89(%rip), %r14      # 0xe6a7
xorl %ebp, %ebp
movl $0x0, 0x14(%rsp)
xorl %r12d, %r12d
movl $0x0, 0x10(%rsp)
movl $0x0, 0xc(%rsp)
movq 0x8(%r13), %rax
movq (%rax,%rbp,8), %rax
cmpl %r15d, (%rax)
jne 0x9b5c
cmpl $0x2, %r15d
jne 0x9b7c
movl %r12d, %ebx
movl $0x2, %r15d
jmp 0x9d67
movslq 0x10(%r13), %rax
cmpq %rax, %rbp
jl 0x9b71
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 0x9b91
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 0x9c58
cmpl $0x1, %eax
je 0x9bfe
testl %eax, %eax
jne 0x9c50
testl %r12d, %r12d
movl %ebp, %ebx
cmovnel %r12d, %ebx
movslq 0x10(%r13), %rax
cmpq %rax, %rbp
jl 0x9bcf
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, 0x18(%rsp)
leaq 0x20(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0xb678
movl %ebp, (%rax)
incl 0x14(%rsp)
jmp 0x9d67
cmpb $0x0, 0xa65c(%rip)      # 0x14261
jne 0x9c50
movslq 0x10(%r13), %rax
cmpq %rax, %rbp
jl 0x9c1c
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, 0x18(%rsp)
leaq 0x20(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0xb88a
leaq 0x20(%rsp), %rdi
movl %eax, %esi
callq 0xb7d2
incl 0xc(%rsp)
movl %r12d, %ebx
jmp 0x9d67
cmpb $0x1, 0xa602(%rip)      # 0x14261
jne 0x9d2c
movslq %r12d, %r12
cmpq %r12, %rbp
jle 0x9d2c
testq %r12, %r12
js 0x9c7f
movslq 0x10(%r13), %rax
cmpq %rax, %r12
jl 0x9c8c
movq %r14, %rdi
movl %r12d, %esi
xorl %eax, %eax
callq 0x289c
movq 0x8(%r13), %rax
movq (%rax,%r12,8), %rax
cmpl $0x0, (%rax)
jne 0x9d1f
testq %r12, %r12
js 0x9cab
movslq 0x10(%r13), %rax
cmpq %rax, %r12
jl 0x9cb8
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, 0x18(%rsp)
leaq 0x20(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0xb678
cmpl (%rax), %r12d
je 0x9d1f
testq %r12, %r12
js 0x9cef
movslq 0x10(%r13), %rax
cmpq %rax, %r12
jl 0x9cfc
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 0x47b1(%rip), %rdi      # 0xe4c4
movq 0x40(%rsp), %rsi
xorl %eax, %eax
callq 0x289c
addq $0x3, %r12
cmpq %rbp, %r12
jl 0x9c71
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x9d61
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 %ebx, %ebx
incq %rbp
movslq 0x10(%r13), %rax
movl %ebx, %r12d
cmpq %rax, %rbp
jl 0x9b3b
jmp 0x9d94
movl $0x0, 0xc(%rsp)
movl $0x0, 0x10(%rsp)
movl $0x0, 0x14(%rsp)
movq 0x38(%rsp), %rdi
callq 0x906a
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x9dd3
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 0x4714(%rip), %rdi      # 0xe4ee
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 0x9e1e
jmp 0x9e1e
jmp 0x9e1e
jmp 0x9e1e
jmp 0x9e1e
jmp 0x9e1e
jmp 0x9e1e
movq %rax, %rbx
movq 0x28(%rsp), %rdi
callq 0x22e0
movq 0x30(%rsp), %rdi
callq 0x22e0
movq %rbx, %rdi
callq 0x2400