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

import android.os.SystemClock;
import com.google.android.exoplayer2.source.BehindLiveWindowException;
import com.google.android.exoplayer2.source.dash.DashMediaSource;
import com.google.android.exoplayer2.upstream.HttpDataSource;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import p138.p176.p177.p190.C3414;
import p138.p176.p177.p190.C3431;
import p138.p176.p177.p190.C3453;
import p138.p176.p177.p190.p198.C3556;
import p138.p176.p177.p190.p198.InterfaceC3561;
import p138.p176.p177.p190.p198.InterfaceC3571;
import p138.p176.p177.p190.p198.InterfaceC3575;
import p138.p176.p177.p190.p198.p202.C3596;
import p138.p176.p177.p190.p198.p204.C3620;
import p138.p176.p177.p190.p198.p206.C3650;
import p138.p176.p177.p190.p217.p219.AbstractC3834;
import p138.p176.p177.p190.p217.p219.AbstractC3836;
import p138.p176.p177.p190.p217.p219.AbstractC3848;
import p138.p176.p177.p190.p217.p219.C3837;
import p138.p176.p177.p190.p217.p219.C3840;
import p138.p176.p177.p190.p217.p219.C3845;
import p138.p176.p177.p190.p217.p219.C3847;
import p138.p176.p177.p190.p217.p219.C3851;
import p138.p176.p177.p190.p217.p219.InterfaceC3849;
import p138.p176.p177.p190.p217.p220.C3865;
import p138.p176.p177.p190.p217.p220.InterfaceC3854;
import p138.p176.p177.p190.p217.p220.p221.AbstractC3878;
import p138.p176.p177.p190.p217.p220.p221.C3869;
import p138.p176.p177.p190.p217.p220.p221.C3870;
import p138.p176.p177.p190.p217.p220.p221.C3877;
import p138.p176.p177.p190.p235.InterfaceC4036;
import p138.p176.p177.p190.p238.C4098;
import p138.p176.p177.p190.p238.InterfaceC4095;
import p138.p176.p177.p190.p238.InterfaceC4110;
import p138.p176.p177.p190.p238.InterfaceC4115;
import p138.p176.p177.p190.p239.C4134;
import p138.p176.p177.p190.p239.C4150;

/* JADX INFO: renamed from: ދ.ހ.֏.ؠ.ໞ.ޞ.ބ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes.dex */
public class C3860 implements InterfaceC3854 {

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public final InterfaceC4110 f11912;

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public final int[] f11913;

    /* JADX INFO: renamed from: ހ, reason: contains not printable characters */
    public final int f11914;

    /* JADX INFO: renamed from: ށ, reason: contains not printable characters */
    public final InterfaceC4095 f11915;

    /* JADX INFO: renamed from: ނ, reason: contains not printable characters */
    public final long f11916;

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

    /* JADX INFO: renamed from: ބ, reason: contains not printable characters */
    public final C3865.C3868 f11918;

    /* JADX INFO: renamed from: ޅ, reason: contains not printable characters */
    public final C3862[] f11919;

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

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

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

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

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

    /* JADX INFO: renamed from: ދ, reason: contains not printable characters */
    public long f11925;

    /* JADX INFO: renamed from: ދ.ހ.֏.ؠ.ໞ.ޞ.ބ$֏, reason: contains not printable characters */
    public static final class C3861 implements InterfaceC3854.InterfaceC3855 {

        /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
        public final InterfaceC4095.InterfaceC4096 f11926;

        /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
        public final int f11927 = 1;

        public C3861(InterfaceC4095.InterfaceC4096 interfaceC4096) {
            this.f11926 = interfaceC4096;
        }

        @Override // p138.p176.p177.p190.p217.p220.InterfaceC3854.InterfaceC3855
        /* JADX INFO: renamed from: ֏ */
        public InterfaceC3854 mo6237(InterfaceC4110 interfaceC4110, C3870 c3870, int i, int[] iArr, InterfaceC4036 interfaceC4036, int i2, long j, boolean z, List<C3431> list, C3865.C3868 c3868, InterfaceC4115 interfaceC4115) {
            InterfaceC4095 interfaceC4095Mo1286 = this.f11926.mo1286();
            if (interfaceC4115 != null) {
                interfaceC4095Mo1286.mo6121(interfaceC4115);
            }
            return new C3860(interfaceC4110, c3870, i, iArr, interfaceC4036, i2, interfaceC4095Mo1286, j, this.f11927, z, list, c3868);
        }
    }

