public static void heapSiftDown(edu.isi.stella.Stella_Object[] heap, int start, int end, Stella_Object value, java.lang.reflect.Method predicate) {
    { int parent = start;
      int child = Stella.NULL_INTEGER;
      Stella_Object leftchild = null;
      Stella_Object rightchild = null;

      heap[start] = value;
      end = end - 1;
      loop000 : for (;;) {
        child = (parent << 1) + 1;
        if (child > end) {
          break loop000;
        }
        else if (child == end) {
          if (!(((Boolean)(edu.isi.stella.javalib.Native.funcall(predicate, null, new java.lang.Object [] {heap[child], value}))).booleanValue())) {
            break loop000;
          }
        }
        else {
          leftchild = heap[child];
          rightchild = heap[(child + 1)];
          if (((Boolean)(edu.isi.stella.javalib.Native.funcall(predicate, null, new java.lang.Object [] {leftchild, value}))).booleanValue()) {
            if (((Boolean)(edu.isi.stella.javalib.Native.funcall(predicate, null, new java.lang.Object [] {rightchild, value}))).booleanValue() &&
                ((Boolean)(edu.isi.stella.javalib.Native.funcall(predicate, null, new java.lang.Object [] {rightchild, leftchild}))).booleanValue()) {
              child = child + 1;
            }
          }
          else if (((Boolean)(edu.isi.stella.javalib.Native.funcall(predicate, null, new java.lang.Object [] {rightchild, value}))).booleanValue()) {
            child = child + 1;
          }
          else {
            break loop000;
          }
        }
        heap[parent] = (heap[child]);
        heap[child] = value;
        parent = child;
      }
    }
  }