package androidx.leanback.widget;

import android.content.Context;
import android.graphics.Rect;
import android.media.AudioManager;
import android.os.Bundle;
import android.os.Parcelable;
import android.util.AttributeSet;
import android.util.SparseArray;
import android.util.SparseIntArray;
import android.view.FocusFinder;
import android.view.Gravity;
import android.view.View;
import android.view.ViewConfiguration;
import android.view.ViewGroup;
import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityNodeInfo;
import android.view.animation.DecelerateInterpolator;
import android.widget.Scroller;
import androidx.recyclerview.widget.RecyclerView;
import defpackage.AbstractC0421;
import defpackage.AbstractC0650;
import defpackage.AbstractC0657;
import defpackage.AbstractC2402;
import defpackage.AbstractC2416;
import defpackage.AbstractC2704;
import defpackage.AbstractC2746;
import defpackage.AbstractC3010;
import defpackage.AbstractC3061;
import defpackage.AbstractC4793;
import defpackage.AbstractC5529;
import defpackage.C0120;
import defpackage.C0186;
import defpackage.C0405;
import defpackage.C0694;
import defpackage.C0807;
import defpackage.C0832;
import defpackage.C0902;
import defpackage.C1014;
import defpackage.C1024;
import defpackage.C1499;
import defpackage.C1531;
import defpackage.C1612;
import defpackage.C1823;
import defpackage.C1935;
import defpackage.C2418;
import defpackage.C2444;
import defpackage.C2772;
import defpackage.C2918;
import defpackage.C3673;
import defpackage.C4003;
import defpackage.C4055;
import defpackage.C4349;
import defpackage.C4930;
import defpackage.C5270;
import defpackage.C5319;
import defpackage.InterfaceC4271;
import defpackage.RunnableC1500;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.WeakHashMap;

/* JADX INFO: loaded from: classes3.dex */
public final class GridLayoutManager extends AbstractC0421 {

    /* JADX INFO: renamed from: ᵫˈᵹ, reason: contains not printable characters */
    public static final Rect f390 = new Rect();

    /* JADX INFO: renamed from: ᵵᵸᵕᵸ, reason: contains not printable characters */
    public static final int[] f391 = new int[2];

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

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

    /* JADX INFO: renamed from: ʿᵿʽᵞ, reason: contains not printable characters */
    public int f394;

    /* JADX INFO: renamed from: ˀᵗ, reason: contains not printable characters */
    public int f395;

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

    /* JADX INFO: renamed from: ˁʢᵛ, reason: contains not printable characters */
    public int f397;

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

    /* JADX INFO: renamed from: ˁᵺˈ, reason: contains not printable characters */
    public final int[] f399;

    /* JADX INFO: renamed from: ˈᵲᵢ, reason: contains not printable characters */
    public C2772 f400;

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

    /* JADX INFO: renamed from: ˉˆᵗ, reason: contains not printable characters */
    public int f402;

    /* JADX INFO: renamed from: ˉᵲ, reason: contains not printable characters */
    public int f403;

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

    /* JADX INFO: renamed from: ˊˌˊ, reason: contains not printable characters */
    public int f405;

    /* JADX INFO: renamed from: ˊᵙᵾᵲ, reason: contains not printable characters */
    public AbstractC0650 f406;

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

    /* JADX INFO: renamed from: ˊᵨᵧ, reason: contains not printable characters */
    public int f408;

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

    /* JADX INFO: renamed from: ˋʿᐧ, reason: contains not printable characters */
    public int f410;

    /* JADX INFO: renamed from: ˋᵯᵩ, reason: contains not printable characters */
    public final C3673 f411;

    /* JADX INFO: renamed from: ˌᴵ, reason: contains not printable characters */
    public C1499 f412;

    /* JADX INFO: renamed from: ˌᵨʠᵫ, reason: contains not printable characters */
    public int f413;

    /* JADX INFO: renamed from: ˏːˆ, reason: contains not printable characters */
    public AbstractC3010 f414;

    /* JADX INFO: renamed from: ˏᵩʨ, reason: contains not printable characters */
    public int f415;

    /* JADX INFO: renamed from: ːᵝٴᵶ, reason: contains not printable characters */
    public final ᵟˑʽ f416;

    /* JADX INFO: renamed from: ˑʢ, reason: contains not printable characters */
    public int[] f417;

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

    /* JADX INFO: renamed from: ᵔᵖᵹᵫ, reason: contains not printable characters */
    public int f419;

    /* JADX INFO: renamed from: ᵗᵭ, reason: contains not printable characters */
    public C1612 f420;

    /* JADX INFO: renamed from: ᵛˀˊ, reason: contains not printable characters */
    public AbstractC5529 f421;

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

    /* JADX INFO: renamed from: ᵜᵤ, reason: contains not printable characters */
    public final RunnableC1500 f423;

    /* JADX INFO: renamed from: ᵜᵪʾ, reason: contains not printable characters */
    public int f424;

    /* JADX INFO: renamed from: ᵞᵛᵘ, reason: contains not printable characters */
    public int f425;

    /* JADX INFO: renamed from: ᵟᵹᵙ, reason: contains not printable characters */
    public float f426;

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

    /* JADX INFO: renamed from: ᵡᵶ, reason: contains not printable characters */
    public final C4055 f428;

    /* JADX INFO: renamed from: ᵡᵶᵬʤ, reason: contains not printable characters */
    public final ᵣˊˈᵪ f429;

    /* JADX INFO: renamed from: ᵨˈʼﹶ, reason: contains not printable characters */
    public int f430;

    /* JADX INFO: renamed from: ᵨᵼⁱ, reason: contains not printable characters */
    public final SparseIntArray f431;

    /* JADX INFO: renamed from: ᵯᵷʽ, reason: contains not printable characters */
    public int[] f432;

    /* JADX INFO: renamed from: ᵱʡˏ, reason: contains not printable characters */
    public int f433;

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

    /* JADX INFO: renamed from: ᵶˇᵱ, reason: contains not printable characters */
    public AudioManager f435;

    /* JADX INFO: renamed from: ᵸˆˁ, reason: contains not printable characters */
    public InterfaceC4271 f436;

    public GridLayoutManager() {
        this(null);
    }

    public GridLayoutManager(AbstractC0650 abstractC0650) {
        this.f426 = 1.0f;
        this.f433 = 10;
        this.f403 = 0;
        this.f414 = new C0405(this, 0);
        this.f431 = new SparseIntArray();
        this.f413 = 221696;
        this.f436 = null;
        this.f418 = null;
        this.f393 = -1;
        this.f427 = 0;
        this.f396 = 0;
        this.f397 = 8388659;
        this.f415 = 1;
        this.f394 = 0;
        this.f428 = new C4055(5);
        this.f429 = new ᵣˊˈᵪ(24);
        this.f399 = new int[2];
        C3673 c3673 = new C3673();
        c3673.f13945 = 0;
        c3673.f13947 = 100;
        this.f411 = c3673;
        this.f423 = new RunnableC1500(13, this);
        this.f416 = new ᵟˑʽ(this);
        this.f406 = abstractC0650;
        this.f409 = -1;
        m1805(false);
    }

    /* JADX INFO: renamed from: ˋʿᵥᵔ, reason: contains not printable characters */
    public static int m255(View view) {
        C4930 c4930 = (C4930) view.getLayoutParams();
        return AbstractC0421.m1780(view) + ((ViewGroup.MarginLayoutParams) c4930).topMargin + ((ViewGroup.MarginLayoutParams) c4930).bottomMargin;
    }

    /* JADX INFO: renamed from: ˑˀˉᵲ, reason: contains not printable characters */
    public static int m256(View view) {
        C4930 c4930 = (C4930) view.getLayoutParams();
        return AbstractC0421.m1776(view) + ((ViewGroup.MarginLayoutParams) c4930).leftMargin + ((ViewGroup.MarginLayoutParams) c4930).rightMargin;
    }

    /* JADX INFO: renamed from: ᵠᐧ, reason: contains not printable characters */
    public static int m257(View view) {
        C4930 c4930;
        if (view == null || (c4930 = (C4930) view.getLayoutParams()) == null || c4930.f20074.m9995()) {
            return -1;
        }
        return c4930.f20074.m9984();
    }

    /* JADX INFO: renamed from: ᵾᵧ, reason: contains not printable characters */
    public static int m258(View view, View view2) {
        ʽˎˇˌ r0;
        if (view == null || view2 == null || (r0 = ((C4930) view.getLayoutParams()).f18733) == null) {
            return 0;
        }
        C0694[] c0694Arr = (C0694[]) r0.ᵜᵪʾ;
        if (c0694Arr.length <= 1) {
            return 0;
        }
        while (view2 != view) {
            int id = view2.getId();
            if (id != -1) {
                for (int i = 1; i < c0694Arr.length; i++) {
                    if (c0694Arr[i].f3147 == id) {
                        return i;
                    }
                }
            }
            view2 = (View) view2.getParent();
        }
        return 0;
    }

    /* JADX INFO: renamed from: ʽˋᵚʛ, reason: contains not printable characters */
    public final int m259() {
        int i = (this.f413 & 524288) != 0 ? 0 : this.f395 - 1;
        return m313(i) + m326(i);
    }

    /* JADX INFO: renamed from: ʾʣ, reason: contains not printable characters */
    public final View m260(int i) {
        ʽˎˇˌ r1;
        View viewM6693 = this.f400.m6693(i);
        C4930 c4930 = (C4930) viewM6693.getLayoutParams();
        if (this.f406.m577(viewM6693) instanceof C2418) {
            int i2 = C2418.f9424;
            r1 = C1024.f4450;
        } else {
            r1 = null;
        }
        c4930.f18733 = r1;
        return viewM6693;
    }

    /* JADX INFO: renamed from: ʾᵕˈ, reason: contains not printable characters */
    public final boolean m261() {
        int iM1788 = m1788();
        return iM1788 == 0 || this.f406.m583(iM1788 - 1) != null;
    }

    @Override // defpackage.AbstractC0421
    /* JADX INFO: renamed from: ʿٴˇ, reason: contains not printable characters */
    public final int mo262(View view) {
        return super.mo262(view) - ((C4930) view.getLayoutParams()).f18732;
    }

    @Override // defpackage.AbstractC0421
    /* JADX INFO: renamed from: ˀᵝᵙᵛ, reason: contains not printable characters */
    public final boolean mo263(RecyclerView recyclerView, View view, Rect rect, boolean z) {
        return false;
    }

    /* JADX INFO: renamed from: ˁˁﹳ, reason: contains not printable characters */
    public final void m264(int i) {
        if (i >= 0 || i == -2) {
            this.f422 = i;
        } else {
            ᵕᵩʽᵲ.ᵮᵣᵗˈ(AbstractC2704.m6517(i, "Invalid row height: "));
        }
    }

    @Override // defpackage.AbstractC0421
    /* JADX INFO: renamed from: ˆʤᵳ, reason: contains not printable characters */
    public final void mo265(int i, int i2) {
        int i3;
        int i4 = i2 + i;
        while (i < i4) {
            C3673 c3673 = this.f411;
            C1935 c1935 = (C1935) c3673.f13946;
            if (c1935 != null) {
                synchronized (((ᵱᵻᵧᵷ) c1935.f7715)) {
                    i3 = c1935.f7712;
                }
                if (i3 != 0) {
                    ((C1935) c3673.f13946).m5180(Integer.toString(i));
                }
            }
            i++;
        }
    }

    @Override // defpackage.AbstractC0421
    /* JADX INFO: renamed from: ˆˀᵯ, reason: contains not printable characters */
    public final void mo266(Parcelable parcelable) {
        if (parcelable instanceof C1823) {
            C1823 c1823 = (C1823) parcelable;
            this.f393 = c1823.f7254;
            this.f396 = 0;
            Bundle bundle = c1823.f7255;
            C3673 c3673 = this.f411;
            C1935 c1935 = (C1935) c3673.f13946;
            if (c1935 != null && bundle != null) {
                c1935.m5175(-1);
                for (String str : bundle.keySet()) {
                    ((C1935) c3673.f13946).m5182(str, bundle.getSparseParcelableArray(str));
                }
            }
            this.f413 |= 256;
            m1789();
        }
    }

    @Override // defpackage.AbstractC0421
    /* JADX INFO: renamed from: ˆˌˁ, reason: contains not printable characters */
    public final void mo267(C1531 c1531) {
        AbstractC2402 abstractC2402 = this.f404;
        if (abstractC2402 != null) {
            abstractC2402.f9387 = true;
        }
        super.mo267(c1531);
        if (!c1531.f6177) {
            this.f404 = null;
            this.f398 = null;
            return;
        }
        AbstractC2402 abstractC24022 = (AbstractC2402) c1531;
        this.f404 = abstractC24022;
        if (abstractC24022 instanceof C4003) {
            this.f398 = (C4003) abstractC24022;
        } else {
            this.f398 = null;
        }
    }

    @Override // defpackage.AbstractC0421
    /* JADX INFO: renamed from: ˆᵱʣ, reason: contains not printable characters */
    public final int mo268(int i, C2772 c2772, C1499 c1499) {
        int i2 = this.f413;
        if ((i2 & 512) == 0 || this.f421 == null) {
            return 0;
        }
        this.f413 = (i2 & (-4)) | 2;
        m320(c2772, c1499);
        int iM309 = this.f403 == 1 ? m309(i) : m287(i);
        m301();
        this.f413 &= -4;
        return iM309;
    }

