// File: /workspace/github_cpp_makefile_star2_O3/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 0x88ec
movq %rbx, %rdi
callq 0xf3ec
movq (%r15), %rax
movl 0xc0(%rax), %ecx
cmpl $0x4, %ecx
je 0x15b82
cmpl $0x5, %ecx
jne 0x15b94
movslq 0x94(%rax), %rsi
movq %rsp, %rdi
callq 0xf3b0
movq (%r14), %rax
cmpq %rax, 0x8(%r14)
je 0x15b75
xorl %r13d, %r13d
movq %rsp, %r12
movl (%rax,%r13,4), %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x15f4c
movq %rbx, %rdi
movq %r12, %rsi
callq 0xf462
incq %r13
movq (%r14), %rax
movq 0x8(%r14), %rdx
movq %rdx, %rcx
subq %rax, %rcx
sarq $0x2, %rcx
cmpq %r13, %rcx
ja 0x15b1d
cmpq %rdx, %rax
je 0x15b75
cvtsi2sd %rcx, %xmm0
movsd 0x8e06(%rip), %xmm1     # 0x1e968
divsd %xmm0, %xmm1
xorps %xmm0, %xmm0
cvtsd2ss %xmm1, %xmm0
movq %rbx, %rdi
callq 0xf43c
movq %rsp, %rdi
callq 0xf3da
jmp 0x15c0c
movq 0x10(%r15), %rdi
movl 0xb4(%rax), %edx
movq %r14, %rsi
callq 0x84b8
movq (%r14), %r12
cmpq 0x8(%r14), %r12
je 0x15c0c
movq %r12, %r13
negq %r13
movq 0x20(%r15), %rsi
movslq (%r12), %rdx
movq %rbx, %rdi
callq 0xf506
addq $0x4, %r12
addq $-0x4, %r13
cmpq 0x8(%r14), %r12
jne 0x15ba3
movq (%r14), %rax
cmpq %rax, %r12
je 0x15c0c
addq %r13, %rax
negq %rax
sarq $0x2, %rax
movq %rax, %xmm0
punpckldq 0x8da0(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x8da8(%rip), %xmm0     # 0x1e990
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
movsd 0x8d6c(%rip), %xmm0     # 0x1e968
divsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movq %rbx, %rdi
callq 0xf43c
movq 0x1439d(%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 0x15c41
jmp 0x15c4e
jmp 0x15c4e
movq %rax, %rbx
movq %rsp, %rdi
callq 0xf3da
jmp 0x15c51
movq %rax, %rbx
movq 0x14358(%rip), %rsi     # 0x29fb0
leaq 0x10(%rsp), %rdi
callq 0x4450
leaq 0x88(%rsp), %rdi
callq 0x4110
movq %rbx, %rdi
callq 0x45b0
nop