package o;

import android.os.Parcel;
import android.util.SparseIntArray;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.tj0, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C2550tj0 extends AbstractC2455sj0 {
    public final SparseIntArray d;
    public final Parcel e;
    public final int f;
    public final int g;
    public final String h;
    public int i;
    public int j;
    public int k;

    public C2550tj0(Parcel parcel) {
        this(parcel, parcel.dataPosition(), parcel.dataSize(), "", new C1839m9(0), new C1839m9(0), new C1839m9(0));
    }

    @Override // o.AbstractC2455sj0
    public final C2550tj0 a() {
        Parcel parcel = this.e;
        int iDataPosition = parcel.dataPosition();
        int i = this.j;
        if (i == this.f) {
            i = this.g;
        }
        return new C2550tj0(parcel, iDataPosition, i, AbstractC2462sn.n(new StringBuilder(), this.h, "  "), this.a, this.b, this.c);
    }

    @Override // o.AbstractC2455sj0
    public final boolean e(int i) {
        while (this.j < this.g) {
            int i2 = this.k;
            if (i2 == i) {
                return true;
            }
            if (String.valueOf(i2).compareTo(String.valueOf(i)) > 0) {
                return false;
            }
            int i3 = this.j;
            Parcel parcel = this.e;
            parcel.setDataPosition(i3);
            int i4 = parcel.readInt();
            this.k = parcel.readInt();
            this.j += i4;
        }
        return this.k == i;
    }

    @Override // o.AbstractC2455sj0
    public final void h(int i) {
        int i2 = this.i;
        SparseIntArray sparseIntArray = this.d;
        Parcel parcel = this.e;
        if (i2 >= 0) {
            int i3 = sparseIntArray.get(i2);
            int iDataPosition = parcel.dataPosition();
            parcel.setDataPosition(i3);
            parcel.writeInt(iDataPosition - i3);
            parcel.setDataPosition(iDataPosition);
        }
        this.i = i;
        sparseIntArray.put(i, parcel.dataPosition());
        parcel.writeInt(0);
        parcel.writeInt(i);
    }

    public C2550tj0(Parcel parcel, int i, int i2, String str, C1839m9 c1839m9, C1839m9 c1839m92, C1839m9 c1839m93) {
        super(c1839m9, c1839m92, c1839m93);
        this.d = new SparseIntArray();
        this.i = -1;
        this.k = -1;
        this.e = parcel;
        this.f = i;
        this.g = i2;
        this.j = i;
        this.h = str;
    }
}
