// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/match/diagbandseed.c
// Function: gt_diagbandseed_kmer_iter_next
static const GtKmerPosList *gt_diagbandseed_kmer_iter_next(
                                              GtDiagbandseedKmerIterator *ki)
{
  GtCodetype code;

  if (ki->at_list_end)
  {
    return NULL;
  }
  /* reset section list */
  if (ki->original != NULL)
  { /* list based */
    if (ki->section.encode_info != NULL)
    {
      code = gt_kmerpos_entry_code(ki->section.encode_info,*ki->listptr_uword);
      ki->listptr_struct = ki->section.spaceGtDiagbandseedKmerPos;
      do
      {
        gt_assert(ki->listptr_struct < ki->listend_struct);
        gt_kmerpos_entry_decode(ki->listptr_struct++,
                                ki->section.encode_info,*ki->listptr_uword);
        ki->listptr_uword++;
      } while (ki->listptr_uword < ki->listend_uword &&
               code == gt_kmerpos_entry_code(ki->section.encode_info,
                                             *ki->listptr_uword));
      if (ki->listptr_uword >= ki->listend_uword)
      {
        ki->at_list_end = true;
      }
    } else
    {
      code = ki->listptr_struct->code;
      ki->section.spaceGtDiagbandseedKmerPos = ki->listptr_struct;
      /* add element to section until code differs */
      do
      {
        ki->listptr_struct++;
      } while (ki->listptr_struct < ki->listend_struct &&
               code == ki->listptr_struct->code);
      if (ki->listptr_struct >= ki->listend_struct)
      {
        ki->at_list_end = true;
      }
    }
  } else
  { /* file based */
    int rval;

    if (ki->section.encode_info != NULL)
    {
      ki->listptr_struct = ki->section.spaceGtDiagbandseedKmerPos;
      code = gt_kmerpos_entry_code(ki->section.encode_info,ki->buffer_uword);
      do
      {
        gt_assert(ki->listptr_struct < ki->listend_struct);
        gt_kmerpos_entry_decode(ki->listptr_struct++,
                                ki->section.encode_info,ki->buffer_uword);
        rval = gt_readnextfromstream_GtUword(&ki->buffer_uword,
                                             &ki->kmerstream_uword);
      } while (rval == 1 &&
               code == gt_kmerpos_entry_code(ki->section.encode_info,
                                             ki->buffer_uword));
    } else
    {
      if (ki->section.spaceGtDiagbandseedKmerPos < ki->listptr_struct)
      {
        ki->section.spaceGtDiagbandseedKmerPos[0] = *ki->listptr_struct;
        ki->listptr_struct = ki->section.spaceGtDiagbandseedKmerPos;
      }
      code = ki->listptr_struct->code;
      do
      {
        ki->listptr_struct++;
        gt_assert(ki->listptr_struct < ki->listend_struct);
        rval = gt_readnextfromstream_GtDiagbandseedKmerPos(ki->listptr_struct,
                                                           &ki->
                                                             kmerstream_struct);
      } while (rval == 1 && code == ki->listptr_struct->code);
    }
    if (rval != 1)
    {
      ki->at_list_end = true;
    }
  }
  ki->section.nextfree = (GtUword) (ki->listptr_struct -
                                    ki->section.spaceGtDiagbandseedKmerPos);
  return &ki->section;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
cmpb $0x0, 0x30(%rdi)
je 0x1414b2
xorl %ebx, %ebx
jmp 0x141625
movq %rdi, %rbx
cmpq $0x0, 0x38(%rdi)
movq 0x28(%rdi), %rsi
je 0x14152b
testq %rsi, %rsi
je 0x14159f
movq (%rbx), %rax
movq 0x58(%rbx), %rcx
movq (%rcx), %rdx
movb 0x20(%rsi), %cl
movq %rdx, %r14
shrq %cl, %r14
movq %rax, 0x48(%rbx)
movq 0x48(%rbx), %rdi
cmpq 0x40(%rbx), %rdi
jae 0x141634
leaq 0x10(%rdi), %rax
movq %rax, 0x48(%rbx)
callq 0x13e10a
movq 0x58(%rbx), %rax
addq $0x8, %rax
movq %rax, 0x58(%rbx)
cmpq 0x50(%rbx), %rax
jae 0x141612
movq 0x28(%rbx), %rsi
movq (%rax), %rdx
movb 0x20(%rsi), %cl
movq %rdx, %rax
shrq %cl, %rax
cmpq %rax, %r14
je 0x1414e0
jmp 0x141616
movq (%rbx), %rax
testq %rsi, %rsi
je 0x1415cc
movq %rax, 0x48(%rbx)
leaq 0x90(%rbx), %r14
movq 0x90(%rbx), %rdx
movb 0x20(%rsi), %cl
movq %rdx, %r12
shrq %cl, %r12
leaq 0x78(%rbx), %r15
movq 0x48(%rbx), %rdi
cmpq 0x40(%rbx), %rdi
jae 0x141662
leaq 0x10(%rdi), %rax
movq %rax, 0x48(%rbx)
callq 0x13e10a
movq %r14, %rdi
movq %r15, %rsi
callq 0x1416c8
testl %eax, %eax
je 0x141612
movq 0x28(%rbx), %rsi
movq 0x90(%rbx), %rdx
movb 0x20(%rsi), %cl
movq %rdx, %rax
shrq %cl, %rax
cmpq %rax, %r12
je 0x141556
jmp 0x141616
movq 0x40(%rbx), %rax
movq 0x48(%rbx), %rcx
movq (%rcx), %rdx
movq %rcx, (%rbx)
addq $0x10, %rcx
cmpq %rax, %rcx
jae 0x14160e
leaq 0x10(%rcx), %rsi
cmpq (%rcx), %rdx
movq %rsi, %rcx
je 0x1415b1
addq $-0x10, %rsi
movq %rsi, 0x48(%rbx)
jmp 0x141616
movq 0x48(%rbx), %rdi
cmpq %rdi, %rax
jae 0x1415de
movups (%rdi), %xmm0
movups %xmm0, (%rax)
movq (%rbx), %rdi
movq (%rdi), %r15
leaq 0x60(%rbx), %r14
addq $0x10, %rdi
movq %rdi, 0x48(%rbx)
cmpq 0x40(%rbx), %rdi
jae 0x141690
movq %r14, %rsi
callq 0x141752
testl %eax, %eax
je 0x141612
movq 0x48(%rbx), %rdi
cmpq (%rdi), %r15
je 0x1415e5
jmp 0x141616
movq %rcx, 0x48(%rbx)
movb $0x1, 0x30(%rbx)
movq 0x48(%rbx), %rax
subq (%rbx), %rax
sarq $0x4, %rax
movq %rax, 0x18(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x2f692d(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1a39ce(%rip), %rsi    # 0x2e5013
leaq 0x1ff45d(%rip), %rdx    # 0x340aa9
leaq 0x1ff47e(%rip), %rcx    # 0x340ad1
leaq 0x1fe862(%rip), %r8     # 0x33febc
movl $0x46b, %r9d            # imm = 0x46B
jmp 0x1416bc
movq 0x2f68ff(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1a39a0(%rip), %rsi    # 0x2e5013
leaq 0x1ff42f(%rip), %rdx    # 0x340aa9
leaq 0x1ff450(%rip), %rcx    # 0x340ad1
leaq 0x1fe834(%rip), %r8     # 0x33febc
movl $0x48f, %r9d            # imm = 0x48F
jmp 0x1416bc
movq 0x2f68d1(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1a3972(%rip), %rsi    # 0x2e5013
leaq 0x1ff401(%rip), %rdx    # 0x340aa9
leaq 0x1ff422(%rip), %rcx    # 0x340ad1
leaq 0x1fe806(%rip), %r8     # 0x33febc
movl $0x4a2, %r9d            # imm = 0x4A2
xorl %eax, %eax
callq 0x17a50
callq 0x17390