91快播 v3.3.0版本的 MD5 值为:094b9519ad2388a8147509cb8a126145

以下内容为反编译后的 C7942.java 源代码,内容仅作参考


package anta.㠬;

import android.net.Uri;
import android.text.TextUtils;
import android.util.Base64;
import android.util.Log;
import android.util.Pair;
import android.util.Xml;
import androidx.recyclerview.widget.RecyclerView;
import anta.ச.C1804;
import anta.න.AbstractC2031;
import anta.න.AbstractC2117;
import anta.න.C2028;
import anta.ᆖ.C2656;
import anta.Ꮩ.C3320;
import anta.Ꮩ.C3335;
import anta.ᕐ.C3737;
import anta.ᕐ.C3788;
import anta.ᕐ.C3836;
import anta.ỹ.C5650;
import anta.⁀.C5885;
import anta.グ.C6666;
import anta.㘥.C7435;
import anta.㙻.C7472;
import anta.㛿.C7565;
import anta.㠬.AbstractC7944;
import anta.㠬.AbstractC7950;
import anta.㮌.C9125;
import com.theway.abc.v2.nidongde.lsj.api.model.response.CLVideoWrapperKt;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.xml.sax.helpers.DefaultHandler;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
import org.xmlpull.v1.XmlPullParserFactory;
import org.xmlpull.v1.XmlSerializer;
import tv.danmaku.ijk.media.player.IjkMediaMeta;
public class C7942 extends DefaultHandler implements C5885.InterfaceC5886<C7956> {
    public final XmlPullParserFactory f17719;
    public static final Pattern f17717 = Pattern.compile("(\\d+)(?:/(\\d+))?");
    public static final Pattern f17715 = Pattern.compile("CC([1-4])=.*");
    public static final Pattern f17718 = Pattern.compile("([1-9]|[1-5][0-9]|6[0-3])=.*");
    public static final int[] f17716 = {-1, 1, 2, 3, 4, 5, 6, 8, 2, 3, 4, 7, 8, 24, 8, 12, 10, 12, 14, 12, 14};

    public static final class C7943 {
        public final C3737 f17720;
        public final AbstractC7950 f17721;
        public final ArrayList<C5650.C5652> f17722;
        public final String f17723;
        public final String f17724;
        public final ArrayList<C7958> f17725;
        public final long f17726;

        public C7943(C3737 c3737, String str, AbstractC7950 abstractC7950, String str2, ArrayList<C5650.C5652> arrayList, ArrayList<C7958> arrayList2, long j) {
            this.f17720 = c3737;
            this.f17723 = str;
            this.f17721 = abstractC7950;
            this.f17724 = str2;
            this.f17722 = arrayList;
            this.f17725 = arrayList2;
            this.f17726 = j;
        }
    }

    public C7942() {
        try {
            this.f17719 = XmlPullParserFactory.newInstance();
        } catch (XmlPullParserException e) {
            throw new RuntimeException("Couldn't create XmlPullParserFactory instance", e);
        }
    }

    public static float m6856(XmlPullParser xmlPullParser, float f) {
        String attributeValue = xmlPullParser.getAttributeValue(null, "frameRate");
        if (attributeValue != null) {
            Matcher matcher = f17717.matcher(attributeValue);
            if (matcher.matches()) {
                int parseInt = Integer.parseInt(matcher.group(1));
                String group = matcher.group(2);
                return !TextUtils.isEmpty(group) ? parseInt / Integer.parseInt(group) : parseInt;
            }
            return f;
        }
        return f;
    }

    public static int m6857(int i, int i2) {
        if (i == -1) {
            return i2;
        }
        if (i2 == -1) {
            return i;
        }
        C1804.m1910(i == i2);
        return i;
    }

    public static long m6858(XmlPullParser xmlPullParser, String str, long j) {
        String attributeValue = xmlPullParser.getAttributeValue(null, str);
        return attributeValue == null ? j : Long.parseLong(attributeValue);
    }

    public static void m6859(XmlPullParser xmlPullParser) {
        if (C1804.m1893(xmlPullParser)) {
            int i = 1;
            while (i != 0) {
                xmlPullParser.next();
                if (C1804.m1893(xmlPullParser)) {
                    i++;
                } else {
                    if (xmlPullParser.getEventType() == 3) {
                        i--;
                    }
                }
            }
        }
    }

    public static int m6860(XmlPullParser xmlPullParser, String str, int i) {
        String attributeValue = xmlPullParser.getAttributeValue(null, str);
        return attributeValue == null ? i : Integer.parseInt(attributeValue);
    }

    public static C7958 m6861(XmlPullParser xmlPullParser, String str) {
        String attributeValue = xmlPullParser.getAttributeValue(null, "schemeIdUri");
        if (attributeValue == null) {
            attributeValue = "";
        }
        String attributeValue2 = xmlPullParser.getAttributeValue(null, "value");
        if (attributeValue2 == null) {
            attributeValue2 = null;
        }
        String attributeValue3 = xmlPullParser.getAttributeValue(null, "id");
        String str2 = attributeValue3 != null ? attributeValue3 : null;
        do {
            xmlPullParser.next();
        } while (!C1804.m1894(xmlPullParser, str));
        return new C7958(attributeValue, attributeValue2, str2);
    }

    public static long m6862(long j, long j2) {
        if (j2 != -9223372036854775807L) {
            j = j2;
        }
        if (j == RecyclerView.FOREVER_NS) {
            return -9223372036854775807L;
        }
        return j;
    }

    public static String m6863(XmlPullParser xmlPullParser, String str) {
        String str2 = "";
        do {
            xmlPullParser.next();
            if (xmlPullParser.getEventType() == 4) {
                str2 = xmlPullParser.getText();
            } else {
                m6859(xmlPullParser);
            }
        } while (!C1804.m1894(xmlPullParser, str));
        return str2;
    }

    public static long m6864(XmlPullParser xmlPullParser, String str, long j) {
        String attributeValue = xmlPullParser.getAttributeValue(null, str);
        if (attributeValue == null) {
            return j;
        }
        Matcher matcher = C3335.f8147.matcher(attributeValue);
        if (matcher.matches()) {
            boolean isEmpty = true ^ TextUtils.isEmpty(matcher.group(1));
            String group = matcher.group(3);
            double parseDouble = group != null ? Double.parseDouble(group) * 3.1556908E7d : 0.0d;
            String group2 = matcher.group(5);
            double parseDouble2 = parseDouble + (group2 != null ? Double.parseDouble(group2) * 2629739.0d : 0.0d);
            String group3 = matcher.group(7);
            double parseDouble3 = parseDouble2 + (group3 != null ? Double.parseDouble(group3) * 86400.0d : 0.0d);
            String group4 = matcher.group(10);
            double parseDouble4 = parseDouble3 + (group4 != null ? Double.parseDouble(group4) * 3600.0d : 0.0d);
            String group5 = matcher.group(12);
            double parseDouble5 = parseDouble4 + (group5 != null ? Double.parseDouble(group5) * 60.0d : 0.0d);
            String group6 = matcher.group(14);
            long parseDouble6 = (long) ((parseDouble5 + (group6 != null ? Double.parseDouble(group6) : 0.0d)) * 1000.0d);
            return isEmpty ? -parseDouble6 : parseDouble6;
        }
        return (long) (Double.parseDouble(attributeValue) * 3600.0d * 1000.0d);
    }

    @Override
    public C7956 mo671(Uri uri, InputStream inputStream) {
        try {
            XmlPullParser newPullParser = this.f17719.newPullParser();
            newPullParser.setInput(inputStream, null);
            if (newPullParser.next() == 2 && "MPD".equals(newPullParser.getName())) {
                return m6866(newPullParser, uri.toString());
            }
            throw new C3836("inputStream does not contain a valid media presentation description");
        } catch (XmlPullParserException e) {
            throw new C3836(e);
        }
    }

    public Pair<String, C5650.C5652> m6865(XmlPullParser xmlPullParser) {
        String str;
        UUID uuid;
        byte[] bArr;
        String str2;
        boolean z;
        UUID uuid2;
        char c;
        UUID uuid3;
        String str3;
        String attributeValue = xmlPullParser.getAttributeValue(null, "schemeIdUri");
        if (attributeValue != null) {
            String m6501 = C7435.m6501(attributeValue);
            m6501.hashCode();
            switch (m6501.hashCode()) {
                case 489446379:
                    if (m6501.equals("urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95")) {
                        c = 0;
                        break;
                    }
                    c = 65535;
                    break;
                case 755418770:
                    if (m6501.equals("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed")) {
                        c = 1;
                        break;
                    }
                    c = 65535;
                    break;
                case 1812765994:
                    if (m6501.equals("urn:mpeg:dash:mp4protection:2011")) {
                        c = 2;
                        break;
                    }
                    c = 65535;
                    break;
                default:
                    c = 65535;
                    break;
            }
            switch (c) {
                case 0:
                    uuid3 = C3788.f9590;
                    uuid = uuid3;
                    str = null;
                    bArr = null;
                    str2 = null;
                    break;
                case 1:
                    uuid3 = C3788.f9592;
                    uuid = uuid3;
                    str = null;
                    bArr = null;
                    str2 = null;
                    break;
                case 2:
                    str = xmlPullParser.getAttributeValue(null, "value");
                    int attributeCount = xmlPullParser.getAttributeCount();
                    int i = 0;
                    while (true) {
                        if (i >= attributeCount) {
                            str3 = null;
                        } else {
                            String attributeName = xmlPullParser.getAttributeName(i);
                            int indexOf = attributeName.indexOf(58);
                            if (indexOf != -1) {
                                attributeName = attributeName.substring(indexOf + 1);
                            }
                            if (attributeName.equals("default_KID")) {
                                str3 = xmlPullParser.getAttributeValue(i);
                            } else {
                                i++;
                            }
                        }
                    }
                    if (!TextUtils.isEmpty(str3) && !"00000000-0000-0000-0000-000000000000".equals(str3)) {
                        String[] split = str3.split("\\s+");
                        UUID[] uuidArr = new UUID[split.length];
                        for (int i2 = 0; i2 < split.length; i2++) {
                            uuidArr[i2] = UUID.fromString(split[i2]);
                        }
                        uuid = C3788.f9591;
                        bArr = C7565.m6603(uuid, uuidArr, null);
                        str2 = null;
                        break;
                    }
                    uuid = null;
                    bArr = null;
                    str2 = null;
                    break;
            }
            do {
                xmlPullParser.next();
                if (!C1804.m1909(xmlPullParser, "ms:laurl")) {
                    str2 = xmlPullParser.getAttributeValue(null, "licenseUrl");
                } else {
                    if (bArr == null) {
                        if (C1804.m1893(xmlPullParser)) {
                            String name = xmlPullParser.getName();
                            int indexOf2 = name.indexOf(58);
                            if (indexOf2 != -1) {
                                name = name.substring(indexOf2 + 1);
                            }
                            if (name.equals("pssh")) {
                                z = true;
                                if (z && xmlPullParser.next() == 4) {
                                    byte[] decode = Base64.decode(xmlPullParser.getText(), 0);
                                    C2656 m6570 = C7565.m6570(decode);
                                    uuid2 = m6570 != null ? null : m6570.f6422;
                                    if (uuid2 != null) {
                                        Log.w("MpdParser", "Skipping malformed cenc:pssh data");
                                        uuid = uuid2;
                                        bArr = null;
                                    } else {
                                        UUID uuid4 = uuid2;
                                        bArr = decode;
                                        uuid = uuid4;
                                    }
                                }
                            }
                        }
                        z = false;
                        if (z) {
                            byte[] decode2 = Base64.decode(xmlPullParser.getText(), 0);
                            C2656 m65702 = C7565.m6570(decode2);
                            if (m65702 != null) {
                            }
                            if (uuid2 != null) {
                            }
                        }
                    }
                    if (bArr == null) {
                        UUID uuid5 = C3788.f9590;
                        if (uuid5.equals(uuid) && C1804.m1909(xmlPullParser, "mspr:pro") && xmlPullParser.next() == 4) {
                            bArr = C7565.m6611(uuid5, Base64.decode(xmlPullParser.getText(), 0));
                        }
                    }
                    m6859(xmlPullParser);
                }
            } while (!C1804.m1894(xmlPullParser, "ContentProtection"));
            return Pair.create(str, uuid != null ? new C5650.C5652(uuid, str2, "video/mp4", bArr) : null);
        }
        str = null;
        uuid = null;
        bArr = null;
        str2 = null;
        do {
            xmlPullParser.next();
            if (!C1804.m1909(xmlPullParser, "ms:laurl")) {
            }
        } while (!C1804.m1894(xmlPullParser, "ContentProtection"));
        return Pair.create(str, uuid != null ? new C5650.C5652(uuid, str2, "video/mp4", bArr) : null);
    }

