public static void javaOutputForeach(Cons loop) {
    { Stella_Object continuationtest = loop.rest.value;
      Cons valueassignments = ((Cons)(loop.rest.rest.value));
      Cons nextassignments = ((Cons)(loop.fourth()));
      int nofnextassignments = nextassignments.length();
      Cons body = ((Cons)(loop.fifth()));
      boolean eolseparateexpressionsP = (nofnextassignments > 2) ||
          (((Integer)(Stella.$JAVA_INDENT_CHARS$.get())).intValue() > 35);

      if (nofnextassignments == 0) {
        ((OutputStream)(Stella.$CURRENT_STREAM$.get())).nativeStream.print("while (");
        Stella_Object.javaOutputStatement(continuationtest);
        ((OutputStream)(Stella.$CURRENT_STREAM$.get())).nativeStream.println(") {");
        Stella.javaBumpIndent();
        Cons.javaOutputStatements(valueassignments.concatenate(body, Stella.NIL));
        Stella.javaUnbumpIndent();
        Stella.javaIndent();
        ((OutputStream)(Stella.$CURRENT_STREAM$.get())).nativeStream.println("}");
        return;
      }
      ((OutputStream)(Stella.$CURRENT_STREAM$.get())).nativeStream.print("for (;");
      Stella.javaBumpIndent();
      Stella.javaBumpIndent();
      Stella.javaBumpIndent();
      Stella_Object.javaOutputStatement(continuationtest);
      ((OutputStream)(Stella.$CURRENT_STREAM$.get())).nativeStream.print("; ");
      if (!(nextassignments == Stella.NIL)) {
        if (eolseparateexpressionsP) {
          ((OutputStream)(Stella.$CURRENT_STREAM$.get())).nativeStream.println();
        }
        { Stella_Object next = null;
          Cons iter000 = nextassignments;
          int i = Stella.NULL_INTEGER;
          int iter001 = 1;

          for (;!(iter000 == Stella.NIL); iter000 = iter000.rest, iter001 = iter001 + 1) {
            next = iter000.value;
            i = iter001;
            if (eolseparateexpressionsP) {
              Stella.javaIndent();
            }
            Stella_Object.javaOutputStatement(next);
            if (!(i == nofnextassignments)) {
              if (eolseparateexpressionsP) {
                ((OutputStream)(Stella.$CURRENT_STREAM$.get())).nativeStream.println(",");
              }
              else {
                ((OutputStream)(Stella.$CURRENT_STREAM$.get())).nativeStream.print(", ");
              }
            }
          }
        }
      }
      ((OutputStream)(Stella.$CURRENT_STREAM$.get())).nativeStream.println(") {");
      Stella.javaUnbumpIndent();
      Stella.javaUnbumpIndent();
      Cons.javaOutputStatements(valueassignments.concatenate(body, Stella.NIL));
      Stella.javaUnbumpIndent();
      Stella.javaIndent();
      ((OutputStream)(Stella.$CURRENT_STREAM$.get())).nativeStream.println("}");
    }
  }