    /* JADX INFO: renamed from: ˆᵴᵕ, reason: contains not printable characters */
    public final void m269() {
        int iM1795 = m1795();
        for (int i = 0; i < iM1795; i++) {
            m310(m1798(i));
        }
    }

    /* JADX INFO: renamed from: ˆᵽᵯʣ, reason: contains not printable characters */
    public final void m270(View view) {
        int iMakeMeasureSpec;
        int childMeasureSpec;
        int childMeasureSpec2;
        C4930 c4930 = (C4930) view.getLayoutParams();
        Rect rect = f390;
        m1807(view, rect);
        int i = ((ViewGroup.MarginLayoutParams) c4930).leftMargin + ((ViewGroup.MarginLayoutParams) c4930).rightMargin + rect.left + rect.right;
        int i2 = ((ViewGroup.MarginLayoutParams) c4930).topMargin + ((ViewGroup.MarginLayoutParams) c4930).bottomMargin + rect.top + rect.bottom;
        int i3 = c4930.f18734;
        if (i3 == -1) {
            iMakeMeasureSpec = View.MeasureSpec.makeMeasureSpec(this.f392, 1073741824);
        } else if (this.f422 == -2) {
            iMakeMeasureSpec = View.MeasureSpec.makeMeasureSpec(0, 0);
        } else {
            iMakeMeasureSpec = View.MeasureSpec.makeMeasureSpec(((i3 - 1) * this.f405) + (this.f434 * i3), 1073741824);
        }
        if (this.f403 == 0) {
            childMeasureSpec2 = ViewGroup.getChildMeasureSpec(View.MeasureSpec.makeMeasureSpec(0, 0), i, ((ViewGroup.MarginLayoutParams) c4930).width);
            childMeasureSpec = ViewGroup.getChildMeasureSpec(iMakeMeasureSpec, i2, ((ViewGroup.MarginLayoutParams) c4930).height);
        } else {
            int childMeasureSpec3 = ViewGroup.getChildMeasureSpec(View.MeasureSpec.makeMeasureSpec(0, 0), i2, ((ViewGroup.MarginLayoutParams) c4930).height);
            int childMeasureSpec4 = ViewGroup.getChildMeasureSpec(iMakeMeasureSpec, i, ((ViewGroup.MarginLayoutParams) c4930).width);
            childMeasureSpec = childMeasureSpec3;
            childMeasureSpec2 = childMeasureSpec4;
        }
        view.measure(childMeasureSpec2, childMeasureSpec);
    }

    /* JADX INFO: renamed from: ˈʼᵮʿ, reason: contains not printable characters */
    public final void m271(int i) {
        if (i == 0 || i == 1) {
            this.f403 = i;
            this.f414 = AbstractC3010.m7094(this, i);
            C4055 c4055 = this.f428;
            C2918 c2918 = (C2918) c4055.f15558;
            C2918 c29182 = (C2918) c4055.f15557;
            if (i == 0) {
                c4055.f15559 = c29182;
                c4055.f15560 = c2918;
            } else {
                c4055.f15559 = c2918;
                c4055.f15560 = c29182;
            }
            ᵣˊˈᵪ r0 = this.f429;
            r0.getClass();
            if (i == 0) {
                r0.ᵨᵼⁱ = (C5270) r0.ᵔᵖᵹᵫ;
            } else {
                r0.ᵨᵼⁱ = (C5270) r0.ᵜᵪʾ;
            }
            this.f413 |= 256;
        }
    }

    /* JADX INFO: renamed from: ˈˊˑˑ, reason: contains not printable characters */
    public final void m272() {
        ArrayList arrayList;
        if (this.f436 != null || ((arrayList = this.f418) != null && arrayList.size() > 0)) {
            int i = this.f393;
            View viewMo504 = i == -1 ? null : mo504(i);
            if (viewMo504 != null) {
                AbstractC4793 abstractC4793M577 = this.f406.m577(viewMo504);
                InterfaceC4271 interfaceC4271 = this.f436;
                if (interfaceC4271 != null) {
                    interfaceC4271.m9245(viewMo504, this.f393);
                }
                AbstractC0650 abstractC0650 = this.f406;
                int i2 = this.f393;
                ArrayList arrayList2 = this.f418;
                if (arrayList2 != null) {
                    for (int size = arrayList2.size() - 1; size >= 0; size--) {
                        ((AbstractC3061) this.f418.get(size)).mo6511(abstractC0650, abstractC4793M577, i2);
                    }
                }
            } else {
                InterfaceC4271 interfaceC42712 = this.f436;
                if (interfaceC42712 != null) {
                    interfaceC42712.m9245(null, -1);
                }
                AbstractC0650 abstractC06502 = this.f406;
                ArrayList arrayList3 = this.f418;
                if (arrayList3 != null) {
                    for (int size2 = arrayList3.size() - 1; size2 >= 0; size2--) {
                        ((AbstractC3061) this.f418.get(size2)).mo6511(abstractC06502, null, -1);
                    }
                }
            }
            if ((this.f413 & 3) == 1 || this.f406.isLayoutRequested()) {
                return;
            }
            int iM1795 = m1795();
            for (int i3 = 0; i3 < iM1795; i3++) {
                if (m1798(i3).isLayoutRequested()) {
                    AbstractC0650 abstractC06503 = this.f406;
                    WeakHashMap weakHashMap = AbstractC2746.f10556;
                    abstractC06503.postOnAnimation(this.f423);
                    return;
                }
            }
        }
    }

    @Override // defpackage.AbstractC0421
    /* JADX INFO: renamed from: ˈᵲᵢ, reason: contains not printable characters */
    public final void mo273(View view, Rect rect) {
        super.mo273(view, rect);
        C4930 c4930 = (C4930) view.getLayoutParams();
        rect.left += c4930.f18740;
        rect.top += c4930.f18737;
        rect.right -= c4930.f18732;
        rect.bottom -= c4930.f18739;
    }

    /* JADX INFO: renamed from: ˊʿʽʿ, reason: contains not printable characters */
    public final void m274() {
        int i = (this.f413 & (-1025)) | (m329(false) ? 1024 : 0);
        this.f413 = i;
        if ((i & 1024) != 0) {
            AbstractC0650 abstractC0650 = this.f406;
            WeakHashMap weakHashMap = AbstractC2746.f10556;
            abstractC0650.postOnAnimation(this.f423);
        }
    }

    /* JADX INFO: renamed from: ˊˈᵲ, reason: contains not printable characters */
    public final void m275() {
        int i;
        int i2 = this.f413;
        if ((65600 & i2) == 65536) {
            AbstractC5529 abstractC5529 = this.f421;
            int i3 = this.f393;
            if ((i2 & 262144) != 0) {
                i = -this.f402;
            } else {
                i = this.f402 + this.f410;
            }
            while (true) {
                int i4 = abstractC5529.f20866;
                if (i4 >= abstractC5529.f20869 && i4 > i3) {
                    boolean z = abstractC5529.f20863;
                    ᵟˑʽ r4 = abstractC5529.f20861;
                    if (!z) {
                        if (r4.ᵶᵥᵝ(i4) < i) {
                            break;
                        }
                        abstractC5529.f20861.ᵱʡˏ(abstractC5529.f20866);
                        abstractC5529.f20866--;
                    } else {
                        if (r4.ᵶᵥᵝ(i4) > i) {
                            break;
                        }
                        abstractC5529.f20861.ᵱʡˏ(abstractC5529.f20866);
                        abstractC5529.f20866--;
                    }
                } else {
                    break;
                }
            }
            if (abstractC5529.f20866 < abstractC5529.f20869) {
                abstractC5529.m11153();
            }
        }
    }

    /* JADX INFO: renamed from: ˊᵨˌ, reason: contains not printable characters */
    public final int m276(int i) {
        int i2 = this.f403;
        if (i2 != 0) {
            if (i2 == 1) {
                if (i == 17) {
                    return (this.f413 & 524288) == 0 ? 2 : 3;
                }
                if (i == 33) {
                    return 0;
                }
                if (i == 66) {
                    return (this.f413 & 524288) == 0 ? 3 : 2;
                }
                if (i == 130) {
                    return 1;
                }
            }
        }
        if (i != 17) {
            if (i == 33) {
                return 2;
            }
            if (i != 66) {
                return i != 130 ? 17 : 3;
            }
            if ((this.f413 & 262144) != 0) {
                return 0;
            }
        } else if ((this.f413 & 262144) == 0) {
            return 0;
        }
        return 1;
    }

    @Override // defpackage.AbstractC0421
    /* JADX INFO: renamed from: ˊᵨᵧ, reason: contains not printable characters */
    public final C5319 mo277(Context context, AttributeSet attributeSet) {
        return new C4930(context, attributeSet);
    }

    @Override // defpackage.AbstractC0421
    /* JADX INFO: renamed from: ˊᵶᵕᵛ, reason: contains not printable characters */
    public final void mo278(int i) {
        m295(i, false);
    }

    @Override // defpackage.AbstractC0421
    /* JADX INFO: renamed from: ˌᴵ, reason: contains not printable characters */
    public final C5319 mo279(ViewGroup.LayoutParams layoutParams) {
        return layoutParams instanceof C4930 ? new C4930((C4930) layoutParams) : layoutParams instanceof C5319 ? new C4930((C5319) layoutParams) : layoutParams instanceof ViewGroup.MarginLayoutParams ? new C4930((ViewGroup.MarginLayoutParams) layoutParams) : new C4930(layoutParams);
    }

    @Override // defpackage.AbstractC0421
    /* JADX INFO: renamed from: ˌᵨʠᵫ, reason: contains not printable characters */
    public final int mo280(View view) {
        return super.mo280(view) + ((C4930) view.getLayoutParams()).f18740;
    }

    /* JADX INFO: renamed from: ˎˋˊʚ, reason: contains not printable characters */
    public final void m281() {
        C2918 c2918 = (C2918) this.f428.f15560;
        int i = c2918.f11229 - this.f407;
        int iM259 = m259() + i;
        c2918.m6983(i, iM259, i, iM259);
    }

    @Override // defpackage.AbstractC0421
    /* JADX INFO: renamed from: ˏʜᵪ, reason: contains not printable characters */
    public final void mo282(int i, int i2) {
        int i3;
        int i4 = this.f393;
        if (i4 != -1 && (i3 = this.f396) != Integer.MIN_VALUE) {
            int i5 = i4 + i3;
            if (i <= i5 && i5 < i + 1) {
                this.f396 = (i2 - i) + i3;
            } else if (i < i5 && i2 > i5 - 1) {
                this.f396 = i3 - 1;
            } else if (i > i5 && i2 < i5) {
                this.f396 = i3 + 1;
            }
        }
        C1935 c1935 = (C1935) this.f411.f13946;
        if (c1935 != null) {
            c1935.m5175(-1);
        }
    }

    @Override // defpackage.AbstractC0421
    /* JADX INFO: renamed from: ˏʽˊᵰ, reason: contains not printable characters */
    public final void mo283(C1499 c1499) {
    }

    @Override // defpackage.AbstractC0421
    /* JADX INFO: renamed from: ˏːˆ, reason: contains not printable characters */
    public final C5319 mo284() {
        return new C4930(-2, -2);
    }

    @Override // defpackage.AbstractC0421
    /* JADX INFO: renamed from: ːᵝٴᵶ, reason: contains not printable characters */
    public final void mo285(C2772 c2772, C1499 c1499, View view, C0902 c0902) {
        ᵾːʿ r3;
        ViewGroup.LayoutParams layoutParams = view.getLayoutParams();
        if (this.f421 == null || !(layoutParams instanceof C4930)) {
            return;
        }
        int iM9984 = ((C4930) layoutParams).f20074.m9984();
        int i = -1;
        if (iM9984 >= 0 && (r3 = this.f421.mo1219(iM9984)) != null) {
            i = r3.ᵜᵪʾ;
        }
        if (i < 0) {
            return;
        }
        int i2 = iM9984 / this.f421.f20864;
        if (this.f403 == 0) {
            c0902.m3146(C1014.m3349(i, 1, i2, 1));
        } else {
            c0902.m3146(C1014.m3349(i2, 1, i, 1));
        }
    }

    @Override // defpackage.AbstractC0421
    /* JADX INFO: renamed from: ˑʢ, reason: contains not printable characters */
    public final int mo286(C2772 c2772, C1499 c1499) {
        AbstractC5529 abstractC5529;
        return (this.f403 != 0 || (abstractC5529 = this.f421) == null) ? super.mo286(c2772, c1499) : abstractC5529.f20864;
    }

    /* JADX INFO: renamed from: ᵔˏˉᵶ, reason: contains not printable characters */
    public final int m287(int i) {
        int i2 = 0;
        if (i == 0) {
            return 0;
        }
        int i3 = -i;
        int iM1795 = m1795();
        if (this.f403 == 0) {
            while (i2 < iM1795) {
                m1798(i2).offsetTopAndBottom(i3);
                i2++;
            }
        } else {
            while (i2 < iM1795) {
                m1798(i2).offsetLeftAndRight(i3);
                i2++;
            }
        }
        this.f407 += i;
        m281();
        this.f406.invalidate();
        return i;
    }

