package com.google.android.gms.internal.p002firebaseauthapi; /* JADX INFO: Access modifiers changed from: package-private */ /* loaded from: classes2.dex */ public abstract class zzaci extends zzacn { final byte[] zza; final int zzb; int zzc; int zzd; /* JADX INFO: Access modifiers changed from: package-private */ public zzaci(int i) { super(null); if (i < 0) { throw new IllegalArgumentException("bufferSize must be >= 0"); } int max = Math.max(i, 20); this.zza = new byte[max]; this.zzb = max; } @Override // com.google.android.gms.internal.p002firebaseauthapi.zzacn public final int zzb() { throw new UnsupportedOperationException("spaceLeft() can only be called on CodedOutputStreams that are writing to a flat array or ByteBuffer."); } /* JADX INFO: Access modifiers changed from: package-private */ public final void zzc(byte b) { byte[] bArr = this.zza; int i = this.zzc; this.zzc = i + 1; bArr[i] = b; this.zzd++; } /* JADX INFO: Access modifiers changed from: package-private */ public final void zzd(int i) { byte[] bArr = this.zza; int i2 = this.zzc; bArr[i2] = (byte) (i & 255); bArr[i2 + 1] = (byte) ((i >> 8) & 255); bArr[i2 + 2] = (byte) ((i >> 16) & 255); this.zzc = i2 + 4; bArr[i2 + 3] = (byte) ((i >> 24) & 255); this.zzd += 4; } /* JADX INFO: Access modifiers changed from: package-private */ public final void zze(long j) { byte[] bArr = this.zza; int i = this.zzc; bArr[i] = (byte) (j & 255); bArr[i + 1] = (byte) ((j >> 8) & 255); bArr[i + 2] = (byte) ((j >> 16) & 255); bArr[i + 3] = (byte) (255 & (j >> 24)); bArr[i + 4] = (byte) (((int) (j >> 32)) & 255); bArr[i + 5] = (byte) (((int) (j >> 40)) & 255); bArr[i + 6] = (byte) (((int) (j >> 48)) & 255); this.zzc = i + 8; bArr[i + 7] = (byte) (((int) (j >> 56)) & 255); this.zzd += 8; } /* JADX INFO: Access modifiers changed from: package-private */ public final void zzf(int i) { boolean z; z = zzacn.zzb; if (!z) { while ((i & (-128)) != 0) { byte[] bArr = this.zza; int i2 = this.zzc; this.zzc = i2 + 1; bArr[i2] = (byte) ((i & 127) | 128); this.zzd++; i >>>= 7; } byte[] bArr2 = this.zza; int i3 = this.zzc; this.zzc = i3 + 1; bArr2[i3] = (byte) i; this.zzd++; return; } long j = this.zzc; while ((i & (-128)) != 0) { byte[] bArr3 = this.zza; int i4 = this.zzc; this.zzc = i4 + 1; zzafx.zzn(bArr3, i4, (byte) ((i & 127) | 128)); i >>>= 7; } byte[] bArr4 = this.zza; int i5 = this.zzc; this.zzc = i5 + 1; zzafx.zzn(bArr4, i5, (byte) i); this.zzd += (int) (this.zzc - j); } /* JADX INFO: Access modifiers changed from: package-private */ public final void zzg(long j) { boolean z; z = zzacn.zzb; if (!z) { while ((j & (-128)) != 0) { byte[] bArr = this.zza; int i = this.zzc; this.zzc = i + 1; bArr[i] = (byte) ((((int) j) & 127) | 128); this.zzd++; j >>>= 7; } byte[] bArr2 = this.zza; int i2 = this.zzc; this.zzc = i2 + 1; bArr2[i2] = (byte) j; this.zzd++; return; } long j2 = this.zzc; while ((j & (-128)) != 0) { byte[] bArr3 = this.zza; int i3 = this.zzc; this.zzc = i3 + 1; zzafx.zzn(bArr3, i3, (byte) ((((int) j) & 127) | 128)); j >>>= 7; } byte[] bArr4 = this.zza; int i4 = this.zzc; this.zzc = i4 + 1; zzafx.zzn(bArr4, i4, (byte) j); this.zzd += (int) (this.zzc - j2); } }