    public C7956 m6866(XmlPullParser xmlPullParser, String str) {
        long j;
        long j2;
        String str2;
        ArrayList arrayList;
        String str3;
        ArrayList arrayList2;
        long j3;
        String str4;
        String str5;
        String str6;
        boolean z;
        XmlPullParser xmlPullParser2;
        String str7;
        String str8;
        ArrayList arrayList3;
        String str9;
        String str10;
        String str11;
        String str12;
        ArrayList arrayList4;
        boolean z2;
        String str13;
        long j4;
        ArrayList arrayList5;
        ArrayList arrayList6;
        String str14;
        String str15;
        ArrayList arrayList7;
        String str16;
        String str17;
        ArrayList arrayList8;
        float f;
        ArrayList arrayList9;
        String str18;
        int i;
        String str19;
        String str20;
        String str21;
        int i2;
        long j5;
        ArrayList arrayList10;
        String str22;
        ArrayList arrayList11;
        int i3;
        int i4;
        String str23;
        XmlPullParser xmlPullParser3;
        String str24;
        ArrayList arrayList12;
        long j6;
        String str25;
        C7942 c7942;
        String str26;
        ArrayList arrayList13;
        boolean z3;
        C7942 c79422;
        C7942 c79423;
        AbstractC7950 m6868;
        C7942 c79424;
        String str27;
        String str28;
        String str29;
        int i5;
        String str30;
        String str31;
        String str32;
        String str33;
        ArrayList arrayList14;
        int i6;
        int i7;
        String str34;
        ArrayList arrayList15;
        String str35;
        XmlPullParser xmlPullParser4;
        String str36;
        int i8;
        long j7;
        String str37;
        String str38;
        String str39;
        ArrayList arrayList16;
        String str40;
        ArrayList arrayList17;
        String str41;
        ArrayList arrayList18;
        ArrayList arrayList19;
        int i9;
        long m6879;
        String str42;
        String str43;
        String str44;
        int i10;
        String str45;
        String m3421;
        String str46;
        int i11;
        int i12;
        String str47;
        int parseInt;
        String str48;
        String str49;
        int i13;
        String str50;
        String str51;
        int i14;
        String str52;
        String str53;
        String str54;
        AbstractC7944 c7947;
        String str55;
        boolean z4;
        long j8;
        long j9;
        float f2;
        long j10;
        long j11;
        float f3;
        Uri uri;
        C7942 c79425 = this;
        String attributeValue = xmlPullParser.getAttributeValue(null, "availabilityStartTime");
        long m3530 = attributeValue == null ? -9223372036854775807L : C3335.m3530(attributeValue);
        long m6864 = m6864(xmlPullParser, "mediaPresentationDuration", -9223372036854775807L);
        long m68642 = m6864(xmlPullParser, "minBufferTime", -9223372036854775807L);
        boolean equals = "dynamic".equals(xmlPullParser.getAttributeValue(null, IjkMediaMeta.IJKM_KEY_TYPE));
        long m68643 = equals ? m6864(xmlPullParser, "minimumUpdatePeriod", -9223372036854775807L) : -9223372036854775807L;
        long m68644 = equals ? m6864(xmlPullParser, "timeShiftBufferDepth", -9223372036854775807L) : -9223372036854775807L;
        long m68645 = equals ? m6864(xmlPullParser, "suggestedPresentationDelay", -9223372036854775807L) : -9223372036854775807L;
        String attributeValue2 = xmlPullParser.getAttributeValue(null, "publishTime");
        long m35302 = attributeValue2 == null ? -9223372036854775807L : C3335.m3530(attributeValue2);
        long j12 = equals ? 0L : -9223372036854775807L;
        ArrayList arrayList20 = new ArrayList();
        String str56 = str;
        C7962 c7962 = null;
        C7949 c7949 = null;
        Uri uri2 = null;
        C7957 c7957 = null;
        boolean z5 = false;
        long j13 = equals ? -9223372036854775807L : 0L;
        long j14 = j12;
        boolean z6 = false;
        XmlPullParser xmlPullParser5 = xmlPullParser;
        while (true) {
            xmlPullParser.next();
            String str57 = "BaseURL";
            if (!C1804.m1909(xmlPullParser5, "BaseURL")) {
                String str58 = "lang";
                if (C1804.m1909(xmlPullParser5, "ProgramInformation")) {
                    String attributeValue3 = xmlPullParser5.getAttributeValue(null, "moreInformationURL");
                    String str59 = attributeValue3 == null ? null : attributeValue3;
                    String attributeValue4 = xmlPullParser5.getAttributeValue(null, "lang");
                    if (attributeValue4 == null) {
                        attributeValue4 = null;
                    }
                    String str60 = attributeValue4;
                    String str61 = null;
                    String str62 = null;
                    String str63 = null;
                    do {
                        xmlPullParser.next();
                        if (C1804.m1909(xmlPullParser5, "Title")) {
                            str61 = xmlPullParser.nextText();
                        } else if (C1804.m1909(xmlPullParser5, "Source")) {
                            str62 = xmlPullParser.nextText();
                        } else if (C1804.m1909(xmlPullParser5, "Copyright")) {
                            str63 = xmlPullParser.nextText();
                        } else {
                            m6859(xmlPullParser);
                        }
                    } while (!C1804.m1894(xmlPullParser5, "ProgramInformation"));
                    c7962 = new C7962(str61, str62, str63, str59, str60);
                } else {
                    String str64 = "value";
                    if (C1804.m1909(xmlPullParser5, "UTCTiming")) {
                        c7949 = new C7949(xmlPullParser5.getAttributeValue(null, "schemeIdUri"), xmlPullParser5.getAttributeValue(null, "value"));
                    } else if (C1804.m1909(xmlPullParser5, "Location")) {
                        uri2 = Uri.parse(xmlPullParser.nextText());
                    } else if (C1804.m1909(xmlPullParser5, "ServiceDescription")) {
                        long j15 = -9223372036854775807L;
                        long j16 = -9223372036854775807L;
                        long j17 = -9223372036854775807L;
                        float f4 = -3.4028235E38f;
                        float f5 = -3.4028235E38f;
                        while (true) {
                            xmlPullParser.next();
                            long j18 = j15;
                            if (C1804.m1909(xmlPullParser5, "Latency")) {
                                long m6858 = m6858(xmlPullParser5, "target", -9223372036854775807L);
                                j16 = m6858(xmlPullParser5, "min", -9223372036854775807L);
                                j8 = m6858;
                                j17 = m6858(xmlPullParser5, "max", -9223372036854775807L);
                            } else {
                                if (C1804.m1909(xmlPullParser5, "PlaybackRate")) {
                                    String attributeValue5 = xmlPullParser5.getAttributeValue(null, "min");
                                    f4 = attributeValue5 == null ? -3.4028235E38f : Float.parseFloat(attributeValue5);
                                    String attributeValue6 = xmlPullParser5.getAttributeValue(null, "max");
                                    if (attributeValue6 != null) {
                                        f5 = Float.parseFloat(attributeValue6);
                                    } else {
                                        j9 = j16;
                                        f2 = f4;
                                        j10 = j17;
                                        j11 = j18;
                                        f3 = -3.4028235E38f;
                                        if (C1804.m1894(xmlPullParser5, "ServiceDescription")) {
                                            j15 = j11;
                                            j16 = j9;
                                            j17 = j10;
                                            f4 = f2;
                                            f5 = f3;
                                        } else {
                                            c7957 = new C7957(j11, j9, j10, f2, f3);
                                        }
                                    }
                                }
                                j8 = j18;
                            }
                            j11 = j8;
                            j9 = j16;
                            f2 = f4;
                            f3 = f5;
                            j10 = j17;
                            if (C1804.m1894(xmlPullParser5, "ServiceDescription")) {
                            }
                        }
                    } else {
                        if (C1804.m1909(xmlPullParser5, "Period") && !z6) {
                            String str65 = "id";
                            String attributeValue7 = xmlPullParser5.getAttributeValue(null, "id");
                            long m68646 = m6864(xmlPullParser5, "start", j13);
                            String str66 = "schemeIdUri";
                            String str67 = "Period";
                            long j19 = m3530 != -9223372036854775807L ? m3530 + m68646 : -9223372036854775807L;
                            long m68647 = m6864(xmlPullParser5, "duration", -9223372036854775807L);
                            ArrayList arrayList21 = new ArrayList();
                            String str68 = "duration";
                            C7942 c79426 = c79425;
                            ArrayList arrayList22 = new ArrayList();
                            C7958 c7958 = null;
                            boolean z7 = false;
                            String str69 = str56;
                            AbstractC7950 abstractC7950 = null;
                            long j20 = -9223372036854775807L;
                            long j21 = j14;
                            while (true) {
                                xmlPullParser.next();
                                if (!C1804.m1909(xmlPullParser5, str57)) {
                                    str3 = str69;
                                    arrayList2 = arrayList20;
                                    if (C1804.m1909(xmlPullParser5, "AdaptationSet")) {
                                        String str70 = "AdaptationSet";
                                        int m6860 = m6860(xmlPullParser5, str65, -1);
                                        int m6870 = m6870(xmlPullParser);
                                        String str71 = "SegmentTemplate";
                                        String str72 = "mimeType";
                                        String attributeValue8 = xmlPullParser5.getAttributeValue(null, "mimeType");
                                        String str73 = str56;
                                        String attributeValue9 = xmlPullParser5.getAttributeValue(null, "codecs");
                                        long j22 = j21;
                                        int m68602 = m6860(xmlPullParser5, "width", -1);
                                        j2 = j13;
                                        int m68603 = m6860(xmlPullParser5, "height", -1);
                                        float m6856 = m6856(xmlPullParser5, -1.0f);
                                        j = j14;
                                        int m68604 = m6860(xmlPullParser5, "audioSamplingRate", -1);
                                        String str74 = str64;
                                        String attributeValue10 = xmlPullParser5.getAttributeValue(null, str58);
                                        String str75 = "SegmentList";
                                        String attributeValue11 = xmlPullParser5.getAttributeValue(null, "label");
                                        ArrayList arrayList23 = new ArrayList();
                                        ArrayList arrayList24 = new ArrayList();
                                        ArrayList arrayList25 = new ArrayList();
                                        String str76 = attributeValue11;
                                        ArrayList arrayList26 = new ArrayList();
                                        String str77 = "SegmentBase";
                                        ArrayList arrayList27 = new ArrayList();
                                        String str78 = "audioSamplingRate";
                                        ArrayList arrayList28 = new ArrayList();
                                        int i15 = m68604;
                                        int i16 = -1;
                                        String str79 = null;
                                        boolean z8 = false;
                                        String str80 = "width";
                                        int i17 = m68602;
                                        String str81 = "height";
                                        int i18 = m68603;
                                        String str82 = "codecs";
                                        long j23 = j20;
                                        AbstractC7950 abstractC79502 = abstractC7950;
                                        String str83 = str3;
                                        long j24 = j22;
                                        C7942 c79427 = this;
                                        XmlPullParser xmlPullParser6 = xmlPullParser;
                                        float f6 = m6856;
                                        String str84 = attributeValue10;
                                        ArrayList arrayList29 = new ArrayList();
                                        int i19 = m6870;
                                        while (true) {
                                            xmlPullParser.next();
                                            if (!C1804.m1909(xmlPullParser6, str57)) {
                                                j4 = j24;
                                                if (C1804.m1909(xmlPullParser6, "ContentProtection")) {
                                                    Pair<String, C5650.C5652> m6865 = m6865(xmlPullParser);
                                                    Object obj = m6865.first;
                                                    if (obj != null) {
                                                        str79 = (String) obj;
                                                    }
                                                    Object obj2 = m6865.second;
                                                    if (obj2 != null) {
                                                        arrayList23.add((C5650.C5652) obj2);
                                                    }
                                                } else if (C1804.m1909(xmlPullParser6, "ContentComponent")) {
                                                    String attributeValue12 = xmlPullParser6.getAttributeValue(null, str58);
                                                    if (str84 == null) {
                                                        str84 = attributeValue12;
                                                    } else if (attributeValue12 != null) {
                                                        C1804.m1910(str84.equals(attributeValue12));
                                                    }
                                                    i19 = m6857(i19, m6870(xmlPullParser));
                                                } else {
                                                    if (C1804.m1909(xmlPullParser6, "Role")) {
                                                        arrayList26.add(m6861(xmlPullParser6, "Role"));
                                                        arrayList5 = arrayList26;
                                                    } else {
                                                        String str85 = "AudioChannelConfiguration";
                                                        if (C1804.m1909(xmlPullParser6, "AudioChannelConfiguration")) {
                                                            i16 = m6876(xmlPullParser);
                                                        } else {
                                                            arrayList5 = arrayList26;
                                                            if (C1804.m1909(xmlPullParser6, "Accessibility")) {
                                                                arrayList25.add(m6861(xmlPullParser6, "Accessibility"));
                                                            } else if (C1804.m1909(xmlPullParser6, "EssentialProperty")) {
                                                                arrayList27.add(m6861(xmlPullParser6, "EssentialProperty"));
                                                            } else {
                                                                arrayList6 = arrayList23;
                                                                if (C1804.m1909(xmlPullParser6, "SupplementalProperty")) {
                                                                    arrayList28.add(m6861(xmlPullParser6, "SupplementalProperty"));
                                                                    z3 = true;
                                                                    str12 = str66;
                                                                    str14 = str65;
                                                                    str15 = str84;
                                                                    arrayList7 = arrayList27;
                                                                    str6 = str67;
                                                                    str16 = str68;
                                                                    str17 = str70;
                                                                    str25 = str71;
                                                                    arrayList8 = arrayList29;
                                                                    str2 = str73;
                                                                    j3 = j22;
                                                                    str11 = str74;
                                                                    f = f6;
                                                                    str24 = str75;
                                                                    str26 = str77;
                                                                    str18 = str78;
                                                                    str19 = str81;
                                                                    str20 = str82;
                                                                    str21 = str80;
                                                                    i2 = i17;
                                                                    j6 = j23;
                                                                    j5 = j4;
                                                                    arrayList10 = arrayList5;
                                                                    c7942 = c79427;
                                                                    str22 = str83;
                                                                    str4 = str58;
                                                                    arrayList11 = arrayList28;
                                                                    i4 = i19;
                                                                    xmlPullParser3 = xmlPullParser6;
                                                                    str5 = str57;
                                                                    str23 = str72;
                                                                    arrayList13 = arrayList24;
                                                                    i = i15;
                                                                    i3 = i18;
                                                                    arrayList12 = arrayList25;
                                                                    j23 = j6;
                                                                    xmlPullParser6 = xmlPullParser3;
                                                                    i19 = i4;
                                                                    z2 = z3;
                                                                    str83 = str22;
                                                                    str52 = str76;
                                                                    str84 = str15;
                                                                    j24 = j5;
                                                                    str53 = str17;
                                                                    if (C1804.m1894(xmlPullParser6, str53)) {
                                                                    }
                                                                } else {
                                                                    String str86 = "SupplementalProperty";
                                                                    String str87 = "Representation";
                                                                    if (C1804.m1909(xmlPullParser6, "Representation")) {
                                                                        String str88 = "EssentialProperty";
                                                                        String str89 = "InbandEventStream";
                                                                        String attributeValue13 = xmlPullParser6.getAttributeValue(null, str65);
                                                                        String str90 = str65;
                                                                        int m68605 = m6860(xmlPullParser6, "bandwidth", -1);
                                                                        String attributeValue14 = xmlPullParser6.getAttributeValue(null, str72);
                                                                        String str91 = attributeValue14 == null ? attributeValue8 : attributeValue14;
                                                                        String str92 = str82;
                                                                        String str93 = "ContentProtection";
                                                                        String attributeValue15 = xmlPullParser6.getAttributeValue(null, str92);
                                                                        if (attributeValue15 == null) {
                                                                            str28 = str80;
                                                                            str27 = attributeValue9;
                                                                            int i20 = i17;
                                                                            str29 = str84;
                                                                            i5 = i20;
                                                                        } else {
                                                                            String str94 = str80;
                                                                            str27 = attributeValue15;
                                                                            str28 = str94;
                                                                            int i21 = i17;
                                                                            str29 = str84;
                                                                            i5 = i21;
                                                                        }
                                                                        String str95 = str92;
                                                                        String str96 = str81;
                                                                        String str97 = str72;
                                                                        int i22 = i18;
                                                                        int m68606 = m6860(xmlPullParser6, str28, i5);
                                                                        int m68607 = m6860(xmlPullParser6, str96, i22);
                                                                        int i23 = i5;
                                                                        float f7 = f6;
                                                                        int i24 = i19;
                                                                        String str98 = str78;
                                                                        str19 = str96;
                                                                        int i25 = i15;
                                                                        float m68562 = m6856(xmlPullParser6, f7);
                                                                        int m68608 = m6860(xmlPullParser6, str98, i25);
                                                                        ArrayList arrayList30 = new ArrayList();
                                                                        ArrayList arrayList31 = new ArrayList();
                                                                        arrayList7 = arrayList27;
                                                                        String str99 = null;
                                                                        boolean z9 = false;
                                                                        int i26 = m68605;
                                                                        float f8 = f7;
                                                                        int i27 = i22;
                                                                        ArrayList arrayList32 = new ArrayList(arrayList27);
                                                                        ArrayList arrayList33 = new ArrayList(arrayList28);
                                                                        int i28 = i16;
                                                                        long j25 = j23;
                                                                        AbstractC7950 abstractC79503 = abstractC79502;
                                                                        long j26 = j4;
                                                                        String str100 = str83;
                                                                        while (true) {
                                                                            xmlPullParser.next();
                                                                            if (C1804.m1909(xmlPullParser6, str57)) {
                                                                                if (!z9) {
                                                                                    j26 = c79427.m6879(xmlPullParser6, j26);
                                                                                    str100 = c79427.m6875(xmlPullParser6, str100);
                                                                                    z9 = true;
                                                                                    str30 = str100;
                                                                                    str31 = str77;
                                                                                    str42 = str28;
                                                                                    str12 = str66;
                                                                                    i9 = -1;
                                                                                    j7 = j26;
                                                                                    str6 = str67;
                                                                                    str16 = str68;
                                                                                    str17 = str70;
                                                                                    str38 = str71;
                                                                                    arrayList8 = arrayList29;
                                                                                    str11 = str74;
                                                                                    arrayList9 = arrayList24;
                                                                                    str21 = str42;
                                                                                    str23 = str97;
                                                                                    str37 = str93;
                                                                                    str33 = str29;
                                                                                    arrayList14 = arrayList5;
                                                                                    str43 = str87;
                                                                                    str14 = str90;
                                                                                    i2 = i23;
                                                                                    i6 = i24;
                                                                                    i7 = i26;
                                                                                    str22 = str83;
                                                                                    arrayList15 = arrayList25;
                                                                                    arrayList11 = arrayList28;
                                                                                    str18 = str98;
                                                                                    i = i25;
                                                                                    str5 = str57;
                                                                                    str35 = str31;
                                                                                    str2 = str73;
                                                                                    str34 = str75;
                                                                                    j5 = j4;
                                                                                    str40 = str88;
                                                                                    str20 = str95;
                                                                                    arrayList19 = arrayList33;
                                                                                    i3 = i27;
                                                                                    arrayList16 = arrayList30;
                                                                                    arrayList17 = arrayList31;
                                                                                    arrayList18 = arrayList32;
                                                                                    i10 = i28;
                                                                                    xmlPullParser4 = xmlPullParser6;
                                                                                    str36 = str85;
                                                                                    str41 = str86;
                                                                                    str44 = str99;
                                                                                    long j27 = j22;
                                                                                    str4 = str58;
                                                                                    str39 = str89;
                                                                                    f = f8;
                                                                                    j3 = j27;
                                                                                    if (C1804.m1894(xmlPullParser4, str43)) {
                                                                                        if (C3320.m3424(str91)) {
                                                                                            m3421 = C3320.m3423(str27);
                                                                                        } else if (C3320.m3417(str91)) {
                                                                                            m3421 = C3320.m3422(str27);
                                                                                        } else if (C3320.m3426(str91)) {
                                                                                            str45 = str91;
                                                                                            if ("application/x-rawcc".equals(str45)) {
                                                                                                if (str27 != null) {
                                                                                                    for (String str101 : C3335.m3486(str27)) {
                                                                                                        str46 = C3320.m3421(str101);
                                                                                                        if (str46 != null && C3320.m3426(str46)) {
                                                                                                            m3421 = str46;
                                                                                                            String str102 = "ec+3";
                                                                                                            if ("audio/eac3".equals(m3421)) {
                                                                                                                i11 = i9;
                                                                                                            } else {
                                                                                                                int i29 = 0;
                                                                                                                while (i29 < arrayList19.size()) {
                                                                                                                    C7958 c79582 = (C7958) arrayList19.get(i29);
                                                                                                                    String str103 = c79582.f17777;
                                                                                                                    if ("tag:dolby.com,2018:dash:EC3_ExtensionType:2018".equals(str103)) {
                                                                                                                        i11 = i9;
                                                                                                                        m3421 = "JOC".equals(c79582.f17779) ? "audio/eac3-joc" : "audio/eac3";
                                                                                                                    } else {
                                                                                                                        i11 = i9;
                                                                                                                    }
                                                                                                                    if (!"tag:dolby.com,2014:dash:DolbyDigitalPlusExtensionType:2014".equals(str103) || !"ec+3".equals(c79582.f17779)) {
                                                                                                                        i29++;
                                                                                                                        i9 = i11;
                                                                                                                    }
                                                                                                                }
                                                                                                                i11 = i9;
                                                                                                            }
                                                                                                            str102 = str27;
                                                                                                            i12 = 0;
                                                                                                            int i30 = 0;
                                                                                                            while (true) {
                                                                                                                String str104 = "urn:mpeg:dash:role:2011";
                                                                                                                if (i12 >= arrayList14.size()) {
                                                                                                                    ArrayList arrayList34 = arrayList14;
                                                                                                                    C7958 c79583 = (C7958) arrayList34.get(i12);
                                                                                                                    if (C7435.m6463("urn:mpeg:dash:role:2011", c79583.f17777)) {
                                                                                                                        String str105 = c79583.f17779;
                                                                                                                        if (str105 != null) {
                                                                                                                            if (str105.equals("forced_subtitle")) {
                                                                                                                                i14 = 2;
                                                                                                                            } else if (str105.equals("main")) {
                                                                                                                                i14 = 1;
                                                                                                                            }
                                                                                                                            i30 |= i14;
                                                                                                                        }
                                                                                                                        i14 = 0;
                                                                                                                        i30 |= i14;
                                                                                                                    }
                                                                                                                    i12++;
                                                                                                                    arrayList14 = arrayList34;
                                                                                                                } else {
                                                                                                                    ArrayList arrayList35 = arrayList14;
                                                                                                                    int i31 = 0;
                                                                                                                    int i32 = 0;
                                                                                                                    while (i31 < arrayList35.size()) {
                                                                                                                        C7958 c79584 = (C7958) arrayList35.get(i31);
                                                                                                                        ArrayList arrayList36 = arrayList35;
                                                                                                                        if (C7435.m6463("urn:mpeg:dash:role:2011", c79584.f17777)) {
                                                                                                                            String str106 = str34;
                                                                                                                            str50 = str38;
                                                                                                                            str51 = str106;
                                                                                                                            i32 = m6877(c79584.f17779) | i32;
                                                                                                                        } else {
                                                                                                                            String str107 = str34;
                                                                                                                            str50 = str38;
                                                                                                                            str51 = str107;
                                                                                                                        }
                                                                                                                        i31++;
                                                                                                                        arrayList35 = arrayList36;
                                                                                                                        String str108 = str50;
                                                                                                                        str34 = str51;
                                                                                                                        str38 = str108;
                                                                                                                    }
                                                                                                                    ArrayList arrayList37 = arrayList35;
                                                                                                                    String str109 = str34;
                                                                                                                    String str110 = str38;
                                                                                                                    int i33 = 0;
                                                                                                                    int i34 = 0;
                                                                                                                    while (i33 < arrayList15.size()) {
                                                                                                                        ArrayList arrayList38 = arrayList15;
                                                                                                                        ArrayList arrayList39 = arrayList17;
                                                                                                                        C7958 c79585 = (C7958) arrayList38.get(i33);
                                                                                                                        ArrayList arrayList40 = arrayList16;
                                                                                                                        if (C7435.m6463(str104, c79585.f17777)) {
                                                                                                                            i34 |= m6877(c79585.f17779);
                                                                                                                            str49 = str104;
                                                                                                                        } else {
                                                                                                                            str49 = str104;
                                                                                                                            if (C7435.m6463("urn:tva:metadata:cs:AudioPurposeCS:2007", c79585.f17777)) {
                                                                                                                                String str111 = c79585.f17779;
                                                                                                                                if (str111 != null) {
                                                                                                                                    str111.hashCode();
                                                                                                                                    char c = 65535;
                                                                                                                                    switch (str111.hashCode()) {
                                                                                                                                        case 49:
                                                                                                                                            if (str111.equals(CLVideoWrapperKt.CL_VIDEO_TYPE_SHORT)) {
                                                                                                                                                c = 0;
                                                                                                                                                break;
                                                                                                                                            }
                                                                                                                                            break;
                                                                                                                                        case 50:
                                                                                                                                            if (str111.equals("2")) {
                                                                                                                                                c = 1;
                                                                                                                                                break;
                                                                                                                                            }
                                                                                                                                            break;
                                                                                                                                        case 51:
                                                                                                                                            if (str111.equals("3")) {
                                                                                                                                                c = 2;
                                                                                                                                                break;
                                                                                                                                            }
                                                                                                                                            break;
                                                                                                                                        case 52:
                                                                                                                                            if (str111.equals("4")) {
                                                                                                                                                c = 3;
                                                                                                                                                break;
                                                                                                                                            }
                                                                                                                                            break;
                                                                                                                                        case 54:
                                                                                                                                            if (str111.equals("6")) {
                                                                                                                                                c = 4;
                                                                                                                                                break;
                                                                                                                                            }
                                                                                                                                            break;
                                                                                                                                    }
                                                                                                                                    switch (c) {
                                                                                                                                        case 0:
                                                                                                                                            i13 = 512;
                                                                                                                                            break;
                                                                                                                                        case 1:
                                                                                                                                            i13 = 2048;
                                                                                                                                            break;
                                                                                                                                        case 2:
                                                                                                                                            i13 = 4;
                                                                                                                                            break;
                                                                                                                                        case 3:
                                                                                                                                            i13 = 8;
                                                                                                                                            break;
                                                                                                                                        case 4:
                                                                                                                                            i13 = 1;
                                                                                                                                            break;
                                                                                                                                    }
                                                                                                                                    i34 |= i13;
                                                                                                                                }
                                                                                                                                i13 = 0;
                                                                                                                                i34 |= i13;
                                                                                                                            }
                                                                                                                        }
                                                                                                                        i33++;
                                                                                                                        str104 = str49;
                                                                                                                        arrayList16 = arrayList40;
                                                                                                                        arrayList17 = arrayList39;
                                                                                                                        arrayList15 = arrayList38;
                                                                                                                    }
                                                                                                                    ArrayList arrayList41 = arrayList16;
                                                                                                                    ArrayList arrayList42 = arrayList17;
                                                                                                                    ArrayList arrayList43 = arrayList15;
                                                                                                                    int m6873 = i32 | i34 | m6873(arrayList18) | m6873(arrayList19);
                                                                                                                    C3737.C3739 c3739 = new C3737.C3739();
                                                                                                                    c3739.f9331 = attributeValue13;
                                                                                                                    c3739.f9344 = str45;
                                                                                                                    c3739.f9347 = m3421;
                                                                                                                    c3739.f9354 = str102;
                                                                                                                    c3739.f9359 = i7;
                                                                                                                    c3739.f9348 = i30;
                                                                                                                    c3739.f9336 = m6873;
                                                                                                                    String str112 = str33;
                                                                                                                    c3739.f9333 = str112;
                                                                                                                    if (C3320.m3417(m3421)) {
                                                                                                                        c3739.f9339 = m68606;
                                                                                                                        c3739.f9353 = m68607;
                                                                                                                        c3739.f9357 = m68562;
                                                                                                                    } else if (C3320.m3424(m3421)) {
                                                                                                                        c3739.f9349 = i10;
                                                                                                                        c3739.f9341 = m68608;
                                                                                                                    } else if (C3320.m3426(m3421)) {
                                                                                                                        if ("application/cea-608".equals(m3421)) {
                                                                                                                            for (int i35 = 0; i35 < arrayList43.size(); i35++) {
                                                                                                                                C7958 c79586 = (C7958) arrayList43.get(i35);
                                                                                                                                if ("urn:scte:dash:cc:cea-608:2015".equals(c79586.f17777) && (str48 = c79586.f17779) != null) {
                                                                                                                                    Matcher matcher = f17715.matcher(str48);
                                                                                                                                    if (matcher.matches()) {
                                                                                                                                        z3 = true;
                                                                                                                                        parseInt = Integer.parseInt(matcher.group(1));
                                                                                                                                        c3739.f9337 = parseInt;
                                                                                                                                        C3737 m3954 = c3739.m3954();
                                                                                                                                        C7943 c7943 = new C7943(m3954, str30, abstractC79503 != null ? abstractC79503 : new AbstractC7950.C7953(), str44, arrayList41, arrayList42, -1L);
                                                                                                                                        int m6857 = m6857(i6, C3320.m3420(m3954.f9322));
                                                                                                                                        arrayList8.add(c7943);
                                                                                                                                        xmlPullParser6 = xmlPullParser;
                                                                                                                                        arrayList10 = arrayList37;
                                                                                                                                        str15 = str112;
                                                                                                                                        i19 = m6857;
                                                                                                                                        c79424 = this;
                                                                                                                                        arrayList12 = arrayList43;
                                                                                                                                        str25 = str110;
                                                                                                                                        str24 = str109;
                                                                                                                                        str26 = str35;
                                                                                                                                    } else {
                                                                                                                                        String valueOf = String.valueOf(c79586.f17779);
                                                                                                                                        Log.w("MpdParser", valueOf.length() != 0 ? "Unable to parse CEA-608 channel number from: ".concat(valueOf) : new String("Unable to parse CEA-608 channel number from: "));
                                                                                                                                    }
                                                                                                                                }
                                                                                                                            }
                                                                                                                            z3 = true;
                                                                                                                            parseInt = i11;
                                                                                                                            c3739.f9337 = parseInt;
                                                                                                                            C3737 m39542 = c3739.m3954();
                                                                                                                            C7943 c79432 = new C7943(m39542, str30, abstractC79503 != null ? abstractC79503 : new AbstractC7950.C7953(), str44, arrayList41, arrayList42, -1L);
                                                                                                                            int m68572 = m6857(i6, C3320.m3420(m39542.f9322));
                                                                                                                            arrayList8.add(c79432);
                                                                                                                            xmlPullParser6 = xmlPullParser;
                                                                                                                            arrayList10 = arrayList37;
                                                                                                                            str15 = str112;
                                                                                                                            i19 = m68572;
                                                                                                                            c79424 = this;
                                                                                                                            arrayList12 = arrayList43;
                                                                                                                            str25 = str110;
                                                                                                                            str24 = str109;
                                                                                                                            str26 = str35;
                                                                                                                        } else {
                                                                                                                            if ("application/cea-708".equals(m3421)) {
                                                                                                                                for (int i36 = 0; i36 < arrayList43.size(); i36++) {
                                                                                                                                    C7958 c79587 = (C7958) arrayList43.get(i36);
                                                                                                                                    if ("urn:scte:dash:cc:cea-708:2015".equals(c79587.f17777) && (str47 = c79587.f17779) != null) {
                                                                                                                                        Matcher matcher2 = f17718.matcher(str47);
                                                                                                                                        if (matcher2.matches()) {
                                                                                                                                            parseInt = Integer.parseInt(matcher2.group(1));
                                                                                                                                            z3 = true;
                                                                                                                                            c3739.f9337 = parseInt;
                                                                                                                                            C3737 m395422 = c3739.m3954();
                                                                                                                                            C7943 c794322 = new C7943(m395422, str30, abstractC79503 != null ? abstractC79503 : new AbstractC7950.C7953(), str44, arrayList41, arrayList42, -1L);
                                                                                                                                            int m685722 = m6857(i6, C3320.m3420(m395422.f9322));
                                                                                                                                            arrayList8.add(c794322);
                                                                                                                                            xmlPullParser6 = xmlPullParser;
                                                                                                                                            arrayList10 = arrayList37;
                                                                                                                                            str15 = str112;
                                                                                                                                            i19 = m685722;
                                                                                                                                            c79424 = this;
                                                                                                                                            arrayList12 = arrayList43;
                                                                                                                                            str25 = str110;
                                                                                                                                            str24 = str109;
                                                                                                                                            str26 = str35;
                                                                                                                                        } else {
                                                                                                                                            String valueOf2 = String.valueOf(c79587.f17779);
                                                                                                                                            Log.w("MpdParser", valueOf2.length() != 0 ? "Unable to parse CEA-708 service block number from: ".concat(valueOf2) : new String("Unable to parse CEA-708 service block number from: "));
                                                                                                                                        }
                                                                                                                                    }
                                                                                                                                }
                                                                                                                            }
                                                                                                                            z3 = true;
                                                                                                                            parseInt = i11;
                                                                                                                            c3739.f9337 = parseInt;
                                                                                                                            C3737 m3954222 = c3739.m3954();
                                                                                                                            C7943 c7943222 = new C7943(m3954222, str30, abstractC79503 != null ? abstractC79503 : new AbstractC7950.C7953(), str44, arrayList41, arrayList42, -1L);
                                                                                                                            int m6857222 = m6857(i6, C3320.m3420(m3954222.f9322));
                                                                                                                            arrayList8.add(c7943222);
                                                                                                                            xmlPullParser6 = xmlPullParser;
                                                                                                                            arrayList10 = arrayList37;
                                                                                                                            str15 = str112;
                                                                                                                            i19 = m6857222;
                                                                                                                            c79424 = this;
                                                                                                                            arrayList12 = arrayList43;
                                                                                                                            str25 = str110;
                                                                                                                            str24 = str109;
                                                                                                                            str26 = str35;
                                                                                                                        }
                                                                                                                        z2 = z3;
                                                                                                                        str83 = str22;
                                                                                                                        str52 = str76;
                                                                                                                        str84 = str15;
                                                                                                                        j24 = j5;
                                                                                                                        str53 = str17;
                                                                                                                        if (C1804.m1894(xmlPullParser6, str53)) {
                                                                                                                        }
                                                                                                                    }
                                                                                                                    z3 = true;
                                                                                                                    C3737 m39542222 = c3739.m3954();
                                                                                                                    C7943 c79432222 = new C7943(m39542222, str30, abstractC79503 != null ? abstractC79503 : new AbstractC7950.C7953(), str44, arrayList41, arrayList42, -1L);
                                                                                                                    int m68572222 = m6857(i6, C3320.m3420(m39542222.f9322));
                                                                                                                    arrayList8.add(c79432222);
                                                                                                                    xmlPullParser6 = xmlPullParser;
                                                                                                                    arrayList10 = arrayList37;
                                                                                                                    str15 = str112;
                                                                                                                    i19 = m68572222;
                                                                                                                    c79424 = this;
                                                                                                                    arrayList12 = arrayList43;
                                                                                                                    str25 = str110;
                                                                                                                    str24 = str109;
                                                                                                                    str26 = str35;
                                                                                                                }
                                                                                                            }
                                                                                                        }
                                                                                                    }
                                                                                                }
                                                                                                str46 = null;
                                                                                                m3421 = str46;
                                                                                                String str1022 = "ec+3";
                                                                                                if ("audio/eac3".equals(m3421)) {
                                                                                                }
                                                                                                str1022 = str27;
                                                                                                i12 = 0;
                                                                                                int i302 = 0;
                                                                                                while (true) {
                                                                                                    String str1042 = "urn:mpeg:dash:role:2011";
                                                                                                    if (i12 >= arrayList14.size()) {
                                                                                                    }
                                                                                                    i12++;
                                                                                                    arrayList14 = arrayList34;
                                                                                                }
                                                                                            } else {
                                                                                                m3421 = str45;
                                                                                                String str10222 = "ec+3";
                                                                                                if ("audio/eac3".equals(m3421)) {
                                                                                                }
                                                                                                str10222 = str27;
                                                                                                i12 = 0;
                                                                                                int i3022 = 0;
                                                                                                while (true) {
                                                                                                    String str10422 = "urn:mpeg:dash:role:2011";
                                                                                                    if (i12 >= arrayList14.size()) {
                                                                                                    }
                                                                                                    i12++;
                                                                                                    arrayList14 = arrayList34;
                                                                                                }
                                                                                            }
                                                                                        } else {
                                                                                            str45 = str91;
                                                                                            if ("application/mp4".equals(str45)) {
                                                                                                m3421 = C3320.m3421(str27);
                                                                                                if ("text/vtt".equals(m3421)) {
                                                                                                    str46 = "application/x-mp4-vtt";
                                                                                                    m3421 = str46;
                                                                                                }
                                                                                                String str102222 = "ec+3";
                                                                                                if ("audio/eac3".equals(m3421)) {
                                                                                                }
                                                                                                str102222 = str27;
                                                                                                i12 = 0;
                                                                                                int i30222 = 0;
                                                                                                while (true) {
                                                                                                    String str104222 = "urn:mpeg:dash:role:2011";
                                                                                                    if (i12 >= arrayList14.size()) {
                                                                                                    }
                                                                                                    i12++;
                                                                                                    arrayList14 = arrayList34;
                                                                                                }
                                                                                            }
                                                                                            str46 = null;
                                                                                            m3421 = str46;
                                                                                            String str1022222 = "ec+3";
                                                                                            if ("audio/eac3".equals(m3421)) {
                                                                                            }
                                                                                            str1022222 = str27;
                                                                                            i12 = 0;
                                                                                            int i302222 = 0;
                                                                                            while (true) {
                                                                                                String str1042222 = "urn:mpeg:dash:role:2011";
                                                                                                if (i12 >= arrayList14.size()) {
                                                                                                }
                                                                                                i12++;
                                                                                                arrayList14 = arrayList34;
                                                                                            }
                                                                                        }
                                                                                        str45 = str91;
                                                                                        String str10222222 = "ec+3";
                                                                                        if ("audio/eac3".equals(m3421)) {
                                                                                        }
                                                                                        str10222222 = str27;
                                                                                        i12 = 0;
                                                                                        int i3022222 = 0;
                                                                                        while (true) {
                                                                                            String str10422222 = "urn:mpeg:dash:role:2011";
                                                                                            if (i12 >= arrayList14.size()) {
                                                                                            }
                                                                                            i12++;
                                                                                            arrayList14 = arrayList34;
                                                                                        }
                                                                                    } else {
                                                                                        arrayList30 = arrayList16;
                                                                                        arrayList31 = arrayList17;
                                                                                        str89 = str39;
                                                                                        str88 = str40;
                                                                                        arrayList32 = arrayList18;
                                                                                        str99 = str44;
                                                                                        arrayList33 = arrayList19;
                                                                                        i28 = i10;
                                                                                        str87 = str43;
                                                                                        arrayList25 = arrayList15;
                                                                                        c79427 = this;
                                                                                        str83 = str22;
                                                                                        str98 = str18;
                                                                                        str95 = str20;
                                                                                        str58 = str4;
                                                                                        i25 = i;
                                                                                        str75 = str34;
                                                                                        str57 = str5;
                                                                                        arrayList28 = arrayList11;
                                                                                        i27 = i3;
                                                                                        str73 = str2;
                                                                                        str100 = str30;
                                                                                        str90 = str14;
                                                                                        str67 = str6;
                                                                                        str29 = str33;
                                                                                        str74 = str11;
                                                                                        arrayList24 = arrayList9;
                                                                                        arrayList29 = arrayList8;
                                                                                        j26 = j7;
                                                                                        xmlPullParser6 = xmlPullParser;
                                                                                        str93 = str37;
                                                                                        str28 = str21;
                                                                                        str97 = str23;
                                                                                        str71 = str38;
                                                                                        m68606 = m68606;
                                                                                        str77 = str35;
                                                                                        m68562 = m68562;
                                                                                        str68 = str16;
                                                                                        arrayList5 = arrayList14;
                                                                                        str86 = str41;
                                                                                        str85 = str36;
                                                                                        j4 = j5;
                                                                                        str66 = str12;
                                                                                        i24 = i6;
                                                                                        i23 = i2;
                                                                                        str70 = str17;
                                                                                        f8 = f;
                                                                                        j22 = j3;
                                                                                        i26 = i7;
                                                                                    }
                                                                                } else {
                                                                                    i9 = -1;
                                                                                    str12 = str66;
                                                                                    j7 = j26;
                                                                                    str30 = str100;
                                                                                    str6 = str67;
                                                                                    str16 = str68;
                                                                                    str17 = str70;
                                                                                    str38 = str71;
                                                                                    arrayList8 = arrayList29;
                                                                                    str11 = str74;
                                                                                    arrayList9 = arrayList24;
                                                                                    str23 = str97;
                                                                                    str33 = str29;
                                                                                    arrayList14 = arrayList5;
                                                                                    str14 = str90;
                                                                                    i2 = i23;
                                                                                    i6 = i24;
                                                                                    i7 = i26;
                                                                                    str21 = str28;
                                                                                    str22 = str83;
                                                                                    arrayList15 = arrayList25;
                                                                                    arrayList11 = arrayList28;
                                                                                    str18 = str98;
                                                                                    xmlPullParser4 = xmlPullParser6;
                                                                                    i = i25;
                                                                                    str2 = str73;
                                                                                    str35 = str77;
                                                                                    str37 = str93;
                                                                                    j5 = j4;
                                                                                    str40 = str88;
                                                                                    str20 = str95;
                                                                                    arrayList19 = arrayList33;
                                                                                    i3 = i27;
                                                                                    arrayList16 = arrayList30;
                                                                                    arrayList17 = arrayList31;
                                                                                    arrayList18 = arrayList32;
                                                                                    str36 = str85;
                                                                                    str5 = str57;
                                                                                    str34 = str75;
                                                                                    str41 = str86;
                                                                                    long j28 = j22;
                                                                                    str4 = str58;
                                                                                    str39 = str89;
                                                                                    f = f8;
                                                                                    j3 = j28;
                                                                                    str43 = str87;
                                                                                    str44 = str99;
                                                                                    i10 = i28;
                                                                                    if (C1804.m1894(xmlPullParser4, str43)) {
                                                                                    }
                                                                                }
                                                                            } else if (C1804.m1909(xmlPullParser6, str85)) {
                                                                                i28 = m6876(xmlPullParser);
                                                                                str30 = str100;
                                                                                str31 = str77;
                                                                                str42 = str28;
                                                                                str12 = str66;
                                                                                i9 = -1;
                                                                                j7 = j26;
                                                                                str6 = str67;
                                                                                str16 = str68;
                                                                                str17 = str70;
                                                                                str38 = str71;
                                                                                arrayList8 = arrayList29;
                                                                                str11 = str74;
                                                                                arrayList9 = arrayList24;
                                                                                str21 = str42;
                                                                                str23 = str97;
                                                                                str37 = str93;
                                                                                str33 = str29;
                                                                                arrayList14 = arrayList5;
                                                                                str43 = str87;
                                                                                str14 = str90;
                                                                                i2 = i23;
                                                                                i6 = i24;
                                                                                i7 = i26;
                                                                                str22 = str83;
                                                                                arrayList15 = arrayList25;
                                                                                arrayList11 = arrayList28;
                                                                                str18 = str98;
                                                                                i = i25;
                                                                                str5 = str57;
                                                                                str35 = str31;
                                                                                str2 = str73;
                                                                                str34 = str75;
                                                                                j5 = j4;
                                                                                str40 = str88;
                                                                                str20 = str95;
                                                                                arrayList19 = arrayList33;
                                                                                i3 = i27;
                                                                                arrayList16 = arrayList30;
                                                                                arrayList17 = arrayList31;
                                                                                arrayList18 = arrayList32;
                                                                                i10 = i28;
                                                                                xmlPullParser4 = xmlPullParser6;
                                                                                str36 = str85;
                                                                                str41 = str86;
                                                                                str44 = str99;
                                                                                long j272 = j22;
                                                                                str4 = str58;
                                                                                str39 = str89;
                                                                                f = f8;
                                                                                j3 = j272;
                                                                                if (C1804.m1894(xmlPullParser4, str43)) {
                                                                                }
                                                                            } else {
                                                                                str30 = str100;
                                                                                str31 = str77;
                                                                                if (C1804.m1909(xmlPullParser6, str31)) {
                                                                                    str42 = str28;
                                                                                    abstractC79503 = c79427.m6869(xmlPullParser6, (AbstractC7950.C7953) abstractC79503);
                                                                                    str12 = str66;
                                                                                    i9 = -1;
                                                                                    j7 = j26;
                                                                                    str6 = str67;
                                                                                    str16 = str68;
                                                                                    str17 = str70;
                                                                                    str38 = str71;
                                                                                    arrayList8 = arrayList29;
                                                                                    str11 = str74;
                                                                                    arrayList9 = arrayList24;
                                                                                    str21 = str42;
                                                                                    str23 = str97;
                                                                                    str37 = str93;
                                                                                    str33 = str29;
                                                                                    arrayList14 = arrayList5;
                                                                                    str43 = str87;
                                                                                    str14 = str90;
                                                                                    i2 = i23;
                                                                                    i6 = i24;
                                                                                    i7 = i26;
                                                                                    str22 = str83;
                                                                                    arrayList15 = arrayList25;
                                                                                    arrayList11 = arrayList28;
                                                                                    str18 = str98;
                                                                                    i = i25;
                                                                                    str5 = str57;
                                                                                    str35 = str31;
                                                                                    str2 = str73;
                                                                                    str34 = str75;
                                                                                    j5 = j4;
                                                                                    str40 = str88;
                                                                                    str20 = str95;
                                                                                    arrayList19 = arrayList33;
                                                                                    i3 = i27;
                                                                                    arrayList16 = arrayList30;
                                                                                    arrayList17 = arrayList31;
                                                                                    arrayList18 = arrayList32;
                                                                                    i10 = i28;
                                                                                    xmlPullParser4 = xmlPullParser6;
                                                                                    str36 = str85;
                                                                                    str41 = str86;
                                                                                    str44 = str99;
                                                                                    long j2722 = j22;
                                                                                    str4 = str58;
                                                                                    str39 = str89;
                                                                                    f = f8;
                                                                                    j3 = j2722;
                                                                                    if (C1804.m1894(xmlPullParser4, str43)) {
                                                                                    }
                                                                                } else {
                                                                                    String str113 = str28;
                                                                                    String str114 = str75;
                                                                                    if (C1804.m1909(xmlPullParser6, str114)) {
                                                                                        m6879 = c79427.m6879(xmlPullParser6, j25);
                                                                                        i8 = -1;
                                                                                        ArrayList arrayList44 = arrayList5;
                                                                                        str34 = str114;
                                                                                        str35 = str31;
                                                                                        str16 = str68;
                                                                                        str17 = str70;
                                                                                        str21 = str113;
                                                                                        str14 = str90;
                                                                                        i7 = i26;
                                                                                        str12 = str66;
                                                                                        arrayList14 = arrayList44;
                                                                                        str6 = str67;
                                                                                        str33 = str29;
                                                                                        i2 = i23;
                                                                                        str22 = str83;
                                                                                        long j29 = j22;
                                                                                        f = f8;
                                                                                        j3 = j29;
                                                                                        str4 = str58;
                                                                                        str11 = str74;
                                                                                        arrayList9 = arrayList24;
                                                                                        arrayList15 = arrayList25;
                                                                                        arrayList11 = arrayList28;
                                                                                        i = i25;
                                                                                        arrayList8 = arrayList29;
                                                                                        str18 = str98;
                                                                                        j5 = j4;
                                                                                        i3 = i27;
                                                                                        xmlPullParser4 = xmlPullParser6;
                                                                                        str36 = str85;
                                                                                        i6 = i24;
                                                                                        str2 = str73;
                                                                                        str32 = str93;
                                                                                        str20 = str95;
                                                                                        str5 = str57;
                                                                                        abstractC79503 = m6868(xmlPullParser, (AbstractC7950.C7954) abstractC79503, j19, m68647, j26, m6879, m68644);
                                                                                        j7 = j26;
                                                                                        str38 = str71;
                                                                                        str23 = str97;
                                                                                    } else {
                                                                                        str12 = str66;
                                                                                        str6 = str67;
                                                                                        str16 = str68;
                                                                                        str17 = str70;
                                                                                        arrayList8 = arrayList29;
                                                                                        str11 = str74;
                                                                                        arrayList9 = arrayList24;
                                                                                        str21 = str113;
                                                                                        str32 = str93;
                                                                                        str33 = str29;
                                                                                        arrayList14 = arrayList5;
                                                                                        str14 = str90;
                                                                                        i2 = i23;
                                                                                        i6 = i24;
                                                                                        i7 = i26;
                                                                                        str34 = str114;
                                                                                        str22 = str83;
                                                                                        arrayList15 = arrayList25;
                                                                                        arrayList11 = arrayList28;
                                                                                        str18 = str98;
                                                                                        i = i25;
                                                                                        str5 = str57;
                                                                                        str35 = str31;
                                                                                        str2 = str73;
                                                                                        j5 = j4;
                                                                                        str20 = str95;
                                                                                        i3 = i27;
                                                                                        xmlPullParser4 = xmlPullParser6;
                                                                                        str36 = str85;
                                                                                        long j30 = j22;
                                                                                        str4 = str58;
                                                                                        f = f8;
                                                                                        j3 = j30;
                                                                                        i8 = -1;
                                                                                        String str115 = str71;
                                                                                        if (C1804.m1909(xmlPullParser4, str115)) {
                                                                                            m6879 = c79427.m6879(xmlPullParser4, j25);
                                                                                            j7 = j26;
                                                                                            str23 = str97;
                                                                                            str38 = str115;
                                                                                            abstractC79503 = m6878(xmlPullParser, (AbstractC7950.C7952) abstractC79503, arrayList11, j19, m68647, j26, m6879, m68644);
                                                                                        } else {
                                                                                            j7 = j26;
                                                                                            str23 = str97;
                                                                                            str37 = str32;
                                                                                            str38 = str115;
                                                                                            if (C1804.m1909(xmlPullParser4, str37)) {
                                                                                                Pair<String, C5650.C5652> m68652 = m6865(xmlPullParser);
                                                                                                Object obj3 = m68652.first;
                                                                                                if (obj3 != null) {
                                                                                                    str99 = (String) obj3;
                                                                                                }
                                                                                                Object obj4 = m68652.second;
                                                                                                if (obj4 != null) {
                                                                                                    arrayList16 = arrayList30;
                                                                                                    arrayList16.add((C5650.C5652) obj4);
                                                                                                } else {
                                                                                                    arrayList16 = arrayList30;
                                                                                                }
                                                                                                str39 = str89;
                                                                                                arrayList17 = arrayList31;
                                                                                                i9 = i8;
                                                                                                str40 = str88;
                                                                                                arrayList18 = arrayList32;
                                                                                                str41 = str86;
                                                                                                arrayList19 = arrayList33;
                                                                                                str43 = str87;
                                                                                                str44 = str99;
                                                                                                i10 = i28;
                                                                                                if (C1804.m1894(xmlPullParser4, str43)) {
                                                                                                }
                                                                                            } else {
                                                                                                str39 = str89;
                                                                                                arrayList16 = arrayList30;
                                                                                                if (C1804.m1909(xmlPullParser4, str39)) {
                                                                                                    arrayList17 = arrayList31;
                                                                                                    arrayList17.add(m6861(xmlPullParser4, str39));
                                                                                                    i9 = i8;
                                                                                                    str40 = str88;
                                                                                                    arrayList18 = arrayList32;
                                                                                                    str41 = str86;
                                                                                                    arrayList19 = arrayList33;
                                                                                                    str43 = str87;
                                                                                                    str44 = str99;
                                                                                                    i10 = i28;
                                                                                                    if (C1804.m1894(xmlPullParser4, str43)) {
                                                                                                    }
                                                                                                } else {
                                                                                                    str40 = str88;
                                                                                                    arrayList17 = arrayList31;
                                                                                                    if (C1804.m1909(xmlPullParser4, str40)) {
                                                                                                        arrayList18 = arrayList32;
                                                                                                        arrayList18.add(m6861(xmlPullParser4, str40));
                                                                                                        i9 = -1;
                                                                                                        str41 = str86;
                                                                                                        arrayList19 = arrayList33;
                                                                                                        str43 = str87;
                                                                                                        str44 = str99;
                                                                                                        i10 = i28;
                                                                                                        if (C1804.m1894(xmlPullParser4, str43)) {
                                                                                                        }
                                                                                                    } else {
                                                                                                        str41 = str86;
                                                                                                        arrayList18 = arrayList32;
                                                                                                        if (C1804.m1909(xmlPullParser4, str41)) {
                                                                                                            arrayList19 = arrayList33;
                                                                                                            arrayList19.add(m6861(xmlPullParser4, str41));
                                                                                                        } else {
                                                                                                            arrayList19 = arrayList33;
                                                                                                            m6859(xmlPullParser);
                                                                                                        }
                                                                                                        i9 = -1;
                                                                                                        str43 = str87;
                                                                                                        str44 = str99;
                                                                                                        i10 = i28;
                                                                                                        if (C1804.m1894(xmlPullParser4, str43)) {
                                                                                                        }
                                                                                                    }
                                                                                                }
                                                                                            }
                                                                                        }
                                                                                    }
                                                                                    j25 = m6879;
                                                                                    arrayList16 = arrayList30;
                                                                                    str37 = str32;
                                                                                    str39 = str89;
                                                                                    arrayList17 = arrayList31;
                                                                                    i9 = i8;
                                                                                    str40 = str88;
                                                                                    arrayList18 = arrayList32;
                                                                                    str41 = str86;
                                                                                    arrayList19 = arrayList33;
                                                                                    str43 = str87;
                                                                                    str44 = str99;
                                                                                    i10 = i28;
                                                                                    if (C1804.m1894(xmlPullParser4, str43)) {
                                                                                    }
                                                                                }
                                                                            }
                                                                        }
                                                                    } else {
                                                                        str12 = str66;
                                                                        str14 = str65;
                                                                        str15 = str84;
                                                                        arrayList7 = arrayList27;
                                                                        str6 = str67;
                                                                        str16 = str68;
                                                                        str17 = str70;
                                                                        arrayList8 = arrayList29;
                                                                        str2 = str73;
                                                                        j3 = j22;
                                                                        str11 = str74;
                                                                        f = f6;
                                                                        arrayList9 = arrayList24;
                                                                        str18 = str78;
                                                                        i = i15;
                                                                        str19 = str81;
                                                                        str20 = str82;
                                                                        str21 = str80;
                                                                        i2 = i17;
                                                                        j5 = j4;
                                                                        arrayList10 = arrayList5;
                                                                        str22 = str83;
                                                                        str4 = str58;
                                                                        arrayList11 = arrayList28;
                                                                        str5 = str57;
                                                                        String str116 = str75;
                                                                        String str117 = str77;
                                                                        i3 = i18;
                                                                        ArrayList arrayList45 = arrayList25;
                                                                        i4 = i19;
                                                                        String str118 = str71;
                                                                        str23 = str72;
                                                                        if (C1804.m1909(xmlPullParser6, str117)) {
                                                                            m6868 = c79427.m6869(xmlPullParser6, (AbstractC7950.C7953) abstractC79502);
                                                                            xmlPullParser3 = xmlPullParser6;
                                                                            arrayList12 = arrayList45;
                                                                            str24 = str116;
                                                                            c79423 = c79427;
                                                                        } else if (C1804.m1909(xmlPullParser6, str116)) {
                                                                            j23 = c79427.m6879(xmlPullParser6, j23);
                                                                            xmlPullParser3 = xmlPullParser6;
                                                                            str24 = str116;
                                                                            arrayList12 = arrayList45;
                                                                            c79423 = c79427;
                                                                            m6868 = m6868(xmlPullParser, (AbstractC7950.C7954) abstractC79502, j19, m68647, j5, j23, m68644);
                                                                        } else {
                                                                            xmlPullParser3 = xmlPullParser6;
                                                                            str24 = str116;
                                                                            arrayList12 = arrayList45;
                                                                            j6 = j23;
                                                                            C7942 c79428 = c79427;
                                                                            if (C1804.m1909(xmlPullParser3, str118)) {
                                                                                long m68792 = c79428.m6879(xmlPullParser3, j6);
                                                                                str25 = str118;
                                                                                c79422 = c79428;
                                                                                str26 = str117;
                                                                                abstractC79502 = m6878(xmlPullParser, (AbstractC7950.C7952) abstractC79502, arrayList11, j19, m68647, j5, m68792, m68644);
                                                                                j23 = m68792;
                                                                                xmlPullParser6 = xmlPullParser3;
                                                                                z3 = true;
                                                                                i19 = i4;
                                                                                c79424 = c79422;
                                                                            } else {
                                                                                str25 = str118;
                                                                                c7942 = c79428;
                                                                                str26 = str117;
                                                                                if (C1804.m1909(xmlPullParser3, "InbandEventStream")) {
                                                                                    arrayList13 = arrayList9;
                                                                                    arrayList13.add(m6861(xmlPullParser3, "InbandEventStream"));
                                                                                } else {
                                                                                    arrayList13 = arrayList9;
                                                                                    if (C1804.m1909(xmlPullParser3, "Label")) {
                                                                                        str76 = m6863(xmlPullParser3, "Label");
                                                                                    } else if (C1804.m1893(xmlPullParser)) {
                                                                                        m6859(xmlPullParser);
                                                                                    }
                                                                                }
                                                                                z3 = true;
                                                                                j23 = j6;
                                                                                xmlPullParser6 = xmlPullParser3;
                                                                                i19 = i4;
                                                                                z2 = z3;
                                                                                str83 = str22;
                                                                                str52 = str76;
                                                                                str84 = str15;
                                                                                j24 = j5;
                                                                                str53 = str17;
                                                                                if (C1804.m1894(xmlPullParser6, str53)) {
                                                                                }
                                                                            }
                                                                        }
                                                                        abstractC79502 = m6868;
                                                                        str25 = str118;
                                                                        c79422 = c79423;
                                                                        str26 = str117;
                                                                        xmlPullParser6 = xmlPullParser3;
                                                                        z3 = true;
                                                                        i19 = i4;
                                                                        c79424 = c79422;
                                                                    }
                                                                    c7942 = c79424;
                                                                    arrayList13 = arrayList9;
                                                                    z2 = z3;
                                                                    str83 = str22;
                                                                    str52 = str76;
                                                                    str84 = str15;
                                                                    j24 = j5;
                                                                    str53 = str17;
                                                                    if (C1804.m1894(xmlPullParser6, str53)) {
                                                                    }
                                                                }
                                                            }
                                                        }
                                                    }
                                                    arrayList6 = arrayList23;
                                                    z3 = true;
                                                    str12 = str66;
                                                    str14 = str65;
                                                    str15 = str84;
                                                    arrayList7 = arrayList27;
                                                    str6 = str67;
                                                    str16 = str68;
                                                    str17 = str70;
                                                    str25 = str71;
                                                    arrayList8 = arrayList29;
                                                    str2 = str73;
                                                    j3 = j22;
                                                    str11 = str74;
                                                    f = f6;
                                                    str24 = str75;
                                                    str26 = str77;
                                                    str18 = str78;
                                                    str19 = str81;
                                                    str20 = str82;
                                                    str21 = str80;
                                                    i2 = i17;
                                                    j6 = j23;
                                                    j5 = j4;
                                                    arrayList10 = arrayList5;
                                                    c7942 = c79427;
                                                    str22 = str83;
                                                    str4 = str58;
                                                    arrayList11 = arrayList28;
                                                    i4 = i19;
                                                    xmlPullParser3 = xmlPullParser6;
                                                    str5 = str57;
                                                    str23 = str72;
                                                    arrayList13 = arrayList24;
                                                    i = i15;
                                                    i3 = i18;
                                                    arrayList12 = arrayList25;
                                                    j23 = j6;
                                                    xmlPullParser6 = xmlPullParser3;
                                                    i19 = i4;
                                                    z2 = z3;
                                                    str83 = str22;
                                                    str52 = str76;
                                                    str84 = str15;
                                                    j24 = j5;
                                                    str53 = str17;
                                                    if (C1804.m1894(xmlPullParser6, str53)) {
                                                    }
                                                }
                                                j24 = j4;
                                                str12 = str66;
                                                str14 = str65;
                                                arrayList6 = arrayList23;
                                                arrayList7 = arrayList27;
                                                str6 = str67;
                                                str16 = str68;
                                                str25 = str71;
                                                arrayList8 = arrayList29;
                                                str2 = str73;
                                                j3 = j22;
                                                str11 = str74;
                                                f = f6;
                                                str24 = str75;
                                                str26 = str77;
                                                str18 = str78;
                                                str19 = str81;
                                                str20 = str82;
                                                str21 = str80;
                                                z2 = true;
                                                arrayList10 = arrayList26;
                                                c7942 = c79427;
                                                str4 = str58;
                                                str5 = str57;
                                                str23 = str72;
                                                str53 = str70;
                                                arrayList13 = arrayList24;
                                                str52 = str76;
                                                i = i15;
                                                i3 = i18;
                                                i2 = i17;
                                                arrayList12 = arrayList25;
                                                arrayList11 = arrayList28;
                                                if (C1804.m1894(xmlPullParser6, str53)) {
                                                }
                                            } else if (!z8) {
                                                j24 = c79427.m6879(xmlPullParser6, j24);
                                                str83 = c79427.m6875(xmlPullParser6, str83);
                                                z8 = true;
                                                str12 = str66;
                                                str14 = str65;
                                                arrayList6 = arrayList23;
                                                arrayList7 = arrayList27;
                                                str6 = str67;
                                                str16 = str68;
                                                str25 = str71;
                                                arrayList8 = arrayList29;
                                                str2 = str73;
                                                j3 = j22;
                                                str11 = str74;
                                                f = f6;
                                                str24 = str75;
                                                str26 = str77;
                                                str18 = str78;
                                                str19 = str81;
                                                str20 = str82;
                                                str21 = str80;
                                                z2 = true;
                                                arrayList10 = arrayList26;
                                                c7942 = c79427;
                                                str4 = str58;
                                                str5 = str57;
                                                str23 = str72;
                                                str53 = str70;
                                                arrayList13 = arrayList24;
                                                str52 = str76;
                                                i = i15;
                                                i3 = i18;
                                                i2 = i17;
                                                arrayList12 = arrayList25;
                                                arrayList11 = arrayList28;
                                                if (C1804.m1894(xmlPullParser6, str53)) {
                                                    str76 = str52;
                                                    str80 = str21;
                                                    str72 = str23;
                                                    arrayList26 = arrayList10;
                                                    str81 = str19;
                                                    arrayList25 = arrayList12;
                                                    str57 = str5;
                                                    arrayList28 = arrayList11;
                                                    i18 = i3;
                                                    arrayList27 = arrayList7;
                                                    str68 = str16;
                                                    str65 = str14;
                                                    str66 = str12;
                                                    str67 = str6;
                                                    str74 = str11;
                                                    str75 = str24;
                                                    str71 = str25;
                                                    i17 = i2;
                                                    str78 = str18;
                                                    str82 = str20;
                                                    f6 = f;
                                                    i15 = i;
                                                    str73 = str2;
                                                    arrayList29 = arrayList8;
                                                    arrayList24 = arrayList13;
                                                    str70 = str53;
                                                    str58 = str4;
                                                    c79427 = c7942;
                                                    j22 = j3;
                                                    str77 = str26;
                                                    arrayList23 = arrayList6;
                                                } else {
                                                    ArrayList arrayList46 = new ArrayList(arrayList8.size());
                                                    int i37 = 0;
                                                    while (i37 < arrayList8.size()) {
                                                        ArrayList arrayList47 = arrayList8;
                                                        C7943 c79433 = (C7943) arrayList47.get(i37);
                                                        C3737.C3739 m3952 = c79433.f17720.m3952();
                                                        if (str52 != null) {
                                                            m3952.f9345 = str52;
                                                        }
                                                        String str119 = c79433.f17724;
                                                        if (str119 == null) {
                                                            str119 = str79;
                                                        }
                                                        ArrayList<C5650.C5652> arrayList48 = c79433.f17722;
                                                        ArrayList arrayList49 = arrayList6;
                                                        arrayList48.addAll(arrayList49);
                                                        if (arrayList48.isEmpty()) {
                                                            str54 = str52;
                                                        } else {
                                                            int size = arrayList48.size() - 1;
                                                            while (size >= 0) {
                                                                C5650.C5652 c5652 = arrayList48.get(size);
                                                                if (!c5652.m5300()) {
                                                                    int i38 = 0;
                                                                    while (i38 < arrayList48.size()) {
                                                                        C5650.C5652 c56522 = arrayList48.get(i38);
                                                                        if (!c56522.m5300() || c5652.m5300()) {
                                                                            str55 = str52;
                                                                        } else {
                                                                            str55 = str52;
                                                                            if (c56522.m5299(c5652.f13285)) {
                                                                                z4 = z2;
                                                                                if (z4) {
                                                                                    i38++;
                                                                                    str52 = str55;
                                                                                } else {
                                                                                    arrayList48.remove(size);
                                                                                    size--;
                                                                                    str52 = str55;
                                                                                }
                                                                            }
                                                                        }
                                                                        z4 = false;
                                                                        if (z4) {
                                                                        }
                                                                    }
                                                                }
                                                                str55 = str52;
                                                                size--;
                                                                str52 = str55;
                                                            }
                                                            str54 = str52;
                                                            m3952.f9340 = new C5650(str119, false, (C5650.C5652[]) arrayList48.toArray(new C5650.C5652[0]));
                                                        }
                                                        ArrayList<C7958> arrayList50 = c79433.f17725;
                                                        arrayList50.addAll(arrayList13);
                                                        long j31 = c79433.f17726;
                                                        C3737 m39543 = m3952.m3954();
                                                        String str120 = c79433.f17723;
                                                        AbstractC7950 abstractC79504 = c79433.f17721;
                                                        if (abstractC79504 instanceof AbstractC7950.C7953) {
                                                            c7947 = new AbstractC7944.C7946(j31, m39543, str120, (AbstractC7950.C7953) abstractC79504, arrayList50, null, -1L);
                                                        } else if (abstractC79504 instanceof AbstractC7950.AbstractC7951) {
                                                            c7947 = new AbstractC7944.C7947(j31, m39543, str120, (AbstractC7950.AbstractC7951) abstractC79504, arrayList50);
                                                        } else {
                                                            throw new IllegalArgumentException("segmentBase must be of type SingleSegmentBase or MultiSegmentBase");
                                                        }
                                                        arrayList46.add(c7947);
                                                        i37++;
                                                        str52 = str54;
                                                        arrayList8 = arrayList47;
                                                        arrayList6 = arrayList49;
                                                    }
                                                    arrayList21.add(new C7941(m6860, i19, arrayList46, arrayList12, arrayList7, arrayList11));
                                                    xmlPullParser2 = xmlPullParser;
                                                    arrayList4 = arrayList22;
                                                    str68 = str16;
                                                    str7 = str14;
                                                }
                                            } else {
                                                arrayList5 = arrayList26;
                                                j4 = j24;
                                                arrayList6 = arrayList23;
                                                z3 = true;
                                                str12 = str66;
                                                str14 = str65;
                                                str15 = str84;
                                                arrayList7 = arrayList27;
                                                str6 = str67;
                                                str16 = str68;
                                                str17 = str70;
                                                str25 = str71;
                                                arrayList8 = arrayList29;
                                                str2 = str73;
                                                j3 = j22;
                                                str11 = str74;
                                                f = f6;
                                                str24 = str75;
                                                str26 = str77;
                                                str18 = str78;
                                                str19 = str81;
                                                str20 = str82;
                                                str21 = str80;
                                                i2 = i17;
                                                j6 = j23;
                                                j5 = j4;
                                                arrayList10 = arrayList5;
                                                c7942 = c79427;
                                                str22 = str83;
                                                str4 = str58;
                                                arrayList11 = arrayList28;
                                                i4 = i19;
                                                xmlPullParser3 = xmlPullParser6;
                                                str5 = str57;
                                                str23 = str72;
                                                arrayList13 = arrayList24;
                                                i = i15;
                                                i3 = i18;
                                                arrayList12 = arrayList25;
                                                j23 = j6;
                                                xmlPullParser6 = xmlPullParser3;
                                                i19 = i4;
                                                z2 = z3;
                                                str83 = str22;
                                                str52 = str76;
                                                str84 = str15;
                                                j24 = j5;
                                                str53 = str17;
                                                if (C1804.m1894(xmlPullParser6, str53)) {
                                                }
                                            }
                                        }
                                    } else {
                                        String str121 = str66;
                                        String str122 = str65;
                                        j3 = j21;
                                        str4 = str58;
                                        String str123 = str64;
                                        j = j14;
                                        j2 = j13;
                                        str2 = str56;
                                        str5 = str57;
                                        str6 = str67;
                                        String str124 = str68;
                                        z = true;
                                        xmlPullParser2 = xmlPullParser;
                                        if (C1804.m1909(xmlPullParser2, "EventStream")) {
                                            String str125 = str121;
                                            String attributeValue16 = xmlPullParser2.getAttributeValue(null, str125);
                                            if (attributeValue16 == null) {
                                                attributeValue16 = "";
                                            }
                                            String str126 = str123;
                                            String attributeValue17 = xmlPullParser2.getAttributeValue(null, str126);
                                            if (attributeValue17 == null) {
                                                attributeValue17 = "";
                                            }
                                            long m68582 = m6858(xmlPullParser2, "timescale", 1L);
                                            ArrayList arrayList51 = new ArrayList();
                                            ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(512);
                                            while (true) {
                                                xmlPullParser.next();
                                                String str127 = "Event";
                                                if (C1804.m1909(xmlPullParser2, "Event")) {
                                                    String str128 = str122;
                                                    long m68583 = m6858(xmlPullParser2, str128, 0L);
                                                    String str129 = str124;
                                                    long m68584 = m6858(xmlPullParser2, str129, -9223372036854775807L);
                                                    long m68585 = m6858(xmlPullParser2, "presentationTime", 0L);
                                                    str7 = str128;
                                                    str68 = str129;
                                                    long m3533 = C3335.m3533(m68584, 1000L, m68582);
                                                    long m35332 = C3335.m3533(m68585, 1000000L, m68582);
                                                    String attributeValue18 = xmlPullParser2.getAttributeValue(null, "messageData");
                                                    if (attributeValue18 == null) {
                                                        attributeValue18 = null;
                                                    }
                                                    byteArrayOutputStream.reset();
                                                    XmlSerializer newSerializer = Xml.newSerializer();
                                                    newSerializer.setOutput(byteArrayOutputStream, C6666.f15332.name());
                                                    xmlPullParser.nextToken();
                                                    while (!C1804.m1894(xmlPullParser2, str127)) {
                                                        switch (xmlPullParser.getEventType()) {
                                                            case 0:
                                                                str13 = str127;
                                                                newSerializer.startDocument(null, Boolean.FALSE);
                                                                break;
                                                            case 1:
                                                                str13 = str127;
                                                                newSerializer.endDocument();
                                                                break;
                                                            case 2:
                                                                newSerializer.startTag(xmlPullParser.getNamespace(), xmlPullParser.getName());
                                                                int i39 = 0;
                                                                while (i39 < xmlPullParser.getAttributeCount()) {
                                                                    newSerializer.attribute(xmlPullParser2.getAttributeNamespace(i39), xmlPullParser2.getAttributeName(i39), xmlPullParser2.getAttributeValue(i39));
                                                                    i39++;
                                                                    str127 = str127;
                                                                }
                                                                str13 = str127;
                                                                break;
                                                            case 3:
                                                                newSerializer.endTag(xmlPullParser.getNamespace(), xmlPullParser.getName());
                                                                str13 = str127;
                                                                break;
                                                            case 4:
                                                                newSerializer.text(xmlPullParser.getText());
                                                                str13 = str127;
                                                                break;
                                                            case 5:
                                                                newSerializer.cdsect(xmlPullParser.getText());
                                                                str13 = str127;
                                                                break;
                                                            case 6:
                                                                newSerializer.entityRef(xmlPullParser.getText());
                                                                str13 = str127;
                                                                break;
                                                            case 7:
                                                                newSerializer.ignorableWhitespace(xmlPullParser.getText());
                                                                str13 = str127;
                                                                break;
                                                            case 8:
                                                                newSerializer.processingInstruction(xmlPullParser.getText());
                                                                str13 = str127;
                                                                break;
                                                            case 9:
                                                                newSerializer.comment(xmlPullParser.getText());
                                                                str13 = str127;
                                                                break;
                                                            case 10:
                                                                newSerializer.docdecl(xmlPullParser.getText());
                                                                str13 = str127;
                                                                break;
                                                            default:
                                                                str13 = str127;
                                                                break;
                                                        }
                                                        xmlPullParser.nextToken();
                                                        str127 = str13;
                                                    }
                                                    newSerializer.flush();
                                                    byte[] byteArray = byteArrayOutputStream.toByteArray();
                                                    Long valueOf3 = Long.valueOf(m35332);
                                                    if (attributeValue18 != null) {
                                                        byteArray = C3335.m3505(attributeValue18);
                                                    }
                                                    str11 = str126;
                                                    str12 = str125;
                                                    arrayList51.add(Pair.create(valueOf3, new C7472(attributeValue16, attributeValue17, m3533, m68583, byteArray)));
                                                } else {
                                                    str11 = str126;
                                                    str12 = str125;
                                                    str68 = str124;
                                                    str7 = str122;
                                                    m6859(xmlPullParser);
                                                }
                                                if (C1804.m1894(xmlPullParser2, "EventStream")) {
                                                    long[] jArr = new long[arrayList51.size()];
                                                    C7472[] c7472Arr = new C7472[arrayList51.size()];
                                                    for (int i40 = 0; i40 < arrayList51.size(); i40++) {
                                                        Pair pair = (Pair) arrayList51.get(i40);
                                                        jArr[i40] = ((Long) pair.first).longValue();
                                                        c7472Arr[i40] = (C7472) pair.second;
                                                    }
                                                    arrayList4 = arrayList22;
                                                    arrayList4.add(new C7948(attributeValue16, attributeValue17, m68582, jArr, c7472Arr));
                                                    z2 = true;
                                                } else {
                                                    str122 = str7;
                                                    str124 = str68;
                                                    str125 = str12;
                                                    str126 = str11;
                                                }
                                            }
                                        } else {
                                            ArrayList arrayList52 = arrayList22;
                                            str68 = str124;
                                            str7 = str122;
                                            if (C1804.m1909(xmlPullParser2, "SegmentBase")) {
                                                abstractC7950 = m6869(xmlPullParser2, null);
                                                arrayList3 = arrayList52;
                                                c79426 = this;
                                                xmlPullParser5 = xmlPullParser2;
                                                j21 = j3;
                                                str9 = str121;
                                                str10 = str6;
                                                str8 = str123;
                                                if (C1804.m1894(xmlPullParser5, str10)) {
                                                }
                                            } else if (C1804.m1909(xmlPullParser2, "SegmentList")) {
                                                j20 = m6879(xmlPullParser2, -9223372036854775807L);
                                                str8 = str123;
                                                abstractC7950 = m6868(xmlPullParser, null, j19, m68647, j3, j20, m68644);
                                                arrayList3 = arrayList52;
                                                c79426 = this;
                                                xmlPullParser5 = xmlPullParser2;
                                                j21 = j3;
                                                str9 = str121;
                                                str10 = str6;
                                                if (C1804.m1894(xmlPullParser5, str10)) {
                                                }
                                            } else {
                                                str8 = str123;
                                                if (C1804.m1909(xmlPullParser2, "SegmentTemplate")) {
                                                    j20 = m6879(xmlPullParser2, -9223372036854775807L);
                                                    AbstractC2031<Object> abstractC2031 = AbstractC2117.f5378;
                                                    arrayList3 = arrayList52;
                                                    str9 = str121;
                                                    abstractC7950 = m6878(xmlPullParser, null, C2028.f5260, j19, m68647, j3, j20, m68644);
                                                } else {
                                                    arrayList3 = arrayList52;
                                                    str9 = str121;
                                                    if (C1804.m1909(xmlPullParser2, "AssetIdentifier")) {
                                                        c7958 = m6861(xmlPullParser2, "AssetIdentifier");
                                                    } else {
                                                        m6859(xmlPullParser);
                                                    }
                                                }
                                                c79426 = this;
                                                xmlPullParser5 = xmlPullParser2;
                                                j21 = j3;
                                                str10 = str6;
                                                if (C1804.m1894(xmlPullParser5, str10)) {
                                                }
                                            }
                                        }
                                    }
                                    c79426 = this;
                                    z = z2;
                                    arrayList3 = arrayList4;
                                    xmlPullParser5 = xmlPullParser2;
                                    str9 = str12;
                                    str8 = str11;
                                    j21 = j3;
                                    str10 = str6;
                                    if (C1804.m1894(xmlPullParser5, str10)) {
                                    }
                                } else if (!z7) {
                                    j21 = c79426.m6879(xmlPullParser5, j21);
                                    z7 = true;
                                    z = true;
                                    str9 = str66;
                                    str4 = str58;
                                    j = j14;
                                    j2 = j13;
                                    str2 = str56;
                                    str5 = str57;
                                    arrayList2 = arrayList20;
                                    str3 = c79426.m6875(xmlPullParser5, str69);
                                    arrayList3 = arrayList22;
                                    xmlPullParser2 = xmlPullParser;
                                    str8 = str64;
                                    String str130 = str67;
                                    str7 = str65;
                                    str10 = str130;
                                    if (C1804.m1894(xmlPullParser5, str10)) {
                                        str64 = str8;
                                        str69 = str3;
                                        arrayList20 = arrayList2;
                                        str66 = str9;
                                        arrayList22 = arrayList3;
                                        str58 = str4;
                                        j13 = j2;
                                        j14 = j;
                                        str57 = str5;
                                        str56 = str2;
                                        String str131 = str7;
                                        str67 = str10;
                                        str65 = str131;
                                    } else {
                                        Pair create = Pair.create(new C7961(attributeValue7, m68646, arrayList21, arrayList3, c7958), Long.valueOf(m68647));
                                        C7961 c7961 = (C7961) create.first;
                                        if (c7961.f17787 != -9223372036854775807L) {
                                            long longValue = ((Long) create.second).longValue();
                                            j13 = longValue == -9223372036854775807L ? -9223372036854775807L : c7961.f17787 + longValue;
                                            arrayList = arrayList2;
                                            arrayList.add(c7961);
                                            xmlPullParser5 = xmlPullParser2;
                                        } else if (!equals) {
                                            throw new C3836(C9125.m8099(47, "Unable to determine start of period ", arrayList2.size()));
                                        } else {
                                            xmlPullParser5 = xmlPullParser2;
                                            z6 = z;
                                            arrayList = arrayList2;
                                        }
                                    }
                                } else {
                                    z = true;
                                    str9 = str66;
                                    j3 = j21;
                                    str4 = str58;
                                    j = j14;
                                    j2 = j13;
                                    str2 = str56;
                                    str5 = str57;
                                    arrayList2 = arrayList20;
                                    str3 = str69;
                                    str6 = str67;
                                    arrayList3 = arrayList22;
                                    xmlPullParser2 = xmlPullParser;
                                    str7 = str65;
                                    str8 = str64;
                                    j21 = j3;
                                    str10 = str6;
                                    if (C1804.m1894(xmlPullParser5, str10)) {
                                    }
                                }
                            }
                        } else {
                            j = j14;
                            j2 = j13;
                            str2 = str56;
                            arrayList = arrayList20;
                            m6859(xmlPullParser);
                        }
                        j13 = j2;
                        uri = uri2;
                        j14 = j;
                        str56 = str2;
                    }
                }
                arrayList = arrayList20;
                uri = uri2;
            } else if (z5) {
                j = j14;
                str2 = str56;
                arrayList = arrayList20;
                uri = uri2;
                j14 = j;
                str56 = str2;
            } else {
                j14 = c79425.m6879(xmlPullParser5, j14);
                str56 = c79425.m6875(xmlPullParser5, str56);
                z5 = true;
                arrayList = arrayList20;
                uri = uri2;
            }
            if (C1804.m1894(xmlPullParser5, "MPD")) {
                if (m6864 == -9223372036854775807L) {
                    if (j13 != -9223372036854775807L) {
                        m6864 = j13;
                    } else if (!equals) {
                        throw new C3836("Unable to determine duration of static manifest.");
                    }
                }
                if (!arrayList.isEmpty()) {
                    return new C7956(m3530, m6864, m68642, equals, m68643, m68644, m68645, m35302, c7962, c7949, c7957, uri, arrayList);
                }
                throw new C3836("No periods found.");
            }
            c79425 = this;
            uri2 = uri;
            arrayList20 = arrayList;
        }
    }

