package com.google.crypto.tink.shaded.protobuf;

import defpackage.AbstractC2202;
import defpackage.AbstractC3815;
import defpackage.C0321;
import defpackage.C5500;
import defpackage.InterfaceC0420;
import defpackage.InterfaceC4538;
import java.io.IOException;

/* renamed from: com.google.crypto.tink.shaded.protobuf.ᵥᵯˎ, reason: contains not printable characters */
/* loaded from: classes3.dex */
public abstract class AbstractC0024 implements InterfaceC0420 {
    protected int memoizedHashCode;

    /* renamed from: ˇʼʤˎ, reason: contains not printable characters */
    public final byte[] m952() {
        try {
            int iMo855 = ((AbstractC0018) this).mo855(null);
            byte[] bArr = new byte[iMo855];
            C0321 c0321 = new C0321(iMo855, bArr);
            mo851(c0321);
            if (iMo855 - c0321.f1986 == 0) {
                return bArr;
            }
            throw new IllegalStateException("Did not write as much data as expected.");
        } catch (IOException e) {
            ᵨᴵᵺ.ᵪʩ(m954("byte array"), e);
            return null;
        }
    }

    /* renamed from: ˎˏʜʾ */
    public abstract void mo851(C0321 c0321);

    /* renamed from: ˏˋٴ, reason: contains not printable characters */
    public final C5500 m953() {
        try {
            int iMo855 = ((AbstractC0018) this).mo855(null);
            C5500 c5500 = AbstractC2202.f8641;
            byte[] bArr = new byte[iMo855];
            C0321 c0321 = new C0321(iMo855, bArr);
            mo851(c0321);
            if (c0321.f1983 - c0321.f1986 == 0) {
                return new C5500(bArr);
            }
            throw new IllegalStateException("Did not write as much data as expected.");
        } catch (IOException e) {
            ᵨᴵᵺ.ᵪʩ(m954("ByteString"), e);
            return null;
        }
    }

    /* renamed from: ˏᵙ, reason: contains not printable characters */
    public final String m954(String str) {
        return "Serializing " + getClass().getName() + " to a " + str + " threw an IOException (should never happen).";
    }

    /* renamed from: ᵥᵯˎ */
    public abstract int mo855(InterfaceC4538 interfaceC4538);

    /* renamed from: ᵻᵢﹳᵰ */
    public abstract AbstractC3815 mo860();
}
