public static Cons javaTranslateForeachTree(Cons tree) {
    { Object old$JavaLoopName$000 = Stella.$JAVA_LOOP_NAME$.get();
      Object old$JavaLoopNameUsedP$000 = Stella.$JAVA_LOOP_NAME_USEDp$.get();

      try {
        Native.setSpecial(Stella.$JAVA_LOOP_NAME$, Stella.localGensym("LOOP"));
        Native.setBooleanSpecial(Stella.$JAVA_LOOP_NAME_USEDp$, false);
        { Cons iteratorbindings = ((Cons)(tree.rest.value));
          Cons valuetrees = ((Cons)(tree.rest.rest.value));
          Cons nexttrees = ((Cons)(tree.fourth()));
          Stella_Object continuationtest = Stella_Object.javaTranslateATree(tree.fifth());
          Cons body = Cons.javaTranslateListOfTrees(tree.nthRest(5));
          Cons declarations = Stella.NIL;
          Cons valueassignments = Stella.NIL;
          Cons nextassignments = Stella.NIL;
          Cons variables = Stella.NIL;

          { Cons binding = null;
            Cons iter000 = iteratorbindings;
            Cons collect000 = null;

            for (;!(iter000 == Stella.NIL); iter000 = iter000.rest) {
              binding = ((Cons)(iter000.value));
              if (collect000 == null) {
                {
                  collect000 = Cons.cons(Cons.consList(Cons.cons(StandardObject.javaTranslateTypeSpec(((StandardObject)(binding.rest.value))), Cons.cons(Stella_Object.javaTranslateATree(binding.value), Cons.cons(Stella_Object.javaTranslateATree(binding.rest.rest.value), Stella.NIL)))), Stella.NIL);
                  if (declarations == Stella.NIL) {
                    declarations = collect000;
                  }
                  else {
                    Cons.addConsToEndOfConsList(declarations, collect000);
                  }
                }
              }
              else {
                {
                  collect000.rest = Cons.cons(Cons.consList(Cons.cons(StandardObject.javaTranslateTypeSpec(((StandardObject)(binding.rest.value))), Cons.cons(Stella_Object.javaTranslateATree(binding.value), Cons.cons(Stella_Object.javaTranslateATree(binding.rest.rest.value), Stella.NIL)))), Stella.NIL);
                  collect000 = collect000.rest;
                }
              }
            }
          }
          { Cons tree000 = null;
            Cons iter001 = valuetrees;
            Cons collect001 = null;

            for (;!(iter001 == Stella.NIL); iter001 = iter001.rest) {
              tree000 = ((Cons)(iter001.value));
              if (collect001 == null) {
                {
                  collect001 = Cons.cons(Stella_Object.javaTranslateATree(tree000), Stella.NIL);
                  if (valueassignments == Stella.NIL) {
                    valueassignments = collect001;
                  }
                  else {
                    Cons.addConsToEndOfConsList(valueassignments, collect001);
                  }
                }
              }
              else {
                {
                  collect001.rest = Cons.cons(Stella_Object.javaTranslateATree(tree000), Stella.NIL);
                  collect001 = collect001.rest;
                }
              }
            }
          }
          { Cons tree000 = null;
            Cons iter002 = nexttrees;
            Cons collect002 = null;

            for (;!(iter002 == Stella.NIL); iter002 = iter002.rest) {
              tree000 = ((Cons)(iter002.value));
              if (collect002 == null) {
                {
                  collect002 = Cons.cons(Stella_Object.javaTranslateATree(tree000), Stella.NIL);
                  if (nextassignments == Stella.NIL) {
                    nextassignments = collect002;
                  }
                  else {
                    Cons.addConsToEndOfConsList(nextassignments, collect002);
                  }
                }
              }
              else {
                {
                  collect002.rest = Cons.cons(Stella_Object.javaTranslateATree(tree000), Stella.NIL);
                  collect002 = collect002.rest;
                }
              }
            }
          }
          { Cons decl = null;
            Cons iter003 = declarations;
            Cons collect003 = null;

            for (;!(iter003 == Stella.NIL); iter003 = iter003.rest) {
              decl = ((Cons)(iter003.value));
              if (collect003 == null) {
                {
                  collect003 = Cons.cons(decl.rest.value, Stella.NIL);
                  if (variables == Stella.NIL) {
                    variables = collect003;
                  }
                  else {
                    Cons.addConsToEndOfConsList(variables, collect003);
                  }
                }
              }
              else {
                {
                  collect003.rest = Cons.cons(decl.rest.value, Stella.NIL);
                  collect003 = collect003.rest;
                }
              }
            }
          }
          if (((Boolean)(Stella.$JAVA_LOOP_NAME_USEDp$.get())).booleanValue()) {
            return (Cons.list$(Cons.cons(Stella.SYM_STELLA_JAVA_BLOCK, Cons.cons(declarations, Cons.cons(Cons.cons(Cons.list$(Cons.cons(Stella.SYM_STELLA_JAVA_STATEMENTS, Cons.cons(Cons.list$(Cons.cons(Stella.SYM_STELLA_JAVA_NAMED_STATEMENT, Cons.cons(Stella_Object.javaTranslateATree(((Symbol)(Stella.$JAVA_LOOP_NAME$.get()))), Cons.cons(Cons.cons(Cons.list$(Cons.cons(Stella.SYM_STELLA_JAVA_FOREACH, Cons.cons(variables, Cons.cons(Cons.cons(continuationtest, Cons.cons(valueassignments, Cons.cons(nextassignments, Cons.cons(body, Stella.NIL)))), Stella.NIL)))), Stella.NIL), Stella.NIL)))), Cons.cons(Stella.NIL, Stella.NIL)))), Stella.NIL), Stella.NIL)))));
          }
          else {
            return (Cons.list$(Cons.cons(Stella.SYM_STELLA_JAVA_BLOCK, Cons.cons(declarations, Cons.cons(Cons.cons(Cons.list$(Cons.cons(Stella.SYM_STELLA_JAVA_STATEMENTS, Cons.cons(Cons.list$(Cons.cons(Stella.SYM_STELLA_JAVA_FOREACH, Cons.cons(variables, Cons.cons(Cons.cons(continuationtest, Cons.cons(valueassignments, Cons.cons(nextassignments, Cons.cons(body, Stella.NIL)))), Stella.NIL)))), Cons.cons(Stella.NIL, Stella.NIL)))), Stella.NIL), Stella.NIL)))));
          }
        }

      } finally {
        Stella.$JAVA_LOOP_NAME_USEDp$.set(old$JavaLoopNameUsedP$000);
        Stella.$JAVA_LOOP_NAME$.set(old$JavaLoopName$000);
      }
    }
  }