package com.google.android.gms.internal.measurement; import com.ubtrobot.jimu.robotapi.PeripheralType; import java.io.IOException; import java.nio.BufferOverflowException; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.util.logging.Level; import java.util.logging.Logger; /* loaded from: classes.dex */ public abstract class zztv extends zztd { private static final Logger b = Logger.getLogger(zztv.class.getName()); private static final boolean c = zzxj.b(); zztx a; static class zza extends zztv { private final byte[] d; private final int e; private final int f; private int g; zza(byte[] bArr, int i, int i2) { super(); if (bArr == null) { throw new NullPointerException("buffer"); } int i3 = i + i2; if ((i | i2 | (bArr.length - i3)) < 0) { throw new IllegalArgumentException(String.format("Array range is invalid. Buffer.length=%d, offset=%d, length=%d", Integer.valueOf(bArr.length), Integer.valueOf(i), Integer.valueOf(i2))); } this.d = bArr; this.e = i; this.g = i; this.f = i3; } @Override // com.google.android.gms.internal.measurement.zztv public void a() { } @Override // com.google.android.gms.internal.measurement.zztv public final void a(int i, int i2) throws IOException { b((i << 3) | i2); } @Override // com.google.android.gms.internal.measurement.zztv public final void b(int i, int i2) throws IOException { a(i, 0); a(i2); } @Override // com.google.android.gms.internal.measurement.zztv public final void c(int i, int i2) throws IOException { a(i, 0); b(i2); } @Override // com.google.android.gms.internal.measurement.zztv public final void d(int i) throws IOException { try { byte[] bArr = this.d; int i2 = this.g; this.g = i2 + 1; bArr[i2] = (byte) i; byte[] bArr2 = this.d; int i3 = this.g; this.g = i3 + 1; bArr2[i3] = (byte) (i >> 8); byte[] bArr3 = this.d; int i4 = this.g; this.g = i4 + 1; bArr3[i4] = (byte) (i >> 16); byte[] bArr4 = this.d; int i5 = this.g; this.g = i5 + 1; bArr4[i5] = (byte) (i >>> 24); } catch (IndexOutOfBoundsException e) { throw new zzc(String.format("Pos: %d, limit: %d, len: %d", Integer.valueOf(this.g), Integer.valueOf(this.f), 1), e); } } @Override // com.google.android.gms.internal.measurement.zztv public final void e(int i, int i2) throws IOException { a(i, 5); d(i2); } @Override // com.google.android.gms.internal.measurement.zztv public final void a(int i, long j) throws IOException { a(i, 0); a(j); } public final void b(zzte zzteVar) throws IOException { b(zzteVar.size()); zzteVar.zza(this); } @Override // com.google.android.gms.internal.measurement.zztv public final void c(int i, long j) throws IOException { a(i, 1); c(j); } @Override // com.google.android.gms.internal.measurement.zztv public final void a(int i, boolean z) throws IOException { a(i, 0); a(z ? (byte) 1 : (byte) 0); } @Override // com.google.android.gms.internal.measurement.zztv public final void b(int i, zzvv zzvvVar) throws IOException { a(1, 3); c(2, i); a(3, zzvvVar); a(1, 4); } public final void c(zzvv zzvvVar) throws IOException { b(zzvvVar.h()); zzvvVar.a(this); } @Override // com.google.android.gms.internal.measurement.zztv public final void a(int i, String str) throws IOException { a(i, 2); b(str); } @Override // com.google.android.gms.internal.measurement.zztv public final void c(long j) throws IOException { try { byte[] bArr = this.d; int i = this.g; this.g = i + 1; bArr[i] = (byte) j; byte[] bArr2 = this.d; int i2 = this.g; this.g = i2 + 1; bArr2[i2] = (byte) (j >> 8); byte[] bArr3 = this.d; int i3 = this.g; this.g = i3 + 1; bArr3[i3] = (byte) (j >> 16); byte[] bArr4 = this.d; int i4 = this.g; this.g = i4 + 1; bArr4[i4] = (byte) (j >> 24); byte[] bArr5 = this.d; int i5 = this.g; this.g = i5 + 1; bArr5[i5] = (byte) (j >> 32); byte[] bArr6 = this.d; int i6 = this.g; this.g = i6 + 1; bArr6[i6] = (byte) (j >> 40); byte[] bArr7 = this.d; int i7 = this.g; this.g = i7 + 1; bArr7[i7] = (byte) (j >> 48); byte[] bArr8 = this.d; int i8 = this.g; this.g = i8 + 1; bArr8[i8] = (byte) (j >> 56); } catch (IndexOutOfBoundsException e) { throw new zzc(String.format("Pos: %d, limit: %d, len: %d", Integer.valueOf(this.g), Integer.valueOf(this.f), 1), e); } } public final int d() { return this.g - this.e; } @Override // com.google.android.gms.internal.measurement.zztv public final void a(int i, zzte zzteVar) throws IOException { a(i, 2); b(zzteVar); } @Override // com.google.android.gms.internal.measurement.zztv public final void b(int i, zzte zzteVar) throws IOException { a(1, 3); c(2, i); a(3, zzteVar); a(1, 4); } @Override // com.google.android.gms.internal.measurement.zztv public final void a(int i, zzvv zzvvVar) throws IOException { a(i, 2); c(zzvvVar); } @Override // com.google.android.gms.internal.measurement.zztv final void a(int i, zzvv zzvvVar, zzwl zzwlVar) throws IOException { a(i, 2); zzsx zzsxVar = (zzsx) zzvvVar; int j = zzsxVar.j(); if (j == -1) { j = zzwlVar.a(zzsxVar); zzsxVar.a(j); } b(j); zzwlVar.a((zzwl) zzvvVar, (zzxy) this.a); } @Override // com.google.android.gms.internal.measurement.zztv public final void b(int i) throws IOException { if (zztv.c && b() >= 10) { while ((i & (-128)) != 0) { byte[] bArr = this.d; int i2 = this.g; this.g = i2 + 1; zzxj.a(bArr, i2, (byte) ((i & 127) | PeripheralType.SERVO)); i >>>= 7; } byte[] bArr2 = this.d; int i3 = this.g; this.g = i3 + 1; zzxj.a(bArr2, i3, (byte) i); return; } while ((i & (-128)) != 0) { try { byte[] bArr3 = this.d; int i4 = this.g; this.g = i4 + 1; bArr3[i4] = (byte) ((i & 127) | PeripheralType.SERVO); i >>>= 7; } catch (IndexOutOfBoundsException e) { throw new zzc(String.format("Pos: %d, limit: %d, len: %d", Integer.valueOf(this.g), Integer.valueOf(this.f), 1), e); } } byte[] bArr4 = this.d; int i5 = this.g; this.g = i5 + 1; bArr4[i5] = (byte) i; } @Override // com.google.android.gms.internal.measurement.zztv public final void a(byte b) throws IOException { try { byte[] bArr = this.d; int i = this.g; this.g = i + 1; bArr[i] = b; } catch (IndexOutOfBoundsException e) { throw new zzc(String.format("Pos: %d, limit: %d, len: %d", Integer.valueOf(this.g), Integer.valueOf(this.f), 1), e); } } @Override // com.google.android.gms.internal.measurement.zztv public final void b(byte[] bArr, int i, int i2) throws IOException { try { System.arraycopy(bArr, i, this.d, this.g, i2); this.g += i2; } catch (IndexOutOfBoundsException e) { throw new zzc(String.format("Pos: %d, limit: %d, len: %d", Integer.valueOf(this.g), Integer.valueOf(this.f), Integer.valueOf(i2)), e); } } @Override // com.google.android.gms.internal.measurement.zztv public final void a(int i) throws IOException { if (i >= 0) { b(i); } else { a(i); } } @Override // com.google.android.gms.internal.measurement.zztv public final void a(long j) throws IOException { if (zztv.c && b() >= 10) { while ((j & (-128)) != 0) { byte[] bArr = this.d; int i = this.g; this.g = i + 1; zzxj.a(bArr, i, (byte) ((((int) j) & 127) | PeripheralType.SERVO)); j >>>= 7; } byte[] bArr2 = this.d; int i2 = this.g; this.g = i2 + 1; zzxj.a(bArr2, i2, (byte) j); return; } while ((j & (-128)) != 0) { try { byte[] bArr3 = this.d; int i3 = this.g; this.g = i3 + 1; bArr3[i3] = (byte) ((((int) j) & 127) | PeripheralType.SERVO); j >>>= 7; } catch (IndexOutOfBoundsException e) { throw new zzc(String.format("Pos: %d, limit: %d, len: %d", Integer.valueOf(this.g), Integer.valueOf(this.f), 1), e); } } byte[] bArr4 = this.d; int i4 = this.g; this.g = i4 + 1; bArr4[i4] = (byte) j; } public final void b(String str) throws IOException { int i = this.g; try { int g = zztv.g(str.length() * 3); int g2 = zztv.g(str.length()); if (g2 == g) { this.g = i + g2; int a = zzxl.a(str, this.d, this.g, b()); this.g = i; b((a - i) - g2); this.g = a; return; } b(zzxl.a(str)); this.g = zzxl.a(str, this.d, this.g, b()); } catch (zzxp e) { this.g = i; a(str, e); } catch (IndexOutOfBoundsException e2) { throw new zzc(e2); } } @Override // com.google.android.gms.internal.measurement.zztd public final void a(byte[] bArr, int i, int i2) throws IOException { b(bArr, i, i2); } @Override // com.google.android.gms.internal.measurement.zztv public final int b() { return this.f - this.g; } } static final class zzb extends zza { private final ByteBuffer h; private int i; zzb(ByteBuffer byteBuffer) { super(byteBuffer.array(), byteBuffer.arrayOffset() + byteBuffer.position(), byteBuffer.remaining()); this.h = byteBuffer; this.i = byteBuffer.position(); } @Override // com.google.android.gms.internal.measurement.zztv.zza, com.google.android.gms.internal.measurement.zztv public final void a() { this.h.position(this.i + d()); } } public static class zzc extends IOException { zzc() { super("CodedOutputStream was writing to a flat byte array and ran out of space."); } /* JADX WARN: Illegal instructions before constructor call */ /* Code decompiled incorrectly, please refer to instructions dump. To view partially-correct code enable 'Show inconsistent code' option in preferences */ zzc(java.lang.String r3) { /* r2 = this; java.lang.String r3 = java.lang.String.valueOf(r3) int r0 = r3.length() java.lang.String r1 = "CodedOutputStream was writing to a flat byte array and ran out of space.: " if (r0 == 0) goto L11 java.lang.String r3 = r1.concat(r3) goto L16 L11: java.lang.String r3 = new java.lang.String r3.(r1) L16: r2.(r3) return */ throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.internal.measurement.zztv.zzc.(java.lang.String):void"); } zzc(Throwable th) { super("CodedOutputStream was writing to a flat byte array and ran out of space.", th); } /* JADX WARN: Illegal instructions before constructor call */ /* Code decompiled incorrectly, please refer to instructions dump. To view partially-correct code enable 'Show inconsistent code' option in preferences */ zzc(java.lang.String r3, java.lang.Throwable r4) { /* r2 = this; java.lang.String r3 = java.lang.String.valueOf(r3) int r0 = r3.length() java.lang.String r1 = "CodedOutputStream was writing to a flat byte array and ran out of space.: " if (r0 == 0) goto L11 java.lang.String r3 = r1.concat(r3) goto L16 L11: java.lang.String r3 = new java.lang.String r3.(r1) L16: r2.(r3, r4) return */ throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.internal.measurement.zztv.zzc.(java.lang.String, java.lang.Throwable):void"); } } static final class zzd extends zztv { private final ByteBuffer d; private final ByteBuffer e; zzd(ByteBuffer byteBuffer) { super(); this.d = byteBuffer; this.e = byteBuffer.duplicate().order(ByteOrder.LITTLE_ENDIAN); byteBuffer.position(); } @Override // com.google.android.gms.internal.measurement.zztv public final void a(int i, int i2) throws IOException { b((i << 3) | i2); } @Override // com.google.android.gms.internal.measurement.zztv public final void b(int i, int i2) throws IOException { a(i, 0); a(i2); } @Override // com.google.android.gms.internal.measurement.zztv public final void c(int i, int i2) throws IOException { a(i, 0); b(i2); } @Override // com.google.android.gms.internal.measurement.zztv public final void d(int i) throws IOException { try { this.e.putInt(i); } catch (BufferOverflowException e) { throw new zzc(e); } } @Override // com.google.android.gms.internal.measurement.zztv public final void e(int i, int i2) throws IOException { a(i, 5); d(i2); } @Override // com.google.android.gms.internal.measurement.zztv public final void a(int i, long j) throws IOException { a(i, 0); a(j); } @Override // com.google.android.gms.internal.measurement.zztv public final void b(int i, zzvv zzvvVar) throws IOException { a(1, 3); c(2, i); a(3, zzvvVar); a(1, 4); } @Override // com.google.android.gms.internal.measurement.zztv public final void c(int i, long j) throws IOException { a(i, 1); c(j); } @Override // com.google.android.gms.internal.measurement.zztv public final void a(int i, boolean z) throws IOException { a(i, 0); a(z ? (byte) 1 : (byte) 0); } public final void c(zzvv zzvvVar) throws IOException { b(zzvvVar.h()); zzvvVar.a(this); } @Override // com.google.android.gms.internal.measurement.zztv public final void a(int i, String str) throws IOException { a(i, 2); b(str); } @Override // com.google.android.gms.internal.measurement.zztv public final void b(int i, zzte zzteVar) throws IOException { a(1, 3); c(2, i); a(3, zzteVar); a(1, 4); } @Override // com.google.android.gms.internal.measurement.zztv public final void c(long j) throws IOException { try { this.e.putLong(j); } catch (BufferOverflowException e) { throw new zzc(e); } } @Override // com.google.android.gms.internal.measurement.zztv public final void a(int i, zzte zzteVar) throws IOException { a(i, 2); b(zzteVar); } private final void c(String str) throws IOException { try { zzxl.a(str, this.e); } catch (IndexOutOfBoundsException e) { throw new zzc(e); } } @Override // com.google.android.gms.internal.measurement.zztv public final void a(int i, zzvv zzvvVar) throws IOException { a(i, 2); c(zzvvVar); } final void b(zzvv zzvvVar, zzwl zzwlVar) throws IOException { zzsx zzsxVar = (zzsx) zzvvVar; int j = zzsxVar.j(); if (j == -1) { j = zzwlVar.a(zzsxVar); zzsxVar.a(j); } b(j); zzwlVar.a((zzwl) zzvvVar, (zzxy) this.a); } @Override // com.google.android.gms.internal.measurement.zztv final void a(int i, zzvv zzvvVar, zzwl zzwlVar) throws IOException { a(i, 2); b(zzvvVar, zzwlVar); } @Override // com.google.android.gms.internal.measurement.zztv public final void a(byte b) throws IOException { try { this.e.put(b); } catch (BufferOverflowException e) { throw new zzc(e); } } @Override // com.google.android.gms.internal.measurement.zztv public final void a(int i) throws IOException { if (i >= 0) { b(i); } else { a(i); } } public final void b(zzte zzteVar) throws IOException { b(zzteVar.size()); zzteVar.zza(this); } @Override // com.google.android.gms.internal.measurement.zztv public final void a(long j) throws IOException { while (((-128) & j) != 0) { try { this.e.put((byte) ((((int) j) & 127) | PeripheralType.SERVO)); j >>>= 7; } catch (BufferOverflowException e) { throw new zzc(e); } } this.e.put((byte) j); } @Override // com.google.android.gms.internal.measurement.zztv public final void b(int i) throws IOException { while ((i & (-128)) != 0) { try { this.e.put((byte) ((i & 127) | PeripheralType.SERVO)); i >>>= 7; } catch (BufferOverflowException e) { throw new zzc(e); } } this.e.put((byte) i); } @Override // com.google.android.gms.internal.measurement.zztd public final void a(byte[] bArr, int i, int i2) throws IOException { b(bArr, i, i2); } @Override // com.google.android.gms.internal.measurement.zztv public final void a() { this.d.position(this.e.position()); } @Override // com.google.android.gms.internal.measurement.zztv public final void b(byte[] bArr, int i, int i2) throws IOException { try { this.e.put(bArr, i, i2); } catch (IndexOutOfBoundsException e) { throw new zzc(e); } catch (BufferOverflowException e2) { throw new zzc(e2); } } public final void b(String str) throws IOException { int position = this.e.position(); try { int g = zztv.g(str.length() * 3); int g2 = zztv.g(str.length()); if (g2 == g) { int position2 = this.e.position() + g2; this.e.position(position2); c(str); int position3 = this.e.position(); this.e.position(position); b(position3 - position2); this.e.position(position3); return; } b(zzxl.a(str)); c(str); } catch (zzxp e) { this.e.position(position); a(str, e); } catch (IllegalArgumentException e2) { throw new zzc(e2); } } @Override // com.google.android.gms.internal.measurement.zztv public final int b() { return this.e.remaining(); } } static final class zze extends zztv { private final ByteBuffer d; private final ByteBuffer e; private final long f; private final long g; private final long h; private final long i; private long j; zze(ByteBuffer byteBuffer) { super(); this.d = byteBuffer; this.e = byteBuffer.duplicate().order(ByteOrder.LITTLE_ENDIAN); this.f = zzxj.a(byteBuffer); this.g = this.f + byteBuffer.position(); this.h = this.f + byteBuffer.limit(); this.i = this.h - 10; this.j = this.g; } private final void i(long j) { this.e.position((int) (j - this.f)); } @Override // com.google.android.gms.internal.measurement.zztv public final void a(int i, int i2) throws IOException { b((i << 3) | i2); } @Override // com.google.android.gms.internal.measurement.zztv public final void b(int i, int i2) throws IOException { a(i, 0); a(i2); } @Override // com.google.android.gms.internal.measurement.zztv public final void c(int i, int i2) throws IOException { a(i, 0); b(i2); } @Override // com.google.android.gms.internal.measurement.zztv public final void d(int i) throws IOException { this.e.putInt((int) (this.j - this.f), i); this.j += 4; } @Override // com.google.android.gms.internal.measurement.zztv public final void e(int i, int i2) throws IOException { a(i, 5); d(i2); } @Override // com.google.android.gms.internal.measurement.zztv public final void a(int i, long j) throws IOException { a(i, 0); a(j); } @Override // com.google.android.gms.internal.measurement.zztv public final void b(int i, zzvv zzvvVar) throws IOException { a(1, 3); c(2, i); a(3, zzvvVar); a(1, 4); } @Override // com.google.android.gms.internal.measurement.zztv public final void c(int i, long j) throws IOException { a(i, 1); c(j); } @Override // com.google.android.gms.internal.measurement.zztv public final void a(int i, boolean z) throws IOException { a(i, 0); a(z ? (byte) 1 : (byte) 0); } public final void c(zzvv zzvvVar) throws IOException { b(zzvvVar.h()); zzvvVar.a(this); } @Override // com.google.android.gms.internal.measurement.zztv public final void a(int i, String str) throws IOException { a(i, 2); b(str); } @Override // com.google.android.gms.internal.measurement.zztv public final void b(int i, zzte zzteVar) throws IOException { a(1, 3); c(2, i); a(3, zzteVar); a(1, 4); } @Override // com.google.android.gms.internal.measurement.zztv public final void c(long j) throws IOException { this.e.putLong((int) (this.j - this.f), j); this.j += 8; } @Override // com.google.android.gms.internal.measurement.zztv public final void a(int i, zzte zzteVar) throws IOException { a(i, 2); b(zzteVar); } @Override // com.google.android.gms.internal.measurement.zztv public final void a(int i, zzvv zzvvVar) throws IOException { a(i, 2); c(zzvvVar); } final void b(zzvv zzvvVar, zzwl zzwlVar) throws IOException { zzsx zzsxVar = (zzsx) zzvvVar; int j = zzsxVar.j(); if (j == -1) { j = zzwlVar.a(zzsxVar); zzsxVar.a(j); } b(j); zzwlVar.a((zzwl) zzvvVar, (zzxy) this.a); } @Override // com.google.android.gms.internal.measurement.zztv final void a(int i, zzvv zzvvVar, zzwl zzwlVar) throws IOException { a(i, 2); b(zzvvVar, zzwlVar); } @Override // com.google.android.gms.internal.measurement.zztv public final void a(byte b) throws IOException { long j = this.j; if (j < this.h) { this.j = 1 + j; zzxj.a(j, b); return; } throw new zzc(String.format("Pos: %d, limit: %d, len: %d", Long.valueOf(j), Long.valueOf(this.h), 1)); } public final void b(zzte zzteVar) throws IOException { b(zzteVar.size()); zzteVar.zza(this); } @Override // com.google.android.gms.internal.measurement.zztv public final void a(int i) throws IOException { if (i >= 0) { b(i); } else { a(i); } } @Override // com.google.android.gms.internal.measurement.zztv public final void b(int i) throws IOException { if (this.j <= this.i) { while ((i & (-128)) != 0) { long j = this.j; this.j = j + 1; zzxj.a(j, (byte) ((i & 127) | PeripheralType.SERVO)); i >>>= 7; } long j2 = this.j; this.j = 1 + j2; zzxj.a(j2, (byte) i); return; } while (true) { long j3 = this.j; if (j3 >= this.h) { throw new zzc(String.format("Pos: %d, limit: %d, len: %d", Long.valueOf(j3), Long.valueOf(this.h), 1)); } if ((i & (-128)) == 0) { this.j = 1 + j3; zzxj.a(j3, (byte) i); return; } else { this.j = j3 + 1; zzxj.a(j3, (byte) ((i & 127) | PeripheralType.SERVO)); i >>>= 7; } } } @Override // com.google.android.gms.internal.measurement.zztv public final void a(long j) throws IOException { if (this.j <= this.i) { while ((j & (-128)) != 0) { long j2 = this.j; this.j = j2 + 1; zzxj.a(j2, (byte) ((((int) j) & 127) | PeripheralType.SERVO)); j >>>= 7; } long j3 = this.j; this.j = 1 + j3; zzxj.a(j3, (byte) j); return; } while (true) { long j4 = this.j; if (j4 >= this.h) { throw new zzc(String.format("Pos: %d, limit: %d, len: %d", Long.valueOf(j4), Long.valueOf(this.h), 1)); } if ((j & (-128)) == 0) { this.j = 1 + j4; zzxj.a(j4, (byte) j); return; } else { this.j = j4 + 1; zzxj.a(j4, (byte) ((((int) j) & 127) | PeripheralType.SERVO)); j >>>= 7; } } } @Override // com.google.android.gms.internal.measurement.zztv public final void b(byte[] bArr, int i, int i2) throws IOException { if (bArr != null && i >= 0 && i2 >= 0 && bArr.length - i2 >= i) { long j = i2; long j2 = this.h - j; long j3 = this.j; if (j2 >= j3) { zzxj.a(bArr, i, j3, j); this.j += j; return; } } if (bArr == null) { throw new NullPointerException("value"); } throw new zzc(String.format("Pos: %d, limit: %d, len: %d", Long.valueOf(this.j), Long.valueOf(this.h), Integer.valueOf(i2))); } @Override // com.google.android.gms.internal.measurement.zztd public final void a(byte[] bArr, int i, int i2) throws IOException { b(bArr, i, i2); } @Override // com.google.android.gms.internal.measurement.zztv public final void a() { this.d.position((int) (this.j - this.f)); } public final void b(String str) throws IOException { long j = this.j; try { int g = zztv.g(str.length() * 3); int g2 = zztv.g(str.length()); if (g2 == g) { int i = ((int) (this.j - this.f)) + g2; this.e.position(i); zzxl.a(str, this.e); int position = this.e.position() - i; b(position); this.j += position; return; } int a = zzxl.a(str); b(a); i(this.j); zzxl.a(str, this.e); this.j += a; } catch (zzxp e) { this.j = j; i(this.j); a(str, e); } catch (IllegalArgumentException e2) { throw new zzc(e2); } catch (IndexOutOfBoundsException e3) { throw new zzc(e3); } } @Override // com.google.android.gms.internal.measurement.zztv public final int b() { return (int) (this.h - this.j); } } private zztv() { } public static zztv a(byte[] bArr) { return new zza(bArr, 0, bArr.length); } public static int b(double d) { return 8; } public static int b(float f) { return 4; } public static int b(boolean z) { return 1; } public static int e(int i, long j) { return e(i) + e(j); } public static int e(long j) { int i; if (((-128) & j) == 0) { return 1; } if (j < 0) { return 10; } if (((-34359738368L) & j) != 0) { i = 6; j >>>= 28; } else { i = 2; } if (((-2097152) & j) != 0) { i += 2; j >>>= 14; } return (j & (-16384)) != 0 ? i + 1 : i; } public static int f(int i, int i2) { return e(i) + f(i2); } public static int g(int i) { if ((i & (-128)) == 0) { return 1; } if ((i & (-16384)) == 0) { return 2; } if (((-2097152) & i) == 0) { return 3; } return (i & (-268435456)) == 0 ? 4 : 5; } public static int g(int i, int i2) { return e(i) + g(i2); } public static int g(long j) { return 8; } public static int h(int i, int i2) { return e(i) + g(l(i2)); } public static int h(long j) { return 8; } public static int i(int i) { return 4; } public static int i(int i, int i2) { return e(i) + 4; } private static long i(long j) { return (j >> 63) ^ (j << 1); } public static int j(int i) { return 4; } public static int j(int i, int i2) { return e(i) + 4; } public static int k(int i, int i2) { return e(i) + f(i2); } private static int l(int i) { return (i >> 31) ^ (i << 1); } @Deprecated public static int m(int i) { return g(i); } public abstract void a() throws IOException; public abstract void a(byte b2) throws IOException; public abstract void a(int i) throws IOException; public abstract void a(int i, int i2) throws IOException; public abstract void a(int i, long j) throws IOException; public abstract void a(int i, zzte zzteVar) throws IOException; public abstract void a(int i, zzvv zzvvVar) throws IOException; abstract void a(int i, zzvv zzvvVar, zzwl zzwlVar) throws IOException; public abstract void a(int i, String str) throws IOException; public abstract void a(int i, boolean z) throws IOException; public abstract void a(long j) throws IOException; public abstract int b(); public abstract void b(int i) throws IOException; public abstract void b(int i, int i2) throws IOException; public final void b(int i, long j) throws IOException { a(i, i(j)); } public abstract void b(int i, zzte zzteVar) throws IOException; public abstract void b(int i, zzvv zzvvVar) throws IOException; public abstract void b(byte[] bArr, int i, int i2) throws IOException; public final void c(int i) throws IOException { b(l(i)); } public abstract void c(int i, int i2) throws IOException; public abstract void c(int i, long j) throws IOException; public abstract void c(long j) throws IOException; public abstract void d(int i) throws IOException; public final void d(int i, int i2) throws IOException { c(i, l(i2)); } public abstract void e(int i, int i2) throws IOException; public static int c(int i, zzte zzteVar) { int e = e(i); int size = zzteVar.size(); return e + g(size) + size; } public static int d(int i, long j) { return e(i) + e(j); } public static int e(int i) { return g(i << 3); } public static int f(int i, long j) { return e(i) + e(i(j)); } public static int g(int i, long j) { return e(i) + 8; } public final void b(long j) throws IOException { a(i(j)); } public static zztv a(ByteBuffer byteBuffer) { if (byteBuffer.hasArray()) { return new zzb(byteBuffer); } if (byteBuffer.isDirect() && !byteBuffer.isReadOnly()) { if (zzxj.c()) { return new zze(byteBuffer); } return new zzd(byteBuffer); } throw new IllegalArgumentException("ByteBuffer is read-only"); } public static int b(int i, float f) { return e(i) + 4; } public static int h(int i, long j) { return e(i) + 8; } public static int k(int i) { return f(i); } public static int b(int i, double d) { return e(i) + 8; } public static int d(int i, zzvv zzvvVar) { return (e(1) << 1) + g(2, i) + c(3, zzvvVar); } public static int f(int i) { if (i >= 0) { return g(i); } return 10; } public static int h(int i) { return g(l(i)); } public static int b(int i, boolean z) { return e(i) + 1; } public static int c(int i, zzvv zzvvVar) { return e(i) + a(zzvvVar); } public static int f(long j) { return e(i(j)); } public static int b(int i, String str) { return e(i) + a(str); } @Deprecated static int c(int i, zzvv zzvvVar, zzwl zzwlVar) { int e = e(i) << 1; zzsx zzsxVar = (zzsx) zzvvVar; int j = zzsxVar.j(); if (j == -1) { j = zzwlVar.a(zzsxVar); zzsxVar.a(j); } return e + j; } static int b(int i, zzvv zzvvVar, zzwl zzwlVar) { return e(i) + a(zzvvVar, zzwlVar); } public static int d(int i, zzte zzteVar) { return (e(1) << 1) + g(2, i) + c(3, zzteVar); } public static int b(int i, zzvc zzvcVar) { return (e(1) << 1) + g(2, i) + a(3, zzvcVar); } public static int d(long j) { return e(j); } public final void a(int i, float f) throws IOException { e(i, Float.floatToRawIntBits(f)); } public static int b(byte[] bArr) { int length = bArr.length; return g(length) + length; } public final void a(int i, double d) throws IOException { c(i, Double.doubleToRawLongBits(d)); } public final void a(float f) throws IOException { d(Float.floatToRawIntBits(f)); } @Deprecated public static int b(zzvv zzvvVar) { return zzvvVar.h(); } public final void a(double d) throws IOException { c(Double.doubleToRawLongBits(d)); } public final void a(boolean z) throws IOException { a(z ? (byte) 1 : (byte) 0); } public static int a(int i, zzvc zzvcVar) { int e = e(i); int b2 = zzvcVar.b(); return e + g(b2) + b2; } public static int a(String str) { int length; try { length = zzxl.a(str); } catch (zzxp unused) { length = str.getBytes(zzuq.a).length; } return g(length) + length; } public static int a(zzvc zzvcVar) { int b2 = zzvcVar.b(); return g(b2) + b2; } public static int a(zzte zzteVar) { int size = zzteVar.size(); return g(size) + size; } public static int a(zzvv zzvvVar) { int h = zzvvVar.h(); return g(h) + h; } static int a(zzvv zzvvVar, zzwl zzwlVar) { zzsx zzsxVar = (zzsx) zzvvVar; int j = zzsxVar.j(); if (j == -1) { j = zzwlVar.a(zzsxVar); zzsxVar.a(j); } return g(j) + j; } final void a(String str, zzxp zzxpVar) throws IOException { b.logp(Level.WARNING, "com.google.protobuf.CodedOutputStream", "inefficientWriteStringNoTag", "Converting ill-formed UTF-16. Your Protocol Buffer will not round trip correctly!", (Throwable) zzxpVar); byte[] bytes = str.getBytes(zzuq.a); try { b(bytes.length); a(bytes, 0, bytes.length); } catch (zzc e) { throw e; } catch (IndexOutOfBoundsException e2) { throw new zzc(e2); } } }