// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/extended/intset_16.c
// Function: gt_intset_16_unit_test
int gt_intset_16_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_16_size_of_rep(arr[num_of_elems - 1], num_of_elems);

  if (!had_err) {
    if (is_size < (size_t) UINT_MAX) {
      is = gt_intset_16_new(arr[num_of_elems - 1], num_of_elems);
      for (idx = 0; idx < num_of_elems; idx++) {
        gt_intset_16_add(is, arr[idx]);
        gt_ensure(idx + 1 == gt_intset_16_size(is));
        if (idx < num_of_elems - 1)
          gt_ensure(gt_intset_16_get_idx_smallest_geq(is,
                                                      arr[idx] + 1) ==
                    num_of_elems);
      }

      gt_ensure(gt_intset_16_elems_is_valid(is));
      gt_ensure(gt_intset_16_secstart_is_valid(is));

      GT_INTSET_TEST_16_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_16_get_idx_smallest_geq_test(is, arr[idx] - 1) ==
          to_find);
        gt_ensure(
          gt_intset_16_get_idx_smallest_geq(is, arr[idx] - 1) ==
          to_find);
        GT_INTSET_TEST_16_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 0xe1264(%rip), %rsi     # 0x37e460
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 0x29d22e
movq %rbx, %rdi
callq 0x89eb7
testb %al, %al
jne 0x29d735
movq %rbx, 0x8(%rsp)
shrq %r12
movq %r12, %rdi
callq 0x955fa
incq %rax
movq %rax, (%r14)
pushq $0x1
popq %rbx
cmpq %r15, %rbx
jae 0x29d268
movq -0x8(%r14,%rbx,8), %r13
movq %r12, %rdi
callq 0x955fa
addq %r13, %rax
incq %rax
movq %rax, (%r14,%rbx,8)
incq %rbx
jmp 0x29d247
movq 0x10(%rsp), %rax
movq (%r14,%rax,8), %rdi
movq %rdi, %rax
shrq $0xd, %rax
andq $-0x8, %rax
leaq (%rax,%r15,2), %rax
addq $0x8, %rax
xorl %ebp, %ebp
movl $0xfffffffe, %ecx       # imm = 0xFFFFFFFE
cmpq %rcx, %rax
ja 0x29d710
movq %r15, %rsi
callq 0x29c7a4
movq %rax, %r12
movb $0x1, %r13b
xorl %ebx, %ebx
cmpq %rbx, %r15
je 0x29d35b
movq %rbx, %rbp
movq (%r14,%rbx,8), %rsi
movq %r12, %rdi
callq 0x29cd1e
incq %rbx
testb $0x1, %r13b
movl $0x0, %r13d
je 0x29d2a4
movq %r12, %rdi
callq 0x29cfe4
cmpq %rax, %rbx
jne 0x29d325
movb $0x1, %r13b
cmpq 0x10(%rsp), %rbp
jae 0x29d2a4
movq (%r14,%rbp,8), %rsi
incq %rsi
movq %r12, %rdi
callq 0x29d083
movb $0x1, %r13b
cmpq %r15, %rax
je 0x29d2a4
xorl %r13d, %r13d
movq 0x8(%rsp), %rdi
leaq 0x610ea(%rip), %rsi     # 0x2fe3f2
leaq 0xe1431(%rip), %rdx     # 0x37e740
leaq 0xe13f2(%rip), %rcx     # 0x37e708
leaq 0xe1143(%rip), %r8      # 0x37e460
movl $0x1fe, %r9d            # imm = 0x1FE
jmp 0x29d34f
xorl %r13d, %r13d
movq 0x8(%rsp), %rdi
leaq 0x610be(%rip), %rsi     # 0x2fe3f2
leaq 0xe13e4(%rip), %rdx     # 0x37e71f
leaq 0xe13c6(%rip), %rcx     # 0x37e708
leaq 0xe1117(%rip), %r8      # 0x37e460
movl $0x1fa, %r9d            # imm = 0x1FA
xorl %eax, %eax
callq 0x89dbb
jmp 0x29d2a4
pushq $-0x1
popq %rbp
movl %ebp, %ecx
testb $0x1, %r13b
movq 0x8(%rsp), %rbx
je 0x29d4dd
callq 0x29c8a1
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 0x29d3c1
movq (%rcx), %r8
decq %rdi
movq %rdi, %r9
incq %rdi
cmpq 0x8(%r8,%r9,8), %rsi
ja 0x29d398
je 0x29d3bc
movq 0x10(%rax), %r8
movzwl (%r8,%rsi,2), %r9d
cmpw -0x2(%r8,%rsi,2), %r9w
jbe 0x29d468
incq %rsi
jmp 0x29d38d
movq 0x30(%rcx), %rax
pushq $0x1
popq %rdx
cmpq %rax, %rdx
ja 0x29d40c
movq (%rcx), %rsi
movq (%rsi,%rdx,8), %rdi
leaq 0x1(%rdx), %r8
cmpq -0x8(%rsi,%rdx,8), %rdi
movq %r8, %rdx
jae 0x29d3c8
leaq 0x61009(%rip), %rsi     # 0x2fe3f2
leaq 0xe13b4(%rip), %rdx     # 0x37e7a4
leaq 0xe1311(%rip), %rcx     # 0x37e708
leaq 0xe1062(%rip), %r8      # 0x37e460
movq %rbx, %rdi
movl $0x202, %r9d            # imm = 0x202
jmp 0x29d4d4
movq %r12, %rdi
xorl %esi, %esi
callq 0x29d76d
cmpq (%r14), %rax
jne 0x29d48f
movq %r12, %rdi
xorl %esi, %esi
callq 0x29cece
cmpq (%r14), %rax
jne 0x29d49f
incq %rax
movq %r12, %rdi
movq %rax, %rsi
callq 0x29d7f5
cmpq $0x1, %rax
jne 0x29d4af
movq (%r14), %rsi
incq %rsi
movq %r12, %rdi
callq 0x29d083
xorl %ecx, %ecx
cmpq $0x1, %rax
je 0x29d4dd
leaq 0x60f93(%rip), %rsi     # 0x2fe3f2
leaq 0xe13ea(%rip), %rdx     # 0x37e850
jmp 0x29d4bd
leaq 0x60f83(%rip), %rsi     # 0x2fe3f2
leaq 0xe130e(%rip), %rdx     # 0x37e784
leaq 0xe128b(%rip), %rcx     # 0x37e708
leaq 0xe0fdc(%rip), %r8      # 0x37e460
movq %rbx, %rdi
movl $0x201, %r9d            # imm = 0x201
jmp 0x29d4d4
leaq 0x60f5c(%rip), %rsi     # 0x2fe3f2
leaq 0xe132a(%rip), %rdx     # 0x37e7c7
jmp 0x29d4bd
leaq 0x60f4c(%rip), %rsi     # 0x2fe3f2
leaq 0xe1341(%rip), %rdx     # 0x37e7ee
jmp 0x29d4bd
leaq 0x60f3c(%rip), %rsi     # 0x2fe3f2
leaq 0xe1353(%rip), %rdx     # 0x37e810
leaq 0xe1244(%rip), %rcx     # 0x37e708
leaq 0xe0f95(%rip), %r8      # 0x37e460
movq %rbx, %rdi
movl $0x204, %r9d            # imm = 0x204
xorl %eax, %eax
callq 0x89dbb
movl %ebp, %ecx
pushq $0x1
popq %r13
testl %ecx, %ecx
jne 0x29d67e
cmpq %r15, %r13
jae 0x29d67e
leaq -0x1(%r13), %rbx
movq (%r14,%r13,8), %rsi
decq %rsi
cmpq %rsi, -0x8(%r14,%r13,8)
cmovneq %r13, %rbx
movq %r12, %rdi
callq 0x29d7f5
cmpq %rbx, %rax
jne 0x29d5ac
movq (%r14,%r13,8), %rsi
decq %rsi
movq %r12, %rdi
callq 0x29d083
cmpq %rbx, %rax
jne 0x29d5d8
movq %r12, %rdi
movq %r13, %rsi
callq 0x29d76d
cmpq (%r14,%r13,8), %rax
movq 0x8(%rsp), %rbx
jne 0x29d604
movq %r12, %rdi
movq %r13, %rsi
callq 0x29cece
cmpq (%r14,%r13,8), %rax
jne 0x29d617
incq %rax
movq %r12, %rdi
movq %rax, %rsi
callq 0x29d7f5
movq %rax, %rbp
leaq 0x1(%r13), %rax
cmpq %rbp, %rax
jne 0x29d64d
movq (%r14,%r13,8), %rsi
incq %rsi
movq %r12, %rdi
callq 0x29d083
xorl %ecx, %ecx
cmpq %rbp, %rax
pushq $-0x1
popq %rbp
je 0x29d645
movq %rbx, %rdi
leaq 0x60e4f(%rip), %rsi     # 0x2fe3f2
leaq 0xe13f9(%rip), %rdx     # 0x37e9a3
jmp 0x29d628
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
leaq 0x60e37(%rip), %rsi     # 0x2fe3f2
leaq 0xe12c9(%rip), %rdx     # 0x37e88b
leaq 0xe113f(%rip), %rcx     # 0x37e708
leaq 0xe0e90(%rip), %r8      # 0x37e460
movl $0x209, %r9d            # imm = 0x209
jmp 0x29d63c
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
leaq 0x60e0b(%rip), %rsi     # 0x2fe3f2
leaq 0xe12e1(%rip), %rdx     # 0x37e8cf
leaq 0xe1113(%rip), %rcx     # 0x37e708
leaq 0xe0e64(%rip), %r8      # 0x37e460
movl $0x20c, %r9d            # imm = 0x20C
jmp 0x29d63c
movq %rbx, %rdi
leaq 0x60de4(%rip), %rsi     # 0x2fe3f2
leaq 0xe12f9(%rip), %rdx     # 0x37e90e
jmp 0x29d628
movq %rbx, %rdi
leaq 0x60dd1(%rip), %rsi     # 0x2fe3f2
leaq 0xe1311(%rip), %rdx     # 0x37e939
leaq 0xe10d9(%rip), %rcx     # 0x37e708
leaq 0xe0e2a(%rip), %r8      # 0x37e460
movl $0x20d, %r9d            # imm = 0x20D
xorl %eax, %eax
callq 0x89dbb
movl %ebp, %ecx
incq %r13
jmp 0x29d4e1
movq %rbx, %rdi
leaq 0x60d9b(%rip), %rsi     # 0x2fe3f2
leaq 0xe1301(%rip), %rdx     # 0x37e95f
leaq 0xe10a3(%rip), %rcx     # 0x37e708
leaq 0xe0df4(%rip), %r8      # 0x37e460
movl $0x20d, %r9d            # imm = 0x20D
xorl %eax, %eax
callq 0x89dbb
pushq $-0x1
popq %rbp
jmp 0x29d643
testl %ecx, %ecx
je 0x29d687
pushq $-0x1
popq %rbp
jmp 0x29d6b7
movq (%r14), %rdx
decq %rdx
movq %r12, %rdi
xorl %esi, %esi
movq %rbx, %rcx
callq 0xf3ae2
movl %eax, %ebp
testl %eax, %eax
jne 0x29d6b7
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 0x29d708
cmpq %r15, %r13
jae 0x29d708
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 0x29d703
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 0x29d6bb
movq %r12, %rdi
callq 0xf3a29
leaq 0xe0d49(%rip), %rsi     # 0x37e460
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 0x19a82c(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x478cd(%rip), %rsi     # 0x2e5013
leaq 0x47a72(%rip), %rdx     # 0x2e51bf
leaq 0xe0fb4(%rip), %rcx     # 0x37e708
leaq 0xe0d05(%rip), %r8      # 0x37e460
movl $0x1ec, %r9d            # imm = 0x1EC
xorl %eax, %eax
callq 0x17a50
callq 0x17390