package com.google.android.gms.internal.p002firebaseauthapi; /* loaded from: classes.dex */ public final class zzu { public static int zza(int i10, int i11, String str) { String zzb; if (i10 >= 0 && i10 < i11) { return i10; } if (i10 < 0) { zzb = zzac.zzb("%s (%s) must not be negative", "index", Integer.valueOf(i10)); } else { if (i11 < 0) { throw new IllegalArgumentException("negative size: " + i11); } zzb = zzac.zzb("%s (%s) must be less than size (%s)", "index", Integer.valueOf(i10), Integer.valueOf(i11)); } throw new IndexOutOfBoundsException(zzb); } public static int zzb(int i10, int i11, String str) { if (i10 < 0 || i10 > i11) { throw new IndexOutOfBoundsException(zzd(i10, i11, "index")); } return i10; } public static void zzc(int i10, int i11, int i12) { if (i10 < 0 || i11 < i10 || i11 > i12) { throw new IndexOutOfBoundsException((i10 < 0 || i10 > i12) ? zzd(i10, i12, "start index") : (i11 < 0 || i11 > i12) ? zzd(i11, i12, "end index") : zzac.zzb("end index (%s) must not be less than start index (%s)", Integer.valueOf(i11), Integer.valueOf(i10))); } } private static String zzd(int i10, int i11, String str) { if (i10 < 0) { return zzac.zzb("%s (%s) must not be negative", str, Integer.valueOf(i10)); } if (i11 >= 0) { return zzac.zzb("%s (%s) must not be greater than size (%s)", str, Integer.valueOf(i10), Integer.valueOf(i11)); } throw new IllegalArgumentException("negative size: " + i11); } }