package p138.p176.p177.p190.p217.p220;

import p138.p176.p177.p190.C3431;
import p138.p176.p177.p190.C3433;
import p138.p176.p177.p190.p193.C3511;
import p138.p176.p177.p190.p210.p211.C3723;
import p138.p176.p177.p190.p217.InterfaceC3823;
import p138.p176.p177.p190.p217.p220.p221.C3874;
import p138.p176.p177.p190.p239.C4150;

/* JADX INFO: renamed from: ދ.ހ.֏.ؠ.ໞ.ޞ.ޅ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes.dex */
public final class C3864 implements InterfaceC3823 {

    /* JADX INFO: renamed from: ރ, reason: contains not printable characters */
    public final C3431 f11933;

    /* JADX INFO: renamed from: ޅ, reason: contains not printable characters */
    public long[] f11935;

    /* JADX INFO: renamed from: ކ, reason: contains not printable characters */
    public boolean f11936;

    /* JADX INFO: renamed from: އ, reason: contains not printable characters */
    public C3874 f11937;

    /* JADX INFO: renamed from: ވ, reason: contains not printable characters */
    public boolean f11938;

    /* JADX INFO: renamed from: މ, reason: contains not printable characters */
    public int f11939;

    /* JADX INFO: renamed from: ބ, reason: contains not printable characters */
    public final C3723 f11934 = new C3723();

    /* JADX INFO: renamed from: ފ, reason: contains not printable characters */
    public long f11940 = -9223372036854775807L;

    public C3864(C3874 c3874, C3431 c3431, boolean z) {
        this.f11933 = c3431;
        this.f11937 = c3874;
        this.f11935 = c3874.f11990;
        m6260(c3874, z);
    }

    @Override // p138.p176.p177.p190.p217.InterfaceC3823
    /* JADX INFO: renamed from: ֏ */
    public int mo6116(C3433 c3433, C3511 c3511, boolean z) {
        if (z || !this.f11938) {
            c3433.f10114 = this.f11933;
            this.f11938 = true;
            return -5;
        }
        int i = this.f11939;
        if (i == this.f11935.length) {
            if (this.f11936) {
                return -3;
            }
            c3511.f10443 = 4;
            return -4;
        }
        this.f11939 = i + 1;
        byte[] bArrM6065 = this.f11934.m6065(this.f11937.f11989[i]);
        if (bArrM6065 == null) {
            return -3;
        }
        c3511.m5811(bArrM6065.length);
        c3511.f10461.put(bArrM6065);
        c3511.f10463 = this.f11935[i];
        c3511.f10443 = 1;
        return -4;
    }

    @Override // p138.p176.p177.p190.p217.InterfaceC3823
    /* JADX INFO: renamed from: ֏ */
    public void mo6117() {
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public void m6259(long j) {
        boolean z = false;
        int iM6748 = C4150.m6748(this.f11935, j, true, false);
        this.f11939 = iM6748;
        if (this.f11936 && iM6748 == this.f11935.length) {
            z = true;
        }
        if (!z) {
            j = -9223372036854775807L;
        }
        this.f11940 = j;
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public void m6260(C3874 c3874, boolean z) {
        int i = this.f11939;
        long j = i == 0 ? -9223372036854775807L : this.f11935[i - 1];
        this.f11936 = z;
        this.f11937 = c3874;
        long[] jArr = c3874.f11990;
        this.f11935 = jArr;
        long j2 = this.f11940;
        if (j2 != -9223372036854775807L) {
            m6259(j2);
        } else if (j != -9223372036854775807L) {
            this.f11939 = C4150.m6748(jArr, j, false, false);
        }
    }

    @Override // p138.p176.p177.p190.p217.InterfaceC3823
    /* JADX INFO: renamed from: ށ */
    public int mo6118(long j) {
        int iMax = Math.max(this.f11939, C4150.m6748(this.f11935, j, true, false));
        int i = iMax - this.f11939;
        this.f11939 = iMax;
        return i;
    }

    @Override // p138.p176.p177.p190.p217.InterfaceC3823
    /* JADX INFO: renamed from: ރ */
    public boolean mo6119() {
        return true;
    }
}
