package defpackage;

import android.os.Looper;
import android.util.AndroidRuntimeException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;

/* JADX INFO: renamed from: ˁᵤˊ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes3.dex */
public final class C0744 extends AbstractC2842 implements InterfaceC3064 {

    /* JADX INFO: renamed from: ᵨˈʼﹶ, reason: contains not printable characters */
    public static final C4170 f3359 = new C4170(2);

    /* JADX INFO: renamed from: ʽᵡᵢᵾ, reason: contains not printable characters */
    public long f3360;

    /* JADX INFO: renamed from: ʿٴˇ, reason: contains not printable characters */
    public C1331 f3361;

    /* JADX INFO: renamed from: ˀᵭ, reason: contains not printable characters */
    public long f3362;

    /* JADX INFO: renamed from: ˁˌᵩ, reason: contains not printable characters */
    public long f3363;

    /* JADX INFO: renamed from: ˈⁱᵡ, reason: contains not printable characters */
    public AbstractC5374 f3365;

    /* JADX INFO: renamed from: ˉᵵᵜ, reason: contains not printable characters */
    public InterfaceC5340 f3366;

    /* JADX INFO: renamed from: ˊᵡᵗʨ, reason: contains not printable characters */
    public boolean f3367;

    /* JADX INFO: renamed from: ˊᵾʽʼ, reason: contains not printable characters */
    public int f3368;

    /* JADX INFO: renamed from: ˑʢ, reason: contains not printable characters */
    public boolean f3370;

    /* JADX INFO: renamed from: ˑˊᵲ, reason: contains not printable characters */
    public C2453 f3371;

    /* JADX INFO: renamed from: ᵛˑﹳ, reason: contains not printable characters */
    public boolean f3372;

    /* JADX INFO: renamed from: ᵠˏˏ, reason: contains not printable characters */
    public long f3373;

    /* JADX INFO: renamed from: ᵵᵬᵽ, reason: contains not printable characters */
    public C0468 f3376;

    /* JADX INFO: renamed from: ᵨᵼⁱ, reason: contains not printable characters */
    public ArrayList f3374 = new ArrayList();

    /* JADX INFO: renamed from: ᵯᵷʽ, reason: contains not printable characters */
    public C4053 f3375 = new C4053(0);

    /* JADX INFO: renamed from: ᵶˇᵱ, reason: contains not printable characters */
    public ArrayList f3377 = new ArrayList();

    /* JADX INFO: renamed from: ˈᵲᵢ, reason: contains not printable characters */
    public ArrayList f3364 = new ArrayList();

    /* JADX INFO: renamed from: ˌᵨʠᵫ, reason: contains not printable characters */
    public boolean f3369 = false;

    /* JADX INFO: renamed from: ᵸˆˁ, reason: contains not printable characters */
    public boolean f3378 = false;

    public C0744() {
        C2453 c2453M6185 = C2453.m6185(0.0f, 1.0f);
        c2453M6185.mo2681(0L);
        this.f3371 = c2453M6185;
        C1331 c1331 = new C1331(c2453M6185);
        this.f3361 = c1331;
        this.f3373 = -1L;
        this.f3366 = null;
        this.f3363 = 0L;
        this.f3362 = -1L;
        this.f3368 = -1;
        this.f3367 = false;
        this.f3372 = true;
        this.f3376 = new C0468(this);
        this.f3370 = false;
        this.f3360 = -1L;
        this.f3365 = new C0313(this, 0);
        this.f3375.put(c2453M6185, c1331);
        this.f3364.add(this.f3361);
    }

    /* JADX INFO: renamed from: ˑˊᵲ, reason: contains not printable characters */
    public static boolean m2668(C0744 c0744) {
        for (int i = 0; i < c0744.m2690().size(); i++) {
            AbstractC2842 abstractC2842 = (AbstractC2842) c0744.m2690().get(i);
            if (!(abstractC2842 instanceof C0744) || !m2668((C0744) abstractC2842)) {
                return false;
            }
        }
        return true;
    }

    /* JADX INFO: renamed from: ᵠˏˏ, reason: contains not printable characters */
    public static void m2669(long j, C1331 c1331) {
        if (c1331.f5549) {
            return;
        }
        c1331.f5549 = c1331.f5546.mo2689((long) (j * 1.0f));
    }

