public static Cons walkExceptionHandlerTrees(Cons tree) {
    { Cons clauses = Stella.NIL;
      Stella_Object exceptiontype = null;
      Stella_Object exceptionvariablespec = null;
      Symbol exceptionvariable = null;

      { Stella_Object clause = null;
        Cons iter000 = tree;

        for (;!(iter000 == Stella.NIL); iter000 = iter000.rest) {
          clause = iter000.value;
          if (Stella_Object.safePrimaryType(clause) == Stella.SGT_STELLA_CONS) {
            { Cons clause000 = ((Cons)(clause));

              if (clause000.length() < 2) {
                { Object old$PrintreadablyP$000 = Stella.$PRINTREADABLYp$.get();

                  try {
                    Native.setBooleanSpecial(Stella.$PRINTREADABLYp$, true);
                    Stella.signalTranslationError();
                    if (!(Stella.suppressWarningsP())) {
                      Stella.printErrorContext(">> ERROR: ", Stella.STANDARD_ERROR);
                      {
                        Stella.STANDARD_ERROR.nativeStream.println();
                        Stella.STANDARD_ERROR.nativeStream.println(" Illegal exception handler clause: `" + Stella_Object.deUglifyParseTree(clause000) + "'.");
                      }
;
                    }

                  } finally {
                    Stella.$PRINTREADABLYp$.set(old$PrintreadablyP$000);
                  }
                }
                return (null);
              }
              exceptiontype = clause000.value;
              if (!Stella_Object.symbolP(exceptiontype)) {
                { Object old$PrintreadablyP$001 = Stella.$PRINTREADABLYp$.get();

                  try {
                    Native.setBooleanSpecial(Stella.$PRINTREADABLYp$, true);
                    Stella.signalTranslationError();
                    if (!(Stella.suppressWarningsP())) {
                      Stella.printErrorContext(">> ERROR: ", Stella.STANDARD_ERROR);
                      {
                        Stella.STANDARD_ERROR.nativeStream.println();
                        Stella.STANDARD_ERROR.nativeStream.println(" Illegal exception type: `" + Stella_Object.deUglifyParseTree(exceptiontype) + "'.");
                      }
;
                    }

                  } finally {
                    Stella.$PRINTREADABLYp$.set(old$PrintreadablyP$001);
                  }
                }
                return (null);
              }
              exceptiontype = Stella_Object.typify(exceptiontype);
              if (Surrogate.typeToClass(((Surrogate)(exceptiontype))) == null) {
                { Object old$PrintreadablyP$002 = Stella.$PRINTREADABLYp$.get();

                  try {
                    Native.setBooleanSpecial(Stella.$PRINTREADABLYp$, true);
                    Stella.signalTranslationError();
                    if (!(Stella.suppressWarningsP())) {
                      Stella.printErrorContext(">> ERROR: ", Stella.STANDARD_ERROR);
                      {
                        Stella.STANDARD_ERROR.nativeStream.println();
                        Stella.STANDARD_ERROR.nativeStream.println(" Undefined exception type: `" + Stella_Object.deUglifyParseTree(exceptiontype) + "'.");
                      }
;
                    }

                  } finally {
                    Stella.$PRINTREADABLYp$.set(old$PrintreadablyP$002);
                  }
                }
                return (null);
              }
              if (!Surrogate.subtypeOfP(((Surrogate)(exceptiontype)), Stella.SGT_STELLA_NATIVE_EXCEPTION)) {
                { Object old$PrintreadablyP$003 = Stella.$PRINTREADABLYp$.get();

                  try {
                    Native.setBooleanSpecial(Stella.$PRINTREADABLYp$, true);
                    Stella.signalTranslationError();
                    if (!(Stella.suppressWarningsP())) {
                      Stella.printErrorContext(">> ERROR: ", Stella.STANDARD_ERROR);
                      {
                        Stella.STANDARD_ERROR.nativeStream.println();
                        Stella.STANDARD_ERROR.nativeStream.println(" Exception type `" + Stella_Object.deUglifyParseTree(exceptiontype) + "' is not a subtype of NATIVE-EXCEPTION.");
                      }
;
                    }

                  } finally {
                    Stella.$PRINTREADABLYp$.set(old$PrintreadablyP$003);
                  }
                }
                return (null);
              }
              exceptionvariablespec = clause000.rest.value;
              if ((!Stella_Object.consP(exceptionvariablespec)) ||
                  ((((Cons)(exceptionvariablespec)).length() > 1) ||
                   ((((Cons)(exceptionvariablespec)).length() == 1) &&
                    (!Stella_Object.symbolP(((Cons)(exceptionvariablespec)).value))))) {
                { Object old$PrintreadablyP$004 = Stella.$PRINTREADABLYp$.get();

                  try {
                    Native.setBooleanSpecial(Stella.$PRINTREADABLYp$, true);
                    Stella.signalTranslationError();
                    if (!(Stella.suppressWarningsP())) {
                      Stella.printErrorContext(">> ERROR: ", Stella.STANDARD_ERROR);
                      {
                        Stella.STANDARD_ERROR.nativeStream.println();
                        Stella.STANDARD_ERROR.nativeStream.println(" Illegal exception variable specification: `" + Stella_Object.deUglifyParseTree(clause000) + "'.");
                      }
;
                    }

                  } finally {
                    Stella.$PRINTREADABLYp$.set(old$PrintreadablyP$004);
                  }
                }
                return (null);
              }
              exceptionvariable = ((Symbol)(((Cons)(exceptionvariablespec)).value));
              if (Stella.translateToJavaP() &&
                  (exceptionvariable == null)) {
                exceptionvariable = Stella.localGensym("E");
              }
              exceptionvariablespec = Symbol.walkADeclaration(exceptionvariable, exceptiontype, null, true);
              clause000 = Cons.list$(Cons.cons(Stella.SYM_STELLA_SYS_HANDLE_EXCEPTION, Cons.cons(exceptionvariablespec, Cons.cons(Cons.walkListOfTrees(clause000.rest.rest).concatenate(Stella.NIL, Stella.NIL), Stella.NIL))));
              if (exceptionvariable != null) {
                Stella.popVariableBinding();
              }
              clauses = Cons.cons(clause000, clauses);
            }
          }
          else {
            { Object old$PrintreadablyP$005 = Stella.$PRINTREADABLYp$.get();

              try {
                Native.setBooleanSpecial(Stella.$PRINTREADABLYp$, true);
                Stella.signalTranslationError();
                if (!(Stella.suppressWarningsP())) {
                  Stella.printErrorContext(">> ERROR: ", Stella.STANDARD_ERROR);
                  {
                    Stella.STANDARD_ERROR.nativeStream.println();
                    Stella.STANDARD_ERROR.nativeStream.println(" Illegal exception handler clause: `" + Stella_Object.deUglifyParseTree(tree) + "'.");
                  }
;
                }

              } finally {
                Stella.$PRINTREADABLYp$.set(old$PrintreadablyP$005);
              }
            }
            return (null);
          }
        }
      }
      return (clauses.reverse());
    }
  }