package g2;

import java.io.IOException;

/* JADX INFO: compiled from: ASN1ApplicationSpecific.java */
/* JADX INFO: loaded from: classes.dex */
public abstract class a extends s {

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    protected final boolean f4668e;

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    protected final int f4669f;

    /* JADX INFO: renamed from: g, reason: collision with root package name */
    protected final byte[] f4670g;

    a(boolean z2, int i3, byte[] bArr) {
        this.f4668e = z2;
        this.f4669f = i3;
        this.f4670g = i2.a.c(bArr);
    }

    @Override // g2.s
    boolean h(s sVar) {
        if (!(sVar instanceof a)) {
            return false;
        }
        a aVar = (a) sVar;
        return this.f4668e == aVar.f4668e && this.f4669f == aVar.f4669f && i2.a.a(this.f4670g, aVar.f4670g);
    }

    @Override // g2.m
    public int hashCode() {
        boolean z2 = this.f4668e;
        return i2.a.d(this.f4670g) ^ ((z2 ? 1 : 0) ^ this.f4669f);
    }

    @Override // g2.s
    void i(q qVar, boolean z2) throws IOException {
        qVar.m(z2, this.f4668e ? 96 : 64, this.f4669f, this.f4670g);
    }

    @Override // g2.s
    int j() throws IOException {
        return y1.b(this.f4669f) + y1.a(this.f4670g.length) + this.f4670g.length;
    }

    @Override // g2.s
    public boolean m() {
        return this.f4668e;
    }

    public int p() {
        return this.f4669f;
    }

    public String toString() {
        StringBuffer stringBuffer = new StringBuffer();
        stringBuffer.append("[");
        if (m()) {
            stringBuffer.append("CONSTRUCTED ");
        }
        stringBuffer.append("APPLICATION ");
        stringBuffer.append(Integer.toString(p()));
        stringBuffer.append("]");
        if (this.f4670g != null) {
            stringBuffer.append(" #");
            stringBuffer.append(j2.b.c(this.f4670g));
        } else {
            stringBuffer.append(" #null");
        }
        stringBuffer.append(" ");
        return stringBuffer.toString();
    }
}
