package defpackage;

/* renamed from: ʽᵦˆ, reason: contains not printable characters */
/* loaded from: classes3.dex */
public final class C0155 implements InterfaceC3676 {

    /* renamed from: ˇʼʤˎ, reason: contains not printable characters */
    public boolean f1552;

    /* renamed from: ˏˋٴ, reason: contains not printable characters */
    public boolean f1553;

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

    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    public final InterfaceC3579 f1555;

    /* renamed from: ᵴᵳ, reason: contains not printable characters */
    public final C3493 f1556 = new C3493(32);

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

    public C0155(InterfaceC3579 interfaceC3579) {
        this.f1555 = interfaceC3579;
    }

    @Override // defpackage.InterfaceC3676
    /* renamed from: ˏᵙ, reason: contains not printable characters */
    public final void mo1309() {
        this.f1553 = true;
    }

    @Override // defpackage.InterfaceC3676
    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    public final void mo1310(int i, C3493 c3493) {
        boolean z = (i & 1) != 0;
        int iM7956 = z ? c3493.f13083 + c3493.m7956() : -1;
        if (this.f1553) {
            if (!z) {
                return;
            }
            this.f1553 = false;
            c3493.m7955(iM7956);
            this.f1557 = 0;
        }
        while (c3493.m7959() > 0) {
            int i2 = this.f1557;
            C3493 c34932 = this.f1556;
            if (i2 < 3) {
                if (i2 == 0) {
                    int iM79562 = c3493.m7956();
                    c3493.m7955(c3493.f13083 - 1);
                    if (iM79562 == 255) {
                        this.f1553 = true;
                        return;
                    }
                }
                int iMin = Math.min(c3493.m7959(), 3 - this.f1557);
                c3493.m7970(c34932.f13082, this.f1557, iMin);
                int i3 = this.f1557 + iMin;
                this.f1557 = i3;
                if (i3 == 3) {
                    c34932.m7955(0);
                    c34932.m7950(3);
                    c34932.m7946(1);
                    int iM79563 = c34932.m7956();
                    int iM79564 = c34932.m7956();
                    this.f1552 = (iM79563 & 128) != 0;
                    int i4 = (((iM79563 & 15) << 8) | iM79564) + 3;
                    this.f1554 = i4;
                    byte[] bArr = c34932.f13082;
                    if (bArr.length < i4) {
                        c34932.m7945(Math.min(4098, Math.max(i4, bArr.length * 2)));
                    }
                }
            } else {
                int iMin2 = Math.min(c3493.m7959(), this.f1554 - this.f1557);
                c3493.m7970(c34932.f13082, this.f1557, iMin2);
                int i5 = this.f1557 + iMin2;
                this.f1557 = i5;
                int i6 = this.f1554;
                if (i5 != i6) {
                    continue;
                } else {
                    if (!this.f1552) {
                        c34932.m7950(i6);
                    } else {
                        if (AbstractC3558.m8112(0, i6, -1, c34932.f13082) != 0) {
                            this.f1553 = true;
                            return;
                        }
                        c34932.m7950(this.f1554 - 4);
                    }
                    c34932.m7955(0);
                    this.f1555.mo2767(c34932);
                    this.f1557 = 0;
                }
            }
        }
    }

    @Override // defpackage.InterfaceC3676
    /* renamed from: ᵴᵳ, reason: contains not printable characters */
    public final void mo1311(C1240 c1240, InterfaceC1982 interfaceC1982, C4996 c4996) {
        this.f1555.mo2775(c1240, interfaceC1982, c4996);
        this.f1553 = true;
    }
}
