public static Stella_Object permanentCopy(Stella_Object tree) {
    if (Stella_Object.safePrimaryType(tree) == Stella.SGT_STELLA_CONS) {
      { Cons tree000 = ((Cons)(tree));

        if (tree000 == Stella.NIL) {
          return (tree000);
        }
        else {
          return (Cons.cons(Stella_Object.permanentCopy(tree000.value), ((Cons)(Stella_Object.permanentCopy(tree000.rest)))));
        }
      }
    }
    else {
      return (tree.permanentify());
    }
  }