// File: /workspace/github_cpp_makefile_star2_O1/epfml[P]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::cbowCWNgrams){
    Vector buff(args_->dim);
    for (int i=0; i< line.size(); ++i) {
        getVector(buff, line[i]);
        vec.addVector(buff);
    }
    if (!line.empty()) {
      vec.mul(1.0 / line.size());
    }
  } else {
    if (args_->model == model_name::sent2vec){
      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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x190, %rsp            # imm = 0x190
movq %r8, %r12
movq %rcx, %r14
movq %rdx, %rbx
movq %rdi, %r15
leaq 0x10(%rsp), %r13
movq %r13, %rdi
movl $0x8, %edx
callq 0x4540
movq 0x10(%r15), %rdi
movl $0x110, %r8d            # imm = 0x110
addq 0x60(%r15), %r8
movq %r13, %rsi
movq %r14, %rdx
movq %r12, %rcx
callq 0x88ca
movq %rbx, %rdi
callq 0xf1d0
movq (%r15), %rax
movl 0xc0(%rax), %ecx
cmpl $0x4, %ecx
je 0x15a0d
cmpl $0x5, %ecx
jne 0x15a1f
movslq 0x94(%rax), %rsi
movq %rsp, %rdi
callq 0xf194
movq (%r14), %rax
movq 0x8(%r14), %rdx
movq %rdx, %rcx
subq %rax, %rcx
je 0x15a8f
xorl %r13d, %r13d
movq %rsp, %r12
movl (%rax,%r13,4), %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x15e88
movq %rbx, %rdi
movq %r12, %rsi
callq 0xf246
incq %r13
movq (%r14), %rax
movq 0x8(%r14), %rdx
movq %rdx, %rcx
subq %rax, %rcx
sarq $0x2, %rcx
cmpq %r13, %rcx
ja 0x159d5
jmp 0x15a93
movq 0x10(%r15), %rdi
movl 0xb4(%rax), %edx
movq %r14, %rsi
callq 0x8486
movq (%r14), %r12
movq 0x8(%r14), %rax
cmpq %rax, %r12
je 0x15a41
movq 0x20(%r15), %rsi
movslq (%r12), %rdx
movq %rbx, %rdi
callq 0xf2ea
addq $0x4, %r12
jmp 0x15a22
movq (%r14), %rcx
cmpq %rax, %rcx
je 0x15ad9
subq %rcx, %rax
sarq $0x2, %rax
movq %rax, %xmm0
punpckldq 0x8f1f(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x8f27(%rip), %xmm0     # 0x1e990
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
movsd 0x8ee3(%rip), %xmm0     # 0x1e960
divsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movq %rbx, %rdi
callq 0xf220
jmp 0x15ad9
sarq $0x2, %rcx
cmpq %rdx, %rax
je 0x15ad1
movq %rcx, %xmm0
punpckldq 0x8edb(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x8ee3(%rip), %xmm0     # 0x1e990
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
movsd 0x8e9f(%rip), %xmm0     # 0x1e960
divsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movq %rbx, %rdi
callq 0xf220
movq %rsp, %rdi
callq 0xf1be
movq 0x144d0(%rip), %rsi     # 0x29fb0
leaq 0x10(%rsp), %rdi
callq 0x4450
leaq 0x88(%rsp), %rdi
callq 0x4110
addq $0x190, %rsp            # imm = 0x190
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x15b0e
jmp 0x15b1b
jmp 0x15b1b
movq %rax, %rbx
movq %rsp, %rdi
callq 0xf1be
jmp 0x15b1e
movq %rax, %rbx
movq 0x1448b(%rip), %rsi     # 0x29fb0
leaq 0x10(%rsp), %rdi
callq 0x4450
leaq 0x88(%rsp), %rdi
callq 0x4110
movq %rbx, %rdi
callq 0x45b0