// File: /workspace/github_c_makefile_star2_O3/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, %r15
movq %rdx, %r12
movq %rsi, (%rsp)
movq %rdi, 0x50(%rsp)
movq $0x0, 0x18(%rsp)
testq %rcx, %rcx
je 0x1a65ed
movq %r15, %rdi
callq 0xfcc32
testb %al, %al
jne 0x1a67ce
movq (%rsp), %rax
movq (%rax), %rdi
callq 0xebcd9
movq %rax, %r13
movq %r12, %rdi
callq 0x11c131
cmpq $0x1, %rax
jne 0x1a67c9
movq %r12, %rdi
movq %r15, %rsi
callq 0x114f10
testq %rax, %rax
sete %bl
je 0x1a67a0
movq %rax, %r12
movq %r13, %rdi
callq 0xd11ab
movq %r12, %rdi
movq %rax, %rsi
callq 0x1142c4
leaq 0x28(%rsp), %rsi
leaq 0x20(%rsp), %rdx
leaq 0x18(%rsp), %rcx
movq %r12, %rdi
movq %r15, %r8
callq 0x11433d
testl %eax, %eax
js 0x1a6799
xorl %ecx, %ecx
movb %bl, %cl
negl %ecx
movl %ecx, 0xc(%rsp)
movq %r15, 0x48(%rsp)
movq %r12, 0x40(%rsp)
testl %eax, %eax
je 0x1a67a7
movq 0x28(%rsp), %r15
movq 0x20(%rsp), %rbx
movq (%rsp), %rax
movq (%rax), %rdi
callq 0xe7b9c
testq %rbx, %rbx
je 0x1a6765
leaq (%r15,%rbx), %rcx
movq %rcx, 0x10(%rsp)
leaq 0x1(%r15), %rbp
xorl %r12d, %r12d
cmpb $-0x3, (%r15)
jbe 0x1a66b5
xorl %ecx, %ecx
jmp 0x1a6751
testq %rax, %rax
je 0x1a67c4
movq $0x0, 0x30(%rsp)
movq %rax, 0x38(%rsp)
movl $0x1, %ecx
cmpq 0x10(%rsp), %r15
jae 0x1a6751
movq %rax, %r11
xorl %r10d, %r10d
xorl %r13d, %r13d
movb (%r15,%r13), %dl
cmpb $-0x3, %dl
ja 0x1a6743
movq (%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 0x1a7280
addq $0x20, %rsp
testb %al, %al
je 0x1a6748
leaq 0x1(%r13), %rcx
movq 0x30(%rsp), %r10
movq 0x38(%rsp), %r11
cmpq %r11, %r10
ja 0x1a674b
addq %rbp, %r13
cmpq 0x10(%rsp), %r13
movq %rcx, %r13
movq %r14, %rax
jb 0x1a66e1
jmp 0x1a674e
movq %r13, %rcx
jmp 0x1a674e
movq %r13, %rcx
movq %r14, %rax
incq %rcx
addq %rcx, %r12
incq %r15
incq %rbp
decq %rbx
jne 0x1a66a8
jmp 0x1a6768
xorl %r12d, %r12d
movq 0x50(%rsp), %rax
addq %r12, (%rax)
movq 0x40(%rsp), %r12
movq %r12, %rdi
leaq 0x28(%rsp), %rsi
leaq 0x20(%rsp), %rdx
leaq 0x18(%rsp), %rcx
movq 0x48(%rsp), %r8
callq 0x11433d
testl %eax, %eax
jns 0x1a6671
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x1a67ab
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x1a67b3
movl 0xc(%rsp), %ebx
movq %r12, %rdi
callq 0x11437f
movl %ebx, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x62c85
callq 0x62c4c
callq 0x62c13