LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/match/idxlocali.c
// Function: gt_checkandresetstorematch
void gt_checkandresetstorematch(GT_UNUSED uint64_t queryunit,
                             Storematchinfo *storeonline,
                             Storematchinfo *storeoffline)
{
  GtUword seqnum, countmatchseq = 0,
    numofdbsequences = gt_encseq_num_of_sequences(storeonline->encseq);

  for (seqnum = 0; seqnum < numofdbsequences; seqnum++)
  {
#ifndef NDEBUG
    if (GT_ISIBITSET(storeonline->hasmatch,seqnum) &&
        !GT_ISIBITSET(storeoffline->hasmatch,seqnum))
    {
      fprintf(stderr,"query " Formatuint64_t " refseq "GT_WU": "
                     "online has match but offline not\n",
                     PRINTuint64_tcast(queryunit),seqnum);
      exit(GT_EXIT_PROGRAMMING_ERROR);
    }
    if (!GT_ISIBITSET(storeonline->hasmatch,seqnum) &&
        GT_ISIBITSET(storeoffline->hasmatch,seqnum))
    {
      fprintf(stderr,"query " Formatuint64_t " refseq "GT_WU": "
                     "offline has match but online not\n",
                     PRINTuint64_tcast(queryunit),seqnum);
      exit(GT_EXIT_PROGRAMMING_ERROR);
    }
#endif
    if (GT_ISIBITSET(storeonline->hasmatch,seqnum))
    {
      countmatchseq++;
    }
  }
  GT_CLEARBITTAB(storeonline->hasmatch,numofdbsequences);
  GT_CLEARBITTAB(storeoffline->hasmatch,numofdbsequences);
  printf("matching sequences: "GT_WU"\n",countmatchseq);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r12
movq (%rsi), %rdi
callq 0xec1e8
testq %rax, %rax
je 0x1bc8d5
movq 0x8(%r15), %rdx
xorl %ecx, %ecx
movabsq $-0x8000000000000000, %rsi # imm = 0x8000000000000000
xorl %r14d, %r14d
movq %rcx, %r8
shrq $0x6, %r8
movq (%rdx,%r8,8), %rdi
movq %rsi, %r9
shrq %cl, %r9
testq %r9, %rdi
je 0x1bc8b6
movq 0x8(%rbx), %r10
testq %r9, (%r10,%r8,8)
je 0x1bc92e
testq %r9, %rdi
jne 0x1bc8c0
movq 0x8(%rbx), %r10
testq %r9, (%r10,%r8,8)
jne 0x1bc939
andq %r9, %rdi
cmpq $0x1, %rdi
sbbq $-0x1, %r14
incq %rcx
cmpq %rcx, %rax
jne 0x1bc891
jmp 0x1bc8d8
xorl %r14d, %r14d
movq 0x8(%r15), %rdi
leaq -0x1(%rax), %rcx
shrq $0x6, %rcx
cmpq $0x40, %rax
leaq 0x8(,%rcx,8), %rax
movl $0x8, %r15d
cmovaeq %rax, %r15
xorl %esi, %esi
movq %r15, %rdx
callq 0x173a0
movq 0x8(%rbx), %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x173a0
leaq 0x1f4b82(%rip), %rdi    # 0x3b149b
movq %r14, %rsi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x17070
movq %r12, %rdi
movq %rcx, %rsi
callq 0x670c5
movq %r12, %rdi
movq %rcx, %rsi
callq 0x6709e
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/match/idxlocali.c
// Function: storematch
static void storematch(void *info,const GtIdxMatch *match)
{
  Storematchinfo *storematch = (Storematchinfo *) info;
  GtUword seqnum;

  if (match->dbabsolute)
  {
    seqnum = gt_encseq_seqnum(storematch->encseq,
                                           match->dbstartpos);
  } else
  {
    seqnum = match->dbseqnum;
  }
  if (!GT_ISIBITSET(storematch->hasmatch,seqnum))
  {
    GT_SETIBIT(storematch->hasmatch,seqnum);
  }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpb $0x1, (%rsi)
jne 0x1bcd76
movq (%rbx), %rdi
movq 0x10(%rsi), %rsi
callq 0xefc48
movq %rax, %rcx
jmp 0x1bcd7a
movq 0x8(%rsi), %rcx
movq 0x8(%rbx), %rax
movq %rcx, %rdx
shrq $0x6, %rdx
movq (%rax,%rdx,8), %rsi
movabsq $-0x8000000000000000, %rdi # imm = 0x8000000000000000
shrq %cl, %rdi
testq %rdi, %rsi
jne 0x1bcda2
orq %rdi, %rsi
movq %rsi, (%rax,%rdx,8)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/match/idxlocali.c
// Function: idxlocali_showmatch
static void idxlocali_showmatch(void *processinfo,const GtIdxMatch *match)
{
  Showmatchinfo *showmatchinfo = (Showmatchinfo *) processinfo;
  GtUword seqnum;
  GtUword relpos;

  if (match->dbabsolute)
  {
    GtUword seqstartpos;
    seqnum = gt_encseq_seqnum(showmatchinfo->encseq, match->dbstartpos);
    seqstartpos = gt_encseq_seqstartpos(showmatchinfo->encseq, seqnum);
    gt_assert(seqstartpos <= match->dbstartpos);
    relpos = match->dbstartpos - seqstartpos;
  } else
  {
    relpos = match->dbstartpos;
    seqnum = match->dbseqnum;
  }
  printf(""GT_WU"\t"GT_WU"\t",seqnum,relpos);
  printf(""GT_WU"\t",match->dblen);
  printf("\t" Formatuint64_t "\t"GT_WU"\t"GT_WU"\t"GT_WU"\n",
              PRINTuint64_tcast(showmatchinfo->queryunit),
              match->querystartpos,
              match->querylen,
              match->distance);
  if (showmatchinfo->showalignment)
  {
    gt_alignment_show_with_mapped_chars(
                (const GtAlignment *) match->alignment,
                showmatchinfo->characters,
                showmatchinfo->wildcardshow,
                stdout,
                70);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
cmpb $0x1, (%rsi)
jne 0x1bcdde
movq 0x18(%rbx), %rdi
movq 0x10(%r14), %rsi
callq 0xefc48
movq %rax, %r15
movq 0x18(%rbx), %rdi
movq %rax, %rsi
callq 0xefce0
movq 0x10(%r14), %rdx
subq %rax, %rdx
jae 0x1bcde6
callq 0x67125
movq 0x8(%r14), %r15
movq 0x10(%r14), %rdx
leaq 0x22a79b(%rip), %rdi    # 0x3e7588
movq %r15, %rsi
xorl %eax, %eax
callq 0x17070
movq 0x18(%r14), %rsi
leaq 0x1f8056(%rip), %rdi    # 0x3b4e58
xorl %eax, %eax
callq 0x17070
movq 0x8(%rbx), %rsi
movq 0x28(%r14), %rdx
movq 0x30(%r14), %rcx
movq 0x38(%r14), %r8
leaq 0x19cb0b(%rip), %rdi    # 0x35992b
xorl %eax, %eax
callq 0x17070
cmpb $0x1, 0x11(%rbx)
jne 0x1bce52
movq 0x40(%r14), %rdi
movq (%rbx), %rsi
movzbl 0x10(%rbx), %edx
movq 0x3070a9(%rip), %rax    # 0x4c3ee8
movq (%rax), %rcx
movl $0x46, %r8d
popq %rbx
popq %r14
popq %r15
jmp 0x127b8e
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/match/idxlocalidp.c
// Function: gt_reinitLocaliTracebackstate
void gt_reinitLocaliTracebackstate(Limdfsconstinfo *lci,
                                GtUword dbprefixlen,
                                GtUword pprefixlen)
{
  LocaliTracebackstate *tbs = &lci->tbs;

  tbs->dbprefixlen = tbs->dbcurrent = dbprefixlen;
  tbs->queryend = tbs->querypos = pprefixlen;
  if (dbprefixlen > (GtUword) tbs->allocatedGtUchardbsubstring)
  {
    tbs->spaceGtUchardbsubstring = gt_realloc(tbs->spaceGtUchardbsubstring,
                                            sizeof (GtUchar) * dbprefixlen);
  }
  gt_alignment_reset(tbs->alignment);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq %rsi, 0x40(%rdi)
movq %rsi, 0x48(%rdi)
movq %rdx, 0x50(%rdi)
movq %rdx, 0x58(%rdi)
cmpq %rsi, 0x68(%rdi)
jae 0x1bce8b
movq 0x60(%rbx), %rdi
leaq 0x1f46a0(%rip), %rdx    # 0x3b151d
movl $0x2b0, %ecx            # imm = 0x2B0
callq 0x1094e6
movq %rax, 0x60(%rbx)
movq 0x70(%rbx), %rdi
popq %rbx
jmp 0x126d7c
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/match/idxlocalidp.c
// Function: gt_processelemLocaliTracebackstate
void gt_processelemLocaliTracebackstate(Limdfsconstinfo *lci,
                                     GtUchar currentchar,
                                     const void *aliasstate)
{
  LocaliTracebackstate *tbs = &lci->tbs;
  const LocaliColumn *column = (const LocaliColumn *) aliasstate;

  while (true)
  {
    /*
    printf(" coord(i="GT_WU",j="GT_WU") with ",tbs->querypos,
                                       (GtUword) tbs->dbcurrent);
    printf("cellvalue="GT_WD", ",column->colvalues[tbs->querypos].bestcell);
    */
    switch (column->colvalues[tbs->querypos].tracebit)
    {
      case Insertbit:
        /* printf("insertbit\n"); */
        gt_alignment_add_insertion(tbs->alignment);
        gt_assert(tbs->dbcurrent > 0);
        tbs->dbcurrent--;
        tbs->spaceGtUchardbsubstring[tbs->dbcurrent] = currentchar;
        return;
      case Replacebit:
        /* printf("replacebit\n"); */
        gt_alignment_add_replacement(tbs->alignment);
        gt_assert(tbs->dbcurrent > 0);
        tbs->dbcurrent--;
        tbs->spaceGtUchardbsubstring[tbs->dbcurrent] = currentchar;
        gt_assert(tbs->querypos > 0);
        tbs->querypos--;
        return;
      case Deletebit:
        /* printf("deletebit\n"); */
        gt_alignment_add_deletion(tbs->alignment);
        gt_assert(tbs->querypos > 0);
        tbs->querypos--;
        break; /* stay in the same column => so next iteration */
      case Notraceback:
        fprintf(stderr,"tracebit = Notraceback not allowed\n");
        fprintf(stderr,"column->colvalues[tbs->querypos].bestcell="GT_WD"\n",
                        column->colvalues[tbs->querypos].bestcell);
        exit(GT_EXIT_PROGRAMMING_ERROR);
      default:
        fprintf(stderr,"tracebit = %d not allowed\n",
                (int) column->colvalues[tbs->querypos].tracebit);
        exit(GT_EXIT_PROGRAMMING_ERROR);
    }
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r12
movl %esi, %ebx
movq %rdi, %r14
leaq 0x50(%rdi), %r15
movq (%r12), %rax
movq (%r15), %rcx
shlq $0x4, %rcx
movl 0x8(%rax,%rcx), %edi
cmpl $0x3, %edi
jne 0x1bcedb
movq 0x70(%r14), %rdi
callq 0x126d42
movq 0x50(%r14), %rax
testq %rax, %rax
je 0x1bcf5a
decq %rax
movq %rax, (%r15)
jmp 0x1bcea9
cmpl $0x1, %edi
je 0x1bcf18
cmpl $0x2, %edi
jne 0x1bcf46
movq 0x70(%r14), %rdi
callq 0x126d25
movq 0x40(%r14), %rax
testq %rax, %rax
je 0x1bcf5f
leaq -0x1(%rax), %rcx
movq %rcx, 0x40(%r14)
movq 0x60(%r14), %rcx
movb %bl, -0x1(%rcx,%rax)
movq 0x50(%r14), %rax
testq %rax, %rax
je 0x1bcf69
decq %rax
movq %rax, (%r15)
jmp 0x1bcf3a
movq 0x70(%r14), %rdi
callq 0x126d5f
movq 0x40(%r14), %rax
testq %rax, %rax
je 0x1bcf64
leaq -0x1(%rax), %rcx
movq %rcx, 0x40(%r14)
movq 0x60(%r14), %rcx
movb %bl, -0x1(%rcx,%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
testl %edi, %edi
jne 0x1bcf55
movq %r12, %rdi
movq %r15, %rsi
callq 0x6715c
callq 0x6728e
callq 0x671aa
callq 0x6721c
callq 0x67255
callq 0x671e3
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/match/idxlocalidp.c
// Function: locali_allocatedfsconstinfo
static Limdfsconstinfo *locali_allocatedfsconstinfo (GT_UNUSED
                                                     unsigned int alphasize)
{
  Limdfsconstinfo *lci;

  lci = gt_malloc (sizeof (Limdfsconstinfo));
  lci->maxcollen = 0;
  lci->tbs.alignment = gt_alignment_new();
  lci->tbs.spaceGtUchardbsubstring = NULL;
  lci->tbs.allocatedGtUchardbsubstring = 0;
  return lci;
}

// Assembly:
pushq %rbx
leaq 0x1f4537(%rip), %rsi    # 0x3b151d
movl $0x78, %edi
movl $0x1ea, %edx            # imm = 0x1EA
callq 0x1092b2
movq %rax, %rbx
movq $0x0, 0x28(%rax)
callq 0x126b24
movq %rax, 0x70(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x60(%rbx)
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/match/idxlocalidp.c
// Function: locali_initdfsconstinfo
static void locali_initdfsconstinfo (Limdfsconstinfo *lci,
                                     unsigned int alphasize,...)
{
  va_list ap;

  va_start (ap, alphasize);
  lci->scorevalues.matchscore = va_arg (ap, Scoretype);
  lci->scorevalues.mismatchscore = va_arg (ap, Scoretype);
  lci->scorevalues.gapstart = va_arg (ap, Scoretype);
  lci->scorevalues.gapextend = va_arg (ap, Scoretype);
  lci->threshold = va_arg (ap, GtUword);
  lci->query = va_arg (ap, const GtUchar *);
  lci->querylength = va_arg (ap, GtUword);
  if (lci->maxcollen < lci->querylength + 1)
  {
    lci->maxcollen = lci->querylength+1;
  }
  va_end(ap);
}

// Assembly:
subq $0x58, %rsp
leaq -0x60(%rsp), %rsi
movq %rdx, 0x10(%rsi)
movq %rcx, 0x18(%rsi)
movq %r8, 0x20(%rsi)
movq %r9, 0x28(%rsi)
testb %al, %al
je 0x1bd059
movaps %xmm0, -0x30(%rsp)
movaps %xmm1, -0x20(%rsp)
movaps %xmm2, -0x10(%rsp)
movaps %xmm3, (%rsp)
movaps %xmm4, 0x10(%rsp)
movaps %xmm5, 0x20(%rsp)
movaps %xmm6, 0x30(%rsp)
movaps %xmm7, 0x40(%rsp)
movq %rsi, -0x70(%rsp)
leaq 0x60(%rsp), %rax
movq %rax, -0x78(%rsp)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, -0x80(%rsp)
movl $0x10, %ecx
cmpq $0x28, %rcx
ja 0x1bd095
movl $0x10, %eax
addq -0x70(%rsp), %rax
addl $0x8, %ecx
movl %ecx, -0x80(%rsp)
jmp 0x1bd0a3
movq -0x78(%rsp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, -0x78(%rsp)
movq (%rax), %rax
movq %rax, (%rdi)
movl -0x80(%rsp), %ecx
cmpq $0x28, %rcx
ja 0x1bd0c4
movq %rcx, %rax
addq -0x70(%rsp), %rax
addl $0x8, %ecx
movl %ecx, -0x80(%rsp)
jmp 0x1bd0d2
movq -0x78(%rsp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, -0x78(%rsp)
movq (%rax), %rax
movq %rax, 0x8(%rdi)
movl -0x80(%rsp), %ecx
cmpq $0x28, %rcx
ja 0x1bd0f4
movq %rcx, %rax
addq -0x70(%rsp), %rax
addl $0x8, %ecx
movl %ecx, -0x80(%rsp)
jmp 0x1bd102
movq -0x78(%rsp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, -0x78(%rsp)
movq (%rax), %rax
movq %rax, 0x10(%rdi)
movl -0x80(%rsp), %ecx
cmpq $0x28, %rcx
ja 0x1bd124
movq %rcx, %rax
addq -0x70(%rsp), %rax
addl $0x8, %ecx
movl %ecx, -0x80(%rsp)
jmp 0x1bd132
movq -0x78(%rsp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, -0x78(%rsp)
movq (%rax), %rax
movq %rax, 0x18(%rdi)
movl -0x80(%rsp), %ecx
cmpq $0x28, %rcx
ja 0x1bd154
movq %rcx, %rax
addq -0x70(%rsp), %rax
addl $0x8, %ecx
movl %ecx, -0x80(%rsp)
jmp 0x1bd162
movq -0x78(%rsp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, -0x78(%rsp)
movq (%rax), %rax
movq %rax, 0x38(%rdi)
movl -0x80(%rsp), %ecx
cmpq $0x28, %rcx
ja 0x1bd184
movq %rcx, %rax
addq -0x70(%rsp), %rax
addl $0x8, %ecx
movl %ecx, -0x80(%rsp)
jmp 0x1bd192
movq -0x78(%rsp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, -0x78(%rsp)
movq (%rax), %rax
movq %rax, 0x20(%rdi)
movl -0x80(%rsp), %ecx
cmpq $0x28, %rcx
ja 0x1bd1b4
movq %rcx, %rax
addq -0x70(%rsp), %rax
addl $0x8, %ecx
movl %ecx, -0x80(%rsp)
jmp 0x1bd1c2
movq -0x78(%rsp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, -0x78(%rsp)
movq (%rax), %rax
movq %rax, 0x30(%rdi)
incq %rax
cmpq %rax, 0x28(%rdi)
jae 0x1bd1d6
movq %rax, 0x28(%rdi)
addq $0x58, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/match/idxlocalidp.c
// Function: locali_freedfsconstinfo
static void locali_freedfsconstinfo (Limdfsconstinfo **lci)
{
  gt_alignment_delete((*lci)->tbs.alignment);
  (*lci)->tbs.alignment = NULL;
  gt_free((*lci)->tbs.spaceGtUchardbsubstring);
  (*lci)->tbs.spaceGtUchardbsubstring = NULL;
  gt_free (*lci);
  *lci = NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rax
movq 0x70(%rax), %rdi
callq 0x127c25
movq (%rbx), %rax
xorl %r15d, %r15d
movq %r15, 0x70(%rax)
movq (%rbx), %rax
movq 0x60(%rax), %rdi
leaq 0x1f4316(%rip), %r14    # 0x3b151d
movq %r14, %rsi
movl $0x20a, %edx            # imm = 0x20A
callq 0x109670
movq (%rbx), %rax
movq %r15, 0x60(%rax)
movq (%rbx), %rdi
movq %r14, %rsi
movl $0x20c, %edx            # imm = 0x20C
callq 0x109670
movq %r15, (%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/match/idxlocalidp.c
// Function: locali_copyLimdfsstate
static void locali_copyLimdfsstate (DECLAREPTRDFSSTATE(deststate),
                                    const DECLAREPTRDFSSTATE(srcstate),
                                    Limdfsconstinfo *lci)
{
  LocaliColumn *destcol = (LocaliColumn *) deststate;
  const LocaliColumn *srccol = (const LocaliColumn *) srcstate;

  if (srccol->colvalues != NULL)
  {
    GtUword idx;

    if (destcol->lenval < lci->maxcollen)
    {
      REALLOCMSG(destcol);
      destcol->colvalues = gt_realloc(destcol->colvalues,
                                      sizeof (LocaliMatrixvalue)
                                        * lci->maxcollen);
      destcol->lenval = lci->maxcollen;
      ATADDRESS("",destcol);
    }
#ifndef NDEBUG
    if (destcol->lenval < lci->querylength+1)
    {
      fprintf(stderr,"destcol->lenval = "GT_WU" < "GT_WU" lci->querylength+1\n",
                      destcol->lenval,lci->querylength+1);
      exit(GT_EXIT_PROGRAMMING_ERROR);
    }
    if (srccol->lenval < lci->querylength+1)
    {
      fprintf(stderr,"srccol->lenval = "GT_WU" < "GT_WU" lci->querylength+1\n",
                      srccol->lenval,lci->querylength+1);
      exit(GT_EXIT_PROGRAMMING_ERROR);
    }
#endif
    for (idx = 0; idx<=lci->querylength; idx++)
    {
      destcol->colvalues[idx] = srccol->colvalues[idx];
    }
  }
  destcol->maxvalue = srccol->maxvalue;
  destcol->pprefixlen = srccol->pprefixlen;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
cmpq $0x0, (%rsi)
je 0x1bd318
movq %rdx, %r15
movq 0x28(%rdx), %rsi
cmpq %rsi, 0x8(%rbx)
jae 0x1bd2e0
movq (%rbx), %rdi
shlq $0x4, %rsi
leaq 0x1f4252(%rip), %rdx    # 0x3b151d
movl $0x245, %ecx            # imm = 0x245
callq 0x1094e6
movq %rax, (%rbx)
movq 0x28(%r15), %rax
movq %rax, 0x8(%rbx)
movq 0x8(%rbx), %rdi
movq 0x30(%r15), %rsi
incq %rsi
cmpq %rsi, %rdi
jb 0x1bd327
movq 0x8(%r14), %rdi
cmpq %rsi, %rdi
jb 0x1bd32c
xorl %eax, %eax
xorl %ecx, %ecx
movq (%rbx), %rdx
movq (%r14), %rsi
movups (%rsi,%rax), %xmm0
movups %xmm0, (%rdx,%rax)
incq %rcx
addq $0x10, %rax
cmpq 0x30(%r15), %rcx
jbe 0x1bd2fd
movups 0x10(%r14), %xmm0
movups %xmm0, 0x10(%rbx)
popq %rbx
popq %r14
popq %r15
retq
callq 0x6736e
callq 0x67347
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/match/idxlocalisw.c
// Function: gt_newSWdpresource
SWdpresource *gt_newSWdpresource(Scoretype matchscore,
                              Scoretype mismatchscore,
                              Scoretype gapextend,
                              GtUword scorethreshold,
                              bool showalignment,
                              ProcessIdxMatch processmatch,
                              void *processmatchinfo)
{
  SWdpresource *swdpresource;

  swdpresource = gt_malloc(sizeof *swdpresource);
  swdpresource->showalignment = showalignment;
  swdpresource->scorevalues.matchscore = matchscore;
  swdpresource->scorevalues.mismatchscore = mismatchscore;
  swdpresource->scorevalues.gapextend = gapextend;
  swdpresource->scorethreshold = scorethreshold;
  swdpresource->alignment = gt_alignment_new();
  swdpresource->swcol = NULL;
  swdpresource->swentrycol = NULL;
  swdpresource->maxedges = NULL;
  swdpresource->allocatedswcol = 0;
  swdpresource->allocatedmaxedges = 0;
  swdpresource->processmatch = processmatch;
  swdpresource->processmatchinfo = processmatchinfo;
  swdpresource->dbsubstring = NULL;
  swdpresource->allocateddbsubstring = 0;
  return swdpresource;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, (%rsp)
movl %r8d, %ebp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
leaq 0x1f38eb(%rip), %rsi    # 0x3b1759
movl $0x80, %edi
movl $0x1cc, %edx            # imm = 0x1CC
callq 0x1092b2
movq %rax, %rbx
movb %bpl, (%rax)
movq %r13, 0x10(%rax)
movq %r12, 0x18(%rax)
movq %r15, 0x28(%rax)
movq %r14, 0x38(%rax)
callq 0x126b24
movq %rax, 0x8(%rbx)
movq $0x0, 0x30(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rbx)
movups %xmm0, 0x50(%rbx)
movq (%rsp), %rax
movq %rax, 0x70(%rbx)
movq 0x40(%rsp), %rax
movq %rax, 0x78(%rbx)
movups %xmm0, 0x60(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/match/idxlocalisw.c
// Function: gt_freeSWdpresource
void gt_freeSWdpresource(SWdpresource *swdpresource)
{
  gt_alignment_delete(swdpresource->alignment);
  swdpresource->alignment = NULL;
  gt_free(swdpresource->swcol);
  gt_free(swdpresource->swentrycol);
  gt_free(swdpresource->maxedges);
  gt_free(swdpresource->dbsubstring);
  swdpresource->allocatedswcol = 0;
  swdpresource->allocatedmaxedges = 0;
  gt_free(swdpresource);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0x127c25
movq $0x0, 0x8(%rbx)
movq 0x30(%rbx), %rdi
leaq 0x1f3860(%rip), %r14    # 0x3b1759
movq %r14, %rsi
movl $0x1e3, %edx            # imm = 0x1E3
callq 0x109670
movq 0x40(%rbx), %rdi
movq %r14, %rsi
movl $0x1e4, %edx            # imm = 0x1E4
callq 0x109670
movq 0x68(%rbx), %rdi
movq %r14, %rsi
movl $0x1e5, %edx            # imm = 0x1E5
callq 0x109670
movq 0x48(%rbx), %rdi
movq %r14, %rsi
movl $0x1e6, %edx            # imm = 0x1E6
callq 0x109670
xorps %xmm0, %xmm0
movups %xmm0, 0x50(%rbx)
movq %rbx, %rdi
movq %r14, %rsi
movl $0x1e9, %edx            # imm = 0x1E9
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x109670
nop
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/match/index_options.c
// Function: gt_parse_algbounds
int gt_parse_algbounds(Sfxstrategy *sfxstrategy,
                       const GtStrArray *algbounds,
                       GtError *err)
{
  bool haserr = false;
  const char *arg;
  GtWord readint;

  if (gt_str_array_size(algbounds) != 3UL)
  {
    gt_error_set(err,"option -algbds must have exactly 3 arguments");
    haserr = true;
  }
  GT_IDXOPTS_READMAXBOUND(maxinsertionsort, 0);
  GT_IDXOPTS_READMAXBOUND(maxbltriesort, 1UL);
  if (sfxstrategy->maxinsertionsort > sfxstrategy->maxbltriesort)
  {
    gt_error_set(err,"first argument of option -algbds must not be larger "
                     "than second argument");
    haserr = true;
  }
  GT_IDXOPTS_READMAXBOUND(maxcountingsort, 2UL);
  if (sfxstrategy->maxbltriesort > sfxstrategy->maxcountingsort)
  {
    gt_error_set(err,"second argument of option -algbds must not be larger "
                     "than third argument");
    haserr = true;
  }
  return haserr ? -1 : 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq %rsi, %rdi
callq 0x121e78
cmpq $0x3, %rax
jne 0x1bdf7a
xorl %ebp, %ebp
jmp 0x1bdf8e
leaq 0x1f38d8(%rip), %rsi    # 0x3b1859
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1019cf
movb $0x1, %bpl
testb %bpl, %bpl
jne 0x1bdfd9
movq %r15, %rdi
xorl %esi, %esi
callq 0x121cfa
leaq 0x1c7690(%rip), %rsi    # 0x385634
movq %rsp, %rdx
movq %rax, %rdi
xorl %eax, %eax
callq 0x177f0
cmpl $0x1, %eax
jne 0x1bdfbd
cmpq $0x0, (%rsp)
jg 0x1bdfd1
leaq 0x1f38c2(%rip), %rsi    # 0x3b1886
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1019cf
movb $0x1, %bpl
movq (%rsp), %rax
movq %rax, 0x8(%r14)
testb %bpl, %bpl
jne 0x1be027
movl $0x1, %esi
movq %r15, %rdi
callq 0x121cfa
leaq 0x1c7642(%rip), %rsi    # 0x385634
movq %rsp, %rdx
movq %rax, %rdi
xorl %eax, %eax
callq 0x177f0
cmpl $0x1, %eax
jne 0x1be00b
cmpq $0x0, (%rsp)
jg 0x1be01f
leaq 0x1f3874(%rip), %rsi    # 0x3b1886
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1019cf
movb $0x1, %bpl
movq (%rsp), %rax
movq %rax, 0x10(%r14)
movq 0x8(%r14), %rax
cmpq 0x10(%r14), %rax
jbe 0x1be045
leaq 0x1f3885(%rip), %rsi    # 0x3b18bd
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1019cf
movb $0x1, %bpl
testb %bpl, %bpl
jne 0x1be093
movl $0x2, %esi
movq %r15, %rdi
callq 0x121cfa
leaq 0x1c75d6(%rip), %rsi    # 0x385634
movq %rsp, %rdx
movq %rax, %rdi
xorl %eax, %eax
callq 0x177f0
cmpl $0x1, %eax
jne 0x1be077
cmpq $0x0, (%rsp)
jg 0x1be08b
leaq 0x1f3808(%rip), %rsi    # 0x3b1886
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1019cf
movb $0x1, %bpl
movq (%rsp), %rax
movq %rax, 0x18(%r14)
movq 0x10(%r14), %rax
cmpq 0x18(%r14), %rax
jbe 0x1be0b1
leaq 0x1f3862(%rip), %rsi    # 0x3b1906
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1019cf
movb $0x1, %bpl
movzbl %bpl, %eax
negl %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/match/index_options.c
// Function: gt_index_options_register_esa
GtIndexOptions* gt_index_options_register_esa(GtOptionParser *op,
                                              GtEncseqOptions *encopts)
{
  GtIndexOptions *idxo;
  gt_assert(op != NULL);

  idxo = gt_index_options_register_generic_create(op,
                                                  GT_INDEX_OPTIONS_ESA);
  return gt_index_options_register_generic_output(op, idxo, NULL, encopts);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x1be0f2
movq %rsi, %rbx
movq %rdi, %r14
movl $0x1, %esi
callq 0x1be0f7
movq %r14, %rdi
movq %rax, %rsi
xorl %edx, %edx
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1be637
callq 0x6769a
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/match/index_options.c
// Function: gt_index_options_register_packedidx
GtIndexOptions* gt_index_options_register_packedidx(GtOptionParser *op,
                                                    GtStr *indexname,
                                                    GtEncseqOptions *encopts)
{
  GtIndexOptions *idxo;
  gt_assert(op != NULL);
  idxo = gt_index_options_register_generic_create(op,
                                                  GT_INDEX_OPTIONS_PACKED);
  return gt_index_options_register_generic_output(op, idxo, indexname, encopts);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x1be8d3
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movl $0x2, %esi
callq 0x1be0f7
movq %r15, %rdi
movq %rax, %rsi
movq %r14, %rdx
movq %rbx, %rcx
popq %rbx
popq %r14
popq %r15
jmp 0x1be637
callq 0x6777e
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/match/index_options.c
// Function: gt_index_options_delete
void gt_index_options_delete(GtIndexOptions *oi)
{
  if (oi == NULL) return;
  gt_str_delete(oi->kysargumentstring);
  gt_str_delete(oi->indexname);
  gt_str_delete(oi->dir);
  gt_str_delete(oi->memlimit);
  gt_str_array_delete(oi->algbounds);
  gt_free(oi);
}

// Assembly:
testq %rdi, %rdi
je 0x1be923
pushq %rbx
movq %rdi, %rbx
movq 0x28(%rdi), %rdi
callq 0x121b03
movq 0x30(%rbx), %rdi
callq 0x121b03
movq 0x38(%rbx), %rdi
callq 0x121b03
movq 0x40(%rbx), %rdi
callq 0x121b03
movq 0x10(%rbx), %rdi
callq 0x121e8b
leaq 0x1f3058(%rip), %rsi    # 0x3b196d
movq %rbx, %rdi
movl $0x231, %edx            # imm = 0x231
popq %rbx
jmp 0x109670
retq
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/match/index_options.c
// Function: gt_index_options_check_set_out_opts
static int gt_index_options_check_set_out_opts(void *oip, GtError *err)
{
  int had_err = 0;
  GtIndexOptions *oi = (GtIndexOptions*) oip;
  gt_assert(oi != NULL && oi->type != GT_INDEX_OPTIONS_UNDEFINED);
  gt_error_check(err);

  if (!had_err) {
    int retval;
    retval = gt_readmode_parse(gt_str_get(oi->dir), err);
    if (retval < 0) {
      had_err = -1;
    } else {
      oi->readmode = (GtReadmode) retval;
      if (oi->type == GT_INDEX_OPTIONS_PACKED
            && (oi->readmode == GT_READMODE_COMPL
                  || oi->readmode == GT_READMODE_REVCOMPL)) {
        gt_error_set(err,"construction of packed index not possible for "
                         "complemented and for reverse complemented sequences");
        had_err = -1;
      }
    }
  }
  if (!had_err && oi->type == GT_INDEX_OPTIONS_PACKED) {
#ifndef S_SPLINT_S
    gt_computePackedIndexDefaults(&oi->bwtIdxParams, BWTBaseFeatures);
#endif
  }
  if (!had_err && gt_option_is_set(oi->optionkys)) {
    oi->outkystab = true;
    if (strcmp(gt_str_get(oi->kysargumentstring), "sort") == 0) {
      oi->outkyssort = true;
    } else {
      if (strcmp(gt_str_get(oi->kysargumentstring),"nosort") != 0) {
        gt_error_set(err,"illegal argument to option -kys: either use no "
                         "argument or argument \"sort\"");
        had_err = -1;
      }
    }
  }

  return had_err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x1bed19
movq %rdi, %r14
cmpl $0x0, 0x88(%rdi)
je 0x1bed19
movq %rsi, %rbx
testq %rsi, %rsi
je 0x1bec29
movq %rbx, %rdi
callq 0x101a9a
testb %al, %al
jne 0x1bed1e
movq 0x38(%r14), %rdi
callq 0x120d23
movq %rax, %rdi
movq %rbx, %rsi
callq 0x1187a3
testl %eax, %eax
js 0x1bec72
movl %eax, 0x18(%r14)
andl $0x7ffffffe, %eax       # imm = 0x7FFFFFFE
movb $0x1, %r15b
cmpl $0x2, %eax
jne 0x1bec75
cmpl $0x2, 0x88(%r14)
jne 0x1bec75
leaq 0x1f36ba(%rip), %rsi    # 0x3b231d
xorl %r15d, %r15d
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1019cf
jmp 0x1bec75
xorl %r15d, %r15d
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testb %r15b, %r15b
je 0x1bed0c
cmpl $0x2, 0x88(%r14)
jne 0x1bec9b
leaq 0x118(%r14), %rdi
xorl %esi, %esi
callq 0x1a3c1f
testb %r15b, %r15b
je 0x1bed0c
movq 0x110(%r14), %rdi
callq 0x10fe52
xorl %ebp, %ebp
testb %al, %al
je 0x1bed0c
movb $0x1, 0x20(%r14)
movq 0x28(%r14), %rdi
callq 0x120d23
leaq 0x1f3109(%rip), %rsi    # 0x3b1dd0
movq %rax, %rdi
callq 0x17a40
testl %eax, %eax
je 0x1bed07
movq 0x28(%r14), %rdi
callq 0x120d23
leaq 0x1f3507(%rip), %rsi    # 0x3b21ea
movq %rax, %rdi
callq 0x17a40
testl %eax, %eax
je 0x1bed0c
leaq 0x1f3689(%rip), %rsi    # 0x3b237f
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1019cf
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jmp 0x1bed0c
movb $0x1, 0x21(%r14)
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x67d48
callq 0x67d0f
nop
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/match/initbasepower.c
// Function: gt_maxbasepower
unsigned int gt_maxbasepower(unsigned int numofchars)
{
  GtCodetype minfailure, thepower = (GtCodetype) 1;
  unsigned int i;

  minfailure = GT_CODETYPE_MAX/(GtCodetype) numofchars;
  for (i=0; thepower < minfailure; i++)
  {
    thepower *= numofchars;
  }
  return i;
}

// Assembly:
movl %edi, %esi
xorl %ecx, %ecx
movq $-0x1, %rax
xorl %edx, %edx
divq %rsi
movl $0x1, %edx
imulq %rsi, %rdx
incl %ecx
cmpq %rax, %rdx
jb 0x1bed39
movl %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/match/initbasepower.c
// Function: gt_initbasepower
GtCodetype *gt_initbasepower(unsigned int numofchars,unsigned int prefixlength)
{
  GtCodetype thepower = (GtCodetype) 1, *basepower;
  unsigned int i;

  basepower = gt_malloc(sizeof *basepower * (prefixlength+1));
  for (i=0; /* Nothing */; i++)
  {
    basepower[i] = thepower;
    if (i == prefixlength)
    {
      break;
    }
    gt_assert(thepower < GT_CODETYPE_MAX/(GtCodetype) numofchars);
    thepower *= numofchars;
  }
  return basepower;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebx
movl %edi, %ebp
leal 0x1(%rbx), %edi
shlq $0x3, %rdi
leaq 0x1f366e(%rip), %rsi    # 0x3b23ca
movl $0x29, %edx
callq 0x1092b2
movq %rax, %rcx
movq $0x1, (%rax)
testl %ebx, %ebx
je 0x1beda2
movl %ebp, %esi
xorl %edi, %edi
movq $-0x1, %rax
xorl %edx, %edx
divq %rsi
movl %ebx, %edx
movl $0x1, %r8d
cmpq %rax, %r8
jae 0x1bedac
imulq %rsi, %r8
movq %r8, 0x8(%rcx,%rdi,8)
incq %rdi
cmpq %rdi, %rdx
jne 0x1bed8c
movq %rcx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
callq 0x67d81
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/match/initbasepower.c
// Function: gt_filllargestchartable
GtCodetype *gt_filllargestchartable(unsigned int numofchars,
                                    unsigned int kmersize)
{
  GtCodetype code, *ptr, *filltable;

  filltable = gt_malloc(sizeof *filltable * kmersize);
  code = (GtCodetype) numofchars;
  for (ptr = filltable + kmersize - 1; ptr >= filltable; ptr--)
  {
    *ptr = code-1;
    gt_assert(code <= GT_CODETYPE_MAX/(GtCodetype) numofchars);
    code *= numofchars;
  }
  return filltable;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
movl %esi, %r14d
leaq (,%r14,8), %rdi
leaq 0x1f3601(%rip), %rsi    # 0x3b23ca
movl $0x3c, %edx
callq 0x1092b2
movq %rax, %rcx
leaq (%rax,%r14,8), %rdi
addq $-0x8, %rdi
cmpq %rax, %rdi
jb 0x1bee04
movl %ebx, %esi
movq %rsi, %r8
leaq -0x1(%r8), %rax
movq %rax, (%rdi)
movq %rsi, %rax
mulq %r8
jo 0x1bee0f
imulq %rsi, %r8
addq $-0x8, %rdi
cmpq %rcx, %rdi
jae 0x1bede8
movq %rcx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0x67db8
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/match/initbasepower.c
// Function: gt_initfilltable
GtCodetype *gt_initfilltable(unsigned int numofchars,unsigned int prefixlength)
{
  unsigned int i;
  GtCodetype *filltable, *basepower;

  basepower = gt_initbasepower(numofchars,prefixlength);
  filltable = gt_malloc(sizeof *filltable * prefixlength);
  for (i=0; i<prefixlength; i++)
  {
    filltable[i] = basepower[prefixlength-i]-1;
  }
  gt_free(basepower);
  return filltable;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebp
callq 0x1bed47
movq %rax, %rbx
movl %ebp, %r15d
leaq (,%r15,8), %rdi
leaq 0x1f3593(%rip), %rsi    # 0x3b23ca
movl $0x4d, %edx
callq 0x1092b2
movq %rax, %r14
testl %ebp, %ebp
je 0x1bee61
movq %r14, %rax
movl %r15d, %ecx
movq (%rbx,%rcx,8), %rcx
decq %rcx
movq %rcx, (%rax)
addq $0x8, %rax
decq %r15
jne 0x1bee4b
leaq 0x1f3562(%rip), %rsi    # 0x3b23ca
movq %rbx, %rdi
movl $0x52, %edx
callq 0x109670
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/match/initbasepower.c
// Function: gt_initmultimappower
GtCodetype **gt_initmultimappower(unsigned int numofchars,unsigned int qvalue)
{
  int offset;
  unsigned int mapindex;
  GtCodetype thepower = (GtCodetype) 1, *mmptr, **multimappower;

  gt_array2dim_malloc(multimappower,(GtUword) qvalue,numofchars);
  for (offset = (int) (qvalue - 1); offset>=0; offset--)
  {
    mmptr = multimappower[offset];
    mmptr[0] = 0;
    for (mapindex = 1U; mapindex < numofchars; mapindex++)
    {
      gt_assert(mmptr[mapindex-1] <= GT_CODETYPE_MAX - thepower);
      mmptr[mapindex] = mmptr[mapindex-1] + thepower;
    }
    gt_assert(thepower <= GT_CODETYPE_MAX/(GtUword) numofchars);
    thepower *= numofchars;
  }
  return multimappower;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebp
movl %edi, %ebx
movl %esi, %r13d
leaq (,%r13,8), %r12
leaq 0x1f3526(%rip), %rsi    # 0x3b23ca
movq %r12, %rdi
movl $0x5c, %edx
callq 0x1092b2
movq %rax, %r14
movl %ebx, %r15d
imulq %r15, %r12
movq %r12, %rdi
leaq 0x1f3505(%rip), %rsi    # 0x3b23ca
movl $0x5c, %edx
callq 0x1092b2
movq %rax, (%r14)
cmpl $0x2, %ebp
jb 0x1beef9
leaq (,%r15,8), %rax
movq (%r14), %rcx
addq %rax, %rcx
movl $0x1, %edx
movq %rcx, (%r14,%rdx,8)
incq %rdx
addq %rax, %rcx
cmpq %rdx, %r13
jne 0x1beeea
decl %ebp
js 0x1bef50
movl %ebp, %ecx
movl $0x1, %esi
movq (%r14,%rcx,8), %rax
movq $0x0, (%rax)
cmpl $0x2, %ebx
jb 0x1bef38
movq %rsi, %rdx
notq %rdx
movl $0x1, %edi
movq -0x8(%rax,%rdi,8), %r8
cmpq %rdx, %r8
ja 0x1bef62
addq %rsi, %r8
movq %r8, (%rax,%rdi,8)
incq %rdi
cmpq %rdi, %r15
jne 0x1bef1f
movq %r15, %rax
mulq %rsi
jo 0x1bef67
imulq %r15, %rsi
leaq -0x1(%rcx), %rax
testq %rcx, %rcx
movq %rax, %rcx
jg 0x1bef04
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x67e26
callq 0x67def
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/match/karlin_altschul_stat.c
// Function: gt_evalue_raw_score
GtWord gt_evalue_raw_score(const GtKarlinAltschulStat *ka,
                           GtUword matches,
                           GtUword mismatches,
                           GtUword indels)
{
  GtWord matchscore, mismatchscore, gapscore;

  gt_assert(ka != NULL);
  matchscore = gt_karlin_altschul_stat_matchscore(ka);
  mismatchscore = gt_karlin_altschul_stat_mismatchscore(ka);
  gapscore = gt_karlin_altschul_stat_gapscore(ka);
  gt_assert(matchscore > 0 && mismatchscore < 0 && gapscore < 0);
  return (GtWord) matches * matchscore +
         (GtWord) mismatches * mismatchscore +
         (GtWord) indels * gapscore;
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0x1c0360
movq 0x38(%rdi), %r8
testq %r8, %r8
jle 0x1c0365
movq 0x40(%rdi), %r9
testq %r9, %r9
jns 0x1c0365
movq 0x48(%rdi), %rax
testq %rax, %rax
jns 0x1c0365
imulq %rsi, %r8
imulq %rdx, %r9
addq %r8, %r9
imulq %rcx, %rax
addq %r9, %rax
popq %rcx
retq
callq 0x68315
callq 0x682dc
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/match/karlin_altschul_stat.c
// Function: gt_evalue_bit_score2raw_score
GtWord gt_evalue_bit_score2raw_score(const GtKarlinAltschulStat *ka,
                                     double bit_score)
{
  double raw_score, lambda, logK;

  gt_assert(ka != NULL);
  lambda = gt_karlin_altschul_stat_get_lambda(ka);
  logK = gt_karlin_altschul_stat_get_logK(ka);

  raw_score = (bit_score * ka->log2 + logK)/lambda;
  return (GtWord) round(raw_score);
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0x1c03a9
mulsd 0x30(%rdi), %xmm0
addsd 0x10(%rdi), %xmm0
divsd (%rdi), %xmm0
callq 0x172e0
cvttsd2si %xmm0, %rax
popq %rcx
retq
callq 0x68387
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/match/karlin_altschul_stat.c
// Function: gt_evalue_from_bitscore
double gt_evalue_from_bitscore(const GtKarlinAltschulStat *ka,
                               double bit_score,
                               GtUword searchspace)
{
  GtWord raw_score;

  gt_assert(ka != NULL);
  raw_score = gt_evalue_bit_score2raw_score(ka, bit_score);
  return gt_evalue_from_raw_score(ka,raw_score,searchspace);
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
testq %rdi, %rdi
je 0x1c048d
movq %rsi, %rbx
movsd (%rdi), %xmm2
movsd %xmm2, (%rsp)
movsd 0x10(%rdi), %xmm1
movsd %xmm1, 0x8(%rsp)
mulsd 0x30(%rdi), %xmm0
addsd %xmm1, %xmm0
divsd %xmm2, %xmm0
callq 0x172e0
cvttsd2si %xmm0, %rax
movq %rbx, %xmm0
punpckldq 0x190495(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x19049d(%rip), %xmm0   # 0x3508f0
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
movapd %xmm1, 0x10(%rsp)
xorps %xmm1, %xmm1
cvtsi2sd %rax, %xmm1
mulsd (%rsp), %xmm1
movsd 0x8(%rsp), %xmm0
subsd %xmm1, %xmm0
callq 0x17e30
mulsd 0x10(%rsp), %xmm0
addq $0x20, %rsp
popq %rbx
retq
callq 0x683f9
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/match/karlin_altschul_stat.c
// Function: gt_evalue_from_eop_count
double gt_evalue_from_eop_count(const GtKarlinAltschulStat *ka,
                                GtUword matches,
                                GtUword mismatches,
                                GtUword indels,
                                GtUword searchspace)
{
  GtWord raw_score;

  gt_assert(ka != NULL);
  raw_score = gt_evalue_raw_score(ka, matches, mismatches, indels);
  return gt_evalue_from_raw_score(ka,raw_score,searchspace);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
testq %rdi, %rdi
je 0x1c04f6
movq %r8, %r14
movq %rdi, %rbx
callq 0x1c032b
movq %r14, %xmm0
punpckldq 0x19042a(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x190432(%rip), %xmm0   # 0x3508f0
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
movapd %xmm1, (%rsp)
xorps %xmm1, %xmm1
cvtsi2sd %rax, %xmm1
movsd 0x10(%rbx), %xmm0
mulsd (%rbx), %xmm1
subsd %xmm1, %xmm0
callq 0x17e30
mulsd (%rsp), %xmm0
addq $0x18, %rsp
popq %rbx
popq %r14
retq
callq 0x68432
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/match/marksubstring.c
// Function: gt_marksubstring_new
Gtmarksubstring *gt_marksubstring_new(unsigned int numofchars,
                                      unsigned int kmersize,
                                      bool usesuffix,
                                      unsigned int units)
{
  Gtmarksubstring *mark;

  mark = gt_malloc(sizeof (*mark));
  gt_assert(kmersize >= units);
  mark->units = units;
  mark->entries = gt_power_for_small_exponents(numofchars,units);
  if (usesuffix)
  {
    mark->shiftright = 0;
    mark->mask = (GtCodetype) (mark->entries-1);
  } else
  {
    mark->shiftright = GT_MULT2(kmersize - units);
    mark->mask = ~(GtCodetype) 0;
  }
  GT_INITBITTAB(mark->bits,mark->entries);
  mark->size = sizeof (GtBitsequence) * GT_NUMOFINTSFORBITS(mark->entries);
  return mark;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %r15d
movl %edx, %r14d
movl %esi, %ebp
movl %edi, %r12d
leaq 0x1f24be(%rip), %rsi    # 0x3b2c70
movl $0x28, %edi
movl $0x1d, %edx
callq 0x1092b2
subl %r15d, %ebp
jb 0x1c0871
movq %rax, %rbx
movl %r15d, 0x8(%rax)
movl %r12d, %edi
movl %r15d, %esi
callq 0x10af8d
movq %rax, 0x10(%rbx)
testb %r14b, %r14b
je 0x1c07f2
movl $0x0, 0xc(%rbx)
leaq -0x1(%rax), %rcx
jmp 0x1c07fe
addl %ebp, %ebp
movl %ebp, 0xc(%rbx)
movq $-0x1, %rcx
movq %rcx, 0x18(%rbx)
leaq -0x1(%rax), %r14
shrq $0x3, %r14
andq $-0x8, %r14
movl $0x8, %r15d
addq %r15, %r14
cmpq $0x40, %rax
cmovbq %r15, %r14
leaq 0x1f244a(%rip), %rdx    # 0x3b2c70
xorl %edi, %edi
movq %r14, %rsi
movl $0x2a, %ecx
callq 0x1094e6
movq %rax, 0x20(%rbx)
movq %rax, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x173a0
movq 0x10(%rbx), %rax
leaq -0x1(%rax), %rcx
shrq $0x6, %rcx
cmpq $0x40, %rax
leaq 0x8(,%rcx,8), %rax
cmovbq %r15, %rax
movq %rax, (%rbx)
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x6846b
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/match/marksubstring.c
// Function: gt_marksubstring_delete
void gt_marksubstring_delete(Gtmarksubstring *mark,bool withbits)
{
  if (mark != NULL)
  {
    if (withbits)
    {
      gt_free(mark->bits);
    }
    gt_free(mark);
  }
}

// Assembly:
testq %rdi, %rdi
je 0x1c08ae
pushq %rbx
movq %rdi, %rbx
testb %sil, %sil
je 0x1c0899
movq 0x20(%rbx), %rdi
leaq 0x1f23e1(%rip), %rsi    # 0x3b2c70
movl $0x35, %edx
callq 0x109670
leaq 0x1f23d0(%rip), %rsi    # 0x3b2c70
movq %rbx, %rdi
movl $0x37, %edx
popq %rbx
jmp 0x109670
retq
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/match/marksubstring.c
// Function: gt_marksubstring_mark
void gt_marksubstring_mark(Gtmarksubstring *mark,GtCodetype code)
{
  code = (code >> (GtCodetype) mark->shiftright) & mark->mask;

  gt_assert(code < mark->entries);
  if (!GT_ISIBITSET(mark->bits,code))
  {
    GT_SETIBIT(mark->bits,code);
  }
}

// Assembly:
movb 0xc(%rdi), %cl
shrq %cl, %rsi
andq 0x18(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
jae 0x1c08eb
movq 0x20(%rdi), %rax
movq %rsi, %rdx
shrq $0x6, %rdx
movq (%rax,%rdx,8), %rdi
movabsq $-0x8000000000000000, %r8 # imm = 0x8000000000000000
movl %esi, %ecx
shrq %cl, %r8
testq %r8, %rdi
je 0x1c08e3
retq
orq %r8, %rdi
movq %rdi, (%rax,%rdx,8)
retq
pushq %rax
callq 0x684a2
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/match/marksubstring.c
// Function: gt_marksubstring_bits_null
void gt_marksubstring_bits_null(GT_UNUSED const Gtmarksubstring *mark,bool null)
{
  if (null)
  {
    gt_assert(mark->bits == NULL);
  } else
  {
    gt_assert(mark->bits != NULL);
  }
}

// Assembly:
pushq %rax
movq 0x20(%rdi), %rax
testl %esi, %esi
je 0x1c0934
testq %rax, %rax
je 0x1c0939
callq 0x68510
testq %rax, %rax
je 0x1c093b
popq %rax
retq
callq 0x684d9
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/match/optionargmode.c
// Function: gt_optionargaddbitmask
int gt_optionargaddbitmask(const Optionargmodedesc *modedesc,
                           size_t numberofentries,
                           unsigned int *mode,
                           const char *optname,
                           const char *optionargument,
                           GtError *err)
{
  size_t modecount;

  gt_error_check(err);
  for (modecount=0; modecount < numberofentries; modecount++)
  {
    if (strcmp(optionargument,modedesc[modecount].name) == 0)
    {
      if (*mode & modedesc[modecount].bitmask)
      {
        gt_error_set(err,"argument \"%s\" to option %s already specified",
                      modedesc[modecount].name,optname);
        return -1;
      }
      *mode |= modedesc[modecount].bitmask;
      return 0;
    }
  }
  gt_error_set(err,"illegal argument \"%s\" to option %s",
                optionargument,optname);
  return -2;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r14
movq %r8, %r12
movq %rcx, %rbx
movq %rdx, (%rsp)
movq %rsi, %rbp
movq %rdi, %r13
testq %r9, %r9
je 0x1c097f
movq %r14, %rdi
callq 0x101a9a
testb %al, %al
jne 0x1c0a03
testq %rbp, %rbp
je 0x1c09a4
addq $0x10, %r13
movq -0x10(%r13), %r15
movq %r12, %rdi
movq %r15, %rsi
callq 0x17a40
testl %eax, %eax
je 0x1c09c2
addq $0x18, %r13
decq %rbp
jne 0x1c0988
leaq 0x1f23d0(%rip), %rsi    # 0x3b2d7b
movq %r14, %rdi
movq %r12, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x1019cf
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
jmp 0x1c09f4
movq (%rsp), %rdx
movl (%rdx), %eax
movl (%r13), %ecx
testl %eax, %ecx
je 0x1c09ee
leaq 0x1f2377(%rip), %rsi    # 0x3b2d4e
movq %r14, %rdi
movq %r15, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x1019cf
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x1c09f4
orl %eax, %ecx
movl %ecx, (%rdx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x68547
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/match/optionargmode.c
// Function: gt_optionargsetsingle
int gt_optionargsetsingle(const Optionargmodedesc *modedesc,
                          size_t numberofentries,
                          const char *optname,
                          const char *optionargument,
                          GtError *err)
{
  size_t modecount;

  gt_error_check(err);
  for (modecount=0; modecount < numberofentries; modecount++)
  {
    if (strcmp(optionargument,modedesc[modecount].name) == 0)
    {
      return (int) modedesc[modecount].bitmask;
    }
  }
  gt_error_set(err,"illegal argument \"%s\" to option %s",
                optionargument,optname);
  return -1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r8, %r15
movq %rcx, %r14
movq %rdx, %rbx
movq %rsi, %r13
movq %rdi, %r12
testq %r8, %r8
je 0x1c0a31
movq %r15, %rdi
callq 0x101a9a
testb %al, %al
jne 0x1c0a80
testq %r13, %r13
je 0x1c0a54
addq $0x10, %r12
movq -0x10(%r12), %rsi
movq %r14, %rdi
callq 0x17a40
testl %eax, %eax
je 0x1c0a72
addq $0x18, %r12
decq %r13
jne 0x1c0a3a
leaq 0x1f2320(%rip), %rsi    # 0x3b2d7b
movq %r15, %rdi
movq %r14, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x1019cf
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x1c0a76
movl (%r12), %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
callq 0x6857e
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/match/optionargmode.c
// Function: gt_getargmodekeywords
GtStr *gt_getargmodekeywords(const Optionargmodedesc *modedesc,
                             size_t numberofentries,
                             const char *what)
{
  GtStr *helpstring;
  size_t idx, modecount, len, maxlen = 0;
  GT_UNUSED size_t spacelen;
  const char *space = "    ";

  for (modecount=0; modecount < numberofentries; modecount++)
  {
    len = strlen(modedesc[modecount].name);
    if (maxlen < len)
    {
      maxlen = len;
    }
  }
  helpstring = gt_str_new_cstr("use combination of the following keywords "
                               "to specify ");
  gt_str_append_cstr(helpstring,what);
  gt_str_append_cstr(helpstring,"\n");
  spacelen = strlen(space);
  for (modecount=0; modecount < numberofentries; modecount++)
  {
    gt_str_append_cstr(helpstring,modedesc[modecount].name);
    gt_str_append_cstr(helpstring,space);
    len = strlen(modedesc[modecount].name);
    for (idx=0; idx<maxlen+-len; idx++)
    {
      gt_str_append_cstr(helpstring," ");
    }
    gt_str_append_cstr(helpstring,"show ");
    gt_str_append_cstr(helpstring,modedesc[modecount].desc);
    gt_str_append_cstr(helpstring,"\n");
  }
  return helpstring;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r12
testq %rsi, %rsi
movq %rdi, 0x8(%rsp)
je 0x1c0ac6
xorl %r14d, %r14d
movq %rdi, %rbx
movq %rsi, %r13
movq %rsi, %r15
movq (%rbx), %rdi
callq 0x172f0
cmpq %rax, %r14
cmovbeq %rax, %r14
addq $0x18, %rbx
decq %r15
jne 0x1c0aac
jmp 0x1c0acc
movq %rsi, %r13
xorl %r14d, %r14d
leaq 0x1f22e1(%rip), %rdi    # 0x3b2db4
callq 0x120955
movq %rax, %r15
movq %rax, %rdi
movq %r12, %rsi
callq 0x12097f
leaq 0x208c32(%rip), %rsi    # 0x3c971f
movq %r15, %rdi
callq 0x12097f
movq %r13, %rax
testq %r13, %r13
movq 0x8(%rsp), %r13
je 0x1c0ba8
xorl %ebp, %ebp
leaq 0x20ad39(%rip), %r12    # 0x3cb848
movq %rax, 0x10(%rsp)
leaq (,%rbp,2), %rbx
addq %rbp, %rbx
movq (%r13,%rbx,8), %rsi
movq %r15, %rdi
callq 0x12097f
movq %r15, %rdi
leaq 0x1cc03e(%rip), %rsi    # 0x38cb74
callq 0x12097f
movq (%r13,%rbx,8), %rdi
callq 0x172f0
movq %r14, %r13
subq %rax, %r13
je 0x1c0b5d
movq %r15, %rdi
movq %r12, %rsi
callq 0x12097f
decq %r13
jne 0x1c0b4d
movq 0x8(%rsp), %r13
leaq (,%rbx,8), %rbx
addq %r13, %rbx
movq %r15, %rdi
leaq 0x1f2273(%rip), %rsi    # 0x3b2dea
callq 0x12097f
movq 0x8(%rbx), %rsi
movq %r15, %rdi
callq 0x12097f
movq %r15, %rdi
leaq 0x208b8d(%rip), %rsi    # 0x3c971f
callq 0x12097f
incq %rbp
movq 0x10(%rsp), %rax
cmpq %rax, %rbp
jne 0x1c0b14
movq %r15, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq