package o;

import android.graphics.Path;
import java.util.List;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* loaded from: classes.dex */
public final class TV extends AbstractC2738vi0 {
    public AbstractC0601Xe b;
    public float c = 1.0f;
    public List d;
    public float e;
    public float f;
    public AbstractC0601Xe g;
    public int h;
    public int i;
    public float j;
    public float k;
    public float l;
    public float m;
    public boolean n;

    /* renamed from: o, reason: collision with root package name */
    public boolean f342o;
    public boolean p;
    public C1395hb0 q;
    public final O4 r;
    public O4 s;
    public final Object t;

    public TV() {
        int i = Zi0.a;
        this.d = C0332Mv.l;
        this.e = 1.0f;
        this.h = 0;
        this.i = 0;
        this.j = 4.0f;
        this.l = 1.0f;
        this.n = true;
        this.f342o = true;
        O4 o4A = Q4.a();
        this.r = o4A;
        this.s = o4A;
        this.t = AbstractC2001nt0.y(3, C0744al.A);
    }

    @Override // o.AbstractC2738vi0
    public final void a(InterfaceC2095ot interfaceC2095ot) {
        InterfaceC2095ot interfaceC2095ot2;
        C1395hb0 c1395hb0;
        if (this.n) {
            IJ.I(this.d, this.r);
            e();
        } else if (this.p) {
            e();
        }
        this.n = false;
        this.p = false;
        AbstractC0601Xe abstractC0601Xe = this.b;
        if (abstractC0601Xe != null) {
            interfaceC2095ot2 = interfaceC2095ot;
            InterfaceC2095ot.k0(interfaceC2095ot2, this.s, abstractC0601Xe, this.c, null, 56);
        } else {
            interfaceC2095ot2 = interfaceC2095ot;
        }
        AbstractC0601Xe abstractC0601Xe2 = this.g;
        if (abstractC0601Xe2 != null) {
            C1395hb0 c1395hb02 = this.q;
            if (this.f342o || c1395hb02 == null) {
                C1395hb0 c1395hb03 = new C1395hb0(this.f, this.j, this.h, this.i, 16);
                this.q = c1395hb03;
                this.f342o = false;
                c1395hb0 = c1395hb03;
            } else {
                c1395hb0 = c1395hb02;
            }
            InterfaceC2095ot.k0(interfaceC2095ot2, this.s, abstractC0601Xe2, this.e, c1395hb0, 48);
        }
    }

    /* JADX WARN: Type inference failed for: r0v10, types: [java.lang.Object, o.zK] */
    public final void e() {
        float f = this.k;
        O4 o4 = this.r;
        if (f == 0.0f && this.l == 1.0f) {
            this.s = o4;
            return;
        }
        if (F3.c(this.s, o4)) {
            this.s = Q4.a();
        } else {
            Path.FillType fillType = this.s.a.getFillType();
            Path.FillType fillType2 = Path.FillType.EVEN_ODD;
            boolean z = fillType == fillType2;
            this.s.a.rewind();
            Path path = this.s.a;
            if (!z) {
                fillType2 = Path.FillType.WINDING;
            }
            path.setFillType(fillType2);
        }
        ?? r0 = this.t;
        ((P4) r0.getValue()).a.setPath(o4 != null ? o4.a : null, false);
        float length = ((P4) r0.getValue()).a.getLength();
        float f2 = this.k;
        float f3 = this.m;
        float f4 = ((f2 + f3) % 1.0f) * length;
        float f5 = ((this.l + f3) % 1.0f) * length;
        if (f4 <= f5) {
            ((P4) r0.getValue()).a(f4, f5, this.s);
        } else {
            ((P4) r0.getValue()).a(f4, length, this.s);
            ((P4) r0.getValue()).a(0.0f, f5, this.s);
        }
    }

    public final String toString() {
        return this.r.toString();
    }
}
