// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/firstcodes-accum.c
// Function: gt_firstcodes_accum_kmerscan_range
static void gt_firstcodes_accum_kmerscan_range(
                                         const GtBitsequence *twobitencoding,
                                         unsigned int kmersize,
                                         unsigned int minmatchlength,
                                         GtUword startpos,
                                         GtUword length,
                                         GtUword maxunitindex,
                                         GtCodeposbuffer *buf)
{
  const GtUword maskright = GT_MASKRIGHT(kmersize);
  const GtUword lastpossiblepos = length - minmatchlength;
  const GtUword lastfrelpos = length - kmersize;
  const unsigned int shiftleft = GT_MULT2(kmersize-1);
  unsigned int shiftright;
  GtUword unitindex, frelpos;
  GtTwobitencoding currentencoding;
  GtCodetype cc, marksubstringtmpcode, fcode, rccode;

  gt_assert(kmersize <= (unsigned int) GT_UNITSIN2BITENC);
  fcode = gt_kmercode_at_position(twobitencoding, startpos, kmersize);
  rccode = gt_kmercode_complement(gt_kmercode_reverse(fcode,kmersize),
                                  maskright);
  GT_FIRSTCODES_ACCUM(buf,fcode,0UL);
  if (kmersize == minmatchlength)
  {
    GT_FIRSTCODES_ACCUM(buf,rccode,lastfrelpos);
  }
  unitindex = GT_DIVBYUNITSIN2BITENC(startpos + kmersize);
  currentencoding = twobitencoding[unitindex];
  shiftright = (unsigned int)
               GT_MULT2(GT_UNITSIN2BITENC - 1 -
                        GT_MODBYUNITSIN2BITENC(startpos + kmersize));
  for (frelpos = 1UL; frelpos <= lastfrelpos; frelpos++)
  {
    cc = (GtCodetype) (currentencoding >> shiftright) & 3;
    fcode = ((fcode << 2) | cc) & maskright;
    rccode = (rccode >> 2) | ((cc ^ 3UL) << shiftleft);
    if (frelpos <= lastpossiblepos)
    {
      GT_FIRSTCODES_ACCUM(buf,fcode,frelpos);
    }
    if (lastfrelpos - frelpos <= lastpossiblepos)
    {
      GT_FIRSTCODES_ACCUM(buf,rccode,lastfrelpos - frelpos);
    }
    if (shiftright > 0)
    {
      shiftright -= 2;
    } else
    {
      gt_assert(unitindex < maxunitindex-1 || frelpos == lastfrelpos);
      if (unitindex < maxunitindex-1)
      {
        currentencoding = twobitencoding[++unitindex];
        shiftright = (unsigned int) (GT_INTWORDSIZE-2);
      }
    }
  }
}

