// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/extended/intset_8.c
// Function: gt_intset_8_unit_test
int gt_intset_8_unit_test(GtError *err)
{
  int had_err = 0;
  GtIntset *is;
  GtUword num_of_elems = gt_rand_max(((GtUword) 1) << 10) + 1,
          *arr = gt_malloc(sizeof (*arr) * num_of_elems),
          stepsize = GT_DIV2(num_of_elems <<4 / num_of_elems),
          idx;
  size_t is_size;

  gt_error_check(err);

  arr[0] = gt_rand_max(stepsize) + 1;
  for (idx = (GtUword) 1; idx < num_of_elems; ++idx) {
    arr[idx] = arr[idx - 1] + gt_rand_max(stepsize) + 1;
  }

  is_size = gt_intset_8_size_of_rep(arr[num_of_elems - 1], num_of_elems);

  if (!had_err) {
    if (is_size < (size_t) UINT_MAX) {
      is = gt_intset_8_new(arr[num_of_elems - 1], num_of_elems);
      for (idx = 0; idx < num_of_elems; idx++) {
        gt_intset_8_add(is, arr[idx]);
        gt_ensure(idx + 1 == gt_intset_8_size(is));
        if (idx < num_of_elems - 1)
          gt_ensure(gt_intset_8_get_idx_smallest_geq(is,
                                                     arr[idx] + 1) ==
                    num_of_elems);
      }

      gt_ensure(gt_intset_8_elems_is_valid(is));
      gt_ensure(gt_intset_8_secstart_is_valid(is));

      GT_INTSET_TEST_8_BINSEARCH(0);
      for (idx = 1; !had_err && idx < num_of_elems; idx++) {
        GtUword to_find = (arr[idx - 1] == (arr[idx] - 1)) ? idx - 1 : idx;
        gt_ensure(
          gt_intset_8_get_idx_smallest_geq_test(is, arr[idx] - 1) ==
          to_find);
        gt_ensure(
          gt_intset_8_get_idx_smallest_geq(is, arr[idx] - 1) ==
          to_find);
        GT_INTSET_TEST_8_BINSEARCH(idx);
      }
      if (!had_err)
        had_err = gt_intset_unit_test_notinset(is, 0, arr[0] - 1, err);
      if (!had_err)
        had_err = gt_intset_unit_test_check_seqnum(is, 0, arr[0] - 1, 0, err);
      for (idx = (GtUword) 1; !had_err && idx < num_of_elems; idx++) {
        had_err = gt_intset_unit_test_notinset(is, arr[idx - 1] + 1,
                                               arr[idx] - 1, err);
        if (!had_err)
          had_err = gt_intset_unit_test_check_seqnum(is, arr[idx - 1] + 1,
                                                     arr[idx] - 1, idx, err);
      }
      gt_intset_delete(is);
    }
  }
  gt_free(arr);
  return had_err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movl $0x400, %edi            # imm = 0x400
callq 0x955fa
leaq 0x1(%rax), %r15
movq %rax, 0x10(%rsp)
leaq 0x8(,%rax,8), %rdi
leaq 0xdfad1(%rip), %rsi     # 0x37eee9
movl $0x1e7, %edx            # imm = 0x1E7
callq 0x93160
movq %rax, %r14
pushq $0x4
popq %rax
xorl %edx, %edx
divq %r15
movq %r15, %r12
movl %eax, %ecx
shlq %cl, %r12
testq %rbx, %rbx
je 0x29f44a
movq %rbx, %rdi
callq 0x89eb7
testb %al, %al
jne 0x29f94b
movq %rbx, 0x8(%rsp)
shrq %r12
movq %r12, %rdi
callq 0x955fa
incq %rax
movq %rax, (%r14)
pushq $0x1
popq %rbx
cmpq %r15, %rbx
jae 0x29f484
movq -0x8(%r14,%rbx,8), %r13
movq %r12, %rdi
callq 0x955fa
addq %r13, %rax
incq %rax
movq %rax, (%r14,%rbx,8)
incq %rbx
jmp 0x29f463
movq 0x10(%rsp), %rcx
movq (%r14,%rcx,8), %rdi
movq %rdi, %rax
shrq $0x8, %rax
leaq (%rcx,%rax,8), %rax
addq $0x9, %rax
xorl %ebp, %ebp
movl $0xfffffffe, %ecx       # imm = 0xFFFFFFFE
cmpq %rcx, %rax
ja 0x29f926
movq %r15, %rsi
callq 0x29e9e4
movq %rax, %r12
movb $0x1, %r13b
xorl %ebx, %ebx
cmpq %rbx, %r15
je 0x29f573
movq %rbx, %rbp
movq (%r14,%rbx,8), %rsi
movq %r12, %rdi
callq 0x29ef5a
incq %rbx
testb $0x1, %r13b
movl $0x0, %r13d
je 0x29f4bc
movq %r12, %rdi
callq 0x29f21f
cmpq %rax, %rbx
jne 0x29f53d
movb $0x1, %r13b
cmpq 0x10(%rsp), %rbp
jae 0x29f4bc
movq (%r14,%rbp,8), %rsi
incq %rsi
movq %r12, %rdi
callq 0x29f2b9
movb $0x1, %r13b
cmpq %r15, %rax
je 0x29f4bc
xorl %r13d, %r13d
movq 0x8(%rsp), %rdi
leaq 0x5eed2(%rip), %rsi     # 0x2fe3f2
leaq 0xdfac8(%rip), %rdx     # 0x37efef
leaq 0xdfa8b(%rip), %rcx     # 0x37efb9
leaq 0xdf9b4(%rip), %r8      # 0x37eee9
movl $0x1fe, %r9d            # imm = 0x1FE
jmp 0x29f567
xorl %r13d, %r13d
movq 0x8(%rsp), %rdi
leaq 0x5eea6(%rip), %rsi     # 0x2fe3f2
leaq 0xdfa7c(%rip), %rdx     # 0x37efcf
leaq 0xdfa5f(%rip), %rcx     # 0x37efb9
leaq 0xdf988(%rip), %r8      # 0x37eee9
movl $0x1fa, %r9d            # imm = 0x1FA
xorl %eax, %eax
callq 0x89dbb
jmp 0x29f4bc
pushq $-0x1
popq %rbp
movl %ebp, %ecx
testb $0x1, %r13b
movq 0x8(%rsp), %rbx
je 0x29f6f3
callq 0x29eae0
movq %rax, %rdi
movq %r12, %rsi
callq 0xf3576
movq 0x8(%r12), %rcx
movq 0x28(%rcx), %rdx
pushq $0x1
popq %rsi
xorl %edi, %edi
cmpq %rdx, %rsi
jae 0x29f5d7
movq (%rcx), %r8
decq %rdi
movq %rdi, %r9
incq %rdi
cmpq 0x8(%r8,%r9,8), %rsi
ja 0x29f5b0
je 0x29f5d2
movq 0x10(%rax), %r8
movb (%r8,%rsi), %r9b
cmpb -0x1(%r8,%rsi), %r9b
jbe 0x29f67e
incq %rsi
jmp 0x29f5a5
movq 0x30(%rcx), %rax
pushq $0x1
popq %rdx
cmpq %rax, %rdx
ja 0x29f622
movq (%rcx), %rsi
movq (%rsi,%rdx,8), %rdi
leaq 0x1(%rdx), %r8
cmpq -0x8(%rsi,%rdx,8), %rdi
movq %r8, %rdx
jae 0x29f5de
leaq 0x5edf3(%rip), %rsi     # 0x2fe3f2
leaq 0xdfa4b(%rip), %rdx     # 0x37f051
leaq 0xdf9ac(%rip), %rcx     # 0x37efb9
leaq 0xdf8d5(%rip), %r8      # 0x37eee9
movq %rbx, %rdi
movl $0x202, %r9d            # imm = 0x202
jmp 0x29f6ea
movq %r12, %rdi
xorl %esi, %esi
callq 0x29f983
cmpq (%r14), %rax
jne 0x29f6a5
movq %r12, %rdi
xorl %esi, %esi
callq 0x29f109
cmpq (%r14), %rax
jne 0x29f6b5
incq %rax
movq %r12, %rdi
movq %rax, %rsi
callq 0x29fa0b
cmpq $0x1, %rax
jne 0x29f6c5
movq (%r14), %rsi
incq %rsi
movq %r12, %rdi
callq 0x29f2b9
xorl %ecx, %ecx
cmpq $0x1, %rax
je 0x29f6f3
leaq 0x5ed7d(%rip), %rsi     # 0x2fe3f2
leaq 0xdfa7d(%rip), %rdx     # 0x37f0f9
jmp 0x29f6d3
leaq 0x5ed6d(%rip), %rsi     # 0x2fe3f2
leaq 0xdf9a6(%rip), %rdx     # 0x37f032
leaq 0xdf926(%rip), %rcx     # 0x37efb9
leaq 0xdf84f(%rip), %r8      # 0x37eee9
movq %rbx, %rdi
movl $0x201, %r9d            # imm = 0x201
jmp 0x29f6ea
leaq 0x5ed46(%rip), %rsi     # 0x2fe3f2
leaq 0xdf9c0(%rip), %rdx     # 0x37f073
jmp 0x29f6d3
leaq 0x5ed36(%rip), %rsi     # 0x2fe3f2
leaq 0xdf9d6(%rip), %rdx     # 0x37f099
jmp 0x29f6d3
leaq 0x5ed26(%rip), %rsi     # 0x2fe3f2
leaq 0xdf9e7(%rip), %rdx     # 0x37f0ba
leaq 0xdf8df(%rip), %rcx     # 0x37efb9
leaq 0xdf808(%rip), %r8      # 0x37eee9
movq %rbx, %rdi
movl $0x204, %r9d            # imm = 0x204
xorl %eax, %eax
callq 0x89dbb
movl %ebp, %ecx
pushq $0x1
popq %r13
testl %ecx, %ecx
jne 0x29f894
cmpq %r15, %r13
jae 0x29f894
leaq -0x1(%r13), %rbx
movq (%r14,%r13,8), %rsi
decq %rsi
cmpq %rsi, -0x8(%r14,%r13,8)
cmovneq %r13, %rbx
movq %r12, %rdi
callq 0x29fa0b
cmpq %rbx, %rax
jne 0x29f7c2
movq (%r14,%r13,8), %rsi
decq %rsi
movq %r12, %rdi
callq 0x29f2b9
cmpq %rbx, %rax
jne 0x29f7ee
movq %r12, %rdi
movq %r13, %rsi
callq 0x29f983
cmpq (%r14,%r13,8), %rax
movq 0x8(%rsp), %rbx
jne 0x29f81a
movq %r12, %rdi
movq %r13, %rsi
callq 0x29f109
cmpq (%r14,%r13,8), %rax
jne 0x29f82d
incq %rax
movq %r12, %rdi
movq %rax, %rsi
callq 0x29fa0b
movq %rax, %rbp
leaq 0x1(%r13), %rax
cmpq %rbp, %rax
jne 0x29f863
movq (%r14,%r13,8), %rsi
incq %rsi
movq %r12, %rdi
callq 0x29f2b9
xorl %ecx, %ecx
cmpq %rbp, %rax
pushq $-0x1
popq %rbp
je 0x29f85b
movq %rbx, %rdi
leaq 0x5ec39(%rip), %rsi     # 0x2fe3f2
leaq 0xdfa86(%rip), %rdx     # 0x37f246
jmp 0x29f83e
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
leaq 0x5ec21(%rip), %rsi     # 0x2fe3f2
leaq 0xdf95b(%rip), %rdx     # 0x37f133
leaq 0xdf7da(%rip), %rcx     # 0x37efb9
leaq 0xdf703(%rip), %r8      # 0x37eee9
movl $0x209, %r9d            # imm = 0x209
jmp 0x29f852
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
leaq 0x5ebf5(%rip), %rsi     # 0x2fe3f2
leaq 0xdf972(%rip), %rdx     # 0x37f176
leaq 0xdf7ae(%rip), %rcx     # 0x37efb9
leaq 0xdf6d7(%rip), %r8      # 0x37eee9
movl $0x20c, %r9d            # imm = 0x20C
jmp 0x29f852
movq %rbx, %rdi
leaq 0x5ebce(%rip), %rsi     # 0x2fe3f2
leaq 0xdf989(%rip), %rdx     # 0x37f1b4
jmp 0x29f83e
movq %rbx, %rdi
leaq 0x5ebbb(%rip), %rsi     # 0x2fe3f2
leaq 0xdf9a0(%rip), %rdx     # 0x37f1de
leaq 0xdf774(%rip), %rcx     # 0x37efb9
leaq 0xdf69d(%rip), %r8      # 0x37eee9
movl $0x20d, %r9d            # imm = 0x20D
xorl %eax, %eax
callq 0x89dbb
movl %ebp, %ecx
incq %r13
jmp 0x29f6f7
movq %rbx, %rdi
leaq 0x5eb85(%rip), %rsi     # 0x2fe3f2
leaq 0xdf98f(%rip), %rdx     # 0x37f203
leaq 0xdf73e(%rip), %rcx     # 0x37efb9
leaq 0xdf667(%rip), %r8      # 0x37eee9
movl $0x20d, %r9d            # imm = 0x20D
xorl %eax, %eax
callq 0x89dbb
pushq $-0x1
popq %rbp
jmp 0x29f859
testl %ecx, %ecx
je 0x29f89d
pushq $-0x1
popq %rbp
jmp 0x29f8cd
movq (%r14), %rdx
decq %rdx
movq %r12, %rdi
xorl %esi, %esi
movq %rbx, %rcx
callq 0xf3ae2
movl %eax, %ebp
testl %eax, %eax
jne 0x29f8cd
movq (%r14), %rdx
decq %rdx
movq %r12, %rdi
xorl %esi, %esi
xorl %ecx, %ecx
movq %rbx, %r8
callq 0xf3b64
movl %eax, %ebp
pushq $0x1
popq %r13
testl %ebp, %ebp
jne 0x29f91e
cmpq %r15, %r13
jae 0x29f91e
movq -0x8(%r14,%r13,8), %rsi
movq (%r14,%r13,8), %rdx
incq %rsi
decq %rdx
movq %r12, %rdi
movq %rbx, %rcx
callq 0xf3ae2
movl %eax, %ebp
testl %eax, %eax
jne 0x29f919
movq -0x8(%r14,%r13,8), %rsi
movq (%r14,%r13,8), %rdx
incq %rsi
decq %rdx
movq %r12, %rdi
movq %r13, %rcx
movq %rbx, %r8
callq 0xf3b64
movl %eax, %ebp
incq %r13
jmp 0x29f8d1
movq %r12, %rdi
callq 0xf3a29
leaq 0xdf5bc(%rip), %rsi     # 0x37eee9
movq %r14, %rdi
movl $0x21d, %edx            # imm = 0x21D
callq 0x936f9
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x198616(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x456b7(%rip), %rsi     # 0x2e5013
leaq 0x4585c(%rip), %rdx     # 0x2e51bf
leaq 0xdf64f(%rip), %rcx     # 0x37efb9
leaq 0xdf578(%rip), %r8      # 0x37eee9
movl $0x1ec, %r9d            # imm = 0x1EC
xorl %eax, %eax
callq 0x17a50
callq 0x17390