package y;

import java.nio.ByteBuffer;

/* JADX INFO: compiled from: Table.java */
/* JADX INFO: loaded from: classes.dex */
public class c {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    protected int f5940a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    protected ByteBuffer f5941b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    private int f5942c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    private int f5943d;

    public c() {
        d.a();
    }

    protected int a(int i3) {
        return i3 + this.f5941b.getInt(i3);
    }

    protected int b(int i3) {
        if (i3 < this.f5943d) {
            return this.f5941b.getShort(this.f5942c + i3);
        }
        return 0;
    }

    protected void c(int i3, ByteBuffer byteBuffer) {
        this.f5941b = byteBuffer;
        if (byteBuffer == null) {
            this.f5940a = 0;
            this.f5942c = 0;
            this.f5943d = 0;
        } else {
            this.f5940a = i3;
            int i4 = i3 - byteBuffer.getInt(i3);
            this.f5942c = i4;
            this.f5943d = this.f5941b.getShort(i4);
        }
    }

    protected int d(int i3) {
        int i4 = i3 + this.f5940a;
        return i4 + this.f5941b.getInt(i4) + 4;
    }

    protected int e(int i3) {
        int i4 = i3 + this.f5940a;
        return this.f5941b.getInt(i4 + this.f5941b.getInt(i4));
    }
}
