// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/core/bittab.c
// Function: gt_bittab_count_set_bits
GtUword gt_bittab_count_set_bits(const GtBittab *b)
{
  static const unsigned char bits_in_char[256] = { 0, 1, 1, 2, 1, 2, 2, 3, 1, 2,
                                                   2, 3, 2, 3, 3, 4, 1, 2, 2, 3,
                                                   2, 3, 3, 4, 2, 3, 3, 4, 3, 4,
                                                   4, 5, 1, 2, 2, 3, 2, 3, 3, 4,
                                                   2, 3, 3, 4, 3, 4, 4, 5, 2, 3,
                                                   3, 4, 3, 4, 4, 5, 3, 4, 4, 5,
                                                   4, 5, 5, 6, 1, 2, 2, 3, 2, 3,
                                                   3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
                                                   2, 3, 3, 4, 3, 4, 4, 5, 3, 4,
                                                   4, 5, 4, 5, 5, 6, 2, 3, 3, 4,
                                                   3, 4, 4, 5, 3, 4, 4, 5, 4, 5,
                                                   5, 6, 3, 4, 4, 5, 4, 5, 5, 6,
                                                   4, 5, 5, 6, 5, 6, 6, 7, 1, 2,
                                                   2, 3, 2, 3, 3, 4, 2, 3, 3, 4,
                                                   3, 4, 4, 5, 2, 3, 3, 4, 3, 4,
                                                   4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
                                                   2, 3, 3, 4, 3, 4, 4, 5, 3, 4,
                                                   4, 5, 4, 5, 5, 6, 3, 4, 4, 5,
                                                   4, 5, 5, 6, 4, 5, 5, 6, 5, 6,
                                                   6, 7, 2, 3, 3, 4, 3, 4, 4, 5,
                                                   3, 4, 4, 5, 4, 5, 5, 6, 3, 4,
                                                   4, 5, 4, 5, 5, 6, 4, 5, 5, 6,
                                                   5, 6, 6, 7, 3, 4, 4, 5, 4, 5,
                                                   5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
                                                   4, 5, 5, 6, 5, 6, 6, 7, 5, 6,
                                                   6, 7, 6, 7, 7, 8 };
  GtUword i, j, counter = 0;
  gt_assert(b);
  for (i = 0; i < b->tabsize; i++)
    for (j = 0; j < sizeof (GtUword); j++)
      counter += bits_in_char[((b->tabptr[i] >> (j * 8)) & 0xffu)];
  return counter;
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0x4e140
movq 0x8(%rdi), %rdx
xorl %esi, %esi
leaq 0x8ade5(%rip), %r8      # 0xd8ef0
xorl %eax, %eax
cmpq %rdx, %rsi
je 0x4e13e
movq (%rdi), %rcx
movq (%rcx,%rsi,8), %r9
xorl %ecx, %ecx
cmpq $0x40, %rcx
je 0x4e139
movq %r9, %r10
shrq %cl, %r10
movzbl %r10b, %r10d
movzbl (%r10,%r8), %r10d
addq %r10, %rax
addq $0x8, %rcx
jmp 0x4e11b
incq %rsi
jmp 0x4e10d
popq %rcx
retq
movq 0xdfe71(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x7bf15(%rip), %rsi     # 0xca066
leaq 0x8bf34(%rip), %rdx     # 0xda08c
leaq 0x8a9db(%rip), %rcx     # 0xd8b3a
leaq 0x8a6b4(%rip), %r8      # 0xd881a
movl $0x120, %r9d            # imm = 0x120
xorl %eax, %eax
callq 0xb8c0
callq 0xb300