package defpackage;

import androidx.media3.exoplayer.drm.DrmSession$DrmSessionException;
import j$.util.DesugarCollections;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/* JADX INFO: renamed from: ᵮᵣᵰ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes3.dex */
public final class C4245 implements InterfaceC4833, InterfaceC1137, InterfaceC4051, InterfaceC1158 {

    /* JADX INFO: renamed from: ʽᵡᵢᵾ, reason: contains not printable characters */
    public int f16175;

    /* JADX INFO: renamed from: ʿٴˇ, reason: contains not printable characters */
    public final ArrayList f16176;

    /* JADX INFO: renamed from: ˀᵭ, reason: contains not printable characters */
    public final C0767 f16177;

    /* JADX INFO: renamed from: ˁʢᵛ, reason: contains not printable characters */
    public boolean f16178;

    /* JADX INFO: renamed from: ˁˌᵩ, reason: contains not printable characters */
    public final C0890[] f16179;

    /* JADX INFO: renamed from: ˈᵲᵢ, reason: contains not printable characters */
    public final C1404 f16180;

    /* JADX INFO: renamed from: ˈⁱᵡ, reason: contains not printable characters */
    public AbstractC0041 f16181;

    /* JADX INFO: renamed from: ˉᵵᵜ, reason: contains not printable characters */
    public final C0890 f16182;

    /* JADX INFO: renamed from: ˊˌˊ, reason: contains not printable characters */
    public boolean f16183;

    /* JADX INFO: renamed from: ˊᵡᵗʨ, reason: contains not printable characters */
    public C5286 f16184;

    /* JADX INFO: renamed from: ˊᵾʽʼ, reason: contains not printable characters */
    public AbstractC1900 f16185;

    /* JADX INFO: renamed from: ˌᴵ, reason: contains not printable characters */
    public final int f16186;

    /* JADX INFO: renamed from: ˌᵨʠᵫ, reason: contains not printable characters */
    public final C1013 f16187;

    /* JADX INFO: renamed from: ˑʢ, reason: contains not printable characters */
    public long f16188;

    /* JADX INFO: renamed from: ˑˊᵲ, reason: contains not printable characters */
    public final C5559 f16189;

    /* JADX INFO: renamed from: ᵔᵖᵹᵫ, reason: contains not printable characters */
    public final C5286[] f16190;

    /* JADX INFO: renamed from: ᵛˑﹳ, reason: contains not printable characters */
    public C2523 f16191;

    /* JADX INFO: renamed from: ᵜᵪʾ, reason: contains not printable characters */
    public final int[] f16192;

    /* JADX INFO: renamed from: ᵞᵛᵘ, reason: contains not printable characters */
    public boolean f16193;

    /* JADX INFO: renamed from: ᵠˏˏ, reason: contains not printable characters */
    public final List f16194;

    /* JADX INFO: renamed from: ᵨˈʼﹶ, reason: contains not printable characters */
    public boolean f16195;

    /* JADX INFO: renamed from: ᵨᵼⁱ, reason: contains not printable characters */
    public final boolean[] f16196;

    /* JADX INFO: renamed from: ᵯᵷʽ, reason: contains not printable characters */
    public final InterfaceC0968 f16197;

    /* JADX INFO: renamed from: ᵵᵬᵽ, reason: contains not printable characters */
    public long f16198;

    /* JADX INFO: renamed from: ᵶˇᵱ, reason: contains not printable characters */
    public final InterfaceC4108 f16199;

    /* JADX INFO: renamed from: ᵸˆˁ, reason: contains not printable characters */
    public final ᵣˊˈᵪ f16200;

