package q;

import p.AbstractC2658b;

/* JADX INFO: renamed from: q.v, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public final class C2804v implements InterfaceC2779i {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final C0.J f23461a;

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

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

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

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public final AbstractC2798s f23465e;

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public final AbstractC2798s f23466f;

    /* JADX INFO: renamed from: g, reason: collision with root package name */
    public final Object f23467g;

    /* JADX INFO: renamed from: h, reason: collision with root package name */
    public final long f23468h;

    public C2804v(C2805w c2805w, G0 g0, Object obj, AbstractC2798s abstractC2798s) {
        C0.J j4 = new C0.J(c2805w.f23472a);
        this.f23461a = j4;
        this.f23462b = g0;
        this.f23463c = obj;
        AbstractC2798s abstractC2798s2 = (AbstractC2798s) g0.f23171a.invoke(obj);
        this.f23464d = abstractC2798s2;
        this.f23465e = AbstractC2771e.i(abstractC2798s);
        this.f23467g = g0.f23172b.invoke(j4.e(abstractC2798s2, abstractC2798s));
        if (((AbstractC2798s) j4.f535d) == null) {
            j4.f535d = abstractC2798s2.c();
        }
        AbstractC2798s abstractC2798s3 = (AbstractC2798s) j4.f535d;
        if (abstractC2798s3 == null) {
            kotlin.jvm.internal.o.n("velocityVector");
            throw null;
        }
        int iB = abstractC2798s3.b();
        long jMax = 0;
        for (int i6 = 0; i6 < iB; i6++) {
            abstractC2798s2.getClass();
            jMax = Math.max(jMax, ((long) (Math.exp(((p.c0) ((l2.c) j4.f533b).f20267b).b(abstractC2798s.a(i6)) / (((double) p.d0.f22723a) - 1.0d)) * 1000.0d)) * 1000000);
        }
        this.f23468h = jMax;
        AbstractC2798s abstractC2798sI = AbstractC2771e.i(this.f23461a.f(jMax, this.f23464d, abstractC2798s));
        this.f23466f = abstractC2798sI;
        int iB2 = abstractC2798sI.b();
        for (int i7 = 0; i7 < iB2; i7++) {
            AbstractC2798s abstractC2798s4 = this.f23466f;
            float fA = abstractC2798s4.a(i7);
            this.f23461a.getClass();
            this.f23461a.getClass();
            abstractC2798s4.e(L4.a.u(fA, -0.0f, 0.0f), i7);
        }
    }

    @Override // q.InterfaceC2779i
    public final boolean a() {
        return false;
    }

    @Override // q.InterfaceC2779i
    public final long b() {
        return this.f23468h;
    }

    @Override // q.InterfaceC2779i
    public final G0 c() {
        return this.f23462b;
    }

    @Override // q.InterfaceC2779i
    public final AbstractC2798s d(long j4) {
        if (e(j4)) {
            return this.f23466f;
        }
        return this.f23461a.f(j4, this.f23464d, this.f23465e);
    }

    @Override // q.InterfaceC2779i
    public final Object f(long j4) {
        if (e(j4)) {
            return this.f23467g;
        }
        J4.c cVar = this.f23462b.f23172b;
        C0.J j6 = this.f23461a;
        AbstractC2798s abstractC2798s = (AbstractC2798s) j6.f534c;
        AbstractC2798s abstractC2798s2 = this.f23464d;
        if (abstractC2798s == null) {
            j6.f534c = abstractC2798s2.c();
        }
        AbstractC2798s abstractC2798s3 = (AbstractC2798s) j6.f534c;
        String str = "valueVector";
        if (abstractC2798s3 == null) {
            kotlin.jvm.internal.o.n("valueVector");
            throw null;
        }
        int iB = abstractC2798s3.b();
        int i6 = 0;
        while (i6 < iB) {
            AbstractC2798s abstractC2798s4 = (AbstractC2798s) j6.f534c;
            if (abstractC2798s4 == null) {
                kotlin.jvm.internal.o.n(str);
                throw null;
            }
            float fA = abstractC2798s2.a(i6);
            long j7 = j4 / 1000000;
            p.b0 b0VarA = ((p.c0) ((l2.c) j6.f533b).f20267b).a(this.f23465e.a(i6));
            String str2 = str;
            long j8 = b0VarA.f22701c;
            abstractC2798s4.e((Math.signum(b0VarA.f22699a) * b0VarA.f22700b * AbstractC2658b.a(j8 > 0 ? j7 / j8 : 1.0f).f22695a) + fA, i6);
            i6++;
            str = str2;
        }
        String str3 = str;
        AbstractC2798s abstractC2798s5 = (AbstractC2798s) j6.f534c;
        if (abstractC2798s5 != null) {
            return cVar.invoke(abstractC2798s5);
        }
        kotlin.jvm.internal.o.n(str3);
        throw null;
    }

    @Override // q.InterfaceC2779i
    public final Object g() {
        return this.f23467g;
    }
}
