// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/extended/editscript.c
// Function: gt_editscript_get_stats
void gt_editscript_get_stats(const GtEditscript *editscript,
                             GtUword *match,
                             GtUword *mismatch,
                             GtUword *insertion,
                             GtUword *deletion)
{
  uint32_t elems_served = 0;
  bool misdel = true; /* shut up scan-build */
  GtBitsequence elem;
  GtEditscriptPos getpos;

  gt_assert(editscript != NULL);

  editscript_pos_reset(&getpos);
  *match = *mismatch = *insertion = *deletion = 0;
  if (editscript->num_elems != 0) {
    elem = editscript_space_get_next(editscript, &getpos);
    gt_assert(editscript->del < (uint8_t) elem);
    elems_served++;
    if (elem == GT_EDITSCRIPT_MISDEL_SYM(editscript)) {
      misdel = true;
    }
    else if (elem == GT_EDITSCRIPT_INS_SYM(editscript)) {
      misdel = false;
    }
    (*match) += editscript_space_get_length(editscript, &getpos, &elems_served);
    while (elems_served < editscript->num_elems) {
      elem = editscript_space_get_next(editscript, &getpos);
      elems_served++;
      if (elem == GT_EDITSCRIPT_MISDEL_SYM(editscript)) {
        misdel = true;
        (*match) += editscript_space_get_length(editscript, &getpos,
                                                &elems_served);
      }
      else if (elem == GT_EDITSCRIPT_INS_SYM(editscript)) {
        misdel = false;
        (*match) += editscript_space_get_length(editscript, &getpos,
                                                &elems_served);
      }
      else {
        if (misdel) {
          if (elem == (GtBitsequence) editscript->del)
            (*deletion)++;
          else
            (*mismatch)++;
        }
        else
          (*insertion)++;
      }
    }
    gt_assert(elems_served == editscript->num_elems);
  }
  (*match) += editscript->trailing_matches;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
testq %rdi, %rdi
je 0xceaf9
movq %rdi, %r14
movabsq $0x4000000000, %rax     # imm = 0x4000000000
movq %rax, 0x18(%rsp)
andq $0x0, (%r8)
andq $0x0, (%rcx)
andq $0x0, (%rdx)
andq $0x0, (%rsi)
movl 0xc(%rdi), %r12d
testl %r12d, %r12d
je 0xceade
movq %rdx, 0x28(%rsp)
movq %rcx, 0x30(%rsp)
movq %r8, 0x38(%rsp)
movq %rsi, 0x10(%rsp)
leaq 0x18(%rsp), %rsi
movq %r14, %rdi
callq 0xceb8d
movzbl 0x14(%r14), %esi
movzbl %al, %ecx
cmpl %esi, %ecx
jbe 0xceb27
leaq 0xc(%rsp), %rdx
movl $0x1, (%rdx)
leaq 0x1(%rsi), %r13
cmpq %r13, %rax
sete %cl
movq %rsi, 0x20(%rsp)
addq $0x2, %rsi
movq %rsi, 0x40(%rsp)
cmpq %rsi, %rax
setne %bpl
orb %cl, %bpl
leaq 0x18(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0xcebdc
movq 0x10(%rsp), %rcx
movq %rax, (%rcx)
movl 0xc(%rsp), %ebx
cmpl %r12d, %ebx
jae 0xceace
movq %r14, %rdi
movq %r15, %rsi
callq 0xceb8d
incl %ebx
movl %ebx, 0xc(%rsp)
cmpq %r13, %rax
jne 0xcea84
movq %r14, %rdi
movq %r15, %rsi
leaq 0xc(%rsp), %rdx
callq 0xcebdc
movb $0x1, %bpl
jmp 0xcea9d
cmpq 0x40(%rsp), %rax
jne 0xceaa4
movq %r14, %rdi
movq %r15, %rsi
leaq 0xc(%rsp), %rdx
callq 0xcebdc
xorl %ebp, %ebp
movq 0x10(%rsp), %rcx
jmp 0xceac9
testb $0x1, %bpl
je 0xceabf
cmpq 0x20(%rsp), %rax
movq 0x28(%rsp), %rcx
cmoveq 0x38(%rsp), %rcx
movb $0x1, %bpl
jmp 0xceac6
xorl %ebp, %ebp
movq 0x30(%rsp), %rcx
pushq $0x1
popq %rax
addq %rax, (%rcx)
jmp 0xcea50
jne 0xceb55
movq 0x10(%rsp), %rsi
movq (%rsi), %rax
jmp 0xceae0
xorl %eax, %eax
movl 0x10(%r14), %ecx
addq %rax, %rcx
movq %rcx, (%rsi)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x369468(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x216509(%rip), %rsi    # 0x2e5013
leaq 0x24cfb1(%rip), %rdx    # 0x31bac2
leaq 0x24ce5f(%rip), %rcx    # 0x31b977
leaq 0x24cd99(%rip), %r8     # 0x31b8b8
movl $0x156, %r9d            # imm = 0x156
jmp 0xceb81
movq 0x36943a(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x2164db(%rip), %rsi    # 0x2e5013
leaq 0x24ce50(%rip), %rdx    # 0x31b98f
leaq 0x24ce31(%rip), %rcx    # 0x31b977
leaq 0x24cd6b(%rip), %r8     # 0x31b8b8
movl $0x15c, %r9d            # imm = 0x15C
jmp 0xceb81
movq 0x36940c(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x2164ad(%rip), %rsi    # 0x2e5013
leaq 0x24ce43(%rip), %rdx    # 0x31b9b0
leaq 0x24ce03(%rip), %rcx    # 0x31b977
leaq 0x24cd3d(%rip), %r8     # 0x31b8b8
movl $0x17d, %r9d            # imm = 0x17D
xorl %eax, %eax
callq 0x17a50
callq 0x17390