package androidx.recyclerview.widget;

import android.annotation.SuppressLint;
import android.content.Context;
import android.graphics.PointF;
import android.graphics.Rect;
import android.os.Parcel;
import android.os.Parcelable;
import android.util.AttributeSet;
import android.view.View;
import android.view.ViewGroup;
import android.view.accessibility.AccessibilityEvent;
import androidx.recyclerview.widget.RecyclerView;
import java.util.List;
import p037.p041.p042.LayoutInflaterFactory2C1494;
import p037.p107.p108.AbstractC2365;
import p037.p107.p108.RunnableC2352;
import p138.p139.p143.p144.C2803;

/* JADX INFO: loaded from: classes.dex */
public class LinearLayoutManager extends RecyclerView.AbstractC0202 implements RecyclerView.AbstractC0218.InterfaceC0220 {

    /* JADX INFO: renamed from: ސ, reason: contains not printable characters */
    public int f1108;

    /* JADX INFO: renamed from: ޑ, reason: contains not printable characters */
    public C0184 f1109;

    /* JADX INFO: renamed from: ޒ, reason: contains not printable characters */
    public AbstractC2365 f1110;

    /* JADX INFO: renamed from: ޓ, reason: contains not printable characters */
    public boolean f1111;

    /* JADX INFO: renamed from: ޔ, reason: contains not printable characters */
    public boolean f1112;

    /* JADX INFO: renamed from: ޕ, reason: contains not printable characters */
    public boolean f1113;

    /* JADX INFO: renamed from: ޖ, reason: contains not printable characters */
    public boolean f1114;

    /* JADX INFO: renamed from: ޗ, reason: contains not printable characters */
    public boolean f1115;

    /* JADX INFO: renamed from: ޘ, reason: contains not printable characters */
    public int f1116;

    /* JADX INFO: renamed from: ޙ, reason: contains not printable characters */
    public int f1117;

    /* JADX INFO: renamed from: ޚ, reason: contains not printable characters */
    public C0185 f1118;

    /* JADX INFO: renamed from: ޛ, reason: contains not printable characters */
    public final C0182 f1119;

    /* JADX INFO: renamed from: ޜ, reason: contains not printable characters */
    public final C0183 f1120;

    /* JADX INFO: renamed from: ޝ, reason: contains not printable characters */
    public int f1121;

    /* JADX INFO: renamed from: ޞ, reason: contains not printable characters */
    public int[] f1122;

    /* JADX INFO: renamed from: androidx.recyclerview.widget.LinearLayoutManager$֏, reason: contains not printable characters */
    public static class C0182 {

        /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
        public AbstractC2365 f1123;

        /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
        public int f1124;

        /* JADX INFO: renamed from: ހ, reason: contains not printable characters */
        public int f1125;

        /* JADX INFO: renamed from: ށ, reason: contains not printable characters */
        public boolean f1126;

        /* JADX INFO: renamed from: ނ, reason: contains not printable characters */
        public boolean f1127;

        public C0182() {
            m514();
        }

        public String toString() {
            StringBuilder sbM4889 = C2803.m4889("AnchorInfo{mPosition=");
            sbM4889.append(this.f1124);
            sbM4889.append(", mCoordinate=");
            sbM4889.append(this.f1125);
            sbM4889.append(", mLayoutFromEnd=");
            sbM4889.append(this.f1126);
            sbM4889.append(", mValid=");
            sbM4889.append(this.f1127);
            sbM4889.append('}');
            return sbM4889.toString();
        }

        /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
        public void m512() {
            this.f1125 = this.f1126 ? this.f1123.mo4409() : this.f1123.mo4417();
        }

        /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
        public void m513(View view, int i) {
            if (this.f1126) {
                this.f1125 = this.f1123.m4421() + this.f1123.mo4407(view);
            } else {
                this.f1125 = this.f1123.mo4414(view);
            }
            this.f1124 = i;
        }

        /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
        public void m514() {
            this.f1124 = -1;
            this.f1125 = Integer.MIN_VALUE;
            this.f1126 = false;
            this.f1127 = false;
        }

        /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
        public void m515(View view, int i) {
            int iM4421 = this.f1123.m4421();
            if (iM4421 >= 0) {
                m513(view, i);
                return;
            }
            this.f1124 = i;
            if (!this.f1126) {
                int iMo4414 = this.f1123.mo4414(view);
                int iMo4417 = iMo4414 - this.f1123.mo4417();
                this.f1125 = iMo4414;
                if (iMo4417 > 0) {
                    int iMo4409 = (this.f1123.mo4409() - Math.min(0, (this.f1123.mo4409() - iM4421) - this.f1123.mo4407(view))) - (this.f1123.mo4410(view) + iMo4414);
                    if (iMo4409 < 0) {
                        this.f1125 -= Math.min(iMo4417, -iMo4409);
                        return;
                    }
                    return;
                }
                return;
            }
            int iMo44092 = (this.f1123.mo4409() - iM4421) - this.f1123.mo4407(view);
            this.f1125 = this.f1123.mo4409() - iMo44092;
            if (iMo44092 > 0) {
                int iMo4410 = this.f1125 - this.f1123.mo4410(view);
                int iMo44172 = this.f1123.mo4417();
                int iMin = iMo4410 - (Math.min(this.f1123.mo4414(view) - iMo44172, 0) + iMo44172);
                if (iMin < 0) {
                    this.f1125 = Math.min(iMo44092, -iMin) + this.f1125;
                }
            }
        }
    }

    /* JADX INFO: renamed from: androidx.recyclerview.widget.LinearLayoutManager$ؠ, reason: contains not printable characters */
    public static class C0183 {

        /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
        public int f1128;

        /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
        public boolean f1129;

        /* JADX INFO: renamed from: ހ, reason: contains not printable characters */
        public boolean f1130;

        /* JADX INFO: renamed from: ށ, reason: contains not printable characters */
        public boolean f1131;
    }

    /* JADX INFO: renamed from: androidx.recyclerview.widget.LinearLayoutManager$ހ, reason: contains not printable characters */
    public static class C0184 {

        /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
        public int f1133;

        /* JADX INFO: renamed from: ހ, reason: contains not printable characters */
        public int f1134;

        /* JADX INFO: renamed from: ށ, reason: contains not printable characters */
        public int f1135;

        /* JADX INFO: renamed from: ނ, reason: contains not printable characters */
        public int f1136;

        /* JADX INFO: renamed from: ރ, reason: contains not printable characters */
        public int f1137;

        /* JADX INFO: renamed from: ބ, reason: contains not printable characters */
        public int f1138;

        /* JADX INFO: renamed from: އ, reason: contains not printable characters */
        public boolean f1141;

