package u0;

import d5.AbstractC0844a;
import java.util.Objects;

/* JADX INFO: loaded from: classes.dex */
public final class P {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public Integer f17175a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public Object f17176b;

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

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public long f17178d;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public long f17179e;

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public boolean f17180f;

    /* JADX INFO: renamed from: g, reason: collision with root package name */
    public C1566b f17181g = C1566b.f17261c;

    static {
        AbstractC0844a.r(0, 1, 2, 3, 4);
    }

    public final long a(int i, int i5) {
        C1565a c1565aA = this.f17181g.a(i);
        if (c1565aA.f17253a != -1) {
            return c1565aA.f17258f[i5];
        }
        return -9223372036854775807L;
    }

    public final int b(long j8) {
        int i;
        C1565a c1565aA;
        int i5;
        C1566b c1566b = this.f17181g;
        long j9 = this.f17178d;
        c1566b.getClass();
        if (j8 != Long.MIN_VALUE && (j9 == -9223372036854775807L || j8 < j9)) {
            int i8 = 0;
            while (true) {
                i = c1566b.f17263a;
                if (i8 >= i) {
                    break;
                }
                c1566b.a(i8).getClass();
                c1566b.a(i8).getClass();
                if (0 > j8 && ((i5 = (c1565aA = c1566b.a(i8)).f17253a) == -1 || c1565aA.a(-1) < i5)) {
                    break;
                }
                i8++;
            }
            if (i8 < i) {
                return i8;
            }
        }
        return -1;
    }

    public final int c(long j8) {
        C1566b c1566b = this.f17181g;
        int i = c1566b.f17263a;
        int i5 = i - 1;
        if (i5 == i - 1) {
            c1566b.a(i5).getClass();
        }
        while (i5 >= 0 && j8 != Long.MIN_VALUE) {
            c1566b.a(i5).getClass();
            if (j8 >= 0) {
                break;
            }
            i5--;
        }
        if (i5 >= 0) {
            C1565a c1565aA = c1566b.a(i5);
            int i8 = c1565aA.f17253a;
            if (i8 != -1) {
                for (int i9 = 0; i9 < i8; i9++) {
                    int i10 = c1565aA.f17257e[i9];
                    if (i10 != 0 && i10 != 1) {
                    }
                }
            }
            return i5;
        }
        return -1;
    }

    public final long d(int i) {
        this.f17181g.a(i).getClass();
        return 0L;
    }

    public final int e(int i) {
        return this.f17181g.a(i).a(-1);
    }

    public final boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null || !P.class.equals(obj.getClass())) {
            return false;
        }
        P p3 = (P) obj;
        return Objects.equals(this.f17175a, p3.f17175a) && Objects.equals(this.f17176b, p3.f17176b) && this.f17177c == p3.f17177c && this.f17178d == p3.f17178d && this.f17179e == p3.f17179e && this.f17180f == p3.f17180f && Objects.equals(this.f17181g, p3.f17181g);
    }

    public final boolean f(int i) {
        C1566b c1566b = this.f17181g;
        int i5 = c1566b.f17263a;
        if (i != i5 - 1 || i != i5 - 1) {
            return false;
        }
        c1566b.a(i).getClass();
        return false;
    }

    public final boolean g(int i) {
        this.f17181g.a(i).getClass();
        return false;
    }

    public final void h(Integer num, Object obj, int i, long j8, long j9, C1566b c1566b, boolean z8) {
        this.f17175a = num;
        this.f17176b = obj;
        this.f17177c = i;
        this.f17178d = j8;
        this.f17179e = j9;
        this.f17181g = c1566b;
        this.f17180f = z8;
    }

    public final int hashCode() {
        Integer num = this.f17175a;
        int iHashCode = (217 + (num == null ? 0 : num.hashCode())) * 31;
        Object obj = this.f17176b;
        int iHashCode2 = (((iHashCode + (obj != null ? obj.hashCode() : 0)) * 31) + this.f17177c) * 31;
        long j8 = this.f17178d;
        int i = (iHashCode2 + ((int) (j8 ^ (j8 >>> 32)))) * 31;
        long j9 = this.f17179e;
        return this.f17181g.hashCode() + ((((i + ((int) (j9 ^ (j9 >>> 32)))) * 31) + (this.f17180f ? 1 : 0)) * 31);
    }
}
