package J;

import h1.m;
import kotlin.jvm.internal.o;
import o0.C2632c;
import o0.C2633d;
import p0.C2694L;
import p0.M;
import p0.N;
import p0.X;

/* JADX INFO: loaded from: classes.dex */
public final class f implements X {

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

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

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

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

    public f(a aVar, a aVar2, a aVar3, a aVar4) {
        this.f2690a = aVar;
        this.f2691b = aVar2;
        this.f2692c = aVar3;
        this.f2693d = aVar4;
    }

    public static f a(f fVar, a aVar, a aVar2, a aVar3, a aVar4, int i6) {
        if ((i6 & 1) != 0) {
            aVar = fVar.f2690a;
        }
        if ((i6 & 2) != 0) {
            aVar2 = fVar.f2691b;
        }
        if ((i6 & 4) != 0) {
            aVar3 = fVar.f2692c;
        }
        if ((i6 & 8) != 0) {
            aVar4 = fVar.f2693d;
        }
        fVar.getClass();
        return new f(aVar, aVar2, aVar3, aVar4);
    }

    @Override // p0.X
    /* JADX INFO: renamed from: createOutline-Pq9zytI */
    public final N mo3createOutlinePq9zytI(long j4, m mVar, h1.c cVar) {
        float fA = this.f2690a.a(j4, cVar);
        float fA2 = this.f2691b.a(j4, cVar);
        float fA3 = this.f2692c.a(j4, cVar);
        float fA4 = this.f2693d.a(j4, cVar);
        float fC = o0.e.c(j4);
        float f6 = fA + fA4;
        if (f6 > fC) {
            float f7 = fC / f6;
            fA *= f7;
            fA4 *= f7;
        }
        float f8 = fA2 + fA3;
        if (f8 > fC) {
            float f9 = fC / f8;
            fA2 *= f9;
            fA3 *= f9;
        }
        if (fA < 0.0f || fA2 < 0.0f || fA3 < 0.0f || fA4 < 0.0f) {
            A.b.a("Corner size in Px can't be negative(topStart = " + fA + ", topEnd = " + fA2 + ", bottomEnd = " + fA3 + ", bottomStart = " + fA4 + ")!");
        }
        if (fA + fA2 + fA3 + fA4 == 0.0f) {
            return new C2694L(m1.g.b(0L, j4));
        }
        C2632c c2632cB = m1.g.b(0L, j4);
        m mVar2 = m.f16628a;
        float f10 = mVar == mVar2 ? fA : fA2;
        long jFloatToRawIntBits = (((long) Float.floatToRawIntBits(f10)) << 32) | (((long) Float.floatToRawIntBits(f10)) & 4294967295L);
        if (mVar == mVar2) {
            fA = fA2;
        }
        long jFloatToRawIntBits2 = (((long) Float.floatToRawIntBits(fA)) << 32) | (((long) Float.floatToRawIntBits(fA)) & 4294967295L);
        float f11 = mVar == mVar2 ? fA3 : fA4;
        long jFloatToRawIntBits3 = (((long) Float.floatToRawIntBits(f11)) << 32) | (((long) Float.floatToRawIntBits(f11)) & 4294967295L);
        if (mVar != mVar2) {
            fA4 = fA3;
        }
        return new M(new C2633d(c2632cB.f21787a, c2632cB.f21788b, c2632cB.f21789c, c2632cB.f21790d, jFloatToRawIntBits, jFloatToRawIntBits2, jFloatToRawIntBits3, (((long) Float.floatToRawIntBits(fA4)) << 32) | (((long) Float.floatToRawIntBits(fA4)) & 4294967295L)));
    }

    public final boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (!(obj instanceof f)) {
            return false;
        }
        f fVar = (f) obj;
        if (!o.c(this.f2690a, fVar.f2690a)) {
            return false;
        }
        if (!o.c(this.f2691b, fVar.f2691b)) {
            return false;
        }
        if (o.c(this.f2692c, fVar.f2692c)) {
            return o.c(this.f2693d, fVar.f2693d);
        }
        return false;
    }

    public final int hashCode() {
        return this.f2693d.hashCode() + ((this.f2692c.hashCode() + ((this.f2691b.hashCode() + (this.f2690a.hashCode() * 31)) * 31)) * 31);
    }

    public final String toString() {
        return "RoundedCornerShape(topStart = " + this.f2690a + ", topEnd = " + this.f2691b + ", bottomEnd = " + this.f2692c + ", bottomStart = " + this.f2693d + ')';
    }
}
