// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/match/sfx-mappedstr.c
// Function: gt_kmercodeiterator_filetab_new
GtKmercodeiterator *gt_kmercodeiterator_filetab_new(
                                                const GtStrArray *filenametab,
                                                unsigned int numofchars,
                                                unsigned int kmersize,
                                                const GtUchar *symbolmap,
                                                bool plainformat,
                                                GtError *err)
{
  GtKmercodeiterator *kmercodeiterator;
  GtUchar charcode;
  bool haserr = false;
  int retval;

  gt_error_check(err);
  kmercodeiterator = gt_malloc(sizeof (*kmercodeiterator));
  kmercodeiterator->esr = NULL;
  kmercodeiterator->hasprocessedfirst = false;
  kmercodeiterator->inputexhausted = false;
  kmercodeiterator->spwp = gt_kmerstream_new(numofchars,kmersize);
  kmercodeiterator->totallength = 0;
  if (plainformat)
  {
    kmercodeiterator->fb = gt_sequence_buffer_plain_new(filenametab);
  } else
  {
    kmercodeiterator->fb = gt_sequence_buffer_new_guess_type(filenametab, err);
  }
  if (kmercodeiterator->fb == NULL)
  {
    haserr = true;
  }
  if (!haserr)
  {
    gt_sequence_buffer_set_symbolmap(kmercodeiterator->fb, symbolmap);
    for (kmercodeiterator->currentposition = 0;
         kmercodeiterator->currentposition < (GtUword) kmersize;
         kmercodeiterator->currentposition++)
    {
      retval = gt_sequence_buffer_next(kmercodeiterator->fb,&charcode,err);
      if (retval < 0)
      {
        haserr = true;
        break;
      }
      if (retval == 0)
      {
        kmercodeiterator->inputexhausted = true;
        break;
      }
      kmercodeiterator->spwp->windowwidth++;
      gt_kmerstream_updatespecialpositions(kmercodeiterator->spwp,charcode,
                                           false,0);
      kmercodeiterator->spwp->cyclicwindow[kmercodeiterator->
                                           spwp->windowwidth-1] = charcode;
    }
  }
  if (haserr)
  {
    gt_kmercodeiterator_delete(kmercodeiterator);
    return NULL;
  }
  return kmercodeiterator;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, %rbx
movl %r8d, %r13d
movq %rcx, 0x10(%rsp)
movl %edx, %ebp
movl %esi, %r12d
movq %rdi, 0x8(%rsp)
testq %r9, %r9
je 0x1f8180
movq %rbx, %rdi
callq 0x101a9a
testb %al, %al
jne 0x1f8276
leaq 0x1c968c(%rip), %rsi    # 0x3c1813
movl $0x58, %edi
movl $0x261, %edx            # imm = 0x261
callq 0x1092b2
movq %rax, %r14
xorl %r15d, %r15d
movq %r15, 0x28(%rax)
movw $0x0, 0x18(%rax)
movl %r12d, %edi
movl %ebp, %esi
callq 0x1f7ef8
movq %rax, 0x38(%r14)
movq %r15, (%r14)
testb %r13b, %r13b
je 0x1f81c8
movq 0x8(%rsp), %rdi
callq 0x11ed2f
jmp 0x1f81d5
movq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0x11abe6
movq %rax, %r15
movq %rax, 0x50(%r14)
testq %rax, %rax
je 0x1f8259
movq %r15, %rdi
movq 0x10(%rsp), %rsi
callq 0x11ad7b
movq $0x0, 0x10(%r14)
testl %ebp, %ebp
je 0x1f8254
movl %ebp, %r13d
leaq 0x7(%rsp), %r12
movq 0x50(%r14), %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x11ae1e
testl %eax, %eax
js 0x1f8259
je 0x1f824f
movq 0x38(%r14), %rdi
incl 0x48(%rdi)
movzbl 0x7(%rsp), %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x1f7c95
movb 0x7(%rsp), %al
movq 0x38(%r14), %rcx
movl 0x48(%rcx), %edx
decl %edx
movb %al, 0x20(%rcx,%rdx)
movq 0x10(%r14), %rax
incq %rax
movq %rax, 0x10(%r14)
cmpq %r13, %rax
jb 0x1f8202
jmp 0x1f8254
movb $0x1, 0x19(%r14)
testq %r15, %r15
jne 0x1f8264
movq %r14, %rdi
callq 0x1f827b
xorl %r14d, %r14d
movq %r14, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x7b168