// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/sfx-diffcov.c
// Function: dc_sortsuffixesonthislevel
static void dc_sortsuffixesonthislevel(GtDifferencecover *dcov,
                                       GtUword blisbl,
                                       GtUword width)
{
  GtUword idx, rangestart, startpos;

  gt_assert(dcov != NULL);
  if (dcov->itvinfo == NULL)
  {
    dcov->itvinfo = gt_malloc(sizeof (*dcov->itvinfo) *
                              dcov->allocateditvinfo);
  }
  if (dcov->firstwithnewdepth.blisbl == blisbl &&
      dcov->firstwithnewdepth.width == width)
  {
    dcov->currentdepth = dcov->firstwithnewdepth.depth;
  }
  gt_assert(dcov->allocateditvinfo >= width);
  /*
  printf("new interval of width "GT_WU"\n",width);
  */
  for (idx=0; idx<width; idx++)
  {
    startpos = dc_suffixptrget(dcov,blisbl+idx);
    dcov->itvinfo[idx].suffixstart = startpos;
    dcov->itvinfo[idx].key
      = dc_inversesuftab_get(dcov,startpos + dcov->currentdepth);
  }
  qsort(dcov->itvinfo,(size_t) width,sizeof (*dcov->itvinfo),dc_compareitv);
  for (idx=0; idx<width; idx++)
  {
    dc_suffixptrset(dcov,blisbl+idx,dcov->itvinfo[idx].suffixstart);
  }
  rangestart = 0;
  for (idx=1UL; idx<width; idx++)
  {
    if (dcov->itvinfo[idx-1].key != dcov->itvinfo[idx].key)
    {
      if (rangestart + 1 < idx)
      {
        dc_processunsortedrange(dcov,
                                blisbl + rangestart,
                                idx - rangestart,
                                GT_MULT2(dcov->currentdepth));
        if (dcov->samplelcpvalues != NULL)
        {
          dc_setlcpvaluesofrunsortedrange(dcov->samplelcpvalues,
                                          blisbl + rangestart,
                                          idx - rangestart,
                                          GT_MULT2(dcov->currentdepth));
        }
        dc_anchorleftmost(dcov, blisbl + rangestart, idx - rangestart);
      } else
      {
        GtUword currentsuftabentry
          = dc_suffixptrget(dcov,blisbl+rangestart);

        gt_assert(rangestart + 1 == idx);
        dc_inversesuftab_set(dcov,currentsuftabentry,
                             blisbl+rangestart);
      }
      if (dcov->samplelcpvalues != NULL)
      {
        gt_lcptab_update(dcov->samplelcpvalues,
                         0,blisbl + idx,dcov->currentdepth);
      }
      rangestart = idx;
    }
  }
  if (rangestart + 1 < width)
  {
    dc_processunsortedrange(dcov,
                            blisbl + rangestart,
                            width - rangestart,
                            GT_MULT2(dcov->currentdepth));
    if (dcov->samplelcpvalues != NULL)
    {
      dc_setlcpvaluesofrunsortedrange(dcov->samplelcpvalues,
                                      blisbl + rangestart,
                                      width - rangestart,
                                      GT_MULT2(dcov->currentdepth));
    }
    dc_anchorleftmost(dcov, blisbl + rangestart, width - rangestart);
  } else
  {
    GtUword currentsuftabentry
      = dc_suffixptrget(dcov,blisbl+rangestart);
    dc_inversesuftab_set(dcov,currentsuftabentry,blisbl+rangestart);
  }
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq %rdx, 0x30(%rsp)
cmpq $0x0, 0x40(%rsp)
jne 0x2c42b3
movq 0x377d1e(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x251d87(%rip), %rsi    # 0x516013
leaq 0x2c556e(%rip), %rdx    # 0x589801
leaq 0x2c5ed4(%rip), %rcx    # 0x58a16e
leaq 0x2c551a(%rip), %r8     # 0x5897bb
movl $0x3e2, %r9d            # imm = 0x3E2
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2c42b5
movq 0x40(%rsp), %rax
cmpq $0x0, 0x108(%rax)
jne 0x2c42f4
movq 0x40(%rsp), %rax
movq 0xa0(%rax), %rdi
shlq $0x4, %rdi
leaq 0x2c54e0(%rip), %rsi    # 0x5897bb
movl $0x3e6, %edx            # imm = 0x3E6
callq 0xe80f0
movq %rax, %rcx
movq 0x40(%rsp), %rax
movq %rcx, 0x108(%rax)
movq 0x40(%rsp), %rax
movq 0xc8(%rax), %rax
cmpq 0x38(%rsp), %rax
jne 0x2c4332
movq 0x40(%rsp), %rax
movq 0xd0(%rax), %rax
cmpq 0x30(%rsp), %rax
jne 0x2c4332
movq 0x40(%rsp), %rax
movq 0xf0(%rax), %rcx
movq 0x40(%rsp), %rax
movq %rcx, 0xb8(%rax)
jmp 0x2c4334
movq 0x40(%rsp), %rax
movq 0xa0(%rax), %rax
cmpq 0x30(%rsp), %rax
jae 0x2c437f
movq 0x377c52(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x251cbb(%rip), %rsi    # 0x516013
leaq 0x2c5e2a(%rip), %rdx    # 0x58a189
leaq 0x2c5e08(%rip), %rcx    # 0x58a16e
leaq 0x2c544e(%rip), %r8     # 0x5897bb
movl $0x3ed, %r9d            # imm = 0x3ED
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2c4381
movq $0x0, 0x28(%rsp)
movq 0x28(%rsp), %rax
cmpq 0x30(%rsp), %rax
jae 0x2c4420
movq 0x40(%rsp), %rdi
movq 0x38(%rsp), %rsi
addq 0x28(%rsp), %rsi
callq 0x2c40e0
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rcx
movq 0x40(%rsp), %rax
movq 0x108(%rax), %rax
movq 0x28(%rsp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movq 0x40(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x40(%rsp), %rax
addq 0xb8(%rax), %rsi
callq 0x2c0130
movq %rax, %rcx
movq 0x40(%rsp), %rax
movq 0x108(%rax), %rax
movq 0x28(%rsp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, (%rax)
movq 0x28(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x28(%rsp)
jmp 0x2c438a
movq 0x40(%rsp), %rax
movq 0x108(%rax), %rdi
movq 0x30(%rsp), %rsi
movl $0x10, %edx
leaq 0x313(%rip), %rcx       # 0x2c4750
callq 0x19e70
movq $0x0, 0x28(%rsp)
movq 0x28(%rsp), %rax
cmpq 0x30(%rsp), %rax
jae 0x2c4497
movq 0x40(%rsp), %rdi
movq 0x38(%rsp), %rsi
addq 0x28(%rsp), %rsi
movq 0x40(%rsp), %rax
movq 0x108(%rax), %rax
movq 0x28(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rdx
callq 0x2c28e0
movq 0x28(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x28(%rsp)
jmp 0x2c444b
movq $0x0, 0x20(%rsp)
movq $0x1, 0x28(%rsp)
movq 0x28(%rsp), %rax
cmpq 0x30(%rsp), %rax
jae 0x2c4672
movq 0x40(%rsp), %rax
movq 0x108(%rax), %rax
movq 0x28(%rsp), %rcx
subq $0x1, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq 0x40(%rsp), %rcx
movq 0x108(%rcx), %rcx
movq 0x28(%rsp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
cmpq (%rcx), %rax
je 0x2c465d
movq 0x20(%rsp), %rax
addq $0x1, %rax
cmpq 0x28(%rsp), %rax
jae 0x2c459d
movq 0x40(%rsp), %rdi
movq 0x38(%rsp), %rsi
addq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
subq 0x20(%rsp), %rdx
movq 0x40(%rsp), %rax
movq 0xb8(%rax), %rcx
shlq %rcx
callq 0x2c47c0
movq 0x40(%rsp), %rax
cmpq $0x0, 0x128(%rax)
je 0x2c457d
movq 0x40(%rsp), %rax
movq 0x128(%rax), %rdi
movq 0x38(%rsp), %rsi
addq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
subq 0x20(%rsp), %rdx
movq 0x40(%rsp), %rax
movq 0xb8(%rax), %rcx
shlq %rcx
callq 0x2c4a70
movq 0x40(%rsp), %rdi
movq 0x38(%rsp), %rsi
addq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
subq 0x20(%rsp), %rdx
callq 0x2c4ae0
jmp 0x2c4619
movq 0x40(%rsp), %rdi
movq 0x38(%rsp), %rsi
addq 0x20(%rsp), %rsi
callq 0x2c40e0
movq %rax, 0x10(%rsp)
movq 0x20(%rsp), %rax
addq $0x1, %rax
cmpq 0x28(%rsp), %rax
je 0x2c45fe
movq 0x3779d3(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x251a3c(%rip), %rsi    # 0x516013
leaq 0x2c5bcb(%rip), %rdx    # 0x58a1a9
leaq 0x2c5b89(%rip), %rcx    # 0x58a16e
leaq 0x2c51cf(%rip), %r8     # 0x5897bb
movl $0x415, %r9d            # imm = 0x415
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2c4600
movq 0x40(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq 0x38(%rsp), %rdx
addq 0x20(%rsp), %rdx
callq 0x2c3f90
movq 0x40(%rsp), %rax
cmpq $0x0, 0x128(%rax)
je 0x2c4653
movq 0x40(%rsp), %rax
movq 0x128(%rax), %rdi
movq 0x38(%rsp), %rdx
addq 0x28(%rsp), %rdx
movq 0x40(%rsp), %rax
movq 0xb8(%rax), %rcx
xorl %eax, %eax
movl %eax, %esi
callq 0x2c01b0
movq 0x28(%rsp), %rax
movq %rax, 0x20(%rsp)
jmp 0x2c465f
movq 0x28(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x28(%rsp)
jmp 0x2c44a9
movq 0x20(%rsp), %rax
addq $0x1, %rax
cmpq 0x30(%rsp), %rax
jae 0x2c4716
movq 0x40(%rsp), %rdi
movq 0x38(%rsp), %rsi
addq 0x20(%rsp), %rsi
movq 0x30(%rsp), %rdx
subq 0x20(%rsp), %rdx
movq 0x40(%rsp), %rax
movq 0xb8(%rax), %rcx
shlq %rcx
callq 0x2c47c0
movq 0x40(%rsp), %rax
cmpq $0x0, 0x128(%rax)
je 0x2c46f6
movq 0x40(%rsp), %rax
movq 0x128(%rax), %rdi
movq 0x38(%rsp), %rsi
addq 0x20(%rsp), %rsi
movq 0x30(%rsp), %rdx
subq 0x20(%rsp), %rdx
movq 0x40(%rsp), %rax
movq 0xb8(%rax), %rcx
shlq %rcx
callq 0x2c4a70
movq 0x40(%rsp), %rdi
movq 0x38(%rsp), %rsi
addq 0x20(%rsp), %rsi
movq 0x30(%rsp), %rdx
subq 0x20(%rsp), %rdx
callq 0x2c4ae0
jmp 0x2c4748
movq 0x40(%rsp), %rdi
movq 0x38(%rsp), %rsi
addq 0x20(%rsp), %rsi
callq 0x2c40e0
movq %rax, 0x8(%rsp)
movq 0x40(%rsp), %rdi
movq 0x8(%rsp), %rsi
movq 0x38(%rsp), %rdx
addq 0x20(%rsp), %rdx
callq 0x2c3f90
addq $0x48, %rsp
retq
nopl (%rax)