// File: migueeelvargas[P]Auto-Complete/test.cpp
// Function: modeHT(DictionaryHashtable*, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&)
void modeHT (DictionaryHashtable* dictionaryHT, 
              std::vector<std::string>& words) {
    /* Test - insert() */
  std::cout << "Inserting strings..." << std::endl;
  for( auto i = words.begin(); i != words.end(); ++i) {
    if (dictionaryHT->insert(*i))
      std::cout << "Inserted " << "\"" << *i << "\"" << std::endl;

    else 
      std::cout << "\"" << *i << "\"" << " is already in dictionary." << std::endl;
  }
  std::cout << "OK." << std::endl;

  /* Testing - find() */
  words.push_back("alpha");

  std::cout << "Finding strings..." << std::endl;
  for( auto i = words.begin(); i != words.end(); ++i) {
    if (dictionaryHT->find(*i))
      std::cout << "Found " << "\"" << *i << "\"" << std::endl;

    else 
      std::cout << "\"" << *i << "\"" << " is not in the dictionary." << std::endl;
  }
  std::cout << "Done." << std::endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq 0xdcae(%rip), %rdi      # 0x10fd8
leaq 0x7dac(%rip), %rsi      # 0xb0dd
callq 0x21a0
movq %rax, %rdi
movq 0xdc88(%rip), %rsi      # 0x10fc8
callq 0x21e0
movq -0x10(%rbp), %rdi
callq 0x43e0
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x4450
movq %rax, -0x20(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x4410
testb $0x1, %al
jne 0x3375
jmp 0x34b6
movq -0x8(%rbp), %rax
movq %rax, -0xc0(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x4480
movq %rax, %rsi
leaq -0x40(%rbp), %rdi
movq %rdi, -0xb8(%rbp)
callq 0x20a0
movq -0xc0(%rbp), %rdi
movq -0xb8(%rbp), %rsi
callq 0x53c0
movb %al, -0xa9(%rbp)
jmp 0x33b7
leaq -0x40(%rbp), %rdi
callq 0x2100
movb -0xa9(%rbp), %al
testb $0x1, %al
jne 0x33cc
jmp 0x3447
movq 0xdc05(%rip), %rdi      # 0x10fd8
leaq 0x7c7a(%rip), %rsi      # 0xb054
callq 0x21a0
movq %rax, %rdi
leaq 0x7c75(%rip), %rsi      # 0xb05e
callq 0x21a0
movq %rax, -0xc8(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x4480
movq -0xc8(%rbp), %rdi
movq %rax, %rsi
callq 0x2190
movq %rax, %rdi
leaq 0x7c47(%rip), %rsi      # 0xb05e
callq 0x21a0
movq %rax, %rdi
movq 0xdba2(%rip), %rsi      # 0x10fc8
callq 0x21e0
jmp 0x34a6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x2100
jmp 0x3734
movq 0xdb8a(%rip), %rdi      # 0x10fd8
leaq 0x7c09(%rip), %rsi      # 0xb05e
callq 0x21a0
movq %rax, -0xd0(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x4480
movq -0xd0(%rbp), %rdi
movq %rax, %rsi
callq 0x2190
movq %rax, %rdi
leaq 0x7bdb(%rip), %rsi      # 0xb05e
callq 0x21a0
movq %rax, %rdi
leaq 0x7bce(%rip), %rsi      # 0xb060
callq 0x21a0
movq %rax, %rdi
movq 0xdb27(%rip), %rsi      # 0x10fc8
callq 0x21e0
jmp 0x34a8
leaq -0x18(%rbp), %rdi
callq 0x44a0
jmp 0x3352
movq 0xdb1b(%rip), %rdi      # 0x10fd8
leaq 0x7c0f(%rip), %rsi      # 0xb0d3
callq 0x21a0
movq %rax, %rdi
movq 0xdaf5(%rip), %rsi      # 0x10fc8
callq 0x21e0
movq -0x10(%rbp), %rax
movq %rax, -0xe0(%rbp)
leaq -0x71(%rbp), %rdi
movq %rdi, -0xd8(%rbp)
callq 0x22f0
movq -0xd8(%rbp), %rdx
leaq 0x7b8a(%rip), %rsi      # 0xb08b
leaq -0x70(%rbp), %rdi
callq 0x42d0
jmp 0x350c
movq -0xe0(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x42a0
jmp 0x351e
leaq -0x70(%rbp), %rdi
callq 0x2100
leaq -0x71(%rbp), %rdi
callq 0x2210
movq 0xdaa1(%rip), %rdi      # 0x10fd8
leaq 0x7b53(%rip), %rsi      # 0xb091
callq 0x21a0
movq %rax, %rdi
movq 0xda7b(%rip), %rsi      # 0x10fc8
callq 0x21e0
movq -0x10(%rbp), %rdi
callq 0x43e0
movq %rax, -0x80(%rbp)
movq -0x10(%rbp), %rdi
callq 0x4450
movq %rax, -0x88(%rbp)
leaq -0x80(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x4410
testb $0x1, %al
jne 0x3588
jmp 0x3709
movq -0x8(%rbp), %rax
movq %rax, -0xf8(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x4480
movq %rax, %rsi
leaq -0xa8(%rbp), %rdi
movq %rdi, -0xf0(%rbp)
callq 0x20a0
movq -0xf8(%rbp), %rdi
movq -0xf0(%rbp), %rsi
callq 0x5460
movb %al, -0xe1(%rbp)
jmp 0x35cd
leaq -0xa8(%rbp), %rdi
callq 0x2100
movb -0xe1(%rbp), %al
testb $0x1, %al
jne 0x35e8
jmp 0x369a
movq 0xd9e9(%rip), %rdi      # 0x10fd8
leaq 0x7aae(%rip), %rsi      # 0xb0a4
callq 0x21a0
movq %rax, %rdi
leaq 0x7a59(%rip), %rsi      # 0xb05e
callq 0x21a0
movq %rax, -0x100(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x4480
movq -0x100(%rbp), %rdi
movq %rax, %rsi
callq 0x2190
movq %rax, %rdi
leaq 0x7a2b(%rip), %rsi      # 0xb05e
callq 0x21a0
movq %rax, %rdi
movq 0xd986(%rip), %rsi      # 0x10fc8
callq 0x21e0
jmp 0x36f9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x366f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x2100
leaq -0x71(%rbp), %rdi
callq 0x2210
jmp 0x3734
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x2100
jmp 0x3734
movq 0xd937(%rip), %rdi      # 0x10fd8
leaq 0x79b6(%rip), %rsi      # 0xb05e
callq 0x21a0
movq %rax, -0x108(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x4480
movq -0x108(%rbp), %rdi
movq %rax, %rsi
callq 0x2190
movq %rax, %rdi
leaq 0x7988(%rip), %rsi      # 0xb05e
callq 0x21a0
movq %rax, %rdi
leaq 0x79cd(%rip), %rsi      # 0xb0b2
callq 0x21a0
movq %rax, %rdi
movq 0xd8d4(%rip), %rsi      # 0x10fc8
callq 0x21e0
jmp 0x36fb
leaq -0x80(%rbp), %rdi
callq 0x44a0
jmp 0x355f
movq 0xd8c8(%rip), %rdi      # 0x10fd8
leaq 0x79b6(%rip), %rsi      # 0xb0cd
callq 0x21a0
movq %rax, %rdi
movq 0xd8a2(%rip), %rsi      # 0x10fc8
callq 0x21e0
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0x22e0
nopl (%rax)