// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/match/firstcodes-scan.c
// Function: gt_firstcodes_kmerscan
GtUword gt_firstcodes_kmerscan(const GtEncseq *encseq,
                                     const GtBitsequence *twobitencoding,
                                     bool withcheck,
                                     GtUword totallength,
                                     GtUword numofsequences,
                                     GtUword maxunitindex,
                                     unsigned int kmersize,
                                     unsigned int minmatchlength,
                                     GtProcesskmercode processcode,
                                     void *data)
{
  GtUword laststart = 0, encodingsum = 0, fseqnum = 0;

  if (gt_encseq_has_specialranges(encseq))
  {
    GtSpecialrangeiterator *sri;
    GtRange range;

    sri = gt_specialrangeiterator_new(encseq,true);
    while (gt_specialrangeiterator_next(sri,&range)
           && range.start < totallength)
    {
      gt_assert(range.start >= laststart);
      if (range.start - laststart >= (GtUword) minmatchlength)
      {
        encodingsum += (GtUword) gt_firstcodes_kmerscan_range(
                                                twobitencoding,
                                                withcheck,
                                                kmersize,
                                                minmatchlength,
                                                laststart,
                                                range.start,
                                                fseqnum,
                                                numofsequences - 1 - fseqnum,
                                                maxunitindex,
                                                processcode,
                                                data);
      }
      laststart = range.end;
      fseqnum++;
    }
    gt_specialrangeiterator_delete(sri);
  }
  if (totallength - laststart >= (GtUword) minmatchlength)
  {
    encodingsum += (GtUword) gt_firstcodes_kmerscan_range(
                                              twobitencoding,
                                              withcheck,
                                              kmersize,
                                              minmatchlength,
                                              laststart,
                                              totallength,
                                              fseqnum,
                                              numofsequences - 1 - fseqnum,
                                              maxunitindex,
                                              processcode,
                                              data);
  }
  return encodingsum;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r9, 0x10(%rsp)
movq %r8, %r13
movq %rcx, %r14
movq %rsi, 0x8(%rsp)
movq %rdi, %rbx
movl 0x78(%rsp), %r15d
callq 0x740a6
testb %al, %al
movq %r13, 0x20(%rsp)
je 0x1575fe
movq %r14, 0x18(%rsp)
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x741f0
movq %rax, %rbp
movl %r15d, %r15d
leaq -0x1(%r13), %r14
xorl %r12d, %r12d
xorl %r13d, %r13d
xorl %ebx, %ebx
movq %rbp, %rdi
leaq 0x28(%rsp), %rsi
callq 0x7428b
testb %al, %al
je 0x15760b
movq 0x28(%rsp), %r8
cmpq 0x18(%rsp), %r8
jae 0x15760b
movq %r8, %rax
subq %rbx, %rax
jb 0x157675
cmpq %r15, %rax
jb 0x1575f1
movq 0x8(%rsp), %rdi
movl 0x70(%rsp), %esi
movl 0x78(%rsp), %edx
movq %rbx, %rcx
movq %r13, %r9
pushq 0x88(%rsp)
pushq 0x88(%rsp)
pushq 0x20(%rsp)
pushq %r14
callq 0x155513
addq $0x20, %rsp
addq %rax, %r12
movq 0x30(%rsp), %rbx
incq %r13
decq %r14
jmp 0x157590
movl %r15d, %r15d
xorl %r12d, %r12d
xorl %r13d, %r13d
xorl %ebx, %ebx
jmp 0x157618
movq %rbp, %rdi
callq 0x74a09
movq 0x18(%rsp), %r14
movq %r14, %rax
subq %rbx, %rax
cmpq %r15, %rax
jb 0x157663
movq %r13, %rax
notq %rax
addq 0x20(%rsp), %rax
movq 0x8(%rsp), %rdi
movl 0x70(%rsp), %esi
movl 0x78(%rsp), %edx
movq %rbx, %rcx
movq %r14, %r8
movq %r13, %r9
pushq 0x88(%rsp)
pushq 0x88(%rsp)
pushq 0x20(%rsp)
pushq %rax
callq 0x155513
addq $0x20, %rsp
addq %rax, %r12
movq %r12, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x2e08ec(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x18d98d(%rip), %rsi    # 0x2e5013
leaq 0x1ee5db(%rip), %rdx    # 0x345c68
leaq 0x1ee5ed(%rip), %rcx    # 0x345c81
leaq 0x1ee5fd(%rip), %r8     # 0x345c98
movl $0xc8, %r9d
xorl %eax, %eax
callq 0x17a50
callq 0x17390