package androidx.recyclerview.widget;

import X6FRs_4.IMuAHx_6.EuDEkJe_12.NzhupJ_29.Mqv2r_3;
import X6FRs_4.YghfZG_14.PGPF6hQ_2.EuDEkJe_12;
import X6FRs_4.YghfZG_14.PGPF6hQ_2.KQgRr5e_0;
import X6FRs_4.YghfZG_14.PGPF6hQ_2.QxJ9d_1;
import X6FRs_4.YghfZG_14.PGPF6hQ_2.WwEq_13;
import X6FRs_4.YghfZG_14.PGPF6hQ_2.X6FRs_4;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.res.Resources;
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.graphics.drawable.Drawable;
import android.graphics.drawable.StateListDrawable;
import android.os.Build;
import android.os.Bundle;
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.FocusFinder;
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.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityManager;
import android.view.animation.Interpolator;
import android.widget.EdgeEffect;
import android.widget.OverScroller;
import androidx.customview.view.AbsSavedState;
import com.wang.avi.BuildConfig;
import java.lang.ref.WeakReference;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
/* loaded from: classes.dex */
public class RecyclerView extends ViewGroup implements X6FRs_4.IMuAHx_6.EuDEkJe_12.Eps4cJe_18, X6FRs_4.IMuAHx_6.EuDEkJe_12.Xgtqvk_8 {
    public static final boolean ALLOW_SIZE_IN_UNSPECIFIED_SPEC;
    public static final boolean ALLOW_THREAD_GAP_WORK;
    public static final boolean DEBUG = false;
    public static final int DEFAULT_ORIENTATION = 1;
    public static final boolean DISPATCH_TEMP_DETACH = false;
    public static final boolean FORCE_ABS_FOCUS_SEARCH_DIRECTION;
    public static final boolean FORCE_INVALIDATE_DISPLAY_LIST;
    public static final long FOREVER_NS = Long.MAX_VALUE;
    public static final int HORIZONTAL = 0;
    public static final boolean IGNORE_DETACHED_FOCUSED_CHILD;
    public static final int INVALID_POINTER = -1;
    public static final int INVALID_TYPE = -1;
    public static final Class<?>[] LAYOUT_MANAGER_CONSTRUCTOR_SIGNATURE;
    public static final int MAX_SCROLL_DURATION = 2000;
    public static final long NO_ID = -1;
    public static final int NO_POSITION = -1;
    public static final boolean POST_UPDATES_ON_ANIMATION;
    public static final int SCROLL_STATE_DRAGGING = 1;
    public static final int SCROLL_STATE_IDLE = 0;
    public static final int SCROLL_STATE_SETTLING = 2;
    public static final String TAG = "RecyclerView";
    public static final int TOUCH_SLOP_DEFAULT = 0;
    public static final int TOUCH_SLOP_PAGING = 1;
    public static final String TRACE_BIND_VIEW_TAG = "RV OnBindView";
    public static final String TRACE_CREATE_VIEW_TAG = "RV CreateView";
    public static final String TRACE_HANDLE_ADAPTER_UPDATES_TAG = "RV PartialInvalidate";
    public static final String TRACE_NESTED_PREFETCH_TAG = "RV Nested Prefetch";
    public static final String TRACE_ON_DATA_SET_CHANGE_LAYOUT_TAG = "RV FullInvalidate";
    public static final String TRACE_ON_LAYOUT_TAG = "RV OnLayout";
    public static final String TRACE_PREFETCH_TAG = "RV Prefetch";
    public static final String TRACE_SCROLL_TAG = "RV Scroll";
    public static final boolean VERBOSE_TRACING = false;
    public static final int VERTICAL = 1;
    public static final Interpolator sQuinticInterpolator;
    public X6FRs_4.YghfZG_14.PGPF6hQ_2.XnFJ5_9 mAccessibilityDelegate;
    public final AccessibilityManager mAccessibilityManager;
    public NQvZgp_17 mActiveOnItemTouchListener;
    public IMuAHx_6 mAdapter;
    public X6FRs_4.YghfZG_14.PGPF6hQ_2.KQgRr5e_0 mAdapterHelper;
    public boolean mAdapterUpdateDuringMeasure;
    public EdgeEffect mBottomGlow;
    public XnFJ5_9 mChildDrawingOrderCallback;
    public X6FRs_4.YghfZG_14.PGPF6hQ_2.QxJ9d_1 mChildHelper;
    public boolean mClipToPadding;
    public boolean mDataSetHasChangedAfterLayout;
    public boolean mDispatchItemsChangedEvent;
    public int mDispatchScrollCounter;
    public int mEatenAccessibilityChangeFlags;
    public Nm6q_10 mEdgeEffectFactory;
    public boolean mEnableFastScroller;
    public boolean mFirstLayoutComplete;
    public X6FRs_4.YghfZG_14.PGPF6hQ_2.X6FRs_4 mGapWorker;
    public boolean mHasFixedSize;
    public boolean mIgnoreMotionEventTillDown;
    public int mInitialTouchX;
    public int mInitialTouchY;
    public int mInterceptRequestLayoutDepth;
    public boolean mIsAttached;
    public KNBe_11 mItemAnimator;
    public KNBe_11.QxJ9d_1 mItemAnimatorListener;
    public Runnable mItemAnimatorRunner;
    public final ArrayList<WwEq_13> mItemDecorations;
    public boolean mItemsAddedOrRemoved;
    public boolean mItemsChanged;
    public int mLastTouchX;
    public int mLastTouchY;
    public YghfZG_14 mLayout;
    public boolean mLayoutFrozen;
    public int mLayoutOrScrollCounter;
    public boolean mLayoutWasDefered;
    public EdgeEffect mLeftGlow;
    public final int mMaxFlingVelocity;
    public final int mMinFlingVelocity;
    public final int[] mMinMaxLayoutPositions;
    public final int[] mNestedOffsets;
    public final H5YG8fq_22 mObserver;
    public List<LGe8pk_15> mOnChildAttachStateListeners;
    public JZJr_16 mOnFlingListener;
    public final ArrayList<NQvZgp_17> mOnItemTouchListeners;
    public final List<WGk6X_27> mPendingAccessibilityImportanceChange;
    public SavedState mPendingSavedState;
    public boolean mPostedAnimatorRunner;
    public X6FRs_4.QxJ9d_1 mPrefetchRegistry;
    public boolean mPreserveFocusAfterLayout;
    public final ZzDuCHW_20 mRecycler;
    public RfjZ_21 mRecyclerListener;
    public EdgeEffect mRightGlow;
    public float mScaledHorizontalScrollFactor;
    public float mScaledVerticalScrollFactor;
    public final int[] mScrollConsumed;
    public Eps4cJe_18 mScrollListener;
    public List<Eps4cJe_18> mScrollListeners;
    public final int[] mScrollOffset;
    public int mScrollPointerId;
    public int mScrollState;
    public final int[] mScrollStepConsumed;
    public X6FRs_4.IMuAHx_6.EuDEkJe_12.KNBe_11 mScrollingChildHelper;
    public final G83uNX_24 mState;
    public final Rect mTempRect;
    public final Rect mTempRect2;
    public final RectF mTempRectF;
    public EdgeEffect mTopGlow;
    public int mTouchSlop;
    public final Runnable mUpdateChildViewsRunnable;
    public VelocityTracker mVelocityTracker;
    public final XDsvEfm_26 mViewFlinger;
    public final WwEq_13.QxJ9d_1 mViewInfoProcessCallback;
    public final X6FRs_4.YghfZG_14.PGPF6hQ_2.WwEq_13 mViewInfoStore;
    public static final int[] NESTED_SCROLLING_ATTRS = {16843830};
    public static final int[] CLIP_TO_PADDING_ATTR = {16842987};

    /* loaded from: classes.dex */
    public static abstract class Eps4cJe_18 {
        public void KQgRr5e_0(RecyclerView recyclerView, int i) {
        }

        public void KQgRr5e_0(RecyclerView recyclerView, int i, int i2) {
        }
    }

    /* loaded from: classes.dex */
    public class EuDEkJe_12 implements KNBe_11.QxJ9d_1 {
        public EuDEkJe_12() {
        }

        @Override // androidx.recyclerview.widget.RecyclerView.KNBe_11.QxJ9d_1
        public void KQgRr5e_0(WGk6X_27 wGk6X_27) {
            wGk6X_27.setIsRecyclable(true);
            if (wGk6X_27.mShadowedHolder != null && wGk6X_27.mShadowingHolder == null) {
                wGk6X_27.mShadowedHolder = null;
            }
            wGk6X_27.mShadowingHolder = null;
            if (wGk6X_27.shouldBeKeptAsChild() || RecyclerView.this.removeAnimatingView(wGk6X_27.itemView) || !wGk6X_27.isTmpDetached()) {
                return;
            }
            RecyclerView.this.removeDetachedView(wGk6X_27.itemView, false);
        }
    }

    /* loaded from: classes.dex */
    public static class FSaI4_7 extends Observable<Xgtqvk_8> {
        /* renamed from: KQgRr5e_0  reason: collision with other method in class */
        public boolean m906KQgRr5e_0() {
            return !((Observable) this).mObservers.isEmpty();
        }

        public void Mqv2r_3(int i, int i2) {
            for (int size = ((Observable) this).mObservers.size() - 1; size >= 0; size--) {
                ((Xgtqvk_8) ((Observable) this).mObservers.get(size)).PGPF6hQ_2(i, i2);
            }
        }

        public void PGPF6hQ_2(int i, int i2) {
            for (int size = ((Observable) this).mObservers.size() - 1; size >= 0; size--) {
                ((Xgtqvk_8) ((Observable) this).mObservers.get(size)).QxJ9d_1(i, i2);
            }
        }

        public void QxJ9d_1(int i, int i2) {
            KQgRr5e_0(i, i2, null);
        }

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

        public void KQgRr5e_0(int i, int i2, Object obj) {
            for (int size = ((Observable) this).mObservers.size() - 1; size >= 0; size--) {
                ((Xgtqvk_8) ((Observable) this).mObservers.get(size)).KQgRr5e_0(i, i2, obj);
            }
        }

        public void KQgRr5e_0(int i, int i2) {
            for (int size = ((Observable) this).mObservers.size() - 1; size >= 0; size--) {
                ((Xgtqvk_8) ((Observable) this).mObservers.get(size)).KQgRr5e_0(i, i2, 1);
            }
        }
    }

    /* loaded from: classes.dex */
    public static class G83uNX_24 {

        /* renamed from: FSaI4_7  reason: collision with root package name */
        public int f3545FSaI4_7;

        /* renamed from: IFxWkV_5  reason: collision with root package name */
        public int f3546IFxWkV_5;

        /* renamed from: IMuAHx_6  reason: collision with root package name */
        public int f3547IMuAHx_6;

        /* renamed from: KQgRr5e_0  reason: collision with other field name */
        public long f2440KQgRr5e_0;

        /* renamed from: KQgRr5e_0  reason: collision with other field name */
        public SparseArray<Object> f2441KQgRr5e_0;

        /* renamed from: Xgtqvk_8  reason: collision with root package name */
        public int f3550Xgtqvk_8;
        public int KQgRr5e_0 = -1;
        public int QxJ9d_1 = 0;
        public int PGPF6hQ_2 = 0;

        /* renamed from: Mqv2r_3  reason: collision with root package name */
        public int f3548Mqv2r_3 = 1;

        /* renamed from: X6FRs_4  reason: collision with root package name */
        public int f3549X6FRs_4 = 0;

        /* renamed from: KQgRr5e_0  reason: collision with other field name */
        public boolean f2442KQgRr5e_0 = false;

        /* renamed from: QxJ9d_1  reason: collision with other field name */
        public boolean f2445QxJ9d_1 = false;

        /* renamed from: PGPF6hQ_2  reason: collision with other field name */
        public boolean f2444PGPF6hQ_2 = false;

        /* renamed from: Mqv2r_3  reason: collision with other field name */
        public boolean f2443Mqv2r_3 = false;

        /* renamed from: X6FRs_4  reason: collision with other field name */
        public boolean f2446X6FRs_4 = false;

        /* renamed from: IFxWkV_5  reason: collision with other field name */
        public boolean f2439IFxWkV_5 = false;

        public void KQgRr5e_0(int i) {
            if ((this.f3548Mqv2r_3 & i) != 0) {
                return;
            }
            throw new IllegalStateException("Layout state should be one of " + Integer.toBinaryString(i) + " but it is " + Integer.toBinaryString(this.f3548Mqv2r_3));
        }

        public boolean PGPF6hQ_2() {
            return this.f2439IFxWkV_5;
        }

        /* renamed from: QxJ9d_1  reason: collision with other method in class */
        public boolean m908QxJ9d_1() {
            return this.f2445QxJ9d_1;
        }

        public String toString() {
            return "State{mTargetPosition=" + this.KQgRr5e_0 + ", mData=" + this.f2441KQgRr5e_0 + ", mItemCount=" + this.f3549X6FRs_4 + ", mIsMeasuring=" + this.f2443Mqv2r_3 + ", mPreviousLayoutItemCount=" + this.QxJ9d_1 + ", mDeletedInvisibleItemCountSincePreviousLayout=" + this.PGPF6hQ_2 + ", mStructureChanged=" + this.f2442KQgRr5e_0 + ", mInPreLayout=" + this.f2445QxJ9d_1 + ", mRunSimpleAnimations=" + this.f2446X6FRs_4 + ", mRunPredictiveAnimations=" + this.f2439IFxWkV_5 + '}';
        }

        public int QxJ9d_1() {
            return this.KQgRr5e_0;
        }

        public void KQgRr5e_0(IMuAHx_6 iMuAHx_6) {
            this.f3548Mqv2r_3 = 1;
            this.f3549X6FRs_4 = iMuAHx_6.getItemCount();
            this.f2445QxJ9d_1 = false;
            this.f2444PGPF6hQ_2 = false;
            this.f2443Mqv2r_3 = false;
        }

        /* renamed from: KQgRr5e_0  reason: collision with other method in class */
        public boolean m907KQgRr5e_0() {
            return this.KQgRr5e_0 != -1;
        }

        public int KQgRr5e_0() {
            return this.f2445QxJ9d_1 ? this.QxJ9d_1 - this.PGPF6hQ_2 : this.f3549X6FRs_4;
        }
    }

    /* loaded from: classes.dex */
    public class IFxWkV_5 implements KQgRr5e_0.InterfaceC0072KQgRr5e_0 {
        public IFxWkV_5() {
        }

        @Override // X6FRs_4.YghfZG_14.PGPF6hQ_2.KQgRr5e_0.InterfaceC0072KQgRr5e_0
        public WGk6X_27 KQgRr5e_0(int i) {
            WGk6X_27 findViewHolderForPosition = RecyclerView.this.findViewHolderForPosition(i, true);
            if (findViewHolderForPosition == null || RecyclerView.this.mChildHelper.m637KQgRr5e_0(findViewHolderForPosition.itemView)) {
                return null;
            }
            return findViewHolderForPosition;
        }

        @Override // X6FRs_4.YghfZG_14.PGPF6hQ_2.KQgRr5e_0.InterfaceC0072KQgRr5e_0
        public void Mqv2r_3(int i, int i2) {
            RecyclerView.this.offsetPositionRecordsForRemove(i, i2, false);
            RecyclerView.this.mItemsAddedOrRemoved = true;
        }

        @Override // X6FRs_4.YghfZG_14.PGPF6hQ_2.KQgRr5e_0.InterfaceC0072KQgRr5e_0
        public void PGPF6hQ_2(int i, int i2) {
            RecyclerView.this.offsetPositionRecordsForRemove(i, i2, true);
            RecyclerView recyclerView = RecyclerView.this;
            recyclerView.mItemsAddedOrRemoved = true;
            recyclerView.mState.PGPF6hQ_2 += i2;
        }

        @Override // X6FRs_4.YghfZG_14.PGPF6hQ_2.KQgRr5e_0.InterfaceC0072KQgRr5e_0
        public void QxJ9d_1(KQgRr5e_0.QxJ9d_1 qxJ9d_1) {
            PGPF6hQ_2(qxJ9d_1);
        }

        @Override // X6FRs_4.YghfZG_14.PGPF6hQ_2.KQgRr5e_0.InterfaceC0072KQgRr5e_0
        public void QxJ9d_1(int i, int i2) {
            RecyclerView.this.offsetPositionRecordsForMove(i, i2);
            RecyclerView.this.mItemsAddedOrRemoved = true;
        }

        @Override // X6FRs_4.YghfZG_14.PGPF6hQ_2.KQgRr5e_0.InterfaceC0072KQgRr5e_0
        public void KQgRr5e_0(int i, int i2, Object obj) {
            RecyclerView.this.viewRangeUpdate(i, i2, obj);
            RecyclerView.this.mItemsChanged = true;
        }

        public void PGPF6hQ_2(KQgRr5e_0.QxJ9d_1 qxJ9d_1) {
            int i = qxJ9d_1.KQgRr5e_0;
            if (i == 1) {
                RecyclerView recyclerView = RecyclerView.this;
                recyclerView.mLayout.KQgRr5e_0(recyclerView, qxJ9d_1.QxJ9d_1, qxJ9d_1.PGPF6hQ_2);
            } else if (i == 2) {
                RecyclerView recyclerView2 = RecyclerView.this;
                recyclerView2.mLayout.QxJ9d_1(recyclerView2, qxJ9d_1.QxJ9d_1, qxJ9d_1.PGPF6hQ_2);
            } else if (i == 4) {
                RecyclerView recyclerView3 = RecyclerView.this;
                recyclerView3.mLayout.KQgRr5e_0(recyclerView3, qxJ9d_1.QxJ9d_1, qxJ9d_1.PGPF6hQ_2, qxJ9d_1.f1358KQgRr5e_0);
            } else if (i != 8) {
            } else {
                RecyclerView recyclerView4 = RecyclerView.this;
                recyclerView4.mLayout.KQgRr5e_0(recyclerView4, qxJ9d_1.QxJ9d_1, qxJ9d_1.PGPF6hQ_2, 1);
            }
        }

        @Override // X6FRs_4.YghfZG_14.PGPF6hQ_2.KQgRr5e_0.InterfaceC0072KQgRr5e_0
        public void KQgRr5e_0(KQgRr5e_0.QxJ9d_1 qxJ9d_1) {
            PGPF6hQ_2(qxJ9d_1);
        }

        @Override // X6FRs_4.YghfZG_14.PGPF6hQ_2.KQgRr5e_0.InterfaceC0072KQgRr5e_0
        public void KQgRr5e_0(int i, int i2) {
            RecyclerView.this.offsetPositionRecordsForInsert(i, i2);
            RecyclerView.this.mItemsAddedOrRemoved = true;
        }
    }

    /* loaded from: classes.dex */
    public static abstract class IMuAHx_6<VH extends WGk6X_27> {
        public final FSaI4_7 mObservable = new FSaI4_7();
        public boolean mHasStableIds = false;

        public final void bindViewHolder(VH vh, int i) {
            vh.mPosition = i;
            if (hasStableIds()) {
                vh.mItemId = getItemId(i);
            }
            vh.setFlags(1, 519);
            X6FRs_4.IMuAHx_6.Xgtqvk_8.KQgRr5e_0.KQgRr5e_0(RecyclerView.TRACE_BIND_VIEW_TAG);
            onBindViewHolder(vh, i, vh.getUnmodifiedPayloads());
            vh.clearPayload();
            ViewGroup.LayoutParams layoutParams = vh.itemView.getLayoutParams();
            if (layoutParams instanceof LayoutParams) {
                ((LayoutParams) layoutParams).f2450KQgRr5e_0 = true;
            }
            X6FRs_4.IMuAHx_6.Xgtqvk_8.KQgRr5e_0.KQgRr5e_0();
        }

        public final VH createViewHolder(ViewGroup viewGroup, int i) {
            try {
                X6FRs_4.IMuAHx_6.Xgtqvk_8.KQgRr5e_0.KQgRr5e_0(RecyclerView.TRACE_CREATE_VIEW_TAG);
                VH onCreateViewHolder = onCreateViewHolder(viewGroup, i);
                if (onCreateViewHolder.itemView.getParent() == null) {
                    onCreateViewHolder.mItemViewType = i;
                    return onCreateViewHolder;
                }
                throw new IllegalStateException("ViewHolder views must not be attached when created. Ensure that you are not passing 'true' to the attachToRoot parameter of LayoutInflater.inflate(..., boolean attachToRoot)");
            } finally {
                X6FRs_4.IMuAHx_6.Xgtqvk_8.KQgRr5e_0.KQgRr5e_0();
            }
        }

        public abstract int getItemCount();

        public long getItemId(int i) {
            return -1L;
        }

        public int getItemViewType(int i) {
            return 0;
        }

        public final boolean hasObservers() {
            return this.mObservable.m906KQgRr5e_0();
        }

        public final boolean hasStableIds() {
            return this.mHasStableIds;
        }

        public final void notifyDataSetChanged() {
            this.mObservable.KQgRr5e_0();
        }

        public final void notifyItemChanged(int i) {
            this.mObservable.QxJ9d_1(i, 1);
        }

        public final void notifyItemInserted(int i) {
            this.mObservable.PGPF6hQ_2(i, 1);
        }

        public final void notifyItemMoved(int i, int i2) {
            this.mObservable.KQgRr5e_0(i, i2);
        }

        public final void notifyItemRangeChanged(int i, int i2) {
            this.mObservable.QxJ9d_1(i, i2);
        }

        public final void notifyItemRangeInserted(int i, int i2) {
            this.mObservable.PGPF6hQ_2(i, i2);
        }

        public final void notifyItemRangeRemoved(int i, int i2) {
            this.mObservable.Mqv2r_3(i, i2);
        }

        public final void notifyItemRemoved(int i) {
            this.mObservable.Mqv2r_3(i, 1);
        }

        public void onAttachedToRecyclerView(RecyclerView recyclerView) {
        }

        public abstract void onBindViewHolder(VH vh, int i);

        public void onBindViewHolder(VH vh, int i, List<Object> list) {
            onBindViewHolder(vh, i);
        }

        public abstract VH onCreateViewHolder(ViewGroup viewGroup, int i);

        public void onDetachedFromRecyclerView(RecyclerView recyclerView) {
        }

        public boolean onFailedToRecycleView(VH vh) {
            return false;
        }

        public void onViewAttachedToWindow(VH vh) {
        }

        public void onViewDetachedFromWindow(VH vh) {
        }

        public void onViewRecycled(VH vh) {
        }

        public void registerAdapterDataObserver(Xgtqvk_8 xgtqvk_8) {
            this.mObservable.registerObserver(xgtqvk_8);
        }

        public void setHasStableIds(boolean z) {
            if (!hasObservers()) {
                this.mHasStableIds = z;
                return;
            }
            throw new IllegalStateException("Cannot change whether this adapter has stable IDs while the adapter has registered observers.");
        }

        public void unregisterAdapterDataObserver(Xgtqvk_8 xgtqvk_8) {
            this.mObservable.unregisterObserver(xgtqvk_8);
        }

        public final void notifyItemChanged(int i, Object obj) {
            this.mObservable.KQgRr5e_0(i, 1, obj);
        }

        public final void notifyItemRangeChanged(int i, int i2, Object obj) {
            this.mObservable.KQgRr5e_0(i, i2, obj);
        }
    }

    /* loaded from: classes.dex */
    public static abstract class JZJr_16 {
        public abstract boolean KQgRr5e_0(int i, int i2);
    }

    /* loaded from: classes.dex */
    public static abstract class KNBe_11 {

        /* renamed from: KQgRr5e_0  reason: collision with other field name */
        public QxJ9d_1 f2447KQgRr5e_0 = null;

        /* renamed from: KQgRr5e_0  reason: collision with other field name */
        public ArrayList<KQgRr5e_0> f2448KQgRr5e_0 = new ArrayList<>();
        public long KQgRr5e_0 = 120;
        public long QxJ9d_1 = 120;
        public long PGPF6hQ_2 = 250;

        /* renamed from: Mqv2r_3  reason: collision with root package name */
        public long f3551Mqv2r_3 = 250;

        /* loaded from: classes.dex */
        public interface KQgRr5e_0 {
            void KQgRr5e_0();
        }

        /* loaded from: classes.dex */
        public static class PGPF6hQ_2 {
            public int KQgRr5e_0;
            public int QxJ9d_1;

            public PGPF6hQ_2 KQgRr5e_0(WGk6X_27 wGk6X_27) {
                KQgRr5e_0(wGk6X_27, 0);
                return this;
            }

            public PGPF6hQ_2 KQgRr5e_0(WGk6X_27 wGk6X_27, int i) {
                View view = wGk6X_27.itemView;
                this.KQgRr5e_0 = view.getLeft();
                this.QxJ9d_1 = view.getTop();
                view.getRight();
                view.getBottom();
                return this;
            }
        }

        /* loaded from: classes.dex */
        public interface QxJ9d_1 {
            void KQgRr5e_0(WGk6X_27 wGk6X_27);
        }

        public long KQgRr5e_0() {
            return this.KQgRr5e_0;
        }

        /* renamed from: KQgRr5e_0  reason: collision with other method in class */
        public abstract boolean m912KQgRr5e_0();

        /* renamed from: KQgRr5e_0  reason: collision with other method in class */
        public abstract boolean m913KQgRr5e_0(WGk6X_27 wGk6X_27);

        public abstract boolean KQgRr5e_0(WGk6X_27 wGk6X_27, PGPF6hQ_2 pGPF6hQ_2, PGPF6hQ_2 pGPF6hQ_22);

        public abstract boolean KQgRr5e_0(WGk6X_27 wGk6X_27, WGk6X_27 wGk6X_272, PGPF6hQ_2 pGPF6hQ_2, PGPF6hQ_2 pGPF6hQ_22);

        public long Mqv2r_3() {
            return this.QxJ9d_1;
        }

        public long PGPF6hQ_2() {
            return this.PGPF6hQ_2;
        }

        /* renamed from: PGPF6hQ_2  reason: collision with other method in class */
        public abstract void m914PGPF6hQ_2();

        public void PGPF6hQ_2(WGk6X_27 wGk6X_27) {
        }

        public abstract boolean PGPF6hQ_2(WGk6X_27 wGk6X_27, PGPF6hQ_2 pGPF6hQ_2, PGPF6hQ_2 pGPF6hQ_22);

        public long QxJ9d_1() {
            return this.f3551Mqv2r_3;
        }

        /* renamed from: QxJ9d_1  reason: collision with other method in class */
        public abstract void m915QxJ9d_1();

        public abstract void QxJ9d_1(WGk6X_27 wGk6X_27);

        public abstract boolean QxJ9d_1(WGk6X_27 wGk6X_27, PGPF6hQ_2 pGPF6hQ_2, PGPF6hQ_2 pGPF6hQ_22);

        public void KQgRr5e_0(QxJ9d_1 qxJ9d_1) {
            this.f2447KQgRr5e_0 = qxJ9d_1;
        }

        public PGPF6hQ_2 KQgRr5e_0(G83uNX_24 g83uNX_24, WGk6X_27 wGk6X_27, int i, List<Object> list) {
            PGPF6hQ_2 m909KQgRr5e_0 = m909KQgRr5e_0();
            m909KQgRr5e_0.KQgRr5e_0(wGk6X_27);
            return m909KQgRr5e_0;
        }

        public PGPF6hQ_2 KQgRr5e_0(G83uNX_24 g83uNX_24, WGk6X_27 wGk6X_27) {
            PGPF6hQ_2 m909KQgRr5e_0 = m909KQgRr5e_0();
            m909KQgRr5e_0.KQgRr5e_0(wGk6X_27);
            return m909KQgRr5e_0;
        }

        public static int KQgRr5e_0(WGk6X_27 wGk6X_27) {
            int i = wGk6X_27.mFlags & 14;
            if (wGk6X_27.isInvalid()) {
                return 4;
            }
            if ((i & 4) == 0) {
                int oldPosition = wGk6X_27.getOldPosition();
                int adapterPosition = wGk6X_27.getAdapterPosition();
                return (oldPosition == -1 || adapterPosition == -1 || oldPosition == adapterPosition) ? i : i | WGk6X_27.FLAG_MOVED;
            }
            return i;
        }

        /* renamed from: KQgRr5e_0  reason: collision with other method in class */
        public final void mo911KQgRr5e_0(WGk6X_27 wGk6X_27) {
            PGPF6hQ_2(wGk6X_27);
            QxJ9d_1 qxJ9d_1 = this.f2447KQgRr5e_0;
            if (qxJ9d_1 != null) {
                qxJ9d_1.KQgRr5e_0(wGk6X_27);
            }
        }

        public boolean KQgRr5e_0(WGk6X_27 wGk6X_27, List<Object> list) {
            return m913KQgRr5e_0(wGk6X_27);
        }

        /* renamed from: KQgRr5e_0  reason: collision with other method in class */
        public final void m910KQgRr5e_0() {
            int size = this.f2448KQgRr5e_0.size();
            for (int i = 0; i < size; i++) {
                this.f2448KQgRr5e_0.get(i).KQgRr5e_0();
            }
            this.f2448KQgRr5e_0.clear();
        }

        /* renamed from: KQgRr5e_0  reason: collision with other method in class */
        public PGPF6hQ_2 m909KQgRr5e_0() {
            return new PGPF6hQ_2();
        }
    }

    /* loaded from: classes.dex */
    public class KQgRr5e_0 implements Runnable {
        public KQgRr5e_0() {
        }

        @Override // java.lang.Runnable
        public void run() {
            RecyclerView recyclerView = RecyclerView.this;
            if (!recyclerView.mFirstLayoutComplete || recyclerView.isLayoutRequested()) {
                return;
            }
            RecyclerView recyclerView2 = RecyclerView.this;
            if (!recyclerView2.mIsAttached) {
                recyclerView2.requestLayout();
            } else if (recyclerView2.mLayoutFrozen) {
                recyclerView2.mLayoutWasDefered = true;
            } else {
                recyclerView2.consumePendingUpdateOperations();
            }
        }
    }

    /* loaded from: classes.dex */
    public static abstract class KVtv3R_25 {
        public abstract View KQgRr5e_0(ZzDuCHW_20 zzDuCHW_20, int i, int i2);
    }

    /* loaded from: classes.dex */
    public interface LGe8pk_15 {
        void KQgRr5e_0(View view);

        void QxJ9d_1(View view);
    }

    /* loaded from: classes.dex */
    public static class LayoutParams extends ViewGroup.MarginLayoutParams {
        public final Rect KQgRr5e_0;

        /* renamed from: KQgRr5e_0  reason: collision with other field name */
        public WGk6X_27 f2449KQgRr5e_0;

        /* renamed from: KQgRr5e_0  reason: collision with other field name */
        public boolean f2450KQgRr5e_0;
        public boolean QxJ9d_1;

        public LayoutParams(Context context, AttributeSet attributeSet) {
            super(context, attributeSet);
            this.KQgRr5e_0 = new Rect();
            this.f2450KQgRr5e_0 = true;
            this.QxJ9d_1 = false;
        }

        /* renamed from: KQgRr5e_0  reason: collision with other method in class */
        public boolean m916KQgRr5e_0() {
            return this.f2449KQgRr5e_0.isUpdated();
        }

        public boolean PGPF6hQ_2() {
            return this.f2449KQgRr5e_0.isInvalid();
        }

        public boolean QxJ9d_1() {
            return this.f2449KQgRr5e_0.isRemoved();
        }

        public int KQgRr5e_0() {
            return this.f2449KQgRr5e_0.getLayoutPosition();
        }

        public LayoutParams(int i, int i2) {
            super(i, i2);
            this.KQgRr5e_0 = new Rect();
            this.f2450KQgRr5e_0 = true;
            this.QxJ9d_1 = false;
        }

        public LayoutParams(ViewGroup.MarginLayoutParams marginLayoutParams) {
            super(marginLayoutParams);
            this.KQgRr5e_0 = new Rect();
            this.f2450KQgRr5e_0 = true;
            this.QxJ9d_1 = false;
        }

        public LayoutParams(ViewGroup.LayoutParams layoutParams) {
            super(layoutParams);
            this.KQgRr5e_0 = new Rect();
            this.f2450KQgRr5e_0 = true;
            this.QxJ9d_1 = false;
        }

        public LayoutParams(LayoutParams layoutParams) {
            super((ViewGroup.LayoutParams) layoutParams);
            this.KQgRr5e_0 = new Rect();
            this.f2450KQgRr5e_0 = true;
            this.QxJ9d_1 = false;
        }
    }

    /* loaded from: classes.dex */
    public class Mqv2r_3 implements WwEq_13.QxJ9d_1 {
        public Mqv2r_3() {
        }

        @Override // X6FRs_4.YghfZG_14.PGPF6hQ_2.WwEq_13.QxJ9d_1
        public void KQgRr5e_0(WGk6X_27 wGk6X_27, KNBe_11.PGPF6hQ_2 pGPF6hQ_2, KNBe_11.PGPF6hQ_2 pGPF6hQ_22) {
            RecyclerView.this.animateAppearance(wGk6X_27, pGPF6hQ_2, pGPF6hQ_22);
        }

        @Override // X6FRs_4.YghfZG_14.PGPF6hQ_2.WwEq_13.QxJ9d_1
        public void PGPF6hQ_2(WGk6X_27 wGk6X_27, KNBe_11.PGPF6hQ_2 pGPF6hQ_2, KNBe_11.PGPF6hQ_2 pGPF6hQ_22) {
            RecyclerView.this.mRecycler.X6FRs_4(wGk6X_27);
            RecyclerView.this.animateDisappearance(wGk6X_27, pGPF6hQ_2, pGPF6hQ_22);
        }

        @Override // X6FRs_4.YghfZG_14.PGPF6hQ_2.WwEq_13.QxJ9d_1
        public void QxJ9d_1(WGk6X_27 wGk6X_27, KNBe_11.PGPF6hQ_2 pGPF6hQ_2, KNBe_11.PGPF6hQ_2 pGPF6hQ_22) {
            wGk6X_27.setIsRecyclable(false);
            RecyclerView recyclerView = RecyclerView.this;
            if (recyclerView.mDataSetHasChangedAfterLayout) {
                if (recyclerView.mItemAnimator.KQgRr5e_0(wGk6X_27, wGk6X_27, pGPF6hQ_2, pGPF6hQ_22)) {
                    RecyclerView.this.postAnimationRunner();
                }
            } else if (recyclerView.mItemAnimator.PGPF6hQ_2(wGk6X_27, pGPF6hQ_2, pGPF6hQ_22)) {
                RecyclerView.this.postAnimationRunner();
            }
        }

        @Override // X6FRs_4.YghfZG_14.PGPF6hQ_2.WwEq_13.QxJ9d_1
        public void KQgRr5e_0(WGk6X_27 wGk6X_27) {
            RecyclerView recyclerView = RecyclerView.this;
            recyclerView.mLayout.KQgRr5e_0(wGk6X_27.itemView, recyclerView.mRecycler);
        }
    }

    /* loaded from: classes.dex */
    public interface NQvZgp_17 {
        void KQgRr5e_0(RecyclerView recyclerView, MotionEvent motionEvent);

        void KQgRr5e_0(boolean z);

        /* renamed from: KQgRr5e_0  reason: collision with other method in class */
        boolean m917KQgRr5e_0(RecyclerView recyclerView, MotionEvent motionEvent);
    }

    /* loaded from: classes.dex */
    public static class Nm6q_10 {
        public EdgeEffect KQgRr5e_0(RecyclerView recyclerView, int i) {
            return new EdgeEffect(recyclerView.getContext());
        }
    }

    /* loaded from: classes.dex */
    public static class PGPF6hQ_2 implements Interpolator {
        @Override // android.animation.TimeInterpolator
        public float getInterpolation(float f) {
            float f2 = f - 1.0f;
            return (f2 * f2 * f2 * f2 * f2) + 1.0f;
        }
    }

    /* loaded from: classes.dex */
    public class QxJ9d_1 implements Runnable {
        public QxJ9d_1() {
        }

        @Override // java.lang.Runnable
        public void run() {
            KNBe_11 kNBe_11 = RecyclerView.this.mItemAnimator;
            if (kNBe_11 != null) {
                kNBe_11.m914PGPF6hQ_2();
            }
            RecyclerView.this.mPostedAnimatorRunner = false;
        }
    }

    /* loaded from: classes.dex */
    public interface RfjZ_21 {
        void KQgRr5e_0(WGk6X_27 wGk6X_27);
    }

    /* loaded from: classes.dex */
    public static abstract class SI64pbG_23 {

        /* renamed from: KQgRr5e_0  reason: collision with other field name */
        public View f2451KQgRr5e_0;

        /* renamed from: KQgRr5e_0  reason: collision with other field name */
        public YghfZG_14 f2453KQgRr5e_0;

        /* renamed from: KQgRr5e_0  reason: collision with other field name */
        public RecyclerView f2454KQgRr5e_0;

        /* renamed from: KQgRr5e_0  reason: collision with other field name */
        public boolean f2455KQgRr5e_0;
        public boolean PGPF6hQ_2;
        public boolean QxJ9d_1;
        public int KQgRr5e_0 = -1;