    /* JADX INFO: renamed from: ᵨᵼⁱ, reason: contains not printable characters */
    public static void m2670(C1331 c1331, ArrayList arrayList) {
        if (arrayList.contains(c1331)) {
            return;
        }
        arrayList.add(c1331);
        if (c1331.f5551 == null) {
            return;
        }
        for (int i = 0; i < c1331.f5551.size(); i++) {
            m2670((C1331) c1331.f5551.get(i), arrayList);
        }
    }

    @Override // defpackage.AbstractC2842
    public final void cancel() {
        if (Looper.myLooper() == null) {
            throw new AndroidRuntimeException("Animators may only be run on Looper threads");
        }
        if (this.f3378) {
            ArrayList arrayList = this.f10886;
            if (arrayList != null) {
                ArrayList arrayList2 = (ArrayList) arrayList.clone();
                int size = arrayList2.size();
                for (int i = 0; i < size; i++) {
                    ((InterfaceC4009) arrayList2.get(i)).mo8803();
                }
            }
            ArrayList arrayList3 = new ArrayList(this.f3374);
            int size2 = arrayList3.size();
            for (int i2 = 0; i2 < size2; i2++) {
                ((C1331) arrayList3.get(i2)).f5546.cancel();
            }
            this.f3374.clear();
            m2686();
        }
    }

    public final String toString() {
        String str = "AnimatorSet@" + Integer.toHexString(hashCode()) + "{";
        int size = this.f3364.size();
        for (int i = 0; i < size; i++) {
            str = str + "\n    " + ((C1331) this.f3364.get(i)).f5546.toString();
        }
        return str.concat("\n}");
    }

    @Override // defpackage.InterfaceC3064
    /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
    public final boolean mo2671(long j) {
        ArrayList arrayList;
        if (this.f3362 < 0) {
            this.f3362 = j;
        }
        long j2 = this.f3360;
        if (j2 > 0) {
            this.f3362 = (j - j2) + this.f3362;
            this.f3360 = -1L;
        }
        C0468 c0468 = this.f3376;
        if (c0468.f2563 != -1) {
            c0468.m1927(this.f3367);
            boolean z = this.f3367;
            C0468 c04682 = this.f3376;
            if (z) {
                this.f3362 = j - ((long) (c04682.f2563 * 1.0f));
            } else {
                this.f3362 = j - ((long) (c04682.f2563 * 1.0f));
            }
            mo2678(!z);
            this.f3374.clear();
            for (int size = this.f3364.size() - 1; size >= 0; size--) {
                ((C1331) this.f3364.get(size)).f5549 = false;
            }
            this.f3368 = -1;
            C0468 c04683 = this.f3376;
            c04683.f2563 = -1L;
            c04683.f2561 = false;
        }
        if (this.f3367 || j >= this.f3362) {
            long j3 = (long) ((j - this.f3362) / 1.0f);
            int iM2685 = m2685(j3);
            m2683(this.f3368, iM2685, j3);
            this.f3368 = iM2685;
            int i = 0;
            while (true) {
                int size2 = this.f3374.size();
                arrayList = this.f3374;
                if (i >= size2) {
                    break;
                }
                C1331 c1331 = (C1331) arrayList.get(i);
                if (!c1331.f5549) {
                    m2669(m2675(j3, c1331), c1331);
                }
                i++;
            }
            for (int size3 = arrayList.size() - 1; size3 >= 0; size3--) {
                if (((C1331) this.f3374.get(size3)).f5549) {
                    this.f3374.remove(size3);
                }
            }
            boolean z2 = this.f3367;
            ArrayList arrayList2 = this.f3374;
            boolean z3 = !z2 ? !(arrayList2.isEmpty() && this.f3368 == this.f3377.size() - 1) : !(arrayList2.size() == 1 && this.f3374.get(0) == this.f3361) && (!this.f3374.isEmpty() || this.f3368 >= 3);
            if (this.f10887 != null) {
                for (int i2 = 0; i2 < this.f10887.size(); i2++) {
                    ((InterfaceC2509) this.f10887.get(i2)).m6229(this);
                }
            }
            if (z3) {
                m2686();
                return true;
            }
        }
        return false;
    }

