public static Cons cppTranslateReturnTree(Cons tree) {
    { Cons otree = null;
      Cons returnassignments = Stella.NIL;
      Cons returnvariables = Stella.NIL;
      Cons methodotherreturntypes = ((MethodSlot)(Stella.$METHODBEINGWALKED$.get())).methodReturnTypeSpecifiers().rest();
      Stella_Object returnexpression = null;
      Cons translatedreturnexpression = Stella.NIL;
      boolean needtemporaryreturnvariableP = (!(tree.rest.rest == Stella.NIL)) &&
          (!Stella_Object.sideEffectFreeExpressionP(tree.rest.value));

      { Stella_Object exp = null;
        Cons iter000 = tree.rest.rest;
        int parameternum = Stella.NULL_INTEGER;
        int iter001 = 1;

        for (;!(iter000 == Stella.NIL); iter000 = iter000.rest, iter001 = iter001 + 1) {
          exp = iter000.value;
          parameternum = iter001;
          if (!Stella_Object.sideEffectFreeExpressionP(exp)) {
            needtemporaryreturnvariableP = true;
          }
          returnassignments = Cons.cons(Cons.list$(Cons.cons(Stella.SYM_STELLA_CPP_ASSIGN, Cons.cons(Cons.list$(Cons.cons(Stella.SYM_STELLA_CPP_IDENT, Cons.cons(Symbol.cppTranslateReturnParameterName(Stella.SYM_STELLA__RETURN, parameternum), Cons.cons(Stella.NIL, Stella.NIL)))), Cons.cons(Stella_Object.cppTranslateATree(exp), Cons.cons(Stella.NIL, Stella.NIL))))), returnassignments);
        }
      }
      returnassignments = returnassignments.reverse();
      returnexpression = tree.rest.value;
      if ((methodotherreturntypes.length() > 0) &&
          ((tree.rest.rest == Stella.NIL) &&
           (Stella_Object.consP(returnexpression) &&
            ((((Cons)(returnexpression)).value != null) &&
             ((((Cons)(returnexpression)).value == Stella.SYM_STELLA_SYS_CALL_FUNCTION) ||
              (((Cons)(returnexpression)).value == Stella.SYM_STELLA_SYS_CALL_METHOD)))))) {
        {
          { StandardObject type = null;
            Cons iter002 = methodotherreturntypes;
            int parameternum = Stella.NULL_INTEGER;
            int iter003 = 1;
            Cons collect000 = null;

            for (;!(iter002 == Stella.NIL); iter002 = iter002.rest, iter003 = iter003 + 1) {
              type = ((StandardObject)(iter002.value));
              parameternum = iter003;
              type = type;
              if (collect000 == null) {
                {
                  collect000 = Cons.cons(Symbol.internSymbol(Symbol.cppTranslateReturnParameterName(Stella.SYM_STELLA__RETURN, parameternum).wrapperValue), Stella.NIL);
                  if (returnvariables == Stella.NIL) {
                    returnvariables = collect000;
                  }
                  else {
                    Cons.addConsToEndOfConsList(returnvariables, collect000);
                  }
                }
              }
              else {
                {
                  collect000.rest = Cons.cons(Symbol.internSymbol(Symbol.cppTranslateReturnParameterName(Stella.SYM_STELLA__RETURN, parameternum).wrapperValue), Stella.NIL);
                  collect000 = collect000.rest;
                }
              }
            }
          }
          translatedreturnexpression = Cons.cppTranslateMvFunctionCall(((Cons)(returnexpression)), returnvariables);
        }
      }
      else {
        translatedreturnexpression = ((Cons)(Stella_Object.cppTranslateATree(returnexpression)));
      }
      if (returnassignments == Stella.NIL) {
        if (tree.rest == Stella.NIL) {
          otree = Cons.cons(Stella.SYM_STELLA_CPP_RETURN, Stella.NIL);
        }
        else {
          otree = Cons.list$(Cons.cons(Stella.SYM_STELLA_CPP_RETURN, Cons.cons(translatedreturnexpression, Cons.cons(Stella.NIL, Stella.NIL))));
        }
      }
      else {
        if (needtemporaryreturnvariableP) {
          { StringWrapper tempvar = Symbol.cppTranslateReturnParameterName(Stella.SYM_STELLA__RETURN, 0);

            otree = Cons.list$(Cons.cons(Stella.SYM_STELLA_CPP_BLOCK, Cons.cons(Cons.cons(Cons.cons(StandardObject.cppTranslateAndPointerizeTypeSpec(((MethodSlot)(Stella.$METHODBEINGWALKED$.get())).computeReturnTypeSpec(((MethodSlot)(Stella.$METHODBEINGWALKED$.get())).slotOwner)), Cons.list$(Cons.cons(Cons.list$(Cons.cons(Stella.SYM_STELLA_CPP_IDENT, Cons.cons(tempvar, Cons.cons(Stella.NIL, Stella.NIL)))), Cons.cons(translatedreturnexpression, Cons.cons(Stella.NIL, Stella.NIL))))), Stella.NIL), Cons.cons(Cons.cons(Stella.SYM_STELLA_CPP_STATEMENTS, returnassignments.concatenate(Cons.cons(Cons.list$(Cons.cons(Stella.SYM_STELLA_CPP_RETURN, Cons.cons(Cons.list$(Cons.cons(Stella.SYM_STELLA_CPP_IDENT, Cons.cons(tempvar, Cons.cons(Stella.NIL, Stella.NIL)))), Cons.cons(Stella.NIL, Stella.NIL)))), Stella.NIL), Stella.NIL)), Cons.cons(Stella.NIL, Stella.NIL)))));
          }
        }
        else {
          otree = Cons.cons(Stella.SYM_STELLA_CPP_STATEMENTS, returnassignments.concatenate(Cons.cons(Cons.list$(Cons.cons(Stella.SYM_STELLA_CPP_RETURN, Cons.cons(translatedreturnexpression, Cons.cons(Stella.NIL, Stella.NIL)))), Stella.NIL), Stella.NIL));
        }
      }
      return (otree);
    }
  }