package defpackage;

import android.app.UiModeManager;
import android.content.Context;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.graphics.Point;
import android.hardware.display.DisplayManager;
import android.net.Uri;
import android.os.Build;
import android.os.Handler;
import android.os.Looper;
import android.os.SystemClock;
import android.text.TextUtils;
import android.util.SparseArray;
import android.view.Display;
import android.view.WindowManager;
import androidx.media3.common.ParserException;
import com.google.android.gms.dynamite.descriptors.com.google.android.gms.measurement.dynamite.ModuleDescriptor;
import com.google.common.io.BaseEncoding$DecodingException;
import j$.util.DesugarTimeZone;
import j$.util.Objects;
import java.io.Closeable;
import java.io.IOException;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.nio.ByteOrder;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Formatter;
import java.util.GregorianCalendar;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.MissingResourceException;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.zip.DataFormatException;
import java.util.zip.Inflater;

/* JADX INFO: renamed from: ˇˊˆ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes3.dex */
public abstract class AbstractC0956 {

    /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
    public static final byte[] f4216;

    /* JADX INFO: renamed from: ˊᵫᵗ, reason: contains not printable characters */
    public static final String[] f4217;

    /* JADX INFO: renamed from: ːˏᵟᵯ, reason: contains not printable characters */
    public static final long[] f4218;

    /* JADX INFO: renamed from: ᵨᵣ, reason: contains not printable characters */
    public static final Pattern f4219;

    /* JADX INFO: renamed from: ᵮᵣᵗˈ, reason: contains not printable characters */
    public static final int[] f4220;

    /* JADX INFO: renamed from: ᵱᵽʡᵚ, reason: contains not printable characters */
    public static final int[] f4221;

    /* JADX INFO: renamed from: ᵲᵶᵳˈ, reason: contains not printable characters */
    public static final String f4222;

    /* JADX INFO: renamed from: ᵵᵽ, reason: contains not printable characters */
    public static HashMap f4223;

    /* JADX INFO: renamed from: ᵶᵥᵝ, reason: contains not printable characters */
    public static final int[] f4224;

    /* JADX INFO: renamed from: ᵷᵺʾᵖ, reason: contains not printable characters */
    public static final Pattern f4225;

    /* JADX INFO: renamed from: ᵻʽᵯ, reason: contains not printable characters */
    public static final String[] f4226;

    /* JADX INFO: renamed from: ᵻˈᵦʼ, reason: contains not printable characters */
    public static final Pattern f4227;

    static {
        String str = Build.DEVICE;
        String str2 = Build.MANUFACTURER;
        f4222 = str + ", " + Build.MODEL + ", " + str2 + ", " + Build.VERSION.SDK_INT;
        f4216 = new byte[0];
        f4218 = new long[0];
        f4225 = Pattern.compile("(\\d\\d\\d\\d)\\-(\\d\\d)\\-(\\d\\d)[Tt ](\\d\\d):(\\d\\d):(\\d\\d)([\\.,](\\d+))?([Zz]|((\\+|\\-)(\\d?\\d):?(\\d\\d)?))?");
        f4219 = Pattern.compile("^(-)?P(([0-9]*)Y)?(([0-9]*)M)?(([0-9]*)D)?(T(([0-9]*)H)?(([0-9]*)M)?(([0-9.]*)S)?)?$");
        Pattern.compile("%([A-Fa-f0-9]{2})");
        f4227 = Pattern.compile("(?:.*\\.)?isml?(?:/(manifest(.*))?)?", 2);
        f4217 = new String[]{"alb", "sq", "arm", "hy", "baq", "eu", "bur", "my", "tib", "bo", "chi", "zh", "cze", "cs", "dut", "nl", "ger", "de", "gre", "el", "fre", "fr", "geo", "ka", "ice", "is", "mac", "mk", "mao", "mi", "may", "ms", "per", "fa", "rum", "ro", "scc", "hbs-srp", "slo", "sk", "wel", "cy", "id", "ms-ind", "iw", "he", "heb", "he", "ji", "yi", "arb", "ar-arb", "in", "ms-ind", "ind", "ms-ind", "nb", "no-nob", "nob", "no-nob", "nn", "no-nno", "nno", "no-nno", "tw", "ak-twi", "twi", "ak-twi", "bs", "hbs-bos", "bos", "hbs-bos", "hr", "hbs-hrv", "hrv", "hbs-hrv", "sr", "hbs-srp", "srp", "hbs-srp", "cmn", "zh-cmn", "hak", "zh-hak", "nan", "zh-nan", "hsn", "zh-hsn"};
        f4226 = new String[]{"i-lux", "lb", "i-hak", "zh-hak", "i-navajo", "nv", "no-bok", "no-nob", "no-nyn", "no-nno", "zh-guoyu", "zh-cmn", "zh-hakka", "zh-hak", "zh-min-nan", "zh-nan", "zh-xiang", "zh-hsn"};
        f4221 = new int[]{0, 79764919, 159529838, 222504665, 319059676, 398814059, 445009330, 507990021, 638119352, 583659535, 797628118, 726387553, 890018660, 835552979, 1015980042, 944750013, 1276238704, 1221641927, 1167319070, 1095957929, 1595256236, 1540665371, 1452775106, 1381403509, 1780037320, 1859660671, 1671105958, 1733955601, 2031960084, 2111593891, 1889500026, 1952343757, -1742489888, -1662866601, -1851683442, -1788833735, -1960329156, -1880695413, -2103051438, -2040207643, -1104454824, -1159051537, -1213636554, -1284997759, -1389417084, -1444007885, -1532160278, -1603531939, -734892656, -789352409, -575645954, -646886583, -952755380, -1007220997, -827056094, -898286187, -231047128, -151282273, -71779514, -8804623, -515967244, -436212925, -390279782, -327299027, 881225847, 809987520, 1023691545, 969234094, 662832811, 591600412, 771767749, 717299826, 311336399, 374308984, 453813921, 533576470, 25881363, 88864420, 134795389, 214552010, 2023205639, 2086057648, 1897238633, 1976864222, 1804852699, 1867694188, 1645340341, 1724971778, 1587496639, 1516133128, 1461550545, 1406951526, 1302016099, 1230646740, 1142491917, 1087903418, -1398421865, -1469785312, -1524105735, -1578704818, -1079922613, -1151291908, -1239184603, -1293773166, -1968362705, -1905510760, -2094067647, -2014441994, -1716953613, -1654112188, -1876203875, -1796572374, -525066777, -462094256, -382327159, -302564546, -206542021, -143559028, -97365931, -17609246, -960696225, -1031934488, -817968335, -872425850, -709327229, -780559564, -600130067, -654598054, 1762451694, 1842216281, 1619975040, 1682949687, 2047383090, 2127137669, 1938468188, 2001449195, 1325665622, 1271206113, 1183200824, 1111960463, 1543535498, 1489069629, 1434599652, 1363369299, 622672798, 568075817, 748617968, 677256519, 907627842, 853037301, 1067152940, 995781531, 51762726, 131386257, 177728840, 240578815, 269590778, 349224269, 429104020, 491947555, -248556018, -168932423, -122852000, -60002089, -500490030, -420856475, -341238852, -278395381, -685261898, -739858943, -559578920, -630940305, -1004286614, -1058877219, -845023740, -916395085, -1119974018, -1174433591, -1262701040, -1333941337, -1371866206, -1426332139, -1481064244, -1552294533, -1690935098, -1611170447, -1833673816, -1770699233, -2009983462, -1930228819, -2119160460, -2056179517, 1569362073, 1498123566, 1409854455, 1355396672, 1317987909, 1246755826, 1192025387, 1137557660, 2072149281, 2135122070, 1912620623, 1992383480, 1753615357, 1816598090, 1627664531, 1707420964, 295390185, 358241886, 404320391, 483945776, 43990325, 106832002, 186451547, 266083308, 932423249, 861060070, 1041341759, 986742920, 613929101, 542559546, 756411363, 701822548, -978770311, -1050133554, -869589737, -924188512, -693284699, -764654318, -550540341, -605129092, -475935807, -413084042, -366743377, -287118056, -257573603, -194731862, -114850189, -35218492, -1984365303, -1921392450, -2143631769, -2063868976, -1698919467, -1635936670, -1824608069, -1744851700, -1347415887, -1418654458, -1506661409, -1561119128, -1129027987, -1200260134, -1254728445, -1309196108};
        f4224 = new int[]{0, 4129, 8258, 12387, 16516, 20645, 24774, 28903, 33032, 37161, 41290, 45419, 49548, 53677, 57806, 61935};
        f4220 = new int[]{0, 7, 14, 9, 28, 27, 18, 21, 56, 63, 54, 49, 36, 35, 42, 45, 112, 119, 126, 121, 108, 107, 98, 101, 72, 79, 70, 65, 84, 83, 90, 93, 224, 231, 238, 233, 252, 251, 242, 245, 216, 223, 214, 209, 196, 195, 202, 205, 144, 151, 158, 153, 140, 139, 130, 133, 168, 175, 166, 161, 180, 179, 186, 189, 199, 192, 201, 206, 219, 220, 213, 210, 255, 248, 241, 246, 227, 228, 237, 234, 183, 176, ModuleDescriptor.MODULE_VERSION, 190, 171, 172, 165, 162, 143, 136, 129, 134, 147, 148, 157, 154, 39, 32, 41, 46, 59, 60, 53, 50, 31, 24, 17, 22, 3, 4, 13, 10, 87, 80, 89, 94, 75, 76, 69, 66, 111, 104, 97, 102, 115, 116, 125, 122, 137, 142, 135, 128, 149, 146, 155, 156, 177, 182, 191, 184, 173, 170, 163, 164, 249, 254, 247, 240, 229, 226, 235, 236, 193, 198, 207, 200, 221, 218, 211, 212, 105, 110, 103, 96, 117, 114, 123, 124, 81, 86, 95, 88, 77, 74, 67, 68, 25, 30, 23, 16, 5, 2, 11, 12, 33, 38, 47, 40, 61, 58, 51, 52, 78, 73, 64, 71, 82, 85, 92, 91, 118, 113, 120, 127, 106, 109, 100, 99, 62, 57, 48, 55, 34, 37, 44, 43, 6, 1, 8, 15, 26, 29, 20, 19, 174, 169, 160, 167, 178, 181, 188, 187, 150, 145, 152, 159, 138, 141, 132, 131, 222, 217, 208, 215, 194, 197, 204, 203, 230, 225, 232, 239, 250, 253, 244, 243};
    }

