package androidx.recyclerview.widget;

import android.view.View;
import androidx.recyclerview.widget.RecyclerView;

/* loaded from: classes.dex */
public abstract class r extends RecyclerView.m {

    /* renamed from: g, reason: collision with root package name */
    boolean f5470g = true;

    public final void A(RecyclerView.e0 e0Var) {
        I(e0Var);
        h(e0Var);
    }

    public final void B(RecyclerView.e0 e0Var) {
        J(e0Var);
    }

    public final void C(RecyclerView.e0 e0Var, boolean z10) {
        K(e0Var, z10);
        h(e0Var);
    }

    public final void D(RecyclerView.e0 e0Var, boolean z10) {
        L(e0Var, z10);
    }

    public final void E(RecyclerView.e0 e0Var) {
        M(e0Var);
        h(e0Var);
    }

    public final void F(RecyclerView.e0 e0Var) {
        N(e0Var);
    }

    public final void G(RecyclerView.e0 e0Var) {
        O(e0Var);
        h(e0Var);
    }

    public final void H(RecyclerView.e0 e0Var) {
        P(e0Var);
    }

    public void I(RecyclerView.e0 e0Var) {
    }

    public void J(RecyclerView.e0 e0Var) {
    }

    public void K(RecyclerView.e0 e0Var, boolean z10) {
    }

    public void L(RecyclerView.e0 e0Var, boolean z10) {
    }

    public void M(RecyclerView.e0 e0Var) {
    }

    public void N(RecyclerView.e0 e0Var) {
    }

    public void O(RecyclerView.e0 e0Var) {
    }

    public void P(RecyclerView.e0 e0Var) {
    }

    @Override // androidx.recyclerview.widget.RecyclerView.m
    public boolean a(RecyclerView.e0 e0Var, RecyclerView.m.b bVar, RecyclerView.m.b bVar2) {
        int i10;
        int i11;
        return (bVar == null || ((i10 = bVar.f5214a) == (i11 = bVar2.f5214a) && bVar.f5215b == bVar2.f5215b)) ? w(e0Var) : y(e0Var, i10, bVar.f5215b, i11, bVar2.f5215b);
    }

    @Override // androidx.recyclerview.widget.RecyclerView.m
    public boolean b(RecyclerView.e0 e0Var, RecyclerView.e0 e0Var2, RecyclerView.m.b bVar, RecyclerView.m.b bVar2) {
        int i10;
        int i11;
        int i12 = bVar.f5214a;
        int i13 = bVar.f5215b;
        if (e0Var2.L()) {
            int i14 = bVar.f5214a;
            i11 = bVar.f5215b;
            i10 = i14;
        } else {
            i10 = bVar2.f5214a;
            i11 = bVar2.f5215b;
        }
        return x(e0Var, e0Var2, i12, i13, i10, i11);
    }

    @Override // androidx.recyclerview.widget.RecyclerView.m
    public boolean c(RecyclerView.e0 e0Var, RecyclerView.m.b bVar, RecyclerView.m.b bVar2) {
        int i10 = bVar.f5214a;
        int i11 = bVar.f5215b;
        View view = e0Var.f5192p;
        int left = bVar2 == null ? view.getLeft() : bVar2.f5214a;
        int top = bVar2 == null ? view.getTop() : bVar2.f5215b;
        if (e0Var.x() || (i10 == left && i11 == top)) {
            return z(e0Var);
        }
        view.layout(left, top, view.getWidth() + left, view.getHeight() + top);
        return y(e0Var, i10, i11, left, top);
    }

    @Override // androidx.recyclerview.widget.RecyclerView.m
    public boolean d(RecyclerView.e0 e0Var, RecyclerView.m.b bVar, RecyclerView.m.b bVar2) {
        int i10 = bVar.f5214a;
        int i11 = bVar2.f5214a;
        if (i10 != i11 || bVar.f5215b != bVar2.f5215b) {
            return y(e0Var, i10, bVar.f5215b, i11, bVar2.f5215b);
        }
        E(e0Var);
        return false;
    }

    @Override // androidx.recyclerview.widget.RecyclerView.m
    public boolean f(RecyclerView.e0 e0Var) {
        return !this.f5470g || e0Var.v();
    }

    public abstract boolean w(RecyclerView.e0 e0Var);

    public abstract boolean x(RecyclerView.e0 e0Var, RecyclerView.e0 e0Var2, int i10, int i11, int i12, int i13);

    public abstract boolean y(RecyclerView.e0 e0Var, int i10, int i11, int i12, int i13);

    public abstract boolean z(RecyclerView.e0 e0Var);
}
