// File: /workspace/github_cpp_makefile_star2_O3/epfml[P]sent2vec/src/dictionary.cc
// Function: fasttext::Dictionary::computeNgrams(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<int, std::allocator<int>>&) const
void Dictionary::computeNgrams(const std::string& word,
                               std::vector<int32_t>& ngrams) const {
  for (size_t i = 0; i < word.size(); i++) {
    std::string ngram;
    if ((word[i] & 0xC0) == 0x80) continue;
    for (size_t j = i, n = 1; j < word.size() && n <= args_->maxn; n++) {
      ngram.push_back(word[j++]);
      while (j < word.size() && (word[j] & 0xC0) == 0x80) {
        ngram.push_back(word[j++]);
      }
      if (n >= args_->minn && !(n == 1 && (i == 0 || j == word.size()))) {
        if (args_->model == model_name::cbowCWNgrams) {
          int32_t h = hash(ngram) % args_->bucketChar;
          ngrams.push_back(nwords_ + args_->bucket + h);
        } else {
          int32_t h = hash(ngram) % args_->bucket;
          ngrams.push_back(nwords_ + h);
        }
      }
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, 0x30(%rsp)
movq 0x8(%rsi), %rax
testq %rax, %rax
je 0x6a7a
movq %rsi, %r14
movq %rdi, %r15
leaq 0x20(%rsp), %r13
xorl %ebx, %ebx
leaq 0x10(%rsp), %r12
movq %r13, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
movb $0x0, 0x20(%rsp)
movq (%r14), %rcx
movb (%rcx,%rbx), %cl
andb $-0x40, %cl
negb %cl
jo 0x6a6e
cmpq %rax, %rbx
jae 0x6a6e
movq (%r15), %rcx
cmpl $0x0, 0xd0(%rcx)
je 0x6a4e
movl $0x1, %ebp
movq %rbx, %r13
movq (%r14), %rax
movsbl (%rax,%r13), %esi
movq %r12, %rdi
callq 0x4290
incq %r13
movq 0x8(%r14), %rax
cmpq %rax, %r13
jae 0x6943
movq (%r14), %rcx
movb (%rcx,%r13), %cl
movl %ecx, %edx
andb $-0x40, %dl
negb %dl
jno 0x6943
incq %r13
movsbl %cl, %esi
movq %r12, %rdi
callq 0x4290
jmp 0x691a
movq (%r15), %rcx
movslq 0xcc(%rcx), %rdx
cmpq %rdx, %rbp
jb 0x6a2f
testq %rbx, %rbx
sete %dl
cmpq %rax, %r13
sete %al
cmpq $0x1, %rbp
jne 0x6970
orb %al, %dl
jne 0x6a2f
cmpl $0x5, 0xc0(%rcx)
movq 0x18(%rsp), %rdx
movl $0x811c9dc5, %eax       # imm = 0x811C9DC5
jne 0x69d7
testq %rdx, %rdx
je 0x69a6
movq 0x10(%rsp), %rsi
xorl %edi, %edi
movsbl (%rsi,%rdi), %r8d
xorl %eax, %r8d
imull $0x1000193, %r8d, %eax  # imm = 0x1000193
incq %rdi
cmpq %rdi, %rdx
jne 0x698f
xorl %edx, %edx
divl 0xc8(%rcx)
addl 0x5c(%r15), %edx
addl 0xc4(%rcx), %edx
movl %edx, 0xc(%rsp)
movq 0x30(%rsp), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
jne 0x6a19
leaq 0xc(%rsp), %rdx
callq 0xb286
jmp 0x6a2f
testq %rdx, %rdx
je 0x69fa
movq 0x10(%rsp), %rsi
xorl %edi, %edi
movsbl (%rsi,%rdi), %r8d
xorl %eax, %r8d
imull $0x1000193, %r8d, %eax  # imm = 0x1000193
incq %rdi
cmpq %rdi, %rdx
jne 0x69e3
xorl %edx, %edx
divl 0xc4(%rcx)
addl 0x5c(%r15), %edx
movl %edx, 0xc(%rsp)
movq 0x30(%rsp), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x6a25
movl %edx, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rdi)
jmp 0x6a2f
leaq 0xc(%rsp), %rdx
callq 0xb286
movq 0x8(%r14), %rax
cmpq %rax, %r13
jae 0x6a4e
incq %rbp
movq (%r15), %rcx
movslq 0xd0(%rcx), %rcx
cmpq %rcx, %rbp
jbe 0x6907
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %r13
cmpq %r13, %rdi
je 0x6a6e
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x4300
movq 0x8(%r14), %rax
incq %rbx
cmpq %rax, %rbx
jb 0x68c2
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6a8f
jmp 0x6a8f
jmp 0x6a8f
movq %rax, %rbx
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x6aae
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x4300
movq %rbx, %rdi
callq 0x45b0