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

/*
 * Duplicate member names - consider using --renamedupmembers true
 */
public final class am
implements jf,
Runnable {
    private final am a;
    private final String a;
    private final String b;
    private final Long c;
    private final String d;
    private final hj f;
    private final jq g;
    private byte[] a;
    private InputStream b;

    public boolean z_() {
        return true;
    }

    public boolean y_() {
        return true;
    }

    public boolean A_() {
        return false;
    }

    public final boolean a() {
        return this.b != null || this.a != null;
    }

    public void run() {
        if (this.a.a != null) {
            this.a.g.f(this.a.a);
        }
        if (this.a.b != null || this.a.c != null || this.a.d != null) {
            this.a.g.e(this.a.b);
        }
        if (this.a.a != null && this.a.a.length > 0) {
            this.a.g.t();
        }
    }

    public void a(DataOutput dataOutput) {
        lk lk2 = new lk(la.Y);
        if (this.a != null) {
            lk2.b(1, this.a);
        }
        if (this.b != null) {
            lk2.b(2, this.b);
        }
        if (this.a != null && this.a.length > 0) {
            lk lk3 = new lk(la.X);
            lk3.b(1, this.a);
            lk2.b(4, lk3);
        }
        if (this.c != null) {
            lk2.b(3, this.c);
        }
        if (this.d != null) {
            lk2.b(5, this.d);
        }
        if (false) {
            lk2.a(6, true);
        }
        dataOutput.writeInt(lk2.b());
        lk2.a((OutputStream)((Object)dataOutput));
    }

    public final byte[] b() {
        if (this.a == null && this.b != null) {
            try {
                this.a = ar.a(this.b);
            }
            catch (IOException iOException) {}
            this.b = null;
        }
        return this.a;
    }

    /*
     * Enabled aggressive block sorting
     */
    public boolean a(DataInput dataInput) {
        lk lk2 = ar.a(la.Z, dataInput);
        int n = ar.b(lk2, 1, -1);
        int n2 = ar.b(lk2.f(2), 1, -1);
        switch (n) {
            default: {
                if (n2 == 0) {
                    this.f.a(new bm(this, n));
                }
                ka.a(n2, this.f);
                return true;
            }
            case 0: {
                if (this.f == null) return true;
                this.f.a(new am(this));
                return true;
            }
        }
    }

    public static jq b(am am2) {
        return am2.g;
    }

    public int z() {
        return 38;
    }

    public am(InputStream inputStream) {
        this.b = inputStream;
    }

    public am(am am2) {
        this.a = am2;
    }

    public am(String string, String string2, Long l, String string3, byte[] byArray, hj hj2, jq jq2) {
        this.a = string;
        this.b = string2;
        this.c = l;
        this.d = string3;
        this.a = byArray;
        this.f = hj2;
        this.g = jq2;
    }
}