    /* JADX INFO: renamed from: ʿٴˇ, reason: contains not printable characters */
    public final void m2672(AbstractC2842... abstractC2842Arr) {
        AbstractC2842 abstractC2842 = abstractC2842Arr[0];
        this.f3369 = true;
        C1331 c1331M2693 = m2693(abstractC2842);
        for (int i = 1; i < abstractC2842Arr.length; i++) {
            c1331M2693.m3855(m2693(abstractC2842Arr[i]));
        }
    }

    /* JADX INFO: renamed from: ˀᵭ, reason: contains not printable characters */
    public final void m2673(C1331 c1331, ArrayList arrayList) {
        int i = 0;
        if (c1331.f5550 == null) {
            if (c1331 == this.f3361) {
                while (i < this.f3364.size()) {
                    C1331 c13312 = (C1331) this.f3364.get(i);
                    if (c13312 != this.f3361) {
                        c13312.f5547 = -1L;
                        c13312.f5554 = -1L;
                    }
                    i++;
                }
                return;
            }
            return;
        }
        arrayList.add(c1331);
        int size = c1331.f5550.size();
        while (i < size) {
            C1331 c13313 = (C1331) c1331.f5550.get(i);
            c13313.f5548 = c13313.f5546.mo2696();
            int iIndexOf = arrayList.indexOf(c13313);
            if (iIndexOf >= 0) {
                while (iIndexOf < arrayList.size()) {
                    ((C1331) arrayList.get(iIndexOf)).f5553 = null;
                    ((C1331) arrayList.get(iIndexOf)).f5547 = -1L;
                    ((C1331) arrayList.get(iIndexOf)).f5554 = -1L;
                    iIndexOf++;
                }
                c13313.f5547 = -1L;
                c13313.f5554 = -1L;
                c13313.f5553 = null;
                toString();
            } else {
                long j = c13313.f5547;
                if (j != -1) {
                    long j2 = c1331.f5554;
                    if (j2 == -1) {
                        c13313.f5553 = c1331;
                        c13313.f5547 = -1L;
                        c13313.f5554 = -1L;
                    } else {
                        if (j2 >= j) {
                            c13313.f5553 = c1331;
                            c13313.f5547 = j2;
                        }
                        long j3 = c13313.f5548;
                        c13313.f5554 = j3 == -1 ? -1L : c13313.f5547 + j3;
                    }
                }
                m2673(c13313, arrayList);
            }
            i++;
        }
        arrayList.remove(c1331);
    }

    /* JADX INFO: renamed from: ˁˌᵩ, reason: contains not printable characters */
    public final void m2674() {
        if (this.f3373 >= 0) {
            int size = this.f3364.size();
            for (int i = 0; i < size; i++) {
                ((C1331) this.f3364.get(i)).f5546.mo2681(this.f3373);
            }
        }
        this.f3371.mo2681(0L);
    }

    /* JADX INFO: renamed from: ˈᵲᵢ, reason: contains not printable characters */
    public final long m2675(long j, C1331 c1331) {
        if (!this.f3367) {
            return j - c1331.f5547;
        }
        return c1331.f5554 - (mo2696() - j);
    }

    @Override // defpackage.AbstractC2842
    /* JADX INFO: renamed from: ˉᵲ, reason: contains not printable characters */
    public final void mo2676() {
        m2677(false, true);
    }

