// File: /workspace/github_c_makefile_star2_O3/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
pushq %rax
cmpq %rdx, %rsi
ja 0x16f43b
movq (%rdi), %rax
testq %rax, %rax
je 0x16f43b
cmpq %rdx, 0x8(%rdi)
jbe 0x16f43b
cmpq %rdx, %rsi
jne 0x16efd1
movq %rsi, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpb $0x1, 0x60(%rdi)
jne 0x16effc
leaq 0x1(%rsi), %rcx
cmpq %rdx, %rcx
ja 0x16efbf
movl (%rax,%rsi,4), %edi
movl (%rax,%rcx,4), %r8d
cmpl %edi, %r8d
cmovbl %r8d, %edi
cmovbq %rcx, %rsi
incq %rcx
cmpq %rdx, %rcx
jbe 0x16efe3
jmp 0x16efbf
movq %rdx, %r11
shrq $0x3, %r11
movq %rsi, %r10
shrq $0x3, %r10
movq %rsi, %r9
andq $-0x8, %r9
movl %esi, %ecx
andl $0x7, %ecx
cmpq %r11, %r10
jne 0x16f061
movq 0x30(%rdi), %rax
movq 0x38(%rdi), %rsi
movzwl (%rax,%r11,2), %eax
movq (%rsi,%rax,8), %rax
movq %rdx, %rsi
subq %r9, %rsi
movb $-0x1, %dil
shlb %cl, %dil
movzbl (%rax,%rsi), %ecx
movzbl %dil, %eax
movq %rdx, %rsi
andl %ecx, %eax
je 0x16efbf
leaq 0x221f1e(%rip), %rcx    # 0x390f70
movslq (%rcx,%rax,4), %rax
addq %rax, %r9
movq %r9, %rsi
jmp 0x16efbf
movl %edx, %r15d
andl $0x7, %r15d
movq 0x30(%rdi), %r14
movq 0x38(%rdi), %rbx
movzwl (%r14,%r10,2), %r8d
movb $-0x1, %bpl
shlb %cl, %bpl
movq (%rbx,%r8,8), %rcx
movzbl 0x7(%rcx), %r8d
movzbl %bpl, %ecx
andl %r8d, %ecx
je 0x16f09d
leaq 0x221edc(%rip), %r8     # 0x390f70
movslq (%r8,%rcx,4), %r8
addq %r9, %r8
jmp 0x16f0a4
movq %rsi, %r8
orq $0x7, %r8
movq %rdx, %rcx
andq $-0x8, %rcx
movzwl (%r14,%r11,2), %r12d
movq (%rbx,%r12,8), %r12
movzbl (%r12,%r15), %r12d
movq %rdx, %r15
testq %r12, %r12
je 0x16f0cf
leaq 0x221ea8(%rip), %r15    # 0x390f70
movslq (%r15,%r12,4), %r15
addq %rcx, %r15
movl (%rax,%r15,4), %ebp
cmpl (%rax,%r8,4), %ebp
cmovbq %r15, %r8
leaq 0x1(%r10), %r15
cmpq %r15, %r11
jbe 0x16f433
movq %rsi, %r12
andq $-0x10, %r12
movq %rdx, %r15
andq $-0x10, %r15
leaq 0x8(%r12), %r13
cmpq %rsi, %r13
jbe 0x16f13c
movzwl 0x2(%r14,%r10,2), %r10d
movq (%rbx,%r10,8), %r10
movzbl 0x7(%r10), %r10d
testq %r10, %r10
je 0x16f129
leaq 0x221e55(%rip), %r13    # 0x390f70
movslq (%r13,%r10,4), %r10
addq %r10, %r9
addq $0x8, %r9
jmp 0x16f130
movq %rsi, %r9
orq $0xf, %r9
movl (%rax,%r9,4), %r10d
cmpl (%rax,%r8,4), %r10d
cmovbq %r9, %r8
movq %rsi, %r10
shrq $0x4, %r10
movq %rdx, %r9
shrq $0x4, %r9
movq %r15, %r13
orq $0x8, %r13
cmpq %rdx, %r13
ja 0x16f189
movzwl -0x2(%r14,%r11,2), %r11d
movq (%rbx,%r11,8), %r11
movzbl 0x7(%r11), %r11d
testq %r11, %r11
je 0x16f17a
leaq 0x221dff(%rip), %rcx    # 0x390f70
movslq (%rcx,%r11,4), %rcx
addq %r15, %rcx
jmp 0x16f17d
decq %rcx
movl (%rax,%rcx,4), %r11d
cmpl (%rax,%r8,4), %r11d
cmovbq %rcx, %r8
movq %r9, %rcx
subq %r10, %rcx
cmpq $0x2, %rcx
jb 0x16f433
incq %r10
subq %r12, %r15
addq $-0x10, %r15
cmpq $0x100, %r15            # imm = 0x100
ja 0x16f1d7
addq $-0x2, %rcx
cmpq $0x10000, %rcx          # imm = 0x10000
jae 0x16f220
cmpq $0x100, %rcx            # imm = 0x100
jae 0x16f265
leaq 0x2221a3(%rip), %rdx    # 0x391370
movsbq (%rcx,%rdx), %rcx
jmp 0x16f2a5
movabsq $0xffffffffffffff0, %r14 # imm = 0xFFFFFFFFFFFFFF0
shrq $0x8, %rsi
shrq $0x8, %rdx
leaq 0x1(%rsi), %rbx
movq %rbx, %r15
shlq $0x4, %r15
andq %r14, %r15
movq %r15, %rcx
subq %r10, %rcx
cmpq $0x10000, %rcx          # imm = 0x10000
jae 0x16f23f
cmpq $0x100, %rcx            # imm = 0x100
jae 0x16f27b
leaq 0x22215a(%rip), %r11    # 0x391370
movsbq (%rcx,%r11), %rcx
jmp 0x16f2f7
cmpq $0x1000000, %rcx        # imm = 0x1000000
jae 0x16f291
shrq $0x10, %rcx
leaq 0x22213c(%rip), %rdx    # 0x391370
movsbq (%rcx,%rdx), %rcx
addq $0x10, %rcx
jmp 0x16f2a5
cmpq $0x1000000, %rcx        # imm = 0x1000000
jae 0x16f2e3
shrq $0x10, %rcx
leaq 0x222119(%rip), %r11    # 0x391370
movsbq (%rcx,%r11), %rcx
addq $0x10, %rcx
jmp 0x16f2f7
shrq $0x8, %rcx
leaq 0x222100(%rip), %rdx    # 0x391370
movsbq (%rcx,%rdx), %rcx
addq $0x8, %rcx
jmp 0x16f2a5
shrq $0x8, %rcx
leaq 0x2220ea(%rip), %r11    # 0x391370
movsbq (%rcx,%r11), %rcx
addq $0x8, %rcx
jmp 0x16f2f7
shrq $0x18, %rcx
leaq 0x2220d4(%rip), %rdx    # 0x391370
movsbq (%rcx,%rdx), %rcx
addq $0x18, %rcx
movq $-0x1, %r11
shlq %cl, %r11
movq 0x10(%rdi), %rdx
movq (%rdx,%rcx,8), %rcx
movzbl (%rcx,%r10), %edx
shlq $0x4, %r10
addq %rdx, %r10
addq %r9, %r11
movzbl (%rcx,%r11), %ecx
shlq $0x4, %r11
addq %rcx, %r11
movl (%rax,%r10,4), %ecx
cmpl (%rax,%r11,4), %ecx
cmovbeq %r10, %r11
jmp 0x16f427
shrq $0x18, %rcx
leaq 0x222082(%rip), %r11    # 0x391370
movsbq (%rcx,%r11), %rcx
addq $0x18, %rcx
movq $-0x1, %r11
movq $-0x1, %rbp
shlq %cl, %rbp
movq 0x10(%rdi), %r13
movq (%r13,%rcx,8), %rcx
movzbl (%rcx,%r10), %r12d
shlq $0x4, %r10
addq %r12, %r10
leaq (%r15,%rbp), %r12
incq %r12
addq %r15, %rbp
movzbl 0x1(%rcx,%rbp), %ecx
shlq $0x4, %r12
addq %rcx, %r12
movl (%rax,%r10,4), %ecx
cmpl (%rax,%r12,4), %ecx
cmovbeq %r10, %r12
andq %r9, %r14
movl %r9d, %ecx
andl $0xf, %ecx
leaq 0x222021(%rip), %r10    # 0x391370
movsbq (%rcx,%r10), %rcx
shlq %cl, %r11
movq (%r13,%rcx,8), %rcx
movzbl -0x1(%rcx,%r14), %r15d
decq %r14
shlq $0x4, %r14
addq %r15, %r14
addq %r9, %r11
movzbl (%rcx,%r11), %ecx
shlq $0x4, %r11
addq %rcx, %r11
movl (%rax,%r14,4), %ecx
cmpl (%rax,%r11,4), %ecx
cmovbeq %r14, %r11
movl (%rax,%r11,4), %ecx
cmpl (%rax,%r12,4), %ecx
cmovaeq %r12, %r11
cmpq %rbx, %rdx
jbe 0x16f427
movq %rdx, %rcx
subq %rsi, %rcx
addq $-0x2, %rcx
cmpq $0x10000, %rcx          # imm = 0x10000
jae 0x16f3bf
cmpq $0x100, %rcx            # imm = 0x100
jae 0x16f3d7
movsbq (%rcx,%r10), %rcx
jmp 0x16f3f3
cmpq $0x1000000, %rcx        # imm = 0x1000000
jae 0x16f3e6
shrq $0x10, %rcx
movsbq (%rcx,%r10), %rcx
addq $0x10, %rcx
jmp 0x16f3f3
shrq $0x8, %rcx
movsbq (%rcx,%r10), %rcx
addq $0x8, %rcx
jmp 0x16f3f3
shrq $0x18, %rcx
movsbq (%rcx,%r10), %rcx
addq $0x18, %rcx
movq $-0x1, %r9
shlq %cl, %r9
movq 0x20(%rdi), %rdi
movq (%rdi,%rcx,8), %rcx
movq 0x8(%rcx,%rsi,8), %rsi
leaq (%rcx,%r9,8), %rcx
movq (%rcx,%rdx,8), %rcx
movl (%rax,%rsi,4), %edx
cmpl (%rax,%rcx,4), %edx
cmovaq %rcx, %rsi
movl (%rax,%rsi,4), %ecx
cmpl (%rax,%r11,4), %ecx
cmovbq %rsi, %r11
movl (%rax,%r11,4), %ecx
cmpl (%rax,%r8,4), %ecx
cmovbq %r11, %r8
movq %r8, %rsi
jmp 0x16efbf
callq 0x523b6