// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/compressed_bitsequence.c
// Function: gt_compressed_bitsequence_fill_tabs
static void gt_compressed_bitsequence_fill_tabs(GtCompressedBitsequence *cbs,
                                                GtBitsequence *bitseq)
{
  unsigned int class,
               samplecount = 0,
               c_offset_bits,
               block_len = cbs->blocksize;
  GtUword idx,
          samplenum = 0;
  GtBitsequence block, offsets_bitpos,
                bitpos = 0,
                rank_sum = 0;

  for (idx = 0; idx < cbs->num_of_blocks; idx++) {
    if (idx == cbs->num_of_blocks -1) {
      block_len = cbs->last_block_len;
    }
    class = gt_compressed_bitsequence_get_class(cbs, idx);
    c_offset_bits = gt_popcount_tab_offset_bits(cbs->popcount_tab, class);
    block = gt_compressed_bitsequence_get_variable_field(bitseq,
                                                         idx * cbs->blocksize,
                                                         block_len);
    offsets_bitpos = (GtBitsequence) gt_popcount_tab_get_offset_for_block(
                                                         cbs->popcount_tab,
                                                         (GtUword) block);
    gt_compressed_bitsequence_set_variable_field(cbs->c_offsets,
                                                 cbs->c_offsets_size,
                                                 (GtUword) bitpos,
                                                 c_offset_bits, offsets_bitpos);
    rank_sum += class;
    bitpos += c_offset_bits;
    samplecount++;
    if (cbs->superblocksize == samplecount) {
      samplecount = 0;
      gt_compressed_bitsequence_set_variable_field(
                                        cbs->superblockoffsets,
                                        cbs->superblockoffsets_size,
                                        samplenum * cbs->superblockoffsets_bits,
                                        cbs->superblockoffsets_bits,
                                        bitpos);
      gt_compressed_bitsequence_set_variable_field(
                                          cbs->superblockranks,
                                          cbs->superblockranks_size,
                                          samplenum * cbs->superblockranks_bits,
                                          cbs->superblockranks_bits,
                                          rank_sum);
      samplenum++;
    }
  }
  if (samplecount != 0) {
    gt_compressed_bitsequence_set_variable_field(
                                        cbs->superblockoffsets,
                                        cbs->superblockoffsets_size,
                                        samplenum * cbs->superblockoffsets_bits,
                                        cbs->superblockoffsets_bits,
                                        bitpos);
    gt_compressed_bitsequence_set_variable_field(
                                          cbs->superblockranks,
                                          cbs->superblockranks_size,
                                          samplenum * cbs->superblockranks_bits,
                                          cbs->superblockranks_bits,
                                          rank_sum);
  }
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movl $0x0, 0x40(%rsp)
movq 0x50(%rsp), %rax
movl 0xd8(%rax), %eax
movl %eax, 0x38(%rsp)
movq $0x0, 0x28(%rsp)
movq $0x0, 0x10(%rsp)
movq $0x0, 0x8(%rsp)
movq $0x0, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq 0x50(%rsp), %rcx
cmpq 0xb8(%rcx), %rax
jae 0x13ac72
movq 0x30(%rsp), %rax
movq 0x50(%rsp), %rcx
movq 0xb8(%rcx), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jne 0x13aaf9
movq 0x50(%rsp), %rax
movl 0xe0(%rax), %eax
movl %eax, 0x38(%rsp)
movq 0x50(%rsp), %rdi
movq 0x30(%rsp), %rsi
callq 0x13bc30
movl %eax, 0x44(%rsp)
movq 0x50(%rsp), %rax
movq 0x68(%rax), %rdi
movl 0x44(%rsp), %esi
callq 0x1b4bc0
movl %eax, 0x3c(%rsp)
movq 0x48(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq 0x50(%rsp), %rax
movl 0xd8(%rax), %eax
imulq %rax, %rsi
movl 0x38(%rsp), %edx
callq 0x13bb30
movq %rax, 0x20(%rsp)
movq 0x50(%rsp), %rax
movq 0x68(%rax), %rdi
movq 0x20(%rsp), %rsi
callq 0x1b5030
movq %rax, 0x18(%rsp)
movq 0x50(%rsp), %rax
movq 0x70(%rax), %rdi
movq 0x50(%rsp), %rax
movq 0xa0(%rax), %rsi
movq 0x10(%rsp), %rdx
movl 0x3c(%rsp), %ecx
movq 0x18(%rsp), %r8
callq 0x13e200
movl 0x44(%rsp), %eax
addq 0x8(%rsp), %rax
movq %rax, 0x8(%rsp)
movl 0x3c(%rsp), %eax
addq 0x10(%rsp), %rax
movq %rax, 0x10(%rsp)
movl 0x40(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x40(%rsp)
movq 0x50(%rsp), %rax
movl 0xec(%rax), %eax
cmpl 0x40(%rsp), %eax
jne 0x13ac5d
movl $0x0, 0x40(%rsp)
movq 0x50(%rsp), %rax
movq 0x80(%rax), %rdi
movq 0x50(%rsp), %rax
movq 0xc8(%rax), %rsi
movq 0x28(%rsp), %rdx
movq 0x50(%rsp), %rax
movl 0xe4(%rax), %eax
imulq %rax, %rdx
movq 0x50(%rsp), %rax
movl 0xe4(%rax), %ecx
movq 0x10(%rsp), %r8
callq 0x13e200
movq 0x50(%rsp), %rax
movq 0x88(%rax), %rdi
movq 0x50(%rsp), %rax
movq 0xd0(%rax), %rsi
movq 0x28(%rsp), %rdx
movq 0x50(%rsp), %rax
movl 0xe8(%rax), %eax
imulq %rax, %rdx
movq 0x50(%rsp), %rax
movl 0xe8(%rax), %ecx
movq 0x8(%rsp), %r8
callq 0x13e200
movq 0x28(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x28(%rsp)
jmp 0x13ac5f
movq 0x30(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x30(%rsp)
jmp 0x13aab9
cmpl $0x0, 0x40(%rsp)
je 0x13acff
movq 0x50(%rsp), %rax
movq 0x80(%rax), %rdi
movq 0x50(%rsp), %rax
movq 0xc8(%rax), %rsi
movq 0x28(%rsp), %rdx
movq 0x50(%rsp), %rax
movl 0xe4(%rax), %eax
imulq %rax, %rdx
movq 0x50(%rsp), %rax
movl 0xe4(%rax), %ecx
movq 0x10(%rsp), %r8
callq 0x13e200
movq 0x50(%rsp), %rax
movq 0x88(%rax), %rdi
movq 0x50(%rsp), %rax
movq 0xd0(%rax), %rsi
movq 0x28(%rsp), %rdx
movq 0x50(%rsp), %rax
movl 0xe8(%rax), %eax
imulq %rax, %rdx
movq 0x50(%rsp), %rax
movl 0xe8(%rax), %ecx
movq 0x8(%rsp), %r8
callq 0x13e200
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)