    public C4245(int i, int[] iArr, C5286[] c5286Arr, InterfaceC0968 interfaceC0968, InterfaceC4108 interfaceC4108, ᵣˊˈᵪ r14, long j, InterfaceC4636 interfaceC4636, C3317 c3317, C1013 c1013, C1404 c1404, boolean z, long j2, ExecutorC1728 executorC1728) {
        this.f16186 = i;
        iArr = iArr == null ? new int[0] : iArr;
        this.f16192 = iArr;
        this.f16190 = c5286Arr == null ? new C5286[0] : c5286Arr;
        this.f16197 = interfaceC0968;
        this.f16199 = interfaceC4108;
        this.f16180 = c1404;
        this.f16187 = c1013;
        this.f16200 = executorC1728 != null ? new ᵣˊˈᵪ(executorC1728) : new ᵣˊˈᵪ(2, "ChunkSampleStream");
        this.f16189 = new C5559();
        ArrayList arrayList = new ArrayList();
        this.f16176 = arrayList;
        this.f16194 = DesugarCollections.unmodifiableList(arrayList);
        int length = iArr.length;
        this.f16179 = new C0890[length];
        this.f16196 = new boolean[length];
        int i2 = length + 1;
        int[] iArr2 = new int[i2];
        C0890[] c0890Arr = new C0890[i2];
        interfaceC4636.getClass();
        C0890 c0890 = new C0890(r14, interfaceC4636, c3317);
        this.f16182 = c0890;
        iArr2[0] = i;
        c0890Arr[0] = c0890;
        int i3 = 0;
        while (i3 < length) {
            C0890 c08902 = new C0890(r14, null, null);
            this.f16179[i3] = c08902;
            int i4 = i3 + 1;
            c0890Arr[i4] = c08902;
            iArr2[i4] = this.f16192[i3];
            i3 = i4;
        }
        this.f16177 = new C0767(8, iArr2, c0890Arr, z);
        this.f16198 = j;
        this.f16188 = j;
        this.f16195 = z;
        if (!z || j2 == -9223372036854775807L) {
            return;
        }
        this.f16195 = false;
        this.f16193 = j2 < j;
    }

    @Override // defpackage.InterfaceC4833
    /* JADX INFO: renamed from: ʽˈˋ */
    public final void mo1983() throws DrmSession$DrmSessionException {
        ᵣˊˈᵪ r0 = this.f16200;
        r0.ʽˈˋ();
        this.f16182.m3104();
        if (r0.ᵠˏˏ()) {
            return;
        }
        this.f16197.mo3281();
    }

    /* JADX INFO: renamed from: ˈᵲᵢ, reason: contains not printable characters */
    public final int m9213(int i, int i2) {
        ArrayList arrayList;
        do {
            i2++;
            arrayList = this.f16176;
            if (i2 >= arrayList.size()) {
                return arrayList.size() - 1;
            }
        } while (((AbstractC0041) arrayList.get(i2)).m1026(0) <= i);
        return i2 - 1;
    }

