package p138.p176.p177.p190;

import android.os.Handler;
import android.os.HandlerThread;
import android.os.Message;
import android.os.SystemClock;
import android.util.Log;
import android.util.Pair;
import com.google.android.exoplayer2.ExoPlaybackException;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.concurrent.atomic.AtomicBoolean;
import p000.p001.p002.p003.p004.C0567;
import p138.p139.p143.p144.C2803;
import p138.p176.p177.p190.AbstractC3457;
import p138.p176.p177.p190.C3418;
import p138.p176.p177.p190.C3446;
import p138.p176.p177.p190.p217.C3829;
import p138.p176.p177.p190.p217.InterfaceC3798;
import p138.p176.p177.p190.p217.InterfaceC3800;
import p138.p176.p177.p190.p217.InterfaceC3823;
import p138.p176.p177.p190.p217.InterfaceC3824;
import p138.p176.p177.p190.p235.AbstractC4043;
import p138.p176.p177.p190.p235.C4045;
import p138.p176.p177.p190.p235.InterfaceC4036;
import p138.p176.p177.p190.p238.InterfaceC4089;
import p138.p176.p177.p190.p238.InterfaceC4090;
import p138.p176.p177.p190.p239.C4131;
import p138.p176.p177.p190.p239.C4145;
import p138.p176.p177.p190.p239.C4147;
import p138.p176.p177.p190.p239.C4150;
import p138.p176.p177.p190.p239.InterfaceC4120;
import p138.p176.p177.p190.p239.InterfaceC4133;

/* JADX INFO: renamed from: ދ.ހ.֏.ؠ.ޘ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes.dex */
public final class C3424 implements Handler.Callback, InterfaceC3798.InterfaceC3799, AbstractC4043.InterfaceC4044, InterfaceC3800.InterfaceC3802, C3418.InterfaceC3419, C3446.InterfaceC3447 {

    /* JADX INFO: renamed from: ރ, reason: contains not printable characters */
    public final InterfaceC3450[] f10033;

    /* JADX INFO: renamed from: ބ, reason: contains not printable characters */
    public final AbstractC3413[] f10034;

    /* JADX INFO: renamed from: ޅ, reason: contains not printable characters */
    public final AbstractC4043 f10035;

    /* JADX INFO: renamed from: ކ, reason: contains not printable characters */
    public final C4045 f10036;

    /* JADX INFO: renamed from: އ, reason: contains not printable characters */
    public final InterfaceC3434 f10037;

    /* JADX INFO: renamed from: ވ, reason: contains not printable characters */
    public final InterfaceC4090 f10038;

    /* JADX INFO: renamed from: މ, reason: contains not printable characters */
    public final C4147 f10039;

    /* JADX INFO: renamed from: ފ, reason: contains not printable characters */
    public final HandlerThread f10040;

    /* JADX INFO: renamed from: ދ, reason: contains not printable characters */
    public final Handler f10041;

    /* JADX INFO: renamed from: ތ, reason: contains not printable characters */
    public final AbstractC3457.C3460 f10042;

    /* JADX INFO: renamed from: ލ, reason: contains not printable characters */
    public final AbstractC3457.C3459 f10043;

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

    /* JADX INFO: renamed from: ޏ, reason: contains not printable characters */
    public final boolean f10045;

    /* JADX INFO: renamed from: ސ, reason: contains not printable characters */
    public final C3418 f10046;

    /* JADX INFO: renamed from: ޒ, reason: contains not printable characters */
    public final ArrayList<C3427> f10048;

    /* JADX INFO: renamed from: ޓ, reason: contains not printable characters */
    public final InterfaceC4120 f10049;

    /* JADX INFO: renamed from: ޖ, reason: contains not printable characters */
    public C3438 f10052;

    /* JADX INFO: renamed from: ޗ, reason: contains not printable characters */
    public InterfaceC3800 f10053;

    /* JADX INFO: renamed from: ޘ, reason: contains not printable characters */
    public InterfaceC3450[] f10054;

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

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

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

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

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

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

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

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

    /* JADX INFO: renamed from: ޡ, reason: contains not printable characters */
    public C3429 f10063;

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

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

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

    /* JADX INFO: renamed from: ޔ, reason: contains not printable characters */
    public final C3437 f10050 = new C3437();

    /* JADX INFO: renamed from: ޕ, reason: contains not printable characters */
    public C3453 f10051 = C3453.f10182;

    /* JADX INFO: renamed from: ޑ, reason: contains not printable characters */
    public final C3428 f10047 = new C3428(null);

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

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

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

