package jq;

import java.util.Arrays;

/* loaded from: classes3.dex */
public final class n1 extends z0 {

    /* renamed from: a, reason: collision with root package name */
    private int[] f25242a;

    /* renamed from: b, reason: collision with root package name */
    private int f25243b;

    public /* synthetic */ n1(int[] iArr, kotlin.jvm.internal.k kVar) {
        this(iArr);
    }

    @Override // jq.z0
    public /* bridge */ /* synthetic */ Object a() {
        return rm.g0.e(f());
    }

    @Override // jq.z0
    public void b(int i10) {
        int d10;
        if (rm.g0.C(this.f25242a) < i10) {
            int[] iArr = this.f25242a;
            d10 = jn.o.d(i10, rm.g0.C(iArr) * 2);
            int[] copyOf = Arrays.copyOf(iArr, d10);
            kotlin.jvm.internal.t.f(copyOf, "copyOf(this, newSize)");
            this.f25242a = rm.g0.i(copyOf);
        }
    }

    @Override // jq.z0
    public int d() {
        return this.f25243b;
    }

    public final void e(int i10) {
        z0.c(this, 0, 1, null);
        int[] iArr = this.f25242a;
        int d10 = d();
        this.f25243b = d10 + 1;
        rm.g0.G(iArr, d10, i10);
    }

    public int[] f() {
        int[] copyOf = Arrays.copyOf(this.f25242a, d());
        kotlin.jvm.internal.t.f(copyOf, "copyOf(this, newSize)");
        return rm.g0.i(copyOf);
    }

    private n1(int[] bufferWithData) {
        kotlin.jvm.internal.t.g(bufferWithData, "bufferWithData");
        this.f25242a = bufferWithData;
        this.f25243b = rm.g0.C(bufferWithData);
        b(10);
    }
}
