// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq 0x38(%rsp), %rax
testb $0x1, 0x30(%rax)
je 0x2198a2
movq $0x0, 0x40(%rsp)
jmp 0x219cfe
movq 0x38(%rsp), %rax
cmpq $0x0, 0x38(%rax)
je 0x219a90
movq 0x38(%rsp), %rax
cmpq $0x0, 0x28(%rax)
je 0x2199ff
movq 0x38(%rsp), %rax
movq 0x28(%rax), %rdi
movq 0x38(%rsp), %rax
movq 0x58(%rax), %rax
movq (%rax), %rsi
callq 0x215180
movq %rax, 0x30(%rsp)
movq 0x38(%rsp), %rax
movq (%rax), %rcx
movq 0x38(%rsp), %rax
movq %rcx, 0x48(%rax)
jmp 0x2198f4
movq 0x38(%rsp), %rax
movq 0x48(%rax), %rax
movq 0x38(%rsp), %rcx
cmpq 0x40(%rcx), %rax
jb 0x219940
movq 0x422691(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2fc6fa(%rip), %rsi    # 0x516013
leaq 0x359403(%rip), %rdx    # 0x572d23
leaq 0x359424(%rip), %rcx    # 0x572d4b
leaq 0x358666(%rip), %r8     # 0x571f94
movl $0x46b, %r9d            # imm = 0x46B
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x219942
movq 0x38(%rsp), %rax
movq 0x48(%rax), %rdi
movq %rdi, %rcx
addq $0x10, %rcx
movq %rcx, 0x48(%rax)
movq 0x38(%rsp), %rax
movq 0x28(%rax), %rsi
movq 0x38(%rsp), %rax
movq 0x58(%rax), %rax
movq (%rax), %rdx
callq 0x2150b0
movq 0x38(%rsp), %rax
movq 0x58(%rax), %rcx
addq $0x8, %rcx
movq %rcx, 0x58(%rax)
movq 0x38(%rsp), %rax
movq 0x58(%rax), %rcx
movq 0x38(%rsp), %rdx
xorl %eax, %eax
cmpq 0x50(%rdx), %rcx
movb %al, 0x2b(%rsp)
jae 0x2199d1
movq 0x30(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x38(%rsp), %rax
movq 0x28(%rax), %rdi
movq 0x38(%rsp), %rax
movq 0x58(%rax), %rax
movq (%rax), %rsi
callq 0x215180
movq %rax, %rcx
movq 0x20(%rsp), %rax
cmpq %rcx, %rax
sete %al
movb %al, 0x2b(%rsp)
movb 0x2b(%rsp), %al
testb $0x1, %al
jne 0x2198f2
movq 0x38(%rsp), %rax
movq 0x58(%rax), %rax
movq 0x38(%rsp), %rcx
cmpq 0x50(%rcx), %rax
jb 0x2199fa
movq 0x38(%rsp), %rax
movb $0x1, 0x30(%rax)
jmp 0x219a8b
movq 0x38(%rsp), %rax
movq 0x48(%rax), %rax
movq (%rax), %rax
movq %rax, 0x30(%rsp)
movq 0x38(%rsp), %rax
movq 0x48(%rax), %rcx
movq 0x38(%rsp), %rax
movq %rcx, (%rax)
movq 0x38(%rsp), %rax
movq 0x48(%rax), %rcx
addq $0x10, %rcx
movq %rcx, 0x48(%rax)
movq 0x38(%rsp), %rax
movq 0x48(%rax), %rcx
movq 0x38(%rsp), %rdx
xorl %eax, %eax
cmpq 0x40(%rdx), %rcx
movb %al, 0x1f(%rsp)
jae 0x219a64
movq 0x30(%rsp), %rax
movq 0x38(%rsp), %rcx
movq 0x48(%rcx), %rcx
cmpq (%rcx), %rax
sete %al
movb %al, 0x1f(%rsp)
movb 0x1f(%rsp), %al
testb $0x1, %al
jne 0x219a21
movq 0x38(%rsp), %rax
movq 0x48(%rax), %rax
movq 0x38(%rsp), %rcx
cmpq 0x40(%rcx), %rax
jb 0x219a89
movq 0x38(%rsp), %rax
movb $0x1, 0x30(%rax)
jmp 0x219a8b
jmp 0x219cd3
movq 0x38(%rsp), %rax
cmpq $0x0, 0x28(%rax)
je 0x219bc0
movq 0x38(%rsp), %rax
movq (%rax), %rcx
movq 0x38(%rsp), %rax
movq %rcx, 0x48(%rax)
movq 0x38(%rsp), %rax
movq 0x28(%rax), %rdi
movq 0x38(%rsp), %rax
movq 0x90(%rax), %rsi
callq 0x215180
movq %rax, 0x30(%rsp)
jmp 0x219ad2
movq 0x38(%rsp), %rax
movq 0x48(%rax), %rax
movq 0x38(%rsp), %rcx
cmpq 0x40(%rcx), %rax
jb 0x219b1e
movq 0x4224b3(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2fc51c(%rip), %rsi    # 0x516013
leaq 0x359225(%rip), %rdx    # 0x572d23
leaq 0x359246(%rip), %rcx    # 0x572d4b
leaq 0x358488(%rip), %r8     # 0x571f94
movl $0x48f, %r9d            # imm = 0x48F
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x219b20
movq 0x38(%rsp), %rax
movq 0x48(%rax), %rdi
movq %rdi, %rcx
addq $0x10, %rcx
movq %rcx, 0x48(%rax)
movq 0x38(%rsp), %rax
movq 0x28(%rax), %rsi
movq 0x38(%rsp), %rax
movq 0x90(%rax), %rdx
callq 0x2150b0
movq 0x38(%rsp), %rdi
addq $0x90, %rdi
movq 0x38(%rsp), %rsi
addq $0x78, %rsi
callq 0x21a6a0
movl %eax, 0x2c(%rsp)
xorl %eax, %eax
cmpl $0x1, 0x2c(%rsp)
movb %al, 0x1e(%rsp)
jne 0x219baf
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x38(%rsp), %rax
movq 0x28(%rax), %rdi
movq 0x38(%rsp), %rax
movq 0x90(%rax), %rsi
callq 0x215180
movq %rax, %rcx
movq 0x10(%rsp), %rax
cmpq %rcx, %rax
sete %al
movb %al, 0x1e(%rsp)
movb 0x1e(%rsp), %al
testb $0x1, %al
jne 0x219ad0
jmp 0x219cc1
movq 0x38(%rsp), %rax
movq (%rax), %rax
movq 0x38(%rsp), %rcx
cmpq 0x48(%rcx), %rax
jae 0x219c03
movq 0x38(%rsp), %rax
movq (%rax), %rax
movq 0x38(%rsp), %rcx
movq 0x48(%rcx), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
movq 0x38(%rsp), %rax
movq (%rax), %rcx
movq 0x38(%rsp), %rax
movq %rcx, 0x48(%rax)
movq 0x38(%rsp), %rax
movq 0x48(%rax), %rax
movq (%rax), %rax
movq %rax, 0x30(%rsp)
movq 0x38(%rsp), %rax
movq 0x48(%rax), %rcx
addq $0x10, %rcx
movq %rcx, 0x48(%rax)
movq 0x38(%rsp), %rax
movq 0x48(%rax), %rax
movq 0x38(%rsp), %rcx
cmpq 0x40(%rcx), %rax
jb 0x219c71
movq 0x422360(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2fc3c9(%rip), %rsi    # 0x516013
leaq 0x3590d2(%rip), %rdx    # 0x572d23
leaq 0x3590f3(%rip), %rcx    # 0x572d4b
leaq 0x358335(%rip), %r8     # 0x571f94
movl $0x4a2, %r9d            # imm = 0x4A2
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x219c73
movq 0x38(%rsp), %rax
movq 0x48(%rax), %rdi
movq 0x38(%rsp), %rsi
addq $0x60, %rsi
callq 0x21a780
movl %eax, 0x2c(%rsp)
xorl %eax, %eax
cmpl $0x1, 0x2c(%rsp)
movb %al, 0xf(%rsp)
jne 0x219cb3
movq 0x30(%rsp), %rax
movq 0x38(%rsp), %rcx
movq 0x48(%rcx), %rcx
cmpq (%rcx), %rax
sete %al
movb %al, 0xf(%rsp)
movb 0xf(%rsp), %al
testb $0x1, %al
jne 0x219c14
jmp 0x219cc1
cmpl $0x1, 0x2c(%rsp)
je 0x219cd1
movq 0x38(%rsp), %rax
movb $0x1, 0x30(%rax)
jmp 0x219cd3
movq 0x38(%rsp), %rax
movq 0x48(%rax), %rcx
movq 0x38(%rsp), %rax
movq (%rax), %rax
subq %rax, %rcx
sarq $0x4, %rcx
movq 0x38(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x38(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
addq $0x48, %rsp
retq
nopl (%rax,%rax)