    @Override // defpackage.InterfaceC1137
    /* JADX INFO: renamed from: ˉᵲ */
    public final boolean mo3622(C2348 c2348) {
        long j;
        List list;
        if (!this.f16178) {
            ᵣˊˈᵪ r0 = this.f16200;
            if (!r0.ᵠˏˏ() && !r0.ˑˊᵲ()) {
                boolean zM9218 = m9218();
                if (zM9218) {
                    list = Collections.EMPTY_LIST;
                    j = this.f16198;
                } else {
                    j = m9215().f7528;
                    list = this.f16194;
                }
                this.f16197.mo3287(c2348, j, list, this.f16189);
                C5559 c5559 = this.f16189;
                boolean z = c5559.f20983;
                AbstractC1900 abstractC1900 = (AbstractC1900) c5559.f20984;
                c5559.f20984 = null;
                c5559.f20983 = false;
                if (z) {
                    this.f16198 = -9223372036854775807L;
                    this.f16178 = true;
                    return true;
                }
                if (abstractC1900 != null) {
                    this.f16185 = abstractC1900;
                    boolean z2 = abstractC1900 instanceof AbstractC0041;
                    C0767 c0767 = this.f16177;
                    if (z2) {
                        AbstractC0041 abstractC0041 = (AbstractC0041) abstractC1900;
                        if (zM9218) {
                            long j2 = abstractC0041.f7526;
                            long j3 = this.f16198;
                            if (j2 < j3) {
                                this.f16182.f3926 = j3;
                                for (C0890 c0890 : this.f16179) {
                                    c0890.f3926 = this.f16198;
                                }
                                this.f16193 = this.f16195;
                            }
                            this.f16195 = false;
                            this.f16198 = -9223372036854775807L;
                        }
                        abstractC0041.f1197 = c0767;
                        C0890[] c0890Arr = (C0890[]) c0767.f3432;
                        int[] iArr = new int[c0890Arr.length];
                        for (int i = 0; i < c0890Arr.length; i++) {
                            C0890 c08902 = c0890Arr[i];
                            iArr[i] = c08902.f3939 + c08902.f3932;
                        }
                        abstractC0041.f1196 = iArr;
                        this.f16176.add(abstractC0041);
                    } else if (abstractC1900 instanceof C3907) {
                        ((C3907) abstractC1900).f14927 = c0767;
                    }
                    r0.ᵵᵬᵽ(abstractC1900, this, this.f16187.m3345(abstractC1900.f7529));
                    return true;
                }
            }
        }
        return false;
    }

    /* JADX INFO: renamed from: ˊᵙᵾᵲ, reason: contains not printable characters */
    public final AbstractC0041 m9214(int i) {
        ArrayList arrayList = this.f16176;
        AbstractC0041 abstractC0041 = (AbstractC0041) arrayList.get(i);
        AbstractC0956.m3252(arrayList, i, arrayList.size());
        this.f16175 = Math.max(this.f16175, arrayList.size());
        int i2 = 0;
        this.f16182.m3114(abstractC0041.m1026(0));
        while (true) {
            C0890[] c0890Arr = this.f16179;
            if (i2 >= c0890Arr.length) {
                return abstractC0041;
            }
            C0890 c0890 = c0890Arr[i2];
            i2++;
            c0890.m3114(abstractC0041.m1026(i2));
        }
    }

    /* JADX INFO: renamed from: ˊᵨᵧ, reason: contains not printable characters */
    public final AbstractC0041 m9215() {
        return (AbstractC0041) AbstractC3653.m8235(1, this.f16176);
    }

    @Override // defpackage.InterfaceC4051
    /* JADX INFO: renamed from: ˊᵫᵗ */
    public final void mo5223(InterfaceC1933 interfaceC1933, long j, long j2, boolean z) {
        AbstractC1900 abstractC1900 = (AbstractC1900) interfaceC1933;
        this.f16185 = null;
        this.f16181 = null;
        long j3 = abstractC1900.f7527;
        C0084 c0084 = abstractC1900.f7530;
        C0165 c0165 = abstractC1900.f7534;
        C3622 c3622 = new C3622(c0084, c0165.f1575, c0165.f1577, j, j2, c0165.f1576);
        this.f16187.getClass();
        this.f16180.m4045(c3622, abstractC1900.f7529, this.f16186, abstractC1900.f7531, abstractC1900.f7532, abstractC1900.f7533, abstractC1900.f7526, abstractC1900.f7528);
        if (z) {
            return;
        }
        if (m9218()) {
            this.f16182.m3096(false);
            for (C0890 c0890 : this.f16179) {
                c0890.m3096(false);
            }
        } else if (abstractC1900 instanceof AbstractC0041) {
            ArrayList arrayList = this.f16176;
            m9214(arrayList.size() - 1);
            if (arrayList.isEmpty()) {
                this.f16198 = this.f16188;
            }
        }
        this.f16199.mo3794(this);
    }

