package defpackage;

/* renamed from: ᵞʞᵳ, reason: contains not printable characters */
/* loaded from: classes3.dex */
public final class C2942 {

    /* renamed from: ˇʼʤˎ, reason: contains not printable characters */
    public byte[] f11401;

    /* renamed from: ˏᵙ, reason: contains not printable characters */
    public int f11402;

    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    public int f11403;

    /* renamed from: ᵴᵳ, reason: contains not printable characters */
    public int f11404;

    /* renamed from: ᵻᵢﹳᵰ, reason: contains not printable characters */
    public int f11405 = 0;

    public C2942(byte[] bArr, int i, int i2) {
        this.f11401 = bArr;
        this.f11404 = i;
        this.f11402 = i;
        this.f11403 = i2;
        m7171();
    }

    /* renamed from: ˇʼʤˎ, reason: contains not printable characters */
    public int m7166(int i) {
        int i2;
        this.f11405 += i;
        int i3 = 0;
        while (true) {
            i2 = this.f11405;
            if (i2 <= 8) {
                break;
            }
            int i4 = i2 - 8;
            this.f11405 = i4;
            byte[] bArr = this.f11401;
            int i5 = this.f11402;
            i3 |= (bArr[i5] & 255) << i4;
            if (!m7174(i5 + 1)) {
                i = 1;
            }
            this.f11402 = i5 + i;
        }
        byte[] bArr2 = this.f11401;
        int i6 = this.f11402;
        int i7 = ((-1) >>> (32 - i)) & (i3 | ((bArr2[i6] & 255) >> (8 - i2)));
        if (i2 == 8) {
            this.f11405 = 0;
            this.f11402 = i6 + (m7174(i6 + 1) ? 2 : 1);
        }
        m7171();
        return i7;
    }

    /* renamed from: ˎˏʜʾ, reason: contains not printable characters */
    public int m7167() {
        int iM7168 = m7168();
        return ((iM7168 + 1) / 2) * (iM7168 % 2 == 0 ? -1 : 1);
    }

    /* renamed from: ˏˋٴ, reason: contains not printable characters */
    public int m7168() {
        int i = 0;
        while (!m7175()) {
            i++;
        }
        return ((1 << i) - 1) + (i > 0 ? m7166(i) : 0);
    }

    /* renamed from: ˏᵙ, reason: contains not printable characters */
    public boolean m7169() {
        int i = this.f11402;
        int i2 = this.f11405;
        int i3 = 0;
        while (this.f11402 < this.f11403 && !m7175()) {
            i3++;
        }
        boolean z = this.f11402 == this.f11403;
        this.f11402 = i;
        this.f11405 = i2;
        return !z && m7172((i3 * 2) + 1);
    }

    /* renamed from: ᵝᵵᵺ, reason: contains not printable characters */
    public void m7170() {
        int i = this.f11405 + 1;
        this.f11405 = i;
        if (i == 8) {
            this.f11405 = 0;
            int i2 = this.f11402;
            this.f11402 = i2 + (m7174(i2 + 1) ? 2 : 1);
        }
        m7171();
    }

    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    public void m7171() {
        int i;
        int i2 = this.f11402;
        ᵛᵾˏ.ᵿʗᵝʽ(i2 >= 0 && (i2 < (i = this.f11403) || (i2 == i && this.f11405 == 0)));
    }

    /* renamed from: ᵴᵳ, reason: contains not printable characters */
    public boolean m7172(int i) {
        int i2 = this.f11402;
        int i3 = i / 8;
        int i4 = i2 + i3;
        int i5 = (this.f11405 + i) - (i3 * 8);
        if (i5 > 7) {
            i4++;
            i5 -= 8;
        }
        while (true) {
            i2++;
            if (i2 > i4 || i4 > this.f11403) {
                break;
            }
            if (m7174(i2)) {
                i4++;
                i2 += 2;
            }
        }
        int i6 = this.f11403;
        return i4 < i6 || (i4 == i6 && i5 == 0);
    }

    /* renamed from: ᵶᵷᵕ, reason: contains not printable characters */
    public void m7173(int i) {
        int i2 = this.f11402;
        int i3 = i / 8;
        int i4 = i2 + i3;
        this.f11402 = i4;
        int i5 = (i - (i3 * 8)) + this.f11405;
        this.f11405 = i5;
        if (i5 > 7) {
            this.f11402 = i4 + 1;
            this.f11405 = i5 - 8;
        }
        while (true) {
            i2++;
            if (i2 > this.f11402) {
                m7171();
                return;
            } else if (m7174(i2)) {
                this.f11402++;
                i2 += 2;
            }
        }
    }

    /* renamed from: ᵹᵝᵶ, reason: contains not printable characters */
    public boolean m7174(int i) {
        int i2 = i - 2;
        if (this.f11404 > i2 || i >= this.f11403) {
            return false;
        }
        byte[] bArr = this.f11401;
        return bArr[i] == 3 && bArr[i2] == 0 && bArr[i - 1] == 0;
    }

    /* renamed from: ᵻᵢﹳᵰ, reason: contains not printable characters */
    public boolean m7175() {
        boolean z = (this.f11401[this.f11402] & (128 >> this.f11405)) != 0;
        m7170();
        return z;
    }
}
