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

  for (int i = 0; i < 2048; ++i)
  {
    char str[128];
    sprintf(str, "foo%d", i);
    HashTableInsert(&tbl, Djb2Hash(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, Djb2Hash(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 0x16246(%rip), %r15     # 0x48395
leaq 0x60(%rsp), %r12
movq %rsp, %r13
xorl %edx, %edx
movl %edx, (%rsp)
cmpl $0x800, %edx            # imm = 0x800
jge 0x3219d
movq %r12, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0xd0f0
movq %r12, %rdi
callq 0x33f4e
movl %eax, %ebp
movq %rbx, %rdi
movq %r12, %rsi
callq 0x32f68
movq %r14, %rdi
movl %ebp, %esi
movq %rax, %rdx
movq %r13, %rcx
callq 0x32f00
movl (%rsp), %edx
incl %edx
jmp 0x32159
movq %rsp, %rcx
movl $0x800, (%rcx)          # imm = 0x800
leaq 0x48(%rsp), %r8
leaq 0x161e9(%rip), %rsi     # 0x4839b
leaq 0x161b4(%rip), %rdx     # 0x4836d
leaq 0x60(%rsp), %rbx
movq %rbx, %rdi
callq 0x2f537
cmpb $0x0, (%rbx)
jne 0x3221f
movq %rsp, %rdi
callq 0x11c8e
movq 0x68(%rsp), %rax
testq %rax, %rax
je 0x321e2
movq (%rax), %r8
jmp 0x321e9
leaq 0x17cbe(%rip), %r8      # 0x49ea7
leaq 0x16161(%rip), %rdx     # 0x48351
leaq 0x18(%rsp), %rdi
pushq $0x1
popq %rsi
pushq $0x4f
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 0x3233f
movq %r12, %rdi
leaq 0x16134(%rip), %rsi     # 0x48395
xorl %eax, %eax
callq 0xd0f0
movq %r12, %rdi
callq 0x33f4e
leaq 0x30(%rsp), %rdi
movl %eax, %esi
movq %r12, %rdx
callq 0x32f22
movq %rax, 0x18(%rsp)
andq $0x0, 0x10(%rsp)
movq %r14, %rdi
leaq 0x14147(%rip), %rsi     # 0x463db
leaq 0x160e8(%rip), %rdx     # 0x48383
movq %r15, %rcx
movq %r13, %r8
callq 0x32f40
cmpb $0x0, (%rsp)
je 0x3234b
leaq 0x8(%rsp), %rdi
callq 0x2295e
movq 0x18(%rsp), %r8
movq %r14, %rdi
leaq 0x14c48(%rip), %rsi     # 0x46f11
leaq 0x160b2(%rip), %rdx     # 0x48382
movq %rbx, %rcx
callq 0x2785d
cmpb $0x0, (%rsp)
jne 0x3232a
movq %r15, %rdi
callq 0x11c8e
movq 0x8(%rsp), %rax
leaq 0x17bb5(%rip), %r8      # 0x49ea7
testq %rax, %rax
je 0x322fa
movq (%rax), %r8
movq %rbp, %rdi
pushq $0x1
popq %rsi
leaq 0x1604a(%rip), %rdx     # 0x48351
pushq $0x57
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 0x32247
leaq 0x30(%rsp), %rdi
callq 0x32ed9
jmp 0x323af
leaq 0x10(%rsp), %rdi
callq 0x11c8e
movq 0x8(%rsp), %rax
testq %rax, %rax
je 0x32364
movq (%rax), %r8
jmp 0x3236b
leaq 0x17b3c(%rip), %r8      # 0x49ea7
leaq 0x15fdf(%rip), %rdx     # 0x48351
leaq 0x20(%rsp), %rdi
pushq $0x2
popq %rsi
pushq $0x56
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 0x323f7
jmp 0x323ed
jmp 0x323f2
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x10558
jmp 0x323d9
movq %rax, %rbx
movq %rsp, %rdi
callq 0x1f8e0
jmp 0x323e6
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
jmp 0x32413
movq %rax, %rbx
jmp 0x32404
movq %rax, %rbx
jmp 0x3240e
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