package s1;

import com.google.android.gms.dynamite.descriptors.com.google.android.gms.measurement.dynamite.ModuleDescriptor;
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
import com.google.firebase.perf.util.Constants;

/* loaded from: classes.dex */
public final class g0 {

    /* renamed from: b, reason: collision with root package name */
    public static final a f35254b = new a(null);

    /* renamed from: c, reason: collision with root package name */
    private static final long f35255c = i0.d(4278190080L);

    /* renamed from: d, reason: collision with root package name */
    private static final long f35256d = i0.d(4282664004L);

    /* renamed from: e, reason: collision with root package name */
    private static final long f35257e = i0.d(4287137928L);

    /* renamed from: f, reason: collision with root package name */
    private static final long f35258f = i0.d(4291611852L);

    /* renamed from: g, reason: collision with root package name */
    private static final long f35259g = i0.d(4294967295L);

    /* renamed from: h, reason: collision with root package name */
    private static final long f35260h = i0.d(4294901760L);

    /* renamed from: i, reason: collision with root package name */
    private static final long f35261i = i0.d(4278255360L);

    /* renamed from: j, reason: collision with root package name */
    private static final long f35262j = i0.d(4278190335L);

    /* renamed from: k, reason: collision with root package name */
    private static final long f35263k = i0.d(4294967040L);

    /* renamed from: l, reason: collision with root package name */
    private static final long f35264l = i0.d(4278255615L);

    /* renamed from: m, reason: collision with root package name */
    private static final long f35265m = i0.d(4294902015L);

    /* renamed from: n, reason: collision with root package name */
    private static final long f35266n = i0.b(0);

    /* renamed from: o, reason: collision with root package name */
    private static final long f35267o = i0.a(BitmapDescriptorFactory.HUE_RED, BitmapDescriptorFactory.HUE_RED, BitmapDescriptorFactory.HUE_RED, BitmapDescriptorFactory.HUE_RED, t1.g.f35993a.y());

    /* renamed from: a, reason: collision with root package name */
    private final long f35268a;

    /* loaded from: classes.dex */
    public static final class a {
        private a() {
        }

        public /* synthetic */ a(kotlin.jvm.internal.k kVar) {
            this();
        }

        public final long a() {
            return g0.f35255c;
        }

        public final long b() {
            return g0.f35262j;
        }

        public final long c() {
            return g0.f35258f;
        }

        public final long d() {
            return g0.f35260h;
        }

        public final long e() {
            return g0.f35266n;
        }

        public final long f() {
            return g0.f35267o;
        }

        public final long g() {
            return g0.f35259g;
        }
    }

    private /* synthetic */ g0(long j10) {
        this.f35268a = j10;
    }

    public static final /* synthetic */ g0 h(long j10) {
        return new g0(j10);
    }

    public static long i(long j10) {
        return j10;
    }

    public static final long j(long j10, t1.c cVar) {
        return t1.d.i(q(j10), cVar, 0, 2, null).a(j10);
    }

    public static final long k(long j10, float f10, float f11, float f12, float f13) {
        return i0.a(f11, f12, f13, f10, q(j10));
    }

    public static /* synthetic */ long l(long j10, float f10, float f11, float f12, float f13, int i10, Object obj) {
        if ((i10 & 1) != 0) {
            f10 = o(j10);
        }
        float f14 = f10;
        if ((i10 & 2) != 0) {
            f11 = s(j10);
        }
        float f15 = f11;
        if ((i10 & 4) != 0) {
            f12 = r(j10);
        }
        float f16 = f12;
        if ((i10 & 8) != 0) {
            f13 = p(j10);
        }
        return k(j10, f14, f15, f16, f13);
    }

    public static boolean m(long j10, Object obj) {
        return (obj instanceof g0) && j10 == ((g0) obj).v();
    }

    public static final boolean n(long j10, long j11) {
        return rm.h0.m(j10, j11);
    }

    public static final float o(long j10) {
        float c10;
        float f10;
        if (rm.h0.e(63 & j10) == 0) {
            c10 = (float) rm.p0.c(rm.h0.e(rm.h0.e(j10 >>> 56) & 255));
            f10 = 255.0f;
        } else {
            c10 = (float) rm.p0.c(rm.h0.e(rm.h0.e(j10 >>> 6) & 1023));
            f10 = 1023.0f;
        }
        return c10 / f10;
    }

