public static Cons helpSortConsList(Cons list, int length, java.lang.reflect.Method predicate) {
    if (length < 2) {
      return (list);
    }
    { int frontlength = Native.floor(length / 2.0);
      Cons temp = list;
      Cons back = Stella.NIL;

      { int i = Stella.NULL_INTEGER;
        int iter000 = 2;
        int upperBound000 = frontlength;
        boolean unboundedP000 = upperBound000 == Stella.NULL_INTEGER;

        for (;unboundedP000 ||
                  (iter000 <= upperBound000); iter000 = iter000 + 1) {
          i = iter000;
          i = i;
          temp = temp.rest;
        }
      }
      back = temp.rest;
      temp.rest = Stella.NIL;
      return (Cons.mergeConsLists(Cons.helpSortConsList(list, frontlength, predicate), Cons.helpSortConsList(back, length - frontlength, predicate), predicate));
    }
  }