    /* JADX INFO: renamed from: ދ.ހ.֏.ؠ.ໞ.ޞ.ބ$ؠ, reason: contains not printable characters */
    public static final class C3862 {

        /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
        public final C3837 f11928;

        /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
        public final AbstractC3878 f11929;

        /* JADX INFO: renamed from: ހ, reason: contains not printable characters */
        public final InterfaceC3858 f11930;

        /* JADX INFO: renamed from: ށ, reason: contains not printable characters */
        public final long f11931;

        /* JADX INFO: renamed from: ނ, reason: contains not printable characters */
        public final long f11932;

        public C3862(long j, int i, AbstractC3878 abstractC3878, boolean z, List<C3431> list, InterfaceC3575 interfaceC3575) {
            InterfaceC3561 c3620;
            C3837 c3837;
            String str = abstractC3878.f12006.f10089;
            if (C4134.m6658(str) || "application/ttml+xml".equals(str)) {
                c3837 = null;
            } else {
                if ("application/x-rawcc".equals(str)) {
                    c3620 = new C3650(abstractC3878.f12006);
                } else {
                    if (str.startsWith("video/webm") || str.startsWith("audio/webm") || str.startsWith("application/webm")) {
                        c3620 = new C3596(1);
                    } else {
                        c3620 = new C3620(z ? 4 : 0, null, null, list, interfaceC3575);
                    }
                }
                c3837 = new C3837(c3620, i, abstractC3878.f12006);
            }
            InterfaceC3858 interfaceC3858Mo6292 = abstractC3878.mo6292();
            this.f11931 = j;
            this.f11929 = abstractC3878;
            this.f11932 = 0L;
            this.f11928 = c3837;
            this.f11930 = interfaceC3858Mo6292;
        }

        public C3862(long j, AbstractC3878 abstractC3878, C3837 c3837, long j2, InterfaceC3858 interfaceC3858) {
            this.f11931 = j;
            this.f11929 = abstractC3878;
            this.f11932 = j2;
            this.f11928 = c3837;
            this.f11930 = interfaceC3858;
        }

        /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
        public long m6251() {
            return this.f11930.mo6245() + this.f11932;
        }

        /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
        public long m6252(long j) {
            return this.f11930.mo6246(j - this.f11932, this.f11931) + this.f11930.mo6242(j - this.f11932);
        }

        /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
        public long m6253(C3870 c3870, int i, long j) {
            if (m6255() != -1 || c3870.f11968 == -9223372036854775807L) {
                return m6251();
            }
            return Math.max(m6251(), m6256(((j - C3414.m5458(c3870.f11963)) - C3414.m5458(c3870.f11974.get(i).f11994)) - C3414.m5458(c3870.f11968)));
        }

        /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
        public C3862 m6254(long j, AbstractC3878 abstractC3878) throws BehindLiveWindowException {
            int iMo6248;
            long jMo6243;
            InterfaceC3858 interfaceC3858Mo6292 = this.f11929.mo6292();
            InterfaceC3858 interfaceC3858Mo62922 = abstractC3878.mo6292();
            if (interfaceC3858Mo6292 == null) {
                return new C3862(j, abstractC3878, this.f11928, this.f11932, interfaceC3858Mo6292);
            }
            if (interfaceC3858Mo6292.mo6244() && (iMo6248 = interfaceC3858Mo6292.mo6248(j)) != 0) {
                long jMo6245 = interfaceC3858Mo6292.mo6245();
                long jMo6242 = interfaceC3858Mo6292.mo6242(jMo6245);
                long j2 = (((long) iMo6248) + jMo6245) - 1;
                long jMo6246 = interfaceC3858Mo6292.mo6246(j2, j) + interfaceC3858Mo6292.mo6242(j2);
                long jMo62452 = interfaceC3858Mo62922.mo6245();
                long jMo62422 = interfaceC3858Mo62922.mo6242(jMo62452);
                long j3 = this.f11932;
                if (jMo6246 == jMo62422) {
                    jMo6243 = ((j2 + 1) - jMo62452) + j3;
                } else {
                    if (jMo6246 < jMo62422) {
                        throw new BehindLiveWindowException();
                    }
                    jMo6243 = jMo62422 < jMo6242 ? j3 - (interfaceC3858Mo62922.mo6243(jMo6242, j) - jMo6245) : (interfaceC3858Mo6292.mo6243(jMo62422, j) - jMo62452) + j3;
                }
                return new C3862(j, abstractC3878, this.f11928, jMo6243, interfaceC3858Mo62922);
            }
            return new C3862(j, abstractC3878, this.f11928, this.f11932, interfaceC3858Mo62922);
        }

