// File: /workspace/github_cpp_makefile_star2_O2/epfml[P]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::sent2vec || args_->model == model_name::cbowCWNgrams)){
       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::sup && args_->model != model_name::sent2vec && args_->model != model_name::cbowCWNgrams) 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 0x12348(%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 0x7639
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 0x7646
movq %rax, 0x8(%r15)
movq (%rbx), %rax
cmpq %rax, 0x8(%rbx)
je 0x7653
movq %rax, 0x8(%rbx)
movq %r15, 0x18(%rsp)
movq %rbx, 0x20(%rsp)
movq (%r14), %rax
cmpq %rax, 0x8(%r14)
je 0x766a
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 0x1fcf9(%rip), %r12     # 0x27388
movq %r13, %rsi
movq %rbx, %rdx
callq 0x6784
testb %al, %al
je 0x77d1
movq %rbx, %rdi
movq %r12, %rsi
callq 0x8b68
testb %al, %al
je 0x76c7
movq (%rbp), %rax
movl 0xc0(%rax), %eax
andl $-0x2, %eax
cmpl $0x4, %eax
je 0x77d1
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x5e32
movq 0x10(%rbp), %rcx
movl %eax, %eax
movl (%rcx,%rax,4), %esi
movl %esi, 0xc(%rsp)
movq %rbp, %rdi
testl %esi, %esi
js 0x7751
callq 0x650c
cmpb $0x1, %al
je 0x7781
movzbl %al, %eax
testl %eax, %eax
jne 0x779b
movl 0xc(%rsp), %r14d
leaq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x8b92
cvtsd2ss %xmm0, %xmm0
movq %rbp, %rdi
movl %r14d, %esi
callq 0x64a8
testb %al, %al
jne 0x779b
movq 0x18(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0x89ae
movq %rbx, %rsi
callq 0x5e8c
movl %eax, 0x8(%rsp)
movq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x947c
jmp 0x779b
movq %rbx, %rsi
callq 0x5f72
testb %al, %al
jne 0x768f
movq %rbx, %rsi
callq 0x5e8c
movl %eax, 0x8(%rsp)
movq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x947c
jmp 0x768f
movl 0xc(%rsp), %eax
subl 0x5c(%rbp), %eax
movl %eax, 0x8(%rsp)
movq 0x20(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x947c
leal 0x1(%r15), %r14d
movq %rbx, %rdi
movq %r12, %rsi
callq 0x8b68
testb %al, %al
jne 0x77d4
cmpl $0x400, %r15d           # imm = 0x400
jl 0x77c9
movq (%rbp), %rax
movl 0xc0(%rax), %eax
addl $-0x3, %eax
cmpl $0x3, %eax
jae 0x77d4
movl %r14d, %r15d
jmp 0x768f
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 0x77f8
jmp 0x77f8
jmp 0x77f8
jmp 0x77f8
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x46c8
movq %rbx, %rdi
callq 0x45d0
nop