    /* JADX INFO: renamed from: ˉᵵᵜ, reason: contains not printable characters */
    public final void m2677(boolean z, boolean z2) {
        if (Looper.myLooper() == null) {
            throw new AndroidRuntimeException("Animators may only be run on Looper threads");
        }
        this.f3378 = true;
        this.f3372 = z2;
        this.f3360 = -1L;
        int size = this.f3364.size();
        for (int i = 0; i < size; i++) {
            ((C1331) this.f3364.get(i)).f5549 = false;
        }
        m2695();
        if (z && mo2696() == -1) {
            C4468.m9515("Cannot reverse infinite AnimatorSet");
            return;
        }
        this.f3367 = z;
        boolean zM2668 = m2668(this);
        if (!zM2668) {
            for (int i2 = 1; i2 < this.f3364.size(); i2++) {
                ((C1331) this.f3364.get(i2)).f5546.m6824(this.f3365);
            }
            C0468 c0468 = this.f3376;
            C0744 c0744 = c0468.f2562;
            long j = 0;
            if ((c0744.f3367 ? c0744.mo2696() - c0468.f2563 : c0468.f2563) == 0 && this.f3367) {
                C0468 c04682 = this.f3376;
                c04682.f2563 = -1L;
                c04682.f2561 = false;
            }
            boolean zMo2691 = mo2691();
            boolean z3 = this.f3367;
            if (zMo2691) {
                mo2678(!z3);
            } else if (z3) {
                if (!mo2691()) {
                    this.f3370 = true;
                    mo2678(false);
                }
                mo2678(!this.f3367);
            } else {
                for (int size2 = this.f3377.size() - 1; size2 >= 0; size2--) {
                    if (((C1580) this.f3377.get(size2)).f6347 == 1) {
                        AbstractC2842 abstractC2842 = ((C1580) this.f3377.get(size2)).f6348.f5546;
                        if (abstractC2842.mo2691()) {
                            abstractC2842.mo2678(true);
                        }
                    }
                }
            }
            C0468 c04683 = this.f3376;
            if (c04683.f2563 != -1) {
                c04683.m1927(this.f3367);
                j = this.f3376.f2563;
            }
            int iM2685 = m2685(j);
            m2683(-1, iM2685, j);
            for (int size3 = this.f3374.size() - 1; size3 >= 0; size3--) {
                if (((C1331) this.f3374.get(size3)).f5549) {
                    this.f3374.remove(size3);
                }
            }
            this.f3368 = iM2685;
            if (this.f3372) {
                AbstractC2842.m6823(this);
            }
        }
        ArrayList arrayList = this.f10886;
        if (arrayList != null) {
            ArrayList arrayList2 = (ArrayList) arrayList.clone();
            int size4 = arrayList2.size();
            for (int i3 = 0; i3 < size4; i3++) {
                ((InterfaceC4009) arrayList2.get(i3)).mo8802(this);
            }
        }
        if (zM2668) {
            mo2680();
        }
    }

    @Override // defpackage.AbstractC2842
    /* JADX INFO: renamed from: ˊᵙᵾᵲ, reason: contains not printable characters */
    public final void mo2678(boolean z) {
        if (this.f3372 && !mo2691()) {
            C4468.m9515("Children must be initialized.");
            return;
        }
        m2695();
        if (z) {
            for (int size = this.f3377.size() - 1; size >= 0; size--) {
                if (((C1580) this.f3377.get(size)).f6347 == 1) {
                    ((C1580) this.f3377.get(size)).f6348.f5546.mo2678(true);
                }
            }
            return;
        }
        for (int i = 0; i < this.f3377.size(); i++) {
            if (((C1580) this.f3377.get(i)).f6347 == 2) {
                ((C1580) this.f3377.get(i)).f6348.f5546.mo2678(false);
            }
        }
    }