        /* renamed from: KQgRr5e_0  reason: collision with other field name */
        public final KQgRr5e_0 f2452KQgRr5e_0 = new KQgRr5e_0(0, 0);

        /* loaded from: classes.dex */
        public static class KQgRr5e_0 {
            public int KQgRr5e_0;

            /* renamed from: KQgRr5e_0  reason: collision with other field name */
            public Interpolator f2456KQgRr5e_0;

            /* renamed from: KQgRr5e_0  reason: collision with other field name */
            public boolean f2457KQgRr5e_0;

            /* renamed from: Mqv2r_3  reason: collision with root package name */
            public int f3552Mqv2r_3;
            public int PGPF6hQ_2;
            public int QxJ9d_1;

            /* renamed from: X6FRs_4  reason: collision with root package name */
            public int f3553X6FRs_4;

            public KQgRr5e_0(int i, int i2) {
                this(i, i2, X6FRs_4.Xgtqvk_8.KQgRr5e_0.KQgRr5e_0.INVALID_ID, null);
            }

            public void KQgRr5e_0(int i) {
                this.f3552Mqv2r_3 = i;
            }

            public KQgRr5e_0(int i, int i2, int i3, Interpolator interpolator) {
                this.f3552Mqv2r_3 = -1;
                this.f2457KQgRr5e_0 = false;
                this.f3553X6FRs_4 = 0;
                this.KQgRr5e_0 = i;
                this.QxJ9d_1 = i2;
                this.PGPF6hQ_2 = i3;
                this.f2456KQgRr5e_0 = interpolator;
            }

            /* renamed from: KQgRr5e_0  reason: collision with other method in class */
            public boolean m926KQgRr5e_0() {
                return this.f3552Mqv2r_3 >= 0;
            }

            public void KQgRr5e_0(RecyclerView recyclerView) {
                int i = this.f3552Mqv2r_3;
                if (i >= 0) {
                    this.f3552Mqv2r_3 = -1;
                    recyclerView.jumpToPositionForSmoothScroller(i);
                    this.f2457KQgRr5e_0 = false;
                } else if (this.f2457KQgRr5e_0) {
                    KQgRr5e_0();
                    Interpolator interpolator = this.f2456KQgRr5e_0;
                    if (interpolator == null) {
                        int i2 = this.PGPF6hQ_2;
                        if (i2 == Integer.MIN_VALUE) {
                            recyclerView.mViewFlinger.QxJ9d_1(this.KQgRr5e_0, this.QxJ9d_1);
                        } else {
                            recyclerView.mViewFlinger.KQgRr5e_0(this.KQgRr5e_0, this.QxJ9d_1, i2);
                        }
                    } else {
                        recyclerView.mViewFlinger.KQgRr5e_0(this.KQgRr5e_0, this.QxJ9d_1, this.PGPF6hQ_2, interpolator);
                    }
                    int i3 = this.f3553X6FRs_4 + 1;
                    this.f3553X6FRs_4 = i3;
                    if (i3 > 10) {
                        Log.e(RecyclerView.TAG, "Smooth Scroll action is being updated too frequently. Make sure you are not changing it unless necessary");
                    }
                    this.f2457KQgRr5e_0 = false;
                } else {
                    this.f3553X6FRs_4 = 0;
                }
            }

            public final void KQgRr5e_0() {
                if (this.f2456KQgRr5e_0 != null && this.PGPF6hQ_2 < 1) {
                    throw new IllegalStateException("If you provide an interpolator, you must set a positive duration");
                }
                if (this.PGPF6hQ_2 < 1) {
                    throw new IllegalStateException("Scroll duration must be a positive number");
                }
            }

            public void KQgRr5e_0(int i, int i2, int i3, Interpolator interpolator) {
                this.KQgRr5e_0 = i;
                this.QxJ9d_1 = i2;
                this.PGPF6hQ_2 = i3;
                this.f2456KQgRr5e_0 = interpolator;
                this.f2457KQgRr5e_0 = true;
            }
        }

        /* loaded from: classes.dex */
        public interface QxJ9d_1 {
            PointF KQgRr5e_0(int i);
        }

        /* renamed from: KQgRr5e_0  reason: collision with other method in class */
        public abstract void m920KQgRr5e_0();

        public abstract void KQgRr5e_0(int i, int i2, G83uNX_24 g83uNX_24, KQgRr5e_0 kQgRr5e_0);

        public abstract void KQgRr5e_0(View view, G83uNX_24 g83uNX_24, KQgRr5e_0 kQgRr5e_0);

        public void KQgRr5e_0(RecyclerView recyclerView, YghfZG_14 yghfZG_14) {
            if (this.PGPF6hQ_2) {
                Log.w(RecyclerView.TAG, "An instance of " + getClass().getSimpleName() + " was started more than once. Each instance of" + getClass().getSimpleName() + " is intended to only be used once. You should create a new instance for each use.");
            }
            this.f2454KQgRr5e_0 = recyclerView;
            this.f2453KQgRr5e_0 = yghfZG_14;
            int i = this.KQgRr5e_0;
            if (i != -1) {
                recyclerView.mState.KQgRr5e_0 = i;
                this.QxJ9d_1 = true;
                this.f2455KQgRr5e_0 = true;
                this.f2451KQgRr5e_0 = m918KQgRr5e_0(QxJ9d_1());
                m920KQgRr5e_0();
                this.f2454KQgRr5e_0.mViewFlinger.PGPF6hQ_2();
                this.PGPF6hQ_2 = true;
                return;
            }
            throw new IllegalArgumentException("Invalid target position");
        }

        public final void PGPF6hQ_2() {
            if (this.QxJ9d_1) {
                this.QxJ9d_1 = false;
                m924QxJ9d_1();
                this.f2454KQgRr5e_0.mState.KQgRr5e_0 = -1;
                this.f2451KQgRr5e_0 = null;
                this.KQgRr5e_0 = -1;
                this.f2455KQgRr5e_0 = false;
                this.f2453KQgRr5e_0.KQgRr5e_0(this);
                this.f2453KQgRr5e_0 = null;
                this.f2454KQgRr5e_0 = null;
            }
        }

        /* renamed from: QxJ9d_1  reason: collision with other method in class */
        public abstract void m924QxJ9d_1();

        /* renamed from: QxJ9d_1  reason: collision with other method in class */
        public boolean m925QxJ9d_1() {
            return this.QxJ9d_1;
        }

        public int QxJ9d_1() {
            return this.KQgRr5e_0;
        }

        /* renamed from: KQgRr5e_0  reason: collision with other method in class */
        public void m921KQgRr5e_0(int i) {
            this.KQgRr5e_0 = i;
        }

        public PointF KQgRr5e_0(int i) {
            YghfZG_14 m919KQgRr5e_0 = m919KQgRr5e_0();
            if (m919KQgRr5e_0 instanceof QxJ9d_1) {
                return ((QxJ9d_1) m919KQgRr5e_0).KQgRr5e_0(i);
            }
            Log.w(RecyclerView.TAG, "You should override computeScrollVectorForPosition when the LayoutManager does not implement " + QxJ9d_1.class.getCanonicalName());
            return null;
        }

        /* renamed from: KQgRr5e_0  reason: collision with other method in class */
        public YghfZG_14 m919KQgRr5e_0() {
            return this.f2453KQgRr5e_0;
        }

        /* renamed from: KQgRr5e_0  reason: collision with other method in class */
        public boolean m923KQgRr5e_0() {
            return this.f2455KQgRr5e_0;
        }

        public void KQgRr5e_0(int i, int i2) {
            PointF KQgRr5e_02;
            RecyclerView recyclerView = this.f2454KQgRr5e_0;
            if (!this.QxJ9d_1 || this.KQgRr5e_0 == -1 || recyclerView == null) {
                PGPF6hQ_2();
            }
            if (this.f2455KQgRr5e_0 && this.f2451KQgRr5e_0 == null && this.f2453KQgRr5e_0 != null && (KQgRr5e_02 = KQgRr5e_0(this.KQgRr5e_0)) != null && (KQgRr5e_02.x != 0.0f || KQgRr5e_02.y != 0.0f)) {
                recyclerView.scrollStep((int) Math.signum(KQgRr5e_02.x), (int) Math.signum(KQgRr5e_02.y), null);
            }
            this.f2455KQgRr5e_0 = false;
            View view = this.f2451KQgRr5e_0;
            if (view != null) {
                if (KQgRr5e_0(view) == this.KQgRr5e_0) {
                    KQgRr5e_0(this.f2451KQgRr5e_0, recyclerView.mState, this.f2452KQgRr5e_0);
                    this.f2452KQgRr5e_0.KQgRr5e_0(recyclerView);
                    PGPF6hQ_2();
                } else {
                    Log.e(RecyclerView.TAG, "Passed over target position while smooth scrolling.");
                    this.f2451KQgRr5e_0 = null;
                }
            }
            if (this.QxJ9d_1) {
                KQgRr5e_0(i, i2, recyclerView.mState, this.f2452KQgRr5e_0);
                boolean m926KQgRr5e_0 = this.f2452KQgRr5e_0.m926KQgRr5e_0();
                this.f2452KQgRr5e_0.KQgRr5e_0(recyclerView);
                if (m926KQgRr5e_0) {
                    if (this.QxJ9d_1) {
                        this.f2455KQgRr5e_0 = true;
                        recyclerView.mViewFlinger.PGPF6hQ_2();
                        return;
                    }
                    PGPF6hQ_2();
                }
            }
        }

        public int KQgRr5e_0(View view) {
            return this.f2454KQgRr5e_0.getChildLayoutPosition(view);
        }

        public int KQgRr5e_0() {
            return this.f2454KQgRr5e_0.mLayout.QxJ9d_1();
        }

        /* renamed from: KQgRr5e_0  reason: collision with other method in class */
        public View m918KQgRr5e_0(int i) {
            return this.f2454KQgRr5e_0.mLayout.KQgRr5e_0(i);
        }

        /* renamed from: KQgRr5e_0  reason: collision with other method in class */
        public void m922KQgRr5e_0(View view) {
            if (KQgRr5e_0(view) == QxJ9d_1()) {
                this.f2451KQgRr5e_0 = view;
            }
        }

        public void KQgRr5e_0(PointF pointF) {
            float f = pointF.x;
            float f2 = pointF.y;
            float sqrt = (float) Math.sqrt((f * f) + (f2 * f2));
            pointF.x /= sqrt;
            pointF.y /= sqrt;
        }
    }

    /* loaded from: classes.dex */
    public static abstract class WGk6X_27 {
        public static final int FLAG_ADAPTER_FULLUPDATE = 1024;
        public static final int FLAG_ADAPTER_POSITION_UNKNOWN = 512;
        public static final int FLAG_APPEARED_IN_PRE_LAYOUT = 4096;
        public static final int FLAG_BOUNCED_FROM_HIDDEN_LIST = 8192;
        public static final int FLAG_BOUND = 1;
        public static final int FLAG_IGNORE = 128;
        public static final int FLAG_INVALID = 4;
        public static final int FLAG_MOVED = 2048;
        public static final int FLAG_NOT_RECYCLABLE = 16;
        public static final int FLAG_REMOVED = 8;
        public static final int FLAG_RETURNED_FROM_SCRAP = 32;
        public static final int FLAG_SET_A11Y_ITEM_DELEGATE = 16384;
        public static final int FLAG_TMP_DETACHED = 256;
        public static final int FLAG_UPDATE = 2;
        public static final List<Object> FULLUPDATE_PAYLOADS = Collections.emptyList();
        public static final int PENDING_ACCESSIBILITY_STATE_NOT_SET = -1;
        public final View itemView;
        public int mFlags;
        public WeakReference<RecyclerView> mNestedRecyclerView;
        public RecyclerView mOwnerRecyclerView;
        public int mPosition = -1;
        public int mOldPosition = -1;
        public long mItemId = -1;
        public int mItemViewType = -1;
        public int mPreLayoutPosition = -1;
        public WGk6X_27 mShadowedHolder = null;
        public WGk6X_27 mShadowingHolder = null;
        public List<Object> mPayloads = null;
        public List<Object> mUnmodifiedPayloads = null;
        public int mIsRecyclableCount = 0;
        public ZzDuCHW_20 mScrapContainer = null;
        public boolean mInChangeScrap = false;
        public int mWasImportantForAccessibilityBeforeHidden = 0;
        public int mPendingAccessibilityState = -1;

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

        private void createPayloadsIfNeeded() {
            if (this.mPayloads == null) {
                ArrayList arrayList = new ArrayList();
                this.mPayloads = arrayList;
                this.mUnmodifiedPayloads = Collections.unmodifiableList(arrayList);
            }
        }

        public void addChangePayload(Object obj) {
            if (obj == null) {
                addFlags(FLAG_ADAPTER_FULLUPDATE);
            } else if ((1024 & this.mFlags) == 0) {
                createPayloadsIfNeeded();
                this.mPayloads.add(obj);
            }
        }

        public void addFlags(int i) {
            this.mFlags = i | this.mFlags;
        }

        public void clearOldPosition() {
            this.mOldPosition = -1;
            this.mPreLayoutPosition = -1;
        }

        public void clearPayload() {
            List<Object> list = this.mPayloads;
            if (list != null) {
                list.clear();
            }
            this.mFlags &= -1025;
        }

        public void clearReturnedFromScrapFlag() {
            this.mFlags &= -33;
        }

        public void clearTmpDetachFlag() {
            this.mFlags &= -257;
        }

        public boolean doesTransientStatePreventRecycling() {
            return (this.mFlags & 16) == 0 && X6FRs_4.IMuAHx_6.EuDEkJe_12.ZzDuCHW_20.m272X6FRs_4(this.itemView);
        }

        public void flagRemovedAndOffsetPosition(int i, int i2, boolean z) {
            addFlags(8);
            offsetPosition(i2, z);
            this.mPosition = i;
        }

        public final int getAdapterPosition() {
            RecyclerView recyclerView = this.mOwnerRecyclerView;
            if (recyclerView == null) {
                return -1;
            }
            return recyclerView.getAdapterPositionFor(this);
        }

        public final long getItemId() {
            return this.mItemId;
        }

        public final int getItemViewType() {
            return this.mItemViewType;
        }

        public final int getLayoutPosition() {
            int i = this.mPreLayoutPosition;
            return i == -1 ? this.mPosition : i;
        }

        public final int getOldPosition() {
            return this.mOldPosition;
        }

        @Deprecated
        public final int getPosition() {
            int i = this.mPreLayoutPosition;
            return i == -1 ? this.mPosition : i;
        }

        public List<Object> getUnmodifiedPayloads() {
            if ((this.mFlags & FLAG_ADAPTER_FULLUPDATE) == 0) {
                List<Object> list = this.mPayloads;
                if (list != null && list.size() != 0) {
                    return this.mUnmodifiedPayloads;
                }
                return FULLUPDATE_PAYLOADS;
            }
            return FULLUPDATE_PAYLOADS;
        }

        public boolean hasAnyOfTheFlags(int i) {
            return (i & this.mFlags) != 0;
        }

        public boolean isAdapterPositionUnknown() {
            return (this.mFlags & FLAG_ADAPTER_POSITION_UNKNOWN) != 0 || isInvalid();
        }

        public boolean isBound() {
            return (this.mFlags & 1) != 0;
        }

        public boolean isInvalid() {
            return (this.mFlags & 4) != 0;
        }

        public final boolean isRecyclable() {
            return (this.mFlags & 16) == 0 && !X6FRs_4.IMuAHx_6.EuDEkJe_12.ZzDuCHW_20.m272X6FRs_4(this.itemView);
        }

        public boolean isRemoved() {
            return (this.mFlags & 8) != 0;
        }

        public boolean isScrap() {
            return this.mScrapContainer != null;
        }

        public boolean isTmpDetached() {
            return (this.mFlags & FLAG_TMP_DETACHED) != 0;
        }

        public boolean isUpdated() {
            return (this.mFlags & 2) != 0;
        }

        public boolean needsUpdate() {
            return (this.mFlags & 2) != 0;
        }

        public void offsetPosition(int i, boolean z) {
            if (this.mOldPosition == -1) {
                this.mOldPosition = this.mPosition;
            }
            if (this.mPreLayoutPosition == -1) {
                this.mPreLayoutPosition = this.mPosition;
            }
            if (z) {
                this.mPreLayoutPosition += i;
            }
            this.mPosition += i;
            if (this.itemView.getLayoutParams() != null) {
                ((LayoutParams) this.itemView.getLayoutParams()).f2450KQgRr5e_0 = true;
            }
        }

        public void onEnteredHiddenState(RecyclerView recyclerView) {
            int i = this.mPendingAccessibilityState;
            if (i != -1) {
                this.mWasImportantForAccessibilityBeforeHidden = i;
            } else {
                this.mWasImportantForAccessibilityBeforeHidden = X6FRs_4.IMuAHx_6.EuDEkJe_12.ZzDuCHW_20.m269QxJ9d_1(this.itemView);
            }
            recyclerView.setChildImportantForAccessibilityInternal(this, 4);
        }

        public void onLeftHiddenState(RecyclerView recyclerView) {
            recyclerView.setChildImportantForAccessibilityInternal(this, this.mWasImportantForAccessibilityBeforeHidden);
            this.mWasImportantForAccessibilityBeforeHidden = 0;
        }

        public void resetInternal() {
            this.mFlags = 0;
            this.mPosition = -1;
            this.mOldPosition = -1;
            this.mItemId = -1L;
            this.mPreLayoutPosition = -1;
            this.mIsRecyclableCount = 0;
            this.mShadowedHolder = null;
            this.mShadowingHolder = null;
            clearPayload();
            this.mWasImportantForAccessibilityBeforeHidden = 0;
            this.mPendingAccessibilityState = -1;
            RecyclerView.clearNestedRecyclerViewIfNotNested(this);
        }

        public void saveOldPosition() {
            if (this.mOldPosition == -1) {
                this.mOldPosition = this.mPosition;
            }
        }

        public void setFlags(int i, int i2) {
            this.mFlags = (i & i2) | (this.mFlags & (i2 ^ (-1)));
        }

        public final void setIsRecyclable(boolean z) {
            int i = this.mIsRecyclableCount;
            int i2 = z ? i - 1 : i + 1;
            this.mIsRecyclableCount = i2;
            if (i2 < 0) {
                this.mIsRecyclableCount = 0;
                Log.e("View", "isRecyclable decremented below 0: unmatched pair of setIsRecyable() calls for " + this);
            } else if (!z && i2 == 1) {
                this.mFlags |= 16;
            } else if (z && this.mIsRecyclableCount == 0) {
                this.mFlags &= -17;
            }
        }

        public void setScrapContainer(ZzDuCHW_20 zzDuCHW_20, boolean z) {
            this.mScrapContainer = zzDuCHW_20;
            this.mInChangeScrap = z;
        }

        public boolean shouldBeKeptAsChild() {
            return (this.mFlags & 16) != 0;
        }

        public boolean shouldIgnore() {
            return (this.mFlags & FLAG_IGNORE) != 0;
        }

        public void stopIgnoring() {
            this.mFlags &= -129;
        }

        public String toString() {
            StringBuilder sb = new StringBuilder("ViewHolder{" + Integer.toHexString(hashCode()) + " position=" + this.mPosition + " id=" + this.mItemId + ", oldPos=" + this.mOldPosition + ", pLpos:" + this.mPreLayoutPosition);
            if (isScrap()) {
                sb.append(" scrap ");
                sb.append(this.mInChangeScrap ? "[changeScrap]" : "[attachedScrap]");
            }
            if (isInvalid()) {
                sb.append(" invalid");
            }
            if (!isBound()) {
                sb.append(" unbound");
            }
            if (needsUpdate()) {
                sb.append(" update");
            }
            if (isRemoved()) {
                sb.append(" removed");
            }
            if (shouldIgnore()) {
                sb.append(" ignored");
            }
            if (isTmpDetached()) {
                sb.append(" tmpDetached");
            }
            if (!isRecyclable()) {
                sb.append(" not recyclable(" + this.mIsRecyclableCount + ")");
            }
            if (isAdapterPositionUnknown()) {
                sb.append(" undefined adapter position");
            }
            if (this.itemView.getParent() == null) {
                sb.append(" no parent");
            }
            sb.append("}");
            return sb.toString();
        }

        public void unScrap() {
            this.mScrapContainer.X6FRs_4(this);
        }

        public boolean wasReturnedFromScrap() {
            return (this.mFlags & 32) != 0;
        }
    }

    /* loaded from: classes.dex */
    public static abstract class WwEq_13 {
        @Deprecated
        public void KQgRr5e_0(Canvas canvas, RecyclerView recyclerView) {
        }

        public void KQgRr5e_0(Canvas canvas, RecyclerView recyclerView, G83uNX_24 g83uNX_24) {
            KQgRr5e_0(canvas, recyclerView);
        }

        @Deprecated
        public void QxJ9d_1(Canvas canvas, RecyclerView recyclerView) {
        }

        public void QxJ9d_1(Canvas canvas, RecyclerView recyclerView, G83uNX_24 g83uNX_24) {
            QxJ9d_1(canvas, recyclerView);
        }

        @Deprecated
        public void KQgRr5e_0(Rect rect, int i, RecyclerView recyclerView) {
            rect.set(0, 0, 0, 0);
        }

        public void KQgRr5e_0(Rect rect, View view, RecyclerView recyclerView, G83uNX_24 g83uNX_24) {
            KQgRr5e_0(rect, ((LayoutParams) view.getLayoutParams()).KQgRr5e_0(), recyclerView);
        }
    }

    /* loaded from: classes.dex */
    public class X6FRs_4 implements QxJ9d_1.InterfaceC0075QxJ9d_1 {
        public X6FRs_4() {
        }

        @Override // X6FRs_4.YghfZG_14.PGPF6hQ_2.QxJ9d_1.InterfaceC0075QxJ9d_1
        public int KQgRr5e_0() {
            return RecyclerView.this.getChildCount();
        }

        @Override // X6FRs_4.YghfZG_14.PGPF6hQ_2.QxJ9d_1.InterfaceC0075QxJ9d_1
        public void QxJ9d_1(int i) {
            WGk6X_27 childViewHolderInt;
            View KQgRr5e_0 = KQgRr5e_0(i);
            if (KQgRr5e_0 != null && (childViewHolderInt = RecyclerView.getChildViewHolderInt(KQgRr5e_0)) != null) {
                if (childViewHolderInt.isTmpDetached() && !childViewHolderInt.shouldIgnore()) {
                    throw new IllegalArgumentException("called detach on an already detached child " + childViewHolderInt + RecyclerView.this.exceptionLabel());
                }
                childViewHolderInt.addFlags(WGk6X_27.FLAG_TMP_DETACHED);
            }
            RecyclerView.this.detachViewFromParent(i);
        }

        @Override // X6FRs_4.YghfZG_14.PGPF6hQ_2.QxJ9d_1.InterfaceC0075QxJ9d_1
        public void KQgRr5e_0(View view, int i) {
            RecyclerView.this.addView(view, i);
            RecyclerView.this.dispatchChildAttached(view);
        }

        @Override // X6FRs_4.YghfZG_14.PGPF6hQ_2.QxJ9d_1.InterfaceC0075QxJ9d_1
        public int KQgRr5e_0(View view) {
            return RecyclerView.this.indexOfChild(view);
        }

        @Override // X6FRs_4.YghfZG_14.PGPF6hQ_2.QxJ9d_1.InterfaceC0075QxJ9d_1
        public void KQgRr5e_0(int i) {
            View childAt = RecyclerView.this.getChildAt(i);
            if (childAt != null) {
                RecyclerView.this.dispatchChildDetached(childAt);
                childAt.clearAnimation();
            }
            RecyclerView.this.removeViewAt(i);
        }

        @Override // X6FRs_4.YghfZG_14.PGPF6hQ_2.QxJ9d_1.InterfaceC0075QxJ9d_1
        public void QxJ9d_1(View view) {
            WGk6X_27 childViewHolderInt = RecyclerView.getChildViewHolderInt(view);
            if (childViewHolderInt != null) {
                childViewHolderInt.onLeftHiddenState(RecyclerView.this);
            }
        }

        @Override // X6FRs_4.YghfZG_14.PGPF6hQ_2.QxJ9d_1.InterfaceC0075QxJ9d_1
        public View KQgRr5e_0(int i) {
            return RecyclerView.this.getChildAt(i);
        }

        @Override // X6FRs_4.YghfZG_14.PGPF6hQ_2.QxJ9d_1.InterfaceC0075QxJ9d_1
        public void KQgRr5e_0() {
            int KQgRr5e_0 = KQgRr5e_0();
            for (int i = 0; i < KQgRr5e_0; i++) {
                View KQgRr5e_02 = KQgRr5e_0(i);
                RecyclerView.this.dispatchChildDetached(KQgRr5e_02);
                KQgRr5e_02.clearAnimation();
            }
            RecyclerView.this.removeAllViews();
        }

        @Override // X6FRs_4.YghfZG_14.PGPF6hQ_2.QxJ9d_1.InterfaceC0075QxJ9d_1
        public WGk6X_27 KQgRr5e_0(View view) {
            return RecyclerView.getChildViewHolderInt(view);
        }

        @Override // X6FRs_4.YghfZG_14.PGPF6hQ_2.QxJ9d_1.InterfaceC0075QxJ9d_1
        public void KQgRr5e_0(View view, int i, ViewGroup.LayoutParams layoutParams) {
            WGk6X_27 childViewHolderInt = RecyclerView.getChildViewHolderInt(view);
            if (childViewHolderInt != null) {
                if (!childViewHolderInt.isTmpDetached() && !childViewHolderInt.shouldIgnore()) {
                    throw new IllegalArgumentException("Called attach on a child which is not detached: " + childViewHolderInt + RecyclerView.this.exceptionLabel());
                }
                childViewHolderInt.clearTmpDetachFlag();
            }
            RecyclerView.this.attachViewToParent(view, i, layoutParams);
        }

        @Override // X6FRs_4.YghfZG_14.PGPF6hQ_2.QxJ9d_1.InterfaceC0075QxJ9d_1
        public void KQgRr5e_0(View view) {
            WGk6X_27 childViewHolderInt = RecyclerView.getChildViewHolderInt(view);
            if (childViewHolderInt != null) {
                childViewHolderInt.onEnteredHiddenState(RecyclerView.this);
            }
        }
    }

    /* loaded from: classes.dex */
    public static abstract class Xgtqvk_8 {
        public void KQgRr5e_0() {
        }

        public void KQgRr5e_0(int i, int i2) {
        }

        public void KQgRr5e_0(int i, int i2, int i3) {
        }

        public void KQgRr5e_0(int i, int i2, Object obj) {
            KQgRr5e_0(i, i2);
        }

        public void PGPF6hQ_2(int i, int i2) {
        }

        public void QxJ9d_1(int i, int i2) {
        }
    }

    /* loaded from: classes.dex */
    public interface XnFJ5_9 {
        int KQgRr5e_0(int i, int i2);
    }

    /* loaded from: classes.dex */
    public static abstract class YghfZG_14 {

        /* renamed from: IFxWkV_5  reason: collision with root package name */
        public boolean f3554IFxWkV_5;
        public int KQgRr5e_0;

        /* renamed from: KQgRr5e_0  reason: collision with other field name */
        public X6FRs_4.YghfZG_14.PGPF6hQ_2.QxJ9d_1 f2464KQgRr5e_0;

        /* renamed from: KQgRr5e_0  reason: collision with other field name */
        public SI64pbG_23 f2465KQgRr5e_0;

        /* renamed from: KQgRr5e_0  reason: collision with other field name */
        public RecyclerView f2466KQgRr5e_0;

        /* renamed from: Mqv2r_3  reason: collision with root package name */
        public int f3555Mqv2r_3;
        public int PGPF6hQ_2;
        public int QxJ9d_1;

        /* renamed from: X6FRs_4  reason: collision with root package name */
        public int f3556X6FRs_4;

        /* renamed from: KQgRr5e_0  reason: collision with other field name */
        public final EuDEkJe_12.QxJ9d_1 f2462KQgRr5e_0 = new KQgRr5e_0();

        /* renamed from: QxJ9d_1  reason: collision with other field name */
        public final EuDEkJe_12.QxJ9d_1 f2470QxJ9d_1 = new QxJ9d_1();

        /* renamed from: KQgRr5e_0  reason: collision with other field name */
        public X6FRs_4.YghfZG_14.PGPF6hQ_2.EuDEkJe_12 f2463KQgRr5e_0 = new X6FRs_4.YghfZG_14.PGPF6hQ_2.EuDEkJe_12(this.f2462KQgRr5e_0);

        /* renamed from: QxJ9d_1  reason: collision with other field name */
        public X6FRs_4.YghfZG_14.PGPF6hQ_2.EuDEkJe_12 f2471QxJ9d_1 = new X6FRs_4.YghfZG_14.PGPF6hQ_2.EuDEkJe_12(this.f2470QxJ9d_1);

        /* renamed from: KQgRr5e_0  reason: collision with other field name */
        public boolean f2467KQgRr5e_0 = false;

        /* renamed from: QxJ9d_1  reason: collision with other field name */
        public boolean f2472QxJ9d_1 = false;

        /* renamed from: PGPF6hQ_2  reason: collision with other field name */
        public boolean f2469PGPF6hQ_2 = false;

        /* renamed from: Mqv2r_3  reason: collision with other field name */
        public boolean f2468Mqv2r_3 = true;

        /* renamed from: X6FRs_4  reason: collision with other field name */
        public boolean f2473X6FRs_4 = true;

        /* loaded from: classes.dex */
        public class KQgRr5e_0 implements EuDEkJe_12.QxJ9d_1 {
            public KQgRr5e_0() {
            }

            @Override // X6FRs_4.YghfZG_14.PGPF6hQ_2.EuDEkJe_12.QxJ9d_1
            public View KQgRr5e_0(int i) {
                return YghfZG_14.this.QxJ9d_1(i);
            }

            @Override // X6FRs_4.YghfZG_14.PGPF6hQ_2.EuDEkJe_12.QxJ9d_1
            public int QxJ9d_1() {
                return YghfZG_14.this.KNBe_11() - YghfZG_14.this.XnFJ5_9();
            }

            @Override // X6FRs_4.YghfZG_14.PGPF6hQ_2.EuDEkJe_12.QxJ9d_1
            public int KQgRr5e_0() {
                return YghfZG_14.this.Xgtqvk_8();
            }

            @Override // X6FRs_4.YghfZG_14.PGPF6hQ_2.EuDEkJe_12.QxJ9d_1
            public int QxJ9d_1(View view) {
                return YghfZG_14.this.PGPF6hQ_2(view) - ((ViewGroup.MarginLayoutParams) ((LayoutParams) view.getLayoutParams())).leftMargin;
            }

            @Override // X6FRs_4.YghfZG_14.PGPF6hQ_2.EuDEkJe_12.QxJ9d_1
            public int KQgRr5e_0(View view) {
                return YghfZG_14.this.IFxWkV_5(view) + ((ViewGroup.MarginLayoutParams) ((LayoutParams) view.getLayoutParams())).rightMargin;
            }
        }

        /* loaded from: classes.dex */
        public static class Mqv2r_3 {
            public int KQgRr5e_0;

            /* renamed from: KQgRr5e_0  reason: collision with other field name */
            public boolean f2474KQgRr5e_0;
            public int QxJ9d_1;

            /* renamed from: QxJ9d_1  reason: collision with other field name */
            public boolean f2475QxJ9d_1;
        }

        /* loaded from: classes.dex */
        public interface PGPF6hQ_2 {
            void KQgRr5e_0(int i, int i2);
        }

        /* loaded from: classes.dex */
        public class QxJ9d_1 implements EuDEkJe_12.QxJ9d_1 {
            public QxJ9d_1() {
            }

            @Override // X6FRs_4.YghfZG_14.PGPF6hQ_2.EuDEkJe_12.QxJ9d_1
            public View KQgRr5e_0(int i) {
                return YghfZG_14.this.QxJ9d_1(i);
            }

            @Override // X6FRs_4.YghfZG_14.PGPF6hQ_2.EuDEkJe_12.QxJ9d_1
            public int QxJ9d_1() {
                return YghfZG_14.this.PGPF6hQ_2() - YghfZG_14.this.FSaI4_7();
            }

            @Override // X6FRs_4.YghfZG_14.PGPF6hQ_2.EuDEkJe_12.QxJ9d_1
            public int KQgRr5e_0() {
                return YghfZG_14.this.Nm6q_10();
            }

            @Override // X6FRs_4.YghfZG_14.PGPF6hQ_2.EuDEkJe_12.QxJ9d_1
            public int KQgRr5e_0(View view) {
                return YghfZG_14.this.QxJ9d_1(view) + ((ViewGroup.MarginLayoutParams) ((LayoutParams) view.getLayoutParams())).bottomMargin;
            }

            @Override // X6FRs_4.YghfZG_14.PGPF6hQ_2.EuDEkJe_12.QxJ9d_1
            public int QxJ9d_1(View view) {
                return YghfZG_14.this.IMuAHx_6(view) - ((ViewGroup.MarginLayoutParams) ((LayoutParams) view.getLayoutParams())).topMargin;
            }
        }

        public int EuDEkJe_12() {
            return this.QxJ9d_1;
        }

        /* renamed from: FSaI4_7  reason: collision with other method in class */
        public boolean m929FSaI4_7() {
            SI64pbG_23 sI64pbG_23 = this.f2465KQgRr5e_0;
            return sI64pbG_23 != null && sI64pbG_23.m925QxJ9d_1();
        }

        public int IFxWkV_5(G83uNX_24 g83uNX_24) {
            return 0;
        }

        public void IFxWkV_5(int i) {
        }

        public void IFxWkV_5(RecyclerView recyclerView) {
            if (recyclerView == null) {
                this.f2466KQgRr5e_0 = null;
                this.f2464KQgRr5e_0 = null;
                this.f3555Mqv2r_3 = 0;
                this.f3556X6FRs_4 = 0;
            } else {
                this.f2466KQgRr5e_0 = recyclerView;
                this.f2464KQgRr5e_0 = recyclerView.mChildHelper;
                this.f3555Mqv2r_3 = recyclerView.getWidth();
                this.f3556X6FRs_4 = recyclerView.getHeight();
            }
            this.QxJ9d_1 = 1073741824;
            this.PGPF6hQ_2 = 1073741824;
        }

        /* renamed from: IMuAHx_6  reason: collision with other method in class */
        public final boolean m931IMuAHx_6() {
            return this.f2473X6FRs_4;
        }

        public int KNBe_11() {
            return this.f3555Mqv2r_3;
        }

        public int KQgRr5e_0() {
            return -1;
        }

        public int KQgRr5e_0(int i, ZzDuCHW_20 zzDuCHW_20, G83uNX_24 g83uNX_24) {
            return 0;
        }

        public int KQgRr5e_0(G83uNX_24 g83uNX_24) {
            return 0;
        }

        /* renamed from: KQgRr5e_0  reason: collision with other method in class */
        public Parcelable m932KQgRr5e_0() {
            return null;
        }

        public View KQgRr5e_0(View view, int i) {
            return null;
        }

        public View KQgRr5e_0(View view, int i, ZzDuCHW_20 zzDuCHW_20, G83uNX_24 g83uNX_24) {
            return null;
        }

        /* renamed from: KQgRr5e_0  reason: collision with other method in class */
        public abstract LayoutParams m935KQgRr5e_0();

        public void KQgRr5e_0(int i, int i2, G83uNX_24 g83uNX_24, PGPF6hQ_2 pGPF6hQ_2) {
        }

        public void KQgRr5e_0(int i, PGPF6hQ_2 pGPF6hQ_2) {
        }

        public void KQgRr5e_0(Rect rect, int i, int i2) {
            PGPF6hQ_2(KQgRr5e_0(i, rect.width() + Xgtqvk_8() + XnFJ5_9(), IMuAHx_6()), KQgRr5e_0(i2, rect.height() + Nm6q_10() + FSaI4_7(), IFxWkV_5()));
        }

        public void KQgRr5e_0(Parcelable parcelable) {
        }

        /* renamed from: KQgRr5e_0  reason: collision with other method in class */
        public void m940KQgRr5e_0(G83uNX_24 g83uNX_24) {
        }

        public void KQgRr5e_0(IMuAHx_6 iMuAHx_6, IMuAHx_6 iMuAHx_62) {
        }

        public void KQgRr5e_0(RecyclerView recyclerView, int i, int i2) {
        }

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

        /* renamed from: KQgRr5e_0  reason: collision with other method in class */
        public boolean m942KQgRr5e_0() {
            return false;
        }

        public boolean KQgRr5e_0(LayoutParams layoutParams) {
            return layoutParams != null;
        }

        /* renamed from: KQgRr5e_0  reason: collision with other method in class */
        public boolean m943KQgRr5e_0(ZzDuCHW_20 zzDuCHW_20, G83uNX_24 g83uNX_24) {
            return false;
        }

        public boolean KQgRr5e_0(ZzDuCHW_20 zzDuCHW_20, G83uNX_24 g83uNX_24, View view, int i, Bundle bundle) {
            return false;
        }

        public boolean KQgRr5e_0(RecyclerView recyclerView, ArrayList<View> arrayList, int i, int i2) {
            return false;
        }

