package defpackage;

/* JADX INFO: renamed from: ᵰᵢʓ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes3.dex */
public final class C4387 implements InterfaceC1954 {

    /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
    public final C4545 f16669 = new C4545(32);

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

    /* JADX INFO: renamed from: ᵨᵣ, reason: contains not printable characters */
    public boolean f16671;

    /* JADX INFO: renamed from: ᵲᵶᵳˈ, reason: contains not printable characters */
    public final InterfaceC4951 f16672;

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

    /* JADX INFO: renamed from: ᵻˈᵦʼ, reason: contains not printable characters */
    public boolean f16674;

    public C4387(InterfaceC4951 interfaceC4951) {
        this.f16672 = interfaceC4951;
    }

    @Override // defpackage.InterfaceC1954
    /* JADX INFO: renamed from: ʽˈˋ */
    public final void mo5234(C0085 c0085, InterfaceC4550 interfaceC4550, C4173 c4173) {
        this.f16672.mo5708(c0085, interfaceC4550, c4173);
        this.f16674 = true;
    }

    @Override // defpackage.InterfaceC1954
    /* JADX INFO: renamed from: ːˏᵟᵯ */
    public final void mo5235() {
        this.f16674 = true;
    }

    @Override // defpackage.InterfaceC1954
    /* JADX INFO: renamed from: ᵲᵶᵳˈ */
    public final void mo5236(int i, C4545 c4545) {
        boolean z = (i & 1) != 0;
        int iM9626 = z ? c4545.f17282 + c4545.m9626() : -1;
        if (this.f16674) {
            if (!z) {
                return;
            }
            this.f16674 = false;
            c4545.m9624(iM9626);
            this.f16673 = 0;
        }
        while (c4545.m9623() > 0) {
            int i2 = this.f16673;
            C4545 c45452 = this.f16669;
            if (i2 < 3) {
                if (i2 == 0) {
                    int iM96262 = c4545.m9626();
                    c4545.m9624(c4545.f17282 - 1);
                    if (iM96262 == 255) {
                        this.f16674 = true;
                        return;
                    }
                }
                int iMin = Math.min(c4545.m9623(), 3 - this.f16673);
                c4545.m9627(c45452.f17284, this.f16673, iMin);
                int i3 = this.f16673 + iMin;
                this.f16673 = i3;
                if (i3 == 3) {
                    c45452.m9624(0);
                    c45452.m9612(3);
                    c45452.m9609(1);
                    int iM96263 = c45452.m9626();
                    int iM96264 = c45452.m9626();
                    this.f16671 = (iM96263 & 128) != 0;
                    int i4 = (((iM96263 & 15) << 8) | iM96264) + 3;
                    this.f16670 = i4;
                    byte[] bArr = c45452.f17284;
                    if (bArr.length < i4) {
                        c45452.m9608(Math.min(4098, Math.max(i4, bArr.length * 2)));
                    }
                }
            } else {
                int iMin2 = Math.min(c4545.m9623(), this.f16670 - this.f16673);
                c4545.m9627(c45452.f17284, this.f16673, iMin2);
                int i5 = this.f16673 + iMin2;
                this.f16673 = i5;
                int i6 = this.f16670;
                if (i5 != i6) {
                    continue;
                } else {
                    if (!this.f16671) {
                        c45452.m9612(i6);
                    } else {
                        if (AbstractC0956.m3249(0, i6, -1, c45452.f17284) != 0) {
                            this.f16674 = true;
                            return;
                        }
                        c45452.m9612(this.f16670 - 4);
                    }
                    c45452.m9624(0);
                    this.f16672.mo5743(c45452);
                    this.f16673 = 0;
                }
            }
        }
    }
}
