public static Stella_Object clTranslateCastTree(Cons tree) {
    { Stella_Object expression = tree.rest.value;
      Surrogate type = StandardObject.typeSpecToBaseType(((StandardObject)(tree.rest.rest.value)));

      tree.secondSetter(Stella_Object.clTranslateATree(expression));
      tree.thirdSetter(Stella_Object.clTranslateATree(type));
      if (Surrogate.subtypeOfP(type, Stella.SGT_STELLA_NUMBER) &&
          Stella_Object.isaP(expression, Stella.SGT_STELLA_NUMBER_WRAPPER)) {
        return (NumberWrapper.coerceNumericConstant(((NumberWrapper)(expression)), type).clTranslateAtomicTree());
      }
      else if (Surrogate.subtypeOfP(type, Stella.SGT_STELLA_FLOAT)) {
        return (Cons.list$(Cons.cons(Stella.internCommonLispSymbol("FLOAT"), Cons.cons(tree.rest.value, Cons.cons(Cons.cons(VerbatimStringWrapper.newVerbatimStringWrapper("0.0d0"), Stella.NIL), Stella.NIL)))));
      }
      else if (Surrogate.subtypeOfP(type, Stella.SGT_STELLA_INTEGER) ||
          Surrogate.subtypeOfP(type, Stella.SGT_STELLA_LONG_INTEGER)) {
        return (Cons.list$(Cons.cons(Stella.internCommonLispSymbol("TRUNCATE"), Cons.cons(tree.rest.value, Cons.cons(Stella.NIL, Stella.NIL)))));
      }
      if ((((Integer)(Stella.$SAFETY$.get())).intValue() < 2) ||
          ((tree.value == Stella.SYM_STELLA_SAFE_CAST) ||
           (Stella_Class.lookupSlot(Surrogate.typeToClass(type), Stella.SYM_STELLA_PRIMARY_TYPE) == null))) {
        expression = tree.rest.value;
        tree.secondSetter(Stella.NIL);
        return (expression);
      }
      tree.firstSetter(Symbol.clTranslateGlobalSymbol(Stella.SYM_STELLA_CAST));
      return (tree);
    }
  }