/*
 * Decompiled with CFR 0.152.
 */
public final class hi
extends cu {
    private final int k;
    private static int[] f = new int[]{-4860423, 4347539, 155334};
    private static int[] g = new int[]{155334, 4347539, -4860423};
    private static int[][] h = new int[][]{{0xFFFFFF, f[0], f[0]}, {f[0], f[0], f[1]}, {f[0], f[1], f[2]}};
    private static int[][] i = new int[][]{{f[0], f[0]}, {f[1], f[1]}, {f[2], f[2]}};
    private static int[][] j = new int[][]{{g[2], g[1], g[0]}, {g[2], g[2], g[1]}, {0xFFFFFF, g[2], g[2]}};
    private int l;
    private int m;
    private int n;
    private int o = -14006936;
    private String[] w;
    private boolean x;
    public boolean e = true;

    public final boolean b() {
        return this.e;
    }

    public final int a() {
        return this.r - 14;
    }

    public final int a(nj nj2) {
        if (!nj2.j()) {
            return -1;
        }
        return -3;
    }

    public final int a(pb pb2) {
        if (!this.t_()) {
            return super.a(pb2);
        }
        switch (pb2.c) {
            default: {
                return super.a(pb2);
            }
            case 7: 
        }
        return -3;
    }

    public final void b(ht ht2, int n, int n2) {
        boolean bl2 = this.t_() && this.e;
        if (!bl2) {
            a.c(ht2, n, n2, this.r, this.s);
        } else {
            a.a(ht2, n, n2, this.r, this.s, h, f, i, j, g);
        }
        int n3 = this.e ? (!this.t_() ? 0xFCFCFC : 8104929) : -1;
        int n4 = this.e ? (!this.t_() ? 0xEEEEEE : 155334) : -1;
        int n5 = n2 + 4 + 3;
        a.a(ht2, n3, n4, n + 3, n2 + 3, this.r - 6, this.s - 6);
        w w2 = this.b;
        int n6 = n + 4 + 3;
        n4 = !bl2 ? (this.e ? this.o : -3618616) : -1;
        w2.i(n4);
        for (n3 = 0; n3 < this.w.length; ++n3) {
            n4 = n6 + (this.a() - this.b.a(this.w[n3])) / 2;
            this.b.a(ht2, this.w[n3], n4, n5 + n3 * this.b.l());
        }
        if (this.t_()) {
            ht2.a(12638193);
            ht2.c(n + 3, n2 + 2, this.r - 6, 1);
        }
    }

    public final void b(int n, int n2) {
        if (!this.x) {
            if (n != this.p) {
                this.e();
            }
            if (n2 != this.r) {
                this.w = this.b.a(this.a) <= this.a() ? new String[]{this.a} : a.a(this.a(), 6, this.b, this.a, 0, false);
                n = 0;
                this.x = true;
                this.m(this.b.l() * this.w.length + 8 + 6);
                for (n2 = 0; n2 < this.w.length; ++n2) {
                    int n3 = this.b.a(this.w[n2]);
                    if (n >= n3) continue;
                    n = n3;
                }
                this.x = true;
                this.l(n + 14);
                this.e();
            }
            return;
        }
        this.x = false;
    }

    public hi(int n, int n2, String string, w w2, int n3, int n4) {
        super(n, n2, 0, 0, 0, 0, w2);
        this.a = string;
        this.m = n3;
        this.n = n4;
        this.l = n;
        this.k = n4 - 8;
        this.l(Math.min(this.k, this.b.a(this.a) + 14));
    }

    private void e() {
        this.x = true;
        switch (this.m) {
            case 2: {
                this.j(this.l + this.n - this.r);
                return;
            }
            case 1: {
                this.j(this.l + (this.n - this.r) / 2);
                return;
            }
            case 0: {
                this.j(this.l);
            }
        }
    }
}

