// File: /workspace/github_c_makefile_star2_O0/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 %r14
pushq %rbx
subq $0x90, %rsp
movq 0xc8(%rsp), %rax
movq 0xc0(%rsp), %rax
movq 0xb8(%rsp), %rax
movq 0xb0(%rsp), %rax
movq %rdi, 0x88(%rsp)
movq %rsi, 0x80(%rsp)
movq %rdx, 0x78(%rsp)
movq %rcx, 0x70(%rsp)
movl %r8d, 0x6c(%rsp)
movq %r9, 0x60(%rsp)
movb $0x0, 0x57(%rsp)
movq 0x70(%rsp), %rax
movl 0x6c(%rsp), %ecx
cmpq %rcx, %rax
jb 0x238953
movq 0x80(%rsp), %rax
movl 0x6c(%rsp), %ecx
cmpq %rcx, %rax
jae 0x23898b
movq 0x403646(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2dd6af(%rip), %rsi    # 0x516013
leaq 0x33e7b3(%rip), %rdx    # 0x57711e
leaq 0x33e7ec(%rip), %rcx    # 0x57715e
leaq 0x33e6f1(%rip), %r8     # 0x57706a
movl $0x2a7, %r9d            # imm = 0x2A7
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x23898d
movq 0x60(%rsp), %rdi
callq 0xbbec0
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rdi
callq 0xbc2f0
movq 0x40(%rsp), %rdi
callq 0xbc230
movq 0x40(%rsp), %rdi
movq 0xc0(%rsp), %rsi
callq 0xbd420
movq 0x40(%rsp), %rdi
movq 0x88(%rsp), %rsi
movq 0x80(%rsp), %rdx
callq 0xbd2e0
movq 0x40(%rsp), %rdi
movq 0xc8(%rsp), %rsi
callq 0xbd620
movq %rax, 0x48(%rsp)
movq 0x40(%rsp), %rdi
callq 0xc29a0
movq 0x60(%rsp), %rdi
callq 0x7e8c0
movl %eax, 0x5c(%rsp)
movl 0x5c(%rsp), %edi
movq 0x80(%rsp), %rsi
movsd 0x2e9d39(%rip), %xmm0   # 0x522758
movl $0x1, %edx
callq 0x2b12f0
movl %eax, 0x58(%rsp)
movq 0x48(%rsp), %rdi
movl 0x58(%rsp), %edx
movq 0x78(%rsp), %r9
movq 0x70(%rsp), %r14
movl 0x6c(%rsp), %ebp
movq 0xb0(%rsp), %rbx
movq 0xb8(%rsp), %r11
movq 0xc0(%rsp), %r10
movq 0xc8(%rsp), %rax
xorl %esi, %esi
movl $0x1, %ecx
xorl %r8d, %r8d
movq %r14, (%rsp)
movl %ebp, 0x8(%rsp)
movq %rbx, 0x10(%rsp)
movq %r11, 0x18(%rsp)
movq $0x0, 0x20(%rsp)
movl $0x0, 0x28(%rsp)
movq %r10, 0x30(%rsp)
movq %rax, 0x38(%rsp)
callq 0x238ae0
cmpl $0x0, %eax
je 0x238aaa
movb $0x1, 0x57(%rsp)
movq 0x48(%rsp), %rdi
callq 0xae070
movq $0x0, 0x48(%rsp)
movb 0x57(%rsp), %dl
xorl %eax, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
testb $0x1, %dl
cmovnel %ecx, %eax
addq $0x90, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nopw (%rax,%rax)