// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/sfx-mappedstr.c
// Function: gt_kmercodeiterator_encseq_next
const GtKmercode *gt_kmercodeiterator_encseq_next(
                             GtKmercodeiterator *kmercodeiterator)
{
  if (!kmercodeiterator->hasprocessedfirst)
  {
    gt_assert(kmercodeiterator->currentposition
              == kmercodeiterator->startpos + kmercodeiterator->spwp->kmersize);
    gt_kmerstream_newcode(&kmercodeiterator->kmercode, kmercodeiterator->spwp);
    kmercodeiterator->hasprocessedfirst = true;
    return &kmercodeiterator->kmercode;
  }
  if (kmercodeiterator->currentposition < kmercodeiterator->totallength)
  {
    GtUchar charcode
      = gt_encseq_reader_next_encoded_char(kmercodeiterator->esr);
    gt_kmerstream_shiftrightwithchar(kmercodeiterator->spwp,charcode);
    gt_kmerstream_newcode(&kmercodeiterator->kmercode, kmercodeiterator->spwp);
    kmercodeiterator->currentposition++;
    return &kmercodeiterator->kmercode;
  }
  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++;
    return &kmercodeiterator->kmercode;
  }
  return NULL;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
movq 0x8(%rsp), %rax
testb $0x1, 0x18(%rax)
jne 0x2cacad
jmp 0x2cac1a
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x8(%rsp), %rcx
movq 0x8(%rcx), %rcx
movq 0x8(%rsp), %rdx
movq 0x38(%rdx), %rdx
movl 0x44(%rdx), %edx
addq %rdx, %rcx
cmpq %rcx, %rax
je 0x2cac78
movq 0x371359(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x24b3c2(%rip), %rsi    # 0x516013
leaq 0x2c055f(%rip), %rdx    # 0x58b1b7
leaq 0x2c05bb(%rip), %rcx    # 0x58b21a
leaq 0x2c04c5(%rip), %r8     # 0x58b12b
movl $0x219, %r9d            # imm = 0x219
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2cac7a
movq 0x8(%rsp), %rdi
addq $0x40, %rdi
movq 0x8(%rsp), %rax
movq 0x38(%rax), %rsi
callq 0x2cada0
movq 0x8(%rsp), %rax
movb $0x1, 0x18(%rax)
movq 0x8(%rsp), %rax
addq $0x40, %rax
movq %rax, 0x10(%rsp)
jmp 0x2cad96
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x8(%rsp), %rcx
cmpq (%rcx), %rax
jae 0x2cad1d
movq 0x8(%rsp), %rax
movq 0x28(%rax), %rdi
callq 0xaae30
movb %al, 0x7(%rsp)
movq 0x8(%rsp), %rax
movq 0x38(%rax), %rdi
movzbl 0x7(%rsp), %esi
callq 0x2cae80
movq 0x8(%rsp), %rdi
addq $0x40, %rdi
movq 0x8(%rsp), %rax
movq 0x38(%rax), %rsi
callq 0x2cada0
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x10(%rax)
movq 0x8(%rsp), %rax
addq $0x40, %rax
movq %rax, 0x10(%rsp)
jmp 0x2cad96
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x8(%rsp), %rcx
movq (%rcx), %rcx
movq 0x8(%rsp), %rdx
movq 0x38(%rdx), %rdx
movl 0x44(%rdx), %edx
addq %rdx, %rcx
cmpq %rcx, %rax
jae 0x2cad8d
movq 0x8(%rsp), %rax
movq 0x38(%rax), %rdi
movl $0xfe, %esi
callq 0x2cae80
movq 0x8(%rsp), %rdi
addq $0x40, %rdi
movq 0x8(%rsp), %rax
movq 0x38(%rax), %rsi
callq 0x2cada0
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x10(%rax)
movq 0x8(%rsp), %rax
addq $0x40, %rax
movq %rax, 0x10(%rsp)
jmp 0x2cad96
movq $0x0, 0x10(%rsp)
movq 0x10(%rsp), %rax
addq $0x18, %rsp
retq