// File: /workspace/github_cpp_makefile_star2_O3/migueeelvargas[P]Auto-Complete/util.cpp
// Function: Utils::load_dict(DictionaryBST&, std::istream&, unsigned int)
void Utils::load_dict(DictionaryBST& dict, istream& words, unsigned int num_words)
{
  string junk;
  string data = "";
  string temp_word = "";
  string word = "";
  vector<string> word_string;
  unsigned int i = 0;
  unsigned int j = 0;

  for(; j < num_words; j++)
    {
      getline(words, data);
      if(words.eof()) break;
      temp_word = "";
      word = "";
      data = data + " .";
      istringstream iss(data);
      iss >> junk;
      while(1)
        {
          iss >> temp_word;
          if(temp_word == ".") break;
          if(temp_word.length() > 0) word_string.push_back(temp_word);
        }
      for(i = 0; i < word_string.size(); i++)
        {
          if(i > 0) word = word + " ";
          word = word + word_string[i];
        }
      dict.insert(word);
      word_string.clear();
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x288, %rsp            # imm = 0x288
movl %edx, 0xc(%rsp)
movq %rsi, %rbp
movq %rdi, 0xe0(%rsp)
leaq 0xf8(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x40(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x4097(%rip), %rdx      # 0x80b4
leaq 0x30(%rsp), %rdi
movq %rdx, %rsi
callq 0x37e0
leaq 0x80(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x4077(%rip), %rdx      # 0x80b4
leaq 0x70(%rsp), %rdi
movq %rdx, %rsi
callq 0x37e0
leaq 0x60(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x405a(%rip), %rdx      # 0x80b4
leaq 0x50(%rsp), %rdi
movq %rdx, %rsi
callq 0x37e0
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
cmpl $0x0, 0xc(%rsp)
je 0x43b2
xorl %r14d, %r14d
leaq 0x70(%rsp), %rbx
leaq 0x50(%rsp), %r15
leaq 0x108(%rsp), %r13
leaq 0x98(%rsp), %r12
movq %rbp, 0xd8(%rsp)
movq (%rbp), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %edx
movq %rbp, %rdi
leaq 0x30(%rsp), %rsi
callq 0x2300
movq (%rbp), %rax
movq -0x18(%rax), %rax
testb $0x2, 0x20(%rbp,%rax)
jne 0x43b2
movq 0x78(%rsp), %rdx
movq %rbx, %rdi
xorl %esi, %esi
leaq 0x3fc3(%rip), %rcx      # 0x80b4
xorl %r8d, %r8d
callq 0x2280
movq 0x58(%rsp), %rdx
movq %r15, %rdi
xorl %esi, %esi
leaq 0x3faa(%rip), %rcx      # 0x80b4
xorl %r8d, %r8d
callq 0x2280
leaq 0x118(%rsp), %rax
movq %rax, 0x108(%rsp)
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
addq %rsi, %rdx
movq %r13, %rdi
callq 0x349c
movq %r13, %rdi
leaq 0x3fdc(%rip), %rsi      # 0x811d
callq 0x2320
leaq 0x30(%rsp), %rdi
movq %r13, %rsi
callq 0x2220
movq 0x108(%rsp), %rdi
leaq 0x118(%rsp), %rax
cmpq %rax, %rdi
je 0x4178
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x21d0
movq %r13, %rdi
leaq 0x30(%rsp), %rsi
movl $0x8, %edx
callq 0x22c0
movq %r13, %rdi
leaq 0xe8(%rsp), %rsi
callq 0x2230
movq %r13, %rdi
movq %rbx, %rsi
callq 0x2230
movq %rbx, %rdi
leaq 0x3f6f(%rip), %rsi      # 0x811e
callq 0x20a0
testl %eax, %eax
je 0x41cf
cmpq $0x0, 0x78(%rsp)
je 0x419a
leaq 0x10(%rsp), %rdi
movq %rbx, %rsi
callq 0x5b74
jmp 0x419a
movq %r14, 0x90(%rsp)
movq 0x10(%rsp), %rax
cmpq %rax, 0x18(%rsp)
je 0x42c4
movl $0x1, %r13d
xorl %r14d, %r14d
cmpl $0x1, %r13d
je 0x425f
leaq 0xa8(%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x349c
movq %r12, %rdi
leaq 0x3efb(%rip), %rsi      # 0x8120
callq 0x2320
movq %r15, %rdi
movq %r12, %rsi
callq 0x2220
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0x425a
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x21d0
movq 0x10(%rsp), %rax
shlq $0x5, %r14
addq %rax, %r14
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x5bb1
movq %r15, %rdi
movq %r12, %rsi
callq 0x2220
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0x42a4
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x21d0
movl %r13d, %r14d
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
subq %rax, %rcx
sarq $0x5, %rcx
incl %r13d
cmpq %r14, %rcx
ja 0x41f0
leaq 0xc8(%rsp), %rax
movq %rax, 0xb8(%rsp)
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
addq %rsi, %rdx
leaq 0xb8(%rsp), %rdi
callq 0x349c
movq 0xe0(%rsp), %rdi
leaq 0xb8(%rsp), %rsi
callq 0x6926
movq 0xb8(%rsp), %rdi
leaq 0xc8(%rsp), %rax
cmpq %rax, %rdi
je 0x4328
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x21d0
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %r13
cmpq %rax, %r13
movq 0x90(%rsp), %r14
je 0x4380
movq %rax, %r14
leaq 0x10(%rax), %rbp
movq -0x10(%rbp), %rdi
cmpq %rdi, %rbp
je 0x435b
movq (%rbp), %rsi
incq %rsi
callq 0x21d0
leaq 0x20(%rbp), %rax
addq $0x10, %rbp
cmpq %r13, %rbp
movq %rax, %rbp
jne 0x4346
movq %r14, 0x18(%rsp)
movq 0xd8(%rsp), %rbp
movq 0x90(%rsp), %r14
leaq 0x108(%rsp), %r13
movq %r13, %rdi
movq 0x6c3e(%rip), %rsi      # 0xafd0
callq 0x2250
leaq 0x180(%rsp), %rdi
callq 0x20c0
incl %r14d
cmpl 0xc(%rsp), %r14d
jne 0x40a8
leaq 0x10(%rsp), %rdi
callq 0x3352
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x43d8
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x21d0
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x43fa
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x21d0
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x4416
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x21d0
movq 0xe8(%rsp), %rdi
leaq 0xf8(%rsp), %rax
cmpq %rax, %rdi
je 0x443b
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x21d0
addq $0x288, %rsp            # imm = 0x288
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x4534
movq %rax, %rbx
jmp 0x4556
movq %rax, %rbx
jmp 0x4572
movq %rax, %rbx
movq 0xb8(%rsp), %rdi
leaq 0xc8(%rsp), %rax
cmpq %rax, %rdi
je 0x44ed
movq 0xc8(%rsp), %rsi
jmp 0x44de
jmp 0x44b7
jmp 0x44b7
movq %rax, %rbx
movq 0x108(%rsp), %rdi
leaq 0x118(%rsp), %rax
cmpq %rax, %rdi
je 0x450e
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x21d0
jmp 0x450e
jmp 0x44ea
movq %rax, %rbx
jmp 0x450e
jmp 0x44ea
movq %rax, %rbx
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0x44ed
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x21d0
jmp 0x44ed
jmp 0x44ea
movq %rax, %rbx
movq 0x6adc(%rip), %rsi      # 0xafd0
leaq 0x108(%rsp), %rdi
callq 0x2250
leaq 0x180(%rsp), %rdi
callq 0x20c0
leaq 0x10(%rsp), %rdi
callq 0x3352
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x4534
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x21d0
leaq 0x80(%rsp), %rax
movq 0x70(%rsp), %rdi
cmpq %rax, %rdi
je 0x4556
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x21d0
leaq 0x40(%rsp), %rax
movq 0x30(%rsp), %rdi
cmpq %rax, %rdi
je 0x4572
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x21d0
movq 0xe8(%rsp), %rdi
leaq 0xf8(%rsp), %rax
cmpq %rax, %rdi
je 0x4597
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x21d0
movq %rbx, %rdi
callq 0x22e0
nop