package o;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.wT, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C2809wT extends AbstractC0345Ni {
    public static final float[] d;
    public static final float[] e;
    public static final float[] f;
    public static final float[] g;

    static {
        float[] fArrR = AbstractC0249Jp.R(new float[]{0.818933f, 0.032984544f, 0.0482003f, 0.36186674f, 0.9293119f, 0.26436627f, -0.12885971f, 0.03614564f, 0.6338517f}, AbstractC0249Jp.y(N1.c.b, new float[]{0.964212f, 1.0f, 0.8251883f}, new float[]{0.95042855f, 1.0f, 1.0889004f}));
        d = fArrR;
        float[] fArr = {0.21045426f, 1.9779985f, 0.025904037f, 0.7936178f, -2.4285922f, 0.78277177f, -0.004072047f, 0.4505937f, -0.80867577f};
        e = fArr;
        f = AbstractC0249Jp.O(fArrR);
        g = AbstractC0249Jp.O(fArr);
    }

    @Override // o.AbstractC0345Ni
    public final float a(int i) {
        return i == 0 ? 1.0f : 0.5f;
    }

    @Override // o.AbstractC0345Ni
    public final float b(int i) {
        return i == 0 ? 0.0f : -0.5f;
    }

    @Override // o.AbstractC0345Ni
    public final long d(float f2, float f3, float f4) {
        if (f2 < 0.0f) {
            f2 = 0.0f;
        }
        if (f2 > 1.0f) {
            f2 = 1.0f;
        }
        if (f3 < -0.5f) {
            f3 = -0.5f;
        }
        if (f3 > 0.5f) {
            f3 = 0.5f;
        }
        if (f4 < -0.5f) {
            f4 = -0.5f;
        }
        float f5 = f4 <= 0.5f ? f4 : 0.5f;
        float[] fArr = g;
        float f6 = (fArr[6] * f5) + (fArr[3] * f3) + (fArr[0] * f2);
        float f7 = (fArr[7] * f5) + (fArr[4] * f3) + (fArr[1] * f2);
        float f8 = (fArr[8] * f5) + (fArr[5] * f3) + (fArr[2] * f2);
        float f9 = f7 * f7 * f7;
        float f10 = f8 * f8 * f8;
        float[] fArr2 = f;
        float f11 = (fArr2[6] * f10) + (fArr2[3] * f9) + (fArr2[0] * f6 * f6 * f6);
        return (Float.floatToRawIntBits((fArr2[7] * f10) + (fArr2[4] * f9) + (fArr2[1] * r11)) & 4294967295L) | (Float.floatToRawIntBits(f11) << 32);
    }

    @Override // o.AbstractC0345Ni
    public final float e(float f2, float f3, float f4) {
        if (f2 < 0.0f) {
            f2 = 0.0f;
        }
        if (f2 > 1.0f) {
            f2 = 1.0f;
        }
        if (f3 < -0.5f) {
            f3 = -0.5f;
        }
        if (f3 > 0.5f) {
            f3 = 0.5f;
        }
        if (f4 < -0.5f) {
            f4 = -0.5f;
        }
        float f5 = f4 <= 0.5f ? f4 : 0.5f;
        float[] fArr = g;
        float f6 = (fArr[6] * f5) + (fArr[3] * f3) + (fArr[0] * f2);
        float f7 = (fArr[7] * f5) + (fArr[4] * f3) + (fArr[1] * f2);
        float f8 = (fArr[8] * f5) + (fArr[5] * f3) + (fArr[2] * f2);
        float f9 = f6 * f6 * f6;
        float f10 = f7 * f7 * f7;
        float f11 = f8 * f8 * f8;
        float[] fArr2 = f;
        return (fArr2[8] * f11) + (fArr2[5] * f10) + (fArr2[2] * f9);
    }

    @Override // o.AbstractC0345Ni
    public final long f(float f2, float f3, float f4, float f5, AbstractC0345Ni abstractC0345Ni) {
        float[] fArr = d;
        float f6 = (fArr[6] * f4) + (fArr[3] * f3) + (fArr[0] * f2);
        float f7 = (fArr[7] * f4) + (fArr[4] * f3) + (fArr[1] * f2);
        float f8 = (fArr[8] * f4) + (fArr[5] * f3) + (fArr[2] * f2);
        float fR = AbstractC0940cn0.r(f6);
        float fR2 = AbstractC0940cn0.r(f7);
        float fR3 = AbstractC0940cn0.r(f8);
        float[] fArr2 = e;
        return AbstractC0752ap.a((fArr2[6] * fR3) + (fArr2[3] * fR2) + (fArr2[0] * fR), (fArr2[7] * fR3) + (fArr2[4] * fR2) + (fArr2[1] * fR), (fArr2[8] * fR3) + (fArr2[5] * fR2) + (fArr2[2] * fR), f5, abstractC0345Ni);
    }
}
