// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/extended/intset_32.c
// Function: gt_intset_32_unit_test
int gt_intset_32_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_32_size_of_rep(arr[num_of_elems - 1], num_of_elems);

  if (!had_err) {
    if (is_size < (size_t) UINT_MAX) {
      is = gt_intset_32_new(arr[num_of_elems - 1], num_of_elems);
      for (idx = 0; idx < num_of_elems; idx++) {
        gt_intset_32_add(is, arr[idx]);
        gt_ensure(idx + 1 == gt_intset_32_size(is));
        if (idx < num_of_elems - 1)
          gt_ensure(gt_intset_32_get_idx_smallest_geq(is,
                                                      arr[idx] + 1) ==
                    num_of_elems);
      }

      gt_ensure(gt_intset_32_elems_is_valid(is));
      gt_ensure(gt_intset_32_secstart_is_valid(is));

      GT_INTSET_TEST_32_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_32_get_idx_smallest_geq_test(is, arr[idx] - 1) ==
          to_find);
        gt_ensure(
          gt_intset_32_get_idx_smallest_geq(is, arr[idx] - 1) ==
          to_find);
        GT_INTSET_TEST_32_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 0xe0779(%rip), %rsi     # 0x37ea97
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 0x29e350
movq %rbx, %rdi
callq 0x89eb7
testb %al, %al
jne 0x29e855
movq %rbx, 0x8(%rsp)
shrq %r12
movq %r12, %rdi
callq 0x955fa
incq %rax
movq %rax, (%r14)
pushq $0x1
popq %rbx
cmpq %r15, %rbx
jae 0x29e38a
movq -0x8(%r14,%rbx,8), %r13
movq %r12, %rdi
callq 0x955fa
addq %r13, %rax
incq %rax
movq %rax, (%r14,%rbx,8)
incq %rbx
jmp 0x29e369
movq 0x10(%rsp), %rax
movq (%r14,%rax,8), %rdi
movq %rdi, %rax
shrq $0x1d, %rax
andq $-0x8, %rax
leaq (%rax,%r15,4), %rax
addq $0x8, %rax
xorl %ebp, %ebp
movl $0xfffffffe, %ecx       # imm = 0xFFFFFFFE
cmpq %rcx, %rax
ja 0x29e830
movq %r15, %rsi
callq 0x29d8c4
movq %rax, %r12
movb $0x1, %r13b
xorl %ebx, %ebx
cmpq %rbx, %r15
je 0x29e47d
movq %rbx, %rbp
movq (%r14,%rbx,8), %rsi
movq %r12, %rdi
callq 0x29de43
incq %rbx
testb $0x1, %r13b
movl $0x0, %r13d
je 0x29e3c6
movq %r12, %rdi
callq 0x29e107
cmpq %rax, %rbx
jne 0x29e447
movb $0x1, %r13b
cmpq 0x10(%rsp), %rbp
jae 0x29e3c6
movq (%r14,%rbp,8), %rsi
incq %rsi
movq %r12, %rdi
callq 0x29e1a5
movb $0x1, %r13b
cmpq %r15, %rax
je 0x29e3c6
xorl %r13d, %r13d
movq 0x8(%rsp), %rdi
leaq 0x5ffc8(%rip), %rsi     # 0x2fe3f2
leaq 0xe0776(%rip), %rdx     # 0x37eba7
leaq 0xe0737(%rip), %rcx     # 0x37eb6f
leaq 0xe0658(%rip), %r8      # 0x37ea97
movl $0x1fe, %r9d            # imm = 0x1FE
jmp 0x29e471
xorl %r13d, %r13d
movq 0x8(%rsp), %rdi
leaq 0x5ff9c(%rip), %rsi     # 0x2fe3f2
leaq 0xe0729(%rip), %rdx     # 0x37eb86
leaq 0xe070b(%rip), %rcx     # 0x37eb6f
leaq 0xe062c(%rip), %r8      # 0x37ea97
movl $0x1fa, %r9d            # imm = 0x1FA
xorl %eax, %eax
callq 0x89dbb
jmp 0x29e3c6
pushq $-0x1
popq %rbp
movl %ebp, %ecx
testb $0x1, %r13b
movq 0x8(%rsp), %rbx
je 0x29e5fd
callq 0x29d9c5
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 0x29e4e1
movq (%rcx), %r8
decq %rdi
movq %rdi, %r9
incq %rdi
cmpq 0x8(%r8,%r9,8), %rsi
ja 0x29e4ba
je 0x29e4dc
movq 0x10(%rax), %r8
movl (%r8,%rsi,4), %r9d
cmpl -0x4(%r8,%rsi,4), %r9d
jbe 0x29e588
incq %rsi
jmp 0x29e4af
movq 0x30(%rcx), %rax
pushq $0x1
popq %rdx
cmpq %rax, %rdx
ja 0x29e52c
movq (%rcx), %rsi
movq (%rsi,%rdx,8), %rdi
leaq 0x1(%rdx), %r8
cmpq -0x8(%rsi,%rdx,8), %rdi
movq %r8, %rdx
jae 0x29e4e8
leaq 0x5fee9(%rip), %rsi     # 0x2fe3f2
leaq 0xe06fb(%rip), %rdx     # 0x37ec0b
leaq 0xe0658(%rip), %rcx     # 0x37eb6f
leaq 0xe0579(%rip), %r8      # 0x37ea97
movq %rbx, %rdi
movl $0x202, %r9d            # imm = 0x202
jmp 0x29e5f4
movq %r12, %rdi
xorl %esi, %esi
callq 0x29e88d
cmpq (%r14), %rax
jne 0x29e5af
movq %r12, %rdi
xorl %esi, %esi
callq 0x29dff2
cmpq (%r14), %rax
jne 0x29e5bf
incq %rax
movq %r12, %rdi
movq %rax, %rsi
callq 0x29e914
cmpq $0x1, %rax
jne 0x29e5cf
movq (%r14), %rsi
incq %rsi
movq %r12, %rdi
callq 0x29e1a5
xorl %ecx, %ecx
cmpq $0x1, %rax
je 0x29e5fd
leaq 0x5fe73(%rip), %rsi     # 0x2fe3f2
leaq 0xe0731(%rip), %rdx     # 0x37ecb7
jmp 0x29e5dd
leaq 0x5fe63(%rip), %rsi     # 0x2fe3f2
leaq 0xe0655(%rip), %rdx     # 0x37ebeb
leaq 0xe05d2(%rip), %rcx     # 0x37eb6f
leaq 0xe04f3(%rip), %r8      # 0x37ea97
movq %rbx, %rdi
movl $0x201, %r9d            # imm = 0x201
jmp 0x29e5f4
leaq 0x5fe3c(%rip), %rsi     # 0x2fe3f2
leaq 0xe0671(%rip), %rdx     # 0x37ec2e
jmp 0x29e5dd
leaq 0x5fe2c(%rip), %rsi     # 0x2fe3f2
leaq 0xe0688(%rip), %rdx     # 0x37ec55
jmp 0x29e5dd
leaq 0x5fe1c(%rip), %rsi     # 0x2fe3f2
leaq 0xe069a(%rip), %rdx     # 0x37ec77
leaq 0xe058b(%rip), %rcx     # 0x37eb6f
leaq 0xe04ac(%rip), %r8      # 0x37ea97
movq %rbx, %rdi
movl $0x204, %r9d            # imm = 0x204
xorl %eax, %eax
callq 0x89dbb
movl %ebp, %ecx
pushq $0x1
popq %r13
testl %ecx, %ecx
jne 0x29e79e
cmpq %r15, %r13
jae 0x29e79e
leaq -0x1(%r13), %rbx
movq (%r14,%r13,8), %rsi
decq %rsi
cmpq %rsi, -0x8(%r14,%r13,8)
cmovneq %r13, %rbx
movq %r12, %rdi
callq 0x29e914
cmpq %rbx, %rax
jne 0x29e6cc
movq (%r14,%r13,8), %rsi
decq %rsi
movq %r12, %rdi
callq 0x29e1a5
cmpq %rbx, %rax
jne 0x29e6f8
movq %r12, %rdi
movq %r13, %rsi
callq 0x29e88d
cmpq (%r14,%r13,8), %rax
movq 0x8(%rsp), %rbx
jne 0x29e724
movq %r12, %rdi
movq %r13, %rsi
callq 0x29dff2
cmpq (%r14,%r13,8), %rax
jne 0x29e737
incq %rax
movq %r12, %rdi
movq %rax, %rsi
callq 0x29e914
movq %rax, %rbp
leaq 0x1(%r13), %rax
cmpq %rbp, %rax
jne 0x29e76d
movq (%r14,%r13,8), %rsi
incq %rsi
movq %r12, %rdi
callq 0x29e1a5
xorl %ecx, %ecx
cmpq %rbp, %rax
pushq $-0x1
popq %rbp
je 0x29e765
movq %rbx, %rdi
leaq 0x5fd2f(%rip), %rsi     # 0x2fe3f2
leaq 0xe0740(%rip), %rdx     # 0x37ee0a
jmp 0x29e748
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
leaq 0x5fd17(%rip), %rsi     # 0x2fe3f2
leaq 0xe0610(%rip), %rdx     # 0x37ecf2
leaq 0xe0486(%rip), %rcx     # 0x37eb6f
leaq 0xe03a7(%rip), %r8      # 0x37ea97
movl $0x209, %r9d            # imm = 0x209
jmp 0x29e75c
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
leaq 0x5fceb(%rip), %rsi     # 0x2fe3f2
leaq 0xe0628(%rip), %rdx     # 0x37ed36
leaq 0xe045a(%rip), %rcx     # 0x37eb6f
leaq 0xe037b(%rip), %r8      # 0x37ea97
movl $0x20c, %r9d            # imm = 0x20C
jmp 0x29e75c
movq %rbx, %rdi
leaq 0x5fcc4(%rip), %rsi     # 0x2fe3f2
leaq 0xe0640(%rip), %rdx     # 0x37ed75
jmp 0x29e748
movq %rbx, %rdi
leaq 0x5fcb1(%rip), %rsi     # 0x2fe3f2
leaq 0xe0658(%rip), %rdx     # 0x37eda0
leaq 0xe0420(%rip), %rcx     # 0x37eb6f
leaq 0xe0341(%rip), %r8      # 0x37ea97
movl $0x20d, %r9d            # imm = 0x20D
xorl %eax, %eax
callq 0x89dbb
movl %ebp, %ecx
incq %r13
jmp 0x29e601
movq %rbx, %rdi
leaq 0x5fc7b(%rip), %rsi     # 0x2fe3f2
leaq 0xe0648(%rip), %rdx     # 0x37edc6
leaq 0xe03ea(%rip), %rcx     # 0x37eb6f
leaq 0xe030b(%rip), %r8      # 0x37ea97
movl $0x20d, %r9d            # imm = 0x20D
xorl %eax, %eax
callq 0x89dbb
pushq $-0x1
popq %rbp
jmp 0x29e763
testl %ecx, %ecx
je 0x29e7a7
pushq $-0x1
popq %rbp
jmp 0x29e7d7
movq (%r14), %rdx
decq %rdx
movq %r12, %rdi
xorl %esi, %esi
movq %rbx, %rcx
callq 0xf3ae2
movl %eax, %ebp
testl %eax, %eax
jne 0x29e7d7
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 0x29e828
cmpq %r15, %r13
jae 0x29e828
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 0x29e823
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 0x29e7db
movq %r12, %rdi
callq 0xf3a29
leaq 0xe0260(%rip), %rsi     # 0x37ea97
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 0x19970c(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x467ad(%rip), %rsi     # 0x2e5013
leaq 0x46952(%rip), %rdx     # 0x2e51bf
leaq 0xe02fb(%rip), %rcx     # 0x37eb6f
leaq 0xe021c(%rip), %r8      # 0x37ea97
movl $0x1ec, %r9d            # imm = 0x1EC
xorl %eax, %eax
callq 0x17a50
callq 0x17390