// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/core/checkbitpackarray.c
// Function: gt_bitpackarray_unit_test
int gt_bitpackarray_unit_test(GtError *err)
{
  struct BitPackArray *bitStore = NULL;
  int had_err = 0;
  {
    uint32_t *randSrc = NULL; /*< create random ints here for input as bit
                               *  store */
    uint32_t *randCmp = NULL, /*< used for random ints read back */
       mask;
    size_t i, numRnd;
    unsigned bits;
    numRnd = random() % MAX_RND_NUMS + 1;
    bits = random() % (sizeof (randSrc[0]) * CHAR_BIT + 1);
    if (bits == 32)
      mask = ~(uint32_t)0;
    else
      mask = ~((~(uint32_t)0)<<bits);

    gt_log_log("numRnd="GT_WU"\n", (GtUword)numRnd);
    randSrc = gt_malloc(sizeof (uint32_t)*numRnd);
    bitStore = bitpackarray_new(bits, numRnd,true);
    randCmp = gt_malloc(sizeof (uint32_t)*numRnd);
    for (i = 0; i < numRnd; ++i)
    {
      uint32_t v = randSrc[i] = random();
      bitpackarray_store_uint32(bitStore, i, v);
    }
    for (i = 0; i < numRnd; ++i)
    {
      uint32_t v = randSrc[i];
      uint32_t r = bitpackarray_get_uint32(bitStore, i);
      gt_ensure((v & mask) == r);
      if (had_err)
      {
        gt_log_log("gt_bsStoreUInt32/bitpackarray_get_uint32: "
                "Expected %"PRIu32", got %"PRIu32", i = "GT_WU", bits=%u\n",
                v & mask, r, (GtUword)i, bits);
        gt_free(randSrc);
        gt_free(randCmp);
        bitpackarray_delete(bitStore);
        return had_err;
      }
    }
  gt_free(randSrc);
  gt_free(randCmp);
  bitpackarray_delete(bitStore);
  }
  gt_log_log("bitpackarray_store_uint32/bitpackarray_get_uint32: passed\n");
  {
    uint64_t *randSrc = NULL; /*< create random ints here for input as bit
                        *  store */
    uint64_t *randCmp = NULL, /*< used for random ints read back */
       mask;
    size_t i, numRnd;
    unsigned bits;
    numRnd = random() % MAX_RND_NUMS + 1;
    bits = random() % (sizeof (randSrc[0]) * CHAR_BIT + 1);
    if (bits == (sizeof (randSrc[0]) * CHAR_BIT))
      mask = ~(uint64_t)0;
    else
      mask = ~((~(uint64_t)0)<<bits);
    gt_ensure((randSrc = gt_malloc(sizeof (uint64_t)*numRnd))
           && (bitStore = bitpackarray_new(bits, numRnd,true))
           && (randCmp = gt_malloc(sizeof (uint64_t)*numRnd)));
    if (had_err)
    {
      perror("Storage allocations failed");
      if (randSrc)
        gt_free(randSrc);
      if (randCmp)
        gt_free(randCmp);
      if (bitStore)
        bitpackarray_delete(bitStore);
      return had_err;
    }
    for (i = 0; i < numRnd; ++i)
    {
      uint64_t v = randSrc[i] = ((uint64_t)random() << 32 | random());
      bitpackarray_store_uint64(bitStore, i, v);
    }
    for (i = 0; i < numRnd; ++i)
    {
      uint64_t v = randSrc[i];
      uint64_t r = bitpackarray_get_uint64(bitStore, i);
      gt_ensure((v & mask) == r);
      if (had_err)
      {
        gt_log_log("gt_bsStoreUInt64/bitpackarray_get_uint64: "
                "Expected "GT_LLU", got "GT_LLU", i = "GT_WU", bits=%u\n",
                (GtUint64)(v & mask),
                (GtUint64)r, (GtUword)i, bits);
        gt_free(randSrc);
        gt_free(randCmp);
        bitpackarray_delete(bitStore);
        return had_err;
      }
    }
    gt_free(randSrc);
    gt_free(randCmp);
    bitpackarray_delete(bitStore);
  }
  gt_log_log("bitpackarray_store_uint64/bitpackarray_get_uint64: passed\n");
  return had_err;
}

