// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/match/sfx-suffixer.c
// Function: getencseqkmers_rangetwobitencoding
static
void getencseqkmers_rangetwobitencoding(const GtEncseq *encseq,
                                        GtReadmode readmode,
                                        unsigned int kmersize,
                                        unsigned int upperkmersize,
                                        bool onlyfirst,
                                        void(*processkmercode)(void *,
                                                               bool,
                                                               GtUword,
                                                               GtCodetype),
                                        void *processkmercodeinfo,
                                        void(*processkmerspecial)(void *,
                                                                  unsigned int,
                                                                  unsigned int,
                                                                  GtUword),
                                        void *processkmerspecialinfo,
                                        GtUword startpos,
                                        GtUword endpos)
{
  GtCodetype lastcode, newcode, realtotallength;
  const GtTwobitencoding *twobitencoding
          = gt_encseq_twobitencoding_export(encseq);
  const GtCodetype maskright = GT_MASKRIGHT(kmersize);
  bool mirrored = gt_encseq_is_mirrored(encseq);
  const GtUword totallength = gt_encseq_total_length(encseq);
  realtotallength = totallength;
  if (mirrored) {
    gt_assert((totallength & 1) == 1UL);
    realtotallength = ((totallength - 1) / 2);
  }

  if (mirrored && startpos >= realtotallength) {
    gt_readmode_invert(readmode);
    startpos = GT_REVERSEPOS(realtotallength, startpos - realtotallength - 2);
    if (endpos == totallength)
      endpos = 0;
    else
      endpos = GT_REVERSEPOS(realtotallength, endpos - realtotallength - 2);
    if (startpos > endpos) {
      GtUword tmp = startpos;
      startpos = endpos;
      endpos = tmp;
    }
    gt_assert(startpos <= endpos);
    gt_assert(endpos <= realtotallength);
  }
  if (endpos - startpos >= (GtUword) upperkmersize)
  {
    gt_assert(endpos > 0);
    lastcode = getencseqkmers_nospecialtwobitencoding(twobitencoding,
                                                      totallength,
                                                      maskright,
                                                      readmode,
                                                      kmersize,
                                                      upperkmersize,
                                                      processkmercode,
                                                      processkmercodeinfo,
                                                      onlyfirst,
                                                      startpos,
                                                      endpos);
    if (processkmerspecial != NULL)
    {
      if (GT_ISDIRCOMPLEMENT(readmode))
      {
        lastcode = gt_kmercode_complement(lastcode,maskright);
      }
      newcode = ((lastcode << 2) | 3UL) & maskright;
      processkmerspecial(processkmerspecialinfo,
                         kmersize-1,
                         (unsigned int) newcode,
                         GT_ISDIRREVERSE(readmode) ? (totallength - startpos)
                                                   : endpos);
    }
  } else
  {
    if (processkmerspecial != NULL && startpos < endpos)
    {
      unsigned int fillpos;

      gt_assert((GtUword) kmersize > endpos - startpos);
      fillpos = (unsigned int) (kmersize - (endpos - startpos));
      lastcode = gt_kmercode_at_position(twobitencoding,startpos,
                                         (unsigned int) (endpos - startpos));
      if (GT_ISDIRREVERSE(readmode) && (unsigned int) (endpos - startpos) > 1U)
      {
        lastcode = gt_kmercode_reverse(lastcode,
                                       (unsigned int) (endpos-startpos));
      }
      if (GT_ISDIRCOMPLEMENT(readmode))
      {
        lastcode = gt_kmercode_complement(lastcode,maskright);
      }
      newcode
        = ((lastcode << GT_MULT2(fillpos)) | ((1UL << GT_MULT2(fillpos)) - 1))
           & maskright;
      processkmerspecial(processkmerspecialinfo,
                         (unsigned int) (endpos - startpos),
                         (unsigned int) newcode,
                         GT_ISDIRREVERSE(readmode) ? (totallength - startpos)
                                                   : endpos);
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %r9, (%rsp)
movl %r8d, 0x1c(%rsp)
movq %rcx, 0x38(%rsp)
movl %edx, %ebx
movl %esi, %r13d
movq %rdi, %r15
movq 0xd0(%rsp), %r12
movq 0xc8(%rsp), %r14
movq 0xc0(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0xb8(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0xb0(%rsp), %rax
movq %rax, 0x48(%rsp)
callq 0xf1c71
movq %rax, 0x8(%rsp)
leal (%rbx,%rbx), %ecx
negb %cl
movq $-0x1, %rax
shrq %cl, %rax
movq %rax, 0x20(%rsp)
movq %r15, %rdi
callq 0xfac80
movl %eax, %ebp
movq %r15, %rdi
callq 0xec1d8
testb %bpl, %bpl
je 0x200649
testb $0x1, %al
je 0x200b8d
leaq -0x1(%rax), %rsi
shrq %rsi
jmp 0x20064c
movq %rax, %rsi
movq (%rsp), %rdi
movq %rsi, %rcx
subq %r14, %rcx
setbe %dl
andb %dl, %bpl
cmpb $0x1, %bpl
movq %rax, 0x30(%rsp)
jne 0x2006a5
addq %rsi, %rcx
incq %rcx
movq %rsi, %rdx
subq %r12, %rdx
xorl %r14d, %r14d
cmpq %r12, %rax
leaq 0x1(%rdx,%rsi), %rdx
cmovneq %rdx, %r14
cmpq %r14, %rcx
movq %r14, %r12
cmovaq %rcx, %r12
cmovbq %rcx, %r14
cmpq %rsi, %r12
ja 0x200b92
movl $0x3, %eax
subl %r13d, %eax
movl %eax, %ebp
jmp 0x2006a8
movl %r13d, %ebp
movq %r12, %r15
movq %r14, 0x10(%rsp)
subq %r14, %r15
movl 0x38(%rsp), %r14d
cmpq %r14, %r15
jae 0x20071c
cmpq $0x0, 0x40(%rsp)
movq 0x10(%rsp), %rdi
je 0x200b79
cmpq %rdi, %r12
jbe 0x200b79
movl %ebx, %eax
cmpq %rax, %r15
jae 0x200bab
movl %edi, %ecx
andl $0x1f, %ecx
shrq $0x5, %rdi
movl $0x20, %eax
subl %r15d, %eax
movl %eax, %esi
subl %ecx, %esi
jae 0x20092b
addl %r15d, %ecx
addl %ecx, %ecx
addb $-0x40, %cl
movq 0x8(%rsp), %rsi
movq (%rsi,%rdi,8), %rdx
movq 0x8(%rsi,%rdi,8), %rsi
shldq %cl, %rsi, %rdx
jmp 0x20093b
testq %r12, %r12
je 0x200b97
cmpl $0x1, %ebx
jbe 0x200b9c
movl %ebx, %r13d
movl %ebp, %eax
orl $0x2, %eax
cmpl $0x3, %eax
movq %r12, 0x50(%rsp)
movq %rbx, 0x60(%rsp)
movl %ebp, 0x18(%rsp)
jne 0x2007a3
cmpq %r14, %r12
jb 0x200ba6
movq %r12, %r15
subq %r13, %r15
leaq -0x1(%r15), %rax
shrq $0x5, %rax
xorl %r12d, %r12d
movq %r15, %rbp
subq $0x1, %rbp
cmovaeq %rax, %r12
movl %r15d, %ecx
andl $0x1f, %ecx
movq %r15, %rsi
shrq $0x5, %rsi
movl $0x20, %eax
subl %ebx, %eax
movl %eax, %edx
subl %ecx, %edx
jae 0x2007e0
addl %ebx, %ecx
addl %ecx, %ecx
addb $-0x40, %cl
movq 0x8(%rsp), %rdx
movq (%rdx,%rsi,8), %rdi
movq 0x8(%rdx,%rsi,8), %rdx
shldq %cl, %rdx, %rdi
jmp 0x2007f0
movq 0x10(%rsp), %rsi
movl %esi, %ecx
andl $0x1f, %ecx
shrq $0x5, %rsi
movl $0x20, %eax
subl %ebx, %eax
movl %eax, %edx
subl %ecx, %edx
jae 0x2009ba
addl %ebx, %ecx
addl %ecx, %ecx
addb $-0x40, %cl
movq 0x8(%rsp), %rdx
movq (%rdx,%rsi,8), %r8
movq 0x8(%rdx,%rsi,8), %rdx
shldq %cl, %rdx, %r8
jmp 0x2009ca
movq 0x8(%rsp), %rcx
movq (%rcx,%rsi,8), %rdi
addl %edx, %edx
movl %edx, %ecx
shrq %cl, %rdi
addl %eax, %eax
movl %eax, %ecx
shlq %cl, %rdi
shrq %cl, %rdi
movl %ebx, %esi
callq 0x202dba
movq %rax, %rbx
movq (%rsp), %rdx
testq %rdx, %rdx
je 0x200839
movq 0x30(%rsp), %rdx
subq %r13, %rdx
subq %r15, %rdx
xorl %ecx, %ecx
cmpl $0x2, 0x18(%rsp)
cmovaeq 0x20(%rsp), %rcx
xorq %rbx, %rcx
movq 0x48(%rsp), %rdi
movl $0x1, %esi
callq *(%rsp)
movq (%rsp), %rdx
movq %rbx, 0x28(%rsp)
cmpb $0x0, 0x1c(%rsp)
jne 0x200afc
movq 0x38(%rsp), %rsi
subl 0x60(%rsp), %esi
movq 0x10(%rsp), %rax
addq %rsi, %rax
movq 0x28(%rsp), %rbx
movq %rax, 0x38(%rsp)
cmpq %rax, %r15
jbe 0x200afc
movq %rsi, %rcx
notl %ebp
addl %ebp, %ebp
andl $0x3e, %ebp
xorl %esi, %esi
cmpl $0x3, 0x18(%rsp)
movq 0x8(%rsp), %rax
movq (%rax,%r12,8), %r14
cmoveq 0x20(%rsp), %rsi
movq %rsi, 0x58(%rsp)
movq 0x10(%rsp), %rax
addq %rcx, %rax
incq %rax
movq %rax, 0x70(%rsp)
movq 0x30(%rsp), %r13
subq 0x50(%rsp), %r13
incq %r13
movq 0x28(%rsp), %rbx
movq %r14, %rax
movl %ebp, %ecx
shrq %cl, %rax
andl $0x3, %eax
leaq (%rax,%rbx,4), %rbx
andq 0x20(%rsp), %rbx
testq %rdx, %rdx
je 0x2008e6
movq %rbx, %rcx
xorq 0x58(%rsp), %rcx
movq 0x48(%rsp), %rdi
xorl %esi, %esi
movq %r13, %rdx
callq *(%rsp)
movq (%rsp), %rdx
cmpl $0x3d, %ebp
ja 0x2008f0
addl $0x2, %ebp
jmp 0x200919
cmpq %r15, 0x70(%rsp)
je 0x200900
testq %r12, %r12
je 0x200b88
xorl %ebp, %ebp
testq %r12, %r12
je 0x200916
movq 0x8(%rsp), %rax
movq -0x8(%rax,%r12,8), %r14
decq %r12
jmp 0x200919
xorl %r12d, %r12d
decq %r15
incq %r13
cmpq 0x38(%rsp), %r15
ja 0x2008b4
jmp 0x200afc
movq 0x8(%rsp), %rcx
movq (%rcx,%rdi,8), %rdx
addl %esi, %esi
movl %esi, %ecx
shrq %cl, %rdx
addl %eax, %eax
movl %eax, %ecx
shlq %cl, %rdx
shrq %cl, %rdx
subl %r15d, %ebx
movq %rbx, %r14
movl %ebp, %ebx
andl $-0x3, %ebx
cmpl $0x1, %ebx
setne %al
cmpq $0x2, %r15
setb %cl
orb %al, %cl
jne 0x20096f
movq %rdx, %rdi
movl %r15d, %esi
callq 0x202dba
movq %rax, %rdx
andl $-0x2, %ebp
xorl %eax, %eax
cmpl $0x2, %ebp
movq 0x20(%rsp), %rsi
cmovel %esi, %eax
xorl %eax, %edx
movq %r14, %rcx
addl %ecx, %ecx
shlq %cl, %rdx
movq $-0x1, %rax
shlq %cl, %rax
notl %eax
orl %eax, %edx
andl %esi, %edx
movq 0x30(%rsp), %rax
subq 0x10(%rsp), %rax
cmpl $0x1, %ebx
cmoveq %rax, %r12
movq 0x68(%rsp), %rdi
movl %r15d, %esi
movq %r12, %rcx
jmp 0x200b64
movq 0x8(%rsp), %rcx
movq (%rcx,%rsi,8), %r8
addl %edx, %edx
movl %edx, %ecx
shrq %cl, %r8
addl %eax, %eax
movl %eax, %ecx
shlq %cl, %r8
shrq %cl, %r8
testq %rdi, %rdi
movq %r8, %rbx
je 0x200a00
xorl %ecx, %ecx
cmpl $0x2, %ebp
cmoveq 0x20(%rsp), %rcx
xorq %rbx, %rcx
movq 0x48(%rsp), %rdi
movl $0x1, %esi
movq 0x10(%rsp), %rdx
callq *(%rsp)
movq (%rsp), %rdi
movq %rbx, 0x28(%rsp)
cmpb $0x0, 0x1c(%rsp)
jne 0x200afc
movq 0x50(%rsp), %r12
subq %r14, %r12
movq 0x28(%rsp), %rbx
cmpq 0x10(%rsp), %r12
jbe 0x200afc
movq 0x30(%rsp), %rax
leaq -0x1(%rax), %rcx
movq 0x10(%rsp), %rax
addq %rax, %r13
shrq $0x5, %rcx
movq %rcx, 0x58(%rsp)
movq %r13, %rbp
shrq $0x5, %rbp
notl %r13d
addl %r13d, %r13d
andl $0x3e, %r13d
movq 0x8(%rsp), %rcx
movq (%rcx,%rbp,8), %r14
xorl %ecx, %ecx
cmpl $0x2, 0x18(%rsp)
cmoveq 0x20(%rsp), %rcx
movq %rcx, 0x38(%rsp)
leaq 0x1(%rax), %r15
movq 0x28(%rsp), %rbx
movq %r14, %rax
movl %r13d, %ecx
shrq %cl, %rax
andl $0x3, %eax
leaq (%rax,%rbx,4), %rbx
andq 0x20(%rsp), %rbx
testq %rdi, %rdi
je 0x200aaa
movq %rbx, %rcx
xorq 0x38(%rsp), %rcx
movq 0x48(%rsp), %rdi
xorl %esi, %esi
movq %r15, %rdx
callq *(%rsp)
movq (%rsp), %rdi
testl %r13d, %r13d
je 0x200ab5
addl $-0x2, %r13d
jmp 0x200aec
cmpq $0x20, 0x30(%rsp)
setae %cl
cmpq %rbp, 0x58(%rsp)
seta %al
andb %cl, %al
cmpq %r15, %r12
je 0x200ad5
testb %al, %al
je 0x200ba1
movl $0x3e, %r13d
testb %al, %al
je 0x200aec
movq 0x8(%rsp), %rax
movq 0x8(%rax,%rbp,8), %r14
incq %rbp
leaq 0x1(%r15), %rax
cmpq %r12, %r15
movq %rax, %r15
jb 0x200a77
cmpb $0x0, 0x1c(%rsp)
jne 0x200b08
movq %rbx, 0x28(%rsp)
cmpq $0x0, 0x40(%rsp)
movq 0x50(%rsp), %rcx
movq 0x68(%rsp), %rdi
movq 0x60(%rsp), %rsi
movq 0x10(%rsp), %r8
movl 0x18(%rsp), %r9d
je 0x200b79
movl %r9d, %eax
andl $-0x2, %eax
xorl %edx, %edx
cmpl $0x2, %eax
movq 0x20(%rsp), %rax
cmovel %eax, %edx
movq 0x28(%rsp), %r10
xorl %edx, %r10d
leal 0x3(,%r10,4), %edx
andl %eax, %edx
decl %esi
andl $-0x3, %r9d
movq 0x30(%rsp), %rax
subq %r8, %rax
cmpl $0x1, %r9d
cmoveq %rax, %rcx
movq 0x40(%rsp), %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x7dee4
callq 0x7e03a
callq 0x7e001
callq 0x7df8f
callq 0x7deab
callq 0x7df56
callq 0x7df1d
callq 0x7dfc8