// File: /workspace/github_c_makefile_star2_O1/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), %rcx
testq %rcx, %rcx
je 0x1f4ce4
movq 0x130(%rbx), %r8
movq 0xa0(%rbx), %r9
movq 0xb8(%rbx), %rdx
movq 0x140(%rbx), %rdi
movq %r8, %xmm0
movq 0x15bc6c(%rip), %xmm2   # 0x3508e0
punpckldq %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
movapd 0x15bc70(%rip), %xmm3   # 0x3508f0
subpd %xmm3, %xmm0
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
movq %rcx, %xmm0
punpckldq %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
subpd %xmm3, %xmm0
movapd %xmm0, %xmm4
unpckhpd %xmm0, %xmm4            # xmm4 = xmm4[1],xmm0[1]
addsd %xmm0, %xmm4
movapd %xmm1, %xmm0
mulsd 0x15db3b(%rip), %xmm1   # 0x3527f0
divsd %xmm4, %xmm0
movq 0x78(%rbx), %xmm4
punpckldq %xmm2, %xmm4    # xmm4 = xmm4[0],xmm2[0],xmm4[1],xmm2[1]
subpd %xmm3, %xmm4
movapd %xmm4, %xmm2
unpckhpd %xmm4, %xmm2            # xmm2 = xmm2[1],xmm4[1]
addsd %xmm4, %xmm2
divsd %xmm2, %xmm1
leaq 0x1cbcfd(%rip), %rsi    # 0x3c09da
movb $0x2, %al
callq 0x10906e
cmpq $0x0, 0x98(%rbx)
je 0x1f4cfd
cmpq $0x0, 0x120(%rbx)
je 0x1f4d43
callq 0x79ee6
movq %rbx, %rdi
callq 0x1f47a7
cmpq $0x0, 0x78(%rbx)
je 0x1f4d43
xorl %r14d, %r14d
movq 0x148(%rbx), %rdi
callq 0x205ed1
movq 0x148(%rbx), %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x206063
movq %rbx, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x1f4f58
incq %r14
cmpq 0x78(%rbx), %r14
jb 0x1f4d0f
movq 0x110(%rbx), %r15
cmpq $0x0, 0x120(%rbx)
jle 0x1f4d83
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %rbx, %rdi
callq 0x1f56e9
addq $0x10, %r15
movq 0x110(%rbx), %r14
movq 0x120(%rbx), %rax
shlq $0x4, %rax
addq %r14, %rax
cmpq %rax, %r15
jb 0x1f4d54
jmp 0x1f4d9b
movq %r15, %r14
jmp 0x1f4d9b
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
callq 0x1f501b
addq $0x10, %r14
movq 0x110(%rbx), %rdi
movq 0x120(%rbx), %rax
shlq $0x4, %rax
addq %rdi, %rax
cmpq %rax, %r14
jb 0x1f4d88
testq %rdi, %rdi
je 0x1f4e35
leaq 0x110(%rbx), %r14
leaq 0x1cb188(%rip), %rsi    # 0x3bff50
movl $0x486, %edx            # imm = 0x486
callq 0x109670
xorpd %xmm0, %xmm0
movupd %xmm0, (%r14)
movq $0x0, 0x10(%r14)
jmp 0x1f4e35
decq %rcx
movq %rcx, 0x20(%rax)
movq 0x10(%rax), %rcx
movq %rcx, %rdi
testq %rcx, %rcx
jne 0x1f4dfc
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 0x1f4ed6
decq %rax
movq %rax, 0xa8(%rbx)
movq %rbx, %rdi
callq 0x1f501b
movq 0x100(%rbx), %rax
testq %rax, %rax
je 0x1f4ed1
movq 0x20(%rax), %rcx
testq %rcx, %rcx
jne 0x1f4de5
movq 0xb0(%rbx), %rdx
movq 0x140(%rbx), %rdi
leaq 0x1cbd1c(%rip), %rsi    # 0x3c0b7f
xorl %eax, %eax
callq 0x10906e
movq 0x108(%rbx), %rdi
leaq 0x1cb0d8(%rip), %rsi    # 0x3bff50
movl $0x490, %edx            # imm = 0x490
callq 0x109670
movq $0x0, 0x108(%rbx)
movq 0x100(%rbx), %r14
testq %r14, %r14
je 0x1f4ec0
movq (%r14), %rdi
leaq 0x1cb0ad(%rip), %r15    # 0x3bff50
movq %r15, %rsi
movl $0x94, %edx
callq 0x109670
movq %r14, %rdi
movq %r15, %rsi
movl $0x95, %edx
callq 0x109670
movq $0x0, 0x100(%rbx)
popq %rbx
popq %r14
popq %r15
retq
callq 0x79f58
callq 0x79f1f