package com.google.android.recaptcha.internal;

import Z0.o;
import java.io.Serializable;
import java.util.Iterator;
import java.util.Locale;

/* JADX INFO: loaded from: classes3.dex */
public abstract class zzle implements Iterable, Serializable {
    public static final zzle zzb = new zzlc(zznl.zzb);
    private int zza = 0;

    static {
        int i6 = zzks.zza;
    }

    public static int zzi(int i6, int i7, int i8) {
        int i9 = i7 - i6;
        if ((i6 | i7 | i9 | (i8 - i7)) >= 0) {
            return i9;
        }
        if (i6 < 0) {
            throw new IndexOutOfBoundsException(o.j(i6, "Beginning index: ", " < 0"));
        }
        if (i7 < i6) {
            throw new IndexOutOfBoundsException(a.i(i6, i7, "Beginning index larger than ending index: ", ", "));
        }
        throw new IndexOutOfBoundsException(a.i(i7, i8, "End index: ", " >= "));
    }

    public static zzle zzk(byte[] bArr, int i6, int i7) {
        zzi(i6, i6 + i7, bArr.length);
        byte[] bArr2 = new byte[i7];
        System.arraycopy(bArr, i6, bArr2, 0, i7);
        return new zzlc(bArr2);
    }

    public abstract boolean equals(Object obj);

    public final int hashCode() {
        int iZzf = this.zza;
        if (iZzf == 0) {
            int iZzd = zzd();
            iZzf = zzf(iZzd, 0, iZzd);
            if (iZzf == 0) {
                iZzf = 1;
            }
            this.zza = iZzf;
        }
        return iZzf;
    }

    @Override // java.lang.Iterable
    public final /* synthetic */ Iterator iterator() {
        return new zzkx(this);
    }

    public final String toString() {
        Locale locale = Locale.ROOT;
        String hexString = Integer.toHexString(System.identityHashCode(this));
        return a.n(o.s(zzd(), "<ByteString@", hexString, " size=", " contents=\""), zzd() <= 50 ? zzpg.zza(this) : zzpg.zza(zzg(0, 47)).concat("..."), "\">");
    }

    public abstract byte zza(int i6);

    public abstract byte zzb(int i6);

    public abstract int zzd();

    public abstract void zze(byte[] bArr, int i6, int i7, int i8);

    public abstract int zzf(int i6, int i7, int i8);

    public abstract zzle zzg(int i6, int i7);

    public abstract void zzh(zzkw zzkwVar);

    public final int zzj() {
        return this.zza;
    }

    public final byte[] zzl() {
        int iZzd = zzd();
        if (iZzd == 0) {
            return zznl.zzb;
        }
        byte[] bArr = new byte[iZzd];
        zze(bArr, 0, 0, iZzd);
        return bArr;
    }
}
