// File: /workspace/github_cpp_makefile_star2_O2/epfml[P]sent2vec/src/dictionary.cc
// Function: fasttext::Dictionary::readFromFile(std::istream&)
void Dictionary::readFromFile(std::istream& in) {
  std::string word;
  int64_t minThreshold = 1;
  while (readWord(in, word)) {
    add(word);
    if (ntokens_ % 1000000 == 0 && args_->verbose > 1) {
      std::cerr << "\rRead " << ntokens_  / 1000000 << "M words" << std::flush;
    }
    if (size_ > 0.75 * MAX_VOCAB_SIZE) {
      minThreshold++;
      threshold(minThreshold, minThreshold);
    }
  }
  if (args_->model == model_name::sent2vec || args_->model == model_name::cbowCWNgrams) {
    int32_t h = find("<PLACEHOLDER>");
    entry e;
    e.word = "<PLACEHOLDER>";
    e.count = 1e+18;
    e.type = entry_type::word;
    words_.push_back(e);
    word2int_[h] = size_++;
  }
  threshold(args_->minCount, args_->minCountLabel);
  if (args_->maxVocabSize > 0) {
    truncate(args_->maxVocabSize);
  }
  initTableDiscard();
  initNgrams();
  if (args_->model == model_name::sent2vec || args_->model == model_name::cbowCWNgrams) {
    assert(words_[0].word == "<PLACEHOLDER>");
    words_[0].count = 0;
  }
  if (args_->verbose > 0) {
    std::cerr << "\rRead " << ntokens_  / 1000000 << "M words" << std::endl;
    std::cerr << "Number of words:  " << nwords_ << std::endl;
    std::cerr << "Number of labels: " << nlabels_ << std::endl;
  }
  if (size_ == 0) {
    std::cerr << "Empty vocabulary. Try a smaller -minCount value."
              << std::endl;
    exit(EXIT_FAILURE);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rsi, %r14
leaq 0x20(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movq %rdi, %rbx
movb $0x0, (%rax)
pushq $0x1
popq %r15
leaq 0x10(%rsp), %r12
movl $0xf4240, %ebp          # imm = 0xF4240
leaq 0x132d2(%rip), %r13     # 0x19b58
movq %r14, %rsi
movq %r12, %rdx
callq 0x6784
testb %al, %al
je 0x6913
movq %rbx, %rdi
movq %r12, %rsi
callq 0x5eb2
movq 0x68(%rbx), %rax
cqto
idivq %rbp
testq %rdx, %rdx
jne 0x68f4
movq (%rbx), %rax
cmpl $0x2, 0x100(%rax)
jl 0x68f4
movq 0x2072f(%rip), %rdi     # 0x26ff0
leaq 0x13289(%rip), %rsi     # 0x19b51
callq 0x4330
movq %rax, %rdi
movq 0x68(%rbx), %rax
cqto
idivq %rbp
movq %rax, %rsi
callq 0x4320
movq %rax, %rdi
movq %r13, %rsi
callq 0x4330
movq %rax, %rdi
callq 0x4240
cmpl $0x15752a1, 0x58(%rbx)  # imm = 0x15752A1
jl 0x6886
incq %r15
movq %rbx, %rdi
movq %r15, %rsi
movq %r15, %rdx
callq 0x6b5e
jmp 0x6886
movq (%rbx), %rax
movl 0xc0(%rax), %ecx
andl $-0x2, %ecx
cmpl $0x4, %ecx
jne 0x69c5
leaq 0x13231(%rip), %rsi     # 0x19b60
leaq 0x30(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x5cc0
leaq 0x30(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5e32
movl %eax, %ebp
movq %r14, %rdi
callq 0x46c8
leaq 0x40(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rax)
andq $0x0, 0x30(%rax)
leaq 0x131e4(%rip), %rsi     # 0x19b60
leaq 0x30(%rsp), %rdi
callq 0x4640
movabsq $0xde0b6b3a7640000, %rax # imm = 0xDE0B6B3A7640000
leaq 0x30(%rsp), %rsi
movq %rax, 0x20(%rsi)
movb $0x0, 0x28(%rsi)
leaq 0x28(%rbx), %rdi
callq 0x88c0
movl 0x58(%rbx), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x58(%rbx)
movq 0x10(%rbx), %rcx
movl %ebp, %edx
movl %eax, (%rcx,%rdx,4)
leaq 0x30(%rsp), %rdi
callq 0x88ec
movq (%rbx), %rax
movslq 0xa8(%rax), %rsi
movslq 0xac(%rax), %rdx
movq %rbx, %rdi
callq 0x6b5e
movq (%rbx), %rax
movslq 0xa4(%rax), %rsi
testq %rsi, %rsi
jle 0x69f2
movq %rbx, %rdi
callq 0x6df8
movq %rbx, %rdi
callq 0x6f08
movq %rbx, %rdi
callq 0x66ba
movq (%rbx), %rax
movl 0xc0(%rax), %ecx
andl $-0x2, %ecx
cmpl $0x4, %ecx
jne 0x6a37
movq 0x28(%rbx), %rdi
leaq 0x13142(%rip), %rsi     # 0x19b60
callq 0x5cfb
testb %al, %al
je 0x6b15
movq 0x28(%rbx), %rax
andq $0x0, 0x20(%rax)
movq (%rbx), %rax
cmpl $0x0, 0x100(%rax)
jle 0x6ad3
movq 0x205a5(%rip), %rdi     # 0x26ff0
leaq 0x130ff(%rip), %rsi     # 0x19b51
callq 0x4330
movq %rax, %rdi
movq 0x68(%rbx), %rax
movl $0xf4240, %ecx          # imm = 0xF4240
cqto
idivq %rcx
movq %rax, %rsi
callq 0x4320
leaq 0x130e1(%rip), %rsi     # 0x19b58
movq %rax, %rdi
callq 0x4330
movq %rax, %rdi
callq 0x4190
movq 0x20562(%rip), %rdi     # 0x26ff0
leaq 0x13133(%rip), %rsi     # 0x19bc8
callq 0x4330
movl 0x5c(%rbx), %esi
movq %rax, %rdi
callq 0x45b0
movq %rax, %rdi
callq 0x4190
movq 0x2053c(%rip), %rdi     # 0x26ff0
leaq 0x13120(%rip), %rsi     # 0x19bdb
callq 0x4330
movl 0x60(%rbx), %esi
movq %rax, %rdi
callq 0x45b0
movq %rax, %rdi
callq 0x4190
cmpl $0x0, 0x58(%rbx)
je 0x6af2
leaq 0x10(%rsp), %rdi
callq 0x46c8
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x204f7(%rip), %rdi     # 0x26ff0
leaq 0x130ee(%rip), %rsi     # 0x19bee
callq 0x4330
movq %rax, %rdi
callq 0x4190
pushq $0x1
popq %rdi
callq 0x43b0
leaq 0x13052(%rip), %rdi     # 0x19b6e
leaq 0x12e93(%rip), %rsi     # 0x199b6
leaq 0x13066(%rip), %rcx     # 0x19b90
movl $0x105, %edx            # imm = 0x105
callq 0x4210
jmp 0x6b49
jmp 0x6b49
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x88ec
jmp 0x6b4c
jmp 0x6b49
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x46c8
movq %rbx, %rdi
callq 0x45d0