// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/core/encseq.c
// Function: gt_dabc_specialrangeiterator_next
static bool gt_dabc_specialrangeiterator_next(bool directaccess,
                                              GtRange *range,
                                              GtSpecialrangeiterator *sri)
{
  bool success = false;
  GtUchar cc;

  if (sri->exhausted)
    return false;
  while (!success) {
    if (directaccess)
      cc = sri->esr->encseq->plainseq[sri->jumppos];
    else
      cc = delivercharViabytecompress(sri->esr->encseq, sri->jumppos);
    if (GT_ISSPECIAL(cc))
      sri->lengthofspecialrange++;
    else {
      if (sri->lengthofspecialrange > 0) {
        if (sri->moveforward) {
          range->start = sri->jumppos - sri->lengthofspecialrange;
          range->end = sri->jumppos;
        }
        else {
          range->start = sri->jumppos+1;
          range->end = sri->jumppos+1+sri->lengthofspecialrange;
        }
        success = true;
        sri->lengthofspecialrange = 0;
      }
    }
    if (sri->moveforward) {
      if (sri->jumppos == sri->esr->encseq->totallength - 1) {
        if (sri->lengthofspecialrange > 0) {
          range->start = sri->esr->encseq->totallength -
                         sri->lengthofspecialrange;
          range->end = sri->esr->encseq->totallength;
          success = true;
        }
        sri->exhausted = true;
        break;
      }
      sri->jumppos++;
    }
    else {
      if (sri->jumppos == 0) {
        if (sri->lengthofspecialrange > 0) {
          range->start = 0;
          range->end = sri->lengthofspecialrange;
          success = true;
        }
        sri->exhausted = true;
        break;
      }
      sri->jumppos--;
    }
  }
  return success;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
cmpb $0x0, 0x61(%rdx)
je 0xce311
xorl %ebp, %ebp
jmp 0xce401
movq %rdx, %rbx
movq %rsi, %r14
movl %edi, %r15d
xorl %ebp, %ebp
testb %r15b, %r15b
je 0xce338
movq 0x68(%rbx), %rax
movq 0x78(%rbx), %rcx
movq (%rax), %rax
movq 0x290(%rax), %rax
movb (%rax,%rcx), %al
jmp 0xce348
movq 0x68(%rbx), %rax
movq 0x78(%rbx), %rsi
movq (%rax), %rdi
callq 0xbf1a7
cmpb $-0x2, %al
jb 0xce352
incq 0x70(%rbx)
jmp 0xce394
movq 0x70(%rbx), %rax
testq %rax, %rax
je 0xce394
cmpb $0x1, 0x60(%rbx)
jne 0xce374
movq 0x78(%rbx), %rcx
movq %rcx, %rdx
subq %rax, %rdx
movq %rdx, (%r14)
movq %rcx, 0x8(%r14)
jmp 0xce389
movq 0x78(%rbx), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, (%r14)
addq %rcx, %rax
incq %rax
movq %rax, 0x8(%r14)
movq $0x0, 0x70(%rbx)
movb $0x1, %bpl
cmpb $0x1, 0x60(%rbx)
jne 0xce3bb
movq 0x68(%rbx), %rax
movq 0x78(%rbx), %rcx
movq (%rax), %rax
movq 0x30(%rax), %rax
leaq -0x1(%rax), %rdx
cmpq %rdx, %rcx
je 0xce3e4
incq %rcx
movq %rcx, 0x78(%rbx)
jmp 0xce3cb
movq 0x78(%rbx), %rax
testq %rax, %rax
je 0xce3d7
decq %rax
movq %rax, 0x78(%rbx)
testb $0x1, %bpl
je 0xce31c
jmp 0xce401
movq 0x70(%rbx), %rax
testq %rax, %rax
je 0xce3fd
xorl %ecx, %ecx
jmp 0xce3f3
movq 0x70(%rbx), %rdx
testq %rdx, %rdx
je 0xce3fd
movq %rax, %rcx
subq %rdx, %rcx
movq %rcx, (%r14)
movq %rax, 0x8(%r14)
movb $0x1, %bpl
movb $0x1, 0x61(%rbx)
andb $0x1, %bpl
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq