// File: epfml[P]Bi-Sent2Vec/src/fasttext.cc
// Function: fasttext::FastText::textVector(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, fasttext::Vector&, std::vector<int, std::allocator<int>>&, std::vector<int, std::allocator<int>>&)
void FastText::textVector(std::string text, Vector& vec, std::vector<int32_t>& line, std::vector<int32_t>& labels) {
  std::istringstream text_stream(text);
  dict_->getLine(text_stream, line, labels, model_->rng);
  vec.zero();
  if (args_->model == model_name::bisent2vec){
    dict_->addNgrams(line, args_->wordNgrams);
  }
  for (auto it = line.cbegin(); it != line.cend(); ++it) {
    vec.addRow(*input_, *it);
  }
  if (!line.empty()) {
    vec.mul(1.0 / line.size());
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x220, %rsp            # imm = 0x220
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x1f0(%rbp)
leaq -0x1a8(%rbp), %rdi
movq %rdi, -0x1e0(%rbp)
movl $0x8, %edx
callq 0x5720
movq -0x1f0(%rbp), %rdi
addq $0x10, %rdi
callq 0x34050
movq -0x1f0(%rbp), %rdi
movq %rax, -0x1e8(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x1d8(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x1d0(%rbp)
addq $0x60, %rdi
callq 0x34630
movq -0x1e8(%rbp), %rdi
movq -0x1e0(%rbp), %rsi
movq -0x1d8(%rbp), %rdx
movq -0x1d0(%rbp), %rcx
movq %rax, %r8
addq $0x110, %r8             # imm = 0x110
callq 0xac80
jmp 0x2d24c
movq -0x18(%rbp), %rdi
callq 0x20cb0
jmp 0x2d257
movq -0x1f0(%rbp), %rdi
callq 0xe6e0
cmpl $0x4, 0xc0(%rax)
jne 0x2d2da
movq -0x1f0(%rbp), %rdi
addq $0x10, %rdi
callq 0x34050
movq -0x1f0(%rbp), %rdi
movq %rax, -0x200(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x1f8(%rbp)
callq 0xe6e0
movq -0x200(%rbp), %rdi
movq -0x1f8(%rbp), %rsi
movl 0xb4(%rax), %edx
callq 0xa820
jmp 0x2d2b5
jmp 0x2d2da
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1b0(%rbp)
movl %eax, -0x1b4(%rbp)
leaq -0x1a8(%rbp), %rdi
callq 0x5220
jmp 0x2d3e6
movq -0x20(%rbp), %rdi
callq 0xf370
movq %rax, -0x1c0(%rbp)
movq -0x20(%rbp), %rdi
callq 0xf3e0
movq %rax, -0x1c8(%rbp)
leaq -0x1c0(%rbp), %rdi
leaq -0x1c8(%rbp), %rsi
callq 0xf3a0
testb $0x1, %al
jne 0x2d313
jmp 0x2d369
movq -0x1f0(%rbp), %rdi
movq -0x18(%rbp), %rax
movq %rax, -0x210(%rbp)
addq $0x20, %rdi
callq 0x23880
movq %rax, -0x208(%rbp)
leaq -0x1c0(%rbp), %rdi
callq 0xf410
movq -0x210(%rbp), %rdi
movq -0x208(%rbp), %rsi
movslq (%rax), %rdx
callq 0x20f30
jmp 0x2d359
jmp 0x2d35b
leaq -0x1c0(%rbp), %rdi
callq 0xf430
jmp 0x2d2ea
movq -0x20(%rbp), %rdi
callq 0x34ec0
testb $0x1, %al
jne 0x2d3d1
movq -0x18(%rbp), %rax
movq %rax, -0x218(%rbp)
movq -0x20(%rbp), %rdi
callq 0xed50
movq -0x218(%rbp), %rdi
movq %rax, %xmm1
movaps 0x15553(%rip), %xmm0    # 0x428f0
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movapd 0x15557(%rip), %xmm0    # 0x42900
subpd %xmm0, %xmm1
movaps %xmm1, %xmm0
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm0, %xmm1
movsd 0x154f8(%rip), %xmm0    # 0x428b8
divsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
callq 0x20d80
jmp 0x2d3cf
jmp 0x2d3d1
leaq -0x1a8(%rbp), %rdi
callq 0x5220
addq $0x220, %rsp            # imm = 0x220
popq %rbp
retq
movq -0x1b0(%rbp), %rdi
callq 0x57a0
nopw %cs:(%rax,%rax)