// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/rmq.c
// Function: gt_rmq_find_min_index_fast
static GtUword gt_rmq_find_min_index_fast(const GtRMQ *rmq, GtUword start,
                                          GtUword end)
{
  GtUword i = start,
                j = end,
                mb_i,               /* i's microblock */
                mb_j,               /* j's microblock */
                min, min_i, min_j,  /* min: to be returned */
                s_mi,               /* start of i's microblock */
                i_pos;              /* pos. of i in its microblock */

  mb_j = gt_rmq_microblock(j);
  mb_i = gt_rmq_microblock(i);
  s_mi = GT_RMQ_MUL_microblocksize(mb_i);
  i_pos = i - s_mi;
  if (mb_i == mb_j)
  { /* only one microblock-query */
    min_i = gt_rmq_clearbits(rmq->Prec[rmq->type[mb_i]][j-s_mi], i_pos);
    min = min_i == 0 ? j : s_mi + gt_least_significant_bit(min_i);
  } else
  {
    GtUword b_i = gt_rmq_block(i);   /* i's block */
    GtUword b_j = gt_rmq_block(j);   /* j's block */
    GtUword s_mj
      = GT_RMQ_MUL_microblocksize(mb_j); /* start of j's microblock */
    GtUword j_pos = j - s_mj;      /* position of j in its microblock */
    GtUword block_difference;
    min_i = gt_rmq_clearbits(rmq->Prec[rmq->type[mb_i]]
                                      [GT_RMQ_microblocksize - 1],
                             i_pos);
    /* left in-microblock-query */
    min = min_i == 0 ? s_mi + GT_RMQ_microblocksize - 1
                     : s_mi + gt_least_significant_bit(min_i);
    /* right in-microblock-query */
    min_j
      = rmq->Prec[rmq->type[mb_j]][j_pos] == 0
          ? j
          : s_mj + gt_least_significant_bit(rmq->Prec[rmq->type[mb_j]][j_pos]);
    if (rmq->arr_ptr[min_j] < rmq->arr_ptr[min]) min = min_j;

    if (mb_j > mb_i + 1)
     { /* otherwise we're done! */
      GtUword s_bi = GT_RMQ_MUL_blocksize(b_i);  /* start of block i */
      GtUword s_bj = GT_RMQ_MUL_blocksize(b_j);  /* start of block j */
      if (s_bi + GT_RMQ_microblocksize > i)
      { /* do another microblock-query! */
        mb_i++; /* go one microblock to the right */
        min_i = rmq->Prec[rmq->type[mb_i]][GT_RMQ_microblocksize - 1] == 0 ?
          s_bi + GT_RMQ_blocksize - 1 :
          s_mi + GT_RMQ_microblocksize +
                 gt_least_significant_bit(
                     rmq->Prec[rmq->type[mb_i]][GT_RMQ_microblocksize-1]);
                  /* right in-block query */
        if (rmq->arr_ptr[min_i] < rmq->arr_ptr[min]) min = min_i;
      }
      if (j >= s_bj + GT_RMQ_microblocksize)
      {
        /* and yet another microblock-query! */
        mb_j--; /* go one microblock to the left */
        min_j = rmq->Prec[rmq->type[mb_j]][GT_RMQ_microblocksize-1] == 0 ?
          s_mj - 1 :
          s_bj + gt_least_significant_bit(
                        rmq->Prec[rmq->type[mb_j]][GT_RMQ_microblocksize-1]);
               /* right in-block query */
        if (rmq->arr_ptr[min_j] < rmq->arr_ptr[min]) min = min_j;
      }

      block_difference = b_j - b_i;
      if (block_difference > 1UL)
      { /* otherwise we're done! */
        GtUword k, twotothek, block_tmp;  /* for index calculations in
                                                   M and M' */
        b_i++; /* block where out-of-block-query starts */
        if (s_bj - s_bi - GT_RMQ_blocksize <= GT_RMQ_superblocksize)
        { /* just one out-of-block query */
          k = gt_rmq_log2fast(block_difference - 2);
          twotothek = (GtUword) 1 << k; /* 2^k */
          i = gt_rmq_trueindex(rmq, k, b_i);
          j = gt_rmq_trueindex(rmq, k, b_j-twotothek);
          min_i = rmq->arr_ptr[i] <= rmq->arr_ptr[j] ? i : j;
        } else
        { /* here we have to answer a superblock-query: */
          GtUword sb_i = gt_rmq_superblock(i); /* i's superblock */
          GtUword sb_j = gt_rmq_superblock(j); /* j's superblock */

          /* end of left out-of-block query */
          block_tmp = gt_rmq_block(GT_RMQ_MUL_superblocksize(sb_i+1));
          k = gt_rmq_log2fast(block_tmp - b_i);
          twotothek = (GtUword) 1 << k; /* 2^k */
          i = gt_rmq_trueindex(rmq, k, b_i);
          j = gt_rmq_trueindex(rmq, k, block_tmp+1-twotothek);
          min_i = rmq->arr_ptr[i] <= rmq->arr_ptr[j] ? i : j;

          /* start of right out-of-block query */
          block_tmp = gt_rmq_block(GT_RMQ_MUL_superblocksize(sb_j));
          k = gt_rmq_log2fast(b_j - block_tmp);
          twotothek = (GtUword) 1 << k; /* 2^k */
          block_tmp--; /* going one block to the left doesn't harm
                           and saves some tests */
          i = gt_rmq_trueindex(rmq, k, block_tmp);
          j = gt_rmq_trueindex(rmq, k, b_j-twotothek);
          min_j = rmq->arr_ptr[i] <= rmq->arr_ptr[j] ? i : j;

          if (rmq->arr_ptr[min_j] < rmq->arr_ptr[min_i]) min_i = min_j;

          if (sb_j > sb_i + 1)
          { /* finally, the superblock-query: */
            k = gt_rmq_log2fast(sb_j - sb_i - 2);
            twotothek = (GtUword) 1 << k;
            i = rmq->Mprime[k][sb_i+1];
            j = rmq->Mprime[k][sb_j-twotothek];
            min_j = rmq->arr_ptr[i] <= rmq->arr_ptr[j] ? i : j;
            if (rmq->arr_ptr[min_j] < rmq->arr_ptr[min_i])
              min_i = min_j; /* does NOT always return leftmost min! */
          }
        }
        if (rmq->arr_ptr[min_i] < rmq->arr_ptr[min])
          min = min_i; /* does NOT always return leftmost min!!! */
      }
    }
  }
  return min;
}

