// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/match/esa-mmsearch.c
// Function: gt_sarrquerysubstringmatch
int gt_sarrquerysubstringmatch(const GtUchar *dbseq,
                               GtUword dblen,
                               const GtUchar *query,
                               GtUword querylen,
                               unsigned int minlength,
                               GtAlphabet *alpha,
                               GtProcessquerymatch processquerymatch,
                               void *processquerymatchinfo,
                               GtLogger *logger,
                               GtError *err)
{
  unsigned int numofchars, recommendedprefixlength;
  bool haserr = false;
  GtEncseq *dbencseq;
  GtEncseqBuilder *eb;

  gt_assert(querylen >= (GtUword) minlength && dblen >= (GtUword) minlength);
  eb = gt_encseq_builder_new(alpha);
  gt_encseq_builder_disable_multiseq_support(eb);
  gt_encseq_builder_disable_description_support(eb);
  gt_encseq_builder_set_logger(eb, logger);
  gt_encseq_builder_add_multiple_encoded(eb,dbseq,dblen);
  dbencseq = gt_encseq_builder_build(eb, err);
  gt_encseq_builder_delete(eb);
  numofchars = gt_alphabet_num_of_chars(alpha);
  recommendedprefixlength
    = gt_recommendedprefixlength(numofchars,dblen,
                                 GT_RECOMMENDED_MULTIPLIER_DEFAULT,
                                 true);
  if (gt_constructsarrandrunmmsearch(dbencseq,
                                     GT_READMODE_FORWARD,
                                     recommendedprefixlength,
                                     1U, /* parts */
                                     0, /* maximumspace */
                                     query,
                                     querylen,
                                     minlength,
                                     processquerymatch,
                                     processquerymatchinfo,
                                     NULL,
                                     false,
                                     logger,
                                     err) != 0)
  {
    haserr = true;
  }
  gt_encseq_delete(dbencseq);
  dbencseq = NULL;
  return haserr ? -1 : 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rdx, 0x8(%rsp)
movl %r8d, %eax
movq %rcx, 0x10(%rsp)
cmpq %rcx, %rax
ja 0x1a459c
movq %rsi, %r13
cmpq %rsi, %rax
ja 0x1a459c
movq %r9, %rbp
movq %rdi, %r14
movq %rax, 0x20(%rsp)
movq 0x128(%rsp), %r12
movq 0x120(%rsp), %rbx
movq %r9, %rdi
callq 0xf259c
movq %rax, %r15
movq %rax, %rdi
callq 0xf26ae
movq %r15, %rdi
callq 0xf268a
movq %r15, %rdi
movq %rbx, %rsi
callq 0xf2d92
movq %r15, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0xf2d1e
movq %r15, %rdi
movq %r12, %rsi
callq 0xf2e3b
movq %rax, %r14
movq %r15, %rdi
callq 0xf63c5
movq %rbp, %rdi
callq 0xd11be
movsd 0x1ad4c8(%rip), %xmm0   # 0x3516d8
movl %eax, %edi
movq %r13, %rsi
movl $0x1, %edx
callq 0x1e2c5c
movl %eax, %ebp
movq %r14, %rdi
callq 0xeace6
xorb $0x1, %al
leaq 0xa0(%rsp), %r9
movq $0x1, (%r9)
movq $0x3, 0x8(%r9)
movq $0x3e8, 0x10(%r9)       # imm = 0x3E8
movq $0xfa0, 0x18(%r9)       # imm = 0xFA0
xorl %r10d, %r10d
movl %r10d, 0x20(%r9)
movb %al, 0x2c(%r9)
movq %r10, 0x24(%r9)
movq %r10, 0x2d(%r9)
movl %r10d, 0x34(%r9)
movq %r14, %rdi
xorl %esi, %esi
movl %ebp, %edx
movl $0x1, %ecx
xorl %r8d, %r8d
pushq %r12
pushq %rbx
pushq %r10
pushq %r10
callq 0x1f8b92
addq $0x20, %rsp
movq %rax, %r12
testq %rax, %rax
je 0x1a4559
callq 0x1baabc
movq %rax, 0x18(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x78(%rsp)
xorl %eax, %eax
movq %rax, 0x80(%rsp)
movl $0x0, 0x88(%rsp)
movq %rax, 0x90(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x98(%rsp)
leaq 0x28(%rsp), %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x1f8bd2
testq %rax, %rax
movq 0x20(%rsp), %r15
je 0x1a454f
leaq 0x38(%rsp), %r13
movq %r14, 0x68(%rsp)
movq %r12, 0x48(%rsp)
movq %rax, %rdi
callq 0x1fcc4d
movq %rax, 0x58(%rsp)
movq 0x28(%rsp), %rbp
testq %rbp, %rbp
je 0x1a4597
movq %r14, %rdi
callq 0xe7b9c
movq %rax, 0x70(%rsp)
leaq 0x78(%rsp), %rax
movq %rax, 0x38(%rsp)
decq %rbp
movq $0x0, 0x40(%rsp)
movq $0x0, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
xorl %ebx, %ebx
leaq 0x30(%rsp), %r12
movq %rbp, 0x50(%rsp)
movq %rbx, 0x60(%rsp)
movl $0x30, %edi
leaq 0x200537(%rip), %rsi    # 0x3a48a2
movl $0xf3, %edx
callq 0x104226
movq %rax, %rbx
movq $0x0, 0x28(%rax)
subq $0x8, %rsp
movq %rax, %rdi
movq %r14, %rsi
movq 0x60(%rsp), %rdx
xorl %ecx, %ecx
movq %rbp, %r8
xorl %r9d, %r9d
pushq %r15
pushq %r13
pushq $0x0
callq 0x1a49b8
addq $0x20, %rsp
movq %r12, %rdi
movq %rbx, %rsi
callq 0x1a3ee5
testb %al, %al
je 0x1a44d5
movq 0x30(%rsp), %rbp
movq %r14, %rdi
xorl %esi, %esi
movq %rbp, %rdx
movq %r13, %rcx
callq 0x1a4eda
testb %al, %al
je 0x1a43a6
movq 0x28(%rbx), %rsi
leaq (%r15,%rbp), %r8
subq $0x8, %rsp
movq %r14, %rdi
xorl %edx, %edx
movq 0x78(%rsp), %rcx
movq %r13, %r9
pushq %r15
callq 0x1a4f20
addq $0x10, %rsp
movq %rax, %r13
movq %r14, %rdi
callq 0xec555
testb %al, %al
je 0x1a4431
movq %r14, %rdi
movq %rbp, %rsi
callq 0xeb655
movq %rax, %r15
movq %r14, %rdi
movq %rax, %rsi
callq 0xeb9d2
movq %rax, %r12
movq %r14, %rdi
movq %r15, %rsi
callq 0xeb6ee
movq %rax, %r8
jmp 0x1a443a
xorl %r15d, %r15d
xorl %r12d, %r12d
xorl %r8d, %r8d
movq 0x20(%rsp), %rcx
addq %rcx, %r13
subq %r8, %rbp
movq 0x98(%rsp), %rax
subq $0x60, %rsp
xorps %xmm0, %xmm0
movups %xmm0, 0x48(%rsp)
movq %rax, 0x40(%rsp)
xorl %eax, %eax
movq %rax, 0x38(%rsp)
movq 0x68(%rsp), %rdx
movq %rdx, 0x30(%rsp)
movq %r13, 0x28(%rsp)
movq 0x70(%rsp), %rdx
movq %rdx, 0x20(%rsp)
movq %rax, 0x10(%rsp)
movups %xmm0, (%rsp)
movl $0x0, 0x18(%rsp)
movq 0x78(%rsp), %r14
movq %r14, %rdi
movq %r13, %rsi
movq %r15, %rdx
movq %rcx, %r15
movq %rbp, %rcx
movq %r12, %r9
callq 0x1bacde
addq $0x60, %rsp
movq 0x118(%rsp), %rdi
movq %r14, %rsi
callq *0x110(%rsp)
movq 0x68(%rsp), %r14
leaq 0x38(%rsp), %r13
leaq 0x30(%rsp), %r12
jmp 0x1a43a6
movq %rbx, %rdi
callq 0x1a3f54
leaq 0x78(%rsp), %rdi
movq 0x60(%rsp), %rbx
movq %rbx, %rsi
callq 0x1a4fa7
movq 0x8(%rsp), %rdx
incq %rdx
xorl %ecx, %ecx
cmpb $-0x1, %al
sete %cl
movl $0x0, %eax
cmoveq %rax, %rdx
movq %rdx, 0x8(%rsp)
addq %rcx, 0x10(%rsp)
incq %rbx
movq %rbx, 0x40(%rsp)
movq 0x98(%rsp), %rax
subq %r15, %rax
cmpq %rax, %rbx
movq 0x50(%rsp), %rbp
jbe 0x1a435a
leaq 0x28(%rsp), %rdi
xorl %esi, %esi
movq 0x48(%rsp), %r12
movq %r12, %rdx
callq 0x1f8bd2
testq %rax, %rax
jne 0x1a42fe
movq 0x18(%rsp), %rdi
callq 0x1badd6
testq %r12, %r12
sete %bl
movq %r12, %rdi
movq 0x128(%rsp), %rsi
callq 0x1f68c4
testl %eax, %eax
setne %al
orb %bl, %al
movzbl %al, %ebx
negl %ebx
movq %r14, %rdi
callq 0xea375
movl %ebx, %eax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x620f7
callq 0x62130