    /* JADX INFO: renamed from: ᵕʢ, reason: contains not printable characters */
    public final void m288() {
        ArrayList arrayList = this.f418;
        if (arrayList == null || arrayList.size() <= 0) {
            return;
        }
        int i = this.f393;
        View viewMo504 = i == -1 ? null : mo504(i);
        if (viewMo504 != null) {
            AbstractC4793 abstractC4793M577 = this.f406.m577(viewMo504);
            int i2 = this.f393;
            ArrayList arrayList2 = this.f418;
            if (arrayList2 == null) {
                return;
            }
            for (int size = arrayList2.size() - 1; size >= 0; size--) {
                ((AbstractC3061) this.f418.get(size)).mo2736(abstractC4793M577, i2);
            }
            return;
        }
        InterfaceC4271 interfaceC4271 = this.f436;
        if (interfaceC4271 != null) {
            interfaceC4271.m9245(null, -1);
        }
        ArrayList arrayList3 = this.f418;
        if (arrayList3 == null) {
            return;
        }
        for (int size2 = arrayList3.size() - 1; size2 >= 0; size2--) {
            ((AbstractC3061) this.f418.get(size2)).mo2736(null, -1);
        }
    }

    @Override // defpackage.AbstractC0421
    /* JADX INFO: renamed from: ᵕˁːᵚ, reason: contains not printable characters */
    public final void mo289(RecyclerView recyclerView, int i) {
        m295(i, true);
    }

    /* JADX WARN: Removed duplicated region for block: B:20:0x003c  */
    /* JADX WARN: Removed duplicated region for block: B:23:0x0046  */
    /* JADX WARN: Removed duplicated region for block: B:28:0x004f  */
    /* JADX WARN: Removed duplicated region for block: B:33:0x005b  */
    /* JADX WARN: Removed duplicated region for block: B:42:0x0075  */
    /* JADX WARN: Type inference fix 'apply assigned field type' failed
    java.lang.UnsupportedOperationException: ArgType.getObject(), call class: class jadx.core.dex.instructions.args.ArgType$UnknownArg
    	at jadx.core.dex.instructions.args.ArgType.getObject(ArgType.java:593)
    	at jadx.core.dex.attributes.nodes.ClassTypeVarsAttr.getTypeVarsMapFor(ClassTypeVarsAttr.java:35)
    	at jadx.core.dex.nodes.utils.TypeUtils.replaceClassGenerics(TypeUtils.java:177)
    	at jadx.core.dex.visitors.typeinference.FixTypesVisitor.insertExplicitUseCast(FixTypesVisitor.java:397)
    	at jadx.core.dex.visitors.typeinference.FixTypesVisitor.tryFieldTypeWithNewCasts(FixTypesVisitor.java:359)
    	at jadx.core.dex.visitors.typeinference.FixTypesVisitor.applyFieldType(FixTypesVisitor.java:309)
    	at jadx.core.dex.visitors.typeinference.FixTypesVisitor.visit(FixTypesVisitor.java:94)
     */
    @Override // defpackage.AbstractC0421
    /* JADX INFO: renamed from: ᵕᵜʽᵰ, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final boolean mo290(C2772 c2772, C1499 c1499, int i, Bundle bundle) {
        boolean z;
        if ((this.f413 & 131072) != 0) {
            m320(c2772, c1499);
            boolean z2 = (this.f413 & 262144) != 0;
            if (this.f403 == 0) {
                if (i == C2444.f9493.m6180()) {
                    i = z2 ? 4096 : 8192;
                } else if (i == C2444.f9495.m6180()) {
                    if (z2) {
                    }
                }
                int i2 = this.f393;
                z = i2 != 0 && i == 8192;
                boolean z3 = i2 != c1499.m4296() - 1 && i == 4096;
                if (!z || z3) {
                    AccessibilityEvent accessibilityEventObtain = AccessibilityEvent.obtain(4096);
                    this.f406.onInitializeAccessibilityEvent(accessibilityEventObtain);
                    AbstractC0650 abstractC0650 = this.f406;
                    abstractC0650.requestSendAccessibilityEvent(abstractC0650, accessibilityEventObtain);
                } else if (i == 4096) {
                    m291(true);
                    m331(1, false);
                } else if (i == 8192) {
                    m291(false);
                    m331(-1, false);
                }
                m301();
            } else {
                if (i != C2444.f9496.m6180()) {
                    if (i == C2444.f9499.m6180()) {
                    }
                }
                int i22 = this.f393;
                if (i22 != 0) {
                    if (i22 != c1499.m4296() - 1) {
                        if (z) {
                            AccessibilityEvent accessibilityEventObtain2 = AccessibilityEvent.obtain(4096);
                            this.f406.onInitializeAccessibilityEvent(accessibilityEventObtain2);
                            AbstractC0650 abstractC06502 = this.f406;
                            abstractC06502.requestSendAccessibilityEvent(abstractC06502, accessibilityEventObtain2);
                            m301();
                        }
                    }
                }
            }
        }
        return true;
    }

    /* JADX INFO: renamed from: ᵖʽˈˏ, reason: contains not printable characters */
    public final void m291(boolean z) {
        int i;
        if (z) {
            if (m261()) {
                return;
            }
        } else if (m1788() == 0 || this.f406.m583(0) != null) {
            return;
        }
        C4003 c4003 = this.f398;
        if (c4003 == null) {
            C4003 c40032 = new C4003(this, z ? 1 : -1, this.f395 > 1);
            this.f396 = 0;
            mo267(c40032);
        } else {
            GridLayoutManager gridLayoutManager = c4003.f15371;
            int i2 = c4003.f15369;
            if (z) {
                if (i2 < gridLayoutManager.f433) {
                    c4003.f15369 = i2 + 1;
                }
            } else if (i2 > (-gridLayoutManager.f433)) {
                c4003.f15369 = i2 - 1;
            }
        }
        if (this.f403 == 0) {
            i = 4;
            if (this.f2347.getLayoutDirection() != 1 ? !z : z) {
                i = 3;
            }
        } else {
            i = z ? 2 : 1;
        }
        if (this.f435 == null) {
            this.f435 = (AudioManager) this.f406.getContext().getSystemService("audio");
        }
        this.f435.playSoundEffect(i);
    }

    /* JADX INFO: renamed from: ᵖᵩː, reason: contains not printable characters */
    public final void m292(int i, int i2, boolean z) {
        View viewMo504 = mo504(i);
        boolean zM1785 = m1785();
        if (!zM1785 && !this.f406.isLayoutRequested() && viewMo504 != null && m257(viewMo504) == i) {
            if (!this.f406.isInTouchMode() || this.f394 == 4) {
                this.f413 |= 32;
                m308(viewMo504, z);
                this.f413 &= -33;
                return;
            } else {
                this.f393 = i;
                this.f427 = i2;
                this.f396 = Integer.MIN_VALUE;
                m272();
                return;
            }
        }
        int i3 = this.f413;
        if ((i3 & 512) == 0 || (i3 & 64) != 0) {
            this.f393 = i;
            this.f427 = i2;
            this.f396 = Integer.MIN_VALUE;
            return;
        }
        if (z && !this.f406.isLayoutRequested()) {
            this.f393 = i;
            this.f427 = i2;
            this.f396 = Integer.MIN_VALUE;
            if (this.f421 == null) {
                this.f406.getId();
                return;
            }
            C0186 c0186 = new C0186(this);
            c0186.f6181 = i;
            mo267(c0186);
            int i4 = c0186.f6181;
            if (i4 != this.f393) {
                this.f393 = i4;
                this.f427 = 0;
                return;
            }
            return;
        }
        if (zM1785) {
            AbstractC2402 abstractC2402 = this.f404;
            if (abstractC2402 != null) {
                abstractC2402.f9387 = true;
            }
            this.f406.m551();
        }
        if (!this.f406.isLayoutRequested() && viewMo504 != null && m257(viewMo504) == i) {
            this.f413 |= 32;
            m308(viewMo504, z);
            this.f413 &= -33;
        } else {
            this.f393 = i;
            this.f427 = i2;
            this.f396 = Integer.MIN_VALUE;
            this.f413 |= 256;
            m1789();
        }
    }

    @Override // defpackage.AbstractC0421
    /* JADX INFO: renamed from: ᵘᵝ, reason: contains not printable characters */
    public final void mo293(int i, int i2) {
        AbstractC5529 abstractC5529;
        int i3;
        int i4;
        int i5 = this.f393;
        if (i5 != -1 && (abstractC5529 = this.f421) != null && abstractC5529.f20869 >= 0 && (i3 = this.f396) != Integer.MIN_VALUE && i <= (i4 = i5 + i3)) {
            if (i + i2 > i4) {
                this.f393 = (i - i4) + i3 + i5;
                this.f396 = Integer.MIN_VALUE;
            } else {
                this.f396 = i3 - i2;
            }
        }
        C1935 c1935 = (C1935) this.f411.f13946;
        if (c1935 != null) {
            c1935.m5175(-1);
        }
    }

    @Override // defpackage.AbstractC0421
    /* JADX INFO: renamed from: ᵘᵫᵡ, reason: contains not printable characters */
    public final int mo294(int i, C2772 c2772, C1499 c1499) {
        if ((this.f413 & 512) == 0 || this.f421 == null) {
            return 0;
        }
        m320(c2772, c1499);
        this.f413 = (this.f413 & (-4)) | 2;
        int iM309 = this.f403 == 0 ? m309(i) : m287(i);
        m301();
        this.f413 &= -4;
        return iM309;
    }

    /* JADX INFO: renamed from: ᵘᵳᵻˁ, reason: contains not printable characters */
    public final void m295(int i, boolean z) {
        if ((this.f393 == i || i == -1) && this.f427 == 0) {
            return;
        }
        m292(i, 0, z);
    }

    /* JADX INFO: renamed from: ᵙˁˇ, reason: contains not printable characters */
    public final boolean m296(int i) {
        AbstractC4793 abstractC4793M583 = this.f406.m583(i);
        if (abstractC4793M583 == null) {
            return false;
        }
        View view = abstractC4793M583.f18236;
        return view.getLeft() >= 0 && view.getRight() <= this.f406.getWidth() && view.getTop() >= 0 && view.getBottom() <= this.f406.getHeight();
    }

    /* JADX WARN: Removed duplicated region for block: B:17:0x0054  */
    @Override // defpackage.AbstractC0421
    /* JADX INFO: renamed from: ᵚᵹᵔᵜ, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final Parcelable mo297() {
        Bundle bundle;
        int i;
        C1823 c1823 = new C1823();
        c1823.f7255 = Bundle.EMPTY;
        c1823.f7254 = this.f393;
        C3673 c3673 = this.f411;
        C1935 c1935 = (C1935) c3673.f13946;
        if (c1935 != null) {
            synchronized (((ᵱᵻᵧᵷ) c1935.f7715)) {
                i = c1935.f7712;
            }
            if (i == 0) {
                bundle = null;
            } else {
                LinkedHashMap linkedHashMapM5184 = ((C1935) c3673.f13946).m5184();
                bundle = new Bundle();
                for (Map.Entry entry : linkedHashMapM5184.entrySet()) {
                    bundle.putSparseParcelableArray((String) entry.getKey(), (SparseArray) entry.getValue());
                }
            }
        }
        int iM1795 = m1795();
        for (int i2 = 0; i2 < iM1795; i2++) {
            View viewM1798 = m1798(i2);
            int iM257 = m257(viewM1798);
            if (iM257 != -1 && c3673.f13945 != 0) {
                String string = Integer.toString(iM257);
                SparseArray<Parcelable> sparseArray = new SparseArray<>();
                viewM1798.saveHierarchyState(sparseArray);
                if (bundle == null) {
                    bundle = new Bundle();
                }
                bundle.putSparseParcelableArray(string, sparseArray);
            }
        }
        c1823.f7255 = bundle;
        return c1823;
    }

    @Override // defpackage.AbstractC0421
    /* JADX INFO: renamed from: ᵜᵤ, reason: contains not printable characters */
    public final void mo298(C2772 c2772, C1499 c1499, C0902 c0902) {
        AccessibilityNodeInfo accessibilityNodeInfo = c0902.f3993;
        m320(c2772, c1499);
        int iM4296 = c1499.m4296();
        int i = this.f413;
        boolean z = (262144 & i) != 0;
        if ((i & 2048) == 0 || (iM4296 > 1 && !m296(0))) {
            if (this.f403 == 0) {
                c0902.m3142(z ? C2444.f9495 : C2444.f9493);
            } else {
                c0902.m3142(C2444.f9496);
            }
            accessibilityNodeInfo.setScrollable(true);
        }
        if ((this.f413 & 4096) == 0 || (iM4296 > 1 && !m296(iM4296 - 1))) {
            if (this.f403 == 0) {
                c0902.m3142(z ? C2444.f9493 : C2444.f9495);
            } else {
                c0902.m3142(C2444.f9499);
            }
            accessibilityNodeInfo.setScrollable(true);
        }
        accessibilityNodeInfo.setCollectionInfo(AccessibilityNodeInfo.CollectionInfo.obtain(mo286(c2772, c1499), mo319(c2772, c1499), false, 0));
        accessibilityNodeInfo.setClassName("android.widget.GridView");
        m301();
    }

    @Override // defpackage.AbstractC0421
    /* JADX INFO: renamed from: ᵟᵴᵥ, reason: contains not printable characters */
    public final void mo299(C2772 c2772) {
        for (int iM1795 = m1795() - 1; iM1795 >= 0; iM1795--) {
            m1799(iM1795, c2772);
        }
    }

