package o;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* loaded from: classes.dex */
public final class Mc0 implements O6 {
    public final InterfaceC1028dj0 a;
    public final C1597jh0 b;
    public final Object c;
    public final Object d;
    public final Y6 e;
    public final Y6 f;
    public final Y6 g;
    public long h;
    public Y6 i;

    public Mc0(R6 r6, C1597jh0 c1597jh0, Object obj, Object obj2, Y6 y6) {
        this.a = r6.a(c1597jh0);
        this.b = c1597jh0;
        this.c = obj2;
        this.d = obj;
        this.e = (Y6) c1597jh0.a.g(obj);
        OC oc = c1597jh0.a;
        this.f = (Y6) oc.g(obj2);
        this.g = y6 != null ? YT.s(y6) : ((Y6) oc.g(obj)).c();
        this.h = -1L;
    }

    @Override // o.O6
    public final boolean a() {
        return this.a.a();
    }

    @Override // o.O6
    public final Object b(long j) {
        if (g(j)) {
            return this.c;
        }
        Y6 y6M = this.a.m(j, this.e, this.f, this.g);
        int iB = y6M.b();
        for (int i = 0; i < iB; i++) {
            if (Float.isNaN(y6M.a(i))) {
                AbstractC1198fY.b("AnimationVector cannot contain a NaN. " + y6M + ". Animation: " + this + ", playTimeNanos: " + j);
            }
        }
        return this.b.b.g(y6M);
    }

    @Override // o.O6
    public final long c() {
        if (this.h < 0) {
            this.h = this.a.b(this.e, this.f, this.g);
        }
        return this.h;
    }

    @Override // o.O6
    public final C1597jh0 d() {
        return this.b;
    }

    @Override // o.O6
    public final Object e() {
        return this.c;
    }

    @Override // o.O6
    public final Y6 f(long j) {
        if (!g(j)) {
            return this.a.l(j, this.e, this.f, this.g);
        }
        Y6 y6 = this.i;
        if (y6 != null) {
            return y6;
        }
        Y6 y6R = this.a.r(this.e, this.f, this.g);
        this.i = y6R;
        return y6R;
    }

    public final String toString() {
        return "TargetBasedAnimation: " + this.d + " -> " + this.c + ",initial velocity: " + this.g + ", duration: " + (c() / 1000000) + " ms,animationSpec: " + this.a;
    }
}
