for (v = dis.first; v <= dis.last; v++)
for (v = dis.firstVar; v <= dis.lastVar; v++)
    BddTree reorder_sift(BddTree t) {        BddTree dis, seq[];        sizePair[] p;        int n, num;        for (dis = t, num = 0; dis != null; dis = dis.next)            dis.pos = num++;        p = new sizePair[num];        seq = new BddTree[num];        for (dis = t, n = 0; dis != null; dis = dis.next, n++) {            int v;            /* Accumulate number of nodes for each block */            p[n].val = 0;            for (v = dis.first; v <= dis.last; v++)                p[n].val -= levels[v].nodenum;            p[n].block = dis;        }        /* Sort according to the number of nodes at each level */        Arrays.sort(p, 0, num, new Comparator() {            public int compare(Object o1, Object o2) {                return siftTestCmp(o1, o2);            }        });        /* Create sequence */        for (n = 0; n < num; n++)            seq[n] = p[n].block;        /* Do the sifting on this sequence */        t = reorder_sift_seq(t, seq, num);        free(seq);        free(p);        return t;    }