// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/firstcodes-scan.c
// Function: gt_firstcodes_kmerscan_range
static GtTwobitencoding gt_firstcodes_kmerscan_range(
                                         const GtBitsequence *twobitencoding,
                                         GT_UNUSED bool withcheck,
                                         unsigned int kmersize,
                                         unsigned int minmatchlength,
                                         GtUword startpos,
                                         GtUword endpos,
                                         GtUword fseqnum,
                                         GtUword rseqnum,
                                         GtUword maxunitindex,
                                         GtProcesskmercode processcode,
                                         void *data)
{
  GtTwobitencoding currentencoding, encodingsum = 0;
  unsigned int shiftright;
  const unsigned int shiftleft = GT_MULT2(kmersize-1);
  GtCodetype cc, fcode, rccode;
  GtUword position, unitindex, frelpos;
  const GtUword maskright = GT_MASKRIGHT(kmersize);
  const GtUword lastpossiblepos = endpos - startpos - minmatchlength;
  const GtUword lastfrelpos = endpos - startpos - kmersize;

  gt_assert(kmersize <= (unsigned int) GT_UNITSIN2BITENC);
  position = startpos;
  fcode = gt_kmercode_at_position(twobitencoding, position, kmersize);
  rccode = gt_kmercode_complement(gt_kmercode_reverse(fcode,kmersize),
                                  maskright);
  if (processcode != NULL)
  {
    processcode(fcode,fseqnum,0,data);
    if (lastfrelpos <= lastpossiblepos)
    {
      processcode(rccode,rseqnum,lastfrelpos,data);
    }
  }
  unitindex = GT_DIVBYUNITSIN2BITENC(startpos + kmersize);
  currentencoding = twobitencoding[unitindex];
  encodingsum += currentencoding;
  shiftright = (unsigned int)
               GT_MULT2(GT_UNITSIN2BITENC - 1 -
                        GT_MODBYUNITSIN2BITENC(startpos + kmersize));
  gt_assert(endpos >= (GtUword) kmersize);
  endpos -= kmersize;
  frelpos = 1UL;
  while (position < endpos)
  {
    position++;
    cc = (GtCodetype) (currentencoding >> shiftright) & 3;
    fcode = ((fcode << 2) | cc) & maskright;
    rccode = (rccode >> 2) | ((cc ^ 3UL) << shiftleft);
    if (processcode != NULL)
    {
      gt_assert(lastfrelpos >= frelpos);
      if (frelpos <= lastpossiblepos)
      {
        processcode(fcode,fseqnum,frelpos,data);
      }
      if (lastfrelpos - frelpos <= lastpossiblepos)
      {
        processcode(rccode,rseqnum,lastfrelpos - frelpos,data);
      }
    }
#ifdef WITHCHECK
    if (withcheck)
    {
      gt_firstcode_verifycodes(twobitencoding,
                               position,
                               kmersize,
                               fcode,
                               rccode);
    }
#endif
    if (shiftright > 0)
    {
      shiftright -= 2;
    } else
    {
      gt_assert(unitindex < maxunitindex-1 || position == endpos);
      if (unitindex < maxunitindex-1)
      {
        currentencoding = twobitencoding[++unitindex];
        encodingsum += currentencoding;
        shiftright = (unsigned int) (GT_INTWORDSIZE-2);
      }
    }
    frelpos++;
  }
  return encodingsum;
}

