package defpackage;

import java.io.IOException;

/* renamed from: ᵱᵪ, reason: contains not printable characters */
/* loaded from: classes3.dex */
public final class C4425 implements InterfaceC0772 {

    /* renamed from: ˀᵗᵝᵭ, reason: contains not printable characters */
    public int f16526;

    /* renamed from: ᵡⁱᵥ, reason: contains not printable characters */
    public boolean f16528;

    /* renamed from: ᵤᵙᵷ, reason: contains not printable characters */
    public C2497 f16530;

    /* renamed from: ᵧᵾˀˈ, reason: contains not printable characters */
    public final C3446 f16531;

    /* renamed from: ᵾᵬ, reason: contains not printable characters */
    public boolean f16532;

    /* renamed from: ᵿʗᵝʽ, reason: contains not printable characters */
    public long[] f16533;

    /* renamed from: ᵢˇᵭ, reason: contains not printable characters */
    public final C2720 f16529 = new C2720(19);

    /* renamed from: ᵡˎ, reason: contains not printable characters */
    public long f16527 = -9223372036854775807L;

    public C4425(C2497 c2497, C3446 c3446, boolean z) {
        this.f16531 = c3446;
        this.f16530 = c2497;
        this.f16533 = c2497.f9746;
        m9458(c2497, z);
    }

    @Override // defpackage.InterfaceC0772
    /* renamed from: ˇʼʤˎ */
    public final int mo1125(C2720 c2720, C2441 c2441, int i) throws IOException {
        int i2 = this.f16526;
        boolean z = i2 == this.f16533.length;
        if (z && !this.f16532) {
            c2441.f17323 = 4;
            return -4;
        }
        if ((i & 2) != 0 || !this.f16528) {
            c2720.f10550 = this.f16531;
            this.f16528 = true;
            return -5;
        }
        if (z) {
            return -3;
        }
        if ((i & 1) == 0) {
            this.f16526 = i2 + 1;
        }
        if ((i & 4) == 0) {
            byte[] bArrM6746 = this.f16529.m6746(this.f16530.f9745[i2]);
            c2441.m6222(bArrM6746.length);
            c2441.f9517.put(bArrM6746);
        }
        c2441.f9512 = this.f16533[i2];
        c2441.f17323 = 1;
        return -4;
    }

    @Override // defpackage.InterfaceC0772
    /* renamed from: ˌᵜᵹᵩ */
    public final int mo1126(long j) {
        int iMax = Math.max(this.f16526, AbstractC3558.m8148(this.f16533, j, true));
        int i = iMax - this.f16526;
        this.f16526 = iMax;
        return i;
    }

    /* renamed from: ˏᵙ, reason: contains not printable characters */
    public final void m9458(C2497 c2497, boolean z) {
        int i = this.f16526;
        long j = -9223372036854775807L;
        long j2 = i == 0 ? -9223372036854775807L : this.f16533[i - 1];
        this.f16532 = z;
        this.f16530 = c2497;
        long[] jArr = c2497.f9746;
        this.f16533 = jArr;
        long j3 = this.f16527;
        if (j3 == -9223372036854775807L) {
            if (j2 != -9223372036854775807L) {
                this.f16526 = AbstractC3558.m8148(jArr, j2, false);
            }
        } else {
            int iM8148 = AbstractC3558.m8148(jArr, j3, true);
            this.f16526 = iM8148;
            if (this.f16532 && iM8148 == this.f16533.length) {
                j = j3;
            }
            this.f16527 = j;
        }
    }

    @Override // defpackage.InterfaceC0772
    /* renamed from: ᵥᵯˎ */
    public final boolean mo1128() {
        return true;
    }

    @Override // defpackage.InterfaceC0772
    /* renamed from: ᵴᵳ */
    public final void mo1129() {
    }
}
