// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/match/rdj-contfinder.c
// Function: gt_contfinder_process_buckets
static inline void gt_contfinder_process_buckets(
    const GtContfinder contfinder, const GtContfinderBucketInfo parentbucket,
    gt_contfinder_seqnum_t **bucketsize,
    GtStackGtContfinderBucketInfo *stackptr, GtBitsequence **bucketcontained)
{
  GtContfinderBucketInfo subbucket;
  gt_contfinder_seqnum_t i;
  gt_contfinder_overflow_t overflow;

  /* process buckets with overflow = 0 */
  subbucket.seqnums = parentbucket.seqnums;
  subbucket.seqnums_offset = parentbucket.seqnums_offset;
  subbucket.depth = parentbucket.depth + GT_CONTFINDER_KMERSIZE;
  for (i = 0; i < GT_CONTFINDER_NOFBUCKETS(0); ++i)
  {
    subbucket.nofseqs = bucketsize[0][i];
    if (subbucket.nofseqs > 0)
    {
      if (subbucket.nofseqs > (size_t)1)
      {
        if (subbucket.nofseqs <= GT_CONTFINDER_INSERTION_SORT_MAX)
          gt_contfinder_insertion_sort(contfinder, subbucket);
        else
        {
          GT_STACK_PUSH(stackptr, subbucket);
        }
      }
      for (overflow = (gt_contfinder_overflow_t)1;
          overflow <= GT_CONTFINDER_KMERSIZE; overflow++)
      {
        GT_SETIBIT(bucketcontained[overflow - 1], i >> (overflow << 1));
      }
    }
    subbucket.seqnums_offset += subbucket.nofseqs;
  }

  /* process buckets with overflow > 0 */
  for (overflow = (gt_contfinder_overflow_t)1;
      overflow <= GT_CONTFINDER_KMERSIZE; overflow++)
  {
    for (i = 0; i < GT_CONTFINDER_NOFBUCKETS(overflow); ++i)
    {
      subbucket.nofseqs = bucketsize[overflow][i];
      if (subbucket.nofseqs > 0)
        gt_contfinder_mark_as_contained(contfinder, subbucket,
            (bool)GT_ISIBITSET(bucketcontained[overflow - 1], i));
      subbucket.seqnums_offset += subbucket.nofseqs;
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, 0x98(%rsp)
movabsq $-0x8000000000000000, %r13 # imm = 0x8000000000000000
movq 0x140(%rsp), %rax
movq 0x148(%rsp), %r15
movq %rax, 0x78(%rsp)
movq %r15, 0x80(%rsp)
movq 0x158(%rsp), %rax
addq $0x4, %rax
movq %rax, 0x90(%rsp)
leaq 0x28(%rsi), %rax
movq %rax, 0xa0(%rsp)
xorl %r12d, %r12d
movq 0x98(%rsp), %rax
movq (%rax), %rax
movl (%rax,%r12,4), %ebp
movl %ebp, 0x88(%rsp)
testq %rbp, %rbp
je 0x1cee64
cmpl $0x1, %ebp
je 0x1cee3f
cmpl $0x1f, %ebp
ja 0x1ced3f
movl $0xa, %ecx
movq %rsp, %rdi
leaq 0xf0(%rsp), %rsi
rep  movsq (%rsi), %es:(%rdi)
movups 0x78(%rsp), %xmm0
movups 0x88(%rsp), %xmm1
movups %xmm1, 0x60(%rsp)
movups %xmm0, 0x50(%rsp)
callq 0x1ce85b
jmp 0x1cee3f
movq (%r14), %rsi
cmpq %rsi, 0x10(%r14)
jne 0x1cee04
cmpq 0x18(%r14), %rsi
jne 0x1ced56
xorl %edi, %edi
jmp 0x1ced5d
movq 0x8028(%r14), %rdi
movq %rbp, 0xa8(%rsp)
movq %r15, 0xb0(%rsp)
addq 0x20(%r14), %rsi
shlq $0x5, %rsi
leaq 0x1e7809(%rip), %rdx    # 0x3b6585
movl $0x251, %ecx            # imm = 0x251
callq 0x1094e6
movq %rax, 0x8028(%r14)
movq 0x18(%r14), %rdx
cmpq %rdx, (%r14)
jne 0x1cedaa
shlq $0x5, %rdx
movq %rax, %rdi
movq 0xa0(%rsp), %rsi
callq 0x17660
cmpq $0x0, 0x8030(%r14)
movq %r14, %rbp
je 0x1cede9
cmpq $0x0, 0x20(%rbp)
je 0x1cede9
xorl %r14d, %r14d
xorl %r15d, %r15d
movq (%rbp), %rdi
shlq $0x5, %rdi
addq 0x8028(%rbp), %rdi
addq %r14, %rdi
callq *0x8030(%rbp)
incq %r15
addq $0x20, %r14
cmpq 0x20(%rbp), %r15
jb 0x1cedc4
movq 0x20(%rbp), %rax
addq %rax, (%rbp)
movq %rbp, %r14
movq 0xb0(%rsp), %r15
movq 0xa8(%rsp), %rbp
movq 0x8028(%r14), %rax
movq 0x10(%r14), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x10(%r14)
shlq $0x5, %rcx
movups 0x78(%rsp), %xmm0
movups 0x88(%rsp), %xmm1
movups %xmm1, 0x10(%rax,%rcx)
movups %xmm0, (%rax,%rcx)
movq 0x10(%r14), %rax
cmpq %rax, 0x8(%r14)
jae 0x1cee3f
movq %rax, 0x8(%r14)
xorl %esi, %esi
leaq 0x2(%rsi), %rax
movl %r12d, %edx
movl %eax, %ecx
shrl %cl, %edx
movq %r13, %rdi
movl %edx, %ecx
shrq %cl, %rdi
movq (%rbx,%rsi,4), %rcx
orq %rdi, (%rcx)
movq %rax, %rsi
cmpq $0x8, %rax
jne 0x1cee41
addq %rbp, %r15
movq %r15, 0x80(%rsp)
incq %r12
cmpq $0x100, %r12            # imm = 0x100
jne 0x1cecde
movl $0x1, %r15d
movq 0x80(%rsp), %r13
movl $0x8, %ebp
subl %r15d, %ebp
subl %r15d, %ebp
xorl %r12d, %r12d
movq 0x98(%rsp), %rax
movq (%rax,%r15,8), %rax
movl (%rax,%r12,4), %r14d
movl %r14d, 0x88(%rsp)
testq %r14, %r14
je 0x1cef0d
movq -0x8(%rbx,%r15,8), %rdx
movl %r12d, %esi
shrl $0x6, %esi
movabsq $-0x8000000000000000, %rdi # imm = 0x8000000000000000
movl %r12d, %ecx
shrq %cl, %rdi
xorl %eax, %eax
testq %rdi, (%rdx,%rsi,8)
setne %al
movl $0xa, %ecx
movq %rsp, %rdi
leaq 0xf0(%rsp), %rsi
rep  movsq (%rsi), %es:(%rdi)
movups 0x78(%rsp), %xmm0
movups 0x88(%rsp), %xmm1
movups %xmm1, 0x60(%rsp)
movups %xmm0, 0x50(%rsp)
movl %eax, %edi
callq 0x1ce716
addq %r14, %r13
movq %r13, 0x80(%rsp)
incq %r12
movl %r12d, %eax
movl %ebp, %ecx
shrl %cl, %eax
testl %eax, %eax
je 0x1cee9b
incq %r15
cmpq $0x5, %r15
jne 0x1cee8d
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)