    @Override // defpackage.InterfaceC1137
    /* JADX INFO: renamed from: ˌᴵ */
    public final void mo3623(long j) {
        ᵣˊˈᵪ r0 = this.f16200;
        if (r0.ˑˊᵲ() || m9218()) {
            return;
        }
        boolean z = r0.ᵠˏˏ();
        List list = this.f16194;
        InterfaceC0968 interfaceC0968 = this.f16197;
        ArrayList arrayList = this.f16176;
        if (z) {
            AbstractC1900 abstractC1900 = this.f16185;
            abstractC1900.getClass();
            boolean z2 = abstractC1900 instanceof AbstractC0041;
            if (!(z2 && m9219(arrayList.size() - 1)) && interfaceC0968.mo3288(j, abstractC1900, list)) {
                r0.ᵟᵹᵙ();
                if (z2) {
                    this.f16181 = (AbstractC0041) abstractC1900;
                    return;
                }
                return;
            }
            return;
        }
        int iMo3282 = interfaceC0968.mo3282(j, list);
        if (iMo3282 < arrayList.size()) {
            ᵻᵪ.ˌᴵ(!r0.ᵠˏˏ());
            int size = arrayList.size();
            while (true) {
                if (iMo3282 >= size) {
                    iMo3282 = -1;
                    break;
                } else if (!m9219(iMo3282)) {
                    break;
                } else {
                    iMo3282++;
                }
            }
            if (iMo3282 != -1) {
                long j2 = m9215().f7528;
                AbstractC0041 abstractC0041M9214 = m9214(iMo3282);
                if (arrayList.isEmpty()) {
                    this.f16198 = this.f16188;
                }
                this.f16178 = false;
                this.f16180.m4050(abstractC0041M9214.f7526, this.f16186, j2);
            }
        }
        if (this.f16182.m3116()) {
            this.f16178 = true;
        }
    }

    /* JADX INFO: renamed from: ˌᵨʠᵫ, reason: contains not printable characters */
    public final void m9216(C2523 c2523) {
        this.f16191 = c2523;
        C0890 c0890 = this.f16182;
        c0890.m3115();
        InterfaceC4417 interfaceC4417 = c0890.f3922;
        if (interfaceC4417 != null) {
            interfaceC4417.mo4235(c0890.f3934);
            c0890.f3922 = null;
            c0890.f3942 = null;
        }
        for (C0890 c08902 : this.f16179) {
            c08902.m3115();
            InterfaceC4417 interfaceC44172 = c08902.f3922;
            if (interfaceC44172 != null) {
                interfaceC44172.mo4235(c08902.f3934);
                c08902.f3922 = null;
                c08902.f3942 = null;
            }
        }
        this.f16200.ˊᵾʽʼ(this);
    }

    @Override // defpackage.InterfaceC1137
    /* JADX INFO: renamed from: ˏːˆ */
    public final long mo3624() {
        if (this.f16178) {
            return Long.MIN_VALUE;
        }
        if (m9218()) {
            return this.f16198;
        }
        long jMax = this.f16188;
        AbstractC0041 abstractC0041M9215 = m9215();
        if (!abstractC0041M9215.mo3272()) {
            ArrayList arrayList = this.f16176;
            abstractC0041M9215 = arrayList.size() > 1 ? (AbstractC0041) AbstractC3653.m8235(2, arrayList) : null;
        }
        if (abstractC0041M9215 != null) {
            jMax = Math.max(jMax, abstractC0041M9215.f7528);
        }
        return Math.max(jMax, this.f16182.m3095());
    }

    /* JADX INFO: renamed from: ˑˊᵲ, reason: contains not printable characters */
    public final void m9217(long j) throws Throwable {
        this.f16182.m3098(j);
        for (C0890 c0890 : this.f16179) {
            c0890.m3098(j);
        }
    }

    /* JADX INFO: renamed from: ᵔᵖᵹᵫ, reason: contains not printable characters */
    public final boolean m9218() {
        return this.f16198 != -9223372036854775807L;
    }