// Assembly:
subq $0xa8, %rsp
movq %rdi, 0x98(%rsp)
movq $0x0, 0x90(%rsp)
movl $0x0, 0x8c(%rsp)
movq $0x0, 0x80(%rsp)
movq $0x0, 0x78(%rsp)
callq 0x127e80
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %eax
movl $0x186a0, %ecx          # imm = 0x186A0
cqto
idivq %rcx
addq $0x1, %rdx
movq %rdx, 0x60(%rsp)
callq 0x127e80
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %eax
movl $0x21, %ecx
xorl %edx, %edx
divq %rcx
movl %edx, %eax
movl %eax, 0x5c(%rsp)
cmpl $0x20, 0x5c(%rsp)
jne 0x8ddf7
movl $0xffffffff, 0x74(%rsp) # imm = 0xFFFFFFFF
jmp 0x8de09
movl 0x5c(%rsp), %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
shll %cl, %eax
xorl $-0x1, %eax
movl %eax, 0x74(%rsp)
movq 0x60(%rsp), %rsi
leaq 0x4a4225(%rip), %rdi    # 0x53203a
movb $0x0, %al
callq 0xe7740
movq 0x60(%rsp), %rdi
shlq $0x2, %rdi
leaq 0x4a3e37(%rip), %rsi    # 0x531c63
movl $0x34, %edx
callq 0xe80f0
movq %rax, 0x80(%rsp)
movl 0x5c(%rsp), %edi
movq 0x60(%rsp), %rsi
movl $0x1, %edx
callq 0x8e410
movq %rax, 0x90(%rsp)
movq 0x60(%rsp), %rdi
shlq $0x2, %rdi
leaq 0x4a3dfa(%rip), %rsi    # 0x531c63
movl $0x36, %edx
callq 0xe80f0
movq %rax, 0x78(%rsp)
movq $0x0, 0x68(%rsp)
movq 0x68(%rsp), %rax
cmpq 0x60(%rsp), %rax
jae 0x8ded3
callq 0x127e80
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %eax
movq 0x80(%rsp), %rcx
movq 0x68(%rsp), %rdx
movl %eax, (%rcx,%rdx,4)
movl %eax, 0x58(%rsp)
movq 0x90(%rsp), %rdi
movq 0x68(%rsp), %rsi
movl 0x58(%rsp), %edx
callq 0x8e4e0
movq 0x68(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x68(%rsp)
jmp 0x8de81
movq $0x0, 0x68(%rsp)
movq 0x68(%rsp), %rax
cmpq 0x60(%rsp), %rax
jae 0x8e000
movq 0x80(%rsp), %rax
movq 0x68(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, 0x54(%rsp)
movq 0x90(%rsp), %rdi
movq 0x68(%rsp), %rsi
callq 0x8e580
movl %eax, 0x50(%rsp)
cmpl $0x0, 0x8c(%rsp)
jne 0x8df6c
movl 0x54(%rsp), %eax
andl 0x74(%rsp), %eax
cmpl 0x50(%rsp), %eax
je 0x8df6a
movq 0x98(%rsp), %rdi
leaq 0x4a16bd(%rip), %rsi    # 0x52f5fa
leaq 0x4a3d3c(%rip), %rdx    # 0x531c80
leaq 0x4a3d45(%rip), %rcx    # 0x531c90
leaq 0x4a3d11(%rip), %r8     # 0x531c63
movl $0x40, %r9d
movb $0x0, %al
callq 0xd88c0
movl $0xffffffff, 0x8c(%rsp) # imm = 0xFFFFFFFF
jmp 0x8df6c
jmp 0x8df6e
cmpl $0x0, 0x8c(%rsp)
je 0x8dfeb
movl 0x54(%rsp), %esi
andl 0x74(%rsp), %esi
movl 0x50(%rsp), %edx
movq 0x68(%rsp), %rcx
movl 0x5c(%rsp), %r8d
leaq 0x4a3d15(%rip), %rdi    # 0x531caa
movb $0x0, %al
callq 0xe7740
movq 0x80(%rsp), %rdi
leaq 0x4a3cb8(%rip), %rsi    # 0x531c63
movl $0x46, %edx
callq 0xe88c0
movq 0x78(%rsp), %rdi
leaq 0x4a3ca2(%rip), %rsi    # 0x531c63
movl $0x47, %edx
callq 0xe88c0
movq 0x90(%rsp), %rdi
callq 0x8e620
movl 0x8c(%rsp), %eax
movl %eax, 0xa4(%rsp)
jmp 0x8e3f8
jmp 0x8dfed
movq 0x68(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x68(%rsp)
jmp 0x8dedc
movq 0x80(%rsp), %rdi
leaq 0x4a3c54(%rip), %rsi    # 0x531c63
movl $0x4c, %edx
callq 0xe88c0
movq 0x78(%rsp), %rdi
leaq 0x4a3c3e(%rip), %rsi    # 0x531c63
movl $0x4d, %edx
callq 0xe88c0
movq 0x90(%rsp), %rdi
callq 0x8e620
leaq 0x4a3cb8(%rip), %rdi    # 0x531cfb
movb $0x0, %al
callq 0xe7740
movq $0x0, 0x48(%rsp)
movq $0x0, 0x40(%rsp)
callq 0x127e80
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %eax
movl $0x186a0, %ecx          # imm = 0x186A0
cqto
idivq %rcx
addq $0x1, %rdx
movq %rdx, 0x28(%rsp)
callq 0x127e80
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %eax
movl $0x41, %ecx
xorl %edx, %edx
divq %rcx
movl %edx, %eax
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
cmpq $0x40, %rax
jne 0x8e0ac
movq $-0x1, 0x38(%rsp)
jmp 0x8e0c5
movl 0x24(%rsp), %eax
movl %eax, %ecx
movq $-0x1, %rax
shlq %cl, %rax
xorq $-0x1, %rax
movq %rax, 0x38(%rsp)
jmp 0x8e0c7
cmpl $0x0, 0x8c(%rsp)
jne 0x8e17e
movq 0x28(%rsp), %rdi
shlq $0x3, %rdi
leaq 0x4a3b7e(%rip), %rsi    # 0x531c63
movl $0x5e, %edx
callq 0xe80f0
movq %rax, 0x48(%rsp)
cmpq $0x0, %rax
je 0x8e140
movl 0x24(%rsp), %edi
movq 0x28(%rsp), %rsi
movl $0x1, %edx
callq 0x8e410
movq %rax, 0x90(%rsp)
cmpq $0x0, %rax
je 0x8e140
movq 0x28(%rsp), %rdi
shlq $0x3, %rdi
leaq 0x4a3b38(%rip), %rsi    # 0x531c63
movl $0x60, %edx
callq 0xe80f0
movq %rax, 0x40(%rsp)
cmpq $0x0, %rax
jne 0x8e17c
movq 0x98(%rsp), %rdi
leaq 0x4a14ab(%rip), %rsi    # 0x52f5fa
leaq 0x4a3be0(%rip), %rdx    # 0x531d36
leaq 0x4a3b33(%rip), %rcx    # 0x531c90
leaq 0x4a3aff(%rip), %r8     # 0x531c63
movl $0x60, %r9d
movb $0x0, %al
callq 0xd88c0
movl $0xffffffff, 0x8c(%rsp) # imm = 0xFFFFFFFF
jmp 0x8e17e
jmp 0x8e180
cmpl $0x0, 0x8c(%rsp)
je 0x8e1fd
leaq 0x4a3c3c(%rip), %rdi    # 0x531dcd
callq 0x19640
cmpq $0x0, 0x48(%rsp)
je 0x8e1b4
movq 0x48(%rsp), %rdi
leaq 0x4a3ab9(%rip), %rsi    # 0x531c63
movl $0x65, %edx
callq 0xe88c0
cmpq $0x0, 0x40(%rsp)
je 0x8e1d2
movq 0x40(%rsp), %rdi
leaq 0x4a3a9b(%rip), %rsi    # 0x531c63
movl $0x67, %edx
callq 0xe88c0
cmpq $0x0, 0x90(%rsp)
je 0x8e1ea
movq 0x90(%rsp), %rdi
callq 0x8e620
movl 0x8c(%rsp), %eax
movl %eax, 0xa4(%rsp)
jmp 0x8e3f8
movq $0x0, 0x30(%rsp)
movq 0x30(%rsp), %rax
cmpq 0x28(%rsp), %rax
jae 0x8e276
callq 0x127e80
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %eax
shlq $0x20, %rax
movq %rax, (%rsp)
callq 0x127e80
movl %eax, %ecx
movq (%rsp), %rax
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movl %ecx, %ecx
orq %rcx, %rax
movq 0x48(%rsp), %rcx
movq 0x30(%rsp), %rdx
movq %rax, (%rcx,%rdx,8)
movq %rax, 0x18(%rsp)
movq 0x90(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq 0x18(%rsp), %rdx
callq 0x8e660
movq 0x30(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x30(%rsp)
jmp 0x8e206
movq $0x0, 0x30(%rsp)
movq 0x30(%rsp), %rax
cmpq 0x28(%rsp), %rax
jae 0x8e3a3
movq 0x48(%rsp), %rax
movq 0x30(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x10(%rsp)
movq 0x90(%rsp), %rdi
movq 0x30(%rsp), %rsi
callq 0x8e700
movq %rax, 0x8(%rsp)
cmpl $0x0, 0x8c(%rsp)
jne 0x8e312
movq 0x10(%rsp), %rax
andq 0x38(%rsp), %rax
cmpq 0x8(%rsp), %rax
je 0x8e310
movq 0x98(%rsp), %rdi
leaq 0x4a1317(%rip), %rsi    # 0x52f5fa
leaq 0x4a3996(%rip), %rdx    # 0x531c80
leaq 0x4a399f(%rip), %rcx    # 0x531c90
leaq 0x4a396b(%rip), %r8     # 0x531c63
movl $0x75, %r9d
movb $0x0, %al
callq 0xd88c0
movl $0xffffffff, 0x8c(%rsp) # imm = 0xFFFFFFFF
jmp 0x8e312
jmp 0x8e314
cmpl $0x0, 0x8c(%rsp)
je 0x8e38e
movq 0x10(%rsp), %rsi
andq 0x38(%rsp), %rsi
movq 0x8(%rsp), %rdx
movq 0x30(%rsp), %rcx
movl 0x24(%rsp), %r8d
leaq 0x4a3aaa(%rip), %rdi    # 0x531de8
movb $0x0, %al
callq 0xe7740
movq 0x48(%rsp), %rdi
leaq 0x4a3912(%rip), %rsi    # 0x531c63
movl $0x7c, %edx
callq 0xe88c0
movq 0x40(%rsp), %rdi
leaq 0x4a38fc(%rip), %rsi    # 0x531c63
movl $0x7d, %edx
callq 0xe88c0
movq 0x90(%rsp), %rdi
callq 0x8e620
movl 0x8c(%rsp), %eax
movl %eax, 0xa4(%rsp)
jmp 0x8e3f8
jmp 0x8e390
movq 0x30(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x30(%rsp)
jmp 0x8e27f
movq 0x48(%rsp), %rdi
leaq 0x4a38b4(%rip), %rsi    # 0x531c63
movl $0x82, %edx
callq 0xe88c0
movq 0x40(%rsp), %rdi
leaq 0x4a389e(%rip), %rsi    # 0x531c63
movl $0x83, %edx
callq 0xe88c0
movq 0x90(%rsp), %rdi
callq 0x8e620
leaq 0x4a3a5a(%rip), %rdi    # 0x531e3d
movb $0x0, %al
callq 0xe7740
movl 0x8c(%rsp), %eax
movl %eax, 0xa4(%rsp)
movl 0xa4(%rsp), %eax
addq $0xa8, %rsp
retq
nopw (%rax,%rax)