package c.i.a.c.i2; import java.util.NoSuchElementException; /* compiled from: IntArrayQueue */ public final class n { public int a = 0; public int b = -1; /* renamed from: c reason: collision with root package name */ public int f906c = 0; public int[] d; public int e; public n() { int[] iArr = new int[16]; this.d = iArr; this.e = iArr.length - 1; } public void a(int i) { int i2 = this.f906c; int[] iArr = this.d; if (i2 == iArr.length) { int length = iArr.length << 1; if (length >= 0) { int[] iArr2 = new int[length]; int length2 = iArr.length; int i3 = this.a; int i4 = length2 - i3; System.arraycopy(iArr, i3, iArr2, 0, i4); System.arraycopy(this.d, 0, iArr2, i4, i3); this.a = 0; this.b = this.f906c - 1; this.d = iArr2; this.e = length - 1; } else { throw new IllegalStateException(); } } int i5 = (this.b + 1) & this.e; this.b = i5; this.d[i5] = i; this.f906c++; } public int b() { int i = this.f906c; if (i != 0) { int[] iArr = this.d; int i2 = this.a; int i3 = iArr[i2]; this.a = (i2 + 1) & this.e; this.f906c = i - 1; return i3; } throw new NoSuchElementException(); } }