    public C7940 m6867(XmlPullParser xmlPullParser, String str, C7940 c7940) {
        String str2;
        String attributeValue = xmlPullParser.getAttributeValue(null, str);
        if (attributeValue != null) {
            String[] strArr = new String[5];
            int[] iArr = new int[4];
            String[] strArr2 = new String[4];
            strArr[0] = "";
            int i = 0;
            int i2 = 0;
            while (i < attributeValue.length()) {
                int indexOf = attributeValue.indexOf("$", i);
                char c = 65535;
                if (indexOf == -1) {
                    String valueOf = String.valueOf(strArr[i2]);
                    String valueOf2 = String.valueOf(attributeValue.substring(i));
                    strArr[i2] = valueOf2.length() != 0 ? valueOf.concat(valueOf2) : new String(valueOf);
                    i = attributeValue.length();
                } else if (indexOf != i) {
                    String valueOf3 = String.valueOf(strArr[i2]);
                    String valueOf4 = String.valueOf(attributeValue.substring(i, indexOf));
                    strArr[i2] = valueOf4.length() != 0 ? valueOf3.concat(valueOf4) : new String(valueOf3);
                    i = indexOf;
                } else if (attributeValue.startsWith("$$", i)) {
                    strArr[i2] = String.valueOf(strArr[i2]).concat("$");
                    i += 2;
                } else {
                    int i3 = i + 1;
                    int indexOf2 = attributeValue.indexOf("$", i3);
                    String substring = attributeValue.substring(i3, indexOf2);
                    if (substring.equals("RepresentationID")) {
                        iArr[i2] = 1;
                    } else {
                        int indexOf3 = substring.indexOf("%0");
                        if (indexOf3 != -1) {
                            str2 = substring.substring(indexOf3);
                            if (!str2.endsWith("d") && !str2.endsWith("x")) {
                                str2 = str2.concat("d");
                            }
                            substring = substring.substring(0, indexOf3);
                        } else {
                            str2 = "%01d";
                        }
                        substring.hashCode();
                        switch (substring.hashCode()) {
                            case -1950496919:
                                if (substring.equals("Number")) {
                                    c = 0;
                                    break;
                                }
                                break;
                            case 2606829:
                                if (substring.equals("Time")) {
                                    c = 1;
                                    break;
                                }
                                break;
                            case 38199441:
                                if (substring.equals("Bandwidth")) {
                                    c = 2;
                                    break;
                                }
                                break;
                        }
                        switch (c) {
                            case 0:
                                iArr[i2] = 2;
                                break;
                            case 1:
                                iArr[i2] = 4;
                                break;
                            case 2:
                                iArr[i2] = 3;
                                break;
                            default:
                                throw new IllegalArgumentException(attributeValue.length() != 0 ? "Invalid template: ".concat(attributeValue) : new String("Invalid template: "));
                        }
                        strArr2[i2] = str2;
                    }
                    i2++;
                    strArr[i2] = "";
                    i = indexOf2 + 1;
                }
            }
            return new C7940(strArr, iArr, strArr2, i2);
        }
        return c7940;
    }

