package defpackage;

import android.animation.AnimatorSet;
import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import ar.tvplayer.tv.R;
import j$.util.Objects;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import java.util.ListIterator;
import java.util.Map;
import java.util.Set;
import java.util.WeakHashMap;

/* JADX INFO: renamed from: ᵕˊᵗ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes3.dex */
public final class C2313 {

    /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
    public final ArrayList f9096 = new ArrayList();

    /* JADX INFO: renamed from: ːˏᵟᵯ, reason: contains not printable characters */
    public final ArrayList f9097 = new ArrayList();

    /* JADX INFO: renamed from: ᵨᵣ, reason: contains not printable characters */
    public boolean f9098;

    /* JADX INFO: renamed from: ᵲᵶᵳˈ, reason: contains not printable characters */
    public final ViewGroup f9099;

    /* JADX INFO: renamed from: ᵷᵺʾᵖ, reason: contains not printable characters */
    public boolean f9100;

    /* JADX INFO: renamed from: ᵻˈᵦʼ, reason: contains not printable characters */
    public boolean f9101;

    public C2313(ViewGroup viewGroup) {
        this.f9099 = viewGroup;
    }

    /* JADX INFO: renamed from: ᵱᵽʡᵚ, reason: contains not printable characters */
    public static final C2313 m5943(ViewGroup viewGroup, AbstractC0651 abstractC0651) {
        abstractC0651.m2357();
        Object tag = viewGroup.getTag(R.id._1fr_res_0x7f0b0375);
        if (tag instanceof C2313) {
            return (C2313) tag;
        }
        C2313 c2313 = new C2313(viewGroup);
        viewGroup.setTag(R.id._1fr_res_0x7f0b0375, c2313);
        return c2313;
    }

    /* JADX INFO: renamed from: ᵶᵥᵝ, reason: contains not printable characters */
    public static boolean m5944(ArrayList arrayList) {
        boolean z;
        int size = arrayList.size();
        int i = 0;
        loop0: while (true) {
            z = true;
            while (i < size) {
                Object obj = arrayList.get(i);
                i++;
                C5362 c5362 = (C5362) obj;
                if (!c5362.f20293.isEmpty()) {
                    ArrayList arrayList2 = c5362.f20293;
                    if (arrayList2 == null || !arrayList2.isEmpty()) {
                        int size2 = arrayList2.size();
                        int i2 = 0;
                        while (i2 < size2) {
                            Object obj2 = arrayList2.get(i2);
                            i2++;
                            if (!((AbstractC2055) obj2).mo1768()) {
                                break;
                            }
                        }
                    }
                }
                z = false;
            }
            break loop0;
        }
        if (z) {
            ArrayList arrayList3 = new ArrayList();
            int size3 = arrayList.size();
            int i3 = 0;
            while (i3 < size3) {
                Object obj3 = arrayList.get(i3);
                i3++;
                AbstractC5477.m11101(((C5362) obj3).f20293, arrayList3);
            }
            if (!arrayList3.isEmpty()) {
                return true;
            }
        }
        return false;
    }

    /* JADX INFO: renamed from: ᵻˈᵦʼ, reason: contains not printable characters */
    public static void m5945(C3310 c3310, View view) {
        WeakHashMap weakHashMap = AbstractC2746.f10556;
        String transitionName = view.getTransitionName();
        if (transitionName != null) {
            c3310.put(transitionName, view);
        }
        if (view instanceof ViewGroup) {
            ViewGroup viewGroup = (ViewGroup) view;
            int childCount = viewGroup.getChildCount();
            for (int i = 0; i < childCount; i++) {
                View childAt = viewGroup.getChildAt(i);
                if (childAt.getVisibility() == 0) {
                    m5945(c3310, childAt);
                }
            }
        }
    }

