public static Stella_Object surrogateDvalueOf(Surrogate self) {
    { Stella_Object value = self.surrogateValue;

      if (value != null) {
        return (Logic.valueOf(value));
      }
      else {
        {
          if (Stella.dottedStringP(self.symbolName)) {
            { Slot slot = ((Slot)(Stella.stringToSlot(self.symbolName)));

              if (slot != null) {
                return (Logic.valueOf(slot));
              }
            }
          }
          if (!(((Boolean)(Logic.$SUPPRESSNONLOGICOBJECTWARNINGp$.get())).booleanValue())) {
            Logic.signalUndefinedTerm(StringWrapper.wrapString(self.symbolName));
          }
          return (null);
        }
      }
    }
  }