// File: /workspace/github_cpp_makefile_star2_O1/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)
cmpq $0x0, 0x8(%rsi)
je 0x6a62
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), %rax
movb (%rax,%rbx), %al
andb $-0x40, %al
negb %al
jo 0x6a39
cmpq 0x8(%r14), %rbx
jae 0x6a39
movl $0x1, %ebp
movq %rbx, %r13
movq (%r15), %rax
movslq 0xd0(%rax), %rax
cmpq %rax, %rbp
ja 0x6a39
movq (%r14), %rax
movsbl (%rax,%r13), %esi
movq %r12, %rdi
callq 0x4290
incq %r13
movq 0x8(%r14), %rax
cmpq %rax, %r13
jae 0x6940
movq (%r14), %rcx
movb (%rcx,%r13), %cl
movl %ecx, %edx
andb $-0x40, %dl
negb %dl
jno 0x6940
incq %r13
movsbl %cl, %esi
movq %r12, %rdi
callq 0x4290
jmp 0x6917
movq (%r15), %rcx
movslq 0xcc(%rcx), %rdx
cmpq %rdx, %rbp
jb 0x6a2c
testq %rbx, %rbx
sete %dl
cmpq %rax, %r13
sete %al
cmpq $0x1, %rbp
jne 0x696d
orb %al, %dl
jne 0x6a2c
cmpl $0x5, 0xc0(%rcx)
movq 0x18(%rsp), %rdx
movl $0x811c9dc5, %eax       # imm = 0x811C9DC5
jne 0x69d4
testq %rdx, %rdx
je 0x69a3
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 0x698c
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 0x6a16
leaq 0xc(%rsp), %rdx
callq 0xb28c
jmp 0x6a2c
testq %rdx, %rdx
je 0x69f7
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 0x69e0
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 0x6a22
movl %edx, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rdi)
jmp 0x6a2c
leaq 0xc(%rsp), %rdx
callq 0xb28c
incq %rbp
cmpq 0x8(%r14), %r13
jb 0x68f1
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %r13
cmpq %r13, %rdi
je 0x6a55
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x4300
incq %rbx
cmpq 0x8(%r14), %rbx
jb 0x68bc
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6a77
jmp 0x6a77
jmp 0x6a77
movq %rax, %rbx
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x6a96
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x4300
movq %rbx, %rdi
callq 0x45b0