    /* JADX WARN: Multi-variable type inference failed */
    /* JADX WARN: Removed duplicated region for block: B:180:0x03cc A[LOOP:19: B:179:0x03ca->B:180:0x03cc, LOOP_END] */
    /* JADX WARN: Type inference failed for: r1v5, types: [java.util.ArrayList] */
    /* JADX WARN: Type inference failed for: r3v21 */
    /* JADX WARN: Type inference failed for: r3v22, types: [int] */
    /* JADX WARN: Type inference failed for: r3v23, types: [int] */
    /* JADX WARN: Type inference failed for: r4v36 */
    /* JADX WARN: Type inference failed for: r4v37, types: [int] */
    /* JADX WARN: Type inference failed for: r4v48 */
    /* JADX WARN: Type inference failed for: r5v15, types: [java.util.ArrayList] */
    /* JADX WARN: Type inference failed for: r5v9, types: [java.util.ArrayList] */
    /* JADX WARN: Type inference failed for: r6v49 */
    /* JADX WARN: Type inference failed for: r6v50, types: [int] */
    /* JADX WARN: Type inference failed for: r6v53, types: [int] */
    /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final void m5946(ArrayList arrayList, boolean z) {
        Object obj;
        Object objPrevious;
        int i;
        ArrayList arrayList2;
        boolean z2;
        int size;
        int i2;
        ArrayList arrayList3;
        ArrayList<String> arrayList4;
        ArrayList arrayList5;
        ArrayList arrayList6;
        ArrayList<String> arrayList7;
        AbstractC0651.m2324(2);
        int size2 = arrayList.size();
        int i3 = 0;
        int i4 = 0;
        while (true) {
            if (i4 >= size2) {
                obj = null;
                break;
            }
            obj = arrayList.get(i4);
            i4++;
            C5362 c5362 = (C5362) obj;
            View view = c5362.f20287.f13046;
            if (view.getAlpha() != 0.0f || view.getVisibility() != 0) {
                int visibility = view.getVisibility();
                if (visibility == 0) {
                    if (c5362.f20291 != 2) {
                        break;
                    }
                } else {
                    if (visibility != 4 && visibility != 8) {
                        ᵕᵩʽᵲ.ᵮᵣᵗˈ(AbstractC2704.m6517(visibility, "Unknown visibility "));
                        return;
                    }
                }
            }
        }
        C5362 c53622 = (C5362) obj;
        ListIterator listIterator = arrayList.listIterator(arrayList.size());
        while (true) {
            if (!listIterator.hasPrevious()) {
                objPrevious = null;
                break;
            }
            objPrevious = listIterator.previous();
            C5362 c53623 = (C5362) objPrevious;
            View view2 = c53623.f20287.f13046;
            if (view2.getAlpha() != 0.0f || view2.getVisibility() != 0) {
                int visibility2 = view2.getVisibility();
                if (visibility2 == 0) {
                    continue;
                } else if (visibility2 != 4 && visibility2 != 8) {
                    ᵕᵩʽᵲ.ᵮᵣᵗˈ(AbstractC2704.m6517(visibility2, "Unknown visibility "));
                    return;
                }
            }
            if (c53623.f20291 == 2) {
                break;
            }
        }
        C5362 c53624 = (C5362) objPrevious;
        if (AbstractC0651.m2324(2)) {
            Objects.toString(c53622);
            Objects.toString(c53624);
        }
        ArrayList arrayList8 = new ArrayList();
        ArrayList arrayList9 = new ArrayList();
        AbstractComponentCallbacksC3393 abstractComponentCallbacksC3393 = ((C5362) AbstractC4126.m8994(arrayList)).f20287;
        int size3 = arrayList.size();
        int i5 = 0;
        while (i5 < size3) {
            Object obj2 = arrayList.get(i5);
            i5++;
            C4222 c4222 = ((C5362) obj2).f20287.f13047;
            C4222 c42222 = abstractComponentCallbacksC3393.f13047;
            c4222.f16092 = c42222.f16092;
            c4222.f16095 = c42222.f16095;
            c4222.f16106 = c42222.f16106;
            c4222.f16098 = c42222.f16098;
        }
        int size4 = arrayList.size();
        int i6 = 0;
        while (i6 < size4) {
            Object obj3 = arrayList.get(i6);
            i6++;
            C5362 c53625 = (C5362) obj3;
            arrayList8.add(new C3994(c53625, z));
            arrayList9.add(new C1009(c53625, z, !z ? c53625 != c53624 : c53625 != c53622));
            c53625.f20294.add(new RunnableC0632(this, c53625, i3));
        }
        ArrayList arrayList10 = new ArrayList();
        int size5 = arrayList9.size();
        int i7 = 0;
        while (i7 < size5) {
            Object obj4 = arrayList9.get(i7);
            i7++;
            if (!((C1009) obj4).ᵪᵹᵥᵻ()) {
                arrayList10.add(obj4);
            }
        }
        ArrayList arrayList11 = new ArrayList();
        int size6 = arrayList10.size();
        int i8 = 0;
        while (i8 < size6) {
            Object obj5 = arrayList10.get(i8);
            i8++;
            if (((C1009) obj5).m3338() != null) {
                arrayList11.add(obj5);
            }
        }
        int size7 = arrayList11.size();
        int i9 = 0;
        AbstractC4917 abstractC4917 = null;
        while (i9 < size7) {
            Object obj6 = arrayList11.get(i9);
            i9++;
            C1009 c1009 = (C1009) obj6;
            AbstractC4917 abstractC4917M3338 = c1009.m3338();
            if (abstractC4917 != null && abstractC4917M3338 != abstractC4917) {
                C4468.m9509("Mixing framework transitions and AndroidX transitions is not allowed. Fragment ", ((C5362) ((ᵜᵪʾ) c1009).ˌᴵ).f20287, " returned Transition ", c1009.f4390, " which uses a different Transition type than other Fragments.");
                return;
            }
            abstractC4917 = abstractC4917M3338;
        }
        if (abstractC4917 == null) {
            arrayList2 = arrayList8;
            i = 2;
            z2 = false;
        } else {
            ArrayList arrayList12 = new ArrayList();
            ArrayList arrayList13 = new ArrayList();
            C3310 c3310 = new C3310(0);
            ArrayList arrayList14 = new ArrayList();
            ArrayList arrayList15 = new ArrayList();
            C3310 c33102 = new C3310(0);
            ArrayList arrayList16 = arrayList15;
            C3310 c33103 = new C3310(0);
            int size8 = arrayList11.size();
            i = 2;
            int i10 = 0;
            Object objMo6586 = null;
            while (i10 < size8) {
                Object obj7 = arrayList11.get(i10);
                i10++;
                Object obj8 = ((C1009) obj7).f4391;
                if (obj8 == null || c53622 == null) {
                    arrayList3 = arrayList8;
                    size8 = size8;
                    arrayList8 = arrayList3;
                    c53624 = c53624;
                    abstractC4917 = abstractC4917;
                    arrayList12 = arrayList12;
                    arrayList13 = arrayList13;
                } else {
                    arrayList3 = arrayList8;
                    AbstractComponentCallbacksC3393 abstractComponentCallbacksC33932 = c53622.f20287;
                    if (c53624 != null) {
                        AbstractComponentCallbacksC3393 abstractComponentCallbacksC33933 = c53624.f20287;
                        objMo6586 = abstractC4917.mo6586(abstractC4917.mo6578(obj8));
                        C4222 c42223 = abstractComponentCallbacksC33933.f13047;
                        if (c42223 == null || (arrayList4 = c42223.f16104) == null) {
                            arrayList4 = new ArrayList();
                        }
                        int i11 = size8;
                        C4222 c42224 = abstractComponentCallbacksC33932.f13047;
                        if (c42224 == null || (arrayList5 = c42224.f16104) == null) {
                            arrayList5 = new ArrayList();
                        }
                        C5362 c53626 = c53624;
                        C4222 c42225 = abstractComponentCallbacksC33932.f13047;
                        if (c42225 == null || (arrayList6 = c42225.f16093) == null) {
                            arrayList6 = new ArrayList();
                        }
                        AbstractC4917 abstractC49172 = abstractC4917;
                        int size9 = arrayList6.size();
                        ArrayList arrayList17 = arrayList12;
                        ArrayList arrayList18 = arrayList13;
                        int i12 = 0;
                        while (i12 < size9) {
                            int i13 = size9;
                            int iIndexOf = arrayList4.indexOf(arrayList6.get(i12));
                            if (iIndexOf != -1) {
                                arrayList4.set(iIndexOf, arrayList5.get(i12));
                            }
                            i12++;
                            size9 = i13;
                        }
                        C4222 c42226 = abstractComponentCallbacksC33933.f13047;
                        if (c42226 == null || (arrayList7 = c42226.f16093) == null) {
                            arrayList7 = new ArrayList();
                        }
                        C1081 c1081 = !z ? new C1081(null, null) : new C1081(null, null);
                        if (c1081.f4615 != null) {
                            C1685.m4560();
                            return;
                        }
                        if (c1081.f4616 != null) {
                            C1685.m4560();
                            return;
                        }
                        int size10 = arrayList4.size();
                        for (int i14 = 0; i14 < size10; i14++) {
                            c3310.put((String) arrayList4.get(i14), (String) arrayList7.get(i14));
                        }
                        if (AbstractC0651.m2324(2)) {
                            for (String str : arrayList7) {
                            }
                            for (String str2 : arrayList4) {
                            }
                        }
                        m5945(c33102, abstractComponentCallbacksC33932.f13046);
                        c33102.m7574(arrayList4);
                        c3310.m7574(c33102.keySet());
                        m5945(c33103, abstractComponentCallbacksC33933.f13046);
                        c33103.m7574(arrayList7);
                        c33103.m7574(c3310.values());
                        C2708 c2708 = AbstractC2128.f8447;
                        for (int i15 = c3310.f15546 - 1; -1 < i15; i15--) {
                            if (!c33103.containsKey((String) c3310.m8866(i15))) {
                                c3310.mo8863(i15);
                            }
                        }
                        Set setKeySet = c3310.keySet();
                        Iterator it = c33102.entrySet().iterator();
                        while (it.hasNext()) {
                            it.next();
                            View view3 = (View) ((Map.Entry) it).getValue();
                            WeakHashMap weakHashMap = AbstractC2746.f10556;
                            if (!AbstractC4126.m9008(setKeySet, view3.getTransitionName())) {
                                it.remove();
                            }
                        }
                        Collection collectionValues = c3310.values();
                        Iterator it2 = c33103.entrySet().iterator();
                        while (it2.hasNext()) {
                            it2.next();
                            View view4 = (View) ((Map.Entry) it2).getValue();
                            WeakHashMap weakHashMap2 = AbstractC2746.f10556;
                            if (!AbstractC4126.m9008(collectionValues, view4.getTransitionName())) {
                                it2.remove();
                            }
                        }
                        if (c3310.isEmpty()) {
                            Objects.toString(objMo6586);
                            c53622.toString();
                            c53626.toString();
                            arrayList17.clear();
                            arrayList18.clear();
                            arrayList14 = arrayList7;
                            arrayList16 = arrayList4;
                            arrayList8 = arrayList3;
                            c53624 = c53626;
                            abstractC4917 = abstractC49172;
                            arrayList12 = arrayList17;
                            arrayList13 = arrayList18;
                            objMo6586 = null;
                        } else {
                            arrayList14 = arrayList7;
                            arrayList16 = arrayList4;
                            arrayList8 = arrayList3;
                            c53624 = c53626;
                            abstractC4917 = abstractC49172;
                            arrayList12 = arrayList17;
                            arrayList13 = arrayList18;
                        }
                        size8 = i11;
                    } else {
                        size8 = size8;
                        arrayList8 = arrayList3;
                        c53624 = c53624;
                        abstractC4917 = abstractC4917;
                        arrayList12 = arrayList12;
                        arrayList13 = arrayList13;
                    }
                }
            }
            arrayList2 = arrayList8;
            C5362 c53627 = c53624;
            AbstractC4917 abstractC49173 = abstractC4917;
            ArrayList arrayList19 = arrayList12;
            ArrayList arrayList20 = arrayList13;
            if (objMo6586 != null) {
                z2 = false;
                C0420 c0420 = new C0420(arrayList11, c53622, c53627, abstractC49173, objMo6586, arrayList19, arrayList20, c3310, arrayList14, arrayList16, c33102, c33103, z);
                size = arrayList11.size();
                i2 = 0;
                while (i2 < size) {
                    Object obj9 = arrayList11.get(i2);
                    i2++;
                    ((C5362) ((ᵜᵪʾ) ((C1009) obj9)).ˌᴵ).f20290.add(c0420);
                }
            } else {
                if (!arrayList11.isEmpty()) {
                    int size11 = arrayList11.size();
                    int i16 = 0;
                    while (i16 < size11) {
                        Object obj10 = arrayList11.get(i16);
                        i16++;
                        if (((C1009) obj10).f4390 != null) {
                            z2 = false;
                            C0420 c04202 = new C0420(arrayList11, c53622, c53627, abstractC49173, objMo6586, arrayList19, arrayList20, c3310, arrayList14, arrayList16, c33102, c33103, z);
                            size = arrayList11.size();
                            i2 = 0;
                            while (i2 < size) {
                            }
                        }
                    }
                }
                z2 = false;
            }
        }
        ?? arrayList21 = new ArrayList();
        ArrayList arrayList22 = new ArrayList();
        int size12 = arrayList2.size();
        for (?? r4 = z2; r4 < size12; r4++) {
            AbstractC5477.m11101(((C5362) ((ᵜᵪʾ) ((C3994) arrayList2.get(r4))).ˌᴵ).f20293, arrayList22);
        }
        ?? r5 = arrayList2;
        boolean zIsEmpty = arrayList22.isEmpty();
        int size13 = r5.size();
        boolean z3 = z2;
        ?? r6 = z3;
        while (r6 < size13) {
            Object obj11 = r5.get(r6);
            r6++;
            C3994 c3994 = (C3994) obj11;
            Context context = this.f9099.getContext();
            C5362 c53628 = (C5362) ((ᵜᵪʾ) c3994).ˌᴵ;
            C0767 c0767M8770 = c3994.m8770(context);
            if (c0767M8770 != null) {
                if (((AnimatorSet) c0767M8770.f3432) == null) {
                    arrayList21.add(c3994);
                } else {
                    AbstractComponentCallbacksC3393 abstractComponentCallbacksC33934 = c53628.f20287;
                    if (c53628.f20293.isEmpty()) {
                        if (c53628.f20291 == 3) {
                            c53628.f20295 = z2;
                        }
                        c53628.f20290.add(new C3541(c3994));
                        z3 = true;
                    } else if (AbstractC0651.m2324(i)) {
                        Objects.toString(abstractComponentCallbacksC33934);
                    }
                }
            }
        }
        int size14 = arrayList21.size();
        ?? r3 = z2;
        while (r3 < size14) {
            Object obj12 = arrayList21.get(r3);
            r3++;
            C3994 c39942 = (C3994) obj12;
            C5362 c53629 = (C5362) ((ᵜᵪʾ) c39942).ˌᴵ;
            AbstractComponentCallbacksC3393 abstractComponentCallbacksC33935 = c53629.f20287;
            if (zIsEmpty) {
                if (!z3) {
                    c53629.f20290.add(new C2062(c39942));
                } else if (AbstractC0651.m2324(i)) {
                    Objects.toString(abstractComponentCallbacksC33935);
                }
            } else if (AbstractC0651.m2324(i)) {
                Objects.toString(abstractComponentCallbacksC33935);
            }
        }
    }

