// File: epfml[P]Bi-Sent2Vec/src/dictionary.cc
// Function: fasttext::Dictionary::load(std::istream&)
void Dictionary::load(std::istream& in) {
  words_.clear();
  std::fill(word2int_.begin(), word2int_.end(), -1);
  in.read((char*) &size_, sizeof(int32_t));
  in.read((char*) &nwords_, sizeof(int32_t));
  in.read((char*) &nlabels_, sizeof(int32_t));
  in.read((char*) &ntokens_, sizeof(int64_t));
  in.read((char*) &pruneidx_size_, sizeof(int64_t));
  for (int32_t i = 0; i < size_; i++) {
    char c;
    entry e;
    while ((c = in.get()) != 0) {
      e.word.push_back(c);
    }
    in.read((char*) &e.count, sizeof(int64_t));
    in.read((char*) &e.type, sizeof(entry_type));
    words_.push_back(e);
    word2int_[find(e.word)] = i;
  }
  pruneidx_.clear();
  for (int32_t i = 0; i < pruneidx_size_; i++) {
    int32_t first;
    int32_t second;
    in.read((char*) &first, sizeof(int32_t));
    in.read((char*) &second, sizeof(int32_t));
    pruneidx_[first] = second;
  }
  initTableDiscard();
  initNgrams();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x98(%rbp)
addq $0x28, %rdi
callq 0xf300
movq -0x98(%rbp), %rdi
addq $0x10, %rdi
callq 0xea10
movq -0x98(%rbp), %rdi
movq %rax, -0x18(%rbp)
addq $0x10, %rdi
callq 0xea40
movq %rax, -0x20(%rbp)
movl $0xffffffff, -0x24(%rbp) # imm = 0xFFFFFFFF
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
leaq -0x24(%rbp), %rdx
callq 0xe9d0
movq -0x98(%rbp), %rsi
movq -0x10(%rbp), %rdi
addq $0x58, %rsi
movl $0x4, %edx
callq 0x5540
movq -0x98(%rbp), %rsi
movq -0x10(%rbp), %rdi
addq $0x5c, %rsi
movl $0x4, %edx
callq 0x5540
movq -0x98(%rbp), %rsi
movq -0x10(%rbp), %rdi
addq $0x60, %rsi
movl $0x4, %edx
callq 0x5540
movq -0x98(%rbp), %rsi
movq -0x10(%rbp), %rdi
addq $0x68, %rsi
movl $0x8, %edx
callq 0x5540
movq -0x98(%rbp), %rsi
movq -0x10(%rbp), %rdi
addq $0x70, %rsi
movl $0x8, %edx
callq 0x5540
movl $0x0, -0x28(%rbp)
movq -0x98(%rbp), %rcx
movl -0x28(%rbp), %eax
cmpl 0x58(%rcx), %eax
jge 0xb1d8
leaq -0x78(%rbp), %rdi
callq 0xe260
movq -0x10(%rbp), %rdi
callq 0x54e0
movl %eax, -0x9c(%rbp)
jmp 0xb0f8
movl -0x9c(%rbp), %eax
movb %al, -0x29(%rbp)
movsbl %al, %eax
cmpl $0x0, %eax
je 0xb137
movsbl -0x29(%rbp), %esi
leaq -0x78(%rbp), %rdi
callq 0x53c0
jmp 0xb118
jmp 0xb0e7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x78(%rbp), %rdi
callq 0xe300
jmp 0xb28d
movq -0x10(%rbp), %rdi
leaq -0x58(%rbp), %rsi
movl $0x8, %edx
callq 0x5540
jmp 0xb14b
movq -0x10(%rbp), %rdi
leaq -0x50(%rbp), %rsi
movl $0x1, %edx
callq 0x5540
jmp 0xb15f
movq -0x98(%rbp), %rdi
addq $0x28, %rdi
leaq -0x78(%rbp), %rsi
callq 0xe290
jmp 0xb175
movq -0x98(%rbp), %rdi
movl -0x28(%rbp), %eax
movl %eax, -0xac(%rbp)
movq %rdi, %rax
addq $0x10, %rax
movq %rax, -0xa8(%rbp)
leaq -0x78(%rbp), %rsi
callq 0x8070
movl %eax, -0xa0(%rbp)
jmp 0xb1a4
movq -0xa8(%rbp), %rdi
movl -0xa0(%rbp), %eax
movslq %eax, %rsi
callq 0xe240
movl -0xac(%rbp), %ecx
movl %ecx, (%rax)
leaq -0x78(%rbp), %rdi
callq 0xe300
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0xb0cb
movq -0x98(%rbp), %rdi
addq $0x78, %rdi
callq 0xf320
movl $0x0, -0x88(%rbp)
movq -0x98(%rbp), %rcx
movslq -0x88(%rbp), %rax
cmpq 0x70(%rcx), %rax
jge 0xb26c
movq -0x10(%rbp), %rdi
leaq -0x8c(%rbp), %rsi
movl $0x4, %edx
callq 0x5540
movq -0x10(%rbp), %rdi
leaq -0x90(%rbp), %rsi
movl $0x4, %edx
callq 0x5540
movq -0x98(%rbp), %rdi
movl -0x90(%rbp), %eax
movl %eax, -0xb0(%rbp)
addq $0x78, %rdi
leaq -0x8c(%rbp), %rsi
callq 0xf340
movl -0xb0(%rbp), %ecx
movl %ecx, (%rax)
movl -0x88(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x88(%rbp)
jmp 0xb1f2
movq -0x98(%rbp), %rdi
callq 0x9c70
movq -0x98(%rbp), %rdi
callq 0x9090
addq $0xb0, %rsp
popq %rbp
retq
movq -0x80(%rbp), %rdi
callq 0x57a0
nopw %cs:(%rax,%rax)