    @Override // defpackage.AbstractC0421
    /* JADX INFO: renamed from: ᵠˏˏ, reason: contains not printable characters */
    public final int mo300(View view) {
        return super.mo300(view) + ((C4930) view.getLayoutParams()).f18737;
    }

    /* JADX INFO: renamed from: ᵡˁᵦ, reason: contains not printable characters */
    public final void m301() {
        int i = this.f408 - 1;
        this.f408 = i;
        if (i == 0) {
            this.f400 = null;
            this.f412 = null;
            this.f424 = 0;
            this.f419 = 0;
        }
    }

    /* JADX INFO: renamed from: ᵡᵱ, reason: contains not printable characters */
    public final void m302() {
        int i = this.f413;
        if ((65600 & i) == 65536) {
            AbstractC5529 abstractC5529 = this.f421;
            int i2 = this.f393;
            int i3 = (i & 262144) != 0 ? this.f410 + this.f402 : -this.f402;
            while (true) {
                int i4 = abstractC5529.f20866;
                int i5 = abstractC5529.f20869;
                if (i4 >= i5 && i5 < i2) {
                    int i6 = abstractC5529.f20861.ᵮᵣᵗˈ(i5);
                    boolean z = abstractC5529.f20863;
                    ᵟˑʽ r4 = abstractC5529.f20861;
                    int i7 = abstractC5529.f20869;
                    if (!z) {
                        if (r4.ᵶᵥᵝ(i7) + i6 > i3) {
                            break;
                        }
                        abstractC5529.f20861.ᵱʡˏ(abstractC5529.f20869);
                        abstractC5529.f20869++;
                    } else {
                        if (r4.ᵶᵥᵝ(i7) - i6 < i3) {
                            break;
                        }
                        abstractC5529.f20861.ᵱʡˏ(abstractC5529.f20869);
                        abstractC5529.f20869++;
                    }
                } else {
                    break;
                }
            }
            if (abstractC5529.f20866 < abstractC5529.f20869) {
                abstractC5529.m11153();
            }
        }
    }

    @Override // defpackage.AbstractC0421
    /* JADX INFO: renamed from: ᵡᵶ, reason: contains not printable characters */
    public final void mo303(AbstractC2416 abstractC2416, AbstractC2416 abstractC24162) {
        if (abstractC2416 != null) {
            this.f421 = null;
            this.f417 = null;
            this.f413 &= -1025;
            this.f393 = -1;
            this.f396 = 0;
            C1935 c1935 = (C1935) this.f411.f13946;
            if (c1935 != null) {
                c1935.m5175(-1);
            }
        }
    }

    /* JADX WARN: Removed duplicated region for block: B:26:0x0053  */
    /* JADX WARN: Removed duplicated region for block: B:27:0x0055  */
    /* JADX WARN: Removed duplicated region for block: B:29:0x005b  */
    /* JADX WARN: Removed duplicated region for block: B:43:0x007a A[ADDED_TO_REGION] */
    /* JADX WARN: Removed duplicated region for block: B:45:0x0083  */
    /* JADX WARN: Removed duplicated region for block: B:48:0x0088  */
    /* JADX WARN: Removed duplicated region for block: B:54:0x0098  */
    /* JADX WARN: Removed duplicated region for block: B:56:0x009b  */
    /* JADX WARN: Removed duplicated region for block: B:57:0x00a4  */
    /* JADX WARN: Removed duplicated region for block: B:59:0x00a7  */
    /* JADX WARN: Removed duplicated region for block: B:62:0x00b1  */
    /* JADX WARN: Removed duplicated region for block: B:64:0x00b5  */
    /* JADX WARN: Removed duplicated region for block: B:66:0x00b8  */
    /* JADX WARN: Removed duplicated region for block: B:67:0x00ba  */
    @Override // defpackage.AbstractC0421
    /* JADX INFO: renamed from: ᵡᵶᵬʤ, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final boolean mo304(RecyclerView recyclerView, ArrayList arrayList, int i, int i2) {
        int i3;
        int iM257;
        View viewMo504;
        char c;
        char c2;
        int i4;
        int iM1795;
        boolean z;
        char c3;
        char c4;
        int i5;
        AbstractC0650 abstractC0650;
        View viewM1790;
        boolean z2 = true;
        if ((this.f413 & 32768) == 0) {
            if (!recyclerView.hasFocus()) {
                int size = arrayList.size();
                View viewMo5042 = mo504(this.f393);
                if (viewMo5042 != null) {
                    viewMo5042.addFocusables(arrayList, i, i2);
                }
                if (arrayList.size() != size || !recyclerView.isFocusable()) {
                    return true;
                }
                arrayList.add(recyclerView);
                return true;
            }
            if (this.f398 == null) {
                int iM276 = m276(i);
                View viewFindFocus = recyclerView.findFocus();
                if (viewFindFocus == null || (abstractC0650 = this.f406) == null || viewFindFocus == abstractC0650 || (viewM1790 = m1790(viewFindFocus)) == null) {
                    i3 = -1;
                    iM257 = m257(m1798(i3));
                    viewMo504 = iM257 != -1 ? null : mo504(iM257);
                    if (viewMo504 != null) {
                        viewMo504.addFocusables(arrayList, i, i2);
                    }
                    if (this.f421 != null && m1795() != 0) {
                        c = 2;
                        c2 = 3;
                        if ((iM276 == 3 && iM276 != 2) || this.f421.f20864 > 1) {
                            AbstractC5529 abstractC5529 = this.f421;
                            int i6 = (abstractC5529 == null || viewMo504 == null) ? -1 : abstractC5529.mo1219(iM257).ᵜᵪʾ;
                            if (iM276 != 1 || iM276 == 0) {
                                this.f421.getClass();
                            }
                            int size2 = arrayList.size();
                            i4 = (iM276 != 1 || iM276 == 3) ? 1 : -1;
                            int iM17952 = i4 <= 0 ? m1795() - 1 : 0;
                            iM1795 = i3 != -1 ? i4 > 0 ? 0 : m1795() - 1 : i3 + i4;
                            while (true) {
                                if (i4 > 0) {
                                    if (iM1795 < iM17952) {
                                        break;
                                    }
                                } else {
                                    if (iM1795 > iM17952) {
                                        break;
                                    }
                                    View viewM1798 = m1798(iM1795);
                                    if (viewM1798.getVisibility() != 0 || !viewM1798.hasFocusable()) {
                                        z = z2;
                                        c3 = c;
                                        c4 = c2;
                                    } else if (viewMo504 == null) {
                                        viewM1798.addFocusables(arrayList, i, i2);
                                        if (arrayList.size() > size2) {
                                            break;
                                        }
                                        z = z2;
                                        c3 = c;
                                        c4 = c2;
                                    } else {
                                        int iM2572 = m257(m1798(iM1795));
                                        ᵾːʿ r12 = this.f421.mo1219(iM2572);
                                        if (r12 == null) {
                                            z = z2;
                                            c3 = 2;
                                            c4 = 3;
                                        } else if (iM276 == z2) {
                                            if (r12.ᵜᵪʾ == i6 && iM2572 > iM257) {
                                                viewM1798.addFocusables(arrayList, i, i2);
                                                if (arrayList.size() > size2) {
                                                    break;
                                                }
                                            }
                                            z = z2;
                                            c3 = 2;
                                            c4 = 3;
                                        } else if (iM276 == 0) {
                                            if (r12.ᵜᵪʾ == i6 && iM2572 < iM257) {
                                                viewM1798.addFocusables(arrayList, i, i2);
                                                if (arrayList.size() > size2) {
                                                    break;
                                                }
                                            }
                                            z = z2;
                                            c3 = 2;
                                            c4 = 3;
                                        } else {
                                            c4 = 3;
                                            if (iM276 == 3) {
                                                int i7 = r12.ᵜᵪʾ;
                                                if (i7 != i6) {
                                                    if (i7 < i6) {
                                                        break;
                                                    }
                                                    viewM1798.addFocusables(arrayList, i, i2);
                                                }
                                                z = z2;
                                                c3 = 2;
                                            } else {
                                                z = z2;
                                                c3 = 2;
                                                if (iM276 == 2 && (i5 = r12.ᵜᵪʾ) != i6) {
                                                    if (i5 > i6) {
                                                        return z;
                                                    }
                                                    viewM1798.addFocusables(arrayList, i, i2);
                                                }
                                            }
                                        }
                                    }
                                    iM1795 += i4;
                                    c2 = c4;
                                    c = c3;
                                    z2 = z;
                                }
                            }
                        }
                    }
                } else {
                    int iM17953 = m1795();
                    i3 = 0;
                    while (i3 < iM17953) {
                        if (m1798(i3) == viewM1790) {
                            break;
                        }
                        i3++;
                    }
                    i3 = -1;
                    iM257 = m257(m1798(i3));
                    if (iM257 != -1) {
                    }
                    if (viewMo504 != null) {
                    }
                    if (this.f421 != null) {
                        c = 2;
                        c2 = 3;
                        if (iM276 == 3) {
                            AbstractC5529 abstractC55292 = this.f421;
                            if (abstractC55292 == null) {
                                if (iM276 != 1) {
                                    this.f421.getClass();
                                    int size22 = arrayList.size();
                                    if (iM276 != 1) {
                                        if (i4 <= 0) {
                                        }
                                        if (i3 != -1) {
                                        }
                                        while (true) {
                                            if (i4 > 0) {
                                            }
                                            iM1795 += i4;
                                            c2 = c4;
                                            c = c3;
                                            z2 = z;
                                        }
                                    }
                                }
                            }
                        } else {
                            AbstractC5529 abstractC552922 = this.f421;
                            if (abstractC552922 == null) {
                            }
                        }
                    }
                }
            }
        }
        return z2;
    }

    /* JADX INFO: renamed from: ᵢᵝᵣ, reason: contains not printable characters */
    public final void m305() {
        this.f421.mo1217((this.f413 & 262144) != 0 ? this.f410 + this.f402 + this.f419 : (-this.f402) - this.f419);
    }

    /* JADX INFO: renamed from: ᵢᵴᵞᵣ, reason: contains not printable characters */
    public final void m306(View view, View view2, boolean z, int i, int i2) {
        if ((this.f413 & 64) != 0) {
            return;
        }
        int iM257 = m257(view);
        int iM258 = m258(view, view2);
        if (iM257 != this.f393 || iM258 != this.f427) {
            this.f393 = iM257;
            this.f427 = iM258;
            this.f396 = 0;
            if ((this.f413 & 3) != 1) {
                m272();
            }
            if (this.f406.m553()) {
                this.f406.invalidate();
            }
        }
        if (view == null) {
            return;
        }
        if (!view.hasFocus() && this.f406.hasFocus()) {
            view.requestFocus();
        }
        if ((this.f413 & 131072) == 0 && z) {
            return;
        }
        int[] iArr = f391;
        if (!m307(view, view2, iArr) && i == 0 && i2 == 0) {
            return;
        }
        int i3 = iArr[0] + i;
        int i4 = iArr[1] + i2;
        if ((this.f413 & 3) == 1) {
            m309(i3);
            m287(i4);
            return;
        }
        if (this.f403 != 0) {
            i4 = i3;
            i3 = i4;
        }
        AbstractC0650 abstractC0650 = this.f406;
        if (z) {
            abstractC0650.m575(i3, i4, false);
        } else {
            abstractC0650.scrollBy(i3, i4);
            m288();
        }
    }

    /* JADX INFO: renamed from: ᵣːʓˆ, reason: contains not printable characters */
    public final boolean m307(View view, View view2, int[] iArr) {
        int top;
        int i;
        int left;
        int i2;
        int iM258;
        C4055 c4055 = this.f428;
        C2918 c2918 = (C2918) c4055.f15559;
        if (this.f403 == 0) {
            C4930 c4930 = (C4930) view.getLayoutParams();
            c4930.getClass();
            top = view.getLeft() + c4930.f18740;
            i = c4930.f18736;
        } else {
            C4930 c49302 = (C4930) view.getLayoutParams();
            c49302.getClass();
            top = view.getTop() + c49302.f18737;
            i = c49302.f18738;
        }
        int iM6982 = c2918.m6982(top + i);
        if (view2 != null && (iM258 = m258(view, view2)) != 0) {
            int[] iArr2 = ((C4930) view.getLayoutParams()).f18735;
            iM6982 += iArr2[iM258] - iArr2[0];
        }
        if (this.f403 == 0) {
            C4930 c49303 = (C4930) view.getLayoutParams();
            c49303.getClass();
            left = view.getTop() + c49303.f18737;
            i2 = c49303.f18738;
        } else {
            C4930 c49304 = (C4930) view.getLayoutParams();
            c49304.getClass();
            left = view.getLeft() + c49304.f18740;
            i2 = c49304.f18736;
        }
        int iM69822 = ((C2918) c4055.f15560).m6982(left + i2);
        if (iM6982 == 0 && iM69822 == 0) {
            iArr[0] = 0;
            iArr[1] = 0;
            return false;
        }
        iArr[0] = iM6982;
        iArr[1] = iM69822;
        return true;
    }

    /* JADX INFO: renamed from: ᵤˌˏ, reason: contains not printable characters */
    public final void m308(View view, boolean z) {
        m306(view, view.findFocus(), z, 0, 0);
    }

