/*
 * Decompiled with CFR 0.152.
 */
public final class j
extends ep {
    private static final String c = lh.d(392);
    private static final String d = lh.d(560);
    private static final String e = lh.d(480);
    private static final String f = lh.d(91);
    private iy g;
    private hx h;
    private boolean i;
    private boolean j;
    public int b = 0;
    public mo a;

    public final cq d() {
        return jy.a;
    }

    public final cq e() {
        return jy.c;
    }

    private jp a(String string, w w2) {
        return dz.a(this.h, string, false, w2, this.s.k);
    }

    public j(eb eb2, hj hj2) {
        super(eb2, hj2);
    }

    public final void a() {
        this.l();
    }

    public final void b() {
        this.g = null;
        this.h = null;
    }

    public final void a(ht ht2) {
        this.g.a(ht2, 0, 0);
    }

    private static void a(String string) {
        me.a((short)56, "ir", string);
    }

    public final void b(mo mo2) {
        this.c(mo2);
        super.n();
    }

    public final void a(mo mo2) {
        this.b = 0;
        mo2.U();
        this.c(mo2);
        super.n();
    }

    public final boolean a(boolean bl2) {
        return this.a(this.g);
    }

    public final int a(nj nj2) {
        switch (this.g.b(nj2)) {
            case -3: {
                return this.a(pb.a(7));
            }
            case -2: {
                return 3;
            }
        }
        return 4;
    }

    public final void g_() {
        if (this.t) {
            int n = -1;
            if (this.h != null) {
                n = this.h.g(this.h.q());
            }
            this.l();
            if (n != -1) {
                this.h.l(this.h.h(n));
            }
        }
    }

    private void c(mo mo2) {
        this.a = mo2;
        boolean bl2 = mo2.l != null;
        this.i = bl2;
        bl2 = mo2.n != null;
        this.j = bl2;
    }

    private void l() {
        this.g = this.s.b(false, true);
        this.h = (hx)this.g.a();
        w w2 = jj.a();
        w w3 = jj.a(true);
        jj.a(true);
        new hc(0, 0, this.h.a(), Integer.MAX_VALUE, w2, c).u = true;
        new hc(0, 0, this.h.a(), Integer.MAX_VALUE, w2, c).d = -16777216;
        this.h.d(new hc(0, 0, this.h.a(), Integer.MAX_VALUE, w2, c));
        dz.a(this.h, 4);
        String string = ed.a(e, bz.a(this.a.k));
        if (!this.i) {
            dz.a(this.h, string, -16777216, w3, true);
        } else {
            this.a(string, w3);
        }
        string = ed.a(f, bz.a(this.a.m));
        if (this.j) {
            this.a(string, w3);
        } else {
            dz.a(this.h, string, -16777216, w3, true);
        }
        dz.a(this.h, 4);
        dz.a(this.h, d);
        this.h.B();
        this.h.s();
    }

    public final int a(pb pb2) {
        if (pb2.c != 8) {
            if (this.g.a(pb2) == -3) {
                int n;
                int n2 = ps.a(this.h, this.h.r());
                if (n2 == (n = this.i ? 0 : -1)) {
                    j.a("s");
                    this.b = 1;
                    return 1;
                }
                n = this.j ? (!this.i ? 0 : 1) : -1;
                if (n2 == n) {
                    j.a("s");
                    this.b = 2;
                    return 1;
                }
                j.a("c");
                this.b = 3;
                return 1;
            }
            return 3;
        }
        j.a("b");
        this.a.V();
        this.a.q();
        this.b = 4;
        return 1;
    }
}