// Assembly:
subq $0x88, %rsp
movb %sil, %al
movq 0xb0(%rsp), %rsi
movq 0xa8(%rsp), %rsi
movq 0xa0(%rsp), %rsi
movq 0x98(%rsp), %rsi
movq 0x90(%rsp), %rsi
movq %rdi, 0x80(%rsp)
andb $0x1, %al
movb %al, 0x7f(%rsp)
movl %edx, 0x78(%rsp)
movl %ecx, 0x74(%rsp)
movq %r8, 0x68(%rsp)
movq %r9, 0x60(%rsp)
movq $0x0, 0x50(%rsp)
movl 0x78(%rsp), %eax
subl $0x1, %eax
shll %eax
movl %eax, 0x48(%rsp)
movl $0x20, %eax
subl 0x78(%rsp), %eax
shll %eax
movl %eax, %eax
movl %eax, %ecx
movq $-0x1, %rax
shrq %cl, %rax
movq %rax, 0x10(%rsp)
movq 0x60(%rsp), %rax
subq 0x68(%rsp), %rax
movl 0x74(%rsp), %ecx
subq %rcx, %rax
movq %rax, 0x8(%rsp)
movq 0x60(%rsp), %rax
subq 0x68(%rsp), %rax
movl 0x78(%rsp), %ecx
subq %rcx, %rax
movq %rax, (%rsp)
cmpl $0x20, 0x78(%rsp)
jbe 0x242e30
movq 0x3f91a1(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2d320a(%rip), %rsi    # 0x516013
leaq 0x335321(%rip), %rdx    # 0x578131
leaq 0x335347(%rip), %rcx    # 0x57815e
leaq 0x3352c2(%rip), %r8     # 0x5780e0
movl $0x4b, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x242e32
movq 0x68(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x80(%rsp), %rdi
movq 0x28(%rsp), %rsi
movl 0x78(%rsp), %edx
callq 0x2436a0
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rdi
movl 0x78(%rsp), %esi
callq 0x2437a0
movq %rax, %rdi
movq 0x10(%rsp), %rsi
callq 0x243780
movq %rax, 0x30(%rsp)
cmpq $0x0, 0xa8(%rsp)
je 0x242ed3
movq 0xa8(%rsp), %rax
movq 0x38(%rsp), %rdi
movq 0x90(%rsp), %rsi
movq 0xb0(%rsp), %rcx
xorl %edx, %edx
callq *%rax
movq (%rsp), %rax
cmpq 0x8(%rsp), %rax
ja 0x242ed1
movq 0xa8(%rsp), %rax
movq 0x30(%rsp), %rdi
movq 0x98(%rsp), %rsi
movq (%rsp), %rdx
movq 0xb0(%rsp), %rcx
callq *%rax
jmp 0x242ed3
movq 0x68(%rsp), %rax
movl 0x78(%rsp), %ecx
addq %rcx, %rax
shrq $0x5, %rax
movq %rax, 0x20(%rsp)
movq 0x80(%rsp), %rax
movq 0x20(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x58(%rsp)
movq 0x58(%rsp), %rax
addq 0x50(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x68(%rsp), %rcx
movl 0x78(%rsp), %eax
addq %rax, %rcx
andq $0x1f, %rcx
movl $0x1f, %eax
subq %rcx, %rax
shlq %rax
movl %eax, 0x4c(%rsp)
movq 0x60(%rsp), %rax
movl 0x78(%rsp), %ecx
cmpq %rcx, %rax
jae 0x242f72
movq 0x3f905f(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2d30c8(%rip), %rsi    # 0x516013
leaq 0x335229(%rip), %rdx    # 0x57817b
leaq 0x335205(%rip), %rcx    # 0x57815e
leaq 0x335180(%rip), %r8     # 0x5780e0
movl $0x5e, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x242f74
movl 0x78(%rsp), %eax
movl %eax, %ecx
movq 0x60(%rsp), %rax
subq %rcx, %rax
movq %rax, 0x60(%rsp)
movq $0x1, 0x18(%rsp)
movq 0x28(%rsp), %rax
cmpq 0x60(%rsp), %rax
jae 0x243199
movq 0x28(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x28(%rsp)
movq 0x58(%rsp), %rax
movl 0x4c(%rsp), %ecx
shrq %cl, %rax
andq $0x3, %rax
movq %rax, 0x40(%rsp)
movq 0x38(%rsp), %rax
shlq $0x2, %rax
orq 0x40(%rsp), %rax
andq 0x10(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x30(%rsp), %rax
shrq $0x2, %rax
movq 0x40(%rsp), %rdx
xorq $0x3, %rdx
movl 0x48(%rsp), %ecx
shlq %cl, %rdx
movq %rdx, %rcx
orq %rcx, %rax
movq %rax, 0x30(%rsp)
cmpq $0x0, 0xa8(%rsp)
je 0x2430bf
jmp 0x243010
movq (%rsp), %rax
cmpq 0x18(%rsp), %rax
jae 0x243053
movq 0x3f8f7e(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2d2fe7(%rip), %rsi    # 0x516013
leaq 0x335165(%rip), %rdx    # 0x578198
leaq 0x335124(%rip), %rcx    # 0x57815e
leaq 0x33509f(%rip), %r8     # 0x5780e0
movl $0x69, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x243055
movq 0x18(%rsp), %rax
cmpq 0x8(%rsp), %rax
ja 0x243085
movq 0xa8(%rsp), %rax
movq 0x38(%rsp), %rdi
movq 0x90(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq 0xb0(%rsp), %rcx
callq *%rax
movq (%rsp), %rax
subq 0x18(%rsp), %rax
cmpq 0x8(%rsp), %rax
ja 0x2430bd
movq 0xa8(%rsp), %rax
movq 0x30(%rsp), %rdi
movq 0x98(%rsp), %rsi
movq (%rsp), %rdx
subq 0x18(%rsp), %rdx
movq 0xb0(%rsp), %rcx
callq *%rax
jmp 0x2430bf
cmpl $0x0, 0x4c(%rsp)
jbe 0x2430d6
movl 0x4c(%rsp), %eax
subl $0x2, %eax
movl %eax, 0x4c(%rsp)
jmp 0x243186
jmp 0x2430d8
movq 0x20(%rsp), %rax
movq 0xa0(%rsp), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jb 0x243132
movq 0x28(%rsp), %rax
cmpq 0x60(%rsp), %rax
je 0x243132
movq 0x3f8e9f(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2d2f08(%rip), %rsi    # 0x516013
leaq 0x33509d(%rip), %rdx    # 0x5781af
leaq 0x335045(%rip), %rcx    # 0x57815e
leaq 0x334fc0(%rip), %r8     # 0x5780e0
movl $0x82, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x243134
movq 0x20(%rsp), %rax
movq 0xa0(%rsp), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jae 0x243184
movq 0x80(%rsp), %rax
movq 0x20(%rsp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, 0x20(%rsp)
movq 0x8(%rax,%rcx,8), %rax
movq %rax, 0x58(%rsp)
movq 0x58(%rsp), %rax
addq 0x50(%rsp), %rax
movq %rax, 0x50(%rsp)
movl $0x3e, 0x4c(%rsp)
jmp 0x243186
movq 0x18(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x18(%rsp)
jmp 0x242f90
movq 0x50(%rsp), %rax
addq $0x88, %rsp
retq
nopw %cs:(%rax,%rax)