// File: /workspace/github_c_makefile_star2_O1/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 0x1777ca
movq (%rdi), %rax
testq %rax, %rax
je 0x1777ca
cmpq %rdx, 0x8(%rdi)
jbe 0x1777ca
cmpq %rdx, %rsi
jne 0x177360
movq %rdx, %rsi
movq %rsi, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpb $0x1, 0x60(%rdi)
jne 0x17738b
leaq 0x1(%rsi), %rcx
cmpq %rdx, %rcx
ja 0x17734e
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 0x177372
jmp 0x17734e
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 0x1773f0
movq 0x30(%rdi), %rax
movq 0x38(%rdi), %rsi
movzwl (%rax,%r10,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 0x17734e
leaq 0x222faf(%rip), %rcx    # 0x39a390
movslq (%rcx,%rax,4), %rax
addq %rax, %r9
movq %r9, %rsi
jmp 0x17734e
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 0x17742c
leaq 0x222f6d(%rip), %r8     # 0x39a390
movslq (%r8,%rcx,4), %r8
addq %r9, %r8
jmp 0x177433
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 0x17745e
leaq 0x222f39(%rip), %r15    # 0x39a390
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 0x1777c2
movq %rsi, %r12
andq $-0x10, %r12
movq %rdx, %r15
andq $-0x10, %r15
leaq 0x8(%r12), %r13
cmpq %rsi, %r13
jbe 0x1774cb
movzwl 0x2(%r14,%r10,2), %r10d
movq (%rbx,%r10,8), %r10
movzbl 0x7(%r10), %r10d
testq %r10, %r10
je 0x1774b8
leaq 0x222ee6(%rip), %r13    # 0x39a390
movslq (%r13,%r10,4), %r10
addq %r10, %r9
addq $0x8, %r9
jmp 0x1774bf
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 0x177518
movzwl -0x2(%r14,%r11,2), %r11d
movq (%rbx,%r11,8), %r11
movzbl 0x7(%r11), %r11d
testq %r11, %r11
je 0x177509
leaq 0x222e90(%rip), %rcx    # 0x39a390
movslq (%rcx,%r11,4), %rcx
addq %r15, %rcx
jmp 0x17750c
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 0x1777c2
incq %r10
subq %r12, %r15
addq $-0x10, %r15
cmpq $0x100, %r15            # imm = 0x100
ja 0x177566
addq $-0x2, %rcx
cmpq $0x10000, %rcx          # imm = 0x10000
jae 0x1775af
cmpq $0x100, %rcx            # imm = 0x100
jae 0x1775f4
leaq 0x223234(%rip), %rdx    # 0x39a790
movsbq (%rcx,%rdx), %rcx
jmp 0x177634
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 0x1775ce
cmpq $0x100, %rcx            # imm = 0x100
jae 0x17760a
leaq 0x2231eb(%rip), %r11    # 0x39a790
movsbq (%rcx,%r11), %rcx
jmp 0x177686
cmpq $0x1000000, %rcx        # imm = 0x1000000
jae 0x177620
shrq $0x10, %rcx
leaq 0x2231cd(%rip), %rdx    # 0x39a790
movsbq (%rcx,%rdx), %rcx
addq $0x10, %rcx
jmp 0x177634
cmpq $0x1000000, %rcx        # imm = 0x1000000
jae 0x177672
shrq $0x10, %rcx
leaq 0x2231aa(%rip), %r11    # 0x39a790
movsbq (%rcx,%r11), %rcx
addq $0x10, %rcx
jmp 0x177686
shrq $0x8, %rcx
leaq 0x223191(%rip), %rdx    # 0x39a790
movsbq (%rcx,%rdx), %rcx
addq $0x8, %rcx
jmp 0x177634
shrq $0x8, %rcx
leaq 0x22317b(%rip), %r11    # 0x39a790
movsbq (%rcx,%r11), %rcx
addq $0x8, %rcx
jmp 0x177686
shrq $0x18, %rcx
leaq 0x223165(%rip), %rdx    # 0x39a790
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 0x1777b6
shrq $0x18, %rcx
leaq 0x223113(%rip), %r11    # 0x39a790
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 0x2230b2(%rip), %r10    # 0x39a790
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 0x1777b6
movq %rdx, %rcx
subq %rsi, %rcx
addq $-0x2, %rcx
cmpq $0x10000, %rcx          # imm = 0x10000
jae 0x17774e
cmpq $0x100, %rcx            # imm = 0x100
jae 0x177766
movsbq (%rcx,%r10), %rcx
jmp 0x177782
cmpq $0x1000000, %rcx        # imm = 0x1000000
jae 0x177775
shrq $0x10, %rcx
movsbq (%rcx,%r10), %rcx
addq $0x10, %rcx
jmp 0x177782
shrq $0x8, %rcx
movsbq (%rcx,%r10), %rcx
addq $0x8, %rcx
jmp 0x177782
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 0x17734e
callq 0x532e4