    public AbstractC7950.C7954 m6868(XmlPullParser xmlPullParser, AbstractC7950.C7954 c7954, long j, long j2, long j3, long j4, long j5) {
        C7960 c7960;
        List list;
        List<AbstractC7950.C7955> list2;
        long m6858 = m6858(xmlPullParser, "timescale", c7954 != null ? c7954.f17744 : 1L);
        long m68582 = m6858(xmlPullParser, "presentationTimeOffset", c7954 != null ? c7954.f17743 : 0L);
        long m68583 = m6858(xmlPullParser, "duration", c7954 != null ? c7954.f17746 : -9223372036854775807L);
        long m68584 = m6858(xmlPullParser, "startNumber", c7954 != null ? c7954.f17747 : 1L);
        long m6862 = m6862(j3, j4);
        List<AbstractC7950.C7955> list3 = null;
        List list4 = null;
        C7960 c79602 = null;
        do {
            xmlPullParser.next();
            if (C1804.m1909(xmlPullParser, "Initialization")) {
                c79602 = m6874(xmlPullParser, "sourceURL", "range");
            } else if (C1804.m1909(xmlPullParser, "SegmentTimeline")) {
                list3 = m6872(xmlPullParser, m6858, j2);
            } else if (C1804.m1909(xmlPullParser, "SegmentURL")) {
                if (list4 == null) {
                    list4 = new ArrayList();
                }
                List list5 = list4;
                list5.add(m6874(xmlPullParser, "media", "mediaRange"));
                list4 = list5;
            } else {
                m6859(xmlPullParser);
            }
        } while (!C1804.m1894(xmlPullParser, "SegmentList"));
        if (c7954 != null) {
            if (c79602 == null) {
                c79602 = c7954.f17742;
            }
            if (list3 == null) {
                list3 = c7954.f17749;
            }
            if (list4 == null) {
                list2 = list3;
                c7960 = c79602;
                list = c7954.f17756;
                return new AbstractC7950.C7954(c7960, m6858, m68582, m68584, m68583, list2, m6862, list, C3788.m4084(j5), C3788.m4084(j));
            }
        }
        c7960 = c79602;
        list = list4;
        list2 = list3;
        return new AbstractC7950.C7954(c7960, m6858, m68582, m68584, m68583, list2, m6862, list, C3788.m4084(j5), C3788.m4084(j));
    }

