// File: /workspace/github_cpp_makefile_star2_O2/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 $0x278, %rsp            # imm = 0x278
movl %edx, (%rsp)
movq %rsi, 0x8(%rsp)
movq %rdi, 0x30(%rsp)
leaq 0xa8(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x2857(%rip), %rsi      # 0x60b4
leaq 0x58(%rsp), %rdi
leaq 0xf8(%rsp), %rdx
callq 0x2f6e
leaq 0x283e(%rip), %rsi      # 0x60b4
leaq 0x38(%rsp), %rdi
leaq 0xf8(%rsp), %rdx
callq 0x2f6e
leaq 0x2825(%rip), %rsi      # 0x60b4
leaq 0x78(%rsp), %rdi
leaq 0xf8(%rsp), %rdx
callq 0x2f6e
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rax
movaps %xmm0, (%rax)
andq $0x0, 0x10(%rax)
xorl %eax, %eax
leaq 0x38(%rsp), %r15
leaq 0x78(%rsp), %rbx
leaq 0xf8(%rsp), %rbp
leaq 0x2852(%rip), %r13      # 0x611e
leaq 0xd8(%rsp), %r14
movl %eax, 0x4(%rsp)
cmpl (%rsp), %eax
je 0x3a60
movq 0x8(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0x2060
movq 0x8(%rsp), %rcx
movq (%rcx), %rax
movq -0x18(%rax), %rax
testb $0x2, 0x20(%rcx,%rax)
jne 0x3a60
movq %r15, %rdi
leaq 0x27a3(%rip), %rsi      # 0x60b4
callq 0x2310
movq %rbx, %rdi
leaq 0x2794(%rip), %rsi      # 0x60b4
callq 0x2310
movq %rbp, %rdi
leaq 0x58(%rsp), %r12
movq %r12, %rsi
leaq 0x27e6(%rip), %rdx      # 0x611d
callq 0x46cb
movq %r12, %rdi
movq %rbp, %rsi
callq 0x2220
movq %rbp, %rdi
callq 0x2100
movq %rbp, %rdi
movq %r12, %rsi
pushq $0x8
popq %rdx
callq 0x22c0
movq %rbp, %rdi
leaq 0x98(%rsp), %rsi
callq 0x2230
movq %rbp, %rdi
movq %r15, %rsi
callq 0x2230
movq %r15, %rdi
movq %r13, %rsi
callq 0x4703
testb %al, %al
jne 0x399e
cmpq $0x0, 0x40(%rsp)
je 0x396d
leaq 0x10(%rsp), %rdi
movq %r15, %rsi
callq 0x4710
jmp 0x396d
xorl %r12d, %r12d
movl %r12d, %r12d
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
subq %rax, %rcx
sarq $0x5, %rcx
cmpq %r12, %rcx
jbe 0x3a16
testq %r12, %r12
je 0x39e9
movq %r14, %rdi
movq %rbx, %rsi
leaq 0x2754(%rip), %rdx      # 0x6120
callq 0x46cb
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2220
movq %r14, %rdi
callq 0x2100
movq 0x10(%rsp), %rax
movq %r12, %rdx
shlq $0x5, %rdx
addq %rax, %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x473c
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2220
movq %r14, %rdi
callq 0x2100
incl %r12d
jmp 0x39a1
leaq 0xb8(%rsp), %rdi
movq %rbx, %rsi
callq 0x2260
movq 0x30(%rsp), %rdi
leaq 0xb8(%rsp), %r12
movq %r12, %rsi
callq 0x5168
movq %r12, %rdi
callq 0x2100
leaq 0x10(%rsp), %rdi
callq 0x4774
movq %rbp, %rdi
callq 0x2110
movl 0x4(%rsp), %eax
incl %eax
jmp 0x38d4
leaq 0x10(%rsp), %rdi
callq 0x2f46
leaq 0x78(%rsp), %rdi
callq 0x2100
leaq 0x38(%rsp), %rdi
callq 0x2100
leaq 0x58(%rsp), %rdi
callq 0x2100
leaq 0x98(%rsp), %rdi
callq 0x2100
addq $0x278, %rsp            # imm = 0x278
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x3afb
movq %rax, %rbx
jmp 0x3b05
movq %rax, %rbx
jmp 0x3b0f
movq %rax, %rbx
leaq 0xb8(%rsp), %rdi
callq 0x2100
jmp 0x3ada
jmp 0x3ace
jmp 0x3ace
jmp 0x3ad7
movq %rax, %rbx
jmp 0x3ae7
jmp 0x3ad7
jmp 0x3ad7
movq %rax, %rbx
leaq 0xf8(%rsp), %rdi
callq 0x2110
leaq 0x10(%rsp), %rdi
callq 0x2f46
leaq 0x78(%rsp), %rdi
callq 0x2100
leaq 0x38(%rsp), %rdi
callq 0x2100
leaq 0x58(%rsp), %rdi
callq 0x2100
leaq 0x98(%rsp), %rdi
callq 0x2100
movq %rbx, %rdi
callq 0x22e0