    /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
    public static int m3210(long[] jArr, long j, boolean z) {
        int i;
        int iBinarySearch = Arrays.binarySearch(jArr, j);
        if (iBinarySearch < 0) {
            return ~iBinarySearch;
        }
        while (true) {
            i = iBinarySearch + 1;
            if (i >= jArr.length || jArr[i] != j) {
                break;
            }
            iBinarySearch = i;
        }
        return z ? iBinarySearch : i;
    }

    /* JADX INFO: renamed from: ʽᵡᵢᵾ, reason: contains not printable characters */
    public static void m3211(int i) {
        Integer.toString(i, 36);
    }

    /* JADX INFO: renamed from: ʿٴˇ, reason: contains not printable characters */
    public static int m3212(int i, ByteOrder byteOrder) {
        if (i == 8) {
            return 3;
        }
        if (i == 16) {
            return byteOrder.equals(ByteOrder.LITTLE_ENDIAN) ? 2 : 268435456;
        }
        if (i == 24) {
            return byteOrder.equals(ByteOrder.LITTLE_ENDIAN) ? 21 : 1342177280;
        }
        if (i != 32) {
            return 0;
        }
        return byteOrder.equals(ByteOrder.LITTLE_ENDIAN) ? 22 : 1610612736;
    }

    /* JADX INFO: renamed from: ʿᵿʽᵞ, reason: contains not printable characters */
    public static long m3213(String str) throws ParserException {
        Matcher matcher = f4225.matcher(str);
        if (!matcher.matches()) {
            throw ParserException.m357("Invalid date/time format: " + str, null);
        }
        int i = 0;
        if (matcher.group(9) != null && !matcher.group(9).equalsIgnoreCase("Z")) {
            int i2 = Integer.parseInt(matcher.group(12)) * 60;
            String strGroup = matcher.group(13);
            i = strGroup != null ? Integer.parseInt(strGroup) + i2 : i2;
            if ("-".equals(matcher.group(11))) {
                i *= -1;
            }
        }
        GregorianCalendar gregorianCalendar = new GregorianCalendar(DesugarTimeZone.getTimeZone("GMT"));
        gregorianCalendar.clear();
        gregorianCalendar.set(Integer.parseInt(matcher.group(1)), Integer.parseInt(matcher.group(2)) - 1, Integer.parseInt(matcher.group(3)), Integer.parseInt(matcher.group(4)), Integer.parseInt(matcher.group(5)), Integer.parseInt(matcher.group(6)));
        if (!TextUtils.isEmpty(matcher.group(8))) {
            gregorianCalendar.set(14, new BigDecimal("0." + matcher.group(8)).movePointRight(3).intValue());
        }
        long timeInMillis = gregorianCalendar.getTimeInMillis();
        return i != 0 ? timeInMillis - (((long) i) * 60000) : timeInMillis;
    }

