package defpackage;

import android.graphics.Color;

/* JADX INFO: renamed from: ˊᴵᐧʦ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes3.dex */
public final class C1357 {

    /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
    public final float f5621;

    /* JADX INFO: renamed from: ːˏᵟᵯ, reason: contains not printable characters */
    public final float f5622;

    /* JADX INFO: renamed from: ᵨᵣ, reason: contains not printable characters */
    public final float f5623;

    /* JADX INFO: renamed from: ᵲᵶᵳˈ, reason: contains not printable characters */
    public final float f5624;

    /* JADX INFO: renamed from: ᵷᵺʾᵖ, reason: contains not printable characters */
    public final float f5625;

    /* JADX INFO: renamed from: ᵻˈᵦʼ, reason: contains not printable characters */
    public final float f5626;

    public C1357(float f, float f2, float f3, float f4, float f5, float f6) {
        this.f5624 = f;
        this.f5621 = f2;
        this.f5622 = f3;
        this.f5625 = f4;
        this.f5623 = f5;
        this.f5626 = f6;
    }

    /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
    public static C1357 m3903(float f, float f2, float f3) {
        C0915 c0915 = C0915.f4015;
        float f4 = c0915.f4023;
        Math.sqrt(((double) f) / 100.0d);
        float f5 = c0915.f4021 + 4.0f;
        float f6 = c0915.f4024 * f2;
        Math.sqrt(((f2 / ((float) Math.sqrt(r1))) * c0915.f4023) / f5);
        float f7 = (1.7f * f) / ((0.007f * f) + 1.0f);
        float fLog = ((float) Math.log((((double) f6) * 0.0228d) + 1.0d)) * 43.85965f;
        double d = (3.1415927f * f3) / 180.0f;
        return new C1357(f3, f2, f, f7, fLog * ((float) Math.cos(d)), fLog * ((float) Math.sin(d)));
    }

    /* JADX INFO: renamed from: ᵲᵶᵳˈ, reason: contains not printable characters */
    public static C1357 m3904(int i) {
        C0915 c0915 = C0915.f4015;
        float f = ᵿᵽᵤ.ᵝᵶ(Color.red(i));
        float f2 = ᵿᵽᵤ.ᵝᵶ(Color.green(i));
        float f3 = ᵿᵽᵤ.ᵝᵶ(Color.blue(i));
        float[][] fArr = ᵿᵽᵤ.ᵯᵷʽ;
        float[] fArr2 = fArr[0];
        float f4 = (fArr2[2] * f3) + (fArr2[1] * f2) + (fArr2[0] * f);
        float[] fArr3 = fArr[1];
        float f5 = (fArr3[2] * f3) + (fArr3[1] * f2) + (fArr3[0] * f);
        float[] fArr4 = fArr[2];
        float f6 = (f3 * fArr4[2]) + (f2 * fArr4[1]) + (f * fArr4[0]);
        float[][] fArr5 = ᵿᵽᵤ.ᵜᵪʾ;
        float[] fArr6 = fArr5[0];
        float f7 = (fArr6[2] * f6) + (fArr6[1] * f5) + (fArr6[0] * f4);
        float[] fArr7 = fArr5[1];
        float f8 = (fArr7[2] * f6) + (fArr7[1] * f5) + (fArr7[0] * f4);
        float[] fArr8 = fArr5[2];
        float f9 = (f6 * fArr8[2]) + (f5 * fArr8[1]) + (f4 * fArr8[0]);
        float[] fArr9 = c0915.f4022;
        float f10 = c0915.f4024;
        float f11 = c0915.f4023;
        float f12 = c0915.f4021;
        float f13 = fArr9[0] * f7;
        float f14 = fArr9[1] * f8;
        float f15 = fArr9[2] * f9;
        float f16 = c0915.f4017;
        float fPow = (float) Math.pow(((double) (Math.abs(f13) * f16)) / 100.0d, 0.42d);
        float fPow2 = (float) Math.pow(((double) (Math.abs(f14) * f16)) / 100.0d, 0.42d);
        float fPow3 = (float) Math.pow(((double) (Math.abs(f15) * f16)) / 100.0d, 0.42d);
        float fSignum = ((Math.signum(f13) * 400.0f) * fPow) / (fPow + 27.13f);
        float fSignum2 = ((Math.signum(f14) * 400.0f) * fPow2) / (fPow2 + 27.13f);
        float fSignum3 = ((Math.signum(f15) * 400.0f) * fPow3) / (fPow3 + 27.13f);
        double d = fSignum3;
        float f17 = ((float) (((((double) fSignum2) * (-12.0d)) + (((double) fSignum) * 11.0d)) + d)) / 11.0f;
        float f18 = ((float) (((double) (fSignum + fSignum2)) - (d * 2.0d))) / 9.0f;
        float f19 = fSignum2 * 20.0f;
        float f20 = ((21.0f * fSignum3) + ((fSignum * 20.0f) + f19)) / 20.0f;
        float f21 = (((fSignum * 40.0f) + f19) + fSignum3) / 20.0f;
        float fAtan2 = (((float) Math.atan2(f18, f17)) * 180.0f) / 3.1415927f;
        if (fAtan2 < 0.0f) {
            fAtan2 += 360.0f;
        } else if (fAtan2 >= 360.0f) {
            fAtan2 -= 360.0f;
        }
        float f22 = (3.1415927f * fAtan2) / 180.0f;
        float fPow4 = ((float) Math.pow((f21 * c0915.f4016) / f12, c0915.f4020 * f11)) * 100.0f;
        Math.sqrt(fPow4 / 100.0f);
        float f23 = f12 + 4.0f;
        float fPow5 = ((float) Math.pow(1.64d - Math.pow(0.29d, c0915.f4025), 0.73d)) * ((float) Math.pow((((((((float) (Math.cos(((((double) (((double) fAtan2) < 20.14d ? 360.0f + fAtan2 : fAtan2)) * 3.141592653589793d) / 180.0d) + 2.0d) + 3.8d)) * 0.25f) * 3846.1538f) * c0915.f4019) * c0915.f4018) * ((float) Math.sqrt((f18 * f18) + (f17 * f17)))) / (f20 + 0.305f), 0.9d)) * ((float) Math.sqrt(((double) fPow4) / 100.0d));
        Math.sqrt((r0 * f11) / f23);
        float f24 = (1.7f * fPow4) / ((0.007f * fPow4) + 1.0f);
        float fLog = ((float) Math.log((f10 * fPow5 * 0.0228f) + 1.0f)) * 43.85965f;
        double d2 = f22;
        return new C1357(fAtan2, fPow5, fPow4, f24, fLog * ((float) Math.cos(d2)), fLog * ((float) Math.sin(d2)));
    }

