package defpackage;

import android.view.animation.Interpolator;
import androidx.recyclerview.widget.RecyclerView;
import java.util.Arrays;

/* renamed from: ˆᵩᵡ, reason: contains not printable characters */
/* loaded from: classes3.dex */
public final class C0872 {

    /* renamed from: ˏᵙ, reason: contains not printable characters */
    public int f3969;

    /* renamed from: ᵴᵳ, reason: contains not printable characters */
    public int f3971;

    /* renamed from: ˇʼʤˎ, reason: contains not printable characters */
    public boolean f3967 = true;

    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    public int f3970 = 65536;

    /* renamed from: ᵻᵢﹳᵰ, reason: contains not printable characters */
    public int f3972 = 0;

    /* renamed from: ˏˋٴ, reason: contains not printable characters */
    public Object f3968 = new C1197[100];

    /* renamed from: ˇʼʤˎ, reason: contains not printable characters */
    public synchronized void m2996(int i) {
        boolean z = i < this.f3971;
        this.f3971 = i;
        if (z) {
            m2997();
        }
    }

    /* renamed from: ˏˋٴ, reason: contains not printable characters */
    public synchronized void m2997() {
        int iMax = Math.max(0, AbstractC3558.m8116(this.f3971, this.f3970) - this.f3969);
        int i = this.f3972;
        if (iMax >= i) {
            return;
        }
        Arrays.fill((C1197[]) this.f3968, iMax, i, (Object) null);
        this.f3972 = iMax;
    }

    /* renamed from: ˏᵙ, reason: contains not printable characters */
    public synchronized void m2998(C3063 c3063) {
        while (c3063 != null) {
            C1197[] c1197Arr = (C1197[]) this.f3968;
            int i = this.f3972;
            this.f3972 = i + 1;
            C1197 c1197 = (C1197) c3063.f11726;
            c1197.getClass();
            c1197Arr[i] = c1197;
            this.f3969--;
            c3063 = (C3063) c3063.f11725;
            if (c3063 == null || ((C1197) c3063.f11726) == null) {
                c3063 = null;
            }
        }
    }

    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    public synchronized C1197 m2999() {
        C1197 c1197;
        try {
            int i = this.f3969 + 1;
            this.f3969 = i;
            int i2 = this.f3972;
            if (i2 > 0) {
                C1197[] c1197Arr = (C1197[]) this.f3968;
                int i3 = i2 - 1;
                this.f3972 = i3;
                c1197 = c1197Arr[i3];
                c1197.getClass();
                ((C1197[]) this.f3968)[this.f3972] = null;
            } else {
                C1197 c11972 = new C1197(0, new byte[this.f3970]);
                C1197[] c1197Arr2 = (C1197[]) this.f3968;
                if (i > c1197Arr2.length) {
                    this.f3968 = (C1197[]) Arrays.copyOf(c1197Arr2, c1197Arr2.length * 2);
                }
                c1197 = c11972;
            }
        } catch (Throwable th) {
            throw th;
        }
        return c1197;
    }

    /* renamed from: ᵴᵳ, reason: contains not printable characters */
    public synchronized void m3000(C1197 c1197) {
        C1197[] c1197Arr = (C1197[]) this.f3968;
        int i = this.f3972;
        this.f3972 = i + 1;
        c1197Arr[i] = c1197;
        this.f3969--;
    }

    /* renamed from: ᵻᵢﹳᵰ, reason: contains not printable characters */
    public void m3001(RecyclerView recyclerView) {
        int i = this.f3972;
        if (i >= 0) {
            this.f3972 = -1;
            recyclerView.m568(i);
            this.f3967 = false;
        } else if (this.f3967) {
            Interpolator interpolator = (Interpolator) this.f3968;
            if (interpolator != null && this.f3969 < 1) {
                ᵹˉᵞ.ᵳٴᵶ("If you provide an interpolator, you must set a positive duration");
                return;
            }
            int i2 = this.f3969;
            if (i2 < 1) {
                ᵹˉᵞ.ᵳٴᵶ("Scroll duration must be a positive number");
            } else {
                recyclerView.f917.m9061(this.f3970, this.f3971, i2, interpolator);
                this.f3967 = false;
            }
        }
    }
}
