// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/bcktab.c
// Function: gt_bcktab_findfirstlarger
GtCodetype gt_bcktab_findfirstlarger(const GtBcktab *bcktab,
                                     GtCodetype mincode,
                                     GtCodetype maxcode,
                                     GtUword suftaboffset)
{
  GtCodetype left, right, found, offset;
  GT_UNUSED bool found_defined = false;

  if (mincode <= maxcode)
  {
    if (mincode == maxcode)
    {
      return mincode;
    }
    gt_assert(mincode < maxcode);
    left = mincode;
    right = maxcode;
    if (mincode > 0)
    {
      offset = gt_bcktab_get_leftborder(bcktab,mincode - 1);
    } else
    {
      offset = 0;
    }
  } else
  {
    left = 0;
    right = bcktab->numofallcodes - 1;
    offset = 0;
  }
  found = right + 1; /* undefined */
  while (left <= right)
  {
    GtCodetype midval, mid = GT_DIV2(left+right);

    gt_assert(mincode > maxcode || left <= mid);
    midval = gt_bcktab_get_leftborder(bcktab,mid) - offset;
    if (suftaboffset <= midval)
    {
      found = mid;
      found_defined = true;
      if (suftaboffset < midval)
      {
        if (mid == 0)
        {
          break;
        }
        right = mid - 1;
      } else
      {
        break;
      }
    } else
    {
      left = mid + 1;
    }
  }
  gt_assert(found_defined);
  return found;
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x58(%rsp)
movq %rsi, 0x50(%rsp)
movq %rdx, 0x48(%rsp)
movq %rcx, 0x40(%rsp)
movb $0x0, 0x1f(%rsp)
movq 0x50(%rsp), %rax
cmpq 0x48(%rsp), %rax
ja 0x2068a1
movq 0x50(%rsp), %rax
cmpq 0x48(%rsp), %rax
jne 0x206818
movq 0x50(%rsp), %rax
movq %rax, 0x60(%rsp)
jmp 0x206a05
jmp 0x20681a
movq 0x50(%rsp), %rax
cmpq 0x48(%rsp), %rax
jb 0x20685e
movq 0x435773(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x30f7dc(%rip), %rsi    # 0x516013
leaq 0x36a9e7(%rip), %rdx    # 0x571225
leaq 0x36a9f2(%rip), %rcx    # 0x571237
leaq 0x36a5c6(%rip), %r8     # 0x570e12
movl $0x538, %r9d            # imm = 0x538
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x206860
movq 0x50(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x30(%rsp)
cmpq $0x0, 0x50(%rsp)
jbe 0x206896
movq 0x58(%rsp), %rdi
movq 0x50(%rsp), %rsi
subq $0x1, %rsi
callq 0x2037f0
movq %rax, 0x20(%rsp)
jmp 0x20689f
movq $0x0, 0x20(%rsp)
jmp 0x2068c5
movq $0x0, 0x38(%rsp)
movq 0x58(%rsp), %rax
movq 0x58(%rax), %rax
subq $0x1, %rax
movq %rax, 0x30(%rsp)
movq $0x0, 0x20(%rsp)
movq 0x30(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x28(%rsp)
movq 0x38(%rsp), %rax
cmpq 0x30(%rsp), %rax
ja 0x2069b8
movq 0x38(%rsp), %rax
addq 0x30(%rsp), %rax
shrq %rax
movq %rax, 0x8(%rsp)
movq 0x50(%rsp), %rax
cmpq 0x48(%rsp), %rax
ja 0x206945
movq 0x38(%rsp), %rax
cmpq 0x8(%rsp), %rax
jbe 0x206945
movq 0x43568c(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x30f6f5(%rip), %rsi    # 0x516013
leaq 0x36a92c(%rip), %rdx    # 0x571251
leaq 0x36a90b(%rip), %rcx    # 0x571237
leaq 0x36a4df(%rip), %r8     # 0x570e12
movl $0x54d, %r9d            # imm = 0x54D
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x206947
movq 0x58(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x2037f0
subq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x40(%rsp), %rax
cmpq 0x10(%rsp), %rax
ja 0x2069a5
movq 0x8(%rsp), %rax
movq %rax, 0x28(%rsp)
movb $0x1, 0x1f(%rsp)
movq 0x40(%rsp), %rax
cmpq 0x10(%rsp), %rax
jae 0x2069a1
cmpq $0x0, 0x8(%rsp)
jne 0x206991
jmp 0x2069b8
movq 0x8(%rsp), %rax
subq $0x1, %rax
movq %rax, 0x30(%rsp)
jmp 0x2069a3
jmp 0x2069b8
jmp 0x2069b3
movq 0x8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x38(%rsp)
jmp 0x2068d3
jmp 0x2069ba
testb $0x1, 0x1f(%rsp)
jne 0x2069f9
movq 0x4355d8(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x30f641(%rip), %rsi    # 0x516013
leaq 0x36a899(%rip), %rdx    # 0x571272
leaq 0x36a857(%rip), %rcx    # 0x571237
leaq 0x36a42b(%rip), %r8     # 0x570e12
movl $0x563, %r9d            # imm = 0x563
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2069fb
movq 0x28(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x60(%rsp), %rax
addq $0x68, %rsp
retq
nop