// File: epfml[P]Bi-Sent2Vec/src/fasttext.cc
// Function: fasttext::FastText::predict(std::istream&, int, std::vector<std::pair<float, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<float, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>&) const
void FastText::predict(std::istream& in, int32_t k,
                       std::vector<std::pair<real,std::string>>& predictions) const {
  std::vector<int32_t> words, labels;
  dict_->getLine(in, words, labels, model_->rng);
  if (words.empty()) return;
  Vector hidden(args_->dim);
  Vector output(dict_->nlabels());
  std::vector<std::pair<real,int32_t>> modelPredictions;
  model_->predict(words, k, modelPredictions, hidden, output);
  predictions.clear();
  for (auto it = modelPredictions.cbegin(); it != modelPredictions.cend(); it++) {
    predictions.push_back(std::make_pair(it->first, dict_->getLabel(it->second)));
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x150, %rsp            # imm = 0x150
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x120(%rbp)
leaq -0x38(%rbp), %rdi
movq %rdi, -0x108(%rbp)
callq 0xe440
leaq -0x50(%rbp), %rdi
movq %rdi, -0x100(%rbp)
callq 0xe440
movq -0x120(%rbp), %rdi
addq $0x10, %rdi
callq 0x34050
movq -0x120(%rbp), %rdi
movq %rax, -0x118(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x110(%rbp)
addq $0x60, %rdi
callq 0x34630
movq -0x118(%rbp), %rdi
movq -0x110(%rbp), %rsi
movq -0x108(%rbp), %rdx
movq -0x100(%rbp), %rcx
movq %rax, %r8
addq $0x110, %r8             # imm = 0x110
callq 0xac80
jmp 0x2c364
leaq -0x38(%rbp), %rdi
callq 0x34ec0
testb $0x1, %al
jne 0x2c373
jmp 0x2c390
movl $0x1, -0x60(%rbp)
jmp 0x2c5ab
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x2c5e4
movq -0x120(%rbp), %rdi
callq 0xe6e0
movslq 0x94(%rax), %rsi
leaq -0x70(%rbp), %rdi
callq 0x20c00
jmp 0x2c3ae
movq -0x120(%rbp), %rdi
addq $0x10, %rdi
callq 0x34050
movq %rax, %rdi
callq 0x8360
movl %eax, -0x124(%rbp)
jmp 0x2c3ce
movl -0x124(%rbp), %eax
movslq %eax, %rsi
leaq -0x80(%rbp), %rdi
callq 0x20c00
jmp 0x2c3e2
leaq -0x98(%rbp), %rdi
movq %rdi, -0x130(%rbp)
callq 0x34cf0
movq -0x120(%rbp), %rdi
addq $0x60, %rdi
callq 0x34630
movq -0x130(%rbp), %rcx
movq %rax, %rdi
movl -0x14(%rbp), %edx
leaq -0x38(%rbp), %rsi
leaq -0x70(%rbp), %r8
leaq -0x80(%rbp), %r9
callq 0x22420
jmp 0x2c425
movq -0x20(%rbp), %rdi
callq 0x34f00
leaq -0x98(%rbp), %rdi
callq 0x34d10
movq %rax, -0xa0(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x34d80
movq %rax, -0xa8(%rbp)
leaq -0xa0(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x34d40
testb $0x1, %al
jne 0x2c470
jmp 0x2c586
movq -0x20(%rbp), %rax
movq %rax, -0x150(%rbp)
leaq -0xa0(%rbp), %rdi
movq %rdi, -0x140(%rbp)
callq 0x34e00
movq -0x120(%rbp), %rdi
movq %rax, -0x148(%rbp)
addq $0x10, %rdi
callq 0x34050
movq -0x140(%rbp), %rdi
movq %rax, -0x138(%rbp)
callq 0x34e00
movq -0x138(%rbp), %rsi
movl 0x4(%rax), %edx
leaq -0xf0(%rbp), %rdi
callq 0xad10
jmp 0x2c4d0
movq -0x148(%rbp), %rsi
leaq -0xd0(%rbp), %rdi
leaq -0xf0(%rbp), %rdx
callq 0x34f50
jmp 0x2c4ec
movq -0x150(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0x34f20
jmp 0x2c501
leaq -0xd0(%rbp), %rdi
callq 0x34f90
leaq -0xf0(%rbp), %rdi
callq 0x58d8
leaq -0xa0(%rbp), %rdi
xorl %esi, %esi
callq 0x34e20
movq %rax, -0xf8(%rbp)
jmp 0x2c441
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x2c5db
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x2c5c6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x2c578
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0xd0(%rbp), %rdi
callq 0x34f90
leaq -0xf0(%rbp), %rdi
callq 0x58d8
jmp 0x2c5c6
leaq -0x98(%rbp), %rdi
callq 0x34e60
leaq -0x80(%rbp), %rdi
callq 0x20c60
leaq -0x70(%rbp), %rdi
callq 0x20c60
movl $0x0, -0x60(%rbp)
leaq -0x50(%rbp), %rdi
callq 0xe530
leaq -0x38(%rbp), %rdi
callq 0xe530
addq $0x150, %rsp            # imm = 0x150
popq %rbp
retq
leaq -0x98(%rbp), %rdi
callq 0x34e60
leaq -0x80(%rbp), %rdi
callq 0x20c60
leaq -0x70(%rbp), %rdi
callq 0x20c60
leaq -0x50(%rbp), %rdi
callq 0xe530
leaq -0x38(%rbp), %rdi
callq 0xe530
movq -0x58(%rbp), %rdi
callq 0x57a0
nop