package androidx.recyclerview.widget;

import android.R;
import android.animation.LayoutTransition;
import android.content.Context;
import android.content.res.TypedArray;
import android.database.Observable;
import android.graphics.Canvas;
import android.graphics.Matrix;
import android.graphics.PointF;
import android.graphics.Rect;
import android.graphics.RectF;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.SystemClock;
import android.util.AttributeSet;
import android.util.Log;
import android.util.SparseArray;
import android.view.Display;
import android.view.MotionEvent;
import android.view.VelocityTracker;
import android.view.View;
import android.view.ViewConfiguration;
import android.view.ViewGroup;
import android.view.ViewParent;
import android.view.ViewPropertyAnimator;
import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityManager;
import android.view.animation.Interpolator;
import android.widget.EdgeEffect;
import android.widget.OverScroller;
import d.h.f.b;
import d.h.j.i0.c;
import d.h.j.y;
import d.p.b.a;
import d.p.b.a0;
import d.p.b.b;
import d.p.b.b0;
import d.p.b.k;
import d.p.b.m;
import d.p.b.x;
import io.netty.util.internal.shaded.org.jctools.util.Pow2;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.concurrent.atomic.AtomicInteger;
import kotlinx.serialization.json.internal.AbstractJsonLexerKt;

/* JADX INFO: loaded from: classes.dex */
public class RecyclerView extends ViewGroup implements d.h.j.l {

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public static final int[] f739f = {R.attr.nestedScrollingEnabled};

    /* JADX INFO: renamed from: m, reason: collision with root package name */
    public static final Class<?>[] f740m;

    /* JADX INFO: renamed from: n, reason: collision with root package name */
    public static final Interpolator f741n;
    public s A;
    public g A0;
    public final ArrayList<k> B;
    public final int[] B0;
    public final ArrayList<o> C;
    public d.h.j.m C0;
    public o D;
    public final int[] D0;
    public boolean E;
    public final int[] E0;
    public boolean F;
    public final int[] F0;
    public boolean G;
    public final List<z> G0;
    public boolean H;
    public Runnable H0;
    public int I;
    public final b0.b I0;
    public boolean J;
    public boolean K;
    public boolean L;
    public int M;
    public final AccessibilityManager N;
    public boolean O;
    public boolean P;
    public int Q;
    public int R;
    public h S;
    public EdgeEffect T;
    public EdgeEffect U;
    public EdgeEffect V;
    public EdgeEffect W;

    /* JADX INFO: renamed from: a0, reason: collision with root package name */
    public i f742a0;

    /* JADX INFO: renamed from: b0, reason: collision with root package name */
    public int f743b0;

    /* JADX INFO: renamed from: c0, reason: collision with root package name */
    public int f744c0;

    /* JADX INFO: renamed from: d0, reason: collision with root package name */
    public VelocityTracker f745d0;
    public int e0;
    public int f0;
    public int g0;
    public int h0;
    public int i0;
    public n j0;
    public final int k0;
    public final int l0;
    public float m0;
    public float n0;

    /* JADX INFO: renamed from: o, reason: collision with root package name */
    public final t f746o;
    public boolean o0;

    /* JADX INFO: renamed from: p, reason: collision with root package name */
    public final r f747p;
    public final y p0;

    /* JADX INFO: renamed from: q, reason: collision with root package name */
    public u f748q;
    public d.p.b.m q0;

    /* JADX INFO: renamed from: r, reason: collision with root package name */
    public d.p.b.a f749r;
    public m.b r0;

    /* JADX INFO: renamed from: s, reason: collision with root package name */
    public d.p.b.b f750s;
    public final w s0;

    /* JADX INFO: renamed from: t, reason: collision with root package name */
    public final b0 f751t;
    public p t0;

    /* JADX INFO: renamed from: u, reason: collision with root package name */
    public boolean f752u;
    public List<p> u0;

    /* JADX INFO: renamed from: v, reason: collision with root package name */
    public final Rect f753v;
    public boolean v0;

    /* JADX INFO: renamed from: w, reason: collision with root package name */
    public final Rect f754w;
    public boolean w0;

    /* JADX INFO: renamed from: x, reason: collision with root package name */
    public final RectF f755x;
    public i.b x0;

    /* JADX INFO: renamed from: y, reason: collision with root package name */
    public d f756y;
    public boolean y0;

    /* JADX INFO: renamed from: z, reason: collision with root package name */
    public l f757z;
    public d.p.b.x z0;

    public class a implements Runnable {
        public a() {
        }

        @Override // java.lang.Runnable
        public void run() {
            i iVar = RecyclerView.this.f742a0;
            if (iVar != null) {
                d.p.b.k kVar = (d.p.b.k) iVar;
                boolean z2 = !kVar.f3268i.isEmpty();
                boolean z3 = !kVar.f3270k.isEmpty();
                boolean z4 = !kVar.f3271l.isEmpty();
                boolean z5 = !kVar.f3269j.isEmpty();
                if (z2 || z3 || z5 || z4) {
                    for (z zVar : kVar.f3268i) {
                        View view = zVar.f833b;
                        ViewPropertyAnimator viewPropertyAnimatorAnimate = view.animate();
                        kVar.f3277r.add(zVar);
                        viewPropertyAnimatorAnimate.setDuration(kVar.f762d).alpha(0.0f).setListener(new d.p.b.f(kVar, zVar, viewPropertyAnimatorAnimate, view)).start();
                    }
                    kVar.f3268i.clear();
                    if (z3) {
                        ArrayList<k.b> arrayList = new ArrayList<>();
                        arrayList.addAll(kVar.f3270k);
                        kVar.f3273n.add(arrayList);
                        kVar.f3270k.clear();
                        d.p.b.c cVar = new d.p.b.c(kVar, arrayList);
                        if (z2) {
                            View view2 = arrayList.get(0).a.f833b;
                            long j2 = kVar.f762d;
                            AtomicInteger atomicInteger = d.h.j.y.a;
                            y.c.n(view2, cVar, j2);
                        } else {
                            cVar.run();
                        }
                    }
                    if (z4) {
                        ArrayList<k.a> arrayList2 = new ArrayList<>();
                        arrayList2.addAll(kVar.f3271l);
                        kVar.f3274o.add(arrayList2);
                        kVar.f3271l.clear();
                        d.p.b.d dVar = new d.p.b.d(kVar, arrayList2);
                        if (z2) {
                            View view3 = arrayList2.get(0).a.f833b;
                            long j3 = kVar.f762d;
                            AtomicInteger atomicInteger2 = d.h.j.y.a;
                            y.c.n(view3, dVar, j3);
                        } else {
                            dVar.run();
                        }
                    }
                    if (z5) {
                        ArrayList<z> arrayList3 = new ArrayList<>();
                        arrayList3.addAll(kVar.f3269j);
                        kVar.f3272m.add(arrayList3);
                        kVar.f3269j.clear();
                        d.p.b.e eVar = new d.p.b.e(kVar, arrayList3);
                        if (z2 || z3 || z4) {
                            long jMax = Math.max(z3 ? kVar.f763e : 0L, z4 ? kVar.f764f : 0L) + (z2 ? kVar.f762d : 0L);
                            View view4 = arrayList3.get(0).f833b;
                            AtomicInteger atomicInteger3 = d.h.j.y.a;
                            y.c.n(view4, eVar, jMax);
                        } else {
                            eVar.run();
                        }
                    }
                }
            }
            RecyclerView.this.y0 = false;
        }
    }

    public static class b implements Interpolator {
        @Override // android.animation.TimeInterpolator
        public float getInterpolation(float f2) {
            float f3 = f2 - 1.0f;
            return (f3 * f3 * f3 * f3 * f3) + 1.0f;
        }
    }

    public class c implements b0.b {
        public c() {
        }

        public void a(z zVar, i.c cVar, i.c cVar2) {
            boolean zI;
            int i2;
            int i3;
            RecyclerView recyclerView = RecyclerView.this;
            Objects.requireNonNull(recyclerView);
            zVar.s(false);
            d.p.b.y yVar = (d.p.b.y) recyclerView.f742a0;
            Objects.requireNonNull(yVar);
            if (cVar == null || ((i2 = cVar.a) == (i3 = cVar2.a) && cVar.f765b == cVar2.f765b)) {
                d.p.b.k kVar = (d.p.b.k) yVar;
                kVar.n(zVar);
                zVar.f833b.setAlpha(0.0f);
                kVar.f3269j.add(zVar);
                zI = true;
            } else {
                zI = yVar.i(zVar, i2, cVar.f765b, i3, cVar2.f765b);
            }
            if (zI) {
                recyclerView.Z();
            }
        }

        public void b(z zVar, i.c cVar, i.c cVar2) {
            boolean zI;
            RecyclerView.this.f747p.k(zVar);
            RecyclerView recyclerView = RecyclerView.this;
            recyclerView.f(zVar);
            zVar.s(false);
            d.p.b.y yVar = (d.p.b.y) recyclerView.f742a0;
            Objects.requireNonNull(yVar);
            int i2 = cVar.a;
            int i3 = cVar.f765b;
            View view = zVar.f833b;
            int left = cVar2 == null ? view.getLeft() : cVar2.a;
            int top = cVar2 == null ? view.getTop() : cVar2.f765b;
            if (zVar.l() || (i2 == left && i3 == top)) {
                d.p.b.k kVar = (d.p.b.k) yVar;
                kVar.n(zVar);
                kVar.f3268i.add(zVar);
                zI = true;
            } else {
                view.layout(left, top, view.getWidth() + left, view.getHeight() + top);
                zI = yVar.i(zVar, i2, i3, left, top);
            }
            if (zI) {
                recyclerView.Z();
            }
        }
    }

    public static abstract class d<VH extends z> {
        public final e a = new e();

        /* JADX INFO: renamed from: b, reason: collision with root package name */
        public boolean f759b = false;

        public abstract int a();

        public long b(int i2) {
            return -1L;
        }

        public abstract void c(VH vh, int i2);

        public abstract VH d(ViewGroup viewGroup, int i2);
    }

    public static class e extends Observable<f> {
        public boolean a() {
            return !((Observable) this).mObservers.isEmpty();
        }

        public void b() {
            for (int size = ((Observable) this).mObservers.size() - 1; size >= 0; size--) {
                ((f) ((Observable) this).mObservers.get(size)).a();
            }
        }
    }

    public static abstract class f {
        public void a() {
        }
    }

    public interface g {
        int a(int i2, int i3);
    }

    public static class h {
        public EdgeEffect a(RecyclerView recyclerView) {
            return new EdgeEffect(recyclerView.getContext());
        }
    }

    public static abstract class i {
        public b a = null;

        /* JADX INFO: renamed from: b, reason: collision with root package name */
        public ArrayList<a> f760b = new ArrayList<>();

        /* JADX INFO: renamed from: c, reason: collision with root package name */
        public long f761c = 120;

        /* JADX INFO: renamed from: d, reason: collision with root package name */
        public long f762d = 120;

        /* JADX INFO: renamed from: e, reason: collision with root package name */
        public long f763e = 250;

        /* JADX INFO: renamed from: f, reason: collision with root package name */
        public long f764f = 250;

        public interface a {
            void a();
        }

        public interface b {
        }

        public static class c {
            public int a;

            /* JADX INFO: renamed from: b, reason: collision with root package name */
            public int f765b;
        }

        public static int b(z zVar) {
            int i2 = zVar.f842k & 14;
            if (zVar.j()) {
                return 4;
            }
            if ((i2 & 4) != 0) {
                return i2;
            }
            int i3 = zVar.f836e;
            RecyclerView recyclerView = zVar.f850s;
            int iH = recyclerView == null ? -1 : recyclerView.H(zVar);
            return (i3 == -1 || iH == -1 || i3 == iH) ? i2 : i2 | 2048;
        }

        public abstract boolean a(z zVar, z zVar2, c cVar, c cVar2);

        public final void c(z zVar) {
            b bVar = this.a;
            if (bVar != null) {
                j jVar = (j) bVar;
                Objects.requireNonNull(jVar);
                boolean z2 = true;
                zVar.s(true);
                if (zVar.f840i != null && zVar.f841j == null) {
                    zVar.f840i = null;
                }
                zVar.f841j = null;
                if ((zVar.f842k & 16) != 0) {
                    return;
                }
                RecyclerView recyclerView = RecyclerView.this;
                View view = zVar.f833b;
                recyclerView.l0();
                d.p.b.b bVar2 = recyclerView.f750s;
                int iIndexOfChild = ((d.p.b.v) bVar2.a).a.indexOfChild(view);
                if (iIndexOfChild == -1) {
                    bVar2.l(view);
                } else if (bVar2.f3237b.d(iIndexOfChild)) {
                    bVar2.f3237b.f(iIndexOfChild);
                    bVar2.l(view);
                    ((d.p.b.v) bVar2.a).c(iIndexOfChild);
                } else {
                    z2 = false;
                }
                if (z2) {
                    z zVarK = RecyclerView.K(view);
                    recyclerView.f747p.k(zVarK);
                    recyclerView.f747p.h(zVarK);
                }
                recyclerView.n0(!z2);
                if (z2 || !zVar.n()) {
                    return;
                }
                RecyclerView.this.removeDetachedView(zVar.f833b, false);
            }
        }

        public final void d() {
            int size = this.f760b.size();
            for (int i2 = 0; i2 < size; i2++) {
                this.f760b.get(i2).a();
            }
            this.f760b.clear();
        }

        public abstract void e(z zVar);

        public abstract void f();

        public abstract boolean g();

        public c h(z zVar) {
            c cVar = new c();
            View view = zVar.f833b;
            cVar.a = view.getLeft();
            cVar.f765b = view.getTop();
            view.getRight();
            view.getBottom();
            return cVar;
        }
    }

    public class j implements i.b {
        public j() {
        }
    }

    public static abstract class k {
        public void d(Canvas canvas, RecyclerView recyclerView, w wVar) {
        }

        public void e(Canvas canvas, RecyclerView recyclerView, w wVar) {
        }
    }

    public static abstract class l {
        public d.p.b.b a;

        /* JADX INFO: renamed from: b, reason: collision with root package name */
        public RecyclerView f766b;

        /* JADX INFO: renamed from: c, reason: collision with root package name */
        public final a0.b f767c;

        /* JADX INFO: renamed from: d, reason: collision with root package name */
        public final a0.b f768d;

        /* JADX INFO: renamed from: e, reason: collision with root package name */
        public a0 f769e;

        /* JADX INFO: renamed from: f, reason: collision with root package name */
        public a0 f770f;

        /* JADX INFO: renamed from: g, reason: collision with root package name */
        public v f771g;

        /* JADX INFO: renamed from: h, reason: collision with root package name */
        public boolean f772h;

        /* JADX INFO: renamed from: i, reason: collision with root package name */
        public boolean f773i;

        /* JADX INFO: renamed from: j, reason: collision with root package name */
        public boolean f774j;

        /* JADX INFO: renamed from: k, reason: collision with root package name */
        public boolean f775k;

        /* JADX INFO: renamed from: l, reason: collision with root package name */
        public int f776l;

        /* JADX INFO: renamed from: m, reason: collision with root package name */
        public boolean f777m;

        /* JADX INFO: renamed from: n, reason: collision with root package name */
        public int f778n;

        /* JADX INFO: renamed from: o, reason: collision with root package name */
        public int f779o;

        /* JADX INFO: renamed from: p, reason: collision with root package name */
        public int f780p;

        /* JADX INFO: renamed from: q, reason: collision with root package name */
        public int f781q;

        public class a implements a0.b {
            public a() {
            }

            @Override // d.p.b.a0.b
            public int a(View view) {
                return l.this.D(view) - ((ViewGroup.MarginLayoutParams) ((m) view.getLayoutParams())).leftMargin;
            }

            @Override // d.p.b.a0.b
            public int b() {
                return l.this.O();
            }

            @Override // d.p.b.a0.b
            public int c() {
                l lVar = l.this;
                return lVar.f780p - lVar.P();
            }

            @Override // d.p.b.a0.b
            public View d(int i2) {
                return l.this.x(i2);
            }

            @Override // d.p.b.a0.b
            public int e(View view) {
                return l.this.G(view) + ((ViewGroup.MarginLayoutParams) ((m) view.getLayoutParams())).rightMargin;
            }
        }

        public class b implements a0.b {
            public b() {
            }

            @Override // d.p.b.a0.b
            public int a(View view) {
                return l.this.H(view) - ((ViewGroup.MarginLayoutParams) ((m) view.getLayoutParams())).topMargin;
            }

            @Override // d.p.b.a0.b
            public int b() {
                return l.this.Q();
            }

            @Override // d.p.b.a0.b
            public int c() {
                l lVar = l.this;
                return lVar.f781q - lVar.N();
            }

            @Override // d.p.b.a0.b
            public View d(int i2) {
                return l.this.x(i2);
            }

            @Override // d.p.b.a0.b
            public int e(View view) {
                return l.this.B(view) + ((ViewGroup.MarginLayoutParams) ((m) view.getLayoutParams())).bottomMargin;
            }
        }

        public interface c {
        }

        public static class d {
            public int a;

            /* JADX INFO: renamed from: b, reason: collision with root package name */
            public int f782b;

            /* JADX INFO: renamed from: c, reason: collision with root package name */
            public boolean f783c;

            /* JADX INFO: renamed from: d, reason: collision with root package name */
            public boolean f784d;
        }

        public l() {
            a aVar = new a();
            this.f767c = aVar;
            b bVar = new b();
            this.f768d = bVar;
            this.f769e = new a0(aVar);
            this.f770f = new a0(bVar);
            this.f772h = false;
            this.f773i = false;
            this.f774j = true;
            this.f775k = true;
        }

        public static d S(Context context, AttributeSet attributeSet, int i2, int i3) {
            d dVar = new d();
            TypedArray typedArrayObtainStyledAttributes = context.obtainStyledAttributes(attributeSet, d.p.a.a, i2, i3);
            dVar.a = typedArrayObtainStyledAttributes.getInt(0, 1);
            dVar.f782b = typedArrayObtainStyledAttributes.getInt(10, 1);
            dVar.f783c = typedArrayObtainStyledAttributes.getBoolean(9, false);
            dVar.f784d = typedArrayObtainStyledAttributes.getBoolean(11, false);
            typedArrayObtainStyledAttributes.recycle();
            return dVar;
        }

        public static boolean Y(int i2, int i3, int i4) {
            int mode = View.MeasureSpec.getMode(i3);
            int size = View.MeasureSpec.getSize(i3);
            if (i4 > 0 && i2 != i4) {
                return false;
            }
            if (mode == Integer.MIN_VALUE) {
                return size >= i2;
            }
            if (mode != 0) {
                return mode == 1073741824 && size == i2;
            }
            return true;
        }