    /* JADX INFO: renamed from: ˊᵫᵗ, reason: contains not printable characters */
    public final C5362 m5947(AbstractComponentCallbacksC3393 abstractComponentCallbacksC3393) {
        Object obj;
        ArrayList arrayList = this.f9097;
        int size = arrayList.size();
        int i = 0;
        while (true) {
            if (i >= size) {
                obj = null;
                break;
            }
            obj = arrayList.get(i);
            i++;
            C5362 c5362 = (C5362) obj;
            if (ᵥˈᵛ.ˊᵫᵗ(c5362.f20287, abstractComponentCallbacksC3393) && !c5362.f20288) {
                break;
            }
        }
        return (C5362) obj;
    }

    /* JADX INFO: renamed from: ˋˈ, reason: contains not printable characters */
    public final void m5948() {
        ArrayList arrayList = this.f9096;
        int size = arrayList.size();
        int i = 0;
        while (i < size) {
            Object obj = arrayList.get(i);
            i++;
            C5362 c5362 = (C5362) obj;
            int i2 = 2;
            if (c5362.f20285 == 2) {
                int visibility = c5362.f20287.m7778().getVisibility();
                if (visibility != 0) {
                    i2 = 4;
                    if (visibility != 4) {
                        if (visibility != 8) {
                            ᵕᵩʽᵲ.ᵮᵣᵗˈ(AbstractC2704.m6517(visibility, "Unknown visibility "));
                            return;
                        }
                        i2 = 3;
                    }
                }
                c5362.m10950(i2, 1);
            }
        }
    }

