package c.i.a.c.a2; import com.airbnb.lottie.parser.AnimatableValueParser; /* compiled from: VorbisBitArray */ public final class x { public final byte[] a; public final int b; /* renamed from: c reason: collision with root package name */ public int f760c; public int d; public x(byte[] bArr) { this.a = bArr; this.b = bArr.length; } public boolean a() { boolean z2 = (((this.a[this.f760c] & 255) >> this.d) & 1) == 1; c(1); return z2; } public int b(int i) { int i2 = this.f760c; int min = Math.min(i, 8 - this.d); int i3 = i2 + 1; int i4 = ((this.a[i2] & 255) >> this.d) & (255 >> (8 - min)); while (min < i) { i4 |= (this.a[i3] & 255) << min; min += 8; i3++; } int i5 = i4 & (-1 >>> (32 - i)); c(i); return i5; } public void c(int i) { int i2; int i3 = i / 8; int i4 = this.f760c + i3; this.f760c = i4; int i5 = (i - (i3 * 8)) + this.d; this.d = i5; boolean z2 = true; if (i5 > 7) { this.f760c = i4 + 1; this.d = i5 - 8; } int i6 = this.f760c; if (i6 < 0 || (i6 >= (i2 = this.b) && !(i6 == i2 && this.d == 0))) { z2 = false; } AnimatableValueParser.D(z2); } }