/*
 * Decompiled with CFR 0.152.
 */
public final class gn
extends ep
implements mt {
    private final bq a;
    private final bq b;
    private final w m;
    private final w n;
    private jp c;
    private jp d;
    private jp e;
    private String f;
    private String g;
    private String h;
    private int i = 1;
    private int j = 3;
    private hx k;
    private ft l;

    public final boolean g() {
        return this.j != 3;
    }

    public final cq e() {
        if (!lh.t()) {
            return jy.c;
        }
        return null;
    }

    private void p() {
        this.l = this.s.b(false, true);
        this.k = (hx)this.l.a();
        new hc(4, 0, this.q(), this.n, lh.d(468)).d = -16777216;
        this.k.d(new hc(4, 0, this.q(), this.n, lh.d(468)));
        int n = pt.a(this.m);
        lc lc2 = this.s.k;
        this.c = new jp(0, 0, this.k.a(), n, 0, this.m, this.h, true, lc2);
        this.c.a(this.h);
        this.k.d(this.c);
        String string = this.g;
        if (ed.b(this.g)) {
            string = lh.d(448);
        }
        this.d = new jp(0, 0, this.k.a(), n, 0, this.m, string, true, lc2);
        this.k.d(this.d);
        this.e = new jp(0, 0, this.k.a(), n, 0, this.m, lh.d(449), false, lc2);
        this.e.e = this.l();
        this.k.d(this.e);
        this.k.B();
        this.m();
    }

    public final void a(cq cq2, Object object) {
        if (cq2.equals(jy.i)) {
            if (!object.equals(this.a)) {
                if (object.equals(this.b)) {
                    this.g = this.b.b();
                    if (ed.b(this.g)) {
                        this.d.a(lh.d(448));
                    } else {
                        this.d.a(this.g);
                        this.i = 3;
                    }
                }
            } else {
                this.f = this.a.b();
                this.c.a(this.f);
                this.h = this.f;
                this.i = 2;
            }
            this.e.e = this.l();
            this.m();
        }
    }

    /*
     * Enabled force condition propagation
     * Lifted jumps to return sites
     */
    public final int a(pb pb2) {
        int n = this.k.a(pb2);
        if (pb2.c != 8) {
            if (n != -3 && n != -4) {
                if (n != -2) return 4;
                return 3;
            }
            jp jp2 = (jp)this.k.r();
            if (jp2 != this.c) {
                if (jp2 != this.d) {
                    if (ed.b(this.g) || ed.b(this.f)) return 4;
                    new hy(this).start();
                    me.a((short)7);
                    this.j = 1;
                    return this.j;
                }
                if (!ed.b(this.g)) {
                    this.b.a(this.g);
                }
                this.b.a();
                return 4;
            }
            if (!ed.b(this.f)) {
                this.a.a(this.f);
            }
            this.a.a();
            return 4;
        }
        this.j = 2;
        return this.j;
    }

    public final void a(String string) {
        int n = string.indexOf(91);
        int n2 = string.indexOf(93);
        if (n >= 0 && n2 > n) {
            this.f = string.substring(0, n);
            this.h = string.substring(n + 1, n2);
        } else {
            this.f = string;
            this.h = string;
        }
        this.g = null;
    }

    private void m() {
        switch (this.i) {
            case 2: {
                this.d.z();
                this.k.b(this.d);
                break;
            }
            case 3: {
                this.e.z();
                this.k.b(this.e);
                break;
            }
            case 1: {
                this.c.z();
                this.k.b(this.c);
            }
        }
        this.k.d();
    }

    public final void b() {
        this.l = null;
        this.k = null;
        this.e = null;
        this.j = 3;
        this.b.a("");
    }

    public gn(eb eb2, hj hj2, lh lh2) {
        super(eb2, hj2);
        this.a = lh2.a(this, lh.d(470), jy.i, jy.a);
        this.a.b(8);
        this.b = lh2.a(this, lh.d(466), jy.i, jy.a);
        this.b.b(0x1000000);
        this.b.a(140);
        this.m = jj.a(false);
        this.n = jj.a();
    }

    public final int a(nj nj2) {
        if (this.l.b(nj2) == -3) {
            return this.a(pb.a(7));
        }
        return 4;
    }

    private boolean l() {
        return !ed.b(this.f) && !ed.b(this.g);
    }

    private int q() {
        return this.k.a();
    }

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

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

    public final void a() {
        this.g = null;
        this.i = 2;
        this.p();
    }

    public final void g_() {
        this.p();
    }

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