        /* JADX INFO: renamed from: ވ, reason: contains not printable characters */
        public int f1142;

        /* JADX INFO: renamed from: ފ, reason: contains not printable characters */
        public boolean f1144;

        /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
        public boolean f1132 = true;

        /* JADX INFO: renamed from: ޅ, reason: contains not printable characters */
        public int f1139 = 0;

        /* JADX INFO: renamed from: ކ, reason: contains not printable characters */
        public int f1140 = 0;

        /* JADX INFO: renamed from: މ, reason: contains not printable characters */
        public List<RecyclerView.AbstractC0224> f1143 = null;

        /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
        public View m516(RecyclerView.C0213 c0213) {
            List<RecyclerView.AbstractC0224> list = this.f1143;
            if (list == null) {
                View viewM712 = c0213.m712(this.f1135);
                this.f1135 += this.f1136;
                return viewM712;
            }
            int size = list.size();
            for (int i = 0; i < size; i++) {
                View view = this.f1143.get(i).f1326;
                RecyclerView.C0207 c0207 = (RecyclerView.C0207) view.getLayoutParams();
                if (!c0207.m696() && this.f1135 == c0207.m694()) {
                    m517(view);
                    return view;
                }
            }
            return null;
        }

        /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
        public void m517(View view) {
            int iM694;
            int size = this.f1143.size();
            View view2 = null;
            int i = Integer.MAX_VALUE;
            for (int i2 = 0; i2 < size; i2++) {
                View view3 = this.f1143.get(i2).f1326;
                RecyclerView.C0207 c0207 = (RecyclerView.C0207) view3.getLayoutParams();
                if (view3 != view && !c0207.m696() && (iM694 = (c0207.m694() - this.f1135) * this.f1136) >= 0 && iM694 < i) {
                    view2 = view3;
                    if (iM694 == 0) {
                        break;
                    } else {
                        i = iM694;
                    }
                }
            }
            if (view2 == null) {
                this.f1135 = -1;
            } else {
                this.f1135 = ((RecyclerView.C0207) view2.getLayoutParams()).m694();
            }
        }

        /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
        public boolean m518(RecyclerView.C0221 c0221) {
            int i = this.f1135;
            return i >= 0 && i < c0221.m728();
        }
    }

    /* JADX INFO: renamed from: androidx.recyclerview.widget.LinearLayoutManager$ށ, reason: contains not printable characters */
    @SuppressLint({"BanParcelableUsage"})
    public static class C0185 implements Parcelable {
        public static final Parcelable.Creator<C0185> CREATOR = new C0186();

        /* JADX INFO: renamed from: ރ, reason: contains not printable characters */
        public int f1145;

        /* JADX INFO: renamed from: ބ, reason: contains not printable characters */
        public int f1146;

        /* JADX INFO: renamed from: ޅ, reason: contains not printable characters */
        public boolean f1147;

        /* JADX INFO: renamed from: androidx.recyclerview.widget.LinearLayoutManager$ށ$֏, reason: contains not printable characters */
        public static class C0186 implements Parcelable.Creator<C0185> {
            @Override // android.os.Parcelable.Creator
            public C0185 createFromParcel(Parcel parcel) {
                return new C0185(parcel);
            }

            @Override // android.os.Parcelable.Creator
            public C0185[] newArray(int i) {
                return new C0185[i];
            }
        }

        public C0185() {
        }

        public C0185(Parcel parcel) {
            this.f1145 = parcel.readInt();
            this.f1146 = parcel.readInt();
            this.f1147 = parcel.readInt() == 1;
        }

        public C0185(C0185 c0185) {
            this.f1145 = c0185.f1145;
            this.f1146 = c0185.f1146;
            this.f1147 = c0185.f1147;
        }

        @Override // android.os.Parcelable
        public int describeContents() {
            return 0;
        }

        @Override // android.os.Parcelable
        public void writeToParcel(Parcel parcel, int i) {
            parcel.writeInt(this.f1145);
            parcel.writeInt(this.f1146);
            parcel.writeInt(this.f1147 ? 1 : 0);
        }

        /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
        public boolean m519() {
            return this.f1145 >= 0;
        }
    }

    public LinearLayoutManager(int i, boolean z) {
        this.f1108 = 1;
        this.f1112 = false;
        this.f1113 = false;
        this.f1114 = false;
        this.f1115 = true;
        this.f1116 = -1;
        this.f1117 = Integer.MIN_VALUE;
        this.f1118 = null;
        this.f1119 = new C0182();
        this.f1120 = new C0183();
        this.f1121 = 2;
        this.f1122 = new int[2];
        m500(i);
        mo482((String) null);
        if (z == this.f1112) {
            return;
        }
        this.f1112 = z;
        m687();
    }

    public LinearLayoutManager(Context context, AttributeSet attributeSet, int i, int i2) {
        this.f1108 = 1;
        this.f1112 = false;
        this.f1113 = false;
        this.f1114 = false;
        this.f1115 = true;
        this.f1116 = -1;
        this.f1117 = Integer.MIN_VALUE;
        this.f1118 = null;
        this.f1119 = new C0182();
        this.f1120 = new C0183();
        this.f1121 = 2;
        this.f1122 = new int[2];
        RecyclerView.AbstractC0202.C0206 c0206M628 = RecyclerView.AbstractC0202.m628(context, attributeSet, i, i2);
        m500(c0206M628.f1263);
        boolean z = c0206M628.f1265;
        mo482((String) null);
        if (z != this.f1112) {
            this.f1112 = z;
            m687();
        }
        mo451(c0206M628.f1266);
    }

