package q;

/* JADX INFO: loaded from: classes.dex */
public final class M0 implements L0 {

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

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public AbstractC2798s f23198b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public AbstractC2798s f23199c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public AbstractC2798s f23200d;

    public M0(l2.c cVar) {
        this.f23197a = cVar;
    }

    @Override // q.I0
    public final long b(AbstractC2798s abstractC2798s, AbstractC2798s abstractC2798s2, AbstractC2798s abstractC2798s3) {
        int iB = abstractC2798s.b();
        long jMax = 0;
        for (int i6 = 0; i6 < iB; i6++) {
            jMax = Math.max(jMax, this.f23197a.e(i6).c(abstractC2798s.a(i6), abstractC2798s2.a(i6), abstractC2798s3.a(i6)));
        }
        return jMax;
    }

    @Override // q.I0
    public final AbstractC2798s c(long j4, AbstractC2798s abstractC2798s, AbstractC2798s abstractC2798s2, AbstractC2798s abstractC2798s3) {
        if (this.f23198b == null) {
            this.f23198b = abstractC2798s.c();
        }
        AbstractC2798s abstractC2798s4 = this.f23198b;
        if (abstractC2798s4 == null) {
            kotlin.jvm.internal.o.n("valueVector");
            throw null;
        }
        int iB = abstractC2798s4.b();
        for (int i6 = 0; i6 < iB; i6++) {
            AbstractC2798s abstractC2798s5 = this.f23198b;
            if (abstractC2798s5 == null) {
                kotlin.jvm.internal.o.n("valueVector");
                throw null;
            }
            abstractC2798s5.e(this.f23197a.e(i6).e(j4, abstractC2798s.a(i6), abstractC2798s2.a(i6), abstractC2798s3.a(i6)), i6);
        }
        AbstractC2798s abstractC2798s6 = this.f23198b;
        if (abstractC2798s6 != null) {
            return abstractC2798s6;
        }
        kotlin.jvm.internal.o.n("valueVector");
        throw null;
    }

    @Override // q.I0
    public final AbstractC2798s d(long j4, AbstractC2798s abstractC2798s, AbstractC2798s abstractC2798s2, AbstractC2798s abstractC2798s3) {
        if (this.f23199c == null) {
            this.f23199c = abstractC2798s3.c();
        }
        AbstractC2798s abstractC2798s4 = this.f23199c;
        if (abstractC2798s4 == null) {
            kotlin.jvm.internal.o.n("velocityVector");
            throw null;
        }
        int iB = abstractC2798s4.b();
        for (int i6 = 0; i6 < iB; i6++) {
            AbstractC2798s abstractC2798s5 = this.f23199c;
            if (abstractC2798s5 == null) {
                kotlin.jvm.internal.o.n("velocityVector");
                throw null;
            }
            abstractC2798s5.e(this.f23197a.e(i6).b(j4, abstractC2798s.a(i6), abstractC2798s2.a(i6), abstractC2798s3.a(i6)), i6);
        }
        AbstractC2798s abstractC2798s6 = this.f23199c;
        if (abstractC2798s6 != null) {
            return abstractC2798s6;
        }
        kotlin.jvm.internal.o.n("velocityVector");
        throw null;
    }

    @Override // q.I0
    public final AbstractC2798s g(AbstractC2798s abstractC2798s, AbstractC2798s abstractC2798s2, AbstractC2798s abstractC2798s3) {
        if (this.f23200d == null) {
            this.f23200d = abstractC2798s3.c();
        }
        AbstractC2798s abstractC2798s4 = this.f23200d;
        if (abstractC2798s4 == null) {
            kotlin.jvm.internal.o.n("endVelocityVector");
            throw null;
        }
        int iB = abstractC2798s4.b();
        for (int i6 = 0; i6 < iB; i6++) {
            AbstractC2798s abstractC2798s5 = this.f23200d;
            if (abstractC2798s5 == null) {
                kotlin.jvm.internal.o.n("endVelocityVector");
                throw null;
            }
            abstractC2798s5.e(this.f23197a.e(i6).d(abstractC2798s.a(i6), abstractC2798s2.a(i6), abstractC2798s3.a(i6)), i6);
        }
        AbstractC2798s abstractC2798s6 = this.f23200d;
        if (abstractC2798s6 != null) {
            return abstractC2798s6;
        }
        kotlin.jvm.internal.o.n("endVelocityVector");
        throw null;
    }

    public M0(InterfaceC2753D interfaceC2753D) {
        this(new l2.c(interfaceC2753D, 14));
    }
}
