// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/extended/rmq.c
// Function: gt_rmq_find_min_index
GtUword gt_rmq_find_min_index(const GtRMQ *rmq, GtUword start, GtUword end)
{
  gt_assert(rmq->arr_ptr != NULL && start <= end && end < rmq->n);
  if (start == end)
  {
    return end;
  }
  if (rmq->naive_impl)
  {
    GtRMQvaluetype minval;
    GtUword idx, ret;

    minval = rmq->arr_ptr[start];
    ret = start;
    for (idx = start+1; idx <= end; idx++)
    {
      if (rmq->arr_ptr[idx] < minval)
      {
        ret = idx;
        minval = rmq->arr_ptr[idx];
      }
    }
    return ret;
  } else
  {
    return gt_rmq_find_min_index_fast(rmq,start,end);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
cmpq %rdx, %rsi
ja 0x111f45
movq %rdi, %r15
movq (%rdi), %r12
testq %r12, %r12
je 0x111f45
movq %rdx, %rbx
cmpq %rdx, 0x8(%r15)
jbe 0x111f45
movq %rsi, %r14
cmpq %rbx, %rsi
jne 0x111bec
movq %r14, %rbx
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpb $0x1, 0x60(%r15)
jne 0x111c12
movl (%r12,%r14,4), %eax
leaq 0x1(%r14), %rcx
cmpq %rbx, %rcx
ja 0x111bd7
movl (%r12,%rcx,4), %edx
cmpl %eax, %edx
cmovbl %edx, %eax
cmovbq %rcx, %r14
incq %rcx
jmp 0x111bfb
movq %rbx, %rax
shrq $0x3, %rax
movq %r14, %r10
shrq $0x3, %r10
movq %r14, %rdx
andq $-0x8, %rdx
movl %r14d, %ecx
andl $0x7, %ecx
cmpq %rax, %r10
jne 0x111c70
movq 0x30(%r15), %rsi
movq 0x38(%r15), %rdi
movzwl (%rsi,%rax,2), %eax
movq (%rdi,%rax,8), %rax
movq %rbx, %rsi
movb $-0x1, %dil
shlb %cl, %dil
subq %rdx, %rsi
movzbl (%rax,%rsi), %ecx
movzbl %dil, %eax
andl %ecx, %eax
je 0x111bda
leaq 0x21f64f(%rip), %rcx    # 0x3312b0
movslq (%rcx,%rax,4), %rax
addq %rax, %rdx
movq %rdx, %rbx
jmp 0x111bda
movl %ebx, %r8d
andl $0x7, %r8d
movq 0x30(%r15), %rdi
movq 0x38(%r15), %rsi
movzwl (%rdi,%r10,2), %r9d
movb $-0x1, %r11b
shlb %cl, %r11b
movq (%rsi,%r9,8), %rcx
movzbl 0x7(%rcx), %r9d
movzbl %r11b, %ecx
andl %r9d, %ecx
je 0x111cac
leaq 0x21f60d(%rip), %r9     # 0x3312b0
movslq (%r9,%rcx,4), %r13
addq %rdx, %r13
jmp 0x111cb3
movq %r14, %r13
orq $0x7, %r13
movq %rbx, %rcx
andq $-0x8, %rcx
movzwl (%rdi,%rax,2), %r9d
movq (%rsi,%r9,8), %r9
movzbl (%r9,%r8), %r9d
movq %rbx, %r8
testq %r9, %r9
je 0x111cde
leaq 0x21f5d9(%rip), %r8     # 0x3312b0
movslq (%r8,%r9,4), %r8
addq %rcx, %r8
movl (%r12,%r8,4), %r9d
cmpl (%r12,%r13,4), %r9d
cmovbq %r8, %r13
leaq 0x1(%r10), %r8
cmpq %r8, %rax
jbe 0x111f3d
movq %r14, %r9
andq $-0x10, %r9
movq %rbx, %r8
andq $-0x10, %r8
leaq 0x8(%r9), %r11
cmpq %r14, %r11
jbe 0x111d49
movzwl 0x2(%rdi,%r10,2), %r10d
movq (%rsi,%r10,8), %r10
movzbl 0x7(%r10), %r10d
testq %r10, %r10
je 0x111d36
leaq 0x21f587(%rip), %r11    # 0x3312b0
movslq (%r11,%r10,4), %r10
addq %r10, %rdx
addq $0x8, %rdx
jmp 0x111d3d
movq %r14, %rdx
orq $0xf, %rdx
movl (%r12,%rdx,4), %r10d
cmpl (%r12,%r13,4), %r10d
cmovbq %rdx, %r13
movq %r14, %rbp
shrq $0x4, %rbp
movq %rbx, %r10
shrq $0x4, %r10
movq %r8, %rdx
orq $0x8, %rdx
cmpq %rbx, %rdx
ja 0x111d94
movzwl -0x2(%rdi,%rax,2), %eax
movq (%rsi,%rax,8), %rax
movzbl 0x7(%rax), %eax
testq %rax, %rax
je 0x111d85
leaq 0x21f534(%rip), %rcx    # 0x3312b0
movslq (%rcx,%rax,4), %rcx
addq %r8, %rcx
jmp 0x111d88
decq %rcx
movl (%r12,%rcx,4), %eax
cmpl (%r12,%r13,4), %eax
cmovbq %rcx, %r13
movq %r10, %rdi
subq %rbp, %rdi
cmpq $0x2, %rdi
jb 0x111f3d
movq %r10, 0x8(%rsp)
incq %rbp
subq %r9, %r8
addq $-0x10, %r8
cmpq $0x100, %r8             # imm = 0x100
ja 0x111e04
addq $-0x2, %rdi
movq %rbp, %rbx
callq 0x112864
pushq $-0x1
popq %rbp
movl %eax, %ecx
shlq %cl, %rbp
movq 0x10(%r15), %rcx
movq (%rcx,%rax,8), %rax
movzbl (%rax,%rbx), %ecx
shlq $0x4, %rbx
addq %rcx, %rbx
addq 0x8(%rsp), %rbp
movzbl (%rax,%rbp), %eax
shlq $0x4, %rbp
addq %rax, %rbp
movl (%r12,%rbx,4), %eax
cmpl (%r12,%rbp,4), %eax
cmovbeq %rbx, %rbp
jmp 0x111f31
shrq $0x8, %r14
shrq $0x8, %rbx
leaq 0x1(%r14), %rax
movq %rax, 0x20(%rsp)
shlq $0x4, %rax
movabsq $0xffffffffffffff0, %rdi # imm = 0xFFFFFFFFFFFFFF0
andq %rax, %rdi
movq %rdi, (%rsp)
subq %rbp, %rdi
callq 0x112864
pushq $-0x1
popq %rdx
movl %eax, %ecx
shlq %cl, %rdx
movq 0x10(%r15), %rcx
movq %rcx, 0x18(%rsp)
movq (%rcx,%rax,8), %rax
movzbl (%rax,%rbp), %ecx
shlq $0x4, %rbp
addq %rcx, %rbp
movq (%rsp), %rsi
leaq (%rdx,%rsi), %rcx
incq %rcx
addq %rsi, %rdx
movzbl 0x1(%rax,%rdx), %eax
shlq $0x4, %rcx
addq %rax, %rcx
movl (%r12,%rbp,4), %eax
cmpl (%r12,%rcx,4), %eax
cmovbeq %rbp, %rcx
movq %rcx, (%rsp)
movq 0x8(%rsp), %rdi
movq %rdi, %rax
andq $-0x10, %rax
movq %rax, 0x10(%rsp)
andl $0xf, %edi
callq 0x112864
pushq $-0x1
popq %rbp
movl %eax, %ecx
shlq %cl, %rbp
movq 0x18(%rsp), %rcx
movq (%rcx,%rax,8), %rax
movq 0x10(%rsp), %rdx
movzbl -0x1(%rax,%rdx), %ecx
decq %rdx
shlq $0x4, %rdx
addq %rcx, %rdx
addq 0x8(%rsp), %rbp
movzbl (%rax,%rbp), %eax
shlq $0x4, %rbp
addq %rax, %rbp
movl (%r12,%rdx,4), %eax
cmpl (%r12,%rbp,4), %eax
cmovbeq %rdx, %rbp
movl (%r12,%rbp,4), %eax
movq (%rsp), %rcx
cmpl (%r12,%rcx,4), %eax
cmovaeq %rcx, %rbp
cmpq 0x20(%rsp), %rbx
jbe 0x111f31
movq %rbx, %rdi
subq %r14, %rdi
addq $-0x2, %rdi
callq 0x112864
movl %eax, %ecx
pushq $-0x1
popq %rdx
shlq %cl, %rdx
movq 0x20(%r15), %rcx
movq (%rcx,%rax,8), %rax
movq 0x8(%rax,%r14,8), %rcx
leaq (%rax,%rdx,8), %rax
movq (%rax,%rbx,8), %rax
movl (%r12,%rcx,4), %edx
cmpl (%r12,%rax,4), %edx
cmovaq %rax, %rcx
movl (%r12,%rcx,4), %eax
cmpl (%r12,%rbp,4), %eax
cmovbq %rcx, %rbp
movl (%r12,%rbp,4), %eax
cmpl (%r12,%r13,4), %eax
cmovbq %rbp, %r13
movq %r13, %rbx
jmp 0x111bda
movq 0x32601c(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1d30bd(%rip), %rsi    # 0x2e5013
leaq 0x21e94a(%rip), %rdx    # 0x3308a7
leaq 0x21e978(%rip), %rcx    # 0x3308dc
leaq 0x21e987(%rip), %r8     # 0x3308f2
movl $0x141, %r9d            # imm = 0x141
xorl %eax, %eax
callq 0x17a50
callq 0x17390