package o;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.Io, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C0222Io implements InterfaceC0564Vt {
    public final float l;
    public final float m;
    public final float n;

    /* renamed from: o, reason: collision with root package name */
    public final float f164o;
    public final float p;
    public final float q;

    public C0222Io(float f, float f2, float f3, float f4) {
        int iA;
        this.l = f;
        this.m = f2;
        this.n = f3;
        this.f164o = f4;
        if (!((Float.isNaN(f) || Float.isNaN(f2) || Float.isNaN(f3) || Float.isNaN(f4)) ? false : true)) {
            AbstractC1198fY.a("Parameters to CubicBezierEasing cannot be NaN. Actual parameters are: " + f + ", " + f2 + ", " + f3 + ", " + f4 + '.');
        }
        float[] fArr = new float[5];
        float f5 = (f2 - 0.0f) * 3.0f;
        float f6 = (f4 - f2) * 3.0f;
        float f7 = (1.0f - f4) * 3.0f;
        double d = f5;
        double d2 = f6;
        double d3 = f7;
        double d4 = d2 * 2.0d;
        double d5 = (d - d4) + d3;
        if (d5 == 0.0d) {
            iA = d2 == d3 ? 0 : AbstractC2798wI.A((float) ((d4 - d3) / (d4 - (d3 * 2.0d))), fArr, 0);
        } else {
            double d6 = -Math.sqrt((d2 * d2) - (d3 * d));
            double d7 = (-d) + d2;
            int iA2 = AbstractC2798wI.A((float) ((-(d6 + d7)) / d5), fArr, 0);
            int iA3 = AbstractC2798wI.A((float) ((d6 - d7) / d5), fArr, iA2) + iA2;
            if (iA3 > 1) {
                float f8 = fArr[0];
                float f9 = fArr[1];
                if (f8 > f9) {
                    fArr[0] = f9;
                    fArr[1] = f8;
                } else if (f8 == f9) {
                    iA = iA3 - 1;
                }
                iA = iA3;
            } else {
                iA = iA3;
            }
        }
        float f10 = (f6 - f5) * 2.0f;
        int iA4 = AbstractC2798wI.A((-f10) / (((f7 - f6) * 2.0f) - f10), fArr, iA) + iA;
        float fMin = Math.min(0.0f, 1.0f);
        float fMax = Math.max(0.0f, 1.0f);
        for (int i = 0; i < iA4; i++) {
            float f11 = fArr[i];
            float f12 = (((((((((f2 - f4) * 3.0f) + 1.0f) - 0.0f) * f11) + (((f4 - (f2 * 2.0f)) + 0.0f) * 3.0f)) * f11) + f5) * f11) + 0.0f;
            fMin = Math.min(fMin, f12);
            fMax = Math.max(fMax, f12);
        }
        long jFloatToRawIntBits = (Float.floatToRawIntBits(fMin) << 32) | (Float.floatToRawIntBits(fMax) & 4294967295L);
        this.p = Float.intBitsToFloat((int) (jFloatToRawIntBits >> 32));
        this.q = Float.intBitsToFloat((int) (jFloatToRawIntBits & 4294967295L));
    }

    /* JADX WARN: Removed duplicated region for block: B:24:0x0092 A[PHI: r3
      0x0092: PHI (r3v28 float) = (r3v5 float), (r3v16 float), (r3v21 float), (r3v32 float), (r3v37 float) binds: [B:128:0x0236, B:117:0x0206, B:92:0x01bb, B:47:0x00e5, B:22:0x008e] A[DONT_GENERATE, DONT_INLINE]] */
    /* JADX WARN: Removed duplicated region for block: B:69:0x0162 A[PHI: r12
      0x0162: PHI (r12v41 float) = (r12v25 float), (r12v36 float) binds: [B:68:0x0160, B:81:0x0191] A[DONT_GENERATE, DONT_INLINE]] */
    @Override // o.InterfaceC0564Vt
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public final float a(float r27) {
        /*
            Method dump skipped, instructions count: 658
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: o.C0222Io.a(float):float");
    }

    public final boolean equals(Object obj) {
        if (!(obj instanceof C0222Io)) {
            return false;
        }
        C0222Io c0222Io = (C0222Io) obj;
        return this.l == c0222Io.l && this.m == c0222Io.m && this.n == c0222Io.n && this.f164o == c0222Io.f164o;
    }

    public final int hashCode() {
        return Float.hashCode(this.f164o) + AbstractC0126Ew.d(this.n, AbstractC0126Ew.d(this.m, Float.hashCode(this.l) * 31, 31), 31);
    }

    public final String toString() {
        StringBuilder sb = new StringBuilder("CubicBezierEasing(a=");
        sb.append(this.l);
        sb.append(", b=");
        sb.append(this.m);
        sb.append(", c=");
        sb.append(this.n);
        sb.append(", d=");
        return AbstractC2462sn.l(sb, this.f164o, ')');
    }
}