    /* JADX WARN: Removed duplicated region for block: B:20:0x0035 A[PHI: r2
      0x0035: PHI (r2v23 int) = (r2v22 int), (r2v26 int) binds: [B:19:0x0033, B:12:0x0021] A[DONT_GENERATE, DONT_INLINE]] */
    /* JADX INFO: renamed from: ᵥﾞʾ, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final int m309(int i) {
        char c;
        C1612 c1612;
        int i2;
        int i3 = i;
        int i4 = this.f413;
        int i5 = Integer.MAX_VALUE;
        if ((i4 & 64) == 0 && (i4 & 3) != 1) {
            C4055 c4055 = this.f428;
            if (i3 > 0) {
                C2918 c2918 = (C2918) c4055.f15559;
                if (c2918.f11230 != Integer.MAX_VALUE && i3 > (i2 = c2918.f11226)) {
                    i3 = i2;
                }
            } else if (i3 < 0) {
                C2918 c29182 = (C2918) c4055.f15559;
                if (c29182.f11224 != Integer.MIN_VALUE && i3 < (i2 = c29182.f11233)) {
                }
            }
        }
        char c2 = 0;
        if (i3 == 0) {
            return 0;
        }
        C1612 c16122 = this.f420;
        if (c16122 != null && !c16122.f6455) {
            if (i3 > 0) {
                int i6 = c16122.f6458;
                if (i6 == 0) {
                    c16122.f6458 = 1;
                    c16122.f6456 = i3;
                } else if (i6 == 1) {
                    c16122.f6456 += i3;
                } else {
                    c16122.f6458 = 2;
                }
            } else if (i3 < 0) {
                int i7 = c16122.f6458;
                if (i7 == 0) {
                    c16122.f6458 = -1;
                    c16122.f6456 = -i3;
                } else if (i7 == -1) {
                    c16122.f6456 += -i3;
                } else {
                    c16122.f6458 = 2;
                }
            }
        }
        int i8 = -i3;
        int iM1795 = m1795();
        if (this.f403 == 1) {
            for (int i9 = 0; i9 < iM1795; i9++) {
                m1798(i9).offsetTopAndBottom(i8);
            }
        } else {
            for (int i10 = 0; i10 < iM1795; i10++) {
                m1798(i10).offsetLeftAndRight(i8);
            }
        }
        if ((this.f413 & 3) == 1) {
            m324();
            return i3;
        }
        int iM17952 = m1795();
        if ((this.f413 & 262144) == 0 ? i3 >= 0 : i3 <= 0) {
            m325();
        } else {
            m305();
        }
        char c3 = m1795() > iM17952 ? (char) 1 : (char) 0;
        int iM17953 = m1795();
        int i11 = this.f393;
        boolean z = (this.f413 & 3145728) != 0 && ((c1612 = this.f420) == null || !c1612.f6455);
        if (!z || i11 < 0) {
            c = 0;
        } else {
            int iM17954 = m1795();
            int i12 = 0;
            int i13 = -1;
            while (i12 < iM17954) {
                View childAt = this.f406.getChildAt(i12);
                char c4 = c2;
                int[] iArr = f391;
                m307(childAt, null, iArr);
                int i14 = iArr[c4];
                if (i14 < 0) {
                    i14 = -i14;
                }
                if (i14 < i5) {
                    i5 = i14;
                    i13 = i12;
                }
                i12++;
                c2 = c4;
            }
            c = c2;
            if (i13 != -1) {
                View childAt2 = this.f406.getChildAt(i13);
                this.f393 = m257(childAt2);
                if (this.f406.hasFocus() && !childAt2.hasFocus()) {
                    childAt2.requestFocus();
                }
            }
        }
        if ((this.f413 & 262144) == 0 ? i3 >= 0 : i3 <= 0) {
            m302();
        } else {
            m275();
        }
        if ((c3 | (m1795() >= iM17953 ? c : (char) 1)) != 0) {
            m274();
        }
        if (z && i11 != this.f393 && (this.f413 & 1048576) != 1048576) {
            m272();
            m288();
        }
        this.f406.invalidate();
        m324();
        return i3;
    }

    /* JADX INFO: renamed from: ᵧᵙᵤ, reason: contains not printable characters */
    public final void m310(View view) {
        int[] iArr;
        C4930 c4930 = (C4930) view.getLayoutParams();
        ʽˎˇˌ r1 = c4930.f18733;
        ᵣˊˈᵪ r2 = this.f429;
        if (r1 == null) {
            C5270 c5270 = (C5270) r2.ᵔᵖᵹᵫ;
            c4930.f18736 = AbstractC0657.m2402(view, c5270, c5270.f19917);
            C5270 c52702 = (C5270) r2.ᵜᵪʾ;
            c4930.f18738 = AbstractC0657.m2402(view, c52702, c52702.f19917);
            return;
        }
        int i = this.f403;
        C0694[] c0694Arr = (C0694[]) r1.ᵜᵪʾ;
        int[] iArr2 = c4930.f18735;
        if (iArr2 == null || iArr2.length != c0694Arr.length) {
            c4930.f18735 = new int[c0694Arr.length];
        }
        int i2 = 0;
        while (true) {
            int length = c0694Arr.length;
            iArr = c4930.f18735;
            if (i2 >= length) {
                break;
            }
            iArr[i2] = AbstractC0657.m2402(view, c0694Arr[i2], i);
            i2++;
        }
        if (i == 0) {
            c4930.f18736 = iArr[0];
        } else {
            c4930.f18738 = iArr[0];
        }
        if (this.f403 == 0) {
            C5270 c52703 = (C5270) r2.ᵜᵪʾ;
            c4930.f18738 = AbstractC0657.m2402(view, c52703, c52703.f19917);
        } else {
            C5270 c52704 = (C5270) r2.ᵔᵖᵹᵫ;
            c4930.f18736 = AbstractC0657.m2402(view, c52704, c52704.f19917);
        }
    }

    @Override // defpackage.AbstractC0421
    /* JADX INFO: renamed from: ᵧᵢᵴᵸ, reason: contains not printable characters */
    public final boolean mo311(RecyclerView recyclerView, View view, View view2) {
        if ((this.f413 & 32768) == 0 && m257(view) != -1 && (this.f413 & 35) == 0) {
            m306(view, view2, true, 0, 0);
        }
        return true;
    }

    @Override // defpackage.AbstractC0421
    /* JADX INFO: renamed from: ᵨᵣ, reason: contains not printable characters */
    public final boolean mo312() {
        return this.f403 == 0 || (!this.f406.isInTouchMode() && this.f395 > 1);
    }

    /* JADX INFO: renamed from: ᵨᵴᵚ, reason: contains not printable characters */
    public final int m313(int i) {
        int i2 = this.f434;
        if (i2 != 0) {
            return i2;
        }
        int[] iArr = this.f417;
        if (iArr == null) {
            return 0;
        }
        return iArr[i];
    }

    @Override // defpackage.AbstractC0421
    /* JADX INFO: renamed from: ᵫˈᵹ, reason: contains not printable characters */
    public final View mo314(View view, int i) {
        View viewFindNextFocus;
        View viewFindNextFocus2;
        if ((this.f413 & 32768) != 0) {
            return view;
        }
        FocusFinder focusFinder = FocusFinder.getInstance();
        if (i == 2 || i == 1) {
            if (mo333()) {
                viewFindNextFocus = focusFinder.findNextFocus(this.f406, view, i == 2 ? 130 : 33);
            } else {
                viewFindNextFocus = null;
            }
            if (mo312()) {
                viewFindNextFocus2 = focusFinder.findNextFocus(this.f406, view, (this.f2347.getLayoutDirection() == 1) ^ (i == 2) ? 66 : 17);
            } else {
                viewFindNextFocus2 = viewFindNextFocus;
            }
        } else {
            viewFindNextFocus2 = focusFinder.findNextFocus(this.f406, view, i);
        }
        if (viewFindNextFocus2 != null) {
            return viewFindNextFocus2;
        }
        int descendantFocusability = this.f406.getDescendantFocusability();
        AbstractC0650 abstractC0650 = this.f406;
        if (descendantFocusability == 393216) {
            return abstractC0650.getParent().focusSearch(view, i);
        }
        int iM276 = m276(i);
        boolean z = abstractC0650.getScrollState() != 0;
        if (iM276 == 1) {
            if (z || (this.f413 & 4096) == 0) {
                viewFindNextFocus2 = view;
            }
            if ((this.f413 & 131072) != 0 && !m261()) {
                m291(true);
                viewFindNextFocus2 = view;
            }
        } else if (iM276 == 0) {
            if (z || (this.f413 & 2048) == 0) {
                viewFindNextFocus2 = view;
            }
            if ((this.f413 & 131072) != 0 && m1788() != 0 && this.f406.m583(0) == null) {
                m291(false);
                viewFindNextFocus2 = view;
            }
        } else if (iM276 == 3) {
        }
        if (viewFindNextFocus2 != null) {
            return viewFindNextFocus2;
        }
        View viewFocusSearch = this.f406.getParent().focusSearch(view, i);
        return viewFocusSearch != null ? viewFocusSearch : view != null ? view : this.f406;
    }

    @Override // defpackage.AbstractC0421
    /* JADX INFO: renamed from: ᵬᵦˋ, reason: contains not printable characters */
    public final void mo315() {
        this.f396 = 0;
        C1935 c1935 = (C1935) this.f411.f13946;
        if (c1935 != null) {
            c1935.m5175(-1);
        }
    }

