// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/sfx-diffcov.c
// Function: gt_differencecover_new
GtDifferencecover *gt_differencecover_new(unsigned int vparam,
                                          const GtEncseq *encseq,
                                          GtReadmode readmode,
                                          unsigned int outerprefixlength,
                                          GtLogger *logger)
{
  unsigned int offset = 0, v = 1U;
  GtDifferencecover *dcov;
  bool found = false;

  dcov = gt_malloc(sizeof (*dcov));
  dcov->requiredspace = sizeof (*dcov);
  dcov->numofchars = gt_alphabet_num_of_chars(gt_encseq_alphabet(encseq));
  dcov->totallength = gt_encseq_total_length(encseq);
  dcov->logger = logger;
  dcov->samplesize_upperbound = 0;
  dcov->rmq = NULL;
  for (dcov->logmod = 0;
       dcov->logmod < (unsigned int) (sizeof (differencecoversizes)/
                                      sizeof (differencecoversizes[0]));
       dcov->logmod++)
  {
    if (v == vparam)
    {
      dcov->size = differencecoversizes[dcov->logmod];
      dcov->samplesize_upperbound
        = (GtUword) (GT_DIVV(dcov->totallength) + 1) * dcov->size;
      dcov->diffvalues = differencecovertab + offset;
      if (dcov->samplesize_upperbound <= GT_DIFFERENCECOVER_MAX_SAMPLESIZE)
      {
        found = true;
        break;
      }
    }
    offset += differencecoversizes[dcov->logmod];
    v = GT_MULT2(v);
  }
  if (!found)
  {
    gt_free(dcov);
    return NULL;
  }
  if (outerprefixlength == 0)
  {
    dcov->prefixlength = 0;
  } else
  {
    dcov->prefixlength
      = gt_recommendedprefixlength(dcov->numofchars,
                                   dcov->samplesize_upperbound,
                                   GT_RECOMMENDED_MULTIPLIER_DEFAULT,
                                   true);
    if (outerprefixlength > 0 && dcov->prefixlength > outerprefixlength)
    {
      dcov->prefixlength = outerprefixlength;
    }
    gt_assert(dcov->prefixlength > 0);
  }
  dcov->vparam = 1U << (dcov->logmod);
  dcov->vmodmask = dcov->vparam-1;
#ifdef WITHcomputehvalue
  dcov->hvalue = dc_computehvalue(dcov,totallength);
#endif
  dcov->encseq = encseq;
  dcov->readmode = readmode;
  dcov->bcktab = NULL;
  dcov->sortedsample = NULL;
  dcov->filltable = NULL;
  dcov->multimappower = NULL;
  dc_fillcoverrank(dcov);
  dcov->diff2pos = NULL; /* this is later initialized */
  dcov->allocateditvinfo = 0;
  dcov->itvinfo = NULL;
  dcov->currentdepth = 0;
  dcov->firstwithnewdepth.defined = false;
  dcov->firstwithnewdepth.depth = 0;
  dcov->firstwithnewdepth.totalwidth = 0;
  dcov->firstwithnewdepth.count = 0;
  dcov->firstwithnewdepth.blisbl = 0;
  dcov->firstwithnewdepth.width = 0;
  dcov->firstwithnewdepth.maxwidth = 0;
  dcov->currentqueuesize = 0;
  dcov->maxqueuesize = 0;
  dcov->inversesuftab = NULL;
  dcov->samplelcpvalues = NULL;
  dcov->firstgenerationtotalwidth = 0;
  dcov->firstgenerationcount = 0;
  GT_INITARRAY(&dcov->firstgeneration,GtDcPairsuffixptr);
  return dcov;
}

