// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/sfx-diffcov.c
// Function: dc_differencecover_sortsample0
static void dc_differencecover_sortsample0(GtDifferencecover *dcov,
                                           GtOutlcpinfo *outlcpinfosample,
                                           const Sfxstrategy *mainsfxstrategy,
                                           GT_UNUSED GtTimer *sfxprogress,
                                           bool withcheck)
{
  GtUword pos, posinserted, fullspecials = 0;
  unsigned int modvalue;
  Diffvalue *diffptr, *afterend;
  Sfxstrategy sfxstrategy;
  GtUchar cc;

  sfxstrategy.suftabuint = false;
  dcov->samplesize = 0;
  dcov->bcktab = NULL;
  dcov->multimappower = NULL;
  dcov->maxcode = 0;
  dcov->rangestobesorted = gt_inl_dc_queue_new(GT_MAX(16UL,
                                            GT_DIV2(dcov->maxcode)));
  dcov->filltable = NULL;
  dcov->leftborder = NULL;
  diffptr = dcov->diffvalues;
  afterend = dcov->diffvalues + dcov->size;
  for (pos = 0, modvalue = 0; pos <= dcov->totallength; pos++)
  {
    if (diffptr < afterend && (Diffvalue) modvalue == *diffptr)
    {
      dcov->samplesize++;
      if (pos < dcov->totallength)
      {
        cc = gt_encseq_get_encoded_char(dcov->encseq,pos,dcov->readmode);
        if (GT_ISSPECIAL(cc))
        {
          fullspecials++;
        }
      } else
      {
        fullspecials++;
      }
      diffptr++;
    }
    if (modvalue < dcov->vmodmask)
    {
      modvalue++;
    } else
    {
      modvalue = 0;
      diffptr = dcov->diffvalues;
    }
  }
  dcov->effectivesamplesize = dcov->samplesize - fullspecials;
  gt_logger_log(dcov->logger,
              ""GT_WU" positions are sampled (%.2f) pl=%u",
              dcov->samplesize,
              100.0 * (double) dcov->samplesize/(dcov->totallength+1),
              dcov->prefixlength);
  gt_logger_log(dcov->logger,"fullspecials="GT_WU"",fullspecials);
  dcov->sortedsample = gt_suffixsortspace_new(dcov->effectivesamplesize,
                                              dcov->totallength,
                                              sfxstrategy.suftabuint,
                                              dcov->logger);
  posinserted = 0;
  diffptr = dcov->diffvalues;
  afterend = dcov->diffvalues + dcov->size;
  for (pos = 0, modvalue = 0; pos < dcov->totallength; pos++)
  {
    if (diffptr < afterend && (Diffvalue) modvalue == *diffptr)
    {
      if (pos < dcov->totallength)
      {
        cc = gt_encseq_get_encoded_char(dcov->encseq,pos,dcov->readmode);
        if (GT_ISNOTSPECIAL(cc))
        {
          dc_suffixptrset(dcov,posinserted,pos);
          posinserted++;
        }
      }
      diffptr++;
    }
    if (modvalue < dcov->vmodmask)
    {
      modvalue++;
    } else
    {
      modvalue = 0;
      diffptr = dcov->diffvalues;
    }
  }
  gt_assert(posinserted == dcov->effectivesamplesize);

  dc_init_sfxstrategy_for_sample(&sfxstrategy,
                                 mainsfxstrategy,
                                 gt_encseq_bitwise_cmp_ok(dcov->encseq)
                                   ? false : true,
                                 dcov->effectivesamplesize,
                                 dcov->totallength,
                                 dcov->logger);
  gt_Outlcpinfo_reinit(outlcpinfosample,dcov->numofchars,dcov->prefixlength,
                       dcov->effectivesamplesize);
  gt_sortallsuffixesfromstart(dcov->sortedsample,
                              dcov->effectivesamplesize,
                              dcov->encseq,
                              dcov->readmode,
                              outlcpinfosample,
                              dcov->vparam,
                              &sfxstrategy,
                              dc_addunsortedrange,
                              (void *) dcov,
                              dcov->logger);
  if (withcheck && dcov->effectivesamplesize > 0)
  {
    gt_checksortedsuffixes(__FILE__,
                           __LINE__,
                           dcov->encseq,
                           dcov->readmode,
                           dcov->sortedsample,
                           0,
                           dcov->effectivesamplesize,
                           false, /* specialsareequal  */
                           false,  /* specialsareequalatdepth0 */
                           (GtUword) dcov->vparam);
  }
  dc_sortremainingsamples(dcov);
  if (withcheck && dcov->effectivesamplesize > 0)
  {
    GtUword idx;

    gt_checksortedsuffixes(__FILE__,
                           __LINE__,
                           dcov->encseq,
                           dcov->readmode,
                           dcov->sortedsample,
                           0,
                           dcov->effectivesamplesize,
                           false, /* specialsareequal  */
                           false,  /* specialsareequalatdepth0 */
                           0);
    for (idx=0; idx < dcov->effectivesamplesize; idx++)
    {
      GtUword idx2 = dc_inversesuftab_get(dcov,dc_suffixptrget(dcov,idx));
      if (idx != idx2)
      {
        fprintf(stderr,"idx = "GT_WU" != "GT_WU" = idx2\n",idx,idx2);
        exit(GT_EXIT_PROGRAMMING_ERROR);
      }
    }
  }
  gt_suffixsortspace_delete(dcov->sortedsample,false);
  dcov->sortedsample = NULL;
  dc_filldiff2pos(dcov);
}

