if (isAssignableWith(lhsType, rhsType)) return; throw new ClassCastException("Cannot cast a(n) " + rhsType + " to a(n) " + lhsType);
if (!isAssignableWith(lhsType, rhsType)) { raiseCheckcastException(lhsType, rhsType); }
  static void checkcast(Object object, int targetTibOffset)    throws VM_ResolutionException, ClassCastException {    if (object == null)      return; // null may be cast to any type          Object lhsTib = VM_Magic.getObjectAtOffset(VM_Magic.getJTOC(),                                                targetTibOffset);    Object rhsTib= VM_ObjectModel.getTIB(object);    if (lhsTib == rhsTib)      return; // exact match    // not an exact match, do more involved lookups    //    VM_Type lhsType = VM_Magic.objectAsType(VM_Magic.getObjectAtOffset                                            (lhsTib,TIB_TYPE_INDEX));    VM_Type rhsType = VM_Magic.objectAsType(VM_Magic.getObjectAtOffset                                            (rhsTib,TIB_TYPE_INDEX));    if (isAssignableWith(lhsType, rhsType))      return;    throw new ClassCastException("Cannot cast a(n) " + rhsType + " to a(n) " + lhsType);  }