// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/pckbucket.c
// Function: gt_pckbuckettable_new
Pckbuckettable *gt_pckbuckettable_new(const FMindex *fmindex,
                                      unsigned int numofchars,
                                      GtUword totallength,
                                      unsigned int maxdepth)
{
  GtArrayPckbck_Boundsatdepth stack;
  Pckbck_Boundsatdepth parent, child;
  GtUword rangesize, idx, *rangeOccs;
  Pckbuckettable *pckbt;
  Mbtab *tmpmbtab;

  GT_INITARRAY(&stack,Pckbck_Boundsatdepth);
  child.lowerbound = 0;
  child.upperbound = totallength+1;
  child.depth = 0;
  child.code = (GtCodetype) 0;
  GT_STOREINARRAY(&stack,Pckbck_Boundsatdepth,128,child);
  rangeOccs = gt_malloc(sizeof (*rangeOccs) * GT_MULT2(numofchars));
  tmpmbtab = gt_malloc(sizeof (*tmpmbtab) * numofchars);
  pckbt = pckbuckettable_allocandinittable(numofchars,maxdepth,true);
  while (stack.nextfreePckbck_Boundsatdepth > 0)
  {
    parent
      = stack.spacePckbck_Boundsatdepth[--stack.nextfreePckbck_Boundsatdepth];
    gt_assert(parent.lowerbound < parent.upperbound);
    rangesize = gt_bwtrangesplitallwithoutspecial(tmpmbtab,
                                                  rangeOccs,
                                                  fmindex,
                                                  parent.lowerbound,
                                                  parent.upperbound);
    gt_assert(rangesize <= (GtUword) numofchars);
    for (idx = 0; idx < rangesize; idx++)
    {
      child.lowerbound = tmpmbtab[idx].lowerbound;
      child.upperbound = tmpmbtab[idx].upperbound;
      child.depth = parent.depth + 1;
      gt_assert(child.depth <= maxdepth);
      child.code = parent.code * numofchars + idx;
      pckbuckettable_storeBoundsatdepth(pckbt,&child);
      if (child.depth < maxdepth)
      {
        if (child.lowerbound + 1 < child.upperbound)
        {
          GT_STOREINARRAY(&stack,Pckbck_Boundsatdepth,128,child);
        } else
        {
          pckbuckettable_followleafedge(pckbt,fmindex,&child);
        }
      }
    }
  }
  GT_FREEARRAY(&stack,Pckbck_Boundsatdepth);
  gt_free(rangeOccs);
  gt_free(tmpmbtab);
  printf("filled: "GT_WU" (%.2f)\n",pckbt->numofvalues,
                        (double) pckbt->numofvalues/pckbt->maxnumofvalues);
  return pckbt;
}

