// File: /workspace/github_cpp_makefile_star2_O2/migueeelvargas[P]Auto-Complete/test.cpp
// Function: modeBST(DictionaryBST*, 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 modeBST (DictionaryBST* dictionaryBST, 
              std::vector<std::string>& words) {
  /* Test - insert() */
  std::cout << "Inserting strings..." << std::endl;
  for( auto i = words.begin(); i != words.end(); ++i) {
    if (dictionaryBST->insert(*i))
      std::cout << "Inserted " << "\"" << *i << "\"" << std::endl;

    else {
      std::cout << "\"" << *i << "\"" << " is already in dictionary." << std::endl;
      pass = false;
    }
  }
  if (pass)
    std::cout << "PASSED." << std::endl;
  else 
    std::cout << "FAILED." << std::endl;

  /* Testing - find() - should all return TRUE */
  words.push_back("alpha");

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

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq 0x57ec(%rip), %rdi      # 0x7fd8
leaq 0x28e7(%rip), %rsi      # 0x50da
callq 0x2160
movq %rax, %rdi
callq 0x20c0
movq (%rbx), %r12
leaq 0x48(%rsp), %r13
leaq 0x284c(%rip), %rbp      # 0x505b
cmpq 0x8(%rbx), %r12
je 0x28c2
movq %r13, %rdi
movq %r12, %rsi
callq 0x21d0
movq %r14, %rdi
movq %r13, %rsi
callq 0x3bf4
movl %eax, %r15d
movq %r13, %rdi
callq 0x20b0
movq 0x5797(%rip), %rdi      # 0x7fd8
testb %r15b, %r15b
je 0x287d
leaq 0x2804(%rip), %rsi      # 0x5051
callq 0x2160
movq %rax, %rdi
movq %rbp, %rsi
callq 0x2160
movq %rax, %rdi
movq %r12, %rsi
callq 0x2150
movq %rax, %rdi
movq %rbp, %rsi
callq 0x2160
movq %rax, %rdi
callq 0x20c0
jmp 0x28b9
movq %rbp, %rsi
callq 0x2160
movq %rax, %rdi
movq %r12, %rsi
callq 0x2150
movq %rax, %rdi
movq %rbp, %rsi
callq 0x2160
movq %rax, %rdi
leaq 0x27b8(%rip), %rsi      # 0x505d
callq 0x2160
movq %rax, %rdi
callq 0x20c0
movb $0x0, 0x587f(%rip)      # 0x8138
addq $0x20, %r12
jmp 0x280f
leaq 0x27af(%rip), %rax      # 0x5078
leaq 0x27b0(%rip), %rsi      # 0x5080
cmpb $0x0, 0x5861(%rip)      # 0x8138
cmovneq %rax, %rsi
movq 0x56f6(%rip), %rdi      # 0x7fd8
callq 0x2160
movq %rax, %rdi
callq 0x20c0
leaq 0x2792(%rip), %rsi      # 0x5088
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x32bc
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x337e
leaq 0x8(%rsp), %rdi
callq 0x20b0
movq 0x56b5(%rip), %rdi      # 0x7fd8
leaq 0x2764(%rip), %rsi      # 0x508e
callq 0x2160
movq %rax, %rdi
callq 0x20c0
movq (%rbx), %r12
leaq 0x28(%rsp), %r13
leaq 0x2715(%rip), %rbp      # 0x505b
cmpq 0x8(%rbx), %r12
je 0x2a27
movq %r13, %rdi
movq %r12, %rsi
callq 0x21d0
movq %r14, %rdi
movq %r13, %rsi
callq 0x3c5e
movl %eax, %r15d
movq %r13, %rdi
callq 0x20b0
testb %r15b, %r15b
je 0x29e2
movq 0x565b(%rip), %r15      # 0x7fd8
movq %r15, %rdi
leaq 0x271a(%rip), %rsi      # 0x50a1
callq 0x2160
movq %rax, %rdi
movq %rbp, %rsi
callq 0x2160
movq %rax, %rdi
movq %r12, %rsi
callq 0x2150
movq %rax, %rdi
movq %rbp, %rsi
callq 0x2160
movq %rax, %rdi
callq 0x20c0
movq %r15, %rdi
leaq 0x26e9(%rip), %rsi      # 0x50a8
callq 0x2160
movq %rax, %rdi
movq %rbp, %rsi
callq 0x2160
movq %rax, %rdi
movq %r12, %rsi
callq 0x2150
movq %rax, %rdi
movq %rbp, %rsi
jmp 0x2a11
movq 0x55ef(%rip), %rdi      # 0x7fd8
movq %rbp, %rsi
callq 0x2160
movq %rax, %rdi
movq %r12, %rsi
callq 0x2150
movq %rax, %rdi
movq %rbp, %rsi
callq 0x2160
movq %rax, %rdi
leaq 0x269e(%rip), %rsi      # 0x50af
callq 0x2160
movq %rax, %rdi
callq 0x20c0
addq $0x20, %r12
jmp 0x2946
movq 0x55aa(%rip), %rdi      # 0x7fd8
leaq 0x2695(%rip), %rsi      # 0x50ca
callq 0x2160
movq %rax, %rdi
callq 0x20c0
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
jmp 0x2a72
movq %rax, %rbx
jmp 0x2a77
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
jmp 0x2a72
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x20b0
movq %rbx, %rdi
callq 0x2230