// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movl $0x0, 0x4c(%rsp)
cmpq $0x0, 0x50(%rsp)
je 0x1cd581
movq 0x50(%rsp), %rdi
callq 0xd8a60
testb $0x1, %al
jne 0x1cd549
jmp 0x1cd581
movq 0x46ea50(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x348ab9(%rip), %rsi    # 0x516013
leaq 0x348c5e(%rip), %rdx    # 0x5161bf
leaq 0x39589b(%rip), %rcx    # 0x562e03
leaq 0x395864(%rip), %r8     # 0x562dd3
movl $0x278, %r9d            # imm = 0x278
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1cd583
movl $0xf4240, %edi          # imm = 0xF4240
movl $0x4, %esi
leaq 0x39583f(%rip), %rdx    # 0x562dd3
movl $0x27a, %ecx            # imm = 0x27A
callq 0xe83c0
movq %rax, 0x40(%rsp)
movq $0x0, 0x38(%rsp)
cmpq $0xf4240, 0x38(%rsp)    # imm = 0xF4240
jae 0x1cd5e0
movl $0x989680, %edi         # imm = 0x989680
callq 0xec350
movl %eax, %edx
movq 0x40(%rsp), %rax
movq 0x38(%rsp), %rcx
movl %edx, (%rax,%rcx,4)
movq 0x38(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x38(%rsp)
jmp 0x1cd5ac
movq 0x40(%rsp), %rdi
movl $0xf4240, %esi          # imm = 0xF4240
callq 0x1cc2f0
movq %rax, 0x30(%rsp)
movq $0x0, 0x38(%rsp)
cmpq $0x2710, 0x38(%rsp)     # imm = 0x2710
jae 0x1cd6ec
movl $0xf1b2e, %edi          # imm = 0xF1B2E
callq 0xec350
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
movl $0x2710, %edi           # imm = 0x2710
callq 0xec350
movq %rax, %rcx
movq 0x8(%rsp), %rax
addq %rcx, %rax
addq $0x1, %rax
movq %rax, 0x20(%rsp)
movq 0x40(%rsp), %rdi
movq 0x28(%rsp), %rdx
movq 0x20(%rsp), %rcx
movl $0xf4240, %esi          # imm = 0xF4240
callq 0x1cd720
movq %rax, 0x18(%rsp)
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq 0x20(%rsp), %rdx
callq 0x1cb660
movq %rax, 0x10(%rsp)
cmpl $0x0, 0x4c(%rsp)
jne 0x1cd6d5
movq 0x40(%rsp), %rax
movq 0x10(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movq 0x40(%rsp), %rcx
movq 0x18(%rsp), %rdx
cmpl (%rcx,%rdx,4), %eax
je 0x1cd6d3
movq 0x50(%rsp), %rdi
leaq 0x361f51(%rip), %rsi    # 0x52f5fa
leaq 0x395764(%rip), %rdx    # 0x562e14
leaq 0x39574c(%rip), %rcx    # 0x562e03
leaq 0x395715(%rip), %r8     # 0x562dd3
movl $0x28a, %r9d            # imm = 0x28A
movb $0x0, %al
callq 0xd88c0
movl $0xffffffff, 0x4c(%rsp) # imm = 0xFFFFFFFF
jmp 0x1cd6d5
jmp 0x1cd6d7
jmp 0x1cd6d9
movq 0x38(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x38(%rsp)
jmp 0x1cd5fd
movq 0x30(%rsp), %rdi
callq 0x1cd380
movq 0x40(%rsp), %rdi
leaq 0x3956d1(%rip), %rsi    # 0x562dd3
movl $0x28e, %edx            # imm = 0x28E
callq 0xe88c0
movl 0x4c(%rsp), %eax
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)