// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/sfx-diffcov.c
// Function: dc_fillcoverrank
static void dc_fillcoverrank(GtDifferencecover *dcov)
{
  unsigned int i;
  Diffrank j;
  const GtUword step = (GtUword) GT_DIVV(dcov->totallength) + 1;
  GtUword sum;

  dcov->coverrank_evaluated
    = gt_malloc(sizeof (*dcov->coverrank_evaluated) * dcov->vparam);
  GT_INITBITTAB(dcov->coverrank_bits,dcov->vparam);
  dcov->requiredspace += sizeof (*dcov->coverrank_evaluated) * dcov->vparam;
  gt_assert(dcov->size <= Diffrankmax);
  for (i=0; i<dcov->vparam; i++)
  {
    dcov->coverrank_evaluated[i] = ULONG_MAX; /* initialize as undefined */
  }
  for (sum = 0, j=0; j<dcov->size; j++, sum += step)
  {
    Diffvalue d = dcov->diffvalues[j];
    dcov->coverrank_evaluated[d] = sum; /* jth value from difference cover
                                           gets rank j * step. */
    GT_SETIBIT(dcov->coverrank_bits,d);
  }
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq 0x48(%rax), %rax
movq 0x30(%rsp), %rcx
movl 0x4(%rcx), %ecx
shrq %cl, %rax
addq $0x1, %rax
movq %rax, 0x20(%rsp)
movq 0x30(%rsp), %rax
movl (%rax), %eax
movl %eax, %edi
shlq $0x3, %rdi
leaq 0x2cc291(%rip), %rsi    # 0x5897bb
movl $0x14d, %edx            # imm = 0x14D
callq 0xe80f0
movq %rax, %rcx
movq 0x30(%rsp), %rax
movq %rcx, 0x20(%rax)
movq 0x30(%rsp), %rax
movl (%rax), %eax
shrl $0x6, %eax
cmpl $0x0, %eax
jne 0x2bd55a
movl $0x1, %eax
movq %rax, (%rsp)
jmp 0x2bd571
movq 0x30(%rsp), %rax
movl (%rax), %eax
subl $0x1, %eax
shrl $0x6, %eax
movl %eax, %eax
addq $0x1, %rax
movq %rax, (%rsp)
movq (%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rsi
shlq $0x3, %rsi
xorl %eax, %eax
movl %eax, %edi
leaq 0x2cc22d(%rip), %rdx    # 0x5897bb
movl $0x14e, %ecx            # imm = 0x14E
callq 0xe8540
movq %rax, %rcx
movq 0x30(%rsp), %rax
movq %rcx, 0x28(%rax)
movq 0x30(%rsp), %rax
movq 0x28(%rax), %rdi
movq 0x10(%rsp), %rdx
shlq $0x3, %rdx
xorl %esi, %esi
callq 0x19360
movq 0x30(%rsp), %rax
movl (%rax), %eax
movl %eax, %ecx
shlq $0x3, %rcx
movq 0x30(%rsp), %rax
addq 0x40(%rax), %rcx
movq %rcx, 0x40(%rax)
movq 0x30(%rsp), %rax
cmpl $0xff, 0x8(%rax)
jbe 0x2bd61d
movq 0x37e9b4(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x258a1d(%rip), %rsi    # 0x516013
leaq 0x2cc535(%rip), %rdx    # 0x589b32
leaq 0x2cc548(%rip), %rcx    # 0x589b4c
leaq 0x2cc1b0(%rip), %r8     # 0x5897bb
movl $0x150, %r9d            # imm = 0x150
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2bd61f
movl $0x0, 0x2c(%rsp)
movl 0x2c(%rsp), %eax
movq 0x30(%rsp), %rcx
cmpl (%rcx), %eax
jae 0x2bd656
movq 0x30(%rsp), %rax
movq 0x20(%rax), %rax
movl 0x2c(%rsp), %ecx
movq $-0x1, (%rax,%rcx,8)
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x2bd627
movq $0x0, 0x18(%rsp)
movb $0x0, 0x2b(%rsp)
movzbl 0x2b(%rsp), %eax
movq 0x30(%rsp), %rcx
cmpl 0x8(%rcx), %eax
jae 0x2bd6f8
movq 0x30(%rsp), %rax
movq 0x30(%rax), %rax
movzbl 0x2b(%rsp), %ecx
movw (%rax,%rcx,2), %ax
movw %ax, 0xe(%rsp)
movq 0x18(%rsp), %rdx
movq 0x30(%rsp), %rax
movq 0x20(%rax), %rax
movzwl 0xe(%rsp), %ecx
movq %rdx, (%rax,%rcx,8)
movzwl 0xe(%rsp), %eax
andl $0x3f, %eax
movl %eax, %eax
movl %eax, %ecx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
shrq %cl, %rdx
movq 0x30(%rsp), %rax
movq 0x28(%rax), %rax
movzwl 0xe(%rsp), %ecx
sarl $0x6, %ecx
movslq %ecx, %rcx
orq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movb 0x2b(%rsp), %al
addb $0x1, %al
movb %al, 0x2b(%rsp)
movq 0x20(%rsp), %rax
addq 0x18(%rsp), %rax
movq %rax, 0x18(%rsp)
jmp 0x2bd664
addq $0x38, %rsp
retq
nopl (%rax)