    public AbstractC7950.C7953 m6869(XmlPullParser xmlPullParser, AbstractC7950.C7953 c7953) {
        long j;
        long j2;
        long m6858 = m6858(xmlPullParser, "timescale", c7953 != null ? c7953.f17744 : 1L);
        long m68582 = m6858(xmlPullParser, "presentationTimeOffset", c7953 != null ? c7953.f17743 : 0L);
        long j3 = c7953 != null ? c7953.f17755 : 0L;
        long j4 = c7953 != null ? c7953.f17754 : 0L;
        String attributeValue = xmlPullParser.getAttributeValue(null, "indexRange");
        if (attributeValue != null) {
            String[] split = attributeValue.split("-");
            long parseLong = Long.parseLong(split[0]);
            j = (Long.parseLong(split[1]) - parseLong) + 1;
            j2 = parseLong;
        } else {
            j = j4;
            j2 = j3;
        }
        C7960 c7960 = c7953 != null ? c7953.f17742 : null;
        do {
            xmlPullParser.next();
            if (C1804.m1909(xmlPullParser, "Initialization")) {
                c7960 = m6874(xmlPullParser, "sourceURL", "range");
            } else {
                m6859(xmlPullParser);
            }
        } while (!C1804.m1894(xmlPullParser, "SegmentBase"));
        return new AbstractC7950.C7953(c7960, m6858, m68582, j2, j);
    }

