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

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

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

    public final void b(int n, int n2) {
        n = this.r - 4;
        n2 = this.d();
        int n3 = 4 + n2 + 4;
        this.d.d(n3, 4 + n2 / 2 - this.d.a.l() / 2, n - n3, this.d.s);
        this.m(Math.max(4 + n2 + 4, this.d.q + this.d.s));
    }

    public final void a(int n, int n2) {
        int n3 = this.d();
        int n4 = 4 + n3 + 4;
        n = Math.max(0, n - 4 - n4);
        n2 = Math.max(0, n2 - 8);
        this.d.e(n4, 4);
        this.d.a(n, n2);
        this.f(this.d.v() + 4, Math.max(n2, n3) + 8);
    }

    public final void b(ht ht2, int n, int n2) {
        int n3 = this.d();
        int n4 = n2 + 4;
        int n5 = n + 4;
        int n6 = this.b;
        boolean bl2 = this.c;
        boolean bl3 = this.t_();
        ht2.a(-1);
        ht2.a(n5, n4, n3, n3, n3, n3);
        ht2.a(-5000269);
        ht2.c(n5, n4, n3, n3, 45, 180);
        ht2.c(n5 - 1, n4, n3 + 2, n3, 45, 180);
        ht2.c(n5, n4 - 1, n3, n3 + 2, 45, 180);
        if (bl3) {
            a.a(ht2, n5, n4, n3, n3, 1, -11103760, -8278800, -2759427);
        }
        if (n6 != 0) {
            n6 = !bl2 ? -7566196 : -16777216;
            ht2.a(n6);
            n6 = n3 / 2 - 1;
            int n7 = n3 / 4 + 1;
            ht2.a(n7 + n5, n7 + n4, n6, n6, n6, n6);
        }
        hc hc2 = this.d;
        n6 = this.t_() ? -11103760 : this.a;
        hc2.d = n6;
        super.b(ht2, n, n2);
    }

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

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

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

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

    public final void q_() {
        if (!this.b) {
            this.e.b(this);
            this.b = true;
        }
        this.t();
    }

    public ic(w w2, String string, bq bq2) {
        this.d = new hc(w2, string);
        this.d(this.d);
        this.a = -16777216;
        this.e = bq2;
        bq2.a(this);
    }

    public final void s() {
        this.b = false;
    }
}

