// File: 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
movq %rsp, %rbp
subq $0x330, %rsp            # imm = 0x330
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x3340
leaq -0x51(%rbp), %rdi
movq %rdi, -0x2e0(%rbp)
callq 0x33d0
movq -0x2e0(%rbp), %rdx
leaq 0x743e(%rip), %rsi      # 0xe098
leaq -0x50(%rbp), %rdi
callq 0x4c60
jmp 0x6c65
leaq -0x51(%rbp), %rdi
callq 0x3280
leaq -0x89(%rbp), %rdi
movq %rdi, -0x2e8(%rbp)
callq 0x33d0
movq -0x2e8(%rbp), %rdx
leaq 0x7409(%rip), %rsi      # 0xe098
leaq -0x88(%rbp), %rdi
callq 0x4c60
jmp 0x6c9d
leaq -0x89(%rbp), %rdi
callq 0x3280
leaq -0xb1(%rbp), %rdi
movq %rdi, -0x2f0(%rbp)
callq 0x33d0
movq -0x2f0(%rbp), %rdx
leaq 0x73ce(%rip), %rsi      # 0xe098
leaq -0xb0(%rbp), %rdi
callq 0x4c60
jmp 0x6cd8
leaq -0xb1(%rbp), %rdi
callq 0x3280
leaq -0xd0(%rbp), %rdi
callq 0x4b30
movl $0x0, -0xd4(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x3080
movq %rax, -0x2f8(%rbp)
jmp 0x6d10
movq -0x2f8(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x32e0
movb %al, -0x2f9(%rbp)
jmp 0x6d2e
movb -0x2f9(%rbp), %al
testb $0x1, %al
jne 0x6d3d
jmp 0x7042
movq -0x10(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x33f0
movb %al, -0x2fa(%rbp)
jmp 0x6d58
movb -0x2fa(%rbp), %al
testb $0x1, %al
jne 0x6d64
jmp 0x6dce
jmp 0x7042
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x51(%rbp), %rdi
callq 0x3280
jmp 0x70ae
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x89(%rbp), %rdi
callq 0x3280
jmp 0x70a5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0xb1(%rbp), %rdi
callq 0x3280
jmp 0x7099
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x7081
leaq 0x72c3(%rip), %rsi      # 0xe098
leaq -0x88(%rbp), %rdi
callq 0x3330
jmp 0x6de3
leaq 0x72ae(%rip), %rsi      # 0xe098
leaq -0xb0(%rbp), %rdi
callq 0x3330
jmp 0x6df8
leaq 0x7302(%rip), %rdx      # 0xe101
leaq -0xf8(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x8840
jmp 0x6e11
leaq -0x50(%rbp), %rdi
movq %rdi, -0x308(%rbp)
leaq -0xf8(%rbp), %rsi
movq %rsi, -0x310(%rbp)
callq 0x32c0
movq -0x310(%rbp), %rdi
callq 0x3170
movq -0x308(%rbp), %rsi
leaq -0x278(%rbp), %rdi
movl $0x8, %edx
callq 0x33b0
jmp 0x6e55
leaq -0x278(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x32f0
jmp 0x6e67
jmp 0x6e69
jmp 0x6e6b
leaq -0x278(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x32f0
jmp 0x6e80
leaq 0x727b(%rip), %rsi      # 0xe102
leaq -0x88(%rbp), %rdi
callq 0x88c0
movb %al, -0x311(%rbp)
jmp 0x6e9b
movb -0x311(%rbp), %al
testb $0x1, %al
jne 0x6ea7
jmp 0x6eba
jmp 0x6ee5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x7034
leaq -0x88(%rbp), %rdi
callq 0x3360
cmpq $0x0, %rax
jbe 0x6ee3
leaq -0xd0(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x88f0
jmp 0x6ee1
jmp 0x6ee3
jmp 0x6e69
movl $0x0, -0xd4(%rbp)
movl -0xd4(%rbp), %eax
movq %rax, -0x320(%rbp)
leaq -0xd0(%rbp), %rdi
callq 0x59a0
movq %rax, %rcx
movq -0x320(%rbp), %rax
cmpq %rcx, %rax
jae 0x6fbe
cmpl $0x0, -0xd4(%rbp)
jbe 0x6f5f
leaq 0x71d9(%rip), %rdx      # 0xe104
leaq -0x298(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x8840
jmp 0x6f40
leaq -0xb0(%rbp), %rdi
leaq -0x298(%rbp), %rsi
callq 0x32c0
leaq -0x298(%rbp), %rdi
callq 0x3170
movl -0xd4(%rbp), %eax
movl %eax, %esi
leaq -0xd0(%rbp), %rdi
callq 0x89e0
movq %rax, %rdx
leaq -0x2b8(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x8960
jmp 0x6f8b
leaq -0xb0(%rbp), %rdi
leaq -0x2b8(%rbp), %rsi
callq 0x32c0
leaq -0x2b8(%rbp), %rdi
callq 0x3170
movl -0xd4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xd4(%rbp)
jmp 0x6eef
movq -0x8(%rbp), %rax
movq %rax, -0x328(%rbp)
leaq -0x2d8(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x30f0
jmp 0x6fde
movq -0x328(%rbp), %rdi
leaq -0x2d8(%rbp), %rsi
callq 0xae00
jmp 0x6ff3
leaq -0x2d8(%rbp), %rdi
callq 0x3170
leaq -0xd0(%rbp), %rdi
callq 0x8a00
leaq -0x278(%rbp), %rdi
callq 0x3120
jmp 0x6cfa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x2d8(%rbp), %rdi
callq 0x3170
leaq -0x278(%rbp), %rdi
callq 0x3120
jmp 0x7081
leaq -0xd0(%rbp), %rdi
callq 0x4b50
leaq -0xb0(%rbp), %rdi
callq 0x3170
leaq -0x88(%rbp), %rdi
callq 0x3170
leaq -0x50(%rbp), %rdi
callq 0x3170
leaq -0x30(%rbp), %rdi
callq 0x3170
addq $0x330, %rsp            # imm = 0x330
popq %rbp
retq
leaq -0xd0(%rbp), %rdi
callq 0x4b50
leaq -0xb0(%rbp), %rdi
callq 0x3170
leaq -0x88(%rbp), %rdi
callq 0x3170
leaq -0x50(%rbp), %rdi
callq 0x3170
leaq -0x30(%rbp), %rdi
callq 0x3170
movq -0x60(%rbp), %rdi
callq 0x33c0