// File: /workspace/github_c_makefile_star2_O1/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), %rcx
movups %xmm0, 0xc(%rcx)
movaps %xmm0, (%rcx)
movq %rax, 0x20(%rcx)
movq $0x0, 0x28(%rcx)
addq $0x18, %rbx
leaq 0x60(%rsp), %r12
xorl %ebp, %ebp
movq %r12, %rdi
leaq 0x1795f(%rip), %rsi     # 0x57385
movl %ebp, %edx
xorl %eax, %eax
callq 0xc0f0
movq %r12, %rdi
callq 0x4190e
movl %eax, %r13d
movq %r12, %rdi
callq 0xc260
movq %rax, %r15
leaq 0x1(%rax), %rsi
movl $0x1, %edx
movq %rbx, %rdi
callq 0x42e6c
movq %rax, %r14
movq %rax, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0xc4b0
movb $0x0, (%r14,%r15)
leaq 0x30(%rsp), %rdi
movl %r13d, %esi
movq %r14, %rdx
callq 0x410b3
movq 0x58(%rsp), %rcx
cltq
movl %ebp, (%rcx,%rax,4)
incl %ebp
cmpl $0x800, %ebp            # imm = 0x800
jne 0x3fa1c
leaq 0x8(%rsp), %rcx
movl $0x800, (%rcx)          # imm = 0x800
leaq 0x48(%rsp), %r8
leaq 0x178e4(%rip), %rsi     # 0x5738b
leaq 0x178af(%rip), %rdx     # 0x5735d
leaq 0x60(%rsp), %rbx
movq %rbx, %rdi
callq 0x3c516
cmpb $0x0, (%rbx)
jne 0x3fb47
leaq 0x8(%rsp), %rdi
callq 0x12eee
movq 0x68(%rsp), %rax
testq %rax, %rax
je 0x3fadd
movq (%rax), %r8
jmp 0x3fae4
leaq 0x1936f(%rip), %r8      # 0x58e53
leaq 0x17856(%rip), %rdx     # 0x57341
leaq 0x20(%rsp), %rdi
movl $0x1, %esi
movl $0x67, %ecx
callq 0x10bb8
leaq 0x20(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x10c56
leaq 0x20(%rsp), %rdi
callq 0x10c24
cmpq $0x0, 0x8(%rsp)
je 0x3fb47
movl $0x1, %edi
callq 0x10bb4
testb %al, %al
je 0x3fb3e
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x3fb3e
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, 0x8(%rsp)
leaq 0x68(%rsp), %rdi
xorl %esi, %esi
callq 0x2c81c
leaq 0x1c(%rsp), %rax
movl $0x0, (%rax)
leaq 0x60(%rsp), %r13
leaq 0x8(%rsp), %r12
movq %rsp, %rbp
leaq 0x20(%rsp), %r14
leaq 0x28(%rsp), %r15
xorl %edx, %edx
movq %r13, %rdi
leaq 0x17827(%rip), %rsi     # 0x573a8
xorl %eax, %eax
callq 0xc0f0
movq %r13, %rdi
callq 0x4190e
leaq 0x30(%rsp), %rdi
movl %eax, %esi
movq %r13, %rdx
callq 0x41285
cltq
leaq (,%rax,4), %rcx
addq 0x58(%rsp), %rcx
cmpl $-0x1, %eax
movl $0x0, %eax
cmovneq %rcx, %rax
movq %rax, 0x20(%rsp)
movq $0x0, (%rsp)
movq %r12, %rdi
leaq 0x1580a(%rip), %rsi     # 0x553db
leaq 0x1779b(%rip), %rdx     # 0x57373
movq %rbp, %rcx
movq %r14, %r8
callq 0x4086d
movb 0x8(%rsp), %bl
testb %bl, %bl
je 0x3fccf
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
callq 0x2c81c
movq 0x20(%rsp), %r8
movq %r12, %rdi
leaq 0x162f7(%rip), %rsi     # 0x55f01
leaq 0x17761(%rip), %rdx     # 0x57372
leaq 0x1c(%rsp), %rcx
callq 0x32072
cmpb $0x0, 0x8(%rsp)
jne 0x3fc96
movq %rbp, %rdi
callq 0x12eee
movq 0x10(%rsp), %rax
leaq 0x1921d(%rip), %r8      # 0x58e53
testq %rax, %rax
je 0x3fc3e
movq (%rax), %r8
movq %r15, %rdi
movl $0x1, %esi
leaq 0x176f4(%rip), %rdx     # 0x57341
movl $0x6f, %ecx
callq 0x10bb8
movq %r15, %rdi
movq %rbp, %rsi
callq 0x10c56
movq %r15, %rdi
callq 0x10c24
cmpq $0x0, (%rsp)
je 0x3fc96
movl $0x1, %edi
callq 0x10bb4
testb %al, %al
je 0x3fc8e
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x3fc8e
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, (%rsp)
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
callq 0x2c81c
testb %bl, %bl
je 0x3fd57
movl 0x1c(%rsp), %eax
leal 0x1(%rax), %edx
movl %edx, 0x1c(%rsp)
cmpl $0x7fe, %eax            # imm = 0x7FE
jle 0x3fb77
leaq 0x30(%rsp), %rdi
callq 0x40895
jmp 0x3fd57
movq %rsp, %rdi
callq 0x12eee
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x3fce6
movq (%rax), %r8
jmp 0x3fced
leaq 0x19166(%rip), %r8      # 0x58e53
leaq 0x1764d(%rip), %rdx     # 0x57341
leaq 0x28(%rsp), %rdi
movl $0x2, %esi
movl $0x6e, %ecx
callq 0x10bb8
leaq 0x28(%rsp), %rdi
movq %rsp, %rsi
callq 0x10c56
leaq 0x28(%rsp), %rdi
callq 0x10c24
cmpq $0x0, (%rsp)
je 0x3fd4b
movl $0x1, %edi
callq 0x10bb4
testb %al, %al
je 0x3fd43
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x3fd43
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, (%rsp)
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
callq 0x2c81c
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3fdd4
jmp 0x3fdd4
jmp 0x3fdd4
jmp 0x3fda6
jmp 0x3fdb5
jmp 0x3fda1
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x10c24
jmp 0x3fd87
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x31faa
jmp 0x3fd96
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
jmp 0x3fdc5
jmp 0x3fdd4
jmp 0x3fdd4
movq %rax, %rbx
jmp 0x3fdc0
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x10c24
jmp 0x3fdb8
movq %rax, %rbx
movq %rsp, %rdi
callq 0x31faa
leaq 0x8(%rsp), %rdi
callq 0x31fbc
movq %rbx, %rdi
callq 0xcbb0
jmp 0x3fdd4
movq %rax, %rdi
callq 0x28baf