// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/extended/rmq.c
// Function: gt_rmq_unit_test
int gt_rmq_unit_test(GtError *err)
{
  int had_err = 0;
  GtRMQvaluetype *data;
  GtUword i;
  GtRMQ *rmq;
  gt_error_check(err);

  data = gt_calloc((size_t) GT_RMQ_TESTARRSIZE, sizeof (*data));

  for (i = 0; i < GT_RMQ_TESTARRSIZE; i++)
  {
    data[i] = (GtRMQvaluetype) gt_rand_max(GT_RMQ_TESTMAXVAL);
  }

  rmq = gt_rmq_new(data, GT_RMQ_TESTARRSIZE);

  for (i = 0; i < GT_RMQ_NOFTESTS; i++)
  {
    GtUword start, end, res_naive, res_efficient;
    start = gt_rand_max(GT_RMQ_TESTARRSIZE - GT_RMQ_MAXRANGELENGTH - 2UL);
    end = start + gt_rand_max(GT_RMQ_MAXRANGELENGTH) + 1UL;
    res_naive = gt_rmq_naive(data, GT_RMQ_TESTARRSIZE, start, end);
    res_efficient = gt_rmq_find_min_index(rmq, start, end);
    gt_ensure(data[res_efficient] == data[res_naive]);
  }

  gt_rmq_delete(rmq);
  gt_free(data);
  return had_err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rdi, %rdi
je 0x1126b5
movq %rbx, %rdi
callq 0x89eb7
testb %al, %al
jne 0x112836
movq %rbx, (%rsp)
leaq 0x21e232(%rip), %rdx    # 0x3308f2
pushq $0x4
popq %rsi
movl $0xf4240, %edi          # imm = 0xF4240
movl $0x27a, %ecx            # imm = 0x27A
callq 0x9334a
movq %rax, %r14
xorl %ebx, %ebx
cmpq $0xf4240, %rbx          # imm = 0xF4240
je 0x1126f3
movl $0x989680, %edi         # imm = 0x989680
callq 0x955fa
movl %eax, (%r14,%rbx,4)
incq %rbx
jmp 0x1126d7
movl $0xf4240, %esi          # imm = 0xF4240
movq %r14, %rdi
callq 0x111f8b
movq %rax, %r15
xorl %ebx, %ebx
xorl %r13d, %r13d
cmpq $0x2710, %rbx           # imm = 0x2710
je 0x1127d0
movl $0xf1b2e, %edi          # imm = 0xF1B2E
callq 0x955fa
movq %rax, %r12
movl $0x2710, %edi           # imm = 0x2710
callq 0x955fa
leaq (%r12,%rax), %rdx
incq %rdx
cmpq $0xf423f, %rdx          # imm = 0xF423F
ja 0x1127fe
testq %r14, %r14
je 0x1127fe
cmpq %rdx, %r12
jae 0x1127fe
movl (%r14,%r12,4), %eax
movq %r12, %rcx
incq %rcx
movq %r12, %rbp
cmpq %rdx, %rcx
ja 0x112776
movl (%r14,%rcx,4), %esi
cmpl %eax, %esi
cmovbl %esi, %eax
cmovbq %rcx, %rbp
incq %rcx
jmp 0x11275f
movq %r15, %rdi
movq %r12, %rsi
callq 0x111b9c
testl %r13d, %r13d
pushq $-0x1
popq %r13
jne 0x1127c8
movl (%r14,%rax,4), %eax
xorl %r13d, %r13d
cmpl (%r14,%rbp,4), %eax
je 0x1127c8
movq (%rsp), %rdi
leaq 0x1ebc50(%rip), %rsi    # 0x2fe3f2
leaq 0x21e18a(%rip), %rdx    # 0x330933
leaq 0x21e172(%rip), %rcx    # 0x330922
leaq 0x21e13b(%rip), %r8     # 0x3308f2
movl $0x28a, %r9d            # imm = 0x28A
xorl %eax, %eax
callq 0x89dbb
pushq $-0x1
popq %r13
incq %rbx
jmp 0x112708
movq %r15, %rdi
callq 0x112589
leaq 0x21e113(%rip), %rsi    # 0x3308f2
movq %r14, %rdi
movl $0x28e, %edx            # imm = 0x28E
callq 0x936f9
movl %r13d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x325763(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1d2804(%rip), %rsi    # 0x2e5013
leaq 0x21e14f(%rip), %rdx    # 0x330965
leaq 0x21e16a(%rip), %rcx    # 0x330987
leaq 0x21e0ce(%rip), %r8     # 0x3308f2
movl $0x25f, %r9d            # imm = 0x25F
xorl %eax, %eax
callq 0x17a50
callq 0x17390
movq 0x32572b(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1d27cc(%rip), %rsi    # 0x2e5013
leaq 0x1d2971(%rip), %rdx    # 0x2e51bf
leaq 0x21e0cd(%rip), %rcx    # 0x330922
leaq 0x21e096(%rip), %r8     # 0x3308f2
movl $0x278, %r9d            # imm = 0x278
jmp 0x11282a