package o;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.Hi, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C0190Hi {
    public static final long b = AbstractC0752ap.c(4278190080L);
    public static final long c;
    public static final long d;
    public static final long e;
    public static final long f;
    public static final long g;
    public static final /* synthetic */ int h = 0;
    public final long a;

    static {
        AbstractC0752ap.c(4282664004L);
        AbstractC0752ap.c(4287137928L);
        AbstractC0752ap.c(4291611852L);
        c = AbstractC0752ap.c(4294967295L);
        d = AbstractC0752ap.c(4294901760L);
        AbstractC0752ap.c(4278255360L);
        e = AbstractC0752ap.c(4278190335L);
        AbstractC0752ap.c(4294967040L);
        AbstractC0752ap.c(4278255615L);
        AbstractC0752ap.c(4294902015L);
        f = AbstractC0752ap.b(0);
        g = AbstractC0752ap.a(0.0f, 0.0f, 0.0f, 0.0f, C0423Qi.u);
    }

    public /* synthetic */ C0190Hi(long j) {
        this.a = j;
    }

    public static final long a(long j, AbstractC0345Ni abstractC0345Ni) {
        C2269ql c2269qlC;
        AbstractC0345Ni abstractC0345NiF = f(j);
        int i = abstractC0345NiF.c;
        int i2 = abstractC0345Ni.c;
        if ((i | i2) < 0) {
            c2269qlC = AbstractC0249Jp.C(abstractC0345NiF, abstractC0345Ni);
        } else {
            IQ iq = AbstractC2363rl.a;
            int i3 = i | (i2 << 6);
            Object objB = iq.b(i3);
            if (objB == null) {
                objB = AbstractC0249Jp.C(abstractC0345NiF, abstractC0345Ni);
                iq.h(i3, objB);
            }
            c2269qlC = (C2269ql) objB;
        }
        return c2269qlC.a(j);
    }

    public static long b(float f2, long j) {
        return AbstractC0752ap.a(h(j), g(j), e(j), f2, f(j));
    }

    public static final boolean c(long j, long j2) {
        return j == j2;
    }

    public static final float d(long j) {
        float fC;
        float f2;
        if ((63 & j) == 0) {
            fC = (float) AbstractC1904ms0.C((j >>> 56) & 255);
            f2 = 255.0f;
        } else {
            fC = (float) AbstractC1904ms0.C((j >>> 6) & 1023);
            f2 = 1023.0f;
        }
        return fC / f2;
    }

    public static final float e(long j) {
        int i;
        int i2;
        int i3;
        if ((63 & j) == 0) {
            return ((float) AbstractC1904ms0.C((j >>> 32) & 255)) / 255.0f;
        }
        short s = (short) ((j >>> 16) & 65535);
        int i4 = 32768 & s;
        int i5 = ((65535 & s) >>> 10) & 31;
        int i6 = s & 1023;
        if (i5 != 0) {
            int i7 = i6 << 13;
            if (i5 == 31) {
                i = 255;
                if (i7 != 0) {
                    i7 |= 4194304;
                }
            } else {
                i = i5 + 112;
            }
            int i8 = i;
            i2 = i7;
            i3 = i8;
        } else {
            if (i6 != 0) {
                float fIntBitsToFloat = Float.intBitsToFloat(i6 + 1056964608) - AbstractC1534iz.a;
                return i4 == 0 ? fIntBitsToFloat : -fIntBitsToFloat;
            }
            i3 = 0;
            i2 = 0;
        }
        return Float.intBitsToFloat((i3 << 23) | (i4 << 16) | i2);
    }

    public static final AbstractC0345Ni f(long j) {
        float[] fArr = C0423Qi.a;
        return C0423Qi.y[(int) (j & 63)];
    }

    public static final float g(long j) {
        int i;
        int i2;
        int i3;
        if ((63 & j) == 0) {
            return ((float) AbstractC1904ms0.C((j >>> 40) & 255)) / 255.0f;
        }
        short s = (short) ((j >>> 32) & 65535);
        int i4 = 32768 & s;
        int i5 = ((65535 & s) >>> 10) & 31;
        int i6 = s & 1023;
        if (i5 != 0) {
            int i7 = i6 << 13;
            if (i5 == 31) {
                i = 255;
                if (i7 != 0) {
                    i7 |= 4194304;
                }
            } else {
                i = i5 + 112;
            }
            int i8 = i;
            i2 = i7;
            i3 = i8;
        } else {
            if (i6 != 0) {
                float fIntBitsToFloat = Float.intBitsToFloat(i6 + 1056964608) - AbstractC1534iz.a;
                return i4 == 0 ? fIntBitsToFloat : -fIntBitsToFloat;
            }
            i3 = 0;
            i2 = 0;
        }
        return Float.intBitsToFloat((i3 << 23) | (i4 << 16) | i2);
    }

    public static final float h(long j) {
        int i;
        int i2;
        int i3;
        if ((63 & j) == 0) {
            return ((float) AbstractC1904ms0.C((j >>> 48) & 255)) / 255.0f;
        }
        short s = (short) ((j >>> 48) & 65535);
        int i4 = 32768 & s;
        int i5 = ((65535 & s) >>> 10) & 31;
        int i6 = s & 1023;
        if (i5 != 0) {
            int i7 = i6 << 13;
            if (i5 == 31) {
                i = 255;
                if (i7 != 0) {
                    i7 |= 4194304;
                }
            } else {
                i = i5 + 112;
            }
            int i8 = i;
            i2 = i7;
            i3 = i8;
        } else {
            if (i6 != 0) {
                float fIntBitsToFloat = Float.intBitsToFloat(i6 + 1056964608) - AbstractC1534iz.a;
                return i4 == 0 ? fIntBitsToFloat : -fIntBitsToFloat;
            }
            i3 = 0;
            i2 = 0;
        }
        return Float.intBitsToFloat((i3 << 23) | (i4 << 16) | i2);
    }

    public static String i(long j) {
        StringBuilder sb = new StringBuilder("Color(");
        sb.append(h(j));
        sb.append(", ");
        sb.append(g(j));
        sb.append(", ");
        sb.append(e(j));
        sb.append(", ");
        sb.append(d(j));
        sb.append(", ");
        return AbstractC0126Ew.n(sb, f(j).a, ')');
    }

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

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

    public final String toString() {
        return i(this.a);
    }
}
