LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/match/sfx-maprange.c
// Function: gt_Sfxmappedrange_new
GtSfxmappedrange *gt_Sfxmappedrange_new(const char *tablename,
                                        GtUword numofentries,
                                        GtSfxmappedrangetype type,
                                        GtSfxmappedrangetransformfunc
                                          transformfunc,
                                        const void *transformfunc_data)
{
  GtSfxmappedrange *sfxmappedrange;

  sfxmappedrange = gt_malloc(sizeof (*sfxmappedrange));
  sfxmappedrange->ptr = NULL;
  sfxmappedrange->pagesize = gt_pagesize();
  sfxmappedrange->usedptrptr = NULL;
  sfxmappedrange->filename = NULL;
  sfxmappedrange->writable = false;
  sfxmappedrange->entire = NULL;
  sfxmappedrange->transformfunc = transformfunc;
  sfxmappedrange->transformfunc_data = transformfunc_data;
  sfxmappedrange->type = type;
  sfxmappedrange->tablename = gt_str_new_cstr(tablename);
  sfxmappedrange->currentminindex = sfxmappedrange->currentmaxindex = 0;
  sfxmappedrange->indexrange_defined = false;
  switch (type)
  {
    case GtSfxGtBitsequence:
      sfxmappedrange->sizeofunit = sizeof (GtBitsequence);
      sfxmappedrange->numofunits = GT_NUMOFINTSFORBITS(numofentries);
      break;
    case GtSfxuint32_t:
      sfxmappedrange->sizeofunit = sizeof (uint32_t);
      sfxmappedrange->numofunits = (size_t) numofentries;
      break;
    case GtSfxunsignedlong:
      sfxmappedrange->sizeofunit = sizeof (GtUword);
      sfxmappedrange->numofunits = (size_t) numofentries;
      break;
    default:
      gt_assert(false);
      break;
  }
  return sfxmappedrange;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, (%rsp)
movq %rcx, %r12
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r13
leaq 0x1c95b2(%rip), %rsi    # 0x3b841b
movl $0x78, %edi
movl $0x78, %edx
callq 0x104226
movq %rax, %r14
xorl %r15d, %r15d
movq %r15, (%rax)
callq 0xe3e95
movq %rax, 0x28(%r14)
movb %r15b, 0x70(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%r14)
movq %r15, 0x18(%r14)
movq %r12, 0x60(%r14)
movq (%rsp), %rax
movq %rax, 0x68(%r14)
movl %ebp, 0x40(%r14)
movq %r13, %rdi
callq 0x11acc9
movq %rax, 0x20(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x48(%r14)
movb %r15b, 0x58(%r14)
cmpl $0x2, %ebp
je 0x1eeefc
cmpl $0x1, %ebp
je 0x1eeef2
testl %ebp, %ebp
jne 0x1eef1a
movq $0x8, 0x38(%r14)
leaq -0x1(%rbx), %rax
shrq $0x6, %rax
incq %rax
cmpq $0x40, %rbx
movl $0x1, %ebx
cmovaeq %rax, %rbx
jmp 0x1eef04
movq $0x8, 0x38(%r14)
jmp 0x1eef04
movq $0x4, 0x38(%r14)
movq %rbx, 0x30(%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x794e9
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/match/sfx-maprange.c
// Function: gt_Sfxmappedrange_storetmp
static void gt_Sfxmappedrange_storetmp(GtSfxmappedrange *sfxmappedrange,
                                       GtSfxStoretype usedptrptr,
                                       GtSfxmappedrangetype type,
                                       bool writable)
{
  FILE *outfp;

  gt_assert(sfxmappedrange != NULL);
  sfxmappedrange->ptr = NULL;
  sfxmappedrange->filename = gt_str_new();
  sfxmappedrange->writable = writable;
  outfp = gt_xtmpfp(sfxmappedrange->filename);
  gt_assert(outfp != NULL);
  gt_log_log("write %s to file %s ("GT_WU" units of "GT_WU" bytes)",
             gt_str_get(sfxmappedrange->tablename),
             gt_str_get(sfxmappedrange->filename),
             (GtUword) sfxmappedrange->numofunits,
             (GtUword) sfxmappedrange->sizeofunit);
  switch (type) {
    case GtSfxGtBitsequence:
      gt_xfwrite(*(usedptrptr.bs),sfxmappedrange->sizeofunit,
                 sfxmappedrange->numofunits,outfp);
      sfxmappedrange->usedptrptr = (void**) usedptrptr.bs;
      gt_free(*(usedptrptr.bs));
      *(usedptrptr.bs) = NULL;
      break;
    case GtSfxunsignedlong:
      gt_xfwrite(*(usedptrptr.ulong),sfxmappedrange->sizeofunit,
                 sfxmappedrange->numofunits,outfp);
      sfxmappedrange->usedptrptr = (void**) usedptrptr.ulong;
      gt_free(*(usedptrptr.ulong));
      *(usedptrptr.ulong) = NULL;
      break;
    case GtSfxuint32_t:
      gt_xfwrite(*(usedptrptr.uint32),sfxmappedrange->sizeofunit,
                 sfxmappedrange->numofunits,outfp);
      sfxmappedrange->usedptrptr = (void**) usedptrptr.uint32;
      gt_free(*(usedptrptr.uint32));
      *(usedptrptr.uint32) = NULL;
      break;
   }
   gt_fa_fclose(outfp);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x1ef00e
movl %ecx, %ebp
movl %edx, %r14d
movq %rsi, %rbx
movq %rdi, %r15
movq $0x0, (%rdi)
callq 0x11ac6c
movq %rax, 0x18(%r15)
movb %bpl, 0x70(%r15)
leaq 0x1c94ad(%rip), %rdx    # 0x3b841b
movq %rax, %rdi
xorl %esi, %esi
movl $0xab, %ecx
callq 0xfd35a
testq %rax, %rax
je 0x1ef013
movq %rax, %r12
movq 0x20(%r15), %rdi
callq 0x11b0a1
movq %rax, %r13
movq 0x18(%r15), %rdi
callq 0x11b0a1
movq 0x30(%r15), %rcx
movq 0x38(%r15), %r8
leaq 0x1c9818(%rip), %rdi    # 0x3b87c5
movq %r13, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x103d72
movq (%rbx), %rdi
movq 0x30(%r15), %rdx
movq 0x38(%r15), %rsi
movq %r12, %rcx
callq 0x11f89c
movq %rbx, 0x10(%r15)
movq (%rbx), %rdi
leal (,%r14,8), %edx
subl %r14d, %edx
addl $0xb7, %edx
leaq 0x1c942f(%rip), %rsi    # 0x3b841b
callq 0x1045eb
movq $0x0, (%rbx)
movq %r12, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xfd018
callq 0x79594
callq 0x7955b
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/match/sfx-maprange.c
// Function: gt_Sfxmappedrange_usetmp
void gt_Sfxmappedrange_usetmp(GtSfxmappedrange *sfxmappedrange,
                              const GtStr *tmpfilename,
                              void **usedptrptr,
                              GtUword numofentries,
                              bool writable)
{
  gt_assert(sfxmappedrange != NULL);
  sfxmappedrange->ptr = NULL;
  /*gt_assert(usedptrptr != NULL && *usedptrptr == NULL);*/
  sfxmappedrange->usedptrptr = usedptrptr;
  sfxmappedrange->filename = gt_str_clone(tmpfilename);
  sfxmappedrange->writable = writable;
  if (sfxmappedrange->type == GtSfxGtBitsequence)
  {
    sfxmappedrange->numofunits = GT_NUMOFINTSFORBITS(numofentries);
  } else
  {
    sfxmappedrange->numofunits = (size_t) numofentries;
  }
  gt_log_log("use file %s for table %s ("GT_WU" units of "GT_WU" bytes)",
             gt_str_get(sfxmappedrange->filename),
             gt_str_get(sfxmappedrange->tablename),
             (GtUword) sfxmappedrange->numofunits,
             (GtUword) sfxmappedrange->sizeofunit);
  gt_free(*sfxmappedrange->usedptrptr);
  *sfxmappedrange->usedptrptr = NULL;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x1ef0f1
movl %r8d, %ebp
movq %rcx, %r14
movq %rdi, %rbx
movq $0x0, (%rdi)
movq %rdx, 0x10(%rdi)
movq %rsi, %rdi
callq 0x11b191
movq %rax, 0x18(%rbx)
movb %bpl, 0x70(%rbx)
cmpl $0x0, 0x40(%rbx)
jne 0x1ef095
leaq -0x1(%r14), %rcx
shrq $0x6, %rcx
incq %rcx
cmpq $0x40, %r14
movl $0x1, %r14d
cmovaeq %rcx, %r14
movq %r14, 0x30(%rbx)
movq %rax, %rdi
callq 0x11b0a1
movq %rax, %r14
movq 0x20(%rbx), %rdi
callq 0x11b0a1
movq 0x30(%rbx), %rcx
movq 0x38(%rbx), %r8
leaq 0x1c94a0(%rip), %rdi    # 0x3b855c
movq %r14, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x103d72
movq 0x10(%rbx), %rax
movq (%rax), %rdi
leaq 0x1c9344(%rip), %rsi    # 0x3b841b
movl $0x105, %edx            # imm = 0x105
callq 0x1045eb
movq 0x10(%rbx), %rax
movq $0x0, (%rax)
popq %rbx
popq %r14
popq %rbp
retq
callq 0x7963f
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/match/sfx-maprange.c
// Function: gt_Sfxmappedrange_size_mapped
GtUword gt_Sfxmappedrange_size_mapped(const GtSfxmappedrange
                                                      *sfxmappedrange,
                                            GtUword minindex,
                                            GtUword maxindex)
{
  gt_assert(sfxmappedrange != NULL);
  if (sfxmappedrange->transformfunc != NULL)
  {
    sfxmappedrange->transformfunc(&minindex,&maxindex,
                                  sfxmappedrange->transformfunc_data);
  }
  if (minindex <= maxindex)
  {
    GtMappedrange lbrange;

    gt_Sfxmapped_offset_end(&lbrange,
                            sfxmappedrange->sizeofunit,
                            sfxmappedrange->pagesize,
                            minindex,
                            maxindex);
    return lbrange.mapend - lbrange.mapoffset + 1;
  }
  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, 0x8(%rsp)
movq %rdx, (%rsp)
testq %rdi, %rdi
je 0x1ef183
movq %rdx, %rcx
movq %rdi, %rbx
movq 0x60(%rdi), %rax
testq %rax, %rax
je 0x1ef136
movq 0x68(%rbx), %rdx
leaq 0x8(%rsp), %r14
movq %rsp, %r15
movq %r14, %rdi
movq %r15, %rsi
callq *%rax
movq (%r14), %rsi
movq (%r15), %rcx
cmpq %rcx, %rsi
jbe 0x1ef13f
xorl %eax, %eax
jmp 0x1ef179
movq 0x28(%rbx), %r8
movq 0x38(%rbx), %r9
imulq %r9, %rsi
movq %rsi, %rax
xorl %edx, %edx
divq %r8
movq %rdx, %rdi
imulq %r9, %rcx
movq %rcx, %rax
xorl %edx, %edx
divq %r8
addq %rcx, %r8
subq %rdx, %r8
testq %rdx, %rdx
cmoveq %rcx, %r8
subq %rsi, %rdi
leaq (%rdi,%r8), %rax
incq %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
callq 0x79678
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/match/sfx-maprange.c
// Function: gt_Sfxmappedrange_unmap
void gt_Sfxmappedrange_unmap(GtSfxmappedrange *sfxmappedrange)
{
  gt_assert(sfxmappedrange != NULL);
  if (sfxmappedrange->ptr != NULL)
  {
    gt_fa_xmunmap(sfxmappedrange->ptr);
  }
  sfxmappedrange->ptr = 0;
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x1ef1a7
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x1ef19e
callq 0xfdc54
movq $0x0, (%rbx)
popq %rbx
retq
callq 0x796b1
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/match/sfx-maprange.c
// Function: gt_Sfxmappedrange_delete
void gt_Sfxmappedrange_delete(GtSfxmappedrange *sfxmappedrange)
{
  if (sfxmappedrange == NULL)
  {
    return;
  }
  gt_fa_xmunmap(sfxmappedrange->ptr);
  sfxmappedrange->ptr = NULL;
  gt_fa_xmunmap(sfxmappedrange->entire);
  sfxmappedrange->entire = NULL;
  if (sfxmappedrange->usedptrptr != NULL)
  {
    *sfxmappedrange->usedptrptr = NULL;
  }
  if (sfxmappedrange->filename != NULL)
  {
    gt_xunlink(gt_str_get(sfxmappedrange->filename));
  }
  gt_str_delete(sfxmappedrange->tablename);
  gt_str_delete(sfxmappedrange->filename);
  gt_free(sfxmappedrange);
}

// Assembly:
testq %rdi, %rdi
je 0x1ef47a
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0xfdc54
xorl %r14d, %r14d
movq %r14, (%rbx)
movq 0x8(%rbx), %rdi
callq 0xfdc54
movq %r14, 0x8(%rbx)
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0x1ef437
movq $0x0, (%rax)
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x1ef44d
callq 0x11b0a1
movq %rax, %rdi
callq 0x11fc3f
movq 0x20(%rbx), %rdi
callq 0x11bdbf
movq 0x18(%rbx), %rdi
callq 0x11bdbf
leaq 0x1c8fb5(%rip), %rsi    # 0x3b841b
movq %rbx, %rdi
movl $0x198, %edx            # imm = 0x198
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1045eb
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/match/sfx-maprange.c
// Function: gt_Sfxmappedrangelist_add
void gt_Sfxmappedrangelist_add(GtSfxmappedrangelist *sfxmrlist,
                               GtSfxmappedrange *sfxmappedrange)
{
  gt_assert(sfxmrlist != NULL);

  if (sfxmrlist->nextfree >= sfxmrlist->allocated)
  {
    sfxmrlist->allocated += 4UL;
    sfxmrlist->arr = gt_realloc(sfxmrlist->arr,sizeof (*sfxmrlist->arr) *
                                               sfxmrlist->allocated);
  }
  sfxmrlist->arr[sfxmrlist->nextfree++] = sfxmappedrange;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x1ef500
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
movq 0x10(%rdi), %rdx
cmpq %rdx, %rcx
jb 0x1ef4ec
leaq 0x4(%rdx), %rcx
movq %rcx, 0x10(%r14)
leaq 0x20(,%rdx,8), %rsi
leaq 0x1c8f43(%rip), %rdx    # 0x3b841b
movq %rax, %rdi
movl $0x1b3, %ecx            # imm = 0x1B3
callq 0x104461
movq %rax, (%r14)
movq 0x8(%r14), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x8(%r14)
movq %rbx, (%rax,%rcx,8)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0x798b2
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/match/sfx-maprange.c
// Function: gt_Sfxmappedrangelist_size_mapped
GtUword gt_Sfxmappedrangelist_size_mapped(const GtSfxmappedrangelist *sfxmrlist,
                                          GtUword minindex,
                                          GtUword maxindex)
{
  if (sfxmrlist == NULL)
  {
    gt_assert(maxindex >= minindex);
    return maxindex - minindex + 1;
  } else
  {
    GtUword idx, sumsize = 0;

    for (idx = 0; idx < sfxmrlist->nextfree; idx++)
    {
      GtSfxmappedrange *sfxmappedrange = sfxmrlist->arr[idx];
      if (sfxmappedrange != NULL)
      {
        /*printf("size_mapped %s "GT_WU" "GT_WU" => "GT_WU"\n",
                    gt_str_get(sfxmappedrange->tablename),
                    minindex,maxindex,
                    gt_Sfxmappedrange_size_mapped(sfxmappedrange,minindex,
                                                  maxindex));*/
        sumsize += gt_Sfxmappedrange_size_mapped(sfxmappedrange,
                                                 minindex,
                                                 maxindex);
      }
    }
    return sumsize;
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
testq %rdi, %rdi
je 0x1ef553
movq %rdi, %r15
movq 0x8(%rdi), %rax
xorl %r12d, %r12d
testq %rax, %rax
je 0x1ef55e
xorl %r13d, %r13d
movq (%r15), %rcx
movq (%rcx,%r13,8), %rdi
testq %rdi, %rdi
je 0x1ef549
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1ef0f6
addq %rax, %r12
movq 0x8(%r15), %rax
incq %r13
cmpq %rax, %r13
jb 0x1ef52b
jmp 0x1ef55e
subq %r14, %rbx
jb 0x1ef56b
incq %rbx
movq %rbx, %r12
movq %r12, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
callq 0x798eb
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/match/sfx-maprange.c
// Function: gt_Sfxmappedrangelist_size_entire
GtUword gt_Sfxmappedrangelist_size_entire(const GtSfxmappedrangelist *sfxmrlist)
{
  if (sfxmrlist == NULL)
  {
    return 0;
  } else
  {
    GtUword idx, sumsize = 0;

    for (idx = 0; idx < sfxmrlist->nextfree; idx++)
    {
      GtSfxmappedrange *sfxmappedrange = sfxmrlist->arr[idx];
      if (sfxmappedrange != NULL)
      {
        sumsize += gt_Sfxmappedrange_size_entire(sfxmappedrange);
      }
    }
    return sumsize;
  }
}

// Assembly:
testq %rdi, %rdi
je 0x1ef5a3
movq 0x8(%rdi), %rcx
testq %rcx, %rcx
je 0x1ef5a3
movq (%rdi), %rdx
xorl %eax, %eax
xorl %esi, %esi
movq (%rdx,%rsi,8), %rdi
testq %rdi, %rdi
je 0x1ef59a
movq 0x30(%rdi), %r8
imulq 0x38(%rdi), %r8
addq %r8, %rax
incq %rsi
cmpq %rsi, %rcx
jne 0x1ef585
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/match/sfx-partssuf.c
// Function: gt_suftabparts_variance
double gt_suftabparts_variance(const GtSuftabparts *suftabparts)
{

  gt_assert(suftabparts->numofparts > 0);
  if (suftabparts->numofparts == 1U)
  {
    return 0.0;
  } else
  {
    double meanwidth, difference, sum = 0.0;
    unsigned int part;

    meanwidth
      = (double)
        gt_suftabparts_sumofwidth(suftabparts->numofparts-1,suftabparts)/
        suftabparts->numofparts;
    for (part = 0; part < suftabparts->numofparts; part++)
    {
      difference = (double) suftabparts->components[part].widthofpart
                   - meanwidth;
      sum += difference * difference;
    }
    return sum/(double) (suftabparts->numofparts-1);
  }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0xc(%rdi), %edi
xorpd %xmm0, %xmm0
cmpl $0x1, %edi
je 0x1ef8a2
testl %edi, %edi
je 0x1ef8a4
decl %edi
movq %rbx, %rsi
callq 0x1ef762
movl 0xc(%rbx), %ecx
testq %rcx, %rcx
je 0x1ef890
movq %rax, %xmm0
punpckldq 0x1580c3(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x1580cb(%rip), %xmm0   # 0x3478f0
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
xorps %xmm0, %xmm0
cvtsi2sd %rcx, %xmm0
divsd %xmm0, %xmm1
movq (%rbx), %rax
movq %rcx, %rdx
shlq $0x4, %rdx
leaq (%rdx,%rdx,2), %rdx
xorpd %xmm0, %xmm0
xorl %esi, %esi
movsd 0x158087(%rip), %xmm2   # 0x3478e0
movapd 0x15808f(%rip), %xmm3   # 0x3478f0
movsd (%rax,%rsi), %xmm4
unpcklps %xmm2, %xmm4            # xmm4 = xmm4[0],xmm2[0],xmm4[1],xmm2[1]
subpd %xmm3, %xmm4
movapd %xmm4, %xmm5
unpckhpd %xmm4, %xmm5            # xmm5 = xmm5[1],xmm4[1]
addsd %xmm4, %xmm5
subsd %xmm1, %xmm5
mulsd %xmm5, %xmm5
addsd %xmm5, %xmm0
addq $0x30, %rsi
cmpq %rsi, %rdx
jne 0x1ef861
jmp 0x1ef894
xorpd %xmm0, %xmm0
decl %ecx
xorps %xmm1, %xmm1
cvtsi2sd %rcx, %xmm1
divsd %xmm1, %xmm0
popq %rbx
retq
callq 0x79a3d
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/match/sfx-run.c
// Function: gt_parseargsandcallsuffixerator
int gt_parseargsandcallsuffixerator(bool doesa,int argc,
                                    const char **argv,GtError *err)
{
  Suffixeratoroptions so;
  int retval;
  bool haserr = false;

  gt_error_check(err);
  retval = gt_suffixeratoroptions(&so,doesa,argc,argv,err);
  if (retval == 0)
  {
    GtLogger *logger = gt_logger_new(so.beverbose,
                                     GT_LOGGER_DEFLT_PREFIX, stdout);

    gt_logger_log(logger,"sizeof (GtUword)="GT_WU"",
                  (GtUword) (sizeof (GtUword) * CHAR_BIT));
    if (gt_runsuffixerator(doesa,&so,NULL,logger,err) < 0)
    {
      haserr = true;
    }
    gt_logger_delete(logger);
    logger = NULL;
  } else
  {
    if (retval < 0)
    {
      haserr = true;
    }
  }
  gt_sfxoptions_delete(&so);
  return haserr ? -1 : 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movl %esi, %r15d
movl %edi, %ebp
testq %rcx, %rcx
je 0x1f1186
movq %rbx, %rdi
callq 0xfcc32
testb %al, %al
jne 0x1f1213
movzbl %bpl, %ebp
movq %rsp, %rdi
movl %ebp, %esi
movl %r15d, %edx
movq %r14, %rcx
movq %rbx, %r8
callq 0x3299c7
testl %eax, %eax
je 0x1f11aa
movl %eax, %r14d
sarl $0x1f, %r14d
jmp 0x1f11fd
movq %rsp, %r14
movzbl (%r14), %edi
movq 0x2c7d20(%rip), %rax    # 0x4b8ed8
movq (%rax), %rdx
leaq 0x155712(%rip), %rsi    # 0x3468d4
callq 0x103e40
movq %rax, %r15
leaq 0x1c7cf4(%rip), %rsi    # 0x3b8ec5
movl $0x40, %edx
movq %rax, %rdi
xorl %eax, %eax
callq 0x103fe1
movl %ebp, %edi
movq %r14, %rsi
xorl %edx, %edx
movq %r15, %rcx
movq %rbx, %r8
callq 0x1f0370
movl %eax, %r14d
movq %r15, %rdi
callq 0x1040e0
movq %rsp, %rdi
callq 0x32998c
movl %r14d, %eax
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x7a085
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/match/sfx-run.c
// Function: gt_suflcptab2genomediff
static void gt_suflcptab2genomediff(void *data,
                                    const GtSuffixsortspace *sssp,
                                    const GtLcpvalues *tableoflcpvalues,
                                    GtUword bucketoffset,
                                    GtUword numberofsuffixes,
                                    GtUword posoffset)
{
  (void) gt_sfx_multiesa2shulengthdist(
                  (GtBUstate_shulen *) data,
                  gt_suffixsortspace_getptr_ulong(sssp,bucketoffset+posoffset),
                  gt_suffixsortspace_getptr_uint32(sssp,bucketoffset+posoffset),
                  gt_lcptab_getptr(tableoflcpvalues,bucketoffset),
                  numberofsuffixes,
                  NULL);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, (%rsp)
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
leaq (%r9,%rcx), %rbp
movq %rsi, %rdi
movq %rbp, %rsi
callq 0x1fc983
movq %rax, %rbx
movq %r12, %rdi
movq %rbp, %rsi
callq 0x1fc9b2
movq %rax, %r12
movq %r15, %rdi
movq %r14, %rsi
callq 0x1ec378
movq %r13, %rdi
movq %rbx, %rsi
movq %r12, %rdx
movq %rax, %rcx
movq (%rsp), %r8
xorl %r9d, %r9d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1a6907
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/match/sfx-sain.c
// Function: gt_sain_encseq_sortsuffixes
GtUsainindextype *gt_sain_encseq_sortsuffixes(const GtEncseq *encseq,
                                              GtReadmode readmode,
                                              bool intermediatecheck,
                                              bool finalcheck,
                                              GtLogger *logger,
                                              GtTimer *timer)
{
  GtUword nonspecialentries, suftabentries, totallength;
  GtUsainindextype *suftab;
  GtSainseq *sainseq;

  totallength = gt_encseq_total_length(encseq);
  nonspecialentries = totallength - gt_encseq_specialcharacters(encseq);
  suftabentries = totallength+1;
  suftab = (GtUsainindextype *) gt_calloc((size_t) suftabentries,
                                          sizeof *suftab);
  sainseq = gt_sainseq_new_from_encseq(encseq,readmode);
  gt_sain_rec_sortsuffixes(0,
                           sainseq,
                           suftab,
                           0,
                           nonspecialentries,
                           suftabentries,
                           intermediatecheck,
                           finalcheck,
                           logger,
                           timer);
#ifdef GT_SAIN_WITHCOUNTS
  printf("countcharaccess="GT_WU" (%.2f)\n",gt_sain_countcharaccess,
          (double) gt_sain_countcharaccess/sainseq->totallength);
#endif
  gt_sainseq_delete(sainseq);
  return suftab;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r9, 0x28(%rsp)
movq %r8, 0x30(%rsp)
movl %ecx, 0x8(%rsp)
movl %edx, 0xc(%rsp)
movl %esi, %ebx
movq %rdi, %r14
callq 0xe7b9c
movq %rax, %r13
movq %r14, %rdi
callq 0xec58b
movq %rax, 0x10(%rsp)
leaq 0x1(%r13), %rdi
leaq 0x1c7dc5(%rip), %rbp    # 0x3b9098
movl $0x4, %esi
movq %rdi, 0x18(%rsp)
movq %rbp, %rdx
movl $0x638, %ecx            # imm = 0x638
callq 0x10436a
movq %rax, 0x20(%rsp)
movl $0x58, %edi
movq %rbp, %rsi
movl $0x74, %edx
callq 0x104226
movq %rax, %rbp
movl $0x2, 0x50(%rax)
movq %r14, 0x38(%rax)
movq $0x0, 0x48(%rax)
movl %ebx, 0x40(%rax)
movq %r14, %rdi
callq 0xe7b9c
movq %rax, (%rbp)
movq %r14, %rdi
callq 0xebcb6
movl %eax, %eax
movq %rax, 0x8(%rbp)
movq (%rbp), %rdx
leaq 0x100(%rdx), %rsi
movq %rbp, %rdi
callq 0x1f3701
cmpq $0x0, 0x8(%rbp)
je 0x1f1384
andl $-0x2, %ebx
movb $0x3, %r12b
xorl %r15d, %r15d
cmpl $0x2, %ebx
movzbl %r12b, %r12d
movl %r15d, %eax
cmovel %r12d, %eax
movzbl %al, %esi
movq %r14, %rdi
callq 0xebcf9
movq 0x18(%rbp), %rcx
movl %eax, (%rcx,%r15,4)
incq %r15
decb %r12b
cmpq 0x8(%rbp), %r15
jb 0x1f1357
subq 0x10(%rsp), %r13
movzbl 0x8(%rsp), %eax
movzbl 0xc(%rsp), %r10d
xorl %edi, %edi
movq %rbp, %rsi
movq 0x20(%rsp), %rbx
movq %rbx, %rdx
xorl %ecx, %ecx
movq %r13, %r8
movq 0x18(%rsp), %r9
pushq 0x28(%rsp)
pushq 0x38(%rsp)
pushq %rax
pushq %r10
callq 0x1f13d9
addq $0x20, %rsp
movq %rbp, %rdi
callq 0x1f31f9
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/match/sfx-sain.c
// Function: gt_sainseq_delete
static void gt_sainseq_delete(GtSainseq *sainseq)
{
  if (sainseq != NULL)
  {
    if (!sainseq->bucketfillptrpoints2suftab)
    {
      gt_free(sainseq->bucketfillptr);
    }
    if (!sainseq->bucketsizepoints2suftab)
    {
      gt_free(sainseq->bucketsize);
    }
    if (!sainseq->roundtablepoints2suftab)
    {
      gt_free(sainseq->roundtable);
    }
    if (sainseq->seqtype != GT_SAIN_INTSEQ)
    {
      gt_free(sainseq->sstarfirstcharcount);
    }
    gt_free(sainseq);
  }
}

// Assembly:
testq %rdi, %rdi
je 0x1f3287
pushq %rbx
movq %rdi, %rbx
cmpb $0x0, 0x54(%rdi)
jne 0x1f3221
movq 0x20(%rbx), %rdi
leaq 0x1c5e81(%rip), %rsi    # 0x3b9098
movl $0x11d, %edx            # imm = 0x11D
callq 0x1045eb
cmpb $0x0, 0x55(%rbx)
jne 0x1f323c
movq 0x18(%rbx), %rdi
leaq 0x1c5e66(%rip), %rsi    # 0x3b9098
movl $0x121, %edx            # imm = 0x121
callq 0x1045eb
cmpb $0x0, 0x56(%rbx)
jne 0x1f3257
movq 0x30(%rbx), %rdi
leaq 0x1c5e4b(%rip), %rsi    # 0x3b9098
movl $0x125, %edx            # imm = 0x125
callq 0x1045eb
cmpl $0x1, 0x50(%rbx)
je 0x1f3272
movq 0x28(%rbx), %rdi
leaq 0x1c5e30(%rip), %rsi    # 0x3b9098
movl $0x129, %edx            # imm = 0x129
callq 0x1045eb
leaq 0x1c5e1f(%rip), %rsi    # 0x3b9098
movq %rbx, %rdi
movl $0x12b, %edx            # imm = 0x12B
popq %rbx
jmp 0x1045eb
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/match/sfx-sain.c
// Function: gt_sain_plain_sortsuffixes
GtUsainindextype *gt_sain_plain_sortsuffixes(const GtUchar *plainseq,
                                             GtUword len,
                                             bool intermediatecheck,
                                             bool finalcheck,
                                             GtLogger *logger,
                                             GtTimer *timer)
{
  GtUword suftabentries;
  GtUsainindextype *suftab;
  GtSainseq *sainseq;

  suftabentries = len+1;
  suftab = (GtUsainindextype *) gt_calloc((size_t) suftabentries,
                                          sizeof *suftab);
  sainseq = gt_sainseq_new_from_plainseq(plainseq,len);
  gt_sain_rec_sortsuffixes(0,
                           sainseq,
                           suftab,
                           0,
                           sainseq->totallength,
                           suftabentries,
                           intermediatecheck,
                           finalcheck,
                           logger,
                           timer);
#ifdef GT_SAIN_WITHCOUNTS
  printf("countcharaccess="GT_WU" (%.2f)\n",gt_sain_countcharaccess,
          (double) gt_sain_countcharaccess/sainseq->totallength);
#endif
  gt_sainseq_delete(sainseq);
  return suftab;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, 0x8(%rsp)
movq %r8, 0x10(%rsp)
movl %ecx, 0x4(%rsp)
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r13
leaq 0x1(%rsi), %r12
leaq 0x1c5c94(%rip), %rbx    # 0x3b9098
movl $0x4, %esi
movq %r12, %rdi
movq %rbx, %rdx
movl $0x67e, %ecx            # imm = 0x67E
callq 0x10436a
movq %rax, %r15
movl $0x58, %edi
movq %rbx, %rsi
movl $0x93, %edx
callq 0x104226
movq %rax, %rbx
xorl %eax, %eax
movl %eax, 0x50(%rbx)
movq %r13, 0x38(%rbx)
movq %r14, (%rbx)
movq $0x100, 0x8(%rbx)       # imm = 0x100
movq $0x0, 0x48(%rbx)
movl %eax, 0x40(%rbx)
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x1f3701
testq %r14, %r14
jle 0x1f3480
movq 0x18(%rbx), %rax
movq 0x38(%rbx), %rcx
movzbl (%rcx), %edx
incl (%rax,%rdx,4)
incq %rcx
movq 0x38(%rbx), %rdx
addq %r14, %rdx
cmpq %rdx, %rcx
jb 0x1f346b
movq (%rbx), %r8
movzbl 0x4(%rsp), %eax
movzbl %bpl, %r10d
xorl %edi, %edi
movq %rbx, %rsi
movq %r15, %rdx
xorl %ecx, %ecx
movq %r12, %r9
pushq 0x8(%rsp)
pushq 0x18(%rsp)
pushq %rax
pushq %r10
callq 0x1f13d9
addq $0x20, %rsp
movq %rbx, %rdi
callq 0x1f31f9
movq %r15, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/match/sfx-sain.c
// Function: gt_sain_suf_lcp_iterator_delete
void gt_sain_suf_lcp_iterator_delete(GtSainSufLcpIterator *suflcpiterator)
{
  if (suflcpiterator != NULL)
  {
    gt_bare_encseq_delete(suflcpiterator->bare_encseq);
    gt_free(suflcpiterator->suftab);
    gt_free(suflcpiterator->plcptab);
    gt_free(suflcpiterator);
  }
}

// Assembly:
testq %rdi, %rdi
je 0x1f369b
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
callq 0x18a71c
movq (%rbx), %rdi
leaq 0x1c5a32(%rip), %r14    # 0x3b9098
movq %r14, %rsi
movl $0x6ef, %edx            # imm = 0x6EF
callq 0x1045eb
movq 0x8(%rbx), %rdi
movq %r14, %rsi
movl $0x6f0, %edx            # imm = 0x6F0
callq 0x1045eb
movq %rbx, %rdi
movq %r14, %rsi
movl $0x6f1, %edx            # imm = 0x6F1
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1045eb
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/match/sfx-sain.c
// Function: gt_sain_suf_lcp_iterator_nonspecials
GtUword gt_sain_suf_lcp_iterator_nonspecials(const GtSainSufLcpIterator
                                                   *suflcpiterator)
{
  GtUword totallength;

  gt_assert(suflcpiterator != NULL);
  totallength = gt_bare_encseq_total_length(suflcpiterator->bare_encseq);
  return totallength -
         gt_bare_encseq_specialcharacters(suflcpiterator->bare_encseq);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x1f36cb
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
callq 0x18ac02
movq %rax, %r14
movq 0x10(%rbx), %rdi
callq 0x18ac40
subq %rax, %r14
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0x7ab35
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/match/sfx-sain.c
// Function: gt_sain_suf_lcp_iterator_next
GtUword gt_sain_suf_lcp_iterator_next(GtUword *lcpvalue,
                                      GtSainSufLcpIterator *suflcpiterator)
{
  GtUsainindextype previoussuffix, currentsuffix;
  gt_assert(suflcpiterator != NULL);

  previoussuffix = suflcpiterator->suftab[suflcpiterator->currentsuftabindex++];
  currentsuffix = suflcpiterator->suftab[suflcpiterator->currentsuftabindex];
  *lcpvalue = (GtUword) suflcpiterator->plcptab[currentsuffix];
  return (GtUword) previoussuffix;
}

// Assembly:
testq %rsi, %rsi
je 0x1f36fb
movq 0x20(%rsi), %rcx
leaq 0x1(%rcx), %rax
movq %rax, 0x20(%rsi)
movq (%rsi), %rdx
movq 0x8(%rsi), %rsi
movl (%rdx,%rcx,4), %eax
movl 0x4(%rdx,%rcx,4), %ecx
movl (%rsi,%rcx,4), %ecx
movq %rcx, (%rdi)
retq
pushq %rax
callq 0x7ab6e
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/match/sfx-sain.c
// Function: gt_sain_allocate_tmpspace
static void gt_sain_allocate_tmpspace(GtSainseq *sainseq,
                                      GtUword maxvalue,
                                      GtUword len)
{
  sainseq->bucketsize
    = (GtUsainindextype *)
      gt_calloc((size_t) sainseq->numofchars,sizeof (*sainseq->bucketsize));
  sainseq->bucketfillptr
    = (GtUsainindextype *)
      gt_malloc(sizeof (*sainseq->bucketfillptr) * sainseq->numofchars);
  if (gt_sain_decideforfastmethod(maxvalue,len,sainseq->numofchars))
  {
    sainseq->roundtable = (GtUsainindextype *)
                          gt_malloc(sizeof (*sainseq->roundtable) *
                                    (size_t) GT_MULT2(sainseq->numofchars));
  } else
  {
    sainseq->roundtable = NULL;
  }
  sainseq->sstarfirstcharcount
    = (GtUsainindextype *)
      gt_calloc((size_t) sainseq->numofchars,
                sizeof (*sainseq->sstarfirstcharcount));
  sainseq->bucketfillptrpoints2suftab = false;
  sainseq->bucketsizepoints2suftab = false;
  sainseq->roundtablepoints2suftab = false;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
leaq 0x1c597b(%rip), %r12    # 0x3b9098
movl $0x4, %esi
movq %r12, %rdx
movl $0x5a, %ecx
callq 0x10436a
movq %rax, 0x18(%rbx)
movq 0x8(%rbx), %rdi
shlq $0x2, %rdi
movq %r12, %rsi
movl $0x5d, %edx
callq 0x104226
movq %rax, 0x20(%rbx)
movq 0x8(%rbx), %rdi
shrq $0x3e, %r15
cmpl $0x3, %r15d
setb %al
cmpq $0x401, %r14            # imm = 0x401
setae %cl
andb %al, %cl
leaq (%rdi,%rdi), %rax
cmpq %r14, %rax
setbe %al
andb %cl, %al
cmpb $0x1, %al
jne 0x1f3792
shlq $0x3, %rdi
leaq 0x1c5916(%rip), %rsi    # 0x3b9098
movl $0x62, %edx
callq 0x104226
movq 0x8(%rbx), %rdi
jmp 0x1f3794
xorl %eax, %eax
movq %rax, 0x30(%rbx)
leaq 0x1c58f9(%rip), %rdx    # 0x3b9098
movl $0x4, %esi
movl $0x6a, %ecx
callq 0x10436a
movq %rax, 0x28(%rbx)
movw $0x0, 0x54(%rbx)
movb $0x0, 0x56(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/match/sfx-sain.c
// Function: gt_sain_moveSstar2front
static void gt_sain_moveSstar2front(GtUword countSstartype,
                                    GtSsainindextype *suftab,
                                    GT_UNUSED GtUword nonspecialentries)
{
  GtUword readidx, writeidx = 0;
  GtSsainindextype position;

  for (readidx = 0; (position = suftab[readidx]) < 0; readidx++)
  {
    position = ~position;
    suftab[readidx] = position;
    gt_assert ((readidx + 1) < nonspecialentries);
  }
  if (readidx < countSstartype)
  {
    for (writeidx = readidx, readidx++; /* Nothing */; readidx++)
    {
      gt_assert (readidx < nonspecialentries);
      if ((position = suftab[readidx]) < 0)
      {
        position = ~position;
        gt_assert(writeidx < readidx);
        suftab[writeidx++] = position;
        suftab[readidx] = 0;
        if (writeidx == countSstartype)
        {
          break;
        }
      } else
      {
        suftab[readidx] = 0;
      }
    }
  } else
  {
    writeidx = readidx;
  }
  gt_assert(writeidx == countSstartype);
}

// Assembly:
pushq %rax
cmpq $0x1, %rdx
movq %rdx, %rcx
adcq $0x0, %rcx
xorl %eax, %eax
movl (%rsi,%rax,4), %r8d
testl %r8d, %r8d
jns 0x1f37f3
notl %r8d
movl %r8d, (%rsi,%rax,4)
incq %rax
cmpq %rax, %rcx
jne 0x1f37d6
callq 0x7ac52
cmpq %rdi, %rax
jae 0x1f3833
leaq 0x1(%rax), %rcx
cmpq %rdx, %rcx
jae 0x1f3837
movl (%rsi,%rcx,4), %r8d
testl %r8d, %r8d
js 0x1f3813
movl $0x0, (%rsi,%rcx,4)
jmp 0x1f382e
cmpq %rcx, %rax
jae 0x1f383c
notl %r8d
movl %r8d, (%rsi,%rax,4)
incq %rax
movl $0x0, (%rsi,%rcx,4)
cmpq %rdi, %rax
je 0x1f3835
incq %rcx
jmp 0x1f37fc
jne 0x1f3841
popq %rax
retq
callq 0x7ac19
callq 0x7abe0
callq 0x7aba7
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/match/sfx-sain.c
// Function: gt_sain_checkorder
static void gt_sain_checkorder(const GtSainseq *sainseq,
                               const GtUsainindextype *suftab,
                               GtUword start,
                               GtUword end)
{
  GtUword idx;

  for (idx = start+1; idx <= end; idx++)
  {
    int cmp = gt_sain_compare_suffixes(sainseq,(GtUword) suftab[idx-1],
                                       (GtUword) suftab[idx]);

    if (cmp != -1)
    {
      fprintf(stderr,
              "%s: check interval ["GT_WU","GT_WU"] at idx="GT_WU": suffix "
              ""GT_WU" >= "GT_WU"\n",__func__,start,end,idx,
              (GtUword) suftab[idx-1],
              (GtUword) suftab[idx]);
      exit(GT_EXIT_PROGRAMMING_ERROR);
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, (%rsp)
testq %rdx, %rdx
je 0x1f3b6d
movq %rsi, %r14
movq %rdi, %r12
movl $0x1, %r15d
movl -0x4(%r14,%r15,4), %r13d
movl (%r14,%r15,4), %ebp
cmpl %ebp, %r13d
je 0x1f3b96
movq (%r12), %rax
cmpq %r13, %rax
jb 0x1f3b96
cmpq %rbp, %rax
jb 0x1f3b96
cmpq %r13, %rax
je 0x1f3b7c
cmpq %rax, %rbp
je 0x1f3b5b
movq %r12, %rdi
movq %r13, %rsi
callq 0x1f4f38
movq %rax, %rbx
movq %r12, %rdi
movq %rbp, %rsi
callq 0x1f4f38
cmpq %rax, %rbx
jb 0x1f3b60
ja 0x1f3b81
incq %r13
incq %rbp
movq (%r12), %rax
cmpq %rax, %r13
jne 0x1f3b25
jmp 0x1f3b7c
cmpq %rax, %r13
jae 0x1f3b9b
leaq 0x1(%r15), %rax
cmpq (%rsp), %r15
movq %rax, %r15
jne 0x1f3b00
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpq %rbp, %r13
jbe 0x1f3b91
leaq (%r14,%r15,4), %rdi
movq (%rsp), %rsi
movq %r15, %rdx
callq 0x7ade1
callq 0x7ada8
callq 0x7ae21
callq 0x7ad6f
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/match/sfx-sain.c
// Function: gt_sainbuffer_new
static GtSainbuffer *gt_sainbuffer_new(GtUsainindextype *suftab,
                                       GtUsainindextype *fillptr,
                                       GtUword numofchars,
                                       GtUword totallength,
                                       GtLogger *logger)
{
  if (numofchars <= UCHAR_MAX+1)
  {
    GtSainbuffer *buf = (GtSainbuffer *) gt_malloc(sizeof (*buf));

    buf->size = sizeof (*buf);
    buf->fillptr = fillptr;
    buf->suftab = suftab;
    buf->log_bufsize = 18 - (sizeof (GtUsainindextype) == (size_t) 4 ? 1 : 2) -
                             (int) gt_determinebitspervalue(numofchars);
    buf->buf_size = 1UL << buf->log_bufsize;
    buf->numofchars = numofchars;
    gt_assert(buf->buf_size <= UINT16_MAX);
    buf->cachesize = numofchars << buf->log_bufsize;
    buf->size += sizeof (*buf->values) * buf->cachesize;
    buf->size += sizeof (*buf->nextidx) * numofchars;
    if ((GtUword) buf->size * 10UL >= totallength)
    {
      gt_free(buf);
      buf = NULL;
    } else
    {
      buf->values = (GtUsainindextype *)
                    gt_malloc(sizeof (*buf->values) * buf->cachesize);
      buf->nextidx = gt_calloc((size_t) numofchars,sizeof (*buf->nextidx));
      gt_logger_log(logger,"used buffer of "GT_WU" bytes (bufsize="GT_WU")",
                         (GtUword) buf->size,buf->buf_size);
    }
    return buf;
  } else
  {
    return NULL;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpq $0x100, %rdx            # imm = 0x100
ja 0x1f3f4c
movq %r8, %r14
movq %rcx, %r12
movq %rdx, %r15
movq %rsi, %rbp
movq %rdi, %r13
leaq 0x1c5221(%rip), %rsi    # 0x3b9098
movl $0x48, %edi
movl $0x17d, %edx            # imm = 0x17D
callq 0x104226
movq %rax, %rbx
movq $0x48, 0x40(%rax)
movq %rbp, 0x20(%rax)
movq %r13, 0x28(%rax)
movq %r15, %rdi
callq 0x105e91
movl $0x11, %ecx
subl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
movl %ecx, 0x38(%rbx)
movq %rax, (%rbx)
movq %r15, 0x8(%rbx)
cmpl $0x10, %ecx
jae 0x1f3f60
movq %r15, %rdi
shlq %cl, %rdi
movq %rdi, 0x10(%rbx)
leaq (%r15,%r15), %rax
leaq (%rax,%rdi,4), %rax
addq 0x40(%rbx), %rax
movq %rax, 0x40(%rbx)
addq %rax, %rax
leaq (%rax,%rax,4), %rax
cmpq %r12, %rax
jae 0x1f3f38
shlq $0x2, %rdi
leaq 0x1c51a4(%rip), %r12    # 0x3b9098
movq %r12, %rsi
movl $0x191, %edx            # imm = 0x191
callq 0x104226
movq %rax, 0x18(%rbx)
movl $0x2, %esi
movq %r15, %rdi
movq %r12, %rdx
movl $0x192, %ecx            # imm = 0x192
callq 0x10436a
movq %rax, 0x30(%rbx)
movq (%rbx), %rcx
movq 0x40(%rbx), %rdx
leaq 0x1c5546(%rip), %rsi    # 0x3b9472
movq %r14, %rdi
xorl %eax, %eax
callq 0x103fe1
jmp 0x1f3f4e
leaq 0x1c5159(%rip), %rsi    # 0x3b9098
movq %rbx, %rdi
movl $0x18c, %edx            # imm = 0x18C
callq 0x1045eb
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x7afb0
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/match/sfx-sain.c
// Function: gt_sainbuffer_update
static void gt_sainbuffer_update(GtSainbuffer *buf,
                                 GtUword charidx,
                                 GtUsainindextype value)
{
  const GtUword offset = charidx << buf->log_bufsize;

  buf->values[offset + (GtUword) buf->nextidx[charidx]] = value;
  if ((GtUword) buf->nextidx[charidx] < buf->buf_size - 1)
  {
    buf->nextidx[charidx]++;
  } else
  {
    GtUsainindextype *writeptr = buf->suftab + buf->fillptr[charidx] - 1,
                     *readptr = buf->values + offset;
    const GtUsainindextype *readend = readptr + buf->buf_size;

    while (readptr < readend)
    {
      *(writeptr--) = *(readptr++);
    }
    buf->nextidx[charidx] = 0;
    buf->fillptr[charidx] -= buf->buf_size;
  }
}

// Assembly:
movb 0x38(%rdi), %cl
movq %rsi, %r8
shlq %cl, %r8
movq 0x30(%rdi), %rax
movzwl (%rax,%rsi,2), %r9d
shlq $0x2, %r8
addq 0x18(%rdi), %r8
movl %edx, (%r8,%r9,4)
movq (%rdi), %rcx
leaq -0x1(%rcx), %rdx
cmpq %r9, %rdx
jbe 0x1f3f98
incl %r9d
movw %r9w, (%rax,%rsi,2)
retq
movq 0x20(%rdi), %rdx
movq 0x28(%rdi), %r9
movl (%rdx,%rsi,4), %r10d
leaq (%r8,%rcx,4), %rdi
leaq (%r9,%r10,4), %r9
addq $-0x4, %r9
movl (%r8), %r10d
addq $0x4, %r8
movl %r10d, (%r9)
addq $-0x4, %r9
cmpq %rdi, %r8
jb 0x1f3fb0
movl (%rdx,%rsi,4), %edi
movw $0x0, (%rax,%rsi,2)
subl %ecx, %edi
movl %edi, (%rdx,%rsi,4)
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/match/sfx-sain.c
// Function: gt_sainbuffer_flushall
static void gt_sainbuffer_flushall(GtSainbuffer *buf)
{
  GtUword charidx;

  if (buf == NULL)
  {
    return;
  }
  for (charidx = 0; charidx < buf->numofchars; charidx++)
  {
    const GtUsainindextype bufleft = (GtUsainindextype) buf->nextidx[charidx];

    if (bufleft > 0)
    {
      GtUsainindextype *writeptr = buf->suftab + buf->fillptr[charidx] - 1,
                       *readptr = buf->values + (charidx << buf->log_bufsize);
      const GtUsainindextype *readend = readptr + bufleft;

      while (readptr < readend)
      {
        *(writeptr--) = *(readptr++);
      }
      buf->nextidx[charidx] = 0;
      buf->fillptr[charidx] -= bufleft;
    }
  }
}

// Assembly:
testq %rdi, %rdi
je 0x1f404a
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0x1f404a
pushq %rbx
movq 0x30(%rdi), %rdx
xorl %esi, %esi
movzwl (%rdx,%rsi,2), %r8d
testl %r8d, %r8d
je 0x1f4041
movq 0x20(%rdi), %r9
movb 0x38(%rdi), %cl
movq %rsi, %r10
shlq %cl, %r10
movq 0x28(%rdi), %r11
shlq $0x2, %r10
addq 0x18(%rdi), %r10
movl %r8d, %ecx
leaq (%r10,%rcx,4), %rcx
movl (%r9,%rsi,4), %ebx
leaq (%r11,%rbx,4), %r11
addq $-0x4, %r11
movl (%r10), %ebx
addq $0x4, %r10
movl %ebx, (%r11)
addq $-0x4, %r11
cmpq %rcx, %r10
jb 0x1f401d
movl (%r9,%rsi,4), %ecx
movw $0x0, (%rdx,%rsi,2)
subl %r8d, %ecx
movl %ecx, (%r9,%rsi,4)
incq %rsi
cmpq %rax, %rsi
jne 0x1f3fe7
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/match/sfx-sain.c
// Function: gt_sainbuffer_delete
static void gt_sainbuffer_delete(GtSainbuffer *buf)
{
  if (buf != NULL)
  {
    gt_free(buf->values);
    gt_free(buf->nextidx);
    gt_free(buf);
  }
}

// Assembly:
testq %rdi, %rdi
je 0x1f4097
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
leaq 0x1c5036(%rip), %r14    # 0x3b9098
movq %r14, %rsi
movl $0x1d6, %edx            # imm = 0x1D6
callq 0x1045eb
movq 0x30(%rbx), %rdi
movq %r14, %rsi
movl $0x1d7, %edx            # imm = 0x1D7
callq 0x1045eb
movq %rbx, %rdi
movq %r14, %rsi
movl $0x1d8, %edx            # imm = 0x1D8
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1045eb
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/match/sfx-sain.c
// Function: gt_sain_special_singleSinduction1
static void gt_sain_special_singleSinduction1(GtSainseq *sainseq,
                                              GtSsainindextype *suftab,
                                              GtSsainindextype position)
{
  GtUword currentcc = gt_sainseq_getchar(sainseq,(GtUword) position);

  if (currentcc < sainseq->numofchars)
  {
    GtUword leftcontextcc;
    GtUsainindextype putidx = --sainseq->bucketfillptr[currentcc];

    gt_assert(position > 0);
    leftcontextcc = gt_sainseq_getchar(sainseq,(GtUword) --position);
    if (sainseq->roundtable != NULL)
    {
      GtUword t = (currentcc << 1) |
                  (leftcontextcc > currentcc ? 1UL : 0);

      gt_assert (sainseq->roundtable[t] <= sainseq->currentround);
      if (sainseq->roundtable[t] < sainseq->currentround)
      {
        sainseq->roundtable[t] = sainseq->currentround;
      }
      position += sainseq->totallength;
    }
    suftab[putidx] = (leftcontextcc > currentcc) ? ~(position+1) : position;
#ifdef SAINSHOWSTATE
    printf("end S-induce: suftab["GT_WU"]="GT_WD"\n",putidx,suftab[putidx]);
#endif
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %r14d
movq %rsi, %rbx
movq %rdi, %r12
movslq %edx, %rsi
callq 0x1f4f38
cmpq 0x8(%r12), %rax
jae 0x1f4dc7
movq %rax, %r15
movq 0x20(%r12), %rax
movl (%rax,%r15,4), %ebp
decl %ebp
movl %ebp, (%rax,%r15,4)
testl %r14d, %r14d
jle 0x1f4dd0
decl %r14d
movq %r12, %rdi
movq %r14, %rsi
callq 0x1f4f38
movq 0x30(%r12), %rcx
testq %rcx, %rcx
je 0x1f4db3
xorl %edx, %edx
cmpq %r15, %rax
seta %dl
leaq (%rdx,%r15,2), %rdx
movl 0x10(%r12), %esi
cmpl %esi, (%rcx,%rdx,4)
ja 0x1f4dd5
jae 0x1f4daf
movl %esi, (%rcx,%rdx,4)
addl (%r12), %r14d
movl $0xfffffffe, %ecx       # imm = 0xFFFFFFFE
subl %r14d, %ecx
cmpq %r15, %rax
cmovbel %r14d, %ecx
movl %ebp, %eax
movl %ecx, (%rbx,%rax,4)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x7b68d
callq 0x7b6c6
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/match/sfx-sain.c
// Function: gt_sainseq_getchar
static GtUword gt_sainseq_getchar(const GtSainseq *sainseq,
                                  GtUword position)
{
  gt_assert(position < sainseq->totallength);
#ifdef GT_SAIN_WITHCOUNTS
  gt_sain_countcharaccess++;
#endif
  switch (sainseq->seqtype)
  {
    case GT_SAIN_PLAINSEQ:
      return (GtUword) sainseq->seq.plainseq[position];
    case GT_SAIN_INTSEQ:
      return (GtUword) sainseq->seq.array[position];
    case GT_SAIN_ENCSEQ:
      {
        GtUchar cc = gt_encseq_get_encoded_char(sainseq->seq.encseq,
                                                position,
                                                sainseq->readmode);
        return GT_ISSPECIAL(cc) ? GT_UNIQUEINT(position) : (GtUword) cc;
      }
    case GT_SAIN_BARE_ENCSEQ:
      {
        GtUchar cc = sainseq->seq.plainseq[position];
        return GT_ISSPECIAL(cc) ? GT_UNIQUEINT(position) : (GtUword) cc;
      }
  }
#ifndef S_SPLINT_S
  return 0;
#endif
}

// Assembly:
pushq %rbx
cmpq %rsi, (%rdi)
jbe 0x1f4fb3
movl 0x50(%rdi), %eax
cmpq $0x3, %rax
ja 0x1f4faf
movq %rsi, %rbx
leaq 0x1c4137(%rip), %rcx    # 0x3b9088
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x38(%rdi), %rax
movzbl (%rax,%rbx), %eax
jmp 0x1f4fb1
movq 0x38(%rdi), %rax
movl 0x40(%rdi), %edx
movq %rax, %rdi
movq %rbx, %rsi
callq 0xe7bbc
addq $0x100, %rbx            # imm = 0x100
cmpb $-0x2, %al
movzbl %al, %eax
cmovaeq %rbx, %rax
jmp 0x1f4fb1
movq 0x38(%rdi), %rax
movzbl (%rax,%rbx), %eax
addq $0x100, %rbx            # imm = 0x100
cmpq $0xfe, %rax
cmovbq %rax, %rbx
movq %rbx, %rax
jmp 0x1f4fb1
movq 0x38(%rdi), %rax
movl (%rax,%rbx,4), %eax
jmp 0x1f4fb1
xorl %eax, %eax
popq %rbx
retq
callq 0x7b771
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/match/sfx-sain.c
// Function: gt_sain_special_singleSinduction2
static void gt_sain_special_singleSinduction2(const GtSainseq *sainseq,
                                              GtSsainindextype *suftab,
                                              GtSsainindextype position,
                                              GT_UNUSED GtUword
                                                nonspecialentries)
{
  GtUword currentcc;

  currentcc = gt_sainseq_getchar(sainseq,(GtUword) --position);
  if (currentcc < sainseq->numofchars)
  {
    GtUsainindextype putidx = --sainseq->bucketfillptr[currentcc];

    gt_assert((GtUword) putidx < nonspecialentries);
    suftab[putidx] = (position == 0 ||
                      gt_sainseq_getchar(sainseq,
                                         (GtUword)
                                         (position-1)) > currentcc)
                      ? ~position : position;
#ifdef SAINSHOWSTATE
    printf("end S-induce: suftab["GT_WU"]="GT_WD"\n",putidx,suftab[putidx]);
#endif
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r13
movl %edx, %r14d
movq %rsi, %rbx
movq %rdi, %r15
leal -0x1(%r14), %ebp
movslq %ebp, %rsi
callq 0x1f4f38
cmpq 0x8(%r15), %rax
jae 0x1f5020
movq %rax, %r12
movq %rbx, (%rsp)
movq 0x20(%r15), %rax
movl (%rax,%r12,4), %ebx
decl %ebx
movl %ebx, (%rax,%r12,4)
cmpq %r13, %rbx
jae 0x1f502f
testl %ebp, %ebp
je 0x1f5013
leal -0x2(%r14), %eax
movslq %eax, %rsi
movq %r15, %rdi
callq 0x1f4f38
cmpq %r12, %rax
jbe 0x1f5019
negl %r14d
movl %r14d, %ebp
movq (%rsp), %rax
movl %ebp, (%rax,%rbx,4)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x7b7aa