    /* JADX INFO: renamed from: ᵜᵪʾ, reason: contains not printable characters */
    public final boolean m9219(int i) {
        int iM3103;
        AbstractC0041 abstractC0041 = (AbstractC0041) this.f16176.get(i);
        if (this.f16182.m3103() > abstractC0041.m1026(0)) {
            return true;
        }
        int i2 = 0;
        do {
            C0890[] c0890Arr = this.f16179;
            if (i2 >= c0890Arr.length) {
                return false;
            }
            iM3103 = c0890Arr[i2].m3103();
            i2++;
        } while (iM3103 <= abstractC0041.m1026(i2));
        return true;
    }

    @Override // defpackage.InterfaceC4833
    /* JADX INFO: renamed from: ᵝᵶ */
    public final int mo1984(ˊˊᵞᵽ r4, C3008 c3008, int i) {
        if (m9218() || m9220() || this.f16183) {
            return -3;
        }
        AbstractC0041 abstractC0041 = this.f16181;
        C0890 c0890 = this.f16182;
        if (abstractC0041 != null && abstractC0041.m1026(0) <= c0890.m3103()) {
            return -3;
        }
        m9221();
        return c0890.m3091(r4, c3008, i, this.f16178);
    }

    /* JADX INFO: renamed from: ᵨᵼⁱ, reason: contains not printable characters */
    public final boolean m9220() {
        return ((!this.f16195 && !this.f16193) || this.f16178 || this.f16200.ˑˊᵲ()) ? false : true;
    }

    @Override // defpackage.InterfaceC1137
    /* JADX INFO: renamed from: ᵮᵣᵗˈ */
    public final boolean mo3625() {
        return this.f16200.ᵠˏˏ();
    }

    /* JADX INFO: renamed from: ᵯᵷʽ, reason: contains not printable characters */
    public final void m9221() {
        int iM9213 = m9213(this.f16182.m3103(), this.f16175 - 1);
        while (true) {
            int i = this.f16175;
            if (i > iM9213) {
                return;
            }
            this.f16175 = i + 1;
            AbstractC0041 abstractC0041 = (AbstractC0041) this.f16176.get(i);
            C5286 c5286 = abstractC0041.f7531;
            if (!c5286.equals(this.f16184)) {
                this.f16180.m4046(this.f16186, c5286, abstractC0041.f7532, abstractC0041.f7533, abstractC0041.f7526);
            }
            this.f16184 = c5286;
        }
    }

    @Override // defpackage.InterfaceC4051
    /* JADX INFO: renamed from: ᵱʡˏ */
    public final void mo5226(InterfaceC1933 interfaceC1933, long j, long j2) {
        AbstractC1900 abstractC1900 = (AbstractC1900) interfaceC1933;
        this.f16185 = null;
        this.f16197.mo3284(abstractC1900);
        long j3 = abstractC1900.f7527;
        C0084 c0084 = abstractC1900.f7530;
        C0165 c0165 = abstractC1900.f7534;
        C3622 c3622 = new C3622(c0084, c0165.f1575, c0165.f1577, j, j2, c0165.f1576);
        this.f16187.getClass();
        this.f16180.m4028(c3622, abstractC1900.f7529, this.f16186, abstractC1900.f7531, abstractC1900.f7532, abstractC1900.f7533, abstractC1900.f7526, abstractC1900.f7528);
        this.f16199.mo3794(this);
    }

    /* JADX INFO: renamed from: ᵱᵽʡᵚ, reason: contains not printable characters */
    public final void m9222(long j) throws Throwable {
        long j2;
        if (m9218()) {
            return;
        }
        C0890 c0890 = this.f16182;
        int i = c0890.f3939;
        c0890.m3120(true, j);
        C0890 c08902 = this.f16182;
        int i2 = c08902.f3939;
        if (i2 > i) {
            synchronized (c08902) {
                j2 = c08902.f3932 == 0 ? Long.MIN_VALUE : c08902.f3923[c08902.f3920];
            }
            int i3 = 0;
            while (true) {
                C0890[] c0890Arr = this.f16179;
                if (i3 >= c0890Arr.length) {
                    break;
                }
                c0890Arr[i3].m3120(this.f16196[i3], j2);
                i3++;
            }
        }
        int iMin = Math.min(m9213(i2, 0), this.f16175);
        if (iMin > 0) {
            AbstractC0956.m3252(this.f16176, 0, iMin);
            this.f16175 -= iMin;
        }
    }

