// File: /workspace/github_c_makefile_star2_O1/deplinenoise[P]tundra/unittest/Test_HashTable.cpp
// Function: HashSetTest_MultiDistinct_Test::TestBody()
TEST_F(HashSetTest, MultiDistinct)
{
  HashSet<kFlagCaseSensitive> tbl;
  HashSetInit(&tbl, &heap);

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

  for (int i = 0; i < 2048; ++i)
  {
    char str[128];
    sprintf(str, "foo%d", i);
    EXPECT_TRUE(HashSetLookup(&tbl, Djb2Hash(str), str));
  }
  HashSetDestroy(&tbl);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
xorps %xmm0, %xmm0
leaq 0x40(%rsp), %rcx
movups %xmm0, 0xc(%rcx)
movaps %xmm0, (%rcx)
movq %rax, 0x20(%rcx)
addq $0x18, %rbx
leaq 0x70(%rsp), %r12
xorl %ebp, %ebp
movq %r12, %rdi
leaq 0x171a9(%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 0x40(%rsp), %rdi
movl %r13d, %esi
movq %r14, %rdx
callq 0x41380
incl %ebp
cmpl $0x800, %ebp            # imm = 0x800
jne 0x401d2
leaq 0x18(%rsp), %rcx
movl $0x800, (%rcx)          # imm = 0x800
leaq 0x58(%rsp), %r8
leaq 0x17138(%rip), %rsi     # 0x5738b
leaq 0x17103(%rip), %rdx     # 0x5735d
leaq 0x70(%rsp), %rbx
movq %rbx, %rdi
callq 0x3c516
cmpb $0x0, (%rbx)
jne 0x402f3
leaq 0x18(%rsp), %rdi
callq 0x12eee
movq 0x78(%rsp), %rax
testq %rax, %rax
je 0x40289
movq (%rax), %r8
jmp 0x40290
leaq 0x18bc3(%rip), %r8      # 0x58e53
leaq 0x170aa(%rip), %rdx     # 0x57341
leaq 0x8(%rsp), %rdi
movl $0x1, %esi
movl $0x91, %ecx
callq 0x10bb8
leaq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x10c56
leaq 0x8(%rsp), %rdi
callq 0x10c24
cmpq $0x0, 0x18(%rsp)
je 0x402f3
movl $0x1, %edi
callq 0x10bb4
testb %al, %al
je 0x402ea
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x402ea
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, 0x18(%rsp)
leaq 0x78(%rsp), %rdi
xorl %esi, %esi
callq 0x2c81c
leaq 0x10(%rsp), %rbx
leaq 0x1707a(%rip), %r14     # 0x57385
leaq 0x70(%rsp), %r15
leaq 0x40(%rsp), %r12
leaq 0x38(%rsp), %rbp
xorl %r13d, %r13d
movq %r15, %rdi
movq %r14, %rsi
movl %r13d, %edx
xorl %eax, %eax
callq 0xc0f0
movq %r15, %rdi
callq 0x418a4
movq %r12, %rdi
movl %eax, %esi
movq %r15, %rdx
callq 0x40e86
cmpl $-0x1, %eax
setne 0x8(%rsp)
movq $0x0, 0x10(%rsp)
jne 0x403fe
movq %rsp, %rdi
callq 0x12eee
leaq 0x18(%rsp), %rdi
leaq 0x8(%rsp), %rsi
leaq 0x17066(%rip), %rdx     # 0x573d8
leaq 0x13ef7(%rip), %rcx     # 0x54270
leaq 0x133aa(%rip), %r8      # 0x5372a
callq 0x144bf
movq 0x18(%rsp), %r8
movq %rbp, %rdi
movl $0x1, %esi
leaq 0x16fa8(%rip), %rdx     # 0x57341
movl $0x97, %ecx
callq 0x10bb8
movq %rbp, %rdi
movq %rsp, %rsi
callq 0x10c56
movq %rbp, %rdi
callq 0x10c24
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x403d2
movq 0x28(%rsp), %rsi
incq %rsi
callq 0xc600
cmpq $0x0, (%rsp)
je 0x403fe
movl $0x1, %edi
callq 0x10bb4
testb %al, %al
je 0x403f6
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x403f6
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, (%rsp)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2c81c
incl %r13d
cmpl $0x800, %r13d           # imm = 0x800
jne 0x4031d
movq 0x40(%rsp), %rsi
movq 0x60(%rsp), %rdi
callq 0x42da6
movq 0x48(%rsp), %rsi
movq 0x60(%rsp), %rdi
callq 0x42da6
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x404c8
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x10c24
jmp 0x4045c
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x31faa
jmp 0x4046b
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
jmp 0x404bb
jmp 0x404c8
jmp 0x404c8
movq %rax, %rbx
jmp 0x404ae
movq %rax, %rbx
jmp 0x404b6
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x10c24
jmp 0x40492
movq %rax, %rbx
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x404ae
movq 0x28(%rsp), %rsi
incq %rsi
callq 0xc600
movq %rsp, %rdi
callq 0x31faa
leaq 0x8(%rsp), %rdi
callq 0x31fbc
movq %rbx, %rdi
callq 0xcbb0
movq %rax, %rdi
callq 0x28baf