}
    int reorder_vardown(int var) {        int n, level;        if (var < 0 || var >= bddvarnum)            return bdd_error(BDD_VAR);        if ((level = bddvar2level[var]) >= bddvarnum - 1)            return 0;        resizedInMakenode = false;        if (imatrixDepends(iactmtx, var, bddlevel2var[level + 1])) {            int toBeProcessed = reorder_downSimple(var);            levelData l = levels[var];            if (l.nodenum < (l.size) / 3                || l.nodenum >= (l.size * 3) / 2                && l.size < l.maxsize) {                reorder_swapResize(toBeProcessed, var);                reorder_localGbcResize(toBeProcessed, var);            } else {                reorder_swap(toBeProcessed, var);                reorder_localGbc(var);            }        }        /* Swap the var<->level tables */        n = bddlevel2var[level];        bddlevel2var[level] = bddlevel2var[level + 1];        bddlevel2var[level + 1] = n;        n = bddvar2level[var];        bddvar2level[var] = bddvar2level[bddlevel2var[level]];        bddvar2level[bddlevel2var[level]] = n;        /* Update all rename pairs */        bdd_pairs_vardown(level);        if (resizedInMakenode)            reorder_rehashAll();        return 0;    }