        public static int h(int i2, int i3, int i4) {
            int mode = View.MeasureSpec.getMode(i2);
            int size = View.MeasureSpec.getSize(i2);
            return mode != Integer.MIN_VALUE ? mode != 1073741824 ? Math.max(i3, i4) : size : Math.min(size, Math.max(i3, i4));
        }

        /* JADX WARN: Removed duplicated region for block: B:14:0x0020  */
        /* JADX WARN: Removed duplicated region for block: B:21:0x002f  */
        /*
            Code decompiled incorrectly, please refer to instructions dump.
            To view partially-correct add '--show-bad-code' argument
        */
        public static int z(int r4, int r5, int r6, int r7, boolean r8) {
            /*
                int r4 = r4 - r6
                r6 = 0
                int r4 = java.lang.Math.max(r6, r4)
                r0 = -2
                r1 = -1
                r2 = -2147483648(0xffffffff80000000, float:-0.0)
                r3 = 1073741824(0x40000000, float:2.0)
                if (r8 == 0) goto L1a
                if (r7 < 0) goto L11
                goto L1c
            L11:
                if (r7 != r1) goto L2f
                if (r5 == r2) goto L20
                if (r5 == 0) goto L2f
                if (r5 == r3) goto L20
                goto L2f
            L1a:
                if (r7 < 0) goto L1e
            L1c:
                r5 = r3
                goto L31
            L1e:
                if (r7 != r1) goto L22
            L20:
                r7 = r4
                goto L31
            L22:
                if (r7 != r0) goto L2f
                if (r5 == r2) goto L2c
                if (r5 != r3) goto L29
                goto L2c
            L29:
                r7 = r4
                r5 = r6
                goto L31
            L2c:
                r7 = r4
                r5 = r2
                goto L31
            L2f:
                r5 = r6
                r7 = r5
            L31:
                int r4 = android.view.View.MeasureSpec.makeMeasureSpec(r7, r5)
                return r4
            */
            throw new UnsupportedOperationException("Method not decompiled: androidx.recyclerview.widget.RecyclerView.l.z(int, int, int, int, boolean):int");
        }

        public int A(r rVar, w wVar) {
            RecyclerView recyclerView = this.f766b;
            if (recyclerView == null || recyclerView.f756y == null || !e()) {
                return 1;
            }
            return this.f766b.f756y.a();
        }

        public Parcelable A0() {
            return null;
        }

        public int B(View view) {
            return view.getBottom() + ((m) view.getLayoutParams()).f785b.bottom;
        }

        public void B0(int i2) {
        }

        public void C(View view, Rect rect) {
            int[] iArr = RecyclerView.f739f;
            m mVar = (m) view.getLayoutParams();
            Rect rect2 = mVar.f785b;
            rect.set((view.getLeft() - rect2.left) - ((ViewGroup.MarginLayoutParams) mVar).leftMargin, (view.getTop() - rect2.top) - ((ViewGroup.MarginLayoutParams) mVar).topMargin, view.getRight() + rect2.right + ((ViewGroup.MarginLayoutParams) mVar).rightMargin, view.getBottom() + rect2.bottom + ((ViewGroup.MarginLayoutParams) mVar).bottomMargin);
        }

        public boolean C0(int i2) {
            int iQ;
            int iO;
            int i3;
            int i4;
            RecyclerView recyclerView = this.f766b;
            if (recyclerView == null) {
                return false;
            }
            if (i2 == 4096) {
                iQ = recyclerView.canScrollVertically(1) ? (this.f781q - Q()) - N() : 0;
                if (this.f766b.canScrollHorizontally(1)) {
                    iO = (this.f780p - O()) - P();
                    i4 = iO;
                    i3 = iQ;
                }
                i3 = iQ;
                i4 = 0;
            } else if (i2 != 8192) {
                i4 = 0;
                i3 = 0;
            } else {
                iQ = recyclerView.canScrollVertically(-1) ? -((this.f781q - Q()) - N()) : 0;
                if (this.f766b.canScrollHorizontally(-1)) {
                    iO = -((this.f780p - O()) - P());
                    i4 = iO;
                    i3 = iQ;
                }
                i3 = iQ;
                i4 = 0;
            }
            if (i3 == 0 && i4 == 0) {
                return false;
            }
            this.f766b.k0(i4, i3, null, Integer.MIN_VALUE, true);
            return true;
        }

        public int D(View view) {
            return view.getLeft() - ((m) view.getLayoutParams()).f785b.left;
        }

        public boolean D0() {
            return false;
        }

        public int E(View view) {
            Rect rect = ((m) view.getLayoutParams()).f785b;
            return view.getMeasuredHeight() + rect.top + rect.bottom;
        }

        public void E0(r rVar) {
            for (int iY = y() - 1; iY >= 0; iY--) {
                if (!RecyclerView.K(x(iY)).t()) {
                    H0(iY, rVar);
                }
            }
        }

        public int F(View view) {
            Rect rect = ((m) view.getLayoutParams()).f785b;
            return view.getMeasuredWidth() + rect.left + rect.right;
        }

        public void F0(r rVar) {
            int size = rVar.a.size();
            for (int i2 = size - 1; i2 >= 0; i2--) {
                View view = rVar.a.get(i2).f833b;
                z zVarK = RecyclerView.K(view);
                if (!zVarK.t()) {
                    zVarK.s(false);
                    if (zVarK.n()) {
                        this.f766b.removeDetachedView(view, false);
                    }
                    i iVar = this.f766b.f742a0;
                    if (iVar != null) {
                        iVar.e(zVarK);
                    }
                    zVarK.s(true);
                    z zVarK2 = RecyclerView.K(view);
                    zVarK2.f846o = null;
                    zVarK2.f847p = false;
                    zVarK2.d();
                    rVar.h(zVarK2);
                }
            }
            rVar.a.clear();
            ArrayList<z> arrayList = rVar.f792b;
            if (arrayList != null) {
                arrayList.clear();
            }
            if (size > 0) {
                this.f766b.invalidate();
            }
        }

        public int G(View view) {
            return view.getRight() + ((m) view.getLayoutParams()).f785b.right;
        }

        public void G0(View view, r rVar) {
            d.p.b.b bVar = this.a;
            int iIndexOfChild = ((d.p.b.v) bVar.a).a.indexOfChild(view);
            if (iIndexOfChild >= 0) {
                if (bVar.f3237b.f(iIndexOfChild)) {
                    bVar.l(view);
                }
                ((d.p.b.v) bVar.a).c(iIndexOfChild);
            }
            rVar.g(view);
        }

        public int H(View view) {
            return view.getTop() - ((m) view.getLayoutParams()).f785b.top;
        }

        public void H0(int i2, r rVar) {
            View viewX = x(i2);
            I0(i2);
            rVar.g(viewX);
        }

        public View I() {
            View focusedChild;
            RecyclerView recyclerView = this.f766b;
            if (recyclerView == null || (focusedChild = recyclerView.getFocusedChild()) == null || this.a.f3238c.contains(focusedChild)) {
                return null;
            }
            return focusedChild;
        }

        public void I0(int i2) {
            d.p.b.b bVar;
            int iF;
            View viewA;
            if (x(i2) == null || (viewA = ((d.p.b.v) bVar.a).a((iF = (bVar = this.a).f(i2)))) == null) {
                return;
            }
            if (bVar.f3237b.f(iF)) {
                bVar.l(viewA);
            }
            ((d.p.b.v) bVar.a).c(iF);
        }

        public int J() {
            RecyclerView recyclerView = this.f766b;
            d adapter = recyclerView != null ? recyclerView.getAdapter() : null;
            if (adapter != null) {
                return adapter.a();
            }
            return 0;
        }

        /* JADX WARN: Removed duplicated region for block: B:29:0x00b7  */
        /* JADX WARN: Removed duplicated region for block: B:31:0x00ba  */
        /*
            Code decompiled incorrectly, please refer to instructions dump.
            To view partially-correct add '--show-bad-code' argument
        */
        public boolean J0(androidx.recyclerview.widget.RecyclerView r19, android.view.View r20, android.graphics.Rect r21, boolean r22, boolean r23) {
            /*
                Method dump skipped, instruction units count: 213
                To view this dump add '--comments-level debug' option
            */
            throw new UnsupportedOperationException("Method not decompiled: androidx.recyclerview.widget.RecyclerView.l.J0(androidx.recyclerview.widget.RecyclerView, android.view.View, android.graphics.Rect, boolean, boolean):boolean");
        }

        public int K() {
            RecyclerView recyclerView = this.f766b;
            AtomicInteger atomicInteger = d.h.j.y.a;
            return y.d.d(recyclerView);
        }

        public void K0() {
            RecyclerView recyclerView = this.f766b;
            if (recyclerView != null) {
                recyclerView.requestLayout();
            }
        }

        public int L() {
            RecyclerView recyclerView = this.f766b;
            AtomicInteger atomicInteger = d.h.j.y.a;
            return y.c.d(recyclerView);
        }

        public int L0(int i2, r rVar, w wVar) {
            return 0;
        }

        public int M() {
            RecyclerView recyclerView = this.f766b;
            AtomicInteger atomicInteger = d.h.j.y.a;
            return y.c.e(recyclerView);
        }

        public void M0(int i2) {
        }

        public int N() {
            RecyclerView recyclerView = this.f766b;
            if (recyclerView != null) {
                return recyclerView.getPaddingBottom();
            }
            return 0;
        }

        public int N0(int i2, r rVar, w wVar) {
            return 0;
        }

        public int O() {
            RecyclerView recyclerView = this.f766b;
            if (recyclerView != null) {
                return recyclerView.getPaddingLeft();
            }
            return 0;
        }

        public void O0(RecyclerView recyclerView) {
            P0(View.MeasureSpec.makeMeasureSpec(recyclerView.getWidth(), Pow2.MAX_POW2), View.MeasureSpec.makeMeasureSpec(recyclerView.getHeight(), Pow2.MAX_POW2));
        }

        public int P() {
            RecyclerView recyclerView = this.f766b;
            if (recyclerView != null) {
                return recyclerView.getPaddingRight();
            }
            return 0;
        }

        public void P0(int i2, int i3) {
            this.f780p = View.MeasureSpec.getSize(i2);
            int mode = View.MeasureSpec.getMode(i2);
            this.f778n = mode;
            if (mode == 0) {
                int[] iArr = RecyclerView.f739f;
            }
            this.f781q = View.MeasureSpec.getSize(i3);
            int mode2 = View.MeasureSpec.getMode(i3);
            this.f779o = mode2;
            if (mode2 == 0) {
                int[] iArr2 = RecyclerView.f739f;
            }
        }

        public int Q() {
            RecyclerView recyclerView = this.f766b;
            if (recyclerView != null) {
                return recyclerView.getPaddingTop();
            }
            return 0;
        }

        public void Q0(Rect rect, int i2, int i3) {
            int iP = P() + O() + rect.width();
            int iN = N() + Q() + rect.height();
            this.f766b.setMeasuredDimension(h(i2, iP, M()), h(i3, iN, L()));
        }

        public int R(View view) {
            return ((m) view.getLayoutParams()).a();
        }

        public void R0(int i2, int i3) {
            int iY = y();
            if (iY == 0) {
                this.f766b.o(i2, i3);
                return;
            }
            int i4 = Integer.MIN_VALUE;
            int i5 = Integer.MAX_VALUE;
            int i6 = Integer.MAX_VALUE;
            int i7 = Integer.MIN_VALUE;
            for (int i8 = 0; i8 < iY; i8++) {
                View viewX = x(i8);
                Rect rect = this.f766b.f753v;
                C(viewX, rect);
                int i9 = rect.left;
                if (i9 < i5) {
                    i5 = i9;
                }
                int i10 = rect.right;
                if (i10 > i4) {
                    i4 = i10;
                }
                int i11 = rect.top;
                if (i11 < i6) {
                    i6 = i11;
                }
                int i12 = rect.bottom;
                if (i12 > i7) {
                    i7 = i12;
                }
            }
            this.f766b.f753v.set(i5, i6, i4, i7);
            Q0(this.f766b.f753v, i2, i3);
        }

        public void S0(RecyclerView recyclerView) {
            int height;
            if (recyclerView == null) {
                this.f766b = null;
                this.a = null;
                height = 0;
                this.f780p = 0;
            } else {
                this.f766b = recyclerView;
                this.a = recyclerView.f750s;
                this.f780p = recyclerView.getWidth();
                height = recyclerView.getHeight();
            }
            this.f781q = height;
            this.f778n = Pow2.MAX_POW2;
            this.f779o = Pow2.MAX_POW2;
        }

        public int T(r rVar, w wVar) {
            RecyclerView recyclerView = this.f766b;
            if (recyclerView == null || recyclerView.f756y == null || !f()) {
                return 1;
            }
            return this.f766b.f756y.a();
        }

        public boolean T0(View view, int i2, int i3, m mVar) {
            return (!view.isLayoutRequested() && this.f774j && Y(view.getWidth(), i2, ((ViewGroup.MarginLayoutParams) mVar).width) && Y(view.getHeight(), i3, ((ViewGroup.MarginLayoutParams) mVar).height)) ? false : true;
        }

        public int U() {
            return 0;
        }

        public boolean U0() {
            return false;
        }

        public void V(View view, boolean z2, Rect rect) {
            Matrix matrix;
            if (z2) {
                Rect rect2 = ((m) view.getLayoutParams()).f785b;
                rect.set(-rect2.left, -rect2.top, view.getWidth() + rect2.right, view.getHeight() + rect2.bottom);
            } else {
                rect.set(0, 0, view.getWidth(), view.getHeight());
            }
            if (this.f766b != null && (matrix = view.getMatrix()) != null && !matrix.isIdentity()) {
                RectF rectF = this.f766b.f755x;
                rectF.set(rect);
                matrix.mapRect(rectF);
                rect.set((int) Math.floor(rectF.left), (int) Math.floor(rectF.top), (int) Math.ceil(rectF.right), (int) Math.ceil(rectF.bottom));
            }
            rect.offset(view.getLeft(), view.getTop());
        }

        public boolean V0(View view, int i2, int i3, m mVar) {
            return (this.f774j && Y(view.getMeasuredWidth(), i2, ((ViewGroup.MarginLayoutParams) mVar).width) && Y(view.getMeasuredHeight(), i3, ((ViewGroup.MarginLayoutParams) mVar).height)) ? false : true;
        }

        public boolean W() {
            return false;
        }

        public void W0(RecyclerView recyclerView, w wVar, int i2) {
            Log.e("RecyclerView", "You must override smoothScrollToPosition to support smooth scrolling");
        }

        public boolean X() {
            return false;
        }

        public void X0(v vVar) {
            v vVar2 = this.f771g;
            if (vVar2 != null && vVar != vVar2 && vVar2.f803e) {
                vVar2.d();
            }
            this.f771g = vVar;
            RecyclerView recyclerView = this.f766b;
            recyclerView.p0.c();
            if (vVar.f806h) {
                StringBuilder sbF = g.a.a.a.a.F("An instance of ");
                sbF.append(vVar.getClass().getSimpleName());
                sbF.append(" was started more than once. Each instance of");
                sbF.append(vVar.getClass().getSimpleName());
                sbF.append(" is intended to only be used once. You should create a new instance for each use.");
                Log.w("RecyclerView", sbF.toString());
            }
            vVar.f800b = recyclerView;
            vVar.f801c = this;
            int i2 = vVar.a;
            if (i2 == -1) {
                throw new IllegalArgumentException("Invalid target position");
            }
            recyclerView.s0.a = i2;
            vVar.f803e = true;
            vVar.f802d = true;
            vVar.f804f = recyclerView.f757z.t(i2);
            vVar.f800b.p0.a();
            vVar.f806h = true;
        }

        public boolean Y0() {
            return false;
        }

        public boolean Z(View view, boolean z2) {
            boolean z3 = this.f769e.b(view, 24579) && this.f770f.b(view, 24579);
            return z2 ? z3 : !z3;
        }

        public void a0(View view, int i2, int i3, int i4, int i5) {
            m mVar = (m) view.getLayoutParams();
            Rect rect = mVar.f785b;
            view.layout(i2 + rect.left + ((ViewGroup.MarginLayoutParams) mVar).leftMargin, i3 + rect.top + ((ViewGroup.MarginLayoutParams) mVar).topMargin, (i4 - rect.right) - ((ViewGroup.MarginLayoutParams) mVar).rightMargin, (i5 - rect.bottom) - ((ViewGroup.MarginLayoutParams) mVar).bottomMargin);
        }

        public void b(View view) {
            c(view, -1, false);
        }

        public void b0(int i2) {
            RecyclerView recyclerView = this.f766b;
            if (recyclerView != null) {
                int iE = recyclerView.f750s.e();
                for (int i3 = 0; i3 < iE; i3++) {
                    recyclerView.f750s.d(i3).offsetLeftAndRight(i2);
                }
            }
        }

        public final void c(View view, int i2, boolean z2) {
            z zVarK = RecyclerView.K(view);
            if (z2 || zVarK.l()) {
                this.f766b.f751t.a(zVarK);
            } else {
                this.f766b.f751t.f(zVarK);
            }
            m mVar = (m) view.getLayoutParams();
            if (zVarK.u() || zVarK.m()) {
                if (zVarK.m()) {
                    zVarK.f846o.k(zVarK);
                } else {
                    zVarK.d();
                }
                this.a.b(view, i2, view.getLayoutParams(), false);
            } else {
                if (view.getParent() == this.f766b) {
                    int iJ = this.a.j(view);
                    if (i2 == -1) {
                        i2 = this.a.e();
                    }
                    if (iJ == -1) {
                        StringBuilder sbF = g.a.a.a.a.F("Added View has RecyclerView as parent but view is not a real child. Unfiltered index:");
                        sbF.append(this.f766b.indexOfChild(view));
                        throw new IllegalStateException(g.a.a.a.a.g(this.f766b, sbF));
                    }
                    if (iJ != i2) {
                        l lVar = this.f766b.f757z;
                        View viewX = lVar.x(iJ);
                        if (viewX == null) {
                            throw new IllegalArgumentException("Cannot move a child from non-existing index:" + iJ + lVar.f766b.toString());
                        }
                        lVar.x(iJ);
                        lVar.r(iJ);
                        m mVar2 = (m) viewX.getLayoutParams();
                        z zVarK2 = RecyclerView.K(viewX);
                        if (zVarK2.l()) {
                            lVar.f766b.f751t.a(zVarK2);
                        } else {
                            lVar.f766b.f751t.f(zVarK2);
                        }
                        lVar.a.b(viewX, i2, mVar2, zVarK2.l());
                    }
                } else {
                    this.a.a(view, i2, false);
                    mVar.f786c = true;
                    v vVar = this.f771g;
                    if (vVar != null && vVar.f803e) {
                        Objects.requireNonNull(vVar.f800b);
                        z zVarK3 = RecyclerView.K(view);
                        if ((zVarK3 != null ? zVarK3.e() : -1) == vVar.a) {
                            vVar.f804f = view;
                        }
                    }
                }
            }
            if (mVar.f787d) {
                zVarK.f833b.invalidate();
                mVar.f787d = false;
            }
        }

