package defpackage;

import androidx.recyclerview.widget.RecyclerView;
import java.util.Arrays;

/* JADX INFO: renamed from: ˆʽᵚ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes3.dex */
public final class C0807 {

    /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
    public int f3607;

    /* JADX INFO: renamed from: ᵲᵶᵳˈ, reason: contains not printable characters */
    public int f3609;

    /* JADX INFO: renamed from: ᵷᵺʾᵖ, reason: contains not printable characters */
    public int f3610 = 7;

    /* JADX INFO: renamed from: ːˏᵟᵯ, reason: contains not printable characters */
    public int[] f3608 = new int[8];

    /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
    public void m2917(int i, int i2) {
        if (i < 0) {
            ᵕᵩʽᵲ.ᵮᵣᵗˈ("Layout positions must be non-negative");
            return;
        }
        if (i2 < 0) {
            ᵕᵩʽᵲ.ᵮᵣᵗˈ("Pixel distance must be non-negative");
            return;
        }
        int i3 = this.f3610;
        int i4 = i3 * 2;
        int[] iArr = this.f3608;
        if (iArr == null) {
            int[] iArr2 = new int[4];
            this.f3608 = iArr2;
            Arrays.fill(iArr2, -1);
        } else if (i4 >= iArr.length) {
            int[] iArr3 = new int[i3 * 4];
            this.f3608 = iArr3;
            System.arraycopy(iArr, 0, iArr3, 0, iArr.length);
        }
        int[] iArr4 = this.f3608;
        iArr4[i4] = i;
        iArr4[i4 + 1] = i2;
        this.f3610++;
    }

    /* JADX INFO: renamed from: ːˏᵟᵯ, reason: contains not printable characters */
    public void m2918(RecyclerView recyclerView, boolean z) {
        this.f3610 = 0;
        int[] iArr = this.f3608;
        if (iArr != null) {
            Arrays.fill(iArr, -1);
        }
        AbstractC0421 abstractC0421 = recyclerView.f869;
        if (recyclerView.f900 == null || abstractC0421 == null || !abstractC0421.f2360) {
            return;
        }
        if (z) {
            if (!recyclerView.f918.m9052()) {
                abstractC0421.mo322(recyclerView.f900.mo4258(), this);
            }
        } else if (!recyclerView.m543()) {
            abstractC0421.mo332(this.f3609, this.f3607, recyclerView.f899, this);
        }
        int i = this.f3610;
        if (i > abstractC0421.f2355) {
            abstractC0421.f2355 = i;
            abstractC0421.f2358 = z;
            recyclerView.f887.m6684();
        }
    }

    /* JADX INFO: renamed from: ᵲᵶᵳˈ, reason: contains not printable characters */
    public void m2919(int i) {
        int[] iArr = this.f3608;
        int i2 = this.f3607;
        iArr[i2] = i;
        int i3 = this.f3610 & (i2 + 1);
        this.f3607 = i3;
        int i4 = this.f3609;
        if (i3 == i4) {
            int length = iArr.length;
            int i5 = length - i4;
            int i6 = length << 1;
            int[] iArr2 = new int[i6];
            System.arraycopy(iArr, i4, iArr2, 0, i5);
            System.arraycopy(this.f3608, 0, iArr2, i5, this.f3609);
            this.f3608 = iArr2;
            this.f3609 = 0;
            this.f3607 = length;
            this.f3610 = i6 - 1;
        }
    }
}