    @Override // defpackage.AbstractC2842
    /* JADX INFO: renamed from: ˊᵨᵧ, reason: contains not printable characters and merged with bridge method [inline-methods] and merged with bridge method [inline-methods] */
    public final C0744 mo2692() {
        C0744 c0744 = (C0744) super.mo2692();
        int size = this.f3364.size();
        c0744.f3378 = false;
        c0744.f3362 = -1L;
        c0744.f3368 = -1;
        c0744.f3360 = -1L;
        c0744.f3376 = new C0468(this);
        c0744.f3372 = true;
        c0744.f3374 = new ArrayList();
        c0744.f3375 = new C4053(0);
        c0744.f3364 = new ArrayList(size);
        c0744.f3377 = new ArrayList();
        c0744.f3365 = new C0313(c0744, 1);
        c0744.f3367 = false;
        c0744.f3369 = true;
        HashMap map = new HashMap(size);
        for (int i = 0; i < size; i++) {
            C1331 c1331 = (C1331) this.f3364.get(i);
            C1331 c1331Clone = c1331.clone();
            AbstractC2842 abstractC2842 = c1331Clone.f5546;
            AbstractC5374 abstractC5374 = this.f3365;
            ArrayList arrayList = abstractC2842.f10886;
            if (arrayList != null) {
                arrayList.remove(abstractC5374);
                if (abstractC2842.f10886.size() == 0) {
                    abstractC2842.f10886 = null;
                }
            }
            map.put(c1331, c1331Clone);
            c0744.f3364.add(c1331Clone);
            c0744.f3375.put(c1331Clone.f5546, c1331Clone);
        }
        C1331 c13312 = (C1331) map.get(this.f3361);
        c0744.f3361 = c13312;
        c0744.f3371 = (C2453) c13312.f5546;
        for (int i2 = 0; i2 < size; i2++) {
            C1331 c13313 = (C1331) this.f3364.get(i2);
            C1331 c13314 = (C1331) map.get(c13313);
            C1331 c13315 = c13313.f5553;
            c13314.f5553 = c13315 == null ? null : (C1331) map.get(c13315);
            ArrayList arrayList2 = c13313.f5550;
            int size2 = arrayList2 == null ? 0 : arrayList2.size();
            for (int i3 = 0; i3 < size2; i3++) {
                c13314.f5550.set(i3, (C1331) map.get(c13313.f5550.get(i3)));
            }
            ArrayList arrayList3 = c13313.f5551;
            int size3 = arrayList3 == null ? 0 : arrayList3.size();
            for (int i4 = 0; i4 < size3; i4++) {
                c13314.f5551.set(i4, (C1331) map.get(c13313.f5551.get(i4)));
            }
            ArrayList arrayList4 = c13313.f5552;
            int size4 = arrayList4 == null ? 0 : arrayList4.size();
            for (int i5 = 0; i5 < size4; i5++) {
                c13314.f5552.set(i5, (C1331) map.get(c13313.f5552.get(i5)));
            }
        }
        return c0744;
    }

    @Override // defpackage.AbstractC2842
    /* JADX INFO: renamed from: ˊᵫᵗ, reason: contains not printable characters */
    public final void mo2680() {
        if (Looper.myLooper() == null) {
            throw new AndroidRuntimeException("Animators may only be run on Looper threads");
        }
        if (this.f3378) {
            if (this.f3367) {
                int size = this.f3368;
                if (size == -1) {
                    size = this.f3377.size();
                }
                this.f3368 = size;
                while (true) {
                    int i = this.f3368;
                    if (i <= 0) {
                        break;
                    }
                    int i2 = i - 1;
                    this.f3368 = i2;
                    C1580 c1580 = (C1580) this.f3377.get(i2);
                    AbstractC2842 abstractC2842 = c1580.f6348.f5546;
                    if (!((C1331) this.f3375.get(abstractC2842)).f5549) {
                        int i3 = c1580.f6347;
                        if (i3 == 2) {
                            abstractC2842.mo2687();
                        } else if (i3 == 1 && abstractC2842.mo2694()) {
                            abstractC2842.mo2680();
                        }
                    }
                }
            } else {
                while (this.f3368 < this.f3377.size() - 1) {
                    int i4 = this.f3368 + 1;
                    this.f3368 = i4;
                    C1580 c15802 = (C1580) this.f3377.get(i4);
                    AbstractC2842 abstractC28422 = c15802.f6348.f5546;
                    if (!((C1331) this.f3375.get(abstractC28422)).f5549) {
                        int i5 = c15802.f6347;
                        if (i5 == 0) {
                            abstractC28422.mo2676();
                        } else if (i5 == 2 && abstractC28422.mo2694()) {
                            abstractC28422.mo2680();
                        }
                    }
                }
            }
            this.f3374.clear();
        }
        m2686();
    }

    @Override // defpackage.AbstractC2842
    /* JADX INFO: renamed from: ˋˈ, reason: contains not printable characters */
    public final AbstractC2842 mo2681(long j) {
        if (j < 0) {
            ᵕᵩʽᵲ.ᵮᵣᵗˈ("duration must be a value of zero or greater");
            return null;
        }
        this.f3369 = true;
        this.f3373 = j;
        return this;
    }

