package defpackage;

/* renamed from: ᵰᵻ, reason: contains not printable characters */
/* loaded from: classes3.dex */
public final class C4372 implements InterfaceC1482 {

    /* renamed from: ᵧᵾˀˈ, reason: contains not printable characters */
    public final InterfaceC1482 f16351;

    /* renamed from: ᵢˇᵭ, reason: contains not printable characters */
    public int f16349 = 0;

    /* renamed from: ᵿʗᵝʽ, reason: contains not printable characters */
    public int f16353 = -1;

    /* renamed from: ᵾᵬ, reason: contains not printable characters */
    public int f16352 = -1;

    /* renamed from: ᵤᵙᵷ, reason: contains not printable characters */
    public Object f16350 = null;

    public C4372(InterfaceC1482 interfaceC1482) {
        this.f16351 = interfaceC1482;
    }

    @Override // defpackage.InterfaceC1482
    /* renamed from: ᵡʠ */
    public final void mo4401(int i, int i2) {
        int i3;
        if (this.f16349 == 1 && i >= (i3 = this.f16353)) {
            int i4 = this.f16352;
            if (i <= i3 + i4) {
                this.f16352 = i4 + i2;
                this.f16353 = Math.min(i, i3);
                return;
            }
        }
        m9357();
        this.f16353 = i;
        this.f16352 = i2;
        this.f16349 = 1;
    }

    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    public final void m9357() {
        int i = this.f16349;
        if (i == 0) {
            return;
        }
        InterfaceC1482 interfaceC1482 = this.f16351;
        if (i == 1) {
            interfaceC1482.mo4401(this.f16353, this.f16352);
        } else if (i == 2) {
            interfaceC1482.mo4402(this.f16353, this.f16352);
        } else if (i == 3) {
            interfaceC1482.mo4404(this.f16353, this.f16352, this.f16350);
        }
        this.f16350 = null;
        this.f16349 = 0;
    }

    @Override // defpackage.InterfaceC1482
    /* renamed from: ᵧᵾˀˈ */
    public final void mo4402(int i, int i2) {
        int i3;
        if (this.f16349 == 2 && (i3 = this.f16353) >= i && i3 <= i + i2) {
            this.f16352 += i2;
            this.f16353 = i;
        } else {
            m9357();
            this.f16353 = i;
            this.f16352 = i2;
            this.f16349 = 2;
        }
    }

    @Override // defpackage.InterfaceC1482
    /* renamed from: ᵴᵳ */
    public final void mo4403(int i, int i2) {
        m9357();
        this.f16351.mo4403(i, i2);
    }

    @Override // defpackage.InterfaceC1482
    /* renamed from: ᵺʙ */
    public final void mo4404(int i, int i2, Object obj) {
        int i3;
        int i4;
        int i5;
        if (this.f16349 == 3 && i <= (i4 = this.f16352 + (i3 = this.f16353)) && (i5 = i + i2) >= i3 && this.f16350 == obj) {
            this.f16353 = Math.min(i, i3);
            this.f16352 = Math.max(i4, i5) - this.f16353;
            return;
        }
        m9357();
        this.f16353 = i;
        this.f16352 = i2;
        this.f16350 = obj;
        this.f16349 = 3;
    }
}