        public void c0(int i2) {
            RecyclerView recyclerView = this.f766b;
            if (recyclerView != null) {
                int iE = recyclerView.f750s.e();
                for (int i3 = 0; i3 < iE; i3++) {
                    recyclerView.f750s.d(i3).offsetTopAndBottom(i2);
                }
            }
        }

        public void d(String str) {
            RecyclerView recyclerView = this.f766b;
            if (recyclerView != null) {
                recyclerView.i(str);
            }
        }

        public void d0() {
        }

        public boolean e() {
            return false;
        }

        public boolean e0() {
            return false;
        }

        public boolean f() {
            return false;
        }

        public void f0() {
        }

        public boolean g(m mVar) {
            return mVar != null;
        }

        @Deprecated
        public void g0() {
        }

        public void h0(RecyclerView recyclerView, r rVar) {
            g0();
        }

        public void i(int i2, int i3, w wVar, c cVar) {
        }

        public View i0(View view, int i2, r rVar, w wVar) {
            return null;
        }

        public void j(int i2, c cVar) {
        }

        public void j0(AccessibilityEvent accessibilityEvent) {
            RecyclerView recyclerView = this.f766b;
            r rVar = recyclerView.f747p;
            w wVar = recyclerView.s0;
            k0(accessibilityEvent);
        }

        public int k(w wVar) {
            return 0;
        }

        public void k0(AccessibilityEvent accessibilityEvent) {
            RecyclerView recyclerView = this.f766b;
            if (recyclerView == null || accessibilityEvent == null) {
                return;
            }
            boolean z2 = true;
            if (!recyclerView.canScrollVertically(1) && !this.f766b.canScrollVertically(-1) && !this.f766b.canScrollHorizontally(-1) && !this.f766b.canScrollHorizontally(1)) {
                z2 = false;
            }
            accessibilityEvent.setScrollable(z2);
            d dVar = this.f766b.f756y;
            if (dVar != null) {
                accessibilityEvent.setItemCount(dVar.a());
            }
        }

        public int l(w wVar) {
            return 0;
        }

        public void l0(View view, d.h.j.i0.c cVar) {
            z zVarK = RecyclerView.K(view);
            if (zVarK == null || zVarK.l() || this.a.k(zVarK.f833b)) {
                return;
            }
            RecyclerView recyclerView = this.f766b;
            m0(recyclerView.f747p, recyclerView.s0, view, cVar);
        }

        public int m(w wVar) {
            return 0;
        }

        public void m0(r rVar, w wVar, View view, d.h.j.i0.c cVar) {
            cVar.j(c.C0035c.a(f() ? R(view) : 0, 1, e() ? R(view) : 0, 1, false, false));
        }

        public int n(w wVar) {
            return 0;
        }

        public View n0() {
            return null;
        }

        public int o(w wVar) {
            return 0;
        }

        public void o0(RecyclerView recyclerView, int i2, int i3) {
        }

        public int p(w wVar) {
            return 0;
        }

        public void p0(RecyclerView recyclerView) {
        }

        public void q(r rVar) {
            int iY = y();
            while (true) {
                iY--;
                if (iY < 0) {
                    return;
                }
                View viewX = x(iY);
                z zVarK = RecyclerView.K(viewX);
                if (!zVarK.t()) {
                    if (!zVarK.j() || zVarK.l() || this.f766b.f756y.f759b) {
                        x(iY);
                        r(iY);
                        rVar.i(viewX);
                        this.f766b.f751t.f(zVarK);
                    } else {
                        I0(iY);
                        rVar.h(zVarK);
                    }
                }
            }
        }

        public void q0(RecyclerView recyclerView, int i2, int i3, int i4) {
        }

        public final void r(int i2) {
            this.a.c(i2);
        }

        public void r0(RecyclerView recyclerView, int i2, int i3) {
        }

        public View s(View view) {
            View viewC;
            RecyclerView recyclerView = this.f766b;
            if (recyclerView == null || (viewC = recyclerView.C(view)) == null || this.a.f3238c.contains(viewC)) {
                return null;
            }
            return viewC;
        }

        public void s0() {
        }

        public View t(int i2) {
            int iY = y();
            for (int i3 = 0; i3 < iY; i3++) {
                View viewX = x(i3);
                z zVarK = RecyclerView.K(viewX);
                if (zVarK != null && zVarK.e() == i2 && !zVarK.t() && (this.f766b.s0.f818g || !zVarK.l())) {
                    return viewX;
                }
            }
            return null;
        }

        public void t0(RecyclerView recyclerView, int i2, int i3, Object obj) {
            s0();
        }

        public abstract m u();

        public void u0(r rVar, w wVar) {
            Log.e("RecyclerView", "You must override onLayoutChildren(Recycler recycler, State state) ");
        }

        public m v(Context context, AttributeSet attributeSet) {
            return new m(context, attributeSet);
        }

        public void v0(w wVar) {
        }

        public m w(ViewGroup.LayoutParams layoutParams) {
            return layoutParams instanceof m ? new m((m) layoutParams) : layoutParams instanceof ViewGroup.MarginLayoutParams ? new m((ViewGroup.MarginLayoutParams) layoutParams) : new m(layoutParams);
        }

        public void w0(int i2, int i3) {
            this.f766b.o(i2, i3);
        }

        public View x(int i2) {
            d.p.b.b bVar = this.a;
            if (bVar == null) {
                return null;
            }
            return ((d.p.b.v) bVar.a).a(bVar.f(i2));
        }

        @Deprecated
        public boolean x0(RecyclerView recyclerView) {
            v vVar = this.f771g;
            return (vVar != null && vVar.f803e) || recyclerView.O();
        }

        public int y() {
            d.p.b.b bVar = this.a;
            if (bVar != null) {
                return bVar.e();
            }
            return 0;
        }

        public boolean y0(RecyclerView recyclerView, View view, View view2) {
            return x0(recyclerView);
        }

        public void z0(Parcelable parcelable) {
        }
    }

    public static class m extends ViewGroup.MarginLayoutParams {
        public z a;

        /* JADX INFO: renamed from: b, reason: collision with root package name */
        public final Rect f785b;

        /* JADX INFO: renamed from: c, reason: collision with root package name */
        public boolean f786c;

        /* JADX INFO: renamed from: d, reason: collision with root package name */
        public boolean f787d;

        public m(int i2, int i3) {
            super(i2, i3);
            this.f785b = new Rect();
            this.f786c = true;
            this.f787d = false;
        }

        public m(Context context, AttributeSet attributeSet) {
            super(context, attributeSet);
            this.f785b = new Rect();
            this.f786c = true;
            this.f787d = false;
        }

        public m(ViewGroup.LayoutParams layoutParams) {
            super(layoutParams);
            this.f785b = new Rect();
            this.f786c = true;
            this.f787d = false;
        }

        public m(ViewGroup.MarginLayoutParams marginLayoutParams) {
            super(marginLayoutParams);
            this.f785b = new Rect();
            this.f786c = true;
            this.f787d = false;
        }

        public m(m mVar) {
            super((ViewGroup.LayoutParams) mVar);
            this.f785b = new Rect();
            this.f786c = true;
            this.f787d = false;
        }

        public int a() {
            return this.a.e();
        }

        public boolean b() {
            return this.a.o();
        }

        public boolean c() {
            return this.a.l();
        }
    }

    public static abstract class n {
    }

    public interface o {
        void a(RecyclerView recyclerView, MotionEvent motionEvent);

        boolean b(RecyclerView recyclerView, MotionEvent motionEvent);

        void c(boolean z2);
    }

    public static abstract class p {
        public void a(RecyclerView recyclerView, int i2) {
        }

        public void b(RecyclerView recyclerView, int i2, int i3) {
        }
    }

    public static class q {
        public SparseArray<a> a = new SparseArray<>();

        /* JADX INFO: renamed from: b, reason: collision with root package name */
        public int f788b = 0;

        public static class a {
            public final ArrayList<z> a = new ArrayList<>();

            /* JADX INFO: renamed from: b, reason: collision with root package name */
            public int f789b = 5;

            /* JADX INFO: renamed from: c, reason: collision with root package name */
            public long f790c = 0;

            /* JADX INFO: renamed from: d, reason: collision with root package name */
            public long f791d = 0;
        }

        public final a a(int i2) {
            a aVar = this.a.get(i2);
            if (aVar != null) {
                return aVar;
            }
            a aVar2 = new a();
            this.a.put(i2, aVar2);
            return aVar2;
        }

        public long b(long j2, long j3) {
            if (j2 == 0) {
                return j3;
            }
            return (j3 / 4) + ((j2 / 4) * 3);
        }
    }

    public final class r {
        public final ArrayList<z> a;

        /* JADX INFO: renamed from: b, reason: collision with root package name */
        public ArrayList<z> f792b;

        /* JADX INFO: renamed from: c, reason: collision with root package name */
        public final ArrayList<z> f793c;

        /* JADX INFO: renamed from: d, reason: collision with root package name */
        public final List<z> f794d;

        /* JADX INFO: renamed from: e, reason: collision with root package name */
        public int f795e;

        /* JADX INFO: renamed from: f, reason: collision with root package name */
        public int f796f;

        /* JADX INFO: renamed from: g, reason: collision with root package name */
        public q f797g;

        public r() {
            ArrayList<z> arrayList = new ArrayList<>();
            this.a = arrayList;
            this.f792b = null;
            this.f793c = new ArrayList<>();
            this.f794d = Collections.unmodifiableList(arrayList);
            this.f795e = 2;
            this.f796f = 2;
        }

        public void a(z zVar, boolean z2) {
            RecyclerView.k(zVar);
            View view = zVar.f833b;
            d.p.b.x xVar = RecyclerView.this.z0;
            if (xVar != null) {
                x.a aVar = xVar.f3350e;
                d.h.j.y.p(view, aVar instanceof x.a ? aVar.f3352e.remove(view) : null);
            }
            if (z2) {
                s sVar = RecyclerView.this.A;
                if (sVar != null) {
                    sVar.a(zVar);
                }
                RecyclerView recyclerView = RecyclerView.this;
                d dVar = recyclerView.f756y;
                if (recyclerView.s0 != null) {
                    recyclerView.f751t.g(zVar);
                }
            }
            zVar.f850s = null;
            q qVarD = d();
            Objects.requireNonNull(qVarD);
            int i2 = zVar.f838g;
            ArrayList<z> arrayList = qVarD.a(i2).a;
            if (qVarD.a.get(i2).f789b <= arrayList.size()) {
                return;
            }
            zVar.q();
            arrayList.add(zVar);
        }

        public void b() {
            this.a.clear();
            e();
        }

        public int c(int i2) {
            if (i2 >= 0 && i2 < RecyclerView.this.s0.b()) {
                RecyclerView recyclerView = RecyclerView.this;
                return !recyclerView.s0.f818g ? i2 : recyclerView.f749r.f(i2, 0);
            }
            StringBuilder sbG = g.a.a.a.a.G("invalid position ", i2, ". State item count is ");
            sbG.append(RecyclerView.this.s0.b());
            throw new IndexOutOfBoundsException(g.a.a.a.a.g(RecyclerView.this, sbG));
        }

        public q d() {
            if (this.f797g == null) {
                this.f797g = new q();
            }
            return this.f797g;
        }

        public void e() {
            for (int size = this.f793c.size() - 1; size >= 0; size--) {
                f(size);
            }
            this.f793c.clear();
            int[] iArr = RecyclerView.f739f;
            m.b bVar = RecyclerView.this.r0;
            int[] iArr2 = bVar.f3322c;
            if (iArr2 != null) {
                Arrays.fill(iArr2, -1);
            }
            bVar.f3323d = 0;
        }

        public void f(int i2) {
            a(this.f793c.get(i2), true);
            this.f793c.remove(i2);
        }

        public void g(View view) {
            z zVarK = RecyclerView.K(view);
            if (zVarK.n()) {
                RecyclerView.this.removeDetachedView(view, false);
            }
            if (zVarK.m()) {
                zVarK.f846o.k(zVarK);
            } else if (zVarK.u()) {
                zVarK.d();
            }
            h(zVarK);
            if (RecyclerView.this.f742a0 == null || zVarK.k()) {
                return;
            }
            RecyclerView.this.f742a0.e(zVarK);
        }

        /* JADX WARN: Removed duplicated region for block: B:16:0x0030  */
        /*
            Code decompiled incorrectly, please refer to instructions dump.
            To view partially-correct add '--show-bad-code' argument
        */
        public void h(androidx.recyclerview.widget.RecyclerView.z r7) {
            /*
                Method dump skipped, instruction units count: 249
                To view this dump add '--comments-level debug' option
            */
            throw new UnsupportedOperationException("Method not decompiled: androidx.recyclerview.widget.RecyclerView.r.h(androidx.recyclerview.widget.RecyclerView$z):void");
        }

        /* JADX WARN: Removed duplicated region for block: B:20:0x0039  */
        /* JADX WARN: Removed duplicated region for block: B:23:0x003d  */
        /* JADX WARN: Removed duplicated region for block: B:24:0x003f  */
        /* JADX WARN: Removed duplicated region for block: B:27:0x0043  */
        /* JADX WARN: Removed duplicated region for block: B:31:0x0055  */
        /*
            Code decompiled incorrectly, please refer to instructions dump.
            To view partially-correct add '--show-bad-code' argument
        */
        public void i(android.view.View r5) {
            /*
                r4 = this;
                androidx.recyclerview.widget.RecyclerView$z r5 = androidx.recyclerview.widget.RecyclerView.K(r5)
                r0 = 12
                boolean r0 = r5.g(r0)
                r1 = 0
                if (r0 != 0) goto L55
                boolean r0 = r5.o()
                if (r0 == 0) goto L55
                androidx.recyclerview.widget.RecyclerView r0 = androidx.recyclerview.widget.RecyclerView.this
                androidx.recyclerview.widget.RecyclerView$i r0 = r0.f742a0
                r2 = 1
                if (r0 == 0) goto L3f
                java.util.List r3 = r5.f()
                d.p.b.k r0 = (d.p.b.k) r0
                boolean r3 = r3.isEmpty()
                if (r3 == 0) goto L39
                boolean r0 = r0.f3353g
                if (r0 == 0) goto L33
                boolean r0 = r5.j()
                if (r0 == 0) goto L31
                goto L33
            L31:
                r0 = r1
                goto L34
            L33:
                r0 = r2
            L34:
                if (r0 == 0) goto L37
                goto L39
            L37:
                r0 = r1
                goto L3a
            L39:
                r0 = r2
            L3a:
                if (r0 == 0) goto L3d
                goto L3f
            L3d:
                r0 = r1
                goto L40
            L3f:
                r0 = r2
            L40:
                if (r0 == 0) goto L43
                goto L55
            L43:
                java.util.ArrayList<androidx.recyclerview.widget.RecyclerView$z> r0 = r4.f792b
                if (r0 != 0) goto L4e
                java.util.ArrayList r0 = new java.util.ArrayList
                r0.<init>()
                r4.f792b = r0
            L4e:
                r5.f846o = r4
                r5.f847p = r2
                java.util.ArrayList<androidx.recyclerview.widget.RecyclerView$z> r0 = r4.f792b
                goto L82
            L55:
                boolean r0 = r5.j()
                if (r0 == 0) goto L7c
                boolean r0 = r5.l()
                if (r0 != 0) goto L7c
                androidx.recyclerview.widget.RecyclerView r0 = androidx.recyclerview.widget.RecyclerView.this
                androidx.recyclerview.widget.RecyclerView$d r0 = r0.f756y
                boolean r0 = r0.f759b
                if (r0 == 0) goto L6a
                goto L7c
            L6a:
                java.lang.IllegalArgumentException r5 = new java.lang.IllegalArgumentException
                java.lang.String r0 = "Called scrap view with an invalid view. Invalid views cannot be reused from scrap, they should rebound from recycler pool."
                java.lang.StringBuilder r0 = g.a.a.a.a.F(r0)
                androidx.recyclerview.widget.RecyclerView r1 = androidx.recyclerview.widget.RecyclerView.this
                java.lang.String r0 = g.a.a.a.a.g(r1, r0)
                r5.<init>(r0)
                throw r5
            L7c:
                r5.f846o = r4
                r5.f847p = r1
                java.util.ArrayList<androidx.recyclerview.widget.RecyclerView$z> r0 = r4.a
            L82:
                r0.add(r5)
                return
            */
            throw new UnsupportedOperationException("Method not decompiled: androidx.recyclerview.widget.RecyclerView.r.i(android.view.View):void");
        }

        /* JADX WARN: Removed duplicated region for block: B:108:0x01e8  */
        /* JADX WARN: Removed duplicated region for block: B:113:0x01fd  */
        /* JADX WARN: Removed duplicated region for block: B:130:0x0247  */
        /* JADX WARN: Removed duplicated region for block: B:182:0x033a  */
        /* JADX WARN: Removed duplicated region for block: B:218:0x03ff  */
        /* JADX WARN: Removed duplicated region for block: B:224:0x0423  */
        /* JADX WARN: Removed duplicated region for block: B:226:0x0429  */
        /* JADX WARN: Removed duplicated region for block: B:233:0x0439  */
        /* JADX WARN: Removed duplicated region for block: B:281:0x0522  */
        /* JADX WARN: Removed duplicated region for block: B:282:0x0529  */
        /* JADX WARN: Removed duplicated region for block: B:289:0x0545 A[ADDED_TO_REGION] */
        /* JADX WARN: Removed duplicated region for block: B:37:0x0088  */
        /* JADX WARN: Removed duplicated region for block: B:42:0x008f  */
        /* JADX WARN: Removed duplicated region for block: B:82:0x0189  */
        /*
            Code decompiled incorrectly, please refer to instructions dump.
            To view partially-correct add '--show-bad-code' argument
        */
        public androidx.recyclerview.widget.RecyclerView.z j(int r16, boolean r17, long r18) {
            /*
                Method dump skipped, instruction units count: 1388
                To view this dump add '--comments-level debug' option
            */
            throw new UnsupportedOperationException("Method not decompiled: androidx.recyclerview.widget.RecyclerView.r.j(int, boolean, long):androidx.recyclerview.widget.RecyclerView$z");
        }

        public void k(z zVar) {
            (zVar.f847p ? this.f792b : this.a).remove(zVar);
            zVar.f846o = null;
            zVar.f847p = false;
            zVar.d();
        }

        public void l() {
            l lVar = RecyclerView.this.f757z;
            this.f796f = this.f795e + (lVar != null ? lVar.f776l : 0);
            for (int size = this.f793c.size() - 1; size >= 0 && this.f793c.size() > this.f796f; size--) {
                f(size);
            }
        }
    }

    public interface s {
        void a(z zVar);
    }

    public class t extends f {
        public t() {
        }