    /* JADX INFO: renamed from: ˀᵗ, reason: contains not printable characters */
    public static long m3214(long j) {
        return (j == -9223372036854775807L || j == Long.MIN_VALUE) ? j : j * 1000;
    }

    /* JADX INFO: renamed from: ˀᵭ, reason: contains not printable characters */
    public static String[] m3215() {
        Configuration configuration = Resources.getSystem().getConfiguration();
        String[] strArrSplit = Build.VERSION.SDK_INT >= 24 ? configuration.getLocales().toLanguageTags().split(",", -1) : new String[]{configuration.locale.toLanguageTag()};
        for (int i = 0; i < strArrSplit.length; i++) {
            strArrSplit[i] = m3236(strArrSplit[i]);
        }
        return strArrSplit;
    }

    /* JADX INFO: renamed from: ˁʢᵛ, reason: contains not printable characters */
    public static boolean m3216(Context context) {
        UiModeManager uiModeManager = (UiModeManager) context.getApplicationContext().getSystemService("uimode");
        return uiModeManager != null && uiModeManager.getCurrentModeType() == 4;
    }

    /* JADX INFO: renamed from: ˁˌᵩ, reason: contains not printable characters */
    public static String m3217(StringBuilder sb, Formatter formatter, long j) {
        if (j == -9223372036854775807L) {
            j = 0;
        }
        String str = j < 0 ? "-" : "";
        long jAbs = (Math.abs(j) + 500) / 1000;
        long j2 = jAbs % 60;
        long j3 = (jAbs / 60) % 60;
        long j4 = jAbs / 3600;
        sb.setLength(0);
        return j4 > 0 ? formatter.format("%s%d:%02d:%02d", str, Long.valueOf(j4), Long.valueOf(j3), Long.valueOf(j2)).toString() : formatter.format("%s%02d:%02d", str, Long.valueOf(j3), Long.valueOf(j2)).toString();
    }

    /* JADX INFO: renamed from: ˁᵺˈ, reason: contains not printable characters */
    public static long m3218(long j, long j2, long j3, RoundingMode roundingMode) {
        if (j == 0 || j2 == 0) {
            return 0L;
        }
        return (j3 < j2 || j3 % j2 != 0) ? (j3 >= j2 || j2 % j3 != 0) ? (j3 < j || j3 % j != 0) ? (j3 >= j || j % j3 != 0) ? m3232(j, j2, j3, roundingMode) : ᵥˈᵛ.ˁʢᵛ(j2, ᵥˈᵛ.ᵔᵖᵹᵫ(j, j3, RoundingMode.UNNECESSARY)) : ᵥˈᵛ.ᵔᵖᵹᵫ(j2, ᵥˈᵛ.ᵔᵖᵹᵫ(j3, j, RoundingMode.UNNECESSARY), roundingMode) : ᵥˈᵛ.ˁʢᵛ(j, ᵥˈᵛ.ᵔᵖᵹᵫ(j2, j3, RoundingMode.UNNECESSARY)) : ᵥˈᵛ.ᵔᵖᵹᵫ(j, ᵥˈᵛ.ᵔᵖᵹᵫ(j3, j2, RoundingMode.UNNECESSARY), roundingMode);
    }

    /* JADX INFO: renamed from: ˈᵲᵢ, reason: contains not printable characters */
    public static int m3219(int i) {
        if (i == 2 || i == 4) {
            return 6005;
        }
        if (i == 10) {
            return 6004;
        }
        if (i == 7) {
            return 6005;
        }
        if (i == 8) {
            return 6003;
        }
        switch (i) {
            case 15:
                return 6003;
            case 16:
            case 18:
                return 6005;
            case 17:
            case 19:
            case 20:
            case 21:
            case 22:
                return 6004;
            default:
                switch (i) {
                    case 24:
                    case 25:
                    case 26:
                    case 27:
                    case 28:
                        return 6002;
                    default:
                        return 6006;
                }
        }
    }

    /* JADX INFO: renamed from: ˈⁱᵡ, reason: contains not printable characters */
    public static boolean m3220(int i) {
        return i == 21 || i == 1342177280 || i == 22 || i == 1610612736 || i == 4 || i == 1879048192;
    }

    /* JADX INFO: renamed from: ˉˆᵗ, reason: contains not printable characters */
    public static void m3221(long[] jArr, long j) {
        long j2;
        RoundingMode roundingMode = RoundingMode.DOWN;
        int i = 0;
        if (j >= 1000000 && j % 1000000 == 0) {
            long j3 = ᵥˈᵛ.ᵔᵖᵹᵫ(j, 1000000L, RoundingMode.UNNECESSARY);
            while (i < jArr.length) {
                jArr[i] = ᵥˈᵛ.ᵔᵖᵹᵫ(jArr[i], j3, roundingMode);
                i++;
            }
            return;
        }
        if (j < 1000000 && 1000000 % j == 0) {
            long j4 = ᵥˈᵛ.ᵔᵖᵹᵫ(1000000L, j, RoundingMode.UNNECESSARY);
            while (i < jArr.length) {
                jArr[i] = ᵥˈᵛ.ˁʢᵛ(jArr[i], j4);
                i++;
            }
            return;
        }
        int i2 = 0;
        while (i2 < jArr.length) {
            long j5 = jArr[i2];
            if (j5 != 0) {
                if (j >= j5 && j % j5 == 0) {
                    jArr[i2] = ᵥˈᵛ.ᵔᵖᵹᵫ(1000000L, ᵥˈᵛ.ᵔᵖᵹᵫ(j, j5, RoundingMode.UNNECESSARY), roundingMode);
                } else if (j >= j5 || j5 % j != 0) {
                    j2 = j;
                    jArr[i2] = m3232(j5, 1000000L, j2, roundingMode);
                } else {
                    jArr[i2] = ᵥˈᵛ.ˁʢᵛ(1000000L, ᵥˈᵛ.ᵔᵖᵹᵫ(j5, j, RoundingMode.UNNECESSARY));
                }
                j2 = j;
            } else {
                j2 = j;
            }
            i2++;
            j = j2;
        }
    }

    /* JADX INFO: renamed from: ˉᵲ, reason: contains not printable characters */
    public static int m3222(int i) {
        switch (i) {
            case 2:
            case 3:
                return 3;
            case 4:
            case 5:
            case C5224.STRING_SET_FIELD_NUMBER /* 6 */:
                return 21;
            case C5224.DOUBLE_FIELD_NUMBER /* 7 */:
            case C5224.BYTES_FIELD_NUMBER /* 8 */:
                return 23;
            case 9:
            case 10:
            case 11:
            case 12:
            case 15:
            case 16:
            case 17:
            case 18:
                return 28;
            case 13:
            case 19:
            case 23:
            case 24:
            case 25:
            case 26:
            case 27:
            case 28:
            case 29:
            default:
                return Integer.MAX_VALUE;
            case 14:
                return 25;
            case 20:
                return 30;
            case 21:
            case 22:
                return 31;
            case 30:
            case 31:
                return 34;
        }
    }

