while (p[pj] !== p[p0 + m]) {
        m = t[t0 + m];
        if (m === -1) break;
    }