    /* JADX INFO: renamed from: ˌᴵ, reason: contains not printable characters */
    public final void m2682() {
        boolean z;
        if (!this.f3369) {
            for (int i = 0; i < this.f3364.size(); i++) {
                if (((C1331) this.f3364.get(i)).f5548 == ((C1331) this.f3364.get(i)).f5546.mo2696()) {
                }
            }
            return;
        }
        this.f3369 = false;
        int size = this.f3364.size();
        for (int i2 = 0; i2 < size; i2++) {
            ((C1331) this.f3364.get(i2)).f5545 = false;
        }
        for (int i3 = 0; i3 < size; i3++) {
            C1331 c1331 = (C1331) this.f3364.get(i3);
            if (!c1331.f5545) {
                c1331.f5545 = true;
                ArrayList arrayList = c1331.f5551;
                if (arrayList != null) {
                    m2670(c1331, arrayList);
                    c1331.f5551.remove(c1331);
                    int size2 = c1331.f5551.size();
                    for (int i4 = 0; i4 < size2; i4++) {
                        ArrayList arrayList2 = ((C1331) c1331.f5551.get(i4)).f5552;
                        if (arrayList2 != null) {
                            int size3 = arrayList2.size();
                            for (int i5 = 0; i5 < size3; i5++) {
                                c1331.m3853((C1331) arrayList2.get(i5));
                            }
                        }
                    }
                    for (int i6 = 0; i6 < size2; i6++) {
                        C1331 c13312 = (C1331) c1331.f5551.get(i6);
                        ArrayList arrayList3 = c1331.f5552;
                        c13312.getClass();
                        if (arrayList3 != null) {
                            int size4 = arrayList3.size();
                            for (int i7 = 0; i7 < size4; i7++) {
                                c13312.m3853((C1331) arrayList3.get(i7));
                            }
                        }
                        c13312.f5545 = true;
                    }
                }
            }
        }
        for (int i8 = 0; i8 < size; i8++) {
            C1331 c13313 = (C1331) this.f3364.get(i8);
            C1331 c13314 = this.f3361;
            if (c13313 != c13314 && c13313.f5552 == null) {
                c13313.m3853(c13314);
            }
        }
        ArrayList arrayList4 = new ArrayList(this.f3364.size());
        C1331 c13315 = this.f3361;
        c13315.f5547 = 0L;
        c13315.f5554 = this.f3371.f9518;
        m2673(c13315, arrayList4);
        this.f3377.clear();
        for (int i9 = 1; i9 < this.f3364.size(); i9++) {
            C1331 c13316 = (C1331) this.f3364.get(i9);
            this.f3377.add(new C1580(c13316, 0));
            this.f3377.add(new C1580(c13316, 1));
            this.f3377.add(new C1580(c13316, 2));
        }
        Collections.sort(this.f3377, f3359);
        int size5 = this.f3377.size();
        int i10 = 0;
        while (true) {
            ArrayList arrayList5 = this.f3377;
            if (i10 >= size5) {
                if (!arrayList5.isEmpty() && ((C1580) this.f3377.get(0)).f6347 != 0) {
                    C4468.m9515("Sorting went bad, the start event should always be at index 0");
                    return;
                }
                this.f3377.add(0, new C1580(this.f3361, 0));
                this.f3377.add(1, new C1580(this.f3361, 1));
                this.f3377.add(2, new C1580(this.f3361, 2));
                if (((C1580) AbstractC3653.m8235(1, this.f3377)).f6347 == 0 || ((C1580) AbstractC3653.m8235(1, this.f3377)).f6347 == 1) {
                    C4468.m9515("Something went wrong, the last event is not an end event");
                    return;
                } else {
                    this.f3363 = ((C1580) AbstractC3653.m8235(1, this.f3377)).m4431();
                    return;
                }
            }
            C1580 c1580 = (C1580) arrayList5.get(i10);
            int i11 = c1580.f6347;
            C1331 c13317 = c1580.f6348;
            if (i11 == 2) {
                long j = c13317.f5547;
                long j2 = c13317.f5554;
                if (j == j2) {
                    z = true;
                } else {
                    c13317.f5546.getClass();
                    if (j2 == j) {
                        z = false;
                    }
                }
                int i12 = i10 + 1;
                int i13 = size5;
                int i14 = i13;
                for (int i15 = i12; i15 < size5 && (i13 >= size5 || i14 >= size5); i15++) {
                    if (((C1580) this.f3377.get(i15)).f6348 == c13317) {
                        if (((C1580) this.f3377.get(i15)).f6347 == 0) {
                            i13 = i15;
                        } else if (((C1580) this.f3377.get(i15)).f6347 == 1) {
                            i14 = i15;
                        }
                    }
                }
                if (z && i13 == this.f3377.size()) {
                    C4468.m9515("Something went wrong, no start isfound after stop for an animation that has the same start and endtime.");
                    return;
                }
                if (i14 == this.f3377.size()) {
                    C4468.m9515("Something went wrong, no startdelay end is found after stop for an animation");
                    return;
                }
                if (z) {
                    this.f3377.add(i10, (C1580) this.f3377.remove(i13));
                    i10 = i12;
                }
                this.f3377.add(i10, (C1580) this.f3377.remove(i14));
                i10 += 2;
            }
            i10++;
        }
    }