    /* JADX INFO: renamed from: ːˏᵟᵯ, reason: contains not printable characters */
    public final void m5949(List list) {
        ArrayList arrayList = new ArrayList();
        Iterator it = list.iterator();
        while (it.hasNext()) {
            AbstractC5477.m11101(((C5362) it.next()).f20293, arrayList);
        }
        List listM8998 = AbstractC4126.m8998(AbstractC4126.m9012(arrayList));
        int size = listM8998.size();
        for (int i = 0; i < size; i++) {
            ((AbstractC2055) listM8998.get(i)).mo1766(this.f9099);
        }
        int size2 = list.size();
        for (int i2 = 0; i2 < size2; i2++) {
            m5953((C5362) list.get(i2));
        }
        List listM89982 = AbstractC4126.m8998(list);
        int size3 = listM89982.size();
        for (int i3 = 0; i3 < size3; i3++) {
            C5362 c5362 = (C5362) listM89982.get(i3);
            if (c5362.f20293.isEmpty()) {
                c5362.m10947();
            }
        }
    }

    /* JADX INFO: renamed from: ᵝᵶ, reason: contains not printable characters */
    public final void m5950(List list) {
        int size = list.size();
        for (int i = 0; i < size; i++) {
            C5362 c5362 = (C5362) list.get(i);
            C4301 c4301 = c5362.f20289;
            if (!c5362.f20286) {
                c5362.f20286 = true;
                int i2 = c5362.f20285;
                if (i2 == 2) {
                    AbstractComponentCallbacksC3393 abstractComponentCallbacksC3393 = c4301.f16382;
                    View viewFindFocus = abstractComponentCallbacksC3393.f13046.findFocus();
                    if (viewFindFocus != null) {
                        abstractComponentCallbacksC3393.m7753().f16097 = viewFindFocus;
                        if (AbstractC0651.m2324(2)) {
                            viewFindFocus.toString();
                            abstractComponentCallbacksC3393.toString();
                        }
                    }
                    View viewM7778 = c5362.f20287.m7778();
                    if (viewM7778.getParent() == null) {
                        if (AbstractC0651.m2324(2)) {
                            abstractComponentCallbacksC3393.toString();
                            viewM7778.toString();
                        }
                        c4301.m9280();
                        viewM7778.setAlpha(0.0f);
                    }
                    if (viewM7778.getAlpha() == 0.0f && viewM7778.getVisibility() == 0) {
                        if (AbstractC0651.m2324(2)) {
                            viewM7778.toString();
                        }
                        viewM7778.setVisibility(4);
                    }
                    C4222 c4222 = abstractComponentCallbacksC3393.f13047;
                    viewM7778.setAlpha(c4222 == null ? 1.0f : c4222.f16099);
                    AbstractC0651.m2324(2);
                } else if (i2 == 3) {
                    AbstractComponentCallbacksC3393 abstractComponentCallbacksC33932 = c4301.f16382;
                    View viewM77782 = abstractComponentCallbacksC33932.m7778();
                    if (AbstractC0651.m2324(2)) {
                        Objects.toString(viewM77782.findFocus());
                        viewM77782.toString();
                        abstractComponentCallbacksC33932.toString();
                    }
                    viewM77782.clearFocus();
                }
            }
        }
        ArrayList arrayList = new ArrayList();
        Iterator it = list.iterator();
        while (it.hasNext()) {
            AbstractC5477.m11101(((C5362) it.next()).f20293, arrayList);
        }
        List listM8998 = AbstractC4126.m8998(AbstractC4126.m9012(arrayList));
        int size2 = listM8998.size();
        for (int i3 = 0; i3 < size2; i3++) {
            AbstractC2055 abstractC2055 = (AbstractC2055) listM8998.get(i3);
            if (!abstractC2055.f8148) {
                abstractC2055.mo1767(this.f9099);
            }
            abstractC2055.f8148 = true;
        }
    }

