// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/compressed_bitsequence.c
// Function: gt_compressed_bitsequence_fill_c_tab_init_o_tab
static void
gt_compressed_bitsequence_fill_c_tab_init_o_tab(GtCompressedBitsequence *cbs,
                                                GtBitsequence *bitseq)
{
  unsigned int block_len = cbs->blocksize,
               current_class;
  GtUword idx, o_size = 0, ones = 0;
  GtBitsequence current_blk;

  for (idx = 0; idx < cbs->num_of_blocks; idx++) {
    if (idx == cbs->num_of_blocks -1) {
      block_len = cbs->last_block_len;
    }
    current_blk = gt_compressed_bitsequence_get_variable_field(
                                                           bitseq,
                                                           idx * cbs->blocksize,
                                                           block_len);
    current_class = gt_popcount_tab_class(cbs->popcount_tab,
                                          (GtUword) current_blk);
    gt_compressed_bitsequence_set_class(cbs, current_class, idx);
    o_size += gt_popcount_tab_offset_bits(cbs->popcount_tab, current_class);
    ones += current_blk;
  }
  cbs->c_offsets_size = (GtUword) GT_NUMOFINTSFORBITS(o_size);
#ifdef __SSE4_2__
  cbs->superblockoffsets_bits = __builtin_clzl(o_size);
  cbs->superblockranks_bits = __builtin_clzl(ones);
#else
  cbs->superblockoffsets_bits = gt_determinebitspervalue(o_size);
  cbs->superblockranks_bits = gt_determinebitspervalue(ones);
#endif
  GT_INITBITTAB(cbs->c_offsets, o_size);
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq 0x50(%rsp), %rax
movl 0xd8(%rax), %eax
movl %eax, 0x44(%rsp)
movq $0x0, 0x30(%rsp)
movq $0x0, 0x28(%rsp)
movq $0x0, 0x38(%rsp)
movq 0x38(%rsp), %rax
movq 0x50(%rsp), %rcx
cmpq 0xb8(%rcx), %rax
jae 0x13a6c9
movq 0x38(%rsp), %rax
movq 0x50(%rsp), %rcx
movq 0xb8(%rcx), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jne 0x13a638
movq 0x50(%rsp), %rax
movl 0xe0(%rax), %eax
movl %eax, 0x44(%rsp)
movq 0x48(%rsp), %rdi
movq 0x38(%rsp), %rsi
movq 0x50(%rsp), %rax
movl 0xd8(%rax), %eax
imulq %rax, %rsi
movl 0x44(%rsp), %edx
callq 0x13bb30
movq %rax, 0x20(%rsp)
movq 0x50(%rsp), %rax
movq 0x68(%rax), %rdi
movq 0x20(%rsp), %rsi
callq 0x1b4a60
movl %eax, 0x40(%rsp)
movq 0x50(%rsp), %rdi
movl 0x40(%rsp), %esi
movq 0x38(%rsp), %rdx
callq 0x13e1a0
movq 0x50(%rsp), %rax
movq 0x68(%rax), %rdi
movl 0x40(%rsp), %esi
callq 0x1b4bc0
movl %eax, %eax
addq 0x30(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x20(%rsp), %rax
addq 0x28(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x38(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x38(%rsp)
jmp 0x13a5f8
movq 0x30(%rsp), %rax
shrq $0x6, %rax
cmpq $0x0, %rax
jne 0x13a6e4
movl $0x1, %eax
movq %rax, 0x10(%rsp)
jmp 0x13a6fa
movq 0x30(%rsp), %rax
subq $0x1, %rax
shrq $0x6, %rax
addq $0x1, %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rcx
movq 0x50(%rsp), %rax
movq %rcx, 0xa0(%rax)
movq 0x30(%rsp), %rdi
callq 0xec660
movl %eax, %ecx
movq 0x50(%rsp), %rax
movl %ecx, 0xe4(%rax)
movq 0x28(%rsp), %rdi
callq 0xec660
movl %eax, %ecx
movq 0x50(%rsp), %rax
movl %ecx, 0xe8(%rax)
movq 0x30(%rsp), %rax
shrq $0x6, %rax
cmpq $0x0, %rax
jne 0x13a754
movl $0x1, %eax
movq %rax, 0x8(%rsp)
jmp 0x13a76a
movq 0x30(%rsp), %rax
subq $0x1, %rax
shrq $0x6, %rax
addq $0x1, %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rsi
shlq $0x3, %rsi
xorl %eax, %eax
movl %eax, %edi
leaq 0x41007e(%rip), %rdx    # 0x54a806
movl $0x18b, %ecx            # imm = 0x18B
callq 0xe8540
movq %rax, %rcx
movq 0x50(%rsp), %rax
movq %rcx, 0x70(%rax)
movq 0x50(%rsp), %rax
movq 0x70(%rax), %rdi
movq 0x18(%rsp), %rdx
shlq $0x3, %rdx
xorl %esi, %esi
callq 0x19360
addq $0x58, %rsp
retq
nopl (%rax)