// File: /workspace/github_c_makefile_star2_O1/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 0x10ae3c
movq %rax, %r13
leaq 0x1(%rax), %r15
leaq 0x8(,%rax,8), %rdi
leaq 0xdce9d(%rip), %rsi     # 0x3e7dc7
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 0x30af5e
movq %rbx, %rdi
callq 0x101a9a
testb %al, %al
jne 0x30b4fa
movq %rbx, (%rsp)
shrq %r12
movq %r12, %rdi
callq 0x10ae3c
incq %rax
movq %rax, (%r14)
cmpq $0x2, %r15
jb 0x30af9a
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 0x30af7b
movq (%r14,%r13,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 0x30b4d5
movq %r15, %rsi
callq 0x30a360
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 0x30abbc
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movb $0x1, %al
testl %r15d, %r15d
jne 0x30b05f
leaq 0x1(%rbp), %r15
callq 0x30a442
movq %rax, %rdi
movq %r14, %rsi
callq 0x15e2b0
movq 0x8(%r14), %rdx
xorl %eax, %eax
movl $0x0, %ecx
cmpq 0x20(%rdx), %r15
je 0x30b05f
movq (%rsp), %rdi
leaq 0x5c504(%rip), %rsi     # 0x36753a
leaq 0xdce79(%rip), %rdx     # 0x3e7eb6
leaq 0xdce5b(%rip), %rcx     # 0x3e7e9f
leaq 0xdcd7c(%rip), %r8      # 0x3e7dc7
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 0x30b0b9
movq (%r14,%rbp,8), %rsi
incq %rsi
movq %rbx, %rdi
callq 0x30ae0d
xorl %ecx, %ecx
cmpq %r15, %rax
je 0x30b0b9
movq (%rsp), %rdi
leaq 0x5c4a8(%rip), %rsi     # 0x36753a
leaq 0xdce3e(%rip), %rdx     # 0x3e7ed7
leaq 0xdcdff(%rip), %rcx     # 0x3e7e9f
leaq 0xdcd20(%rip), %r8      # 0x3e7dc7
movl $0x1fe, %r9d            # imm = 0x1FE
xorl %eax, %eax
callq 0x1019cf
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
incq %rbp
cmpq %rbp, 0x10(%rsp)
jne 0x30afe5
testl %ecx, %ecx
je 0x30b0d6
xorl %r14d, %r14d
movq %rbx, %r12
jmp 0x30b295
callq 0x30a442
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 0x30b136
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 0x30b10c
je 0x30b12a
movq 0x10(%rax), %r10
movl (%r10,%r8,4), %r11d
cmpl -0x4(%r10,%r8,4), %r11d
jbe 0x30b136
incq %r8
cmpq %rdx, %r8
setae %dil
jne 0x30b109
testb $0x1, %dil
je 0x30b1ef
movq 0x30(%rcx), %rax
testq %rax, %rax
sete %dl
je 0x30b17b
movq (%rcx), %rcx
movq 0x8(%rcx), %rdx
cmpq (%rcx), %rdx
jb 0x30b21a
movl $0x2, %esi
cmpq %rax, %rsi
seta %dl
ja 0x30b17b
movq (%rcx,%rsi,8), %rdi
leaq 0x1(%rsi), %r8
cmpq -0x8(%rcx,%rsi,8), %rdi
movq %r8, %rsi
jae 0x30b161
testb %dl, %dl
je 0x30b21a
movq %r12, %rdi
xorl %esi, %esi
callq 0x30b4ff
cmpq (%r14), %rax
jne 0x30b245
movq %r12, %rdi
xorl %esi, %esi
callq 0x30aca2
movq (%r14), %rsi
cmpq %rsi, %rax
jne 0x30b255
incq %rsi
movq %r12, %rdi
callq 0x30b557
cmpq $0x1, %rax
jne 0x30b265
movq (%r14), %rsi
incq %rsi
movq %r12, %rdi
callq 0x30ae0d
movb $0x1, %r14b
cmpq $0x1, %rax
je 0x30b295
leaq 0x5c357(%rip), %rsi     # 0x36753a
leaq 0xdcdfd(%rip), %rdx     # 0x3e7fe7
jmp 0x30b273
leaq 0x5c344(%rip), %rsi     # 0x36753a
leaq 0xdcd1e(%rip), %rdx     # 0x3e7f1b
leaq 0xdcc9b(%rip), %rcx     # 0x3e7e9f
leaq 0xdcbbc(%rip), %r8      # 0x3e7dc7
xorl %r14d, %r14d
movq (%rsp), %rdi
movl $0x201, %r9d            # imm = 0x201
jmp 0x30b28e
leaq 0x5c319(%rip), %rsi     # 0x36753a
leaq 0xdcd13(%rip), %rdx     # 0x3e7f3b
leaq 0xdcc70(%rip), %rcx     # 0x3e7e9f
leaq 0xdcb91(%rip), %r8      # 0x3e7dc7
xorl %r14d, %r14d
movq (%rsp), %rdi
movl $0x202, %r9d            # imm = 0x202
jmp 0x30b28e
leaq 0x5c2ee(%rip), %rsi     # 0x36753a
leaq 0xdcd0b(%rip), %rdx     # 0x3e7f5e
jmp 0x30b273
leaq 0x5c2de(%rip), %rsi     # 0x36753a
leaq 0xdcd22(%rip), %rdx     # 0x3e7f85
jmp 0x30b273
leaq 0x5c2ce(%rip), %rsi     # 0x36753a
leaq 0xdcd34(%rip), %rdx     # 0x3e7fa7
leaq 0xdcc25(%rip), %rcx     # 0x3e7e9f
leaq 0xdcb46(%rip), %r8      # 0x3e7dc7
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 0x30b429
movl $0x1, %r13d
leaq 0x5c283(%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 0x30b557
cmpq %rbx, %rax
jne 0x30b375
movq (%r14,%r13,8), %rsi
decq %rsi
movq %r12, %rdi
callq 0x30ae0d
cmpq %rbx, %rax
jne 0x30b39c
movq %r12, %rdi
movq %r13, %rsi
callq 0x30b4ff
cmpq (%r14,%r13,8), %rax
jne 0x30b3c3
movq %r12, %rdi
movq %r13, %rsi
callq 0x30aca2
movq (%r14,%r13,8), %rsi
cmpq %rsi, %rax
jne 0x30b3d6
movq %rbp, %rbx
incq %rsi
movq %r12, %rdi
callq 0x30b557
leaq 0x1(%r13), %rbp
cmpq %rax, %rbp
jne 0x30b3e9
movq (%r14,%r13,8), %rsi
incq %rsi
movq %r12, %rdi
callq 0x30ae0d
movb $0x1, %r14b
cmpq %rax, %rbp
movq %rbx, %rbp
je 0x30b418
xorl %r14d, %r14d
movq (%rsp), %rdi
movq %rbp, %rsi
leaq 0xdcdca(%rip), %rdx     # 0x3e813a
jmp 0x30b3fd
xorl %r14d, %r14d
movq (%rsp), %rdi
movq %rbp, %rsi
leaq 0xdcc9c(%rip), %rdx     # 0x3e8022
leaq 0xdcb12(%rip), %rcx     # 0x3e7e9f
leaq 0xdca33(%rip), %r8      # 0x3e7dc7
movl $0x209, %r9d            # imm = 0x209
jmp 0x30b411
xorl %r14d, %r14d
movq (%rsp), %rdi
movq %rbp, %rsi
leaq 0xdccb9(%rip), %rdx     # 0x3e8066
leaq 0xdcaeb(%rip), %rcx     # 0x3e7e9f
leaq 0xdca0c(%rip), %r8      # 0x3e7dc7
movl $0x20c, %r9d            # imm = 0x20C
jmp 0x30b411
xorl %r14d, %r14d
movq (%rsp), %rdi
movq %rbp, %rsi
leaq 0xdccd1(%rip), %rdx     # 0x3e80a5
jmp 0x30b3fd
xorl %r14d, %r14d
movq (%rsp), %rdi
movq %rbp, %rsi
leaq 0xdcce9(%rip), %rdx     # 0x3e80d0
jmp 0x30b3fd
xorl %r14d, %r14d
movq (%rsp), %rdi
movq %rbx, %rbp
movq %rbx, %rsi
leaq 0xdccf9(%rip), %rdx     # 0x3e80f6
leaq 0xdca9b(%rip), %rcx     # 0x3e7e9f
leaq 0xdc9bc(%rip), %r8      # 0x3e7dc7
movl $0x20d, %r9d            # imm = 0x20D
xorl %eax, %eax
callq 0x1019cf
testb %r14b, %r14b
je 0x30b429
incq %r13
cmpq %r15, %r13
jb 0x30b2b7
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testb %r14b, %r14b
movq (%rsp), %rbx
movq 0x8(%rsp), %r14
je 0x30b451
movq (%r14), %rdx
decq %rdx
movq %r12, %rdi
xorl %esi, %esi
movq %rbx, %rcx
callq 0x15e50e
movl %eax, %ebp
testl %ebp, %ebp
jne 0x30b46c
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 0x30b4cd
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 0x30b4c1
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 0x30b4cd
incq %r13
cmpq %r15, %r13
jb 0x30b482
movq %r12, %rdi
callq 0x15e488
leaq 0xdc8eb(%rip), %rsi     # 0x3e7dc7
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 0x8e4e1