// File: /workspace/github_c_makefile_star2_O3/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 $0xa8, %rsp
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, 0x90(%rsp)
movabsq $-0x8000000000000000, %r14 # imm = 0x8000000000000000
movq 0x130(%rsp), %rax
movq 0x138(%rsp), %r15
movq %rax, 0x70(%rsp)
movq %r15, 0x78(%rsp)
movq 0x148(%rsp), %rax
addq $0x4, %rax
movq %rax, 0x88(%rsp)
leaq 0x28(%rsi), %rax
movq %rax, 0x98(%rsp)
xorl %ebp, %ebp
movq 0x90(%rsp), %rax
movq (%rax), %rax
movl (%rax,%rbp,4), %r13d
movl %r13d, 0x80(%rsp)
testq %r13, %r13
je 0x1c5bc6
cmpl $0x1, %r13d
je 0x1c5ba2
cmpl $0x1f, %r13d
ja 0x1c5a95
movl $0xa, %ecx
movq %rsp, %rdi
leaq 0xe0(%rsp), %rsi
rep  movsq (%rsi), %es:(%rdi)
movups 0x70(%rsp), %xmm0
movups 0x80(%rsp), %xmm1
movups %xmm1, 0x60(%rsp)
movups %xmm0, 0x50(%rsp)
callq 0x1c562a
jmp 0x1c5ba2
movq 0x10(%r12), %rsi
cmpq (%r12), %rsi
jne 0x1c5b66
cmpq 0x18(%r12), %rsi
jne 0x1c5aaf
xorl %edi, %edi
jmp 0x1c5ab7
movq 0x8028(%r12), %rdi
movq %r13, 0xa0(%rsp)
addq 0x20(%r12), %rsi
shlq $0x5, %rsi
leaq 0x1e74b6(%rip), %rdx    # 0x3acf85
movl $0x251, %ecx            # imm = 0x251
callq 0x104461
movq %rax, 0x8028(%r12)
movq (%r12), %rdx
cmpq 0x18(%r12), %rdx
jne 0x1c5b00
shlq $0x5, %rdx
movq %rax, %rdi
movq 0x98(%rsp), %rsi
callq 0x17660
cmpq $0x0, 0x8030(%r12)
movq 0x20(%r12), %rax
je 0x1c5b4b
testq %rax, %rax
je 0x1c5b49
xorl %r14d, %r14d
xorl %r13d, %r13d
movq (%r12), %rdi
shlq $0x5, %rdi
addq 0x8028(%r12), %rdi
addq %r14, %rdi
callq *0x8030(%r12)
incq %r13
movq 0x20(%r12), %rax
addq $0x20, %r14
cmpq %rax, %r13
jb 0x1c5b1b
jmp 0x1c5b4b
xorl %eax, %eax
addq %rax, (%r12)
movq 0x10(%r12), %rsi
movabsq $-0x8000000000000000, %r14 # imm = 0x8000000000000000
movq 0xa0(%rsp), %r13
movq 0x8028(%r12), %rax
leaq 0x1(%rsi), %rcx
movq %rcx, 0x10(%r12)
shlq $0x5, %rsi
movups 0x70(%rsp), %xmm0
movups 0x80(%rsp), %xmm1
movups %xmm1, 0x10(%rax,%rsi)
movups %xmm0, (%rax,%rsi)
movq 0x10(%r12), %rax
cmpq %rax, 0x8(%r12)
jae 0x1c5ba2
movq %rax, 0x8(%r12)
xorl %esi, %esi
leaq 0x2(%rsi), %rax
movl %ebp, %edx
movl %eax, %ecx
shrl %cl, %edx
movq %r14, %rdi
movl %edx, %ecx
shrq %cl, %rdi
movq (%rbx,%rsi,4), %rcx
orq %rdi, (%rcx)
movq %rax, %rsi
cmpq $0x8, %rax
jne 0x1c5ba4
addq %r13, %r15
movq %r15, 0x78(%rsp)
incq %rbp
cmpq $0x100, %rbp            # imm = 0x100
jne 0x1c5a31
movl $0x1, %r13d
movl $0x8, %ebp
subl %r13d, %ebp
subl %r13d, %ebp
xorl %r12d, %r12d
movq 0x90(%rsp), %rax
movq (%rax,%r13,8), %rax
movl (%rax,%r12,4), %r14d
movl %r14d, 0x80(%rsp)
testq %r14, %r14
je 0x1c5c64
movq -0x8(%rbx,%r13,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 0xe0(%rsp), %rsi
rep  movsq (%rsi), %es:(%rdi)
movups 0x70(%rsp), %xmm0
movups 0x80(%rsp), %xmm1
movups %xmm1, 0x60(%rsp)
movups %xmm0, 0x50(%rsp)
movl %eax, %edi
callq 0x1c54ef
addq %r14, %r15
movq %r15, 0x78(%rsp)
incq %r12
movl %r12d, %eax
movl %ebp, %ecx
shrl %cl, %eax
testl %eax, %eax
je 0x1c5bf2
incq %r13
cmpq $0x5, %r13
jne 0x1c5be4
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)