// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/esa-mmsearch.c
// Function: gt_queryuniquematch
void gt_queryuniquematch(bool selfmatch,
                         const Suffixarray *suffixarray,
                         uint64_t queryunitnum,
                         GtQueryrepresentation *queryrep,
                         GtUword minmatchlength,
                         GtProcessquerymatch processquerymatch,
                         void *processquerymatchinfo,
                         GtQuerymatch *querymatchspaceptr)
{
  GtUword offset, totallength = gt_encseq_total_length(suffixarray->encseq),
          localqueryoffset = 0;
  uint64_t localqueryunitnum = queryunitnum;

  gt_assert(!selfmatch && queryrep->seqlen >= minmatchlength);
  /*XXX gt_assert(!gt_querymatch_seq_desc_display(querymatchspaceptr));*/
  for (offset = 0; offset <= queryrep->seqlen - minmatchlength; offset++)
  {
    GtUword matchlen, dbstart;

    matchlen = gt_suffixarrayfindmums (suffixarray,
                                       0,
                                       0, /* leftbound */
                                       totallength, /* rightbound */
                                       &dbstart,
                                       queryrep->sequence + offset,
                                       queryrep->sequence + queryrep->seqlen);
    if (dbstart != ULONG_MAX &&
        matchlen >= minmatchlength &&
        gt_mum_isleftmaximal(suffixarray->encseq,
                             suffixarray->readmode,
                             dbstart,
                             offset,
                             queryrep->sequence))
    {
      GtUword dbseqnum = gt_encseq_seqnum(suffixarray->encseq,dbstart),
              dbseqlen = gt_encseq_seqlength(suffixarray->encseq,dbseqnum),
              db_seqstart = gt_encseq_seqstartpos(suffixarray->encseq,dbseqnum);

      gt_querymatch_init(querymatchspaceptr,
                         matchlen,
                         dbseqnum,
                         dbstart - db_seqstart,
                         db_seqstart,
                         dbseqlen,
                         0, /* score */
                         0, /* edist */
                         0, /* mismatches */
                         selfmatch,
                         localqueryunitnum,
                         matchlen,
                         localqueryoffset,
                         0,
                         queryrep->seqlen,
                         NULL,
                         NULL);
      processquerymatch(processquerymatchinfo,querymatchspaceptr);
    }
    if (queryrep->sequence[offset] == (GtUchar) GT_SEPARATOR)
    {
      localqueryunitnum++;
      localqueryoffset = 0;
    } else
    {
      localqueryoffset++;
    }
  }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movb %dil, %al
movq 0xf8(%rsp), %rdi
movq 0xf0(%rsp), %rdi
andb $0x1, %al
movb %al, 0xcf(%rsp)
movq %rsi, 0xc0(%rsp)
movq %rdx, 0xb8(%rsp)
movq %rcx, 0xb0(%rsp)
movq %r8, 0xa8(%rsp)
movq %r9, 0xa0(%rsp)
movq 0xc0(%rsp), %rax
movq (%rax), %rdi
callq 0xa9d00
movq %rax, 0x90(%rsp)
movq $0x0, 0x88(%rsp)
movq 0xb8(%rsp), %rax
movq %rax, 0x80(%rsp)
testb $0x1, 0xcf(%rsp)
jne 0x2385a3
movq 0xb0(%rsp), %rax
movq 0x20(%rax), %rax
cmpq 0xa8(%rsp), %rax
jae 0x2385db
movq 0x4039f6(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2dda5f(%rip), %rsi    # 0x516013
leaq 0x33eb1e(%rip), %rdx    # 0x5770d9
leaq 0x33eb48(%rip), %rcx    # 0x57710a
leaq 0x33eaa1(%rip), %r8     # 0x57706a
movl $0x1b4, %r9d            # imm = 0x1B4
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2385dd
movq $0x0, 0x98(%rsp)
movq 0x98(%rsp), %rax
movq 0xb0(%rsp), %rcx
movq 0x20(%rcx), %rcx
subq 0xa8(%rsp), %rcx
cmpq %rcx, %rax
ja 0x23883e
movq 0xc0(%rsp), %rdi
movq 0x90(%rsp), %rcx
movq 0xb0(%rsp), %rax
movq (%rax), %r9
addq 0x98(%rsp), %r9
movq 0xb0(%rsp), %rax
movq (%rax), %rax
movq 0xb0(%rsp), %rdx
addq 0x20(%rdx), %rax
xorl %edx, %edx
leaq 0x70(%rsp), %r8
movq %rdx, %rsi
movq %rax, (%rsp)
callq 0x237e20
movq %rax, 0x78(%rsp)
cmpq $-0x1, 0x70(%rsp)
je 0x2387cf
movq 0x78(%rsp), %rax
cmpq 0xa8(%rsp), %rax
jb 0x2387cf
movq 0xc0(%rsp), %rax
movq (%rax), %rdi
movq 0xc0(%rsp), %rax
movl 0x48(%rax), %esi
movq 0x70(%rsp), %rdx
movq 0x98(%rsp), %rcx
movq 0xb0(%rsp), %rax
movq (%rax), %r8
callq 0x238850
testb $0x1, %al
jne 0x2386bb
jmp 0x2387cf
movq 0xc0(%rsp), %rax
movq (%rax), %rdi
movq 0x70(%rsp), %rsi
callq 0xb03a0
movq %rax, 0x68(%rsp)
movq 0xc0(%rsp), %rax
movq (%rax), %rdi
movq 0x68(%rsp), %rsi
callq 0xb09f0
movq %rax, 0x60(%rsp)
movq 0xc0(%rsp), %rax
movq (%rax), %rdi
movq 0x68(%rsp), %rsi
callq 0xb0530
movq %rax, 0x58(%rsp)
movq 0xf8(%rsp), %rdi
movq 0x78(%rsp), %rsi
movq 0x68(%rsp), %rdx
movq 0x70(%rsp), %rcx
subq 0x58(%rsp), %rcx
movq 0x58(%rsp), %r8
movq 0x60(%rsp), %r9
movb 0xcf(%rsp), %bpl
movq 0x80(%rsp), %rbx
movq 0x78(%rsp), %r11
movq 0x88(%rsp), %r10
movq 0xb0(%rsp), %rax
movq 0x20(%rax), %rax
xorl %r14d, %r14d
andb $0x1, %bpl
movq $0x0, (%rsp)
movq $0x0, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movzbl %bpl, %ebp
movl %ebp, 0x18(%rsp)
movq %rbx, 0x20(%rsp)
movq %r11, 0x28(%rsp)
movq %r10, 0x30(%rsp)
movq $0x0, 0x38(%rsp)
movq %rax, 0x40(%rsp)
movq $0x0, 0x48(%rsp)
movq $0x0, 0x50(%rsp)
callq 0x267890
movq 0xa0(%rsp), %rax
movq 0xf0(%rsp), %rdi
movq 0xf8(%rsp), %rsi
callq *%rax
movq 0xb0(%rsp), %rax
movq (%rax), %rax
movq 0x98(%rsp), %rcx
movzbl (%rax,%rcx), %eax
cmpl $0xff, %eax
jne 0x23880f
movq 0x80(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x80(%rsp)
movq $0x0, 0x88(%rsp)
jmp 0x238823
movq 0x88(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x88(%rsp)
jmp 0x238825
movq 0x98(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x98(%rsp)
jmp 0x2385e9
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nopw (%rax,%rax)