// File: /workspace/github_c_makefile_star2_O1/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 0x10ae3c
movq %rax, %r13
leaq 0x1(%rax), %r15
leaq 0x8(,%rax,8), %rdi
leaq 0xddb02(%rip), %rsi     # 0x3e7790
movl $0x1e7, %edx            # imm = 0x1E7
callq 0x1092b2
movq %rax, %r14
movl $0x4, %eax
xorl %edx, %edx
divq %r15
movq %r15, %r12
movl %eax, %ecx
shlq %cl, %r12
testq %rbx, %rbx
je 0x309cc2
movq %rbx, %rdi
callq 0x101a9a
testb %al, %al
jne 0x30a260
movq %rbx, (%rsp)
shrq %r12
movq %r12, %rdi
callq 0x10ae3c
incq %rax
movq %rax, (%r14)
cmpq $0x2, %r15
jb 0x309cfe
xorl %ebx, %ebx
movq (%r14,%rbx,8), %rbp
movq %r12, %rdi
callq 0x10ae3c
addq %rbp, %rax
incq %rax
movq %rax, 0x8(%r14,%rbx,8)
incq %rbx
cmpq %rbx, %r13
jne 0x309cdf
movq (%r14,%r13,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 0x30a23b
movq %r15, %rsi
callq 0x3090c8
cmpq $0x1, %r15
movq %r15, %rcx
adcq $0x0, %rcx
movq %rcx, 0x10(%rsp)
movq %rax, %rbx
xorl %ecx, %ecx
xorl %ebp, %ebp
movq %r14, 0x8(%rsp)
movq %r15, %r12
movl %ecx, %r15d
movq (%r14,%rbp,8), %rsi
movq %rbx, %r14
movq %rbx, %rdi
callq 0x30991d
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movb $0x1, %al
testl %r15d, %r15d
jne 0x309dc3
leaq 0x1(%rbp), %r15
callq 0x3091a6
movq %rax, %rdi
movq %r14, %rsi
callq 0x15e2b0
movq 0x8(%r14), %rdx
xorl %eax, %eax
movl $0x0, %ecx
cmpq 0x20(%rdx), %r15
je 0x309dc3
movq (%rsp), %rdi
leaq 0x5d7a0(%rip), %rsi     # 0x36753a
leaq 0xddcae(%rip), %rdx     # 0x3e7a4f
leaq 0xddc90(%rip), %rcx     # 0x3e7a38
leaq 0xdd9e1(%rip), %r8      # 0x3e7790
movl $0x1fa, %r9d            # imm = 0x1FA
xorl %eax, %eax
callq 0x1019cf
movb $0x1, %al
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpq %r13, %rbp
setae %dl
orb %al, %dl
movq %r12, %r15
movq 0x8(%rsp), %r14
jne 0x309e1d
movq (%r14,%rbp,8), %rsi
incq %rsi
movq %rbx, %rdi
callq 0x309b71
xorl %ecx, %ecx
cmpq %r15, %rax
je 0x309e1d
movq (%rsp), %rdi
leaq 0x5d744(%rip), %rsi     # 0x36753a
leaq 0xddc73(%rip), %rdx     # 0x3e7a70
leaq 0xddc34(%rip), %rcx     # 0x3e7a38
leaq 0xdd985(%rip), %r8      # 0x3e7790
movl $0x1fe, %r9d            # imm = 0x1FE
xorl %eax, %eax
callq 0x1019cf
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
incq %rbp
cmpq %rbp, 0x10(%rsp)
jne 0x309d49
testl %ecx, %ecx
je 0x309e3a
xorl %r14d, %r14d
movq %rbx, %r12
jmp 0x309ffb
callq 0x3091a6
movq %rax, %rdi
movq %rbx, %r12
movq %rbx, %rsi
callq 0x15e2b0
movq 0x8(%rbx), %rcx
movq 0x28(%rcx), %rdx
cmpq $0x2, %rdx
setb %dil
jb 0x309e9c
movq (%rcx), %rsi
movl $0x1, %r8d
xorl %edi, %edi
xorl %r9d, %r9d
decq %r9
movq %r9, %r10
incq %r9
cmpq 0x8(%rsi,%r10,8), %r8
ja 0x309e70
je 0x309e90
movq 0x10(%rax), %r10
movzwl (%r10,%r8,2), %r11d
cmpw -0x2(%r10,%r8,2), %r11w
jbe 0x309e9c
incq %r8
cmpq %rdx, %r8
setae %dil
jne 0x309e6d
testb $0x1, %dil
je 0x309f55
movq 0x30(%rcx), %rax
testq %rax, %rax
sete %dl
je 0x309ee1
movq (%rcx), %rcx
movq 0x8(%rcx), %rdx
cmpq (%rcx), %rdx
jb 0x309f80
movl $0x2, %esi
cmpq %rax, %rsi
seta %dl
ja 0x309ee1
movq (%rcx,%rsi,8), %rdi
leaq 0x1(%rsi), %r8
cmpq -0x8(%rcx,%rsi,8), %rdi
movq %r8, %rsi
jae 0x309ec7
testb %dl, %dl
je 0x309f80
movq %r12, %rdi
xorl %esi, %esi
callq 0x30a265
cmpq (%r14), %rax
jne 0x309fab
movq %r12, %rdi
xorl %esi, %esi
callq 0x309a04
movq (%r14), %rsi
cmpq %rsi, %rax
jne 0x309fbb
incq %rsi
movq %r12, %rdi
callq 0x30a2be
cmpq $0x1, %rax
jne 0x309fcb
movq (%r14), %rsi
incq %rsi
movq %r12, %rdi
callq 0x309b71
movb $0x1, %r14b
cmpq $0x1, %rax
je 0x309ffb
leaq 0x5d5f1(%rip), %rsi     # 0x36753a
leaq 0xddc30(%rip), %rdx     # 0x3e7b80
jmp 0x309fd9
leaq 0x5d5de(%rip), %rsi     # 0x36753a
leaq 0xddb51(%rip), %rdx     # 0x3e7ab4
leaq 0xddace(%rip), %rcx     # 0x3e7a38
leaq 0xdd81f(%rip), %r8      # 0x3e7790
xorl %r14d, %r14d
movq (%rsp), %rdi
movl $0x201, %r9d            # imm = 0x201
jmp 0x309ff4
leaq 0x5d5b3(%rip), %rsi     # 0x36753a
leaq 0xddb46(%rip), %rdx     # 0x3e7ad4
leaq 0xddaa3(%rip), %rcx     # 0x3e7a38
leaq 0xdd7f4(%rip), %r8      # 0x3e7790
xorl %r14d, %r14d
movq (%rsp), %rdi
movl $0x202, %r9d            # imm = 0x202
jmp 0x309ff4
leaq 0x5d588(%rip), %rsi     # 0x36753a
leaq 0xddb3e(%rip), %rdx     # 0x3e7af7
jmp 0x309fd9
leaq 0x5d578(%rip), %rsi     # 0x36753a
leaq 0xddb55(%rip), %rdx     # 0x3e7b1e
jmp 0x309fd9
leaq 0x5d568(%rip), %rsi     # 0x36753a
leaq 0xddb67(%rip), %rdx     # 0x3e7b40
leaq 0xdda58(%rip), %rcx     # 0x3e7a38
leaq 0xdd7a9(%rip), %r8      # 0x3e7790
xorl %r14d, %r14d
movq (%rsp), %rdi
movl $0x204, %r9d            # imm = 0x204
xorl %eax, %eax
callq 0x1019cf
cmpq $0x2, %r15
setb %al
movl %r14d, %ecx
xorb $0x1, %cl
orb %al, %cl
jne 0x30a18f
movl $0x1, %r13d
leaq 0x5d51d(%rip), %rbp     # 0x36753a
leaq -0x1(%r13), %rbx
movq 0x8(%rsp), %r14
movq (%r14,%r13,8), %rsi
decq %rsi
cmpq %rsi, -0x8(%r14,%r13,8)
cmovneq %r13, %rbx
movq %r12, %rdi
callq 0x30a2be
cmpq %rbx, %rax
jne 0x30a0db
movq (%r14,%r13,8), %rsi
decq %rsi
movq %r12, %rdi
callq 0x309b71
cmpq %rbx, %rax
jne 0x30a102
movq %r12, %rdi
movq %r13, %rsi
callq 0x30a265
cmpq (%r14,%r13,8), %rax
jne 0x30a129
movq %r12, %rdi
movq %r13, %rsi
callq 0x309a04
movq (%r14,%r13,8), %rsi
cmpq %rsi, %rax
jne 0x30a13c
movq %rbp, %rbx
incq %rsi
movq %r12, %rdi
callq 0x30a2be
leaq 0x1(%r13), %rbp
cmpq %rax, %rbp
jne 0x30a14f
movq (%r14,%r13,8), %rsi
incq %rsi
movq %r12, %rdi
callq 0x309b71
movb $0x1, %r14b
cmpq %rax, %rbp
movq %rbx, %rbp
je 0x30a17e
xorl %r14d, %r14d
movq (%rsp), %rdi
movq %rbp, %rsi
leaq 0xddbfd(%rip), %rdx     # 0x3e7cd3
jmp 0x30a163
xorl %r14d, %r14d
movq (%rsp), %rdi
movq %rbp, %rsi
leaq 0xddacf(%rip), %rdx     # 0x3e7bbb
leaq 0xdd945(%rip), %rcx     # 0x3e7a38
leaq 0xdd696(%rip), %r8      # 0x3e7790
movl $0x209, %r9d            # imm = 0x209
jmp 0x30a177
xorl %r14d, %r14d
movq (%rsp), %rdi
movq %rbp, %rsi
leaq 0xddaec(%rip), %rdx     # 0x3e7bff
leaq 0xdd91e(%rip), %rcx     # 0x3e7a38
leaq 0xdd66f(%rip), %r8      # 0x3e7790
movl $0x20c, %r9d            # imm = 0x20C
jmp 0x30a177
xorl %r14d, %r14d
movq (%rsp), %rdi
movq %rbp, %rsi
leaq 0xddb04(%rip), %rdx     # 0x3e7c3e
jmp 0x30a163
xorl %r14d, %r14d
movq (%rsp), %rdi
movq %rbp, %rsi
leaq 0xddb1c(%rip), %rdx     # 0x3e7c69
jmp 0x30a163
xorl %r14d, %r14d
movq (%rsp), %rdi
movq %rbx, %rbp
movq %rbx, %rsi
leaq 0xddb2c(%rip), %rdx     # 0x3e7c8f
leaq 0xdd8ce(%rip), %rcx     # 0x3e7a38
leaq 0xdd61f(%rip), %r8      # 0x3e7790
movl $0x20d, %r9d            # imm = 0x20D
xorl %eax, %eax
callq 0x1019cf
testb %r14b, %r14b
je 0x30a18f
incq %r13
cmpq %r15, %r13
jb 0x30a01d
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testb %r14b, %r14b
movq (%rsp), %rbx
movq 0x8(%rsp), %r14
je 0x30a1b7
movq (%r14), %rdx
decq %rdx
movq %r12, %rdi
xorl %esi, %esi
movq %rbx, %rcx
callq 0x15e50e
movl %eax, %ebp
testl %ebp, %ebp
jne 0x30a1d2
movq (%r14), %rdx
decq %rdx
movq %r12, %rdi
xorl %esi, %esi
xorl %ecx, %ecx
movq %rbx, %r8
callq 0x15e59e
movl %eax, %ebp
testl %ebp, %ebp
setne %al
cmpq $0x2, %r15
setb %cl
orb %al, %cl
jne 0x30a233
movl $0x1, %r13d
movq -0x8(%r14,%r13,8), %rsi
movq (%r14,%r13,8), %rdx
incq %rsi
decq %rdx
movq %r12, %rdi
movq %rbx, %rcx
callq 0x15e50e
movl %eax, %ebp
testl %eax, %eax
jne 0x30a227
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 0x15e59e
movl %eax, %ebp
testl %ebp, %ebp
jne 0x30a233
incq %r13
cmpq %r15, %r13
jb 0x30a1e8
movq %r12, %rdi
callq 0x15e488
leaq 0xdd54e(%rip), %rsi     # 0x3e7790
movq %r14, %rdi
movl $0x21d, %edx            # imm = 0x21D
callq 0x109670
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x8e036