        @Override // androidx.recyclerview.widget.RecyclerView.f
        public void a() {
            RecyclerView.this.i(null);
            RecyclerView recyclerView = RecyclerView.this;
            recyclerView.s0.f817f = true;
            recyclerView.b0(true);
            if (RecyclerView.this.f749r.g()) {
                return;
            }
            RecyclerView.this.requestLayout();
        }
    }

    public static class u extends d.j.a.a {
        public static final Parcelable.Creator<u> CREATOR = new a();

        /* JADX INFO: renamed from: n, reason: collision with root package name */
        public Parcelable f799n;

        public static class a implements Parcelable.ClassLoaderCreator<u> {
            @Override // android.os.Parcelable.Creator
            public Object createFromParcel(Parcel parcel) {
                return new u(parcel, null);
            }

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

            @Override // android.os.Parcelable.ClassLoaderCreator
            public u createFromParcel(Parcel parcel, ClassLoader classLoader) {
                return new u(parcel, classLoader);
            }
        }

        public u(Parcel parcel, ClassLoader classLoader) {
            super(parcel, classLoader);
            this.f799n = parcel.readParcelable(classLoader == null ? l.class.getClassLoader() : classLoader);
        }

        public u(Parcelable parcelable) {
            super(parcelable);
        }

        @Override // d.j.a.a, android.os.Parcelable
        public void writeToParcel(Parcel parcel, int i2) {
            parcel.writeParcelable(this.f2846m, i2);
            parcel.writeParcelable(this.f799n, 0);
        }
    }

    public static abstract class v {

        /* JADX INFO: renamed from: b, reason: collision with root package name */
        public RecyclerView f800b;

        /* JADX INFO: renamed from: c, reason: collision with root package name */
        public l f801c;

        /* JADX INFO: renamed from: d, reason: collision with root package name */
        public boolean f802d;

        /* JADX INFO: renamed from: e, reason: collision with root package name */
        public boolean f803e;

        /* JADX INFO: renamed from: f, reason: collision with root package name */
        public View f804f;

        /* JADX INFO: renamed from: h, reason: collision with root package name */
        public boolean f806h;
        public int a = -1;

        /* JADX INFO: renamed from: g, reason: collision with root package name */
        public final a f805g = new a(0, 0);

        public static class a {
            public int a;

            /* JADX INFO: renamed from: b, reason: collision with root package name */
            public int f807b;

            /* JADX INFO: renamed from: d, reason: collision with root package name */
            public int f809d = -1;

            /* JADX INFO: renamed from: f, reason: collision with root package name */
            public boolean f811f = false;

            /* JADX INFO: renamed from: g, reason: collision with root package name */
            public int f812g = 0;

            /* JADX INFO: renamed from: c, reason: collision with root package name */
            public int f808c = Integer.MIN_VALUE;

            /* JADX INFO: renamed from: e, reason: collision with root package name */
            public Interpolator f810e = null;

            public a(int i2, int i3) {
                this.a = i2;
                this.f807b = i3;
            }

            public void a(RecyclerView recyclerView) {
                int i2 = this.f809d;
                if (i2 >= 0) {
                    this.f809d = -1;
                    recyclerView.P(i2);
                    this.f811f = false;
                    return;
                }
                if (!this.f811f) {
                    this.f812g = 0;
                    return;
                }
                Interpolator interpolator = this.f810e;
                if (interpolator != null && this.f808c < 1) {
                    throw new IllegalStateException("If you provide an interpolator, you must set a positive duration");
                }
                int i3 = this.f808c;
                if (i3 < 1) {
                    throw new IllegalStateException("Scroll duration must be a positive number");
                }
                recyclerView.p0.b(this.a, this.f807b, i3, interpolator);
                int i4 = this.f812g + 1;
                this.f812g = i4;
                if (i4 > 10) {
                    Log.e("RecyclerView", "Smooth Scroll action is being updated too frequently. Make sure you are not changing it unless necessary");
                }
                this.f811f = false;
            }

            public void b(int i2, int i3, int i4, Interpolator interpolator) {
                this.a = i2;
                this.f807b = i3;
                this.f808c = i4;
                this.f810e = interpolator;
                this.f811f = true;
            }
        }

        public interface b {
            PointF a(int i2);
        }

        public PointF a(int i2) {
            Object obj = this.f801c;
            if (obj instanceof b) {
                return ((b) obj).a(i2);
            }
            StringBuilder sbF = g.a.a.a.a.F("You should override computeScrollVectorForPosition when the LayoutManager does not implement ");
            sbF.append(b.class.getCanonicalName());
            Log.w("RecyclerView", sbF.toString());
            return null;
        }

        /* JADX WARN: Removed duplicated region for block: B:50:0x00f7  */
        /*
            Code decompiled incorrectly, please refer to instructions dump.
            To view partially-correct add '--show-bad-code' argument
        */
        public void b(int r8, int r9) {
            /*
                Method dump skipped, instruction units count: 279
                To view this dump add '--comments-level debug' option
            */
            throw new UnsupportedOperationException("Method not decompiled: androidx.recyclerview.widget.RecyclerView.v.b(int, int):void");
        }

        public abstract void c(View view, w wVar, a aVar);

        public final void d() {
            if (this.f803e) {
                this.f803e = false;
                d.p.b.o oVar = (d.p.b.o) this;
                oVar.f3343p = 0;
                oVar.f3342o = 0;
                oVar.f3338k = null;
                this.f800b.s0.a = -1;
                this.f804f = null;
                this.a = -1;
                this.f802d = false;
                l lVar = this.f801c;
                if (lVar.f771g == this) {
                    lVar.f771g = null;
                }
                this.f801c = null;
                this.f800b = null;
            }
        }
    }

    public static class w {
        public int a = -1;

        /* JADX INFO: renamed from: b, reason: collision with root package name */
        public int f813b = 0;

        /* JADX INFO: renamed from: c, reason: collision with root package name */
        public int f814c = 0;

        /* JADX INFO: renamed from: d, reason: collision with root package name */
        public int f815d = 1;

        /* JADX INFO: renamed from: e, reason: collision with root package name */
        public int f816e = 0;

        /* JADX INFO: renamed from: f, reason: collision with root package name */
        public boolean f817f = false;

        /* JADX INFO: renamed from: g, reason: collision with root package name */
        public boolean f818g = false;

        /* JADX INFO: renamed from: h, reason: collision with root package name */
        public boolean f819h = false;

        /* JADX INFO: renamed from: i, reason: collision with root package name */
        public boolean f820i = false;

        /* JADX INFO: renamed from: j, reason: collision with root package name */
        public boolean f821j = false;

        /* JADX INFO: renamed from: k, reason: collision with root package name */
        public boolean f822k = false;

        /* JADX INFO: renamed from: l, reason: collision with root package name */
        public int f823l;

        /* JADX INFO: renamed from: m, reason: collision with root package name */
        public long f824m;

        /* JADX INFO: renamed from: n, reason: collision with root package name */
        public int f825n;

        public void a(int i2) {
            if ((this.f815d & i2) != 0) {
                return;
            }
            StringBuilder sbF = g.a.a.a.a.F("Layout state should be one of ");
            sbF.append(Integer.toBinaryString(i2));
            sbF.append(" but it is ");
            sbF.append(Integer.toBinaryString(this.f815d));
            throw new IllegalStateException(sbF.toString());
        }

        public int b() {
            return this.f818g ? this.f813b - this.f814c : this.f816e;
        }

        public String toString() {
            StringBuilder sbF = g.a.a.a.a.F("State{mTargetPosition=");
            sbF.append(this.a);
            sbF.append(", mData=");
            sbF.append((Object) null);
            sbF.append(", mItemCount=");
            sbF.append(this.f816e);
            sbF.append(", mIsMeasuring=");
            sbF.append(this.f820i);
            sbF.append(", mPreviousLayoutItemCount=");
            sbF.append(this.f813b);
            sbF.append(", mDeletedInvisibleItemCountSincePreviousLayout=");
            sbF.append(this.f814c);
            sbF.append(", mStructureChanged=");
            sbF.append(this.f817f);
            sbF.append(", mInPreLayout=");
            sbF.append(this.f818g);
            sbF.append(", mRunSimpleAnimations=");
            sbF.append(this.f821j);
            sbF.append(", mRunPredictiveAnimations=");
            return g.a.a.a.a.C(sbF, this.f822k, AbstractJsonLexerKt.END_OBJ);
        }
    }

    public static abstract class x {
    }

    public class y implements Runnable {

        /* JADX INFO: renamed from: f, reason: collision with root package name */
        public int f826f;

        /* JADX INFO: renamed from: m, reason: collision with root package name */
        public int f827m;

        /* JADX INFO: renamed from: n, reason: collision with root package name */
        public OverScroller f828n;

        /* JADX INFO: renamed from: o, reason: collision with root package name */
        public Interpolator f829o;

        /* JADX INFO: renamed from: p, reason: collision with root package name */
        public boolean f830p;

        /* JADX INFO: renamed from: q, reason: collision with root package name */
        public boolean f831q;

        public y() {
            Interpolator interpolator = RecyclerView.f741n;
            this.f829o = interpolator;
            this.f830p = false;
            this.f831q = false;
            this.f828n = new OverScroller(RecyclerView.this.getContext(), interpolator);
        }

        public void a() {
            if (this.f830p) {
                this.f831q = true;
                return;
            }
            RecyclerView.this.removeCallbacks(this);
            RecyclerView recyclerView = RecyclerView.this;
            AtomicInteger atomicInteger = d.h.j.y.a;
            y.c.m(recyclerView, this);
        }

        public void b(int i2, int i3, int i4, Interpolator interpolator) {
            int iRound;
            if (i4 == Integer.MIN_VALUE) {
                int iAbs = Math.abs(i2);
                int iAbs2 = Math.abs(i3);
                boolean z2 = iAbs > iAbs2;
                int iSqrt = (int) Math.sqrt(0);
                int iSqrt2 = (int) Math.sqrt((i3 * i3) + (i2 * i2));
                RecyclerView recyclerView = RecyclerView.this;
                int width = z2 ? recyclerView.getWidth() : recyclerView.getHeight();
                int i5 = width / 2;
                float f2 = width;
                float f3 = i5;
                float fSin = (((float) Math.sin((Math.min(1.0f, (iSqrt2 * 1.0f) / f2) - 0.5f) * 0.47123894f)) * f3) + f3;
                if (iSqrt > 0) {
                    iRound = Math.round(Math.abs(fSin / iSqrt) * 1000.0f) * 4;
                } else {
                    if (!z2) {
                        iAbs = iAbs2;
                    }
                    iRound = (int) (((iAbs / f2) + 1.0f) * 300.0f);
                }
                i4 = Math.min(iRound, 2000);
            }
            int i6 = i4;
            if (interpolator == null) {
                interpolator = RecyclerView.f741n;
            }
            if (this.f829o != interpolator) {
                this.f829o = interpolator;
                this.f828n = new OverScroller(RecyclerView.this.getContext(), interpolator);
            }
            this.f827m = 0;
            this.f826f = 0;
            RecyclerView.this.setScrollState(2);
            this.f828n.startScroll(0, 0, i2, i3, i6);
            a();
        }

        public void c() {
            RecyclerView.this.removeCallbacks(this);
            this.f828n.abortAnimation();
        }

        @Override // java.lang.Runnable
        public void run() {
            int i2;
            int i3;
            RecyclerView recyclerView = RecyclerView.this;
            if (recyclerView.f757z == null) {
                c();
                return;
            }
            this.f831q = false;
            this.f830p = true;
            recyclerView.n();
            OverScroller overScroller = this.f828n;
            if (overScroller.computeScrollOffset()) {
                int currX = overScroller.getCurrX();
                int currY = overScroller.getCurrY();
                int i4 = currX - this.f826f;
                int i5 = currY - this.f827m;
                this.f826f = currX;
                this.f827m = currY;
                RecyclerView recyclerView2 = RecyclerView.this;
                int[] iArr = recyclerView2.F0;
                iArr[0] = 0;
                iArr[1] = 0;
                if (recyclerView2.t(i4, i5, iArr, null, 1)) {
                    int[] iArr2 = RecyclerView.this.F0;
                    i4 -= iArr2[0];
                    i5 -= iArr2[1];
                }
                if (RecyclerView.this.getOverScrollMode() != 2) {
                    RecyclerView.this.m(i4, i5);
                }
                RecyclerView recyclerView3 = RecyclerView.this;
                if (recyclerView3.f756y != null) {
                    int[] iArr3 = recyclerView3.F0;
                    iArr3[0] = 0;
                    iArr3[1] = 0;
                    recyclerView3.h0(i4, i5, iArr3);
                    RecyclerView recyclerView4 = RecyclerView.this;
                    int[] iArr4 = recyclerView4.F0;
                    i3 = iArr4[0];
                    i2 = iArr4[1];
                    i4 -= i3;
                    i5 -= i2;
                    v vVar = recyclerView4.f757z.f771g;
                    if (vVar != null && !vVar.f802d && vVar.f803e) {
                        int iB = recyclerView4.s0.b();
                        if (iB == 0) {
                            vVar.d();
                        } else {
                            if (vVar.a >= iB) {
                                vVar.a = iB - 1;
                            }
                            vVar.b(i3, i2);
                        }
                    }
                } else {
                    i2 = 0;
                    i3 = 0;
                }
                if (!RecyclerView.this.B.isEmpty()) {
                    RecyclerView.this.invalidate();
                }
                RecyclerView recyclerView5 = RecyclerView.this;
                int[] iArr5 = recyclerView5.F0;
                iArr5[0] = 0;
                iArr5[1] = 0;
                recyclerView5.u(i3, i2, i4, i5, null, 1, iArr5);
                RecyclerView recyclerView6 = RecyclerView.this;
                int[] iArr6 = recyclerView6.F0;
                int i6 = i4 - iArr6[0];
                int i7 = i5 - iArr6[1];
                if (i3 != 0 || i2 != 0) {
                    recyclerView6.v(i3, i2);
                }
                if (!RecyclerView.this.awakenScrollBars()) {
                    RecyclerView.this.invalidate();
                }
                boolean z2 = overScroller.isFinished() || (((overScroller.getCurrX() == overScroller.getFinalX()) || i6 != 0) && ((overScroller.getCurrY() == overScroller.getFinalY()) || i7 != 0));
                RecyclerView recyclerView7 = RecyclerView.this;
                v vVar2 = recyclerView7.f757z.f771g;
                if ((vVar2 != null && vVar2.f802d) || !z2) {
                    a();
                    RecyclerView recyclerView8 = RecyclerView.this;
                    d.p.b.m mVar = recyclerView8.q0;
                    if (mVar != null) {
                        mVar.a(recyclerView8, i3, i2);
                    }
                } else {
                    if (recyclerView7.getOverScrollMode() != 2) {
                        int currVelocity = (int) overScroller.getCurrVelocity();
                        int i8 = i6 < 0 ? -currVelocity : i6 > 0 ? currVelocity : 0;
                        if (i7 < 0) {
                            currVelocity = -currVelocity;
                        } else if (i7 <= 0) {
                            currVelocity = 0;
                        }
                        RecyclerView recyclerView9 = RecyclerView.this;
                        Objects.requireNonNull(recyclerView9);
                        if (i8 < 0) {
                            recyclerView9.x();
                            if (recyclerView9.T.isFinished()) {
                                recyclerView9.T.onAbsorb(-i8);
                            }
                        } else if (i8 > 0) {
                            recyclerView9.y();
                            if (recyclerView9.V.isFinished()) {
                                recyclerView9.V.onAbsorb(i8);
                            }
                        }
                        if (currVelocity < 0) {
                            recyclerView9.z();
                            if (recyclerView9.U.isFinished()) {
                                recyclerView9.U.onAbsorb(-currVelocity);
                            }
                        } else if (currVelocity > 0) {
                            recyclerView9.w();
                            if (recyclerView9.W.isFinished()) {
                                recyclerView9.W.onAbsorb(currVelocity);
                            }
                        }
                        if (i8 != 0 || currVelocity != 0) {
                            AtomicInteger atomicInteger = d.h.j.y.a;
                            y.c.k(recyclerView9);
                        }
                    }
                    int[] iArr7 = RecyclerView.f739f;
                    m.b bVar = RecyclerView.this.r0;
                    int[] iArr8 = bVar.f3322c;
                    if (iArr8 != null) {
                        Arrays.fill(iArr8, -1);
                    }
                    bVar.f3323d = 0;
                }
            }
            v vVar3 = RecyclerView.this.f757z.f771g;
            if (vVar3 != null && vVar3.f802d) {
                vVar3.b(0, 0);
            }
            this.f830p = false;
            if (!this.f831q) {
                RecyclerView.this.setScrollState(0);
                RecyclerView.this.o0(1);
            } else {
                RecyclerView.this.removeCallbacks(this);
                RecyclerView recyclerView10 = RecyclerView.this;
                AtomicInteger atomicInteger2 = d.h.j.y.a;
                y.c.m(recyclerView10, this);
            }
        }
    }

    public static abstract class z {
        public static final List<Object> a = Collections.emptyList();

        /* JADX INFO: renamed from: b, reason: collision with root package name */
        public final View f833b;

        /* JADX INFO: renamed from: c, reason: collision with root package name */
        public WeakReference<RecyclerView> f834c;

        /* JADX INFO: renamed from: k, reason: collision with root package name */
        public int f842k;

        /* JADX INFO: renamed from: s, reason: collision with root package name */
        public RecyclerView f850s;

        /* JADX INFO: renamed from: d, reason: collision with root package name */
        public int f835d = -1;

        /* JADX INFO: renamed from: e, reason: collision with root package name */
        public int f836e = -1;

        /* JADX INFO: renamed from: f, reason: collision with root package name */
        public long f837f = -1;

        /* JADX INFO: renamed from: g, reason: collision with root package name */
        public int f838g = -1;

        /* JADX INFO: renamed from: h, reason: collision with root package name */
        public int f839h = -1;

        /* JADX INFO: renamed from: i, reason: collision with root package name */
        public z f840i = null;

        /* JADX INFO: renamed from: j, reason: collision with root package name */
        public z f841j = null;

        /* JADX INFO: renamed from: l, reason: collision with root package name */
        public List<Object> f843l = null;

        /* JADX INFO: renamed from: m, reason: collision with root package name */
        public List<Object> f844m = null;

        /* JADX INFO: renamed from: n, reason: collision with root package name */
        public int f845n = 0;

        /* JADX INFO: renamed from: o, reason: collision with root package name */
        public r f846o = null;

        /* JADX INFO: renamed from: p, reason: collision with root package name */
        public boolean f847p = false;

        /* JADX INFO: renamed from: q, reason: collision with root package name */
        public int f848q = 0;

        /* JADX INFO: renamed from: r, reason: collision with root package name */
        public int f849r = -1;

