package q2;

import b3.e;
import b3.f;
import b3.j;

/* loaded from: classes.dex */
public abstract class v {

    /* renamed from: a, reason: collision with root package name */
    private static final long f33378a = c3.v.f7436b.a();

    /* JADX WARN: Code restructure failed: missing block: B:42:0x003f, code lost:
    
        if (c3.v.e(r14, r24.e()) != false) goto L14;
     */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public static final u a(u uVar, int i10, int i11, long j10, b3.q qVar, x xVar, b3.h hVar, int i12, int i13, b3.s sVar) {
        long j11;
        int i14 = i10;
        b3.q qVar2 = qVar;
        j.a aVar = b3.j.f6691b;
        boolean z10 = true;
        if (b3.j.k(i14, aVar.g()) || b3.j.k(i14, uVar.h())) {
            if (!c3.w.h(j10)) {
                j11 = j10;
            } else {
                j11 = j10;
            }
            if ((qVar2 == null || kotlin.jvm.internal.t.b(qVar2, uVar.j())) && ((b3.l.j(i11, b3.l.f6705b.f()) || b3.l.j(i11, uVar.i())) && ((xVar == null || kotlin.jvm.internal.t.b(xVar, uVar.g())) && ((hVar == null || kotlin.jvm.internal.t.b(hVar, uVar.f())) && ((b3.f.f(i12, b3.f.f6656b.b()) || b3.f.f(i12, uVar.d())) && ((b3.e.g(i13, b3.e.f6651b.c()) || b3.e.g(i13, uVar.c())) && (sVar == null || kotlin.jvm.internal.t.b(sVar, uVar.k())))))))) {
                z10 = false;
            }
        } else {
            j11 = j10;
        }
        if (!z10) {
            return uVar;
        }
        long e10 = c3.w.h(j10) ? uVar.e() : j11;
        if (qVar2 == null) {
            qVar2 = uVar.j();
        }
        b3.q qVar3 = qVar2;
        if (b3.j.k(i14, aVar.g())) {
            i14 = uVar.h();
        }
        return new u(i14, !b3.l.j(i11, b3.l.f6705b.f()) ? i11 : uVar.i(), e10, qVar3, d(uVar, xVar), hVar == null ? uVar.f() : hVar, !b3.f.f(i12, b3.f.f6656b.b()) ? i12 : uVar.d(), !b3.e.g(i13, b3.e.f6651b.c()) ? i13 : uVar.c(), sVar == null ? uVar.k() : sVar, null);
    }

    public static final u b(u uVar, u uVar2, float f10) {
        int n10 = ((b3.j) c0.d(b3.j.h(uVar.h()), b3.j.h(uVar2.h()), f10)).n();
        int m10 = ((b3.l) c0.d(b3.l.g(uVar.i()), b3.l.g(uVar2.i()), f10)).m();
        long f11 = c0.f(uVar.e(), uVar2.e(), f10);
        b3.q j10 = uVar.j();
        if (j10 == null) {
            j10 = b3.q.f6722c.a();
        }
        b3.q j11 = uVar2.j();
        if (j11 == null) {
            j11 = b3.q.f6722c.a();
        }
        return new u(n10, m10, f11, b3.r.a(j10, j11, f10), c(uVar.g(), uVar2.g(), f10), (b3.h) c0.d(uVar.f(), uVar2.f(), f10), ((b3.f) c0.d(b3.f.c(uVar.d()), b3.f.c(uVar2.d()), f10)).l(), ((b3.e) c0.d(b3.e.d(uVar.c()), b3.e.d(uVar2.c()), f10)).j(), (b3.s) c0.d(uVar.k(), uVar2.k(), f10), null);
    }

    private static final x c(x xVar, x xVar2, float f10) {
        if (xVar == null && xVar2 == null) {
            return null;
        }
        if (xVar == null) {
            xVar = x.f33379c.a();
        }
        if (xVar2 == null) {
            xVar2 = x.f33379c.a();
        }
        return c.b(xVar, xVar2, f10);
    }

    private static final x d(u uVar, x xVar) {
        return uVar.g() == null ? xVar : xVar == null ? uVar.g() : uVar.g().d(xVar);
    }

    public static final u e(u uVar, c3.t tVar) {
        int h10 = uVar.h();
        j.a aVar = b3.j.f6691b;
        int f10 = b3.j.k(h10, aVar.g()) ? aVar.f() : uVar.h();
        int e10 = p0.e(tVar, uVar.i());
        long e11 = c3.w.h(uVar.e()) ? f33378a : uVar.e();
        b3.q j10 = uVar.j();
        if (j10 == null) {
            j10 = b3.q.f6722c.a();
        }
        b3.q qVar = j10;
        x g10 = uVar.g();
        b3.h f11 = uVar.f();
        int d10 = uVar.d();
        f.a aVar2 = b3.f.f6656b;
        int a10 = b3.f.f(d10, aVar2.b()) ? aVar2.a() : uVar.d();
        int c10 = uVar.c();
        e.a aVar3 = b3.e.f6651b;
        int b10 = b3.e.g(c10, aVar3.c()) ? aVar3.b() : uVar.c();
        b3.s k10 = uVar.k();
        if (k10 == null) {
            k10 = b3.s.f6726c.a();
        }
        return new u(f10, e10, e11, qVar, g10, f11, a10, b10, k10, null);
    }
}
