// File: /workspace/github_c_makefile_star2_O2/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, %r14
movq %rdi, 0x30(%rsp)
andq $0x0, 0x40(%rsp)
testq %rcx, %rcx
je 0x152ada
movq %rbx, %rdi
callq 0x89eb7
testb %al, %al
jne 0x152cb6
movq (%r14), %rdi
callq 0x754dd
movq %rax, %r13
movq %r12, %rdi
callq 0xae61c
cmpq $0x1, %rax
jne 0x152c88
movq %r12, %rdi
movq %rbx, %rsi
callq 0xa70d0
movq %rax, %r15
xorl %ecx, %ecx
testq %rax, %rax
sete %al
je 0x152c29
movb %al, %cl
negl %ecx
movl %ecx, 0xc(%rsp)
movq %r13, %rdi
callq 0x56c48
movq %r15, %rdi
movq %rax, %rsi
callq 0xa61a8
movq %rbx, 0x28(%rsp)
movq %r15, 0x20(%rsp)
movq %r15, %rdi
leaq 0x50(%rsp), %rsi
leaq 0x48(%rsp), %rdx
leaq 0x40(%rsp), %rcx
movq %rbx, %r8
callq 0xa62e5
testl %eax, %eax
js 0x152c2e
je 0x152c33
movq 0x50(%rsp), %r15
movq 0x48(%rsp), %rbx
movq (%r14), %rdi
callq 0x7055e
movq %rax, %r13
leaq (%r15,%rbx), %r12
xorl %ecx, %ecx
subq $0x1, %rbx
jb 0x152c12
cmpb $-0x3, (%r15)
jbe 0x152b8f
xorl %ebp, %ebp
jmp 0x152c07
testq %r13, %r13
je 0x152c50
movq %rcx, 0x38(%rsp)
andq $0x0, 0x10(%rsp)
movq %r13, 0x18(%rsp)
movq %r13, %r10
xorl %eax, %eax
xorl %ebp, %ebp
cmpq %r10, %rax
ja 0x152bff
leaq (%r15,%rbp), %rcx
cmpq %r12, %rcx
jae 0x152bff
movb (%rcx), %dl
cmpb $-0x3, %dl
ja 0x152bff
movq (%r14), %rdi
movl 0x48(%r14), %esi
movq 0x58(%r14), %rcx
subq $0x8, %rsp
movzbl %dl, %r9d
movq %r13, %rdx
leaq 0x18(%rsp), %r8
pushq %r10
pushq %rax
pushq %rbp
callq 0x15392c
addq $0x20, %rsp
testb %al, %al
je 0x152bff
incq %rbp
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %r10
jmp 0x152baf
incq %rbp
movq 0x38(%rsp), %rcx
addq %rbp, %rcx
incq %r15
jmp 0x152b7b
movq 0x30(%rsp), %rax
addq %rcx, (%rax)
movq 0x28(%rsp), %rbx
movq 0x20(%rsp), %r15
jmp 0x152b38
pushq $-0x1
popq %rbx
jmp 0x152c3f
pushq $-0x1
popq %rbx
jmp 0x152c37
movl 0xc(%rsp), %ebx
movq %r15, %rdi
callq 0xa6389
movl %ebx, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x2e5311(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1923b2(%rip), %rsi    # 0x2e5013
leaq 0x1f29d5(%rip), %rdx    # 0x34563d
leaq 0x1f29db(%rip), %rcx    # 0x34564a
leaq 0x1f2871(%rip), %r8     # 0x3454e7
movl $0x1a4, %r9d            # imm = 0x1A4
xorl %eax, %eax
callq 0x17a50
callq 0x17390
movq 0x2e52d9(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x19237a(%rip), %rsi    # 0x2e5013
leaq 0x1f2879(%rip), %rdx    # 0x345519
leaq 0x1f2857(%rip), %rcx    # 0x3454fe
leaq 0x1f2839(%rip), %r8     # 0x3454e7
movl $0x1f3, %r9d            # imm = 0x1F3
jmp 0x152c7c
movq 0x2e52ab(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x19234c(%rip), %rsi    # 0x2e5013
leaq 0x1924f1(%rip), %rdx    # 0x2e51bf
leaq 0x1f2829(%rip), %rcx    # 0x3454fe
leaq 0x1f280b(%rip), %r8     # 0x3454e7
movl $0x1f1, %r9d            # imm = 0x1F1
jmp 0x152c7c