// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/ft-eoplist.c
// Function: gt_eoplist_reader_next_cigar
bool gt_eoplist_reader_next_cigar(GtCigarOp *cigar_op,
                                  GtEoplistReader *eoplist_reader,
                                  bool distinguish_mismatch_match)
{
  if (eoplist_reader->currenteop == NULL ||
      eoplist_reader->currenteop == eoplist_reader->endeoplist)
  {
    return false;
  }
  gt_assert(eoplist_reader->difference == 1 ||
            eoplist_reader->difference == -1);
  cigar_op->eoptype = GtUndefinedOp;
  cigar_op->iteration = 0;
  while (true)
  {
    if (cigar_op->iteration > 0)
    {
      switch (*eoplist_reader->currenteop)
      {
        case FT_EOPCODE_DELETION:
          gt_assert(cigar_op->eoptype != GtUndefinedOp);
          if (cigar_op->eoptype == GtDeletionOp)
          {
            cigar_op->iteration++; /* Add another consecutive deletion */
            eoplist_reader->currenteop += eoplist_reader->difference;
            break;
          }
          return true;
        case FT_EOPCODE_INSERTION:
          gt_assert(cigar_op->eoptype != GtUndefinedOp);
          if (cigar_op->eoptype == GtInsertionOp)
          {
            cigar_op->iteration++; /* Add another consecutive insertion */
            eoplist_reader->currenteop += eoplist_reader->difference;
            break;
          }
          return true;
       case FT_EOPCODE_MISMATCH:
          gt_assert(cigar_op->eoptype != GtUndefinedOp);
          if (distinguish_mismatch_match)
          {
            if (cigar_op->eoptype == GtMismatchOp)
            {
              cigar_op->iteration++; /* Add another consecutive mismatch */
              eoplist_reader->currenteop += eoplist_reader->difference;
              break;
            }
            return true;
          }
          if (cigar_op->eoptype == GtMatchOp)
          {
            cigar_op->iteration++; /* Add another consecutive match */
            eoplist_reader->currenteop += eoplist_reader->difference;
            break;
          }
          return true;
       default:
          if (cigar_op->eoptype == GtMatchOp)
          {
            gt_assert(*eoplist_reader->currenteop < FT_EOPCODE_MAXMATCHES);
            cigar_op->iteration += (1UL + *eoplist_reader->currenteop);
            eoplist_reader->currenteop += eoplist_reader->difference;
          } else
          {
            return true;
          }
      }
    } else
    {
      switch (*eoplist_reader->currenteop)
      {
        case FT_EOPCODE_DELETION:
          cigar_op->eoptype = GtDeletionOp;
          cigar_op->iteration = 1UL;
          break;
        case FT_EOPCODE_INSERTION:
          cigar_op->eoptype = GtInsertionOp;
          cigar_op->iteration = 1UL;
          break;
        case FT_EOPCODE_MISMATCH:
          cigar_op->eoptype
            = distinguish_mismatch_match ? GtMismatchOp : GtMatchOp;
          cigar_op->iteration = 1UL;
          break;
        default:
          cigar_op->eoptype = GtMatchOp;
          cigar_op->iteration = (1UL + *eoplist_reader->currenteop);
          break;
      }
      eoplist_reader->currenteop += eoplist_reader->difference;
    }
    if (eoplist_reader->currenteop == eoplist_reader->endeoplist)
    {
      return true;
    }
  }
}