// Assembly:
pushq %rbx
subq $0xe0, %rsp
movb %r8b, %al
movq %rdi, 0xd8(%rsp)
movq %rsi, 0xd0(%rsp)
movq %rdx, 0xc8(%rsp)
movq %rcx, 0xc0(%rsp)
andb $0x1, %al
movb %al, 0xbf(%rsp)
movq $0x0, 0xa0(%rsp)
movb $0x0, 0x7f(%rsp)
movq 0xd8(%rsp), %rax
movq $0x0, 0x70(%rax)
movq 0xd8(%rsp), %rax
movq $0x0, 0x58(%rax)
movq 0xd8(%rsp), %rax
movq $0x0, 0x88(%rax)
movq 0xd8(%rsp), %rax
movq $0x0, 0xc0(%rax)
movq 0xd8(%rsp), %rax
movq 0xc0(%rax), %rcx
shrq %rcx
movl $0x10, %eax
cmpq %rcx, %rax
jbe 0x2bf113
movl $0x10, %eax
movq %rax, 0x30(%rsp)
jmp 0x2bf12a
movq 0xd8(%rsp), %rax
movq 0xc0(%rax), %rax
shrq %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rdi
callq 0x2c20e0
movq %rax, %rcx
movq 0xd8(%rsp), %rax
movq %rcx, 0x100(%rax)
movq 0xd8(%rsp), %rax
movq $0x0, 0x90(%rax)
movq 0xd8(%rsp), %rax
movq $0x0, 0x50(%rax)
movq 0xd8(%rsp), %rax
movq 0x30(%rax), %rax
movq %rax, 0x90(%rsp)
movq 0xd8(%rsp), %rax
movq 0x30(%rax), %rax
movq 0xd8(%rsp), %rcx
movl 0x8(%rcx), %ecx
shlq %rcx
addq %rcx, %rax
movq %rax, 0x88(%rsp)
movq $0x0, 0xb0(%rsp)
movl $0x0, 0x9c(%rsp)
movq 0xb0(%rsp), %rax
movq 0xd8(%rsp), %rcx
cmpq 0x48(%rcx), %rax
ja 0x2bf303
movq 0x90(%rsp), %rax
cmpq 0x88(%rsp), %rax
jae 0x2bf2a2
movl 0x9c(%rsp), %eax
movzwl %ax, %eax
movq 0x90(%rsp), %rcx
movzwl (%rcx), %ecx
cmpl %ecx, %eax
jne 0x2bf2a2
movq 0xd8(%rsp), %rax
movq 0x70(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x70(%rax)
movq 0xb0(%rsp), %rax
movq 0xd8(%rsp), %rcx
cmpq 0x48(%rcx), %rax
jae 0x2bf27a
movq 0xd8(%rsp), %rax
movq 0x60(%rax), %rdi
movq 0xb0(%rsp), %rsi
movq 0xd8(%rsp), %rax
movl 0x68(%rax), %edx
callq 0xa9da0
movb %al, 0x4f(%rsp)
movzbl 0x4f(%rsp), %eax
cmpl $0xfe, %eax
jl 0x2bf278
movq 0xa0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xa0(%rsp)
jmp 0x2bf28e
movq 0xa0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xa0(%rsp)
movq 0x90(%rsp), %rax
addq $0x2, %rax
movq %rax, 0x90(%rsp)
movl 0x9c(%rsp), %eax
movq 0xd8(%rsp), %rcx
cmpl 0xc(%rcx), %eax
jae 0x2bf2c9
movl 0x9c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x9c(%rsp)
jmp 0x2bf2e8
movl $0x0, 0x9c(%rsp)
movq 0xd8(%rsp), %rax
movq 0x30(%rax), %rax
movq %rax, 0x90(%rsp)
jmp 0x2bf2ea
movq 0xb0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xb0(%rsp)
jmp 0x2bf1b9
movq 0xd8(%rsp), %rax
movq 0x70(%rax), %rcx
movq 0xa0(%rsp), %rdx
subq %rdx, %rcx
movq %rcx, 0x78(%rax)
movq 0xd8(%rsp), %rcx
movq 0x140(%rcx), %rdi
movq 0x48(%rcx), %rax
movq 0x70(%rcx), %rdx
movq %rdx, %xmm0
movaps 0x2595ef(%rip), %xmm3   # 0x518930
punpckldq %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1]
movapd 0x2595f3(%rip), %xmm2   # 0x518940
subpd %xmm2, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movsd 0x25b4d4(%rip), %xmm1   # 0x51a838
mulsd %xmm1, %xmm0
incq %rax
movq %rax, %xmm1
punpckldq %xmm3, %xmm1    # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
subpd %xmm2, %xmm1
movaps %xmm1, %xmm2
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm2, %xmm1
divsd %xmm1, %xmm0
movq 0xd8(%rsp), %rax
movl 0x18(%rax), %ecx
leaq 0x2cb144(%rip), %rsi    # 0x58a4dd
movb $0x1, %al
callq 0xe7cd0
movq 0xd8(%rsp), %rax
movq 0x140(%rax), %rdi
movq 0xa0(%rsp), %rdx
leaq 0x2ca90a(%rip), %rsi    # 0x589cc8
movb $0x0, %al
callq 0xe7cd0
movq 0xd8(%rsp), %rax
movq 0x78(%rax), %rdi
movq 0xd8(%rsp), %rax
movq 0x48(%rax), %rsi
movb 0x7f(%rsp), %al
movq 0xd8(%rsp), %rcx
movq 0x140(%rcx), %rcx
andb $0x1, %al
movzbl %al, %edx
callq 0x2e94c0
movq %rax, %rcx
movq 0xd8(%rsp), %rax
movq %rcx, 0x148(%rax)
movq $0x0, 0xa8(%rsp)
movq 0xd8(%rsp), %rax
movq 0x30(%rax), %rax
movq %rax, 0x90(%rsp)
movq 0xd8(%rsp), %rax
movq 0x30(%rax), %rax
movq 0xd8(%rsp), %rcx
movl 0x8(%rcx), %ecx
shlq %rcx
addq %rcx, %rax
movq %rax, 0x88(%rsp)
movq $0x0, 0xb0(%rsp)
movl $0x0, 0x9c(%rsp)
movq 0xb0(%rsp), %rax
movq 0xd8(%rsp), %rcx
cmpq 0x48(%rcx), %rax
jae 0x2bf5a7
movq 0x90(%rsp), %rax
cmpq 0x88(%rsp), %rax
jae 0x2bf546
movl 0x9c(%rsp), %eax
movzwl %ax, %eax
movq 0x90(%rsp), %rcx
movzwl (%rcx), %ecx
cmpl %ecx, %eax
jne 0x2bf546
movq 0xb0(%rsp), %rax
movq 0xd8(%rsp), %rcx
cmpq 0x48(%rcx), %rax
jae 0x2bf532
movq 0xd8(%rsp), %rax
movq 0x60(%rax), %rdi
movq 0xb0(%rsp), %rsi
movq 0xd8(%rsp), %rax
movl 0x68(%rax), %edx
callq 0xa9da0
movb %al, 0x4f(%rsp)
movzbl 0x4f(%rsp), %eax
cmpl $0xfe, %eax
jge 0x2bf530
movq 0xd8(%rsp), %rdi
movq 0xa8(%rsp), %rsi
movq 0xb0(%rsp), %rdx
callq 0x2c28e0
movq 0xa8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xa8(%rsp)
jmp 0x2bf532
movq 0x90(%rsp), %rax
addq $0x2, %rax
movq %rax, 0x90(%rsp)
movl 0x9c(%rsp), %eax
movq 0xd8(%rsp), %rcx
cmpl 0xc(%rcx), %eax
jae 0x2bf56d
movl 0x9c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x9c(%rsp)
jmp 0x2bf58c
movl $0x0, 0x9c(%rsp)
movq 0xd8(%rsp), %rax
movq 0x30(%rax), %rax
movq %rax, 0x90(%rsp)
jmp 0x2bf58e
movq 0xb0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xb0(%rsp)
jmp 0x2bf468
jmp 0x2bf5a9
movq 0xa8(%rsp), %rax
movq 0xd8(%rsp), %rcx
cmpq 0x78(%rcx), %rax
je 0x2bf5f7
movq 0x37c9da(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x256a43(%rip), %rsi    # 0x516013
leaq 0x2ca742(%rip), %rdx    # 0x589d19
leaq 0x2caf26(%rip), %rcx    # 0x58a504
leaq 0x2ca1d6(%rip), %r8     # 0x5897bb
movl $0x6a1, %r9d            # imm = 0x6A1
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2bf5f9
movq 0xc8(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0xd8(%rsp), %rax
movq 0x60(%rax), %rdi
callq 0xaf3b0
movq 0x28(%rsp), %rsi
movb %al, %dl
movl $0x1, %eax
xorl %ecx, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
cmpl $0x0, %eax
setne %al
movq 0xd8(%rsp), %rcx
movq 0x78(%rcx), %rcx
movq 0xd8(%rsp), %rdx
movq 0x48(%rdx), %r8
movq 0xd8(%rsp), %rdx
movq 0x140(%rdx), %r9
movzbl %al, %edx
andl $0x1, %edx
leaq 0x50(%rsp), %rdi
callq 0x2c2e20
movq 0xd0(%rsp), %rdi
movq 0xd8(%rsp), %rax
movl 0x14(%rax), %esi
movq 0xd8(%rsp), %rax
movl 0x18(%rax), %edx
movq 0xd8(%rsp), %rax
movq 0x78(%rax), %rcx
callq 0x2c62b0
movq 0xd8(%rsp), %rax
movq 0x148(%rax), %rdi
movq 0xd8(%rsp), %rax
movq 0x78(%rax), %rsi
movq 0xd8(%rsp), %rax
movq 0x60(%rax), %rdx
movq 0xd8(%rsp), %rax
movl 0x68(%rax), %ecx
movq 0xd0(%rsp), %r8
movq 0xd8(%rsp), %rax
movl (%rax), %r9d
movq 0xd8(%rsp), %r10
movq 0xd8(%rsp), %rax
movq 0x140(%rax), %rax
leaq 0x50(%rsp), %rbx
leaq 0x3a91(%rip), %r11      # 0x2c3190
movq %rbx, (%rsp)
movq %r11, 0x8(%rsp)
movq %r10, 0x10(%rsp)
movq %rax, 0x18(%rsp)
callq 0x2b3bf0
testb $0x1, 0xbf(%rsp)
je 0x2bf79c
movq 0xd8(%rsp), %rax
cmpq $0x0, 0x78(%rax)
jbe 0x2bf79c
movq 0xd8(%rsp), %rax
movq 0x60(%rax), %rdx
movq 0xd8(%rsp), %rax
movl 0x68(%rax), %ecx
movq 0xd8(%rsp), %rax
movq 0x148(%rax), %r8
movq 0xd8(%rsp), %rax
movq 0x78(%rax), %r10
movq 0xd8(%rsp), %rax
movl (%rax), %eax
leaq 0x2ca048(%rip), %rdi    # 0x5897bb
movl $0x6b9, %esi            # imm = 0x6B9
xorl %r9d, %r9d
xorl %r11d, %r11d
movq %r10, (%rsp)
movl $0x0, 0x8(%rsp)
movl $0x0, 0x10(%rsp)
movq %rax, 0x18(%rsp)
callq 0x2eb730
movq 0xd8(%rsp), %rdi
callq 0x2c3380
testb $0x1, 0xbf(%rsp)
je 0x2bf8cc
movq 0xd8(%rsp), %rax
cmpq $0x0, 0x78(%rax)
jbe 0x2bf8cc
movq 0xd8(%rsp), %rax
movq 0x60(%rax), %rdx
movq 0xd8(%rsp), %rax
movl 0x68(%rax), %ecx
movq 0xd8(%rsp), %rax
movq 0x148(%rax), %r8
movq 0xd8(%rsp), %rax
movq 0x78(%rax), %rax
leaq 0x2c9fb8(%rip), %rdi    # 0x5897bb
movl $0x6c9, %esi            # imm = 0x6C9
xorl %r9d, %r9d
xorl %r10d, %r10d
movq %rax, (%rsp)
movl $0x0, 0x8(%rsp)
movl $0x0, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
callq 0x2eb730
movq $0x0, 0x40(%rsp)
movq 0x40(%rsp), %rax
movq 0xd8(%rsp), %rcx
cmpq 0x78(%rcx), %rax
jae 0x2bf8ca
movq 0xd8(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0xd8(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0x2c40e0
movq 0x20(%rsp), %rdi
movq %rax, %rsi
callq 0x2c0130
movq %rax, 0x38(%rsp)
movq 0x40(%rsp), %rax
cmpq 0x38(%rsp), %rax
je 0x2bf8b5
movq 0x37c710(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
movq 0x40(%rsp), %rdx
movq 0x38(%rsp), %rcx
leaq 0x2cabd5(%rip), %rsi    # 0x58a479
movb $0x0, %al
callq 0x199f0
movl $0x2, %edi
callq 0x19890
jmp 0x2bf8b7
movq 0x40(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x40(%rsp)
jmp 0x2bf839
jmp 0x2bf8cc
movq 0xd8(%rsp), %rax
movq 0x148(%rax), %rdi
xorl %esi, %esi
callq 0x2e9940
movq 0xd8(%rsp), %rax
movq $0x0, 0x148(%rax)
movq 0xd8(%rsp), %rdi
callq 0x2c3c00
addq $0xe0, %rsp
popq %rbx
retq
nopl (%rax,%rax)