findFirstKey = function(l, r, favorR) {
    if (l >= r) {
      return favorR == lf.index.Favor.TIE ? r : -1;
    }
    var favorL = compare(c.compareRange(keys[l], keyRange));
    if (favorL == lf.index.Favor.TIE) {
      return l;
    } else if (favorL == lf.index.Favor.LHS) {
      return -1;  // Shall not be here.
    }

    var mid = getMidPoint(l, r);
    if (mid == r) {
      return favorR == lf.index.Favor.TIE ? r : -1;
    }
    var favorM = compare(c.compareRange(keys[mid], keyRange));
    if (favorM == lf.index.Favor.TIE) {
      return findFirstKey(l, mid, favorM);
    } else if (favorM == lf.index.Favor.RHS) {
      return findFirstKey(mid + 1, r, favorR);
    } else {
      return findFirstKey(l + 1, mid, favorM);
    }
  }
Find the first key that is in range.
@param {number} l Left index
@param {number} r Right index
@param {!lf.index.Favor} favorR Favor of right
@return {number} Index of the key, -1 if not found.