    /* JADX WARN: Removed duplicated region for block: B:104:0x01f4  */
    /* JADX WARN: Removed duplicated region for block: B:138:0x0368 A[LOOP:3: B:137:0x0366->B:138:0x0368, LOOP_END] */
    /* JADX WARN: Removed duplicated region for block: B:141:0x0385  */
    /* JADX WARN: Removed duplicated region for block: B:142:0x0388  */
    /* JADX WARN: Removed duplicated region for block: B:145:0x0390  */
    /* JADX WARN: Removed duplicated region for block: B:156:0x03b4  */
    /* JADX WARN: Removed duplicated region for block: B:242:0x04d3  */
    /* JADX WARN: Removed duplicated region for block: B:355:0x06bc A[PHI: r2
      0x06bc: PHI (r2v40 int) = (r2v39 int), (r2v39 int), (r2v38 int), (r2v38 int) binds: [B:357:0x06c4, B:359:0x06ce, B:351:0x06ae, B:353:0x06b9] A[DONT_GENERATE, DONT_INLINE]] */
    /* JADX WARN: Removed duplicated region for block: B:380:0x0503 A[SYNTHETIC] */
    /* JADX WARN: Removed duplicated region for block: B:383:0x046d A[ADDED_TO_REGION, REMOVE, SYNTHETIC] */
    @Override // defpackage.AbstractC0421
    /* JADX INFO: renamed from: ᵮᵟᵡ, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final void mo316(C2772 c2772, C1499 c1499) {
        AbstractC5529 c0120;
        boolean z;
        int i;
        int i2;
        SparseIntArray sparseIntArray;
        View view;
        int i3;
        int i4;
        int i5;
        boolean z2;
        View viewMo504;
        View viewMo5042;
        AbstractC5529 abstractC5529;
        int left;
        int right;
        int top;
        int i6;
        List list;
        int size;
        SparseIntArray sparseIntArray2;
        int i7;
        int i8;
        int i9;
        int i10;
        int i11;
        int i12;
        int i13;
        ᵾːʿ r8;
        int i14;
        AbstractC5529 abstractC55292;
        int i15;
        ᵾːʿ r5;
        if (this.f395 != 0 && c1499.m4296() >= 0) {
            if ((this.f413 & 64) != 0 && m1795() > 0) {
                this.f413 |= 128;
                return;
            }
            int i16 = this.f413;
            if ((i16 & 512) == 0) {
                this.f421 = null;
                this.f417 = null;
                this.f413 = i16 & (-1025);
                mo299(c2772);
                return;
            }
            boolean z3 = true;
            this.f413 = (i16 & (-4)) | 1;
            m320(c2772, c1499);
            int iMax = Integer.MIN_VALUE;
            if (c1499.f6055) {
                m318();
                int iM1795 = m1795();
                if (this.f421 != null && iM1795 > 0) {
                    int i17 = this.f406.m577(m1798(0)).f18243;
                    int i18 = this.f406.m577(m1798(iM1795 - 1)).f18243;
                    int i19 = Integer.MAX_VALUE;
                    for (int i20 = 0; i20 < iM1795; i20++) {
                        View viewM1798 = m1798(i20);
                        C4930 c4930 = (C4930) viewM1798.getLayoutParams();
                        this.f406.getClass();
                        int iM534 = RecyclerView.m534(viewM1798);
                        if (c4930.f20074.m9989() || c4930.f20074.m9995() || viewM1798.isLayoutRequested() || ((!viewM1798.hasFocus() && this.f393 == c4930.f20074.m9984()) || ((viewM1798.hasFocus() && this.f393 != c4930.f20074.m9984()) || iM534 < i17 || iM534 > i18))) {
                            int iMin = Math.min(i19, this.f414.mo1729(viewM1798));
                            iMax = Math.max(iMax, this.f414.mo1724(viewM1798));
                            i19 = iMin;
                        }
                    }
                    if (iMax > i19) {
                        this.f419 = iMax - i19;
                    }
                    m325();
                    m305();
                }
                this.f413 &= -4;
                m301();
                return;
            }
            boolean z4 = c1499.f6056;
            SparseIntArray sparseIntArray3 = this.f431;
            if (z4) {
                sparseIntArray3.clear();
                int iM17952 = m1795();
                for (int i21 = 0; i21 < iM17952; i21++) {
                    int i22 = this.f406.m577(m1798(i21)).f18243;
                    if (i22 >= 0 && (r5 = this.f421.mo1219(i22)) != null) {
                        sparseIntArray3.put(i22, r5.ᵜᵪʾ);
                    }
                }
            }
            int i23 = this.f393;
            if (i23 != -1 && (i15 = this.f396) != Integer.MIN_VALUE) {
                this.f393 = i23 + i15;
                this.f427 = 0;
            }
            this.f396 = 0;
            View viewMo5043 = mo504(this.f393);
            int i24 = this.f393;
            int i25 = this.f427;
            boolean zHasFocus = this.f406.hasFocus();
            AbstractC5529 abstractC55293 = this.f421;
            int i26 = abstractC55293 != null ? abstractC55293.f20869 : -1;
            int i27 = abstractC55293 != null ? abstractC55293.f20866 : -1;
            int i28 = this.f403;
            int i29 = c1499.f6051;
            int i30 = c1499.f6049;
            if (i28 != 0) {
                i30 = i29;
                i29 = i30;
            }
            int iM4296 = this.f412.m4296();
            if (iM4296 == 0) {
                this.f393 = -1;
                this.f427 = 0;
            } else {
                int i31 = this.f393;
                if (i31 >= iM4296) {
                    this.f393 = iM4296 - 1;
                    this.f427 = 0;
                } else if (i31 == -1 && iM4296 > 0) {
                    this.f393 = 0;
                    this.f427 = 0;
                }
            }
            boolean z5 = this.f412.f6059;
            C4055 c4055 = this.f428;
            if (z5 || (abstractC55292 = this.f421) == null || abstractC55292.f20869 < 0 || (this.f413 & 256) != 0 || abstractC55292.f20864 != this.f395) {
                int i32 = this.f413;
                this.f413 = i32 & (-257);
                AbstractC5529 abstractC55294 = this.f421;
                if (abstractC55294 == null || this.f395 != abstractC55294.f20864) {
                    int i33 = this.f395;
                    if (i33 == 1) {
                        c0120 = new C0120();
                    } else {
                        C0832 c0832 = new C0832();
                        c0832.f3723 = new C4349(64);
                        c0832.f3724 = -1;
                        c0832.m11155(i33);
                        c0120 = c0832;
                    }
                    this.f421 = c0120;
                    c0120.f20861 = this.f416;
                    c0120.f20863 = (this.f413 & 262144) != 0;
                    C2918 c2918 = (C2918) c4055.f15559;
                    C2918 c29182 = (C2918) c4055.f15558;
                    c2918.f11224 = Integer.MIN_VALUE;
                    c2918.f11230 = Integer.MAX_VALUE;
                    C2918 c29183 = (C2918) c4055.f15557;
                    c29183.f11234 = this.f2349;
                    c29182.f11234 = this.f2353;
                    int iM1784 = m1784();
                    int iM1792 = m1792();
                    c29183.f11229 = iM1784;
                    c29183.f11232 = iM1792;
                    int iM1791 = m1791();
                    int iM1786 = m1786();
                    c29182.f11229 = iM1791;
                    c29182.f11232 = iM1786;
                    this.f410 = ((C2918) c4055.f15559).f11234;
                    this.f407 = 0;
                    m281();
                    this.f421.f20867 = this.f425;
                    m1806(this.f400);
                    this.f421.m11153();
                    C2918 c29184 = (C2918) c4055.f15559;
                    c29184.f11224 = Integer.MIN_VALUE;
                    c29184.f11233 = Integer.MIN_VALUE;
                    c29184.f11230 = Integer.MAX_VALUE;
                    c29184.f11226 = Integer.MAX_VALUE;
                    z = false;
                } else {
                    if (((i32 & 262144) != 0) != abstractC55294.f20863) {
                    }
                    C2918 c29185 = (C2918) c4055.f15559;
                    C2918 c291822 = (C2918) c4055.f15558;
                    c29185.f11224 = Integer.MIN_VALUE;
                    c29185.f11230 = Integer.MAX_VALUE;
                    C2918 c291832 = (C2918) c4055.f15557;
                    c291832.f11234 = this.f2349;
                    c291822.f11234 = this.f2353;
                    int iM17842 = m1784();
                    int iM17922 = m1792();
                    c291832.f11229 = iM17842;
                    c291832.f11232 = iM17922;
                    int iM17912 = m1791();
                    int iM17862 = m1786();
                    c291822.f11229 = iM17912;
                    c291822.f11232 = iM17862;
                    this.f410 = ((C2918) c4055.f15559).f11234;
                    this.f407 = 0;
                    m281();
                    this.f421.f20867 = this.f425;
                    m1806(this.f400);
                    this.f421.m11153();
                    C2918 c291842 = (C2918) c4055.f15559;
                    c291842.f11224 = Integer.MIN_VALUE;
                    c291842.f11233 = Integer.MIN_VALUE;
                    c291842.f11230 = Integer.MAX_VALUE;
                    c291842.f11226 = Integer.MAX_VALUE;
                    z = false;
                }
            } else {
                C2918 c29186 = (C2918) c4055.f15557;
                C2918 c29187 = (C2918) c4055.f15558;
                c29186.f11234 = this.f2349;
                c29187.f11234 = this.f2353;
                int iM17843 = m1784();
                int iM17923 = m1792();
                c29186.f11229 = iM17843;
                c29186.f11232 = iM17923;
                int iM17913 = m1791();
                int iM17863 = m1786();
                c29187.f11229 = iM17913;
                c29187.f11232 = iM17863;
                this.f410 = ((C2918) c4055.f15559).f11234;
                m281();
                this.f421.f20867 = this.f425;
                z = true;
            }
            if (z) {
                this.f413 |= 4;
                this.f421.f20868 = this.f393;
                int iM17953 = m1795();
                int i34 = this.f421.f20869;
                this.f413 &= -9;
                int i35 = i34;
                int i36 = 0;
                while (i36 < iM17953) {
                    View viewM17982 = m1798(i36);
                    boolean z6 = z3;
                    if (i35 == m257(viewM17982) && (r8 = this.f421.mo1219(i35)) != null) {
                        int i37 = i25;
                        int iM326 = (m326(r8.ᵜᵪʾ) + ((C2918) c4055.f15560).f11229) - this.f407;
                        int iMo1729 = this.f414.mo1729(viewM17982);
                        C4055 c40552 = c4055;
                        int iM334 = m334(viewM17982);
                        C4930 c49302 = (C4930) viewM17982.getLayoutParams();
                        i11 = iM17953;
                        if ((c49302.f20074.f18238 & 2) != 0) {
                            this.f413 |= 8;
                            int i38 = c49302.f18734;
                            i14 = i27;
                            m1802(this.f400, this.f2356.m5729(viewM17982), viewM17982);
                            viewM17982 = m260(i35);
                            ((C4930) viewM17982.getLayoutParams()).f18734 = i38;
                            m1781(i36, viewM17982, false);
                        } else {
                            i14 = i27;
                        }
                        View view2 = viewM17982;
                        m270(view2);
                        int iM256 = this.f403 == 0 ? m256(view2) : m255(view2);
                        int i39 = iMo1729 + iM256;
                        int i40 = iM256;
                        int i41 = r8.ᵜᵪʾ;
                        view = viewMo5043;
                        i = i37;
                        i2 = i14;
                        i5 = i26;
                        i3 = i24;
                        i12 = i36;
                        sparseIntArray = sparseIntArray3;
                        i4 = 4;
                        m323(view2, i41, iMo1729, i39, iM326);
                        if (iM334 != i40) {
                            int i42 = this.f421.f20866;
                            for (i13 = i11 - 1; i13 >= i12; i13--) {
                                View viewM17983 = m1798(i13);
                                m1802(this.f400, this.f2356.m5729(viewM17983), viewM17983);
                            }
                            this.f421.mo2966(i35);
                            z2 = m1795() != 0 ? z6 : false;
                            if ((this.f413 & 65536) == 0) {
                                m325();
                                int i43 = this.f393;
                                if (i43 >= 0 && i43 <= i42) {
                                    while (true) {
                                        AbstractC5529 abstractC55295 = this.f421;
                                        if (abstractC55295.f20866 >= this.f393) {
                                            break;
                                        }
                                        boolean z7 = z6;
                                        abstractC55295.mo1220(abstractC55295.f20863 ? Integer.MAX_VALUE : Integer.MIN_VALUE, z7);
                                        z6 = z7;
                                    }
                                }
                            } else {
                                boolean z8 = z6;
                                while (true) {
                                    AbstractC5529 abstractC55296 = this.f421;
                                    if (!abstractC55296.mo1220(abstractC55296.f20863 ? Integer.MAX_VALUE : Integer.MIN_VALUE, z8) || this.f421.f20866 >= i42) {
                                        break;
                                    } else {
                                        z8 = true;
                                    }
                                }
                            }
                            m324();
                            m281();
                        } else {
                            i36 = i12 + 1;
                            i35++;
                            i27 = i2;
                            i26 = i5;
                            i24 = i3;
                            sparseIntArray3 = sparseIntArray;
                            c4055 = c40552;
                            iM17953 = i11;
                            i25 = i;
                            z3 = true;
                            viewMo5043 = view;
                        }
                    } else {
                        i = i25;
                        i11 = iM17953;
                        i2 = i27;
                        sparseIntArray = sparseIntArray3;
                        view = viewMo5043;
                        i3 = i24;
                        i4 = 4;
                        i5 = i26;
                        i12 = i36;
                        int i422 = this.f421.f20866;
                        while (i13 >= i12) {
                        }
                        this.f421.mo2966(i35);
                        if (m1795() != 0) {
                        }
                        if ((this.f413 & 65536) == 0) {
                        }
                        m324();
                        m281();
                    }
                }
                i = i25;
                i2 = i27;
                sparseIntArray = sparseIntArray3;
                view = viewMo5043;
                i3 = i24;
                i4 = 4;
                i5 = i26;
                z2 = false;
                m324();
                m281();
            } else {
                i = i25;
                i2 = i27;
                sparseIntArray = sparseIntArray3;
                view = viewMo5043;
                i3 = i24;
                i4 = 4;
                i5 = i26;
                z2 = false;
            }
            boolean z9 = !m1785() && (this.f413 & 1048576) == 0 && (!this.f406.isInTouchMode() || this.f394 == i4 || !z || z2);
            if (!z) {
                int i44 = this.f413;
                this.f413 = i44 & (-5);
                this.f413 = (i44 & (-21)) | (z9 ? 16 : 0);
                if (!z9 || (i5 >= 0 && (i10 = this.f393) <= i2 && i10 >= i5)) {
                    i8 = i2;
                    i9 = i5;
                } else {
                    i9 = this.f393;
                    i8 = i9;
                }
                this.f421.f20868 = i9;
                if (i8 != -1) {
                    do {
                        AbstractC5529 abstractC55297 = this.f421;
                        if (!abstractC55297.mo1220(abstractC55297.f20863 ? Integer.MAX_VALUE : Integer.MIN_VALUE, true)) {
                            break;
                        }
                    } while (mo504(i8) == null);
                }
            }
            while (true) {
                m324();
                AbstractC5529 abstractC55298 = this.f421;
                int i45 = abstractC55298.f20869;
                int i46 = abstractC55298.f20866;
                int i47 = -i29;
                int i48 = -i30;
                int i49 = this.f393;
                if (i49 != -1) {
                    viewMo504 = mo504(i49);
                    if (viewMo504 == null || (!viewMo504.hasFocus() && !viewMo504.hasFocusable())) {
                    }
                    if (viewMo504 != null) {
                        if (z9) {
                            m306(viewMo504, viewMo504.findFocus(), false, i47, i48);
                        }
                        if (zHasFocus && !viewMo504.hasFocus()) {
                            viewMo504.requestFocus();
                        }
                        if (!zHasFocus && !this.f406.hasFocus()) {
                            this.f406.focusableViewAvailable(viewMo504);
                        }
                    }
                    m325();
                    m305();
                    abstractC5529 = this.f421;
                    if (abstractC5529.f20869 == i45 && abstractC5529.f20866 == i46) {
                        break;
                    }
                } else {
                    viewMo504 = null;
                }
                int i50 = this.f393;
                do {
                    i50++;
                    if (i50 < m1788() && (viewMo5042 = mo504(i50)) != null) {
                        if (viewMo5042.hasFocus()) {
                            break;
                        }
                    } else {
                        for (int i51 = this.f393 - 1; i51 >= 0; i51--) {
                            viewMo5042 = mo504(i51);
                            if (viewMo5042 == null) {
                                break;
                            } else if (!viewMo5042.hasFocusable()) {
                            }
                        }
                        if (viewMo504 != null) {
                        }
                        m325();
                        m305();
                        abstractC5529 = this.f421;
                        if (abstractC5529.f20869 == i45) {
                        }
                    }
                } while (!viewMo5042.hasFocusable());
                viewMo504 = viewMo5042;
                if (viewMo504 != null) {
                }
                m325();
                m305();
                abstractC5529 = this.f421;
                if (abstractC5529.f20869 == i45) {
                }
            }
            m302();
            m275();
            if (c1499.f6056 && (size = (list = this.f400.f10662).size()) != 0) {
                int[] iArr = this.f432;
                if (iArr == null || size > iArr.length) {
                    int length = iArr == null ? 16 : iArr.length;
                    while (length < size) {
                        length <<= 1;
                    }
                    this.f432 = new int[length];
                }
                int i52 = 0;
                for (int i53 = 0; i53 < size; i53++) {
                    int iM9984 = ((AbstractC4793) list.get(i53)).m9984();
                    if (iM9984 >= 0) {
                        this.f432[i52] = iM9984;
                        i52++;
                    }
                }
                if (i52 > 0) {
                    Arrays.sort(this.f432, 0, i52);
                    AbstractC5529 abstractC55299 = this.f421;
                    int[] iArr2 = this.f432;
                    Object[] objArr = abstractC55299.f20865;
                    Object[] objArr2 = abstractC55299.f20865;
                    int i54 = abstractC55299.f20866;
                    int iBinarySearch = i54 >= 0 ? Arrays.binarySearch(iArr2, 0, i52, i54) : 0;
                    if (iBinarySearch < 0) {
                        int i55 = (-iBinarySearch) - 1;
                        boolean z10 = abstractC55299.f20863;
                        ᵟˑʽ r9 = abstractC55299.f20861;
                        int i56 = z10 ? (r9.ᵶᵥᵝ(i54) - abstractC55299.f20861.ᵮᵣᵗˈ(i54)) - abstractC55299.f20867 : abstractC55299.f20867 + abstractC55299.f20861.ᵮᵣᵗˈ(i54) + r9.ᵶᵥᵝ(i54);
                        while (i55 < i52) {
                            int i57 = iArr2[i55];
                            SparseIntArray sparseIntArray4 = sparseIntArray;
                            int i58 = sparseIntArray4.get(i57);
                            if (i58 < 0) {
                                i58 = 0;
                            }
                            int i59 = abstractC55299.f20861.ˊᵫᵗ(i57, -1, true, objArr2, true);
                            int i60 = i56;
                            abstractC55299.f20861.ːˏᵟᵯ(objArr[0], i57, i59, i58, i60);
                            boolean z11 = abstractC55299.f20863;
                            int i61 = abstractC55299.f20867;
                            i56 = z11 ? (i60 - i59) - i61 : i60 + i59 + i61;
                            i55++;
                            sparseIntArray = sparseIntArray4;
                        }
                        sparseIntArray2 = sparseIntArray;
                        i7 = 0;
                        objArr[0] = null;
                    } else {
                        sparseIntArray2 = sparseIntArray;
                        i7 = 0;
                    }
                    int i62 = abstractC55299.f20869;
                    int iBinarySearch2 = i62 >= 0 ? Arrays.binarySearch(iArr2, i7, i52, i62) : 0;
                    if (iBinarySearch2 < 0) {
                        int i63 = (-iBinarySearch2) - 2;
                        boolean z12 = abstractC55299.f20863;
                        ᵟˑʽ r82 = abstractC55299.f20861;
                        int i64 = z12 ? r82.ᵶᵥᵝ(i62) : r82.ᵶᵥᵝ(i62);
                        while (i63 >= 0) {
                            int i65 = iArr2[i63];
                            int i66 = sparseIntArray2.get(i65);
                            if (i66 < 0) {
                                i66 = 0;
                            }
                            int i67 = abstractC55299.f20861.ˊᵫᵗ(i65, -1, false, objArr2, true);
                            boolean z13 = abstractC55299.f20863;
                            int i68 = abstractC55299.f20867;
                            int i69 = z13 ? i64 + i68 + i67 : (i64 - i68) - i67;
                            abstractC55299.f20861.ːˏᵟᵯ(objArr[0], i65, i67, i66, i69);
                            i63--;
                            i64 = i69;
                        }
                        objArr[0] = null;
                    }
                } else {
                    sparseIntArray2 = sparseIntArray;
                }
                sparseIntArray2.clear();
            }
            int i70 = this.f413;
            if ((i70 & 1024) != 0) {
                this.f413 = i70 & (-1025);
            } else {
                m274();
            }
            if (((this.f413 & i4) != 0 && ((i6 = this.f393) != i3 || this.f427 != i || mo504(i6) != view || (this.f413 & 8) != 0)) || (this.f413 & 20) == 16) {
                m272();
            }
            m288();
            int i71 = this.f413;
            if ((i71 & 64) != 0) {
                if (this.f403 == 1) {
                    right = -this.f2353;
                    if (m1795() > 0 && (top = m1798(0).getTop()) < 0) {
                        right += top;
                    }
                } else {
                    int i72 = i71 & 262144;
                    int i73 = this.f2349;
                    if (i72 == 0) {
                        i73 = -i73;
                        if (m1795() > 0 && (left = m1798(0).getLeft()) < 0) {
                            right = left + i73;
                        }
                    } else if (m1795() <= 0 || (right = m1798(0).getRight()) <= i73) {
                        right = i73;
                    }
                }
                m309(right);
            }
            this.f413 &= -4;
            m301();
        }
    }

    @Override // defpackage.AbstractC0421
    /* JADX INFO: renamed from: ᵯˇ, reason: contains not printable characters */
    public final void mo317(C2772 c2772, C1499 c1499, int i, int i2) {
        int size;
        int size2;
        int mode;
        int iM1784;
        int iM1792;
        int iM259;
        m320(c2772, c1499);
        if (this.f403 == 0) {
            size2 = View.MeasureSpec.getSize(i);
            size = View.MeasureSpec.getSize(i2);
            mode = View.MeasureSpec.getMode(i2);
            iM1784 = m1791();
            iM1792 = m1786();
        } else {
            size = View.MeasureSpec.getSize(i);
            size2 = View.MeasureSpec.getSize(i2);
            mode = View.MeasureSpec.getMode(i);
            iM1784 = m1784();
            iM1792 = m1792();
        }
        int i3 = iM1792 + iM1784;
        this.f392 = size;
        int i4 = this.f422;
        if (i4 == -2) {
            int i5 = this.f415;
            if (i5 == 0) {
                i5 = 1;
            }
            this.f395 = i5;
            this.f434 = 0;
            int[] iArr = this.f417;
            if (iArr == null || iArr.length != i5) {
                this.f417 = new int[i5];
            }
            if (this.f412.f6055) {
                m318();
            }
            m329(true);
            if (mode == Integer.MIN_VALUE) {
                size = Math.min(m259() + i3, this.f392);
            } else if (mode == 0) {
                iM259 = m259();
                size = iM259 + i3;
            } else {
                if (mode != 1073741824) {
                    ᵕᵩʽᵲ.ᵪᵹᵥᵻ("wrong spec");
                    return;
                }
                size = this.f392;
            }
        } else {
            if (mode != Integer.MIN_VALUE) {
                if (mode == 0) {
                    if (i4 == 0) {
                        i4 = size - i3;
                    }
                    this.f434 = i4;
                    int i6 = this.f415;
                    if (i6 == 0) {
                        i6 = 1;
                    }
                    this.f395 = i6;
                    iM259 = ((i6 - 1) * this.f405) + (i4 * i6);
                    size = iM259 + i3;
                } else if (mode != 1073741824) {
                    ᵕᵩʽᵲ.ᵪᵹᵥᵻ("wrong spec");
                    return;
                }
            }
            int i7 = this.f415;
            if (i7 == 0 && i4 == 0) {
                this.f395 = 1;
                this.f434 = size - i3;
            } else if (i7 == 0) {
                this.f434 = i4;
                int i8 = this.f405;
                this.f395 = (size + i8) / (i4 + i8);
            } else if (i4 == 0) {
                this.f395 = i7;
                this.f434 = ((size - i3) - ((i7 - 1) * this.f405)) / i7;
            } else {
                this.f395 = i7;
                this.f434 = i4;
            }
            if (mode == Integer.MIN_VALUE) {
                int i9 = this.f434;
                int i10 = this.f395;
                int i11 = ((i10 - 1) * this.f405) + (i9 * i10) + i3;
                if (i11 < size) {
                    size = i11;
                }
            }
        }
        int i12 = this.f403;
        RecyclerView recyclerView = this.f2347;
        if (i12 == 0) {
            recyclerView.setMeasuredDimension(size2, size);
        } else {
            recyclerView.setMeasuredDimension(size, size2);
        }
        m301();
    }

