package defpackage;

/* renamed from: ʿᵝᵲ, reason: contains not printable characters */
/* loaded from: classes3.dex */
public abstract class AbstractC0436 extends AbstractC1453 {
    /* renamed from: ʾᵻᵭٴ, reason: contains not printable characters */
    public static Integer m2046(String str) {
        boolean z;
        int i;
        int i2;
        ˉˇʨ.ᵹᵝᵶ(10);
        int length = str.length();
        if (length == 0) {
            return null;
        }
        int i3 = 0;
        char cCharAt = str.charAt(0);
        int i4 = -2147483647;
        if (ᵲᵝᵪ.ᵳٴᵶ(cCharAt, 48) < 0) {
            i = 1;
            if (length == 1) {
                return null;
            }
            if (cCharAt == '+') {
                z = false;
            } else {
                if (cCharAt != '-') {
                    return null;
                }
                i4 = Integer.MIN_VALUE;
                z = true;
            }
        } else {
            z = false;
            i = 0;
        }
        int i5 = -59652323;
        while (i < length) {
            int iDigit = Character.digit((int) str.charAt(i), 10);
            if (iDigit < 0) {
                return null;
            }
            if ((i3 < i5 && (i5 != -59652323 || i3 < (i5 = i4 / 10))) || (i2 = i3 * 10) < i4 + iDigit) {
                return null;
            }
            i3 = i2 - iDigit;
            i++;
        }
        return z ? Integer.valueOf(i3) : Integer.valueOf(-i3);
    }

    /* renamed from: ˊʾˊ, reason: contains not printable characters */
    public static boolean m2047(String str, String str2, boolean z) {
        return !z ? str.endsWith(str2) : str.regionMatches(true, str.length() - str2.length(), str2, 0, str2.length());
    }

    /* renamed from: ˌᵹᵨˑ, reason: contains not printable characters */
    public static String m2048(String str, String str2, String str3, boolean z) {
        int i = 0;
        int iM5056 = AbstractC1789.m5056(str, str2, 0, z);
        if (iM5056 < 0) {
            return str;
        }
        int length = str2.length();
        int i2 = length >= 1 ? length : 1;
        int length2 = str3.length() + (str.length() - length);
        if (length2 < 0) {
            throw new OutOfMemoryError();
        }
        StringBuilder sb = new StringBuilder(length2);
        do {
            sb.append((CharSequence) str, i, iM5056);
            sb.append(str3);
            i = iM5056 + length;
            if (iM5056 >= str.length()) {
                break;
            }
            iM5056 = AbstractC1789.m5056(str, str2, iM5056 + i2, z);
        } while (iM5056 > 0);
        sb.append((CharSequence) str, i, str.length());
        return sb.toString();
    }

    /* renamed from: ᵠᵿː, reason: contains not printable characters */
    public static boolean m2049(String str, String str2, boolean z) {
        if (!z) {
            return str.startsWith(str2);
        }
        int length = str2.length();
        return !z ? str.regionMatches(0, str2, 0, length) : str.regionMatches(z, 0, str2, 0, length);
    }

    /* renamed from: ᵷᵱ, reason: contains not printable characters */
    public static boolean m2050(String str, String str2) {
        return str == null ? str2 == null : str.equalsIgnoreCase(str2);
    }

    /* renamed from: ᵺᵠ, reason: contains not printable characters */
    public static Long m2051(String str) {
        boolean z;
        ˉˇʨ.ᵹᵝᵶ(10);
        int length = str.length();
        if (length == 0) {
            return null;
        }
        int i = 0;
        char cCharAt = str.charAt(0);
        long j = -9223372036854775807L;
        if (ᵲᵝᵪ.ᵳٴᵶ(cCharAt, 48) < 0) {
            z = true;
            if (length == 1) {
                return null;
            }
            if (cCharAt == '+') {
                z = false;
                i = 1;
            } else {
                if (cCharAt != '-') {
                    return null;
                }
                j = Long.MIN_VALUE;
                i = 1;
            }
        } else {
            z = false;
        }
        long j2 = 0;
        long j3 = -256204778801521550L;
        while (i < length) {
            int iDigit = Character.digit((int) str.charAt(i), 10);
            if (iDigit < 0) {
                return null;
            }
            if (j2 < j3) {
                if (j3 != -256204778801521550L) {
                    return null;
                }
                j3 = j / 10;
                if (j2 < j3) {
                    return null;
                }
            }
            long j4 = j2 * 10;
            long j5 = iDigit;
            if (j4 < j + j5) {
                return null;
            }
            j2 = j4 - j5;
            i++;
        }
        return z ? Long.valueOf(j2) : Long.valueOf(-j2);
    }
}