    @Override // defpackage.InterfaceC4833
    /* JADX INFO: renamed from: ᵲᵶᵳˈ */
    public final boolean mo1985() {
        return !m9218() && this.f16182.m3119(this.f16178);
    }

    @Override // defpackage.InterfaceC4051
    /* JADX INFO: renamed from: ᵵᵬᵽ */
    public final C0655 mo5228(InterfaceC1933 interfaceC1933, long j, long j2, IOException iOException, int i) {
        C0655 c0655;
        AbstractC1900 abstractC1900 = (AbstractC1900) interfaceC1933;
        long j3 = abstractC1900.f7534.f1576;
        boolean z = abstractC1900 instanceof AbstractC0041;
        ArrayList arrayList = this.f16176;
        int size = arrayList.size() - 1;
        boolean z2 = (j3 != 0 && z && m9219(size)) ? false : true;
        C0084 c0084 = abstractC1900.f7530;
        C0165 c0165 = abstractC1900.f7534;
        boolean z3 = z2;
        C3622 c3622 = new C3622(c0084, c0165.f1575, c0165.f1577, j, j2, j3);
        AbstractC0956.m3264(abstractC1900.f7526);
        AbstractC0956.m3264(abstractC1900.f7528);
        C1785 c1785 = new C1785(i, 5, iOException);
        InterfaceC0968 interfaceC0968 = this.f16197;
        C1013 c1013 = this.f16187;
        if (!interfaceC0968.mo3286(abstractC1900, z3, c1785, c1013)) {
            c0655 = null;
        } else if (z3) {
            c0655 = ᵣˊˈᵪ.ˌᵨʠᵫ;
            if (z) {
                ᵻᵪ.ˌᴵ(m9214(size) == abstractC1900);
                if (arrayList.isEmpty()) {
                    this.f16198 = this.f16188;
                }
            }
        } else {
            ˋˀᵧ.ʿٴˇ("Ignoring attempt to cancel non-cancelable load.");
            c0655 = null;
        }
        if (c0655 == null) {
            long jM3346 = c1013.m3346(c1785);
            c0655 = jM3346 != -9223372036854775807L ? new C0655(0, jM3346, false) : ᵣˊˈᵪ.ᵸˆˁ;
        }
        boolean zM2396 = c0655.m2396();
        this.f16180.m4035(c3622, abstractC1900.f7529, this.f16186, abstractC1900.f7531, abstractC1900.f7532, abstractC1900.f7533, abstractC1900.f7526, abstractC1900.f7528, iOException, !zM2396);
        if (!zM2396) {
            this.f16185 = null;
            c1013.getClass();
            this.f16199.mo3794(this);
        }
        return c0655;
    }

    @Override // defpackage.InterfaceC4051
    /* JADX INFO: renamed from: ᵶˇᵱ */
    public final void mo5230(InterfaceC1933 interfaceC1933, long j, long j2, int i) {
        C3622 c3622;
        AbstractC1900 abstractC1900 = (AbstractC1900) interfaceC1933;
        if (i == 0) {
            long j3 = abstractC1900.f7527;
            c3622 = new C3622(abstractC1900.f7530, j);
        } else {
            long j4 = abstractC1900.f7527;
            C0084 c0084 = abstractC1900.f7530;
            C0165 c0165 = abstractC1900.f7534;
            c3622 = new C3622(c0084, c0165.f1575, c0165.f1577, j, j2, c0165.f1576);
        }
        this.f16180.m4037(c3622, abstractC1900.f7529, this.f16186, abstractC1900.f7531, abstractC1900.f7532, abstractC1900.f7533, abstractC1900.f7526, abstractC1900.f7528, i);
    }

