package p0;

import n.C2566A;
import n2.AbstractC2612c;
import q0.AbstractC2811c;
import q0.AbstractC2817i;
import q0.AbstractC2819k;
import q0.C2813e;
import q0.C2816h;

/* JADX INFO: renamed from: p0.u, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public final class C2714u {

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public static final long f22935b = AbstractC2686D.e(4278190080L);

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public static final long f22936c = AbstractC2686D.e(4282664004L);

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public static final long f22937d = AbstractC2686D.e(4287137928L);

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public static final long f22938e = AbstractC2686D.e(4291611852L);

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public static final long f22939f = AbstractC2686D.e(4294967295L);

    /* JADX INFO: renamed from: g, reason: collision with root package name */
    public static final long f22940g = AbstractC2686D.e(4294901760L);

    /* JADX INFO: renamed from: h, reason: collision with root package name */
    public static final long f22941h = AbstractC2686D.e(4278255360L);

    /* JADX INFO: renamed from: i, reason: collision with root package name */
    public static final long f22942i = AbstractC2686D.e(4278190335L);

    /* JADX INFO: renamed from: j, reason: collision with root package name */
    public static final long f22943j = AbstractC2686D.e(4294967040L);

    /* JADX INFO: renamed from: k, reason: collision with root package name */
    public static final long f22944k = AbstractC2686D.e(4278255615L);
    public static final long l;

    /* JADX INFO: renamed from: m, reason: collision with root package name */
    public static final long f22945m;

    /* JADX INFO: renamed from: n, reason: collision with root package name */
    public static final /* synthetic */ int f22946n = 0;

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final long f22947a;

    static {
        AbstractC2686D.e(4294902015L);
        l = AbstractC2686D.c(0);
        f22945m = AbstractC2686D.b(0.0f, 0.0f, 0.0f, 0.0f, C2813e.f23524u);
    }

    public /* synthetic */ C2714u(long j4) {
        this.f22947a = j4;
    }

    public static final /* synthetic */ C2714u a(long j4) {
        return new C2714u(j4);
    }

    public static final long b(long j4, AbstractC2811c abstractC2811c) {
        C2816h c2816hE;
        AbstractC2811c abstractC2811cG = g(j4);
        int i6 = abstractC2811cG.f23503c;
        int i7 = abstractC2811c.f23503c;
        if ((i6 | i7) < 0) {
            c2816hE = AbstractC2819k.e(abstractC2811cG, abstractC2811c);
        } else {
            C2566A c2566a = AbstractC2817i.f23536a;
            int i8 = i6 | (i7 << 6);
            Object objB = c2566a.b(i8);
            if (objB == null) {
                objB = AbstractC2819k.e(abstractC2811cG, abstractC2811c);
                c2566a.i(i8, objB);
            }
            c2816hE = (C2816h) objB;
        }
        return c2816hE.a(j4);
    }

    public static long c(float f6, long j4) {
        return AbstractC2686D.b(i(j4), h(j4), f(j4), f6, g(j4));
    }

    public static final boolean d(long j4, long j6) {
        return j4 == j6;
    }

    public static final float e(long j4) {
        float fV;
        float f6;
        if ((63 & j4) == 0) {
            fV = (float) AbstractC2612c.v((j4 >>> 56) & 255);
            f6 = 255.0f;
        } else {
            fV = (float) AbstractC2612c.v((j4 >>> 6) & 1023);
            f6 = 1023.0f;
        }
        return fV / f6;
    }

    public static final float f(long j4) {
        int i6;
        int i7;
        int i8;
        if ((63 & j4) == 0) {
            return ((float) AbstractC2612c.v((j4 >>> 32) & 255)) / 255.0f;
        }
        short s6 = (short) ((j4 >>> 16) & 65535);
        int i9 = Short.MIN_VALUE & s6;
        int i10 = ((65535 & s6) >>> 10) & 31;
        int i11 = s6 & 1023;
        if (i10 != 0) {
            int i12 = i11 << 13;
            if (i10 == 31) {
                i6 = 255;
                if (i12 != 0) {
                    i12 |= 4194304;
                }
            } else {
                i6 = i10 + 112;
            }
            int i13 = i6;
            i7 = i12;
            i8 = i13;
        } else {
            if (i11 != 0) {
                float fIntBitsToFloat = Float.intBitsToFloat(i11 + 1056964608) - AbstractC2683A.f22833a;
                return i9 == 0 ? fIntBitsToFloat : -fIntBitsToFloat;
            }
            i8 = 0;
            i7 = 0;
        }
        return Float.intBitsToFloat((i8 << 23) | (i9 << 16) | i7);
    }

    public static final AbstractC2811c g(long j4) {
        float[] fArr = C2813e.f23505a;
        return C2813e.f23528y[(int) (j4 & 63)];
    }

    public static final float h(long j4) {
        int i6;
        int i7;
        int i8;
        if ((63 & j4) == 0) {
            return ((float) AbstractC2612c.v((j4 >>> 40) & 255)) / 255.0f;
        }
        short s6 = (short) ((j4 >>> 32) & 65535);
        int i9 = Short.MIN_VALUE & s6;
        int i10 = ((65535 & s6) >>> 10) & 31;
        int i11 = s6 & 1023;
        if (i10 != 0) {
            int i12 = i11 << 13;
            if (i10 == 31) {
                i6 = 255;
                if (i12 != 0) {
                    i12 |= 4194304;
                }
            } else {
                i6 = i10 + 112;
            }
            int i13 = i6;
            i7 = i12;
            i8 = i13;
        } else {
            if (i11 != 0) {
                float fIntBitsToFloat = Float.intBitsToFloat(i11 + 1056964608) - AbstractC2683A.f22833a;
                return i9 == 0 ? fIntBitsToFloat : -fIntBitsToFloat;
            }
            i8 = 0;
            i7 = 0;
        }
        return Float.intBitsToFloat((i8 << 23) | (i9 << 16) | i7);
    }

    public static final float i(long j4) {
        int i6;
        int i7;
        int i8;
        if ((63 & j4) == 0) {
            return ((float) AbstractC2612c.v((j4 >>> 48) & 255)) / 255.0f;
        }
        short s6 = (short) ((j4 >>> 48) & 65535);
        int i9 = Short.MIN_VALUE & s6;
        int i10 = ((65535 & s6) >>> 10) & 31;
        int i11 = s6 & 1023;
        if (i10 != 0) {
            int i12 = i11 << 13;
            if (i10 == 31) {
                i6 = 255;
                if (i12 != 0) {
                    i12 |= 4194304;
                }
            } else {
                i6 = i10 + 112;
            }
            int i13 = i6;
            i7 = i12;
            i8 = i13;
        } else {
            if (i11 != 0) {
                float fIntBitsToFloat = Float.intBitsToFloat(i11 + 1056964608) - AbstractC2683A.f22833a;
                return i9 == 0 ? fIntBitsToFloat : -fIntBitsToFloat;
            }
            i8 = 0;
            i7 = 0;
        }
        return Float.intBitsToFloat((i8 << 23) | (i9 << 16) | i7);
    }

    public static String j(long j4) {
        StringBuilder sb = new StringBuilder("Color(");
        sb.append(i(j4));
        sb.append(", ");
        sb.append(h(j4));
        sb.append(", ");
        sb.append(f(j4));
        sb.append(", ");
        sb.append(e(j4));
        sb.append(", ");
        return Z0.o.r(sb, g(j4).f23501a, ')');
    }

    public final boolean equals(Object obj) {
        if (obj instanceof C2714u) {
            return this.f22947a == ((C2714u) obj).f22947a;
        }
        return false;
    }

    public final int hashCode() {
        return Long.hashCode(this.f22947a);
    }

    public final String toString() {
        return j(this.f22947a);
    }
}
