if (ISCONST(l) && ISCONST(r))
if (ISCONST(l) && ISCONST(r)) {
    int appuni_rec(int l, int r, int var) {        OpCache3Entry entry;        int res;        int LEVEL_l, LEVEL_r, LEVEL_var;        LEVEL_l = LEVEL(l);        LEVEL_r = LEVEL(r);        LEVEL_var = LEVEL(var);        if (LEVEL_l > LEVEL_var && LEVEL_r > LEVEL_var) {            // Skipped a quantified node, answer is zero.            return BDDZERO;        }        if (ISCONST(l) && ISCONST(r))            res = oprres[appexop][(l << 1) | r];        else if (ISCONST(var)) {            int oldop = applyop;            applyop = appexop;            switch (applyop) {            case bddop_and: res = and_rec(l, r); break;            case bddop_or: res = or_rec(l, r); break;            default: res = apply_rec(l, r); break;            }            applyop = oldop;            return res;        }        entry = appexcache.lookup(APPEXHASH(l, r, appexop));        if ((res = appexcache.get(entry, l, r, appexid)) >= 0) {            return res;        }        int lev;        if (LEVEL_l == LEVEL_r) {            if (LEVEL_l == LEVEL_var) {                lev = -1;                var = HIGH(var);            } else {                lev = LEVEL_l;            }            PUSHREF(appuni_rec(LOW(l), LOW(r), var));            PUSHREF(appuni_rec(HIGH(l), HIGH(r), var));            lev = LEVEL_l;        } else if (LEVEL_l < LEVEL_r) {            if (LEVEL_l == LEVEL_var) {                lev = -1;                var = HIGH(var);            } else {                lev = LEVEL_l;            }            PUSHREF(appuni_rec(LOW(l), r, var));            PUSHREF(appuni_rec(HIGH(l), r, var));        } else {            if (LEVEL_r == LEVEL_var) {                lev = -1;                var = HIGH(var);            } else {                lev = LEVEL_r;            }            PUSHREF(appuni_rec(l, LOW(r), var));            PUSHREF(appuni_rec(l, HIGH(r), var));        }        if (lev == -1) {            int r2 = READREF(2), r1 = READREF(1);            switch (applyop) {            case bddop_and: res = and_rec(r2, r1); break;            case bddop_or: res = or_rec(r2, r1); break;            default: res = apply_rec(r2, r1); break;            }        } else {            res = bdd_makenode(lev, READREF(2), READREF(1));        }        POPREF(2);        appexcache.set(entry, l, r, appexid, res);        return res;    }