        public z(View view) {
            if (view == null) {
                throw new IllegalArgumentException("itemView may not be null");
            }
            this.f833b = view;
        }

        public void a(Object obj) {
            if (obj == null) {
                b(1024);
                return;
            }
            if ((1024 & this.f842k) == 0) {
                if (this.f843l == null) {
                    ArrayList arrayList = new ArrayList();
                    this.f843l = arrayList;
                    this.f844m = Collections.unmodifiableList(arrayList);
                }
                this.f843l.add(obj);
            }
        }

        public void b(int i2) {
            this.f842k = i2 | this.f842k;
        }

        public void c() {
            this.f836e = -1;
            this.f839h = -1;
        }

        public void d() {
            this.f842k &= -33;
        }

        public final int e() {
            int i2 = this.f839h;
            return i2 == -1 ? this.f835d : i2;
        }

        public List<Object> f() {
            if ((this.f842k & 1024) != 0) {
                return a;
            }
            List<Object> list = this.f843l;
            return (list == null || list.size() == 0) ? a : this.f844m;
        }

        public boolean g(int i2) {
            return (i2 & this.f842k) != 0;
        }

        public boolean h() {
            return (this.f833b.getParent() == null || this.f833b.getParent() == this.f850s) ? false : true;
        }

        public boolean i() {
            return (this.f842k & 1) != 0;
        }

        public boolean j() {
            return (this.f842k & 4) != 0;
        }

        public final boolean k() {
            if ((this.f842k & 16) == 0) {
                View view = this.f833b;
                AtomicInteger atomicInteger = d.h.j.y.a;
                if (!y.c.i(view)) {
                    return true;
                }
            }
            return false;
        }

        public boolean l() {
            return (this.f842k & 8) != 0;
        }

        public boolean m() {
            return this.f846o != null;
        }

        public boolean n() {
            return (this.f842k & 256) != 0;
        }

        public boolean o() {
            return (this.f842k & 2) != 0;
        }

        public void p(int i2, boolean z2) {
            if (this.f836e == -1) {
                this.f836e = this.f835d;
            }
            if (this.f839h == -1) {
                this.f839h = this.f835d;
            }
            if (z2) {
                this.f839h += i2;
            }
            this.f835d += i2;
            if (this.f833b.getLayoutParams() != null) {
                ((m) this.f833b.getLayoutParams()).f786c = true;
            }
        }

        public void q() {
            this.f842k = 0;
            this.f835d = -1;
            this.f836e = -1;
            this.f837f = -1L;
            this.f839h = -1;
            this.f845n = 0;
            this.f840i = null;
            this.f841j = null;
            List<Object> list = this.f843l;
            if (list != null) {
                list.clear();
            }
            this.f842k &= -1025;
            this.f848q = 0;
            this.f849r = -1;
            RecyclerView.k(this);
        }

        public void r(int i2, int i3) {
            this.f842k = (i2 & i3) | (this.f842k & (~i3));
        }

        public final void s(boolean z2) {
            int i2;
            int i3 = this.f845n;
            int i4 = z2 ? i3 - 1 : i3 + 1;
            this.f845n = i4;
            if (i4 < 0) {
                this.f845n = 0;
                Log.e("View", "isRecyclable decremented below 0: unmatched pair of setIsRecyable() calls for " + this);
                return;
            }
            if (!z2 && i4 == 1) {
                i2 = this.f842k | 16;
            } else if (!z2 || i4 != 0) {
                return;
            } else {
                i2 = this.f842k & (-17);
            }
            this.f842k = i2;
        }

        public boolean t() {
            return (this.f842k & 128) != 0;
        }

        public String toString() {
            StringBuilder sbJ = g.a.a.a.a.J(getClass().isAnonymousClass() ? "ViewHolder" : getClass().getSimpleName(), "{");
            sbJ.append(Integer.toHexString(hashCode()));
            sbJ.append(" position=");
            sbJ.append(this.f835d);
            sbJ.append(" id=");
            sbJ.append(this.f837f);
            sbJ.append(", oldPos=");
            sbJ.append(this.f836e);
            sbJ.append(", pLpos:");
            sbJ.append(this.f839h);
            StringBuilder sb = new StringBuilder(sbJ.toString());
            if (m()) {
                sb.append(" scrap ");
                sb.append(this.f847p ? "[changeScrap]" : "[attachedScrap]");
            }
            if (j()) {
                sb.append(" invalid");
            }
            if (!i()) {
                sb.append(" unbound");
            }
            boolean z2 = true;
            if ((this.f842k & 2) != 0) {
                sb.append(" update");
            }
            if (l()) {
                sb.append(" removed");
            }
            if (t()) {
                sb.append(" ignored");
            }
            if (n()) {
                sb.append(" tmpDetached");
            }
            if (!k()) {
                StringBuilder sbF = g.a.a.a.a.F(" not recyclable(");
                sbF.append(this.f845n);
                sbF.append(")");
                sb.append(sbF.toString());
            }
            if ((this.f842k & 512) == 0 && !j()) {
                z2 = false;
            }
            if (z2) {
                sb.append(" undefined adapter position");
            }
            if (this.f833b.getParent() == null) {
                sb.append(" no parent");
            }
            sb.append("}");
            return sb.toString();
        }

        public boolean u() {
            return (this.f842k & 32) != 0;
        }
    }

    static {
        Class<?> cls = Integer.TYPE;
        f740m = new Class[]{Context.class, AttributeSet.class, cls, cls};
        f741n = new b();
    }

    public RecyclerView(Context context, AttributeSet attributeSet) {
        this(context, attributeSet, com.ifpdos.udi.service.core.pc.R.attr.recyclerViewStyle);
    }

    /* JADX WARN: Can't wrap try/catch for region: R(10:(1:34)(12:35|(1:38)|37|79|40|(1:42)(1:43)|44|45|75|46|47|51)|79|40|(0)(0)|44|45|75|46|47|51) */
    /* JADX WARN: Code restructure failed: missing block: B:48:0x0250, code lost:
    
        r0 = move-exception;
     */
    /* JADX WARN: Code restructure failed: missing block: B:50:0x0253, code lost:
    
        r0 = r4.getConstructor(new java.lang.Class[0]);
     */
    /* JADX WARN: Code restructure failed: missing block: B:52:0x0267, code lost:
    
        r0 = move-exception;
     */
    /* JADX WARN: Code restructure failed: missing block: B:53:0x0268, code lost:
    
        r0.initCause(r0);
     */
    /* JADX WARN: Code restructure failed: missing block: B:54:0x0288, code lost:
    
        throw new java.lang.IllegalStateException(r20.getPositionDescription() + ": Error creating LayoutManager " + r3, r0);
     */
    /* JADX WARN: Removed duplicated region for block: B:42:0x021b A[Catch: ClassCastException -> 0x0289, IllegalAccessException -> 0x02a8, InstantiationException -> 0x02c7, InvocationTargetException -> 0x02e4, ClassNotFoundException -> 0x0301, TryCatch #4 {ClassCastException -> 0x0289, ClassNotFoundException -> 0x0301, IllegalAccessException -> 0x02a8, InstantiationException -> 0x02c7, InvocationTargetException -> 0x02e4, blocks: (B:40:0x0215, B:42:0x021b, B:44:0x0228, B:46:0x0234, B:51:0x0259, B:50:0x0253, B:53:0x0268, B:54:0x0288, B:43:0x0224), top: B:79:0x0215 }] */
    /* JADX WARN: Removed duplicated region for block: B:43:0x0224 A[Catch: ClassCastException -> 0x0289, IllegalAccessException -> 0x02a8, InstantiationException -> 0x02c7, InvocationTargetException -> 0x02e4, ClassNotFoundException -> 0x0301, TryCatch #4 {ClassCastException -> 0x0289, ClassNotFoundException -> 0x0301, IllegalAccessException -> 0x02a8, InstantiationException -> 0x02c7, InvocationTargetException -> 0x02e4, blocks: (B:40:0x0215, B:42:0x021b, B:44:0x0228, B:46:0x0234, B:51:0x0259, B:50:0x0253, B:53:0x0268, B:54:0x0288, B:43:0x0224), top: B:79:0x0215 }] */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public RecyclerView(android.content.Context r19, android.util.AttributeSet r20, int r21) {
        /*
            Method dump skipped, instruction units count: 838
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: androidx.recyclerview.widget.RecyclerView.<init>(android.content.Context, android.util.AttributeSet, int):void");
    }

    public static RecyclerView F(View view) {
        if (!(view instanceof ViewGroup)) {
            return null;
        }
        if (view instanceof RecyclerView) {
            return (RecyclerView) view;
        }
        ViewGroup viewGroup = (ViewGroup) view;
        int childCount = viewGroup.getChildCount();
        for (int i2 = 0; i2 < childCount; i2++) {
            RecyclerView recyclerViewF = F(viewGroup.getChildAt(i2));
            if (recyclerViewF != null) {
                return recyclerViewF;
            }
        }
        return null;
    }

    public static z K(View view) {
        if (view == null) {
            return null;
        }
        return ((m) view.getLayoutParams()).a;
    }

    private d.h.j.m getScrollingChildHelper() {
        if (this.C0 == null) {
            this.C0 = new d.h.j.m(this);
        }
        return this.C0;
    }

    public static void k(z zVar) {
        WeakReference<RecyclerView> weakReference = zVar.f834c;
        if (weakReference != null) {
            Object parent = weakReference.get();
            while (true) {
                for (View view = (View) parent; view != null; view = null) {
                    if (view == zVar.f833b) {
                        return;
                    }
                    parent = view.getParent();
                    if (parent instanceof View) {
                        break;
                    }
                }
                zVar.f834c = null;
                return;
            }
        }
    }

    public String A() {
        StringBuilder sbF = g.a.a.a.a.F(" ");
        sbF.append(super.toString());
        sbF.append(", adapter:");
        sbF.append(this.f756y);
        sbF.append(", layout:");
        sbF.append(this.f757z);
        sbF.append(", context:");
        sbF.append(getContext());
        return sbF.toString();
    }

    public final void B(w wVar) {
        if (getScrollState() != 2) {
            Objects.requireNonNull(wVar);
            return;
        }
        OverScroller overScroller = this.p0.f828n;
        overScroller.getFinalX();
        overScroller.getCurrX();
        Objects.requireNonNull(wVar);
        overScroller.getFinalY();
        overScroller.getCurrY();
    }

    public View C(View view) {
        Object parent;
        while (true) {
            parent = view.getParent();
            if (parent == null || parent == this || !(parent instanceof View)) {
                break;
            }
            view = (View) parent;
        }
        if (parent == this) {
            return view;
        }
        return null;
    }

    public final boolean D(MotionEvent motionEvent) {
        int action = motionEvent.getAction();
        int size = this.C.size();
        for (int i2 = 0; i2 < size; i2++) {
            o oVar = this.C.get(i2);
            if (oVar.b(this, motionEvent) && action != 3) {
                this.D = oVar;
                return true;
            }
        }
        return false;
    }

    public final void E(int[] iArr) {
        int iE = this.f750s.e();
        if (iE == 0) {
            iArr[0] = -1;
            iArr[1] = -1;
            return;
        }
        int i2 = Integer.MAX_VALUE;
        int i3 = Integer.MIN_VALUE;
        for (int i4 = 0; i4 < iE; i4++) {
            z zVarK = K(this.f750s.d(i4));
            if (!zVarK.t()) {
                int iE2 = zVarK.e();
                if (iE2 < i2) {
                    i2 = iE2;
                }
                if (iE2 > i3) {
                    i3 = iE2;
                }
            }
        }
        iArr[0] = i2;
        iArr[1] = i3;
    }

    public z G(int i2) {
        z zVar = null;
        if (this.O) {
            return null;
        }
        int iH = this.f750s.h();
        for (int i3 = 0; i3 < iH; i3++) {
            z zVarK = K(this.f750s.g(i3));
            if (zVarK != null && !zVarK.l() && H(zVarK) == i2) {
                if (!this.f750s.k(zVarK.f833b)) {
                    return zVarK;
                }
                zVar = zVarK;
            }
        }
        return zVar;
    }

    public int H(z zVar) {
        if (!zVar.g(524) && zVar.i()) {
            d.p.b.a aVar = this.f749r;
            int i2 = zVar.f835d;
            int size = aVar.f3225b.size();
            for (int i3 = 0; i3 < size; i3++) {
                a.b bVar = aVar.f3225b.get(i3);
                int i4 = bVar.a;
                if (i4 != 1) {
                    if (i4 == 2) {
                        int i5 = bVar.f3229b;
                        if (i5 <= i2) {
                            int i6 = bVar.f3231d;
                            if (i5 + i6 <= i2) {
                                i2 -= i6;
                            }
                        } else {
                            continue;
                        }
                    } else if (i4 == 8) {
                        int i7 = bVar.f3229b;
                        if (i7 == i2) {
                            i2 = bVar.f3231d;
                        } else {
                            if (i7 < i2) {
                                i2--;
                            }
                            if (bVar.f3231d <= i2) {
                                i2++;
                            }
                        }
                    }
                } else if (bVar.f3229b <= i2) {
                    i2 += bVar.f3231d;
                }
            }
            return i2;
        }
        return -1;
    }

    public long I(z zVar) {
        return this.f756y.f759b ? zVar.f837f : zVar.f835d;
    }

    public z J(View view) {
        ViewParent parent = view.getParent();
        if (parent == null || parent == this) {
            return K(view);
        }
        throw new IllegalArgumentException("View " + view + " is not a direct child of " + this);
    }

    public Rect L(View view) {
        m mVar = (m) view.getLayoutParams();
        if (!mVar.f786c) {
            return mVar.f785b;
        }
        if (this.s0.f818g && (mVar.b() || mVar.a.j())) {
            return mVar.f785b;
        }
        Rect rect = mVar.f785b;
        rect.set(0, 0, 0, 0);
        int size = this.B.size();
        for (int i2 = 0; i2 < size; i2++) {
            this.f753v.set(0, 0, 0, 0);
            k kVar = this.B.get(i2);
            Rect rect2 = this.f753v;
            Objects.requireNonNull(kVar);
            ((m) view.getLayoutParams()).a();
            rect2.set(0, 0, 0, 0);
            int i3 = rect.left;
            Rect rect3 = this.f753v;
            rect.left = i3 + rect3.left;
            rect.top += rect3.top;
            rect.right += rect3.right;
            rect.bottom += rect3.bottom;
        }
        mVar.f786c = false;
        return rect;
    }

    public boolean M() {
        return !this.H || this.O || this.f749r.g();
    }

    public void N() {
        this.W = null;
        this.U = null;
        this.V = null;
        this.T = null;
    }

    public boolean O() {
        return this.Q > 0;
    }

    public void P(int i2) {
        if (this.f757z == null) {
            return;
        }
        setScrollState(2);
        this.f757z.M0(i2);
        awakenScrollBars();
    }

    public void Q() {
        int iH = this.f750s.h();
        for (int i2 = 0; i2 < iH; i2++) {
            ((m) this.f750s.g(i2).getLayoutParams()).f786c = true;
        }
        r rVar = this.f747p;
        int size = rVar.f793c.size();
        for (int i3 = 0; i3 < size; i3++) {
            m mVar = (m) rVar.f793c.get(i3).f833b.getLayoutParams();
            if (mVar != null) {
                mVar.f786c = true;
            }
        }
    }

    public void R(int i2, int i3, boolean z2) {
        int i4 = i2 + i3;
        int iH = this.f750s.h();
        for (int i5 = 0; i5 < iH; i5++) {
            z zVarK = K(this.f750s.g(i5));
            if (zVarK != null && !zVarK.t()) {
                int i6 = zVarK.f835d;
                if (i6 >= i4) {
                    zVarK.p(-i3, z2);
                } else if (i6 >= i2) {
                    zVarK.b(8);
                    zVarK.p(-i3, z2);
                    zVarK.f835d = i2 - 1;
                }
                this.s0.f817f = true;
            }
        }
        r rVar = this.f747p;
        int size = rVar.f793c.size();
        while (true) {
            size--;
            if (size < 0) {
                requestLayout();
                return;
            }
            z zVar = rVar.f793c.get(size);
            if (zVar != null) {
                int i7 = zVar.f835d;
                if (i7 >= i4) {
                    zVar.p(-i3, z2);
                } else if (i7 >= i2) {
                    zVar.b(8);
                    rVar.f(size);
                }
            }
        }
    }

    public void S() {
    }

    public void T() {
    }

    public void U() {
        this.Q++;
    }

    public void V(boolean z2) {
        int i2;
        int i3 = this.Q - 1;
        this.Q = i3;
        if (i3 < 1) {
            this.Q = 0;
            if (z2) {
                int i4 = this.M;
                this.M = 0;
                if (i4 != 0) {
                    AccessibilityManager accessibilityManager = this.N;
                    if (accessibilityManager != null && accessibilityManager.isEnabled()) {
                        AccessibilityEvent accessibilityEventObtain = AccessibilityEvent.obtain();
                        accessibilityEventObtain.setEventType(2048);
                        d.h.j.i0.b.b(accessibilityEventObtain, i4);
                        sendAccessibilityEventUnchecked(accessibilityEventObtain);
                    }
                }
                for (int size = this.G0.size() - 1; size >= 0; size--) {
                    z zVar = this.G0.get(size);
                    if (zVar.f833b.getParent() == this && !zVar.t() && (i2 = zVar.f849r) != -1) {
                        View view = zVar.f833b;
                        AtomicInteger atomicInteger = d.h.j.y.a;
                        y.c.s(view, i2);
                        zVar.f849r = -1;
                    }
                }
                this.G0.clear();
            }
        }
    }

    public final void W(MotionEvent motionEvent) {
        int actionIndex = motionEvent.getActionIndex();
        if (motionEvent.getPointerId(actionIndex) == this.f744c0) {
            int i2 = actionIndex == 0 ? 1 : 0;
            this.f744c0 = motionEvent.getPointerId(i2);
            int x2 = (int) (motionEvent.getX(i2) + 0.5f);
            this.g0 = x2;
            this.e0 = x2;
            int y2 = (int) (motionEvent.getY(i2) + 0.5f);
            this.h0 = y2;
            this.f0 = y2;
        }
    }

    public void X() {
    }

    public void Y() {
    }

    public void Z() {
        if (this.y0 || !this.E) {
            return;
        }
        Runnable runnable = this.H0;
        AtomicInteger atomicInteger = d.h.j.y.a;
        y.c.m(this, runnable);
        this.y0 = true;
    }

    /* JADX WARN: Removed duplicated region for block: B:50:0x0080  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public final void a0() {
        /*
            r6 = this;
            boolean r0 = r6.O
            if (r0 == 0) goto L19
            d.p.b.a r0 = r6.f749r
            java.util.ArrayList<d.p.b.a$b> r1 = r0.f3225b
            r0.l(r1)
            java.util.ArrayList<d.p.b.a$b> r1 = r0.f3226c
            r0.l(r1)
            boolean r0 = r6.P
            if (r0 == 0) goto L19
            androidx.recyclerview.widget.RecyclerView$l r0 = r6.f757z
            r0.p0(r6)
        L19:
            androidx.recyclerview.widget.RecyclerView$i r0 = r6.f742a0
            r1 = 1
            r2 = 0
            if (r0 == 0) goto L29
            androidx.recyclerview.widget.RecyclerView$l r0 = r6.f757z
            boolean r0 = r0.Y0()
            if (r0 == 0) goto L29
            r0 = r1
            goto L2a
        L29:
            r0 = r2
        L2a:
            if (r0 == 0) goto L32
            d.p.b.a r0 = r6.f749r
            r0.j()
            goto L37
        L32:
            d.p.b.a r0 = r6.f749r
            r0.c()
        L37:
            boolean r0 = r6.v0
            if (r0 != 0) goto L42
            boolean r0 = r6.w0
            if (r0 == 0) goto L40
            goto L42
        L40:
            r0 = r2
            goto L43
        L42:
            r0 = r1
        L43:
            androidx.recyclerview.widget.RecyclerView$w r3 = r6.s0
            boolean r4 = r6.H
            if (r4 == 0) goto L63
            androidx.recyclerview.widget.RecyclerView$i r4 = r6.f742a0
            if (r4 == 0) goto L63
            boolean r4 = r6.O
            if (r4 != 0) goto L59
            if (r0 != 0) goto L59
            androidx.recyclerview.widget.RecyclerView$l r5 = r6.f757z
            boolean r5 = r5.f772h
            if (r5 == 0) goto L63
        L59:
            if (r4 == 0) goto L61
            androidx.recyclerview.widget.RecyclerView$d r4 = r6.f756y
            boolean r4 = r4.f759b
            if (r4 == 0) goto L63
        L61:
            r4 = r1
            goto L64
        L63:
            r4 = r2
        L64:
            r3.f821j = r4
            if (r4 == 0) goto L80
            if (r0 == 0) goto L80
            boolean r0 = r6.O
            if (r0 != 0) goto L80
            androidx.recyclerview.widget.RecyclerView$i r0 = r6.f742a0
            if (r0 == 0) goto L7c
            androidx.recyclerview.widget.RecyclerView$l r0 = r6.f757z
            boolean r0 = r0.Y0()
            if (r0 == 0) goto L7c
            r0 = r1
            goto L7d
        L7c:
            r0 = r2
        L7d:
            if (r0 == 0) goto L80
            goto L81
        L80:
            r1 = r2
        L81:
            r3.f822k = r1
            return
        */
        throw new UnsupportedOperationException("Method not decompiled: androidx.recyclerview.widget.RecyclerView.a0():void");
    }