    public static final float p(long j10) {
        int i10;
        int i11;
        int i12;
        float f10;
        if (rm.h0.e(63 & j10) == 0) {
            return ((float) rm.p0.c(rm.h0.e(rm.h0.e(j10 >>> 32) & 255))) / 255.0f;
        }
        int e10 = ((short) rm.h0.e(rm.h0.e(j10 >>> 16) & 65535)) & 65535;
        int i13 = 32768 & e10;
        int i14 = (e10 >>> 10) & 31;
        int i15 = e10 & 1023;
        if (i14 != 0) {
            int i16 = i15 << 13;
            if (i14 == 31) {
                i10 = Constants.MAX_HOST_LENGTH;
                if (i16 != 0) {
                    i16 |= 4194304;
                }
            } else {
                i10 = (i14 - 15) + ModuleDescriptor.MODULE_VERSION;
            }
            int i17 = i10;
            i11 = i16;
            i12 = i17;
        } else {
            if (i15 != 0) {
                float intBitsToFloat = Float.intBitsToFloat(i15 + 1056964608);
                f10 = r0.f35325c;
                float f11 = intBitsToFloat - f10;
                return i13 == 0 ? f11 : -f11;
            }
            i12 = 0;
            i11 = 0;
        }
        return Float.intBitsToFloat((i12 << 23) | (i13 << 16) | i11);
    }

    public static final t1.c q(long j10) {
        t1.g gVar = t1.g.f35993a;
        return gVar.l()[(int) rm.h0.e(j10 & 63)];
    }

    public static final float r(long j10) {
        int i10;
        int i11;
        int i12;
        float f10;
        if (rm.h0.e(63 & j10) == 0) {
            return ((float) rm.p0.c(rm.h0.e(rm.h0.e(j10 >>> 40) & 255))) / 255.0f;
        }
        int e10 = ((short) rm.h0.e(rm.h0.e(j10 >>> 32) & 65535)) & 65535;
        int i13 = 32768 & e10;
        int i14 = (e10 >>> 10) & 31;
        int i15 = e10 & 1023;
        if (i14 != 0) {
            int i16 = i15 << 13;
            if (i14 == 31) {
                i10 = Constants.MAX_HOST_LENGTH;
                if (i16 != 0) {
                    i16 |= 4194304;
                }
            } else {
                i10 = (i14 - 15) + ModuleDescriptor.MODULE_VERSION;
            }
            int i17 = i10;
            i11 = i16;
            i12 = i17;
        } else {
            if (i15 != 0) {
                float intBitsToFloat = Float.intBitsToFloat(i15 + 1056964608);
                f10 = r0.f35325c;
                float f11 = intBitsToFloat - f10;
                return i13 == 0 ? f11 : -f11;
            }
            i12 = 0;
            i11 = 0;
        }
        return Float.intBitsToFloat((i12 << 23) | (i13 << 16) | i11);
    }

    public static final float s(long j10) {
        int i10;
        int i11;
        int i12;
        float f10;
        if (rm.h0.e(63 & j10) == 0) {
            return ((float) rm.p0.c(rm.h0.e(rm.h0.e(j10 >>> 48) & 255))) / 255.0f;
        }
        int e10 = ((short) rm.h0.e(rm.h0.e(j10 >>> 48) & 65535)) & 65535;
        int i13 = 32768 & e10;
        int i14 = (e10 >>> 10) & 31;
        int i15 = e10 & 1023;
        if (i14 != 0) {
            int i16 = i15 << 13;
            if (i14 == 31) {
                i10 = Constants.MAX_HOST_LENGTH;
                if (i16 != 0) {
                    i16 |= 4194304;
                }
            } else {
                i10 = (i14 - 15) + ModuleDescriptor.MODULE_VERSION;
            }
            int i17 = i10;
            i11 = i16;
            i12 = i17;
        } else {
            if (i15 != 0) {
                float intBitsToFloat = Float.intBitsToFloat(i15 + 1056964608);
                f10 = r0.f35325c;
                float f11 = intBitsToFloat - f10;
                return i13 == 0 ? f11 : -f11;
            }
            i12 = 0;
            i11 = 0;
        }
        return Float.intBitsToFloat((i12 << 23) | (i13 << 16) | i11);
    }

    public static int t(long j10) {
        return rm.h0.r(j10);
    }

    public static String u(long j10) {
        return "Color(" + s(j10) + ", " + r(j10) + ", " + p(j10) + ", " + o(j10) + ", " + q(j10).f() + ')';
    }

    public boolean equals(Object obj) {
        return m(this.f35268a, obj);
    }

    public int hashCode() {
        return t(this.f35268a);
    }

    public String toString() {
        return u(this.f35268a);
    }

    public final /* synthetic */ long v() {
        return this.f35268a;
    }
}
