package defpackage;

import androidx.media3.exoplayer.source.BehindLiveWindowException;

/* renamed from: ˁᵎᵠ, reason: contains not printable characters */
/* loaded from: classes3.dex */
public final class C0696 {

    /* renamed from: ˇʼʤˎ, reason: contains not printable characters */
    public final long f3377;

    /* renamed from: ˏˋٴ, reason: contains not printable characters */
    public final long f3378;

    /* renamed from: ˏᵙ, reason: contains not printable characters */
    public final C2241 f3379;

    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    public final C4823 f3380;

    /* renamed from: ᵴᵳ, reason: contains not printable characters */
    public final AbstractC0185 f3381;

    /* renamed from: ᵻᵢﹳᵰ, reason: contains not printable characters */
    public final InterfaceC5337 f3382;

    public C0696(long j, AbstractC0185 abstractC0185, C2241 c2241, C4823 c4823, long j2, InterfaceC5337 interfaceC5337) {
        this.f3377 = j;
        this.f3381 = abstractC0185;
        this.f3379 = c2241;
        this.f3378 = j2;
        this.f3380 = c4823;
        this.f3382 = interfaceC5337;
    }

    /* renamed from: ˇʼʤˎ, reason: contains not printable characters */
    public final long m2686(long j) {
        InterfaceC5337 interfaceC5337 = this.f3382;
        interfaceC5337.getClass();
        return interfaceC5337.mo4300(j - this.f3378);
    }

    /* renamed from: ˏˋٴ, reason: contains not printable characters */
    public final boolean m2687(long j, long j2) {
        InterfaceC5337 interfaceC5337 = this.f3382;
        interfaceC5337.getClass();
        return interfaceC5337.mo4298() || j2 == -9223372036854775807L || m2691(j) <= j2;
    }

    /* renamed from: ˏᵙ, reason: contains not printable characters */
    public final long m2688() {
        InterfaceC5337 interfaceC5337 = this.f3382;
        interfaceC5337.getClass();
        return interfaceC5337.mo4294(this.f3377);
    }

    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    public final C0696 m2689(long j, AbstractC0185 abstractC0185) throws BehindLiveWindowException {
        long jMo4302;
        long jMo43022;
        InterfaceC5337 interfaceC5337Mo1414 = this.f3381.mo1414();
        InterfaceC5337 interfaceC5337Mo14142 = abstractC0185.mo1414();
        if (interfaceC5337Mo1414 == null) {
            return new C0696(j, abstractC0185, this.f3379, this.f3380, this.f3378, interfaceC5337Mo1414);
        }
        if (!interfaceC5337Mo1414.mo4298()) {
            return new C0696(j, abstractC0185, this.f3379, this.f3380, this.f3378, interfaceC5337Mo14142);
        }
        long jMo4294 = interfaceC5337Mo1414.mo4294(j);
        if (jMo4294 == 0) {
            return new C0696(j, abstractC0185, this.f3379, this.f3380, this.f3378, interfaceC5337Mo14142);
        }
        interfaceC5337Mo14142.getClass();
        long jMo4299 = interfaceC5337Mo1414.mo4299();
        long jMo4300 = interfaceC5337Mo1414.mo4300(jMo4299);
        long j2 = jMo4294 + jMo4299;
        long j3 = j2 - 1;
        long jMo4296 = interfaceC5337Mo1414.mo4296(j3, j) + interfaceC5337Mo1414.mo4300(j3);
        long jMo42992 = interfaceC5337Mo14142.mo4299();
        long jMo43002 = interfaceC5337Mo14142.mo4300(jMo42992);
        long j4 = this.f3378;
        if (jMo4296 == jMo43002) {
            jMo4302 = j2 - jMo42992;
        } else {
            if (jMo4296 < jMo43002) {
                throw new BehindLiveWindowException();
            }
            if (jMo43002 < jMo4300) {
                jMo43022 = j4 - (interfaceC5337Mo14142.mo4302(jMo4300, j) - jMo4299);
                return new C0696(j, abstractC0185, this.f3379, this.f3380, jMo43022, interfaceC5337Mo14142);
            }
            jMo4302 = interfaceC5337Mo1414.mo4302(jMo43002, j) - jMo42992;
        }
        jMo43022 = jMo4302 + j4;
        return new C0696(j, abstractC0185, this.f3379, this.f3380, jMo43022, interfaceC5337Mo14142);
    }

    /* renamed from: ᵴᵳ, reason: contains not printable characters */
    public final long m2690(long j) {
        InterfaceC5337 interfaceC5337 = this.f3382;
        interfaceC5337.getClass();
        long j2 = this.f3377;
        long jMo4295 = interfaceC5337.mo4295(j2, j) + this.f3378;
        interfaceC5337.getClass();
        return (interfaceC5337.mo4297(j2, j) + jMo4295) - 1;
    }

    /* renamed from: ᵻᵢﹳᵰ, reason: contains not printable characters */
    public final long m2691(long j) {
        long jM2686 = m2686(j);
        InterfaceC5337 interfaceC5337 = this.f3382;
        interfaceC5337.getClass();
        return interfaceC5337.mo4296(j - this.f3378, this.f3377) + jM2686;
    }
}
