// File: /workspace/github_c_makefile_star2_O1/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), %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 0x17d5d(%rip), %rsi     # 0x57385
movl %ebp, %edx
xorl %eax, %eax
callq 0xc0f0
movq %r12, %rdi
callq 0x418a4
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 0x40cb4
movq 0x58(%rsp), %rcx
cltq
movl %ebp, (%rcx,%rax,4)
incl %ebp
cmpl $0x800, %ebp            # imm = 0x800
jne 0x3f61e
leaq 0x8(%rsp), %rcx
movl $0x800, (%rcx)          # imm = 0x800
leaq 0x48(%rsp), %r8
leaq 0x17ce2(%rip), %rsi     # 0x5738b
leaq 0x17cad(%rip), %rdx     # 0x5735d
leaq 0x60(%rsp), %rbx
movq %rbx, %rdi
callq 0x3c516
cmpb $0x0, (%rbx)
jne 0x3f749
leaq 0x8(%rsp), %rdi
callq 0x12eee
movq 0x68(%rsp), %rax
testq %rax, %rax
je 0x3f6df
movq (%rax), %r8
jmp 0x3f6e6
leaq 0x1976d(%rip), %r8      # 0x58e53
leaq 0x17c54(%rip), %rdx     # 0x57341
leaq 0x20(%rsp), %rdi
movl $0x1, %esi
movl $0x4f, %ecx
callq 0x10bb8
leaq 0x20(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x10c56
leaq 0x20(%rsp), %rdi
callq 0x10c24
cmpq $0x0, 0x8(%rsp)
je 0x3f749
movl $0x1, %edi
callq 0x10bb4
testb %al, %al
je 0x3f740
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x3f740
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 0x17c02(%rip), %rsi     # 0x57385
xorl %eax, %eax
callq 0xc0f0
movq %r13, %rdi
callq 0x418a4
leaq 0x30(%rsp), %rdi
movl %eax, %esi
movq %r13, %rdx
callq 0x40e86
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 0x15c08(%rip), %rsi     # 0x553db
leaq 0x17b99(%rip), %rdx     # 0x57373
movq %rbp, %rcx
movq %r14, %r8
callq 0x4086d
movb 0x8(%rsp), %bl
testb %bl, %bl
je 0x3f8d1
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
callq 0x2c81c
movq 0x20(%rsp), %r8
movq %r12, %rdi
leaq 0x166f5(%rip), %rsi     # 0x55f01
leaq 0x17b5f(%rip), %rdx     # 0x57372
leaq 0x1c(%rsp), %rcx
callq 0x32072
cmpb $0x0, 0x8(%rsp)
jne 0x3f898
movq %rbp, %rdi
callq 0x12eee
movq 0x10(%rsp), %rax
leaq 0x1961b(%rip), %r8      # 0x58e53
testq %rax, %rax
je 0x3f840
movq (%rax), %r8
movq %r15, %rdi
movl $0x1, %esi
leaq 0x17af2(%rip), %rdx     # 0x57341
movl $0x57, %ecx
callq 0x10bb8
movq %r15, %rdi
movq %rbp, %rsi
callq 0x10c56
movq %r15, %rdi
callq 0x10c24
cmpq $0x0, (%rsp)
je 0x3f898
movl $0x1, %edi
callq 0x10bb4
testb %al, %al
je 0x3f890
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x3f890
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, (%rsp)
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
callq 0x2c81c
testb %bl, %bl
je 0x3f959
movl 0x1c(%rsp), %eax
leal 0x1(%rax), %edx
movl %edx, 0x1c(%rsp)
cmpl $0x7fe, %eax            # imm = 0x7FE
jle 0x3f779
leaq 0x30(%rsp), %rdi
callq 0x4082f
jmp 0x3f959
movq %rsp, %rdi
callq 0x12eee
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x3f8e8
movq (%rax), %r8
jmp 0x3f8ef
leaq 0x19564(%rip), %r8      # 0x58e53
leaq 0x17a4b(%rip), %rdx     # 0x57341
leaq 0x28(%rsp), %rdi
movl $0x2, %esi
movl $0x56, %ecx
callq 0x10bb8
leaq 0x28(%rsp), %rdi
movq %rsp, %rsi
callq 0x10c56
leaq 0x28(%rsp), %rdi
callq 0x10c24
cmpq $0x0, (%rsp)
je 0x3f94d
movl $0x1, %edi
callq 0x10bb4
testb %al, %al
je 0x3f945
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x3f945
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 0x3f9d6
jmp 0x3f9d6
jmp 0x3f9d6
jmp 0x3f9a8
jmp 0x3f9b7
jmp 0x3f9a3
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x10c24
jmp 0x3f989
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x31faa
jmp 0x3f998
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
jmp 0x3f9c7
jmp 0x3f9d6
jmp 0x3f9d6
movq %rax, %rbx
jmp 0x3f9c2
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x10c24
jmp 0x3f9ba
movq %rax, %rbx
movq %rsp, %rdi
callq 0x31faa
leaq 0x8(%rsp), %rdi
callq 0x31fbc
movq %rbx, %rdi
callq 0xcbb0
jmp 0x3f9d6
movq %rax, %rdi
callq 0x28baf