/*
 * Decompiled with CFR 0.152.
 */
public final class ac
extends t
implements mt {
    private static final String n = lh.d(106);
    private static final String o = lh.d(117);
    private static final String p = lh.d(113);
    private static final String u = lh.d(305);
    private bq v;
    private bj i;
    private gu j;
    private int k;
    private String l = lh.d(419);
    private int m = 0;
    private int w;
    public String h;

    public final void i() {
        this.k = 1;
        this.l = lh.d(116);
        this.m = 2;
        this.n();
    }

    public final void c_() {
        this.k = 0;
        this.l = lh.d(419);
        this.m = 1;
        this.n();
    }

    public final void a(String string) {
        this.k = 3;
        this.l = string;
        this.m = 1;
        this.n();
    }

    public final void f() {
        this.d = this.s.b(true, true);
        this.e = (hx)this.d.a();
        dz.a(this.e, this.l, this.a);
        if (this.k != 1) {
            if (this.k == 2) {
                dz.a(this.e, lh.d(33), this.b);
            }
            if (this.j.o() != 0) {
                for (int i = 0; i < this.j.o(); ++i) {
                    bj bj2 = this.i.a(i, false);
                    String string = bj2 instanceof mo ? "\u0001\ued16 " + bj2.v() : bj2.v();
                    boolean bl2 = this.i.a(i, false) instanceof mo;
                    hx hx2 = this.e;
                    boolean bl3 = this.k == 0;
                    jp jp2 = dz.a(hx2, string, bl3, pt.a(this.b), this.s.k);
                    if (this.k != 3 || !bl2) continue;
                    jp2.e = false;
                }
            } else {
                dz.a(this.e, lh.d(4), this.b);
                dz.a(this.e, "", this.b);
                dz.a(this.e, lh.d(105), this.b);
                dz.a(this.e, "", this.b);
                this.a(u, 4);
            }
        } else {
            bj bj3 = this.i.b();
            dz.a(this.e, bj3.v(), this.b);
            this.a(o, 4);
            this.a(p, 4);
            this.a(n, 4);
        }
        this.e.s();
        this.e.B();
    }

    public final int a(pb pb2) {
        if (pb2.c != 8) {
            int n = this.e.a(pb2);
            jp jp2 = (jp)this.e.q();
            this.f = jp2.c();
            this.g = this.e.g(jp2) - this.m;
            switch (n) {
                case -3: {
                    if (this.k != 1) {
                        if (this.k != 2) {
                            if (this.j.o() == 0 && this.f.equals(u)) {
                                this.w = 17;
                                break;
                            }
                            if (this.i.j() != null) {
                                me.a((short)9, this.i.j().a().toString(), String.valueOf(this.i.j));
                            }
                            this.j.c("v", this.g);
                            this.i.b(this.g);
                            this.w = 1;
                            break;
                        }
                        if (this.j.a(this.i.j, this.g)) {
                            this.i.b(this.g);
                            this.h = lh.d(114);
                        }
                        this.w = 1;
                        break;
                    }
                    if (this.f.equals(ac.n)) {
                        if (this.j.c(this.i.j)) {
                            this.h = lh.d(107);
                            this.i.b(-1);
                        }
                        this.w = 1;
                        break;
                    }
                    if (!this.f.equals(o)) {
                        if (!this.f.equals(p)) break;
                        this.o();
                        this.k = 2;
                        this.l = lh.d(310);
                        this.m = 2;
                        this.n();
                        break;
                    }
                    this.v.a(this.i.b().v());
                    this.v.a();
                    break;
                }
                case -4: {
                    this.i.b(this.g);
                    this.o();
                    this.i();
                }
            }
            return this.w;
        }
        return 2;
    }

    public final void a(cq cq2, Object object) {
        String string;
        if (cq2.equals(jy.i) && (string = this.v.b().trim()).length() > 0) {
            this.i.b().c(string);
            if (this.j.a(string, this.i.j)) {
                this.h = lh.d(118);
            }
            this.w = 1;
        }
    }

    public ac(eb eb2) {
        super(eb2);
        this.i = bj.a();
        this.j = this.i.i;
        this.v = lh.k().i().a(this, lh.d(552), jy.i, jy.a);
    }

    public final void a() {
        super.a();
        this.h = null;
        this.w = 3;
    }

    public final boolean g() {
        return this.w == 1;
    }

    public final boolean j() {
        return this.g() && this.k == 0;
    }
}