// Assembly:
subq $0xb8, %rsp
movq %rdi, 0xb0(%rsp)
movl %esi, 0xac(%rsp)
movq %rdx, 0xa0(%rsp)
movl %ecx, 0x9c(%rsp)
movq $0x0, 0x80(%rsp)
movq $0x0, 0x90(%rsp)
movq $0x0, 0x88(%rsp)
movq $0x0, 0x40(%rsp)
movq 0xa0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x48(%rsp)
movl $0x0, 0x50(%rsp)
movq $0x0, 0x58(%rsp)
jmp 0x261926
movq 0x90(%rsp), %rax
addq $0x0, %rax
cmpq 0x88(%rsp), %rax
jb 0x2619ce
movq $0x80, 0x10(%rsp)
xorl %eax, %eax
cmpq 0x10(%rsp), %rax
jbe 0x26198a
movq 0x3da647(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2b46b0(%rip), %rsi    # 0x516013
leaq 0x2b783d(%rip), %rdx    # 0x5191a7
leaq 0x31a8fe(%rip), %rcx    # 0x57c26f
leaq 0x31a8e1(%rip), %r8     # 0x57c259
movl $0xad, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x26198c
movq 0x10(%rsp), %rax
addq 0x88(%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0x80(%rsp), %rdi
movq 0x88(%rsp), %rsi
shlq $0x5, %rsi
leaq 0x31a89d(%rip), %rdx    # 0x57c259
movl $0xad, %ecx
callq 0xe8540
movq %rax, 0x80(%rsp)
jmp 0x2619d0
cmpq $0x0, 0x80(%rsp)
jne 0x261a13
movq 0x3da5be(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2b4627(%rip), %rsi    # 0x516013
leaq 0x31a892(%rip), %rdx    # 0x57c285
leaq 0x31a875(%rip), %rcx    # 0x57c26f
leaq 0x31a858(%rip), %r8     # 0x57c259
movl $0xad, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x261a15
jmp 0x261a17
movq 0x80(%rsp), %rax
movq 0x90(%rsp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, 0x90(%rsp)
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x40(%rsp), %rcx
movq %rcx, (%rax)
movq 0x48(%rsp), %rcx
movq %rcx, 0x8(%rax)
movq 0x50(%rsp), %rcx
movq %rcx, 0x10(%rax)
movq 0x58(%rsp), %rcx
movq %rcx, 0x18(%rax)
movl 0xac(%rsp), %eax
shll %eax
movl %eax, %eax
movl %eax, %edi
shlq $0x3, %rdi
leaq 0x31a7e1(%rip), %rsi    # 0x57c259
movl $0xae, %edx
callq 0xe80f0
movq %rax, 0x28(%rsp)
movl 0xac(%rsp), %eax
movl %eax, %edi
shlq $0x4, %rdi
leaq 0x31a7be(%rip), %rsi    # 0x57c259
movl $0xaf, %edx
callq 0xe80f0
movq %rax, 0x18(%rsp)
movl 0xac(%rsp), %edi
movl 0x9c(%rsp), %esi
movl $0x1, %edx
callq 0x261f20
movq %rax, 0x20(%rsp)
cmpq $0x0, 0x90(%rsp)
jbe 0x261e32
movq 0x80(%rsp), %rax
movq 0x90(%rsp), %rcx
addq $-0x1, %rcx
movq %rcx, 0x90(%rsp)
shlq $0x5, %rcx
addq %rcx, %rax
movq (%rax), %rcx
movq %rcx, 0x60(%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x68(%rsp)
movq 0x10(%rax), %rcx
movq %rcx, 0x70(%rsp)
movq 0x18(%rax), %rax
movq %rax, 0x78(%rsp)
movq 0x60(%rsp), %rax
cmpq 0x68(%rsp), %rax
jb 0x261b60
movq 0x3da471(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2b44da(%rip), %rsi    # 0x516013
leaq 0x31a771(%rip), %rdx    # 0x57c2b1
leaq 0x31a728(%rip), %rcx    # 0x57c26f
leaq 0x31a70b(%rip), %r8     # 0x57c259
movl $0xb5, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x261b62
movq 0x18(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq 0xb0(%rsp), %rdx
movq 0x60(%rsp), %rcx
movq 0x68(%rsp), %r8
callq 0x2304a0
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rax
movl 0xac(%rsp), %ecx
cmpq %rcx, %rax
jbe 0x261bd1
movq 0x3da400(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2b4469(%rip), %rsi    # 0x516013
leaq 0x31a726(%rip), %rdx    # 0x57c2d7
leaq 0x31a6b7(%rip), %rcx    # 0x57c26f
leaq 0x31a69a(%rip), %r8     # 0x57c259
movl $0xbb, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x261bd3
movq $0x0, 0x30(%rsp)
movq 0x30(%rsp), %rax
cmpq 0x38(%rsp), %rax
jae 0x261e2d
movq 0x18(%rsp), %rax
movq 0x30(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, 0x40(%rsp)
movq 0x18(%rsp), %rax
movq 0x30(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, 0x48(%rsp)
movl 0x70(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x50(%rsp)
movl 0x50(%rsp), %eax
cmpl 0x9c(%rsp), %eax
jbe 0x261c6f
movq 0x3da362(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2b43cb(%rip), %rsi    # 0x516013
leaq 0x31a6aa(%rip), %rdx    # 0x57c2f9
leaq 0x31a619(%rip), %rcx    # 0x57c26f
leaq 0x31a5fc(%rip), %r8     # 0x57c259
movl $0xc1, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x261c71
movq 0x78(%rsp), %rax
movl 0xac(%rsp), %ecx
imulq %rcx, %rax
addq 0x30(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x20(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x2620b0
movl 0x50(%rsp), %eax
cmpl 0x9c(%rsp), %eax
jae 0x261e18
movq 0x40(%rsp), %rax
addq $0x1, %rax
cmpq 0x48(%rsp), %rax
jae 0x261dff
jmp 0x261cc1
jmp 0x261cc3
movq 0x90(%rsp), %rax
addq $0x0, %rax
cmpq 0x88(%rsp), %rax
jb 0x261d6b
movq $0x80, 0x8(%rsp)
xorl %eax, %eax
cmpq 0x8(%rsp), %rax
jbe 0x261d27
movq 0x3da2aa(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2b4313(%rip), %rsi    # 0x516013
leaq 0x2b74a0(%rip), %rdx    # 0x5191a7
leaq 0x31a561(%rip), %rcx    # 0x57c26f
leaq 0x31a544(%rip), %r8     # 0x57c259
movl $0xc8, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x261d29
movq 0x8(%rsp), %rax
addq 0x88(%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0x80(%rsp), %rdi
movq 0x88(%rsp), %rsi
shlq $0x5, %rsi
leaq 0x31a500(%rip), %rdx    # 0x57c259
movl $0xc8, %ecx
callq 0xe8540
movq %rax, 0x80(%rsp)
jmp 0x261d6d
cmpq $0x0, 0x80(%rsp)
jne 0x261db0
movq 0x3da221(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2b428a(%rip), %rsi    # 0x516013
leaq 0x31a4f5(%rip), %rdx    # 0x57c285
leaq 0x31a4d8(%rip), %rcx    # 0x57c26f
leaq 0x31a4bb(%rip), %r8     # 0x57c259
movl $0xc8, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x261db2
jmp 0x261db4
movq 0x80(%rsp), %rax
movq 0x90(%rsp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, 0x90(%rsp)
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x40(%rsp), %rcx
movq %rcx, (%rax)
movq 0x48(%rsp), %rcx
movq %rcx, 0x8(%rax)
movq 0x50(%rsp), %rcx
movq %rcx, 0x10(%rax)
movq 0x58(%rsp), %rcx
movq %rcx, 0x18(%rax)
jmp 0x261e16
movq 0x20(%rsp), %rdi
movq 0xb0(%rsp), %rsi
leaq 0x40(%rsp), %rdx
callq 0x262310
jmp 0x261e18
jmp 0x261e1a
movq 0x30(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x30(%rsp)
jmp 0x261bdc
jmp 0x261ac7
jmp 0x261e34
cmpq $0x0, 0x80(%rsp)
je 0x261e7c
movq 0x80(%rsp), %rdi
leaq 0x31a40b(%rip), %rsi    # 0x57c259
movl $0xd0, %edx
callq 0xe88c0
movq $0x0, 0x88(%rsp)
movq $0x0, 0x90(%rsp)
movq $0x0, 0x80(%rsp)
jmp 0x261e7e
movq 0x28(%rsp), %rdi
leaq 0x31a3cf(%rip), %rsi    # 0x57c259
movq %rsi, (%rsp)
movl $0xd1, %edx
callq 0xe88c0
movq (%rsp), %rsi
movq 0x18(%rsp), %rdi
movl $0xd2, %edx
callq 0xe88c0
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rsi
movq %rsi, %xmm0
movaps 0x2b6a70(%rip), %xmm3   # 0x518930
punpckldq %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1]
movapd 0x2b6a74(%rip), %xmm2   # 0x518940
subpd %xmm2, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movq 0x10(%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
leaq 0x31a413(%rip), %rdi    # 0x57c311
movb $0x1, %al
callq 0x19070
movq 0x20(%rsp), %rax
addq $0xb8, %rsp
retq
nopw %cs:(%rax,%rax)