// File: /workspace/github_c_makefile_star2_O1/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 $0x28, %rsp
movq %r9, 0x10(%rsp)
movq %r8, %r15
movq %rcx, %r14
movq %rsi, 0x8(%rsp)
movq %rdi, %rbx
callq 0xef27f
testb %al, %al
je 0x1b343d
movq %r15, (%rsp)
movq %rbx, %rdi
movl $0x1, %esi
callq 0xef3d9
movq %rax, %r13
leaq 0x18(%rsp), %rbx
movq %rax, %rdi
movq %rbx, %rsi
callq 0xef451
movq (%rbx), %r8
movq %r14, %r15
cmpq %r14, %r8
setb %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x1b3446
movq (%rsp), %rax
leaq -0x1(%rax), %r14
xorl %ebx, %ebx
xorl %ebp, %ebp
xorl %r12d, %r12d
movq %r8, %rax
subq %rbx, %rax
jb 0x1b34b5
movl 0x68(%rsp), %ecx
cmpq %rcx, %rax
jb 0x1b3415
movq 0x8(%rsp), %rdi
movl 0x60(%rsp), %esi
movl 0x68(%rsp), %edx
movq %rbx, %rcx
movq %rbp, %r9
pushq 0x78(%rsp)
pushq 0x78(%rsp)
pushq 0x20(%rsp)
pushq %r14
callq 0x1b140d
addq $0x20, %rsp
addq %rax, %r12
movq 0x20(%rsp), %rbx
incq %rbp
movq %r13, %rdi
leaq 0x18(%rsp), %rsi
callq 0xef451
testb %al, %al
je 0x1b344d
movq 0x18(%rsp), %r8
decq %r14
cmpq %r15, %r8
jb 0x1b33d3
jmp 0x1b344d
xorl %r12d, %r12d
xorl %ebp, %ebp
xorl %ebx, %ebx
jmp 0x1b345c
xorl %r12d, %r12d
xorl %ebp, %ebp
xorl %ebx, %ebx
movq %r13, %rdi
callq 0xefa48
movq %r15, %r14
movq (%rsp), %r15
movq %r14, %rax
subq %rbx, %rax
movl 0x68(%rsp), %ecx
cmpq %rcx, %rax
jb 0x1b34a3
movq %rbp, %rax
notq %rax
addq %r15, %rax
movq 0x8(%rsp), %rdi
movl 0x60(%rsp), %esi
movl 0x68(%rsp), %edx
movq %rbx, %rcx
movq %r14, %r8
movq %rbp, %r9
pushq 0x78(%rsp)
pushq 0x78(%rsp)
pushq 0x20(%rsp)
pushq %rax
callq 0x1b140d
addq $0x20, %rsp
addq %rax, %r12
movq %r12, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x652dd