* @param slotName
   * @return Slot
   */
  public static Slot lookupSlot(Stella_Class renamed_Class, Symbol slotName) {
    if (renamed_Class == null) {
      return (null);
    }
    { int offset = slotName.symbolSlotOffset;
      Slot cachedslot = null;

      if (offset != Stella.NULL_INTEGER) {
        cachedslot = ((Slot)((renamed_Class.classSlotAndMethodCache.theArray)[(slotName.symbolSlotOffset)]));
        if ((cachedslot != null) &&
            (cachedslot.slotName == slotName)) {
          return (cachedslot);
        }
      }
      cachedslot = null;
      { Slot slot = null;
        Iterator iter000 = renamed_Class.classSlots();

        loop000 : while (iter000.nextP()) {
          slot = ((Slot)(iter000.value));
          if (slot.slotName == slotName) {
            cachedslot = slot;
            break loop000;
          }
        }
      }
      if (cachedslot == null) {
        return (null);
      }
      { int newoffset = ((Stella.$SYMBOL_SLOT_OFFSET_COUNTER$ + 1) % Stella.$SLOT_CACHE_SIZE$);

        Stella.$SYMBOL_SLOT_OFFSET_COUNTER$ = newoffset;
        slotName.symbolSlotOffset = newoffset;
        renamed_Class.classSlotAndMethodCache.insertAt(newoffset, cachedslot);
        renamed_Class.classSlotAndMethodCache.insertAt(Stella.$SLOT_CACHE_SIZE$, cachedslot);
        return (cachedslot);
      }
    }
  }