// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/cgr_spacedseed.c
// Function: gt_matchspacedseed
int gt_matchspacedseed(bool withesa,
                    bool docompare,
                    const char *inputindex,
                    const GtStrArray *queryfilenames,
                    bool verbose,
                    GtError *err)
{
  Genericindex *genericindex = NULL;
  bool haserr = false;
  Spacedseed *spse;
  GtLogger *logger;

  logger = gt_logger_new(verbose, GT_LOGGER_DEFLT_PREFIX, stdout);
  /*
  spse = spacedseed_new("11011011000011011",err);
  */
  spse = spacedseed_new("111001001001010111",err);
  if (spse == NULL)
  {
    haserr = true;
  }
  if (!haserr)
  {
    genericindex = genericindex_new(inputindex,withesa,
                                    withesa && docompare,false,false,
                                    0,logger,err);
    if (genericindex == NULL)
    {
      haserr = true;
    }
  }
  if (!haserr && docompare)
  {
    gt_assert(genericindex != NULL);
    gt_assert(spse != NULL);
    /*
    iteroverallwords(genericindex->suffixarray->encseq,spse->seedwidth,
          0,gt_encseq_total_length(genericindex->suffixarray->encseq));
    iteroverallwords2(genericindex->suffixarray->encseq,spse->seedwidth,
            0,
            gt_encseq_total_length(genericindex->suffixarray->encseq));
    */
  }
  if (!haserr)
  {
    GtSeqIterator *seqit;
    const GtUchar *query;
    GtUword querylen;
    char *desc = NULL;
    int retval;
    Limdfsresources *limdfsresources = NULL;
    const AbstractDfstransformer *dfst;
    const GtEncseq *encseq;

    dfst = gt_spse_AbstractDfstransformer();
    gt_assert(genericindex != NULL);
    limdfsresources = gt_newLimdfsresources(genericindex,
                                         true,
                                         0,
                                         (GtUword) GT_INTWORDSIZE,
                                         false, /* keepexpandedonstack */
                                         cgr_showmatch,
                                         NULL, /* processmatch info */
                                         NULL, /* processresult */
                                         NULL, /* processresult info */
                                         dfst);
    encseq = genericindex_getencseq(genericindex);
    seqit = gt_seq_iterator_sequence_buffer_new(queryfilenames, err);
    if (!seqit)
      haserr = true;
    if (!haserr)
    {
      GtAlphabet *a = gt_encseq_alphabet(encseq);
      gt_seq_iterator_set_symbolmap(seqit, gt_alphabet_symbolmap(a));
      for (/*Nothing*/; /* Nothing */; /*Nothing*/)
      {
        retval = gt_seq_iterator_next(seqit,
                                     &query,
                                     &querylen,
                                     &desc,
                                     err);
        if (retval < 0)
        {
          haserr = true;
          break;
        }
        if (retval == 0)
        {
          break;
        }
        singlequerymatchspacedseed(limdfsresources,
                                   dfst,
                                   query,
                                   querylen,
                                   spse);
      }
      if (limdfsresources != NULL)
      {
        gt_freeLimdfsresources(&limdfsresources,dfst);
      }
      gt_seq_iterator_delete(seqit);
    }
  }
  genericindex_delete(genericindex);
  spacedseed_delete(spse);
  gt_logger_delete(logger);
  return haserr ? -1 : 0;
}

