// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/editscript.c
// Function: editscript_space_get_length
static inline GtBitsequence editscript_space_get_next(const GtEditscript *es,
                                                      GtEditscriptPos *pos)
{
  GtBitsequence elem = 0;
  uint32_t shift;

  if (pos->bitsleft == 0) {
    pos->cur_word++;
    pos->bitsleft = (uint32_t) GT_INTWORDSIZE;
  }
  shift = pos->bitsleft;

  elem = es->space[pos->cur_word] << (GT_INTWORDSIZE - shift);
  if (shift < es->entry_size) {
    pos->cur_word++;
    elem |= es->space[pos->cur_word] >> (GtBitsequence) shift;
    pos->bitsleft = (uint32_t) (GT_INTWORDSIZE - (es->entry_size - shift));
  }
  else {
    pos->bitsleft -= es->entry_size;
  }
  elem >>= GT_INTWORDSIZE - es->entry_size;
  return elem;
}

// Assembly:
movl (%rsi), %r9d
movl 0x4(%rsi), %r8d
testl %r8d, %r8d
jne 0x137ebf
incl %r9d
movl %r9d, (%rsi)
movl $0x40, %r8d
movq (%rdi), %r10
movl %r9d, %eax
movq (%r10,%rax,8), %rax
movl %r8d, %ecx
negb %cl
shlq %cl, %rax
movzbl 0x15(%rdi), %r11d
cmpl %r11d, %r8d
jae 0x137ef2
incl %r9d
movl %r9d, (%rsi)
movq (%r10,%r9,8), %rdi
movl %r8d, %ecx
shrq %cl, %rdi
orq %rdi, %rax
addl $0x40, %r8d
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subl %r11d, %r8d
movl %r11d, %ecx
negl %ecx
shrq %cl, %rax
movl %r8d, 0x4(%rsi)
incl (%rdx)
leal -0x1(%r11), %ecx
movl $0x1, %r14d
shlq %cl, %r14
movzbl %cl, %ecx
btq %rcx, %rax
jae 0x138081
movl %r11d, %edi
movl $0x40, %r8d
movq $-0x1, %r15
movl %edi, %ecx
shlq %cl, %r15
subl %r11d, %r8d
movq %rax, %rcx
xorq %r15, %rcx
xorl %ebx, %ebx
cmpq $-0x1, %rcx
jne 0x137fb2
movl (%rsi), %r12d
movl 0x4(%rsi), %r9d
testl %r9d, %r9d
jne 0x137f64
incl %r12d
movl %r12d, (%rsi)
movl $0x40, %r9d
movl %r12d, %eax
movq (%r10,%rax,8), %rax
movl %r9d, %ecx
negb %cl
shlq %cl, %rax
cmpl %r11d, %r9d
jae 0x137f8f
incl %r12d
movl %r12d, (%rsi)
movq (%r10,%r12,8), %r12
movl %r9d, %ecx
shrq %cl, %r12
orq %r12, %rax
addl $0x40, %r9d
subl %r11d, %r9d
movl %r8d, %ecx
shrq %cl, %rax
movl %r9d, 0x4(%rsi)
incl (%rdx)
addq %rdi, %rbx
movq %rax, %rcx
xorq %r15, %rcx
cmpq $-0x1, %rcx
je 0x137f4c
testq %r14, %rax
je 0x13801b
movq %rax, %r15
xorl %eax, %eax
movl (%rsi), %r13d
movl 0x4(%rsi), %r9d
testl %r9d, %r9d
jne 0x137fcf
incl %r13d
movl %r13d, (%rsi)
movl $0x40, %r9d
movl %r13d, %ecx
movq (%r10,%rcx,8), %r12
movl %r9d, %ecx
negb %cl
shlq %cl, %r12
cmpl %r11d, %r9d
jae 0x137ffa
incl %r13d
movl %r13d, (%rsi)
movq (%r10,%r13,8), %r13
movl %r9d, %ecx
shrq %cl, %r13
orq %r13, %r12
addl $0x40, %r9d
subl %r11d, %r9d
movl %r8d, %ecx
shrq %cl, %r12
movl %r9d, 0x4(%rsi)
incl (%rdx)
movl %edi, %ecx
shlq %cl, %rax
addq %r15, %r15
orq %r12, %rax
testq %r14, %r15
jne 0x137fb7
jmp 0x13807c
xorl %eax, %eax
jmp 0x13807c
movl (%rsi), %r15d
movl 0x4(%rsi), %r9d
testl %r9d, %r9d
jne 0x138037
incl %r15d
movl %r15d, (%rsi)
movl $0x40, %r9d
movl %r15d, %ecx
movq (%r10,%rcx,8), %r14
movl %r9d, %ecx
negb %cl
shlq %cl, %r14
cmpl %r11d, %r9d
jae 0x138062
incl %r15d
movl %r15d, (%rsi)
movq (%r10,%r15,8), %r15
movl %r9d, %ecx
shrq %cl, %r15
orq %r15, %r14
addl $0x40, %r9d
subl %r11d, %r9d
movl %r8d, %ecx
shrq %cl, %r14
movl %r9d, 0x4(%rsi)
incl (%rdx)
movl %edi, %ecx
shlq %cl, %rax
decq %rbx
orq %r14, %rax
testq %rbx, %rbx
jne 0x13801f
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq