package s1;

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

/* loaded from: classes.dex */
public abstract class c1 {
    public static final void a(u1.f fVar, b1 b1Var, y yVar, float f10, u1.g gVar, h0 h0Var, int i10) {
        f1 b10;
        if (b1Var instanceof b1.b) {
            r1.i b11 = ((b1.b) b1Var).b();
            fVar.b1(yVar, g(b11), e(b11), f10, gVar, h0Var, i10);
            return;
        }
        if (b1Var instanceof b1.c) {
            b1.c cVar = (b1.c) b1Var;
            b10 = cVar.c();
            if (b10 == null) {
                r1.k b12 = cVar.b();
                fVar.K(yVar, h(b12), f(b12), r1.b.b(r1.a.d(b12.b()), BitmapDescriptorFactory.HUE_RED, 2, null), f10, gVar, h0Var, i10);
                return;
            }
        } else {
            if (!(b1Var instanceof b1.a)) {
                throw new rm.t();
            }
            b10 = ((b1.a) b1Var).b();
        }
        fVar.h1(b10, yVar, f10, gVar, h0Var, i10);
    }

    public static /* synthetic */ void b(u1.f fVar, b1 b1Var, y yVar, float f10, u1.g gVar, h0 h0Var, int i10, int i11, Object obj) {
        if ((i11 & 4) != 0) {
            f10 = 1.0f;
        }
        float f11 = f10;
        if ((i11 & 8) != 0) {
            gVar = u1.j.f36769a;
        }
        u1.g gVar2 = gVar;
        if ((i11 & 16) != 0) {
            h0Var = null;
        }
        h0 h0Var2 = h0Var;
        if ((i11 & 32) != 0) {
            i10 = u1.f.f36765k.a();
        }
        a(fVar, b1Var, yVar, f11, gVar2, h0Var2, i10);
    }

    public static final void c(u1.f fVar, b1 b1Var, long j10, float f10, u1.g gVar, h0 h0Var, int i10) {
        f1 b10;
        if (b1Var instanceof b1.b) {
            r1.i b11 = ((b1.b) b1Var).b();
            fVar.g1(j10, g(b11), e(b11), f10, gVar, h0Var, i10);
            return;
        }
        if (b1Var instanceof b1.c) {
            b1.c cVar = (b1.c) b1Var;
            b10 = cVar.c();
            if (b10 == null) {
                r1.k b12 = cVar.b();
                fVar.O0(j10, h(b12), f(b12), r1.b.b(r1.a.d(b12.b()), BitmapDescriptorFactory.HUE_RED, 2, null), gVar, f10, h0Var, i10);
                return;
            }
        } else {
            if (!(b1Var instanceof b1.a)) {
                throw new rm.t();
            }
            b10 = ((b1.a) b1Var).b();
        }
        fVar.J0(b10, j10, f10, gVar, h0Var, i10);
    }

    public static /* synthetic */ void d(u1.f fVar, b1 b1Var, long j10, float f10, u1.g gVar, h0 h0Var, int i10, int i11, Object obj) {
        c(fVar, b1Var, j10, (i11 & 4) != 0 ? 1.0f : f10, (i11 & 8) != 0 ? u1.j.f36769a : gVar, (i11 & 16) != 0 ? null : h0Var, (i11 & 32) != 0 ? u1.f.f36765k.a() : i10);
    }

    private static final long e(r1.i iVar) {
        return r1.n.a(iVar.n(), iVar.h());
    }

    private static final long f(r1.k kVar) {
        return r1.n.a(kVar.j(), kVar.d());
    }

    private static final long g(r1.i iVar) {
        return r1.h.a(iVar.i(), iVar.l());
    }

    private static final long h(r1.k kVar) {
        return r1.h.a(kVar.e(), kVar.g());
    }
}
