// File: /workspace/github_c_makefile_star2_O2/deplinenoise[P]tundra/unittest/Test_HashTable.cpp
// Function: HashTableTest_MultiDistinctCaseFolded_Test::TestBody()
TEST_F(HashTableTest, MultiDistinctCaseFolded)
{
  HashTable<int, kFlagCaseInsensitive> tbl;
  HashTableInit(&tbl, &heap);

  for (int i = 0; i < 2048; ++i)
  {
    char str[128];
    sprintf(str, "foo%d", i);
    HashTableInsert(&tbl, Djb2HashNoCase(str), StrDup(&alloc, str), i);
  }
  EXPECT_EQ(2048, tbl.m_RecordCount);

  for (int i = 0; i < 2048; ++i)
  {
    char str[128];
    sprintf(str, "fOO%d", i);
    int* ptr = HashTableLookup(&tbl, Djb2HashNoCase(str), str);
    ASSERT_NE(nullptr, ptr);
    EXPECT_EQ(i, *ptr);
  }
  HashTableDestroy(&tbl);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
xorps %xmm0, %xmm0
leaq 0x30(%rsp), %r14
movups %xmm0, 0xc(%r14)
movaps %xmm0, (%r14)
movq %rax, 0x20(%r14)
andq $0x0, 0x28(%r14)
addq $0x18, %rbx
leaq 0x15f38(%rip), %r15     # 0x48395
leaq 0x60(%rsp), %r12
movq %rsp, %r13
xorl %edx, %edx
movl %edx, (%rsp)
cmpl $0x800, %edx            # imm = 0x800
jge 0x324ab
movq %r12, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0xd0f0
movq %r12, %rdi
callq 0x33f8d
movl %eax, %ebp
movq %rbx, %rdi
movq %r12, %rsi
callq 0x32f68
movq %r14, %rdi
movl %ebp, %esi
movq %rax, %rdx
movq %r13, %rcx
callq 0x32f8f
movl (%rsp), %edx
incl %edx
jmp 0x32467
movq %rsp, %rcx
movl $0x800, (%rcx)          # imm = 0x800
leaq 0x48(%rsp), %r8
leaq 0x15edb(%rip), %rsi     # 0x4839b
leaq 0x15ea6(%rip), %rdx     # 0x4836d
leaq 0x60(%rsp), %rbx
movq %rbx, %rdi
callq 0x2f537
cmpb $0x0, (%rbx)
jne 0x3252d
movq %rsp, %rdi
callq 0x11c8e
movq 0x68(%rsp), %rax
testq %rax, %rax
je 0x324f0
movq (%rax), %r8
jmp 0x324f7
leaq 0x179b0(%rip), %r8      # 0x49ea7
leaq 0x15e53(%rip), %rdx     # 0x48351
leaq 0x18(%rsp), %rdi
pushq $0x1
popq %rsi
pushq $0x67
popq %rcx
callq 0x104f8
leaq 0x18(%rsp), %rdi
movq %rsp, %rsi
callq 0x10576
leaq 0x18(%rsp), %rdi
callq 0x10558
movq %rsp, %rdi
callq 0x1f8e0
leaq 0x68(%rsp), %rdi
callq 0x2295e
leaq 0x60(%rsp), %r12
movq %rsp, %r14
leaq 0x10(%rsp), %r15
leaq 0x18(%rsp), %r13
leaq 0x2c(%rsp), %rbx
leaq 0x20(%rsp), %rbp
xorl %edx, %edx
movl %edx, 0x2c(%rsp)
cmpl $0x7ff, %edx            # imm = 0x7FF
jg 0x3264d
movq %r12, %rdi
leaq 0x15e49(%rip), %rsi     # 0x483b8
xorl %eax, %eax
callq 0xd0f0
movq %r12, %rdi
callq 0x33f8d
leaq 0x30(%rsp), %rdi
movl %eax, %esi
movq %r12, %rdx
callq 0x32fb1
movq %rax, 0x18(%rsp)
andq $0x0, 0x10(%rsp)
movq %r14, %rdi
leaq 0x13e39(%rip), %rsi     # 0x463db
leaq 0x15dda(%rip), %rdx     # 0x48383
movq %r15, %rcx
movq %r13, %r8
callq 0x32f40
cmpb $0x0, (%rsp)
je 0x32659
leaq 0x8(%rsp), %rdi
callq 0x2295e
movq 0x18(%rsp), %r8
movq %r14, %rdi
leaq 0x1493a(%rip), %rsi     # 0x46f11
leaq 0x15da4(%rip), %rdx     # 0x48382
movq %rbx, %rcx
callq 0x2785d
cmpb $0x0, (%rsp)
jne 0x32638
movq %r15, %rdi
callq 0x11c8e
movq 0x8(%rsp), %rax
leaq 0x178a7(%rip), %r8      # 0x49ea7
testq %rax, %rax
je 0x32608
movq (%rax), %r8
movq %rbp, %rdi
pushq $0x1
popq %rsi
leaq 0x15d3c(%rip), %rdx     # 0x48351
pushq $0x6f
popq %rcx
callq 0x104f8
movq %rbp, %rdi
movq %r15, %rsi
callq 0x10576
movq %rbp, %rdi
callq 0x10558
movq %r15, %rdi
callq 0x1f8e0
leaq 0x8(%rsp), %rdi
callq 0x2295e
movl 0x2c(%rsp), %edx
incl %edx
jmp 0x32555
leaq 0x30(%rsp), %rdi
callq 0x32fcf
jmp 0x326bd
leaq 0x10(%rsp), %rdi
callq 0x11c8e
movq 0x8(%rsp), %rax
testq %rax, %rax
je 0x32672
movq (%rax), %r8
jmp 0x32679
leaq 0x1782e(%rip), %r8      # 0x49ea7
leaq 0x15cd1(%rip), %rdx     # 0x48351
leaq 0x20(%rsp), %rdi
pushq $0x2
popq %rsi
pushq $0x6e
popq %rcx
callq 0x104f8
leaq 0x20(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x10576
leaq 0x20(%rsp), %rdi
callq 0x10558
leaq 0x10(%rsp), %rdi
callq 0x1f8e0
leaq 0x8(%rsp), %rdi
callq 0x2295e
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x32705
jmp 0x326fb
jmp 0x32700
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x10558
jmp 0x326e7
movq %rax, %rbx
movq %rsp, %rdi
callq 0x1f8e0
jmp 0x326f4
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
jmp 0x32721
movq %rax, %rbx
jmp 0x32712
movq %rax, %rbx
jmp 0x3271c
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x10558
leaq 0x10(%rsp), %rdi
callq 0x1f8e0
leaq 0x8(%rsp), %rdi
callq 0x2295e
movq %rbx, %rdi
callq 0xdbf0