    @Override // android.view.ViewGroup, android.view.View
    public void addFocusables(ArrayList<View> arrayList, int i2, int i3) {
        l lVar = this.f757z;
        if (lVar == null || !lVar.e0()) {
            super.addFocusables(arrayList, i2, i3);
        }
    }

    public void b0(boolean z2) {
        this.P = z2 | this.P;
        this.O = true;
        int iH = this.f750s.h();
        for (int i2 = 0; i2 < iH; i2++) {
            z zVarK = K(this.f750s.g(i2));
            if (zVarK != null && !zVarK.t()) {
                zVarK.b(6);
            }
        }
        Q();
        r rVar = this.f747p;
        int size = rVar.f793c.size();
        for (int i3 = 0; i3 < size; i3++) {
            z zVar = rVar.f793c.get(i3);
            if (zVar != null) {
                zVar.b(6);
                zVar.a(null);
            }
        }
        d dVar = RecyclerView.this.f756y;
        if (dVar == null || !dVar.f759b) {
            rVar.e();
        }
    }

    public void c0(z zVar, i.c cVar) {
        zVar.r(0, 8192);
        if (this.s0.f819h && zVar.o() && !zVar.l() && !zVar.t()) {
            this.f751t.f3240b.i(I(zVar), zVar);
        }
        this.f751t.c(zVar, cVar);
    }

    @Override // android.view.ViewGroup
    public boolean checkLayoutParams(ViewGroup.LayoutParams layoutParams) {
        return (layoutParams instanceof m) && this.f757z.g((m) layoutParams);
    }

    @Override // android.view.View
    public int computeHorizontalScrollExtent() {
        l lVar = this.f757z;
        if (lVar != null && lVar.e()) {
            return this.f757z.k(this.s0);
        }
        return 0;
    }

    @Override // android.view.View
    public int computeHorizontalScrollOffset() {
        l lVar = this.f757z;
        if (lVar != null && lVar.e()) {
            return this.f757z.l(this.s0);
        }
        return 0;
    }

    @Override // android.view.View
    public int computeHorizontalScrollRange() {
        l lVar = this.f757z;
        if (lVar != null && lVar.e()) {
            return this.f757z.m(this.s0);
        }
        return 0;
    }

    @Override // android.view.View
    public int computeVerticalScrollExtent() {
        l lVar = this.f757z;
        if (lVar != null && lVar.f()) {
            return this.f757z.n(this.s0);
        }
        return 0;
    }

    @Override // android.view.View
    public int computeVerticalScrollOffset() {
        l lVar = this.f757z;
        if (lVar != null && lVar.f()) {
            return this.f757z.o(this.s0);
        }
        return 0;
    }

    @Override // android.view.View
    public int computeVerticalScrollRange() {
        l lVar = this.f757z;
        if (lVar != null && lVar.f()) {
            return this.f757z.p(this.s0);
        }
        return 0;
    }

    public void d0() {
        i iVar = this.f742a0;
        if (iVar != null) {
            iVar.f();
        }
        l lVar = this.f757z;
        if (lVar != null) {
            lVar.E0(this.f747p);
            this.f757z.F0(this.f747p);
        }
        this.f747p.b();
    }

    @Override // android.view.View
    public boolean dispatchNestedFling(float f2, float f3, boolean z2) {
        return getScrollingChildHelper().a(f2, f3, z2);
    }

    @Override // android.view.View
    public boolean dispatchNestedPreFling(float f2, float f3) {
        return getScrollingChildHelper().b(f2, f3);
    }

    @Override // android.view.View
    public boolean dispatchNestedPreScroll(int i2, int i3, int[] iArr, int[] iArr2) {
        return getScrollingChildHelper().c(i2, i3, iArr, iArr2, 0);
    }

    @Override // android.view.View
    public boolean dispatchNestedScroll(int i2, int i3, int i4, int i5, int[] iArr) {
        return getScrollingChildHelper().e(i2, i3, i4, i5, iArr);
    }

    @Override // android.view.View
    public boolean dispatchPopulateAccessibilityEvent(AccessibilityEvent accessibilityEvent) {
        onPopulateAccessibilityEvent(accessibilityEvent);
        return true;
    }

    @Override // android.view.ViewGroup, android.view.View
    public void dispatchRestoreInstanceState(SparseArray<Parcelable> sparseArray) {
        dispatchThawSelfOnly(sparseArray);
    }

    @Override // android.view.ViewGroup, android.view.View
    public void dispatchSaveInstanceState(SparseArray<Parcelable> sparseArray) {
        dispatchFreezeSelfOnly(sparseArray);
    }

    @Override // android.view.View
    public void draw(Canvas canvas) {
        boolean z2;
        float paddingRight;
        float paddingBottom;
        super.draw(canvas);
        int size = this.B.size();
        boolean z3 = false;
        for (int i2 = 0; i2 < size; i2++) {
            this.B.get(i2).e(canvas, this, this.s0);
        }
        EdgeEffect edgeEffect = this.T;
        if (edgeEffect == null || edgeEffect.isFinished()) {
            z2 = false;
        } else {
            int iSave = canvas.save();
            int paddingBottom2 = this.f752u ? getPaddingBottom() : 0;
            canvas.rotate(270.0f);
            canvas.translate((-getHeight()) + paddingBottom2, 0.0f);
            EdgeEffect edgeEffect2 = this.T;
            z2 = edgeEffect2 != null && edgeEffect2.draw(canvas);
            canvas.restoreToCount(iSave);
        }
        EdgeEffect edgeEffect3 = this.U;
        if (edgeEffect3 != null && !edgeEffect3.isFinished()) {
            int iSave2 = canvas.save();
            if (this.f752u) {
                canvas.translate(getPaddingLeft(), getPaddingTop());
            }
            EdgeEffect edgeEffect4 = this.U;
            z2 |= edgeEffect4 != null && edgeEffect4.draw(canvas);
            canvas.restoreToCount(iSave2);
        }
        EdgeEffect edgeEffect5 = this.V;
        if (edgeEffect5 != null && !edgeEffect5.isFinished()) {
            int iSave3 = canvas.save();
            int width = getWidth();
            int paddingTop = this.f752u ? getPaddingTop() : 0;
            canvas.rotate(90.0f);
            canvas.translate(-paddingTop, -width);
            EdgeEffect edgeEffect6 = this.V;
            z2 |= edgeEffect6 != null && edgeEffect6.draw(canvas);
            canvas.restoreToCount(iSave3);
        }
        EdgeEffect edgeEffect7 = this.W;
        if (edgeEffect7 != null && !edgeEffect7.isFinished()) {
            int iSave4 = canvas.save();
            canvas.rotate(180.0f);
            if (this.f752u) {
                paddingRight = getPaddingRight() + (-getWidth());
                paddingBottom = getPaddingBottom() + (-getHeight());
            } else {
                paddingRight = -getWidth();
                paddingBottom = -getHeight();
            }
            canvas.translate(paddingRight, paddingBottom);
            EdgeEffect edgeEffect8 = this.W;
            if (edgeEffect8 != null && edgeEffect8.draw(canvas)) {
                z3 = true;
            }
            z2 |= z3;
            canvas.restoreToCount(iSave4);
        }
        if ((z2 || this.f742a0 == null || this.B.size() <= 0 || !this.f742a0.g()) ? z2 : true) {
            AtomicInteger atomicInteger = d.h.j.y.a;
            y.c.k(this);
        }
    }

    @Override // android.view.ViewGroup
    public boolean drawChild(Canvas canvas, View view, long j2) {
        return super.drawChild(canvas, view, j2);
    }

    public final void e0(View view, View view2) {
        View view3 = view2 != null ? view2 : view;
        this.f753v.set(0, 0, view3.getWidth(), view3.getHeight());
        ViewGroup.LayoutParams layoutParams = view3.getLayoutParams();
        if (layoutParams instanceof m) {
            m mVar = (m) layoutParams;
            if (!mVar.f786c) {
                Rect rect = mVar.f785b;
                Rect rect2 = this.f753v;
                rect2.left -= rect.left;
                rect2.right += rect.right;
                rect2.top -= rect.top;
                rect2.bottom += rect.bottom;
            }
        }
        if (view2 != null) {
            offsetDescendantRectToMyCoords(view2, this.f753v);
            offsetRectIntoDescendantCoords(view, this.f753v);
        }
        this.f757z.J0(this, view, this.f753v, !this.H, view2 == null);
    }

    public final void f(z zVar) {
        View view = zVar.f833b;
        boolean z2 = view.getParent() == this;
        this.f747p.k(J(view));
        if (zVar.n()) {
            this.f750s.b(view, -1, view.getLayoutParams(), true);
            return;
        }
        d.p.b.b bVar = this.f750s;
        if (!z2) {
            bVar.a(view, -1, true);
            return;
        }
        int iIndexOfChild = ((d.p.b.v) bVar.a).a.indexOfChild(view);
        if (iIndexOfChild >= 0) {
            bVar.f3237b.h(iIndexOfChild);
            bVar.i(view);
        } else {
            throw new IllegalArgumentException("view is not a child, cannot hide " + view);
        }
    }

    public final void f0() {
        VelocityTracker velocityTracker = this.f745d0;
        if (velocityTracker != null) {
            velocityTracker.clear();
        }
        boolean zIsFinished = false;
        o0(0);
        EdgeEffect edgeEffect = this.T;
        if (edgeEffect != null) {
            edgeEffect.onRelease();
            zIsFinished = this.T.isFinished();
        }
        EdgeEffect edgeEffect2 = this.U;
        if (edgeEffect2 != null) {
            edgeEffect2.onRelease();
            zIsFinished |= this.U.isFinished();
        }
        EdgeEffect edgeEffect3 = this.V;
        if (edgeEffect3 != null) {
            edgeEffect3.onRelease();
            zIsFinished |= this.V.isFinished();
        }
        EdgeEffect edgeEffect4 = this.W;
        if (edgeEffect4 != null) {
            edgeEffect4.onRelease();
            zIsFinished |= this.W.isFinished();
        }
        if (zIsFinished) {
            AtomicInteger atomicInteger = d.h.j.y.a;
            y.c.k(this);
        }
    }