    @Override // androidx.recyclerview.widget.RecyclerView.AbstractC0202
    /* JADX INFO: renamed from: ֏ */
    public int mo427(int i, RecyclerView.C0213 c0213, RecyclerView.C0221 c0221) {
        if (this.f1108 == 1) {
            return 0;
        }
        return m488(i, c0213, c0221);
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public final int m467(int i, RecyclerView.C0213 c0213, RecyclerView.C0221 c0221, boolean z) {
        int iMo4409;
        int iMo44092 = this.f1110.mo4409() - i;
        if (iMo44092 <= 0) {
            return 0;
        }
        int i2 = -m488(-iMo44092, c0213, c0221);
        int i3 = i + i2;
        if (!z || (iMo4409 = this.f1110.mo4409() - i3) <= 0) {
            return i2;
        }
        this.f1110.mo4408(iMo4409);
        return iMo4409 + i2;
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public int m468(RecyclerView.C0213 c0213, C0184 c0184, RecyclerView.C0221 c0221, boolean z) {
        int i = c0184.f1134;
        int i2 = c0184.f1138;
        if (i2 != Integer.MIN_VALUE) {
            if (i < 0) {
                c0184.f1138 = i2 + i;
            }
            m479(c0213, c0184);
        }
        int i3 = c0184.f1134 + c0184.f1139;
        C0183 c0183 = this.f1120;
        while (true) {
            if ((!c0184.f1144 && i3 <= 0) || !c0184.m518(c0221)) {
                break;
            }
            c0183.f1128 = 0;
            c0183.f1129 = false;
            c0183.f1130 = false;
            c0183.f1131 = false;
            mo438(c0213, c0221, c0184, c0183);
            if (!c0183.f1129) {
                c0184.f1133 = (c0183.f1128 * c0184.f1137) + c0184.f1133;
                if (!c0183.f1130 || c0184.f1143 != null || !c0221.f1308) {
                    int i4 = c0184.f1134;
                    int i5 = c0183.f1128;
                    c0184.f1134 = i4 - i5;
                    i3 -= i5;
                }
                int i6 = c0184.f1138;
                if (i6 != Integer.MIN_VALUE) {
                    int i7 = i6 + c0183.f1128;
                    c0184.f1138 = i7;
                    int i8 = c0184.f1134;
                    if (i8 < 0) {
                        c0184.f1138 = i7 + i8;
                    }
                    m479(c0213, c0184);
                }
                if (z && c0183.f1131) {
                    break;
                }
            } else {
                break;
            }
        }
        return i - c0184.f1134;
    }

    @Override // androidx.recyclerview.widget.RecyclerView.AbstractC0202
    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public int mo469(RecyclerView.C0221 c0221) {
        return m495(c0221);
    }

    @Override // androidx.recyclerview.widget.RecyclerView.AbstractC0218.InterfaceC0220
    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public PointF mo470(int i) {
        if (m664() == 0) {
            return null;
        }
        int i2 = (i < m681(m659(0))) != this.f1113 ? -1 : 1;
        return this.f1108 == 0 ? new PointF(i2, 0.0f) : new PointF(0.0f, i2);
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public View m471(int i, int i2, boolean z, boolean z2) {
        m504();
        int i3 = z ? 24579 : 320;
        int i4 = z2 ? 320 : 0;
        return this.f1108 == 0 ? this.f1247.m4431(i, i2, i3, i4) : this.f1248.m4431(i, i2, i3, i4);
    }

    @Override // androidx.recyclerview.widget.RecyclerView.AbstractC0202
    /* JADX INFO: renamed from: ֏ */
    public View mo430(View view, int i, RecyclerView.C0213 c0213, RecyclerView.C0221 c0221) {
        int iM497;
        m511();
        if (m664() == 0 || (iM497 = m497(i)) == Integer.MIN_VALUE) {
            return null;
        }
        m504();
        m474(iM497, (int) (this.f1110.mo4419() * 0.33333334f), false, c0221);
        C0184 c0184 = this.f1109;
        c0184.f1138 = Integer.MIN_VALUE;
        c0184.f1132 = false;
        m468(c0213, c0184, c0221, true);
        View viewM489 = iM497 == -1 ? this.f1113 ? m489(m664() - 1, -1) : m489(0, m664()) : this.f1113 ? m489(0, m664()) : m489(m664() - 1, -1);
        View viewM508 = iM497 == -1 ? m508() : m507();
        if (!viewM508.hasFocusable()) {
            return viewM489;
        }
        if (viewM489 == null) {
            return null;
        }
        return viewM508;
    }

    /* JADX INFO: renamed from: ֏ */
    public View mo431(RecyclerView.C0213 c0213, RecyclerView.C0221 c0221, int i, int i2, int i3) {
        m504();
        int iMo4417 = this.f1110.mo4417();
        int iMo4409 = this.f1110.mo4409();
        int i4 = i2 > i ? 1 : -1;
        View view = null;
        View view2 = null;
        while (i != i2) {
            View viewM659 = m659(i);
            int iM681 = m681(viewM659);
            if (iM681 >= 0 && iM681 < i3) {
                if (((RecyclerView.C0207) viewM659.getLayoutParams()).m696()) {
                    if (view2 == null) {
                        view2 = viewM659;
                    }
                } else {
                    if (this.f1110.mo4414(viewM659) < iMo4409 && this.f1110.mo4407(viewM659) >= iMo4417) {
                        return viewM659;
                    }
                    if (view == null) {
                        view = viewM659;
                    }
                }
            }
            i += i4;
        }
        return view != null ? view : view2;
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public View m472(boolean z, boolean z2) {
        return this.f1113 ? m471(0, m664(), z, z2) : m471(m664() - 1, -1, z, z2);
    }

    @Override // androidx.recyclerview.widget.RecyclerView.AbstractC0202
    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public void mo473(int i, int i2, RecyclerView.C0221 c0221, RecyclerView.AbstractC0202.InterfaceC0205 interfaceC0205) {
        if (this.f1108 != 0) {
            i = i2;
        }
        if (m664() == 0 || i == 0) {
            return;
        }
        m504();
        m474(i > 0 ? 1 : -1, Math.abs(i), true, c0221);
        mo439(c0221, this.f1109, interfaceC0205);
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public final void m474(int i, int i2, boolean z, RecyclerView.C0221 c0221) {
        int iMo4417;
        this.f1109.f1144 = m510();
        this.f1109.f1137 = i;
        int[] iArr = this.f1122;
        iArr[0] = 0;
        iArr[1] = 0;
        m480(c0221, iArr);
        int iMax = Math.max(0, this.f1122[0]);
        int iMax2 = Math.max(0, this.f1122[1]);
        boolean z2 = i == 1;
        this.f1109.f1139 = z2 ? iMax2 : iMax;
        C0184 c0184 = this.f1109;
        if (!z2) {
            iMax = iMax2;
        }
        c0184.f1140 = iMax;
        if (z2) {
            C0184 c01842 = this.f1109;
            c01842.f1139 = this.f1110.mo4411() + c01842.f1139;
            View viewM507 = m507();
            this.f1109.f1136 = this.f1113 ? -1 : 1;
            C0184 c01843 = this.f1109;
            int iM681 = m681(viewM507);
            C0184 c01844 = this.f1109;
            c01843.f1135 = iM681 + c01844.f1136;
            c01844.f1133 = this.f1110.mo4407(viewM507);
            iMo4417 = this.f1110.mo4407(viewM507) - this.f1110.mo4409();
        } else {
            View viewM508 = m508();
            C0184 c01845 = this.f1109;
            c01845.f1139 = this.f1110.mo4417() + c01845.f1139;
            this.f1109.f1136 = this.f1113 ? 1 : -1;
            C0184 c01846 = this.f1109;
            int iM6812 = m681(viewM508);
            C0184 c01847 = this.f1109;
            c01846.f1135 = iM6812 + c01847.f1136;
            c01847.f1133 = this.f1110.mo4414(viewM508);
            iMo4417 = (-this.f1110.mo4414(viewM508)) + this.f1110.mo4417();
        }
        C0184 c01848 = this.f1109;
        c01848.f1134 = i2;
        if (z) {
            c01848.f1134 = i2 - iMo4417;
        }
        this.f1109.f1138 = iMo4417;
    }

    @Override // androidx.recyclerview.widget.RecyclerView.AbstractC0202
    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public void mo475(int i, RecyclerView.AbstractC0202.InterfaceC0205 interfaceC0205) {
        boolean z;
        int i2;
        C0185 c0185 = this.f1118;
        if (c0185 == null || !c0185.m519()) {
            m511();
            z = this.f1113;
            i2 = this.f1116;
            if (i2 == -1) {
                i2 = z ? i - 1 : 0;
            }
        } else {
            C0185 c01852 = this.f1118;
            z = c01852.f1147;
            i2 = c01852.f1145;
        }
        int i3 = z ? -1 : 1;
        for (int i4 = 0; i4 < this.f1121 && i2 >= 0 && i2 < i; i4++) {
            ((RunnableC2352.C2354) interfaceC0205).m4402(i2, 0);
            i2 += i3;
        }
    }

    @Override // androidx.recyclerview.widget.RecyclerView.AbstractC0202
    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public void mo476(Parcelable parcelable) {
        if (parcelable instanceof C0185) {
            this.f1118 = (C0185) parcelable;
            m687();
        }
    }

    @Override // androidx.recyclerview.widget.RecyclerView.AbstractC0202
    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public void mo477(AccessibilityEvent accessibilityEvent) {
        super.mo477(accessibilityEvent);
        if (m664() > 0) {
            accessibilityEvent.setFromIndex(m505());
            accessibilityEvent.setToIndex(m506());
        }
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public final void m478(RecyclerView.C0213 c0213, int i, int i2) {
        if (i == i2) {
            return;
        }
        if (i2 <= i) {
            while (i > i2) {
                m632(i, c0213);
                i--;
            }
        } else {
            for (int i3 = i2 - 1; i3 >= i; i3--) {
                m632(i3, c0213);
            }
        }
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public final void m479(RecyclerView.C0213 c0213, C0184 c0184) {
        if (!c0184.f1132 || c0184.f1144) {
            return;
        }
        int i = c0184.f1138;
        int i2 = c0184.f1140;
        if (c0184.f1137 == -1) {
            int iM664 = m664();
            if (i < 0) {
                return;
            }
            int iMo4406 = (this.f1110.mo4406() - i) + i2;
            if (this.f1113) {
                for (int i3 = 0; i3 < iM664; i3++) {
                    View viewM659 = m659(i3);
                    if (this.f1110.mo4414(viewM659) < iMo4406 || this.f1110.mo4418(viewM659) < iMo4406) {
                        m478(c0213, 0, i3);
                        return;
                    }
                }
                return;
            }
            int i4 = iM664 - 1;
            for (int i5 = i4; i5 >= 0; i5--) {
                View viewM6592 = m659(i5);
                if (this.f1110.mo4414(viewM6592) < iMo4406 || this.f1110.mo4418(viewM6592) < iMo4406) {
                    m478(c0213, i4, i5);
                    return;
                }
            }
            return;
        }
        if (i < 0) {
            return;
        }
        int i6 = i - i2;
        int iM6642 = m664();
        if (!this.f1113) {
            for (int i7 = 0; i7 < iM6642; i7++) {
                View viewM6593 = m659(i7);
                if (this.f1110.mo4407(viewM6593) > i6 || this.f1110.mo4416(viewM6593) > i6) {
                    m478(c0213, 0, i7);
                    return;
                }
            }
            return;
        }
        int i8 = iM6642 - 1;
        for (int i9 = i8; i9 >= 0; i9--) {
            View viewM6594 = m659(i9);
            if (this.f1110.mo4407(viewM6594) > i6 || this.f1110.mo4416(viewM6594) > i6) {
                m478(c0213, i8, i9);
                return;
            }
        }
    }

    /* JADX INFO: renamed from: ֏ */
    public void mo437(RecyclerView.C0213 c0213, RecyclerView.C0221 c0221, C0182 c0182, int i) {
    }

    /* JADX INFO: renamed from: ֏ */
    public void mo438(RecyclerView.C0213 c0213, RecyclerView.C0221 c0221, C0184 c0184, C0183 c0183) {
        int i;
        int i2;
        int i3;
        int iM682;
        int iMo4412;
        View viewM516 = c0184.m516(c0213);
        if (viewM516 == null) {
            c0183.f1129 = true;
            return;
        }
        RecyclerView.C0207 c0207 = (RecyclerView.C0207) viewM516.getLayoutParams();
        if (c0184.f1143 == null) {
            if (this.f1113 == (c0184.f1137 == -1)) {
                m635(viewM516, -1, false);
            } else {
                m635(viewM516, 0, false);
            }
        } else {
            if (this.f1113 == (c0184.f1137 == -1)) {
                m635(viewM516, -1, true);
            } else {
                m635(viewM516, 0, true);
            }
        }
        RecyclerView.C0207 c02072 = (RecyclerView.C0207) viewM516.getLayoutParams();
        Rect rectM568 = this.f1244.m568(viewM516);
        int i4 = rectM568.left + rectM568.right + 0;
        int i5 = rectM568.top + rectM568.bottom + 0;
        int iM627 = RecyclerView.AbstractC0202.m627(this.f1259, this.f1257, m683() + m682() + ((ViewGroup.MarginLayoutParams) c02072).leftMargin + ((ViewGroup.MarginLayoutParams) c02072).rightMargin + i4, ((ViewGroup.MarginLayoutParams) c02072).width, mo483());
        int iM6272 = RecyclerView.AbstractC0202.m627(this.f1260, this.f1258, m680() + m684() + ((ViewGroup.MarginLayoutParams) c02072).topMargin + ((ViewGroup.MarginLayoutParams) c02072).bottomMargin + i5, ((ViewGroup.MarginLayoutParams) c02072).height, mo487());
        if (m646(viewM516, iM627, iM6272, c02072)) {
            viewM516.measure(iM627, iM6272);
        }
        c0183.f1128 = this.f1110.mo4410(viewM516);
        if (this.f1108 == 1) {
            if (m509()) {
                iMo4412 = this.f1259 - m683();
                iM682 = iMo4412 - this.f1110.mo4412(viewM516);
            } else {
                iM682 = m682();
                iMo4412 = this.f1110.mo4412(viewM516) + iM682;
            }
            if (c0184.f1137 == -1) {
                int i6 = c0184.f1133;
                i3 = i6;
                i2 = iMo4412;
                i = i6 - c0183.f1128;
            } else {
                int i7 = c0184.f1133;
                i = i7;
                i2 = iMo4412;
                i3 = c0183.f1128 + i7;
            }
        } else {
            int iM684 = m684();
            int iMo44122 = this.f1110.mo4412(viewM516) + iM684;
            if (c0184.f1137 == -1) {
                int i8 = c0184.f1133;
                i2 = i8;
                i = iM684;
                i3 = iMo44122;
                iM682 = i8 - c0183.f1128;
            } else {
                int i9 = c0184.f1133;
                i = iM684;
                i2 = c0183.f1128 + i9;
                i3 = iMo44122;
                iM682 = i9;
            }
        }
        m634(viewM516, iM682, i, i2, i3);
        if (c0207.m696() || c0207.m695()) {
            c0183.f1130 = true;
        }
        c0183.f1131 = viewM516.hasFocusable();
    }

    /* JADX INFO: renamed from: ֏ */
    public void mo439(RecyclerView.C0221 c0221, C0184 c0184, RecyclerView.AbstractC0202.InterfaceC0205 interfaceC0205) {
        int i = c0184.f1135;
        if (i < 0 || i >= c0221.m728()) {
            return;
        }
        ((RunnableC2352.C2354) interfaceC0205).m4402(i, Math.max(0, c0184.f1138));
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public void m480(RecyclerView.C0221 c0221, int[] iArr) {
        int i;
        int iMo4419 = c0221.f1302 != -1 ? this.f1110.mo4419() : 0;
        if (this.f1109.f1137 == -1) {
            i = 0;
        } else {
            i = iMo4419;
            iMo4419 = 0;
        }
        iArr[0] = iMo4419;
        iArr[1] = i;
    }

    @Override // androidx.recyclerview.widget.RecyclerView.AbstractC0202
    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public void mo481(RecyclerView recyclerView, RecyclerView.C0213 c0213) {
    }

    @Override // androidx.recyclerview.widget.RecyclerView.AbstractC0202
    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public void mo482(String str) {
        RecyclerView recyclerView;
        if (this.f1118 != null || (recyclerView = this.f1244) == null) {
            return;
        }
        recyclerView.m544(str);
    }

    @Override // androidx.recyclerview.widget.RecyclerView.AbstractC0202
    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public boolean mo483() {
        return this.f1108 == 0;
    }

    @Override // androidx.recyclerview.widget.RecyclerView.AbstractC0202
    /* JADX INFO: renamed from: ؠ */
    public int mo445(int i, RecyclerView.C0213 c0213, RecyclerView.C0221 c0221) {
        if (this.f1108 == 0) {
            return 0;
        }
        return m488(i, c0213, c0221);
    }

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public final int m484(int i, RecyclerView.C0213 c0213, RecyclerView.C0221 c0221, boolean z) {
        int iMo4417;
        int iMo44172 = i - this.f1110.mo4417();
        if (iMo44172 <= 0) {
            return 0;
        }
        int i2 = -m488(iMo44172, c0213, c0221);
        int i3 = i + i2;
        if (!z || (iMo4417 = i3 - this.f1110.mo4417()) <= 0) {
            return i2;
        }
        this.f1110.mo4408(-iMo4417);
        return i2 - iMo4417;
    }

    @Override // androidx.recyclerview.widget.RecyclerView.AbstractC0202
    /* JADX INFO: renamed from: ؠ */
    public int mo448(RecyclerView.C0221 c0221) {
        return m498(c0221);
    }

    @Override // androidx.recyclerview.widget.RecyclerView.AbstractC0202
    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public View mo485(int i) {
        int iM664 = m664();
        if (iM664 == 0) {
            return null;
        }
        int iM681 = i - m681(m659(0));
        if (iM681 >= 0 && iM681 < iM664) {
            View viewM659 = m659(iM681);
            if (m681(viewM659) == i) {
                return viewM659;
            }
        }
        return super.mo485(i);
    }

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public View m486(boolean z, boolean z2) {
        return this.f1113 ? m471(m664() - 1, -1, z, z2) : m471(0, m664(), z, z2);
    }

    /* JADX INFO: renamed from: ؠ */
    public void mo451(boolean z) {
        mo482((String) null);
        if (this.f1114 == z) {
            return;
        }
        this.f1114 = z;
        m687();
    }

    @Override // androidx.recyclerview.widget.RecyclerView.AbstractC0202
    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public boolean mo487() {
        return this.f1108 == 1;
    }

    /* JADX INFO: renamed from: ހ, reason: contains not printable characters */
    public int m488(int i, RecyclerView.C0213 c0213, RecyclerView.C0221 c0221) {
        if (m664() == 0 || i == 0) {
            return 0;
        }
        m504();
        this.f1109.f1132 = true;
        int i2 = i > 0 ? 1 : -1;
        int iAbs = Math.abs(i);
        m474(i2, iAbs, true, c0221);
        C0184 c0184 = this.f1109;
        int iM468 = m468(c0213, c0184, c0221, false) + c0184.f1138;
        if (iM468 < 0) {
            return 0;
        }
        if (iAbs > iM468) {
            i = i2 * iM468;
        }
        this.f1110.mo4408(-i);
        this.f1109.f1142 = i;
        return i;
    }

    @Override // androidx.recyclerview.widget.RecyclerView.AbstractC0202
    /* JADX INFO: renamed from: ހ */
    public int mo453(RecyclerView.C0221 c0221) {
        return m499(c0221);
    }

    /* JADX INFO: renamed from: ހ, reason: contains not printable characters */
    public View m489(int i, int i2) {
        int i3;
        int i4;
        m504();
        if ((i2 > i ? (byte) 1 : i2 < i ? (byte) -1 : (byte) 0) == 0) {
            return m659(i);
        }
        if (this.f1110.mo4414(m659(i)) < this.f1110.mo4417()) {
            i3 = 16644;
            i4 = 16388;
        } else {
            i3 = 4161;
            i4 = 4097;
        }
        return this.f1108 == 0 ? this.f1247.m4431(i, i2, i3, i4) : this.f1248.m4431(i, i2, i3, i4);
    }

    @Override // androidx.recyclerview.widget.RecyclerView.AbstractC0202
    /* JADX INFO: renamed from: ހ */
    public RecyclerView.C0207 mo454() {
        return new RecyclerView.C0207(-2, -2);
    }

    /* JADX WARN: Removed duplicated region for block: B:134:0x022f  */
    /* JADX WARN: Removed duplicated region for block: B:84:0x0182  */
    /* JADX WARN: Removed duplicated region for block: B:99:0x01ba  */
    @Override // androidx.recyclerview.widget.RecyclerView.AbstractC0202
    /* JADX INFO: renamed from: ހ */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public void mo455(RecyclerView.C0213 c0213, RecyclerView.C0221 c0221) {
        boolean z;
        boolean z2;
        int i;
        int i2;
        int i3;
        int i4;
        int i5;
        int iM467;
        int i6;
        View viewMo485;
        int iMo4414;
        int iMo4409;
        if (!(this.f1118 == null && this.f1116 == -1) && c0221.m728() == 0) {
            mo656(c0213);
            return;
        }
        C0185 c0185 = this.f1118;
        if (c0185 != null && c0185.m519()) {
            this.f1116 = this.f1118.f1145;
        }
        m504();
        this.f1109.f1132 = false;
        m511();
        View viewM668 = m668();
        if (!this.f1119.f1127 || this.f1116 != -1 || this.f1118 != null) {
            this.f1119.m514();
            C0182 c0182 = this.f1119;
            c0182.f1126 = this.f1113 ^ this.f1114;
            if (c0221.f1308 || (i = this.f1116) == -1) {
                z = false;
                if (!z) {
                    if (m664() != 0) {
                        View viewM6682 = m668();
                        if (viewM6682 != null) {
                            RecyclerView.C0207 c0207 = (RecyclerView.C0207) viewM6682.getLayoutParams();
                            if (!c0207.m696() && c0207.m694() >= 0 && c0207.m694() < c0221.m728()) {
                                c0182.m515(viewM6682, m681(viewM6682));
                            } else {
                                if (this.f1111 == this.f1114) {
                                    View viewM491 = c0182.f1126 ? this.f1113 ? m491(c0213, c0221) : m493(c0213, c0221) : this.f1113 ? m493(c0213, c0221) : m491(c0213, c0221);
                                    if (viewM491 != null) {
                                        c0182.m513(viewM491, m681(viewM491));
                                        if (!c0221.f1308 && mo461()) {
                                            if (this.f1110.mo4414(viewM491) >= this.f1110.mo4409() || this.f1110.mo4407(viewM491) < this.f1110.mo4417()) {
                                                c0182.f1125 = c0182.f1126 ? this.f1110.mo4409() : this.f1110.mo4417();
                                            }
                                        }
                                    }
                                }
                                z2 = false;
                                if (!z2) {
                                    c0182.m512();
                                    c0182.f1124 = this.f1114 ? c0221.m728() - 1 : 0;
                                }
                            }
                            z2 = true;
                            if (!z2) {
                            }
                        }
                    } else {
                        z2 = false;
                        if (!z2) {
                        }
                    }
                }
                this.f1119.f1127 = true;
            } else if (i < 0 || i >= c0221.m728()) {
                this.f1116 = -1;
                this.f1117 = Integer.MIN_VALUE;
                z = false;
                if (!z) {
                }
                this.f1119.f1127 = true;
            } else {
                c0182.f1124 = this.f1116;
                C0185 c01852 = this.f1118;
                if (c01852 != null && c01852.m519()) {
                    boolean z3 = this.f1118.f1147;
                    c0182.f1126 = z3;
                    if (z3) {
                        c0182.f1125 = this.f1110.mo4409() - this.f1118.f1146;
                    } else {
                        c0182.f1125 = this.f1110.mo4417() + this.f1118.f1146;
                    }
                } else if (this.f1117 == Integer.MIN_VALUE) {
                    View viewMo4852 = mo485(this.f1116);
                    if (viewMo4852 == null) {
                        if (m664() > 0) {
                            c0182.f1126 = (this.f1116 < m681(m659(0))) == this.f1113;
                        }
                        c0182.m512();
                    } else if (this.f1110.mo4410(viewMo4852) > this.f1110.mo4419()) {
                        c0182.m512();
                    } else if (this.f1110.mo4414(viewMo4852) - this.f1110.mo4417() < 0) {
                        c0182.f1125 = this.f1110.mo4417();
                        c0182.f1126 = false;
                    } else if (this.f1110.mo4409() - this.f1110.mo4407(viewMo4852) < 0) {
                        c0182.f1125 = this.f1110.mo4409();
                        c0182.f1126 = true;
                    } else {
                        c0182.f1125 = c0182.f1126 ? this.f1110.m4421() + this.f1110.mo4407(viewMo4852) : this.f1110.mo4414(viewMo4852);
                    }
                } else {
                    boolean z4 = this.f1113;
                    c0182.f1126 = z4;
                    if (z4) {
                        c0182.f1125 = this.f1110.mo4409() - this.f1117;
                    } else {
                        c0182.f1125 = this.f1110.mo4417() + this.f1117;
                    }
                }
                z = true;
                if (!z) {
                }
                this.f1119.f1127 = true;
            }
        } else if (viewM668 != null && (this.f1110.mo4414(viewM668) >= this.f1110.mo4409() || this.f1110.mo4407(viewM668) <= this.f1110.mo4417())) {
            this.f1119.m515(viewM668, m681(viewM668));
        }
        C0184 c0184 = this.f1109;
        c0184.f1137 = c0184.f1142 >= 0 ? 1 : -1;
        int[] iArr = this.f1122;
        iArr[0] = 0;
        iArr[1] = 0;
        m480(c0221, iArr);
        int iMo4417 = this.f1110.mo4417() + Math.max(0, this.f1122[0]);
        int iMo4411 = this.f1110.mo4411() + Math.max(0, this.f1122[1]);
        if (c0221.f1308 && (i6 = this.f1116) != -1 && this.f1117 != Integer.MIN_VALUE && (viewMo485 = mo485(i6)) != null) {
            if (this.f1113) {
                iMo4409 = this.f1110.mo4409() - this.f1110.mo4407(viewMo485);
                iMo4414 = this.f1117;
            } else {
                iMo4414 = this.f1110.mo4414(viewMo485) - this.f1110.mo4417();
                iMo4409 = this.f1117;
            }
            int i7 = iMo4409 - iMo4414;
            if (i7 > 0) {
                iMo4417 += i7;
            } else {
                iMo4411 -= i7;
            }
        }
        mo437(c0213, c0221, this.f1119, (!this.f1119.f1126 ? this.f1113 : !this.f1113) ? 1 : -1);
        m641(c0213);
        this.f1109.f1144 = m510();
        C0184 c01842 = this.f1109;
        c01842.f1141 = c0221.f1308;
        c01842.f1140 = 0;
        C0182 c01822 = this.f1119;
        if (c01822.f1126) {
            m494(c01822.f1124, c01822.f1125);
            C0184 c01843 = this.f1109;
            c01843.f1139 = iMo4417;
            m468(c0213, c01843, c0221, false);
            C0184 c01844 = this.f1109;
            i3 = c01844.f1133;
            int i8 = c01844.f1135;
            int i9 = c01844.f1134;
            if (i9 > 0) {
                iMo4411 += i9;
            }
            C0182 c01823 = this.f1119;
            m492(c01823.f1124, c01823.f1125);
            C0184 c01845 = this.f1109;
            c01845.f1139 = iMo4411;
            c01845.f1135 += c01845.f1136;
            m468(c0213, c01845, c0221, false);
            C0184 c01846 = this.f1109;
            i2 = c01846.f1133;
            int i10 = c01846.f1134;
            if (i10 > 0) {
                m494(i8, i3);
                C0184 c01847 = this.f1109;
                c01847.f1139 = i10;
                m468(c0213, c01847, c0221, false);
                i3 = this.f1109.f1133;
            }
        } else {
            m492(c01822.f1124, c01822.f1125);
            C0184 c01848 = this.f1109;
            c01848.f1139 = iMo4411;
            m468(c0213, c01848, c0221, false);
            C0184 c01849 = this.f1109;
            i2 = c01849.f1133;
            int i11 = c01849.f1135;
            int i12 = c01849.f1134;
            if (i12 > 0) {
                iMo4417 += i12;
            }
            C0182 c01824 = this.f1119;
            m494(c01824.f1124, c01824.f1125);
            C0184 c018410 = this.f1109;
            c018410.f1139 = iMo4417;
            c018410.f1135 += c018410.f1136;
            m468(c0213, c018410, c0221, false);
            C0184 c018411 = this.f1109;
            i3 = c018411.f1133;
            int i13 = c018411.f1134;
            if (i13 > 0) {
                m492(i11, i2);
                C0184 c018412 = this.f1109;
                c018412.f1139 = i13;
                m468(c0213, c018412, c0221, false);
                i2 = this.f1109.f1133;
            }
        }
        if (m664() > 0) {
            if (this.f1113 ^ this.f1114) {
                int iM4672 = m467(i2, c0213, c0221, true);
                i4 = i3 + iM4672;
                i5 = i2 + iM4672;
                iM467 = m484(i4, c0213, c0221, false);
            } else {
                int iM484 = m484(i3, c0213, c0221, true);
                i4 = i3 + iM484;
                i5 = i2 + iM484;
                iM467 = m467(i5, c0213, c0221, false);
            }
            i3 = i4 + iM467;
            i2 = i5 + iM467;
        }
        if (c0221.f1312 && m664() != 0 && !c0221.f1308 && mo461()) {
            List<RecyclerView.AbstractC0224> list = c0213.f1280;
            int size = list.size();
            int iM681 = m681(m659(0));
            int iMo4410 = 0;
            int iMo44102 = 0;
            for (int i14 = 0; i14 < size; i14++) {
                RecyclerView.AbstractC0224 abstractC0224 = list.get(i14);
                if (!abstractC0224.m748()) {
                    if (((abstractC0224.m742() < iM681) != this.f1113 ? (byte) -1 : (byte) 1) == -1) {
                        iMo4410 += this.f1110.mo4410(abstractC0224.f1326);
                    } else {
                        iMo44102 += this.f1110.mo4410(abstractC0224.f1326);
                    }
                }
            }
            this.f1109.f1143 = list;
            if (iMo4410 > 0) {
                m494(m681(m508()), i3);
                C0184 c018413 = this.f1109;
                c018413.f1139 = iMo4410;
                c018413.f1134 = 0;
                c018413.m517((View) null);
                m468(c0213, this.f1109, c0221, false);
            }
            if (iMo44102 > 0) {
                m492(m681(m507()), i2);
                C0184 c018414 = this.f1109;
                c018414.f1139 = iMo44102;
                c018414.f1134 = 0;
                c018414.m517((View) null);
                m468(c0213, this.f1109, c0221, false);
            }
            this.f1109.f1143 = null;
        }
        if (c0221.f1308) {
            this.f1119.m514();
        } else {
            AbstractC2365 abstractC2365 = this.f1110;
            abstractC2365.f7509 = abstractC2365.mo4419();
        }
        this.f1111 = this.f1114;
    }

    @Override // androidx.recyclerview.widget.RecyclerView.AbstractC0202
    /* JADX INFO: renamed from: ށ, reason: contains not printable characters */
    public int mo490(RecyclerView.C0221 c0221) {
        return m495(c0221);
    }

    /* JADX INFO: renamed from: ށ, reason: contains not printable characters */
    public final View m491(RecyclerView.C0213 c0213, RecyclerView.C0221 c0221) {
        return mo431(c0213, c0221, 0, m664(), c0221.m728());
    }

    /* JADX INFO: renamed from: ށ, reason: contains not printable characters */
    public final void m492(int i, int i2) {
        this.f1109.f1134 = this.f1110.mo4409() - i2;
        this.f1109.f1136 = this.f1113 ? -1 : 1;
        C0184 c0184 = this.f1109;
        c0184.f1135 = i;
        c0184.f1137 = 1;
        c0184.f1133 = i2;
        c0184.f1138 = Integer.MIN_VALUE;
    }

    @Override // androidx.recyclerview.widget.RecyclerView.AbstractC0202
    /* JADX INFO: renamed from: ނ */
    public int mo456(RecyclerView.C0221 c0221) {
        return m498(c0221);
    }

    /* JADX INFO: renamed from: ނ, reason: contains not printable characters */
    public final View m493(RecyclerView.C0213 c0213, RecyclerView.C0221 c0221) {
        return mo431(c0213, c0221, m664() - 1, -1, c0221.m728());
    }

    /* JADX INFO: renamed from: ނ, reason: contains not printable characters */
    public final void m494(int i, int i2) {
        this.f1109.f1134 = i2 - this.f1110.mo4417();
        C0184 c0184 = this.f1109;
        c0184.f1135 = i;
        c0184.f1136 = this.f1113 ? 1 : -1;
        C0184 c01842 = this.f1109;
        c01842.f1137 = -1;
        c01842.f1133 = i2;
        c01842.f1138 = Integer.MIN_VALUE;
    }

    @Override // androidx.recyclerview.widget.RecyclerView.AbstractC0202
    /* JADX INFO: renamed from: ރ */
    public int mo458(RecyclerView.C0221 c0221) {
        return m499(c0221);
    }

    @Override // androidx.recyclerview.widget.RecyclerView.AbstractC0202
    /* JADX INFO: renamed from: ބ */
    public void mo459(RecyclerView.C0221 c0221) {
        this.f1118 = null;
        this.f1116 = -1;
        this.f1117 = Integer.MIN_VALUE;
        this.f1119.m514();
    }

    /* JADX INFO: renamed from: ޅ, reason: contains not printable characters */
    public final int m495(RecyclerView.C0221 c0221) {
        if (m664() == 0) {
            return 0;
        }
        m504();
        return LayoutInflaterFactory2C1494.C1505.m2877(c0221, this.f1110, m486(!this.f1115, true), m472(!this.f1115, true), this, this.f1115);
    }

    @Override // androidx.recyclerview.widget.RecyclerView.AbstractC0202
    /* JADX INFO: renamed from: ޅ, reason: contains not printable characters */
    public void mo496(int i) {
        this.f1116 = i;
        this.f1117 = Integer.MIN_VALUE;
        C0185 c0185 = this.f1118;
        if (c0185 != null) {
            c0185.f1145 = -1;
        }
        m687();
    }

    /* JADX INFO: renamed from: ކ, reason: contains not printable characters */
    public int m497(int i) {
        return i != 1 ? i != 2 ? i != 17 ? i != 33 ? i != 66 ? (i == 130 && this.f1108 == 1) ? 1 : Integer.MIN_VALUE : this.f1108 == 0 ? 1 : Integer.MIN_VALUE : this.f1108 == 1 ? -1 : Integer.MIN_VALUE : this.f1108 == 0 ? -1 : Integer.MIN_VALUE : (this.f1108 != 1 && m509()) ? -1 : 1 : (this.f1108 != 1 && m509()) ? 1 : -1;
    }

    /* JADX INFO: renamed from: ކ, reason: contains not printable characters */
    public final int m498(RecyclerView.C0221 c0221) {
        if (m664() == 0) {
            return 0;
        }
        m504();
        return LayoutInflaterFactory2C1494.C1505.m2878(c0221, this.f1110, m486(!this.f1115, true), m472(!this.f1115, true), this, this.f1115, this.f1113);
    }

    /* JADX INFO: renamed from: އ, reason: contains not printable characters */
    public final int m499(RecyclerView.C0221 c0221) {
        if (m664() == 0) {
            return 0;
        }
        m504();
        return LayoutInflaterFactory2C1494.C1505.m2970(c0221, this.f1110, m486(!this.f1115, true), m472(!this.f1115, true), this, this.f1115);
    }

    /* JADX INFO: renamed from: އ, reason: contains not printable characters */
    public void m500(int i) {
        if (i != 0 && i != 1) {
            throw new IllegalArgumentException(C2803.m4871("invalid orientation:", i));
        }
        mo482((String) null);
        if (i != this.f1108 || this.f1110 == null) {
            AbstractC2365 abstractC2365M4420 = AbstractC2365.m4420(this, i);
            this.f1110 = abstractC2365M4420;
            this.f1119.f1123 = abstractC2365M4420;
            this.f1108 = i;
            m687();
        }
    }

    @Override // androidx.recyclerview.widget.RecyclerView.AbstractC0202
    /* JADX INFO: renamed from: ތ, reason: contains not printable characters */
    public boolean mo501() {
        return true;
    }

    @Override // androidx.recyclerview.widget.RecyclerView.AbstractC0202
    /* JADX INFO: renamed from: ގ, reason: contains not printable characters */
    public Parcelable mo502() {
        if (this.f1118 != null) {
            return new C0185(this.f1118);
        }
        C0185 c0185 = new C0185();
        if (m664() > 0) {
            m504();
            boolean z = this.f1111 ^ this.f1113;
            c0185.f1147 = z;
            if (z) {
                View viewM507 = m507();
                c0185.f1146 = this.f1110.mo4409() - this.f1110.mo4407(viewM507);
                c0185.f1145 = m681(viewM507);
            } else {
                View viewM508 = m508();
                c0185.f1145 = m681(viewM508);
                c0185.f1146 = this.f1110.mo4414(viewM508) - this.f1110.mo4417();
            }
        } else {
            c0185.f1145 = -1;
        }
        return c0185;
    }

    @Override // androidx.recyclerview.widget.RecyclerView.AbstractC0202
    /* JADX INFO: renamed from: ސ, reason: contains not printable characters */
    public boolean mo503() {
        boolean z;
        if (this.f1258 != 1073741824 && this.f1257 != 1073741824) {
            int iM664 = m664();
            int i = 0;
            while (true) {
                if (i >= iM664) {
                    z = false;
                    break;
                }
                ViewGroup.LayoutParams layoutParams = m659(i).getLayoutParams();
                if (layoutParams.width < 0 && layoutParams.height < 0) {
                    z = true;
                    break;
                }
                i++;
            }
            if (z) {
                return true;
            }
        }
        return false;
    }

    @Override // androidx.recyclerview.widget.RecyclerView.AbstractC0202
    /* JADX INFO: renamed from: ޑ */
    public boolean mo461() {
        return this.f1118 == null && this.f1111 == this.f1114;
    }

    /* JADX INFO: renamed from: ޒ, reason: contains not printable characters */
    public void m504() {
        if (this.f1109 == null) {
            this.f1109 = new C0184();
        }
    }

    /* JADX INFO: renamed from: ޓ, reason: contains not printable characters */
    public int m505() {
        View viewM471 = m471(0, m664(), false, true);
        if (viewM471 == null) {
            return -1;
        }
        return m681(viewM471);
    }

    /* JADX INFO: renamed from: ޔ, reason: contains not printable characters */
    public int m506() {
        View viewM471 = m471(m664() - 1, -1, false, true);
        if (viewM471 == null) {
            return -1;
        }
        return m681(viewM471);
    }

    /* JADX INFO: renamed from: ޕ, reason: contains not printable characters */
    public final View m507() {
        return m659(this.f1113 ? 0 : m664() - 1);
    }

    /* JADX INFO: renamed from: ޖ, reason: contains not printable characters */
    public final View m508() {
        return m659(this.f1113 ? m664() - 1 : 0);
    }

    /* JADX INFO: renamed from: ޗ, reason: contains not printable characters */
    public boolean m509() {
        return m673() == 1;
    }

    /* JADX INFO: renamed from: ޘ, reason: contains not printable characters */
    public boolean m510() {
        return this.f1110.mo4413() == 0 && this.f1110.mo4406() == 0;
    }

    /* JADX INFO: renamed from: ޙ, reason: contains not printable characters */
    public final void m511() {
        if (this.f1108 == 1 || !m509()) {
            this.f1113 = this.f1112;
        } else {
            this.f1113 = !this.f1112;
        }
    }
}