// Assembly:
subq $0x48, %rsp
movl %edi, 0x3c(%rsp)
movq %rsi, 0x30(%rsp)
movl %edx, 0x2c(%rsp)
movl %ecx, 0x28(%rsp)
movq %r8, 0x20(%rsp)
movl $0x0, 0x1c(%rsp)
movl $0x1, 0x18(%rsp)
movb $0x0, 0xf(%rsp)
movl $0x158, %edi            # imm = 0x158
leaq 0x2cc6f0(%rip), %rsi    # 0x5897bb
movl $0x1aa, %edx            # imm = 0x1AA
callq 0xe80f0
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq $0x158, 0x40(%rax)      # imm = 0x158
movq 0x30(%rsp), %rdi
callq 0xb0f00
movq %rax, %rdi
callq 0x7e8c0
movl %eax, %ecx
movq 0x10(%rsp), %rax
movl %ecx, 0x14(%rax)
movq 0x30(%rsp), %rdi
callq 0xa9d00
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x48(%rax)
movq 0x20(%rsp), %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x140(%rax)
movq 0x10(%rsp), %rax
movq $0x0, 0x80(%rax)
movq 0x10(%rsp), %rax
movq $0x0, 0x150(%rax)
movq 0x10(%rsp), %rax
movl $0x0, 0x4(%rax)
movq 0x10(%rsp), %rax
cmpl $0x10, 0x4(%rax)
jae 0x2bd233
movl 0x18(%rsp), %eax
cmpl 0x3c(%rsp), %eax
jne 0x2bd1f9
movq 0x10(%rsp), %rax
movl 0x4(%rax), %eax
movl %eax, %ecx
leaq 0x38157c(%rip), %rax    # 0x63e700
movzbl (%rax,%rcx), %ecx
movq 0x10(%rsp), %rax
movl %ecx, 0x8(%rax)
movq 0x10(%rsp), %rax
movq 0x48(%rax), %rax
movq 0x10(%rsp), %rcx
movl 0x4(%rcx), %ecx
shrq %cl, %rax
movq %rax, %rcx
addq $0x1, %rcx
movq 0x10(%rsp), %rax
movl 0x8(%rax), %eax
imulq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x80(%rax)
movl 0x1c(%rsp), %eax
leaq 0x381542(%rip), %rcx    # 0x63e710
shlq %rax
addq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x30(%rax)
movq 0x10(%rsp), %rax
movl $0xfffffffe, %ecx       # imm = 0xFFFFFFFE
cmpq %rcx, 0x80(%rax)
ja 0x2bd1f7
movb $0x1, 0xf(%rsp)
jmp 0x2bd233
jmp 0x2bd1f9
movq 0x10(%rsp), %rax
movl 0x4(%rax), %eax
movl %eax, %ecx
leaq 0x3814f6(%rip), %rax    # 0x63e700
movzbl (%rax,%rcx), %eax
addl 0x1c(%rsp), %eax
movl %eax, 0x1c(%rsp)
movl 0x18(%rsp), %eax
shll %eax
movl %eax, 0x18(%rsp)
movq 0x10(%rsp), %rax
movl 0x4(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x4(%rax)
jmp 0x2bd156
testb $0x1, 0xf(%rsp)
jne 0x2bd25e
movq 0x10(%rsp), %rdi
leaq 0x2cc575(%rip), %rsi    # 0x5897bb
movl $0x1c7, %edx            # imm = 0x1C7
callq 0xe88c0
movq $0x0, 0x40(%rsp)
jmp 0x2bd4de
cmpl $0x0, 0x28(%rsp)
jne 0x2bd276
movq 0x10(%rsp), %rax
movl $0x0, 0x18(%rax)
jmp 0x2bd310
movq 0x10(%rsp), %rax
movl 0x14(%rax), %edi
movq 0x10(%rsp), %rax
movq 0x80(%rax), %rsi
movsd 0x2654c6(%rip), %xmm0   # 0x522758
movl $0x1, %edx
callq 0x2b12f0
movl %eax, %ecx
movq 0x10(%rsp), %rax
movl %ecx, 0x18(%rax)
cmpl $0x0, 0x28(%rsp)
jbe 0x2bd2c7
movq 0x10(%rsp), %rax
movl 0x18(%rax), %eax
cmpl 0x28(%rsp), %eax
jbe 0x2bd2c7
movl 0x28(%rsp), %ecx
movq 0x10(%rsp), %rax
movl %ecx, 0x18(%rax)
jmp 0x2bd2c9
movq 0x10(%rsp), %rax
cmpl $0x0, 0x18(%rax)
ja 0x2bd30c
movq 0x37ecc5(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x258d2e(%rip), %rsi    # 0x516013
leaq 0x2cc4e7(%rip), %rdx    # 0x5897d3
leaq 0x2cc4f7(%rip), %rcx    # 0x5897ea
leaq 0x2cc4c1(%rip), %r8     # 0x5897bb
movl $0x1d8, %r9d            # imm = 0x1D8
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2bd30e
jmp 0x2bd310
movq 0x10(%rsp), %rax
movl 0x4(%rax), %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, %ecx
movq 0x10(%rsp), %rax
movl %ecx, (%rax)
movq 0x10(%rsp), %rax
movl (%rax), %ecx
subl $0x1, %ecx
movq 0x10(%rsp), %rax
movl %ecx, 0xc(%rax)
movq 0x30(%rsp), %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x60(%rax)
movl 0x2c(%rsp), %ecx
movq 0x10(%rsp), %rax
movl %ecx, 0x68(%rax)
movq 0x10(%rsp), %rax
movq $0x0, 0x58(%rax)
movq 0x10(%rsp), %rax
movq $0x0, 0x148(%rax)
movq 0x10(%rsp), %rax
movq $0x0, 0x90(%rax)
movq 0x10(%rsp), %rax
movq $0x0, 0x88(%rax)
movq 0x10(%rsp), %rdi
callq 0x2bd4f0
movq 0x10(%rsp), %rax
movq $0x0, 0x38(%rax)
movq 0x10(%rsp), %rax
movq $0x0, 0xa0(%rax)
movq 0x10(%rsp), %rax
movq $0x0, 0x108(%rax)
movq 0x10(%rsp), %rax
movq $0x0, 0xb8(%rax)
movq 0x10(%rsp), %rax
movb $0x0, 0xf8(%rax)
movq 0x10(%rsp), %rax
movq $0x0, 0xf0(%rax)
movq 0x10(%rsp), %rax
movq $0x0, 0xe0(%rax)
movq 0x10(%rsp), %rax
movq $0x0, 0xd8(%rax)
movq 0x10(%rsp), %rax
movq $0x0, 0xc8(%rax)
movq 0x10(%rsp), %rax
movq $0x0, 0xd0(%rax)
movq 0x10(%rsp), %rax
movq $0x0, 0xe8(%rax)
movq 0x10(%rsp), %rax
movq $0x0, 0xa8(%rax)
movq 0x10(%rsp), %rax
movq $0x0, 0xb0(%rax)
movq 0x10(%rsp), %rax
movq $0x0, 0x98(%rax)
movq 0x10(%rsp), %rax
movq $0x0, 0x128(%rax)
movq 0x10(%rsp), %rax
movq $0x0, 0x130(%rax)
movq 0x10(%rsp), %rax
movq $0x0, 0x138(%rax)
movq 0x10(%rsp), %rax
movq $0x0, 0x110(%rax)
movq 0x10(%rsp), %rax
movq $0x0, 0x120(%rax)
movq 0x10(%rsp), %rax
movq $0x0, 0x118(%rax)
movq 0x10(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
addq $0x48, %rsp
retq
nopl (%rax,%rax)