/*
 * Decompiled with CFR 0.152.
 */
import java.io.IOException;

public final class ab
extends ep
implements mt {
    private final bq i;
    private final bq j;
    private final bq k;
    private final w m;
    private final w n;
    private final w o;
    private final ka u;
    private int A;
    private ft a;
    private hx b;
    private jp c;
    private hi d;
    private jp e;
    private jp f;
    private jp g;
    private jp h;
    private int l = 0;
    private int p = 3;
    private String v;
    private String w;
    private String x;
    private String y;
    private le z;

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

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

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

    private boolean l() {
        return !ed.b(this.v) && !ed.b(this.w);
    }

    /*
     * Enabled aggressive block sorting
     */
    public final int a(pb pb2) {
        block21: {
            int n;
            block17: {
                block18: {
                    block19: {
                        gm gm2;
                        block20: {
                            n = this.b.a(pb2);
                            if (n != -3) break block17;
                            gm2 = this.b.r();
                            if (gm2 == this.e) break block18;
                            if (gm2 == this.f) break block19;
                            if (gm2 != this.g) break block20;
                            if (this.y == null) {
                                this.k.a("");
                            } else {
                                this.k.a(this.y);
                            }
                            this.k.a();
                            break block21;
                        }
                        if (gm2 == this.h) {
                            if (this.l()) {
                                this.p = 1;
                                return 1;
                            }
                            break block21;
                        } else {
                            if (gm2 == this.c) {
                                this.A = 2;
                                this.p();
                                return 3;
                            }
                            if (gm2 == this.d) {
                                this.A = 1;
                                this.q();
                                return 3;
                            }
                        }
                        break block21;
                    }
                    if (this.w == null) {
                        this.j.a("");
                    } else {
                        this.j.a(this.w);
                    }
                    this.j.a();
                    return 3;
                }
                if (this.v == null) {
                    this.i.a("");
                } else {
                    this.i.a(this.v);
                }
                this.i.a();
                return 3;
            }
            if (n == -2) {
                return 3;
            }
        }
        if (pb2.c != 8 && pb2.c != 5) {
            return 4;
        }
        if (this.A == 2) {
            this.A = 1;
            this.q();
            return 3;
        }
        this.p = 2;
        return 2;
    }

    public final void a(cq cq2, Object object) {
        object = (jp)this.b.r();
        if (cq2.equals(jy.i)) {
            if (object != this.e) {
                if (object != this.f) {
                    if (object == this.g) {
                        this.y = this.k.b();
                        this.g.a(this.y);
                        this.l = 2;
                    }
                } else {
                    this.w = this.j.b();
                    this.f.a("*******");
                    this.l = this.z != null ? 2 : 3;
                }
            } else {
                this.v = this.i.b();
                this.e.a(this.v);
                this.l = 1;
            }
            this.h.e = this.l();
            this.r();
        }
    }

    private void q() {
        this.a = this.s.b(false, true);
        this.b = (hx)this.a.a();
        int n = pt.a(this.o);
        lc lc2 = this.s.k;
        new hc(4, 0, this.b.a(), this.n, lh.d(463)).d = -16777216;
        this.b.d(new hc(4, 0, this.b.a(), this.n, lh.d(463)));
        hx hx2 = this.b;
        w w2 = this.o;
        dr dr2 = new dr(true, 4);
        try {
            le le2 = lh.k().g().a("/google_logo.png");
            dr2.d(new oe(0, 0, le2));
        }
        catch (IOException iOException) {
            new hc(4, 0, this.n, "Google").d = -16777216;
            dr2.d(new hc(4, 0, this.n, "Google"));
        }
        new hc(4, 0, w2, lh.d(460)).d = -16777216;
        dr2.d(new hc(4, 0, w2, lh.d(460)));
        dr2.l(this.b.a());
        hx2.d(dr2);
        new hc(4, 0, this.b.a(), this.m, lh.d(462)).d = -16777216;
        this.b.d(new hc(4, 0, this.b.a(), this.m, lh.d(462)));
        hx2 = this.b;
        w2 = this.o;
        dr2 = new ah(this, false, 0);
        String string = this.v;
        if (string == null) {
            string = lh.d(97);
        }
        String string2 = "*******";
        this.e = new jp(0, 0, 0, n, 0, w2, string, false, lc2);
        dr2.d(this.e);
        if (this.w == null) {
            string2 = lh.d(96);
        }
        this.f = new jp(0, 0, 0, n, 0, w2, string2, false, lc2);
        dr2.d(this.f);
        if (this.z != null) {
            dr2.d(new oe(0, 0, this.z));
            this.g = new jp(0, 0, 0, n, 0, w2, lh.d(27), false, lc2);
            dr2.d(this.g);
        }
        this.h = new jp(0, 0, 0, n, 0, w2, lh.d(461), false, lc2);
        this.h.e = this.l();
        dr2.d(this.h);
        this.c = new jp(0, 0, 0, n, 0, w2, lh.d(252), false, lc2);
        dr2.d(this.c);
        dr2.a = true;
        dr2.l(this.b.a());
        hx2.d(dr2);
        this.r();
        this.b.B();
    }

    private void m() {
        this.a = this.s.b(false, true);
        this.b = (hx)this.a.a();
        new hc(4, 0, this.b.a(), this.m, lh.d(295)).d = -16777216;
        this.b.d(new hc(4, 0, this.b.a(), this.m, lh.d(295)));
        this.b.B();
    }

    private void p() {
        this.a = this.s.b(false, true);
        this.b = (hx)this.a.a();
        dz.a(this.b, lh.d(258), this.n);
        dz.b(this.b, lh.d(255));
        this.d = dz.a(this.b, lh.d(260));
        this.d.z();
        this.b.B();
    }

    private void r() {
        switch (this.l) {
            case 0: {
                this.e.z();
                this.b.b(this.f);
                break;
            }
            case 3: {
                this.h.z();
                this.b.b(this.h);
                break;
            }
            case 2: {
                this.g.z();
                this.b.b(this.g);
                break;
            }
            case 1: {
                this.f.z();
                this.b.b(this.f);
            }
        }
        this.b.d();
    }

    public final void g_() {
        switch (this.A) {
            case 0: {
                this.m();
                return;
            }
            case 2: {
                this.p();
            }
            default: {
                return;
            }
            case 1: 
        }
        this.q();
    }

    public final void a() {
        if (ka.a()) {
            ka.c();
        }
        this.v = null;
        this.w = null;
        this.y = null;
        this.z = null;
        this.x = null;
        this.m();
        this.A = 0;
        gu.a(new aq(this));
    }

    public final void f() {
        if (this.p == 1) {
            this.u.a(this.v, this.w, this.y, this.x);
        }
        this.w = null;
    }

    public ab(eb eb2, ka ka2, hj hj2, lh lh2) {
        super(eb2, hj2);
        this.u = ka2;
        this.i = lh2.a(this, lh.d(573), jy.i, jy.a);
        this.i.b(2);
        this.j = lh2.a(this, lh.d(355), jy.i, jy.a);
        this.j.b(65536);
        this.k = lh2.a(this, lh.d(27), jy.i, jy.a);
        this.m = jj.a(false);
        this.n = jj.a();
        this.o = jj.c();
    }

    public final void b() {
        this.a = null;
        this.b = null;
        this.c = null;
        this.d = null;
        this.e = null;
        this.f = null;
        this.h = null;
        this.l = 0;
        this.v = null;
        this.w = null;
        this.p = 3;
        this.A = 0;
    }

    public static void a(ab ab2) {
        ab2.q();
    }

    public static le a(ab ab2, le le2) {
        ab2.z = le2;
        return le2;
    }

    public static String a(ab ab2, String string) {
        ab2.x = string;
        return string;
    }

    public static int a(ab ab2, int n) {
        ab2.A = n;
        return n;
    }

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

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

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

