public static Stella_Object clTranslatePlainBooleanTest(Stella_Object tree, boolean invertP) {
    if (Stella_Object.safePrimaryType(tree) == Stella.SGT_STELLA_CONS) {
      { Cons tree000 = ((Cons)(tree));

        { Symbol operator = null;
          Surrogate owner = null;
          Cons arguments = null;

          { Object [] caller_MV_returnarray = new Object[2];

            operator = Cons.destructureCallTree(tree000, caller_MV_returnarray);
            owner = ((Surrogate)(caller_MV_returnarray[0]));
            arguments = ((Cons)(caller_MV_returnarray[1]));
          }
          if ((operator == Stella.SYM_STELLA_l) ||
              ((operator == Stella.SYM_STELLA_le) ||
               ((operator == Stella.SYM_STELLA_e) ||
                ((operator == Stella.SYM_STELLA_ge) ||
                 (operator == Stella.SYM_STELLA_g))))) {
            if (Stella.optimizeBooleanTestsP()) {
              if (invertP) {
                if (operator == Stella.SYM_STELLA_l) {
                  operator = Stella.SYM_STELLA_ge;
                }
                else if (operator == Stella.SYM_STELLA_le) {
                  operator = Stella.SYM_STELLA_g;
                }
                else if (operator == Stella.SYM_STELLA_e) {
                  operator = Stella.SYM_STELLA_xe;
                }
                else if (operator == Stella.SYM_STELLA_ge) {
                  operator = Stella.SYM_STELLA_l;
                }
                else if (operator == Stella.SYM_STELLA_g) {
                  operator = Stella.SYM_STELLA_le;
                }
                else {
                  { OutputStringStream stream000 = OutputStringStream.newOutputStringStream();

                    stream000.nativeStream.print("`" + operator + "' is not a valid case option");
                    throw ((StellaException)(StellaException.newStellaException(stream000.theStringReader()).fillInStackTrace()));
                  }
                }
                invertP = false;
              }
            }
            tree000 = Cons.cons(Stella.$CL_OPERATOR_TABLE$.lookup(operator), Cons.clTranslateListOfTrees(arguments).concatenate(Stella.NIL, Stella.NIL));
            if (invertP) {
              return (Cons.list$(Cons.cons(Stella.internCommonLispSymbol("NOT"), Cons.cons(tree000, Cons.cons(Stella.NIL, Stella.NIL)))));
            }
            else {
              return (tree000);
            }
          }
          else if (operator == Stella.SYM_STELLA_EQp) {
            if (Stella.optimizeBooleanTestsP()) {
              { StandardObject argtype1 = Stella_Object.walkedExpressionType(arguments.value);
                StandardObject argtype2 = Stella_Object.walkedExpressionType(arguments.rest.value);

                if (StandardObject.subTypeSpecOfP(argtype1, Stella.SGT_STELLA_LITERAL) &&
                    StandardObject.subTypeSpecOfP(argtype2, Stella.SGT_STELLA_LITERAL)) {
                  if ((argtype1 == Stella.SGT_STELLA_STRING) ||
                      StandardObject.subTypeSpecOfP(argtype1, Stella.SGT_STELLA_BOOLEAN)) {
                    operator = Stella.internCommonLispSymbol("EQ");
                  }
                  else if (StandardObject.subTypeSpecOfP(argtype1, Stella.SGT_STELLA_NUMBER)) {
                    operator = Stella.internCommonLispSymbol("=");
                  }
                  else {
                    operator = Stella.internCommonLispSymbol("EQL");
                  }
                }
                else {
                  operator = Stella.internCommonLispSymbol("EQ");
                }
                tree000.firstSetter(operator);
              }
            }
            tree000.rest = Cons.clTranslateListOfTrees(tree000.rest);
            if (invertP) {
              return (Cons.list$(Cons.cons(Stella.internCommonLispSymbol("NOT"), Cons.cons(tree000, Cons.cons(Stella.NIL, Stella.NIL)))));
            }
            else {
              return (tree000);
            }
          }
          else if ((operator == Stella.SYM_STELLA_NULLp) ||
              (operator == Stella.SYM_STELLA_DEFINEDp)) {
            if (Stella.methodCallInliningEnabledP()) {
              if ((owner == Stella.SGT_STELLA_OBJECT) ||
                  ((owner == Stella.SGT_STELLA_SECOND_CLASS_OBJECT) ||
                   ((owner == Stella.SGT_STELLA_STRING) ||
                    ((owner == Stella.SGT_STELLA_NATIVE_VECTOR) ||
                     ((owner == Stella.SGT_STELLA_ARRAY) ||
                      ((owner == Stella.SGT_STELLA_INTEGER) ||
                       ((owner == Stella.SGT_STELLA_LONG_INTEGER) ||
                        ((owner == Stella.SGT_STELLA_FLOAT) ||
                         (owner == Stella.SGT_STELLA_CODE))))))))) {
                if (owner == Stella.SGT_STELLA_ARRAY) {
                  tree000 = Cons.cons(Symbol.clTranslateGlobalSymbol(Stella.SYM_STELLA_NULL_ARRAYp), Cons.cons(Stella_Object.clTranslateATree(arguments.value), Stella.NIL));
                }
                else {
                  tree000 = Cons.cons((Surrogate.subtypeOfP(owner, Stella.SGT_STELLA_NUMBER) ? Stella.internCommonLispSymbol("=") : Stella.internCommonLispSymbol("EQ")), Cons.cons(Stella_Object.clTranslateATree(arguments.value), Cons.cons(Stella_Object.clTranslateATree(StandardObject.typeToWalkedNullValueTree(owner, owner)), Stella.NIL)));
                }
                if (owner == Stella.SGT_STELLA_FLOAT) {
                  tree000.firstSetter(Stella.internCommonLispSymbol("="));
                }
                else {
                }
                if ((invertP &&
                    (operator == Stella.SYM_STELLA_NULLp)) ||
                    ((!invertP) &&
                     (operator == Stella.SYM_STELLA_DEFINEDp))) {
                  return (Cons.list$(Cons.cons(Stella.internCommonLispSymbol("NOT"), Cons.cons(tree000, Cons.cons(Stella.NIL, Stella.NIL)))));
                }
                else {
                  return (tree000);
                }
              }
              else {
              }
            }
            tree000 = Cons.cons(Symbol.clTranslateGlobalSymbol(operator), Cons.cons(Stella_Object.clTranslateATree(arguments.value), Stella.NIL));
            if (invertP) {
              return (Cons.list$(Cons.cons(Stella.internCommonLispSymbol("NOT"), Cons.cons(tree000, Cons.cons(Stella.NIL, Stella.NIL)))));
            }
            else {
              return (tree000);
            }
          }
          else {
          }
        }
      }
    }
    else {
    }
    tree = Stella_Object.clTranslateATree(tree);
    if (invertP) {
      return (Cons.list$(Cons.cons(Stella.internCommonLispSymbol("NOT"), Cons.cons(tree, Cons.cons(Stella.NIL, Stella.NIL)))));
    }
    else {
      return (tree);
    }
  }