// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/elias_gamma.c
// Function: gt_elias_gamma_unit_test
int gt_elias_gamma_unit_test(GtError *err)
{
  int stat = -1,
      had_err = 0;
  GtUword idx,
                idx_j,
                unit_test_x_size = 100UL,
                number = unit_test_x_size + 1;
  GtBittab *code;
  GtEliasGammaBitwiseDecoder *egbd = gt_elias_gamma_bitwise_decoder_new();

  for (idx = 1UL; idx <= unit_test_x_size; idx++) {
    code = gt_elias_gamma_encode(idx);
    for (idx_j = gt_bittab_size(code) - 1; idx_j != 0 ; idx_j--) {
      if (gt_bittab_bit_is_set(code, idx_j))
        stat = gt_elias_gamma_bitwise_decoder_next(egbd, true, &number);
      else
        stat = gt_elias_gamma_bitwise_decoder_next(egbd, false, &number);
      gt_ensure(stat == 1);
    }

    if (gt_bittab_bit_is_set(code, idx_j))
      stat = gt_elias_gamma_bitwise_decoder_next(egbd, true, &number);
    else
      stat = gt_elias_gamma_bitwise_decoder_next(egbd, false, &number);
    gt_ensure(stat == 0);
    gt_ensure(number == idx);
    gt_bittab_delete(code);
  }
  gt_elias_gamma_bitwise_decoder_delete(egbd);
  return had_err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x10(%rsp), %r14
movq $0x65, (%r14)
leaq 0x241108(%rip), %rsi    # 0x37bcaf
movl $0x20, %edi
movl $0x33, %edx
callq 0x104226
movq %rax, %r12
movl $0x0, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
movq $0x1, 0x18(%rax)
movl $0x1, %r13d
xorl %r15d, %r15d
movq %r13, 0x8(%rsp)
movq %r13, %rdi
callq 0x13aa40
movq %rax, %rbp
movq %rax, %rdi
callq 0xd6f10
movq %rax, %r13
movq %rbp, %rdi
decq %r13
je 0x13ac49
movq %r13, %rsi
callq 0xd6e4a
movzbl %al, %esi
movq %r12, %rdi
movq %r14, %rdx
callq 0x13aadf
orl %r15d, %eax
jne 0x13abf2
movq %rbx, %rdi
leaq 0x22381f(%rip), %rsi    # 0x35e43e
leaq 0x24980d(%rip), %rdx    # 0x384433
leaq 0x2410c6(%rip), %rcx    # 0x37bcf3
leaq 0x24107b(%rip), %r8     # 0x37bcaf
movl $0x79, %r9d
xorl %eax, %eax
callq 0xfcb67
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
jmp 0x13abf2
xorl %esi, %esi
callq 0xd6e4a
movzbl %al, %esi
movq %r12, %rdi
movq %r14, %rdx
callq 0x13aadf
testl %r15d, %r15d
jne 0x13aca0
testl %eax, %eax
je 0x13aca0
movq %rbx, %rdi
leaq 0x2237cd(%rip), %rsi    # 0x35e43e
leaq 0x249a75(%rip), %rdx    # 0x3846ed
leaq 0x241074(%rip), %rcx    # 0x37bcf3
leaq 0x241029(%rip), %r8     # 0x37bcaf
movl $0x80, %r9d
xorl %eax, %eax
callq 0xfcb67
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
movq 0x8(%rsp), %r13
jmp 0x13ace6
testl %r15d, %r15d
movq 0x8(%rsp), %r13
jne 0x13ace0
xorl %r15d, %r15d
cmpq %r13, 0x10(%rsp)
je 0x13ace6
movq %rbx, %rdi
leaq 0x223780(%rip), %rsi    # 0x35e43e
leaq 0x241047(%rip), %rdx    # 0x37bd0c
leaq 0x241027(%rip), %rcx    # 0x37bcf3
leaq 0x240fdc(%rip), %r8     # 0x37bcaf
movl $0x81, %r9d
xorl %eax, %eax
callq 0xfcb67
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
movq %rbp, %rdi
callq 0xd7151
incq %r13
cmpq $0x65, %r13
jne 0x13abd7
leaq 0x240fad(%rip), %rsi    # 0x37bcaf
movq %r12, %rdi
movl $0x64, %edx
callq 0x1045eb
movl %r15d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)