    /* JADX WARN: Removed duplicated region for block: B:8:0x001f  */
    /* JADX INFO: renamed from: ːˏᵟᵯ, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final int m3905(C0915 c0915) {
        float fSqrt;
        float f = this.f5621;
        double d = f;
        float f2 = this.f5622;
        if (d != 0.0d) {
            double d2 = f2;
            fSqrt = d2 == 0.0d ? 0.0f : f / ((float) Math.sqrt(d2 / 100.0d));
        }
        float f3 = c0915.f4025;
        float f4 = c0915.f4017;
        float fPow = (float) Math.pow(((double) fSqrt) / Math.pow(1.64d - Math.pow(0.29d, f3), 0.73d), 1.1111111111111112d);
        double d3 = (this.f5624 * 3.1415927f) / 180.0f;
        float fCos = ((float) (Math.cos(2.0d + d3) + 3.8d)) * 0.25f;
        float fPow2 = c0915.f4021 * ((float) Math.pow(((double) f2) / 100.0d, (1.0d / ((double) c0915.f4023)) / ((double) c0915.f4020)));
        float f5 = fCos * 3846.1538f * c0915.f4019 * c0915.f4018;
        float f6 = fPow2 / c0915.f4016;
        float fSin = (float) Math.sin(d3);
        float fCos2 = (float) Math.cos(d3);
        float f7 = (((0.305f + f6) * 23.0f) * fPow) / (((fPow * 108.0f) * fSin) + (((11.0f * fPow) * fCos2) + (f5 * 23.0f)));
        float f8 = fCos2 * f7;
        float f9 = f7 * fSin;
        float f10 = f6 * 460.0f;
        float f11 = ((288.0f * f9) + ((451.0f * f8) + f10)) / 1403.0f;
        float f12 = ((f10 - (891.0f * f8)) - (261.0f * f9)) / 1403.0f;
        float f13 = ((f10 - (f8 * 220.0f)) - (f9 * 6300.0f)) / 1403.0f;
        float f14 = 100.0f / f4;
        float fSignum = Math.signum(f11) * f14 * ((float) Math.pow((float) Math.max(0.0d, (((double) Math.abs(f11)) * 27.13d) / (400.0d - ((double) Math.abs(f11)))), 2.380952380952381d));
        float fSignum2 = Math.signum(f12) * f14 * ((float) Math.pow((float) Math.max(0.0d, (((double) Math.abs(f12)) * 27.13d) / (400.0d - ((double) Math.abs(f12)))), 2.380952380952381d));
        float fSignum3 = Math.signum(f13) * f14 * ((float) Math.pow((float) Math.max(0.0d, (((double) Math.abs(f13)) * 27.13d) / (400.0d - ((double) Math.abs(f13)))), 2.380952380952381d));
        float[] fArr = c0915.f4022;
        float f15 = fSignum / fArr[0];
        float f16 = fSignum2 / fArr[1];
        float f17 = fSignum3 / fArr[2];
        float[][] fArr2 = ᵿᵽᵤ.ᵔᵖᵹᵫ;
        float[] fArr3 = fArr2[0];
        float f18 = (fArr3[2] * f17) + (fArr3[1] * f16) + (fArr3[0] * f15);
        float[] fArr4 = fArr2[1];
        float f19 = (fArr4[2] * f17) + (fArr4[1] * f16) + (fArr4[0] * f15);
        float[] fArr5 = fArr2[2];
        return AbstractC2434.m6172(f18, f19, (f17 * fArr5[2]) + (f16 * fArr5[1]) + (f15 * fArr5[0]));
    }
}
