/*
 * Decompiled with CFR 0.152.
 */
public class nh
extends fs {
    private final hc c;
    private int d;
    public boolean a = false;
    public boolean b = true;

    public final void c(int n) {
        this.d = n;
        this.t();
    }

    public final void b(boolean bl2) {
        this.a = bl2;
        this.t();
    }

    public final void b(ht ht2, int n, int n2) {
        int n3 = this.d();
        int n4 = n + 4;
        int n5 = n2 + 4;
        a.a(ht2, n4, n5, n3, this.a, this.b);
        if (this.t_()) {
            a.f(ht2, n4, n5, n3, n3);
        }
        hc hc2 = this.c;
        n3 = this.b ? (!this.t_() ? this.d : -11103760) : -7566196;
        hc2.d = n3;
        super.b(ht2, n, n2);
    }

    private void s() {
        boolean bl2 = !this.a;
        this.b(bl2);
    }

    public final int a(pb pb2) {
        if (this.b && pb2.c == 7) {
            this.s();
            return -2;
        }
        return super.a(pb2);
    }

    public final int b(nj nj2, int n, int n2) {
        if (this.b && nj2.j()) {
            this.s();
            return -2;
        }
        return -1;
    }

    public final int i() {
        int n = this.c.i();
        if (n != Integer.MAX_VALUE) {
            return Math.max(this.d(), n) + 8;
        }
        return Integer.MAX_VALUE;
    }

    public final int h() {
        int n = this.c.h();
        if (n != Integer.MAX_VALUE) {
            return 4 + this.d() + 4 + n + 4;
        }
        return Integer.MAX_VALUE;
    }

    private void d(int n) {
        int n2 = 4 + this.d() + 4;
        int n3 = Math.max(0, n - 4 - n2);
        this.c.e(n2, 4);
        this.c.l(n3);
        this.f(n, Math.max(this.d(), this.c.s) + 8);
    }

    public nh(w w2, String string) {
        this.c = new hc(w2, string);
        this.d(this.c);
        this.d = -16777216;
    }

    public final int d() {
        return this.c.a.l() - 4;
    }

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

    public final void b(int n, int n2) {
        this.d(this.r);
    }

    public final void a(int n, int n2) {
        this.d(n);
    }
}