    public int m6870(XmlPullParser xmlPullParser) {
        String attributeValue = xmlPullParser.getAttributeValue(null, "contentType");
        if (TextUtils.isEmpty(attributeValue)) {
            return -1;
        }
        if ("audio".equals(attributeValue)) {
            return 1;
        }
        if ("video".equals(attributeValue)) {
            return 2;
        }
        return "text".equals(attributeValue) ? 3 : -1;
    }

    public final long m6871(List<AbstractC7950.C7955> list, long j, long j2, int i, long j3) {
        int i2;
        if (i >= 0) {
            i2 = i + 1;
        } else {
            int i3 = C3335.f8136;
            i2 = (int) ((((j3 - j) + j2) - 1) / j2);
        }
        for (int i4 = 0; i4 < i2; i4++) {
            list.add(new AbstractC7950.C7955(j, j2));
            j += j2;
        }
        return j;
    }

    public List<AbstractC7950.C7955> m6872(XmlPullParser xmlPullParser, long j, long j2) {
        ArrayList arrayList = new ArrayList();
        long j3 = 0;
        boolean z = false;
        int i = 0;
        long j4 = -9223372036854775807L;
        do {
            xmlPullParser.next();
            if (C1804.m1909(xmlPullParser, "S")) {
                long m6858 = m6858(xmlPullParser, "t", -9223372036854775807L);
                if (z) {
                    j3 = m6871(arrayList, j3, j4, i, m6858);
                }
                if (m6858 == -9223372036854775807L) {
                    m6858 = j3;
                }
                j4 = m6858(xmlPullParser, "d", -9223372036854775807L);
                i = m6860(xmlPullParser, "r", 0);
                z = true;
                j3 = m6858;
            } else {
                m6859(xmlPullParser);
            }
        } while (!C1804.m1894(xmlPullParser, "SegmentTimeline"));
        if (z) {
            m6871(arrayList, j3, j4, i, C3335.m3533(j2, j, 1000L));
        }
        return arrayList;
    }