        public int Mqv2r_3(G83uNX_24 g83uNX_24) {
            return 0;
        }

        public void Mqv2r_3(int i) {
        }

        public void Mqv2r_3(int i, int i2) {
            int QxJ9d_12 = QxJ9d_1();
            if (QxJ9d_12 == 0) {
                this.f2466KQgRr5e_0.defaultOnMeasure(i, i2);
                return;
            }
            int i3 = X6FRs_4.Xgtqvk_8.KQgRr5e_0.KQgRr5e_0.INVALID_ID;
            int i4 = X6FRs_4.Xgtqvk_8.KQgRr5e_0.KQgRr5e_0.INVALID_ID;
            int i5 = Integer.MAX_VALUE;
            int i6 = Integer.MAX_VALUE;
            for (int i7 = 0; i7 < QxJ9d_12; i7++) {
                View QxJ9d_13 = QxJ9d_1(i7);
                Rect rect = this.f2466KQgRr5e_0.mTempRect;
                QxJ9d_1(QxJ9d_13, rect);
                int i8 = rect.left;
                if (i8 < i5) {
                    i5 = i8;
                }
                int i9 = rect.right;
                if (i9 > i3) {
                    i3 = i9;
                }
                int i10 = rect.top;
                if (i10 < i6) {
                    i6 = i10;
                }
                int i11 = rect.bottom;
                if (i11 > i4) {
                    i4 = i11;
                }
            }
            this.f2466KQgRr5e_0.mTempRect.set(i5, i6, i3, i4);
            KQgRr5e_0(this.f2466KQgRr5e_0.mTempRect, i, i2);
        }

        public void Mqv2r_3(RecyclerView recyclerView) {
        }

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

        public int PGPF6hQ_2(G83uNX_24 g83uNX_24) {
            return 0;
        }

        public int PGPF6hQ_2(ZzDuCHW_20 zzDuCHW_20, G83uNX_24 g83uNX_24) {
            return 0;
        }

        @Deprecated
        public void PGPF6hQ_2(RecyclerView recyclerView) {
        }

        public void PGPF6hQ_2(RecyclerView recyclerView, int i, int i2) {
        }

        /* renamed from: PGPF6hQ_2  reason: collision with other method in class */
        public boolean m949PGPF6hQ_2() {
            RecyclerView recyclerView = this.f2466KQgRr5e_0;
            return recyclerView != null && recyclerView.mClipToPadding;
        }

        public int QxJ9d_1(int i, ZzDuCHW_20 zzDuCHW_20, G83uNX_24 g83uNX_24) {
            return 0;
        }

        public int QxJ9d_1(G83uNX_24 g83uNX_24) {
            return 0;
        }

        public void QxJ9d_1(int i, int i2) {
            this.f3555Mqv2r_3 = View.MeasureSpec.getSize(i);
            int mode = View.MeasureSpec.getMode(i);
            this.QxJ9d_1 = mode;
            if (mode == 0 && !RecyclerView.ALLOW_SIZE_IN_UNSPECIFIED_SPEC) {
                this.f3555Mqv2r_3 = 0;
            }
            this.f3556X6FRs_4 = View.MeasureSpec.getSize(i2);
            int mode2 = View.MeasureSpec.getMode(i2);
            this.PGPF6hQ_2 = mode2;
            if (mode2 != 0 || RecyclerView.ALLOW_SIZE_IN_UNSPECIFIED_SPEC) {
                return;
            }
            this.f3556X6FRs_4 = 0;
        }

        public void QxJ9d_1(RecyclerView recyclerView) {
        }

        public void QxJ9d_1(RecyclerView recyclerView, int i, int i2) {
        }

        /* renamed from: QxJ9d_1  reason: collision with other method in class */
        public boolean m953QxJ9d_1() {
            return false;
        }

        public int X6FRs_4(G83uNX_24 g83uNX_24) {
            return 0;
        }

        /* renamed from: X6FRs_4  reason: collision with other method in class */
        public boolean m954X6FRs_4() {
            return this.f2472QxJ9d_1;
        }

        public int Xgtqvk_8(View view) {
            return ((LayoutParams) view.getLayoutParams()).KQgRr5e_0();
        }

        /* renamed from: Xgtqvk_8  reason: collision with other method in class */
        public boolean m955Xgtqvk_8() {
            return false;
        }

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

        /* renamed from: XnFJ5_9  reason: collision with other method in class */
        public boolean m956XnFJ5_9() {
            return false;
        }

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

        public int IMuAHx_6(View view) {
            return view.getTop() - Nm6q_10(view);
        }

        public int Nm6q_10(View view) {
            return ((LayoutParams) view.getLayoutParams()).KQgRr5e_0.top;
        }

        /* renamed from: PGPF6hQ_2  reason: collision with other method in class */
        public void m948PGPF6hQ_2(View view) {
            this.f2464KQgRr5e_0.PGPF6hQ_2(view);
        }

        public int X6FRs_4() {
            return X6FRs_4.IMuAHx_6.EuDEkJe_12.ZzDuCHW_20.Mqv2r_3((View) this.f2466KQgRr5e_0);
        }

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

        public int XnFJ5_9(View view) {
            return ((LayoutParams) view.getLayoutParams()).KQgRr5e_0.right;
        }

        public int FSaI4_7(View view) {
            return ((LayoutParams) view.getLayoutParams()).KQgRr5e_0.left;
        }

        public int IMuAHx_6() {
            return X6FRs_4.IMuAHx_6.EuDEkJe_12.ZzDuCHW_20.IFxWkV_5((View) this.f2466KQgRr5e_0);
        }

        public void PGPF6hQ_2(View view, int i) {
            KQgRr5e_0(view, i, (LayoutParams) view.getLayoutParams());
        }

        public void X6FRs_4(int i) {
            if (QxJ9d_1(i) != null) {
                this.f2464KQgRr5e_0.m639QxJ9d_1(i);
            }
        }

        public int PGPF6hQ_2() {
            return this.f3556X6FRs_4;
        }

        public void PGPF6hQ_2(int i) {
            RecyclerView recyclerView = this.f2466KQgRr5e_0;
            if (recyclerView != null) {
                recyclerView.offsetChildrenVertical(i);
            }
        }

        public int X6FRs_4(View view) {
            Rect rect = ((LayoutParams) view.getLayoutParams()).KQgRr5e_0;
            return view.getMeasuredWidth() + rect.left + rect.right;
        }

        /* renamed from: KQgRr5e_0  reason: collision with other method in class */
        public void m936KQgRr5e_0() {
            RecyclerView recyclerView = this.f2466KQgRr5e_0;
            if (recyclerView != null) {
                recyclerView.requestLayout();
            }
        }

        public void PGPF6hQ_2(ZzDuCHW_20 zzDuCHW_20) {
            int KQgRr5e_02 = zzDuCHW_20.KQgRr5e_0();
            for (int i = KQgRr5e_02 - 1; i >= 0; i--) {
                View m957KQgRr5e_0 = zzDuCHW_20.m957KQgRr5e_0(i);
                WGk6X_27 childViewHolderInt = RecyclerView.getChildViewHolderInt(m957KQgRr5e_0);
                if (!childViewHolderInt.shouldIgnore()) {
                    childViewHolderInt.setIsRecyclable(false);
                    if (childViewHolderInt.isTmpDetached()) {
                        this.f2466KQgRr5e_0.removeDetachedView(m957KQgRr5e_0, false);
                    }
                    KNBe_11 kNBe_11 = this.f2466KQgRr5e_0.mItemAnimator;
                    if (kNBe_11 != null) {
                        kNBe_11.QxJ9d_1(childViewHolderInt);
                    }
                    childViewHolderInt.setIsRecyclable(true);
                    zzDuCHW_20.KQgRr5e_0(m957KQgRr5e_0);
                }
            }
            zzDuCHW_20.PGPF6hQ_2();
            if (KQgRr5e_02 > 0) {
                this.f2466KQgRr5e_0.invalidate();
            }
        }

        public void X6FRs_4(RecyclerView recyclerView) {
            QxJ9d_1(View.MeasureSpec.makeMeasureSpec(recyclerView.getWidth(), 1073741824), View.MeasureSpec.makeMeasureSpec(recyclerView.getHeight(), 1073741824));
        }

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

        public void QxJ9d_1(RecyclerView recyclerView, ZzDuCHW_20 zzDuCHW_20) {
            PGPF6hQ_2(recyclerView);
        }

        public void QxJ9d_1(SI64pbG_23 sI64pbG_23) {
            SI64pbG_23 sI64pbG_232 = this.f2465KQgRr5e_0;
            if (sI64pbG_232 != null && sI64pbG_23 != sI64pbG_232 && sI64pbG_232.m925QxJ9d_1()) {
                this.f2465KQgRr5e_0.PGPF6hQ_2();
            }
            this.f2465KQgRr5e_0 = sI64pbG_23;
            sI64pbG_23.KQgRr5e_0(this.f2466KQgRr5e_0, this);
        }

        /* renamed from: IFxWkV_5  reason: collision with other method in class */
        public boolean m930IFxWkV_5() {
            return this.f2469PGPF6hQ_2;
        }

        public int IFxWkV_5(View view) {
            return view.getRight() + XnFJ5_9(view);
        }

        public void KQgRr5e_0(String str) {
            RecyclerView recyclerView = this.f2466KQgRr5e_0;
            if (recyclerView != null) {
                recyclerView.assertNotInLayoutOrScroll(str);
            }
        }

        public int Mqv2r_3() {
            return this.PGPF6hQ_2;
        }

        public int IFxWkV_5() {
            return X6FRs_4.IMuAHx_6.EuDEkJe_12.ZzDuCHW_20.X6FRs_4((View) this.f2466KQgRr5e_0);
        }

        public int Mqv2r_3(View view) {
            Rect rect = ((LayoutParams) view.getLayoutParams()).KQgRr5e_0;
            return view.getMeasuredHeight() + rect.top + rect.bottom;
        }

        public void KQgRr5e_0(RecyclerView recyclerView) {
            this.f2472QxJ9d_1 = true;
            QxJ9d_1(recyclerView);
        }

        /* renamed from: Mqv2r_3  reason: collision with other method in class */
        public boolean m946Mqv2r_3() {
            int QxJ9d_12 = QxJ9d_1();
            for (int i = 0; i < QxJ9d_12; i++) {
                ViewGroup.LayoutParams layoutParams = QxJ9d_1(i).getLayoutParams();
                if (layoutParams.width < 0 && layoutParams.height < 0) {
                    return true;
                }
            }
            return false;
        }

        /* renamed from: QxJ9d_1  reason: collision with other method in class */
        public void m952QxJ9d_1(View view) {
            QxJ9d_1(view, -1);
        }

        public void KQgRr5e_0(RecyclerView recyclerView, ZzDuCHW_20 zzDuCHW_20) {
            this.f2472QxJ9d_1 = false;
            QxJ9d_1(recyclerView, zzDuCHW_20);
        }

        public void QxJ9d_1(View view, int i) {
            KQgRr5e_0(view, i, false);
        }

        public int QxJ9d_1() {
            X6FRs_4.YghfZG_14.PGPF6hQ_2.QxJ9d_1 qxJ9d_1 = this.f2464KQgRr5e_0;
            if (qxJ9d_1 != null) {
                return qxJ9d_1.KQgRr5e_0();
            }
            return 0;
        }

        public boolean KQgRr5e_0(Runnable runnable) {
            RecyclerView recyclerView = this.f2466KQgRr5e_0;
            if (recyclerView != null) {
                return recyclerView.removeCallbacks(runnable);
            }
            return false;
        }

        public View QxJ9d_1(int i) {
            X6FRs_4.YghfZG_14.PGPF6hQ_2.QxJ9d_1 qxJ9d_1 = this.f2464KQgRr5e_0;
            if (qxJ9d_1 != null) {
                return qxJ9d_1.QxJ9d_1(i);
            }
            return null;
        }

        /* renamed from: QxJ9d_1  reason: collision with other method in class */
        public void m951QxJ9d_1(int i) {
            RecyclerView recyclerView = this.f2466KQgRr5e_0;
            if (recyclerView != null) {
                recyclerView.offsetChildrenHorizontal(i);
            }
        }

        /* renamed from: KQgRr5e_0  reason: collision with other method in class */
        public void m941KQgRr5e_0(ZzDuCHW_20 zzDuCHW_20, G83uNX_24 g83uNX_24) {
            Log.e(RecyclerView.TAG, "You must override onLayoutChildren(Recycler recycler, State state) ");
        }

        public int PGPF6hQ_2(View view) {
            return view.getLeft() - FSaI4_7(view);
        }

        public LayoutParams KQgRr5e_0(ViewGroup.LayoutParams layoutParams) {
            if (layoutParams instanceof LayoutParams) {
                return new LayoutParams((LayoutParams) layoutParams);
            }
            if (layoutParams instanceof ViewGroup.MarginLayoutParams) {
                return new LayoutParams((ViewGroup.MarginLayoutParams) layoutParams);
            }
            return new LayoutParams(layoutParams);
        }

        public void PGPF6hQ_2(int i, int i2) {
            this.f2466KQgRr5e_0.setMeasuredDimension(i, i2);
        }

        public boolean QxJ9d_1(View view, int i, int i2, LayoutParams layoutParams) {
            return (this.f2468Mqv2r_3 && m928KQgRr5e_0(view.getMeasuredWidth(), i, ((ViewGroup.MarginLayoutParams) layoutParams).width) && m928KQgRr5e_0(view.getMeasuredHeight(), i2, ((ViewGroup.MarginLayoutParams) layoutParams).height)) ? false : true;
        }

        /* renamed from: PGPF6hQ_2  reason: collision with other method in class */
        public void m947PGPF6hQ_2() {
            SI64pbG_23 sI64pbG_23 = this.f2465KQgRr5e_0;
            if (sI64pbG_23 != null) {
                sI64pbG_23.PGPF6hQ_2();
            }
        }

        public void QxJ9d_1(View view, Rect rect) {
            RecyclerView.getDecoratedBoundsWithMarginsInt(view, rect);
        }

        public int QxJ9d_1(View view) {
            return view.getBottom() + KQgRr5e_0(view);
        }

        public LayoutParams KQgRr5e_0(Context context, AttributeSet attributeSet) {
            return new LayoutParams(context, attributeSet);
        }

        public void QxJ9d_1(ZzDuCHW_20 zzDuCHW_20) {
            for (int QxJ9d_12 = QxJ9d_1() - 1; QxJ9d_12 >= 0; QxJ9d_12--) {
                if (!RecyclerView.getChildViewHolderInt(QxJ9d_1(QxJ9d_12)).shouldIgnore()) {
                    KQgRr5e_0(QxJ9d_12, zzDuCHW_20);
                }
            }
        }

        public void KQgRr5e_0(RecyclerView recyclerView, G83uNX_24 g83uNX_24, int i) {
            Log.e(RecyclerView.TAG, "You must override smoothScrollToPosition to support smooth scrolling");
        }

        /* renamed from: KQgRr5e_0  reason: collision with other method in class */
        public void m938KQgRr5e_0(View view) {
            m939KQgRr5e_0(view, -1);
        }

        /* renamed from: KQgRr5e_0  reason: collision with other method in class */
        public void m939KQgRr5e_0(View view, int i) {
            KQgRr5e_0(view, i, true);
        }

        public final void KQgRr5e_0(View view, int i, boolean z) {
            WGk6X_27 childViewHolderInt = RecyclerView.getChildViewHolderInt(view);
            if (!z && !childViewHolderInt.isRemoved()) {
                this.f2466KQgRr5e_0.mViewInfoStore.PGPF6hQ_2(childViewHolderInt);
            } else {
                this.f2466KQgRr5e_0.mViewInfoStore.m648KQgRr5e_0(childViewHolderInt);
            }
            LayoutParams layoutParams = (LayoutParams) view.getLayoutParams();
            if (!childViewHolderInt.wasReturnedFromScrap() && !childViewHolderInt.isScrap()) {
                if (view.getParent() == this.f2466KQgRr5e_0) {
                    int KQgRr5e_02 = this.f2464KQgRr5e_0.KQgRr5e_0(view);
                    if (i == -1) {
                        i = this.f2464KQgRr5e_0.KQgRr5e_0();
                    }
                    if (KQgRr5e_02 == -1) {
                        throw new IllegalStateException("Added View has RecyclerView as parent but view is not a real child. Unfiltered index:" + this.f2466KQgRr5e_0.indexOfChild(view) + this.f2466KQgRr5e_0.exceptionLabel());
                    } else if (KQgRr5e_02 != i) {
                        this.f2466KQgRr5e_0.mLayout.KQgRr5e_0(KQgRr5e_02, i);
                    }
                } else {
                    this.f2464KQgRr5e_0.KQgRr5e_0(view, i, false);
                    layoutParams.f2450KQgRr5e_0 = true;
                    SI64pbG_23 sI64pbG_23 = this.f2465KQgRr5e_0;
                    if (sI64pbG_23 != null && sI64pbG_23.m925QxJ9d_1()) {
                        this.f2465KQgRr5e_0.m922KQgRr5e_0(view);
                    }
                }
            } else {
                if (childViewHolderInt.isScrap()) {
                    childViewHolderInt.unScrap();
                } else {
                    childViewHolderInt.clearReturnedFromScrapFlag();
                }
                this.f2464KQgRr5e_0.KQgRr5e_0(view, i, view.getLayoutParams(), false);
            }
            if (layoutParams.QxJ9d_1) {
                childViewHolderInt.itemView.invalidate();
                layoutParams.QxJ9d_1 = false;
            }
        }

        /* renamed from: QxJ9d_1  reason: collision with other method in class */
        public void m950QxJ9d_1() {
            this.f2467KQgRr5e_0 = true;
        }

        public int QxJ9d_1(ZzDuCHW_20 zzDuCHW_20, G83uNX_24 g83uNX_24) {
            RecyclerView recyclerView = this.f2466KQgRr5e_0;
            if (recyclerView == null || recyclerView.mAdapter == null || !m953QxJ9d_1()) {
                return 1;
            }
            return this.f2466KQgRr5e_0.mAdapter.getItemCount();
        }

        /* renamed from: KQgRr5e_0  reason: collision with other method in class */
        public View m934KQgRr5e_0(View view) {
            View findContainingItemView;
            RecyclerView recyclerView = this.f2466KQgRr5e_0;
            if (recyclerView == null || (findContainingItemView = recyclerView.findContainingItemView(view)) == null || this.f2464KQgRr5e_0.m637KQgRr5e_0(findContainingItemView)) {
                return null;
            }
            return findContainingItemView;
        }

        public View KQgRr5e_0(int i) {
            int QxJ9d_12 = QxJ9d_1();
            for (int i2 = 0; i2 < QxJ9d_12; i2++) {
                View QxJ9d_13 = QxJ9d_1(i2);
                WGk6X_27 childViewHolderInt = RecyclerView.getChildViewHolderInt(QxJ9d_13);
                if (childViewHolderInt != null && childViewHolderInt.getLayoutPosition() == i && !childViewHolderInt.shouldIgnore() && (this.f2466KQgRr5e_0.mState.m908QxJ9d_1() || !childViewHolderInt.isRemoved())) {
                    return QxJ9d_13;
                }
            }
            return null;
        }

        /* renamed from: KQgRr5e_0  reason: collision with other method in class */
        public void m937KQgRr5e_0(int i) {
            KQgRr5e_0(i, QxJ9d_1(i));
        }

        public final void KQgRr5e_0(int i, View view) {
            this.f2464KQgRr5e_0.m635KQgRr5e_0(i);
        }

        public void KQgRr5e_0(View view, int i, LayoutParams layoutParams) {
            WGk6X_27 childViewHolderInt = RecyclerView.getChildViewHolderInt(view);
            if (childViewHolderInt.isRemoved()) {
                this.f2466KQgRr5e_0.mViewInfoStore.m648KQgRr5e_0(childViewHolderInt);
            } else {
                this.f2466KQgRr5e_0.mViewInfoStore.PGPF6hQ_2(childViewHolderInt);
            }
            this.f2464KQgRr5e_0.KQgRr5e_0(view, i, layoutParams, childViewHolderInt.isRemoved());
        }

        public void KQgRr5e_0(int i, int i2) {
            View QxJ9d_12 = QxJ9d_1(i);
            if (QxJ9d_12 != null) {
                m937KQgRr5e_0(i);
                PGPF6hQ_2(QxJ9d_12, i2);
                return;
            }
            throw new IllegalArgumentException("Cannot move a child from non-existing index:" + i + this.f2466KQgRr5e_0.toString());
        }

        public void KQgRr5e_0(View view, ZzDuCHW_20 zzDuCHW_20) {
            m948PGPF6hQ_2(view);
            zzDuCHW_20.QxJ9d_1(view);
        }

        public void KQgRr5e_0(int i, ZzDuCHW_20 zzDuCHW_20) {
            View QxJ9d_12 = QxJ9d_1(i);
            X6FRs_4(i);
            zzDuCHW_20.QxJ9d_1(QxJ9d_12);
        }

        /* renamed from: KQgRr5e_0  reason: collision with other method in class */
        public View m933KQgRr5e_0() {
            View focusedChild;
            RecyclerView recyclerView = this.f2466KQgRr5e_0;
            if (recyclerView == null || (focusedChild = recyclerView.getFocusedChild()) == null || this.f2464KQgRr5e_0.m637KQgRr5e_0(focusedChild)) {
                return null;
            }
            return focusedChild;
        }

        public void KQgRr5e_0(ZzDuCHW_20 zzDuCHW_20) {
            for (int QxJ9d_12 = QxJ9d_1() - 1; QxJ9d_12 >= 0; QxJ9d_12--) {
                KQgRr5e_0(zzDuCHW_20, QxJ9d_12, QxJ9d_1(QxJ9d_12));
            }
        }

        public final void KQgRr5e_0(ZzDuCHW_20 zzDuCHW_20, int i, View view) {
            WGk6X_27 childViewHolderInt = RecyclerView.getChildViewHolderInt(view);
            if (childViewHolderInt.shouldIgnore()) {
                return;
            }
            if (childViewHolderInt.isInvalid() && !childViewHolderInt.isRemoved() && !this.f2466KQgRr5e_0.mAdapter.hasStableIds()) {
                X6FRs_4(i);
                zzDuCHW_20.Mqv2r_3(childViewHolderInt);
                return;
            }
            m937KQgRr5e_0(i);
            zzDuCHW_20.PGPF6hQ_2(view);
            this.f2466KQgRr5e_0.mViewInfoStore.m650QxJ9d_1(childViewHolderInt);
        }

        public boolean KQgRr5e_0(View view, int i, int i2, LayoutParams layoutParams) {
            return (!view.isLayoutRequested() && this.f2468Mqv2r_3 && m928KQgRr5e_0(view.getWidth(), i, ((ViewGroup.MarginLayoutParams) layoutParams).width) && m928KQgRr5e_0(view.getHeight(), i2, ((ViewGroup.MarginLayoutParams) layoutParams).height)) ? false : true;
        }

        /* renamed from: KQgRr5e_0  reason: collision with other method in class */
        public static boolean m928KQgRr5e_0(int i, int i2, int i3) {
            int mode = View.MeasureSpec.getMode(i2);
            int size = View.MeasureSpec.getSize(i2);
            if (i3 <= 0 || i == i3) {
                if (mode == Integer.MIN_VALUE) {
                    return size >= i;
                } else if (mode != 0) {
                    return mode == 1073741824 && size == i;
                } else {
                    return true;
                }
            }
            return false;
        }

        public void KQgRr5e_0(View view, int i, int i2) {
            LayoutParams layoutParams = (LayoutParams) view.getLayoutParams();
            Rect itemDecorInsetsForChild = this.f2466KQgRr5e_0.getItemDecorInsetsForChild(view);
            int i3 = i + itemDecorInsetsForChild.left + itemDecorInsetsForChild.right;
            int i4 = i2 + itemDecorInsetsForChild.top + itemDecorInsetsForChild.bottom;
            int KQgRr5e_02 = KQgRr5e_0(KNBe_11(), EuDEkJe_12(), Xgtqvk_8() + XnFJ5_9() + ((ViewGroup.MarginLayoutParams) layoutParams).leftMargin + ((ViewGroup.MarginLayoutParams) layoutParams).rightMargin + i3, ((ViewGroup.MarginLayoutParams) layoutParams).width, m942KQgRr5e_0());
            int KQgRr5e_03 = KQgRr5e_0(PGPF6hQ_2(), Mqv2r_3(), Nm6q_10() + FSaI4_7() + ((ViewGroup.MarginLayoutParams) layoutParams).topMargin + ((ViewGroup.MarginLayoutParams) layoutParams).bottomMargin + i4, ((ViewGroup.MarginLayoutParams) layoutParams).height, m953QxJ9d_1());
            if (KQgRr5e_0(view, KQgRr5e_02, KQgRr5e_03, layoutParams)) {
                view.measure(KQgRr5e_02, KQgRr5e_03);
            }
        }

        /* JADX WARN: Code restructure failed: missing block: B:9:0x0017, code lost:
            if (r5 == 1073741824) goto L8;
         */
        /*
            Code decompiled incorrectly, please refer to instructions dump.
        */
        public static int KQgRr5e_0(int i, int i2, int i3, int i4, boolean z) {
            int max = Math.max(0, i - i3);
            if (z) {
                if (i4 < 0) {
                    if (i4 == -1) {
                        if (i2 != Integer.MIN_VALUE) {
                            if (i2 != 0) {
                            }
                        }
                        i4 = max;
                    }
                    i2 = 0;
                    i4 = 0;
                }
                i2 = 1073741824;
            } else {
                if (i4 < 0) {
                    if (i4 != -1) {
                        if (i4 == -2) {
                            i2 = (i2 == Integer.MIN_VALUE || i2 == 1073741824) ? X6FRs_4.Xgtqvk_8.KQgRr5e_0.KQgRr5e_0.INVALID_ID : 0;
                        }
                        i2 = 0;
                        i4 = 0;
                    }
                    i4 = max;
                }
                i2 = 1073741824;
            }
            return View.MeasureSpec.makeMeasureSpec(i4, i2);
        }

        public void KQgRr5e_0(View view, int i, int i2, int i3, int i4) {
            LayoutParams layoutParams = (LayoutParams) view.getLayoutParams();
            Rect rect = layoutParams.KQgRr5e_0;
            view.layout(i + rect.left + ((ViewGroup.MarginLayoutParams) layoutParams).leftMargin, i2 + rect.top + ((ViewGroup.MarginLayoutParams) layoutParams).topMargin, (i3 - rect.right) - ((ViewGroup.MarginLayoutParams) layoutParams).rightMargin, (i4 - rect.bottom) - ((ViewGroup.MarginLayoutParams) layoutParams).bottomMargin);
        }

