// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/ft-eoplist.c
// Function: gt_eoplist_from_cigar
void gt_eoplist_from_cigar(GtEoplist *eoplist,
                           const char *cigarstring,char sep)
{
  const char *cptr;
  GtUword iteration = 0;

  for (cptr = cigarstring; *cptr != '\0' && *cptr != sep && *cptr != '\n';
       cptr++)
  {
    if (isdigit(*cptr))
    {
      iteration = iteration * 10 + (GtUword) (*cptr - '0');
    } else
    {
      GtUword idx;

      switch (*cptr)
      {
        case DELETION_CHAR:
          for (idx = 0; idx < iteration; idx++)
          {
            gt_eoplist_deletion_add(eoplist);
          }
          break;
        case INSERTION_CHAR:
          for (idx = 0; idx < iteration; idx++)
          {
            gt_eoplist_insertion_add(eoplist);
          }
          break;
        case MATCH_CHAR:
          gt_eoplist_match_add(eoplist,iteration);
          break;
        case REPLACEMENT_CHAR:
          gt_eoplist_match_add(eoplist,iteration);
          break;
        case MISMATCH_CHAR:
          for (idx = 0; idx < iteration; idx++)
          {
            gt_eoplist_mismatch_add(eoplist);
          }
          break;
        default:
          fprintf(stderr,"file %s, line %d: illegal symbol '%c' "
                         "in cigar string\n",__FILE__,__LINE__,*cptr);
          exit(GT_EXIT_PROGRAMMING_ERROR);
      }
      iteration = 0;
    }
  }
}

// Assembly:
subq $0x48, %rsp
movb %dl, %al
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movb %al, 0x37(%rsp)
movq $0x0, 0x20(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, 0x17(%rsp)
je 0x4c2333
movq 0x28(%rsp), %rax
movsbl (%rax), %ecx
movsbl 0x37(%rsp), %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, 0x17(%rsp)
je 0x4c2333
movq 0x28(%rsp), %rax
movsbl (%rax), %eax
cmpl $0xa, %eax
setne %al
movb %al, 0x17(%rsp)
movb 0x17(%rsp), %al
testb $0x1, %al
jne 0x4c2340
jmp 0x4c24c2
callq 0x197c0
movq (%rax), %rax
movq 0x28(%rsp), %rcx
movsbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
je 0x4c2382
imulq $0xa, 0x20(%rsp), %rax
movq 0x28(%rsp), %rcx
movsbl (%rcx), %ecx
subl $0x30, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, 0x20(%rsp)
jmp 0x4c24ad
movq 0x28(%rsp), %rax
movsbl (%rax), %eax
addl $-0x3d, %eax
movl %eax, %ecx
movq %rcx, 0x8(%rsp)
subl $0x1b, %eax
ja 0x4c246d
movq 0x8(%rsp), %rax
leaq 0xf5eef(%rip), %rcx     # 0x5b8298
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq $0x0, 0x18(%rsp)
movq 0x18(%rsp), %rax
cmpq 0x20(%rsp), %rax
jae 0x4c23e1
movq 0x40(%rsp), %rdi
callq 0x4c24d0
movq 0x18(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x18(%rsp)
jmp 0x4c23bb
jmp 0x4c24a4
movq $0x0, 0x18(%rsp)
movq 0x18(%rsp), %rax
cmpq 0x20(%rsp), %rax
jae 0x4c2415
movq 0x40(%rsp), %rdi
callq 0x4c26c0
movq 0x18(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x18(%rsp)
jmp 0x4c23ef
jmp 0x4c24a4
movq 0x40(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x4c28f0
jmp 0x4c24a4
movq 0x40(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x4c28f0
jmp 0x4c24a4
movq $0x0, 0x18(%rsp)
movq 0x18(%rsp), %rax
cmpq 0x20(%rsp), %rax
jae 0x4c246b
movq 0x40(%rsp), %rdi
callq 0x4c2d60
movq 0x18(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x18(%rsp)
jmp 0x4c2445
jmp 0x4c24a4
movq 0x179b2c(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
movq 0x28(%rsp), %rax
movsbl (%rax), %r8d
leaq 0xf5ed7(%rip), %rsi     # 0x5b835e
leaq 0xf5eaa(%rip), %rdx     # 0x5b8338
movl $0xa9, %ecx
movb $0x0, %al
callq 0x199f0
movl $0x2, %edi
callq 0x19890
movq $0x0, 0x20(%rsp)
jmp 0x4c24af
movq 0x28(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x28(%rsp)
jmp 0x4c22f7
addq $0x48, %rsp
retq
nopw (%rax,%rax)