// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/sfx-mappedstr.c
// Function: gt_kmercodeiterator_filetab_next
int gt_kmercodeiterator_filetab_next(const GtKmercode **kmercodeptr,
                                     GtKmercodeiterator *kmercodeiterator,
                                     GtError *err)
{
  if (!kmercodeiterator->inputexhausted)
  {
    if (kmercodeiterator->hasprocessedfirst)
    {
      GtUchar charcode;
      int retval;

      retval = gt_sequence_buffer_next(kmercodeiterator->fb,&charcode,err);
      if (retval < 0)
      {
        *kmercodeptr = NULL;
        return -1;
      }
      if (retval != 0)
      {
        gt_kmerstream_shiftrightwithchar(kmercodeiterator->spwp,charcode);
        gt_kmerstream_newcode(&kmercodeiterator->kmercode,
                              kmercodeiterator->spwp);
        kmercodeiterator->currentposition++,
        *kmercodeptr = &kmercodeiterator->kmercode;
        return 0;
      }
      kmercodeiterator->inputexhausted = true;
      kmercodeiterator->totallength = kmercodeiterator->currentposition;
    } else
    {
      gt_kmerstream_newcode(&kmercodeiterator->kmercode,
                            kmercodeiterator->spwp);
      kmercodeiterator->hasprocessedfirst = true;
      *kmercodeptr = &kmercodeiterator->kmercode;
      return 0;
    }
  }
  if (kmercodeiterator->currentposition < kmercodeiterator->totallength +
                                          kmercodeiterator->spwp->kmersize)
  {
    gt_kmerstream_shiftrightwithchar(kmercodeiterator->spwp,
                                     (GtUchar) GT_WILDCARD);
    gt_kmerstream_newcode(&kmercodeiterator->kmercode, kmercodeiterator->spwp);
    kmercodeiterator->currentposition++,
    *kmercodeptr = &kmercodeiterator->kmercode;
  } else
  {
    *kmercodeptr = NULL;
  }
  return 0;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq %rdx, 0x8(%rsp)
movq 0x10(%rsp), %rax
testb $0x1, 0x19(%rax)
jne 0x2cb476
movq 0x10(%rsp), %rax
testb $0x1, 0x18(%rax)
je 0x2cb436
movq 0x10(%rsp), %rax
movq 0x50(%rax), %rdi
movq 0x8(%rsp), %rdx
leaq 0x7(%rsp), %rsi
callq 0x1143d0
movl %eax, (%rsp)
cmpl $0x0, (%rsp)
jge 0x2cb3bb
movq 0x18(%rsp), %rax
movq $0x0, (%rax)
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
jmp 0x2cb4fd
cmpl $0x0, (%rsp)
je 0x2cb41a
movq 0x10(%rsp), %rax
movq 0x38(%rax), %rdi
movzbl 0x7(%rsp), %esi
callq 0x2cae80
movq 0x10(%rsp), %rdi
addq $0x40, %rdi
movq 0x10(%rsp), %rax
movq 0x38(%rax), %rsi
callq 0x2cada0
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x10(%rax)
movq 0x10(%rsp), %rcx
addq $0x40, %rcx
movq 0x18(%rsp), %rax
movq %rcx, (%rax)
movl $0x0, 0x24(%rsp)
jmp 0x2cb4fd
movq 0x10(%rsp), %rax
movb $0x1, 0x19(%rax)
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rcx
movq 0x10(%rsp), %rax
movq %rcx, (%rax)
jmp 0x2cb474
movq 0x10(%rsp), %rdi
addq $0x40, %rdi
movq 0x10(%rsp), %rax
movq 0x38(%rax), %rsi
callq 0x2cada0
movq 0x10(%rsp), %rax
movb $0x1, 0x18(%rax)
movq 0x10(%rsp), %rcx
addq $0x40, %rcx
movq 0x18(%rsp), %rax
movq %rcx, (%rax)
movl $0x0, 0x24(%rsp)
jmp 0x2cb4fd
jmp 0x2cb476
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x10(%rsp), %rcx
movq (%rcx), %rcx
movq 0x10(%rsp), %rdx
movq 0x38(%rdx), %rdx
movl 0x44(%rdx), %edx
addq %rdx, %rcx
cmpq %rcx, %rax
jae 0x2cb4e9
movq 0x10(%rsp), %rax
movq 0x38(%rax), %rdi
movl $0xfe, %esi
callq 0x2cae80
movq 0x10(%rsp), %rdi
addq $0x40, %rdi
movq 0x10(%rsp), %rax
movq 0x38(%rax), %rsi
callq 0x2cada0
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x10(%rax)
movq 0x10(%rsp), %rcx
addq $0x40, %rcx
movq 0x18(%rsp), %rax
movq %rcx, (%rax)
jmp 0x2cb4f5
movq 0x18(%rsp), %rax
movq $0x0, (%rax)
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)