    /* JADX INFO: renamed from: ᵨᵣ, reason: contains not printable characters */
    public final void m5951() {
        boolean z;
        if (this.f9101) {
            return;
        }
        if (!this.f9099.isAttachedToWindow()) {
            m5956();
            this.f9098 = false;
            return;
        }
        synchronized (this.f9096) {
            try {
                ArrayList arrayList = new ArrayList(this.f9097);
                this.f9097.clear();
                int size = arrayList.size();
                int i = 0;
                while (true) {
                    z = true;
                    if (i >= size) {
                        break;
                    }
                    Object obj = arrayList.get(i);
                    i++;
                    C5362 c5362 = (C5362) obj;
                    if (this.f9096.isEmpty() || !c5362.f20287.f13042) {
                        z = false;
                    }
                    c5362.f20292 = z;
                }
                int size2 = arrayList.size();
                int i2 = 0;
                while (i2 < size2) {
                    Object obj2 = arrayList.get(i2);
                    i2++;
                    C5362 c53622 = (C5362) obj2;
                    if (this.f9100) {
                        if (AbstractC0651.m2324(2)) {
                            Objects.toString(c53622);
                        }
                        c53622.m10947();
                    } else {
                        if (AbstractC0651.m2324(2)) {
                            Objects.toString(c53622);
                        }
                        c53622.m10949(this.f9099);
                    }
                    this.f9100 = false;
                    if (!c53622.f20296) {
                        this.f9097.add(c53622);
                    }
                }
                if (!this.f9096.isEmpty()) {
                    m5948();
                    ArrayList arrayList2 = new ArrayList(this.f9096);
                    if (arrayList2.isEmpty()) {
                        return;
                    }
                    this.f9096.clear();
                    this.f9097.addAll(arrayList2);
                    AbstractC0651.m2324(2);
                    m5946(arrayList2, this.f9098);
                    boolean zM5944 = m5944(arrayList2);
                    int size3 = arrayList2.size();
                    int i3 = 0;
                    boolean z2 = true;
                    while (i3 < size3) {
                        Object obj3 = arrayList2.get(i3);
                        i3++;
                        if (!((C5362) obj3).f20287.f13042) {
                            z2 = false;
                        }
                    }
                    if (!z2 || zM5944) {
                        z = false;
                    }
                    this.f9100 = z;
                    AbstractC0651.m2324(2);
                    if (!z2) {
                        m5950(arrayList2);
                        m5949(arrayList2);
                    } else if (zM5944) {
                        m5950(arrayList2);
                        int size4 = arrayList2.size();
                        for (int i4 = 0; i4 < size4; i4++) {
                            m5953((C5362) arrayList2.get(i4));
                        }
                    }
                    this.f9098 = false;
                    AbstractC0651.m2324(2);
                }
            } catch (Throwable th) {
                throw th;
            }
        }
    }

