package com.google.protobuf;

import java.util.logging.Level;
import java.util.logging.Logger;

/* JADX INFO: renamed from: com.google.protobuf.v, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes3.dex */
public abstract class AbstractC1335v extends O0 {

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public static final Logger f14361d = Logger.getLogger(AbstractC1335v.class.getName());

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public static final boolean f14362e = c1.f14253e;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public C1317l0 f14363c;

    public static int A(AbstractC1320n abstractC1320n) {
        int size = abstractC1320n.size();
        return E(size) + size;
    }

    public static int B(int i6) {
        if (i6 >= 0) {
            return E(i6);
        }
        return 10;
    }

    public static int C(String str) {
        int length;
        try {
            length = f1.c(str);
        } catch (e1 unused) {
            length = str.getBytes(Z.f14234a).length;
        }
        return E(length) + length;
    }

    public static int D(int i6) {
        return E(i6 << 3);
    }

    public static int E(int i6) {
        if ((i6 & (-128)) == 0) {
            return 1;
        }
        if ((i6 & (-16384)) == 0) {
            return 2;
        }
        if (((-2097152) & i6) == 0) {
            return 3;
        }
        return (i6 & (-268435456)) == 0 ? 4 : 5;
    }

    public static int F(long j4) {
        int i6;
        if (((-128) & j4) == 0) {
            return 1;
        }
        if (j4 < 0) {
            return 10;
        }
        if (((-34359738368L) & j4) != 0) {
            j4 >>>= 28;
            i6 = 6;
        } else {
            i6 = 2;
        }
        if (((-2097152) & j4) != 0) {
            i6 += 2;
            j4 >>>= 14;
        }
        return (j4 & (-16384)) != 0 ? i6 + 1 : i6;
    }

    public static int z(int i6, AbstractC1320n abstractC1320n) {
        return A(abstractC1320n) + D(i6);
    }

    public final void G(String str, e1 e1Var) throws H4.c {
        f14361d.log(Level.WARNING, "Converting ill-formed UTF-16. Your Protocol Buffer will not round trip correctly!", (Throwable) e1Var);
        byte[] bytes = str.getBytes(Z.f14234a);
        try {
            Y(bytes.length);
            y(bytes, 0, bytes.length);
        } catch (IndexOutOfBoundsException e6) {
            throw new H4.c(e6);
        }
    }

    public abstract void H(byte b5);

    public abstract void I(int i6, boolean z6);

    public abstract void J(byte[] bArr, int i6);

    public abstract void K(int i6, AbstractC1320n abstractC1320n);

    public abstract void L(AbstractC1320n abstractC1320n);

    public abstract void M(int i6, int i7);

    public abstract void N(int i6);

    public abstract void O(int i6, long j4);

    public abstract void P(long j4);

    public abstract void Q(int i6, int i7);

    public abstract void R(int i6);

    public abstract void S(int i6, InterfaceC1332t0 interfaceC1332t0, J0 j02);

    public abstract void T(InterfaceC1332t0 interfaceC1332t0);

    public abstract void U(int i6, String str);

    public abstract void V(String str);

    public abstract void W(int i6, int i7);

    public abstract void X(int i6, int i7);

    public abstract void Y(int i6);

    public abstract void Z(int i6, long j4);

    public abstract void a0(long j4);
}
