package r0;

import com.google.android.gms.maps.model.BitmapDescriptorFactory;

/* loaded from: classes.dex */
public abstract class l0 {
    public static final float a(q2.j0 j0Var, int i10, boolean z10, boolean z11) {
        return j0Var.j(i10, j0Var.c(((!z10 || z11) && (z10 || !z11)) ? Math.max(i10 + (-1), 0) : i10) == j0Var.y(i10));
    }

    public static final long b(q2.j0 j0Var, int i10, boolean z10, boolean z11) {
        float j10;
        float j11;
        int q10 = j0Var.q(i10);
        if (q10 >= j0Var.n()) {
            return r1.g.f34318b.b();
        }
        j10 = jn.o.j(a(j0Var, i10, z10, z11), BitmapDescriptorFactory.HUE_RED, c3.r.g(j0Var.B()));
        j11 = jn.o.j(j0Var.m(q10), BitmapDescriptorFactory.HUE_RED, c3.r.f(j0Var.B()));
        return r1.h.a(j10, j11);
    }
}