    /* JADX INFO: renamed from: ᵮᵣᵗˈ, reason: contains not printable characters */
    public final void m5952() {
        Object objPrevious;
        C4222 c4222;
        synchronized (this.f9096) {
            try {
                m5948();
                ArrayList arrayList = this.f9096;
                ListIterator listIterator = arrayList.listIterator(arrayList.size());
                while (true) {
                    if (!listIterator.hasPrevious()) {
                        objPrevious = null;
                        break;
                    }
                    objPrevious = listIterator.previous();
                    C5362 c5362 = (C5362) objPrevious;
                    View view = c5362.f20287.f13046;
                    char c = 4;
                    if (view.getAlpha() != 0.0f || view.getVisibility() != 0) {
                        int visibility = view.getVisibility();
                        if (visibility == 0) {
                            c = 2;
                        } else if (visibility != 4) {
                            if (visibility != 8) {
                                throw new IllegalArgumentException("Unknown visibility " + visibility);
                            }
                            c = 3;
                        }
                    }
                    if (c5362.f20291 == 2 && c != 2) {
                        break;
                    }
                }
                C5362 c53622 = (C5362) objPrevious;
                AbstractComponentCallbacksC3393 abstractComponentCallbacksC3393 = c53622 != null ? c53622.f20287 : null;
                boolean z = false;
                if (abstractComponentCallbacksC3393 != null && (c4222 = abstractComponentCallbacksC3393.f13047) != null) {
                    z = c4222.f16101;
                }
                this.f9101 = z;
            } catch (Throwable th) {
                throw th;
            }
        }
    }