        public void KQgRr5e_0(View view, boolean z, Rect rect) {
            Matrix matrix;
            if (z) {
                Rect rect2 = ((LayoutParams) view.getLayoutParams()).KQgRr5e_0;
                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.f2466KQgRr5e_0 != null && (matrix = view.getMatrix()) != null && !matrix.isIdentity()) {
                RectF rectF = this.f2466KQgRr5e_0.mTempRectF;
                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 void KQgRr5e_0(View view, Rect rect) {
            RecyclerView recyclerView = this.f2466KQgRr5e_0;
            if (recyclerView == null) {
                rect.set(0, 0, 0, 0);
            } else {
                rect.set(recyclerView.getItemDecorInsetsForChild(view));
            }
        }

        public int KQgRr5e_0(View view) {
            return ((LayoutParams) view.getLayoutParams()).KQgRr5e_0.bottom;
        }

        /* renamed from: KQgRr5e_0  reason: collision with other method in class */
        public final int[] m945KQgRr5e_0(RecyclerView recyclerView, View view, Rect rect, boolean z) {
            int[] iArr = new int[2];
            int Xgtqvk_82 = Xgtqvk_8();
            int Nm6q_102 = Nm6q_10();
            int KNBe_112 = KNBe_11() - XnFJ5_9();
            int PGPF6hQ_22 = PGPF6hQ_2() - FSaI4_7();
            int left = (view.getLeft() + rect.left) - view.getScrollX();
            int top = (view.getTop() + rect.top) - view.getScrollY();
            int width = rect.width() + left;
            int height = rect.height() + top;
            int i = left - Xgtqvk_82;
            int min = Math.min(0, i);
            int i2 = top - Nm6q_102;
            int min2 = Math.min(0, i2);
            int i3 = width - KNBe_112;
            int max = Math.max(0, i3);
            int max2 = Math.max(0, height - PGPF6hQ_22);
            if (X6FRs_4() != 1) {
                if (min == 0) {
                    min = Math.min(i, max);
                }
                max = min;
            } else if (max == 0) {
                max = Math.max(min, i3);
            }
            if (min2 == 0) {
                min2 = Math.min(i2, max2);
            }
            iArr[0] = max;
            iArr[1] = min2;
            return iArr;
        }

        public boolean KQgRr5e_0(RecyclerView recyclerView, View view, Rect rect, boolean z) {
            return KQgRr5e_0(recyclerView, view, rect, z, false);
        }

        public boolean KQgRr5e_0(RecyclerView recyclerView, View view, Rect rect, boolean z, boolean z2) {
            int[] m945KQgRr5e_0 = m945KQgRr5e_0(recyclerView, view, rect, z);
            int i = m945KQgRr5e_0[0];
            int i2 = m945KQgRr5e_0[1];
            if ((!z2 || m944KQgRr5e_0(recyclerView, i, i2)) && !(i == 0 && i2 == 0)) {
                if (z) {
                    recyclerView.scrollBy(i, i2);
                } else {
                    recyclerView.smoothScrollBy(i, i2);
                }
                return true;
            }
            return false;
        }

        public boolean KQgRr5e_0(View view, boolean z, boolean z2) {
            boolean z3 = this.f2463KQgRr5e_0.KQgRr5e_0(view, 24579) && this.f2471QxJ9d_1.KQgRr5e_0(view, 24579);
            return z ? z3 : !z3;
        }

        /* renamed from: KQgRr5e_0  reason: collision with other method in class */
        public final boolean m944KQgRr5e_0(RecyclerView recyclerView, int i, int i2) {
            View focusedChild = recyclerView.getFocusedChild();
            if (focusedChild == null) {
                return false;
            }
            int Xgtqvk_82 = Xgtqvk_8();
            int Nm6q_102 = Nm6q_10();
            int KNBe_112 = KNBe_11() - XnFJ5_9();
            int PGPF6hQ_22 = PGPF6hQ_2() - FSaI4_7();
            Rect rect = this.f2466KQgRr5e_0.mTempRect;
            QxJ9d_1(focusedChild, rect);
            return rect.left - i < KNBe_112 && rect.right - i > Xgtqvk_82 && rect.top - i2 < PGPF6hQ_22 && rect.bottom - i2 > Nm6q_102;
        }

        @Deprecated
        public boolean KQgRr5e_0(RecyclerView recyclerView, View view, View view2) {
            return m929FSaI4_7() || recyclerView.isComputingLayout();
        }

        public boolean KQgRr5e_0(RecyclerView recyclerView, G83uNX_24 g83uNX_24, View view, View view2) {
            return KQgRr5e_0(recyclerView, view, view2);
        }

        public void KQgRr5e_0(RecyclerView recyclerView, int i, int i2, Object obj) {
            PGPF6hQ_2(recyclerView, i, i2);
        }

        public void KQgRr5e_0(ZzDuCHW_20 zzDuCHW_20, G83uNX_24 g83uNX_24, int i, int i2) {
            this.f2466KQgRr5e_0.defaultOnMeasure(i, i2);
        }

        public void KQgRr5e_0(SI64pbG_23 sI64pbG_23) {
            if (this.f2465KQgRr5e_0 == sI64pbG_23) {
                this.f2465KQgRr5e_0 = null;
            }
        }

        public void KQgRr5e_0(X6FRs_4.IMuAHx_6.EuDEkJe_12.NzhupJ_29.Mqv2r_3 mqv2r_3) {
            RecyclerView recyclerView = this.f2466KQgRr5e_0;
            KQgRr5e_0(recyclerView.mRecycler, recyclerView.mState, mqv2r_3);
        }

        public void KQgRr5e_0(ZzDuCHW_20 zzDuCHW_20, G83uNX_24 g83uNX_24, X6FRs_4.IMuAHx_6.EuDEkJe_12.NzhupJ_29.Mqv2r_3 mqv2r_3) {
            if (this.f2466KQgRr5e_0.canScrollVertically(-1) || this.f2466KQgRr5e_0.canScrollHorizontally(-1)) {
                mqv2r_3.m229KQgRr5e_0(WGk6X_27.FLAG_BOUNCED_FROM_HIDDEN_LIST);
                mqv2r_3.WwEq_13(true);
            }
            if (this.f2466KQgRr5e_0.canScrollVertically(1) || this.f2466KQgRr5e_0.canScrollHorizontally(1)) {
                mqv2r_3.m229KQgRr5e_0(WGk6X_27.FLAG_APPEARED_IN_PRE_LAYOUT);
                mqv2r_3.WwEq_13(true);
            }
            mqv2r_3.KQgRr5e_0(Mqv2r_3.QxJ9d_1.KQgRr5e_0(QxJ9d_1(zzDuCHW_20, g83uNX_24), KQgRr5e_0(zzDuCHW_20, g83uNX_24), m943KQgRr5e_0(zzDuCHW_20, g83uNX_24), PGPF6hQ_2(zzDuCHW_20, g83uNX_24)));
        }

        public void KQgRr5e_0(AccessibilityEvent accessibilityEvent) {
            RecyclerView recyclerView = this.f2466KQgRr5e_0;
            KQgRr5e_0(recyclerView.mRecycler, recyclerView.mState, accessibilityEvent);
        }

        public void KQgRr5e_0(ZzDuCHW_20 zzDuCHW_20, G83uNX_24 g83uNX_24, AccessibilityEvent accessibilityEvent) {
            RecyclerView recyclerView = this.f2466KQgRr5e_0;
            if (recyclerView == null || accessibilityEvent == null) {
                return;
            }
            boolean z = true;
            if (!recyclerView.canScrollVertically(1) && !this.f2466KQgRr5e_0.canScrollVertically(-1) && !this.f2466KQgRr5e_0.canScrollHorizontally(-1) && !this.f2466KQgRr5e_0.canScrollHorizontally(1)) {
                z = false;
            }
            accessibilityEvent.setScrollable(z);
            IMuAHx_6 iMuAHx_6 = this.f2466KQgRr5e_0.mAdapter;
            if (iMuAHx_6 != null) {
                accessibilityEvent.setItemCount(iMuAHx_6.getItemCount());
            }
        }

        public void KQgRr5e_0(View view, X6FRs_4.IMuAHx_6.EuDEkJe_12.NzhupJ_29.Mqv2r_3 mqv2r_3) {
            WGk6X_27 childViewHolderInt = RecyclerView.getChildViewHolderInt(view);
            if (childViewHolderInt == null || childViewHolderInt.isRemoved() || this.f2464KQgRr5e_0.m637KQgRr5e_0(childViewHolderInt.itemView)) {
                return;
            }
            RecyclerView recyclerView = this.f2466KQgRr5e_0;
            KQgRr5e_0(recyclerView.mRecycler, recyclerView.mState, view, mqv2r_3);
        }

        public void KQgRr5e_0(ZzDuCHW_20 zzDuCHW_20, G83uNX_24 g83uNX_24, View view, X6FRs_4.IMuAHx_6.EuDEkJe_12.NzhupJ_29.Mqv2r_3 mqv2r_3) {
            mqv2r_3.QxJ9d_1(Mqv2r_3.PGPF6hQ_2.KQgRr5e_0(m953QxJ9d_1() ? Xgtqvk_8(view) : 0, 1, m942KQgRr5e_0() ? Xgtqvk_8(view) : 0, 1, false, false));
        }

        public int KQgRr5e_0(ZzDuCHW_20 zzDuCHW_20, G83uNX_24 g83uNX_24) {
            RecyclerView recyclerView = this.f2466KQgRr5e_0;
            if (recyclerView == null || recyclerView.mAdapter == null || !m942KQgRr5e_0()) {
                return 1;
            }
            return this.f2466KQgRr5e_0.mAdapter.getItemCount();
        }

        public boolean KQgRr5e_0(int i, Bundle bundle) {
            RecyclerView recyclerView = this.f2466KQgRr5e_0;
            return KQgRr5e_0(recyclerView.mRecycler, recyclerView.mState, i, bundle);
        }

        /* JADX WARN: Removed duplicated region for block: B:26:0x0070 A[ADDED_TO_REGION] */
        /*
            Code decompiled incorrectly, please refer to instructions dump.
        */
        public boolean KQgRr5e_0(ZzDuCHW_20 zzDuCHW_20, G83uNX_24 g83uNX_24, int i, Bundle bundle) {
            int PGPF6hQ_22;
            int KNBe_112;
            RecyclerView recyclerView = this.f2466KQgRr5e_0;
            if (recyclerView == null) {
                return false;
            }
            if (i == 4096) {
                PGPF6hQ_22 = recyclerView.canScrollVertically(1) ? (PGPF6hQ_2() - Nm6q_10()) - FSaI4_7() : 0;
                if (this.f2466KQgRr5e_0.canScrollHorizontally(1)) {
                    KNBe_112 = (KNBe_11() - Xgtqvk_8()) - XnFJ5_9();
                    if (PGPF6hQ_22 == 0) {
                    }
                    this.f2466KQgRr5e_0.smoothScrollBy(KNBe_112, PGPF6hQ_22);
                    return true;
                }
                KNBe_112 = 0;
                if (PGPF6hQ_22 == 0) {
                }
                this.f2466KQgRr5e_0.smoothScrollBy(KNBe_112, PGPF6hQ_22);
                return true;
            }
            if (i != 8192) {
                PGPF6hQ_22 = 0;
            } else {
                PGPF6hQ_22 = recyclerView.canScrollVertically(-1) ? -((PGPF6hQ_2() - Nm6q_10()) - FSaI4_7()) : 0;
                if (this.f2466KQgRr5e_0.canScrollHorizontally(-1)) {
                    KNBe_112 = -((KNBe_11() - Xgtqvk_8()) - XnFJ5_9());
                    if (PGPF6hQ_22 == 0 || KNBe_112 != 0) {
                        this.f2466KQgRr5e_0.smoothScrollBy(KNBe_112, PGPF6hQ_22);
                        return true;
                    }
                    return false;
                }
            }
            KNBe_112 = 0;
            if (PGPF6hQ_22 == 0) {
            }
            this.f2466KQgRr5e_0.smoothScrollBy(KNBe_112, PGPF6hQ_22);
            return true;
        }

        public boolean KQgRr5e_0(View view, int i, Bundle bundle) {
            RecyclerView recyclerView = this.f2466KQgRr5e_0;
            return KQgRr5e_0(recyclerView.mRecycler, recyclerView.mState, view, i, bundle);
        }

        public static Mqv2r_3 KQgRr5e_0(Context context, AttributeSet attributeSet, int i, int i2) {
            Mqv2r_3 mqv2r_3 = new Mqv2r_3();
            TypedArray obtainStyledAttributes = context.obtainStyledAttributes(attributeSet, X6FRs_4.YghfZG_14.QxJ9d_1.RecyclerView, i, i2);
            mqv2r_3.KQgRr5e_0 = obtainStyledAttributes.getInt(X6FRs_4.YghfZG_14.QxJ9d_1.RecyclerView_android_orientation, 1);
            mqv2r_3.QxJ9d_1 = obtainStyledAttributes.getInt(X6FRs_4.YghfZG_14.QxJ9d_1.RecyclerView_spanCount, 1);
            mqv2r_3.f2474KQgRr5e_0 = obtainStyledAttributes.getBoolean(X6FRs_4.YghfZG_14.QxJ9d_1.RecyclerView_reverseLayout, false);
            mqv2r_3.f2475QxJ9d_1 = obtainStyledAttributes.getBoolean(X6FRs_4.YghfZG_14.QxJ9d_1.RecyclerView_stackFromEnd, false);
            obtainStyledAttributes.recycle();
            return mqv2r_3;
        }
    }

    static {
        int i = Build.VERSION.SDK_INT;
        FORCE_INVALIDATE_DISPLAY_LIST = i == 18 || i == 19 || i == 20;
        ALLOW_SIZE_IN_UNSPECIFIED_SPEC = Build.VERSION.SDK_INT >= 23;
        POST_UPDATES_ON_ANIMATION = Build.VERSION.SDK_INT >= 16;
        ALLOW_THREAD_GAP_WORK = Build.VERSION.SDK_INT >= 21;
        FORCE_ABS_FOCUS_SEARCH_DIRECTION = Build.VERSION.SDK_INT <= 15;
        IGNORE_DETACHED_FOCUSED_CHILD = Build.VERSION.SDK_INT <= 15;
        Class<?> cls = Integer.TYPE;
        LAYOUT_MANAGER_CONSTRUCTOR_SIGNATURE = new Class[]{Context.class, AttributeSet.class, cls, cls};
        sQuinticInterpolator = new PGPF6hQ_2();
    }

    public RecyclerView(Context context) {
        this(context, null);
    }

    private void addAnimatingView(WGk6X_27 wGk6X_27) {
        View view = wGk6X_27.itemView;
        boolean z = view.getParent() == this;
        this.mRecycler.X6FRs_4(getChildViewHolder(view));
        if (wGk6X_27.isTmpDetached()) {
            this.mChildHelper.KQgRr5e_0(view, -1, view.getLayoutParams(), true);
        } else if (!z) {
            this.mChildHelper.KQgRr5e_0(view, true);
        } else {
            this.mChildHelper.m636KQgRr5e_0(view);
        }
    }

    private void animateChange(WGk6X_27 wGk6X_27, WGk6X_27 wGk6X_272, KNBe_11.PGPF6hQ_2 pGPF6hQ_2, KNBe_11.PGPF6hQ_2 pGPF6hQ_22, boolean z, boolean z2) {
        wGk6X_27.setIsRecyclable(false);
        if (z) {
            addAnimatingView(wGk6X_27);
        }
        if (wGk6X_27 != wGk6X_272) {
            if (z2) {
                addAnimatingView(wGk6X_272);
            }
            wGk6X_27.mShadowedHolder = wGk6X_272;
            addAnimatingView(wGk6X_27);
            this.mRecycler.X6FRs_4(wGk6X_27);
            wGk6X_272.setIsRecyclable(false);
            wGk6X_272.mShadowingHolder = wGk6X_27;
        }
        if (this.mItemAnimator.KQgRr5e_0(wGk6X_27, wGk6X_272, pGPF6hQ_2, pGPF6hQ_22)) {
            postAnimationRunner();
        }
    }

    private void cancelTouch() {
        resetTouch();
        setScrollState(0);
    }

    public static void clearNestedRecyclerViewIfNotNested(WGk6X_27 wGk6X_27) {
        WeakReference<RecyclerView> weakReference = wGk6X_27.mNestedRecyclerView;
        if (weakReference != null) {
            RecyclerView recyclerView = weakReference.get();
            while (recyclerView != null) {
                if (recyclerView == wGk6X_27.itemView) {
                    return;
                }
                ViewParent parent = recyclerView.getParent();
                recyclerView = parent instanceof View ? (View) parent : null;
            }
            wGk6X_27.mNestedRecyclerView = null;
        }
    }

    private void createLayoutManager(Context context, String str, AttributeSet attributeSet, int i, int i2) {
        ClassLoader classLoader;
        Constructor constructor;
        if (str != null) {
            String trim = str.trim();
            if (trim.isEmpty()) {
                return;
            }
            String fullClassName = getFullClassName(context, trim);
            try {
                if (isInEditMode()) {
                    classLoader = getClass().getClassLoader();
                } else {
                    classLoader = context.getClassLoader();
                }
                Class<? extends U> asSubclass = classLoader.loadClass(fullClassName).asSubclass(YghfZG_14.class);
                Object[] objArr = null;
                try {
                    constructor = asSubclass.getConstructor(LAYOUT_MANAGER_CONSTRUCTOR_SIGNATURE);
                    objArr = new Object[]{context, attributeSet, Integer.valueOf(i), Integer.valueOf(i2)};
                } catch (NoSuchMethodException e) {
                    try {
                        constructor = asSubclass.getConstructor(new Class[0]);
                    } catch (NoSuchMethodException e2) {
                        e2.initCause(e);
                        throw new IllegalStateException(attributeSet.getPositionDescription() + ": Error creating LayoutManager " + fullClassName, e2);
                    }
                }
                constructor.setAccessible(true);
                setLayoutManager((YghfZG_14) constructor.newInstance(objArr));
            } catch (ClassCastException e3) {
                throw new IllegalStateException(attributeSet.getPositionDescription() + ": Class is not a LayoutManager " + fullClassName, e3);
            } catch (ClassNotFoundException e4) {
                throw new IllegalStateException(attributeSet.getPositionDescription() + ": Unable to find LayoutManager " + fullClassName, e4);
            } catch (IllegalAccessException e5) {
                throw new IllegalStateException(attributeSet.getPositionDescription() + ": Cannot access non-public constructor " + fullClassName, e5);
            } catch (InstantiationException e6) {
                throw new IllegalStateException(attributeSet.getPositionDescription() + ": Could not instantiate the LayoutManager: " + fullClassName, e6);
            } catch (InvocationTargetException e7) {
                throw new IllegalStateException(attributeSet.getPositionDescription() + ": Could not instantiate the LayoutManager: " + fullClassName, e7);
            }
        }
    }

    private boolean didChildRangeChange(int i, int i2) {
        findMinMaxChildLayoutPositions(this.mMinMaxLayoutPositions);
        int[] iArr = this.mMinMaxLayoutPositions;
        return (iArr[0] == i && iArr[1] == i2) ? false : true;
    }

    private void dispatchContentChangedIfNecessary() {
        int i = this.mEatenAccessibilityChangeFlags;
        this.mEatenAccessibilityChangeFlags = 0;
        if (i == 0 || !isAccessibilityEnabled()) {
            return;
        }
        AccessibilityEvent obtain = AccessibilityEvent.obtain();
        obtain.setEventType(WGk6X_27.FLAG_MOVED);
        X6FRs_4.IMuAHx_6.EuDEkJe_12.NzhupJ_29.QxJ9d_1.KQgRr5e_0(obtain, i);
        sendAccessibilityEventUnchecked(obtain);
    }

    private void dispatchLayoutStep1() {
        boolean z = true;
        this.mState.KQgRr5e_0(1);
        fillRemainingScrollValues(this.mState);
        this.mState.f2443Mqv2r_3 = false;
        startInterceptRequestLayout();
        this.mViewInfoStore.KQgRr5e_0();
        onEnterLayoutOrScroll();
        processAdapterUpdatesAndSetAnimationFlags();
        saveFocusInfo();
        G83uNX_24 g83uNX_24 = this.mState;
        g83uNX_24.f2444PGPF6hQ_2 = (g83uNX_24.f2446X6FRs_4 && this.mItemsChanged) ? false : false;
        this.mItemsChanged = false;
        this.mItemsAddedOrRemoved = false;
        G83uNX_24 g83uNX_242 = this.mState;
        g83uNX_242.f2445QxJ9d_1 = g83uNX_242.f2439IFxWkV_5;
        g83uNX_242.f3549X6FRs_4 = this.mAdapter.getItemCount();
        findMinMaxChildLayoutPositions(this.mMinMaxLayoutPositions);
        if (this.mState.f2446X6FRs_4) {
            int KQgRr5e_02 = this.mChildHelper.KQgRr5e_0();
            for (int i = 0; i < KQgRr5e_02; i++) {
                WGk6X_27 childViewHolderInt = getChildViewHolderInt(this.mChildHelper.QxJ9d_1(i));
                if (!childViewHolderInt.shouldIgnore() && (!childViewHolderInt.isInvalid() || this.mAdapter.hasStableIds())) {
                    this.mViewInfoStore.PGPF6hQ_2(childViewHolderInt, this.mItemAnimator.KQgRr5e_0(this.mState, childViewHolderInt, KNBe_11.KQgRr5e_0(childViewHolderInt), childViewHolderInt.getUnmodifiedPayloads()));
                    if (this.mState.f2444PGPF6hQ_2 && childViewHolderInt.isUpdated() && !childViewHolderInt.isRemoved() && !childViewHolderInt.shouldIgnore() && !childViewHolderInt.isInvalid()) {
                        this.mViewInfoStore.KQgRr5e_0(getChangedHolderKey(childViewHolderInt), childViewHolderInt);
                    }
                }
            }
        }
        if (this.mState.f2439IFxWkV_5) {
            saveOldPositions();
            G83uNX_24 g83uNX_243 = this.mState;
            boolean z2 = g83uNX_243.f2442KQgRr5e_0;
            g83uNX_243.f2442KQgRr5e_0 = false;
            this.mLayout.m941KQgRr5e_0(this.mRecycler, g83uNX_243);
            this.mState.f2442KQgRr5e_0 = z2;
            for (int i2 = 0; i2 < this.mChildHelper.KQgRr5e_0(); i2++) {
                WGk6X_27 childViewHolderInt2 = getChildViewHolderInt(this.mChildHelper.QxJ9d_1(i2));
                if (!childViewHolderInt2.shouldIgnore() && !this.mViewInfoStore.m651QxJ9d_1(childViewHolderInt2)) {
                    int KQgRr5e_03 = KNBe_11.KQgRr5e_0(childViewHolderInt2);
                    boolean hasAnyOfTheFlags = childViewHolderInt2.hasAnyOfTheFlags(WGk6X_27.FLAG_BOUNCED_FROM_HIDDEN_LIST);
                    if (!hasAnyOfTheFlags) {
                        KQgRr5e_03 |= WGk6X_27.FLAG_APPEARED_IN_PRE_LAYOUT;
                    }
                    KNBe_11.PGPF6hQ_2 KQgRr5e_04 = this.mItemAnimator.KQgRr5e_0(this.mState, childViewHolderInt2, KQgRr5e_03, childViewHolderInt2.getUnmodifiedPayloads());
                    if (hasAnyOfTheFlags) {
                        recordAnimationInfoIfBouncedHiddenView(childViewHolderInt2, KQgRr5e_04);
                    } else {
                        this.mViewInfoStore.KQgRr5e_0(childViewHolderInt2, KQgRr5e_04);
                    }
                }
            }
            clearOldPositions();
        } else {
            clearOldPositions();
        }
        onExitLayoutOrScroll();
        stopInterceptRequestLayout(false);
        this.mState.f3548Mqv2r_3 = 2;
    }

    private void dispatchLayoutStep2() {
        startInterceptRequestLayout();
        onEnterLayoutOrScroll();
        this.mState.KQgRr5e_0(6);
        this.mAdapterHelper.QxJ9d_1();
        this.mState.f3549X6FRs_4 = this.mAdapter.getItemCount();
        G83uNX_24 g83uNX_24 = this.mState;
        g83uNX_24.PGPF6hQ_2 = 0;
        g83uNX_24.f2445QxJ9d_1 = false;
        this.mLayout.m941KQgRr5e_0(this.mRecycler, g83uNX_24);
        G83uNX_24 g83uNX_242 = this.mState;
        g83uNX_242.f2442KQgRr5e_0 = false;
        this.mPendingSavedState = null;
        g83uNX_242.f2446X6FRs_4 = g83uNX_242.f2446X6FRs_4 && this.mItemAnimator != null;
        this.mState.f3548Mqv2r_3 = 4;
        onExitLayoutOrScroll();
        stopInterceptRequestLayout(false);
    }

    private void dispatchLayoutStep3() {
        this.mState.KQgRr5e_0(4);
        startInterceptRequestLayout();
        onEnterLayoutOrScroll();
        G83uNX_24 g83uNX_24 = this.mState;
        g83uNX_24.f3548Mqv2r_3 = 1;
        if (g83uNX_24.f2446X6FRs_4) {
            for (int KQgRr5e_02 = this.mChildHelper.KQgRr5e_0() - 1; KQgRr5e_02 >= 0; KQgRr5e_02--) {
                WGk6X_27 childViewHolderInt = getChildViewHolderInt(this.mChildHelper.QxJ9d_1(KQgRr5e_02));
                if (!childViewHolderInt.shouldIgnore()) {
                    long changedHolderKey = getChangedHolderKey(childViewHolderInt);
                    KNBe_11.PGPF6hQ_2 KQgRr5e_03 = this.mItemAnimator.KQgRr5e_0(this.mState, childViewHolderInt);
                    WGk6X_27 KQgRr5e_04 = this.mViewInfoStore.KQgRr5e_0(changedHolderKey);
                    if (KQgRr5e_04 != null && !KQgRr5e_04.shouldIgnore()) {
                        boolean m649KQgRr5e_0 = this.mViewInfoStore.m649KQgRr5e_0(KQgRr5e_04);
                        boolean m649KQgRr5e_02 = this.mViewInfoStore.m649KQgRr5e_0(childViewHolderInt);
                        if (m649KQgRr5e_0 && KQgRr5e_04 == childViewHolderInt) {
                            this.mViewInfoStore.QxJ9d_1(childViewHolderInt, KQgRr5e_03);
                        } else {
                            KNBe_11.PGPF6hQ_2 QxJ9d_12 = this.mViewInfoStore.QxJ9d_1(KQgRr5e_04);
                            this.mViewInfoStore.QxJ9d_1(childViewHolderInt, KQgRr5e_03);
                            KNBe_11.PGPF6hQ_2 KQgRr5e_05 = this.mViewInfoStore.KQgRr5e_0(childViewHolderInt);
                            if (QxJ9d_12 == null) {
                                handleMissingPreInfoForChangeError(changedHolderKey, childViewHolderInt, KQgRr5e_04);
                            } else {
                                animateChange(KQgRr5e_04, childViewHolderInt, QxJ9d_12, KQgRr5e_05, m649KQgRr5e_0, m649KQgRr5e_02);
                            }
                        }
                    } else {
                        this.mViewInfoStore.QxJ9d_1(childViewHolderInt, KQgRr5e_03);
                    }
                }
            }
            this.mViewInfoStore.KQgRr5e_0(this.mViewInfoProcessCallback);
        }
        this.mLayout.PGPF6hQ_2(this.mRecycler);
        G83uNX_24 g83uNX_242 = this.mState;
        g83uNX_242.QxJ9d_1 = g83uNX_242.f3549X6FRs_4;
        this.mDataSetHasChangedAfterLayout = false;
        this.mDispatchItemsChangedEvent = false;
        g83uNX_242.f2446X6FRs_4 = false;
        g83uNX_242.f2439IFxWkV_5 = false;
        this.mLayout.f2467KQgRr5e_0 = false;
        ArrayList<WGk6X_27> arrayList = this.mRecycler.f2481QxJ9d_1;
        if (arrayList != null) {
            arrayList.clear();
        }
        YghfZG_14 yghfZG_14 = this.mLayout;
        if (yghfZG_14.f3554IFxWkV_5) {
            yghfZG_14.KQgRr5e_0 = 0;
            yghfZG_14.f3554IFxWkV_5 = false;
            this.mRecycler.IMuAHx_6();
        }
        this.mLayout.m940KQgRr5e_0(this.mState);
        onExitLayoutOrScroll();
        stopInterceptRequestLayout(false);
        this.mViewInfoStore.KQgRr5e_0();
        int[] iArr = this.mMinMaxLayoutPositions;
        if (didChildRangeChange(iArr[0], iArr[1])) {
            dispatchOnScrolled(0, 0);
        }
        recoverFocusFromState();
        resetFocusInfo();
    }

    private boolean dispatchOnItemTouch(MotionEvent motionEvent) {
        int action = motionEvent.getAction();
        NQvZgp_17 nQvZgp_17 = this.mActiveOnItemTouchListener;
        if (nQvZgp_17 != null) {
            if (action == 0) {
                this.mActiveOnItemTouchListener = null;
            } else {
                nQvZgp_17.KQgRr5e_0(this, motionEvent);
                if (action == 3 || action == 1) {
                    this.mActiveOnItemTouchListener = null;
                }
                return true;
            }
        }
        if (action != 0) {
            int size = this.mOnItemTouchListeners.size();
            for (int i = 0; i < size; i++) {
                NQvZgp_17 nQvZgp_172 = this.mOnItemTouchListeners.get(i);
                if (nQvZgp_172.m917KQgRr5e_0(this, motionEvent)) {
                    this.mActiveOnItemTouchListener = nQvZgp_172;
                    return true;
                }
            }
        }
        return false;
    }

    private boolean dispatchOnItemTouchIntercept(MotionEvent motionEvent) {
        int action = motionEvent.getAction();
        if (action == 3 || action == 0) {
            this.mActiveOnItemTouchListener = null;
        }
        int size = this.mOnItemTouchListeners.size();
        for (int i = 0; i < size; i++) {
            NQvZgp_17 nQvZgp_17 = this.mOnItemTouchListeners.get(i);
            if (nQvZgp_17.m917KQgRr5e_0(this, motionEvent) && action != 3) {
                this.mActiveOnItemTouchListener = nQvZgp_17;
                return true;
            }
        }
        return false;
    }

    private void findMinMaxChildLayoutPositions(int[] iArr) {
        int KQgRr5e_02 = this.mChildHelper.KQgRr5e_0();
        if (KQgRr5e_02 == 0) {
            iArr[0] = -1;
            iArr[1] = -1;
            return;
        }
        int i = Integer.MAX_VALUE;
        int i2 = X6FRs_4.Xgtqvk_8.KQgRr5e_0.KQgRr5e_0.INVALID_ID;
        for (int i3 = 0; i3 < KQgRr5e_02; i3++) {
            WGk6X_27 childViewHolderInt = getChildViewHolderInt(this.mChildHelper.QxJ9d_1(i3));
            if (!childViewHolderInt.shouldIgnore()) {
                int layoutPosition = childViewHolderInt.getLayoutPosition();
                if (layoutPosition < i) {
                    i = layoutPosition;
                }
                if (layoutPosition > i2) {
                    i2 = layoutPosition;
                }
            }
        }
        iArr[0] = i;
        iArr[1] = i2;
    }

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

    private View findNextViewToFocus() {
        WGk6X_27 findViewHolderForAdapterPosition;
        int i = this.mState.f3546IFxWkV_5;
        if (i == -1) {
            i = 0;
        }
        int KQgRr5e_02 = this.mState.KQgRr5e_0();
        for (int i2 = i; i2 < KQgRr5e_02; i2++) {
            WGk6X_27 findViewHolderForAdapterPosition2 = findViewHolderForAdapterPosition(i2);
            if (findViewHolderForAdapterPosition2 == null) {
                break;
            } else if (findViewHolderForAdapterPosition2.itemView.hasFocusable()) {
                return findViewHolderForAdapterPosition2.itemView;
            }
        }
        int min = Math.min(KQgRr5e_02, i);
        while (true) {
            min--;
            if (min < 0 || (findViewHolderForAdapterPosition = findViewHolderForAdapterPosition(min)) == null) {
                return null;
            }
            if (findViewHolderForAdapterPosition.itemView.hasFocusable()) {
                return findViewHolderForAdapterPosition.itemView;
            }
        }
    }

    public static WGk6X_27 getChildViewHolderInt(View view) {
        if (view == null) {
            return null;
        }
        return ((LayoutParams) view.getLayoutParams()).f2449KQgRr5e_0;
    }

    public static void getDecoratedBoundsWithMarginsInt(View view, Rect rect) {
        LayoutParams layoutParams = (LayoutParams) view.getLayoutParams();
        Rect rect2 = layoutParams.KQgRr5e_0;
        rect.set((view.getLeft() - rect2.left) - ((ViewGroup.MarginLayoutParams) layoutParams).leftMargin, (view.getTop() - rect2.top) - ((ViewGroup.MarginLayoutParams) layoutParams).topMargin, view.getRight() + rect2.right + ((ViewGroup.MarginLayoutParams) layoutParams).rightMargin, view.getBottom() + rect2.bottom + ((ViewGroup.MarginLayoutParams) layoutParams).bottomMargin);
    }

    private int getDeepestFocusedViewWithId(View view) {
        int id = view.getId();
        while (!view.isFocused() && (view instanceof ViewGroup) && view.hasFocus()) {
            view = ((ViewGroup) view).getFocusedChild();
            if (view.getId() != -1) {
                id = view.getId();
            }
        }
        return id;
    }

    private String getFullClassName(Context context, String str) {
        if (str.charAt(0) == '.') {
            return context.getPackageName() + str;
        } else if (str.contains(".")) {
            return str;
        } else {
            return RecyclerView.class.getPackage().getName() + '.' + str;
        }
    }

    private X6FRs_4.IMuAHx_6.EuDEkJe_12.KNBe_11 getScrollingChildHelper() {
        if (this.mScrollingChildHelper == null) {
            this.mScrollingChildHelper = new X6FRs_4.IMuAHx_6.EuDEkJe_12.KNBe_11(this);
        }
        return this.mScrollingChildHelper;
    }

    private void handleMissingPreInfoForChangeError(long j, WGk6X_27 wGk6X_27, WGk6X_27 wGk6X_272) {
        int KQgRr5e_02 = this.mChildHelper.KQgRr5e_0();
        for (int i = 0; i < KQgRr5e_02; i++) {
            WGk6X_27 childViewHolderInt = getChildViewHolderInt(this.mChildHelper.QxJ9d_1(i));
            if (childViewHolderInt != wGk6X_27 && getChangedHolderKey(childViewHolderInt) == j) {
                IMuAHx_6 iMuAHx_6 = this.mAdapter;
                if (iMuAHx_6 != null && iMuAHx_6.hasStableIds()) {
                    throw new IllegalStateException("Two different ViewHolders have the same stable ID. Stable IDs in your adapter MUST BE unique and SHOULD NOT change.\n ViewHolder 1:" + childViewHolderInt + " \n View Holder 2:" + wGk6X_27 + exceptionLabel());
                }
                throw new IllegalStateException("Two different ViewHolders have the same change ID. This might happen due to inconsistent Adapter update events or if the LayoutManager lays out the same View multiple times.\n ViewHolder 1:" + childViewHolderInt + " \n View Holder 2:" + wGk6X_27 + exceptionLabel());
            }
        }
        Log.e(TAG, "Problem while matching changed view holders with the newones. The pre-layout information for the change holder " + wGk6X_272 + " cannot be found but it is necessary for " + wGk6X_27 + exceptionLabel());
    }

    private boolean hasUpdatedView() {
        int KQgRr5e_02 = this.mChildHelper.KQgRr5e_0();
        for (int i = 0; i < KQgRr5e_02; i++) {
            WGk6X_27 childViewHolderInt = getChildViewHolderInt(this.mChildHelper.QxJ9d_1(i));
            if (childViewHolderInt != null && !childViewHolderInt.shouldIgnore() && childViewHolderInt.isUpdated()) {
                return true;
            }
        }
        return false;
    }

    @SuppressLint({"InlinedApi"})
    private void initAutofill() {
        if (X6FRs_4.IMuAHx_6.EuDEkJe_12.ZzDuCHW_20.m266PGPF6hQ_2((View) this) == 0) {
            X6FRs_4.IMuAHx_6.EuDEkJe_12.ZzDuCHW_20.FSaI4_7(this, 8);
        }
    }

    private void initChildrenHelper() {
        this.mChildHelper = new X6FRs_4.YghfZG_14.PGPF6hQ_2.QxJ9d_1(new X6FRs_4());
    }

    private boolean isPreferredNextFocus(View view, View view2, int i) {
        int i2;
        if (view2 == null || view2 == this || findContainingItemView(view2) == null) {
            return false;
        }
        if (view == null || findContainingItemView(view) == null) {
            return true;
        }
        this.mTempRect.set(0, 0, view.getWidth(), view.getHeight());
        this.mTempRect2.set(0, 0, view2.getWidth(), view2.getHeight());
        offsetDescendantRectToMyCoords(view, this.mTempRect);
        offsetDescendantRectToMyCoords(view2, this.mTempRect2);
        char c = 65535;
        int i3 = this.mLayout.X6FRs_4() == 1 ? -1 : 1;
        Rect rect = this.mTempRect;
        int i4 = rect.left;
        int i5 = this.mTempRect2.left;
        if ((i4 < i5 || rect.right <= i5) && this.mTempRect.right < this.mTempRect2.right) {
            i2 = 1;
        } else {
            Rect rect2 = this.mTempRect;
            int i6 = rect2.right;
            int i7 = this.mTempRect2.right;
            i2 = ((i6 > i7 || rect2.left >= i7) && this.mTempRect.left > this.mTempRect2.left) ? -1 : 0;
        }
        Rect rect3 = this.mTempRect;
        int i8 = rect3.top;
        int i9 = this.mTempRect2.top;
        if ((i8 < i9 || rect3.bottom <= i9) && this.mTempRect.bottom < this.mTempRect2.bottom) {
            c = 1;
        } else {
            Rect rect4 = this.mTempRect;
            int i10 = rect4.bottom;
            int i11 = this.mTempRect2.bottom;
            if ((i10 <= i11 && rect4.top < i11) || this.mTempRect.top <= this.mTempRect2.top) {
                c = 0;
            }
        }
        if (i == 1) {
            return c < 0 || (c == 0 && i2 * i3 <= 0);
        } else if (i == 2) {
            return c > 0 || (c == 0 && i2 * i3 >= 0);
        } else if (i == 17) {
            return i2 < 0;
        } else if (i == 33) {
            return c < 0;
        } else if (i == 66) {
            return i2 > 0;
        } else if (i == 130) {
            return c > 0;
        } else {
            throw new IllegalArgumentException("Invalid direction: " + i + exceptionLabel());
        }
    }

    private void onPointerUp(MotionEvent motionEvent) {
        int actionIndex = motionEvent.getActionIndex();
        if (motionEvent.getPointerId(actionIndex) == this.mScrollPointerId) {
            int i = actionIndex == 0 ? 1 : 0;
            this.mScrollPointerId = motionEvent.getPointerId(i);
            int x = (int) (motionEvent.getX(i) + 0.5f);
            this.mLastTouchX = x;
            this.mInitialTouchX = x;
            int y = (int) (motionEvent.getY(i) + 0.5f);
            this.mLastTouchY = y;
            this.mInitialTouchY = y;
        }
    }

    private boolean predictiveItemAnimationsEnabled() {
        return this.mItemAnimator != null && this.mLayout.m956XnFJ5_9();
    }

    private void processAdapterUpdatesAndSetAnimationFlags() {
        if (this.mDataSetHasChangedAfterLayout) {
            this.mAdapterHelper.Mqv2r_3();
            if (this.mDispatchItemsChangedEvent) {
                this.mLayout.Mqv2r_3(this);
            }
        }
        if (predictiveItemAnimationsEnabled()) {
            this.mAdapterHelper.PGPF6hQ_2();
        } else {
            this.mAdapterHelper.QxJ9d_1();
        }
        boolean z = false;
        boolean z2 = this.mItemsAddedOrRemoved || this.mItemsChanged;
        this.mState.f2446X6FRs_4 = this.mFirstLayoutComplete && this.mItemAnimator != null && (this.mDataSetHasChangedAfterLayout || z2 || this.mLayout.f2467KQgRr5e_0) && (!this.mDataSetHasChangedAfterLayout || this.mAdapter.hasStableIds());
        G83uNX_24 g83uNX_24 = this.mState;
        if (g83uNX_24.f2446X6FRs_4 && z2 && !this.mDataSetHasChangedAfterLayout && predictiveItemAnimationsEnabled()) {
            z = true;
        }
        g83uNX_24.f2439IFxWkV_5 = z;
    }

    /* JADX WARN: Removed duplicated region for block: B:12:0x0040  */
    /* JADX WARN: Removed duplicated region for block: B:13:0x0056  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    private void pullGlows(float f, float f2, float f3, float f4) {
        boolean z;
        boolean z2 = true;
        if (f2 < 0.0f) {
            ensureLeftGlow();
            X6FRs_4.IMuAHx_6.WwEq_13.Mqv2r_3.KQgRr5e_0(this.mLeftGlow, (-f2) / getWidth(), 1.0f - (f3 / getHeight()));
        } else if (f2 <= 0.0f) {
            z = false;
            if (f4 >= 0.0f) {
                ensureTopGlow();
                X6FRs_4.IMuAHx_6.WwEq_13.Mqv2r_3.KQgRr5e_0(this.mTopGlow, (-f4) / getHeight(), f / getWidth());
            } else if (f4 > 0.0f) {
                ensureBottomGlow();
                X6FRs_4.IMuAHx_6.WwEq_13.Mqv2r_3.KQgRr5e_0(this.mBottomGlow, f4 / getHeight(), 1.0f - (f / getWidth()));
            } else {
                z2 = z;
            }
            if (z2 && f2 == 0.0f && f4 == 0.0f) {
                return;
            }
            X6FRs_4.IMuAHx_6.EuDEkJe_12.ZzDuCHW_20.m262KQgRr5e_0((View) this);
        } else {
            ensureRightGlow();
            X6FRs_4.IMuAHx_6.WwEq_13.Mqv2r_3.KQgRr5e_0(this.mRightGlow, f2 / getWidth(), f3 / getHeight());
        }
        z = true;
        if (f4 >= 0.0f) {
        }
        if (z2) {
        }
        X6FRs_4.IMuAHx_6.EuDEkJe_12.ZzDuCHW_20.m262KQgRr5e_0((View) this);
    }

    private void recoverFocusFromState() {
        View findViewById;
        if (!this.mPreserveFocusAfterLayout || this.mAdapter == null || !hasFocus() || getDescendantFocusability() == 393216) {
            return;
        }
        if (getDescendantFocusability() == 131072 && isFocused()) {
            return;
        }
        if (!isFocused()) {
            View focusedChild = getFocusedChild();
            if (IGNORE_DETACHED_FOCUSED_CHILD && (focusedChild.getParent() == null || !focusedChild.hasFocus())) {
                if (this.mChildHelper.KQgRr5e_0() == 0) {
                    requestFocus();
                    return;
                }
            } else if (!this.mChildHelper.m637KQgRr5e_0(focusedChild)) {
                return;
            }
        }
        View view = null;
        WGk6X_27 findViewHolderForItemId = (this.mState.f2440KQgRr5e_0 == -1 || !this.mAdapter.hasStableIds()) ? null : findViewHolderForItemId(this.mState.f2440KQgRr5e_0);
        if (findViewHolderForItemId != null && !this.mChildHelper.m637KQgRr5e_0(findViewHolderForItemId.itemView) && findViewHolderForItemId.itemView.hasFocusable()) {
            view = findViewHolderForItemId.itemView;
        } else if (this.mChildHelper.KQgRr5e_0() > 0) {
            view = findNextViewToFocus();
        }
        if (view != null) {
            int i = this.mState.f3547IMuAHx_6;
            if (i != -1 && (findViewById = view.findViewById(i)) != null && findViewById.isFocusable()) {
                view = findViewById;
            }
            view.requestFocus();
        }
    }

    private void releaseGlows() {
        boolean z;
        EdgeEffect edgeEffect = this.mLeftGlow;
        if (edgeEffect != null) {
            edgeEffect.onRelease();
            z = this.mLeftGlow.isFinished();
        } else {
            z = false;
        }
        EdgeEffect edgeEffect2 = this.mTopGlow;
        if (edgeEffect2 != null) {
            edgeEffect2.onRelease();
            z |= this.mTopGlow.isFinished();
        }
        EdgeEffect edgeEffect3 = this.mRightGlow;
        if (edgeEffect3 != null) {
            edgeEffect3.onRelease();
            z |= this.mRightGlow.isFinished();
        }
        EdgeEffect edgeEffect4 = this.mBottomGlow;
        if (edgeEffect4 != null) {
            edgeEffect4.onRelease();
            z |= this.mBottomGlow.isFinished();
        }
        if (z) {
            X6FRs_4.IMuAHx_6.EuDEkJe_12.ZzDuCHW_20.m262KQgRr5e_0((View) this);
        }
    }

    private void requestChildOnScreen(View view, View view2) {
        View view3 = view2 != null ? view2 : view;
        this.mTempRect.set(0, 0, view3.getWidth(), view3.getHeight());
        ViewGroup.LayoutParams layoutParams = view3.getLayoutParams();
        if (layoutParams instanceof LayoutParams) {
            LayoutParams layoutParams2 = (LayoutParams) layoutParams;
            if (!layoutParams2.f2450KQgRr5e_0) {
                Rect rect = layoutParams2.KQgRr5e_0;
                Rect rect2 = this.mTempRect;
                rect2.left -= rect.left;
                rect2.right += rect.right;
                rect2.top -= rect.top;
                rect2.bottom += rect.bottom;
            }
        }
        if (view2 != null) {
            offsetDescendantRectToMyCoords(view2, this.mTempRect);
            offsetRectIntoDescendantCoords(view, this.mTempRect);
        }
        this.mLayout.KQgRr5e_0(this, view, this.mTempRect, !this.mFirstLayoutComplete, view2 == null);
    }

    private void resetFocusInfo() {
        G83uNX_24 g83uNX_24 = this.mState;
        g83uNX_24.f2440KQgRr5e_0 = -1L;
        g83uNX_24.f3546IFxWkV_5 = -1;
        g83uNX_24.f3547IMuAHx_6 = -1;
    }

    private void resetTouch() {
        VelocityTracker velocityTracker = this.mVelocityTracker;
        if (velocityTracker != null) {
            velocityTracker.clear();
        }
        stopNestedScroll(0);
        releaseGlows();
    }

    private void saveFocusInfo() {
        int adapterPosition;
        View focusedChild = (this.mPreserveFocusAfterLayout && hasFocus() && this.mAdapter != null) ? getFocusedChild() : null;
        WGk6X_27 findContainingViewHolder = focusedChild != null ? findContainingViewHolder(focusedChild) : null;
        if (findContainingViewHolder == null) {
            resetFocusInfo();
            return;
        }
        this.mState.f2440KQgRr5e_0 = this.mAdapter.hasStableIds() ? findContainingViewHolder.getItemId() : -1L;
        G83uNX_24 g83uNX_24 = this.mState;
        if (this.mDataSetHasChangedAfterLayout) {
            adapterPosition = -1;
        } else {
            adapterPosition = findContainingViewHolder.isRemoved() ? findContainingViewHolder.mOldPosition : findContainingViewHolder.getAdapterPosition();
        }
        g83uNX_24.f3546IFxWkV_5 = adapterPosition;
        this.mState.f3547IMuAHx_6 = getDeepestFocusedViewWithId(findContainingViewHolder.itemView);
    }

    private void setAdapterInternal(IMuAHx_6 iMuAHx_6, boolean z, boolean z2) {
        IMuAHx_6 iMuAHx_62 = this.mAdapter;
        if (iMuAHx_62 != null) {
            iMuAHx_62.unregisterAdapterDataObserver(this.mObserver);
            this.mAdapter.onDetachedFromRecyclerView(this);
        }
        if (!z || z2) {
            removeAndRecycleViews();
        }
        this.mAdapterHelper.Mqv2r_3();
        IMuAHx_6 iMuAHx_63 = this.mAdapter;
        this.mAdapter = iMuAHx_6;
        if (iMuAHx_6 != null) {
            iMuAHx_6.registerAdapterDataObserver(this.mObserver);
            iMuAHx_6.onAttachedToRecyclerView(this);
        }
        YghfZG_14 yghfZG_14 = this.mLayout;
        if (yghfZG_14 != null) {
            yghfZG_14.KQgRr5e_0(iMuAHx_63, this.mAdapter);
        }
        this.mRecycler.KQgRr5e_0(iMuAHx_63, this.mAdapter, z);
        this.mState.f2442KQgRr5e_0 = true;
    }

    private void stopScrollersInternal() {
        this.mViewFlinger.Mqv2r_3();
        YghfZG_14 yghfZG_14 = this.mLayout;
        if (yghfZG_14 != null) {
            yghfZG_14.m947PGPF6hQ_2();
        }
    }

    public void absorbGlows(int i, int i2) {
        if (i < 0) {
            ensureLeftGlow();
            this.mLeftGlow.onAbsorb(-i);
        } else if (i > 0) {
            ensureRightGlow();
            this.mRightGlow.onAbsorb(i);
        }
        if (i2 < 0) {
            ensureTopGlow();
            this.mTopGlow.onAbsorb(-i2);
        } else if (i2 > 0) {
            ensureBottomGlow();
            this.mBottomGlow.onAbsorb(i2);
        }
        if (i == 0 && i2 == 0) {
            return;
        }
        X6FRs_4.IMuAHx_6.EuDEkJe_12.ZzDuCHW_20.m262KQgRr5e_0((View) this);
    }

    @Override // android.view.ViewGroup, android.view.View
    public void addFocusables(ArrayList<View> arrayList, int i, int i2) {
        YghfZG_14 yghfZG_14 = this.mLayout;
        if (yghfZG_14 == null || !yghfZG_14.KQgRr5e_0(this, arrayList, i, i2)) {
            super.addFocusables(arrayList, i, i2);
        }
    }

    public void addItemDecoration(WwEq_13 wwEq_13, int i) {
        YghfZG_14 yghfZG_14 = this.mLayout;
        if (yghfZG_14 != null) {
            yghfZG_14.KQgRr5e_0("Cannot add item decoration during a scroll  or layout");
        }
        if (this.mItemDecorations.isEmpty()) {
            setWillNotDraw(false);
        }
        if (i < 0) {
            this.mItemDecorations.add(wwEq_13);
        } else {
            this.mItemDecorations.add(i, wwEq_13);
        }
        markItemDecorInsetsDirty();
        requestLayout();
    }

    public void addOnChildAttachStateChangeListener(LGe8pk_15 lGe8pk_15) {
        if (this.mOnChildAttachStateListeners == null) {
            this.mOnChildAttachStateListeners = new ArrayList();
        }
        this.mOnChildAttachStateListeners.add(lGe8pk_15);
    }

    public void addOnItemTouchListener(NQvZgp_17 nQvZgp_17) {
        this.mOnItemTouchListeners.add(nQvZgp_17);
    }

    public void addOnScrollListener(Eps4cJe_18 eps4cJe_18) {
        if (this.mScrollListeners == null) {
            this.mScrollListeners = new ArrayList();
        }
        this.mScrollListeners.add(eps4cJe_18);
    }

    public void animateAppearance(WGk6X_27 wGk6X_27, KNBe_11.PGPF6hQ_2 pGPF6hQ_2, KNBe_11.PGPF6hQ_2 pGPF6hQ_22) {
        wGk6X_27.setIsRecyclable(false);
        if (this.mItemAnimator.KQgRr5e_0(wGk6X_27, pGPF6hQ_2, pGPF6hQ_22)) {
            postAnimationRunner();
        }
    }

    public void animateDisappearance(WGk6X_27 wGk6X_27, KNBe_11.PGPF6hQ_2 pGPF6hQ_2, KNBe_11.PGPF6hQ_2 pGPF6hQ_22) {
        addAnimatingView(wGk6X_27);
        wGk6X_27.setIsRecyclable(false);
        if (this.mItemAnimator.QxJ9d_1(wGk6X_27, pGPF6hQ_2, pGPF6hQ_22)) {
            postAnimationRunner();
        }
    }

    public void assertInLayoutOrScroll(String str) {
        if (isComputingLayout()) {
            return;
        }
        if (str == null) {
            throw new IllegalStateException("Cannot call this method unless RecyclerView is computing a layout or scrolling" + exceptionLabel());
        }
        throw new IllegalStateException(str + exceptionLabel());
    }

    public void assertNotInLayoutOrScroll(String str) {
        if (isComputingLayout()) {
            if (str == null) {
                throw new IllegalStateException("Cannot call this method while RecyclerView is computing a layout or scrolling" + exceptionLabel());
            }
            throw new IllegalStateException(str);
        } else if (this.mDispatchScrollCounter > 0) {
            Log.w(TAG, "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(BuildConfig.FLAVOR + exceptionLabel()));
        }
    }

    public boolean canReuseUpdatedViewHolder(WGk6X_27 wGk6X_27) {
        KNBe_11 kNBe_11 = this.mItemAnimator;
        return kNBe_11 == null || kNBe_11.KQgRr5e_0(wGk6X_27, wGk6X_27.getUnmodifiedPayloads());
    }

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

    public void clearOldPositions() {
        int QxJ9d_12 = this.mChildHelper.QxJ9d_1();
        for (int i = 0; i < QxJ9d_12; i++) {
            WGk6X_27 childViewHolderInt = getChildViewHolderInt(this.mChildHelper.PGPF6hQ_2(i));
            if (!childViewHolderInt.shouldIgnore()) {
                childViewHolderInt.clearOldPosition();
            }
        }
        this.mRecycler.QxJ9d_1();
    }

    public void clearOnChildAttachStateChangeListeners() {
        List<LGe8pk_15> list = this.mOnChildAttachStateListeners;
        if (list != null) {
            list.clear();
        }
    }

    public void clearOnScrollListeners() {
        List<Eps4cJe_18> list = this.mScrollListeners;
        if (list != null) {
            list.clear();
        }
    }

    @Override // android.view.View
    public int computeHorizontalScrollExtent() {
        YghfZG_14 yghfZG_14 = this.mLayout;
        if (yghfZG_14 != null && yghfZG_14.m942KQgRr5e_0()) {
            return this.mLayout.KQgRr5e_0(this.mState);
        }
        return 0;
    }

    @Override // android.view.View
    public int computeHorizontalScrollOffset() {
        YghfZG_14 yghfZG_14 = this.mLayout;
        if (yghfZG_14 != null && yghfZG_14.m942KQgRr5e_0()) {
            return this.mLayout.QxJ9d_1(this.mState);
        }
        return 0;
    }

    @Override // android.view.View
    public int computeHorizontalScrollRange() {
        YghfZG_14 yghfZG_14 = this.mLayout;
        if (yghfZG_14 != null && yghfZG_14.m942KQgRr5e_0()) {
            return this.mLayout.PGPF6hQ_2(this.mState);
        }
        return 0;
    }

    @Override // android.view.View
    public int computeVerticalScrollExtent() {
        YghfZG_14 yghfZG_14 = this.mLayout;
        if (yghfZG_14 != null && yghfZG_14.m953QxJ9d_1()) {
            return this.mLayout.Mqv2r_3(this.mState);
        }
        return 0;
    }

    @Override // android.view.View
    public int computeVerticalScrollOffset() {
        YghfZG_14 yghfZG_14 = this.mLayout;
        if (yghfZG_14 != null && yghfZG_14.m953QxJ9d_1()) {
            return this.mLayout.X6FRs_4(this.mState);
        }
        return 0;
    }

    @Override // android.view.View
    public int computeVerticalScrollRange() {
        YghfZG_14 yghfZG_14 = this.mLayout;
        if (yghfZG_14 != null && yghfZG_14.m953QxJ9d_1()) {
            return this.mLayout.IFxWkV_5(this.mState);
        }
        return 0;
    }

    public void considerReleasingGlowsOnScroll(int i, int i2) {
        boolean z;
        EdgeEffect edgeEffect = this.mLeftGlow;
        if (edgeEffect == null || edgeEffect.isFinished() || i <= 0) {
            z = false;
        } else {
            this.mLeftGlow.onRelease();
            z = this.mLeftGlow.isFinished();
        }
        EdgeEffect edgeEffect2 = this.mRightGlow;
        if (edgeEffect2 != null && !edgeEffect2.isFinished() && i < 0) {
            this.mRightGlow.onRelease();
            z |= this.mRightGlow.isFinished();
        }
        EdgeEffect edgeEffect3 = this.mTopGlow;
        if (edgeEffect3 != null && !edgeEffect3.isFinished() && i2 > 0) {
            this.mTopGlow.onRelease();
            z |= this.mTopGlow.isFinished();
        }
        EdgeEffect edgeEffect4 = this.mBottomGlow;
        if (edgeEffect4 != null && !edgeEffect4.isFinished() && i2 < 0) {
            this.mBottomGlow.onRelease();
            z |= this.mBottomGlow.isFinished();
        }
        if (z) {
            X6FRs_4.IMuAHx_6.EuDEkJe_12.ZzDuCHW_20.m262KQgRr5e_0((View) this);
        }
    }

    public void consumePendingUpdateOperations() {
        if (this.mFirstLayoutComplete && !this.mDataSetHasChangedAfterLayout) {
            if (this.mAdapterHelper.m624KQgRr5e_0()) {
                if (this.mAdapterHelper.m628QxJ9d_1(4) && !this.mAdapterHelper.m628QxJ9d_1(11)) {
                    X6FRs_4.IMuAHx_6.Xgtqvk_8.KQgRr5e_0.KQgRr5e_0(TRACE_HANDLE_ADAPTER_UPDATES_TAG);
                    startInterceptRequestLayout();
                    onEnterLayoutOrScroll();
                    this.mAdapterHelper.PGPF6hQ_2();
                    if (!this.mLayoutWasDefered) {
                        if (hasUpdatedView()) {
                            dispatchLayout();
                        } else {
                            this.mAdapterHelper.KQgRr5e_0();
                        }
                    }
                    stopInterceptRequestLayout(true);
                    onExitLayoutOrScroll();
                    X6FRs_4.IMuAHx_6.Xgtqvk_8.KQgRr5e_0.KQgRr5e_0();
                    return;
                } else if (this.mAdapterHelper.m624KQgRr5e_0()) {
                    X6FRs_4.IMuAHx_6.Xgtqvk_8.KQgRr5e_0.KQgRr5e_0(TRACE_ON_DATA_SET_CHANGE_LAYOUT_TAG);
                    dispatchLayout();
                    X6FRs_4.IMuAHx_6.Xgtqvk_8.KQgRr5e_0.KQgRr5e_0();
                    return;
                } else {
                    return;
                }
            }
            return;
        }
        X6FRs_4.IMuAHx_6.Xgtqvk_8.KQgRr5e_0.KQgRr5e_0(TRACE_ON_DATA_SET_CHANGE_LAYOUT_TAG);
        dispatchLayout();
        X6FRs_4.IMuAHx_6.Xgtqvk_8.KQgRr5e_0.KQgRr5e_0();
    }

    public void defaultOnMeasure(int i, int i2) {
        setMeasuredDimension(YghfZG_14.KQgRr5e_0(i, getPaddingLeft() + getPaddingRight(), X6FRs_4.IMuAHx_6.EuDEkJe_12.ZzDuCHW_20.IFxWkV_5((View) this)), YghfZG_14.KQgRr5e_0(i2, getPaddingTop() + getPaddingBottom(), X6FRs_4.IMuAHx_6.EuDEkJe_12.ZzDuCHW_20.X6FRs_4((View) this)));
    }

    public void dispatchChildAttached(View view) {
        WGk6X_27 childViewHolderInt = getChildViewHolderInt(view);
        onChildAttachedToWindow(view);
        IMuAHx_6 iMuAHx_6 = this.mAdapter;
        if (iMuAHx_6 != null && childViewHolderInt != null) {
            iMuAHx_6.onViewAttachedToWindow(childViewHolderInt);
        }
        List<LGe8pk_15> list = this.mOnChildAttachStateListeners;
        if (list != null) {
            for (int size = list.size() - 1; size >= 0; size--) {
                this.mOnChildAttachStateListeners.get(size).QxJ9d_1(view);
            }
        }
    }

    public void dispatchChildDetached(View view) {
        WGk6X_27 childViewHolderInt = getChildViewHolderInt(view);
        onChildDetachedFromWindow(view);
        IMuAHx_6 iMuAHx_6 = this.mAdapter;
        if (iMuAHx_6 != null && childViewHolderInt != null) {
            iMuAHx_6.onViewDetachedFromWindow(childViewHolderInt);
        }
        List<LGe8pk_15> list = this.mOnChildAttachStateListeners;
        if (list != null) {
            for (int size = list.size() - 1; size >= 0; size--) {
                this.mOnChildAttachStateListeners.get(size).KQgRr5e_0(view);
            }
        }
    }

    public void dispatchLayout() {
        if (this.mAdapter == null) {
            Log.e(TAG, "No adapter attached; skipping layout");
        } else if (this.mLayout == null) {
            Log.e(TAG, "No layout manager attached; skipping layout");
        } else {
            G83uNX_24 g83uNX_24 = this.mState;
            g83uNX_24.f2443Mqv2r_3 = false;
            if (g83uNX_24.f3548Mqv2r_3 == 1) {
                dispatchLayoutStep1();
                this.mLayout.X6FRs_4(this);
                dispatchLayoutStep2();
            } else if (!this.mAdapterHelper.m627QxJ9d_1() && this.mLayout.KNBe_11() == getWidth() && this.mLayout.PGPF6hQ_2() == getHeight()) {
                this.mLayout.X6FRs_4(this);
            } else {
                this.mLayout.X6FRs_4(this);
                dispatchLayoutStep2();
            }
            dispatchLayoutStep3();
        }
    }

    @Override // android.view.View
    public boolean dispatchNestedFling(float f, float f2, boolean z) {
        return getScrollingChildHelper().KQgRr5e_0(f, f2, z);
    }

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

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

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

    public void dispatchOnScrollStateChanged(int i) {
        YghfZG_14 yghfZG_14 = this.mLayout;
        if (yghfZG_14 != null) {
            yghfZG_14.Mqv2r_3(i);
        }
        onScrollStateChanged(i);
        Eps4cJe_18 eps4cJe_18 = this.mScrollListener;
        if (eps4cJe_18 != null) {
            eps4cJe_18.KQgRr5e_0(this, i);
        }
        List<Eps4cJe_18> list = this.mScrollListeners;
        if (list != null) {
            for (int size = list.size() - 1; size >= 0; size--) {
                this.mScrollListeners.get(size).KQgRr5e_0(this, i);
            }
        }
    }

    public void dispatchOnScrolled(int i, int i2) {
        this.mDispatchScrollCounter++;
        int scrollX = getScrollX();
        int scrollY = getScrollY();
        onScrollChanged(scrollX, scrollY, scrollX, scrollY);
        onScrolled(i, i2);
        Eps4cJe_18 eps4cJe_18 = this.mScrollListener;
        if (eps4cJe_18 != null) {
            eps4cJe_18.KQgRr5e_0(this, i, i2);
        }
        List<Eps4cJe_18> list = this.mScrollListeners;
        if (list != null) {
            for (int size = list.size() - 1; size >= 0; size--) {
                this.mScrollListeners.get(size).KQgRr5e_0(this, i, i2);
            }
        }
        this.mDispatchScrollCounter--;
    }

    public void dispatchPendingImportantForAccessibilityChanges() {
        int i;
        for (int size = this.mPendingAccessibilityImportanceChange.size() - 1; size >= 0; size--) {
            WGk6X_27 wGk6X_27 = this.mPendingAccessibilityImportanceChange.get(size);
            if (wGk6X_27.itemView.getParent() == this && !wGk6X_27.shouldIgnore() && (i = wGk6X_27.mPendingAccessibilityState) != -1) {
                X6FRs_4.IMuAHx_6.EuDEkJe_12.ZzDuCHW_20.IMuAHx_6(wGk6X_27.itemView, i);
                wGk6X_27.mPendingAccessibilityState = -1;
            }
        }
        this.mPendingAccessibilityImportanceChange.clear();
    }

    @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 z;
        super.draw(canvas);
        int size = this.mItemDecorations.size();
        boolean z2 = false;
        for (int i = 0; i < size; i++) {
            this.mItemDecorations.get(i).QxJ9d_1(canvas, this, this.mState);
        }
        EdgeEffect edgeEffect = this.mLeftGlow;
        boolean z3 = true;
        if (edgeEffect == null || edgeEffect.isFinished()) {
            z = false;
        } else {
            int save = canvas.save();
            int paddingBottom = this.mClipToPadding ? getPaddingBottom() : 0;
            canvas.rotate(270.0f);
            canvas.translate((-getHeight()) + paddingBottom, 0.0f);
            EdgeEffect edgeEffect2 = this.mLeftGlow;
            z = edgeEffect2 != null && edgeEffect2.draw(canvas);
            canvas.restoreToCount(save);
        }
        EdgeEffect edgeEffect3 = this.mTopGlow;
        if (edgeEffect3 != null && !edgeEffect3.isFinished()) {
            int save2 = canvas.save();
            if (this.mClipToPadding) {
                canvas.translate(getPaddingLeft(), getPaddingTop());
            }
            EdgeEffect edgeEffect4 = this.mTopGlow;
            z |= edgeEffect4 != null && edgeEffect4.draw(canvas);
            canvas.restoreToCount(save2);
        }
        EdgeEffect edgeEffect5 = this.mRightGlow;
        if (edgeEffect5 != null && !edgeEffect5.isFinished()) {
            int save3 = canvas.save();
            int width = getWidth();
            int paddingTop = this.mClipToPadding ? getPaddingTop() : 0;
            canvas.rotate(90.0f);
            canvas.translate(-paddingTop, -width);
            EdgeEffect edgeEffect6 = this.mRightGlow;
            z |= edgeEffect6 != null && edgeEffect6.draw(canvas);
            canvas.restoreToCount(save3);
        }
        EdgeEffect edgeEffect7 = this.mBottomGlow;
        if (edgeEffect7 != null && !edgeEffect7.isFinished()) {
            int save4 = canvas.save();
            canvas.rotate(180.0f);
            if (this.mClipToPadding) {
                canvas.translate((-getWidth()) + getPaddingRight(), (-getHeight()) + getPaddingBottom());
            } else {
                canvas.translate(-getWidth(), -getHeight());
            }
            EdgeEffect edgeEffect8 = this.mBottomGlow;
            if (edgeEffect8 != null && edgeEffect8.draw(canvas)) {
                z2 = true;
            }
            z |= z2;
            canvas.restoreToCount(save4);
        }
        if (z || this.mItemAnimator == null || this.mItemDecorations.size() <= 0 || !this.mItemAnimator.m912KQgRr5e_0()) {
            z3 = z;
        }
        if (z3) {
            X6FRs_4.IMuAHx_6.EuDEkJe_12.ZzDuCHW_20.m262KQgRr5e_0((View) this);
        }
    }

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

    public void ensureBottomGlow() {
        if (this.mBottomGlow != null) {
            return;
        }
        EdgeEffect KQgRr5e_02 = this.mEdgeEffectFactory.KQgRr5e_0(this, 3);
        this.mBottomGlow = KQgRr5e_02;
        if (this.mClipToPadding) {
            KQgRr5e_02.setSize((getMeasuredWidth() - getPaddingLeft()) - getPaddingRight(), (getMeasuredHeight() - getPaddingTop()) - getPaddingBottom());
        } else {
            KQgRr5e_02.setSize(getMeasuredWidth(), getMeasuredHeight());
        }
    }

    public void ensureLeftGlow() {
        if (this.mLeftGlow != null) {
            return;
        }
        EdgeEffect KQgRr5e_02 = this.mEdgeEffectFactory.KQgRr5e_0(this, 0);
        this.mLeftGlow = KQgRr5e_02;
        if (this.mClipToPadding) {
            KQgRr5e_02.setSize((getMeasuredHeight() - getPaddingTop()) - getPaddingBottom(), (getMeasuredWidth() - getPaddingLeft()) - getPaddingRight());
        } else {
            KQgRr5e_02.setSize(getMeasuredHeight(), getMeasuredWidth());
        }
    }

    public void ensureRightGlow() {
        if (this.mRightGlow != null) {
            return;
        }
        EdgeEffect KQgRr5e_02 = this.mEdgeEffectFactory.KQgRr5e_0(this, 2);
        this.mRightGlow = KQgRr5e_02;
        if (this.mClipToPadding) {
            KQgRr5e_02.setSize((getMeasuredHeight() - getPaddingTop()) - getPaddingBottom(), (getMeasuredWidth() - getPaddingLeft()) - getPaddingRight());
        } else {
            KQgRr5e_02.setSize(getMeasuredHeight(), getMeasuredWidth());
        }
    }

    public void ensureTopGlow() {
        if (this.mTopGlow != null) {
            return;
        }
        EdgeEffect KQgRr5e_02 = this.mEdgeEffectFactory.KQgRr5e_0(this, 1);
        this.mTopGlow = KQgRr5e_02;
        if (this.mClipToPadding) {
            KQgRr5e_02.setSize((getMeasuredWidth() - getPaddingLeft()) - getPaddingRight(), (getMeasuredHeight() - getPaddingTop()) - getPaddingBottom());
        } else {
            KQgRr5e_02.setSize(getMeasuredWidth(), getMeasuredHeight());
        }
    }

    public String exceptionLabel() {
        return " " + super.toString() + ", adapter:" + this.mAdapter + ", layout:" + this.mLayout + ", context:" + getContext();
    }

    public final void fillRemainingScrollValues(G83uNX_24 g83uNX_24) {
        if (getScrollState() == 2) {
            OverScroller overScroller = this.mViewFlinger.f2459KQgRr5e_0;
            g83uNX_24.f3545FSaI4_7 = overScroller.getFinalX() - overScroller.getCurrX();
            g83uNX_24.f3550Xgtqvk_8 = overScroller.getFinalY() - overScroller.getCurrY();
            return;
        }
        g83uNX_24.f3545FSaI4_7 = 0;
        g83uNX_24.f3550Xgtqvk_8 = 0;
    }

    public View findChildViewUnder(float f, float f2) {
        for (int KQgRr5e_02 = this.mChildHelper.KQgRr5e_0() - 1; KQgRr5e_02 >= 0; KQgRr5e_02--) {
            View QxJ9d_12 = this.mChildHelper.QxJ9d_1(KQgRr5e_02);
            float translationX = QxJ9d_12.getTranslationX();
            float translationY = QxJ9d_12.getTranslationY();
            if (f >= QxJ9d_12.getLeft() + translationX && f <= QxJ9d_12.getRight() + translationX && f2 >= QxJ9d_12.getTop() + translationY && f2 <= QxJ9d_12.getBottom() + translationY) {
                return QxJ9d_12;
            }
        }
        return null;
    }

    /* JADX WARN: Code restructure failed: missing block: B:15:?, code lost:
        return r3;
     */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public View findContainingItemView(View view) {
        ViewParent parent = view.getParent();
        while (parent != null && parent != this && (parent instanceof View)) {
            view = (View) parent;
            parent = view.getParent();
        }
        return null;
    }

    public WGk6X_27 findContainingViewHolder(View view) {
        View findContainingItemView = findContainingItemView(view);
        if (findContainingItemView == null) {
            return null;
        }
        return getChildViewHolder(findContainingItemView);
    }

    public WGk6X_27 findViewHolderForAdapterPosition(int i) {
        WGk6X_27 wGk6X_27 = null;
        if (this.mDataSetHasChangedAfterLayout) {
            return null;
        }
        int QxJ9d_12 = this.mChildHelper.QxJ9d_1();
        for (int i2 = 0; i2 < QxJ9d_12; i2++) {
            WGk6X_27 childViewHolderInt = getChildViewHolderInt(this.mChildHelper.PGPF6hQ_2(i2));
            if (childViewHolderInt != null && !childViewHolderInt.isRemoved() && getAdapterPositionFor(childViewHolderInt) == i) {
                if (!this.mChildHelper.m637KQgRr5e_0(childViewHolderInt.itemView)) {
                    return childViewHolderInt;
                }
                wGk6X_27 = childViewHolderInt;
            }
        }
        return wGk6X_27;
    }

    public WGk6X_27 findViewHolderForItemId(long j) {
        IMuAHx_6 iMuAHx_6 = this.mAdapter;
        WGk6X_27 wGk6X_27 = null;
        if (iMuAHx_6 != null && iMuAHx_6.hasStableIds()) {
            int QxJ9d_12 = this.mChildHelper.QxJ9d_1();
            for (int i = 0; i < QxJ9d_12; i++) {
                WGk6X_27 childViewHolderInt = getChildViewHolderInt(this.mChildHelper.PGPF6hQ_2(i));
                if (childViewHolderInt != null && !childViewHolderInt.isRemoved() && childViewHolderInt.getItemId() == j) {
                    if (!this.mChildHelper.m637KQgRr5e_0(childViewHolderInt.itemView)) {
                        return childViewHolderInt;
                    }
                    wGk6X_27 = childViewHolderInt;
                }
            }
        }
        return wGk6X_27;
    }

    public WGk6X_27 findViewHolderForLayoutPosition(int i) {
        return findViewHolderForPosition(i, false);
    }

    @Deprecated
    public WGk6X_27 findViewHolderForPosition(int i) {
        return findViewHolderForPosition(i, false);
    }

    public boolean fling(int i, int i2) {
        YghfZG_14 yghfZG_14 = this.mLayout;
        if (yghfZG_14 == null) {
            Log.e(TAG, "Cannot fling without a LayoutManager set. Call setLayoutManager with a non-null argument.");
            return false;
        } else if (this.mLayoutFrozen) {
            return false;
        } else {
            boolean m942KQgRr5e_0 = yghfZG_14.m942KQgRr5e_0();
            boolean m953QxJ9d_1 = this.mLayout.m953QxJ9d_1();
            i = (!m942KQgRr5e_0 || Math.abs(i) < this.mMinFlingVelocity) ? 0 : 0;
            i2 = (!m953QxJ9d_1 || Math.abs(i2) < this.mMinFlingVelocity) ? 0 : 0;
            if (i == 0 && i2 == 0) {
                return false;
            }
            float f = i;
            float f2 = i2;
            if (!dispatchNestedPreFling(f, f2)) {
                boolean z = m942KQgRr5e_0 || m953QxJ9d_1;
                dispatchNestedFling(f, f2, z);
                JZJr_16 jZJr_16 = this.mOnFlingListener;
                if (jZJr_16 != null && jZJr_16.KQgRr5e_0(i, i2)) {
                    return true;
                }
                if (z) {
                    int i3 = m942KQgRr5e_0 ? 1 : 0;
                    if (m953QxJ9d_1) {
                        i3 |= 2;
                    }
                    startNestedScroll(i3, 1);
                    int i4 = this.mMaxFlingVelocity;
                    int max = Math.max(-i4, Math.min(i, i4));
                    int i5 = this.mMaxFlingVelocity;
                    this.mViewFlinger.KQgRr5e_0(max, Math.max(-i5, Math.min(i2, i5)));
                    return true;
                }
            }
            return false;
        }
    }

    @Override // android.view.ViewGroup, android.view.ViewParent
    public View focusSearch(View view, int i) {
        View view2;
        boolean z;
        View KQgRr5e_02 = this.mLayout.KQgRr5e_0(view, i);
        if (KQgRr5e_02 != null) {
            return KQgRr5e_02;
        }
        boolean z2 = (this.mAdapter == null || this.mLayout == null || isComputingLayout() || this.mLayoutFrozen) ? false : true;
        FocusFinder focusFinder = FocusFinder.getInstance();
        if (z2 && (i == 2 || i == 1)) {
            if (this.mLayout.m953QxJ9d_1()) {
                int i2 = i == 2 ? 130 : 33;
                z = focusFinder.findNextFocus(this, view, i2) == null;
                if (FORCE_ABS_FOCUS_SEARCH_DIRECTION) {
                    i = i2;
                }
            } else {
                z = false;
            }
            if (!z && this.mLayout.m942KQgRr5e_0()) {
                int i3 = (this.mLayout.X6FRs_4() == 1) ^ (i == 2) ? 66 : 17;
                boolean z3 = focusFinder.findNextFocus(this, view, i3) == null;
                if (FORCE_ABS_FOCUS_SEARCH_DIRECTION) {
                    i = i3;
                }
                z = z3;
            }
            if (z) {
                consumePendingUpdateOperations();
                if (findContainingItemView(view) == null) {
                    return null;
                }
                startInterceptRequestLayout();
                this.mLayout.KQgRr5e_0(view, i, this.mRecycler, this.mState);
                stopInterceptRequestLayout(false);
            }
            view2 = focusFinder.findNextFocus(this, view, i);
        } else {
            View findNextFocus = focusFinder.findNextFocus(this, view, i);
            if (findNextFocus == null && z2) {
                consumePendingUpdateOperations();
                if (findContainingItemView(view) == null) {
                    return null;
                }
                startInterceptRequestLayout();
                view2 = this.mLayout.KQgRr5e_0(view, i, this.mRecycler, this.mState);
                stopInterceptRequestLayout(false);
            } else {
                view2 = findNextFocus;
            }
        }
        if (view2 == null || view2.hasFocusable()) {
            return isPreferredNextFocus(view, view2, i) ? view2 : super.focusSearch(view, i);
        } else if (getFocusedChild() == null) {
            return super.focusSearch(view, i);
        } else {
            requestChildOnScreen(view2, null);
            return view;
        }
    }

    @Override // android.view.ViewGroup
    public ViewGroup.LayoutParams generateDefaultLayoutParams() {
        YghfZG_14 yghfZG_14 = this.mLayout;
        if (yghfZG_14 != null) {
            return yghfZG_14.m935KQgRr5e_0();
        }
        throw new IllegalStateException("RecyclerView has no LayoutManager" + exceptionLabel());
    }

    @Override // android.view.ViewGroup
    public ViewGroup.LayoutParams generateLayoutParams(AttributeSet attributeSet) {
        YghfZG_14 yghfZG_14 = this.mLayout;
        if (yghfZG_14 != null) {
            return yghfZG_14.KQgRr5e_0(getContext(), attributeSet);
        }
        throw new IllegalStateException("RecyclerView has no LayoutManager" + exceptionLabel());
    }

    public IMuAHx_6 getAdapter() {
        return this.mAdapter;
    }

    public int getAdapterPositionFor(WGk6X_27 wGk6X_27) {
        if (wGk6X_27.hasAnyOfTheFlags(524) || !wGk6X_27.isBound()) {
            return -1;
        }
        return this.mAdapterHelper.KQgRr5e_0(wGk6X_27.mPosition);
    }

    @Override // android.view.View
    public int getBaseline() {
        YghfZG_14 yghfZG_14 = this.mLayout;
        if (yghfZG_14 != null) {
            return yghfZG_14.KQgRr5e_0();
        }
        return super.getBaseline();
    }

    public long getChangedHolderKey(WGk6X_27 wGk6X_27) {
        return this.mAdapter.hasStableIds() ? wGk6X_27.getItemId() : wGk6X_27.mPosition;
    }

    public int getChildAdapterPosition(View view) {
        WGk6X_27 childViewHolderInt = getChildViewHolderInt(view);
        if (childViewHolderInt != null) {
            return childViewHolderInt.getAdapterPosition();
        }
        return -1;
    }

    @Override // android.view.ViewGroup
    public int getChildDrawingOrder(int i, int i2) {
        XnFJ5_9 xnFJ5_9 = this.mChildDrawingOrderCallback;
        if (xnFJ5_9 == null) {
            return super.getChildDrawingOrder(i, i2);
        }
        return xnFJ5_9.KQgRr5e_0(i, i2);
    }

    public long getChildItemId(View view) {
        WGk6X_27 childViewHolderInt;
        IMuAHx_6 iMuAHx_6 = this.mAdapter;
        if (iMuAHx_6 == null || !iMuAHx_6.hasStableIds() || (childViewHolderInt = getChildViewHolderInt(view)) == null) {
            return -1L;
        }
        return childViewHolderInt.getItemId();
    }

    public int getChildLayoutPosition(View view) {
        WGk6X_27 childViewHolderInt = getChildViewHolderInt(view);
        if (childViewHolderInt != null) {
            return childViewHolderInt.getLayoutPosition();
        }
        return -1;
    }

    @Deprecated
    public int getChildPosition(View view) {
        return getChildAdapterPosition(view);
    }

    public WGk6X_27 getChildViewHolder(View view) {
        ViewParent parent = view.getParent();
        if (parent != null && parent != this) {
            throw new IllegalArgumentException("View " + view + " is not a direct child of " + this);
        }
        return getChildViewHolderInt(view);
    }

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

    public X6FRs_4.YghfZG_14.PGPF6hQ_2.XnFJ5_9 getCompatAccessibilityDelegate() {
        return this.mAccessibilityDelegate;
    }

    public void getDecoratedBoundsWithMargins(View view, Rect rect) {
        getDecoratedBoundsWithMarginsInt(view, rect);
    }

    public Nm6q_10 getEdgeEffectFactory() {
        return this.mEdgeEffectFactory;
    }

    public KNBe_11 getItemAnimator() {
        return this.mItemAnimator;
    }

    public Rect getItemDecorInsetsForChild(View view) {
        LayoutParams layoutParams = (LayoutParams) view.getLayoutParams();
        if (!layoutParams.f2450KQgRr5e_0) {
            return layoutParams.KQgRr5e_0;
        }
        if (this.mState.m908QxJ9d_1() && (layoutParams.m916KQgRr5e_0() || layoutParams.PGPF6hQ_2())) {
            return layoutParams.KQgRr5e_0;
        }
        Rect rect = layoutParams.KQgRr5e_0;
        rect.set(0, 0, 0, 0);
        int size = this.mItemDecorations.size();
        for (int i = 0; i < size; i++) {
            this.mTempRect.set(0, 0, 0, 0);
            this.mItemDecorations.get(i).KQgRr5e_0(this.mTempRect, view, this, this.mState);
            int i2 = rect.left;
            Rect rect2 = this.mTempRect;
            rect.left = i2 + rect2.left;
            rect.top += rect2.top;
            rect.right += rect2.right;
            rect.bottom += rect2.bottom;
        }
        layoutParams.f2450KQgRr5e_0 = false;
        return rect;
    }

    public WwEq_13 getItemDecorationAt(int i) {
        int itemDecorationCount = getItemDecorationCount();
        if (i >= 0 && i < itemDecorationCount) {
            return this.mItemDecorations.get(i);
        }
        throw new IndexOutOfBoundsException(i + " is an invalid index for size " + itemDecorationCount);
    }

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

    public YghfZG_14 getLayoutManager() {
        return this.mLayout;
    }

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

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

    public long getNanoTime() {
        if (ALLOW_THREAD_GAP_WORK) {
            return System.nanoTime();
        }
        return 0L;
    }

    public JZJr_16 getOnFlingListener() {
        return this.mOnFlingListener;
    }

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

    public BVpCZyH_19 getRecycledViewPool() {
        return this.mRecycler.m958KQgRr5e_0();
    }

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

    public boolean hasFixedSize() {
        return this.mHasFixedSize;
    }

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

    public boolean hasPendingAdapterUpdates() {
        return !this.mFirstLayoutComplete || this.mDataSetHasChangedAfterLayout || this.mAdapterHelper.m624KQgRr5e_0();
    }

    public void initAdapterManager() {
        this.mAdapterHelper = new X6FRs_4.YghfZG_14.PGPF6hQ_2.KQgRr5e_0(new IFxWkV_5());
    }

    public void initFastScroller(StateListDrawable stateListDrawable, Drawable drawable, StateListDrawable stateListDrawable2, Drawable drawable2) {
        if (stateListDrawable != null && drawable != null && stateListDrawable2 != null && drawable2 != null) {
            Resources resources = getContext().getResources();
            new X6FRs_4.YghfZG_14.PGPF6hQ_2.Mqv2r_3(this, stateListDrawable, drawable, stateListDrawable2, drawable2, resources.getDimensionPixelSize(X6FRs_4.YghfZG_14.KQgRr5e_0.fastscroll_default_thickness), resources.getDimensionPixelSize(X6FRs_4.YghfZG_14.KQgRr5e_0.fastscroll_minimum_range), resources.getDimensionPixelOffset(X6FRs_4.YghfZG_14.KQgRr5e_0.fastscroll_margin));
            return;
        }
        throw new IllegalArgumentException("Trying to set fast scroller without both required drawables." + exceptionLabel());
    }

    public void invalidateGlows() {
        this.mBottomGlow = null;
        this.mTopGlow = null;
        this.mRightGlow = null;
        this.mLeftGlow = null;
    }

    public void invalidateItemDecorations() {
        if (this.mItemDecorations.size() == 0) {
            return;
        }
        YghfZG_14 yghfZG_14 = this.mLayout;
        if (yghfZG_14 != null) {
            yghfZG_14.KQgRr5e_0("Cannot invalidate item decorations during a scroll or layout");
        }
        markItemDecorInsetsDirty();
        requestLayout();
    }

    public boolean isAccessibilityEnabled() {
        AccessibilityManager accessibilityManager = this.mAccessibilityManager;
        return accessibilityManager != null && accessibilityManager.isEnabled();
    }

    public boolean isAnimating() {
        KNBe_11 kNBe_11 = this.mItemAnimator;
        return kNBe_11 != null && kNBe_11.m912KQgRr5e_0();
    }

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

    public boolean isComputingLayout() {
        return this.mLayoutOrScrollCounter > 0;
    }

    public boolean isLayoutFrozen() {
        return this.mLayoutFrozen;
    }

    @Override // android.view.View, X6FRs_4.IMuAHx_6.EuDEkJe_12.Nm6q_10
    public boolean isNestedScrollingEnabled() {
        return getScrollingChildHelper().QxJ9d_1();
    }

    public void jumpToPositionForSmoothScroller(int i) {
        YghfZG_14 yghfZG_14 = this.mLayout;
        if (yghfZG_14 == null) {
            return;
        }
        yghfZG_14.IFxWkV_5(i);
        awakenScrollBars();
    }

    public void markItemDecorInsetsDirty() {
        int QxJ9d_12 = this.mChildHelper.QxJ9d_1();
        for (int i = 0; i < QxJ9d_12; i++) {
            ((LayoutParams) this.mChildHelper.PGPF6hQ_2(i).getLayoutParams()).f2450KQgRr5e_0 = true;
        }
        this.mRecycler.Mqv2r_3();
    }

    public void markKnownViewsInvalid() {
        int QxJ9d_12 = this.mChildHelper.QxJ9d_1();
        for (int i = 0; i < QxJ9d_12; i++) {
            WGk6X_27 childViewHolderInt = getChildViewHolderInt(this.mChildHelper.PGPF6hQ_2(i));
            if (childViewHolderInt != null && !childViewHolderInt.shouldIgnore()) {
                childViewHolderInt.addFlags(6);
            }
        }
        markItemDecorInsetsDirty();
        this.mRecycler.X6FRs_4();
    }

    public void offsetChildrenHorizontal(int i) {
        int KQgRr5e_02 = this.mChildHelper.KQgRr5e_0();
        for (int i2 = 0; i2 < KQgRr5e_02; i2++) {
            this.mChildHelper.QxJ9d_1(i2).offsetLeftAndRight(i);
        }
    }

    public void offsetChildrenVertical(int i) {
        int KQgRr5e_02 = this.mChildHelper.KQgRr5e_0();
        for (int i2 = 0; i2 < KQgRr5e_02; i2++) {
            this.mChildHelper.QxJ9d_1(i2).offsetTopAndBottom(i);
        }
    }

    public void offsetPositionRecordsForInsert(int i, int i2) {
        int QxJ9d_12 = this.mChildHelper.QxJ9d_1();
        for (int i3 = 0; i3 < QxJ9d_12; i3++) {
            WGk6X_27 childViewHolderInt = getChildViewHolderInt(this.mChildHelper.PGPF6hQ_2(i3));
            if (childViewHolderInt != null && !childViewHolderInt.shouldIgnore() && childViewHolderInt.mPosition >= i) {
                childViewHolderInt.offsetPosition(i2, false);
                this.mState.f2442KQgRr5e_0 = true;
            }
        }
        this.mRecycler.KQgRr5e_0(i, i2);
        requestLayout();
    }

    public void offsetPositionRecordsForMove(int i, int i2) {
        int i3;
        int i4;
        int i5;
        int i6;
        int QxJ9d_12 = this.mChildHelper.QxJ9d_1();
        if (i < i2) {
            i5 = -1;
            i4 = i;
            i3 = i2;
        } else {
            i3 = i;
            i4 = i2;
            i5 = 1;
        }
        for (int i7 = 0; i7 < QxJ9d_12; i7++) {
            WGk6X_27 childViewHolderInt = getChildViewHolderInt(this.mChildHelper.PGPF6hQ_2(i7));
            if (childViewHolderInt != null && (i6 = childViewHolderInt.mPosition) >= i4 && i6 <= i3) {
                if (i6 == i) {
                    childViewHolderInt.offsetPosition(i2 - i, false);
                } else {
                    childViewHolderInt.offsetPosition(i5, false);
                }
                this.mState.f2442KQgRr5e_0 = true;
            }
        }
        this.mRecycler.QxJ9d_1(i, i2);
        requestLayout();
    }

    public void offsetPositionRecordsForRemove(int i, int i2, boolean z) {
        int i3 = i + i2;
        int QxJ9d_12 = this.mChildHelper.QxJ9d_1();
        for (int i4 = 0; i4 < QxJ9d_12; i4++) {
            WGk6X_27 childViewHolderInt = getChildViewHolderInt(this.mChildHelper.PGPF6hQ_2(i4));
            if (childViewHolderInt != null && !childViewHolderInt.shouldIgnore()) {
                int i5 = childViewHolderInt.mPosition;
                if (i5 >= i3) {
                    childViewHolderInt.offsetPosition(-i2, z);
                    this.mState.f2442KQgRr5e_0 = true;
                } else if (i5 >= i) {
                    childViewHolderInt.flagRemovedAndOffsetPosition(i - 1, -i2, z);
                    this.mState.f2442KQgRr5e_0 = true;
                }
            }
        }
        this.mRecycler.KQgRr5e_0(i, i2, z);
        requestLayout();
    }

    @Override // android.view.ViewGroup, android.view.View
    public void onAttachedToWindow() {
        super.onAttachedToWindow();
        this.mLayoutOrScrollCounter = 0;
        boolean z = true;
        this.mIsAttached = true;
        this.mFirstLayoutComplete = (!this.mFirstLayoutComplete || isLayoutRequested()) ? false : false;
        YghfZG_14 yghfZG_14 = this.mLayout;
        if (yghfZG_14 != null) {
            yghfZG_14.KQgRr5e_0(this);
        }
        this.mPostedAnimatorRunner = false;
        if (ALLOW_THREAD_GAP_WORK) {
            X6FRs_4.YghfZG_14.PGPF6hQ_2.X6FRs_4 x6FRs_4 = X6FRs_4.YghfZG_14.PGPF6hQ_2.X6FRs_4.KQgRr5e_0.get();
            this.mGapWorker = x6FRs_4;
            if (x6FRs_4 == null) {
                this.mGapWorker = new X6FRs_4.YghfZG_14.PGPF6hQ_2.X6FRs_4();
                Display m257KQgRr5e_0 = X6FRs_4.IMuAHx_6.EuDEkJe_12.ZzDuCHW_20.m257KQgRr5e_0((View) this);
                float f = 60.0f;
                if (!isInEditMode() && m257KQgRr5e_0 != null) {
                    float refreshRate = m257KQgRr5e_0.getRefreshRate();
                    if (refreshRate >= 30.0f) {
                        f = refreshRate;
                    }
                }
                X6FRs_4.YghfZG_14.PGPF6hQ_2.X6FRs_4 x6FRs_42 = this.mGapWorker;
                x6FRs_42.QxJ9d_1 = 1.0E9f / f;
                X6FRs_4.YghfZG_14.PGPF6hQ_2.X6FRs_4.KQgRr5e_0.set(x6FRs_42);
            }
            this.mGapWorker.KQgRr5e_0(this);
        }
    }

    public void onChildAttachedToWindow(View view) {
    }

    public void onChildDetachedFromWindow(View view) {
    }

    @Override // android.view.ViewGroup, android.view.View
    public void onDetachedFromWindow() {
        X6FRs_4.YghfZG_14.PGPF6hQ_2.X6FRs_4 x6FRs_4;
        super.onDetachedFromWindow();
        KNBe_11 kNBe_11 = this.mItemAnimator;
        if (kNBe_11 != null) {
            kNBe_11.m915QxJ9d_1();
        }
        stopScroll();
        this.mIsAttached = false;
        YghfZG_14 yghfZG_14 = this.mLayout;
        if (yghfZG_14 != null) {
            yghfZG_14.KQgRr5e_0(this, this.mRecycler);
        }
        this.mPendingAccessibilityImportanceChange.clear();
        removeCallbacks(this.mItemAnimatorRunner);
        this.mViewInfoStore.QxJ9d_1();
        if (!ALLOW_THREAD_GAP_WORK || (x6FRs_4 = this.mGapWorker) == null) {
            return;
        }
        x6FRs_4.QxJ9d_1(this);
        this.mGapWorker = null;
    }

    @Override // android.view.View
    public void onDraw(Canvas canvas) {
        super.onDraw(canvas);
        int size = this.mItemDecorations.size();
        for (int i = 0; i < size; i++) {
            this.mItemDecorations.get(i).KQgRr5e_0(canvas, this, this.mState);
        }
    }

    public void onEnterLayoutOrScroll() {
        this.mLayoutOrScrollCounter++;
    }

    public void onExitLayoutOrScroll() {
        onExitLayoutOrScroll(true);
    }

    /* JADX WARN: Removed duplicated region for block: B:31:0x0066  */
    @Override // android.view.View
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public boolean onGenericMotionEvent(MotionEvent motionEvent) {
        float f;
        float f2;
        if (this.mLayout != null && !this.mLayoutFrozen && motionEvent.getAction() == 8) {
            if ((motionEvent.getSource() & 2) != 0) {
                f = this.mLayout.m953QxJ9d_1() ? -motionEvent.getAxisValue(9) : 0.0f;
                if (this.mLayout.m942KQgRr5e_0()) {
                    f2 = motionEvent.getAxisValue(10);
                    if (f == 0.0f || f2 != 0.0f) {
                        scrollByInternal((int) (f2 * this.mScaledHorizontalScrollFactor), (int) (f * this.mScaledVerticalScrollFactor), motionEvent);
                    }
                }
                f2 = 0.0f;
                if (f == 0.0f) {
                }
                scrollByInternal((int) (f2 * this.mScaledHorizontalScrollFactor), (int) (f * this.mScaledVerticalScrollFactor), motionEvent);
            } else {
                if ((motionEvent.getSource() & 4194304) != 0) {
                    float axisValue = motionEvent.getAxisValue(26);
                    if (!this.mLayout.m953QxJ9d_1()) {
                        if (this.mLayout.m942KQgRr5e_0()) {
                            f2 = axisValue;
                            f = 0.0f;
                            if (f == 0.0f) {
                            }
                            scrollByInternal((int) (f2 * this.mScaledHorizontalScrollFactor), (int) (f * this.mScaledVerticalScrollFactor), motionEvent);
                        }
                    } else {
                        f = -axisValue;
                        f2 = 0.0f;
                        if (f == 0.0f) {
                        }
                        scrollByInternal((int) (f2 * this.mScaledHorizontalScrollFactor), (int) (f * this.mScaledVerticalScrollFactor), motionEvent);
                    }
                }
                f = 0.0f;
                f2 = 0.0f;
                if (f == 0.0f) {
                }
                scrollByInternal((int) (f2 * this.mScaledHorizontalScrollFactor), (int) (f * this.mScaledVerticalScrollFactor), motionEvent);
            }
        }
        return false;
    }

    @Override // android.view.ViewGroup
    public boolean onInterceptTouchEvent(MotionEvent motionEvent) {
        boolean z;
        if (this.mLayoutFrozen) {
            return false;
        }
        if (dispatchOnItemTouchIntercept(motionEvent)) {
            cancelTouch();
            return true;
        }
        YghfZG_14 yghfZG_14 = this.mLayout;
        if (yghfZG_14 == null) {
            return false;
        }
        boolean m942KQgRr5e_0 = yghfZG_14.m942KQgRr5e_0();
        boolean m953QxJ9d_1 = this.mLayout.m953QxJ9d_1();
        if (this.mVelocityTracker == null) {
            this.mVelocityTracker = VelocityTracker.obtain();
        }
        this.mVelocityTracker.addMovement(motionEvent);
        int actionMasked = motionEvent.getActionMasked();
        int actionIndex = motionEvent.getActionIndex();
        if (actionMasked == 0) {
            if (this.mIgnoreMotionEventTillDown) {
                this.mIgnoreMotionEventTillDown = false;
            }
            this.mScrollPointerId = motionEvent.getPointerId(0);
            int x = (int) (motionEvent.getX() + 0.5f);
            this.mLastTouchX = x;
            this.mInitialTouchX = x;
            int y = (int) (motionEvent.getY() + 0.5f);
            this.mLastTouchY = y;
            this.mInitialTouchY = y;
            if (this.mScrollState == 2) {
                getParent().requestDisallowInterceptTouchEvent(true);
                setScrollState(1);
            }
            int[] iArr = this.mNestedOffsets;
            iArr[1] = 0;
            iArr[0] = 0;
            int i = m942KQgRr5e_0 ? 1 : 0;
            if (m953QxJ9d_1) {
                i |= 2;
            }
            startNestedScroll(i, 0);
        } else if (actionMasked == 1) {
            this.mVelocityTracker.clear();
            stopNestedScroll(0);
        } else if (actionMasked == 2) {
            int findPointerIndex = motionEvent.findPointerIndex(this.mScrollPointerId);
            if (findPointerIndex < 0) {
                Log.e(TAG, "Error processing scroll; pointer index for id " + this.mScrollPointerId + " not found. Did any MotionEvents get skipped?");
                return false;
            }
            int x2 = (int) (motionEvent.getX(findPointerIndex) + 0.5f);
            int y2 = (int) (motionEvent.getY(findPointerIndex) + 0.5f);
            if (this.mScrollState != 1) {
                int i2 = x2 - this.mInitialTouchX;
                int i3 = y2 - this.mInitialTouchY;
                if (!m942KQgRr5e_0 || Math.abs(i2) <= this.mTouchSlop) {
                    z = false;
                } else {
                    this.mLastTouchX = x2;
                    z = true;
                }
                if (m953QxJ9d_1 && Math.abs(i3) > this.mTouchSlop) {
                    this.mLastTouchY = y2;
                    z = true;
                }
                if (z) {
                    setScrollState(1);
                }
            }
        } else if (actionMasked == 3) {
            cancelTouch();
        } else if (actionMasked == 5) {
            this.mScrollPointerId = motionEvent.getPointerId(actionIndex);
            int x3 = (int) (motionEvent.getX(actionIndex) + 0.5f);
            this.mLastTouchX = x3;
            this.mInitialTouchX = x3;
            int y3 = (int) (motionEvent.getY(actionIndex) + 0.5f);
            this.mLastTouchY = y3;
            this.mInitialTouchY = y3;
        } else if (actionMasked == 6) {
            onPointerUp(motionEvent);
        }
        return this.mScrollState == 1;
    }

    @Override // android.view.ViewGroup, android.view.View
    public void onLayout(boolean z, int i, int i2, int i3, int i4) {
        X6FRs_4.IMuAHx_6.Xgtqvk_8.KQgRr5e_0.KQgRr5e_0(TRACE_ON_LAYOUT_TAG);
        dispatchLayout();
        X6FRs_4.IMuAHx_6.Xgtqvk_8.KQgRr5e_0.KQgRr5e_0();
        this.mFirstLayoutComplete = true;
    }

    @Override // android.view.View
    public void onMeasure(int i, int i2) {
        YghfZG_14 yghfZG_14 = this.mLayout;
        if (yghfZG_14 == null) {
            defaultOnMeasure(i, i2);
            return;
        }
        boolean z = false;
        if (yghfZG_14.m930IFxWkV_5()) {
            int mode = View.MeasureSpec.getMode(i);
            int mode2 = View.MeasureSpec.getMode(i2);
            this.mLayout.KQgRr5e_0(this.mRecycler, this.mState, i, i2);
            if (mode == 1073741824 && mode2 == 1073741824) {
                z = true;
            }
            if (z || this.mAdapter == null) {
                return;
            }
            if (this.mState.f3548Mqv2r_3 == 1) {
                dispatchLayoutStep1();
            }
            this.mLayout.QxJ9d_1(i, i2);
            this.mState.f2443Mqv2r_3 = true;
            dispatchLayoutStep2();
            this.mLayout.Mqv2r_3(i, i2);
            if (this.mLayout.m955Xgtqvk_8()) {
                this.mLayout.QxJ9d_1(View.MeasureSpec.makeMeasureSpec(getMeasuredWidth(), 1073741824), View.MeasureSpec.makeMeasureSpec(getMeasuredHeight(), 1073741824));
                this.mState.f2443Mqv2r_3 = true;
                dispatchLayoutStep2();
                this.mLayout.Mqv2r_3(i, i2);
            }
        } else if (this.mHasFixedSize) {
            this.mLayout.KQgRr5e_0(this.mRecycler, this.mState, i, i2);
        } else {
            if (this.mAdapterUpdateDuringMeasure) {
                startInterceptRequestLayout();
                onEnterLayoutOrScroll();
                processAdapterUpdatesAndSetAnimationFlags();
                onExitLayoutOrScroll();
                G83uNX_24 g83uNX_24 = this.mState;
                if (g83uNX_24.f2439IFxWkV_5) {
                    g83uNX_24.f2445QxJ9d_1 = true;
                } else {
                    this.mAdapterHelper.QxJ9d_1();
                    this.mState.f2445QxJ9d_1 = false;
                }
                this.mAdapterUpdateDuringMeasure = false;
                stopInterceptRequestLayout(false);
            } else if (this.mState.f2439IFxWkV_5) {
                setMeasuredDimension(getMeasuredWidth(), getMeasuredHeight());
                return;
            }
            IMuAHx_6 iMuAHx_6 = this.mAdapter;
            if (iMuAHx_6 != null) {
                this.mState.f3549X6FRs_4 = iMuAHx_6.getItemCount();
            } else {
                this.mState.f3549X6FRs_4 = 0;
            }
            startInterceptRequestLayout();
            this.mLayout.KQgRr5e_0(this.mRecycler, this.mState, i, i2);
            stopInterceptRequestLayout(false);
            this.mState.f2445QxJ9d_1 = false;
        }
    }

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

    @Override // android.view.View
    public void onRestoreInstanceState(Parcelable parcelable) {
        Parcelable parcelable2;
        if (!(parcelable instanceof SavedState)) {
            super.onRestoreInstanceState(parcelable);
            return;
        }
        SavedState savedState = (SavedState) parcelable;
        this.mPendingSavedState = savedState;
        super.onRestoreInstanceState(savedState.getSuperState());
        YghfZG_14 yghfZG_14 = this.mLayout;
        if (yghfZG_14 == null || (parcelable2 = this.mPendingSavedState.KQgRr5e_0) == null) {
            return;
        }
        yghfZG_14.KQgRr5e_0(parcelable2);
    }

    @Override // android.view.View
    public Parcelable onSaveInstanceState() {
        SavedState savedState = new SavedState(super.onSaveInstanceState());
        SavedState savedState2 = this.mPendingSavedState;
        if (savedState2 != null) {
            savedState.KQgRr5e_0(savedState2);
        } else {
            YghfZG_14 yghfZG_14 = this.mLayout;
            if (yghfZG_14 != null) {
                savedState.KQgRr5e_0 = yghfZG_14.m932KQgRr5e_0();
            } else {
                savedState.KQgRr5e_0 = null;
            }
        }
        return savedState;
    }

    public void onScrollStateChanged(int i) {
    }

    public void onScrolled(int i, int i2) {
    }

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

    /* JADX WARN: Removed duplicated region for block: B:53:0x010c  */
    /* JADX WARN: Removed duplicated region for block: B:60:0x011c  */
    @Override // android.view.View
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public boolean onTouchEvent(MotionEvent motionEvent) {
        boolean z;
        boolean z2 = false;
        if (this.mLayoutFrozen || this.mIgnoreMotionEventTillDown) {
            return false;
        }
        if (dispatchOnItemTouch(motionEvent)) {
            cancelTouch();
            return true;
        }
        YghfZG_14 yghfZG_14 = this.mLayout;
        if (yghfZG_14 == null) {
            return false;
        }
        boolean m942KQgRr5e_0 = yghfZG_14.m942KQgRr5e_0();
        boolean m953QxJ9d_1 = this.mLayout.m953QxJ9d_1();
        if (this.mVelocityTracker == null) {
            this.mVelocityTracker = VelocityTracker.obtain();
        }
        MotionEvent obtain = MotionEvent.obtain(motionEvent);
        int actionMasked = motionEvent.getActionMasked();
        int actionIndex = motionEvent.getActionIndex();
        if (actionMasked == 0) {
            int[] iArr = this.mNestedOffsets;
            iArr[1] = 0;
            iArr[0] = 0;
        }
        int[] iArr2 = this.mNestedOffsets;
        obtain.offsetLocation(iArr2[0], iArr2[1]);
        if (actionMasked == 0) {
            this.mScrollPointerId = motionEvent.getPointerId(0);
            int x = (int) (motionEvent.getX() + 0.5f);
            this.mLastTouchX = x;
            this.mInitialTouchX = x;
            int y = (int) (motionEvent.getY() + 0.5f);
            this.mLastTouchY = y;
            this.mInitialTouchY = y;
            int i = m942KQgRr5e_0 ? 1 : 0;
            if (m953QxJ9d_1) {
                i |= 2;
            }
            startNestedScroll(i, 0);
        } else if (actionMasked == 1) {
            this.mVelocityTracker.addMovement(obtain);
            this.mVelocityTracker.computeCurrentVelocity(1000, this.mMaxFlingVelocity);
            float f = m942KQgRr5e_0 ? -this.mVelocityTracker.getXVelocity(this.mScrollPointerId) : 0.0f;
            float f2 = m953QxJ9d_1 ? -this.mVelocityTracker.getYVelocity(this.mScrollPointerId) : 0.0f;
            if ((f == 0.0f && f2 == 0.0f) || !fling((int) f, (int) f2)) {
                setScrollState(0);
            }
            resetTouch();
            z2 = true;
        } else if (actionMasked == 2) {
            int findPointerIndex = motionEvent.findPointerIndex(this.mScrollPointerId);
            if (findPointerIndex < 0) {
                Log.e(TAG, "Error processing scroll; pointer index for id " + this.mScrollPointerId + " not found. Did any MotionEvents get skipped?");
                return false;
            }
            int x2 = (int) (motionEvent.getX(findPointerIndex) + 0.5f);
            int y2 = (int) (motionEvent.getY(findPointerIndex) + 0.5f);
            int i2 = this.mLastTouchX - x2;
            int i3 = this.mLastTouchY - y2;
            if (dispatchNestedPreScroll(i2, i3, this.mScrollConsumed, this.mScrollOffset, 0)) {
                int[] iArr3 = this.mScrollConsumed;
                i2 -= iArr3[0];
                i3 -= iArr3[1];
                int[] iArr4 = this.mScrollOffset;
                obtain.offsetLocation(iArr4[0], iArr4[1]);
                int[] iArr5 = this.mNestedOffsets;
                int i4 = iArr5[0];
                int[] iArr6 = this.mScrollOffset;
                iArr5[0] = i4 + iArr6[0];
                iArr5[1] = iArr5[1] + iArr6[1];
            }
            if (this.mScrollState != 1) {
                if (m942KQgRr5e_0) {
                    int abs = Math.abs(i2);
                    int i5 = this.mTouchSlop;
                    if (abs > i5) {
                        i2 = i2 > 0 ? i2 - i5 : i2 + i5;
                        z = true;
                        if (m953QxJ9d_1) {
                            int abs2 = Math.abs(i3);
                            int i6 = this.mTouchSlop;
                            if (abs2 > i6) {
                                i3 = i3 > 0 ? i3 - i6 : i3 + i6;
                                z = true;
                            }
                        }
                        if (z) {
                            setScrollState(1);
                        }
                    }
                }
                z = false;
                if (m953QxJ9d_1) {
                }
                if (z) {
                }
            }
            if (this.mScrollState == 1) {
                int[] iArr7 = this.mScrollOffset;
                this.mLastTouchX = x2 - iArr7[0];
                this.mLastTouchY = y2 - iArr7[1];
                if (scrollByInternal(m942KQgRr5e_0 ? i2 : 0, m953QxJ9d_1 ? i3 : 0, obtain)) {
                    getParent().requestDisallowInterceptTouchEvent(true);
                }
                if (this.mGapWorker != null && (i2 != 0 || i3 != 0)) {
                    this.mGapWorker.KQgRr5e_0(this, i2, i3);
                }
            }
        } else if (actionMasked == 3) {
            cancelTouch();
        } else if (actionMasked == 5) {
            this.mScrollPointerId = motionEvent.getPointerId(actionIndex);
            int x3 = (int) (motionEvent.getX(actionIndex) + 0.5f);
            this.mLastTouchX = x3;
            this.mInitialTouchX = x3;
            int y3 = (int) (motionEvent.getY(actionIndex) + 0.5f);
            this.mLastTouchY = y3;
            this.mInitialTouchY = y3;
        } else if (actionMasked == 6) {
            onPointerUp(motionEvent);
        }
        if (!z2) {
            this.mVelocityTracker.addMovement(obtain);
        }
        obtain.recycle();
        return true;
    }

    public void postAnimationRunner() {
        if (this.mPostedAnimatorRunner || !this.mIsAttached) {
            return;
        }
        X6FRs_4.IMuAHx_6.EuDEkJe_12.ZzDuCHW_20.KQgRr5e_0(this, this.mItemAnimatorRunner);
        this.mPostedAnimatorRunner = true;
    }

    public void processDataSetCompletelyChanged(boolean z) {
        this.mDispatchItemsChangedEvent = z | this.mDispatchItemsChangedEvent;
        this.mDataSetHasChangedAfterLayout = true;
        markKnownViewsInvalid();
    }

    public void recordAnimationInfoIfBouncedHiddenView(WGk6X_27 wGk6X_27, KNBe_11.PGPF6hQ_2 pGPF6hQ_2) {
        wGk6X_27.setFlags(0, WGk6X_27.FLAG_BOUNCED_FROM_HIDDEN_LIST);
        if (this.mState.f2444PGPF6hQ_2 && wGk6X_27.isUpdated() && !wGk6X_27.isRemoved() && !wGk6X_27.shouldIgnore()) {
            this.mViewInfoStore.KQgRr5e_0(getChangedHolderKey(wGk6X_27), wGk6X_27);
        }
        this.mViewInfoStore.PGPF6hQ_2(wGk6X_27, pGPF6hQ_2);
    }

    public void removeAndRecycleViews() {
        KNBe_11 kNBe_11 = this.mItemAnimator;
        if (kNBe_11 != null) {
            kNBe_11.m915QxJ9d_1();
        }
        YghfZG_14 yghfZG_14 = this.mLayout;
        if (yghfZG_14 != null) {
            yghfZG_14.QxJ9d_1(this.mRecycler);
            this.mLayout.PGPF6hQ_2(this.mRecycler);
        }
        this.mRecycler.m962KQgRr5e_0();
    }

    public boolean removeAnimatingView(View view) {
        startInterceptRequestLayout();
        boolean m640QxJ9d_1 = this.mChildHelper.m640QxJ9d_1(view);
        if (m640QxJ9d_1) {
            WGk6X_27 childViewHolderInt = getChildViewHolderInt(view);
            this.mRecycler.X6FRs_4(childViewHolderInt);
            this.mRecycler.Mqv2r_3(childViewHolderInt);
        }
        stopInterceptRequestLayout(!m640QxJ9d_1);
        return m640QxJ9d_1;
    }

    @Override // android.view.ViewGroup
    public void removeDetachedView(View view, boolean z) {
        WGk6X_27 childViewHolderInt = getChildViewHolderInt(view);
        if (childViewHolderInt != null) {
            if (childViewHolderInt.isTmpDetached()) {
                childViewHolderInt.clearTmpDetachFlag();
            } else if (!childViewHolderInt.shouldIgnore()) {
                throw new IllegalArgumentException("Called removeDetachedView with a view which is not flagged as tmp detached." + childViewHolderInt + exceptionLabel());
            }
        }
        view.clearAnimation();
        dispatchChildDetached(view);
        super.removeDetachedView(view, z);
    }

    public void removeItemDecoration(WwEq_13 wwEq_13) {
        YghfZG_14 yghfZG_14 = this.mLayout;
        if (yghfZG_14 != null) {
            yghfZG_14.KQgRr5e_0("Cannot remove item decoration during a scroll  or layout");
        }
        this.mItemDecorations.remove(wwEq_13);
        if (this.mItemDecorations.isEmpty()) {
            setWillNotDraw(getOverScrollMode() == 2);
        }
        markItemDecorInsetsDirty();
        requestLayout();
    }

    public void removeItemDecorationAt(int i) {
        int itemDecorationCount = getItemDecorationCount();
        if (i >= 0 && i < itemDecorationCount) {
            removeItemDecoration(getItemDecorationAt(i));
            return;
        }
        throw new IndexOutOfBoundsException(i + " is an invalid index for size " + itemDecorationCount);
    }

    public void removeOnChildAttachStateChangeListener(LGe8pk_15 lGe8pk_15) {
        List<LGe8pk_15> list = this.mOnChildAttachStateListeners;
        if (list == null) {
            return;
        }
        list.remove(lGe8pk_15);
    }

    public void removeOnItemTouchListener(NQvZgp_17 nQvZgp_17) {
        this.mOnItemTouchListeners.remove(nQvZgp_17);
        if (this.mActiveOnItemTouchListener == nQvZgp_17) {
            this.mActiveOnItemTouchListener = null;
        }
    }

    public void removeOnScrollListener(Eps4cJe_18 eps4cJe_18) {
        List<Eps4cJe_18> list = this.mScrollListeners;
        if (list != null) {
            list.remove(eps4cJe_18);
        }
    }

    public void repositionShadowingViews() {
        WGk6X_27 wGk6X_27;
        int KQgRr5e_02 = this.mChildHelper.KQgRr5e_0();
        for (int i = 0; i < KQgRr5e_02; i++) {
            View QxJ9d_12 = this.mChildHelper.QxJ9d_1(i);
            WGk6X_27 childViewHolder = getChildViewHolder(QxJ9d_12);
            if (childViewHolder != null && (wGk6X_27 = childViewHolder.mShadowingHolder) != null) {
                View view = wGk6X_27.itemView;
                int left = QxJ9d_12.getLeft();
                int top = QxJ9d_12.getTop();
                if (left != view.getLeft() || top != view.getTop()) {
                    view.layout(left, top, view.getWidth() + left, view.getHeight() + top);
                }
            }
        }
    }

    @Override // android.view.ViewGroup, android.view.ViewParent
    public void requestChildFocus(View view, View view2) {
        if (!this.mLayout.KQgRr5e_0(this, this.mState, view, view2) && view2 != null) {
            requestChildOnScreen(view, view2);
        }
        super.requestChildFocus(view, view2);
    }

    @Override // android.view.ViewGroup, android.view.ViewParent
    public boolean requestChildRectangleOnScreen(View view, Rect rect, boolean z) {
        return this.mLayout.KQgRr5e_0(this, view, rect, z);
    }

    @Override // android.view.ViewGroup, android.view.ViewParent
    public void requestDisallowInterceptTouchEvent(boolean z) {
        int size = this.mOnItemTouchListeners.size();
        for (int i = 0; i < size; i++) {
            this.mOnItemTouchListeners.get(i).KQgRr5e_0(z);
        }
        super.requestDisallowInterceptTouchEvent(z);
    }

    @Override // android.view.View, android.view.ViewParent
    public void requestLayout() {
        if (this.mInterceptRequestLayoutDepth == 0 && !this.mLayoutFrozen) {
            super.requestLayout();
        } else {
            this.mLayoutWasDefered = true;
        }
    }

    public void saveOldPositions() {
        int QxJ9d_12 = this.mChildHelper.QxJ9d_1();
        for (int i = 0; i < QxJ9d_12; i++) {
            WGk6X_27 childViewHolderInt = getChildViewHolderInt(this.mChildHelper.PGPF6hQ_2(i));
            if (!childViewHolderInt.shouldIgnore()) {
                childViewHolderInt.saveOldPosition();
            }
        }
    }

    @Override // android.view.View
    public void scrollBy(int i, int i2) {
        YghfZG_14 yghfZG_14 = this.mLayout;
        if (yghfZG_14 == null) {
            Log.e(TAG, "Cannot scroll without a LayoutManager set. Call setLayoutManager with a non-null argument.");
        } else if (this.mLayoutFrozen) {
        } else {
            boolean m942KQgRr5e_0 = yghfZG_14.m942KQgRr5e_0();
            boolean m953QxJ9d_1 = this.mLayout.m953QxJ9d_1();
            if (m942KQgRr5e_0 || m953QxJ9d_1) {
                if (!m942KQgRr5e_0) {
                    i = 0;
                }
                if (!m953QxJ9d_1) {
                    i2 = 0;
                }
                scrollByInternal(i, i2, null);
            }
        }
    }

    public boolean scrollByInternal(int i, int i2, MotionEvent motionEvent) {
        int i3;
        int i4;
        int i5;
        int i6;
        consumePendingUpdateOperations();
        if (this.mAdapter != null) {
            scrollStep(i, i2, this.mScrollStepConsumed);
            int[] iArr = this.mScrollStepConsumed;
            int i7 = iArr[0];
            int i8 = iArr[1];
            i4 = i8;
            i5 = i7;
            i6 = i - i7;
            i3 = i2 - i8;
        } else {
            i3 = 0;
            i4 = 0;
            i5 = 0;
            i6 = 0;
        }
        if (!this.mItemDecorations.isEmpty()) {
            invalidate();
        }
        int i9 = i3;
        if (dispatchNestedScroll(i5, i4, i6, i3, this.mScrollOffset, 0)) {
            int i10 = this.mLastTouchX;
            int[] iArr2 = this.mScrollOffset;
            this.mLastTouchX = i10 - iArr2[0];
            this.mLastTouchY -= iArr2[1];
            if (motionEvent != null) {
                motionEvent.offsetLocation(iArr2[0], iArr2[1]);
            }
            int[] iArr3 = this.mNestedOffsets;
            int i11 = iArr3[0];
            int[] iArr4 = this.mScrollOffset;
            iArr3[0] = i11 + iArr4[0];
            iArr3[1] = iArr3[1] + iArr4[1];
        } else if (getOverScrollMode() != 2) {
            if (motionEvent != null && !X6FRs_4.IMuAHx_6.EuDEkJe_12.FSaI4_7.KQgRr5e_0(motionEvent, 8194)) {
                pullGlows(motionEvent.getX(), i6, motionEvent.getY(), i9);
            }
            considerReleasingGlowsOnScroll(i, i2);
        }
        if (i5 != 0 || i4 != 0) {
            dispatchOnScrolled(i5, i4);
        }
        if (!awakenScrollBars()) {
            invalidate();
        }
        return (i5 == 0 && i4 == 0) ? false : true;
    }

    public void scrollStep(int i, int i2, int[] iArr) {
        startInterceptRequestLayout();
        onEnterLayoutOrScroll();
        X6FRs_4.IMuAHx_6.Xgtqvk_8.KQgRr5e_0.KQgRr5e_0(TRACE_SCROLL_TAG);
        fillRemainingScrollValues(this.mState);
        int KQgRr5e_02 = i != 0 ? this.mLayout.KQgRr5e_0(i, this.mRecycler, this.mState) : 0;
        int QxJ9d_12 = i2 != 0 ? this.mLayout.QxJ9d_1(i2, this.mRecycler, this.mState) : 0;
        X6FRs_4.IMuAHx_6.Xgtqvk_8.KQgRr5e_0.KQgRr5e_0();
        repositionShadowingViews();
        onExitLayoutOrScroll();
        stopInterceptRequestLayout(false);
        if (iArr != null) {
            iArr[0] = KQgRr5e_02;
            iArr[1] = QxJ9d_12;
        }
    }

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

    public void scrollToPosition(int i) {
        if (this.mLayoutFrozen) {
            return;
        }
        stopScroll();
        YghfZG_14 yghfZG_14 = this.mLayout;
        if (yghfZG_14 == null) {
            Log.e(TAG, "Cannot scroll to position a LayoutManager set. Call setLayoutManager with a non-null argument.");
            return;
        }
        yghfZG_14.IFxWkV_5(i);
        awakenScrollBars();
    }

    @Override // android.view.View, android.view.accessibility.AccessibilityEventSource
    public void sendAccessibilityEventUnchecked(AccessibilityEvent accessibilityEvent) {
        if (shouldDeferAccessibilityEvent(accessibilityEvent)) {
            return;
        }
        super.sendAccessibilityEventUnchecked(accessibilityEvent);
    }

    public void setAccessibilityDelegateCompat(X6FRs_4.YghfZG_14.PGPF6hQ_2.XnFJ5_9 xnFJ5_9) {
        this.mAccessibilityDelegate = xnFJ5_9;
        X6FRs_4.IMuAHx_6.EuDEkJe_12.ZzDuCHW_20.KQgRr5e_0(this, xnFJ5_9);
    }

    public void setAdapter(IMuAHx_6 iMuAHx_6) {
        setLayoutFrozen(false);
        setAdapterInternal(iMuAHx_6, false, true);
        processDataSetCompletelyChanged(false);
        requestLayout();
    }

    public void setChildDrawingOrderCallback(XnFJ5_9 xnFJ5_9) {
        if (xnFJ5_9 == this.mChildDrawingOrderCallback) {
            return;
        }
        this.mChildDrawingOrderCallback = xnFJ5_9;
        setChildrenDrawingOrderEnabled(xnFJ5_9 != null);
    }

    public boolean setChildImportantForAccessibilityInternal(WGk6X_27 wGk6X_27, int i) {
        if (isComputingLayout()) {
            wGk6X_27.mPendingAccessibilityState = i;
            this.mPendingAccessibilityImportanceChange.add(wGk6X_27);
            return false;
        }
        X6FRs_4.IMuAHx_6.EuDEkJe_12.ZzDuCHW_20.IMuAHx_6(wGk6X_27.itemView, i);
        return true;
    }

    @Override // android.view.ViewGroup
    public void setClipToPadding(boolean z) {
        if (z != this.mClipToPadding) {
            invalidateGlows();
        }
        this.mClipToPadding = z;
        super.setClipToPadding(z);
        if (this.mFirstLayoutComplete) {
            requestLayout();
        }
    }

    public void setEdgeEffectFactory(Nm6q_10 nm6q_10) {
        X6FRs_4.IMuAHx_6.KNBe_11.FSaI4_7.KQgRr5e_0(nm6q_10);
        this.mEdgeEffectFactory = nm6q_10;
        invalidateGlows();
    }

    public void setHasFixedSize(boolean z) {
        this.mHasFixedSize = z;
    }

    public void setItemAnimator(KNBe_11 kNBe_11) {
        KNBe_11 kNBe_112 = this.mItemAnimator;
        if (kNBe_112 != null) {
            kNBe_112.m915QxJ9d_1();
            this.mItemAnimator.KQgRr5e_0((KNBe_11.QxJ9d_1) null);
        }
        this.mItemAnimator = kNBe_11;
        if (kNBe_11 != null) {
            kNBe_11.KQgRr5e_0(this.mItemAnimatorListener);
        }
    }

    public void setItemViewCacheSize(int i) {
        this.mRecycler.m965QxJ9d_1(i);
    }

    public void setLayoutFrozen(boolean z) {
        if (z != this.mLayoutFrozen) {
            assertNotInLayoutOrScroll("Do not setLayoutFrozen in layout or scroll");
            if (!z) {
                this.mLayoutFrozen = false;
                if (this.mLayoutWasDefered && this.mLayout != null && this.mAdapter != null) {
                    requestLayout();
                }
                this.mLayoutWasDefered = false;
                return;
            }
            long uptimeMillis = SystemClock.uptimeMillis();
            onTouchEvent(MotionEvent.obtain(uptimeMillis, uptimeMillis, 3, 0.0f, 0.0f, 0));
            this.mLayoutFrozen = true;
            this.mIgnoreMotionEventTillDown = true;
            stopScroll();
        }
    }

    public void setLayoutManager(YghfZG_14 yghfZG_14) {
        if (yghfZG_14 == this.mLayout) {
            return;
        }
        stopScroll();
        if (this.mLayout != null) {
            KNBe_11 kNBe_11 = this.mItemAnimator;
            if (kNBe_11 != null) {
                kNBe_11.m915QxJ9d_1();
            }
            this.mLayout.QxJ9d_1(this.mRecycler);
            this.mLayout.PGPF6hQ_2(this.mRecycler);
            this.mRecycler.m962KQgRr5e_0();
            if (this.mIsAttached) {
                this.mLayout.KQgRr5e_0(this, this.mRecycler);
            }
            this.mLayout.IFxWkV_5((RecyclerView) null);
            this.mLayout = null;
        } else {
            this.mRecycler.m962KQgRr5e_0();
        }
        this.mChildHelper.m634KQgRr5e_0();
        this.mLayout = yghfZG_14;
        if (yghfZG_14 != null) {
            if (yghfZG_14.f2466KQgRr5e_0 == null) {
                yghfZG_14.IFxWkV_5(this);
                if (this.mIsAttached) {
                    this.mLayout.KQgRr5e_0(this);
                }
            } else {
                throw new IllegalArgumentException("LayoutManager " + yghfZG_14 + " is already attached to a RecyclerView:" + yghfZG_14.f2466KQgRr5e_0.exceptionLabel());
            }
        }
        this.mRecycler.IMuAHx_6();
        requestLayout();
    }

    @Override // android.view.View
    public void setNestedScrollingEnabled(boolean z) {
        getScrollingChildHelper().KQgRr5e_0(z);
    }

    public void setOnFlingListener(JZJr_16 jZJr_16) {
        this.mOnFlingListener = jZJr_16;
    }

    @Deprecated
    public void setOnScrollListener(Eps4cJe_18 eps4cJe_18) {
        this.mScrollListener = eps4cJe_18;
    }

    public void setPreserveFocusAfterLayout(boolean z) {
        this.mPreserveFocusAfterLayout = z;
    }

    public void setRecycledViewPool(BVpCZyH_19 bVpCZyH_19) {
        this.mRecycler.KQgRr5e_0(bVpCZyH_19);
    }

    public void setRecyclerListener(RfjZ_21 rfjZ_21) {
        this.mRecyclerListener = rfjZ_21;
    }

    public void setScrollState(int i) {
        if (i == this.mScrollState) {
            return;
        }
        this.mScrollState = i;
        if (i != 2) {
            stopScrollersInternal();
        }
        dispatchOnScrollStateChanged(i);
    }

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

    public void setViewCacheExtension(KVtv3R_25 kVtv3R_25) {
        this.mRecycler.KQgRr5e_0(kVtv3R_25);
    }

    public boolean shouldDeferAccessibilityEvent(AccessibilityEvent accessibilityEvent) {
        if (isComputingLayout()) {
            int KQgRr5e_02 = accessibilityEvent != null ? X6FRs_4.IMuAHx_6.EuDEkJe_12.NzhupJ_29.QxJ9d_1.KQgRr5e_0(accessibilityEvent) : 0;
            this.mEatenAccessibilityChangeFlags |= KQgRr5e_02 != 0 ? KQgRr5e_02 : 0;
            return true;
        }
        return false;
    }

    public void smoothScrollBy(int i, int i2) {
        smoothScrollBy(i, i2, null);
    }

    public void smoothScrollToPosition(int i) {
        if (this.mLayoutFrozen) {
            return;
        }
        YghfZG_14 yghfZG_14 = this.mLayout;
        if (yghfZG_14 == null) {
            Log.e(TAG, "Cannot smooth scroll without a LayoutManager set. Call setLayoutManager with a non-null argument.");
        } else {
            yghfZG_14.KQgRr5e_0(this, this.mState, i);
        }
    }

    public void startInterceptRequestLayout() {
        int i = this.mInterceptRequestLayoutDepth + 1;
        this.mInterceptRequestLayoutDepth = i;
        if (i != 1 || this.mLayoutFrozen) {
            return;
        }
        this.mLayoutWasDefered = false;
    }

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

    public void stopInterceptRequestLayout(boolean z) {
        if (this.mInterceptRequestLayoutDepth < 1) {
            this.mInterceptRequestLayoutDepth = 1;
        }
        if (!z && !this.mLayoutFrozen) {
            this.mLayoutWasDefered = false;
        }
        if (this.mInterceptRequestLayoutDepth == 1) {
            if (z && this.mLayoutWasDefered && !this.mLayoutFrozen && this.mLayout != null && this.mAdapter != null) {
                dispatchLayout();
            }
            if (!this.mLayoutFrozen) {
                this.mLayoutWasDefered = false;
            }
        }
        this.mInterceptRequestLayoutDepth--;
    }

    @Override // android.view.View, X6FRs_4.IMuAHx_6.EuDEkJe_12.Nm6q_10
    public void stopNestedScroll() {
        getScrollingChildHelper().KQgRr5e_0();
    }

    public void stopScroll() {
        setScrollState(0);
        stopScrollersInternal();
    }

    public void swapAdapter(IMuAHx_6 iMuAHx_6, boolean z) {
        setLayoutFrozen(false);
        setAdapterInternal(iMuAHx_6, true, z);
        processDataSetCompletelyChanged(true);
        requestLayout();
    }

    public void viewRangeUpdate(int i, int i2, Object obj) {
        int i3;
        int QxJ9d_12 = this.mChildHelper.QxJ9d_1();
        int i4 = i + i2;
        for (int i5 = 0; i5 < QxJ9d_12; i5++) {
            View PGPF6hQ_22 = this.mChildHelper.PGPF6hQ_2(i5);
            WGk6X_27 childViewHolderInt = getChildViewHolderInt(PGPF6hQ_22);
            if (childViewHolderInt != null && !childViewHolderInt.shouldIgnore() && (i3 = childViewHolderInt.mPosition) >= i && i3 < i4) {
                childViewHolderInt.addFlags(2);
                childViewHolderInt.addChangePayload(obj);
                ((LayoutParams) PGPF6hQ_22.getLayoutParams()).f2450KQgRr5e_0 = true;
            }
        }
        this.mRecycler.PGPF6hQ_2(i, i2);
    }

    /* loaded from: classes.dex */
    public class XDsvEfm_26 implements Runnable {
        public int KQgRr5e_0;

        /* renamed from: KQgRr5e_0  reason: collision with other field name */
        public OverScroller f2459KQgRr5e_0;
        public int QxJ9d_1;

        /* renamed from: KQgRr5e_0  reason: collision with other field name */
        public Interpolator f2458KQgRr5e_0 = RecyclerView.sQuinticInterpolator;

        /* renamed from: QxJ9d_1  reason: collision with other field name */
        public boolean f2461QxJ9d_1 = false;
        public boolean PGPF6hQ_2 = false;

        public XDsvEfm_26() {
            this.f2459KQgRr5e_0 = new OverScroller(RecyclerView.this.getContext(), RecyclerView.sQuinticInterpolator);
        }

        public final void KQgRr5e_0() {
            this.PGPF6hQ_2 = false;
            this.f2461QxJ9d_1 = true;
        }

        public void Mqv2r_3() {
            RecyclerView.this.removeCallbacks(this);
            this.f2459KQgRr5e_0.abortAnimation();
        }

        public void PGPF6hQ_2() {
            if (this.f2461QxJ9d_1) {
                this.PGPF6hQ_2 = true;
                return;
            }
            RecyclerView.this.removeCallbacks(this);
            X6FRs_4.IMuAHx_6.EuDEkJe_12.ZzDuCHW_20.KQgRr5e_0(RecyclerView.this, this);
        }

        public final void QxJ9d_1() {
            this.f2461QxJ9d_1 = false;
            if (this.PGPF6hQ_2) {
                PGPF6hQ_2();
            }
        }

        /* JADX WARN: Code restructure failed: missing block: B:47:0x00eb, code lost:
            if (r8 > 0) goto L43;
         */
        /* JADX WARN: Removed duplicated region for block: B:45:0x00e7  */
        /* JADX WARN: Removed duplicated region for block: B:52:0x00f7  */
        /* JADX WARN: Removed duplicated region for block: B:54:0x00fe A[ADDED_TO_REGION] */
        @Override // java.lang.Runnable
        /*
            Code decompiled incorrectly, please refer to instructions dump.
        */
        public void run() {
            int i;
            int i2;
            int i3;
            int i4;
            int i5;
            if (RecyclerView.this.mLayout == null) {
                Mqv2r_3();
                return;
            }
            KQgRr5e_0();
            RecyclerView.this.consumePendingUpdateOperations();
            OverScroller overScroller = this.f2459KQgRr5e_0;
            SI64pbG_23 sI64pbG_23 = RecyclerView.this.mLayout.f2465KQgRr5e_0;
            if (overScroller.computeScrollOffset()) {
                int[] iArr = RecyclerView.this.mScrollConsumed;
                int currX = overScroller.getCurrX();
                int currY = overScroller.getCurrY();
                int i6 = currX - this.KQgRr5e_0;
                int i7 = currY - this.QxJ9d_1;
                this.KQgRr5e_0 = currX;
                this.QxJ9d_1 = currY;
                if (RecyclerView.this.dispatchNestedPreScroll(i6, i7, iArr, null, 1)) {
                    i6 -= iArr[0];
                    i7 -= iArr[1];
                }
                RecyclerView recyclerView = RecyclerView.this;
                if (recyclerView.mAdapter != null) {
                    recyclerView.scrollStep(i6, i7, recyclerView.mScrollStepConsumed);
                    int[] iArr2 = RecyclerView.this.mScrollStepConsumed;
                    i2 = iArr2[0];
                    i = iArr2[1];
                    i3 = i6 - i2;
                    i4 = i7 - i;
                    if (sI64pbG_23 != null && !sI64pbG_23.m923KQgRr5e_0() && sI64pbG_23.m925QxJ9d_1()) {
                        int KQgRr5e_0 = RecyclerView.this.mState.KQgRr5e_0();
                        if (KQgRr5e_0 == 0) {
                            sI64pbG_23.PGPF6hQ_2();
                        } else if (sI64pbG_23.QxJ9d_1() >= KQgRr5e_0) {
                            sI64pbG_23.m921KQgRr5e_0(KQgRr5e_0 - 1);
                            sI64pbG_23.KQgRr5e_0(i6 - i3, i7 - i4);
                        } else {
                            sI64pbG_23.KQgRr5e_0(i6 - i3, i7 - i4);
                        }
                    }
                } else {
                    i = 0;
                    i2 = 0;
                    i3 = 0;
                    i4 = 0;
                }
                if (!RecyclerView.this.mItemDecorations.isEmpty()) {
                    RecyclerView.this.invalidate();
                }
                if (RecyclerView.this.getOverScrollMode() != 2) {
                    RecyclerView.this.considerReleasingGlowsOnScroll(i6, i7);
                }
                if (!RecyclerView.this.dispatchNestedScroll(i2, i, i3, i4, null, 1) && (i3 != 0 || i4 != 0)) {
                    int currVelocity = (int) overScroller.getCurrVelocity();
                    if (i3 != currX) {
                        if (i3 < 0) {
                            i5 = -currVelocity;
                        } else if (i3 > 0) {
                            i5 = currVelocity;
                        }
                        if (i4 != currY) {
                            if (i4 < 0) {
                                currVelocity = -currVelocity;
                            }
                            if (RecyclerView.this.getOverScrollMode() != 2) {
                                RecyclerView.this.absorbGlows(i5, currVelocity);
                            }
                            if ((i5 == 0 || i3 == currX || overScroller.getFinalX() == 0) && (currVelocity != 0 || i4 == currY || overScroller.getFinalY() == 0)) {
                                overScroller.abortAnimation();
                            }
                        }
                        currVelocity = 0;
                        if (RecyclerView.this.getOverScrollMode() != 2) {
                        }
                        if (i5 == 0) {
                        }
                        overScroller.abortAnimation();
                    }
                    i5 = 0;
                    if (i4 != currY) {
                    }
                    currVelocity = 0;
                    if (RecyclerView.this.getOverScrollMode() != 2) {
                    }
                    if (i5 == 0) {
                    }
                    overScroller.abortAnimation();
                }
                if (i2 != 0 || i != 0) {
                    RecyclerView.this.dispatchOnScrolled(i2, i);
                }
                if (!RecyclerView.this.awakenScrollBars()) {
                    RecyclerView.this.invalidate();
                }
                boolean z = (i6 == 0 && i7 == 0) || (i6 != 0 && RecyclerView.this.mLayout.m942KQgRr5e_0() && i2 == i6) || (i7 != 0 && RecyclerView.this.mLayout.m953QxJ9d_1() && i == i7);
                if (!overScroller.isFinished() && (z || RecyclerView.this.hasNestedScrollingParent(1))) {
                    PGPF6hQ_2();
                    RecyclerView recyclerView2 = RecyclerView.this;
                    X6FRs_4.YghfZG_14.PGPF6hQ_2.X6FRs_4 x6FRs_4 = recyclerView2.mGapWorker;
                    if (x6FRs_4 != null) {
                        x6FRs_4.KQgRr5e_0(recyclerView2, i6, i7);
                    }
                } else {
                    RecyclerView.this.setScrollState(0);
                    if (RecyclerView.ALLOW_THREAD_GAP_WORK) {
                        RecyclerView.this.mPrefetchRegistry.KQgRr5e_0();
                    }
                    RecyclerView.this.stopNestedScroll(1);
                }
            }
            if (sI64pbG_23 != null) {
                if (sI64pbG_23.m923KQgRr5e_0()) {
                    sI64pbG_23.KQgRr5e_0(0, 0);
                }
                if (!this.PGPF6hQ_2) {
                    sI64pbG_23.PGPF6hQ_2();
                }
            }
            QxJ9d_1();
        }

        public void KQgRr5e_0(int i, int i2) {
            RecyclerView.this.setScrollState(2);
            this.QxJ9d_1 = 0;
            this.KQgRr5e_0 = 0;
            this.f2459KQgRr5e_0.fling(0, 0, i, i2, X6FRs_4.Xgtqvk_8.KQgRr5e_0.KQgRr5e_0.INVALID_ID, Integer.MAX_VALUE, X6FRs_4.Xgtqvk_8.KQgRr5e_0.KQgRr5e_0.INVALID_ID, Integer.MAX_VALUE);
            PGPF6hQ_2();
        }

        public void QxJ9d_1(int i, int i2) {
            m927KQgRr5e_0(i, i2, 0, 0);
        }

        /* renamed from: KQgRr5e_0  reason: collision with other method in class */
        public void m927KQgRr5e_0(int i, int i2, int i3, int i4) {
            KQgRr5e_0(i, i2, KQgRr5e_0(i, i2, i3, i4));
        }

        public final float KQgRr5e_0(float f) {
            return (float) Math.sin((f - 0.5f) * 0.47123894f);
        }

        public final int KQgRr5e_0(int i, int i2, int i3, int i4) {
            int i5;
            int abs = Math.abs(i);
            int abs2 = Math.abs(i2);
            boolean z = abs > abs2;
            int sqrt = (int) Math.sqrt((i3 * i3) + (i4 * i4));
            int sqrt2 = (int) Math.sqrt((i * i) + (i2 * i2));
            RecyclerView recyclerView = RecyclerView.this;
            int width = z ? recyclerView.getWidth() : recyclerView.getHeight();
            int i6 = width / 2;
            float f = width;
            float f2 = i6;
            float KQgRr5e_0 = f2 + (KQgRr5e_0(Math.min(1.0f, (sqrt2 * 1.0f) / f)) * f2);
            if (sqrt > 0) {
                i5 = Math.round(Math.abs(KQgRr5e_0 / sqrt) * 1000.0f) * 4;
            } else {
                if (!z) {
                    abs = abs2;
                }
                i5 = (int) (((abs / f) + 1.0f) * 300.0f);
            }
            return Math.min(i5, (int) RecyclerView.MAX_SCROLL_DURATION);
        }

        public void KQgRr5e_0(int i, int i2, int i3) {
            KQgRr5e_0(i, i2, i3, RecyclerView.sQuinticInterpolator);
        }

        public void KQgRr5e_0(int i, int i2, Interpolator interpolator) {
            int KQgRr5e_0 = KQgRr5e_0(i, i2, 0, 0);
            if (interpolator == null) {
                interpolator = RecyclerView.sQuinticInterpolator;
            }
            KQgRr5e_0(i, i2, KQgRr5e_0, interpolator);
        }

        public void KQgRr5e_0(int i, int i2, int i3, Interpolator interpolator) {
            if (this.f2458KQgRr5e_0 != interpolator) {
                this.f2458KQgRr5e_0 = interpolator;
                this.f2459KQgRr5e_0 = new OverScroller(RecyclerView.this.getContext(), interpolator);
            }
            RecyclerView.this.setScrollState(2);
            this.QxJ9d_1 = 0;
            this.KQgRr5e_0 = 0;
            this.f2459KQgRr5e_0.startScroll(0, 0, i, i2, i3);
            if (Build.VERSION.SDK_INT < 23) {
                this.f2459KQgRr5e_0.computeScrollOffset();
            }
            PGPF6hQ_2();
        }
    }

    /* loaded from: classes.dex */
    public final class ZzDuCHW_20 {

        /* renamed from: KQgRr5e_0  reason: collision with other field name */
        public BVpCZyH_19 f2476KQgRr5e_0;

        /* renamed from: KQgRr5e_0  reason: collision with other field name */
        public KVtv3R_25 f2477KQgRr5e_0;

        /* renamed from: KQgRr5e_0  reason: collision with other field name */
        public final ArrayList<WGk6X_27> f2479KQgRr5e_0 = new ArrayList<>();

        /* renamed from: QxJ9d_1  reason: collision with other field name */
        public ArrayList<WGk6X_27> f2481QxJ9d_1 = null;
        public final ArrayList<WGk6X_27> PGPF6hQ_2 = new ArrayList<>();

        /* renamed from: KQgRr5e_0  reason: collision with other field name */
        public final List<WGk6X_27> f2480KQgRr5e_0 = Collections.unmodifiableList(this.f2479KQgRr5e_0);
        public int KQgRr5e_0 = 2;
        public int QxJ9d_1 = 2;

        public ZzDuCHW_20() {
        }

        public void IFxWkV_5() {
            for (int size = this.PGPF6hQ_2.size() - 1; size >= 0; size--) {
                m963KQgRr5e_0(size);
            }
            this.PGPF6hQ_2.clear();
            if (RecyclerView.ALLOW_THREAD_GAP_WORK) {
                RecyclerView.this.mPrefetchRegistry.KQgRr5e_0();
            }
        }

        public void IMuAHx_6() {
            YghfZG_14 yghfZG_14 = RecyclerView.this.mLayout;
            this.QxJ9d_1 = this.KQgRr5e_0 + (yghfZG_14 != null ? yghfZG_14.KQgRr5e_0 : 0);
            for (int size = this.PGPF6hQ_2.size() - 1; size >= 0 && this.PGPF6hQ_2.size() > this.QxJ9d_1; size--) {
                m963KQgRr5e_0(size);
            }
        }

        /* renamed from: KQgRr5e_0  reason: collision with other method in class */
        public void m962KQgRr5e_0() {
            this.f2479KQgRr5e_0.clear();
            IFxWkV_5();
        }

        public void Mqv2r_3(WGk6X_27 wGk6X_27) {
            boolean z;
            boolean z2 = true;
            if (!wGk6X_27.isScrap() && wGk6X_27.itemView.getParent() == null) {
                if (!wGk6X_27.isTmpDetached()) {
                    if (!wGk6X_27.shouldIgnore()) {
                        boolean doesTransientStatePreventRecycling = wGk6X_27.doesTransientStatePreventRecycling();
                        IMuAHx_6 iMuAHx_6 = RecyclerView.this.mAdapter;
                        if ((iMuAHx_6 != null && doesTransientStatePreventRecycling && iMuAHx_6.onFailedToRecycleView(wGk6X_27)) || wGk6X_27.isRecyclable()) {
                            if (this.QxJ9d_1 <= 0 || wGk6X_27.hasAnyOfTheFlags(526)) {
                                z = false;
                            } else {
                                int size = this.PGPF6hQ_2.size();
                                if (size >= this.QxJ9d_1 && size > 0) {
                                    m963KQgRr5e_0(0);
                                    size--;
                                }
                                if (RecyclerView.ALLOW_THREAD_GAP_WORK && size > 0 && !RecyclerView.this.mPrefetchRegistry.KQgRr5e_0(wGk6X_27.mPosition)) {
                                    int i = size - 1;
                                    while (i >= 0) {
                                        if (!RecyclerView.this.mPrefetchRegistry.KQgRr5e_0(this.PGPF6hQ_2.get(i).mPosition)) {
                                            break;
                                        }
                                        i--;
                                    }
                                    size = i + 1;
                                }
                                this.PGPF6hQ_2.add(size, wGk6X_27);
                                z = true;
                            }
                            if (!z) {
                                KQgRr5e_0(wGk6X_27, true);
                                r1 = z;
                                RecyclerView.this.mViewInfoStore.Mqv2r_3(wGk6X_27);
                                if (r1 && !z2 && doesTransientStatePreventRecycling) {
                                    wGk6X_27.mOwnerRecyclerView = null;
                                    return;
                                }
                                return;
                            }
                            r1 = z;
                        }
                        z2 = false;
                        RecyclerView.this.mViewInfoStore.Mqv2r_3(wGk6X_27);
                        if (r1) {
                            return;
                        }
                        return;
                    }
                    throw new IllegalArgumentException("Trying to recycle an ignored view holder. You should first call stopIgnoringView(view) before calling recycle." + RecyclerView.this.exceptionLabel());
                }
                throw new IllegalArgumentException("Tmp detached view should be removed from RecyclerView before it can be recycled: " + wGk6X_27 + RecyclerView.this.exceptionLabel());
            }
            StringBuilder sb = new StringBuilder();
            sb.append("Scrapped or attached views may not be recycled. isScrap:");
            sb.append(wGk6X_27.isScrap());
            sb.append(" isAttached:");
            sb.append(wGk6X_27.itemView.getParent() != null);
            sb.append(RecyclerView.this.exceptionLabel());
            throw new IllegalArgumentException(sb.toString());
        }

        public final void PGPF6hQ_2(WGk6X_27 wGk6X_27) {
            View view = wGk6X_27.itemView;
            if (view instanceof ViewGroup) {
                KQgRr5e_0((ViewGroup) view, false);
            }
        }

        /* renamed from: QxJ9d_1  reason: collision with other method in class */
        public void m965QxJ9d_1(int i) {
            this.KQgRr5e_0 = i;
            IMuAHx_6();
        }

        public void X6FRs_4(WGk6X_27 wGk6X_27) {
            if (wGk6X_27.mInChangeScrap) {
                this.f2481QxJ9d_1.remove(wGk6X_27);
            } else {
                this.f2479KQgRr5e_0.remove(wGk6X_27);
            }
            wGk6X_27.mScrapContainer = null;
            wGk6X_27.mInChangeScrap = false;
            wGk6X_27.clearReturnedFromScrapFlag();
        }

        /* renamed from: KQgRr5e_0  reason: collision with other method in class */
        public List<WGk6X_27> m961KQgRr5e_0() {
            return this.f2480KQgRr5e_0;
        }

        public void PGPF6hQ_2(View view) {
            WGk6X_27 childViewHolderInt = RecyclerView.getChildViewHolderInt(view);
            if (!childViewHolderInt.hasAnyOfTheFlags(12) && childViewHolderInt.isUpdated() && !RecyclerView.this.canReuseUpdatedViewHolder(childViewHolderInt)) {
                if (this.f2481QxJ9d_1 == null) {
                    this.f2481QxJ9d_1 = new ArrayList<>();
                }
                childViewHolderInt.setScrapContainer(this, true);
                this.f2481QxJ9d_1.add(childViewHolderInt);
            } else if (childViewHolderInt.isInvalid() && !childViewHolderInt.isRemoved() && !RecyclerView.this.mAdapter.hasStableIds()) {
                throw new IllegalArgumentException("Called scrap view with an invalid view. Invalid views cannot be reused from scrap, they should rebound from recycler pool." + RecyclerView.this.exceptionLabel());
            } else {
                childViewHolderInt.setScrapContainer(this, false);
                this.f2479KQgRr5e_0.add(childViewHolderInt);
            }
        }

        public View QxJ9d_1(int i) {
            return KQgRr5e_0(i, false);
        }

        /* renamed from: KQgRr5e_0  reason: collision with other method in class */
        public boolean m964KQgRr5e_0(WGk6X_27 wGk6X_27) {
            if (wGk6X_27.isRemoved()) {
                return RecyclerView.this.mState.m908QxJ9d_1();
            }
            int i = wGk6X_27.mPosition;
            if (i >= 0 && i < RecyclerView.this.mAdapter.getItemCount()) {
                if (RecyclerView.this.mState.m908QxJ9d_1() || RecyclerView.this.mAdapter.getItemViewType(wGk6X_27.mPosition) == wGk6X_27.getItemViewType()) {
                    return !RecyclerView.this.mAdapter.hasStableIds() || wGk6X_27.getItemId() == RecyclerView.this.mAdapter.getItemId(wGk6X_27.mPosition);
                }
                return false;
            }
            throw new IndexOutOfBoundsException("Inconsistency detected. Invalid view holder adapter position" + wGk6X_27 + RecyclerView.this.exceptionLabel());
        }

        public void QxJ9d_1(View view) {
            WGk6X_27 childViewHolderInt = RecyclerView.getChildViewHolderInt(view);
            if (childViewHolderInt.isTmpDetached()) {
                RecyclerView.this.removeDetachedView(view, false);
            }
            if (childViewHolderInt.isScrap()) {
                childViewHolderInt.unScrap();
            } else if (childViewHolderInt.wasReturnedFromScrap()) {
                childViewHolderInt.clearReturnedFromScrapFlag();
            }
            Mqv2r_3(childViewHolderInt);
        }

        public void X6FRs_4() {
            int size = this.PGPF6hQ_2.size();
            for (int i = 0; i < size; i++) {
                WGk6X_27 wGk6X_27 = this.PGPF6hQ_2.get(i);
                if (wGk6X_27 != null) {
                    wGk6X_27.addFlags(6);
                    wGk6X_27.addChangePayload(null);
                }
            }
            IMuAHx_6 iMuAHx_6 = RecyclerView.this.mAdapter;
            if (iMuAHx_6 == null || !iMuAHx_6.hasStableIds()) {
                IFxWkV_5();
            }
        }

        public void QxJ9d_1(WGk6X_27 wGk6X_27) {
            RfjZ_21 rfjZ_21 = RecyclerView.this.mRecyclerListener;
            if (rfjZ_21 != null) {
                rfjZ_21.KQgRr5e_0(wGk6X_27);
            }
            IMuAHx_6 iMuAHx_6 = RecyclerView.this.mAdapter;
            if (iMuAHx_6 != null) {
                iMuAHx_6.onViewRecycled(wGk6X_27);
            }
            RecyclerView recyclerView = RecyclerView.this;
            if (recyclerView.mState != null) {
                recyclerView.mViewInfoStore.Mqv2r_3(wGk6X_27);
            }
        }

        public final boolean KQgRr5e_0(WGk6X_27 wGk6X_27, int i, int i2, long j) {
            wGk6X_27.mOwnerRecyclerView = RecyclerView.this;
            int itemViewType = wGk6X_27.getItemViewType();
            long nanoTime = RecyclerView.this.getNanoTime();
            if (j == RecyclerView.FOREVER_NS || this.f2476KQgRr5e_0.KQgRr5e_0(itemViewType, nanoTime, j)) {
                RecyclerView.this.mAdapter.bindViewHolder(wGk6X_27, i);
                this.f2476KQgRr5e_0.KQgRr5e_0(wGk6X_27.getItemViewType(), RecyclerView.this.getNanoTime() - nanoTime);
                KQgRr5e_0(wGk6X_27);
                if (RecyclerView.this.mState.m908QxJ9d_1()) {
                    wGk6X_27.mPreLayoutPosition = i2;
                    return true;
                }
                return true;
            }
            return false;
        }

        public void PGPF6hQ_2() {
            this.f2479KQgRr5e_0.clear();
            ArrayList<WGk6X_27> arrayList = this.f2481QxJ9d_1;
            if (arrayList != null) {
                arrayList.clear();
            }
        }

        public void PGPF6hQ_2(int i, int i2) {
            int i3;
            int i4 = i2 + i;
            for (int size = this.PGPF6hQ_2.size() - 1; size >= 0; size--) {
                WGk6X_27 wGk6X_27 = this.PGPF6hQ_2.get(size);
                if (wGk6X_27 != null && (i3 = wGk6X_27.mPosition) >= i && i3 < i4) {
                    wGk6X_27.addFlags(2);
                    m963KQgRr5e_0(size);
                }
            }
        }

        public void QxJ9d_1(int i, int i2) {
            int i3;
            int i4;
            int i5;
            int i6;
            if (i < i2) {
                i3 = -1;
                i5 = i;
                i4 = i2;
            } else {
                i3 = 1;
                i4 = i;
                i5 = i2;
            }
            int size = this.PGPF6hQ_2.size();
            for (int i7 = 0; i7 < size; i7++) {
                WGk6X_27 wGk6X_27 = this.PGPF6hQ_2.get(i7);
                if (wGk6X_27 != null && (i6 = wGk6X_27.mPosition) >= i5 && i6 <= i4) {
                    if (i6 == i) {
                        wGk6X_27.offsetPosition(i2 - i, false);
                    } else {
                        wGk6X_27.offsetPosition(i3, false);
                    }
                }
            }
        }

        public void QxJ9d_1() {
            int size = this.PGPF6hQ_2.size();
            for (int i = 0; i < size; i++) {
                this.PGPF6hQ_2.get(i).clearOldPosition();
            }
            int size2 = this.f2479KQgRr5e_0.size();
            for (int i2 = 0; i2 < size2; i2++) {
                this.f2479KQgRr5e_0.get(i2).clearOldPosition();
            }
            ArrayList<WGk6X_27> arrayList = this.f2481QxJ9d_1;
            if (arrayList != null) {
                int size3 = arrayList.size();
                for (int i3 = 0; i3 < size3; i3++) {
                    this.f2481QxJ9d_1.get(i3).clearOldPosition();
                }
            }
        }

        public int KQgRr5e_0(int i) {
            if (i >= 0 && i < RecyclerView.this.mState.KQgRr5e_0()) {
                return !RecyclerView.this.mState.m908QxJ9d_1() ? i : RecyclerView.this.mAdapterHelper.QxJ9d_1(i);
            }
            throw new IndexOutOfBoundsException("invalid position " + i + ". State item count is " + RecyclerView.this.mState.KQgRr5e_0() + RecyclerView.this.exceptionLabel());
        }

        public void Mqv2r_3() {
            int size = this.PGPF6hQ_2.size();
            for (int i = 0; i < size; i++) {
                LayoutParams layoutParams = (LayoutParams) this.PGPF6hQ_2.get(i).itemView.getLayoutParams();
                if (layoutParams != null) {
                    layoutParams.f2450KQgRr5e_0 = true;
                }
            }
        }

        public View KQgRr5e_0(int i, boolean z) {
            return KQgRr5e_0(i, z, RecyclerView.FOREVER_NS).itemView;
        }

        /* JADX WARN: Removed duplicated region for block: B:100:0x0211  */
        /* JADX WARN: Removed duplicated region for block: B:106:0x022d A[ADDED_TO_REGION] */
        /* JADX WARN: Removed duplicated region for block: B:18:0x0037  */
        /* JADX WARN: Removed duplicated region for block: B:27:0x005c  */
        /* JADX WARN: Removed duplicated region for block: B:29:0x005f  */
        /* JADX WARN: Removed duplicated region for block: B:76:0x018a  */
        /* JADX WARN: Removed duplicated region for block: B:82:0x01a7  */
        /* JADX WARN: Removed duplicated region for block: B:85:0x01ca  */
        /* JADX WARN: Removed duplicated region for block: B:90:0x01d9  */
        /* JADX WARN: Removed duplicated region for block: B:99:0x0203  */
        /*
            Code decompiled incorrectly, please refer to instructions dump.
        */
        public WGk6X_27 KQgRr5e_0(int i, boolean z, long j) {
            WGk6X_27 wGk6X_27;
            boolean z2;
            WGk6X_27 wGk6X_272;
            boolean z3;
            boolean KQgRr5e_0;
            ViewGroup.LayoutParams layoutParams;
            LayoutParams layoutParams2;
            RecyclerView findNestedRecyclerView;
            KVtv3R_25 kVtv3R_25;
            View KQgRr5e_02;
            if (i >= 0 && i < RecyclerView.this.mState.KQgRr5e_0()) {
                boolean z4 = true;
                if (RecyclerView.this.mState.m908QxJ9d_1()) {
                    wGk6X_27 = m959KQgRr5e_0(i);
                    if (wGk6X_27 != null) {
                        z2 = true;
                        if (wGk6X_27 == null && (wGk6X_27 = m960KQgRr5e_0(i, z)) != null) {
                            if (m964KQgRr5e_0(wGk6X_27)) {
                                if (!z) {
                                    wGk6X_27.addFlags(4);
                                    if (wGk6X_27.isScrap()) {
                                        RecyclerView.this.removeDetachedView(wGk6X_27.itemView, false);
                                        wGk6X_27.unScrap();
                                    } else if (wGk6X_27.wasReturnedFromScrap()) {
                                        wGk6X_27.clearReturnedFromScrapFlag();
                                    }
                                    Mqv2r_3(wGk6X_27);
                                }
                                wGk6X_27 = null;
                            } else {
                                z2 = true;
                            }
                        }
                        if (wGk6X_27 == null) {
                            int QxJ9d_1 = RecyclerView.this.mAdapterHelper.QxJ9d_1(i);
                            if (QxJ9d_1 >= 0 && QxJ9d_1 < RecyclerView.this.mAdapter.getItemCount()) {
                                int itemViewType = RecyclerView.this.mAdapter.getItemViewType(QxJ9d_1);
                                if (RecyclerView.this.mAdapter.hasStableIds() && (wGk6X_27 = KQgRr5e_0(RecyclerView.this.mAdapter.getItemId(QxJ9d_1), itemViewType, z)) != null) {
                                    wGk6X_27.mPosition = QxJ9d_1;
                                    z2 = true;
                                }
                                if (wGk6X_27 == null && (kVtv3R_25 = this.f2477KQgRr5e_0) != null && (KQgRr5e_02 = kVtv3R_25.KQgRr5e_0(this, i, itemViewType)) != null) {
                                    wGk6X_27 = RecyclerView.this.getChildViewHolder(KQgRr5e_02);
                                    if (wGk6X_27 != null) {
                                        if (wGk6X_27.shouldIgnore()) {
                                            throw new IllegalArgumentException("getViewForPositionAndType returned a view that is ignored. You must call stopIgnoring before returning this view." + RecyclerView.this.exceptionLabel());
                                        }
                                    } else {
                                        throw new IllegalArgumentException("getViewForPositionAndType returned a view which does not have a ViewHolder" + RecyclerView.this.exceptionLabel());
                                    }
                                }
                                if (wGk6X_27 == null) {
                                    WGk6X_27 m905KQgRr5e_0 = m958KQgRr5e_0().m905KQgRr5e_0(itemViewType);
                                    if (m905KQgRr5e_0 != null) {
                                        m905KQgRr5e_0.resetInternal();
                                        if (RecyclerView.FORCE_INVALIDATE_DISPLAY_LIST) {
                                            PGPF6hQ_2(m905KQgRr5e_0);
                                        }
                                    }
                                    wGk6X_27 = m905KQgRr5e_0;
                                }
                                if (wGk6X_27 == null) {
                                    long nanoTime = RecyclerView.this.getNanoTime();
                                    if (j == RecyclerView.FOREVER_NS || this.f2476KQgRr5e_0.QxJ9d_1(itemViewType, nanoTime, j)) {
                                        RecyclerView recyclerView = RecyclerView.this;
                                        WGk6X_27 createViewHolder = recyclerView.mAdapter.createViewHolder(recyclerView, itemViewType);
                                        if (RecyclerView.ALLOW_THREAD_GAP_WORK && (findNestedRecyclerView = RecyclerView.findNestedRecyclerView(createViewHolder.itemView)) != null) {
                                            createViewHolder.mNestedRecyclerView = new WeakReference<>(findNestedRecyclerView);
                                        }
                                        this.f2476KQgRr5e_0.QxJ9d_1(itemViewType, RecyclerView.this.getNanoTime() - nanoTime);
                                        wGk6X_272 = createViewHolder;
                                        z3 = z2;
                                        if (z3 && !RecyclerView.this.mState.m908QxJ9d_1() && wGk6X_272.hasAnyOfTheFlags(WGk6X_27.FLAG_BOUNCED_FROM_HIDDEN_LIST)) {
                                            wGk6X_272.setFlags(0, WGk6X_27.FLAG_BOUNCED_FROM_HIDDEN_LIST);
                                            if (RecyclerView.this.mState.f2446X6FRs_4) {
                                                int KQgRr5e_03 = KNBe_11.KQgRr5e_0(wGk6X_272) | WGk6X_27.FLAG_APPEARED_IN_PRE_LAYOUT;
                                                RecyclerView recyclerView2 = RecyclerView.this;
                                                RecyclerView.this.recordAnimationInfoIfBouncedHiddenView(wGk6X_272, recyclerView2.mItemAnimator.KQgRr5e_0(recyclerView2.mState, wGk6X_272, KQgRr5e_03, wGk6X_272.getUnmodifiedPayloads()));
                                            }
                                        }
                                        if (!RecyclerView.this.mState.m908QxJ9d_1() && wGk6X_272.isBound()) {
                                            wGk6X_272.mPreLayoutPosition = i;
                                        } else if (wGk6X_272.isBound() || wGk6X_272.needsUpdate() || wGk6X_272.isInvalid()) {
                                            KQgRr5e_0 = KQgRr5e_0(wGk6X_272, RecyclerView.this.mAdapterHelper.QxJ9d_1(i), i, j);
                                            layoutParams = wGk6X_272.itemView.getLayoutParams();
                                            if (layoutParams != null) {
                                                layoutParams2 = (LayoutParams) RecyclerView.this.generateDefaultLayoutParams();
                                                wGk6X_272.itemView.setLayoutParams(layoutParams2);
                                            } else if (!RecyclerView.this.checkLayoutParams(layoutParams)) {
                                                layoutParams2 = (LayoutParams) RecyclerView.this.generateLayoutParams(layoutParams);
                                                wGk6X_272.itemView.setLayoutParams(layoutParams2);
                                            } else {
                                                layoutParams2 = (LayoutParams) layoutParams;
                                            }
                                            layoutParams2.f2449KQgRr5e_0 = wGk6X_272;
                                            layoutParams2.QxJ9d_1 = (z3 || !KQgRr5e_0) ? false : false;
                                            return wGk6X_272;
                                        }
                                        KQgRr5e_0 = false;
                                        layoutParams = wGk6X_272.itemView.getLayoutParams();
                                        if (layoutParams != null) {
                                        }
                                        layoutParams2.f2449KQgRr5e_0 = wGk6X_272;
                                        layoutParams2.QxJ9d_1 = (z3 || !KQgRr5e_0) ? false : false;
                                        return wGk6X_272;
                                    }
                                    return null;
                                }
                            } else {
                                throw new IndexOutOfBoundsException("Inconsistency detected. Invalid item position " + i + "(offset:" + QxJ9d_1 + ").state:" + RecyclerView.this.mState.KQgRr5e_0() + RecyclerView.this.exceptionLabel());
                            }
                        }
                        wGk6X_272 = wGk6X_27;
                        z3 = z2;
                        if (z3) {
                            wGk6X_272.setFlags(0, WGk6X_27.FLAG_BOUNCED_FROM_HIDDEN_LIST);
                            if (RecyclerView.this.mState.f2446X6FRs_4) {
                            }
                        }
                        if (!RecyclerView.this.mState.m908QxJ9d_1()) {
                        }
                        if (wGk6X_272.isBound()) {
                        }
                        KQgRr5e_0 = KQgRr5e_0(wGk6X_272, RecyclerView.this.mAdapterHelper.QxJ9d_1(i), i, j);
                        layoutParams = wGk6X_272.itemView.getLayoutParams();
                        if (layoutParams != null) {
                        }
                        layoutParams2.f2449KQgRr5e_0 = wGk6X_272;
                        layoutParams2.QxJ9d_1 = (z3 || !KQgRr5e_0) ? false : false;
                        return wGk6X_272;
                    }
                } else {
                    wGk6X_27 = null;
                }
                z2 = false;
                if (wGk6X_27 == null) {
                    if (m964KQgRr5e_0(wGk6X_27)) {
                    }
                }
                if (wGk6X_27 == null) {
                }
                wGk6X_272 = wGk6X_27;
                z3 = z2;
                if (z3) {
                }
                if (!RecyclerView.this.mState.m908QxJ9d_1()) {
                }
                if (wGk6X_272.isBound()) {
                }
                KQgRr5e_0 = KQgRr5e_0(wGk6X_272, RecyclerView.this.mAdapterHelper.QxJ9d_1(i), i, j);
                layoutParams = wGk6X_272.itemView.getLayoutParams();
                if (layoutParams != null) {
                }
                layoutParams2.f2449KQgRr5e_0 = wGk6X_272;
                layoutParams2.QxJ9d_1 = (z3 || !KQgRr5e_0) ? false : false;
                return wGk6X_272;
            }
            throw new IndexOutOfBoundsException("Invalid item position " + i + "(" + i + "). Item count:" + RecyclerView.this.mState.KQgRr5e_0() + RecyclerView.this.exceptionLabel());
        }

        public final void KQgRr5e_0(WGk6X_27 wGk6X_27) {
            if (RecyclerView.this.isAccessibilityEnabled()) {
                View view = wGk6X_27.itemView;
                if (X6FRs_4.IMuAHx_6.EuDEkJe_12.ZzDuCHW_20.m269QxJ9d_1(view) == 0) {
                    X6FRs_4.IMuAHx_6.EuDEkJe_12.ZzDuCHW_20.IMuAHx_6(view, 1);
                }
                if (X6FRs_4.IMuAHx_6.EuDEkJe_12.ZzDuCHW_20.m271QxJ9d_1(view)) {
                    return;
                }
                wGk6X_27.addFlags(WGk6X_27.FLAG_SET_A11Y_ITEM_DELEGATE);
                X6FRs_4.IMuAHx_6.EuDEkJe_12.ZzDuCHW_20.KQgRr5e_0(view, RecyclerView.this.mAccessibilityDelegate.KQgRr5e_0());
            }
        }

        public final void KQgRr5e_0(ViewGroup viewGroup, boolean z) {
            for (int childCount = viewGroup.getChildCount() - 1; childCount >= 0; childCount--) {
                View childAt = viewGroup.getChildAt(childCount);
                if (childAt instanceof ViewGroup) {
                    KQgRr5e_0((ViewGroup) childAt, true);
                }
            }
            if (z) {
                if (viewGroup.getVisibility() == 4) {
                    viewGroup.setVisibility(0);
                    viewGroup.setVisibility(4);
                    return;
                }
                int visibility = viewGroup.getVisibility();
                viewGroup.setVisibility(4);
                viewGroup.setVisibility(visibility);
            }
        }

        /* renamed from: KQgRr5e_0  reason: collision with other method in class */
        public void m963KQgRr5e_0(int i) {
            KQgRr5e_0(this.PGPF6hQ_2.get(i), true);
            this.PGPF6hQ_2.remove(i);
        }

        public void KQgRr5e_0(WGk6X_27 wGk6X_27, boolean z) {
            RecyclerView.clearNestedRecyclerViewIfNotNested(wGk6X_27);
            if (wGk6X_27.hasAnyOfTheFlags(WGk6X_27.FLAG_SET_A11Y_ITEM_DELEGATE)) {
                wGk6X_27.setFlags(0, WGk6X_27.FLAG_SET_A11Y_ITEM_DELEGATE);
                X6FRs_4.IMuAHx_6.EuDEkJe_12.ZzDuCHW_20.KQgRr5e_0(wGk6X_27.itemView, (X6FRs_4.IMuAHx_6.EuDEkJe_12.KQgRr5e_0) null);
            }
            if (z) {
                QxJ9d_1(wGk6X_27);
            }
            wGk6X_27.mOwnerRecyclerView = null;
            m958KQgRr5e_0().KQgRr5e_0(wGk6X_27);
        }

        public void KQgRr5e_0(View view) {
            WGk6X_27 childViewHolderInt = RecyclerView.getChildViewHolderInt(view);
            childViewHolderInt.mScrapContainer = null;
            childViewHolderInt.mInChangeScrap = false;
            childViewHolderInt.clearReturnedFromScrapFlag();
            Mqv2r_3(childViewHolderInt);
        }

        public int KQgRr5e_0() {
            return this.f2479KQgRr5e_0.size();
        }

        /* renamed from: KQgRr5e_0  reason: collision with other method in class */
        public View m957KQgRr5e_0(int i) {
            return this.f2479KQgRr5e_0.get(i).itemView;
        }

        /* renamed from: KQgRr5e_0  reason: collision with other method in class */
        public WGk6X_27 m959KQgRr5e_0(int i) {
            int size;
            int QxJ9d_1;
            ArrayList<WGk6X_27> arrayList = this.f2481QxJ9d_1;
            if (arrayList != null && (size = arrayList.size()) != 0) {
                for (int i2 = 0; i2 < size; i2++) {
                    WGk6X_27 wGk6X_27 = this.f2481QxJ9d_1.get(i2);
                    if (!wGk6X_27.wasReturnedFromScrap() && wGk6X_27.getLayoutPosition() == i) {
                        wGk6X_27.addFlags(32);
                        return wGk6X_27;
                    }
                }
                if (RecyclerView.this.mAdapter.hasStableIds() && (QxJ9d_1 = RecyclerView.this.mAdapterHelper.QxJ9d_1(i)) > 0 && QxJ9d_1 < RecyclerView.this.mAdapter.getItemCount()) {
                    long itemId = RecyclerView.this.mAdapter.getItemId(QxJ9d_1);
                    for (int i3 = 0; i3 < size; i3++) {
                        WGk6X_27 wGk6X_272 = this.f2481QxJ9d_1.get(i3);
                        if (!wGk6X_272.wasReturnedFromScrap() && wGk6X_272.getItemId() == itemId) {
                            wGk6X_272.addFlags(32);
                            return wGk6X_272;
                        }
                    }
                }
            }
            return null;
        }

        /* renamed from: KQgRr5e_0  reason: collision with other method in class */
        public WGk6X_27 m960KQgRr5e_0(int i, boolean z) {
            View m633KQgRr5e_0;
            int size = this.f2479KQgRr5e_0.size();
            for (int i2 = 0; i2 < size; i2++) {
                WGk6X_27 wGk6X_27 = this.f2479KQgRr5e_0.get(i2);
                if (!wGk6X_27.wasReturnedFromScrap() && wGk6X_27.getLayoutPosition() == i && !wGk6X_27.isInvalid() && (RecyclerView.this.mState.f2445QxJ9d_1 || !wGk6X_27.isRemoved())) {
                    wGk6X_27.addFlags(32);
                    return wGk6X_27;
                }
            }
            if (!z && (m633KQgRr5e_0 = RecyclerView.this.mChildHelper.m633KQgRr5e_0(i)) != null) {
                WGk6X_27 childViewHolderInt = RecyclerView.getChildViewHolderInt(m633KQgRr5e_0);
                RecyclerView.this.mChildHelper.Mqv2r_3(m633KQgRr5e_0);
                int KQgRr5e_0 = RecyclerView.this.mChildHelper.KQgRr5e_0(m633KQgRr5e_0);
                if (KQgRr5e_0 != -1) {
                    RecyclerView.this.mChildHelper.m635KQgRr5e_0(KQgRr5e_0);
                    PGPF6hQ_2(m633KQgRr5e_0);
                    childViewHolderInt.addFlags(8224);
                    return childViewHolderInt;
                }
                throw new IllegalStateException("layout index should not be -1 after unhiding a view:" + childViewHolderInt + RecyclerView.this.exceptionLabel());
            }
            int size2 = this.PGPF6hQ_2.size();
            for (int i3 = 0; i3 < size2; i3++) {
                WGk6X_27 wGk6X_272 = this.PGPF6hQ_2.get(i3);
                if (!wGk6X_272.isInvalid() && wGk6X_272.getLayoutPosition() == i) {
                    if (!z) {
                        this.PGPF6hQ_2.remove(i3);
                    }
                    return wGk6X_272;
                }
            }
            return null;
        }

        public WGk6X_27 KQgRr5e_0(long j, int i, boolean z) {
            for (int size = this.f2479KQgRr5e_0.size() - 1; size >= 0; size--) {
                WGk6X_27 wGk6X_27 = this.f2479KQgRr5e_0.get(size);
                if (wGk6X_27.getItemId() == j && !wGk6X_27.wasReturnedFromScrap()) {
                    if (i == wGk6X_27.getItemViewType()) {
                        wGk6X_27.addFlags(32);
                        if (wGk6X_27.isRemoved() && !RecyclerView.this.mState.m908QxJ9d_1()) {
                            wGk6X_27.setFlags(2, 14);
                        }
                        return wGk6X_27;
                    } else if (!z) {
                        this.f2479KQgRr5e_0.remove(size);
                        RecyclerView.this.removeDetachedView(wGk6X_27.itemView, false);
                        KQgRr5e_0(wGk6X_27.itemView);
                    }
                }
            }
            int size2 = this.PGPF6hQ_2.size();
            while (true) {
                size2--;
                if (size2 < 0) {
                    return null;
                }
                WGk6X_27 wGk6X_272 = this.PGPF6hQ_2.get(size2);
                if (wGk6X_272.getItemId() == j) {
                    if (i == wGk6X_272.getItemViewType()) {
                        if (!z) {
                            this.PGPF6hQ_2.remove(size2);
                        }
                        return wGk6X_272;
                    } else if (!z) {
                        m963KQgRr5e_0(size2);
                        return null;
                    }
                }
            }
        }

        public void KQgRr5e_0(IMuAHx_6 iMuAHx_6, IMuAHx_6 iMuAHx_62, boolean z) {
            m962KQgRr5e_0();
            m958KQgRr5e_0().KQgRr5e_0(iMuAHx_6, iMuAHx_62, z);
        }

        public void KQgRr5e_0(int i, int i2) {
            int size = this.PGPF6hQ_2.size();
            for (int i3 = 0; i3 < size; i3++) {
                WGk6X_27 wGk6X_27 = this.PGPF6hQ_2.get(i3);
                if (wGk6X_27 != null && wGk6X_27.mPosition >= i) {
                    wGk6X_27.offsetPosition(i2, true);
                }
            }
        }

        public void KQgRr5e_0(int i, int i2, boolean z) {
            int i3 = i + i2;
            for (int size = this.PGPF6hQ_2.size() - 1; size >= 0; size--) {
                WGk6X_27 wGk6X_27 = this.PGPF6hQ_2.get(size);
                if (wGk6X_27 != null) {
                    int i4 = wGk6X_27.mPosition;
                    if (i4 >= i3) {
                        wGk6X_27.offsetPosition(-i2, z);
                    } else if (i4 >= i) {
                        wGk6X_27.addFlags(8);
                        m963KQgRr5e_0(size);
                    }
                }
            }
        }

        public void KQgRr5e_0(KVtv3R_25 kVtv3R_25) {
            this.f2477KQgRr5e_0 = kVtv3R_25;
        }

        public void KQgRr5e_0(BVpCZyH_19 bVpCZyH_19) {
            BVpCZyH_19 bVpCZyH_192 = this.f2476KQgRr5e_0;
            if (bVpCZyH_192 != null) {
                bVpCZyH_192.PGPF6hQ_2();
            }
            this.f2476KQgRr5e_0 = bVpCZyH_19;
            if (bVpCZyH_19 == null || RecyclerView.this.getAdapter() == null) {
                return;
            }
            this.f2476KQgRr5e_0.KQgRr5e_0();
        }

        /* renamed from: KQgRr5e_0  reason: collision with other method in class */
        public BVpCZyH_19 m958KQgRr5e_0() {
            if (this.f2476KQgRr5e_0 == null) {
                this.f2476KQgRr5e_0 = new BVpCZyH_19();
            }
            return this.f2476KQgRr5e_0;
        }
    }

    public RecyclerView(Context context, AttributeSet attributeSet) {
        this(context, attributeSet, 0);
    }

    public boolean dispatchNestedPreScroll(int i, int i2, int[] iArr, int[] iArr2, int i3) {
        return getScrollingChildHelper().KQgRr5e_0(i, i2, iArr, iArr2, i3);
    }

    public boolean dispatchNestedScroll(int i, int i2, int i3, int i4, int[] iArr, int i5) {
        return getScrollingChildHelper().KQgRr5e_0(i, i2, i3, i4, iArr, i5);
    }

    /* JADX WARN: Removed duplicated region for block: B:17:0x0034  */
    /* JADX WARN: Removed duplicated region for block: B:22:0x0036 A[SYNTHETIC] */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public WGk6X_27 findViewHolderForPosition(int i, boolean z) {
        int QxJ9d_12 = this.mChildHelper.QxJ9d_1();
        WGk6X_27 wGk6X_27 = null;
        for (int i2 = 0; i2 < QxJ9d_12; i2++) {
            WGk6X_27 childViewHolderInt = getChildViewHolderInt(this.mChildHelper.PGPF6hQ_2(i2));
            if (childViewHolderInt != null && !childViewHolderInt.isRemoved()) {
                if (z) {
                    if (childViewHolderInt.mPosition != i) {
                        continue;
                    }
                    if (this.mChildHelper.m637KQgRr5e_0(childViewHolderInt.itemView)) {
                        return childViewHolderInt;
                    }
                    wGk6X_27 = childViewHolderInt;
                } else {
                    if (childViewHolderInt.getLayoutPosition() != i) {
                        continue;
                    }
                    if (this.mChildHelper.m637KQgRr5e_0(childViewHolderInt.itemView)) {
                    }
                }
            }
        }
        return wGk6X_27;
    }

    public boolean hasNestedScrollingParent(int i) {
        return getScrollingChildHelper().m219KQgRr5e_0(i);
    }

    public void onExitLayoutOrScroll(boolean z) {
        int i = this.mLayoutOrScrollCounter - 1;
        this.mLayoutOrScrollCounter = i;
        if (i < 1) {
            this.mLayoutOrScrollCounter = 0;
            if (z) {
                dispatchContentChangedIfNecessary();
                dispatchPendingImportantForAccessibilityChanges();
            }
        }
    }

    public void smoothScrollBy(int i, int i2, Interpolator interpolator) {
        YghfZG_14 yghfZG_14 = this.mLayout;
        if (yghfZG_14 == null) {
            Log.e(TAG, "Cannot smooth scroll without a LayoutManager set. Call setLayoutManager with a non-null argument.");
        } else if (this.mLayoutFrozen) {
        } else {
            if (!yghfZG_14.m942KQgRr5e_0()) {
                i = 0;
            }
            if (!this.mLayout.m953QxJ9d_1()) {
                i2 = 0;
            }
            if (i == 0 && i2 == 0) {
                return;
            }
            this.mViewFlinger.KQgRr5e_0(i, i2, interpolator);
        }
    }

    public boolean startNestedScroll(int i, int i2) {
        return getScrollingChildHelper().KQgRr5e_0(i, i2);
    }

    @Override // X6FRs_4.IMuAHx_6.EuDEkJe_12.Xgtqvk_8
    public void stopNestedScroll(int i) {
        getScrollingChildHelper().m217KQgRr5e_0(i);
    }

    /* loaded from: classes.dex */
    public static class BVpCZyH_19 {

        /* renamed from: KQgRr5e_0  reason: collision with other field name */
        public SparseArray<KQgRr5e_0> f2436KQgRr5e_0 = new SparseArray<>();
        public int KQgRr5e_0 = 0;

        /* loaded from: classes.dex */
        public static class KQgRr5e_0 {

            /* renamed from: KQgRr5e_0  reason: collision with other field name */
            public final ArrayList<WGk6X_27> f2438KQgRr5e_0 = new ArrayList<>();
            public int KQgRr5e_0 = 5;

            /* renamed from: KQgRr5e_0  reason: collision with other field name */
            public long f2437KQgRr5e_0 = 0;
            public long QxJ9d_1 = 0;
        }

        /* renamed from: KQgRr5e_0  reason: collision with other method in class */
        public WGk6X_27 m905KQgRr5e_0(int i) {
            KQgRr5e_0 kQgRr5e_0 = this.f2436KQgRr5e_0.get(i);
            if (kQgRr5e_0 == null || kQgRr5e_0.f2438KQgRr5e_0.isEmpty()) {
                return null;
            }
            ArrayList<WGk6X_27> arrayList = kQgRr5e_0.f2438KQgRr5e_0;
            return arrayList.remove(arrayList.size() - 1);
        }

        public void PGPF6hQ_2() {
            this.KQgRr5e_0--;
        }

        public void QxJ9d_1() {
            for (int i = 0; i < this.f2436KQgRr5e_0.size(); i++) {
                this.f2436KQgRr5e_0.valueAt(i).f2438KQgRr5e_0.clear();
            }
        }

        public void QxJ9d_1(int i, long j) {
            KQgRr5e_0 KQgRr5e_02 = KQgRr5e_0(i);
            KQgRr5e_02.f2437KQgRr5e_0 = KQgRr5e_0(KQgRr5e_02.f2437KQgRr5e_0, j);
        }

        public void KQgRr5e_0(WGk6X_27 wGk6X_27) {
            int itemViewType = wGk6X_27.getItemViewType();
            ArrayList<WGk6X_27> arrayList = KQgRr5e_0(itemViewType).f2438KQgRr5e_0;
            if (this.f2436KQgRr5e_0.get(itemViewType).KQgRr5e_0 <= arrayList.size()) {
                return;
            }
            wGk6X_27.resetInternal();
            arrayList.add(wGk6X_27);
        }

        public boolean QxJ9d_1(int i, long j, long j2) {
            long j3 = KQgRr5e_0(i).f2437KQgRr5e_0;
            return j3 == 0 || j + j3 < j2;
        }

        public long KQgRr5e_0(long j, long j2) {
            return j == 0 ? j2 : ((j / 4) * 3) + (j2 / 4);
        }

        public void KQgRr5e_0(int i, long j) {
            KQgRr5e_0 KQgRr5e_02 = KQgRr5e_0(i);
            KQgRr5e_02.QxJ9d_1 = KQgRr5e_0(KQgRr5e_02.QxJ9d_1, j);
        }

        public boolean KQgRr5e_0(int i, long j, long j2) {
            long j3 = KQgRr5e_0(i).QxJ9d_1;
            return j3 == 0 || j + j3 < j2;
        }

        public void KQgRr5e_0() {
            this.KQgRr5e_0++;
        }

        public void KQgRr5e_0(IMuAHx_6 iMuAHx_6, IMuAHx_6 iMuAHx_62, boolean z) {
            if (iMuAHx_6 != null) {
                PGPF6hQ_2();
            }
            if (!z && this.KQgRr5e_0 == 0) {
                QxJ9d_1();
            }
            if (iMuAHx_62 != null) {
                KQgRr5e_0();
            }
        }

        public final KQgRr5e_0 KQgRr5e_0(int i) {
            KQgRr5e_0 kQgRr5e_0 = this.f2436KQgRr5e_0.get(i);
            if (kQgRr5e_0 == null) {
                KQgRr5e_0 kQgRr5e_02 = new KQgRr5e_0();
                this.f2436KQgRr5e_0.put(i, kQgRr5e_02);
                return kQgRr5e_02;
            }
            return kQgRr5e_0;
        }
    }

    /* loaded from: classes.dex */
    public class H5YG8fq_22 extends Xgtqvk_8 {
        public H5YG8fq_22() {
        }

        @Override // androidx.recyclerview.widget.RecyclerView.Xgtqvk_8
        public void KQgRr5e_0() {
            RecyclerView.this.assertNotInLayoutOrScroll(null);
            RecyclerView recyclerView = RecyclerView.this;
            recyclerView.mState.f2442KQgRr5e_0 = true;
            recyclerView.processDataSetCompletelyChanged(true);
            if (RecyclerView.this.mAdapterHelper.m624KQgRr5e_0()) {
                return;
            }
            RecyclerView.this.requestLayout();
        }

        @Override // androidx.recyclerview.widget.RecyclerView.Xgtqvk_8
        public void PGPF6hQ_2(int i, int i2) {
            RecyclerView.this.assertNotInLayoutOrScroll(null);
            if (RecyclerView.this.mAdapterHelper.m629QxJ9d_1(i, i2)) {
                QxJ9d_1();
            }
        }

        @Override // androidx.recyclerview.widget.RecyclerView.Xgtqvk_8
        public void QxJ9d_1(int i, int i2) {
            RecyclerView.this.assertNotInLayoutOrScroll(null);
            if (RecyclerView.this.mAdapterHelper.m626KQgRr5e_0(i, i2)) {
                QxJ9d_1();
            }
        }

        public void QxJ9d_1() {
            if (RecyclerView.POST_UPDATES_ON_ANIMATION) {
                RecyclerView recyclerView = RecyclerView.this;
                if (recyclerView.mHasFixedSize && recyclerView.mIsAttached) {
                    X6FRs_4.IMuAHx_6.EuDEkJe_12.ZzDuCHW_20.KQgRr5e_0(recyclerView, recyclerView.mUpdateChildViewsRunnable);
                    return;
                }
            }
            RecyclerView recyclerView2 = RecyclerView.this;
            recyclerView2.mAdapterUpdateDuringMeasure = true;
            recyclerView2.requestLayout();
        }

        @Override // androidx.recyclerview.widget.RecyclerView.Xgtqvk_8
        public void KQgRr5e_0(int i, int i2, Object obj) {
            RecyclerView.this.assertNotInLayoutOrScroll(null);
            if (RecyclerView.this.mAdapterHelper.KQgRr5e_0(i, i2, obj)) {
                QxJ9d_1();
            }
        }

        @Override // androidx.recyclerview.widget.RecyclerView.Xgtqvk_8
        public void KQgRr5e_0(int i, int i2, int i3) {
            RecyclerView.this.assertNotInLayoutOrScroll(null);
            if (RecyclerView.this.mAdapterHelper.KQgRr5e_0(i, i2, i3)) {
                QxJ9d_1();
            }
        }
    }

    public RecyclerView(Context context, AttributeSet attributeSet, int i) {
        super(context, attributeSet, i);
        this.mObserver = new H5YG8fq_22();
        this.mRecycler = new ZzDuCHW_20();
        this.mViewInfoStore = new X6FRs_4.YghfZG_14.PGPF6hQ_2.WwEq_13();
        this.mUpdateChildViewsRunnable = new KQgRr5e_0();
        this.mTempRect = new Rect();
        this.mTempRect2 = new Rect();
        this.mTempRectF = new RectF();
        this.mItemDecorations = new ArrayList<>();
        this.mOnItemTouchListeners = new ArrayList<>();
        this.mInterceptRequestLayoutDepth = 0;
        this.mDataSetHasChangedAfterLayout = false;
        this.mDispatchItemsChangedEvent = false;
        this.mLayoutOrScrollCounter = 0;
        this.mDispatchScrollCounter = 0;
        this.mEdgeEffectFactory = new Nm6q_10();
        this.mItemAnimator = new X6FRs_4.YghfZG_14.PGPF6hQ_2.PGPF6hQ_2();
        this.mScrollState = 0;
        this.mScrollPointerId = -1;
        this.mScaledHorizontalScrollFactor = Float.MIN_VALUE;
        this.mScaledVerticalScrollFactor = Float.MIN_VALUE;
        boolean z = true;
        this.mPreserveFocusAfterLayout = true;
        this.mViewFlinger = new XDsvEfm_26();
        this.mPrefetchRegistry = ALLOW_THREAD_GAP_WORK ? new X6FRs_4.QxJ9d_1() : null;
        this.mState = new G83uNX_24();
        this.mItemsAddedOrRemoved = false;
        this.mItemsChanged = false;
        this.mItemAnimatorListener = new EuDEkJe_12();
        this.mPostedAnimatorRunner = false;
        this.mMinMaxLayoutPositions = new int[2];
        this.mScrollOffset = new int[2];
        this.mScrollConsumed = new int[2];
        this.mNestedOffsets = new int[2];
        this.mScrollStepConsumed = new int[2];
        this.mPendingAccessibilityImportanceChange = new ArrayList();
        this.mItemAnimatorRunner = new QxJ9d_1();
        this.mViewInfoProcessCallback = new Mqv2r_3();
        if (attributeSet != null) {
            TypedArray obtainStyledAttributes = context.obtainStyledAttributes(attributeSet, CLIP_TO_PADDING_ATTR, i, 0);
            this.mClipToPadding = obtainStyledAttributes.getBoolean(0, true);
            obtainStyledAttributes.recycle();
        } else {
            this.mClipToPadding = true;
        }
        setScrollContainer(true);
        setFocusableInTouchMode(true);
        ViewConfiguration viewConfiguration = ViewConfiguration.get(context);
        this.mTouchSlop = viewConfiguration.getScaledTouchSlop();
        this.mScaledHorizontalScrollFactor = X6FRs_4.IMuAHx_6.EuDEkJe_12.RfjZ_21.QxJ9d_1(viewConfiguration, context);
        this.mScaledVerticalScrollFactor = X6FRs_4.IMuAHx_6.EuDEkJe_12.RfjZ_21.PGPF6hQ_2(viewConfiguration, context);
        this.mMinFlingVelocity = viewConfiguration.getScaledMinimumFlingVelocity();
        this.mMaxFlingVelocity = viewConfiguration.getScaledMaximumFlingVelocity();
        setWillNotDraw(getOverScrollMode() == 2);
        this.mItemAnimator.KQgRr5e_0(this.mItemAnimatorListener);
        initAdapterManager();
        initChildrenHelper();
        initAutofill();
        if (X6FRs_4.IMuAHx_6.EuDEkJe_12.ZzDuCHW_20.m269QxJ9d_1((View) this) == 0) {
            X6FRs_4.IMuAHx_6.EuDEkJe_12.ZzDuCHW_20.IMuAHx_6(this, 1);
        }
        this.mAccessibilityManager = (AccessibilityManager) getContext().getSystemService("accessibility");
        setAccessibilityDelegateCompat(new X6FRs_4.YghfZG_14.PGPF6hQ_2.XnFJ5_9(this));
        if (attributeSet != null) {
            TypedArray obtainStyledAttributes2 = context.obtainStyledAttributes(attributeSet, X6FRs_4.YghfZG_14.QxJ9d_1.RecyclerView, i, 0);
            String string = obtainStyledAttributes2.getString(X6FRs_4.YghfZG_14.QxJ9d_1.RecyclerView_layoutManager);
            if (obtainStyledAttributes2.getInt(X6FRs_4.YghfZG_14.QxJ9d_1.RecyclerView_android_descendantFocusability, -1) == -1) {
                setDescendantFocusability(262144);
            }
            boolean z2 = obtainStyledAttributes2.getBoolean(X6FRs_4.YghfZG_14.QxJ9d_1.RecyclerView_fastScrollEnabled, false);
            this.mEnableFastScroller = z2;
            if (z2) {
                initFastScroller((StateListDrawable) obtainStyledAttributes2.getDrawable(X6FRs_4.YghfZG_14.QxJ9d_1.RecyclerView_fastScrollVerticalThumbDrawable), obtainStyledAttributes2.getDrawable(X6FRs_4.YghfZG_14.QxJ9d_1.RecyclerView_fastScrollVerticalTrackDrawable), (StateListDrawable) obtainStyledAttributes2.getDrawable(X6FRs_4.YghfZG_14.QxJ9d_1.RecyclerView_fastScrollHorizontalThumbDrawable), obtainStyledAttributes2.getDrawable(X6FRs_4.YghfZG_14.QxJ9d_1.RecyclerView_fastScrollHorizontalTrackDrawable));
            }
            obtainStyledAttributes2.recycle();
            createLayoutManager(context, string, attributeSet, i, 0);
            if (Build.VERSION.SDK_INT >= 21) {
                TypedArray obtainStyledAttributes3 = context.obtainStyledAttributes(attributeSet, NESTED_SCROLLING_ATTRS, i, 0);
                boolean z3 = obtainStyledAttributes3.getBoolean(0, true);
                obtainStyledAttributes3.recycle();
                z = z3;
            }
        } else {
            setDescendantFocusability(262144);
        }
        setNestedScrollingEnabled(z);
    }

    /* loaded from: classes.dex */
    public static class SavedState extends AbsSavedState {
        public static final Parcelable.Creator<SavedState> CREATOR = new KQgRr5e_0();
        public Parcelable KQgRr5e_0;

        /* loaded from: classes.dex */
        public static class KQgRr5e_0 implements Parcelable.ClassLoaderCreator<SavedState> {
            @Override // android.os.Parcelable.ClassLoaderCreator
            /* renamed from: KQgRr5e_0 */
            public SavedState createFromParcel(Parcel parcel, ClassLoader classLoader) {
                return new SavedState(parcel, classLoader);
            }

            @Override // android.os.Parcelable.Creator
            /* renamed from: KQgRr5e_0 */
            public SavedState createFromParcel(Parcel parcel) {
                return new SavedState(parcel, null);
            }

            @Override // android.os.Parcelable.Creator
            /* renamed from: KQgRr5e_0 */
            public SavedState[] newArray(int i) {
                return new SavedState[i];
            }
        }

        public SavedState(Parcel parcel, ClassLoader classLoader) {
            super(parcel, classLoader);
            this.KQgRr5e_0 = parcel.readParcelable(classLoader == null ? YghfZG_14.class.getClassLoader() : classLoader);
        }

        public void KQgRr5e_0(SavedState savedState) {
            this.KQgRr5e_0 = savedState.KQgRr5e_0;
        }

        @Override // androidx.customview.view.AbsSavedState, android.os.Parcelable
        public void writeToParcel(Parcel parcel, int i) {
            super.writeToParcel(parcel, i);
            parcel.writeParcelable(this.KQgRr5e_0, 0);
        }

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

    @Override // android.view.ViewGroup
    public ViewGroup.LayoutParams generateLayoutParams(ViewGroup.LayoutParams layoutParams) {
        YghfZG_14 yghfZG_14 = this.mLayout;
        if (yghfZG_14 != null) {
            return yghfZG_14.KQgRr5e_0(layoutParams);
        }
        throw new IllegalStateException("RecyclerView has no LayoutManager" + exceptionLabel());
    }

    public void addItemDecoration(WwEq_13 wwEq_13) {
        addItemDecoration(wwEq_13, -1);
    }
}