    /* JADX INFO: renamed from: ᵯˑᵰ, reason: contains not printable characters */
    public final void m318() {
        if (m1795() <= 0) {
            this.f424 = 0;
        } else {
            this.f424 = this.f421.f20869 - ((C4930) m1798(0).getLayoutParams()).f20074.m9999();
        }
    }

    @Override // defpackage.AbstractC0421
    /* JADX INFO: renamed from: ᵯᵷʽ, reason: contains not printable characters */
    public final int mo319(C2772 c2772, C1499 c1499) {
        AbstractC5529 abstractC5529;
        return (this.f403 != 1 || (abstractC5529 = this.f421) == null) ? super.mo319(c2772, c1499) : abstractC5529.f20864;
    }

    /* JADX INFO: renamed from: ᵱˈᵰˊ, reason: contains not printable characters */
    public final void m320(C2772 c2772, C1499 c1499) {
        int i = this.f408;
        if (i == 0) {
            this.f400 = c2772;
            this.f412 = c1499;
            this.f424 = 0;
            this.f419 = 0;
        }
        this.f408 = i + 1;
    }

    @Override // defpackage.AbstractC0421
    /* JADX INFO: renamed from: ᵱᵭ, reason: contains not printable characters */
    public final void mo321(int i) {
        int i2;
        int i3;
        int iMo1221;
        if (i == 1) {
            this.f413 |= 1048576;
            if (this.f394 == 4) {
                if (this.f420 == null) {
                    C1612 c1612 = new C1612();
                    c1612.f6458 = 0;
                    c1612.f6456 = 0;
                    c1612.f6459 = -1;
                    this.f420 = c1612;
                }
                C1612 c16122 = this.f420;
                AbstractC0650 abstractC0650 = this.f406;
                AbstractC0650 abstractC06502 = c16122.f6457;
                if (abstractC06502 != abstractC0650) {
                    if (abstractC06502 != null) {
                        abstractC06502.setOnFlingListener(null);
                        c16122.f6457 = null;
                    }
                    if (abstractC0650.getOnFlingListener() == null) {
                        c16122.f6457 = abstractC0650;
                        abstractC0650.setOnFlingListener(c16122);
                        c16122.f6454 = new Scroller(c16122.f6457.getContext(), new DecelerateInterpolator());
                    }
                }
                C1612 c16123 = this.f420;
                c16123.f6458 = 0;
                c16123.f6456 = 0;
                c16123.f6459 = this.f393;
                c16123.f6455 = false;
                return;
            }
            return;
        }
        if (i == 0) {
            int i4 = this.f413;
            if ((i4 & 1048576) == 1048576) {
                this.f413 = i4 & (-1048577);
                if (this.f394 == 4) {
                    C1612 c16124 = this.f420;
                    c16124.getClass();
                    int i5 = this.f393;
                    if (!c16124.f6455 && i5 == (i2 = c16124.f6459) && i2 != -1 && ((i3 = c16124.f6458) == 1 || i3 == -1)) {
                        if (c16124.f6456 > Math.max(ViewConfiguration.get(r6).getScaledTouchSlop() * 2.0f, c16124.f6457.getContext().getResources().getDisplayMetrics().density * 16.0f) && (iMo1221 = this.f421.mo1221(i5, m1788(), c16124.f6458)) != -1) {
                            i5 = iMo1221;
                        }
                    }
                    this.f393 = i5;
                }
                m272();
                m288();
                if (this.f394 == 4) {
                    C1612 c16125 = this.f420;
                    c16125.f6455 = false;
                    AbstractC0650 abstractC06503 = c16125.f6457;
                    if (abstractC06503 != null) {
                        abstractC06503.setOnFlingListener(null);
                        c16125.f6457 = null;
                    }
                    m292(this.f393, 0, true);
                }
            }
        }
    }

    @Override // defpackage.AbstractC0421
    /* JADX INFO: renamed from: ᵱᵽʡᵚ, reason: contains not printable characters */
    public final void mo322(int i, C0807 c0807) {
        int i2 = this.f406.f3044;
        if (i == 0 || i2 == 0) {
            return;
        }
        int iMax = Math.max(0, Math.min(this.f393 - ((i2 - 1) / 2), i - i2));
        for (int i3 = iMax; i3 < i && i3 < iMax + i2; i3++) {
            c0807.m2917(i3, 0);
        }
    }

    /* JADX INFO: renamed from: ᵳˉᵴˆ, reason: contains not printable characters */
    public final void m323(View view, int i, int i2, int i3, int i4) {
        int iM313;
        int i5;
        int iM255 = this.f403 == 0 ? m255(view) : m256(view);
        if (((C4930) view.getLayoutParams()).f18734 == -1) {
            iM255 = this.f392;
            i4 = 0;
        } else if (((C4930) view.getLayoutParams()).f18734 == 1) {
            int i6 = this.f434;
            if (i6 > 0) {
                iM255 = Math.min(iM255, i6);
            }
            int i7 = this.f397;
            int i8 = i7 & 112;
            int absoluteGravity = (this.f413 & 786432) != 0 ? Gravity.getAbsoluteGravity(i7 & 8388615, 1) : i7 & 7;
            int i9 = this.f403;
            if ((i9 != 0 || i8 != 48) && (i9 != 1 || absoluteGravity != 3)) {
                if ((i9 == 0 && i8 == 80) || (i9 == 1 && absoluteGravity == 5)) {
                    iM313 = m313(i) - iM255;
                } else if ((i9 == 0 && i8 == 16) || (i9 == 1 && absoluteGravity == 1)) {
                    iM313 = (m313(i) - iM255) / 2;
                }
                i4 += iM313;
            }
        }
        if (this.f403 == 0) {
            i5 = iM255 + i4;
        } else {
            int i10 = iM255 + i4;
            int i11 = i4;
            i4 = i2;
            i2 = i11;
            i5 = i3;
            i3 = i10;
        }
        C4930 c4930 = (C4930) view.getLayoutParams();
        AbstractC0421.m1775(view, i2, i4, i3, i5);
        Rect rect = f390;
        super.mo273(view, rect);
        int i12 = i2 - rect.left;
        int i13 = i4 - rect.top;
        int i14 = rect.right - i3;
        int i15 = rect.bottom - i5;
        c4930.f18740 = i12;
        c4930.f18737 = i13;
        c4930.f18732 = i14;
        c4930.f18739 = i15;
        m310(view);
    }