    /* JADX INFO: renamed from: ˌᵨʠᵫ, reason: contains not printable characters */
    public final void m2683(int i, int i2, long j) {
        if (!this.f3367) {
            for (int i3 = i + 1; i3 <= i2; i3++) {
                C1580 c1580 = (C1580) this.f3377.get(i3);
                C1331 c1331 = c1580.f6348;
                int i4 = c1580.f6347;
                if (i4 == 0) {
                    this.f3374.add(c1331);
                    if (c1331.f5546.mo2694()) {
                        c1331.f5546.cancel();
                    }
                    c1331.f5549 = false;
                    c1331.f5546.mo2684(false);
                    m2669(0L, c1331);
                } else if (i4 == 2 && !c1331.f5549) {
                    m2669(m2675(j, c1331), c1331);
                }
            }
            return;
        }
        if (i == -1) {
            i = this.f3377.size();
        }
        for (int i5 = i - 1; i5 >= i2; i5--) {
            C1580 c15802 = (C1580) this.f3377.get(i5);
            C1331 c13312 = c15802.f6348;
            int i6 = c15802.f6347;
            if (i6 == 2) {
                if (c13312.f5546.mo2694()) {
                    c13312.f5546.cancel();
                }
                c13312.f5549 = false;
                this.f3374.add(c15802.f6348);
                c13312.f5546.mo2684(true);
                m2669(0L, c13312);
            } else if (i6 == 1 && !c13312.f5549) {
                m2669(m2675(j, c13312), c13312);
            }
        }
    }

    @Override // defpackage.AbstractC2842
    /* JADX INFO: renamed from: ˏːˆ, reason: contains not printable characters */
    public final void mo2684(boolean z) {
        m2677(z, false);
    }

    /* JADX INFO: renamed from: ᵔᵖᵹᵫ, reason: contains not printable characters */
    public final int m2685(long j) {
        int size = this.f3377.size();
        int i = this.f3368;
        if (!this.f3367) {
            for (int i2 = i + 1; i2 < size; i2++) {
                C1580 c1580 = (C1580) this.f3377.get(i2);
                if (c1580.m4431() != -1 && c1580.m4431() <= j) {
                    i = i2;
                }
            }
            return i;
        }
        long jMo2696 = mo2696() - j;
        int i3 = this.f3368;
        if (i3 != -1) {
            size = i3;
        }
        this.f3368 = size;
        for (int i4 = size - 1; i4 >= 0; i4--) {
            if (((C1580) this.f3377.get(i4)).m4431() >= jMo2696) {
                i = i4;
            }
        }
        return i;
    }

