// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/popcount_tab.c
// Function: gt_popcount_tab_new
GtPopcountTab *gt_popcount_tab_new(unsigned int blocksize)
{
  GtPopcountTab *popcount_tab;
  GT_UNUSED GtUword idx_check;
  gt_assert(blocksize <= (unsigned) GT_INTWORDSIZE);

  popcount_tab = gt_malloc(sizeof (GtPopcountTab));
  popcount_tab->rev_blocks = NULL;
  popcount_tab->bit_sizes = NULL;
  popcount_tab->num_of_blocks = 1UL << blocksize;
  popcount_tab->blocksize = blocksize;

  popcount_tab->blocks = gt_compact_ulong_store_new(popcount_tab->num_of_blocks,
                                                    blocksize);
  popcount_tab->offsets =
    gt_compact_ulong_store_new((GtUword) blocksize + 1, blocksize);
  gt_popcount_tab_init_offset_tab(popcount_tab);
  idx_check = gt_popcount_tab_init_blocks_tab(popcount_tab->blocks, blocksize);
  gt_assert(idx_check == popcount_tab->num_of_blocks);
  return popcount_tab;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
cmpl $0x41, %edi
jae 0x164218
movl %edi, %ebp
leaq 0x229a4c(%rip), %rsi    # 0x38da5c
movl $0x30, %edi
movl $0x83, %edx
callq 0x104226
movq %rax, %rbx
xorl %eax, %eax
movq %rax, 0x18(%rbx)
movq %rax, (%rbx)
movl $0x1, %edi
movl %ebp, %ecx
shlq %cl, %rdi
movl %ebp, %r15d
movl $0x1, %r14d
movq %rdi, 0x20(%rbx)
movl %ebp, 0x28(%rbx)
movl %ebp, %esi
callq 0xe3b18
movq %rax, 0x8(%rbx)
movq %r15, 0x20(%rsp)
leaq 0x1(%r15), %rdi
movl %ebp, 0x14(%rsp)
movl %ebp, %esi
callq 0xe3b18
movq %rax, %r12
movq %rax, 0x10(%rbx)
movl 0x28(%rbx), %r15d
movq %rbx, 0x18(%rsp)
movq 0x20(%rbx), %rax
movq %rax, 0x30(%rsp)
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xe3c78
movl $0x1, %esi
movl $0x1, %edx
movq %r12, %rdi
callq 0xe3c78
leaq 0x1(%r15), %rdx
movl $0x2, %ebp
movl $0x2, %esi
movq %r12, %rdi
callq 0xe3c78
movq %r15, 0x8(%rsp)
leaq -0x1(%r15), %rax
movq %rax, 0x28(%rsp)
cmpq $0x4, %rax
jb 0x164114
movl $0x4, %r13d
subq 0x8(%rsp), %r13
leaq 0x1(%rbp), %rbx
movq 0x8(%rsp), %rdi
movq %rbp, %rsi
callq 0xe38eb
movq %rax, %r15
movq %r12, %rdi
movq %rbp, %rsi
callq 0xe3c2c
addq %rax, %r15
movq %r12, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0xe3c78
leaq 0x1(,%rbp), %rax
addq %r13, %rax
movq %rbx, %rbp
cmpq $0x2, %rax
jne 0x1640d0
movq 0x8(%rsp), %rbx
movq %rbx, %rdx
notq %rdx
movq 0x30(%rsp), %r15
addq %r15, %rdx
movq %r12, %rdi
movq 0x28(%rsp), %rsi
callq 0xe3c78
decq %r15
movq %r12, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0xe3c78
movq 0x18(%rsp), %rax
movq 0x8(%rax), %r12
movq $-0x1, %r13
movq 0x20(%rsp), %rcx
shlq %cl, %r13
notq %r13
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xe3c78
cmpl $0x2, 0x14(%rsp)
jb 0x1641ec
movl $0x1, %ebp
movl $0x1, %r14d
movq $-0x1, %r15
movl %ebp, %ecx
shlq %cl, %r15
notq %r15
movq %r15, %rbx
movq %r12, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0xe3c78
cmpq $0x1, %rbp
jne 0x1641a9
addq %rbx, %rbx
jmp 0x1641d7
leaq -0x1(%rbx), %rax
orq %rbx, %rax
leaq 0x1(%rax), %rdx
notq %rax
andq %rdx, %rax
shrq %rax
decq %rax
andq %rbx, %rax
bsfq %rax, %rcx
movq %rax, %rbx
shrq %cl, %rbx
testq %rax, %rax
cmoveq %rax, %rbx
orq %rdx, %rbx
andq %r13, %rbx
incq %r14
cmpq %r15, %rbx
jae 0x164190
incq %rbp
cmpq 0x20(%rsp), %rbp
jne 0x16417e
leaq 0x1(%r14), %rbx
movq %r12, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0xe3c78
movq 0x18(%rsp), %rax
cmpq 0x20(%rax), %rbx
jne 0x16421d
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x4e5e9
callq 0x4e622