// File: ddu1[P]polarizedtext/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::cout << "\rRead " << ntokens_  / 1000000 << "M words" << std::flush;
    }
    if (size_ > 0.75 * MAX_VOCAB_SIZE) {
      minThreshold++;
      threshold(minThreshold, minThreshold);
    }
  }
  threshold(args_->minCount, args_->minCountLabel);
  initTableDiscard();
  initNgrams();
  if (args_->verbose > 0) {
    std::cout << "\rRead " << ntokens_  / 1000000 << "M words" << std::endl;
    std::cout << "Number of words:  " << nwords_ << std::endl;
    std::cout << "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
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x50(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x4480
movq $0x1, -0x38(%rbp)
movq -0x50(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x30(%rbp), %rdx
callq 0x7640
movb %al, -0x51(%rbp)
jmp 0x7792
movb -0x51(%rbp), %al
testb $0x1, %al
jne 0x779e
jmp 0x78ac
movq -0x50(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x67f0
jmp 0x77ad
movq -0x50(%rbp), %rax
movq 0x68(%rax), %rax
movl $0xf4240, %ecx          # imm = 0xF4240
cqto
idivq %rcx
cmpq $0x0, %rdx
jne 0x7871
movq -0x50(%rbp), %rdi
callq 0xa170
cmpl $0x1, 0xc8(%rax)
jle 0x7871
movq 0x347da(%rip), %rdi     # 0x3bfc0
leaq 0x21fb8(%rip), %rsi     # 0x297a5
callq 0x42e0
movq %rax, -0x60(%rbp)
jmp 0x77f8
movq -0x60(%rbp), %rdi
movq -0x50(%rbp), %rax
movq 0x68(%rax), %rax
movabsq $0x431bde82d7b634db, %rcx # imm = 0x431BDE82D7B634DB
imulq %rcx
movq %rdx, %rsi
movq %rsi, %rdx
shrq $0x3f, %rdx
sarq $0x12, %rsi
addq %rdx, %rsi
callq 0x45f0
movq %rax, -0x68(%rbp)
jmp 0x782d
movq -0x68(%rbp), %rdi
leaq 0x21f74(%rip), %rsi     # 0x297ac
callq 0x42e0
movq %rax, -0x70(%rbp)
jmp 0x7843
movq -0x70(%rbp), %rdi
movq 0x3477a(%rip), %rsi     # 0x3bfc8
callq 0x4310
jmp 0x7855
jmp 0x7871
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x4688
jmp 0x7a7a
movq -0x50(%rbp), %rax
cvtsi2sdl 0x58(%rax), %xmm0
movsd 0x21d3e(%rip), %xmm1    # 0x295c0
ucomisd %xmm1, %xmm0
jbe 0x78a7
movq -0x50(%rbp), %rdi
movq -0x38(%rbp), %rax
incq %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdx
movq %rdx, %rsi
callq 0x7a90
jmp 0x78a5
jmp 0x78a7
jmp 0x777c
movq -0x50(%rbp), %rdi
callq 0xa170
movq -0x50(%rbp), %rdi
movslq 0x78(%rax), %rax
movq %rax, -0x78(%rbp)
callq 0xa170
movq -0x50(%rbp), %rdi
movq -0x78(%rbp), %rsi
movslq 0x7c(%rax), %rdx
callq 0x7a90
jmp 0x78d9
movq -0x50(%rbp), %rdi
callq 0x7ce0
jmp 0x78e4
movq -0x50(%rbp), %rdi
callq 0x7520
jmp 0x78ef
movq -0x50(%rbp), %rdi
callq 0xa170
cmpl $0x0, 0xc8(%rax)
jle 0x7a23
movq 0x346b4(%rip), %rdi     # 0x3bfc0
leaq 0x21e92(%rip), %rsi     # 0x297a5
callq 0x42e0
movq %rax, -0x80(%rbp)
jmp 0x791e
movq -0x80(%rbp), %rdi
movq -0x50(%rbp), %rax
movq 0x68(%rax), %rax
movabsq $0x431bde82d7b634db, %rcx # imm = 0x431BDE82D7B634DB
imulq %rcx
movq %rdx, %rsi
movq %rsi, %rdx
shrq $0x3f, %rdx
sarq $0x12, %rsi
addq %rdx, %rsi
callq 0x45f0
movq %rax, -0x88(%rbp)
jmp 0x7956
movq -0x88(%rbp), %rdi
leaq 0x21e48(%rip), %rsi     # 0x297ac
callq 0x42e0
movq %rax, -0x90(%rbp)
jmp 0x7972
movq -0x90(%rbp), %rdi
movq 0x34618(%rip), %rsi     # 0x3bf98
callq 0x4310
jmp 0x7987
movq 0x34632(%rip), %rdi     # 0x3bfc0
leaq 0x21e1f(%rip), %rsi     # 0x297b4
callq 0x42e0
movq %rax, -0x98(%rbp)
jmp 0x79a3
movq -0x98(%rbp), %rdi
movq -0x50(%rbp), %rax
movl 0x5c(%rax), %esi
callq 0x4580
movq %rax, -0xa0(%rbp)
jmp 0x79bf
movq -0xa0(%rbp), %rdi
movq 0x345cb(%rip), %rsi     # 0x3bf98
callq 0x4310
jmp 0x79d4
movq 0x345e5(%rip), %rdi     # 0x3bfc0
leaq 0x21de5(%rip), %rsi     # 0x297c7
callq 0x42e0
movq %rax, -0xa8(%rbp)
jmp 0x79f0
movq -0xa8(%rbp), %rdi
movq -0x50(%rbp), %rax
movl 0x60(%rax), %esi
callq 0x4580
movq %rax, -0xb0(%rbp)
jmp 0x7a0c
movq -0xb0(%rbp), %rdi
movq 0x3457e(%rip), %rsi     # 0x3bf98
callq 0x4310
jmp 0x7a21
jmp 0x7a23
movq -0x50(%rbp), %rax
cmpl $0x0, 0x58(%rax)
jne 0x7a68
movq 0x345bc(%rip), %rdi     # 0x3bff0
leaq 0x21d9f(%rip), %rsi     # 0x297da
callq 0x42e0
movq %rax, -0xb8(%rbp)
jmp 0x7a49
movq -0xb8(%rbp), %rdi
movq 0x34541(%rip), %rsi     # 0x3bf98
callq 0x4310
jmp 0x7a5e
movl $0x1, %edi
callq 0x4390
leaq -0x30(%rbp), %rdi
callq 0x4688
addq $0xc0, %rsp
popq %rbp
retq
movq -0x40(%rbp), %rdi
callq 0x45b0
nopw %cs:(%rax,%rax)