final int method1803(String s, int i, int j, int k, int l, int i1, int j1,
            int k1, int l1, Random random, int i2, int ai[]) {
        if (s == null) {
            return 0;
        }
        random.setSeed(i2);
        method1805(i1, j1, 192 + (random.nextInt() & 0x1f));
        int j2 = s.length();
        int ai1[] = new int[j2];
        int k2 = 0;
        for (int l2 = 0; l2 < j2; l2++) {
            ai1[l2] = k2;
            if ((random.nextInt() & 3) == 0) {
                k2++;
            }
        }

        int i3 = i;
        int j3 = j + anInt4800;
        int k3 = -1;
        if (l1 == 1) {
            j3 += (l - anInt4800 - anInt4789) / 2;
        } else if (l1 == 2) {
            j3 = (j + l) - anInt4789;
        }
        if (k1 == 1) {
            k3 = method1820(s) + k2;
            i3 += (k - k3) / 2;
        } else if (k1 == 2) {
            k3 = method1820(s) + k2;
            i3 += k - k3;
        }
        method1812(s, i3, j3, ai1, null);
        if (ai != null) {
            if (k3 == -1) {
                k3 = method1820(s) + k2;
            }
            ai[0] = i3;
            ai[1] = j3 - anInt4800;
            ai[2] = k3;
            ai[3] = anInt4800 + anInt4789;
        }
        return k2;
    }