        /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
        public int m6255() {
            return this.f11930.mo6248(this.f11931);
        }

        /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
        public long m6256(long j) {
            return this.f11930.mo6243(j, this.f11931) + this.f11932;
        }

        /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
        public long m6257(C3870 c3870, int i, long j) {
            int iM6255 = m6255();
            return (iM6255 == -1 ? m6256((j - C3414.m5458(c3870.f11963)) - C3414.m5458(c3870.f11974.get(i).f11994)) : m6251() + ((long) iM6255)) - 1;
        }

        /* JADX INFO: renamed from: ހ, reason: contains not printable characters */
        public long m6258(long j) {
            return this.f11930.mo6242(j - this.f11932);
        }
    }

    /* JADX INFO: renamed from: ދ.ހ.֏.ؠ.ໞ.ޞ.ބ$ހ, reason: contains not printable characters */
    public static final class C3863 extends AbstractC3834 {
        public C3863(C3862 c3862, long j, long j2) {
            super(j, j2);
        }
    }

    public C3860(InterfaceC4110 interfaceC4110, C3870 c3870, int i, int[] iArr, InterfaceC4036 interfaceC4036, int i2, InterfaceC4095 interfaceC4095, long j, int i3, boolean z, List<C3431> list, C3865.C3868 c3868) {
        this.f11912 = interfaceC4110;
        this.f11921 = c3870;
        this.f11913 = iArr;
        this.f11920 = interfaceC4036;
        this.f11914 = i2;
        this.f11915 = interfaceC4095;
        this.f11922 = i;
        this.f11916 = j;
        this.f11917 = i3;
        this.f11918 = c3868;
        long jM5458 = C3414.m5458(c3870.m6264(i));
        this.f11925 = -9223372036854775807L;
        ArrayList<AbstractC3878> arrayListM6250 = m6250();
        this.f11919 = new C3862[interfaceC4036.length()];
        for (int i4 = 0; i4 < this.f11919.length; i4++) {
            this.f11919[i4] = new C3862(jM5458, i2, arrayListM6250.get(interfaceC4036.mo6478(i4)), z, list, c3868);
        }
    }

    @Override // p138.p176.p177.p190.p217.p219.InterfaceC3844
    /* JADX INFO: renamed from: ֏ */
    public int mo6227(long j, List<? extends AbstractC3848> list) {
        return (this.f11923 != null || this.f11920.length() < 2) ? list.size() : this.f11920.mo6470(j, list);
    }