    /* JADX INFO: renamed from: ᵜᵪʾ, reason: contains not printable characters */
    public final void m2686() {
        C0872 c0872M3062;
        ArrayList arrayList;
        int iIndexOf;
        this.f3378 = false;
        this.f3362 = -1L;
        this.f3368 = -1;
        this.f3360 = -1L;
        C0468 c0468 = this.f3376;
        c0468.f2563 = -1L;
        c0468.f2561 = false;
        this.f3374.clear();
        if (this.f3372 && (iIndexOf = (arrayList = (c0872M3062 = C0872.m3062()).f3867).indexOf(this)) >= 0) {
            arrayList.set(iIndexOf, null);
            c0872M3062.f3868 = true;
        }
        ArrayList arrayList2 = this.f10886;
        if (arrayList2 != null) {
            ArrayList arrayList3 = (ArrayList) arrayList2.clone();
            int size = arrayList3.size();
            for (int i = 0; i < size; i++) {
                ((InterfaceC4009) arrayList3.get(i)).mo8804(this, this.f3367);
            }
        }
        for (int i2 = 1; i2 < this.f3364.size(); i2++) {
            AbstractC2842 abstractC2842 = ((C1331) this.f3364.get(i2)).f5546;
            AbstractC5374 abstractC5374 = this.f3365;
            ArrayList arrayList4 = abstractC2842.f10886;
            if (arrayList4 != null) {
                arrayList4.remove(abstractC5374);
                if (abstractC2842.f10886.size() == 0) {
                    abstractC2842.f10886 = null;
                }
            }
        }
        this.f3372 = true;
        this.f3367 = false;
    }

    @Override // defpackage.AbstractC2842
    /* JADX INFO: renamed from: ᵝᵶ, reason: contains not printable characters */
    public final void mo2687() {
        m2677(true, true);
    }

    @Override // defpackage.AbstractC2842
    /* JADX INFO: renamed from: ᵪᵹᵥᵻ, reason: contains not printable characters */
    public final void mo2688(InterfaceC5340 interfaceC5340) {
        this.f3366 = interfaceC5340;
    }

    @Override // defpackage.AbstractC2842
    /* JADX INFO: renamed from: ᵮᵣᵗˈ, reason: contains not printable characters */
    public final boolean mo2689(long j) {
        return mo2671(j);
    }

    /* JADX INFO: renamed from: ᵯᵷʽ, reason: contains not printable characters */
    public final ArrayList m2690() {
        ArrayList arrayList = new ArrayList();
        int size = this.f3364.size();
        for (int i = 0; i < size; i++) {
            C1331 c1331 = (C1331) this.f3364.get(i);
            if (c1331 != this.f3361) {
                arrayList.add(c1331.f5546);
            }
        }
        return arrayList;
    }

    @Override // defpackage.AbstractC2842
    /* JADX INFO: renamed from: ᵱᵽʡᵚ, reason: contains not printable characters */
    public final boolean mo2691() {
        boolean z = true;
        if (this.f3370) {
            return true;
        }
        int i = 0;
        while (true) {
            if (i >= this.f3364.size()) {
                break;
            }
            if (!((C1331) this.f3364.get(i)).f5546.mo2691()) {
                z = false;
                break;
            }
            i++;
        }
        this.f3370 = z;
        return z;
    }

    /* JADX INFO: renamed from: ᵶˇᵱ, reason: contains not printable characters */
    public final C1331 m2693(AbstractC2842 abstractC2842) {
        C1331 c1331 = (C1331) this.f3375.get(abstractC2842);
        if (c1331 == null) {
            c1331 = new C1331(abstractC2842);
            this.f3375.put(abstractC2842, c1331);
            this.f3364.add(c1331);
            if (abstractC2842 instanceof C0744) {
                ((C0744) abstractC2842).f3372 = false;
            }
        }
        return c1331;
    }

    @Override // defpackage.AbstractC2842
    /* JADX INFO: renamed from: ᵶᵥᵝ, reason: contains not printable characters */
    public final boolean mo2694() {
        return this.f3378;
    }

    /* JADX INFO: renamed from: ᵸˆˁ, reason: contains not printable characters */
    public final void m2695() {
        if (this.f3366 != null) {
            for (int i = 0; i < this.f3364.size(); i++) {
                ((C1331) this.f3364.get(i)).f5546.mo2688(this.f3366);
            }
        }
        m2674();
        m2682();
    }

    @Override // defpackage.AbstractC2842
    /* JADX INFO: renamed from: ᵻʽᵯ, reason: contains not printable characters */
    public final long mo2696() {
        m2674();
        m2682();
        return this.f3363;
    }
}
