// File: /workspace/github_cpp_makefile_star2_O3/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 $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 0x8608
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 0x8615
movq %rax, 0x8(%r14)
movq (%rbx), %rax
cmpq %rax, 0x8(%rbx)
je 0x8622
movq %rax, 0x8(%rbx)
movq %r14, 0x30(%rsp)
movq %rbx, 0x38(%rsp)
movq (%r15), %rax
cmpq %rax, 0x8(%r15)
je 0x8639
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 0x7216
testb %al, %al
je 0x888b
movq 0x18(%rsp), %rdx
cmpq 0x21d04(%rip), %rdx     # 0x2a378
jne 0x86a6
testq %rdx, %rdx
je 0x8690
movq 0x21cee(%rip), %rsi     # 0x2a370
movq 0x10(%rsp), %rdi
callq 0x4320
testl %eax, %eax
jne 0x86a6
movq (%rbp), %rax
movl 0xc0(%rax), %eax
andl $-0x2, %eax
cmpl $0x4, %eax
je 0x888b
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x648a
movq 0x10(%rbp), %rcx
movl %eax, %eax
movl (%rcx,%rax,4), %esi
movl %esi, 0xc(%rsp)
testl %esi, %esi
js 0x8731
movq %rbp, %rdi
callq 0x6ec8
cmpb $0x1, %al
je 0x879d
movzbl %al, %eax
testl %eax, %eax
jne 0x883c
movl 0xc(%rsp), %r12d
movq 0x40(%rsp), %rdi
callq 0xc408
addsd 0x16264(%rip), %xmm0    # 0x1e958
cvtsd2ss %xmm0, %xmm0
movq %rbp, %rdi
movl %r12d, %esi
callq 0x6e5c
testb %al, %al
jne 0x883c
movq 0x30(%rsp), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x87e1
movl 0xc(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rdi)
jmp 0x87eb
movq (%rbp), %rax
movq 0xe0(%rax), %rsi
movq 0xe8(%rax), %rcx
movq %rbx, %rdi
xorl %edx, %edx
callq 0x45a0
testq %rax, %rax
je 0x8655
movq 0x18(%rsp), %rcx
movl $0x811c9dc5, %eax       # imm = 0x811C9DC5
testq %rcx, %rcx
je 0x8780
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 0x876c
movl %eax, 0x8(%rsp)
movq 0x8(%r15), %rsi
cmpq 0x10(%r15), %rsi
je 0x87c3
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%r15)
jmp 0x8655
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 0x87d5
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rdi)
jmp 0x883c
movq %r15, %rdi
leaq 0x8(%rsp), %rdx
callq 0xb286
jmp 0x8655
leaq 0x8(%rsp), %rdx
callq 0xb286
jmp 0x883c
leaq 0xc(%rsp), %rdx
callq 0xaf5a
movq 0x18(%rsp), %rcx
movl $0x811c9dc5, %eax       # imm = 0x811C9DC5
testq %rcx, %rcx
je 0x8815
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 0x8801
movl %eax, 0x8(%rsp)
movq 0x8(%r15), %rsi
cmpq 0x10(%r15), %rsi
je 0x882f
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%r15)
jmp 0x883c
movq %r15, %rdi
leaq 0x8(%rsp), %rdx
callq 0xb286
leal 0x1(%r14), %r12d
movq 0x18(%rsp), %rdx
cmpq 0x21b2c(%rip), %rdx     # 0x2a378
jne 0x8868
testq %rdx, %rdx
je 0x888e
movq 0x21b16(%rip), %rsi     # 0x2a370
movq 0x10(%rsp), %rdi
callq 0x4320
testl %eax, %eax
je 0x888e
cmpl $0x400, %r14d           # imm = 0x400
jl 0x8883
movq (%rbp), %rax
movl 0xc0(%rax), %eax
addl $-0x3, %eax
cmpl $0x3, %eax
jae 0x888e
movl %r12d, %r14d
jmp 0x8655
movl %r14d, %r12d
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x88aa
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 0x88c4
jmp 0x88c4
jmp 0x88c4
jmp 0x88c4
movq %rax, %rbx
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x88e3
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x4300
movq %rbx, %rdi
callq 0x45b0
nop