package defpackage;

import java.io.Closeable;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Comparator;

/* renamed from: ˊᵜʧˇ, reason: contains not printable characters */
/* loaded from: classes3.dex */
public abstract class AbstractC1348 {

    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    public static final byte[] f5567 = new byte[0];

    /* renamed from: ᵴᵳ, reason: contains not printable characters */
    public static final C2679 f5568 = ˁـᵛ.ᵞʡ(new C2185[]{ˋᵮᵯᵔ.ᵝᵵᵺ("efbbbf"), ˋᵮᵯᵔ.ᵝᵵᵺ("feff"), ˋᵮᵯᵔ.ᵝᵵᵺ("fffe0000"), ˋᵮᵯᵔ.ᵝᵵᵺ("fffe"), ˋᵮᵯᵔ.ᵝᵵᵺ("0000feff")});

    /* renamed from: ˇʼʤˎ, reason: contains not printable characters */
    public static final boolean m4172(String[] strArr, String[] strArr2, Comparator comparator) {
        if (strArr.length != 0 && strArr2 != null && strArr2.length != 0) {
            for (String str : strArr) {
                for (String str2 : strArr2) {
                    if (comparator.compare(str, str2) == 0) {
                        return true;
                    }
                }
            }
        }
        return false;
    }

    /* renamed from: ˌᵜᵹᵩ, reason: contains not printable characters */
    public static final int m4173(InterfaceC4777 interfaceC4777) {
        return (interfaceC4777.readByte() & 255) | ((interfaceC4777.readByte() & 255) << 16) | ((interfaceC4777.readByte() & 255) << 8);
    }

    /* renamed from: ˎˏʜʾ, reason: contains not printable characters */
    public static final int m4174(int i, int i2, String str) {
        while (i < i2) {
            char cCharAt = str.charAt(i);
            if (cCharAt != '\t' && cCharAt != '\n' && cCharAt != '\f' && cCharAt != '\r' && cCharAt != ' ') {
                return i;
            }
            i++;
        }
        return i2;
    }

    /* renamed from: ˏˋٴ, reason: contains not printable characters */
    public static final int m4175(String str) {
        int length = str.length();
        for (int i = 0; i < length; i++) {
            char cCharAt = str.charAt(i);
            if (ᵲᵝᵪ.ᵳٴᵶ(cCharAt, 31) <= 0 || ᵲᵝᵪ.ᵳٴᵶ(cCharAt, 127) >= 0) {
                return i;
            }
        }
        return -1;
    }

    /* renamed from: ˏᵙ, reason: contains not printable characters */
    public static final int m4176(int i, int i2, String str, String str2) {
        while (i < i2) {
            if (AbstractC1789.m5062(str2, str.charAt(i))) {
                return i;
            }
            i++;
        }
        return i2;
    }

    /* renamed from: ᵝᵵᵺ, reason: contains not printable characters */
    public static final String[] m4177(String[] strArr, String[] strArr2, Comparator comparator) {
        ArrayList arrayList = new ArrayList();
        for (String str : strArr) {
            int length = strArr2.length;
            int i = 0;
            while (true) {
                if (i >= length) {
                    break;
                }
                if (comparator.compare(str, strArr2[i]) == 0) {
                    arrayList.add(str);
                    break;
                }
                i++;
            }
        }
        return (String[]) arrayList.toArray(new String[0]);
    }

    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    public static final void m4178(long j, long j2, long j3) {
        if ((j2 | j3) < 0 || j2 > j || j - j2 < j3) {
            StringBuilder sbM4110 = AbstractC1327.m4110(j, "length=", ", offset=");
            sbM4110.append(j2);
            sbM4110.append(", count=");
            sbM4110.append(j2);
            throw new ArrayIndexOutOfBoundsException(sbM4110.toString());
        }
    }

    /* renamed from: ᵪʩ, reason: contains not printable characters */
    public static final String m4179(int i, int i2, String str) {
        int iM4174 = m4174(i, i2, str);
        return str.substring(iM4174, m4184(iM4174, i2, str));
    }

    /* renamed from: ᵯٴᵦ, reason: contains not printable characters */
    public static final int m4180(int i, String str) throws NumberFormatException {
        if (str == null) {
            return i;
        }
        try {
            long j = Long.parseLong(str);
            if (j > 2147483647L) {
                return Integer.MAX_VALUE;
            }
            if (j < 0) {
                return 0;
            }
            return (int) j;
        } catch (NumberFormatException unused) {
            return i;
        }
    }

    /* renamed from: ᵴᵳ, reason: contains not printable characters */
    public static final void m4181(Closeable closeable) throws IOException {
        try {
            closeable.close();
        } catch (RuntimeException e) {
            throw e;
        } catch (Exception unused) {
        }
    }

    /* renamed from: ᵶᵷᵕ, reason: contains not printable characters */
    public static final boolean m4182(String str) {
        return str.equalsIgnoreCase("Authorization") || str.equalsIgnoreCase("Cookie") || str.equalsIgnoreCase("Proxy-Authorization") || str.equalsIgnoreCase("Set-Cookie");
    }

    /* renamed from: ᵸˑ, reason: contains not printable characters */
    public static final int m4183(char c) {
        if ('0' <= c && c < ':') {
            return c - '0';
        }
        if ('a' <= c && c < 'g') {
            return c - 'W';
        }
        if ('A' > c || c >= 'G') {
            return -1;
        }
        return c - '7';
    }

    /* renamed from: ᵹᵝᵶ, reason: contains not printable characters */
    public static final int m4184(int i, int i2, String str) {
        int i3 = i2 - 1;
        if (i <= i3) {
            while (true) {
                char cCharAt = str.charAt(i3);
                if (cCharAt != '\t' && cCharAt != '\n' && cCharAt != '\f' && cCharAt != '\r' && cCharAt != ' ') {
                    return i3 + 1;
                }
                if (i3 == i) {
                    break;
                }
                i3--;
            }
        }
        return i;
    }

    /* renamed from: ᵻᵢﹳᵰ, reason: contains not printable characters */
    public static final int m4185(String str, char c, int i, int i2) {
        while (i < i2) {
            if (str.charAt(i) == c) {
                return i;
            }
            i++;
        }
        return i2;
    }
}