    @Override // p138.p176.p177.p190.p217.p219.InterfaceC3844
    /* JADX INFO: renamed from: ֏ */
    public long mo6228(long j, C3453 c3453) {
        for (C3862 c3862 : this.f11919) {
            InterfaceC3858 interfaceC3858 = c3862.f11930;
            if (interfaceC3858 != null) {
                long jMo6243 = interfaceC3858.mo6243(j, c3862.f11931) + c3862.f11932;
                long jM6258 = c3862.m6258(jMo6243);
                return C4150.m6752(j, c3453, jM6258, (jM6258 >= j || jMo6243 >= ((long) (c3862.m6255() + (-1)))) ? jM6258 : c3862.m6258(jMo6243 + 1));
            }
        }
        return j;
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public final long m6249(C3862 c3862, AbstractC3848 abstractC3848, long j, long j2, long j3) {
        return abstractC3848 != null ? abstractC3848.mo6233() : C4150.m6789(c3862.f11930.mo6243(j, c3862.f11931) + c3862.f11932, j2, j3);
    }

    @Override // p138.p176.p177.p190.p217.p219.InterfaceC3844
    /* JADX INFO: renamed from: ֏ */
    public void mo6229() throws IOException {
        IOException iOException = this.f11923;
        if (iOException != null) {
            throw iOException;
        }
        this.f11912.mo1233();
    }

    @Override // p138.p176.p177.p190.p217.p219.InterfaceC3844
    /* JADX INFO: renamed from: ֏ */
    public void mo6230(long j, long j2, List<? extends AbstractC3848> list, C3840 c3840) {
        AbstractC3836 c3845;
        C3840 c38402;
        int i;
        int i2;
        InterfaceC3849[] interfaceC3849Arr;
        long j3;
        boolean z;
        if (this.f11923 != null) {
            return;
        }
        long j4 = j2 - j;
        long j5 = this.f11921.f11966 && (this.f11925 > (-9223372036854775807L) ? 1 : (this.f11925 == (-9223372036854775807L) ? 0 : -1)) != 0 ? this.f11925 - j : -9223372036854775807L;
        long jM5458 = C3414.m5458(this.f11921.m6263(this.f11922).f11994) + C3414.m5458(this.f11921.f11963) + j2;
        C3865.C3868 c3868 = this.f11918;
        if (c3868 != null) {
            C3865 c3865 = C3865.this;
            C3870 c3870 = c3865.f11946;
            if (!c3870.f11966) {
                z = false;
            } else if (c3865.f11950) {
                z = true;
            } else {
                Map.Entry<Long, Long> entryCeilingEntry = c3865.f11945.ceilingEntry(Long.valueOf(c3870.f11970));
                if (entryCeilingEntry == null || entryCeilingEntry.getValue().longValue() >= jM5458) {
                    z = false;
                } else {
                    long jLongValue = entryCeilingEntry.getKey().longValue();
                    c3865.f11947 = jLongValue;
                    DashMediaSource dashMediaSource = DashMediaSource.this;
                    long j6 = dashMediaSource.f1780;
                    if (j6 == -9223372036854775807L || j6 < jLongValue) {
                        dashMediaSource.f1780 = jLongValue;
                    }
                    z = true;
                }
                if (z) {
                    c3865.m6261();
                }
            }
            if (z) {
                return;
            }
        }
        long jElapsedRealtime = (this.f11916 != 0 ? SystemClock.elapsedRealtime() + this.f11916 : System.currentTimeMillis()) * 1000;
        AbstractC3848 abstractC3848 = list.isEmpty() ? null : list.get(list.size() - 1);
        int length = this.f11920.length();
        InterfaceC3849[] interfaceC3849Arr2 = new InterfaceC3849[length];
        int i3 = 0;
        while (i3 < length) {
            C3862 c3862 = this.f11919[i3];
            if (c3862.f11930 == null) {
                interfaceC3849Arr2[i3] = InterfaceC3849.f11873;
                i = i3;
                i2 = length;
                interfaceC3849Arr = interfaceC3849Arr2;
                j3 = jElapsedRealtime;
            } else {
                long jM6253 = c3862.m6253(this.f11921, this.f11922, jElapsedRealtime);
                long jM6257 = c3862.m6257(this.f11921, this.f11922, jElapsedRealtime);
                i = i3;
                i2 = length;
                interfaceC3849Arr = interfaceC3849Arr2;
                j3 = jElapsedRealtime;
                long jM6249 = m6249(c3862, abstractC3848, j2, jM6253, jM6257);
                if (jM6249 < jM6253) {
                    interfaceC3849Arr[i] = InterfaceC3849.f11873;
                } else {
                    interfaceC3849Arr[i] = new C3863(c3862, jM6249, jM6257);
                }
            }
            i3 = i + 1;
            length = i2;
            interfaceC3849Arr2 = interfaceC3849Arr;
            jElapsedRealtime = j3;
        }
        long j7 = jElapsedRealtime;
        int i4 = 1;
        this.f11920.mo6309(j, j4, j5, list, interfaceC3849Arr2);
        C3862 c38622 = this.f11919[this.f11920.mo6311()];
        C3837 c3837 = c38622.f11928;
        if (c3837 != null) {
            AbstractC3878 abstractC3878 = c38622.f11929;
            C3877 c3877 = c3837.f11821 == null ? abstractC3878.f12010 : null;
            C3877 c3877Mo6293 = c38622.f11930 == null ? abstractC3878.mo6293() : null;
            if (c3877 != null || c3877Mo6293 != null) {
                InterfaceC4095 interfaceC4095 = this.f11915;
                C3431 c3431Mo6483 = this.f11920.mo6483();
                int iMo6310 = this.f11920.mo6310();
                Object objMo6312 = this.f11920.mo6312();
                String str = c38622.f11929.f12007;
                if (c3877 == null || (c3877Mo6293 = c3877.m6290(c3877Mo6293, str)) != null) {
                    c3877 = c3877Mo6293;
                }
                c3840.f11829 = new C3847(interfaceC4095, new C4098(c3877.m6289(str), c3877.f12002, c3877.f12003, c38622.f11929.mo6291()), c3431Mo6483, iMo6310, objMo6312, c38622.f11928);
                return;
            }
        }
        long j8 = c38622.f11931;
        boolean z2 = j8 != -9223372036854775807L;
        if (c38622.m6255() == 0) {
            c3840.f11830 = z2;
            return;
        }
        long jM62532 = c38622.m6253(this.f11921, this.f11922, j7);
        long jM62572 = c38622.m6257(this.f11921, this.f11922, j7);
        this.f11925 = this.f11921.f11966 ? c38622.m6252(jM62572) : -9223372036854775807L;
        boolean z3 = z2;
        long jM62492 = m6249(c38622, abstractC3848, j2, jM62532, jM62572);
        if (jM62492 < jM62532) {
            this.f11923 = new BehindLiveWindowException();
            return;
        }
        if (jM62492 > jM62572 || (this.f11924 && jM62492 >= jM62572)) {
            c3840.f11830 = z3;
            return;
        }
        if (z3 && c38622.m6258(jM62492) >= j8) {
            c3840.f11830 = true;
            return;
        }
        int iMin = (int) Math.min(this.f11917, (jM62572 - jM62492) + 1);
        if (j8 != -9223372036854775807L) {
            while (iMin > 1 && c38622.m6258((((long) iMin) + jM62492) - 1) >= j8) {
                iMin--;
            }
        }
        long j9 = list.isEmpty() ? j2 : -9223372036854775807L;
        InterfaceC4095 interfaceC40952 = this.f11915;
        int i5 = this.f11914;
        C3431 c3431Mo64832 = this.f11920.mo6483();
        int iMo63102 = this.f11920.mo6310();
        Object objMo63122 = this.f11920.mo6312();
        AbstractC3878 abstractC38782 = c38622.f11929;
        long jMo6242 = c38622.f11930.mo6242(jM62492 - c38622.f11932);
        C3877 c3877Mo6247 = c38622.f11930.mo6247(jM62492 - c38622.f11932);
        String str2 = abstractC38782.f12007;
        if (c38622.f11928 == null) {
            c3845 = new C3851(interfaceC40952, new C4098(c3877Mo6247.m6289(str2), c3877Mo6247.f12002, c3877Mo6247.f12003, abstractC38782.mo6291()), c3431Mo64832, iMo63102, objMo63122, jMo6242, c38622.m6252(jM62492), jM62492, i5, c3431Mo64832);
            c38402 = c3840;
        } else {
            int i6 = 1;
            while (i4 < iMin) {
                C3877 c3877M6290 = c3877Mo6247.m6290(c38622.f11930.mo6247((((long) i4) + jM62492) - c38622.f11932), str2);
                if (c3877M6290 == null) {
                    break;
                }
                i6++;
                i4++;
                c3877Mo6247 = c3877M6290;
            }
            long jM6252 = c38622.m6252((((long) i6) + jM62492) - 1);
            long j10 = c38622.f11931;
            c3845 = new C3845(interfaceC40952, new C4098(c3877Mo6247.m6289(str2), c3877Mo6247.f12002, c3877Mo6247.f12003, abstractC38782.mo6291()), c3431Mo64832, iMo63102, objMo63122, jMo6242, jM6252, j9, (j10 == -9223372036854775807L || j10 > jM6252) ? -9223372036854775807L : j10, jM62492, i6, -abstractC38782.f12008, c38622.f11928);
            c38402 = c3840;
        }
        c38402.f11829 = c3845;
    }

    @Override // p138.p176.p177.p190.p217.p219.InterfaceC3844
    /* JADX INFO: renamed from: ֏ */
    public void mo6231(AbstractC3836 abstractC3836) {
        InterfaceC3571 interfaceC3571;
        if (abstractC3836 instanceof C3847) {
            int iMo6474 = this.f11920.mo6474(((C3847) abstractC3836).f11807);
            C3862[] c3862Arr = this.f11919;
            C3862 c3862 = c3862Arr[iMo6474];
            if (c3862.f11930 == null && (interfaceC3571 = c3862.f11928.f11820) != null) {
                c3862Arr[iMo6474] = new C3862(c3862.f11931, c3862.f11929, c3862.f11928, c3862.f11932, new C3859((C3556) interfaceC3571, c3862.f11929.f12008));
            }
        }
        C3865.C3868 c3868 = this.f11918;
        if (c3868 != null) {
            C3865 c3865 = C3865.this;
            long j = c3865.f11948;
            if (j != -9223372036854775807L || abstractC3836.f11811 > j) {
                c3865.f11948 = abstractC3836.f11811;
            }
        }
    }

    @Override // p138.p176.p177.p190.p217.p220.InterfaceC3854
    /* JADX INFO: renamed from: ֏ */
    public void mo6235(C3870 c3870, int i) {
        try {
            this.f11921 = c3870;
            this.f11922 = i;
            long jM6265 = c3870.m6265(i);
            ArrayList<AbstractC3878> arrayListM6250 = m6250();
            for (int i2 = 0; i2 < this.f11919.length; i2++) {
                this.f11919[i2] = this.f11919[i2].m6254(jM6265, arrayListM6250.get(this.f11920.mo6478(i2)));
            }
        } catch (BehindLiveWindowException e) {
            this.f11923 = e;
        }
    }

    @Override // p138.p176.p177.p190.p217.p220.InterfaceC3854
    /* JADX INFO: renamed from: ֏ */
    public void mo6236(InterfaceC4036 interfaceC4036) {
        this.f11920 = interfaceC4036;
    }

    /* JADX WARN: Removed duplicated region for block: B:24:0x0035 A[RETURN] */
    @Override // p138.p176.p177.p190.p217.p219.InterfaceC3844
    /* JADX INFO: renamed from: ֏ */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public boolean mo6232(AbstractC3836 abstractC3836, boolean z, Exception exc, long j) {
        C3862 c3862;
        int iM6255;
        boolean z2;
        if (!z) {
            return false;
        }
        C3865.C3868 c3868 = this.f11918;
        if (c3868 != null) {
            C3865 c3865 = C3865.this;
            if (c3865.f11946.f11966) {
                if (!c3865.f11950) {
                    long j2 = c3865.f11948;
                    if (j2 != -9223372036854775807L && j2 < abstractC3836.f11810) {
                        c3865.m6261();
                    }
                    z2 = false;
                    if (z2) {
                        return true;
                    }
                }
                z2 = true;
                if (z2) {
                }
            } else {
                z2 = false;
                if (z2) {
                }
            }
        }
        if (!this.f11921.f11966 && (abstractC3836 instanceof AbstractC3848) && (exc instanceof HttpDataSource.InvalidResponseCodeException) && ((HttpDataSource.InvalidResponseCodeException) exc).f1975 == 404 && (iM6255 = (c3862 = this.f11919[this.f11920.mo6474(abstractC3836.f11807)]).m6255()) != -1 && iM6255 != 0) {
            if (((AbstractC3848) abstractC3836).mo6233() > (c3862.m6251() + ((long) iM6255)) - 1) {
                this.f11924 = true;
                return true;
            }
        }
        if (j == -9223372036854775807L) {
            return false;
        }
        InterfaceC4036 interfaceC4036 = this.f11920;
        return interfaceC4036.mo6476(interfaceC4036.mo6474(abstractC3836.f11807), j);
    }

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public final ArrayList<AbstractC3878> m6250() {
        List<C3869> list = this.f11921.m6263(this.f11922).f11995;
        ArrayList<AbstractC3878> arrayList = new ArrayList<>();
        for (int i : this.f11913) {
            arrayList.addAll(list.get(i).f11960);
        }
        return arrayList;
    }
}
