package o;

import java.util.Arrays;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* loaded from: classes.dex */
public final class VM implements InterfaceC2281qr {
    public boolean l;
    public long m = 9223372034707292159L;
    public long n = 0;

    /* renamed from: o, reason: collision with root package name */
    public final /* synthetic */ YM f373o;

    public VM(YM ym) {
        this.f373o = ym;
    }

    public final void a(C1751lF c1751lF, float f) {
        YM ym = this.f373o;
        C2689v7 c2689v7 = ym.x;
        if (c2689v7 == null) {
            c2689v7 = new C2689v7();
            ym.x = c2689v7;
        }
        int iR = AbstractC2219q9.R((C1751lF[]) c2689v7.b, c1751lF);
        if (iR >= 0) {
            float[] fArr = (float[]) c2689v7.c;
            if (fArr[iR] != f) {
                fArr[iR] = f;
                ((byte[]) c2689v7.d)[iR] = 1;
                return;
            } else {
                byte[] bArr = (byte[]) c2689v7.d;
                if (bArr[iR] == 2) {
                    bArr[iR] = 0;
                    return;
                }
                return;
            }
        }
        int i = c2689v7.a;
        C1751lF[] c1751lFArr = (C1751lF[]) c2689v7.b;
        if (i == c1751lFArr.length) {
            int i2 = i * 2;
            c2689v7.b = (C1751lF[]) Arrays.copyOf(c1751lFArr, i2);
            c2689v7.c = Arrays.copyOf((float[]) c2689v7.c, i2);
            c2689v7.d = Arrays.copyOf((byte[]) c2689v7.d, i2);
        }
        ((C1751lF[]) c2689v7.b)[i] = c1751lF;
        ((byte[]) c2689v7.d)[i] = 3;
        ((float[]) c2689v7.c)[i] = f;
        c2689v7.a++;
    }

    @Override // o.InterfaceC2281qr
    public final float e() {
        return this.f373o.e();
    }

    @Override // o.InterfaceC2281qr
    public final float q() {
        return this.f373o.q();
    }
}
