// File: /workspace/github_cpp_makefile_star2_O2/gpertea[P]gclib/htest.cpp
// Function: run_GHash(GResUsage&, GPVec<HStrData>&, char const*)
void run_GHash(GResUsage& swatch, GPVec<HStrData> & hstrs, const char* label) {
	old::GHash<int> ghash; // @suppress("Type cannot be resolved")
	int num_add=0, num_rm=0, num_clr=0;
	GMessage("----------------- %s ----------------\n", label);
	ghash.Clear();
	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;
					ghash.fAdd(hstrs[i]->str.chars(), new int(i));
					num_add++;
					break;
				case 1:
					if (qryMode) break;
					ghash.Remove(hstrs[i]->str.chars());
					num_rm++;
					break;
				case 2:
					//run tests here
					if (qryMode) {
						//run some query tests here
						for(int j=cl_i;j<i;j+=3) {
							if (hstrs[j]->cmd) continue;
							int* v=ghash[hstrs[j]->str.chars()];
							if (v==NULL)
								GError("Error at <%s>, key %s not found (count:%d, cl_i=%d, i=%d)!\n",label, hstrs[j]->str.chars(),
										ghash.Count(), cl_i, i );
							if (*v!=j)
								GError("Error at <%s>, invalid value for key %s!\n",label, hstrs[j]->str.chars() );
						}
					}
					cl_i=0;
					ghash.Clear();
					num_clr++;
					break;
			  }
	}
	swatch.stop();
	ghash.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 %rdx, %rbx
movq %rsi, %r15
movq %rdi, 0x18(%rsp)
leaq 0x28(%rsp), %rdi
pushq $0x1
popq %rsi
callq 0x9b96
leaq 0x3a85(%rip), %rdi      # 0xc4e1
movq %rbx, 0x20(%rsp)
movq %rbx, %rsi
xorl %eax, %eax
callq 0x2662
leaq 0x28(%rsp), %rdi
callq 0x9c0e
movq 0x18(%rsp), %rdi
callq 0x8414
pushq $0x2
popq %r14
movl $0x0, 0xc(%rsp)
movl $0x0, 0x10(%rsp)
xorl %r13d, %r13d
xorl %ebp, %ebp
movl $0x0, 0x14(%rsp)
cmpl 0x10(%r15), %ebp
jge 0x8c4e
movq %r15, %rdi
movl %ebp, %esi
callq 0x9cb8
movq (%rax), %rax
cmpl %r14d, (%rax)
jne 0x8acb
cmpl $0x2, %r14d
jne 0x8adb
pushq $0x2
popq %r14
jmp 0x8c47
movq %r15, %rdi
movl %ebp, %esi
callq 0x9cb8
movq (%rax), %rax
movl (%rax), %r14d
movq %r15, %rdi
movl %ebp, %esi
callq 0x9cb8
movq (%rax), %rax
movl (%rax), %eax
cmpl $0x2, %eax
je 0x8b74
cmpl $0x1, %eax
je 0x8b3f
testl %eax, %eax
jne 0x8c47
testl %r13d, %r13d
cmovel %ebp, %r13d
movq %r15, %rdi
movl %ebp, %esi
callq 0x9cb8
movq (%rax), %rax
movq 0x28(%rax), %rbx
pushq $0x4
popq %rdi
callq 0x2240
addq $0xc, %rbx
movl %ebp, (%rax)
leaq 0x28(%rsp), %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x9cec
incl 0x14(%rsp)
jmp 0x8c47
cmpb $0x0, 0x971b(%rip)      # 0x12261
jne 0x8c47
movq %r15, %rdi
movl %ebp, %esi
callq 0x9cb8
movq (%rax), %rax
movq 0x28(%rax), %rsi
addq $0xc, %rsi
leaq 0x28(%rsp), %rdi
callq 0x9f8a
incl 0xc(%rsp)
jmp 0x8c47
cmpb $0x1, 0x96e6(%rip)      # 0x12261
jne 0x8c36
movl %r13d, %r12d
cmpl %ebp, %r12d
jge 0x8c36
movq %r15, %rdi
movl %r12d, %esi
callq 0x9cb8
movq (%rax), %rax
cmpl $0x0, (%rax)
jne 0x8c2d
movq %r15, %rdi
movl %r12d, %esi
callq 0x9cb8
movq (%rax), %rax
movq 0x28(%rax), %rsi
addq $0xc, %rsi
leaq 0x28(%rsp), %rdi
callq 0xa17e
movq %rax, %rbx
testq %rax, %rax
jne 0x8bff
movq %r15, %rdi
movl %r12d, %esi
callq 0x9cb8
movq (%rax), %rax
movq 0x28(%rax), %rdx
addq $0xc, %rdx
movl 0x3c(%rsp), %ecx
leaq 0x391b(%rip), %rdi      # 0xc508
movq 0x20(%rsp), %rsi
movl %r13d, %r8d
movl %ebp, %r9d
xorl %eax, %eax
callq 0x25ca
cmpl (%rbx), %r12d
je 0x8c2d
movq %r15, %rdi
movl %r12d, %esi
callq 0x9cb8
movq (%rax), %rax
movq 0x28(%rax), %rdx
addq $0xc, %rdx
leaq 0x3923(%rip), %rdi      # 0xc544
movq 0x20(%rsp), %rsi
xorl %eax, %eax
callq 0x25ca
addl $0x3, %r12d
jmp 0x8b84
leaq 0x28(%rsp), %rdi
callq 0x9c0e
incl 0x10(%rsp)
xorl %r13d, %r13d
incl %ebp
jmp 0x8aa0
movq 0x18(%rsp), %rdi
callq 0x84a0
leaq 0x28(%rsp), %rdi
callq 0x9c0e
leaq 0x3905(%rip), %rdi      # 0xc56e
movl 0x14(%rsp), %esi
movl 0xc(%rsp), %edx
movl 0x10(%rsp), %ecx
xorl %eax, %eax
callq 0x2662
leaq 0x28(%rsp), %rdi
callq 0xa186
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x8c9d
jmp 0x8c9d
jmp 0x8c9d
jmp 0x8c9d
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0xa186
movq %rbx, %rdi
callq 0x2400