/*
 * Decompiled with CFR 0.152.
 */
import java.io.DataInput;
import java.io.DataOutput;
import java.io.OutputStream;

/*
 * Duplicate member names - consider using --renamedupmembers true
 */
public class ko
implements fw,
jf,
v,
jq,
Runnable {
    private final bu a;
    private final lh a;
    private final ek a;
    private final jt a;
    private final jt b;
    private ek b;
    private bu b;
    private hj c;
    private aq d;

    public static aq a(ko ko2) {
        return ko2.d;
    }

    public int z() {
        return 54;
    }

    public boolean A_() {
        return false;
    }

    public boolean y_() {
        return true;
    }

    public boolean z_() {
        return true;
    }

    public static int a(long l, long l2) {
        if (l <= l2) {
            if (l >= l2) {
                return 0;
            }
            return 1;
        }
        return -1;
    }

    public ko(String string, bu bu2) {
        this(string, bu2, "ds");
        this.b = bu2;
    }

    public ko(String string, bu bu2, String string2) {
        this.a = bu2;
    }

    public ko(ek ek2, ek ek3, hj hj2, aq aq2) {
        this.a = ek2;
        this.b = ek3;
        this.c = hj2;
        this.d = aq2;
    }

    public ko(hj hj2, lh lh2) {
        this.c = hj2;
        this.a = lh2;
    }

    public ko(jt jt2, jt jt3) {
        this.b = jt2;
        this.a = jt3;
    }

    public void run() {
        this.a.a(lh.d(176), 2);
    }

    public void a() {
        this.c.a(this);
    }

    public void t() {
        throw new IllegalStateException();
    }

    public void f(String string) {
        throw new IllegalStateException();
    }

    public void e(String string) {
        this.a.b.a(string);
        this.a.b(string);
        this.a.b.a(0);
        bu.b(jt.b(this.b));
    }

    public void c(int n) {
        switch (n) {
            case 7: {
                jt.b((jt)this.b).w.a(lh.d(205), 0);
                return;
            }
            case 3: {
                jt.b((jt)this.b).w.a(lh.d(178), 0);
                return;
            }
        }
        jt.b((jt)this.b).w.a(lh.d(151), 0);
    }

    private static iv a(jt jt2) {
        if (jt2 != null && jt2.b != null && jt2.b.a() != null) {
            return jt2.b.a();
        }
        return null;
    }

    public boolean a(DataInput dataInput) {
        lk lk2 = ar.a(la.aj, dataInput);
        int n = ar.b(lk2, 1, -1);
        int n2 = ar.b(lk2.f(2), 1, -1);
        switch (n) {
            default: {
                if (this.d != null) {
                    this.c.a(new ny(this));
                }
                ka.a(n2, this.c);
                return true;
            }
            case 0: 
        }
        if (this.d != null) {
            this.c.a(new ak(this));
        }
        return true;
    }

    public void a(DataOutput dataOutput) {
        int n;
        int n2;
        lk lk2 = new lk(la.ai);
        if (this.a != null) {
            n2 = this.a.a;
            for (n = 0; n < n2; ++n) {
                lk2.a(1, this.a.a(n));
            }
        }
        if (this.b != null) {
            n2 = this.b.a;
            for (n = 0; n < n2; ++n) {
                lk2.a(2, this.b.a(n));
            }
        }
        dataOutput.writeInt(lk2.b());
        lk2.a((OutputStream)((Object)dataOutput));
    }

    /*
     * Enabled aggressive block sorting
     */
    public int a(jt jt2, jt jt3) {
        iv iv2 = ko.a(this.b.x());
        iv iv3 = ko.a(jt2);
        iv iv4 = ko.a(jt3);
        if (iv3 != null && iv4 != null) {
            long l;
            if (iv2 == null) return jt2.b.v().compareTo(jt3.b.v());
            long l2 = iv3.b(iv2);
            if (l2 < (l = iv4.b(iv2))) return -1;
            if (l2 > l) return 1;
            return jt2.b.v().compareTo(jt3.b.v());
        }
        if (iv3 != null) {
            return -1;
        }
        if (iv4 != null) return 1;
        return jt2.b.v().compareTo(jt3.b.v());
    }

    /*
     * Enabled force condition propagation
     * Lifted jumps to return sites
     */
    public final int a(Object object, Object object2) {
        int n = (Integer)object;
        int n2 = (Integer)object2;
        if (n == 0) return -1;
        if (n2 == 0) return 1;
        jt jt2 = this.a.a(n);
        jt jt3 = this.a.a(n2);
        if (!jt2.h()) {
            if (jt3.h()) return 1;
            return jt2.b.v().compareTo(jt3.b.v());
        }
        if (!jt3.h()) return -1;
        return this.a(jt2, jt3);
    }
}