    /* JADX INFO: renamed from: ᵲᵶᵳˈ, reason: contains not printable characters */
    public final void m5953(C5362 c5362) {
        if (c5362.f20295) {
            AbstractC2704.m6534(c5362.f20291, c5362.f20287.m7778(), this.f9099);
            c5362.f20295 = false;
        }
    }

    /* JADX INFO: renamed from: ᵵᵽ, reason: contains not printable characters */
    public final C5362 m5954(AbstractComponentCallbacksC3393 abstractComponentCallbacksC3393) {
        Object obj;
        ArrayList arrayList = this.f9096;
        int size = arrayList.size();
        int i = 0;
        while (true) {
            if (i >= size) {
                obj = null;
                break;
            }
            obj = arrayList.get(i);
            i++;
            C5362 c5362 = (C5362) obj;
            if (ᵥˈᵛ.ˊᵫᵗ(c5362.f20287, abstractComponentCallbacksC3393) && !c5362.f20288) {
                break;
            }
        }
        return (C5362) obj;
    }

    /* JADX INFO: renamed from: ᵷᵺʾᵖ, reason: contains not printable characters */
    public final void m5955(int i, int i2, C4301 c4301) {
        synchronized (this.f9096) {
            try {
                C5362 c5362M5954 = m5954(c4301.f16382);
                if (c5362M5954 == null) {
                    AbstractComponentCallbacksC3393 abstractComponentCallbacksC3393 = c4301.f16382;
                    c5362M5954 = (abstractComponentCallbacksC3393.f13042 || abstractComponentCallbacksC3393.f13065) ? m5947(abstractComponentCallbacksC3393) : null;
                }
                if (c5362M5954 != null) {
                    c5362M5954.m10950(i, i2);
                    return;
                }
                C5362 c5362 = new C5362(i, i2, c4301);
                this.f9096.add(c5362);
                c5362.f20294.add(new RunnableC0632(this, c5362, 1));
                c5362.f20294.add(new RunnableC0632(this, c5362, 2));
            } catch (Throwable th) {
                throw th;
            }
        }
    }

