// File: /workspace/github_cpp_makefile_star2_O2/migueeelvargas[P]Auto-Complete/util.cpp
// Function: Utils::load_dict(DictionaryTrie&, std::istream&)
void Utils::load_dict(DictionaryTrie& dict, istream& words)
{
  unsigned int freq;
  string data = "";
  string temp_word = "";
  string word = "";
  vector<string> word_string;
  unsigned int i = 0;
  while(getline(words, data))
    {
      if(words.eof()) break;
      temp_word = "";
      word = "";
      data = data + " .";
      istringstream iss(data);
      iss >> freq;
      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, freq);
      word_string.clear();
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x258, %rsp            # imm = 0x258
movq %rsi, 0x8(%rsp)
movq %rdi, 0x30(%rsp)
leaq 0x1f6e(%rip), %rbx      # 0x60b4
leaq 0x38(%rsp), %rdi
leaq 0xd8(%rsp), %rdx
movq %rbx, %rsi
callq 0x2f6e
leaq 0x58(%rsp), %rdi
leaq 0xd8(%rsp), %rdx
movq %rbx, %rsi
callq 0x2f6e
leaq 0x1f3d(%rip), %rsi      # 0x60b4
leaq 0x78(%rsp), %rdi
leaq 0xd8(%rsp), %rdx
callq 0x2f6e
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rax
movaps %xmm0, (%rax)
andq $0x0, 0x10(%rax)
leaq 0x38(%rsp), %rsi
leaq 0x58(%rsp), %rbp
leaq 0x78(%rsp), %r14
leaq 0xd8(%rsp), %r13
leaq 0x1f67(%rip), %r12      # 0x611e
leaq 0xb8(%rsp), %rbx
movq 0x8(%rsp), %rdi
callq 0x2060
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x434b
movq 0x8(%rsp), %rcx
movq (%rcx), %rax
movq -0x18(%rax), %rax
testb $0x2, 0x20(%rcx,%rax)
jne 0x434b
movq %rbp, %rdi
leaq 0x1eb8(%rip), %rsi      # 0x60b4
callq 0x2310
movq %r14, %rdi
leaq 0x1ea9(%rip), %rsi      # 0x60b4
callq 0x2310
movq %r13, %rdi
leaq 0x38(%rsp), %r15
movq %r15, %rsi
leaq 0x1efb(%rip), %rdx      # 0x611d
callq 0x46cb
movq %r15, %rdi
movq %r13, %rsi
callq 0x2220
movq %r13, %rdi
callq 0x2100
movq %r13, %rdi
movq %r15, %rsi
pushq $0x8
popq %rdx
callq 0x22c0
movq %r13, %rdi
leaq 0x4(%rsp), %rsi
callq 0x22d0
movq %r13, %rdi
movq %rbp, %rsi
callq 0x2230
movq %rbp, %rdi
movq %r12, %rsi
callq 0x4703
testb %al, %al
jne 0x4286
cmpq $0x0, 0x60(%rsp)
je 0x4255
leaq 0x10(%rsp), %rdi
movq %rbp, %rsi
callq 0x4710
jmp 0x4255
xorl %r15d, %r15d
movl %r15d, %r15d
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
subq %rax, %rcx
sarq $0x5, %rcx
cmpq %r15, %rcx
jbe 0x42fe
testq %r15, %r15
je 0x42d1
movq %rbx, %rdi
movq %r14, %rsi
leaq 0x1e6c(%rip), %rdx      # 0x6120
callq 0x46cb
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2220
movq %rbx, %rdi
callq 0x2100
movq 0x10(%rsp), %rax
movq %r15, %rdx
shlq $0x5, %rdx
addq %rax, %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x473c
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2220
movq %rbx, %rdi
callq 0x2100
incl %r15d
jmp 0x4289
leaq 0x98(%rsp), %rdi
movq %r14, %rsi
callq 0x2260
movl 0x4(%rsp), %edx
movq 0x30(%rsp), %rdi
leaq 0x98(%rsp), %r15
movq %r15, %rsi
callq 0x490c
movq %r15, %rdi
callq 0x2100
leaq 0x10(%rsp), %rdi
callq 0x4774
movq %r13, %rdi
callq 0x2110
leaq 0x38(%rsp), %rsi
jmp 0x41bf
leaq 0x10(%rsp), %rdi
callq 0x2f46
leaq 0x78(%rsp), %rdi
callq 0x2100
leaq 0x58(%rsp), %rdi
callq 0x2100
leaq 0x38(%rsp), %rdi
callq 0x2100
addq $0x258, %rsp            # imm = 0x258
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x43d4
movq %rax, %rbx
jmp 0x43de
movq %rax, %rbx
leaq 0x98(%rsp), %rdi
callq 0x2100
jmp 0x43b3
jmp 0x43a7
jmp 0x43a7
jmp 0x43b0
movq %rax, %rbx
jmp 0x43c0
jmp 0x43b0
jmp 0x43b0
movq %rax, %rbx
leaq 0xd8(%rsp), %rdi
callq 0x2110
leaq 0x10(%rsp), %rdi
callq 0x2f46
leaq 0x78(%rsp), %rdi
callq 0x2100
leaq 0x58(%rsp), %rdi
callq 0x2100
leaq 0x38(%rsp), %rdi
callq 0x2100
movq %rbx, %rdi
callq 0x22e0