// File: epfml[P]sent2vec/src/fasttext.cc
// Function: fasttext::FastText::sent2vec(fasttext::Model&, float, std::vector<int, std::allocator<int>> const&)
void FastText::sent2vec(Model& model, real lr, const std::vector<int32_t>& line){
  if (line.size() <= 1) return;
  std::vector<int32_t> context;
  std::uniform_real_distribution<> uniform(0, 1);
  for (int32_t i=0; i<line.size(); ++i){
    if (uniform(model.rng) > dict_->getPDiscard(line[i]) || dict_->getTokenCount(line[i]) < args_->minCountLabel)
      continue;
    context = line;
    context[i] = 0;
    dict_->addNgrams(context, args_->wordNgrams, args_->dropoutK, model.rng);
    model.update(context, line[i], lr);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movss %xmm0, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x20(%rbp), %rdi
callq 0xf0e0
cmpq $0x1, %rax
ja 0x2b9d8
jmp 0x2bbc5
leaq -0x38(%rbp), %rdi
callq 0xe7d0
leaq -0x48(%rbp), %rdi
xorps %xmm0, %xmm0
movsd 0x16f40(%rip), %xmm1    # 0x42930
callq 0xf400
jmp 0x2b9f7
movl $0x0, -0x58(%rbp)
movslq -0x58(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x20(%rbp), %rdi
callq 0xf0e0
movq %rax, %rcx
movq -0x68(%rbp), %rax
cmpq %rcx, %rax
jae 0x2bbbc
movq -0x10(%rbp), %rsi
addq $0x110, %rsi            # imm = 0x110
leaq -0x48(%rbp), %rdi
callq 0xf500
movsd %xmm0, -0x70(%rbp)
jmp 0x2ba3a
movq -0x60(%rbp), %rdi
addq $0x10, %rdi
callq 0x33af0
movq %rax, -0x80(%rbp)
movq -0x20(%rbp), %rdi
movslq -0x58(%rbp), %rsi
callq 0xe560
movq -0x80(%rbp), %rdi
movl (%rax), %esi
callq 0x92d0
movss %xmm0, -0x74(%rbp)
jmp 0x2ba6a
movsd -0x70(%rbp), %xmm0
movss -0x74(%rbp), %xmm1
cvtss2sd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
ja 0x2bad5
movq -0x60(%rbp), %rdi
addq $0x10, %rdi
callq 0x33af0
movq %rax, -0x90(%rbp)
movq -0x20(%rbp), %rdi
movslq -0x58(%rbp), %rsi
callq 0xe560
movq -0x90(%rbp), %rdi
movl (%rax), %esi
callq 0x9240
movq %rax, -0x88(%rbp)
jmp 0x2bab6
movq -0x60(%rbp), %rdi
callq 0xea70
movq %rax, %rcx
movq -0x88(%rbp), %rax
movslq 0xac(%rcx), %rcx
cmpq %rcx, %rax
jge 0x2baf4
jmp 0x2bbae
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x38(%rbp), %rdi
callq 0xe8c0
jmp 0x2bbce
movq -0x20(%rbp), %rsi
leaq -0x38(%rbp), %rdi
callq 0xf820
jmp 0x2bb03
movslq -0x58(%rbp), %rsi
leaq -0x38(%rbp), %rdi
movq %rdi, -0xa0(%rbp)
callq 0xe5d0
movq -0x60(%rbp), %rdi
movl $0x0, (%rax)
addq $0x10, %rdi
callq 0x33af0
movq -0x60(%rbp), %rdi
movq %rax, -0xa8(%rbp)
callq 0xea70
movq -0x60(%rbp), %rdi
movl 0xb4(%rax), %eax
movl %eax, -0x94(%rbp)
callq 0xea70
movq -0xa8(%rbp), %rdi
movq -0xa0(%rbp), %rsi
movl -0x94(%rbp), %edx
movl 0x9c(%rax), %ecx
movq -0x10(%rbp), %r8
addq $0x110, %r8             # imm = 0x110
callq 0xa790
jmp 0x2bb7b
movq -0x10(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq -0x20(%rbp), %rdi
movslq -0x58(%rbp), %rsi
callq 0xe560
movq -0xb0(%rbp), %rdi
movl (%rax), %edx
movss -0x14(%rbp), %xmm0
leaq -0x38(%rbp), %rsi
callq 0x22d20
jmp 0x2bbac
jmp 0x2bbae
movl -0x58(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x58(%rbp)
jmp 0x2b9fe
leaq -0x38(%rbp), %rdi
callq 0xe8c0
addq $0xb0, %rsp
popq %rbp
retq
movq -0x50(%rbp), %rdi
callq 0x57a0
nopw (%rax,%rax)