// Assembly:
subq $0x28, %rsp
movb %dl, %al
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
andb $0x1, %al
movb %al, 0xf(%rsp)
movq 0x10(%rsp), %rax
cmpq $0x0, (%rax)
je 0x4c1cc4
movq 0x10(%rsp), %rax
movq (%rax), %rax
movq 0x10(%rsp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x4c1cce
movb $0x0, 0x27(%rsp)
jmp 0x4c20fd
jmp 0x4c1cd0
movq 0x10(%rsp), %rax
cmpl $0x1, 0x10(%rax)
je 0x4c1d1e
movq 0x10(%rsp), %rax
cmpl $-0x1, 0x10(%rax)
je 0x4c1d1e
movq 0x17a2b3(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x5431c(%rip), %rsi     # 0x516013
leaq 0xf682b(%rip), %rdx     # 0x5b8529
leaq 0xf6868(%rip), %rcx     # 0x5b856d
leaq 0xf662c(%rip), %r8      # 0x5b8338
movl $0x175, %r9d            # imm = 0x175
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x4c1d20
movq 0x18(%rsp), %rax
movl $0x4, (%rax)
movq 0x18(%rsp), %rax
movq $0x0, 0x8(%rax)
movq 0x18(%rsp), %rax
cmpq $0x0, 0x8(%rax)
jbe 0x4c2010
movq 0x10(%rsp), %rax
movq (%rax), %rax
movzbl (%rax), %eax
movl %eax, 0x8(%rsp)
subl $0xfd, %eax
je 0x4c1e97
jmp 0x4c1d64
movl 0x8(%rsp), %eax
subl $0xfe, %eax
je 0x4c1d85
jmp 0x4c1d71
movl 0x8(%rsp), %eax
subl $0xff, %eax
je 0x4c1e0e
jmp 0x4c1f6a
jmp 0x4c1d87
movq 0x18(%rsp), %rax
cmpl $0x4, (%rax)
jne 0x4c1dc9
movq 0x17a208(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x54271(%rip), %rsi     # 0x516013
leaq 0xf67e1(%rip), %rdx     # 0x5b858a
leaq 0xf67bd(%rip), %rcx     # 0x5b856d
leaq 0xf6581(%rip), %r8      # 0x5b8338
movl $0x17f, %r9d            # imm = 0x17F
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x4c1dcb
movq 0x18(%rsp), %rax
cmpl $0x0, (%rax)
jne 0x4c1e04
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x8(%rax)
movq 0x10(%rsp), %rax
movl 0x10(%rax), %edx
movq 0x10(%rsp), %rax
movq (%rax), %rcx
movslq %edx, %rdx
addq %rdx, %rcx
movq %rcx, (%rax)
jmp 0x4c200b
movb $0x1, 0x27(%rsp)
jmp 0x4c20fd
jmp 0x4c1e10
movq 0x18(%rsp), %rax
cmpl $0x4, (%rax)
jne 0x4c1e52
movq 0x17a17f(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x541e8(%rip), %rsi     # 0x516013
leaq 0xf6758(%rip), %rdx     # 0x5b858a
leaq 0xf6734(%rip), %rcx     # 0x5b856d
leaq 0xf64f8(%rip), %r8      # 0x5b8338
movl $0x188, %r9d            # imm = 0x188
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x4c1e54
movq 0x18(%rsp), %rax
cmpl $0x1, (%rax)
jne 0x4c1e8d
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x8(%rax)
movq 0x10(%rsp), %rax
movl 0x10(%rax), %edx
movq 0x10(%rsp), %rax
movq (%rax), %rcx
movslq %edx, %rdx
addq %rdx, %rcx
movq %rcx, (%rax)
jmp 0x4c200b
movb $0x1, 0x27(%rsp)
jmp 0x4c20fd
jmp 0x4c1e99
movq 0x18(%rsp), %rax
cmpl $0x4, (%rax)
jne 0x4c1edb
movq 0x17a0f6(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x5415f(%rip), %rsi     # 0x516013
leaq 0xf66cf(%rip), %rdx     # 0x5b858a
leaq 0xf66ab(%rip), %rcx     # 0x5b856d
leaq 0xf646f(%rip), %r8      # 0x5b8338
movl $0x191, %r9d            # imm = 0x191
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x4c1edd
testb $0x1, 0xf(%rsp)
je 0x4c1f27
movq 0x18(%rsp), %rax
cmpl $0x2, (%rax)
jne 0x4c1f1d
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x8(%rax)
movq 0x10(%rsp), %rax
movl 0x10(%rax), %edx
movq 0x10(%rsp), %rax
movq (%rax), %rcx
movslq %edx, %rdx
addq %rdx, %rcx
movq %rcx, (%rax)
jmp 0x4c200b
movb $0x1, 0x27(%rsp)
jmp 0x4c20fd
movq 0x18(%rsp), %rax
cmpl $0x3, (%rax)
jne 0x4c1f60
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x8(%rax)
movq 0x10(%rsp), %rax
movl 0x10(%rax), %edx
movq 0x10(%rsp), %rax
movq (%rax), %rcx
movslq %edx, %rdx
addq %rdx, %rcx
movq %rcx, (%rax)
jmp 0x4c200b
movb $0x1, 0x27(%rsp)
jmp 0x4c20fd
movq 0x18(%rsp), %rax
cmpl $0x3, (%rax)
jne 0x4c1fff
jmp 0x4c1f7a
movq 0x10(%rsp), %rax
movq (%rax), %rax
movzbl (%rax), %eax
cmpl $0xfd, %eax
jl 0x4c1fc4
movq 0x17a00d(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x54076(%rip), %rsi     # 0x516013
leaq 0xf6609(%rip), %rdx     # 0x5b85ad
leaq 0xf65c2(%rip), %rcx     # 0x5b856d
leaq 0xf6386(%rip), %r8      # 0x5b8338
movl $0x1a6, %r9d            # imm = 0x1A6
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x4c1fc6
movq 0x10(%rsp), %rax
movq (%rax), %rax
movzbl (%rax), %eax
movl %eax, %ecx
addq $0x1, %rcx
movq 0x18(%rsp), %rax
addq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq 0x10(%rsp), %rax
movl 0x10(%rax), %edx
movq 0x10(%rsp), %rax
movq (%rax), %rcx
movslq %edx, %rdx
addq %rdx, %rcx
movq %rcx, (%rax)
jmp 0x4c2009
movb $0x1, 0x27(%rsp)
jmp 0x4c20fd
jmp 0x4c200b
jmp 0x4c20de
movq 0x10(%rsp), %rax
movq (%rax), %rax
movzbl (%rax), %eax
movl %eax, 0x4(%rsp)
subl $0xfd, %eax
je 0x4c2076
jmp 0x4c2028
movl 0x4(%rsp), %eax
subl $0xfe, %eax
je 0x4c2042
jmp 0x4c2035
movl 0x4(%rsp), %eax
subl $0xff, %eax
je 0x4c205c
jmp 0x4c20a0
movq 0x18(%rsp), %rax
movl $0x0, (%rax)
movq 0x18(%rsp), %rax
movq $0x1, 0x8(%rax)
jmp 0x4c20c5
movq 0x18(%rsp), %rax
movl $0x1, (%rax)
movq 0x18(%rsp), %rax
movq $0x1, 0x8(%rax)
jmp 0x4c20c5
movb 0xf(%rsp), %dl
movl $0x3, %ecx
movl $0x2, %eax
testb $0x1, %dl
cmovnel %eax, %ecx
movq 0x18(%rsp), %rax
movl %ecx, (%rax)
movq 0x18(%rsp), %rax
movq $0x1, 0x8(%rax)
jmp 0x4c20c5
movq 0x18(%rsp), %rax
movl $0x3, (%rax)
movq 0x10(%rsp), %rax
movq (%rax), %rax
movzbl (%rax), %eax
movl %eax, %ecx
addq $0x1, %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x10(%rsp), %rax
movl 0x10(%rax), %edx
movq 0x10(%rsp), %rax
movq (%rax), %rcx
movslq %edx, %rdx
addq %rdx, %rcx
movq %rcx, (%rax)
movq 0x10(%rsp), %rax
movq (%rax), %rax
movq 0x10(%rsp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x4c20f8
movb $0x1, 0x27(%rsp)
jmp 0x4c20fd
jmp 0x4c1d38
movb 0x27(%rsp), %al
andb $0x1, %al
addq $0x28, %rsp
retq
nopl (%rax,%rax)