    /* JADX WARN: Removed duplicated region for block: B:138:0x019b  */
    /* JADX WARN: Removed duplicated region for block: B:27:0x0046  */
    /* JADX WARN: Removed duplicated region for block: B:33:0x0059  */
    /* JADX WARN: Removed duplicated region for block: B:34:0x005b  */
    /* JADX WARN: Removed duplicated region for block: B:36:0x005e  */
    /* JADX WARN: Removed duplicated region for block: B:37:0x0060  */
    /* JADX WARN: Removed duplicated region for block: B:40:0x0064  */
    /* JADX WARN: Removed duplicated region for block: B:41:0x0067  */
    /* JADX WARN: Removed duplicated region for block: B:44:0x006e  */
    /* JADX WARN: Removed duplicated region for block: B:45:0x0070  */
    /* JADX WARN: Removed duplicated region for block: B:47:0x0073  */
    @Override // android.view.ViewGroup, android.view.ViewParent
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public android.view.View focusSearch(android.view.View r14, int r15) {
        /*
            Method dump skipped, instruction units count: 420
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: androidx.recyclerview.widget.RecyclerView.focusSearch(android.view.View, int):android.view.View");
    }

    public void g(k kVar) {
        l lVar = this.f757z;
        if (lVar != null) {
            lVar.d("Cannot add item decoration during a scroll  or layout");
        }
        if (this.B.isEmpty()) {
            setWillNotDraw(false);
        }
        this.B.add(kVar);
        Q();
        requestLayout();
    }

    /* JADX WARN: Removed duplicated region for block: B:31:0x00dd  */
    /* JADX WARN: Removed duplicated region for block: B:32:0x00f3  */
    /* JADX WARN: Removed duplicated region for block: B:37:0x0110  */
    /* JADX WARN: Removed duplicated region for block: B:41:0x0118  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public boolean g0(int r19, int r20, android.view.MotionEvent r21) {
        /*
            Method dump skipped, instruction units count: 315
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: androidx.recyclerview.widget.RecyclerView.g0(int, int, android.view.MotionEvent):boolean");
    }

    @Override // android.view.ViewGroup
    public ViewGroup.LayoutParams generateDefaultLayoutParams() {
        l lVar = this.f757z;
        if (lVar != null) {
            return lVar.u();
        }
        throw new IllegalStateException(g.a.a.a.a.g(this, g.a.a.a.a.F("RecyclerView has no LayoutManager")));
    }

    @Override // android.view.ViewGroup
    public ViewGroup.LayoutParams generateLayoutParams(AttributeSet attributeSet) {
        l lVar = this.f757z;
        if (lVar != null) {
            return lVar.v(getContext(), attributeSet);
        }
        throw new IllegalStateException(g.a.a.a.a.g(this, g.a.a.a.a.F("RecyclerView has no LayoutManager")));
    }

    @Override // android.view.ViewGroup
    public ViewGroup.LayoutParams generateLayoutParams(ViewGroup.LayoutParams layoutParams) {
        l lVar = this.f757z;
        if (lVar != null) {
            return lVar.w(layoutParams);
        }
        throw new IllegalStateException(g.a.a.a.a.g(this, g.a.a.a.a.F("RecyclerView has no LayoutManager")));
    }

    @Override // android.view.ViewGroup, android.view.View
    public CharSequence getAccessibilityClassName() {
        return "androidx.recyclerview.widget.RecyclerView";
    }

    public d getAdapter() {
        return this.f756y;
    }

    @Override // android.view.View
    public int getBaseline() {
        l lVar = this.f757z;
        if (lVar == null) {
            return super.getBaseline();
        }
        Objects.requireNonNull(lVar);
        return -1;
    }

    @Override // android.view.ViewGroup
    public int getChildDrawingOrder(int i2, int i3) {
        g gVar = this.A0;
        return gVar == null ? super.getChildDrawingOrder(i2, i3) : gVar.a(i2, i3);
    }

    @Override // android.view.ViewGroup
    public boolean getClipToPadding() {
        return this.f752u;
    }

    public d.p.b.x getCompatAccessibilityDelegate() {
        return this.z0;
    }

    public h getEdgeEffectFactory() {
        return this.S;
    }

    public i getItemAnimator() {
        return this.f742a0;
    }

    public int getItemDecorationCount() {
        return this.B.size();
    }

    public l getLayoutManager() {
        return this.f757z;
    }

    public int getMaxFlingVelocity() {
        return this.l0;
    }

    public int getMinFlingVelocity() {
        return this.k0;
    }

    public long getNanoTime() {
        return System.nanoTime();
    }

    public n getOnFlingListener() {
        return this.j0;
    }

    public boolean getPreserveFocusAfterLayout() {
        return this.o0;
    }

    public q getRecycledViewPool() {
        return this.f747p.d();
    }

    public int getScrollState() {
        return this.f743b0;
    }

    public void h(p pVar) {
        if (this.u0 == null) {
            this.u0 = new ArrayList();
        }
        this.u0.add(pVar);
    }

    public void h0(int i2, int i3, int[] iArr) {
        z zVar;
        l0();
        U();
        int i4 = d.h.f.b.a;
        b.a.a("RV Scroll");
        B(this.s0);
        int iL0 = i2 != 0 ? this.f757z.L0(i2, this.f747p, this.s0) : 0;
        int iN0 = i3 != 0 ? this.f757z.N0(i3, this.f747p, this.s0) : 0;
        b.a.b();
        int iE = this.f750s.e();
        for (int i5 = 0; i5 < iE; i5++) {
            View viewD = this.f750s.d(i5);
            z zVarJ = J(viewD);
            if (zVarJ != null && (zVar = zVarJ.f841j) != null) {
                View view = zVar.f833b;
                int left = viewD.getLeft();
                int top = viewD.getTop();
                if (left != view.getLeft() || top != view.getTop()) {
                    view.layout(left, top, view.getWidth() + left, view.getHeight() + top);
                }
            }
        }
        V(true);
        n0(false);
        if (iArr != null) {
            iArr[0] = iL0;
            iArr[1] = iN0;
        }
    }

    @Override // android.view.View
    public boolean hasNestedScrollingParent() {
        return getScrollingChildHelper().h(0);
    }

    public void i(String str) {
        if (O()) {
            if (str != null) {
                throw new IllegalStateException(str);
            }
            throw new IllegalStateException(g.a.a.a.a.g(this, g.a.a.a.a.F("Cannot call this method while RecyclerView is computing a layout or scrolling")));
        }
        if (this.R > 0) {
            Log.w("RecyclerView", "Cannot call this method in a scroll callback. Scroll callbacks mightbe run during a measure & layout pass where you cannot change theRecyclerView data. Any method call that might change the structureof the RecyclerView or the adapter contents should be postponed tothe next frame.", new IllegalStateException(g.a.a.a.a.g(this, g.a.a.a.a.F(""))));
        }
    }

    public void i0(int i2) {
        if (this.K) {
            return;
        }
        p0();
        l lVar = this.f757z;
        if (lVar == null) {
            Log.e("RecyclerView", "Cannot scroll to position a LayoutManager set. Call setLayoutManager with a non-null argument.");
        } else {
            lVar.M0(i2);
            awakenScrollBars();
        }
    }

    @Override // android.view.View
    public boolean isAttachedToWindow() {
        return this.E;
    }

    @Override // android.view.ViewGroup
    public final boolean isLayoutSuppressed() {
        return this.K;
    }

    @Override // android.view.View
    public boolean isNestedScrollingEnabled() {
        return getScrollingChildHelper().f2784d;
    }

    public final void j() {
        f0();
        setScrollState(0);
    }

    public boolean j0(z zVar, int i2) {
        if (O()) {
            zVar.f849r = i2;
            this.G0.add(zVar);
            return false;
        }
        View view = zVar.f833b;
        AtomicInteger atomicInteger = d.h.j.y.a;
        y.c.s(view, i2);
        return true;
    }

    public void k0(int i2, int i3, Interpolator interpolator, int i4, boolean z2) {
        l lVar = this.f757z;
        if (lVar == null) {
            Log.e("RecyclerView", "Cannot smooth scroll without a LayoutManager set. Call setLayoutManager with a non-null argument.");
            return;
        }
        if (this.K) {
            return;
        }
        if (!lVar.e()) {
            i2 = 0;
        }
        if (!this.f757z.f()) {
            i3 = 0;
        }
        if (i2 == 0 && i3 == 0) {
            return;
        }
        if (!(i4 == Integer.MIN_VALUE || i4 > 0)) {
            scrollBy(i2, i3);
            return;
        }
        if (z2) {
            int i5 = i2 != 0 ? 1 : 0;
            if (i3 != 0) {
                i5 |= 2;
            }
            m0(i5, 1);
        }
        this.p0.b(i2, i3, i4, interpolator);
    }

    public void l() {
        int iH = this.f750s.h();
        for (int i2 = 0; i2 < iH; i2++) {
            z zVarK = K(this.f750s.g(i2));
            if (!zVarK.t()) {
                zVarK.c();
            }
        }
        r rVar = this.f747p;
        int size = rVar.f793c.size();
        for (int i3 = 0; i3 < size; i3++) {
            rVar.f793c.get(i3).c();
        }
        int size2 = rVar.a.size();
        for (int i4 = 0; i4 < size2; i4++) {
            rVar.a.get(i4).c();
        }
        ArrayList<z> arrayList = rVar.f792b;
        if (arrayList != null) {
            int size3 = arrayList.size();
            for (int i5 = 0; i5 < size3; i5++) {
                rVar.f792b.get(i5).c();
            }
        }
    }

    public void l0() {
        int i2 = this.I + 1;
        this.I = i2;
        if (i2 != 1 || this.K) {
            return;
        }
        this.J = false;
    }

    public void m(int i2, int i3) {
        boolean zIsFinished;
        EdgeEffect edgeEffect = this.T;
        if (edgeEffect == null || edgeEffect.isFinished() || i2 <= 0) {
            zIsFinished = false;
        } else {
            this.T.onRelease();
            zIsFinished = this.T.isFinished();
        }
        EdgeEffect edgeEffect2 = this.V;
        if (edgeEffect2 != null && !edgeEffect2.isFinished() && i2 < 0) {
            this.V.onRelease();
            zIsFinished |= this.V.isFinished();
        }
        EdgeEffect edgeEffect3 = this.U;
        if (edgeEffect3 != null && !edgeEffect3.isFinished() && i3 > 0) {
            this.U.onRelease();
            zIsFinished |= this.U.isFinished();
        }
        EdgeEffect edgeEffect4 = this.W;
        if (edgeEffect4 != null && !edgeEffect4.isFinished() && i3 < 0) {
            this.W.onRelease();
            zIsFinished |= this.W.isFinished();
        }
        if (zIsFinished) {
            AtomicInteger atomicInteger = d.h.j.y.a;
            y.c.k(this);
        }
    }

    public boolean m0(int i2, int i3) {
        return getScrollingChildHelper().i(i2, i3);
    }

    public void n() {
        if (!this.H || this.O) {
            int i2 = d.h.f.b.a;
            b.a.a("RV FullInvalidate");
            q();
            b.a.b();
            return;
        }
        if (this.f749r.g()) {
            Objects.requireNonNull(this.f749r);
            if (this.f749r.g()) {
                int i3 = d.h.f.b.a;
                b.a.a("RV FullInvalidate");
                q();
                b.a.b();
            }
        }
    }

    public void n0(boolean z2) {
        if (this.I < 1) {
            this.I = 1;
        }
        if (!z2 && !this.K) {
            this.J = false;
        }
        if (this.I == 1) {
            if (z2 && this.J && !this.K && this.f757z != null && this.f756y != null) {
                q();
            }
            if (!this.K) {
                this.J = false;
            }
        }
        this.I--;
    }

    public void o(int i2, int i3) {
        int paddingRight = getPaddingRight() + getPaddingLeft();
        AtomicInteger atomicInteger = d.h.j.y.a;
        setMeasuredDimension(l.h(i2, paddingRight, y.c.e(this)), l.h(i3, getPaddingBottom() + getPaddingTop(), y.c.d(this)));
    }

    public void o0(int i2) {
        getScrollingChildHelper().j(i2);
    }

    @Override // android.view.ViewGroup, android.view.View
    public void onAttachedToWindow() {
        super.onAttachedToWindow();
        this.Q = 0;
        this.E = true;
        this.H = this.H && !isLayoutRequested();
        l lVar = this.f757z;
        if (lVar != null) {
            lVar.f773i = true;
            lVar.f0();
        }
        this.y0 = false;
        ThreadLocal<d.p.b.m> threadLocal = d.p.b.m.f3315f;
        d.p.b.m mVar = threadLocal.get();
        this.q0 = mVar;
        if (mVar == null) {
            this.q0 = new d.p.b.m();
            AtomicInteger atomicInteger = d.h.j.y.a;
            Display displayB = y.d.b(this);
            float f2 = 60.0f;
            if (!isInEditMode() && displayB != null) {
                float refreshRate = displayB.getRefreshRate();
                if (refreshRate >= 30.0f) {
                    f2 = refreshRate;
                }
            }
            d.p.b.m mVar2 = this.q0;
            mVar2.f3319p = (long) (1.0E9f / f2);
            threadLocal.set(mVar2);
        }
        this.q0.f3317n.add(this);
    }

    @Override // android.view.ViewGroup, android.view.View
    public void onDetachedFromWindow() {
        super.onDetachedFromWindow();
        i iVar = this.f742a0;
        if (iVar != null) {
            iVar.f();
        }
        p0();
        this.E = false;
        l lVar = this.f757z;
        if (lVar != null) {
            r rVar = this.f747p;
            lVar.f773i = false;
            lVar.h0(this, rVar);
        }
        this.G0.clear();
        removeCallbacks(this.H0);
        Objects.requireNonNull(this.f751t);
        while (b0.a.a.a() != null) {
        }
        d.p.b.m mVar = this.q0;
        if (mVar != null) {
            mVar.f3317n.remove(this);
            this.q0 = null;
        }
    }

    @Override // android.view.View
    public void onDraw(Canvas canvas) {
        super.onDraw(canvas);
        int size = this.B.size();
        for (int i2 = 0; i2 < size; i2++) {
            this.B.get(i2).d(canvas, this, this.s0);
        }
    }

    /* JADX WARN: Removed duplicated region for block: B:28:0x0062  */
    /* JADX WARN: Removed duplicated region for block: B:31:0x0068  */
    /* JADX WARN: Removed duplicated region for block: B:33:0x006c  */
    @Override // android.view.View
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public boolean onGenericMotionEvent(android.view.MotionEvent r6) {
        /*
            r5 = this;
            androidx.recyclerview.widget.RecyclerView$l r0 = r5.f757z
            r1 = 0
            if (r0 != 0) goto L6
            return r1
        L6:
            boolean r0 = r5.K
            if (r0 == 0) goto Lb
            return r1
        Lb:
            int r0 = r6.getAction()
            r2 = 8
            if (r0 != r2) goto L77
            int r0 = r6.getSource()
            r0 = r0 & 2
            r2 = 0
            if (r0 == 0) goto L3e
            androidx.recyclerview.widget.RecyclerView$l r0 = r5.f757z
            boolean r0 = r0.f()
            if (r0 == 0) goto L2c
            r0 = 9
            float r0 = r6.getAxisValue(r0)
            float r0 = -r0
            goto L2d
        L2c:
            r0 = r2
        L2d:
            androidx.recyclerview.widget.RecyclerView$l r3 = r5.f757z
            boolean r3 = r3.e()
            if (r3 == 0) goto L3c
            r3 = 10
            float r3 = r6.getAxisValue(r3)
            goto L64
        L3c:
            r3 = r2
            goto L64
        L3e:
            int r0 = r6.getSource()
            r3 = 4194304(0x400000, float:5.877472E-39)
            r0 = r0 & r3
            if (r0 == 0) goto L62
            r0 = 26
            float r0 = r6.getAxisValue(r0)
            androidx.recyclerview.widget.RecyclerView$l r3 = r5.f757z
            boolean r3 = r3.f()
            if (r3 == 0) goto L57
            float r0 = -r0
            goto L3c
        L57:
            androidx.recyclerview.widget.RecyclerView$l r3 = r5.f757z
            boolean r3 = r3.e()
            if (r3 == 0) goto L62
            r3 = r0
            r0 = r2
            goto L64
        L62:
            r0 = r2
            r3 = r0
        L64:
            int r4 = (r0 > r2 ? 1 : (r0 == r2 ? 0 : -1))
            if (r4 != 0) goto L6c
            int r2 = (r3 > r2 ? 1 : (r3 == r2 ? 0 : -1))
            if (r2 == 0) goto L77
        L6c:
            float r2 = r5.m0
            float r3 = r3 * r2
            int r2 = (int) r3
            float r3 = r5.n0
            float r0 = r0 * r3
            int r0 = (int) r0
            r5.g0(r2, r0, r6)
        L77:
            return r1
        */
        throw new UnsupportedOperationException("Method not decompiled: androidx.recyclerview.widget.RecyclerView.onGenericMotionEvent(android.view.MotionEvent):boolean");
    }

    /* JADX WARN: Multi-variable type inference failed */
    @Override // android.view.ViewGroup
    public boolean onInterceptTouchEvent(MotionEvent motionEvent) {
        boolean z2;
        if (this.K) {
            return false;
        }
        this.D = null;
        if (D(motionEvent)) {
            j();
            return true;
        }
        l lVar = this.f757z;
        if (lVar == null) {
            return false;
        }
        boolean zE = lVar.e();
        boolean zF = this.f757z.f();
        if (this.f745d0 == null) {
            this.f745d0 = VelocityTracker.obtain();
        }
        this.f745d0.addMovement(motionEvent);
        int actionMasked = motionEvent.getActionMasked();
        int actionIndex = motionEvent.getActionIndex();
        if (actionMasked == 0) {
            if (this.L) {
                this.L = false;
            }
            this.f744c0 = motionEvent.getPointerId(0);
            int x2 = (int) (motionEvent.getX() + 0.5f);
            this.g0 = x2;
            this.e0 = x2;
            int y2 = (int) (motionEvent.getY() + 0.5f);
            this.h0 = y2;
            this.f0 = y2;
            if (this.f743b0 == 2) {
                getParent().requestDisallowInterceptTouchEvent(true);
                setScrollState(1);
                o0(1);
            }
            int[] iArr = this.E0;
            iArr[1] = 0;
            iArr[0] = 0;
            int i2 = zE;
            if (zF) {
                i2 = (zE ? 1 : 0) | 2;
            }
            m0(i2, 0);
        } else if (actionMasked == 1) {
            this.f745d0.clear();
            o0(0);
        } else if (actionMasked == 2) {
            int iFindPointerIndex = motionEvent.findPointerIndex(this.f744c0);
            if (iFindPointerIndex < 0) {
                StringBuilder sbF = g.a.a.a.a.F("Error processing scroll; pointer index for id ");
                sbF.append(this.f744c0);
                sbF.append(" not found. Did any MotionEvents get skipped?");
                Log.e("RecyclerView", sbF.toString());
                return false;
            }
            int x3 = (int) (motionEvent.getX(iFindPointerIndex) + 0.5f);
            int y3 = (int) (motionEvent.getY(iFindPointerIndex) + 0.5f);
            if (this.f743b0 != 1) {
                int i3 = x3 - this.e0;
                int i4 = y3 - this.f0;
                if (!zE || Math.abs(i3) <= this.i0) {
                    z2 = false;
                } else {
                    this.g0 = x3;
                    z2 = true;
                }
                if (zF && Math.abs(i4) > this.i0) {
                    this.h0 = y3;
                    z2 = true;
                }
                if (z2) {
                    setScrollState(1);
                }
            }
        } else if (actionMasked == 3) {
            j();
        } else if (actionMasked == 5) {
            this.f744c0 = motionEvent.getPointerId(actionIndex);
            int x4 = (int) (motionEvent.getX(actionIndex) + 0.5f);
            this.g0 = x4;
            this.e0 = x4;
            int y4 = (int) (motionEvent.getY(actionIndex) + 0.5f);
            this.h0 = y4;
            this.f0 = y4;
        } else if (actionMasked == 6) {
            W(motionEvent);
        }
        return this.f743b0 == 1;
    }

    @Override // android.view.ViewGroup, android.view.View
    public void onLayout(boolean z2, int i2, int i3, int i4, int i5) {
        int i6 = d.h.f.b.a;
        b.a.a("RV OnLayout");
        q();
        b.a.b();
        this.H = true;
    }

    @Override // android.view.View
    public void onMeasure(int i2, int i3) {
        l lVar = this.f757z;
        if (lVar == null) {
            o(i2, i3);
            return;
        }
        boolean z2 = false;
        if (!lVar.W()) {
            if (this.F) {
                this.f757z.w0(i2, i3);
                return;
            }
            w wVar = this.s0;
            if (wVar.f822k) {
                setMeasuredDimension(getMeasuredWidth(), getMeasuredHeight());
                return;
            }
            d dVar = this.f756y;
            if (dVar != null) {
                wVar.f816e = dVar.a();
            } else {
                wVar.f816e = 0;
            }
            l0();
            this.f757z.w0(i2, i3);
            n0(false);
            this.s0.f818g = false;
            return;
        }
        int mode = View.MeasureSpec.getMode(i2);
        int mode2 = View.MeasureSpec.getMode(i3);
        this.f757z.w0(i2, i3);
        if (mode == 1073741824 && mode2 == 1073741824) {
            z2 = true;
        }
        if (z2 || this.f756y == null) {
            return;
        }
        if (this.s0.f815d == 1) {
            r();
        }
        this.f757z.P0(i2, i3);
        this.s0.f820i = true;
        s();
        this.f757z.R0(i2, i3);
        if (this.f757z.U0()) {
            this.f757z.P0(View.MeasureSpec.makeMeasureSpec(getMeasuredWidth(), Pow2.MAX_POW2), View.MeasureSpec.makeMeasureSpec(getMeasuredHeight(), Pow2.MAX_POW2));
            this.s0.f820i = true;
            s();
            this.f757z.R0(i2, i3);
        }
    }

    @Override // android.view.ViewGroup
    public boolean onRequestFocusInDescendants(int i2, Rect rect) {
        if (O()) {
            return false;
        }
        return super.onRequestFocusInDescendants(i2, rect);
    }

    @Override // android.view.View
    public void onRestoreInstanceState(Parcelable parcelable) {
        Parcelable parcelable2;
        if (!(parcelable instanceof u)) {
            super.onRestoreInstanceState(parcelable);
            return;
        }
        u uVar = (u) parcelable;
        this.f748q = uVar;
        super.onRestoreInstanceState(uVar.f2846m);
        l lVar = this.f757z;
        if (lVar == null || (parcelable2 = this.f748q.f799n) == null) {
            return;
        }
        lVar.z0(parcelable2);
    }

    @Override // android.view.View
    public Parcelable onSaveInstanceState() {
        u uVar = new u(super.onSaveInstanceState());
        u uVar2 = this.f748q;
        if (uVar2 != null) {
            uVar.f799n = uVar2.f799n;
        } else {
            l lVar = this.f757z;
            uVar.f799n = lVar != null ? lVar.A0() : null;
        }
        return uVar;
    }

    @Override // android.view.View
    public void onSizeChanged(int i2, int i3, int i4, int i5) {
        super.onSizeChanged(i2, i3, i4, i5);
        if (i2 == i4 && i3 == i5) {
            return;
        }
        N();
    }

    /* JADX WARN: Multi-variable type inference failed */
    /* JADX WARN: Removed duplicated region for block: B:154:0x025b  */
    /* JADX WARN: Removed duplicated region for block: B:166:0x0283  */
    /* JADX WARN: Removed duplicated region for block: B:216:0x0325  */
    /* JADX WARN: Removed duplicated region for block: B:217:0x0327  */
    /* JADX WARN: Removed duplicated region for block: B:219:0x032f  */
    /* JADX WARN: Removed duplicated region for block: B:236:0x03a4  */
    /* JADX WARN: Removed duplicated region for block: B:245:0x03d5  */
    /* JADX WARN: Removed duplicated region for block: B:246:0x03dd  */
    /* JADX WARN: Removed duplicated region for block: B:57:0x00f5 A[PHI: r8
      0x00f5: PHI (r8v20 int) = (r8v16 int), (r8v24 int) binds: [B:50:0x00e0, B:55:0x00f1] A[DONT_GENERATE, DONT_INLINE]] */
    /* JADX WARN: Type inference failed for: r21v1 */
    /* JADX WARN: Type inference failed for: r21v13 */
    /* JADX WARN: Type inference failed for: r21v14 */
    /* JADX WARN: Type inference failed for: r21v2 */
    /* JADX WARN: Type inference failed for: r21v3 */
    /* JADX WARN: Type inference failed for: r21v4 */
    /* JADX WARN: Type inference failed for: r2v35 */
    /* JADX WARN: Type inference failed for: r2v36 */
    /* JADX WARN: Type inference failed for: r2v8, types: [int] */
    /* JADX WARN: Type inference failed for: r4v32 */
    /* JADX WARN: Type inference failed for: r4v6 */
    /* JADX WARN: Type inference failed for: r4v7, types: [int] */
    /* JADX WARN: Type inference failed for: r5v12 */
    /* JADX WARN: Type inference failed for: r5v13 */
    /* JADX WARN: Type inference failed for: r5v14 */
    /* JADX WARN: Type inference failed for: r5v15, types: [androidx.recyclerview.widget.RecyclerView] */
    /* JADX WARN: Type inference failed for: r5v16 */
    /* JADX WARN: Type inference failed for: r5v2, types: [androidx.recyclerview.widget.RecyclerView] */
    /* JADX WARN: Type inference failed for: r5v22 */
    /* JADX WARN: Type inference failed for: r5v23 */
    /* JADX WARN: Type inference failed for: r5v24 */
    /* JADX WARN: Type inference failed for: r5v25 */
    /* JADX WARN: Type inference failed for: r5v26 */
    /* JADX WARN: Type inference failed for: r5v27 */
    /* JADX WARN: Type inference failed for: r5v28 */
    /* JADX WARN: Type inference failed for: r5v3, types: [androidx.recyclerview.widget.RecyclerView] */
    /* JADX WARN: Type inference failed for: r5v4 */
    /* JADX WARN: Type inference failed for: r5v8, types: [androidx.recyclerview.widget.RecyclerView] */
    /* JADX WARN: Type inference failed for: r5v9 */
    /* JADX WARN: Type inference failed for: r8v8, types: [d.p.b.u, d.p.b.z] */
    /* JADX WARN: Type inference failed for: r9v4, types: [androidx.recyclerview.widget.RecyclerView$l] */
    @Override // android.view.View
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public boolean onTouchEvent(android.view.MotionEvent r21) {
        /*
            Method dump skipped, instruction units count: 998
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: androidx.recyclerview.widget.RecyclerView.onTouchEvent(android.view.MotionEvent):boolean");
    }

    public void p(View view) {
        z zVarK = K(view);
        T();
        d dVar = this.f756y;
        if (dVar == null || zVarK == null) {
            return;
        }
        Objects.requireNonNull(dVar);
    }

    public void p0() {
        v vVar;
        setScrollState(0);
        this.p0.c();
        l lVar = this.f757z;
        if (lVar == null || (vVar = lVar.f771g) == null) {
            return;
        }
        vVar.d();
    }

    /* JADX WARN: Removed duplicated region for block: B:103:0x0233  */
    /* JADX WARN: Removed duplicated region for block: B:110:0x024b  */
    /* JADX WARN: Removed duplicated region for block: B:114:0x0279  */
    /* JADX WARN: Removed duplicated region for block: B:117:0x0282  */
    /* JADX WARN: Removed duplicated region for block: B:125:0x02bb  */
    /* JADX WARN: Removed duplicated region for block: B:141:0x02ec  */
    /* JADX WARN: Removed duplicated region for block: B:144:0x02fa  */
    /* JADX WARN: Removed duplicated region for block: B:29:0x0070  */
    /* JADX WARN: Removed duplicated region for block: B:71:0x0199  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public void q() {
        /*
            Method dump skipped, instruction units count: 964
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: androidx.recyclerview.widget.RecyclerView.q():void");
    }

    /* JADX WARN: Removed duplicated region for block: B:30:0x0075  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public final void r() {
        /*
            Method dump skipped, instruction units count: 483
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: androidx.recyclerview.widget.RecyclerView.r():void");
    }

    @Override // android.view.ViewGroup
    public void removeDetachedView(View view, boolean z2) {
        z zVarK = K(view);
        if (zVarK != null) {
            if (zVarK.n()) {
                zVarK.f842k &= -257;
            } else if (!zVarK.t()) {
                StringBuilder sb = new StringBuilder();
                sb.append("Called removeDetachedView with a view which is not flagged as tmp detached.");
                sb.append(zVarK);
                throw new IllegalArgumentException(g.a.a.a.a.g(this, sb));
            }
        }
        view.clearAnimation();
        p(view);
        super.removeDetachedView(view, z2);
    }

    @Override // android.view.ViewGroup, android.view.ViewParent
    public void requestChildFocus(View view, View view2) {
        if (!this.f757z.y0(this, view, view2) && view2 != null) {
            e0(view, view2);
        }
        super.requestChildFocus(view, view2);
    }

    @Override // android.view.ViewGroup, android.view.ViewParent
    public boolean requestChildRectangleOnScreen(View view, Rect rect, boolean z2) {
        return this.f757z.J0(this, view, rect, z2, false);
    }

    @Override // android.view.ViewGroup, android.view.ViewParent
    public void requestDisallowInterceptTouchEvent(boolean z2) {
        int size = this.C.size();
        for (int i2 = 0; i2 < size; i2++) {
            this.C.get(i2).c(z2);
        }
        super.requestDisallowInterceptTouchEvent(z2);
    }

    @Override // android.view.View, android.view.ViewParent
    public void requestLayout() {
        if (this.I != 0 || this.K) {
            this.J = true;
        } else {
            super.requestLayout();
        }
    }

    public final void s() {
        l0();
        U();
        this.s0.a(6);
        this.f749r.c();
        this.s0.f816e = this.f756y.a();
        w wVar = this.s0;
        wVar.f814c = 0;
        wVar.f818g = false;
        this.f757z.u0(this.f747p, wVar);
        w wVar2 = this.s0;
        wVar2.f817f = false;
        this.f748q = null;
        wVar2.f821j = wVar2.f821j && this.f742a0 != null;
        wVar2.f815d = 4;
        V(true);
        n0(false);
    }

    @Override // android.view.View
    public void scrollBy(int i2, int i3) {
        l lVar = this.f757z;
        if (lVar == null) {
            Log.e("RecyclerView", "Cannot scroll without a LayoutManager set. Call setLayoutManager with a non-null argument.");
            return;
        }
        if (this.K) {
            return;
        }
        boolean zE = lVar.e();
        boolean zF = this.f757z.f();
        if (zE || zF) {
            if (!zE) {
                i2 = 0;
            }
            if (!zF) {
                i3 = 0;
            }
            g0(i2, i3, null);
        }
    }

    @Override // android.view.View
    public void scrollTo(int i2, int i3) {
        Log.w("RecyclerView", "RecyclerView does not support scrolling to an absolute position. Use scrollToPosition instead");
    }

    @Override // android.view.View, android.view.accessibility.AccessibilityEventSource
    public void sendAccessibilityEventUnchecked(AccessibilityEvent accessibilityEvent) {
        if (O()) {
            int iA = accessibilityEvent != null ? d.h.j.i0.b.a(accessibilityEvent) : 0;
            this.M |= iA != 0 ? iA : 0;
            i = 1;
        }
        if (i != 0) {
            return;
        }
        super.sendAccessibilityEventUnchecked(accessibilityEvent);
    }

    public void setAccessibilityDelegateCompat(d.p.b.x xVar) {
        this.z0 = xVar;
        d.h.j.y.p(this, xVar);
    }

    public void setAdapter(d dVar) {
        setLayoutFrozen(false);
        d dVar2 = this.f756y;
        if (dVar2 != null) {
            dVar2.a.unregisterObserver(this.f746o);
            Objects.requireNonNull(this.f756y);
        }
        d0();
        d.p.b.a aVar = this.f749r;
        aVar.l(aVar.f3225b);
        aVar.l(aVar.f3226c);
        d dVar3 = this.f756y;
        this.f756y = dVar;
        if (dVar != null) {
            dVar.a.registerObserver(this.f746o);
        }
        l lVar = this.f757z;
        if (lVar != null) {
            lVar.d0();
        }
        r rVar = this.f747p;
        d dVar4 = this.f756y;
        rVar.b();
        q qVarD = rVar.d();
        Objects.requireNonNull(qVarD);
        if (dVar3 != null) {
            qVarD.f788b--;
        }
        if (qVarD.f788b == 0) {
            for (int i2 = 0; i2 < qVarD.a.size(); i2++) {
                qVarD.a.valueAt(i2).a.clear();
            }
        }
        if (dVar4 != null) {
            qVarD.f788b++;
        }
        this.s0.f817f = true;
        b0(false);
        requestLayout();
    }

    public void setChildDrawingOrderCallback(g gVar) {
        if (gVar == this.A0) {
            return;
        }
        this.A0 = gVar;
        setChildrenDrawingOrderEnabled(gVar != null);
    }

    @Override // android.view.ViewGroup
    public void setClipToPadding(boolean z2) {
        if (z2 != this.f752u) {
            N();
        }
        this.f752u = z2;
        super.setClipToPadding(z2);
        if (this.H) {
            requestLayout();
        }
    }

    public void setEdgeEffectFactory(h hVar) {
        Objects.requireNonNull(hVar);
        this.S = hVar;
        N();
    }

    public void setHasFixedSize(boolean z2) {
        this.F = z2;
    }

    public void setItemAnimator(i iVar) {
        i iVar2 = this.f742a0;
        if (iVar2 != null) {
            iVar2.f();
            this.f742a0.a = null;
        }
        this.f742a0 = iVar;
        if (iVar != null) {
            iVar.a = this.x0;
        }
    }

    public void setItemViewCacheSize(int i2) {
        r rVar = this.f747p;
        rVar.f795e = i2;
        rVar.l();
    }

    @Deprecated
    public void setLayoutFrozen(boolean z2) {
        suppressLayout(z2);
    }

    public void setLayoutManager(l lVar) {
        if (lVar == this.f757z) {
            return;
        }
        p0();
        if (this.f757z != null) {
            i iVar = this.f742a0;
            if (iVar != null) {
                iVar.f();
            }
            this.f757z.E0(this.f747p);
            this.f757z.F0(this.f747p);
            this.f747p.b();
            if (this.E) {
                l lVar2 = this.f757z;
                r rVar = this.f747p;
                lVar2.f773i = false;
                lVar2.h0(this, rVar);
            }
            this.f757z.S0(null);
            this.f757z = null;
        } else {
            this.f747p.b();
        }
        d.p.b.b bVar = this.f750s;
        b.a aVar = bVar.f3237b;
        aVar.a = 0L;
        b.a aVar2 = aVar.f3239b;
        if (aVar2 != null) {
            aVar2.g();
        }
        int size = bVar.f3238c.size();
        while (true) {
            size--;
            if (size < 0) {
                break;
            }
            b.InterfaceC0045b interfaceC0045b = bVar.a;
            View view = bVar.f3238c.get(size);
            d.p.b.v vVar = (d.p.b.v) interfaceC0045b;
            Objects.requireNonNull(vVar);
            z zVarK = K(view);
            if (zVarK != null) {
                vVar.a.j0(zVarK, zVarK.f848q);
                zVarK.f848q = 0;
            }
            bVar.f3238c.remove(size);
        }
        d.p.b.v vVar2 = (d.p.b.v) bVar.a;
        int iB = vVar2.b();
        for (int i2 = 0; i2 < iB; i2++) {
            View viewA = vVar2.a(i2);
            vVar2.a.p(viewA);
            viewA.clearAnimation();
        }
        vVar2.a.removeAllViews();
        this.f757z = lVar;
        if (lVar != null) {
            if (lVar.f766b != null) {
                StringBuilder sb = new StringBuilder();
                sb.append("LayoutManager ");
                sb.append(lVar);
                sb.append(" is already attached to a RecyclerView:");
                throw new IllegalArgumentException(g.a.a.a.a.g(lVar.f766b, sb));
            }
            lVar.S0(this);
            if (this.E) {
                l lVar3 = this.f757z;
                lVar3.f773i = true;
                lVar3.f0();
            }
        }
        this.f747p.l();
        requestLayout();
    }

    @Override // android.view.ViewGroup
    @Deprecated
    public void setLayoutTransition(LayoutTransition layoutTransition) {
        if (layoutTransition != null) {
            throw new IllegalArgumentException("Providing a LayoutTransition into RecyclerView is not supported. Please use setItemAnimator() instead for animating changes to the items in this RecyclerView");
        }
        super.setLayoutTransition(null);
    }

    @Override // android.view.View
    public void setNestedScrollingEnabled(boolean z2) {
        d.h.j.m scrollingChildHelper = getScrollingChildHelper();
        if (scrollingChildHelper.f2784d) {
            View view = scrollingChildHelper.f2783c;
            AtomicInteger atomicInteger = d.h.j.y.a;
            y.h.z(view);
        }
        scrollingChildHelper.f2784d = z2;
    }

    public void setOnFlingListener(n nVar) {
        this.j0 = nVar;
    }

    @Deprecated
    public void setOnScrollListener(p pVar) {
        this.t0 = pVar;
    }

    public void setPreserveFocusAfterLayout(boolean z2) {
        this.o0 = z2;
    }

    public void setRecycledViewPool(q qVar) {
        r rVar = this.f747p;
        if (rVar.f797g != null) {
            r1.f788b--;
        }
        rVar.f797g = qVar;
        if (qVar == null || RecyclerView.this.getAdapter() == null) {
            return;
        }
        rVar.f797g.f788b++;
    }

    public void setRecyclerListener(s sVar) {
        this.A = sVar;
    }

    public void setScrollState(int i2) {
        v vVar;
        if (i2 == this.f743b0) {
            return;
        }
        this.f743b0 = i2;
        if (i2 != 2) {
            this.p0.c();
            l lVar = this.f757z;
            if (lVar != null && (vVar = lVar.f771g) != null) {
                vVar.d();
            }
        }
        l lVar2 = this.f757z;
        if (lVar2 != null) {
            lVar2.B0(i2);
        }
        X();
        p pVar = this.t0;
        if (pVar != null) {
            pVar.a(this, i2);
        }
        List<p> list = this.u0;
        if (list == null) {
            return;
        }
        int size = list.size();
        while (true) {
            size--;
            if (size < 0) {
                return;
            } else {
                this.u0.get(size).a(this, i2);
            }
        }
    }

    public void setScrollingTouchSlop(int i2) {
        int scaledTouchSlop;
        ViewConfiguration viewConfiguration = ViewConfiguration.get(getContext());
        if (i2 == 0) {
            scaledTouchSlop = viewConfiguration.getScaledTouchSlop();
        } else if (i2 != 1) {
            Log.w("RecyclerView", "setScrollingTouchSlop(): bad argument constant " + i2 + "; using default value");
            scaledTouchSlop = viewConfiguration.getScaledTouchSlop();
        } else {
            scaledTouchSlop = viewConfiguration.getScaledPagingTouchSlop();
        }
        this.i0 = scaledTouchSlop;
    }

    public void setViewCacheExtension(x xVar) {
        Objects.requireNonNull(this.f747p);
    }

    @Override // android.view.View
    public boolean startNestedScroll(int i2) {
        return getScrollingChildHelper().i(i2, 0);
    }

    @Override // android.view.View
    public void stopNestedScroll() {
        getScrollingChildHelper().j(0);
    }

    @Override // android.view.ViewGroup
    public final void suppressLayout(boolean z2) {
        if (z2 != this.K) {
            i("Do not suppressLayout in layout or scroll");
            if (z2) {
                long jUptimeMillis = SystemClock.uptimeMillis();
                onTouchEvent(MotionEvent.obtain(jUptimeMillis, jUptimeMillis, 3, 0.0f, 0.0f, 0));
                this.K = true;
                this.L = true;
                p0();
                return;
            }
            this.K = false;
            if (this.J && this.f757z != null && this.f756y != null) {
                requestLayout();
            }
            this.J = false;
        }
    }

    public boolean t(int i2, int i3, int[] iArr, int[] iArr2, int i4) {
        return getScrollingChildHelper().c(i2, i3, iArr, null, i4);
    }

    public final void u(int i2, int i3, int i4, int i5, int[] iArr, int i6, int[] iArr2) {
        getScrollingChildHelper().f(i2, i3, i4, i5, iArr, i6, iArr2);
    }

    public void v(int i2, int i3) {
        this.R++;
        int scrollX = getScrollX();
        int scrollY = getScrollY();
        onScrollChanged(scrollX, scrollY, scrollX - i2, scrollY - i3);
        Y();
        p pVar = this.t0;
        if (pVar != null) {
            pVar.b(this, i2, i3);
        }
        List<p> list = this.u0;
        if (list != null) {
            for (int size = list.size() - 1; size >= 0; size--) {
                this.u0.get(size).b(this, i2, i3);
            }
        }
        this.R--;
    }

    public void w() {
        int measuredWidth;
        int measuredHeight;
        if (this.W != null) {
            return;
        }
        EdgeEffect edgeEffectA = this.S.a(this);
        this.W = edgeEffectA;
        if (this.f752u) {
            measuredWidth = (getMeasuredWidth() - getPaddingLeft()) - getPaddingRight();
            measuredHeight = (getMeasuredHeight() - getPaddingTop()) - getPaddingBottom();
        } else {
            measuredWidth = getMeasuredWidth();
            measuredHeight = getMeasuredHeight();
        }
        edgeEffectA.setSize(measuredWidth, measuredHeight);
    }

    public void x() {
        int measuredHeight;
        int measuredWidth;
        if (this.T != null) {
            return;
        }
        EdgeEffect edgeEffectA = this.S.a(this);
        this.T = edgeEffectA;
        if (this.f752u) {
            measuredHeight = (getMeasuredHeight() - getPaddingTop()) - getPaddingBottom();
            measuredWidth = (getMeasuredWidth() - getPaddingLeft()) - getPaddingRight();
        } else {
            measuredHeight = getMeasuredHeight();
            measuredWidth = getMeasuredWidth();
        }
        edgeEffectA.setSize(measuredHeight, measuredWidth);
    }

    public void y() {
        int measuredHeight;
        int measuredWidth;
        if (this.V != null) {
            return;
        }
        EdgeEffect edgeEffectA = this.S.a(this);
        this.V = edgeEffectA;
        if (this.f752u) {
            measuredHeight = (getMeasuredHeight() - getPaddingTop()) - getPaddingBottom();
            measuredWidth = (getMeasuredWidth() - getPaddingLeft()) - getPaddingRight();
        } else {
            measuredHeight = getMeasuredHeight();
            measuredWidth = getMeasuredWidth();
        }
        edgeEffectA.setSize(measuredHeight, measuredWidth);
    }

    public void z() {
        int measuredWidth;
        int measuredHeight;
        if (this.U != null) {
            return;
        }
        EdgeEffect edgeEffectA = this.S.a(this);
        this.U = edgeEffectA;
        if (this.f752u) {
            measuredWidth = (getMeasuredWidth() - getPaddingLeft()) - getPaddingRight();
            measuredHeight = (getMeasuredHeight() - getPaddingTop()) - getPaddingBottom();
        } else {
            measuredWidth = getMeasuredWidth();
            measuredHeight = getMeasuredHeight();
        }
        edgeEffectA.setSize(measuredWidth, measuredHeight);
    }
}
