public static Cons condTreeToIfTree(Cons tree) {
    { Stella_Object firstcondition = tree.rest.value;
      Cons otherconditions = tree.rest.rest;
      Stella_Object firsttest = null;

      if (Stella_Object.safePrimaryType(firstcondition) == Stella.SGT_STELLA_CONS) {
        { Cons firstcondition000 = ((Cons)(firstcondition));

          firsttest = firstcondition000.value;
          if (firsttest == Stella.SYM_STELLA_OTHERWISE) {
            if (otherconditions == Stella.NIL) {
              tree.firstSetter(Stella.SYM_STELLA_PROGN);
              tree.rest = firstcondition000.rest;
              return (tree);
            }
            else {
              firstcondition000.value = Stella.SYM_STELLA_TRUE;
              return (Cons.condTreeToIfTree(tree));
            }
          }
          else if (otherconditions == Stella.NIL) {
            tree.firstSetter(Stella.SYM_STELLA_WHEN);
            tree.rest = firstcondition000;
            return (tree);
          }
          else {
            firstcondition000.value = Stella.SYM_STELLA_PROGN;
            tree.secondSetter(Stella.SYM_STELLA_COND);
            return (Cons.list$(Cons.cons(Stella.SYM_STELLA_IF, Cons.cons(firsttest, Cons.cons(Cons.cons(firstcondition000, Cons.cons(Cons.condTreeToIfTree(tree.rest), Stella.NIL)), Stella.NIL)))));
          }
        }
      }
      else {
        { 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 condition in COND statement: `" + Stella_Object.deUglifyParseTree(firstcondition) + "'.");
              }
;
            }

          } finally {
            Stella.$PRINTREADABLYp$.set(old$PrintreadablyP$000);
          }
        }
        return (Stella_Object.walkDontCallMeTree(tree, Stella.SGT_STELLA_VOID, new Object[1]));
      }
    }
  }