package o;

import android.util.SparseArray;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* loaded from: classes.dex */
public final class AP {
    public final SparseArray a;
    public C2641uh0 b;

    public AP(int i) {
        this.a = new SparseArray(i);
    }

    public final void a(C2641uh0 c2641uh0, int i, int i2) {
        int iA = c2641uh0.a(i);
        SparseArray sparseArray = this.a;
        AP ap = sparseArray == null ? null : (AP) sparseArray.get(iA);
        if (ap == null) {
            ap = new AP(1);
            sparseArray.put(c2641uh0.a(i), ap);
        }
        if (i2 > i) {
            ap.a(c2641uh0, i + 1, i2);
        } else {
            ap.b = c2641uh0;
        }
    }
}