    /* JADX INFO: renamed from: ᵻʽᵯ, reason: contains not printable characters */
    public final void m5956() {
        AbstractC0651.m2324(2);
        boolean zIsAttachedToWindow = this.f9099.isAttachedToWindow();
        synchronized (this.f9096) {
            try {
                m5948();
                m5950(this.f9096);
                ArrayList arrayList = new ArrayList(this.f9097);
                int size = arrayList.size();
                int i = 0;
                int i2 = 0;
                while (i2 < size) {
                    Object obj = arrayList.get(i2);
                    i2++;
                    ((C5362) obj).f20292 = false;
                }
                int size2 = arrayList.size();
                int i3 = 0;
                while (i3 < size2) {
                    Object obj2 = arrayList.get(i3);
                    i3++;
                    C5362 c5362 = (C5362) obj2;
                    if (AbstractC0651.m2324(2)) {
                        if (!zIsAttachedToWindow) {
                            Objects.toString(this.f9099);
                        }
                        Objects.toString(c5362);
                    }
                    c5362.m10949(this.f9099);
                }
                ArrayList arrayList2 = new ArrayList(this.f9096);
                int size3 = arrayList2.size();
                int i4 = 0;
                while (i4 < size3) {
                    Object obj3 = arrayList2.get(i4);
                    i4++;
                    ((C5362) obj3).f20292 = false;
                }
                int size4 = arrayList2.size();
                while (i < size4) {
                    Object obj4 = arrayList2.get(i);
                    i++;
                    C5362 c53622 = (C5362) obj4;
                    if (AbstractC0651.m2324(2)) {
                        if (!zIsAttachedToWindow) {
                            Objects.toString(this.f9099);
                        }
                        Objects.toString(c53622);
                    }
                    c53622.m10949(this.f9099);
                }
            } catch (Throwable th) {
                throw th;
            }
        }
    }
}