    /* JADX INFO: renamed from: ᵴʠˀˏ, reason: contains not printable characters */
    public final void m324() {
        int i;
        int i2;
        int iM4296;
        int iM42962;
        int i3;
        int i4;
        int top;
        int i5;
        int top2;
        int i6;
        if (this.f412.m4296() == 0) {
            return;
        }
        int i7 = this.f413 & 262144;
        AbstractC5529 abstractC5529 = this.f421;
        if (i7 == 0) {
            i = abstractC5529.f20866;
            iM42962 = this.f412.m4296() - 1;
            i2 = this.f421.f20869;
            iM4296 = 0;
        } else {
            i = abstractC5529.f20869;
            i2 = abstractC5529.f20866;
            iM4296 = this.f412.m4296() - 1;
            iM42962 = 0;
        }
        if (i < 0 || i2 < 0) {
            return;
        }
        boolean z = i == iM42962;
        boolean z2 = i2 == iM4296;
        int iM11156 = Integer.MIN_VALUE;
        int iM11154 = Integer.MAX_VALUE;
        C4055 c4055 = this.f428;
        if (!z) {
            C2918 c2918 = (C2918) c4055.f15559;
            if (c2918.f11230 == Integer.MAX_VALUE && !z2 && c2918.f11224 == Integer.MIN_VALUE) {
                return;
            }
        }
        int[] iArr = f391;
        if (z) {
            iM11154 = this.f421.m11154(iArr);
            View viewMo504 = mo504(iArr[1]);
            if (this.f403 == 0) {
                C4930 c4930 = (C4930) viewMo504.getLayoutParams();
                c4930.getClass();
                top2 = viewMo504.getLeft() + c4930.f18740;
                i6 = c4930.f18736;
            } else {
                C4930 c49302 = (C4930) viewMo504.getLayoutParams();
                c49302.getClass();
                top2 = viewMo504.getTop() + c49302.f18737;
                i6 = c49302.f18738;
            }
            int i8 = top2 + i6;
            int[] iArr2 = ((C4930) viewMo504.getLayoutParams()).f18735;
            i3 = (iArr2 == null || iArr2.length <= 0) ? i8 : (iArr2[iArr2.length - 1] - iArr2[0]) + i8;
        } else {
            i3 = Integer.MAX_VALUE;
        }
        if (z2) {
            iM11156 = this.f421.m11156(iArr);
            View viewMo5042 = mo504(iArr[1]);
            if (this.f403 == 0) {
                C4930 c49303 = (C4930) viewMo5042.getLayoutParams();
                c49303.getClass();
                top = viewMo5042.getLeft() + c49303.f18740;
                i5 = c49303.f18736;
            } else {
                C4930 c49304 = (C4930) viewMo5042.getLayoutParams();
                c49304.getClass();
                top = viewMo5042.getTop() + c49304.f18737;
                i5 = c49304.f18738;
            }
            i4 = top + i5;
        } else {
            i4 = Integer.MIN_VALUE;
        }
        ((C2918) c4055.f15559).m6983(iM11156, iM11154, i4, i3);
    }

    /* JADX INFO: renamed from: ᵴˀᵰʒ, reason: contains not printable characters */
    public final void m325() {
        this.f421.mo1220((this.f413 & 262144) != 0 ? (-this.f402) - this.f419 : this.f410 + this.f402 + this.f419, false);
    }

    /* JADX INFO: renamed from: ᵴˑʤᵷ, reason: contains not printable characters */
    public final int m326(int i) {
        int iM313 = 0;
        if ((this.f413 & 524288) != 0) {
            for (int i2 = this.f395 - 1; i2 > i; i2--) {
                iM313 += m313(i2) + this.f405;
            }
            return iM313;
        }
        int iM3132 = 0;
        while (iM313 < i) {
            iM3132 += m313(iM313) + this.f405;
            iM313++;
        }
        return iM3132;
    }

    @Override // defpackage.AbstractC0421
    /* JADX INFO: renamed from: ᵵᵸᵕᵸ, reason: contains not printable characters */
    public final void mo327(int i, int i2) {
        AbstractC5529 abstractC5529;
        int i3;
        int i4 = this.f393;
        if (i4 != -1 && (abstractC5529 = this.f421) != null && abstractC5529.f20869 >= 0 && (i3 = this.f396) != Integer.MIN_VALUE && i <= i4 + i3) {
            this.f396 = i3 + i2;
        }
        C1935 c1935 = (C1935) this.f411.f13946;
        if (c1935 != null) {
            c1935.m5175(-1);
        }
    }

    @Override // defpackage.AbstractC0421
    /* JADX INFO: renamed from: ᵵᵽ, reason: contains not printable characters */
    public final boolean mo328(C5319 c5319) {
        return c5319 instanceof C4930;
    }

    /* JADX WARN: Removed duplicated region for block: B:87:0x016a  */
    /* JADX WARN: Removed duplicated region for block: B:89:0x016e  */
    /* JADX INFO: renamed from: ᵶʟ, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final boolean m329(boolean z) {
        int i;
        int i2 = 0;
        if (this.f434 != 0 || this.f417 == null) {
            return false;
        }
        AbstractC5529 abstractC5529 = this.f421;
        C3673[] c3673ArrMo1223 = abstractC5529 == null ? null : abstractC5529.mo1223(abstractC5529.f20869, abstractC5529.f20866);
        int i3 = 0;
        boolean z2 = false;
        int i4 = -1;
        while (i3 < this.f395) {
            C3673 c3673 = c3673ArrMo1223 == null ? null : c3673ArrMo1223[i3];
            int i5 = c3673 == null ? i2 : c3673.f13945 & c3673.f13947;
            int i6 = -1;
            for (int i7 = i2; i7 < i5; i7 += 2) {
                if (i7 >= 0) {
                    int i8 = c3673.f13945;
                    int i9 = c3673.f13947;
                    if (i7 < (i8 & i9)) {
                        int[] iArr = (int[]) c3673.f13946;
                        int i10 = i7 + 1;
                        if (i10 < 0 || i10 >= (i8 & i9)) {
                            throw new ArrayIndexOutOfBoundsException();
                        }
                        int i11 = iArr[i10 & i9];
                        for (int i12 = iArr[i7 & i9]; i12 <= i11; i12++) {
                            View viewMo504 = mo504(i12 - this.f424);
                            if (viewMo504 != null) {
                                if (z) {
                                    m270(viewMo504);
                                }
                                int iM255 = this.f403 == 0 ? m255(viewMo504) : m256(viewMo504);
                                if (iM255 > i6) {
                                    i6 = iM255;
                                }
                            }
                        }
                    }
                } else {
                    c3673.getClass();
                }
                throw new ArrayIndexOutOfBoundsException();
            }
            int iM4296 = this.f412.m4296();
            if (this.f406.f885 || !z || i6 >= 0 || iM4296 <= 0) {
                i = i2;
            } else if (i4 >= 0) {
                i = i2;
                if (i4 >= 0) {
                    i6 = i4;
                }
            } else {
                int i13 = this.f393;
                if (i13 < 0) {
                    i13 = i2;
                } else if (i13 >= iM4296) {
                    i13 = iM4296 - 1;
                }
                if (m1795() > 0) {
                    int iM9999 = this.f406.m577(m1798(i2)).m9999();
                    int iM99992 = this.f406.m577(m1798(m1795() - 1)).m9999();
                    if (i13 >= iM9999 && i13 <= iM99992) {
                        i13 = i13 - iM9999 <= iM99992 - i13 ? iM9999 - 1 : iM99992 + 1;
                        if (i13 < 0 && iM99992 < iM4296 - 1) {
                            i13 = iM99992 + 1;
                        } else if (i13 >= iM4296 && iM9999 > 0) {
                            i13 = iM9999 - 1;
                        }
                    }
                }
                if (i13 >= 0 && i13 < iM4296) {
                    int iMakeMeasureSpec = View.MeasureSpec.makeMeasureSpec(i2, i2);
                    int iMakeMeasureSpec2 = View.MeasureSpec.makeMeasureSpec(i2, i2);
                    View viewM6693 = this.f400.m6693(i13);
                    int[] iArr2 = this.f399;
                    if (viewM6693 != null) {
                        C4930 c4930 = (C4930) viewM6693.getLayoutParams();
                        Rect rect = f390;
                        m1807(viewM6693, rect);
                        i = i2;
                        viewM6693.measure(ViewGroup.getChildMeasureSpec(iMakeMeasureSpec, m1792() + m1784() + ((ViewGroup.MarginLayoutParams) c4930).leftMargin + ((ViewGroup.MarginLayoutParams) c4930).rightMargin + rect.left + rect.right, ((ViewGroup.MarginLayoutParams) c4930).width), ViewGroup.getChildMeasureSpec(iMakeMeasureSpec2, m1786() + m1791() + ((ViewGroup.MarginLayoutParams) c4930).topMargin + ((ViewGroup.MarginLayoutParams) c4930).bottomMargin + rect.top + rect.bottom, ((ViewGroup.MarginLayoutParams) c4930).height));
                        iArr2[i] = m256(viewM6693);
                        iArr2[1] = m255(viewM6693);
                        this.f400.m6694(viewM6693);
                    } else {
                        i = i2;
                    }
                    i4 = this.f403 == 0 ? iArr2[1] : iArr2[i];
                }
                if (i4 >= 0) {
                }
            }
            if (i6 < 0) {
                i6 = i;
            }
            int[] iArr3 = this.f417;
            if (iArr3[i3] != i6) {
                iArr3[i3] = i6;
                z2 = true;
            }
            i3++;
            i2 = i;
        }
        return z2;
    }

    @Override // defpackage.AbstractC0421
    /* JADX INFO: renamed from: ᵶˇᵱ, reason: contains not printable characters */
    public final int mo330(View view) {
        return super.mo330(view) - ((C4930) view.getLayoutParams()).f18739;
    }

    /* JADX INFO: renamed from: ᵺᵫˎ, reason: contains not printable characters */
    public final int m331(int i, boolean z) {
        ᵾːʿ r0;
        AbstractC5529 abstractC5529 = this.f421;
        if (abstractC5529 == null) {
            return i;
        }
        int i2 = this.f393;
        int i3 = (i2 == -1 || (r0 = abstractC5529.mo1219(i2)) == null) ? -1 : r0.ᵜᵪʾ;
        int iM1795 = m1795();
        View view = null;
        for (int i4 = 0; i4 < iM1795 && i != 0; i4++) {
            int i5 = i > 0 ? i4 : (iM1795 - 1) - i4;
            View viewM1798 = m1798(i5);
            if (viewM1798.getVisibility() == 0 && (!m1787() || viewM1798.hasFocusable())) {
                int iM257 = m257(m1798(i5));
                ᵾːʿ r9 = this.f421.mo1219(iM257);
                int i6 = r9 == null ? -1 : r9.ᵜᵪʾ;
                if (i3 == -1) {
                    i2 = iM257;
                    view = viewM1798;
                    i3 = i6;
                } else if (i6 == i3 && ((i > 0 && iM257 > i2) || (i < 0 && iM257 < i2))) {
                    i = i > 0 ? i - 1 : i + 1;
                    i2 = iM257;
                    view = viewM1798;
                }
            }
        }
        if (view != null) {
            if (z) {
                if (m1787()) {
                    this.f413 |= 32;
                    view.requestFocus();
                    this.f413 &= -33;
                }
                this.f393 = i2;
                this.f427 = 0;
                return i;
            }
            m308(view, true);
        }
        return i;
    }

    @Override // defpackage.AbstractC0421
    /* JADX INFO: renamed from: ᵻʽᵯ, reason: contains not printable characters */
    public final void mo332(int i, int i2, C1499 c1499, C0807 c0807) {
        try {
            m320(null, c1499);
            if (this.f403 != 0) {
                i = i2;
            }
            if (m1795() != 0 && i != 0) {
                this.f421.mo1222(i < 0 ? -this.f402 : this.f410 + this.f402, i, c0807);
                m301();
            }
        } finally {
            m301();
        }
    }

    @Override // defpackage.AbstractC0421
    /* JADX INFO: renamed from: ᵻˈᵦʼ, reason: contains not printable characters */
    public final boolean mo333() {
        return this.f403 == 1 || (!this.f406.isInTouchMode() && this.f395 > 1);
    }

    /* JADX INFO: renamed from: ᵼᵺᵬ, reason: contains not printable characters */
    public final int m334(View view) {
        Rect rect = f390;
        mo273(view, rect);
        return this.f403 == 0 ? rect.width() : rect.height();
    }
}