// Assembly:
subq $0xc8, %rsp
movb %r8b, %al
andb $0x1, %dil
movb %dil, 0xc7(%rsp)
andb $0x1, %sil
movb %sil, 0xc6(%rsp)
movq %rdx, 0xb8(%rsp)
movq %rcx, 0xb0(%rsp)
andb $0x1, %al
movb %al, 0xaf(%rsp)
movq %r9, 0xa0(%rsp)
movq $0x0, 0x98(%rsp)
movb $0x0, 0x97(%rsp)
movb 0xaf(%rsp), %al
movq 0x435263(%rip), %rcx    # 0x63bf38
movq (%rcx), %rdx
leaq 0x310c0d(%rip), %rsi    # 0x5178ec
andb $0x1, %al
movzbl %al, %edi
callq 0xe7870
movq %rax, 0x80(%rsp)
movq 0xa0(%rsp), %rsi
leaq 0x36a6f2(%rip), %rdi    # 0x5713f2
callq 0x207070
movq %rax, 0x88(%rsp)
cmpq $0x0, 0x88(%rsp)
jne 0x206d20
movb $0x1, 0x97(%rsp)
testb $0x1, 0x97(%rsp)
jne 0x206dbf
movq 0xb8(%rsp), %rax
movq %rax, 0x28(%rsp)
movb 0xc7(%rsp), %al
movb %al, 0x36(%rsp)
xorl %eax, %eax
testb $0x1, 0xc7(%rsp)
movb %al, 0x37(%rsp)
je 0x206d61
movb 0xc6(%rsp), %al
movb %al, 0x37(%rsp)
movq 0x28(%rsp), %rdi
movb 0x36(%rsp), %cl
movb 0x37(%rsp), %al
movq 0x80(%rsp), %rsi
movq 0xa0(%rsp), %r8
movq %rsp, %rdx
movq %r8, 0x8(%rdx)
movq %rsi, (%rdx)
movzbl %cl, %esi
andl $0x1, %esi
movzbl %al, %edx
andl $0x1, %edx
xorl %r9d, %r9d
movl %r9d, %ecx
movl %r9d, %r8d
callq 0x254a90
movq %rax, 0x98(%rsp)
cmpq $0x0, 0x98(%rsp)
jne 0x206dbd
movb $0x1, 0x97(%rsp)
jmp 0x206dbf
testb $0x1, 0x97(%rsp)
jne 0x206e6b
testb $0x1, 0xc6(%rsp)
je 0x206e6b
jmp 0x206ddd
cmpq $0x0, 0x98(%rsp)
jne 0x206e20
movq 0x4351b1(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x30f21a(%rip), %rsi    # 0x516013
leaq 0x373319(%rip), %rdx    # 0x57a119
leaq 0x36a5fe(%rip), %rcx    # 0x571405
leaq 0x36a60a(%rip), %r8     # 0x571418
movl $0xd9, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x206e22
jmp 0x206e24
cmpq $0x0, 0x88(%rsp)
jne 0x206e67
movq 0x43516a(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x30f1d3(%rip), %rsi    # 0x516013
leaq 0x36a5ec(%rip), %rdx    # 0x571433
leaq 0x36a5b7(%rip), %rcx    # 0x571405
leaq 0x36a5c3(%rip), %r8     # 0x571418
movl $0xda, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x206e69
jmp 0x206e6b
testb $0x1, 0x97(%rsp)
jne 0x207027
movq $0x0, 0x60(%rsp)
movq $0x0, 0x50(%rsp)
callq 0x2ee5e0
movq %rax, 0x48(%rsp)
cmpq $0x0, 0x98(%rsp)
jne 0x206ed8
movq 0x4350f9(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x30f162(%rip), %rsi    # 0x516013
leaq 0x373261(%rip), %rdx    # 0x57a119
leaq 0x36a546(%rip), %rcx    # 0x571405
leaq 0x36a552(%rip), %r8     # 0x571418
movl $0xef, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x206eda
movq 0x98(%rsp), %rdi
movq 0x48(%rsp), %rax
movl $0x1, %esi
xorl %ecx, %ecx
movl %ecx, %edx
movl $0x40, %ecx
xorl %r8d, %r8d
leaq 0x371(%rip), %r9        # 0x207270
movq $0x0, (%rsp)
movq $0x0, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movq %rax, 0x18(%rsp)
callq 0x254d60
movq %rax, 0x50(%rsp)
movq 0x98(%rsp), %rdi
callq 0x2549d0
movq %rax, 0x40(%rsp)
movq 0xb0(%rsp), %rdi
movq 0xa0(%rsp), %rsi
callq 0x113240
movq %rax, 0x78(%rsp)
cmpq $0x0, 0x78(%rsp)
jne 0x206f64
movb $0x1, 0x97(%rsp)
testb $0x1, 0x97(%rsp)
jne 0x207025
movq 0x40(%rsp), %rdi
callq 0xb0f00
movq %rax, 0x38(%rsp)
movq 0x78(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x38(%rsp), %rdi
callq 0x7e870
movq 0x20(%rsp), %rdi
movq %rax, %rsi
callq 0x1118a0
movq 0x78(%rsp), %rdi
movq 0xa0(%rsp), %r8
leaq 0x70(%rsp), %rsi
leaq 0x68(%rsp), %rdx
leaq 0x60(%rsp), %rcx
callq 0x111ab0
movl %eax, 0x5c(%rsp)
cmpl $0x0, 0x5c(%rsp)
jge 0x206fd8
movb $0x1, 0x97(%rsp)
jmp 0x207004
cmpl $0x0, 0x5c(%rsp)
jne 0x206fe1
jmp 0x207004
movq 0x50(%rsp), %rdi
movq 0x48(%rsp), %rsi
movq 0x70(%rsp), %rdx
movq 0x68(%rsp), %rcx
movq 0x88(%rsp), %r8
callq 0x2072c0
jmp 0x206fa2
cmpq $0x0, 0x50(%rsp)
je 0x20701b
movq 0x48(%rsp), %rsi
leaq 0x50(%rsp), %rdi
callq 0x2550d0
movq 0x78(%rsp), %rdi
callq 0x111c10
jmp 0x207027
movq 0x98(%rsp), %rdi
callq 0x254960
movq 0x88(%rsp), %rdi
callq 0x2073c0
movq 0x80(%rsp), %rdi
callq 0xe7ed0
movb 0x97(%rsp), %dl
xorl %eax, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
testb $0x1, %dl
cmovnel %ecx, %eax
addq $0xc8, %rsp
retq
nopw (%rax,%rax)