code: private static BinaryExpression compareExpr(Expression lhv, Expression rhv, boolean reversed) {
          return (reversed) ? cmpX(rhv, lhv) : cmpX(lhv, rhv);
      }
docs: Helper method used to build a binary expression that compares two values
  with the option to handle reverse order.