    public int m6873(List<C7958> list) {
        int i = 0;
        for (int i2 = 0; i2 < list.size(); i2++) {
            if (C7435.m6463("http://dashif.org/guidelines/trickmode", list.get(i2).f17777)) {
                i |= 16384;
            }
        }
        return i;
    }

    public C7960 m6874(XmlPullParser xmlPullParser, String str, String str2) {
        long j;
        long j2;
        String attributeValue = xmlPullParser.getAttributeValue(null, str);
        String attributeValue2 = xmlPullParser.getAttributeValue(null, str2);
        if (attributeValue2 != null) {
            String[] split = attributeValue2.split("-");
            j = Long.parseLong(split[0]);
            if (split.length == 2) {
                j2 = (Long.parseLong(split[1]) - j) + 1;
                return new C7960(attributeValue, j, j2);
            }
        } else {
            j = 0;
        }
        j2 = -1;
        return new C7960(attributeValue, j, j2);
    }

    public String m6875(XmlPullParser xmlPullParser, String str) {
        return C1804.m1902(str, m6863(xmlPullParser, "BaseURL"));
    }

    public int m6876(XmlPullParser xmlPullParser) {
        boolean z;
        int i;
        String attributeValue = xmlPullParser.getAttributeValue(null, "schemeIdUri");
        if (attributeValue == null) {
            attributeValue = null;
        }
        attributeValue.hashCode();
        int i2 = -1;
        boolean z2 = false;
        switch (attributeValue.hashCode()) {
            case -1352850286:
                if (attributeValue.equals("urn:mpeg:dash:23003:3:audio_channel_configuration:2011")) {
                    z = false;
                    break;
                }
                z = true;
                break;
            case -1138141449:
                if (attributeValue.equals("tag:dolby.com,2014:dash:audio_channel_configuration:2011")) {
                    z = true;
                    break;
                }
                z = true;
                break;
            case -986633423:
                if (attributeValue.equals("urn:mpeg:mpegB:cicp:ChannelConfiguration")) {
                    z = true;
                    break;
                }
                z = true;
                break;
            case 2036691300:
                if (attributeValue.equals("urn:dolby:dash:audio_channel_configuration:2011")) {
                    z = true;
                    break;
                }
                z = true;
                break;
            default:
                z = true;
                break;
        }
        if (z) {
            if (!z) {
                if (z) {
                    int m6860 = m6860(xmlPullParser, "value", -1);
                    if (m6860 >= 0) {
                        int[] iArr = f17716;
                        if (m6860 < iArr.length) {
                            i2 = iArr[m6860];
                        }
                    }
                }
            }
            String attributeValue2 = xmlPullParser.getAttributeValue(null, "value");
            if (attributeValue2 != null) {
                String m6501 = C7435.m6501(attributeValue2);
                m6501.hashCode();
                switch (m6501.hashCode()) {
                    case 1596796:
                        break;
                    case 2937391:
                        if (m6501.equals("a000")) {
                            z2 = true;
                            break;
                        }
                        z2 = true;
                        break;
                    case 3094035:
                        if (m6501.equals("f801")) {
                            z2 = true;
                            break;
                        }
                        z2 = true;
                        break;
                    case 3133436:
                        if (m6501.equals("fa01")) {
                            z2 = true;
                            break;
                        }
                        z2 = true;
                        break;
                    default:
                        z2 = true;
                        break;
                }
                switch (z2) {
                    case false:
                        i2 = 1;
                        break;
                    case true:
                        i2 = 2;
                        break;
                    case true:
                        i = 6;
                        i2 = i;
                        break;
                    case true:
                        i = 8;
                        i2 = i;
                        break;
                }
            }
        } else {
            i2 = m6860(xmlPullParser, "value", -1);
        }
        do {
            xmlPullParser.next();
        } while (!C1804.m1894(xmlPullParser, "AudioChannelConfiguration"));
        return i2;
    }

