// File: /workspace/github_cpp_makefile_star2_O3/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 $0x48, %rsp
movq %r9, 0x40(%rsp)
movq %r8, %rbx
movq %rcx, %r15
movq %rdx, %r14
movq %rsi, %r13
movq %rdi, %rbp
movq (%rsi), %rax
movq -0x18(%rax), %rdi
testb $0x2, 0x20(%rsi,%rdi)
je 0x843c
addq %r13, %rdi
xorl %esi, %esi
callq 0x4560
movq %r13, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x43c0
movq (%r14), %rax
cmpq %rax, 0x8(%r14)
je 0x8449
movq %rax, 0x8(%r14)
movq (%rbx), %rax
cmpq %rax, 0x8(%rbx)
je 0x8456
movq %rax, 0x8(%rbx)
movq %r14, 0x30(%rsp)
movq %rbx, 0x38(%rsp)
movq (%r15), %rax
cmpq %rax, 0x8(%r15)
je 0x846d
movq %rax, 0x8(%r15)
leaq 0x20(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
xorl %r14d, %r14d
leaq 0x10(%rsp), %rbx
movq %r13, %rsi
movq %rbx, %rdx
callq 0x7054
testb %al, %al
je 0x86b5
movq 0x18(%rsp), %rdx
cmpq 0x21ed0(%rip), %rdx     # 0x2a378
jne 0x84d5
testq %rdx, %rdx
je 0x84c4
movq 0x21eba(%rip), %rsi     # 0x2a370
movq 0x10(%rsp), %rdi
callq 0x4320
testl %eax, %eax
jne 0x84d5
movq (%rbp), %rax
cmpl $0x4, 0xc0(%rax)
je 0x86b5
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x6332
movq 0x10(%rbp), %rcx
movl %eax, %eax
movl (%rcx,%rax,4), %esi
movl %esi, 0xc(%rsp)
testl %esi, %esi
js 0x8560
movq %rbp, %rdi
callq 0x6d06
cmpb $0x1, %al
je 0x85cc
movzbl %al, %eax
testl %eax, %eax
jne 0x866b
movl 0xc(%rsp), %r12d
movq 0x40(%rsp), %rdi
callq 0xc204
addsd 0x163c5(%rip), %xmm0    # 0x1e8e8
cvtsd2ss %xmm0, %xmm0
movq %rbp, %rdi
movl %r12d, %esi
callq 0x6c9e
testb %al, %al
jne 0x866b
movq 0x30(%rsp), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x8610
movl 0xc(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rdi)
jmp 0x861a
movq (%rbp), %rax
movq 0xe0(%rax), %rsi
movq 0xe8(%rax), %rcx
movq %rbx, %rdi
xorl %edx, %edx
callq 0x45a0
testq %rax, %rax
je 0x8489
movq 0x18(%rsp), %rcx
movl $0x811c9dc5, %eax       # imm = 0x811C9DC5
testq %rcx, %rcx
je 0x85af
movq 0x10(%rsp), %rdx
xorl %esi, %esi
movsbl (%rdx,%rsi), %edi
xorl %eax, %edi
imull $0x1000193, %edi, %eax  # imm = 0x1000193
incq %rsi
cmpq %rsi, %rcx
jne 0x859b
movl %eax, 0x8(%rsp)
movq 0x8(%r15), %rsi
cmpq 0x10(%r15), %rsi
je 0x85f2
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%r15)
jmp 0x8489
movl 0xc(%rsp), %eax
subl 0x5c(%rbp), %eax
movl %eax, 0x8(%rsp)
movq 0x38(%rsp), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x8604
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rdi)
jmp 0x866b
movq %r15, %rdi
leaq 0x8(%rsp), %rdx
callq 0xb082
jmp 0x8489
leaq 0x8(%rsp), %rdx
callq 0xb082
jmp 0x866b
leaq 0xc(%rsp), %rdx
callq 0xad56
movq 0x18(%rsp), %rcx
movl $0x811c9dc5, %eax       # imm = 0x811C9DC5
testq %rcx, %rcx
je 0x8644
movq 0x10(%rsp), %rdx
xorl %esi, %esi
movsbl (%rdx,%rsi), %edi
xorl %eax, %edi
imull $0x1000193, %edi, %eax  # imm = 0x1000193
incq %rsi
cmpq %rsi, %rcx
jne 0x8630
movl %eax, 0x8(%rsp)
movq 0x8(%r15), %rsi
cmpq 0x10(%r15), %rsi
je 0x865e
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%r15)
jmp 0x866b
movq %r15, %rdi
leaq 0x8(%rsp), %rdx
callq 0xb082
leal 0x1(%r14), %r12d
movq 0x18(%rsp), %rdx
cmpq 0x21cfd(%rip), %rdx     # 0x2a378
jne 0x8697
testq %rdx, %rdx
je 0x86b8
movq 0x21ce7(%rip), %rsi     # 0x2a370
movq 0x10(%rsp), %rdi
callq 0x4320
testl %eax, %eax
je 0x86b8
cmpl $0x400, %r14d           # imm = 0x400
jl 0x86ad
movq (%rbp), %rax
cmpl $0x4, 0xc0(%rax)
jne 0x86b8
movl %r12d, %r14d
jmp 0x8489
movl %r14d, %r12d
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x86d4
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x4300
movl %r12d, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x86ee
jmp 0x86ee
jmp 0x86ee
jmp 0x86ee
movq %rax, %rbx
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x870d
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x4300
movq %rbx, %rdi
callq 0x45b0
nop