// File: epfml[P]Bi-Sent2Vec/src/fasttext.cc
// Function: fasttext::FastText::textVectors(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&, int, std::vector<float, std::allocator<float>>&)
void FastText::textVectors(std::vector<std::string>& sentences, int num_threads, std::vector<real>& final) {
  std::shared_ptr<Matrix> emb;
  std::shared_ptr<std::vector<std::string>> sents;
  sents = std::make_shared<std::vector<std::string>>(sentences);
  emb = std::make_shared<Matrix>(sentences.size(), args_->dim);
  emb->zero();
  std::vector<std::thread> threads;
  for (int32_t i = 0; i < num_threads; i++) {
    threads.push_back(std::thread([=]() { textVectorThread(i, sents, emb, num_threads); }));
  }
  for (auto it = threads.begin(); it != threads.end(); ++it) {
    it->join();
  }
  memcpy(&final[0], &emb->data_[0], emb->m_*emb->n_ * sizeof(real));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x120, %rsp            # imm = 0x120
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xf0(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x23590
leaq -0x40(%rbp), %rdi
callq 0x351b0
movq -0x10(%rbp), %rsi
leaq -0x50(%rbp), %rdi
callq 0x351d0
jmp 0x2d446
leaq -0x40(%rbp), %rdi
leaq -0x50(%rbp), %rsi
movq %rsi, -0xf8(%rbp)
callq 0x35240
movq -0xf8(%rbp), %rdi
callq 0x35270
movq -0x10(%rbp), %rdi
callq 0x122c0
movq -0xf0(%rbp), %rdi
movq %rax, -0x78(%rbp)
callq 0xe6e0
movq %rax, %rdx
addq $0x94, %rdx
leaq -0x70(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x34870
jmp 0x2d498
leaq -0x30(%rbp), %rdi
movq %rdi, -0x100(%rbp)
leaq -0x70(%rbp), %rsi
movq %rsi, -0x108(%rbp)
callq 0x34480
movq -0x108(%rbp), %rdi
callq 0x23810
movq -0x100(%rbp), %rdi
callq 0x235f0
movq %rax, %rdi
callq 0x1dfc0
jmp 0x2d4d5
leaq -0x90(%rbp), %rdi
callq 0x34980
movl $0x0, -0x94(%rbp)
movl -0x94(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x2d5db
movq -0xf0(%rbp), %rax
movq %rax, -0xd8(%rbp)
movl -0x94(%rbp), %eax
movl %eax, -0xd0(%rbp)
leaq -0xc8(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x35290
leaq -0xb8(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x352c0
movl -0x14(%rbp), %eax
movl %eax, -0xa8(%rbp)
leaq -0xa0(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
callq 0x2d710
jmp 0x2d552
leaq -0x90(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x349a0
jmp 0x2d567
leaq -0xa0(%rbp), %rdi
callq 0x349d0
leaq -0xd8(%rbp), %rdi
callq 0x2d7d0
movl -0x94(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x94(%rbp)
jmp 0x2d4eb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x2d6eb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x2d5ca
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x349d0
leaq -0xd8(%rbp), %rdi
callq 0x2d7d0
jmp 0x2d6df
leaq -0x90(%rbp), %rdi
callq 0x34a00
movq %rax, -0xe0(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x34a70
movq %rax, -0xe8(%rbp)
leaq -0xe0(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
callq 0x34a30
testb $0x1, %al
jne 0x2d61a
jmp 0x2d651
leaq -0xe0(%rbp), %rdi
callq 0x34aa0
movq %rax, %rdi
callq 0x5750
jmp 0x2d630
jmp 0x2d632
leaq -0xe0(%rbp), %rdi
callq 0x34ac0
jmp 0x2d5ee
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x2d6df
movq -0x20(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xec40
movq %rax, -0x118(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x235f0
movq (%rax), %rax
movq %rax, -0x110(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x235f0
movq 0x8(%rax), %rax
movq %rax, -0x120(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x235f0
movq -0x120(%rbp), %rdx
movq -0x118(%rbp), %rdi
movq -0x110(%rbp), %rsi
imulq 0x10(%rax), %rdx
shlq $0x2, %rdx
callq 0x5390
leaq -0x90(%rbp), %rdi
callq 0x34ae0
leaq -0x40(%rbp), %rdi
callq 0x35270
leaq -0x30(%rbp), %rdi
callq 0x23810
addq $0x120, %rsp            # imm = 0x120
popq %rbp
retq
leaq -0x90(%rbp), %rdi
callq 0x34ae0
leaq -0x40(%rbp), %rdi
callq 0x35270
leaq -0x30(%rbp), %rdi
callq 0x23810
movq -0x58(%rbp), %rdi
callq 0x57a0
nopw %cs:(%rax,%rax)