package org.bouncycastle.asn1;

/* JADX INFO: loaded from: E:\ios\vf_dex\classes4.dex */
public class DLTaggedObject extends org.bouncycastle.asn1.ASN1TaggedObject {
    DLTaggedObject(int i, int i2, int i3, org.bouncycastle.asn1.ASN1Encodable aSN1Encodable) {
        super(i, i2, i3, aSN1Encodable);
    }

    @Override // org.bouncycastle.asn1.ASN1TaggedObject
    org.bouncycastle.asn1.ASN1Sequence Q(org.bouncycastle.asn1.ASN1Primitive aSN1Primitive) {
        return new org.bouncycastle.asn1.DLSequence(aSN1Primitive);
    }

    @Override // org.bouncycastle.asn1.ASN1Primitive
    void o(org.bouncycastle.asn1.ASN1OutputStream aSN1OutputStream, boolean z) throws java.io.IOException {
        org.bouncycastle.asn1.ASN1Primitive aSN1PrimitiveW = this.d.j().w();
        boolean zO = O();
        if (z) {
            int i = this.b;
            if (zO || aSN1PrimitiveW.p()) {
                i |= 32;
            }
            aSN1OutputStream.t(true, i, this.c);
        }
        if (zO) {
            aSN1OutputStream.k(aSN1PrimitiveW.r(true));
        }
        aSN1PrimitiveW.o(aSN1OutputStream.e(), zO);
    }

    @Override // org.bouncycastle.asn1.ASN1Primitive
    boolean p() {
        return O() || this.d.j().w().p();
    }

    @Override // org.bouncycastle.asn1.ASN1Primitive
    int r(boolean z) {
        org.bouncycastle.asn1.ASN1Primitive aSN1PrimitiveW = this.d.j().w();
        boolean zO = O();
        int iR = aSN1PrimitiveW.r(zO);
        if (zO) {
            iR += org.bouncycastle.asn1.ASN1OutputStream.f(iR);
        }
        return iR + (z ? org.bouncycastle.asn1.ASN1OutputStream.h(this.c) : 0);
    }

    public DLTaggedObject(int i, org.bouncycastle.asn1.ASN1Encodable aSN1Encodable) {
        super(true, i, aSN1Encodable);
    }

    public DLTaggedObject(boolean z, int i, org.bouncycastle.asn1.ASN1Encodable aSN1Encodable) {
        super(z, i, aSN1Encodable);
    }

    @Override // org.bouncycastle.asn1.ASN1TaggedObject, org.bouncycastle.asn1.ASN1Primitive
    org.bouncycastle.asn1.ASN1Primitive w() {
        return this;
    }
}
