public static Stella_Object convertToLiteral(Stella_Object renamed_Object) {
    if (renamed_Object == null) {
      return (renamed_Object);
    }
    { Surrogate testValue000 = Stella_Object.safePrimaryType(renamed_Object);

      if (Surrogate.subtypeOfP(testValue000, Stella.SGT_STELLA_LITERAL_WRAPPER)) {
        { LiteralWrapper object000 = ((LiteralWrapper)(renamed_Object));

          return (object000);
        }
      }
      else if (Surrogate.subtypeOfSymbolP(testValue000)) {
        { Symbol object000 = ((Symbol)(renamed_Object));

          if (object000 == Stella.SYM_STELLA_TRUE) {
            return (Stella.TRUE_WRAPPER);
          }
          if (object000 == Stella.SYM_STELLA_FALSE) {
            return (Stella.FALSE_WRAPPER);
          }
          return (object000);
        }
      }
      else if (Surrogate.subtypeOfKeywordP(testValue000)) {
        { Keyword object000 = ((Keyword)(renamed_Object));

          return (object000);
        }
      }
      else if (Surrogate.subtypeOfSurrogateP(testValue000)) {
        { Surrogate object000 = ((Surrogate)(renamed_Object));

          return (object000);
        }
      }
      else {
        Stella.STANDARD_WARNING.nativeStream.println("Warning: `convert-to-literal': Can't handle non-boolean literals");
        return (null);
      }
    }
  }