// File: /workspace/github_c_makefile_star2_O1/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 0x1acfac
movq %rsi, %r13
cmpq %rsi, %rax
ja 0x1acfac
movq %r9, %rbp
movq %rdi, %r14
movq %rax, 0x20(%rsp)
movq 0x128(%rsp), %r12
movq 0x120(%rsp), %rbx
movq %r9, %rdi
callq 0xf6be5
movq %rax, %r15
movq %rax, %rdi
callq 0xf6cf7
movq %r15, %rdi
callq 0xf6cd3
movq %r15, %rdi
movq %rbx, %rsi
callq 0xf73c6
movq %r15, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0xf734b
movq %r15, %rdi
movq %r12, %rsi
callq 0xf748b
movq %rax, %r14
movq %r15, %rdi
callq 0xfaad7
movq %rbp, %rdi
callq 0xd3713
movsd 0x1adaf0(%rip), %xmm0   # 0x35a710
movl %eax, %edi
movq %r13, %rsi
movl $0x1, %edx
callq 0x1ec4ec
movl %eax, %ebp
movq %r14, %rdi
callq 0xef298
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)
movl %r10d, 0x2d(%r9)
movq %r10, 0x30(%r9)
movq %r10, 0x24(%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 0x2022b4
addq $0x20, %rsp
movq %rax, %r12
testq %rax, %rax
je 0x1acf69
callq 0x1c3820
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 0x2022f4
testq %rax, %rax
movq 0x20(%rsp), %r15
je 0x1acf5f
leaq 0x38(%rsp), %r13
movq %r14, 0x68(%rsp)
movq %r12, 0x48(%rsp)
movq %rax, %rdi
callq 0x20634c
movq %rax, 0x58(%rsp)
movq 0x28(%rsp), %rbp
testq %rbp, %rbp
je 0x1acfa7
movq %r14, %rdi
callq 0xec1d8
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 0x2010c9(%rip), %rsi    # 0x3ade44
movl $0xf3, %edx
callq 0x1092b2
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 0x1ad417
addq $0x20, %rsp
movq %r12, %rdi
movq %rbx, %rsi
callq 0x1ac8f9
testb %al, %al
je 0x1acee5
movq 0x30(%rsp), %rbp
movq %r14, %rdi
xorl %esi, %esi
movq %rbp, %rdx
movq %r13, %rcx
callq 0x1ad9b7
testb %al, %al
je 0x1acdb6
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 0x1ad9fd
addq $0x10, %rsp
movq %rax, %r13
movq %r14, %rdi
callq 0xf0b51
testb %al, %al
je 0x1ace41
movq %r14, %rdi
movq %rbp, %rsi
callq 0xefc48
movq %rax, %r15
movq %r14, %rdi
movq %rax, %rsi
callq 0xeffd3
movq %rax, %r12
movq %r14, %rdi
movq %r15, %rsi
callq 0xefce0
movq %rax, %r8
jmp 0x1ace4a
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 0x1c3a3d
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 0x1acdb6
movq %rbx, %rdi
callq 0x1ac968
leaq 0x78(%rsp), %rdi
movq 0x60(%rsp), %rbx
movq %rbx, %rsi
callq 0x1ada8f
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 0x1acd6a
leaq 0x28(%rsp), %rdi
xorl %esi, %esi
movq 0x48(%rsp), %r12
movq %r12, %rdx
callq 0x2022f4
testq %rax, %rax
jne 0x1acd0e
movq 0x18(%rsp), %rdi
callq 0x1c3b35
testq %r12, %r12
sete %bl
movq %r12, %rdi
movq 0x128(%rsp), %rsi
callq 0x200058
testl %eax, %eax
setne %al
orb %bl, %al
movzbl %al, %ebx
negl %ebx
movq %r14, %rdi
callq 0xee90c
movl %ebx, %eax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x6379d
callq 0x637d6