// File: /workspace/github_c_makefile_star2_O2/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 $0x128, %rsp            # imm = 0x128
movq %rdx, 0x58(%rsp)
movl %r8d, %eax
movq %rcx, 0x60(%rsp)
cmpq %rcx, %rax
ja 0x1503db
movq %rsi, %r13
cmpq %rsi, %rax
ja 0x1503db
movq %r9, %rbp
movq %rdi, %r14
movq %rax, 0x78(%rsp)
movq 0x178(%rsp), %r12
movq 0x170(%rsp), %rbx
movq %r9, %rdi
callq 0x7d613
movq %rax, %r15
movq %rax, %rdi
callq 0x7d921
movq %r15, %rdi
callq 0x7d897
movq %r15, %rdi
movq %rbx, %rsi
callq 0x7e319
movq %r15, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x7e239
movq %r15, %rdi
movq %r12, %rsi
callq 0x7e427
movq %rax, %r14
movq %r15, %rdi
callq 0x81ac8
movq %rbp, %rdi
callq 0x56c8e
movsd 0x1a16b3(%rip), %xmm0   # 0x2f16e8
pushq $0x1
popq %rbp
movl %eax, %edi
movq %r13, %rsi
movl %ebp, %edx
callq 0x191cf8
movl %eax, %r15d
movq %r14, %rdi
callq 0x740b6
xorb $0x1, %al
leaq 0xf0(%rsp), %r9
movq $0x1, (%r9)
movq $0x3, 0x8(%r9)
movq $0x3e8, 0x10(%r9)       # imm = 0x3E8
movq $0xfa0, 0x18(%r9)       # imm = 0xFA0
andl $0x0, 0x20(%r9)
movb %al, 0x2c(%r9)
andq $0x0, 0x24(%r9)
andq $0x0, 0x2d(%r9)
andl $0x0, 0x34(%r9)
andl $0x0, 0x8(%rsp)
andq $0x0, (%rsp)
movq %r12, 0x18(%rsp)
movq %rbx, 0x10(%rsp)
movq %r14, %rdi
xorl %esi, %esi
movl %r15d, %edx
movl %ebp, %ecx
xorl %r8d, %r8d
callq 0x1ab581
movq %rax, 0x68(%rsp)
testq %rax, %rax
je 0x150363
callq 0x169e40
leaq 0xc8(%rsp), %rcx
movq 0x58(%rsp), %rdx
movq %rdx, (%rcx)
andq $0x0, 0x8(%rcx)
movq %rax, 0x70(%rsp)
andl $0x0, 0x10(%rcx)
andq $0x0, 0x18(%rcx)
movq 0x60(%rsp), %rax
movq %rax, 0x20(%rcx)
leaq 0xb8(%rsp), %r13
leaq 0x80(%rsp), %rbp
movq 0x78(%rsp), %rbx
movq %r14, 0xa0(%rsp)
leaq 0xb0(%rsp), %rdi
xorl %esi, %esi
movq 0x68(%rsp), %rdx
callq 0x1ab5be
testq %rax, %rax
je 0x150359
movq %rax, %rdi
callq 0x1afe33
movq %rax, 0x90(%rsp)
movq 0xb0(%rsp), %r15
testq %r15, %r15
je 0x1503a3
movq %r14, %rdi
callq 0x7055e
movq %rax, 0xa8(%rsp)
leaq 0xc8(%rsp), %rax
movq %rax, 0xb8(%rsp)
decq %r15
xorl %r12d, %r12d
movq $0x0, 0x60(%rsp)
movq $0x0, 0x58(%rsp)
movq %r15, 0x88(%rsp)
movq %r12, 0xc0(%rsp)
movq 0xe8(%rsp), %rax
subq %rbx, %rax
cmpq %rax, %r12
ja 0x150112
movq %r12, 0x98(%rsp)
movq %rbx, 0x8(%rsp)
movq %r13, (%rsp)
movq %r14, %rdi
movq 0x90(%rsp), %rsi
xorl %edx, %edx
movq %r15, %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x14fbd9
movq %rax, %r12
movq %rbp, %rdi
movq %r12, %rsi
callq 0x14fc8c
testb %al, %al
je 0x150307
movq 0x80(%rsp), %r15
movq %r14, %rdi
xorl %esi, %esi
movq %r15, %rdx
movq %r13, %rcx
callq 0x150ef2
testb %al, %al
je 0x1501db
movq 0x28(%r12), %rsi
leaq (%r15,%rbx), %r8
movq %rbx, (%rsp)
movq %r14, %rdi
xorl %edx, %edx
movq 0xa8(%rsp), %rcx
movq %r13, %r9
callq 0x150f38
movq %rax, %r13
movq %r14, %rdi
callq 0x76086
testb %al, %al
je 0x150267
movq %r14, %rdi
movq %r15, %rsi
callq 0x74c9d
movq %rax, %rbx
movq %r14, %rdi
movq %rax, %rsi
callq 0x75173
movq %rax, %rbp
movq %r14, %rdi
movq %rbx, %rsi
callq 0x74d9c
movq %rax, %r8
jmp 0x15026e
xorl %ebx, %ebx
xorl %ebp, %ebp
xorl %r8d, %r8d
movq 0x78(%rsp), %rcx
addq %rcx, %r13
subq %r8, %r15
movq 0xe8(%rsp), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x48(%rsp)
movq %rax, 0x40(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x30(%rsp)
movq %r13, 0x28(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x20(%rsp)
movups %xmm0, (%rsp)
andq $0x0, 0x38(%rsp)
andl $0x0, 0x18(%rsp)
andq $0x0, 0x10(%rsp)
movq 0x70(%rsp), %r14
movq %r14, %rdi
movq %r13, %rsi
movq %rbx, %rdx
movq %rcx, %rbx
movq %r15, %rcx
movq %rbp, %r9
callq 0x16a116
movq 0x168(%rsp), %rdi
movq %r14, %rsi
callq *0x160(%rsp)
movq 0xa0(%rsp), %r14
leaq 0xb8(%rsp), %r13
leaq 0x80(%rsp), %rbp
jmp 0x1501db
movq %r12, %rdi
callq 0x14fd61
leaq 0xc8(%rsp), %rdi
movq 0x98(%rsp), %r12
movq %r12, %rsi
callq 0x150fd3
movq 0x58(%rsp), %rdx
incq %rdx
xorl %ecx, %ecx
cmpb $-0x1, %al
sete %cl
movl $0x0, %eax
cmoveq %rax, %rdx
movq %rdx, 0x58(%rsp)
addq %rcx, 0x60(%rsp)
incq %r12
movq 0x88(%rsp), %r15
jmp 0x150190
movq 0x70(%rsp), %rdi
callq 0x16a2a1
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
sete %bl
movq 0x178(%rsp), %rsi
callq 0x1a8f90
testl %eax, %eax
setne %al
orb %bl, %al
movzbl %al, %ebx
negl %ebx
movq %r14, %rdi
callq 0x735fd
movl %ebx, %eax
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x2e7bbe(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x194c5f(%rip), %rsi    # 0x2e5013
leaq 0x1f4fef(%rip), %rdx    # 0x3453aa
leaq 0x1f4baa(%rip), %rcx    # 0x344f6c
leaq 0x1f4859(%rip), %r8     # 0x344c22
movl $0x1fc, %r9d            # imm = 0x1FC
xorl %eax, %eax
callq 0x17a50
callq 0x17390
movq 0x2e7b86(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x194c27(%rip), %rsi    # 0x2e5013
leaq 0x1f48e3(%rip), %rdx    # 0x344cd6
leaq 0x1f491c(%rip), %rcx    # 0x344d16
leaq 0x1f4821(%rip), %r8     # 0x344c22
movl $0x2a7, %r9d            # imm = 0x2A7
jmp 0x1503cf