// File: /workspace/github_cpp_makefile_star2_O2/migueeelvargas[P]Auto-Complete/util.cpp
// Function: Utils::load_dict(DictionaryBST&, std::istream&)
void Utils::load_dict(DictionaryBST& dict, istream& words)
{
  string junk;
  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 >> 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
movq %rsi, 0x8(%rsp)
movq %rdi, 0x30(%rsp)
leaq 0xa8(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x2b5a(%rip), %rsi      # 0x60b4
leaq 0x38(%rsp), %rdi
leaq 0xf8(%rsp), %rdx
callq 0x2f6e
leaq 0x2b41(%rip), %rsi      # 0x60b4
leaq 0x58(%rsp), %rdi
leaq 0xf8(%rsp), %rdx
callq 0x2f6e
leaq 0x2b28(%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)
leaq 0x38(%rsp), %rsi
leaq 0x58(%rsp), %rbp
leaq 0x78(%rsp), %r14
leaq 0xf8(%rsp), %r13
leaq 0x2b52(%rip), %r12      # 0x611e
leaq 0xd8(%rsp), %rbx
movq 0x8(%rsp), %rdi
callq 0x2060
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x375f
movq 0x8(%rsp), %rcx
movq (%rcx), %rax
movq -0x18(%rax), %rax
testb $0x2, 0x20(%rcx,%rax)
jne 0x375f
movq %rbp, %rdi
leaq 0x2aa3(%rip), %rsi      # 0x60b4
callq 0x2310
movq %r14, %rdi
leaq 0x2a94(%rip), %rsi      # 0x60b4
callq 0x2310
movq %r13, %rdi
leaq 0x38(%rsp), %r15
movq %r15, %rsi
leaq 0x2ae6(%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 0x98(%rsp), %rsi
callq 0x2230
movq %r13, %rdi
movq %rbp, %rsi
callq 0x2230
movq %rbp, %rdi
movq %r12, %rsi
callq 0x4703
testb %al, %al
jne 0x369e
cmpq $0x0, 0x60(%rsp)
je 0x366d
leaq 0x10(%rsp), %rdi
movq %rbp, %rsi
callq 0x4710
jmp 0x366d
xorl %r15d, %r15d
movl %r15d, %r15d
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
subq %rax, %rcx
sarq $0x5, %rcx
cmpq %r15, %rcx
jbe 0x3716
testq %r15, %r15
je 0x36e9
movq %rbx, %rdi
movq %r14, %rsi
leaq 0x2a54(%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 0x36a1
leaq 0xb8(%rsp), %rdi
movq %r14, %rsi
callq 0x2260
movq 0x30(%rsp), %rdi
leaq 0xb8(%rsp), %r15
movq %r15, %rsi
callq 0x5168
movq %r15, %rdi
callq 0x2100
leaq 0x10(%rsp), %rdi
callq 0x4774
movq %r13, %rdi
callq 0x2110
leaq 0x38(%rsp), %rsi
jmp 0x35d4
leaq 0x10(%rsp), %rdi
callq 0x2f46
leaq 0x78(%rsp), %rdi
callq 0x2100
leaq 0x58(%rsp), %rdi
callq 0x2100
leaq 0x38(%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 0x37fa
movq %rax, %rbx
jmp 0x3804
movq %rax, %rbx
jmp 0x380e
movq %rax, %rbx
leaq 0xb8(%rsp), %rdi
callq 0x2100
jmp 0x37d9
jmp 0x37cd
jmp 0x37cd
jmp 0x37d6
movq %rax, %rbx
jmp 0x37e6
jmp 0x37d6
jmp 0x37d6
movq %rax, %rbx
leaq 0xf8(%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
leaq 0x98(%rsp), %rdi
callq 0x2100
movq %rbx, %rdi
callq 0x22e0
nop