public static StorageSlot canonicalSlot(StorageSlot slot) {
    { StorageSlot canonicalslot = slot;

      while ((canonicalslot.slotDirectEquivalent != null) &&
          (canonicalslot.slotDirectEquivalent.slotName == ((Symbol)(KeyValueList.dynamicSlotValue(canonicalslot.dynamicSlots, Stella.SYM_STELLA_SLOT_RENAMES, null))))) {
        canonicalslot = ((StorageSlot)(canonicalslot.slotDirectEquivalent));
      }
      return (canonicalslot);
    }
  }