        public C3426(InterfaceC3800 interfaceC3800, AbstractC3457 abstractC3457) {
            this.f10067 = interfaceC3800;
            this.f10068 = abstractC3457;
        }
    }

    /* JADX INFO: renamed from: ދ.ހ.֏.ؠ.ޘ$ހ, reason: contains not printable characters */
    public static final class C3427 implements Comparable<C3427> {

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

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

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

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

        public C3427(C3446 c3446) {
            this.f10069 = c3446;
        }

        @Override // java.lang.Comparable
        public int compareTo(C3427 c3427) {
            C3427 c34272 = c3427;
            if ((this.f10072 == null) != (c34272.f10072 == null)) {
                return this.f10072 != null ? -1 : 1;
            }
            if (this.f10072 == null) {
                return 0;
            }
            int i = this.f10070 - c34272.f10070;
            return i != 0 ? i : C4150.m6784(this.f10071, c34272.f10071);
        }
    }

    /* JADX INFO: renamed from: ދ.ހ.֏.ؠ.ޘ$ށ, reason: contains not printable characters */
    public static final class C3428 {

        /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
        public C3438 f10073;

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

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

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

        public /* synthetic */ C3428(C3425 c3425) {
        }

        /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
        public void m5575(int i) {
            this.f10074 += i;
        }

        /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
        public void m5576(int i) {
            if (this.f10075 && this.f10076 != 4) {
                C0567.m1896(i == 4);
            } else {
                this.f10075 = true;
                this.f10076 = i;
            }
        }
    }

    /* JADX INFO: renamed from: ދ.ހ.֏.ؠ.ޘ$ނ, reason: contains not printable characters */
    public static final class C3429 {

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

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

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

        public C3429(AbstractC3457 abstractC3457, int i, long j) {
            this.f10077 = abstractC3457;
            this.f10078 = i;
            this.f10079 = j;
        }
    }

    public C3424(InterfaceC3450[] interfaceC3450Arr, AbstractC4043 abstractC4043, C4045 c4045, InterfaceC3434 interfaceC3434, InterfaceC4090 interfaceC4090, boolean z, int i, boolean z2, Handler handler, InterfaceC4120 interfaceC4120) {
        this.f10033 = interfaceC3450Arr;
        this.f10035 = abstractC4043;
        this.f10036 = c4045;
        this.f10037 = interfaceC3434;
        this.f10038 = interfaceC4090;
        this.f10056 = z;
        this.f10059 = i;
        this.f10060 = z2;
        this.f10041 = handler;
        this.f10049 = interfaceC4120;
        this.f10044 = interfaceC3434.mo5469();
        this.f10045 = interfaceC3434.mo5463();
        this.f10052 = C3438.m5625(-9223372036854775807L, c4045);
        this.f10034 = new AbstractC3413[interfaceC3450Arr.length];
        for (int i2 = 0; i2 < interfaceC3450Arr.length; i2++) {
            interfaceC3450Arr[i2].mo5442(i2);
            this.f10034[i2] = interfaceC3450Arr[i2].mo5456();
        }
        this.f10046 = new C3418(this, interfaceC4120);
        this.f10048 = new ArrayList<>();
        this.f10054 = new InterfaceC3450[0];
        this.f10042 = new AbstractC3457.C3460();
        this.f10043 = new AbstractC3457.C3459();
        abstractC4043.f12842 = this;
        abstractC4043.f12843 = interfaceC4090;
        HandlerThread handlerThread = new HandlerThread("ExoPlayerImplInternal:Handler", -16);
        this.f10040 = handlerThread;
        handlerThread.start();
        this.f10039 = interfaceC4120.mo6618(this.f10040.getLooper(), this);
        this.f10066 = true;
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static C3431[] m5521(InterfaceC4036 interfaceC4036) {
        int length = interfaceC4036 != null ? interfaceC4036.length() : 0;
        C3431[] c3431Arr = new C3431[length];
        for (int i = 0; i < length; i++) {
            c3431Arr[i] = interfaceC4036.mo6475(i);
        }
        return c3431Arr;
    }

    /* JADX WARN: Removed duplicated region for block: B:60:0x00c9  */
    /* JADX WARN: Removed duplicated region for block: B:61:0x00d1  */
    @Override // android.os.Handler.Callback
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public boolean handleMessage(Message message) throws Throwable {
        String str;
        String string;
        try {
            switch (message.what) {
                case 0:
                    m5540((InterfaceC3800) message.obj, message.arg1 != 0, message.arg2 != 0);
                    break;
                case 1:
                    m5557(message.arg1 != 0);
                    break;
                case 2:
                    m5528();
                    break;
                case 3:
                    m5532((C3429) message.obj);
                    break;
                case 4:
                    m5534((C3439) message.obj);
                    break;
                case 5:
                    this.f10051 = (C3453) message.obj;
                    break;
                case 6:
                    m5544(false, message.arg1 != 0, true);
                    break;
                case 7:
                    m5568();
                    return true;
                case 8:
                    m5531((C3426) message.obj);
                    break;
                case 9:
                    m5556((InterfaceC3798) message.obj);
                    break;
                case 10:
                    m5552((InterfaceC3798) message.obj);
                    break;
                case 11:
                    m5569();
                    break;
                case 12:
                    m5529(message.arg1);
                    break;
                case 13:
                    m5559(message.arg1 != 0);
                    break;
                case 14:
                    m5543(message.arg1 != 0, (AtomicBoolean) message.obj);
                    break;
                case 15:
                    m5558((C3446) message.obj);
                    break;
                case 16:
                    m5563((C3446) message.obj);
                    break;
                case 17:
                    m5535((C3439) message.obj, message.arg1 != 0);
                    break;
                default:
                    return false;
            }
            m5566();
        } catch (ExoPlaybackException e) {
            if (e.f1531 != 1) {
                string = "Playback error.";
            } else {
                StringBuilder sbM4889 = C2803.m4889("Renderer error: index=");
                sbM4889.append(e.f1532);
                sbM4889.append(", type=");
                sbM4889.append(C4150.m6798(this.f10033[e.f1532].mo5455()));
                sbM4889.append(", format=");
                sbM4889.append(e.f1533);
                sbM4889.append(", rendererSupport=");
                int i = e.f1534;
                if (i == 0) {
                    str = "NO";
                } else if (i == 1) {
                    str = "NO_UNSUPPORTED_TYPE";
                } else if (i == 2) {
                    str = "NO_UNSUPPORTED_DRM";
                } else if (i == 3) {
                    str = "NO_EXCEEDS_CAPABILITIES";
                } else {
                    if (i != 4) {
                        throw new IllegalStateException();
                    }
                    str = "YES";
                }
                sbM4889.append(str);
                string = sbM4889.toString();
            }
            C4131.m6645("ExoPlayerImplInternal", string, e);
            m5544(true, false, false);
            this.f10052 = this.f10052.m5626(e);
            m5566();
        } catch (IOException e2) {
            C4131.m6645("ExoPlayerImplInternal", "Source error", e2);
            m5544(false, false, false);
            this.f10052 = this.f10052.m5626(new ExoPlaybackException(0, e2));
            m5566();
        } catch (OutOfMemoryError e3) {
            e = e3;
            C4131.m6645("ExoPlayerImplInternal", "Internal runtime error", e);
            ExoPlaybackException exoPlaybackException = !(e instanceof OutOfMemoryError) ? new ExoPlaybackException(4, (OutOfMemoryError) e) : new ExoPlaybackException(2, (RuntimeException) e);
            m5544(true, false, false);
            this.f10052 = this.f10052.m5626(exoPlaybackException);
            m5566();
        } catch (RuntimeException e4) {
            e = e4;
            C4131.m6645("ExoPlayerImplInternal", "Internal runtime error", e);
            if (!(e instanceof OutOfMemoryError)) {
            }
            m5544(true, false, false);
            this.f10052 = this.f10052.m5626(exoPlaybackException);
            m5566();
        }
        return true;
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public final long m5522(long j) {
        C3435 c3435 = this.f10050.f10144;
        if (c3435 == null) {
            return 0L;
        }
        return Math.max(0L, j - (this.f10064 - c3435.f10128));
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public final long m5523(InterfaceC3800.C3801 c3801, long j, boolean z) throws ExoPlaybackException {
        m5572();
        this.f10057 = false;
        C3438 c3438 = this.f10052;
        if (c3438.f10153 != 1 && !c3438.f10149.m5686()) {
            m5549(2);
        }
        C3435 c3435 = this.f10050.f10142;
        C3435 c3435M5612 = c3435;
        while (true) {
            if (c3435M5612 == null) {
                break;
            }
            if (c3801.equals(c3435M5612.f10120.f10129) && c3435M5612.f10118) {
                this.f10050.m5621(c3435M5612);
                break;
            }
            c3435M5612 = this.f10050.m5612();
        }
        if (z || c3435 != c3435M5612 || (c3435M5612 != null && c3435M5612.f10128 + j < 0)) {
            for (InterfaceC3450 interfaceC3450 : this.f10054) {
                m5537(interfaceC3450);
            }
            this.f10054 = new InterfaceC3450[0];
            c3435 = null;
            if (c3435M5612 != null) {
                c3435M5612.f10128 = 0L;
            }
        }
        if (c3435M5612 != null) {
            m5533(c3435);
            if (c3435M5612.f10119) {
                long jMo6111 = c3435M5612.f10115.mo6111(j);
                c3435M5612.f10115.mo6104(jMo6111 - this.f10044, this.f10045);
                j = jMo6111;
            }
            m5550(j);
            m5565();
        } else {
            this.f10050.m5620(true);
            this.f10052 = this.f10052.m5628(C3829.f11784, this.f10036);
            m5550(j);
        }
        m5542(false);
        this.f10039.m6728(2);
        return j;
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public final Pair<Object, Long> m5524(C3429 c3429, boolean z) {
        Pair<Object, Long> pairM5680;
        Object objM5526;
        AbstractC3457 abstractC3457 = this.f10052.f10149;
        AbstractC3457 abstractC34572 = c3429.f10077;
        if (abstractC3457.m5686()) {
            return null;
        }
        if (abstractC34572.m5686()) {
            abstractC34572 = abstractC3457;
        }
        try {
            pairM5680 = abstractC34572.m5680(this.f10042, this.f10043, c3429.f10078, c3429.f10079);
        } catch (IndexOutOfBoundsException unused) {
        }
        if (abstractC3457 == abstractC34572 || abstractC3457.mo1223(pairM5680.first) != -1) {
            return pairM5680;
        }
        if (z && (objM5526 = m5526(pairM5680.first, abstractC34572, abstractC3457)) != null) {
            return m5525(abstractC3457, abstractC3457.mo1225(abstractC3457.mo1223(objM5526), this.f10043, true).f10225, -9223372036854775807L);
        }
        return null;
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public final Pair<Object, Long> m5525(AbstractC3457 abstractC3457, int i, long j) {
        return abstractC3457.m5680(this.f10042, this.f10043, i, j);
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public final Object m5526(Object obj, AbstractC3457 abstractC3457, AbstractC3457 abstractC34572) {
        int iMo1223 = abstractC3457.mo1223(obj);
        int iMo1227 = abstractC3457.mo1227();
        int iM5679 = iMo1223;
        int iMo12232 = -1;
        for (int i = 0; i < iMo1227 && iMo12232 == -1; i++) {
            iM5679 = abstractC3457.m5679(iM5679, this.f10043, this.f10042, this.f10059, this.f10060);
            if (iM5679 == -1) {
                break;
            }
            iMo12232 = abstractC34572.mo1223(abstractC3457.mo1224(iM5679));
        }
        if (iMo12232 == -1) {
            return null;
        }
        return abstractC34572.mo1224(iMo12232);
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public final C3438 m5527(InterfaceC3800.C3801 c3801, long j, long j2) {
        this.f10066 = true;
        return this.f10052.m5627(c3801, j, j2, m5548());
    }

    /* JADX WARN: Removed duplicated region for block: B:117:0x01de  */
    /* JADX WARN: Removed duplicated region for block: B:131:0x0204  */
    /* JADX WARN: Removed duplicated region for block: B:133:0x0207  */
    /* JADX WARN: Removed duplicated region for block: B:225:0x0353  */
    /* JADX WARN: Removed duplicated region for block: B:230:0x0362  */
    /* JADX WARN: Removed duplicated region for block: B:277:0x0243 A[EDGE_INSN: B:277:0x0243->B:143:0x0243 BREAK  A[LOOP:5: B:114:0x01d9->B:142:0x0239], SYNTHETIC] */
    /* JADX WARN: Removed duplicated region for block: B:43:0x00ae  */
    /* JADX WARN: Removed duplicated region for block: B:59:0x010c  */
    /* JADX WARN: Removed duplicated region for block: B:60:0x0116  */
    /* JADX WARN: Removed duplicated region for block: B:64:0x0121  */
    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final void m5528() throws ExoPlaybackException {
        C3435 c3435;
        boolean z;
        C3437 c3437;
        C3435 c34352;
        C3435 c34353;
        long j;
        boolean z2;
        boolean z3;
        int i;
        long jMo6617 = this.f10049.mo6617();
        InterfaceC3800 interfaceC3800 = this.f10053;
        boolean zM5564 = true;
        if (interfaceC3800 != null) {
            if (this.f10062 > 0) {
                interfaceC3800.mo1210();
            } else {
                this.f10050.m5619(this.f10064);
                C3437 c34372 = this.f10050;
                C3435 c34354 = c34372.f10144;
                if (c34354 == null || (!c34354.f10120.f10135 && c34354.m5609() && c34372.f10144.f10120.f10133 != -9223372036854775807L && c34372.f10145 < 100)) {
                    C3437 c34373 = this.f10050;
                    long j2 = this.f10064;
                    C3438 c3438 = this.f10052;
                    C3435 c34355 = c34373.f10144;
                    C3436 c3436M5617 = c34355 == null ? c34373.m5617(c3438.f10150, c3438.f10152, c3438.f10151) : c34373.m5615(c34355, j2);
                    if (c3436M5617 != null) {
                        C3437 c34374 = this.f10050;
                        AbstractC3413[] abstractC3413Arr = this.f10034;
                        AbstractC4043 abstractC4043 = this.f10035;
                        InterfaceC4089 interfaceC4089Mo5467 = this.f10037.mo5467();
                        InterfaceC3800 interfaceC38002 = this.f10053;
                        C4045 c4045 = this.f10036;
                        C3435 c34356 = c34374.f10144;
                        if (c34356 != null) {
                            j = (c34356.f10128 + c34356.f10120.f10133) - c3436M5617.f10130;
                        } else if (c3436M5617.f10129.m6122()) {
                            j = c3436M5617.f10131;
                            if (j == -9223372036854775807L) {
                                j = 0;
                            }
                        }
                        C3435 c34357 = new C3435(abstractC3413Arr, j, abstractC4043, interfaceC4089Mo5467, interfaceC38002, c3436M5617, c4045);
                        C3435 c34358 = c34374.f10144;
                        if (c34358 == null) {
                            c34374.f10142 = c34357;
                            c34374.f10143 = c34357;
                        } else if (c34357 != c34358.f10125) {
                            c34358.m5606();
                            c34358.f10125 = c34357;
                            c34358.m5607();
                        }
                        c34374.f10146 = null;
                        c34374.f10144 = c34357;
                        c34374.f10145++;
                        c34357.f10115.mo6105(this, c3436M5617.f10130);
                        if (this.f10050.f10142 == c34357) {
                            m5550(c34357.f10120.f10130 + c34357.f10128);
                        }
                        m5542(false);
                        if (this.f10058) {
                        }
                        c3435 = this.f10050.f10143;
                        if (c3435 != null) {
                        }
                        z = false;
                        while (true) {
                            this.f10047.m5576(c3435.f10120.f10134 ? 0 : 3);
                            m5574();
                            z = true;
                        }
                    } else if (this.f10050.f10144 != null) {
                        for (InterfaceC3450 interfaceC3450 : this.f10054) {
                            if (!interfaceC3450.mo5448()) {
                                break;
                            }
                        }
                        this.f10053.mo1210();
                        if (this.f10058) {
                            m5565();
                        } else {
                            this.f10058 = m5562();
                            m5573();
                        }
                        c3435 = this.f10050.f10143;
                        if (c3435 != null) {
                            if (c3435.f10125 == null) {
                                if (c3435.f10120.f10135) {
                                    int i2 = 0;
                                    while (true) {
                                        InterfaceC3450[] interfaceC3450Arr = this.f10033;
                                        if (i2 >= interfaceC3450Arr.length) {
                                            break;
                                        }
                                        InterfaceC3450 interfaceC34502 = interfaceC3450Arr[i2];
                                        InterfaceC3823 interfaceC3823 = c3435.f10117[i2];
                                        if (interfaceC3823 != null && interfaceC34502.mo5449() == interfaceC3823 && interfaceC34502.mo5448()) {
                                            interfaceC34502.mo5450();
                                        }
                                        i2++;
                                    }
                                }
                            } else if (m5560() && c3435.f10125.f10118) {
                                C4045 c40452 = c3435.f10127;
                                C3437 c34375 = this.f10050;
                                C3435 c34359 = c34375.f10143;
                                C0567.m1932((c34359 == null || c34359.f10125 == null) ? false : true);
                                C3435 c343510 = c34375.f10143.f10125;
                                c34375.f10143 = c343510;
                                C4045 c40453 = c343510.f10127;
                                if (c343510.f10115.mo6113() == -9223372036854775807L) {
                                    int i3 = 0;
                                    while (true) {
                                        InterfaceC3450[] interfaceC3450Arr2 = this.f10033;
                                        if (i3 >= interfaceC3450Arr2.length) {
                                            break;
                                        }
                                        InterfaceC3450 interfaceC34503 = interfaceC3450Arr2[i3];
                                        if (c40452.m6504(i3) && !interfaceC34503.mo5453()) {
                                            InterfaceC4036 interfaceC4036 = c40453.f12846.f12829[i3];
                                            boolean zM6504 = c40453.m6504(i3);
                                            boolean z4 = this.f10034[i3].f9961 == 6;
                                            C3451 c3451 = c40452.f12845[i3];
                                            C3451 c34512 = c40453.f12845[i3];
                                            if (zM6504 && c34512.equals(c3451) && !z4) {
                                                interfaceC34503.mo5445(m5521(interfaceC4036), c343510.f10117[i3], c343510.f10128);
                                            } else {
                                                interfaceC34503.mo5450();
                                            }
                                        }
                                        i3++;
                                    }
                                } else {
                                    m5570();
                                }
                            }
                        }
                        z = false;
                        while (true) {
                            if (this.f10056 && (c34352 = (c3437 = this.f10050).f10142) != null && (c34353 = c34352.f10125) != null && (c34352 != c3437.f10143 || m5560()) && this.f10064 >= c34353.f10120.f10130 + c34353.f10128) {
                                break;
                            }
                            if (z) {
                                m5566();
                            }
                            C3437 c34376 = this.f10050;
                            C3435 c343511 = c34376.f10142;
                            if (c343511 == c34376.f10143) {
                                m5570();
                            }
                            C3435 c3435M5612 = this.f10050.m5612();
                            m5533(c343511);
                            C3436 c3436 = c3435M5612.f10120;
                            this.f10052 = m5527(c3436.f10129, c3436.f10130, c3436.f10131);
                            this.f10047.m5576(c343511.f10120.f10134 ? 0 : 3);
                            m5574();
                            z = true;
                        }
                    } else {
                        this.f10053.mo1210();
                        if (this.f10058) {
                        }
                        c3435 = this.f10050.f10143;
                        if (c3435 != null) {
                        }
                        z = false;
                        while (true) {
                            if (this.f10056) {
                                if (this.f10056 && (c34352 = (c3437 = this.f10050).f10142) != null && (c34353 = c34352.f10125) != null && (c34352 != c3437.f10143 || m5560()) && this.f10064 >= c34353.f10120.f10130 + c34353.f10128) {
                                }
                            }
                            this.f10047.m5576(c343511.f10120.f10134 ? 0 : 3);
                            m5574();
                            z = true;
                        }
                    }
                } else {
                    if (this.f10058) {
                    }
                    c3435 = this.f10050.f10143;
                    if (c3435 != null) {
                    }
                    z = false;
                    while (true) {
                        this.f10047.m5576(c343511.f10120.f10134 ? 0 : 3);
                        m5574();
                        z = true;
                    }
                }
            }
        }
        int i4 = this.f10052.f10153;
        if (i4 == 1 || i4 == 4) {
            this.f10039.f13251.removeMessages(2);
            return;
        }
        C3435 c343512 = this.f10050.f10142;
        if (c343512 == null) {
            m5530(jMo6617, 10L);
            return;
        }
        C0567.m1892("doSomeWork");
        m5574();
        if (c343512.f10118) {
            long jElapsedRealtime = SystemClock.elapsedRealtime() * 1000;
            c343512.f10115.mo6104(this.f10052.f10161 - this.f10044, this.f10045);
            int i5 = 0;
            z2 = true;
            z3 = true;
            while (true) {
                InterfaceC3450[] interfaceC3450Arr3 = this.f10033;
                if (i5 >= interfaceC3450Arr3.length) {
                    break;
                }
                InterfaceC3450 interfaceC34504 = interfaceC3450Arr3[i5];
                if (interfaceC34504.mo5447() != 0) {
                    interfaceC34504.mo1149(this.f10064, jElapsedRealtime);
                    z2 = z2 && interfaceC34504.mo1166();
                    boolean z5 = c343512.f10117[i5] != interfaceC34504.mo5449();
                    boolean z6 = z5 || (!z5 && c343512.f10125 != null && interfaceC34504.mo5448()) || interfaceC34504.mo1169() || interfaceC34504.mo1166();
                    z3 = z3 && z6;
                    if (!z6) {
                        interfaceC34504.mo5451();
                    }
                }
                i5++;
            }
        } else {
            c343512.f10115.mo6115();
            z2 = true;
            z3 = true;
        }
        long j3 = c343512.f10120.f10133;
        if (z2 && c343512.f10118 && ((j3 == -9223372036854775807L || j3 <= this.f10052.f10161) && c343512.f10120.f10135)) {
            m5549(4);
            m5572();
        } else {
            C3438 c34382 = this.f10052;
            if (c34382.f10153 == 2) {
                if (this.f10054.length == 0) {
                    zM5564 = m5564();
                } else if (z3) {
                    if (c34382.f10155) {
                        C3435 c343513 = this.f10050.f10144;
                        if (!(c343513.m5609() && c343513.f10120.f10135) && !this.f10037.mo5465(m5548(), this.f10046.mo5472().f10163, this.f10057)) {
                            zM5564 = false;
                        }
                    }
                }
                if (zM5564) {
                    m5549(3);
                    if (this.f10056) {
                        m5571();
                    }
                }
            } else if (this.f10052.f10153 == 3 && (this.f10054.length != 0 ? !z3 : !m5564())) {
                this.f10057 = this.f10056;
                m5549(2);
                m5572();
            }
        }
        if (this.f10052.f10153 == 2) {
            for (InterfaceC3450 interfaceC34505 : this.f10054) {
                interfaceC34505.mo5451();
            }
        }
        if ((this.f10056 && this.f10052.f10153 == 3) || (i = this.f10052.f10153) == 2) {
            m5530(jMo6617, 10L);
        } else if (this.f10054.length == 0 || i == 4) {
            this.f10039.f13251.removeMessages(2);
        } else {
            m5530(jMo6617, 1000L);
        }
        C0567.m1913();
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public final void m5529(int i) throws ExoPlaybackException {
        this.f10059 = i;
        C3437 c3437 = this.f10050;
        c3437.f10140 = i;
        if (!c3437.m5624()) {
            m5553(true);
        }
        m5542(false);
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public final void m5530(long j, long j2) {
        this.f10039.f13251.removeMessages(2);
        this.f10039.f13251.sendEmptyMessageAtTime(2, j + j2);
    }

    /* JADX WARN: Code restructure failed: missing block: B:116:0x026d, code lost:
    
        r12 = true;
     */
    /* JADX WARN: Code restructure failed: missing block: B:84:0x01de, code lost:
    
        r12 = r12 ^ r0;
     */
    /* JADX WARN: Removed duplicated region for block: B:120:0x027a  */
    /* JADX WARN: Removed duplicated region for block: B:122:0x0280 A[LOOP:3: B:122:0x0280->B:153:0x0280, LOOP_START, PHI: r0
      0x0280: PHI (r0v23 ދ.ހ.֏.ؠ.ޝ) = (r0v17 ދ.ހ.֏.ؠ.ޝ), (r0v24 ދ.ހ.֏.ؠ.ޝ) binds: [B:121:0x027e, B:153:0x0280] A[DONT_GENERATE, DONT_INLINE]] */
    /* JADX WARN: Removed duplicated region for block: B:130:0x02a0  */
    /* JADX WARN: Removed duplicated region for block: B:133:0x02a9  */
    /* JADX WARN: Removed duplicated region for block: B:134:0x02ab  */
    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final void m5531(C3426 c3426) throws ExoPlaybackException {
        InterfaceC3800.C3801 c3801M5618;
        long jLongValue;
        long jLongValue2;
        InterfaceC3800.C3801 c3801M56182;
        long jMax;
        C3435 c3435;
        boolean z;
        boolean z2;
        boolean zM5621;
        C3436 c3436;
        C3436 c3436M5616;
        long j;
        C3435 c34352;
        C3436 c34362;
        C3424 c3424 = this;
        if (c3426.f10067 != c3424.f10053) {
            return;
        }
        c3424.f10047.m5575(c3424.f10062);
        c3424.f10062 = 0;
        C3438 c3438 = c3424.f10052;
        AbstractC3457 abstractC3457 = c3438.f10149;
        AbstractC3457 abstractC34572 = c3426.f10068;
        c3424.f10050.f10139 = abstractC34572;
        c3424.f10052 = new C3438(abstractC34572, c3438.f10150, c3438.f10151, c3438.f10152, c3438.f10153, c3438.f10154, c3438.f10155, c3438.f10156, c3438.f10157, c3438.f10158, c3438.f10159, c3438.f10160, c3438.f10161);
        for (int size = c3424.f10048.size() - 1; size >= 0; size--) {
            if (!c3424.m5547(c3424.f10048.get(size))) {
                c3424.f10048.get(size).f10069.m5645(false);
                c3424.f10048.remove(size);
            }
        }
        Collections.sort(c3424.f10048);
        InterfaceC3800.C3801 c3801 = c3424.f10052.f10150;
        long j2 = c3801.m6122() ? c3424.f10052.f10152 : c3424.f10052.f10161;
        C3429 c3429 = c3424.f10063;
        boolean z3 = true;
        if (c3429 == null) {
            if (j2 == -9223372036854775807L && !abstractC34572.m5686()) {
                Pair<Object, Long> pairM5525 = c3424.m5525(abstractC34572, abstractC34572.m5677(), -9223372036854775807L);
                c3801M5618 = c3424.f10050.m5618(pairM5525.first, ((Long) pairM5525.second).longValue());
                jLongValue = !c3801M5618.m6122() ? ((Long) pairM5525.second).longValue() : j2;
            } else if (abstractC34572.mo1223(c3801.f11629) == -1) {
                Object objM5526 = c3424.m5526(c3801.f11629, abstractC3457, abstractC34572);
                if (objM5526 == null) {
                    m5554();
                    return;
                } else {
                    Pair<Object, Long> pairM55252 = c3424.m5525(abstractC34572, abstractC34572.mo1225(abstractC34572.mo1223(objM5526), c3424.f10043, true).f10225, -9223372036854775807L);
                    jLongValue2 = ((Long) pairM55252.second).longValue();
                    c3801M56182 = c3424.f10050.m5618(pairM55252.first, jLongValue2);
                }
            } else {
                InterfaceC3800.C3801 c3801M56183 = c3424.f10050.m5618(c3424.f10052.f10150.f11629, j2);
                if (!c3424.f10052.f10150.m6122() && !c3801M56183.m6122()) {
                    c3801M56183 = c3424.f10052.f10150;
                }
                c3801M5618 = c3801M56183;
                jLongValue = j2;
            }
            if (c3424.f10052.f10150.equals(c3801M5618) || j2 != jLongValue) {
                c3435 = c3424.f10050.f10142;
                if (c3435 != null) {
                    while (true) {
                        c3435 = c3435.f10125;
                        if (c3435 == null) {
                            break;
                        } else if (c3435.f10120.f10129.equals(c3801M5618)) {
                            c3435.f10120 = c3424.f10050.m5616(c3435.f10120);
                        }
                    }
                }
                jMax = c3801M5618.m6122() ? 0L : jLongValue;
                C3437 c3437 = c3424.f10050;
                c3424.f10052 = m5527(c3801M5618, c3424.m5523(c3801M5618, jMax, c3437.f10142 == c3437.f10143), jLongValue);
            } else {
                C3437 c34372 = c3424.f10050;
                long j3 = c3424.f10064;
                C3435 c34353 = c34372.f10143;
                if (c34353 != null) {
                    jMax = c34353.f10128;
                    if (c34353.f10118) {
                        int i = 0;
                        while (true) {
                            InterfaceC3450[] interfaceC3450Arr = c3424.f10033;
                            if (i >= interfaceC3450Arr.length) {
                                break;
                            }
                            if (interfaceC3450Arr[i].mo5447() != 0 && c3424.f10033[i].mo5449() == c34353.f10117[i]) {
                                long jMo5452 = c3424.f10033[i].mo5452();
                                if (jMo5452 == Long.MIN_VALUE) {
                                    jMax = Long.MIN_VALUE;
                                    break;
                                }
                                jMax = Math.max(jMo5452, jMax);
                            }
                            i++;
                        }
                    }
                }
                C3435 c34354 = c34372.f10142;
                C3435 c34355 = null;
                while (true) {
                    if (c34354 == null) {
                        break;
                    }
                    C3436 c34363 = c34354.f10120;
                    if (c34355 == null) {
                        c3436M5616 = c34372.m5616(c34363);
                        c3436 = c34363;
                    } else {
                        C3436 c3436M5615 = c34372.m5615(c34355, j3);
                        if (c3436M5615 == null) {
                            zM5621 = c34372.m5621(c34355);
                            break;
                        }
                        c3436 = c34363;
                        if (!(c34363.f10130 == c3436M5615.f10130 && c3436.f10129.equals(c3436M5615.f10129))) {
                            zM5621 = c34372.m5621(c34355);
                            break;
                        }
                        c3436M5616 = c3436M5615;
                    }
                    long j4 = c3436.f10131;
                    if (j4 == c3436M5616.f10131) {
                        c34362 = c3436M5616;
                        j = j3;
                        c34352 = c34354;
                    } else {
                        j = j3;
                        c34352 = c34354;
                        c34362 = new C3436(c3436M5616.f10129, c3436M5616.f10130, j4, c3436M5616.f10132, c3436M5616.f10133, c3436M5616.f10134, c3436M5616.f10135);
                    }
                    c34352.f10120 = c34362;
                    long j5 = c3436.f10133;
                    if (j5 == -9223372036854775807L || j5 == c3436M5616.f10133) {
                        z3 = true;
                        c34354 = c34352.f10125;
                        c34355 = c34352;
                        j3 = j;
                    } else {
                        long j6 = c3436M5616.f10133;
                        boolean z4 = c34352 == c34372.f10143 && (jMax == Long.MIN_VALUE || jMax >= ((j6 > (-9223372036854775807L) ? 1 : (j6 == (-9223372036854775807L) ? 0 : -1)) == 0 ? Long.MAX_VALUE : j6 + c34352.f10128));
                        if (c34372.m5621(c34352) || z4) {
                            z2 = false;
                        }
                    }
                }
                if (!z2) {
                    z = false;
                    c3424 = this;
                    c3424.m5553(false);
                    c3424.m5542(z);
                }
                c3424 = this;
            }
            z = false;
            c3424.m5542(z);
        }
        Pair<Object, Long> pairM5524 = c3424.m5524(c3429, true);
        c3424.f10063 = null;
        if (pairM5524 == null) {
            m5554();
            return;
        } else {
            jLongValue2 = ((Long) pairM5524.second).longValue();
            c3801M56182 = c3424.f10050.m5618(pairM5524.first, jLongValue2);
        }
        jLongValue = jLongValue2;
        c3801M5618 = c3801M56182;
        if (c3424.f10052.f10150.equals(c3801M5618)) {
            c3435 = c3424.f10050.f10142;
            if (c3435 != null) {
            }
            if (c3801M5618.m6122()) {
            }
            C3437 c34373 = c3424.f10050;
            c3424.f10052 = m5527(c3801M5618, c3424.m5523(c3801M5618, jMax, c34373.f10142 == c34373.f10143), jLongValue);
            z = false;
        }
        c3424.m5542(z);
    }

    /* JADX WARN: Multi-variable type inference failed */
    /* JADX WARN: Removed duplicated region for block: B:56:0x00e8  */
    /* JADX WARN: Removed duplicated region for block: B:70:? A[RETURN, SYNTHETIC] */
    /* JADX WARN: Type inference failed for: r8v0 */
    /* JADX WARN: Type inference failed for: r8v1 */
    /* JADX WARN: Type inference fix 'apply assigned field type' failed
    java.lang.UnsupportedOperationException: ArgType.getObject(), call class: class jadx.core.dex.instructions.args.ArgType$UnknownArg
    	at jadx.core.dex.instructions.args.ArgType.getObject(ArgType.java:593)
    	at jadx.core.dex.attributes.nodes.ClassTypeVarsAttr.getTypeVarsMapFor(ClassTypeVarsAttr.java:35)
    	at jadx.core.dex.nodes.utils.TypeUtils.replaceClassGenerics(TypeUtils.java:177)
    	at jadx.core.dex.visitors.typeinference.FixTypesVisitor.insertExplicitUseCast(FixTypesVisitor.java:397)
    	at jadx.core.dex.visitors.typeinference.FixTypesVisitor.tryFieldTypeWithNewCasts(FixTypesVisitor.java:359)
    	at jadx.core.dex.visitors.typeinference.FixTypesVisitor.applyFieldType(FixTypesVisitor.java:309)
    	at jadx.core.dex.visitors.typeinference.FixTypesVisitor.visit(FixTypesVisitor.java:94)
     */
    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final void m5532(C3429 c3429) throws Throwable {
        long jLongValue;
        boolean z;
        long j;
        boolean z2;
        InterfaceC3800.C3801 c3801M5629;
        int i;
        long j2;
        long jMo6102;
        this.f10047.m5575(1);
        Pair<Object, Long> pairM5524 = m5524(c3429, true);
        int i2 = -9223372036854775807;
        if (pairM5524 == null) {
            c3801M5629 = this.f10052.m5629(this.f10060, this.f10042, this.f10043);
            jLongValue = -9223372036854775807L;
            j = -9223372036854775807L;
            z2 = true;
        } else {
            Object obj = pairM5524.first;
            long jLongValue2 = ((Long) pairM5524.second).longValue();
            InterfaceC3800.C3801 c3801M5618 = this.f10050.m5618(obj, jLongValue2);
            if (c3801M5618.m6122()) {
                jLongValue = 0;
            } else {
                jLongValue = ((Long) pairM5524.second).longValue();
                if (c3429.f10079 != -9223372036854775807L) {
                    z = false;
                }
                j = jLongValue2;
                z2 = z;
                c3801M5629 = c3801M5618;
            }
            z = true;
            j = jLongValue2;
            z2 = z;
            c3801M5629 = c3801M5618;
        }
        try {
            try {
            } catch (Throwable th) {
                th = th;
            }
        } catch (Throwable th2) {
            th = th2;
            i2 = 2;
        }
        if (this.f10053 != null && this.f10062 <= 0) {
            if (jLongValue != -9223372036854775807L) {
                i = 2;
                if (c3801M5629.equals(this.f10052.f10150)) {
                    C3435 c3435 = this.f10050.f10142;
                    jMo6102 = (c3435 == null || !c3435.f10118 || jLongValue == 0) ? jLongValue : c3435.f10115.mo6102(jLongValue, this.f10051);
                    if (C3414.m5459(jMo6102) == C3414.m5459(this.f10052.f10161)) {
                        this.f10052 = m5527(c3801M5629, this.f10052.f10161, j);
                        if (z2) {
                            this.f10047.m5576(2);
                            return;
                        }
                        return;
                    }
                } else {
                    jMo6102 = jLongValue;
                }
                C3437 c3437 = this.f10050;
                long jM5523 = m5523(c3801M5629, jMo6102, c3437.f10142 != c3437.f10143);
                z2 |= jLongValue != jM5523;
                j2 = jM5523;
                this.f10052 = m5527(c3801M5629, j2, j);
                if (z2) {
                    return;
                }
                this.f10047.m5576(i);
                return;
            }
            m5549(4);
            i = 2;
            m5545(false, false, true, false, true);
            this.f10052 = m5527(c3801M5629, jLongValue, j);
            if (z2) {
                this.f10047.m5576(i2);
            }
            throw th;
        }
        i = 2;
        this.f10063 = c3429;
        j2 = jLongValue;
        this.f10052 = m5527(c3801M5629, j2, j);
        if (z2) {
        }
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public final void m5533(C3435 c3435) throws ExoPlaybackException {
        C3435 c34352 = this.f10050.f10142;
        if (c34352 == null || c3435 == c34352) {
            return;
        }
        boolean[] zArr = new boolean[this.f10033.length];
        int i = 0;
        int i2 = 0;
        while (true) {
            InterfaceC3450[] interfaceC3450Arr = this.f10033;
            if (i >= interfaceC3450Arr.length) {
                this.f10052 = this.f10052.m5628(c34352.f10126, c34352.f10127);
                m5546(zArr, i2);
                return;
            }
            InterfaceC3450 interfaceC3450 = interfaceC3450Arr[i];
            zArr[i] = interfaceC3450.mo5447() != 0;
            if (c34352.f10127.m6504(i)) {
                i2++;
            }
            if (zArr[i] && (!c34352.f10127.m6504(i) || (interfaceC3450.mo5453() && interfaceC3450.mo5449() == c3435.f10117[i]))) {
                m5537(interfaceC3450);
            }
            i++;
        }
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public final void m5534(C3439 c3439) {
        this.f10046.mo5471(c3439);
        this.f10039.f13251.obtainMessage(17, 1, 0, this.f10046.mo5472()).sendToTarget();
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public final void m5535(C3439 c3439, boolean z) {
        this.f10041.obtainMessage(1, z ? 1 : 0, 0, c3439).sendToTarget();
        float f = c3439.f10163;
        for (C3435 c3435 = this.f10050.f10142; c3435 != null; c3435 = c3435.f10125) {
            for (InterfaceC4036 interfaceC4036 : c3435.f10127.f12846.m6503()) {
                if (interfaceC4036 != null) {
                    interfaceC4036.mo6472(f);
                }
            }
        }
        for (InterfaceC3450 interfaceC3450 : this.f10033) {
            if (interfaceC3450 != null) {
                interfaceC3450.mo1148(c3439.f10163);
            }
        }
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public final void m5536(C3446 c3446) {
        c3446.m5647();
        try {
            c3446.f10167.mo1309(c3446.f10170, c3446.f10171);
        } finally {
            c3446.m5645(true);
        }
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public final void m5537(InterfaceC3450 interfaceC3450) {
        C3418 c3418 = this.f10046;
        if (interfaceC3450 == c3418.f9992) {
            c3418.f9993 = null;
            c3418.f9992 = null;
            c3418.f9994 = true;
        }
        if (interfaceC3450.mo5447() == 2) {
            interfaceC3450.stop();
        }
        interfaceC3450.mo5446();
    }

    @Override // p138.p176.p177.p190.p217.InterfaceC3798.InterfaceC3799
    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public void mo5538(InterfaceC3798 interfaceC3798) {
        this.f10039.m6727(9, interfaceC3798).sendToTarget();
    }

    @Override // p138.p176.p177.p190.p217.InterfaceC3800.InterfaceC3802
    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public void mo5539(InterfaceC3800 interfaceC3800, AbstractC3457 abstractC3457) {
        this.f10039.m6727(8, new C3426(interfaceC3800, abstractC3457)).sendToTarget();
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public final void m5540(InterfaceC3800 interfaceC3800, boolean z, boolean z2) {
        this.f10062++;
        m5545(false, true, z, z2, true);
        this.f10037.mo5470();
        this.f10053 = interfaceC3800;
        m5549(2);
        interfaceC3800.mo6100(this, this.f10038.mo6575());
        this.f10039.m6728(2);
    }

    @Override // p138.p176.p177.p190.p217.InterfaceC3824.InterfaceC3825
    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public void mo5541(InterfaceC3824 interfaceC3824) {
        this.f10039.m6727(10, (InterfaceC3798) interfaceC3824).sendToTarget();
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public final void m5542(boolean z) {
        C3435 c3435;
        boolean z2;
        C3424 c3424 = this;
        C3435 c34352 = c3424.f10050.f10144;
        InterfaceC3800.C3801 c3801 = c34352 == null ? c3424.f10052.f10150 : c34352.f10120.f10129;
        boolean z3 = !c3424.f10052.f10158.equals(c3801);
        if (z3) {
            C3438 c3438 = c3424.f10052;
            z2 = z3;
            c3435 = c34352;
            c3424 = this;
            c3424.f10052 = new C3438(c3438.f10149, c3438.f10150, c3438.f10151, c3438.f10152, c3438.f10153, c3438.f10154, c3438.f10155, c3438.f10156, c3438.f10157, c3801, c3438.f10159, c3438.f10160, c3438.f10161);
        } else {
            c3435 = c34352;
            z2 = z3;
        }
        C3438 c34382 = c3424.f10052;
        c34382.f10159 = c3435 == null ? c34382.f10161 : c3435.m5608();
        c3424.f10052.f10160 = m5548();
        if ((z2 || z) && c3435 != null) {
            C3435 c34353 = c3435;
            if (c34353.f10118) {
                c3424.f10037.mo5462(c3424.f10033, c34353.f10126, c34353.f10127.f12846);
            }
        }
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public final void m5543(boolean z, AtomicBoolean atomicBoolean) {
        if (this.f10061 != z) {
            this.f10061 = z;
            if (!z) {
                for (InterfaceC3450 interfaceC3450 : this.f10033) {
                    if (interfaceC3450.mo5447() == 0) {
                        interfaceC3450.mo5441();
                    }
                }
            }
        }
        if (atomicBoolean != null) {
            synchronized (this) {
                atomicBoolean.set(true);
                notifyAll();
            }
        }
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public final void m5544(boolean z, boolean z2, boolean z3) {
        m5545(z || !this.f10061, true, z2, z2, z2);
        this.f10047.m5575(this.f10062 + (z3 ? 1 : 0));
        this.f10062 = 0;
        this.f10037.mo5468();
        m5549(1);
    }

    /* JADX WARN: Removed duplicated region for block: B:38:0x009f  */
    /* JADX WARN: Removed duplicated region for block: B:44:0x00c6  */
    /* JADX WARN: Removed duplicated region for block: B:45:0x00d3  */
    /* JADX WARN: Removed duplicated region for block: B:48:0x00e0  */
    /* JADX WARN: Removed duplicated region for block: B:49:0x00e3  */
    /* JADX WARN: Removed duplicated region for block: B:51:0x00eb  */
    /* JADX WARN: Removed duplicated region for block: B:52:0x00ed  */
    /* JADX WARN: Removed duplicated region for block: B:55:0x00f6  */
    /* JADX WARN: Removed duplicated region for block: B:56:0x00f9  */
    /* JADX WARN: Removed duplicated region for block: B:59:0x0104  */
    /* JADX WARN: Removed duplicated region for block: B:60:0x0106  */
    /* JADX WARN: Removed duplicated region for block: B:63:0x010c  */
    /* JADX WARN: Removed duplicated region for block: B:64:0x010f  */
    /* JADX WARN: Removed duplicated region for block: B:67:0x0116  */
    /* JADX WARN: Removed duplicated region for block: B:68:0x0119  */
    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final void m5545(boolean z, boolean z2, boolean z3, boolean z4, boolean z5) {
        boolean z6;
        InterfaceC3800 interfaceC3800;
        this.f10039.f13251.removeMessages(2);
        this.f10057 = false;
        C3418 c3418 = this.f10046;
        c3418.f9995 = false;
        C4145 c4145 = c3418.f9990;
        if (c4145.f13247) {
            c4145.m6725(c4145.mo5473());
            c4145.f13247 = false;
        }
        this.f10064 = 0L;
        for (InterfaceC3450 interfaceC3450 : this.f10054) {
            try {
                m5537(interfaceC3450);
            } catch (ExoPlaybackException | RuntimeException e) {
                C4131.m6645("ExoPlayerImplInternal", "Disable failed.", e);
            }
        }
        if (z) {
            for (InterfaceC3450 interfaceC34502 : this.f10033) {
                try {
                    interfaceC34502.mo5441();
                } catch (RuntimeException e2) {
                    C4131.m6645("ExoPlayerImplInternal", "Reset failed.", e2);
                }
            }
        }
        this.f10054 = new InterfaceC3450[0];
        if (!z3) {
            if (z4) {
                if (this.f10063 == null && !this.f10052.f10149.m5686()) {
                    C3438 c3438 = this.f10052;
                    c3438.f10149.m5683(c3438.f10150.f11629, this.f10043);
                    long j = this.f10052.f10161;
                    AbstractC3457.C3459 c3459 = this.f10043;
                    this.f10063 = new C3429(AbstractC3457.f10223, c3459.f10225, j + c3459.f10227);
                }
                z6 = true;
            }
            this.f10050.m5620(!z4);
            this.f10058 = false;
            if (z4) {
                this.f10050.f10139 = AbstractC3457.f10223;
                Iterator<C3427> it = this.f10048.iterator();
                while (it.hasNext()) {
                    it.next().f10069.m5645(false);
                }
                this.f10048.clear();
                this.f10065 = 0;
            }
            InterfaceC3800.C3801 c3801M5629 = !z6 ? this.f10052.m5629(this.f10060, this.f10042, this.f10043) : this.f10052.f10150;
            long j2 = !z6 ? -9223372036854775807L : this.f10052.f10161;
            long j3 = !z6 ? -9223372036854775807L : this.f10052.f10152;
            AbstractC3457 abstractC3457 = !z4 ? AbstractC3457.f10223 : this.f10052.f10149;
            C3438 c34382 = this.f10052;
            this.f10052 = new C3438(abstractC3457, c3801M5629, j2, j3, c34382.f10153, !z5 ? null : c34382.f10154, false, !z4 ? C3829.f11784 : this.f10052.f10156, !z4 ? this.f10036 : this.f10052.f10157, c3801M5629, j2, 0L, j2);
            if (z2 || (interfaceC3800 = this.f10053) == null) {
            }
            interfaceC3800.mo6099(this);
            this.f10053 = null;
            return;
        }
        this.f10063 = null;
        z6 = z3;
        this.f10050.m5620(!z4);
        this.f10058 = false;
        if (z4) {
        }
        InterfaceC3800.C3801 c3801M56292 = !z6 ? this.f10052.m5629(this.f10060, this.f10042, this.f10043) : this.f10052.f10150;
        if (!z6) {
        }
        if (!z6) {
        }
        AbstractC3457 abstractC34572 = !z4 ? AbstractC3457.f10223 : this.f10052.f10149;
        C3438 c343822 = this.f10052;
        this.f10052 = new C3438(abstractC34572, c3801M56292, j2, j3, c343822.f10153, !z5 ? null : c343822.f10154, false, !z4 ? C3829.f11784 : this.f10052.f10156, !z4 ? this.f10036 : this.f10052.f10157, c3801M56292, j2, 0L, j2);
        if (z2) {
        }
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public final void m5546(boolean[] zArr, int i) throws ExoPlaybackException {
        int i2;
        InterfaceC4133 interfaceC4133;
        this.f10054 = new InterfaceC3450[i];
        C4045 c4045 = this.f10050.f10142.f10127;
        for (int i3 = 0; i3 < this.f10033.length; i3++) {
            if (!c4045.m6504(i3)) {
                this.f10033[i3].mo5441();
            }
        }
        int i4 = 0;
        int i5 = 0;
        while (i4 < this.f10033.length) {
            if (c4045.m6504(i4)) {
                boolean z = zArr[i4];
                int i6 = i5 + 1;
                C3435 c3435 = this.f10050.f10142;
                InterfaceC3450 interfaceC3450 = this.f10033[i4];
                this.f10054[i5] = interfaceC3450;
                if (interfaceC3450.mo5447() == 0) {
                    C4045 c40452 = c3435.f10127;
                    C3451 c3451 = c40452.f12845[i4];
                    C3431[] c3431ArrM5521 = m5521(c40452.f12846.f12829[i4]);
                    boolean z2 = this.f10056 && this.f10052.f10153 == 3;
                    boolean z3 = !z && z2;
                    i2 = i4;
                    interfaceC3450.mo5444(c3451, c3431ArrM5521, c3435.f10117[i4], this.f10064, z3, c3435.f10128);
                    C3418 c3418 = this.f10046;
                    if (c3418 == null) {
                        throw null;
                    }
                    InterfaceC4133 interfaceC4133Mo5454 = interfaceC3450.mo5454();
                    if (interfaceC4133Mo5454 != null && interfaceC4133Mo5454 != (interfaceC4133 = c3418.f9993)) {
                        if (interfaceC4133 != null) {
                            throw new ExoPlaybackException(2, new IllegalStateException("Multiple renderer media clocks enabled."));
                        }
                        c3418.f9993 = interfaceC4133Mo5454;
                        c3418.f9992 = interfaceC3450;
                        interfaceC4133Mo5454.mo5471(c3418.f9990.f13250);
                    }
                    if (z2) {
                        interfaceC3450.start();
                    }
                } else {
                    i2 = i4;
                }
                i5 = i6;
            } else {
                i2 = i4;
            }
            i4 = i2 + 1;
        }
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public final boolean m5547(C3427 c3427) {
        Object obj = c3427.f10072;
        if (obj != null) {
            int iMo1223 = this.f10052.f10149.mo1223(obj);
            if (iMo1223 == -1) {
                return false;
            }
            c3427.f10070 = iMo1223;
            return true;
        }
        C3446 c3446 = c3427.f10069;
        AbstractC3457 abstractC3457 = c3446.f10169;
        int i = c3446.f10173;
        long jM5458 = C3414.m5458(c3446.f10174);
        AbstractC3457 abstractC34572 = this.f10052.f10149;
        Pair<Object, Long> pair = null;
        if (!abstractC34572.m5686()) {
            if (abstractC3457.m5686()) {
                abstractC3457 = abstractC34572;
            }
            try {
                Pair<Object, Long> pairM5680 = abstractC3457.m5680(this.f10042, this.f10043, i, jM5458);
                if (abstractC34572 == abstractC3457 || abstractC34572.mo1223(pairM5680.first) != -1) {
                    pair = pairM5680;
                }
            } catch (IndexOutOfBoundsException unused) {
            }
        }
        if (pair == null) {
            return false;
        }
        int iMo12232 = this.f10052.f10149.mo1223(pair.first);
        long jLongValue = ((Long) pair.second).longValue();
        Object obj2 = pair.first;
        c3427.f10070 = iMo12232;
        c3427.f10071 = jLongValue;
        c3427.f10072 = obj2;
        return true;
    }

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public final long m5548() {
        return m5522(this.f10052.f10159);
    }

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public final void m5549(int i) {
        C3438 c3438 = this.f10052;
        if (c3438.f10153 != i) {
            this.f10052 = new C3438(c3438.f10149, c3438.f10150, c3438.f10151, c3438.f10152, i, c3438.f10154, c3438.f10155, c3438.f10156, c3438.f10157, c3438.f10158, c3438.f10159, c3438.f10160, c3438.f10161);
        }
    }

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public final void m5550(long j) {
        C3435 c3435 = this.f10050.f10142;
        if (c3435 != null) {
            j += c3435.f10128;
        }
        this.f10064 = j;
        this.f10046.f9990.m6725(j);
        for (InterfaceC3450 interfaceC3450 : this.f10054) {
            interfaceC3450.mo5443(this.f10064);
        }
        for (C3435 c34352 = this.f10050.f10142; c34352 != null; c34352 = c34352.f10125) {
            for (InterfaceC4036 interfaceC4036 : c34352.f10127.f12846.m6503()) {
                if (interfaceC4036 != null) {
                    interfaceC4036.mo6484();
                }
            }
        }
    }

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public /* synthetic */ void m5551(C3446 c3446) {
        try {
            m5536(c3446);
        } catch (ExoPlaybackException e) {
            C4131.m6645("ExoPlayerImplInternal", "Unexpected error delivering message on external thread.", e);
            throw new RuntimeException(e);
        }
    }

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public final void m5552(InterfaceC3798 interfaceC3798) {
        C3435 c3435 = this.f10050.f10144;
        if (c3435 != null && c3435.f10115 == interfaceC3798) {
            this.f10050.m5619(this.f10064);
            m5565();
        }
    }

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public final void m5553(boolean z) throws ExoPlaybackException {
        InterfaceC3800.C3801 c3801 = this.f10050.f10142.f10120.f10129;
        long jM5523 = m5523(c3801, this.f10052.f10161, true);
        if (jM5523 != this.f10052.f10161) {
            this.f10052 = m5527(c3801, jM5523, this.f10052.f10152);
            if (z) {
                this.f10047.m5576(4);
            }
        }
    }

    /* JADX INFO: renamed from: ހ, reason: contains not printable characters */
    public final void m5554() {
        if (this.f10052.f10153 != 1) {
            m5549(4);
        }
        m5545(false, false, true, false, true);
    }

    /* JADX INFO: renamed from: ހ, reason: contains not printable characters */
    public synchronized void m5555(C3446 c3446) {
        if (!this.f10055 && this.f10040.isAlive()) {
            this.f10039.m6727(15, c3446).sendToTarget();
            return;
        }
        Log.w("ExoPlayerImplInternal", "Ignoring messages sent after release.");
        c3446.m5645(false);
    }

    /* JADX INFO: renamed from: ހ, reason: contains not printable characters */
    public final void m5556(InterfaceC3798 interfaceC3798) throws ExoPlaybackException {
        C3435 c3435 = this.f10050.f10144;
        if (c3435 != null && c3435.f10115 == interfaceC3798) {
            C3435 c34352 = this.f10050.f10144;
            float f = this.f10046.mo5472().f10163;
            AbstractC3457 abstractC3457 = this.f10052.f10149;
            c34352.f10118 = true;
            c34352.f10126 = c34352.f10115.mo6114();
            long jM5604 = c34352.m5604(c34352.m5605(f, abstractC3457), c34352.f10120.f10130, false, new boolean[c34352.f10122.length]);
            long j = c34352.f10128;
            C3436 c3436 = c34352.f10120;
            long j2 = c3436.f10130;
            c34352.f10128 = (j2 - jM5604) + j;
            if (jM5604 != j2) {
                c3436 = new C3436(c3436.f10129, jM5604, c3436.f10131, c3436.f10132, c3436.f10133, c3436.f10134, c3436.f10135);
            }
            c34352.f10120 = c3436;
            this.f10037.mo5462(this.f10033, c34352.f10126, c34352.f10127.f12846);
            if (c34352 == this.f10050.f10142) {
                m5550(c34352.f10120.f10130);
                m5533((C3435) null);
            }
            m5565();
        }
    }

    /* JADX INFO: renamed from: ހ, reason: contains not printable characters */
    public final void m5557(boolean z) {
        this.f10057 = false;
        this.f10056 = z;
        if (!z) {
            m5572();
            m5574();
            return;
        }
        int i = this.f10052.f10153;
        if (i == 3) {
            m5571();
            this.f10039.m6728(2);
        } else if (i == 2) {
            this.f10039.m6728(2);
        }
    }

    /* JADX INFO: renamed from: ށ, reason: contains not printable characters */
    public final void m5558(C3446 c3446) {
        if (c3446.f10174 == -9223372036854775807L) {
            m5561(c3446);
            return;
        }
        if (this.f10053 == null || this.f10062 > 0) {
            this.f10048.add(new C3427(c3446));
            return;
        }
        C3427 c3427 = new C3427(c3446);
        if (!m5547(c3427)) {
            c3446.m5645(false);
        } else {
            this.f10048.add(c3427);
            Collections.sort(this.f10048);
        }
    }

    /* JADX INFO: renamed from: ށ, reason: contains not printable characters */
    public final void m5559(boolean z) throws ExoPlaybackException {
        this.f10060 = z;
        C3437 c3437 = this.f10050;
        c3437.f10141 = z;
        if (!c3437.m5624()) {
            m5553(true);
        }
        m5542(false);
    }

    /* JADX INFO: renamed from: ށ, reason: contains not printable characters */
    public final boolean m5560() {
        C3435 c3435 = this.f10050.f10143;
        if (!c3435.f10118) {
            return false;
        }
        int i = 0;
        while (true) {
            InterfaceC3450[] interfaceC3450Arr = this.f10033;
            if (i >= interfaceC3450Arr.length) {
                return true;
            }
            InterfaceC3450 interfaceC3450 = interfaceC3450Arr[i];
            InterfaceC3823 interfaceC3823 = c3435.f10117[i];
            if (interfaceC3450.mo5449() != interfaceC3823 || (interfaceC3823 != null && !interfaceC3450.mo5448())) {
                break;
            }
            i++;
        }
        return false;
    }

    /* JADX INFO: renamed from: ނ, reason: contains not printable characters */
    public final void m5561(C3446 c3446) {
        if (c3446.f10172.getLooper() != this.f10039.f13251.getLooper()) {
            this.f10039.m6727(16, c3446).sendToTarget();
            return;
        }
        m5536(c3446);
        int i = this.f10052.f10153;
        if (i == 3 || i == 2) {
            this.f10039.m6728(2);
        }
    }

    /* JADX INFO: renamed from: ނ, reason: contains not printable characters */
    public final boolean m5562() {
        C3435 c3435 = this.f10050.f10144;
        if (c3435 == null) {
            return false;
        }
        return (!c3435.f10118 ? 0L : c3435.f10115.mo6110()) != Long.MIN_VALUE;
    }

    /* JADX INFO: renamed from: ރ, reason: contains not printable characters */
    public final void m5563(final C3446 c3446) {
        Handler handler = c3446.f10172;
        if (handler.getLooper().getThread().isAlive()) {
            handler.post(new Runnable() { // from class: ދ.ހ.֏.ؠ.ތ
                @Override // java.lang.Runnable
                public final void run() {
                    this.f9939.m5551(c3446);
                }
            });
        } else {
            Log.w("TAG", "Trying to send message on a dead thread.");
            c3446.m5645(false);
        }
    }

    /* JADX INFO: renamed from: ރ, reason: contains not printable characters */
    public final boolean m5564() {
        C3435 c3435 = this.f10050.f10142;
        long j = c3435.f10120.f10133;
        return c3435.f10118 && (j == -9223372036854775807L || this.f10052.f10161 < j);
    }

    /* JADX INFO: renamed from: ބ, reason: contains not printable characters */
    public final void m5565() {
        boolean zMo5464;
        if (m5562()) {
            C3435 c3435 = this.f10050.f10144;
            zMo5464 = this.f10037.mo5464(m5522(!c3435.f10118 ? 0L : c3435.f10115.mo6110()), this.f10046.mo5472().f10163);
        } else {
            zMo5464 = false;
        }
        this.f10058 = zMo5464;
        if (zMo5464) {
            C3435 c34352 = this.f10050.f10144;
            long j = this.f10064;
            C0567.m1932(c34352.m5610());
            c34352.f10115.mo6107(j - c34352.f10128);
        }
        m5573();
    }

    /* JADX INFO: renamed from: ޅ, reason: contains not printable characters */
    public final void m5566() {
        C3428 c3428 = this.f10047;
        if (this.f10052 != c3428.f10073 || c3428.f10074 > 0 || c3428.f10075) {
            Handler handler = this.f10041;
            C3428 c34282 = this.f10047;
            handler.obtainMessage(0, c34282.f10074, c34282.f10075 ? c34282.f10076 : -1, this.f10052).sendToTarget();
            C3428 c34283 = this.f10047;
            c34283.f10073 = this.f10052;
            c34283.f10074 = 0;
            c34283.f10075 = false;
        }
    }

    /* JADX INFO: renamed from: ކ, reason: contains not printable characters */
    public synchronized void m5567() {
        if (!this.f10055 && this.f10040.isAlive()) {
            this.f10039.m6728(7);
            boolean z = false;
            while (!this.f10055) {
                try {
                    wait();
                } catch (InterruptedException unused) {
                    z = true;
                }
            }
            if (z) {
                Thread.currentThread().interrupt();
            }
        }
    }

    /* JADX INFO: renamed from: އ, reason: contains not printable characters */
    public final void m5568() {
        m5545(true, true, true, true, false);
        this.f10037.mo5466();
        m5549(1);
        this.f10040.quit();
        synchronized (this) {
            this.f10055 = true;
            notifyAll();
        }
    }

    /* JADX INFO: renamed from: ވ, reason: contains not printable characters */
    public final void m5569() throws ExoPlaybackException {
        boolean z;
        int i;
        boolean[] zArr;
        float f = this.f10046.mo5472().f10163;
        C3437 c3437 = this.f10050;
        C3435 c3435 = c3437.f10142;
        C3435 c34352 = c3437.f10143;
        boolean z2 = true;
        for (C3435 c34353 = c3435; c34353 != null && c34353.f10118; c34353 = c34353.f10125) {
            C4045 c4045M5605 = c34353.m5605(f, this.f10052.f10149);
            C4045 c4045 = c34353.f10127;
            if (c4045 == null || c4045.f12846.f12828 != c4045M5605.f12846.f12828) {
                z = false;
                break;
            }
            for (int i2 = 0; i2 < c4045M5605.f12846.f12828; i2++) {
                if (!c4045M5605.m6505(c4045, i2)) {
                    z = false;
                    break;
                }
            }
            z = true;
            if (!z) {
                if (z2) {
                    C3437 c34372 = this.f10050;
                    C3435 c34354 = c34372.f10142;
                    boolean zM5621 = c34372.m5621(c34354);
                    boolean[] zArr2 = new boolean[this.f10033.length];
                    long jM5604 = c34354.m5604(c4045M5605, this.f10052.f10161, zM5621, zArr2);
                    C3438 c3438 = this.f10052;
                    if (c3438.f10153 == 4 || jM5604 == c3438.f10161) {
                        zArr = zArr2;
                        i = 4;
                    } else {
                        C3438 c34382 = this.f10052;
                        zArr = zArr2;
                        i = 4;
                        this.f10052 = m5527(c34382.f10150, jM5604, c34382.f10152);
                        this.f10047.m5576(4);
                        m5550(jM5604);
                    }
                    boolean[] zArr3 = new boolean[this.f10033.length];
                    int i3 = 0;
                    int i4 = 0;
                    while (true) {
                        InterfaceC3450[] interfaceC3450Arr = this.f10033;
                        if (i3 >= interfaceC3450Arr.length) {
                            break;
                        }
                        InterfaceC3450 interfaceC3450 = interfaceC3450Arr[i3];
                        zArr3[i3] = interfaceC3450.mo5447() != 0;
                        InterfaceC3823 interfaceC3823 = c34354.f10117[i3];
                        if (interfaceC3823 != null) {
                            i4++;
                        }
                        if (zArr3[i3]) {
                            if (interfaceC3823 != interfaceC3450.mo5449()) {
                                m5537(interfaceC3450);
                            } else if (zArr[i3]) {
                                interfaceC3450.mo5443(this.f10064);
                            }
                        }
                        i3++;
                    }
                    this.f10052 = this.f10052.m5628(c34354.f10126, c34354.f10127);
                    m5546(zArr3, i4);
                } else {
                    i = 4;
                    this.f10050.m5621(c34353);
                    if (c34353.f10118) {
                        c34353.m5604(c4045M5605, Math.max(c34353.f10120.f10130, this.f10064 - c34353.f10128), false, new boolean[c34353.f10122.length]);
                    }
                }
                m5542(true);
                if (this.f10052.f10153 != i) {
                    m5565();
                    m5574();
                    this.f10039.m6728(2);
                    return;
                }
                return;
            }
            if (c34353 == c34352) {
                z2 = false;
            }
        }
    }

    /* JADX INFO: renamed from: މ, reason: contains not printable characters */
    public final void m5570() {
        for (InterfaceC3450 interfaceC3450 : this.f10033) {
            if (interfaceC3450.mo5449() != null) {
                interfaceC3450.mo5450();
            }
        }
    }

    /* JADX INFO: renamed from: ފ, reason: contains not printable characters */
    public final void m5571() {
        this.f10057 = false;
        C3418 c3418 = this.f10046;
        c3418.f9995 = true;
        c3418.f9990.m6724();
        for (InterfaceC3450 interfaceC3450 : this.f10054) {
            interfaceC3450.start();
        }
    }

    /* JADX INFO: renamed from: ދ, reason: contains not printable characters */
    public final void m5572() {
        C3418 c3418 = this.f10046;
        c3418.f9995 = false;
        C4145 c4145 = c3418.f9990;
        if (c4145.f13247) {
            c4145.m6725(c4145.mo5473());
            c4145.f13247 = false;
        }
        for (InterfaceC3450 interfaceC3450 : this.f10054) {
            if (interfaceC3450.mo5447() == 2) {
                interfaceC3450.stop();
            }
        }
    }

    /* JADX INFO: renamed from: ތ, reason: contains not printable characters */
    public final void m5573() {
        C3435 c3435 = this.f10050.f10144;
        boolean z = this.f10058 || (c3435 != null && c3435.f10115.mo6109());
        C3438 c3438 = this.f10052;
        if (z != c3438.f10155) {
            this.f10052 = new C3438(c3438.f10149, c3438.f10150, c3438.f10151, c3438.f10152, c3438.f10153, c3438.f10154, z, c3438.f10156, c3438.f10157, c3438.f10158, c3438.f10159, c3438.f10160, c3438.f10161);
        }
    }

    /* JADX WARN: Code restructure failed: missing block: B:120:0x016e, code lost:
    
        r3 = null;
     */
    /* JADX WARN: Removed duplicated region for block: B:46:0x00bc  */
    /* JADX INFO: renamed from: ލ, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final void m5574() {
        C3439 c3439Mo5472;
        long j;
        long j2;
        C3424 c3424;
        C3427 c3427;
        C3427 c34272;
        C3435 c3435 = this.f10050.f10142;
        if (c3435 == null) {
            return;
        }
        long jMo6113 = c3435.f10118 ? c3435.f10115.mo6113() : -9223372036854775807L;
        if (jMo6113 != -9223372036854775807L) {
            m5550(jMo6113);
            if (jMo6113 != this.f10052.f10161) {
                C3438 c3438 = this.f10052;
                this.f10052 = m5527(c3438.f10150, jMo6113, c3438.f10152);
                this.f10047.m5576(4);
            }
        } else {
            C3418 c3418 = this.f10046;
            boolean z = c3435 != this.f10050.f10143;
            InterfaceC3450 interfaceC3450 = c3418.f9992;
            if (interfaceC3450 == null || interfaceC3450.mo1166() || (!c3418.f9992.mo1169() && (z || c3418.f9992.mo5448()))) {
                c3418.f9994 = true;
                if (c3418.f9995) {
                    c3418.f9990.m6724();
                }
            } else {
                long jMo5473 = c3418.f9993.mo5473();
                if (!c3418.f9994) {
                    c3418.f9990.m6725(jMo5473);
                    c3439Mo5472 = c3418.f9993.mo5472();
                    if (!c3439Mo5472.equals(c3418.f9990.f13250)) {
                        C4145 c4145 = c3418.f9990;
                        if (c4145.f13247) {
                            c4145.m6725(c4145.mo5473());
                        }
                        c4145.f13250 = c3439Mo5472;
                        ((C3424) c3418.f9991).f10039.f13251.obtainMessage(17, 0, 0, c3439Mo5472).sendToTarget();
                    }
                } else if (jMo5473 < c3418.f9990.mo5473()) {
                    C4145 c41452 = c3418.f9990;
                    if (c41452.f13247) {
                        c41452.m6725(c41452.mo5473());
                        c41452.f13247 = false;
                    }
                } else {
                    c3418.f9994 = false;
                    if (c3418.f9995) {
                        c3418.f9990.m6724();
                    }
                    c3418.f9990.m6725(jMo5473);
                    c3439Mo5472 = c3418.f9993.mo5472();
                    if (!c3439Mo5472.equals(c3418.f9990.f13250)) {
                    }
                }
            }
            long jMo54732 = c3418.mo5473();
            this.f10064 = jMo54732;
            long j3 = jMo54732 - c3435.f10128;
            long j4 = this.f10052.f10161;
            if (!this.f10048.isEmpty() && !this.f10052.f10150.m6122()) {
                if (this.f10052.f10151 == j4 && this.f10066) {
                    j4--;
                }
                this.f10066 = false;
                C3438 c34382 = this.f10052;
                int iMo1223 = c34382.f10149.mo1223(c34382.f10150.f11629);
                int i = this.f10065;
                if (i > 0) {
                    c3427 = this.f10048.get(i - 1);
                    j = j3;
                    j2 = j4;
                    c3424 = this;
                } else {
                    j = j3;
                    j2 = j4;
                    c3424 = this;
                    c3427 = null;
                }
                while (c3427 != null) {
                    int i2 = c3427.f10070;
                    if (i2 <= iMo1223 && (i2 != iMo1223 || c3427.f10071 <= j2)) {
                        break;
                    }
                    int i3 = c3424.f10065 - 1;
                    c3424.f10065 = i3;
                    if (i3 > 0) {
                        c3427 = c3424.f10048.get(i3 - 1);
                    } else {
                        j = j;
                        j2 = j2;
                        c3424 = c3424;
                        c3427 = null;
                    }
                }
                if (c3424.f10065 < c3424.f10048.size()) {
                    c34272 = c3424.f10048.get(c3424.f10065);
                    while (c34272 != null && c34272.f10072 != null) {
                        int i4 = c34272.f10070;
                        if (i4 >= iMo1223 && (i4 != iMo1223 || c34272.f10071 > j2)) {
                            break;
                        }
                        int i5 = c3424.f10065 + 1;
                        c3424.f10065 = i5;
                        if (i5 < c3424.f10048.size()) {
                            c34272 = c3424.f10048.get(c3424.f10065);
                        }
                    }
                    while (c34272 != null && c34272.f10072 != null && c34272.f10070 == iMo1223) {
                        long j5 = c34272.f10071;
                        if (j5 <= j2 || j5 > j) {
                            break;
                        }
                        try {
                            c3424.m5561(c34272.f10069);
                            c34272 = c3424.f10065 < c3424.f10048.size() ? c3424.f10048.get(c3424.f10065) : null;
                        } finally {
                            C3446 c3446 = c34272.f10069;
                            if (c3446.f10175) {
                                c3424.f10048.remove(c3424.f10065);
                            } else {
                                c3446.m5647();
                                c3424.f10065++;
                            }
                        }
                    }
                }
                c34272 = null;
            }
            this.f10052.f10161 = j3;
        }
        this.f10052.f10159 = this.f10050.f10144.m5608();
        this.f10052.f10160 = m5548();
    }
}