    /* JADX INFO: renamed from: ˉᵵᵜ, reason: contains not printable characters */
    public static long m3223(long j, float f) {
        return f == 1.0f ? j : Math.round(j / ((double) f));
    }

    /* JADX INFO: renamed from: ˊˌˊ, reason: contains not printable characters */
    public static boolean m3224(int i) {
        return i == 10 || i == 13;
    }

    /* JADX INFO: renamed from: ˊᵙᵾᵲ, reason: contains not printable characters */
    public static String m3225(byte[] bArr) {
        return new String(bArr, StandardCharsets.UTF_8);
    }

    /* JADX INFO: renamed from: ˊᵡᵗʨ, reason: contains not printable characters */
    public static String m3226(int i) {
        switch (i) {
            case -2:
                return "none";
            case -1:
                return "unknown";
            case 0:
                return "default";
            case 1:
                return "audio";
            case 2:
                return "video";
            case 3:
                return "text";
            case 4:
                return "image";
            case 5:
                return "metadata";
            case C5224.STRING_SET_FIELD_NUMBER /* 6 */:
                return "camera motion";
            default:
                return i >= 10000 ? AbstractC0793.m2876(i, "custom (", ")") : "?";
        }
    }

    /* JADX INFO: renamed from: ˊᵨᵧ, reason: contains not printable characters */
    public static int m3227(int i) {
        if (i != 2) {
            if (i == 3) {
                return 1;
            }
            if (i != 4) {
                if (i != 21) {
                    if (i != 22) {
                        if (i != 268435456) {
                            if (i != 1342177280) {
                                if (i != 1610612736) {
                                    if (i == 1879048192) {
                                        return 8;
                                    }
                                    ᵷᵝˎ.ᵷᵺʾᵖ();
                                    return 0;
                                }
                            }
                        }
                    }
                }
                return 3;
            }
            return 4;
        }
        return 2;
    }

    /* JADX INFO: renamed from: ˊᵫᵗ, reason: contains not printable characters */
    public static void m3228(Closeable closeable) {
        if (closeable != null) {
            try {
                closeable.close();
            } catch (IOException unused) {
            }
        }
    }

    /* JADX INFO: renamed from: ˊᵾʽʼ, reason: contains not printable characters */
    public static String m3229(String str) {
        try {
            Class<?> cls = Class.forName("android.os.SystemProperties");
            return (String) cls.getMethod("get", String.class).invoke(cls, str);
        } catch (Exception e) {
            ˋˀᵧ.ˋˈ("Failed to read system property ".concat(str), e);
            return null;
        }
    }

    /* JADX INFO: renamed from: ˋʿᐧ, reason: contains not printable characters */
    public static long m3230(long j, int i) {
        return m3218(j, 1000000L, i, RoundingMode.DOWN);
    }

    /* JADX INFO: renamed from: ˋˈ, reason: contains not printable characters */
    public static boolean m3231(SparseArray sparseArray, SparseArray sparseArray2) {
        if (sparseArray == null) {
            return sparseArray2 == null;
        }
        if (sparseArray2 == null) {
            return false;
        }
        if (Build.VERSION.SDK_INT >= 31) {
            return sparseArray.contentEquals(sparseArray2);
        }
        int size = sparseArray.size();
        if (size != sparseArray2.size()) {
            return false;
        }
        for (int i = 0; i < size; i++) {
            if (!Objects.equals(sparseArray.valueAt(i), sparseArray2.get(sparseArray.keyAt(i)))) {
                return false;
            }
        }
        return true;
    }

