// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x28, %rsp
movb %dil, %al
andb $0x1, %al
movb %al, 0x26(%rsp)
movq %rsi, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
movb $0x0, 0xf(%rsp)
movq 0x10(%rsp), %rax
testb $0x1, 0x61(%rax)
je 0x12fff1
movb $0x0, 0x27(%rsp)
jmp 0x1301fb
jmp 0x12fff3
movb 0xf(%rsp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x130002
jmp 0x1301f1
testb $0x1, 0x26(%rsp)
je 0x13002e
movq 0x10(%rsp), %rax
movq 0x68(%rax), %rax
movq (%rax), %rax
movq 0x290(%rax), %rax
movq 0x10(%rsp), %rcx
movq 0x78(%rcx), %rcx
movb (%rax,%rcx), %al
movb %al, 0xe(%rsp)
jmp 0x13004c
movq 0x10(%rsp), %rax
movq 0x68(%rax), %rax
movq (%rax), %rdi
movq 0x10(%rsp), %rax
movq 0x78(%rax), %rsi
callq 0x1145e0
movb %al, 0xe(%rsp)
movzbl 0xe(%rsp), %eax
cmpl $0xfe, %eax
jl 0x13006e
movq 0x10(%rsp), %rax
movq 0x70(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x70(%rax)
jmp 0x1300fb
movq 0x10(%rsp), %rax
cmpq $0x0, 0x70(%rax)
jbe 0x1300f9
movq 0x10(%rsp), %rax
testb $0x1, 0x60(%rax)
je 0x1300b3
movq 0x10(%rsp), %rax
movq 0x78(%rax), %rcx
movq 0x10(%rsp), %rax
subq 0x70(%rax), %rcx
movq 0x18(%rsp), %rax
movq %rcx, (%rax)
movq 0x10(%rsp), %rax
movq 0x78(%rax), %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x8(%rax)
jmp 0x1300e7
movq 0x10(%rsp), %rax
movq 0x78(%rax), %rcx
addq $0x1, %rcx
movq 0x18(%rsp), %rax
movq %rcx, (%rax)
movq 0x10(%rsp), %rax
movq 0x78(%rax), %rcx
addq $0x1, %rcx
movq 0x10(%rsp), %rax
addq 0x70(%rax), %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x8(%rax)
movb $0x1, 0xf(%rsp)
movq 0x10(%rsp), %rax
movq $0x0, 0x70(%rax)
jmp 0x1300fb
movq 0x10(%rsp), %rax
testb $0x1, 0x60(%rax)
je 0x130195
movq 0x10(%rsp), %rax
movq 0x78(%rax), %rax
movq 0x10(%rsp), %rcx
movq 0x68(%rcx), %rcx
movq (%rcx), %rcx
movq 0x30(%rcx), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jne 0x130182
movq 0x10(%rsp), %rax
cmpq $0x0, 0x70(%rax)
jbe 0x130177
movq 0x10(%rsp), %rax
movq 0x68(%rax), %rax
movq (%rax), %rax
movq 0x30(%rax), %rcx
movq 0x10(%rsp), %rax
subq 0x70(%rax), %rcx
movq 0x18(%rsp), %rax
movq %rcx, (%rax)
movq 0x10(%rsp), %rax
movq 0x68(%rax), %rax
movq (%rax), %rax
movq 0x30(%rax), %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x8(%rax)
movb $0x1, 0xf(%rsp)
movq 0x10(%rsp), %rax
movb $0x1, 0x61(%rax)
jmp 0x1301f1
movq 0x10(%rsp), %rax
movq 0x78(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x78(%rax)
jmp 0x1301ec
movq 0x10(%rsp), %rax
cmpq $0x0, 0x78(%rax)
jne 0x1301db
movq 0x10(%rsp), %rax
cmpq $0x0, 0x70(%rax)
jbe 0x1301d0
movq 0x18(%rsp), %rax
movq $0x0, (%rax)
movq 0x10(%rsp), %rax
movq 0x70(%rax), %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x8(%rax)
movb $0x1, 0xf(%rsp)
movq 0x10(%rsp), %rax
movb $0x1, 0x61(%rax)
jmp 0x1301f1
movq 0x10(%rsp), %rax
movq 0x78(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x78(%rax)
jmp 0x12fff3
movb 0xf(%rsp), %al
andb $0x1, %al
movb %al, 0x27(%rsp)
movb 0x27(%rsp), %al
andb $0x1, %al
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)