package defpackage;

import j$.util.Objects;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.ListIterator;

/* renamed from: ˇᵸᵿ, reason: contains not printable characters */
/* loaded from: classes3.dex */
public final class C0982 extends AbstractC3447 implements InterfaceC0362 {

    /* renamed from: ᵢˇᵭ, reason: contains not printable characters */
    public final /* synthetic */ int f4365;

    /* renamed from: ᵿʗᵝʽ, reason: contains not printable characters */
    public final /* synthetic */ C2430 f4366;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public /* synthetic */ C0982(C2430 c2430, int i) {
        super(1);
        this.f4365 = i;
        this.f4366 = c2430;
    }

    @Override // defpackage.InterfaceC0362
    /* renamed from: ᵴᵳ */
    public final Object mo1588(Object obj) {
        int i = this.f4365;
        C3637 c3637 = C3637.f13536;
        int i2 = 0;
        Object obj2 = null;
        C2430 c2430 = this.f4366;
        switch (i) {
            case 0:
                C2366 c2366 = c2430.f9484;
                ListIterator listIterator = c2366.listIterator(c2366.mo1040());
                while (true) {
                    if (listIterator.hasPrevious()) {
                        Object objPrevious = listIterator.previous();
                        if (((C5136) objPrevious).f19135) {
                            obj2 = objPrevious;
                        }
                    }
                }
                C5136 c5136 = (C5136) obj2;
                c2430.f9482 = c5136;
                if (c5136 != null) {
                    AbstractC4731 abstractC4731 = c5136.f19137;
                    if (AbstractC4731.m9918(3)) {
                        Objects.toString(abstractC4731);
                    }
                    abstractC4731.m9980();
                    abstractC4731.m9955(new C1973(abstractC4731), false);
                    break;
                }
                break;
            default:
                C1820 c1820 = (C1820) obj;
                C5136 c51362 = c2430.f9482;
                if (c51362 == null) {
                    C2366 c23662 = c2430.f9484;
                    ListIterator listIterator2 = c23662.listIterator(c23662.mo1040());
                    while (true) {
                        if (listIterator2.hasPrevious()) {
                            Object objPrevious2 = listIterator2.previous();
                            if (((C5136) objPrevious2).f19135) {
                                obj2 = objPrevious2;
                            }
                        }
                    }
                    c51362 = (C5136) obj2;
                }
                if (c51362 != null) {
                    AbstractC4731 abstractC47312 = c51362.f19137;
                    if (AbstractC4731.m9918(2)) {
                        Objects.toString(abstractC47312);
                    }
                    if (abstractC47312.f17514 != null) {
                        Iterator it = abstractC47312.m9976(new ArrayList(Collections.singletonList(abstractC47312.f17514)), 0, 1).iterator();
                        while (it.hasNext()) {
                            C0970 c0970 = (C0970) it.next();
                            c0970.getClass();
                            AbstractC4731.m9918(2);
                            ArrayList arrayList = c0970.f4324;
                            ArrayList arrayList2 = new ArrayList();
                            int size = arrayList.size();
                            int i3 = 0;
                            while (i3 < size) {
                                Object obj3 = arrayList.get(i3);
                                i3++;
                                AbstractC2767.m6826(((C0423) obj3).f2350, arrayList2);
                            }
                            List listM6825 = AbstractC2767.m6825(AbstractC2767.m6812(arrayList2));
                            int size2 = listM6825.size();
                            for (int i4 = 0; i4 < size2; i4++) {
                                ((AbstractC0243) listM6825.get(i4)).mo1551(c1820);
                            }
                        }
                        ArrayList arrayList3 = abstractC47312.f17508;
                        int size3 = arrayList3.size();
                        while (i2 < size3) {
                            Object obj4 = arrayList3.get(i2);
                            i2++;
                            ((ˁʾˌᵕ) obj4).getClass();
                        }
                        break;
                    }
                }
                break;
        }
        return c3637;
    }
}
