public static void logicCommandLoop(Module module) {
    { Stella_Object command = null;
      Stella_Object result = null;
      boolean eofP = false;
      boolean exitP = false;
      boolean exitcommandP = false;

      { Object old$Module$000 = Stella.$MODULE$.get();
        Object old$Context$000 = Stella.$CONTEXT$.get();

        try {
          Native.setSpecial(Stella.$MODULE$, ((module != null) ? module : ((Module)(Stella.$MODULE$.get()))));
          Native.setSpecial(Stella.$CONTEXT$, ((Module)(Stella.$MODULE$.get())));
          loop000 : for (;;) {
            try {
              System.out.println();
              Logic.printLogicPrompt();
              { Object [] caller_MV_returnarray = new Object[1];

                command = InputStream.readSExpression(Stella.STANDARD_INPUT, caller_MV_returnarray);
                eofP = ((boolean)(((BooleanWrapper)(caller_MV_returnarray[0])).wrapperValue));
              }
              if (eofP) {
                System.out.println("End of File encountered.  Exiting.");
                break loop000;
              }
              System.out.println();
              { Object [] caller_MV_returnarray = new Object[1];

                exitP = Logic.logicCommandLoopExitP(command, caller_MV_returnarray);
                exitcommandP = ((boolean)(((BooleanWrapper)(caller_MV_returnarray[0])).wrapperValue));
              }
              if (exitP) {
                break loop000;
              }
              if (exitcommandP) {
                continue loop000;
              }
              result = Logic.evaluateLogicCommand(command, false);
              Logic.printLogicCommandResult(result);
            } catch (LogicException le) {
              Stella.STANDARD_ERROR.nativeStream.print(">> Error: " + Stella.exceptionMessage(le));
            } catch (StellaException e) {
              Stella.STANDARD_ERROR.nativeStream.print(">> Internal Error: " + Stella.exceptionMessage(e));
              Stella.printExceptionContext(e, Stella.STANDARD_ERROR);
            }
          }

        } finally {
          Stella.$CONTEXT$.set(old$Context$000);
          Stella.$MODULE$.set(old$Module$000);
        }
      }
    }
  }