// Assembly:
subq $0x88, %rsp
movq 0x90(%rsp), %rax
movq %rdi, 0x80(%rsp)
movl %esi, 0x7c(%rsp)
movl %edx, 0x78(%rsp)
movq %rcx, 0x70(%rsp)
movq %r8, 0x68(%rsp)
movq %r9, 0x60(%rsp)
movl $0x20, %eax
subl 0x7c(%rsp), %eax
shll %eax
movl %eax, %eax
movl %eax, %ecx
movq $-0x1, %rax
shrq %cl, %rax
movq %rax, 0x58(%rsp)
movq 0x68(%rsp), %rax
movl 0x78(%rsp), %ecx
subq %rcx, %rax
movq %rax, 0x50(%rsp)
movq 0x68(%rsp), %rax
movl 0x7c(%rsp), %ecx
subq %rcx, %rax
movq %rax, 0x48(%rsp)
movl 0x7c(%rsp), %eax
subl $0x1, %eax
shll %eax
movl %eax, 0x44(%rsp)
cmpl $0x20, 0x7c(%rsp)
jbe 0x4b760a
movq 0x1849c7(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x5ea30(%rip), %rsi     # 0x516013
leaq 0xc0b47(%rip), %rdx     # 0x578131
leaq 0x100116(%rip), %rcx    # 0x5b7707
leaq 0x1000f2(%rip), %r8     # 0x5b76ea
movl $0x3d, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x4b760c
movq 0x80(%rsp), %rdi
movq 0x70(%rsp), %rsi
movl 0x7c(%rsp), %edx
callq 0x4b7e30
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movl 0x7c(%rsp), %esi
callq 0x4b7f30
movq %rax, %rdi
movq 0x58(%rsp), %rsi
callq 0x4b7f10
movq %rax, 0x8(%rsp)
movq 0x90(%rsp), %rax
testb $0x1, 0x58(%rax)
je 0x4b770f
movq 0x90(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x90(%rsp), %rcx
cmpq 0x18(%rcx), %rax
jne 0x4b768d
movq 0x90(%rsp), %rax
movq 0x30(%rax), %rax
movq 0x90(%rsp), %rcx
movq 0x50(%rcx), %rdi
callq *%rax
jmp 0x4b768f
movq 0x90(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x90(%rsp), %rcx
cmpq 0x18(%rcx), %rax
jb 0x4b76e1
movq 0x1848f0(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x5e959(%rip), %rsi     # 0x516013
leaq 0x100069(%rip), %rdx    # 0x5b772a
leaq 0x10003f(%rip), %rcx    # 0x5b7707
leaq 0x10001b(%rip), %r8     # 0x5b76ea
movl $0x41, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x4b76e3
movq 0x10(%rsp), %rdx
movq 0x90(%rsp), %rax
movq 0x40(%rax), %rax
movq 0x90(%rsp), %rsi
movq 0x10(%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, 0x10(%rsi)
movq %rdx, (%rax,%rcx,8)
movl 0x7c(%rsp), %eax
cmpl 0x78(%rsp), %eax
jne 0x4b78e5
movq 0x90(%rsp), %rax
testb $0x1, 0x58(%rax)
jne 0x4b782d
cmpq $0x0, 0x48(%rsp)
jbe 0x4b78e3
movq 0x8(%rsp), %rax
movq 0x90(%rsp), %rcx
movq 0x20(%rcx), %rcx
movl 0xc(%rcx), %ecx
shrq %cl, %rax
movq 0x90(%rsp), %rcx
movq 0x20(%rcx), %rcx
andq 0x18(%rcx), %rax
movq %rax, 0x18(%rsp)
movq 0x90(%rsp), %rax
movq 0x20(%rax), %rax
movq 0x20(%rax), %rax
movq 0x18(%rsp), %rcx
shrq $0x6, %rcx
movq (%rax,%rcx,8), %rdx
movq 0x18(%rsp), %rcx
andq $0x3f, %rcx
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
shrq %cl, %rax
andq %rax, %rdx
xorl %eax, %eax
movl $0x1, %ecx
cmpq $0x0, %rdx
cmovnel %ecx, %eax
cmpl $0x0, %eax
je 0x4b78e3
movq 0x8(%rsp), %rax
movq 0x90(%rsp), %rcx
movq 0x28(%rcx), %rcx
movl 0xc(%rcx), %ecx
shrq %cl, %rax
movq 0x90(%rsp), %rcx
movq 0x28(%rcx), %rcx
andq 0x18(%rcx), %rax
movq %rax, 0x18(%rsp)
movq 0x90(%rsp), %rax
movq 0x28(%rax), %rax
movq 0x20(%rax), %rax
movq 0x18(%rsp), %rcx
shrq $0x6, %rcx
movq (%rax,%rcx,8), %rdx
movq 0x18(%rsp), %rcx
andq $0x3f, %rcx
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
shrq %cl, %rax
andq %rax, %rdx
xorl %eax, %eax
movl $0x1, %ecx
cmpq $0x0, %rdx
cmovnel %ecx, %eax
cmpl $0x0, %eax
je 0x4b78e3
movq 0x90(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x90(%rsp), %rcx
cmpq 0x18(%rcx), %rax
jne 0x4b7861
movq 0x90(%rsp), %rax
movq 0x30(%rax), %rax
movq 0x90(%rsp), %rcx
movq 0x50(%rcx), %rdi
callq *%rax
jmp 0x4b7863
movq 0x90(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x90(%rsp), %rcx
cmpq 0x18(%rcx), %rax
jb 0x4b78b5
movq 0x18471c(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x5e785(%rip), %rsi     # 0x516013
leaq 0xffe95(%rip), %rdx     # 0x5b772a
leaq 0xffe6b(%rip), %rcx     # 0x5b7707
leaq 0xffe47(%rip), %r8      # 0x5b76ea
movl $0x44, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x4b78b7
movq 0x8(%rsp), %rdx
movq 0x90(%rsp), %rax
movq 0x40(%rax), %rax
movq 0x90(%rsp), %rsi
movq 0x10(%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, 0x10(%rsi)
movq %rdx, (%rax,%rcx,8)
jmp 0x4b78e5
movq 0x70(%rsp), %rax
movl 0x7c(%rsp), %ecx
addq %rcx, %rax
shrq $0x5, %rax
movq %rax, 0x38(%rsp)
movq 0x80(%rsp), %rax
movq 0x38(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x28(%rsp)
movq 0x70(%rsp), %rcx
movl 0x7c(%rsp), %eax
addq %rax, %rcx
andq $0x1f, %rcx
movl $0x1f, %eax
subq %rcx, %rax
shlq %rax
movl %eax, 0x40(%rsp)
movq $0x1, 0x30(%rsp)
movq 0x30(%rsp), %rax
cmpq 0x48(%rsp), %rax
ja 0x4b7e1d
movq 0x28(%rsp), %rax
movl 0x40(%rsp), %ecx
shrq %cl, %rax
andq $0x3, %rax
movq %rax, 0x20(%rsp)
movq 0x10(%rsp), %rax
shlq $0x2, %rax
orq 0x20(%rsp), %rax
andq 0x58(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x8(%rsp), %rax
shrq $0x2, %rax
movq 0x20(%rsp), %rdx
xorq $0x3, %rdx
movl 0x44(%rsp), %ecx
shlq %cl, %rdx
movq %rdx, %rcx
orq %rcx, %rax
movq %rax, 0x8(%rsp)
movq 0x30(%rsp), %rax
cmpq 0x50(%rsp), %rax
ja 0x4b7b71
movq 0x90(%rsp), %rax
testb $0x1, 0x58(%rax)
jne 0x4b7ab9
cmpq $0x0, 0x30(%rsp)
jbe 0x4b7b6f
movq 0x10(%rsp), %rax
movq 0x90(%rsp), %rcx
movq 0x20(%rcx), %rcx
movl 0xc(%rcx), %ecx
shrq %cl, %rax
movq 0x90(%rsp), %rcx
movq 0x20(%rcx), %rcx
andq 0x18(%rcx), %rax
movq %rax, 0x18(%rsp)
movq 0x90(%rsp), %rax
movq 0x20(%rax), %rax
movq 0x20(%rax), %rax
movq 0x18(%rsp), %rcx
shrq $0x6, %rcx
movq (%rax,%rcx,8), %rdx
movq 0x18(%rsp), %rcx
andq $0x3f, %rcx
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
shrq %cl, %rax
andq %rax, %rdx
xorl %eax, %eax
movl $0x1, %ecx
cmpq $0x0, %rdx
cmovnel %ecx, %eax
cmpl $0x0, %eax
je 0x4b7b6f
movq 0x10(%rsp), %rax
movq 0x90(%rsp), %rcx
movq 0x28(%rcx), %rcx
movl 0xc(%rcx), %ecx
shrq %cl, %rax
movq 0x90(%rsp), %rcx
movq 0x28(%rcx), %rcx
andq 0x18(%rcx), %rax
movq %rax, 0x18(%rsp)
movq 0x90(%rsp), %rax
movq 0x28(%rax), %rax
movq 0x20(%rax), %rax
movq 0x18(%rsp), %rcx
shrq $0x6, %rcx
movq (%rax,%rcx,8), %rdx
movq 0x18(%rsp), %rcx
andq $0x3f, %rcx
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
shrq %cl, %rax
andq %rax, %rdx
xorl %eax, %eax
movl $0x1, %ecx
cmpq $0x0, %rdx
cmovnel %ecx, %eax
cmpl $0x0, %eax
je 0x4b7b6f
movq 0x90(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x90(%rsp), %rcx
cmpq 0x18(%rcx), %rax
jne 0x4b7aed
movq 0x90(%rsp), %rax
movq 0x30(%rax), %rax
movq 0x90(%rsp), %rcx
movq 0x50(%rcx), %rdi
callq *%rax
jmp 0x4b7aef
movq 0x90(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x90(%rsp), %rcx
cmpq 0x18(%rcx), %rax
jb 0x4b7b41
movq 0x184490(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x5e4f9(%rip), %rsi     # 0x516013
leaq 0xffc09(%rip), %rdx     # 0x5b772a
leaq 0xffbdf(%rip), %rcx     # 0x5b7707
leaq 0xffbbb(%rip), %r8      # 0x5b76ea
movl $0x52, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x4b7b43
movq 0x10(%rsp), %rdx
movq 0x90(%rsp), %rax
movq 0x40(%rax), %rax
movq 0x90(%rsp), %rsi
movq 0x10(%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, 0x10(%rsi)
movq %rdx, (%rax,%rcx,8)
jmp 0x4b7b71
movq 0x48(%rsp), %rax
subq 0x30(%rsp), %rax
cmpq 0x50(%rsp), %rax
ja 0x4b7d56
movq 0x90(%rsp), %rax
testb $0x1, 0x58(%rax)
jne 0x4b7c9e
movq 0x48(%rsp), %rax
subq 0x30(%rsp), %rax
cmpq $0x0, %rax
jbe 0x4b7d54
movq 0x8(%rsp), %rax
movq 0x90(%rsp), %rcx
movq 0x20(%rcx), %rcx
movl 0xc(%rcx), %ecx
shrq %cl, %rax
movq 0x90(%rsp), %rcx
movq 0x20(%rcx), %rcx
andq 0x18(%rcx), %rax
movq %rax, 0x18(%rsp)
movq 0x90(%rsp), %rax
movq 0x20(%rax), %rax
movq 0x20(%rax), %rax
movq 0x18(%rsp), %rcx
shrq $0x6, %rcx
movq (%rax,%rcx,8), %rdx
movq 0x18(%rsp), %rcx
andq $0x3f, %rcx
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
shrq %cl, %rax
andq %rax, %rdx
xorl %eax, %eax
movl $0x1, %ecx
cmpq $0x0, %rdx
cmovnel %ecx, %eax
cmpl $0x0, %eax
je 0x4b7d54
movq 0x8(%rsp), %rax
movq 0x90(%rsp), %rcx
movq 0x28(%rcx), %rcx
movl 0xc(%rcx), %ecx
shrq %cl, %rax
movq 0x90(%rsp), %rcx
movq 0x28(%rcx), %rcx
andq 0x18(%rcx), %rax
movq %rax, 0x18(%rsp)
movq 0x90(%rsp), %rax
movq 0x28(%rax), %rax
movq 0x20(%rax), %rax
movq 0x18(%rsp), %rcx
shrq $0x6, %rcx
movq (%rax,%rcx,8), %rdx
movq 0x18(%rsp), %rcx
andq $0x3f, %rcx
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
shrq %cl, %rax
andq %rax, %rdx
xorl %eax, %eax
movl $0x1, %ecx
cmpq $0x0, %rdx
cmovnel %ecx, %eax
cmpl $0x0, %eax
je 0x4b7d54
movq 0x90(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x90(%rsp), %rcx
cmpq 0x18(%rcx), %rax
jne 0x4b7cd2
movq 0x90(%rsp), %rax
movq 0x30(%rax), %rax
movq 0x90(%rsp), %rcx
movq 0x50(%rcx), %rdi
callq *%rax
jmp 0x4b7cd4
movq 0x90(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x90(%rsp), %rcx
cmpq 0x18(%rcx), %rax
jb 0x4b7d26
movq 0x1842ab(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x5e314(%rip), %rsi     # 0x516013
leaq 0xffa24(%rip), %rdx     # 0x5b772a
leaq 0xff9fa(%rip), %rcx     # 0x5b7707
leaq 0xff9d6(%rip), %r8      # 0x5b76ea
movl $0x56, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x4b7d28
movq 0x8(%rsp), %rdx
movq 0x90(%rsp), %rax
movq 0x40(%rax), %rax
movq 0x90(%rsp), %rsi
movq 0x10(%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, 0x10(%rsi)
movq %rdx, (%rax,%rcx,8)
jmp 0x4b7d56
cmpl $0x0, 0x40(%rsp)
jbe 0x4b7d6d
movl 0x40(%rsp), %eax
subl $0x2, %eax
movl %eax, 0x40(%rsp)
jmp 0x4b7e08
jmp 0x4b7d6f
movq 0x38(%rsp), %rax
movq 0x60(%rsp), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jb 0x4b7dc6
movq 0x30(%rsp), %rax
cmpq 0x48(%rsp), %rax
je 0x4b7dc6
movq 0x18420b(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x5e274(%rip), %rsi     # 0x516013
leaq 0xff9a7(%rip), %rdx     # 0x5b774d
leaq 0xff95a(%rip), %rcx     # 0x5b7707
leaq 0xff936(%rip), %r8      # 0x5b76ea
movl $0x5d, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x4b7dc8
movq 0x38(%rsp), %rax
movq 0x60(%rsp), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jae 0x4b7e06
movq 0x80(%rsp), %rax
movq 0x38(%rsp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, 0x38(%rsp)
movq 0x8(%rax,%rcx,8), %rax
movq %rax, 0x28(%rsp)
movl $0x3e, 0x40(%rsp)
jmp 0x4b7e08
jmp 0x4b7e0a
movq 0x30(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x30(%rsp)
jmp 0x4b7938
addq $0x88, %rsp
retq
nopw %cs:(%rax,%rax)