package org.bouncycastle.asn1.ua;

/* JADX INFO: loaded from: E:\ios\vf_dex\classes4.dex */
public class DSTU4145BinaryField extends org.bouncycastle.asn1.ASN1Object {
    private int a;
    private int b;
    private int c;
    private int d;

    private DSTU4145BinaryField(org.bouncycastle.asn1.ASN1Sequence aSN1Sequence) {
        this.a = org.bouncycastle.asn1.ASN1Integer.y(aSN1Sequence.B(0)).E();
        if (aSN1Sequence.B(1) instanceof org.bouncycastle.asn1.ASN1Integer) {
            this.b = ((org.bouncycastle.asn1.ASN1Integer) aSN1Sequence.B(1)).E();
        } else {
            if (!(aSN1Sequence.B(1) instanceof org.bouncycastle.asn1.ASN1Sequence)) {
                throw new java.lang.IllegalArgumentException("object parse error");
            }
            org.bouncycastle.asn1.ASN1Sequence aSN1SequenceZ = org.bouncycastle.asn1.ASN1Sequence.z(aSN1Sequence.B(1));
            this.b = org.bouncycastle.asn1.ASN1Integer.y(aSN1SequenceZ.B(0)).E();
            this.c = org.bouncycastle.asn1.ASN1Integer.y(aSN1SequenceZ.B(1)).E();
            this.d = org.bouncycastle.asn1.ASN1Integer.y(aSN1SequenceZ.B(2)).E();
        }
    }

    public static org.bouncycastle.asn1.ua.DSTU4145BinaryField n(java.lang.Object obj) {
        if (obj instanceof org.bouncycastle.asn1.ua.DSTU4145BinaryField) {
            return (org.bouncycastle.asn1.ua.DSTU4145BinaryField) obj;
        }
        if (obj != null) {
            return new org.bouncycastle.asn1.ua.DSTU4145BinaryField(org.bouncycastle.asn1.ASN1Sequence.z(obj));
        }
        return null;
    }

    @Override // org.bouncycastle.asn1.ASN1Object, org.bouncycastle.asn1.ASN1Encodable
    public org.bouncycastle.asn1.ASN1Primitive j() {
        org.bouncycastle.asn1.ASN1EncodableVector aSN1EncodableVector = new org.bouncycastle.asn1.ASN1EncodableVector(2);
        aSN1EncodableVector.a(new org.bouncycastle.asn1.ASN1Integer(this.a));
        if (this.c == 0) {
            aSN1EncodableVector.a(new org.bouncycastle.asn1.ASN1Integer(this.b));
        } else {
            org.bouncycastle.asn1.ASN1EncodableVector aSN1EncodableVector2 = new org.bouncycastle.asn1.ASN1EncodableVector(3);
            aSN1EncodableVector2.a(new org.bouncycastle.asn1.ASN1Integer(this.b));
            aSN1EncodableVector2.a(new org.bouncycastle.asn1.ASN1Integer(this.c));
            aSN1EncodableVector2.a(new org.bouncycastle.asn1.ASN1Integer(this.d));
            aSN1EncodableVector.a(new org.bouncycastle.asn1.DERSequence(aSN1EncodableVector2));
        }
        return new org.bouncycastle.asn1.DERSequence(aSN1EncodableVector);
    }

    public int o() {
        return this.b;
    }

    public int p() {
        return this.c;
    }

    public int q() {
        return this.d;
    }

    public int r() {
        return this.a;
    }
}
