// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/sfx-suffixer.c
// Function: gt_getencseqkmers_twobitencoding_slice
void gt_getencseqkmers_twobitencoding_slice(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 slice_startpos,
                                         GtUword slice_endpos)
{
  GtUword laststart = slice_startpos,
          lastend = slice_endpos;
  gt_assert(laststart <= lastend);

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

    if (GT_ISDIRREVERSE(readmode))
    {
      sri = gt_specialrangeiterator_new(encseq,false);
      while (gt_specialrangeiterator_next(sri,&range))
      {
        if (range.end <= lastend) {
          getencseqkmers_rangetwobitencoding(encseq,
                                             readmode,
                                             kmersize,
                                             upperkmersize,
                                             onlyfirst,
                                             processkmercode,
                                             processkmercodeinfo,
                                             processkmerspecial,
                                             processkmerspecialinfo,
                                             range.end,
                                             lastend);
          lastend = range.start;
        }
        if (laststart > range.start) {
          break;
        }
      }
    } else
    {
      sri = gt_specialrangeiterator_new(encseq,true);
      while (gt_specialrangeiterator_next(sri,&range))
      {
        if (range.start >= laststart) {
          getencseqkmers_rangetwobitencoding(encseq,
                                             readmode,
                                             kmersize,
                                             upperkmersize,
                                             onlyfirst,
                                             processkmercode,
                                             processkmercodeinfo,
                                             processkmerspecial,
                                             processkmerspecialinfo,
                                             laststart,
                                             range.start);
          laststart = range.end;
        }
        if (lastend < range.end) {
          break;
        }
      }
    }
    gt_assert(gt_encseq_total_length(encseq) >= laststart);
    gt_specialrangeiterator_delete(sri);
  }

  if (laststart <= slice_endpos && slice_startpos <= lastend) {
    GtUword startpos = GT_ISDIRREVERSE(readmode) ? slice_startpos : laststart;
    GtUword endpos = GT_ISDIRREVERSE(readmode) ? lastend : slice_endpos;

    getencseqkmers_rangetwobitencoding(encseq,
                                       readmode,
                                       kmersize,
                                       upperkmersize,
                                       onlyfirst,
                                       processkmercode,
                                       processkmercodeinfo,
                                       processkmerspecial,
                                       processkmerspecialinfo,
                                       startpos,
                                       endpos);
  }
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x98, %rsp
movb %r8b, %al
movq 0xd0(%rsp), %r8
movq 0xc8(%rsp), %r8
movq 0xc0(%rsp), %r8
movq 0xb8(%rsp), %r8
movq 0xb0(%rsp), %r8
movq %rdi, 0x90(%rsp)
movl %esi, 0x8c(%rsp)
movl %edx, 0x88(%rsp)
movl %ecx, 0x84(%rsp)
andb $0x1, %al
movb %al, 0x83(%rsp)
movq %r9, 0x78(%rsp)
movq 0xc8(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0xd0(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x70(%rsp), %rax
cmpq 0x68(%rsp), %rax
jbe 0x2ddfbe
movq 0x35e013(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x23807c(%rip), %rsi    # 0x516013
leaq 0x2af2af(%rip), %rdx    # 0x58d24d
leaq 0x2af2bd(%rip), %rcx    # 0x58d262
leaq 0x2af288(%rip), %r8     # 0x58d234
movl $0x3c5, %r9d            # imm = 0x3C5
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2ddfc0
movq 0x90(%rsp), %rdi
callq 0xaf360
testb $0x1, %al
jne 0x2ddfd6
jmp 0x2de1de
cmpl $0x1, 0x8c(%rsp)
je 0x2ddfee
cmpl $0x3, 0x8c(%rsp)
jne 0x2de0b9
movq 0x90(%rsp), %rdi
xorl %esi, %esi
callq 0xaf650
movq %rax, 0x60(%rsp)
movq 0x60(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0xaf770
testb $0x1, %al
jne 0x2de01a
jmp 0x2de0b4
movq 0x58(%rsp), %rax
cmpq 0x68(%rsp), %rax
ja 0x2de0a1
movq 0x90(%rsp), %rdi
movl 0x8c(%rsp), %esi
movl 0x88(%rsp), %edx
movl 0x84(%rsp), %ecx
movb 0x83(%rsp), %r8b
movq 0x78(%rsp), %r9
movq 0xb0(%rsp), %r14
movq 0xb8(%rsp), %rbx
movq 0xc0(%rsp), %r11
movq 0x58(%rsp), %r10
movq 0x68(%rsp), %rax
andb $0x1, %r8b
movzbl %r8b, %r8d
movq %r14, (%rsp)
movq %rbx, 0x8(%rsp)
movq %r11, 0x10(%rsp)
movq %r10, 0x18(%rsp)
movq %rax, 0x20(%rsp)
callq 0x2de2f0
movq 0x50(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x70(%rsp), %rax
cmpq 0x50(%rsp), %rax
jbe 0x2de0af
jmp 0x2de0b4
jmp 0x2de002
jmp 0x2de184
movq 0x90(%rsp), %rdi
movl $0x1, %esi
callq 0xaf650
movq %rax, 0x60(%rsp)
movq 0x60(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0xaf770
testb $0x1, %al
jne 0x2de0e8
jmp 0x2de182
movq 0x50(%rsp), %rax
cmpq 0x70(%rsp), %rax
jb 0x2de16f
movq 0x90(%rsp), %rdi
movl 0x8c(%rsp), %esi
movl 0x88(%rsp), %edx
movl 0x84(%rsp), %ecx
movb 0x83(%rsp), %r8b
movq 0x78(%rsp), %r9
movq 0xb0(%rsp), %r14
movq 0xb8(%rsp), %rbx
movq 0xc0(%rsp), %r11
movq 0x70(%rsp), %r10
movq 0x50(%rsp), %rax
andb $0x1, %r8b
movzbl %r8b, %r8d
movq %r14, (%rsp)
movq %rbx, 0x8(%rsp)
movq %r11, 0x10(%rsp)
movq %r10, 0x18(%rsp)
movq %rax, 0x20(%rsp)
callq 0x2de2f0
movq 0x58(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0x68(%rsp), %rax
cmpq 0x58(%rsp), %rax
jae 0x2de17d
jmp 0x2de182
jmp 0x2de0d0
jmp 0x2de184
jmp 0x2de186
movq 0x90(%rsp), %rdi
callq 0xa9d00
cmpq 0x70(%rsp), %rax
jae 0x2de1d2
movq 0x35ddff(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x237e68(%rip), %rsi    # 0x516013
leaq 0x2af0d7(%rip), %rdx    # 0x58d289
leaq 0x2af0a9(%rip), %rcx    # 0x58d262
leaq 0x2af074(%rip), %r8     # 0x58d234
movl $0x3fb, %r9d            # imm = 0x3FB
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2de1d4
movq 0x60(%rsp), %rdi
callq 0xafc80
movq 0x70(%rsp), %rax
cmpq 0xd0(%rsp), %rax
ja 0x2de2e3
movq 0xc8(%rsp), %rax
cmpq 0x68(%rsp), %rax
ja 0x2de2e3
cmpl $0x1, 0x8c(%rsp)
je 0x2de218
cmpl $0x3, 0x8c(%rsp)
jne 0x2de227
movq 0xc8(%rsp), %rax
movq %rax, 0x38(%rsp)
jmp 0x2de231
movq 0x70(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x48(%rsp)
cmpl $0x1, 0x8c(%rsp)
je 0x2de24f
cmpl $0x3, 0x8c(%rsp)
jne 0x2de25b
movq 0x68(%rsp), %rax
movq %rax, 0x30(%rsp)
jmp 0x2de268
movq 0xd0(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x90(%rsp), %rdi
movl 0x8c(%rsp), %esi
movl 0x88(%rsp), %edx
movl 0x84(%rsp), %ecx
movb 0x83(%rsp), %r8b
movq 0x78(%rsp), %r9
movq 0xb0(%rsp), %r14
movq 0xb8(%rsp), %rbx
movq 0xc0(%rsp), %r11
movq 0x48(%rsp), %r10
movq 0x40(%rsp), %rax
andb $0x1, %r8b
movzbl %r8b, %r8d
movq %r14, (%rsp)
movq %rbx, 0x8(%rsp)
movq %r11, 0x10(%rsp)
movq %r10, 0x18(%rsp)
movq %rax, 0x20(%rsp)
callq 0x2de2f0
addq $0x98, %rsp
popq %rbx
popq %r14
retq
nop