package defpackage;

/* JADX INFO: renamed from: ˌːᵭ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes3.dex */
public final class C1597 {

    /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
    public int f6408;

    /* JADX INFO: renamed from: ːˏᵟᵯ, reason: contains not printable characters */
    public int f6409;

    /* JADX INFO: renamed from: ᵨᵣ, reason: contains not printable characters */
    public byte[] f6410;

    /* JADX INFO: renamed from: ᵲᵶᵳˈ, reason: contains not printable characters */
    public int f6411;

    /* JADX INFO: renamed from: ᵷᵺʾᵖ, reason: contains not printable characters */
    public int f6412 = 0;

    public C1597(byte[] bArr, int i, int i2) {
        this.f6410 = bArr;
        this.f6408 = i;
        this.f6409 = i;
        this.f6411 = i2;
        m4443();
    }

    /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
    public boolean m4438(int i) {
        int i2 = this.f6409;
        int i3 = i / 8;
        int i4 = i2 + i3;
        int i5 = (this.f6412 + i) - (i3 * 8);
        if (i5 > 7) {
            i4++;
            i5 -= 8;
        }
        while (true) {
            i2++;
            if (i2 > i4 || i4 > this.f6411) {
                break;
            }
            if (m4439(i2)) {
                i4++;
                i2 += 2;
            }
        }
        int i6 = this.f6411;
        return i4 < i6 || (i4 == i6 && i5 == 0);
    }

    /* JADX INFO: renamed from: ˊᵫᵗ, reason: contains not printable characters */
    public boolean m4439(int i) {
        int i2 = i - 2;
        if (this.f6408 > i2 || i >= this.f6411) {
            return false;
        }
        byte[] bArr = this.f6410;
        return bArr[i] == 3 && bArr[i2] == 0 && bArr[i - 1] == 0;
    }

    /* JADX INFO: renamed from: ːˏᵟᵯ, reason: contains not printable characters */
    public boolean m4440() {
        int i = this.f6409;
        int i2 = this.f6412;
        int i3 = 0;
        while (this.f6409 < this.f6411 && !m4445()) {
            i3++;
        }
        boolean z = this.f6409 == this.f6411;
        this.f6409 = i;
        this.f6412 = i2;
        return !z && m4438((i3 * 2) + 1);
    }

    /* JADX INFO: renamed from: ᵨᵣ, reason: contains not printable characters */
    public int m4441(int i) {
        int i2;
        this.f6412 += i;
        int i3 = 0;
        while (true) {
            i2 = this.f6412;
            if (i2 <= 8) {
                break;
            }
            int i4 = i2 - 8;
            this.f6412 = i4;
            byte[] bArr = this.f6410;
            int i5 = this.f6409;
            i3 |= (bArr[i5] & 255) << i4;
            if (!m4439(i5 + 1)) {
                i = 1;
            }
            this.f6409 = i5 + i;
        }
        byte[] bArr2 = this.f6410;
        int i6 = this.f6409;
        int i7 = ((-1) >>> (32 - i)) & (i3 | ((bArr2[i6] & 255) >> (8 - i2)));
        if (i2 == 8) {
            this.f6412 = 0;
            this.f6409 = i6 + (m4439(i6 + 1) ? 2 : 1);
        }
        m4443();
        return i7;
    }

    /* JADX INFO: renamed from: ᵱᵽʡᵚ, reason: contains not printable characters */
    public void m4442(int i) {
        int i2 = this.f6409;
        int i3 = i / 8;
        int i4 = i2 + i3;
        this.f6409 = i4;
        int i5 = (i - (i3 * 8)) + this.f6412;
        this.f6412 = i5;
        if (i5 > 7) {
            this.f6409 = i4 + 1;
            this.f6412 = i5 - 8;
        }
        while (true) {
            i2++;
            if (i2 > this.f6409) {
                m4443();
                return;
            } else if (m4439(i2)) {
                this.f6409++;
                i2 += 2;
            }
        }
    }

    /* JADX INFO: renamed from: ᵲᵶᵳˈ, reason: contains not printable characters */
    public void m4443() {
        int i;
        int i2 = this.f6409;
        ᵻᵪ.ˌᴵ(i2 >= 0 && (i2 < (i = this.f6411) || (i2 == i && this.f6412 == 0)));
    }

    /* JADX INFO: renamed from: ᵵᵽ, reason: contains not printable characters */
    public int m4444() {
        int iM4447 = m4447();
        return ((iM4447 + 1) / 2) * (iM4447 % 2 == 0 ? -1 : 1);
    }

    /* JADX INFO: renamed from: ᵷᵺʾᵖ, reason: contains not printable characters */
    public boolean m4445() {
        boolean z = (this.f6410[this.f6409] & (128 >> this.f6412)) != 0;
        m4446();
        return z;
    }

    /* JADX INFO: renamed from: ᵻʽᵯ, reason: contains not printable characters */
    public void m4446() {
        int i = this.f6412 + 1;
        this.f6412 = i;
        if (i == 8) {
            this.f6412 = 0;
            int i2 = this.f6409;
            this.f6409 = i2 + (m4439(i2 + 1) ? 2 : 1);
        }
        m4443();
    }

    /* JADX INFO: renamed from: ᵻˈᵦʼ, reason: contains not printable characters */
    public int m4447() {
        int i = 0;
        while (!m4445()) {
            i++;
        }
        return ((1 << i) - 1) + (i > 0 ? m4441(i) : 0);
    }
}
