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