// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/match/esa-shulen.c
// Function: gt_esa2shulengthqueryfiles
int gt_esa2shulengthqueryfiles(GtUword *totalgmatchlength,
                               const Suffixarray *suffixarray,
                               const GtStrArray *queryfilenames,
                               GtError *err)
{
  bool haserr = false;
  GtSeqIterator *seqit;
  const GtUchar *query;
  GtUword querylen;
  char *desc = NULL;
  int retval;
  GtAlphabet *alphabet;

  gt_error_check(err);
  alphabet = gt_encseq_alphabet(suffixarray->encseq);
  gt_assert(gt_str_array_size(queryfilenames) == 1UL);
  seqit = gt_seq_iterator_sequence_buffer_new(queryfilenames, err);
  if (!seqit)
  {
    haserr = true;
  }
  if (!haserr)
  {
    gt_seq_iterator_set_symbolmap(seqit, gt_alphabet_symbolmap(alphabet));
    for (; /* Nothing */; )
    {
      retval = gt_seq_iterator_next(seqit,
                                   &query,
                                   &querylen,
                                   &desc,
                                   err);
      if (retval < 0)
      {
        haserr = true;
        break;
      }
      if (retval == 0)
      {
        break;
      }
      *totalgmatchlength += gt_esa2shulengthquery(suffixarray,query,querylen);
    }
    gt_seq_iterator_delete(seqit);
  }
  return haserr ? -1 : 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rcx, %rbx
movq %rdx, %r12
movq %rsi, 0x8(%rsp)
movq %rdi, 0x50(%rsp)
movq $0x0, 0x18(%rsp)
testq %rcx, %rcx
je 0x1af263
movq %rbx, %rdi
callq 0x101a9a
testb %al, %al
jne 0x1af43c
movq 0x8(%rsp), %rax
movq (%rax), %rdi
callq 0xf02da
movq %rax, %r13
movq %r12, %rdi
callq 0x121e78
cmpq $0x1, %rax
jne 0x1af437
movq %r12, %rdi
movq %rbx, %rsi
callq 0x11a648
movq %rax, %r15
testq %rax, %rax
sete %al
je 0x1af41e
movb %al, 0x7(%rsp)
movq %r13, %rdi
callq 0xd3700
movq %r15, %rdi
movq %rax, %rsi
callq 0x119998
leaq 0x28(%rsp), %rsi
leaq 0x20(%rsp), %rdx
leaq 0x18(%rsp), %rcx
movq %r15, %rdi
movq %rbx, %r8
callq 0x119a11
testl %eax, %eax
js 0x1af40c
movq %rbx, 0x48(%rsp)
movq %r15, 0x40(%rsp)
testl %eax, %eax
je 0x1af410
movq 0x28(%rsp), %r15
movq 0x20(%rsp), %rbx
movq 0x8(%rsp), %rax
movq (%rax), %rdi
callq 0xec1d8
testq %rbx, %rbx
je 0x1af3d8
leaq (%r15,%rbx), %rcx
movq %rcx, 0x10(%rsp)
leaq 0x1(%r15), %rbp
xorl %r12d, %r12d
cmpb $-0x3, (%r15)
jbe 0x1af327
xorl %ecx, %ecx
jmp 0x1af3c4
testq %rax, %rax
je 0x1af432
movq $0x0, 0x30(%rsp)
movq %rax, 0x38(%rsp)
movl $0x1, %ecx
cmpq 0x10(%rsp), %r15
jae 0x1af3c4
movq %rax, %r11
xorl %r10d, %r10d
xorl %r13d, %r13d
movb (%r15,%r13), %dl
cmpb $-0x3, %dl
ja 0x1af3b6
movq 0x8(%rsp), %rcx
movq (%rcx), %rdi
movl 0x48(%rcx), %esi
movq 0x58(%rcx), %rcx
subq $0x8, %rsp
movzbl %dl, %r9d
movq %rax, %r14
movq %rax, %rdx
leaq 0x38(%rsp), %r8
pushq %r11
pushq %r10
pushq %r13
callq 0x1afe94
addq $0x20, %rsp
testb %al, %al
je 0x1af3bb
leaq 0x1(%r13), %rcx
movq 0x30(%rsp), %r10
movq 0x38(%rsp), %r11
cmpq %r11, %r10
ja 0x1af3be
addq %rbp, %r13
cmpq 0x10(%rsp), %r13
movq %rcx, %r13
movq %r14, %rax
jb 0x1af353
jmp 0x1af3c1
movq %r13, %rcx
jmp 0x1af3c1
movq %r13, %rcx
movq %r14, %rax
incq %rcx
addq %rcx, %r12
incq %r15
incq %rbp
decq %rbx
jne 0x1af31a
jmp 0x1af3db
xorl %r12d, %r12d
movq 0x50(%rsp), %rax
addq %r12, (%rax)
movq 0x40(%rsp), %r15
movq %r15, %rdi
leaq 0x28(%rsp), %rsi
leaq 0x20(%rsp), %rdx
leaq 0x18(%rsp), %rcx
movq 0x48(%rsp), %r8
callq 0x119a11
testl %eax, %eax
jns 0x1af2e2
movb $0x1, %bl
jmp 0x1af414
movb 0x7(%rsp), %bl
movq %r15, %rdi
callq 0x119a53
movl %ebx, %eax
movzbl %al, %eax
negl %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x64364
callq 0x6432b
callq 0x642f2