public static Stella_Object evaluateCommand(Stella_Object command, boolean finalizeP) {
    { Object old$Translationerrors$000 = Stella.$TRANSLATIONERRORS$.get();
      Object old$Translationwarnings$000 = Stella.$TRANSLATIONWARNINGS$.get();
      Object old$Translationnotes$000 = Stella.$TRANSLATIONNOTES$.get();
      Object old$IgnoretranslationerrorsP$000 = Stella.$IGNORETRANSLATIONERRORSp$.get();
      Object old$Translationunits$000 = Stella.$TRANSLATIONUNITS$.get();
      Object old$Translationphase$000 = Stella.$TRANSLATIONPHASE$.get();
      Object old$Evaluationtree$000 = Stella.$EVALUATIONTREE$.get();

      try {
        Native.setIntSpecial(Stella.$TRANSLATIONERRORS$, 0);
        Native.setIntSpecial(Stella.$TRANSLATIONWARNINGS$, 0);
        Native.setIntSpecial(Stella.$TRANSLATIONNOTES$, 0);
        Native.setBooleanSpecial(Stella.$IGNORETRANSLATIONERRORSp$, false);
        Native.setSpecial(Stella.$TRANSLATIONUNITS$, null);
        Native.setSpecial(Stella.$TRANSLATIONPHASE$, Stella.KWD_DEFINE);
        Native.setSpecial(Stella.$EVALUATIONTREE$, null);
        { Stella_Object operator = null;
          Stella_Object result = null;

          { Surrogate testValue000 = Stella_Object.safePrimaryType(command);

            if (testValue000 == Stella.SGT_STELLA_CONS) {
              { Cons command000 = ((Cons)(command));

                operator = command000.value;
                if (Surrogate.subtypeOfSymbolP(Stella_Object.safePrimaryType(operator))) {
                  { Symbol operator000 = ((Symbol)(operator));

                    if (operator000 == Stella.SYM_STELLA_IN_MODULE) {
                      Cons.handleInModuleTree(command000, false, false, new Object[1]);
                    }
                    else {
                      if (Cons.declarationTreeP(command000)) {
                        Native.setSpecial(Stella.$TRANSLATIONUNITS$, List.list(Stella.NIL));
                        Cons.walkTopLevelTree(command000, false);
                        switch (((List)(Stella.$TRANSLATIONUNITS$.get())).reverse().length()) {
                          case 0: 
                            { OutputStringStream stream000 = OutputStringStream.newOutputStringStream();

                              stream000.nativeStream.print("While evaluating '" + ((Stella_Object)(Stella.$EVALUATIONTREE$.get())));
                              if (((Stella_Object)(Stella.$EVALUATIONPARENTTREE$.get())) != null) {
                                {
                                  stream000.nativeStream.println();
                                  stream000.nativeStream.print("' inside '" + ((Stella_Object)(Stella.$EVALUATIONPARENTTREE$.get())));
                                }
;
                              }
                              stream000.nativeStream.println("':");
                              stream000.nativeStream.print("Couldn't translate `" + command000 + "'");
                              throw ((EvaluationException)(EvaluationException.newEvaluationException(stream000.theStringReader()).fillInStackTrace()));
                            }
                          case 1: 
                            result = ((TranslationUnit)(((List)(Stella.$TRANSLATIONUNITS$.get())).first())).theObject;
                          break;
                          default:
                            { Cons results = Stella.NIL;

                              { TranslationUnit unit = null;
                                Cons iter000 = ((List)(Stella.$TRANSLATIONUNITS$.get())).theConsList;
                                Cons collect000 = null;

                                for (;!(iter000 == Stella.NIL); iter000 = iter000.rest) {
                                  unit = ((TranslationUnit)(iter000.value));
                                  if (collect000 == null) {
                                    {
                                      collect000 = Cons.cons(unit.theObject, Stella.NIL);
                                      if (results == Stella.NIL) {
                                        results = collect000;
                                      }
                                      else {
                                        Cons.addConsToEndOfConsList(results, collect000);
                                      }
                                    }
                                  }
                                  else {
                                    {
                                      collect000.rest = Cons.cons(unit.theObject, Stella.NIL);
                                      collect000 = collect000.rest;
                                    }
                                  }
                                }
                              }
                              result = results;
                            }
                          break;
                        }
                      }
                      else if (Stella.stringEqualP(operator000.symbolName, "in-package")) {
                      }
                      else {
                        Stella_Object.evaluate(command000);
                      }
                    }
                  }
                }
                else {
                  Stella_Object.evaluate(command000);
                }
              }
            }
            else if (Surrogate.subtypeOfKeywordP(testValue000)) {
              { Keyword command000 = ((Keyword)(command));

                result = command000;
              }
            }
            else if (Surrogate.subtypeOfSurrogateP(testValue000)) {
              { Surrogate command000 = ((Surrogate)(command));

                result = command000;
              }
            }
            else {
              Stella_Object.evaluate(command);
            }
          }
          if ((!Stella.translationErrorsP()) &&
              finalizeP) {
            Native.setSpecial(Stella.$TRANSLATIONPHASE$, Stella.KWD_FINALIZE);
            if (((SystemDefinition)(Stella.$CURRENTSYSTEMDEFINITION$.get())) != null) {
              SystemDefinition.runSystemFinalization(((SystemDefinition)(Stella.$CURRENTSYSTEMDEFINITION$.get())));
            }
            else {
              System.out.println("Can't run finalization because *currentSystemDefinition* is not set.");
            }
          }
          return (result);
        }

      } finally {
        Stella.$EVALUATIONTREE$.set(old$Evaluationtree$000);
        Stella.$TRANSLATIONPHASE$.set(old$Translationphase$000);
        Stella.$TRANSLATIONUNITS$.set(old$Translationunits$000);
        Stella.$IGNORETRANSLATIONERRORSp$.set(old$IgnoretranslationerrorsP$000);
        Stella.$TRANSLATIONNOTES$.set(old$Translationnotes$000);
        Stella.$TRANSLATIONWARNINGS$.set(old$Translationwarnings$000);
        Stella.$TRANSLATIONERRORS$.set(old$Translationerrors$000);
      }
    }
  }