public static Stella_Class nativeStorageSlotHome(StorageSlot slot, Stella_Class renamed_Class) {
    { StorageSlot slotwithknowntype = null;

      loop000 : for (;;) {
        if (Surrogate.unknownTypeP(slot.type())) {
          break loop000;
        }
        slotwithknowntype = slot;
        renamed_Class = Surrogate.typeToClass(slot.slotOwner);
        if ((slot.slotDirectEquivalent != null) &&
            StorageSlot.nativeSlotP(((StorageSlot)(slot.slotDirectEquivalent)))) {
          slot = ((StorageSlot)(slot.slotDirectEquivalent));
        }
        else {
          break loop000;
        }
      }
      if (slotwithknowntype != null) {
        return (renamed_Class);
      }
      if (StorageSlot.slotHasUnknownTypeP(slot, renamed_Class)) {
        return (null);
      }
      { Stella_Class renamed_Super = null;
        Cons iter000 = renamed_Class.classAllSuperClasses;

        for (;!(iter000 == Stella.NIL); iter000 = iter000.rest) {
          renamed_Super = ((Stella_Class)(iter000.value));
          if (StorageSlot.slotHasUnknownTypeP(slot, renamed_Super)) {
            return (renamed_Class);
          }
          else {
            renamed_Class = renamed_Super;
          }
        }
      }
      return (renamed_Class);
    }
  }