// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/match/sfx-diffcov.c
// Function: dc_sortremainingsamples
static void dc_sortremainingsamples(GtDifferencecover *dcov)
{
  GtDcPairsuffixptr *pairptr;

  if (dcov->firstgenerationcount > 0)
  {
    dc_showintervalsizes(dcov->firstgenerationcount,
                         dcov->firstgenerationtotalwidth,
                         dcov->effectivesamplesize,
                         dcov->allocateditvinfo,
                         dcov->currentdepth,
                         dcov->logger);
  }
  if (dcov->inversesuftab == NULL)
  { /* now maxdepth > prefixlength */
    dc_initinversesuftabspecials(dcov);
    dc_initinversesuftabnonspecials(dcov);
  } else
  {
    gt_assert(dcov->firstgeneration.nextfreeGtDcPairsuffixptr == 0);
  }
  for (pairptr = dcov->firstgeneration.spaceGtDcPairsuffixptr;
       pairptr < dcov->firstgeneration.spaceGtDcPairsuffixptr +
                 dcov->firstgeneration.nextfreeGtDcPairsuffixptr;
       pairptr++)
  {
    dc_anchorleftmost(dcov,pairptr->blisbl,pairptr->width);
  }
  for (pairptr = dcov->firstgeneration.spaceGtDcPairsuffixptr;
       pairptr < dcov->firstgeneration.spaceGtDcPairsuffixptr +
                 dcov->firstgeneration.nextfreeGtDcPairsuffixptr;
       pairptr++)
  {
    dc_sortsuffixesonthislevel(dcov,pairptr->blisbl, pairptr->width);
  }
  GT_FREEARRAY(&dcov->firstgeneration,GtDcPairsuffixptr);
  while (!gt_inl_dc_queue_isempty(dcov->rangestobesorted))
  {
    GtDcPairsuffixptr thispair;
    thispair = gt_inl_dc_queue_get(dcov->rangestobesorted);
    gt_assert(dcov->currentqueuesize > 0);
    dcov->currentqueuesize--;
    dc_sortsuffixesonthislevel(dcov,thispair.blisbl,thispair.width);
  }
  gt_logger_log(dcov->logger,"maxqueuesize="GT_WU"",dcov->maxqueuesize);
  gt_free(dcov->itvinfo);
  dcov->itvinfo = NULL;
  gt_inl_dc_queue_delete(dcov->rangestobesorted);
  dcov->rangestobesorted = NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x138(%rdi), %rdi
testq %rdi, %rdi
je 0x19b682
movq 0x130(%rbx), %rsi
movq 0x78(%rbx), %rdx
movq 0xa0(%rbx), %rcx
movq 0xb8(%rbx), %r8
movq 0x140(%rbx), %r9
callq 0x19c19c
cmpq $0x0, 0x98(%rbx)
je 0x19b81d
cmpq $0x0, 0x120(%rbx)
jne 0x19b8b6
leaq 0x110(%rbx), %r14
movq 0x110(%rbx), %rdi
movq %rdi, %r15
movq 0x120(%rbx), %rax
movq %rax, %rcx
shlq $0x4, %rcx
addq %rdi, %rcx
cmpq %rcx, %r15
jae 0x19b6e1
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %rbx, %rdi
callq 0x19c156
addq $0x10, %r15
movq 0x110(%rbx), %rdi
jmp 0x19b6af
movq %rdi, %r15
shlq $0x4, %rax
addq %rdi, %rax
cmpq %rax, %r15
jae 0x19b713
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %rbx, %rdi
callq 0x19bb38
addq $0x10, %r15
movq 0x110(%rbx), %rdi
movq 0x120(%rbx), %rax
jmp 0x19b6e4
testq %rdi, %rdi
je 0x19b787
leaq 0x1bb671(%rip), %rsi    # 0x356d90
movl $0x486, %edx            # imm = 0x486
callq 0x936f9
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
andq $0x0, 0x10(%r14)
jmp 0x19b787
decq %rcx
movq %rcx, 0x20(%rax)
movq 0x10(%rax), %rcx
movq %rcx, %rdi
testq %rcx, %rcx
jne 0x19b74e
movq 0x18(%rax), %rdi
movq (%rax), %rdx
shlq $0x4, %rcx
movq (%rdx,%rcx), %rsi
movq 0x8(%rdx,%rcx), %rdx
decq %rdi
movq %rdi, 0x10(%rax)
movq 0xa8(%rbx), %rax
testq %rax, %rax
je 0x19b87e
decq %rax
movq %rax, 0xa8(%rbx)
movq %rbx, %rdi
callq 0x19bb38
movq 0x100(%rbx), %rax
testq %rax, %rax
je 0x19b850
movq 0x20(%rax), %rcx
testq %rcx, %rcx
jne 0x19b737
movq 0xb0(%rbx), %rdx
movq 0x140(%rbx), %rdi
leaq 0x1bc20a(%rip), %rsi    # 0x3579bf
xorl %eax, %eax
callq 0x92e71
movq 0x108(%rbx), %rdi
leaq 0x1bb5c6(%rip), %rsi    # 0x356d90
movl $0x490, %edx            # imm = 0x490
callq 0x936f9
andq $0x0, 0x108(%rbx)
movq 0x100(%rbx), %r14
testq %r14, %r14
je 0x19b80f
movq (%r14), %rdi
leaq 0x1bb59e(%rip), %r15    # 0x356d90
movq %r15, %rsi
movl $0x94, %edx
callq 0x936f9
movq %r14, %rdi
movq %r15, %rsi
movl $0x95, %edx
callq 0x936f9
andq $0x0, 0x100(%rbx)
popq %rbx
popq %r14
popq %r15
retq
movq %rbx, %rdi
callq 0x19b0e6
xorl %r14d, %r14d
cmpq 0x78(%rbx), %r14
jae 0x19b69e
movq %rbx, %rdi
movq %r14, %rsi
callq 0x19ba4a
movq %rbx, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x19b985
incq %r14
jmp 0x19b828
movq 0x29c711(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1497b2(%rip), %rsi    # 0x2e5013
leaq 0x1c0fdc(%rip), %rdx    # 0x35c844
leaq 0x1bc161(%rip), %rcx    # 0x3579d0
leaq 0x1bb51a(%rip), %r8     # 0x356d90
movl $0x9f, %r9d
jmp 0x19b8aa
movq 0x29c6e3(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x149784(%rip), %rsi    # 0x2e5013
leaq 0x1bc10e(%rip), %rdx    # 0x3579a4
leaq 0x1bc0ef(%rip), %rcx    # 0x35798c
leaq 0x1bb4ec(%rip), %r8     # 0x356d90
movl $0x48b, %r9d            # imm = 0x48B
xorl %eax, %eax
callq 0x17a50
callq 0x17390
movq 0x29c6ab(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x14974c(%rip), %rsi    # 0x2e5013
leaq 0x1bc089(%rip), %rdx    # 0x357957
leaq 0x1bc0b7(%rip), %rcx    # 0x35798c
leaq 0x1bb4b4(%rip), %r8     # 0x356d90
movl $0x476, %r9d            # imm = 0x476
jmp 0x19b8aa