// Assembly:
subq $0x138, %rsp            # imm = 0x138
movq %rdi, 0x130(%rsp)
movq %rsi, 0x128(%rsp)
movq %rdx, 0x120(%rsp)
movq 0x128(%rsp), %rax
movq %rax, 0x118(%rsp)
movq 0x120(%rsp), %rax
movq %rax, 0x110(%rsp)
movq 0x110(%rsp), %rdi
callq 0x1cd250
movq %rax, 0x100(%rsp)
movq 0x118(%rsp), %rdi
callq 0x1cd250
movq %rax, 0x108(%rsp)
movq 0x108(%rsp), %rax
shlq $0x3, %rax
movq %rax, 0xe0(%rsp)
movq 0x118(%rsp), %rax
subq 0xe0(%rsp), %rax
movq %rax, 0xd8(%rsp)
movq 0x108(%rsp), %rax
cmpq 0x100(%rsp), %rax
jne 0x1cb907
movq 0x130(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x130(%rsp), %rcx
movq 0x30(%rcx), %rcx
movq 0x108(%rsp), %rdx
movzwl (%rcx,%rdx,2), %ecx
movq (%rax,%rcx,8), %rax
movq 0x110(%rsp), %rcx
subq 0xe0(%rsp), %rcx
movb (%rax,%rcx), %al
movq 0xd8(%rsp), %rsi
movzbl %al, %edi
callq 0x1cd820
movzbl %al, %eax
movq %rax, 0xf0(%rsp)
cmpq $0x0, 0xf0(%rsp)
jne 0x1cb8cb
movq 0x110(%rsp), %rax
movq %rax, 0x70(%rsp)
jmp 0x1cb8f5
movq 0xe0(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0xf0(%rsp), %rdi
callq 0x1cd850
movq %rax, %rcx
movq 0x68(%rsp), %rax
addq %rcx, %rax
movq %rax, 0x70(%rsp)
movq 0x70(%rsp), %rax
movq %rax, 0xf8(%rsp)
jmp 0x1cc286
movq 0x118(%rsp), %rdi
callq 0x1cd230
movq %rax, 0xd0(%rsp)
movq 0x110(%rsp), %rdi
callq 0x1cd230
movq %rax, 0xc8(%rsp)
movq 0x100(%rsp), %rax
shlq $0x3, %rax
movq %rax, 0xc0(%rsp)
movq 0x110(%rsp), %rax
subq 0xc0(%rsp), %rax
movq %rax, 0xb8(%rsp)
movq 0x130(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x130(%rsp), %rcx
movq 0x30(%rcx), %rcx
movq 0x108(%rsp), %rdx
movzwl (%rcx,%rdx,2), %ecx
movq (%rax,%rcx,8), %rax
movb 0x7(%rax), %al
movq 0xd8(%rsp), %rsi
movzbl %al, %edi
callq 0x1cd820
movzbl %al, %eax
movq %rax, 0xf0(%rsp)
cmpq $0x0, 0xf0(%rsp)
jne 0x1cb9c5
movq 0xe0(%rsp), %rax
addq $0x8, %rax
subq $0x1, %rax
movq %rax, 0x60(%rsp)
jmp 0x1cb9ef
movq 0xe0(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0xf0(%rsp), %rdi
callq 0x1cd850
movq %rax, %rcx
movq 0x58(%rsp), %rax
addq %rcx, %rax
movq %rax, 0x60(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0xf8(%rsp)
movq 0x130(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x130(%rsp), %rcx
movq 0x30(%rcx), %rcx
movq 0x100(%rsp), %rdx
movzwl (%rcx,%rdx,2), %ecx
movq (%rax,%rcx,8), %rax
movq 0xb8(%rsp), %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x0, %eax
jne 0x1cba44
movq 0x110(%rsp), %rax
movq %rax, 0x50(%rsp)
jmp 0x1cba9c
movq 0xc0(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x130(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x130(%rsp), %rcx
movq 0x30(%rcx), %rcx
movq 0x100(%rsp), %rdx
movzwl (%rcx,%rdx,2), %ecx
movq (%rax,%rcx,8), %rax
movq 0xb8(%rsp), %rcx
movzbl (%rax,%rcx), %eax
movl %eax, %edi
callq 0x1cd850
movq %rax, %rcx
movq 0x48(%rsp), %rax
addq %rcx, %rax
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0xe8(%rsp)
movq 0x130(%rsp), %rax
movq (%rax), %rax
movq 0xe8(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movq 0x130(%rsp), %rcx
movq (%rcx), %rcx
movq 0xf8(%rsp), %rdx
cmpl (%rcx,%rdx,4), %eax
jae 0x1cbae7
movq 0xe8(%rsp), %rax
movq %rax, 0xf8(%rsp)
movq 0x100(%rsp), %rax
movq 0x108(%rsp), %rcx
addq $0x1, %rcx
cmpq %rcx, %rax
jbe 0x1cc284
movq 0xd0(%rsp), %rax
shlq $0x4, %rax
movq %rax, 0xa8(%rsp)
movq 0xc8(%rsp), %rax
shlq $0x4, %rax
movq %rax, 0xa0(%rsp)
movq 0xa8(%rsp), %rax
addq $0x8, %rax
cmpq 0x118(%rsp), %rax
jbe 0x1cbc43
movq 0x108(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x108(%rsp)
movq 0x130(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x130(%rsp), %rcx
movq 0x30(%rcx), %rcx
movq 0x108(%rsp), %rdx
movzwl (%rcx,%rdx,2), %ecx
movq (%rax,%rcx,8), %rax
movzbl 0x7(%rax), %eax
cmpl $0x0, %eax
jne 0x1cbba2
movq 0xa8(%rsp), %rax
addq $0x10, %rax
subq $0x1, %rax
movq %rax, 0x40(%rsp)
jmp 0x1cbbf6
movq 0xe0(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x38(%rsp)
movq 0x130(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x130(%rsp), %rcx
movq 0x30(%rcx), %rcx
movq 0x108(%rsp), %rdx
movzwl (%rcx,%rdx,2), %ecx
movq (%rax,%rcx,8), %rax
movzbl 0x7(%rax), %eax
movl %eax, %edi
callq 0x1cd850
movq %rax, %rcx
movq 0x38(%rsp), %rax
addq %rcx, %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0xf0(%rsp)
movq 0x130(%rsp), %rax
movq (%rax), %rax
movq 0xf0(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movq 0x130(%rsp), %rcx
movq (%rcx), %rcx
movq 0xf8(%rsp), %rdx
cmpl (%rcx,%rdx,4), %eax
jae 0x1cbc41
movq 0xf0(%rsp), %rax
movq %rax, 0xf8(%rsp)
jmp 0x1cbc43
movq 0x110(%rsp), %rax
movq 0xa0(%rsp), %rcx
addq $0x8, %rcx
cmpq %rcx, %rax
jb 0x1cbd55
movq 0x100(%rsp), %rax
addq $-0x1, %rax
movq %rax, 0x100(%rsp)
movq 0x130(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x130(%rsp), %rcx
movq 0x30(%rcx), %rcx
movq 0x100(%rsp), %rdx
movzwl (%rcx,%rdx,2), %ecx
movq (%rax,%rcx,8), %rax
movzbl 0x7(%rax), %eax
cmpl $0x0, %eax
jne 0x1cbcb8
movq 0xc0(%rsp), %rax
subq $0x1, %rax
movq %rax, 0x30(%rsp)
jmp 0x1cbd08
movq 0xa0(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x130(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x130(%rsp), %rcx
movq 0x30(%rcx), %rcx
movq 0x100(%rsp), %rdx
movzwl (%rcx,%rdx,2), %ecx
movq (%rax,%rcx,8), %rax
movzbl 0x7(%rax), %eax
movl %eax, %edi
callq 0x1cd850
movq %rax, %rcx
movq 0x28(%rsp), %rax
addq %rcx, %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0xe8(%rsp)
movq 0x130(%rsp), %rax
movq (%rax), %rax
movq 0xe8(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movq 0x130(%rsp), %rcx
movq (%rcx), %rcx
movq 0xf8(%rsp), %rdx
cmpl (%rcx,%rdx,4), %eax
jae 0x1cbd53
movq 0xe8(%rsp), %rax
movq %rax, 0xf8(%rsp)
jmp 0x1cbd55
movq 0xc8(%rsp), %rax
subq 0xd0(%rsp), %rax
movq %rax, 0xb0(%rsp)
cmpq $0x1, 0xb0(%rsp)
jbe 0x1cc282
movq 0xd0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xd0(%rsp)
movq 0xa0(%rsp), %rax
subq 0xa8(%rsp), %rax
subq $0x10, %rax
cmpq $0x100, %rax            # imm = 0x100
ja 0x1cbe8f
movq 0xb0(%rsp), %rdi
subq $0x2, %rdi
callq 0x1cd870
movq %rax, 0x98(%rsp)
movq 0x98(%rsp), %rcx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, 0x90(%rsp)
movq 0x130(%rsp), %rdi
movq 0x98(%rsp), %rsi
movq 0xd0(%rsp), %rdx
callq 0x1cd2f0
movq %rax, 0x118(%rsp)
movq 0x130(%rsp), %rdi
movq 0x98(%rsp), %rsi
movq 0xc8(%rsp), %rdx
subq 0x90(%rsp), %rdx
callq 0x1cd2f0
movq %rax, 0x110(%rsp)
movq 0x130(%rsp), %rax
movq (%rax), %rax
movq 0x118(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movq 0x130(%rsp), %rcx
movq (%rcx), %rcx
movq 0x110(%rsp), %rdx
cmpl (%rcx,%rdx,4), %eax
ja 0x1cbe70
movq 0x118(%rsp), %rax
movq %rax, 0x20(%rsp)
jmp 0x1cbe7d
movq 0x110(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0xf0(%rsp)
jmp 0x1cc242
movq 0x118(%rsp), %rdi
callq 0x1cd240
movq %rax, 0x80(%rsp)
movq 0x110(%rsp), %rdi
callq 0x1cd240
movq %rax, 0x78(%rsp)
movq 0x80(%rsp), %rdi
addq $0x1, %rdi
shlq $0x8, %rdi
callq 0x1cd230
movq %rax, 0x88(%rsp)
movq 0x88(%rsp), %rdi
subq 0xd0(%rsp), %rdi
callq 0x1cd870
movq %rax, 0x98(%rsp)
movq 0x98(%rsp), %rcx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, 0x90(%rsp)
movq 0x130(%rsp), %rdi
movq 0x98(%rsp), %rsi
movq 0xd0(%rsp), %rdx
callq 0x1cd2f0
movq %rax, 0x118(%rsp)
movq 0x130(%rsp), %rdi
movq 0x98(%rsp), %rsi
movq 0x88(%rsp), %rdx
addq $0x1, %rdx
subq 0x90(%rsp), %rdx
callq 0x1cd2f0
movq %rax, 0x110(%rsp)
movq 0x130(%rsp), %rax
movq (%rax), %rax
movq 0x118(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movq 0x130(%rsp), %rcx
movq (%rcx), %rcx
movq 0x110(%rsp), %rdx
cmpl (%rcx,%rdx,4), %eax
ja 0x1cbf9b
movq 0x118(%rsp), %rax
movq %rax, 0x18(%rsp)
jmp 0x1cbfa8
movq 0x110(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0xf0(%rsp)
movq 0x78(%rsp), %rdi
shlq $0x8, %rdi
callq 0x1cd230
movq %rax, 0x88(%rsp)
movq 0xc8(%rsp), %rdi
subq 0x88(%rsp), %rdi
callq 0x1cd870
movq %rax, 0x98(%rsp)
movq 0x98(%rsp), %rcx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, 0x90(%rsp)
movq 0x88(%rsp), %rax
addq $-0x1, %rax
movq %rax, 0x88(%rsp)
movq 0x130(%rsp), %rdi
movq 0x98(%rsp), %rsi
movq 0x88(%rsp), %rdx
callq 0x1cd2f0
movq %rax, 0x118(%rsp)
movq 0x130(%rsp), %rdi
movq 0x98(%rsp), %rsi
movq 0xc8(%rsp), %rdx
subq 0x90(%rsp), %rdx
callq 0x1cd2f0
movq %rax, 0x110(%rsp)
movq 0x130(%rsp), %rax
movq (%rax), %rax
movq 0x118(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movq 0x130(%rsp), %rcx
movq (%rcx), %rcx
movq 0x110(%rsp), %rdx
cmpl (%rcx,%rdx,4), %eax
ja 0x1cc0a3
movq 0x118(%rsp), %rax
movq %rax, 0x10(%rsp)
jmp 0x1cc0b0
movq 0x110(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0xe8(%rsp)
movq 0x130(%rsp), %rax
movq (%rax), %rax
movq 0xe8(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movq 0x130(%rsp), %rcx
movq (%rcx), %rcx
movq 0xf0(%rsp), %rdx
cmpl (%rcx,%rdx,4), %eax
jae 0x1cc0fb
movq 0xe8(%rsp), %rax
movq %rax, 0xf0(%rsp)
movq 0x78(%rsp), %rax
movq 0x80(%rsp), %rcx
addq $0x1, %rcx
cmpq %rcx, %rax
jbe 0x1cc240
movq 0x78(%rsp), %rdi
subq 0x80(%rsp), %rdi
subq $0x2, %rdi
callq 0x1cd870
movq %rax, 0x98(%rsp)
movq 0x98(%rsp), %rcx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, 0x90(%rsp)
movq 0x130(%rsp), %rax
movq 0x20(%rax), %rax
movq 0x98(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x80(%rsp), %rcx
movq 0x8(%rax,%rcx,8), %rax
movq %rax, 0x118(%rsp)
movq 0x130(%rsp), %rax
movq 0x20(%rax), %rax
movq 0x98(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x78(%rsp), %rcx
subq 0x90(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x110(%rsp)
movq 0x130(%rsp), %rax
movq (%rax), %rax
movq 0x118(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movq 0x130(%rsp), %rcx
movq (%rcx), %rcx
movq 0x110(%rsp), %rdx
cmpl (%rcx,%rdx,4), %eax
ja 0x1cc1e6
movq 0x118(%rsp), %rax
movq %rax, 0x8(%rsp)
jmp 0x1cc1f3
movq 0x110(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0xe8(%rsp)
movq 0x130(%rsp), %rax
movq (%rax), %rax
movq 0xe8(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movq 0x130(%rsp), %rcx
movq (%rcx), %rcx
movq 0xf0(%rsp), %rdx
cmpl (%rcx,%rdx,4), %eax
jae 0x1cc23e
movq 0xe8(%rsp), %rax
movq %rax, 0xf0(%rsp)
jmp 0x1cc240
jmp 0x1cc242
movq 0x130(%rsp), %rax
movq (%rax), %rax
movq 0xf0(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movq 0x130(%rsp), %rcx
movq (%rcx), %rcx
movq 0xf8(%rsp), %rdx
cmpl (%rcx,%rdx,4), %eax
jae 0x1cc280
movq 0xf0(%rsp), %rax
movq %rax, 0xf8(%rsp)
jmp 0x1cc282
jmp 0x1cc284
jmp 0x1cc286
movq 0xf8(%rsp), %rax
addq $0x138, %rsp            # imm = 0x138
retq
nopw %cs:(%rax,%rax)