package z;

import android.util.SparseArray;
import android.view.View;
import java.lang.reflect.Array;
import kotlinx.coroutines.y;
import xyz.stream.utils.f0;

/* JADX INFO: loaded from: classes.dex */
public final class m extends p {

    /* JADX INFO: renamed from: k, reason: collision with root package name */
    public String f37003k;

    /* JADX INFO: renamed from: l, reason: collision with root package name */
    public SparseArray f37004l;

    /* JADX INFO: renamed from: m, reason: collision with root package name */
    public SparseArray f37005m;

    /* JADX INFO: renamed from: n, reason: collision with root package name */
    public float[] f37006n;

    @Override // v.q
    public final void b(float f10, float f11, float f12, int i10, int i11) {
        throw new RuntimeException("Wrong call for custom attribute");
    }

    @Override // v.q
    public final void c(int i10) {
        SparseArray sparseArray = this.f37004l;
        int size = sparseArray.size();
        int iC = ((androidx.constraintlayout.widget.a) sparseArray.valueAt(0)).c();
        double[] dArr = new double[size];
        int i11 = iC + 2;
        this.f37006n = new float[i11];
        this.f33627g = new float[iC];
        double[][] dArr2 = (double[][]) Array.newInstance((Class<?>) Double.TYPE, size, i11);
        for (int i12 = 0; i12 < size; i12++) {
            int iKeyAt = sparseArray.keyAt(i12);
            androidx.constraintlayout.widget.a aVar = (androidx.constraintlayout.widget.a) sparseArray.valueAt(i12);
            float[] fArr = (float[]) this.f37005m.valueAt(i12);
            dArr[i12] = ((double) iKeyAt) * 0.01d;
            aVar.b(this.f37006n);
            int i13 = 0;
            while (true) {
                if (i13 < this.f37006n.length) {
                    dArr2[i12][i13] = r8[i13];
                    i13++;
                }
            }
            double[] dArr3 = dArr2[i12];
            dArr3[iC] = fArr[0];
            dArr3[iC + 1] = fArr[1];
        }
        this.f33621a = v.d.d(i10, dArr, dArr2);
    }

    @Override // z.p
    public final boolean f(float f10, long j10, View view, f0 f0Var) {
        this.f33621a.g(f10, this.f37006n);
        float[] fArr = this.f37006n;
        float f11 = fArr[fArr.length - 2];
        float f12 = fArr[fArr.length - 1];
        long j11 = j10 - this.f33629i;
        if (Float.isNaN(this.f33630j)) {
            float fN = f0Var.n(view, this.f37003k);
            this.f33630j = fN;
            if (Float.isNaN(fN)) {
                this.f33630j = 0.0f;
            }
        }
        float f13 = (float) ((((j11 * 1.0E-9d) * ((double) f11)) + ((double) this.f33630j)) % 1.0d);
        this.f33630j = f13;
        this.f33629i = j10;
        float fA = a(f13);
        this.f33628h = false;
        int i10 = 0;
        while (true) {
            float[] fArr2 = this.f33627g;
            if (i10 >= fArr2.length) {
                break;
            }
            boolean z10 = this.f33628h;
            float f14 = this.f37006n[i10];
            this.f33628h = z10 | (((double) f14) != 0.0d);
            fArr2[i10] = (f14 * fA) + f12;
            i10++;
        }
        y.X((androidx.constraintlayout.widget.a) this.f37004l.valueAt(0), view, this.f33627g);
        if (f11 != 0.0f) {
            this.f33628h = true;
        }
        return this.f33628h;
    }
}
