// File: /workspace/github_cpp_makefile_star2_O2/epfml[P]Bi-Sent2Vec/src/dictionary.cc
// Function: fasttext::Dictionary::getLine(std::istream&, std::vector<int, std::allocator<int>>&, 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>& word_hashes,
                            std::vector<int32_t>& labels,
                            std::minstd_rand& rng) const {
  std::uniform_real_distribution<> uniform(0, 1);

  if (in.eof()) {
    in.clear();
    in.seekg(std::streampos(0));
  }

  words.clear();
  labels.clear();
  word_hashes.clear();
  int32_t ntokens = 0;
  std::string token;
  while (readWord(in, token)) {
    if (token == EOS && (args_-> model == model_name::bisent2vec)){
       break;
    }
    int32_t h = find(token);
    int32_t wid = word2int_[h];
    if (wid < 0) {
      entry_type type = getType(token);
      if (type == entry_type::word) word_hashes.push_back(hash(token));
      continue;
    }
    entry_type type = getType(wid);
    ntokens++;
    if (type == entry_type::word && !discard(wid, uniform(rng))) {
      words.push_back(wid);
      word_hashes.push_back(hash(token));
    }
    if (type == entry_type::label) {
      labels.push_back(wid - nwords_);
    }
    if (token == EOS) break;
    if (ntokens > MAX_LINE_SIZE && args_->model != model_name::bisent2vec) break;
  }
  return ntokens;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %r9, 0x28(%rsp)
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r13
movq %rdi, %rbp
xorps %xmm0, %xmm0
movhps 0x1348c(%rip), %xmm0    # xmm0 = xmm0[0,1],mem[0,1]
movaps %xmm0, 0x30(%rsp)
movq (%rsi), %rax
movq -0x18(%rax), %rdi
testb $0x2, 0x20(%rsi,%rdi)
je 0x7485
addq %r13, %rdi
xorl %esi, %esi
callq 0x4590
movq %r13, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x43f0
movq (%r15), %rax
cmpq %rax, 0x8(%r15)
je 0x7492
movq %rax, 0x8(%r15)
movq (%rbx), %rax
cmpq %rax, 0x8(%rbx)
je 0x749f
movq %rax, 0x8(%rbx)
movq %r15, 0x18(%rsp)
movq %rbx, 0x20(%rsp)
movq (%r14), %rax
cmpq %rax, 0x8(%r14)
je 0x74b6
movq %rax, 0x8(%r14)
movq %r14, 0x10(%rsp)
leaq 0x58(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
xorl %r15d, %r15d
leaq 0x48(%rsp), %rbx
leaq 0x20ead(%rip), %r12     # 0x28388
movq %r13, %rsi
movq %rbx, %rdx
callq 0x65da
testb %al, %al
je 0x7613
movq %rbx, %rdi
movq %r12, %rsi
callq 0x897e
testb %al, %al
je 0x750e
movq (%rbp), %rax
cmpl $0x4, 0xc0(%rax)
je 0x7613
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x5cd6
movq 0x10(%rbp), %rcx
movl %eax, %eax
movl (%rcx,%rax,4), %esi
movl %esi, 0xc(%rsp)
movq %rbp, %rdi
testl %esi, %esi
js 0x7598
callq 0x6362
cmpb $0x1, %al
je 0x75c8
movzbl %al, %eax
testl %eax, %eax
jne 0x75e2
movl 0xc(%rsp), %r14d
leaq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x89a8
cvtsd2ss %xmm0, %xmm0
movq %rbp, %rdi
movl %r14d, %esi
callq 0x6302
testb %al, %al
jne 0x75e2
movq 0x18(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0x87c4
movq %rbx, %rsi
callq 0x5d30
movl %eax, 0x8(%rsp)
movq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x9292
jmp 0x75e2
movq %rbx, %rsi
callq 0x5e16
testb %al, %al
jne 0x74db
movq %rbx, %rsi
callq 0x5d30
movl %eax, 0x8(%rsp)
movq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x9292
jmp 0x74db
movl 0xc(%rsp), %eax
subl 0x5c(%rbp), %eax
movl %eax, 0x8(%rsp)
movq 0x20(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x9292
leal 0x1(%r15), %r14d
movq %rbx, %rdi
movq %r12, %rsi
callq 0x897e
testb %al, %al
jne 0x7616
cmpl $0x400, %r15d           # imm = 0x400
jl 0x760b
movq (%rbp), %rax
cmpl $0x4, 0xc0(%rax)
jne 0x7616
movl %r14d, %r15d
jmp 0x74db
movl %r15d, %r14d
leaq 0x48(%rsp), %rdi
callq 0x46c8
movl %r14d, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x763a
jmp 0x763a
jmp 0x763a
jmp 0x763a
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x46c8
movq %rbx, %rdi
callq 0x45d0
nop