    public int m6877(String str) {
        if (str == null) {
            return 0;
        }
        char c = 65535;
        switch (str.hashCode()) {
            case -2060497896:
                if (str.equals("subtitle")) {
                    c = 0;
                    break;
                }
                break;
            case -1724546052:
                if (str.equals("description")) {
                    c = 1;
                    break;
                }
                break;
            case -1580883024:
                if (str.equals("enhanced-audio-intelligibility")) {
                    c = 2;
                    break;
                }
                break;
            case -1574842690:
                if (str.equals("forced_subtitle")) {
                    c = 3;
                    break;
                }
                break;
            case -1408024454:
                if (str.equals("alternate")) {
                    c = 4;
                    break;
                }
                break;
            case 99825:
                if (str.equals("dub")) {
                    c = 5;
                    break;
                }
                break;
            case 3343801:
                if (str.equals("main")) {
                    c = 6;
                    break;
                }
                break;
            case 3530173:
                if (str.equals("sign")) {
                    c = 7;
                    break;
                }
                break;
            case 552573414:
                if (str.equals("caption")) {
                    c = '\b';
                    break;
                }
                break;
            case 899152809:
                if (str.equals("commentary")) {
                    c = '\t';
                    break;
                }
                break;
            case 1629013393:
                if (str.equals("emergency")) {
                    c = '\n';
                    break;
                }
                break;
            case 1855372047:
                if (str.equals("supplementary")) {
                    c = 11;
                    break;
                }
                break;
        }
        switch (c) {
            case 0:
            case 3:
                return RecyclerView.AbstractC0157.FLAG_IGNORE;
            case 1:
                return 512;
            case 2:
                return 2048;
            case 4:
                return 2;
            case 5:
                return 16;
            case 6:
                return 1;
            case 7:
                return 256;
            case '\b':
                return 64;
            case '\t':
                return 8;
            case '\n':
                return 32;
            case 11:
                return 4;
            default:
                return 0;
        }
    }

    public AbstractC7950.C7952 m6878(XmlPullParser xmlPullParser, AbstractC7950.C7952 c7952, List<C7958> list, long j, long j2, long j3, long j4, long j5) {
        long j6;
        long m6858 = m6858(xmlPullParser, "timescale", c7952 != null ? c7952.f17744 : 1L);
        long m68582 = m6858(xmlPullParser, "presentationTimeOffset", c7952 != null ? c7952.f17743 : 0L);
        long m68583 = m6858(xmlPullParser, "duration", c7952 != null ? c7952.f17746 : -9223372036854775807L);
        long m68584 = m6858(xmlPullParser, "startNumber", c7952 != null ? c7952.f17747 : 1L);
        int i = 0;
        while (true) {
            if (i >= list.size()) {
                j6 = -1;
                break;
            }
            C7958 c7958 = list.get(i);
            if (C7435.m6463("http://dashif.org/guidelines/last-segment-number", c7958.f17777)) {
                j6 = Long.parseLong(c7958.f17779);
                break;
            }
            i++;
        }
        long j7 = j6;
        long m6862 = m6862(j3, j4);
        List<AbstractC7950.C7955> list2 = null;
        C7940 m6867 = m6867(xmlPullParser, "media", c7952 != null ? c7952.f17752 : null);
        C7940 m68672 = m6867(xmlPullParser, "initialization", c7952 != null ? c7952.f17751 : null);
        C7960 c7960 = null;
        do {
            xmlPullParser.next();
            if (C1804.m1909(xmlPullParser, "Initialization")) {
                c7960 = m6874(xmlPullParser, "sourceURL", "range");
            } else if (C1804.m1909(xmlPullParser, "SegmentTimeline")) {
                list2 = m6872(xmlPullParser, m6858, j2);
            } else {
                m6859(xmlPullParser);
            }
        } while (!C1804.m1894(xmlPullParser, "SegmentTemplate"));
        if (c7952 != null) {
            if (c7960 == null) {
                c7960 = c7952.f17742;
            }
            if (list2 == null) {
                list2 = c7952.f17749;
            }
        }
        return new AbstractC7950.C7952(c7960, m6858, m68582, m68584, j7, m68583, list2, m6862, m68672, m6867, C3788.m4084(j5), C3788.m4084(j));
    }

    public long m6879(XmlPullParser xmlPullParser, long j) {
        String attributeValue = xmlPullParser.getAttributeValue(null, "availabilityTimeOffset");
        return attributeValue == null ? j : "INF".equals(attributeValue) ? RecyclerView.FOREVER_NS : Float.parseFloat(attributeValue) * 1000000.0f;
    }
}