    /* JADX WARN: Can't fix incorrect switch cases order, some code will duplicate */
    /* JADX WARN: Removed duplicated region for block: B:54:0x00de  */
    /* JADX WARN: Removed duplicated region for block: B:58:0x00f0  */
    /* JADX WARN: Removed duplicated region for block: B:59:0x00f2  */
    /* JADX WARN: Removed duplicated region for block: B:63:0x00f8  */
    /* JADX WARN: Removed duplicated region for block: B:66:0x00fd  */
    /* JADX WARN: Removed duplicated region for block: B:68:0x00ff  */
    /* JADX INFO: renamed from: ˋᵯᵩ, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public static long m3232(long j, long j2, long j3, RoundingMode roundingMode) {
        double dRint;
        long j4;
        long j5 = ᵥˈᵛ.ˁʢᵛ(j, j2);
        if (j5 != Long.MAX_VALUE && j5 != Long.MIN_VALUE) {
            return ᵥˈᵛ.ᵔᵖᵹᵫ(j5, j3, roundingMode);
        }
        long j6 = ᵥˈᵛ.ˑˊᵲ(Math.abs(j2), Math.abs(j3));
        RoundingMode roundingMode2 = RoundingMode.UNNECESSARY;
        long j7 = ᵥˈᵛ.ᵔᵖᵹᵫ(j2, j6, roundingMode2);
        long j8 = ᵥˈᵛ.ᵔᵖᵹᵫ(j3, j6, roundingMode2);
        long j9 = ᵥˈᵛ.ˑˊᵲ(Math.abs(j), Math.abs(j8));
        long j10 = ᵥˈᵛ.ᵔᵖᵹᵫ(j, j9, roundingMode2);
        long j11 = ᵥˈᵛ.ᵔᵖᵹᵫ(j8, j9, roundingMode2);
        long j12 = ᵥˈᵛ.ˁʢᵛ(j10, j7);
        if (j12 != Long.MAX_VALUE && j12 != Long.MIN_VALUE) {
            return ᵥˈᵛ.ᵔᵖᵹᵫ(j12, j11, roundingMode);
        }
        double d = j10 * (j7 / j11);
        if (d > 9.223372036854776E18d) {
            return Long.MAX_VALUE;
        }
        if (d < -9.223372036854776E18d) {
            return Long.MIN_VALUE;
        }
        int i = AbstractC1480.f6002;
        if (!ˌᵨʽʙ.ᵯᵷʽ(d)) {
            throw new ArithmeticException("input is infinite or NaN");
        }
        switch (AbstractC3105.f11881[roundingMode.ordinal()]) {
            case 1:
                ᵱˉˈ.ᵶᵥᵝ(AbstractC1480.m4244(d));
                dRint = d;
                if (!((-9.223372036854776E18d) - dRint >= 1.0d) || !(dRint < 9.223372036854776E18d)) {
                    return (long) dRint;
                }
                throw new ArithmeticException("rounded value is out of range for input " + d + " and rounding mode " + roundingMode);
            case 2:
                if (d < 0.0d && !AbstractC1480.m4244(d)) {
                    j4 = ((long) d) - 1;
                    dRint = j4;
                    if (!(((-9.223372036854776E18d) - dRint >= 1.0d) & (dRint < 9.223372036854776E18d))) {
                    }
                }
                dRint = d;
                if (!(((-9.223372036854776E18d) - dRint >= 1.0d) & (dRint < 9.223372036854776E18d))) {
                }
                break;
            case 3:
                if (d > 0.0d && !AbstractC1480.m4244(d)) {
                    j4 = ((long) d) + 1;
                    dRint = j4;
                    if (!(((-9.223372036854776E18d) - dRint >= 1.0d) & (dRint < 9.223372036854776E18d))) {
                    }
                }
                dRint = d;
                if (!(((-9.223372036854776E18d) - dRint >= 1.0d) & (dRint < 9.223372036854776E18d))) {
                }
                break;
            case 4:
                dRint = d;
                if (!(((-9.223372036854776E18d) - dRint >= 1.0d) & (dRint < 9.223372036854776E18d))) {
                }
                break;
            case 5:
                if (!AbstractC1480.m4244(d)) {
                    dRint = ((long) d) + ((long) (d > 0.0d ? 1 : -1));
                }
                if (!(((-9.223372036854776E18d) - dRint >= 1.0d) & (dRint < 9.223372036854776E18d))) {
                }
                break;
            case C5224.STRING_SET_FIELD_NUMBER /* 6 */:
                dRint = Math.rint(d);
                if (!(((-9.223372036854776E18d) - dRint >= 1.0d) & (dRint < 9.223372036854776E18d))) {
                }
                break;
            case C5224.DOUBLE_FIELD_NUMBER /* 7 */:
                dRint = Math.rint(d);
                if (Math.abs(d - dRint) == 0.5d) {
                    dRint = Math.copySign(0.5d, d) + d;
                }
                if (!(((-9.223372036854776E18d) - dRint >= 1.0d) & (dRint < 9.223372036854776E18d))) {
                }
                break;
            case C5224.BYTES_FIELD_NUMBER /* 8 */:
                dRint = Math.rint(d);
                if (Math.abs(d - dRint) == 0.5d) {
                }
                if (!(((-9.223372036854776E18d) - dRint >= 1.0d) & (dRint < 9.223372036854776E18d))) {
                }
                break;
            default:
                throw new AssertionError();
        }
    }

    /* JADX INFO: renamed from: ˌᴵ, reason: contains not printable characters */
    public static byte[] m3233(String str) {
        C1003 c1003 = C3240.f12336;
        C3240 c10032 = c1003.f12340;
        if (c10032 == null) {
            C4171 c4171M9109 = c1003.f12339.m9109();
            c10032 = c4171M9109 == c1003.f12339 ? c1003 : new C1003(c4171M9109);
            c1003.f12340 = c10032;
        }
        try {
            CharSequence charSequenceM7393 = c10032.m7393(str);
            int length = (int) (((((long) c10032.f12339.f15911) * ((long) charSequenceM7393.length())) + 7) / 8);
            byte[] bArr = new byte[length];
            int iMo1347 = c10032.mo1347(bArr, charSequenceM7393);
            if (iMo1347 == length) {
                return bArr;
            }
            byte[] bArr2 = new byte[iMo1347];
            System.arraycopy(bArr, 0, bArr2, 0, iMo1347);
            return bArr2;
        } catch (BaseEncoding$DecodingException e) {
            throw new IllegalArgumentException(e);
        }
    }

    /* JADX INFO: renamed from: ˌᵨʠᵫ, reason: contains not printable characters */
    public static int m3234(String str) {
        String[] strArrSplit;
        int length;
        int i = 0;
        if (str == null || (length = (strArrSplit = str.split("_", -1)).length) < 2) {
            return 0;
        }
        String str2 = strArrSplit[length - 1];
        boolean z = length >= 3 && "neg".equals(strArrSplit[length - 2]);
        try {
            str2.getClass();
            i = Integer.parseInt(str2);
            if (z) {
                return -i;
            }
        } catch (NumberFormatException unused) {
        }
        return i;
    }

    /* JADX INFO: renamed from: ˏːˆ, reason: contains not printable characters */
    public static int m3235(int i) {
        if (i == 10) {
            return Build.VERSION.SDK_INT >= 32 ? 737532 : 6396;
        }
        if (i == 16) {
            return Build.VERSION.SDK_INT >= 32 ? 205215996 : 0;
        }
        if (i == 24) {
            return Build.VERSION.SDK_INT >= 32 ? 67108860 : 0;
        }
        switch (i) {
            case 1:
                break;
            case 2:
                break;
            case 3:
                break;
            case 4:
                break;
            case 5:
                break;
            case C5224.STRING_SET_FIELD_NUMBER /* 6 */:
                break;
            case C5224.DOUBLE_FIELD_NUMBER /* 7 */:
                break;
            case C5224.BYTES_FIELD_NUMBER /* 8 */:
                break;
            default:
                switch (i) {
                    case 13:
                        if (Build.VERSION.SDK_INT >= 32) {
                        }
                        break;
                    case 14:
                        if (Build.VERSION.SDK_INT >= 32) {
                        }
                        break;
                }
                break;
        }
        return 0;
    }

    /* JADX INFO: renamed from: ˏᵩʨ, reason: contains not printable characters */
    public static String m3236(String str) {
        if (str == null) {
            return null;
        }
        String strReplace = str.replace('_', '-');
        if (!strReplace.isEmpty() && !strReplace.equals("und")) {
            str = strReplace;
        }
        String strConcat = ᵻᵕᵭ.ʽᵡᵢᵾ(str);
        int i = 0;
        String str2 = strConcat.split("-", 2)[0];
        if (f4223 == null) {
            String[] iSOLanguages = Locale.getISOLanguages();
            int length = iSOLanguages.length;
            String[] strArr = f4217;
            HashMap map = new HashMap(length + strArr.length);
            for (String str3 : iSOLanguages) {
                try {
                    String iSO3Language = new Locale(str3).getISO3Language();
                    if (!TextUtils.isEmpty(iSO3Language)) {
                        map.put(iSO3Language, str3);
                    }
                } catch (MissingResourceException unused) {
                }
            }
            for (int i2 = 0; i2 < strArr.length; i2 += 2) {
                map.put(strArr[i2], strArr[i2 + 1]);
            }
            f4223 = map;
        }
        String str4 = (String) f4223.get(str2);
        if (str4 != null) {
            strConcat = str4.concat(strConcat.substring(str2.length()));
            str2 = str4;
        }
        if (!"no".equals(str2) && !"i".equals(str2) && !"zh".equals(str2)) {
            return strConcat;
        }
        while (true) {
            String[] strArr2 = f4226;
            if (i >= strArr2.length) {
                return strConcat;
            }
            if (strConcat.startsWith(strArr2[i])) {
                return strArr2[i + 1] + strConcat.substring(strArr2[i].length());
            }
            i += 2;
        }
    }

    /* JADX INFO: renamed from: ːˏᵟᵯ, reason: contains not printable characters */
    public static int m3237(List list, Long l, boolean z) {
        int i;
        int iBinarySearch = Collections.binarySearch(list, l);
        if (iBinarySearch < 0) {
            i = -(iBinarySearch + 2);
        } else {
            while (true) {
                int i2 = iBinarySearch - 1;
                if (i2 < 0 || ((Comparable) list.get(i2)).compareTo(l) != 0) {
                    break;
                }
                iBinarySearch = i2;
            }
            i = iBinarySearch;
        }
        return z ? Math.max(0, i) : i;
    }

    /* JADX INFO: renamed from: ːᵝٴᵶ, reason: contains not printable characters */
    public static String[] m3238(String str) {
        return TextUtils.isEmpty(str) ? new String[0] : str.trim().split("(\\s*,\\s*)", -1);
    }

    /* JADX INFO: renamed from: ˑʢ, reason: contains not printable characters */
    public static boolean m3239(C4545 c4545, C4545 c45452, Inflater inflater) {
        if (c4545.m9623() == 0) {
            return false;
        }
        if (c45452.f17284.length < c4545.m9623()) {
            c45452.m9608(c4545.m9623() * 2);
        }
        if (inflater == null) {
            inflater = new Inflater();
        }
        inflater.setInput(c4545.f17284, c4545.f17282, c4545.m9623());
        int iInflate = 0;
        while (true) {
            try {
                byte[] bArr = c45452.f17284;
                iInflate += inflater.inflate(bArr, iInflate, bArr.length - iInflate);
                if (!inflater.finished()) {
                    if (inflater.needsDictionary() || inflater.needsInput()) {
                        break;
                    }
                    byte[] bArr2 = c45452.f17284;
                    if (iInflate == bArr2.length) {
                        c45452.m9608(bArr2.length * 2);
                    }
                } else {
                    c45452.m9612(iInflate);
                    inflater.reset();
                    return true;
                }
            } catch (DataFormatException unused) {
                return false;
            } finally {
                inflater.reset();
            }
        }
        return false;
    }

    /* JADX INFO: renamed from: ˑˊᵲ, reason: contains not printable characters */
    public static long m3240(long j) {
        return j == -9223372036854775807L ? System.currentTimeMillis() : SystemClock.elapsedRealtime() + j;
    }

    /* JADX INFO: renamed from: ᵔᵖᵹᵫ, reason: contains not printable characters */
    public static String m3241(int i, String str) {
        String[] strArrM3238 = m3238(str);
        if (strArrM3238.length == 0) {
            return null;
        }
        StringBuilder sb = new StringBuilder();
        for (String str2 : strArrM3238) {
            if (i == AbstractC4208.m9141(AbstractC4208.m9133(str2))) {
                if (sb.length() > 0) {
                    sb.append(",");
                }
                sb.append(str2);
            }
        }
        if (sb.length() > 0) {
            return sb.toString();
        }
        return null;
    }

    /* JADX INFO: renamed from: ᵗᵭ, reason: contains not printable characters */
    public static String m3242(int i) {
        return new String(new byte[]{(byte) (i >> 24), (byte) (i >> 16), (byte) (i >> 8), (byte) i}, StandardCharsets.US_ASCII);
    }

    /* JADX INFO: renamed from: ᵛˀˊ, reason: contains not printable characters */
    public static Object[] m3243(int i, Object[] objArr) {
        ᵻᵪ.ᵱᵽʡᵚ(i <= objArr.length);
        return Arrays.copyOf(objArr, i);
    }

    /* JADX WARN: Removed duplicated region for block: B:18:0x002c  */
    /* JADX WARN: Removed duplicated region for block: B:20:0x0030 A[RETURN] */
    /* JADX INFO: renamed from: ᵛˑﹳ, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public static boolean m3244(InterfaceC4650 interfaceC4650) {
        boolean z = false;
        if (interfaceC4650 == null) {
            return false;
        }
        C3262 c3262 = (C3262) interfaceC4650;
        int iM7460 = c3262.m7460();
        if (iM7460 != 1 || !c3262.m7478(2)) {
            if (iM7460 == 4 && c3262.m7478(4)) {
                c3262.m7463();
            }
            if (c3262.m7478(1)) {
                return z;
            }
            c3262.m7442(true);
            return true;
        }
        c3262.m7449();
        z = true;
        if (c3262.m7478(1)) {
        }
    }

    /* JADX INFO: renamed from: ᵜᵤ, reason: contains not printable characters */
    public static boolean m3245(InterfaceC4650 interfaceC4650, boolean z) {
        if (interfaceC4650 != null) {
            C3262 c3262 = (C3262) interfaceC4650;
            if (c3262.m7448() && c3262.m7460() != 1 && c3262.m7460() != 4 && (!z || c3262.m7453() == 0 || c3262.m7453() == 4)) {
                return false;
            }
        }
        return true;
    }

    /* JADX INFO: renamed from: ᵜᵪʾ, reason: contains not printable characters */
    public static int m3246(int i, String str) {
        int i2 = 0;
        for (String str2 : m3238(str)) {
            if (i == AbstractC4208.m9141(AbstractC4208.m9133(str2))) {
                i2++;
            }
        }
        return i2;
    }

    /* JADX INFO: renamed from: ᵝᵶ, reason: contains not printable characters */
    public static boolean m3247(Object[] objArr, Object obj) {
        for (Object obj2 : objArr) {
            if (Objects.equals(obj2, obj)) {
                return true;
            }
        }
        return false;
    }

    /* JADX INFO: renamed from: ᵞᵛᵘ, reason: contains not printable characters */
    public static boolean m3248(Context context) {
        int i = Build.VERSION.SDK_INT;
        if (i < 29 || context.getApplicationInfo().targetSdkVersion < 29) {
            return true;
        }
        if (i == 30) {
            String str = Build.MODEL;
            if (ᵻᵕᵭ.ᵱᵽʡᵚ(str, "moto g(20)") || ᵻᵕᵭ.ᵱᵽʡᵚ(str, "rmx3231")) {
                return true;
            }
        }
        return i == 34 && ᵻᵕᵭ.ᵱᵽʡᵚ(Build.MODEL, "sm-x200");
    }

    /* JADX INFO: renamed from: ᵟᵹᵙ, reason: contains not printable characters */
    public static int m3249(int i, int i2, int i3, byte[] bArr) {
        while (i < i2) {
            i3 = f4221[((i3 >>> 24) ^ (bArr[i] & 255)) & 255] ^ (i3 << 8);
            i++;
        }
        return i3;
    }

    /* JADX INFO: renamed from: ᵠˏˏ, reason: contains not printable characters */
    public static C5286 m3250(int i, int i2, int i3) {
        C4753 c4753 = new C4753();
        c4753.f18101 = AbstractC4208.m9132("audio/raw");
        c4753.f18090 = i2;
        c4753.f18113 = i3;
        c4753.f18095 = i;
        return new C5286(c4753);
    }

    /* JADX INFO: renamed from: ᵡᵶ, reason: contains not printable characters */
    public static void m3251(Handler handler, Runnable runnable) {
        Looper looper = handler.getLooper();
        if (looper.getThread().isAlive()) {
            if (looper == Looper.myLooper()) {
                runnable.run();
            } else {
                handler.post(runnable);
            }
        }
    }

    /* JADX INFO: renamed from: ᵡᵶᵬʤ, reason: contains not printable characters */
    public static void m3252(ArrayList arrayList, int i, int i2) {
        if (i < 0 || i2 > arrayList.size() || i > i2) {
            ᵷᵝˎ.ᵷᵺʾᵖ();
        } else if (i != i2) {
            arrayList.subList(i, i2).clear();
        }
    }

    /* JADX INFO: renamed from: ᵨˈʼﹶ, reason: contains not printable characters */
    public static boolean m3253(int i) {
        return i == 3 || i == 2 || i == 268435456 || i == 21 || i == 1342177280 || i == 22 || i == 1610612736 || i == 4 || i == 1879048192;
    }

    /* JADX INFO: renamed from: ᵨᵣ, reason: contains not printable characters */
    public static int m3254(int[] iArr, int i, boolean z, boolean z2) {
        int i2;
        int i3;
        int iBinarySearch = Arrays.binarySearch(iArr, i);
        if (iBinarySearch < 0) {
            i3 = -(iBinarySearch + 2);
        } else {
            while (true) {
                i2 = iBinarySearch - 1;
                if (i2 < 0 || iArr[i2] != i) {
                    break;
                }
                iBinarySearch = i2;
            }
            i3 = z ? iBinarySearch : i2;
        }
        return z2 ? Math.max(0, i3) : i3;
    }

    /* JADX WARN: Removed duplicated region for block: B:21:0x0041  */
    /* JADX WARN: Removed duplicated region for block: B:24:0x0049 A[ORIG_RETURN, RETURN] */
    /* JADX WARN: Removed duplicated region for block: B:26:0x004b  */
    /* JADX INFO: renamed from: ᵨᵼⁱ, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public static C3281 m3255(String str, String str2, String str3) {
        int i;
        int i2;
        int i3;
        int i4;
        if (str == null || !AbstractC4208.m9135(str, str2)) {
            return null;
        }
        if (!str.startsWith("dvhe") && !str.startsWith("dvh1") && !str.startsWith("dav1")) {
            if (str3 != null) {
                i = 2;
                if (!str3.equals("db1p")) {
                    if (str3.startsWith("db4")) {
                        i2 = 7;
                        i3 = 2;
                        i4 = 6;
                    } else {
                        i4 = -1;
                        i3 = -1;
                        i2 = -1;
                    }
                }
            }
            if (i4 != -1) {
                return null;
            }
            return new C3281(i4, i3, i2, null, -1, -1);
        }
        i = 1;
        i3 = i;
        i4 = 6;
        i2 = 6;
        if (i4 != -1) {
        }
    }

    /* JADX INFO: renamed from: ᵪᵹᵥᵻ, reason: contains not printable characters */
    public static int m3256(SparseArray sparseArray) {
        if (Build.VERSION.SDK_INT >= 31) {
            return sparseArray.contentHashCode();
        }
        int iHashCode = 17;
        for (int i = 0; i < sparseArray.size(); i++) {
            iHashCode = Objects.hashCode(sparseArray.valueAt(i)) + ((sparseArray.keyAt(i) + (iHashCode * 31)) * 31);
        }
        return iHashCode;
    }

    /* JADX INFO: renamed from: ᵫˈᵹ, reason: contains not printable characters */
    public static String m3257(byte[] bArr) {
        boolean z;
        C1003 c1003 = C3240.f12336;
        C3240 c10032 = c1003.f12338;
        if (c10032 == null) {
            C4171 c4171M9109 = c1003.f12339;
            char[] cArr = c4171M9109.f15905;
            int length = cArr.length;
            int i = 0;
            while (true) {
                if (i >= length) {
                    break;
                }
                if (ᵻᵕᵭ.ᵶˇᵱ(cArr[i])) {
                    int length2 = cArr.length;
                    int i2 = 0;
                    while (true) {
                        if (i2 >= length2) {
                            z = false;
                            break;
                        }
                        char c = cArr[i2];
                        if (c >= 'a' && c <= 'z') {
                            z = true;
                            break;
                        }
                        i2++;
                    }
                    ᵻᵪ.ˊᵨᵧ("Cannot call lowerCase() on a mixed-case alphabet", !z);
                    char[] cArr2 = new char[cArr.length];
                    for (int i3 = 0; i3 < cArr.length; i3++) {
                        char c2 = cArr[i3];
                        if (ᵻᵕᵭ.ᵶˇᵱ(c2)) {
                            c2 = (char) (c2 ^ ' ');
                        }
                        cArr2[i3] = c2;
                    }
                    C4171 c4171 = new C4171(AbstractC3653.m8231(new StringBuilder(), c4171M9109.f15909, ".lowerCase()"), cArr2);
                    c4171M9109 = c4171M9109.f15912 ? c4171.m9109() : c4171;
                } else {
                    i++;
                }
            }
            c10032 = c4171M9109 == c1003.f12339 ? c1003 : new C1003(c4171M9109);
            c1003.f12338 = c10032;
        }
        return c10032.m7391(bArr);
    }

    /* JADX INFO: renamed from: ᵮᵣᵗˈ, reason: contains not printable characters */
    public static boolean m3258(SparseArray sparseArray, int i) {
        return sparseArray.indexOfKey(i) >= 0;
    }

    /* JADX INFO: renamed from: ᵯᵷʽ, reason: contains not printable characters */
    public static Point m3259(Context context) {
        DisplayManager displayManager = (DisplayManager) context.getSystemService("display");
        Display display = displayManager != null ? displayManager.getDisplay(0) : null;
        if (display == null) {
            WindowManager windowManager = (WindowManager) context.getSystemService("window");
            windowManager.getClass();
            display = windowManager.getDefaultDisplay();
        }
        if (display.getDisplayId() == 0 && m3216(context)) {
            String strM3229 = Build.VERSION.SDK_INT < 28 ? m3229("sys.display-size") : m3229("vendor.display-size");
            if (!TextUtils.isEmpty(strM3229)) {
                try {
                    String[] strArrSplit = strM3229.trim().split("x", -1);
                    if (strArrSplit.length == 2) {
                        int i = Integer.parseInt(strArrSplit[0]);
                        int i2 = Integer.parseInt(strArrSplit[1]);
                        if (i > 0 && i2 > 0) {
                            return new Point(i, i2);
                        }
                    }
                } catch (NumberFormatException unused) {
                }
                ˋˀᵧ.ᵝᵶ("Invalid display size: " + strM3229);
            }
            if ("Sony".equals(Build.MANUFACTURER) && Build.MODEL.startsWith("BRAVIA") && context.getPackageManager().hasSystemFeature("com.sony.dtv.hardware.panel.qfhd")) {
                return new Point(3840, 2160);
            }
        }
        Point point = new Point();
        Display.Mode mode = display.getMode();
        point.x = mode.getPhysicalWidth();
        point.y = mode.getPhysicalHeight();
        return point;
    }

    /* JADX INFO: renamed from: ᵱʡˏ, reason: contains not printable characters */
    public static Handler m3260(Handler.Callback callback) {
        Looper looperMyLooper = Looper.myLooper();
        looperMyLooper.getClass();
        return new Handler(looperMyLooper, callback);
    }

    /* JADX INFO: renamed from: ᵱᵽʡᵚ, reason: contains not printable characters */
    public static int m3261(int i, int i2, int i3) {
        return Math.max(i2, Math.min(i, i3));
    }

    /* JADX INFO: renamed from: ᵲᵶᵳˈ, reason: contains not printable characters */
    public static long m3262(long j, long j2) {
        long j3 = j + j2;
        long j4 = (((j2 ^ j) > 0L ? 1 : ((j2 ^ j) == 0L ? 0 : -1)) < 0) | ((j ^ j3) >= 0) ? j3 : ((j3 >>> 63) ^ 1) + Long.MAX_VALUE;
        if ((j4 != Long.MIN_VALUE || j3 == Long.MIN_VALUE) && (j4 != Long.MAX_VALUE || j3 == Long.MAX_VALUE)) {
            return j4;
        }
        return Long.MAX_VALUE;
    }

    /* JADX INFO: renamed from: ᵵᵬᵽ, reason: contains not printable characters */
    public static int m3263(Uri uri) {
        int i;
        String scheme = uri.getScheme();
        if (scheme != null && (ᵻᵕᵭ.ᵱᵽʡᵚ("rtsp", scheme) || ᵻᵕᵭ.ᵱᵽʡᵚ("rtspt", scheme))) {
            return 3;
        }
        String lastPathSegment = uri.getLastPathSegment();
        if (lastPathSegment != null) {
            int iLastIndexOf = lastPathSegment.lastIndexOf(46);
            if (iLastIndexOf >= 0) {
                String str = ᵻᵕᵭ.ʽᵡᵢᵾ(lastPathSegment.substring(iLastIndexOf + 1));
                str.getClass();
                switch (str) {
                    case "ism":
                    case "isml":
                        i = 1;
                        break;
                    case "mpd":
                        i = 0;
                        break;
                    case "m3u8":
                        i = 2;
                        break;
                    default:
                        i = 4;
                        break;
                }
                if (i != 4) {
                    return i;
                }
            }
            String path = uri.getPath();
            path.getClass();
            Matcher matcher = f4227.matcher(path);
            if (matcher.matches()) {
                String strGroup = matcher.group(2);
                if (strGroup != null) {
                    if (strGroup.contains("format=mpd-time-csf")) {
                        return 0;
                    }
                    if (strGroup.contains("format=m3u8-aapl")) {
                        return 2;
                    }
                }
                return 1;
            }
        }
        return 4;
    }

    /* JADX INFO: renamed from: ᵵᵸᵕᵸ, reason: contains not printable characters */
    public static long m3264(long j) {
        return (j == -9223372036854775807L || j == Long.MIN_VALUE) ? j : j / 1000;
    }

    /* JADX INFO: renamed from: ᵵᵽ, reason: contains not printable characters */
    public static int m3265(int i, int i2) {
        return ((i + i2) - 1) / i2;
    }

    /* JADX INFO: renamed from: ᵶˇᵱ, reason: contains not printable characters */
    public static Locale m3266() {
        return Build.VERSION.SDK_INT >= 24 ? Locale.getDefault(Locale.Category.DISPLAY) : Locale.getDefault();
    }

    /* JADX INFO: renamed from: ᵶᵥᵝ, reason: contains not printable characters */
    public static long m3267(long j, long j2, long j3) {
        return Math.max(j2, Math.min(j, j3));
    }

    /* JADX INFO: renamed from: ᵷᵺʾᵖ, reason: contains not printable characters */
    public static int m3268(C1785 c1785, long j) {
        int i = c1785.f7163 - 1;
        int i2 = 0;
        while (i2 <= i) {
            int i3 = (i2 + i) >>> 1;
            if (c1785.m4933(i3) < j) {
                i2 = i3 + 1;
            } else {
                i = i3 - 1;
            }
        }
        int i4 = i + 1;
        if (i4 < c1785.f7163 && c1785.m4933(i4) == j) {
            return i4;
        }
        if (i == -1) {
            return 0;
        }
        return i;
    }

    /* JADX INFO: renamed from: ᵸˆˁ, reason: contains not printable characters */
    public static long m3269(long j, float f) {
        return f == 1.0f ? j : Math.round(j * ((double) f));
    }

    /* JADX INFO: renamed from: ᵻʽᵯ, reason: contains not printable characters */
    public static float m3270(float f, float f2, float f3) {
        return Math.max(f2, Math.min(f, f3));
    }

    /* JADX INFO: renamed from: ᵻˈᵦʼ, reason: contains not printable characters */
    public static int m3271(long[] jArr, long j, boolean z) {
        int i;
        int iBinarySearch = Arrays.binarySearch(jArr, j);
        if (iBinarySearch < 0) {
            i = -(iBinarySearch + 2);
        } else {
            while (true) {
                int i2 = iBinarySearch - 1;
                if (i2 < 0 || jArr[i2] != j) {
                    break;
                }
                iBinarySearch = i2;
            }
            i = iBinarySearch;
        }
        return z ? Math.max(0, i) : i;
    }
}
