// File: ddu1[P]polarizedtext/src/dictionary.cc
// Function: fasttext::Dictionary::getLine(std::istream&, std::vector<int, std::allocator<int>>&, std::vector<int, std::allocator<int>>&, std::linear_congruential_engine<unsigned long, 48271ul, 0ul, 2147483647ul>&) const
int32_t Dictionary::getLine(std::istream& in,
                            std::vector<int32_t>& words,
                            std::vector<int32_t>& labels,
                            std::minstd_rand& rng) const {
  std::uniform_real_distribution<> uniform(0, 1);
  std::string token;
  int32_t ntokens = 0;
  words.clear();
  labels.clear();
  if (in.eof()) {
    in.clear();
    in.seekg(std::streampos(0));
  }
  while (readWord(in, token)) {
    if (token == EOS) break;
    int32_t wid = getId(token);
    if (wid < 0) continue;
    entry_type type = getType(wid);
    ntokens++;
    if (type == entry_type::word && !discard(wid, uniform(rng))) {
      words.push_back(wid);
    }
    if (type == entry_type::label) {
      labels.push_back(wid - nwords_);
    }
    if (words.size() > MAX_LINE_SIZE && args_->model != model_name::sup) break;
  }
  return ntokens;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x98(%rbp)
leaq -0x38(%rbp), %rdi
xorps %xmm0, %xmm0
movsd 0x214ff(%rip), %xmm1    # 0x295c8
callq 0xad70
leaq -0x58(%rbp), %rdi
callq 0x4480
movl $0x0, -0x5c(%rbp)
movq -0x18(%rbp), %rdi
callq 0xada0
movq -0x20(%rbp), %rdi
callq 0xada0
movq -0x10(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x4600
movb %al, -0x8d(%rbp)
jmp 0x810b
movb -0x8d(%rbp), %al
testb $0x1, %al
jne 0x8117
jmp 0x817a
movq -0x10(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
xorl %esi, %esi
callq 0x4560
jmp 0x812e
movq -0x10(%rbp), %rax
movq %rax, -0xa0(%rbp)
xorl %eax, %eax
movl %eax, %esi
leaq -0x80(%rbp), %rdi
callq 0xadc0
jmp 0x8148
movq -0xa0(%rbp), %rdi
movq -0x80(%rbp), %rsi
movq -0x78(%rbp), %rdx
callq 0x43f0
jmp 0x815e
jmp 0x817a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x4688
jmp 0x82f7
jmp 0x817c
movq -0x98(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x58(%rbp), %rdx
callq 0x7640
movb %al, -0xa1(%rbp)
jmp 0x8198
movb -0xa1(%rbp), %al
testb $0x1, %al
jne 0x81a7
jmp 0x82d6
leaq -0x58(%rbp), %rdi
leaq 0x341b6(%rip), %rsi     # 0x3c368
callq 0xae00
testb $0x1, %al
jne 0x81bd
jmp 0x81c2
jmp 0x82d6
movq -0x98(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x6e50
movl %eax, -0xa8(%rbp)
jmp 0x81da
movl -0xa8(%rbp), %eax
movl %eax, -0x84(%rbp)
cmpl $0x0, -0x84(%rbp)
jge 0x81f1
jmp 0x817c
movq -0x98(%rbp), %rdi
movl -0x84(%rbp), %esi
callq 0x73e0
movb %al, -0x85(%rbp)
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
cmpb $0x0, -0x85(%rbp)
jne 0x8274
movl -0x84(%rbp), %eax
movl %eax, -0xb4(%rbp)
movq -0x28(%rbp), %rsi
leaq -0x38(%rbp), %rdi
callq 0xae90
movsd %xmm0, -0xb0(%rbp)
jmp 0x823e
movl -0xb4(%rbp), %esi
movq -0x98(%rbp), %rdi
movsd -0xb0(%rbp), %xmm0
cvtsd2ss %xmm0, %xmm0
callq 0x7320
testb $0x1, %al
jne 0x8274
movq -0x18(%rbp), %rdi
leaq -0x84(%rbp), %rsi
callq 0xaec0
jmp 0x8272
jmp 0x8274
cmpb $0x1, -0x85(%rbp)
jne 0x82a9
movq -0x98(%rbp), %rcx
movq -0x20(%rbp), %rdi
movl -0x84(%rbp), %eax
movl 0x5c(%rcx), %ecx
subl %ecx, %eax
movl %eax, -0x8c(%rbp)
leaq -0x8c(%rbp), %rsi
callq 0xa5d0
jmp 0x82a7
jmp 0x82a9
movq -0x18(%rbp), %rdi
callq 0xad50
cmpq $0x400, %rax            # imm = 0x400
jbe 0x82d1
movq -0x98(%rbp), %rdi
callq 0xa170
cmpl $0x3, 0x8c(%rax)
je 0x82d1
jmp 0x82d6
jmp 0x817c
movl -0x5c(%rbp), %eax
movl %eax, -0xb8(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x4688
movl -0xb8(%rbp), %eax
addq $0xc0, %rsp
popq %rbp
retq
movq -0x68(%rbp), %rdi
callq 0x45b0