/*
 * Decompiled with CFR 0.152.
 */
public final class fc
extends t
implements mt {
    private final lh H;
    public final String[] h;
    public final int[] i;
    public final bq l;
    public final bq m;
    public final bq n;
    private boolean I;
    public int A;
    public String B;
    public String C;
    public String D;
    public boolean E = true;
    public aq F;
    public int G;
    public hx j;
    public jp[] k;
    public oe o;
    public jp p;
    public jp u;
    public jp v;
    public jp w;
    public hi x;
    public le y;
    public String z;

    public fc(eb eb2, lh lh2, lh lh3) {
        super(eb2);
        this.H = lh2;
        this.A = -1;
        this.l = lh3.a(this, "", jy.i, jy.a);
        this.n = lh3.a(this, "", jy.i, jy.a);
        this.n.b(4);
        this.m = lh3.a(this, "", jy.i, jy.a);
        this.m.b(2);
        this.h = new String[10];
        this.i = new int[10];
        this.h[0] = lh.d(20);
        this.i[0] = 1;
        this.h[1] = lh.d(21);
        this.i[1] = 2;
        this.h[2] = lh.d(394);
        this.i[2] = 3;
        this.h[3] = lh.d(395);
        this.i[3] = 4;
        this.h[4] = lh.d(393);
        this.i[4] = 5;
        this.h[5] = lh.d(344);
        this.i[5] = 6;
        this.h[6] = lh.d(434);
        this.i[6] = 7;
        this.h[7] = lh.d(100);
        this.i[7] = 8;
        this.h[8] = lh.d(276);
        this.i[8] = 9;
        this.h[9] = lh.d(350);
        this.i[9] = 0;
    }

    public final boolean p_() {
        return true;
    }

    public final cq e() {
        return null;
    }

    private jp a(hx hx2, String string) {
        return dz.a(hx2, string, false, this.s.k);
    }

    private void b(boolean bl2) {
        this.p.e = bl2;
        this.u.e = bl2;
        this.v.e = bl2;
        this.w.e = bl2;
        this.x.e = bl2;
        hi hi2 = this.x;
        bl2 = bl2 && this.q() && !this.l();
        hi2.e = bl2;
    }

    public final cq d() {
        if (this.G != 2) {
            return jy.b;
        }
        return jy.g;
    }

    public final boolean a(boolean bl2) {
        return super.a(bl2) && this.I;
    }

    private boolean l() {
        return this.F != null;
    }

    private boolean q() {
        return this.A >= 0 && !ed.b(this.B) && !ed.b(this.C) && !ed.b(this.D);
    }

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

    public final void b() {
        this.d = null;
        this.e = null;
        this.j = null;
        this.k = null;
        this.o = null;
        this.p = null;
        this.u = null;
        this.v = null;
        this.w = null;
        this.x = null;
        this.y = null;
    }

    public final void a() {
        this.G = 0;
        this.E = false;
        this.I = false;
        this.F = null;
        this.D = null;
        this.y = null;
        this.A = -1;
        this.B = null;
        this.F = aq.a(this);
        ck.e().a(this.F);
        this.f();
    }

    private static String a(String string, boolean bl2) {
        if (string != null) {
            if (bl2 && "ja".equals(lh.o())) {
                string = az.a(string);
            }
            return ed.a(string, true, true, false);
        }
        return "";
    }

    private static void a(bq bq2, String string) {
        if (ed.b(string)) {
            bq2.a("");
        } else {
            bq2.a(string);
        }
        bq2.a();
    }

    /*
     * Enabled aggressive block sorting
     */
    private void a(int n) {
        this.G = n;
        switch (this.G) {
            case 1: {
                this.d.b(this.e);
            }
            default: {
                return;
            }
            case 2: {
                this.d.b(this.j);
                if (this.A < 0) return;
                this.k[this.A].z();
                return;
            }
        }
    }

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

    public final void a(ht ht2) {
        if (!this.E) {
            this.I = false;
            this.d.a(ht2, 0, 0);
            return;
        }
        this.o();
    }

    public final void a(cq object, Object object2) {
        if (object == jy.i) {
            object = (jp)this.e.r();
            if (object != this.u) {
                if (object != this.v) {
                    if (object == this.w) {
                        this.D = fc.a(this.n.b(), true);
                    }
                } else {
                    this.C = fc.a(this.m.b(), true);
                }
            } else {
                this.B = fc.a(this.l.b(), false);
            }
            this.r();
            this.I = true;
        }
    }

    /*
     * Unable to fully structure code
     */
    public final void a(aq var1_1) {
        block17: {
            block16: {
                block18: {
                    if (!var1_1.equals(this.F)) break block16;
                    this.F = null;
                    if (var1_1.e()) break block17;
                    var4_2 = var1_1.f();
                    var5_3 = var1_1.g();
                    var3_4 = false;
                    var2_5 = null;
                    switch (var4_2) {
                        case 2: {
                            switch (var5_3) {
                                case 2: {
                                    this.H.a(lh.d(86), 2);
                                    var2_5 = this.v;
                                    ** break;
                                }
                                case 1: {
                                    this.E = true;
                                    ** break;
                                }
                                case 0: {
                                    this.E = true;
                                    this.H.a(lh.d(509), 2);
                                    ** break;
                                }
                                default: {
                                    if (!var3_4) break block18;
                                }
                            }
                        }
                        case 3: {
                            var3_4 = true;
                            this.H.a(lh.d(370), 2);
                            var2_5 = this.w;
                            this.D = null;
                            ** break;
                        }
                        case 1: {
                            this.G = 1;
                            var3_4 = true;
                            this.f();
                            ** break;
                        }
                        case 0: {
                            this.E = true;
                        }
                    }
lbl37:
                    // 7 sources

                    if (!var3_4) break block18;
                    this.y = var1_1.h();
                    this.z = var1_1.i();
                }
                if (!this.E) {
                    this.r();
                    if (var2_5 != null) {
                        var2_5.z();
                    }
                }
                this.I = true;
            }
            return;
        }
        this.H.a(lh.d(452), 0);
        this.E = true;
    }

    private void r() {
        jp jp2 = this.p;
        String string = this.A >= 0 ? this.h[this.A] : lh.d(553);
        jp2.a(string);
        jp2 = this.u;
        string = !ed.b(this.B) ? this.B : lh.d(58);
        jp2.a(string);
        jp2 = this.v;
        string = !ed.b(this.C) ? this.C : lh.d(85);
        jp2.a(string);
        jp2 = this.w;
        string = !ed.b(this.D) ? this.D : lh.d(27);
        jp2.a(string);
        this.o.a(this.y);
        if (this.y != null) {
            this.o.a(this.y.a(), this.y.b());
        }
        boolean bl2 = !this.l();
        this.b(bl2);
    }

    public final void f() {
        this.d = this.s.b(false, false);
        hx hx2 = this.e = (hx)this.d.a();
        dz.a(hx2, lh.d(396), this.a);
        if (this.G != 0) {
            String string = ps.e();
            if (!ed.b(string)) {
                dz.a(hx2, string, this.b);
            }
            dz.a(hx2, "", this.b);
            this.p = this.a(hx2, "");
            this.u = this.a(hx2, "");
            this.v = this.a(hx2, "");
            this.w = this.a(hx2, "");
            this.o = new oe(null);
            dz.a(hx2, this.o);
            this.x = dz.a(hx2, lh.d(508));
            this.r();
        } else {
            dz.a(hx2, lh.d(578), this.b);
        }
        hx2 = this.j = ps.a(this.d);
        dz.a(hx2, lh.d(553), this.a);
        this.k = new jp[10];
        for (int i = 0; i < 10; ++i) {
            jp jp2;
            this.k[i] = jp2 = this.a(hx2, this.h[i]);
        }
        if (this.G != 0) {
            this.a(this.G);
        }
    }

    /*
     * Unable to fully structure code
     */
    public final int a(pb var1_1) {
        block11: {
            if (this.E) break block11;
            switch (this.G) {
                case 2: {
                    var2_2 = this.j.a(var1_1);
                    if (var2_2 != -3) ** GOTO lbl17
                    var3_4 = (cu)this.j.r();
                    for (var2_2 = 0; var2_2 < 10; ++var2_2) {
                        if (this.k[var2_2] != var3_4) {
                            continue;
                        }
                        ** GOTO lbl12
                    }
                    var2_2 = -1;
lbl12:
                    // 2 sources

                    this.A = var2_2;
                    this.r();
                    this.a(1);
lbl15:
                    // 4 sources

                    return 3;
lbl17:
                    // 1 sources

                    if (var2_2 == -2) ** GOTO lbl15
                    if (var1_1.c == 8) {
                        this.a(1);
                        return 3;
                    }
                    ** GOTO lbl47
                }
                case 1: {
                    var2_3 = this.e.a(var1_1);
                    if (var2_3 != -3) ** GOTO lbl44
                    var3_5 = (cu)this.e.r();
                    if (var3_5 == this.p) ** GOTO lbl42
                    if (var3_5 == this.u) ** GOTO lbl40
                    if (var3_5 == this.v) {
                        fc.a(this.m, this.C);
                        return 3;
                    }
                    if (var3_5 == this.w) ** GOTO lbl38
                    if (var3_5 != this.x) ** GOTO lbl46
                    if (this.F != null || !this.q()) ** GOTO lbl15
                    this.F = aq.a(this, ps.c(), ps.d(), ps.f(), this.i[this.A], this.h[this.A], this.C, this.B, this.z, this.D);
                    ck.e().a(this.F);
                    this.b(false);
                    return 3;
lbl38:
                    // 1 sources

                    fc.a(this.n, this.D);
                    return 3;
lbl40:
                    // 1 sources

                    fc.a(this.l, this.B);
                    return 3;
lbl42:
                    // 1 sources

                    this.a(2);
                    return 3;
lbl44:
                    // 1 sources

                    if (var2_3 != -2) ** break;
                    ** continue;
lbl46:
                    // 2 sources

                    if (var1_1.c == 8) break;
                }
lbl47:
                // 4 sources

                default: {
                    return 4;
                }
                case 0: {
                    if (var1_1.c != 8) ** GOTO lbl47
                }
            }
        }
        return 1;
    }
}

