// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/core/encseq.c
// Function: gt_specialrangeiterator_next
bool gt_specialrangeiterator_next(GtSpecialrangeiterator *sri, GtRange *range)
{
  bool retval;

  /* handle special case where only one sequence is mirrored w/o wildcards  */
  if (sri->esr->encseq->hasmirror
        && !sri->esr->encseq->has_specialranges
        && sri->esr->encseq->numofdbsequences == 1UL
        && !sri->middle_separator_emitted) {
    range->start = sri->esr->encseq->totallength;
    range->end = range->start + 1;
    sri->middle_separator_emitted = true;
    return true;
  }

  if (!sri->esr->encseq->has_specialranges)
    return false;
  if (sri->queued.defined) {
    *range = sri->queued.rng;
    sri->queued.defined = false;
    if ((sri->reflected && sri->originalmoveforward)
         || (!sri->reflected && !sri->originalmoveforward)) {
      gt_specialrangeiterator_invert_range(sri->esr->encseq,
                                           range);
    }
    return true;
  }
  retval = gt_specialrangeiterator_deliver_range(sri, range);

  if (sri->esr->encseq->hasmirror) {
    if (!sri->reflected) {
      if (retval && range->end == sri->esr->encseq->totallength) {
        /* the last range was at end of sequence -> in the mirrored version we
           will have a separator plus the wildcard complement */
        range->end += gt_range_length(range);
        sri->skipnext = true;
        return true;
      }

      if (!retval) {
        /* turn around */
        sri->moveforward = !sri->moveforward;
        gt_specialrangeiterator_reinit_with_startpos(sri, sri->esr->encseq,
                                                 sri->moveforward,
                                                 sri->esr->encseq->totallength);
        if (sri->skipnext) {
          retval = gt_specialrangeiterator_deliver_range(sri, range);
          gt_assert(retval);
        }
        retval = gt_specialrangeiterator_deliver_range(sri, range);

        if (!sri->skipnext) {
          sri->queued.defined = true;
          /* the virtual separator is isolated */
          sri->queued.rng = *range;
          range->start = sri->esr->encseq->totallength;
          range->end = range->start + 1;
          sri->skipnext = false;
          retval = true;
        }
        sri->reflected = true;
      }
    }
    if (retval && ((sri->reflected && sri->originalmoveforward)
         || (!sri->reflected && !sri->originalmoveforward))) {
      gt_specialrangeiterator_invert_range(sri->esr->encseq,
                                           range);
    }
  }

  return retval;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x18(%rsp), %rax
movq 0x68(%rax), %rax
movq (%rax), %rax
testb $0x1, 0x3a8(%rax)
je 0x1199e3
movq 0x18(%rsp), %rax
movq 0x68(%rax), %rax
movq (%rax), %rax
testb $0x1, 0x28(%rax)
jne 0x1199e3
movq 0x18(%rsp), %rax
movq 0x68(%rax), %rax
movq (%rax), %rax
cmpq $0x1, 0x40(%rax)
jne 0x1199e3
movq 0x18(%rsp), %rax
testb $0x1, 0x65(%rax)
jne 0x1199e3
movq 0x18(%rsp), %rax
movq 0x68(%rax), %rax
movq (%rax), %rax
movq 0x30(%rax), %rcx
movq 0x10(%rsp), %rax
movq %rcx, (%rax)
movq 0x10(%rsp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x18(%rsp), %rax
movb $0x1, 0x65(%rax)
movb $0x1, 0x27(%rsp)
jmp 0x119c98
movq 0x18(%rsp), %rax
movq 0x68(%rax), %rax
movq (%rax), %rax
testb $0x1, 0x28(%rax)
jne 0x1199ff
movb $0x0, 0x27(%rsp)
jmp 0x119c98
movq 0x18(%rsp), %rax
testb $0x1, 0x58(%rax)
je 0x119a78
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
movq 0x48(%rcx), %rdx
movq %rdx, (%rax)
movq 0x50(%rcx), %rcx
movq %rcx, 0x8(%rax)
movq 0x18(%rsp), %rax
movb $0x0, 0x58(%rax)
movq 0x18(%rsp), %rax
testb $0x1, 0x62(%rax)
je 0x119a42
movq 0x18(%rsp), %rax
testb $0x1, 0x64(%rax)
jne 0x119a58
movq 0x18(%rsp), %rax
testb $0x1, 0x62(%rax)
jne 0x119a6e
movq 0x18(%rsp), %rax
testb $0x1, 0x64(%rax)
jne 0x119a6e
movq 0x18(%rsp), %rax
movq 0x68(%rax), %rax
movq (%rax), %rdi
movq 0x10(%rsp), %rsi
callq 0x119cb0
movb $0x1, 0x27(%rsp)
jmp 0x119c98
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x119da0
andb $0x1, %al
movb %al, 0xf(%rsp)
movq 0x18(%rsp), %rax
movq 0x68(%rax), %rax
movq (%rax), %rax
testb $0x1, 0x3a8(%rax)
je 0x119c8e
movq 0x18(%rsp), %rax
testb $0x1, 0x62(%rax)
jne 0x119c43
testb $0x1, 0xf(%rsp)
je 0x119b04
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x18(%rsp), %rcx
movq 0x68(%rcx), %rcx
movq (%rcx), %rcx
cmpq 0x30(%rcx), %rax
jne 0x119b04
movq 0x10(%rsp), %rdi
callq 0x93bd0
movq %rax, %rcx
movq 0x10(%rsp), %rax
addq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq 0x18(%rsp), %rax
movb $0x1, 0x63(%rax)
movb $0x1, 0x27(%rsp)
jmp 0x119c98
testb $0x1, 0xf(%rsp)
jne 0x119c41
movq 0x18(%rsp), %rax
movb 0x60(%rax), %cl
xorb $-0x1, %cl
movq 0x18(%rsp), %rax
andb $0x1, %cl
movb %cl, 0x60(%rax)
movq 0x18(%rsp), %rdi
movq 0x18(%rsp), %rax
movq 0x68(%rax), %rax
movq (%rax), %rsi
movq 0x18(%rsp), %rax
movb 0x60(%rax), %al
movq 0x18(%rsp), %rcx
movq 0x68(%rcx), %rcx
movq (%rcx), %rcx
movq 0x30(%rcx), %rcx
andb $0x1, %al
movzbl %al, %edx
callq 0x1195d0
movq 0x18(%rsp), %rax
testb $0x1, 0x63(%rax)
je 0x119bbb
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x119da0
andb $0x1, %al
movb %al, 0xf(%rsp)
testb $0x1, 0xf(%rsp)
jne 0x119bb7
movq 0x9a452(%rip), %rax     # 0x1b3fd8
movq (%rax), %rdi
leaq 0x444d6(%rip), %rsi     # 0x15e066
leaq 0x6c3fa(%rip), %rdx     # 0x185f91
leaq 0x6c3fa(%rip), %rcx     # 0x185f98
leaq 0x6bab9(%rip), %r8      # 0x18565e
movl $0xed0, %r9d            # imm = 0xED0
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x119bb9
jmp 0x119bbb
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x119da0
andb $0x1, %al
movb %al, 0xf(%rsp)
movq 0x18(%rsp), %rax
testb $0x1, 0x63(%rax)
jne 0x119c38
movq 0x18(%rsp), %rax
movb $0x1, 0x58(%rax)
movq 0x18(%rsp), %rax
movq 0x10(%rsp), %rcx
movq (%rcx), %rdx
movq %rdx, 0x48(%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x50(%rax)
movq 0x18(%rsp), %rax
movq 0x68(%rax), %rax
movq (%rax), %rax
movq 0x30(%rax), %rcx
movq 0x10(%rsp), %rax
movq %rcx, (%rax)
movq 0x10(%rsp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x18(%rsp), %rax
movb $0x0, 0x63(%rax)
movb $0x1, 0xf(%rsp)
movq 0x18(%rsp), %rax
movb $0x1, 0x62(%rax)
jmp 0x119c43
testb $0x1, 0xf(%rsp)
je 0x119c8c
movq 0x18(%rsp), %rax
testb $0x1, 0x62(%rax)
je 0x119c60
movq 0x18(%rsp), %rax
testb $0x1, 0x64(%rax)
jne 0x119c76
movq 0x18(%rsp), %rax
testb $0x1, 0x62(%rax)
jne 0x119c8c
movq 0x18(%rsp), %rax
testb $0x1, 0x64(%rax)
jne 0x119c8c
movq 0x18(%rsp), %rax
movq 0x68(%rax), %rax
movq (%rax), %rdi
movq 0x10(%rsp), %rsi
callq 0x119cb0
jmp 0x119c8e
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)