// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/extended/multieoplist.c
// Function: gt_multieoplist_add_eops
static void gt_multieoplist_add_eops(GtMultieoplist *multieops,
                                     AlignmentEoptype type,
                                     GtUword steps)
{
  Eop *space, type_bits = 0;

  gt_assert(multieops != NULL);
  space = multieops->meoplist.spaceEop;
  switch (type) {
    case Deletion:
      type_bits = GT_MEOPS_DEL;
      break;
    case Insertion:
      type_bits = GT_MEOPS_INS;
      break;
    case Match:
    case Replacement:
      type_bits = GT_MEOPS_MATCH;
      break;
    case Mismatch:
      type_bits = GT_MEOPS_MIS;
      break;
    default:
      gt_assert(false);
  }
  if (multieops->meoplist.nextfreeEop != 0) {
    GtUword current = multieops->meoplist.nextfreeEop - 1;
    if (space[current] >> GT_MEOPS_STEPS_BITS == type_bits) {
      while (steps != 0 &&
             (space[current] & GT_MEOPS_STEPS_MASK) < GT_MEOPS_STEPS_MASK) {
        space[current]++;
        steps--;
      }
    }
  }
  if (steps != 0) {
    while (steps != 0) {
      Eop tmp = type_bits << GT_MEOPS_STEPS_BITS;
      if (steps < (GtUword) GT_MEOPS_STEPS_MASK) {
        tmp += steps;
        steps = 0;
      }
      else {
        tmp |= GT_MEOPS_STEPS_MASK;
        steps -= GT_MEOPS_STEPS_MASK;
      }
      GT_STOREINARRAY(&multieops->meoplist, Eop, 64<<2, tmp);
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x1018ec
movq %rdx, %rbx
movq %rdi, %r14
movslq %esi, %rax
leaq 0x22bee3(%rip), %rcx    # 0x32d6d8
movl (%rcx,%rax,4), %ebp
movq 0x18(%rdi), %rax
testq %rax, %rax
je 0x101830
testq %rbx, %rbx
je 0x101830
movq 0x8(%r14), %rcx
movzbl -0x1(%rcx,%rax), %edx
movl %edx, %esi
shrl $0x6, %esi
cmpl %esi, %ebp
jne 0x101830
movl %edx, %esi
notb %sil
testb $0x3f, %sil
je 0x101835
incb %dl
movb %dl, -0x1(%rcx,%rax)
decq %rbx
jne 0x101818
jmp 0x1018a5
testq %rbx, %rbx
je 0x1018a5
shlb $0x6, %bpl
pushq $0x3f
popq %r12
leaq 0x22b714(%rip), %r15    # 0x32cf58
cmpq $0x3f, %rbx
movq %r12, %r13
cmovbq %rbx, %r13
movq 0x10(%r14), %rsi
cmpq %rsi, 0x18(%r14)
jae 0x10185f
movq 0x8(%r14), %rax
jmp 0x10187f
addq $0x100, %rsi            # imm = 0x100
movq %rsi, 0x10(%r14)
movq 0x8(%r14), %rdi
movq %r15, %rdx
movl $0x99, %ecx
callq 0x93472
movq %rax, 0x8(%r14)
testq %rax, %rax
je 0x1018b4
addq $-0x3f, %rbx
orb %bpl, %r13b
movq 0x18(%r14), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x18(%r14)
movb %r13b, (%rax,%rcx)
leaq 0x3f(%rbx), %rax
cmpq $0x3f, %rax
ja 0x101844
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x3366ad(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1e374e(%rip), %rsi    # 0x2e5013
leaq 0x22bdcb(%rip), %rdx    # 0x32d697
leaq 0x22bdab(%rip), %rcx    # 0x32d67e
leaq 0x22b67e(%rip), %r8     # 0x32cf58
movl $0x99, %r9d
xorl %eax, %eax
callq 0x17a50
callq 0x17390
movq 0x336675(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1e3716(%rip), %rsi    # 0x2e5013
leaq 0x22b846(%rip), %rdx    # 0x32d14a
leaq 0x22bd73(%rip), %rcx    # 0x32d67e
leaq 0x22b646(%rip), %r8     # 0x32cf58
pushq $0x71
popq %r9
jmp 0x1018e0