    @Override // defpackage.InterfaceC4833
    /* JADX INFO: renamed from: ᵶᵥᵝ */
    public final int mo1986(long j) {
        if (m9218() || m9220() || this.f16183) {
            return 0;
        }
        boolean z = this.f16178;
        C0890 c0890 = this.f16182;
        int iM3107 = c0890.m3107(z, j);
        AbstractC0041 abstractC0041 = this.f16181;
        if (abstractC0041 != null) {
            iM3107 = Math.min(iM3107, abstractC0041.m1026(0) - c0890.m3103());
        }
        c0890.m3108(iM3107);
        m9221();
        return iM3107;
    }

    @Override // defpackage.InterfaceC1158
    /* JADX INFO: renamed from: ᵷᵺʾᵖ */
    public final void mo3639() {
        this.f16182.m3112();
        for (C0890 c0890 : this.f16179) {
            c0890.m3112();
        }
        this.f16197.mo3285();
        C2523 c2523 = this.f16191;
        if (c2523 != null) {
            synchronized (c2523) {
                C2676 c2676 = (C2676) c2523.f9746.remove(this);
                if (c2676 != null) {
                    c2676.f10340.m3112();
                }
            }
        }
    }

    /* JADX INFO: renamed from: ᵸˆˁ, reason: contains not printable characters */
    public final void m9223(long j) throws Throwable {
        ArrayList arrayList;
        AbstractC0041 abstractC0041;
        boolean zM3101;
        AbstractC0041 abstractC00412;
        this.f16188 = j;
        int i = 0;
        this.f16195 = false;
        this.f16193 = false;
        if (m9218()) {
            this.f16198 = j;
            return;
        }
        int i2 = 0;
        while (true) {
            arrayList = this.f16176;
            if (i2 >= arrayList.size()) {
                break;
            }
            abstractC0041 = (AbstractC0041) arrayList.get(i2);
            long j2 = abstractC0041.f7526;
            if (j2 == j && abstractC0041.f1195 == -9223372036854775807L) {
                break;
            } else if (j2 > j) {
                break;
            } else {
                i2++;
            }
        }
        abstractC0041 = null;
        C0890 c0890 = this.f16182;
        if (abstractC0041 != null) {
            zM3101 = c0890.m3092(abstractC0041.m1026(0));
        } else {
            long jMo3626 = mo3626();
            zM3101 = c0890.m3101(jMo3626 == Long.MIN_VALUE || j < jMo3626, j);
        }
        if (zM3101 && (abstractC00412 = this.f16181) != null && abstractC00412.m1026(0) <= c0890.m3103()) {
            zM3101 = false;
        }
        C0890[] c0890Arr = this.f16179;
        if (zM3101) {
            this.f16175 = m9213(c0890.m3103(), 0);
            int length = c0890Arr.length;
            while (i < length) {
                c0890Arr[i].m3101(true, j);
                i++;
            }
            return;
        }
        this.f16198 = j;
        this.f16178 = false;
        arrayList.clear();
        this.f16175 = 0;
        ᵣˊˈᵪ r10 = this.f16200;
        if (r10.ᵠˏˏ()) {
            c0890.m3115();
            int length2 = c0890Arr.length;
            while (i < length2) {
                c0890Arr[i].m3115();
                i++;
            }
            r10.ᵟᵹᵙ();
            return;
        }
        r10.ᵨᵼⁱ = null;
        c0890.m3096(false);
        for (C0890 c08902 : c0890Arr) {
            c08902.m3096(false);
        }
    }

    @Override // defpackage.InterfaceC1137
    /* JADX INFO: renamed from: ᵻˈᵦʼ */
    public final long mo3626() {
        if (m9218()) {
            return this.f16198;
        }
        if (this.f16178) {
            return Long.MIN_VALUE;
        }
        return m9215().f7528;
    }
}
