package p037.p107.p108;

/* JADX INFO: renamed from: މ.ޏ.ށ.ރ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes.dex */
public class C2316 implements InterfaceC2360 {

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public final InterfaceC2360 f7336;

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public int f7337 = 0;

    /* JADX INFO: renamed from: ހ, reason: contains not printable characters */
    public int f7338 = -1;

    /* JADX INFO: renamed from: ށ, reason: contains not printable characters */
    public int f7339 = -1;

    /* JADX INFO: renamed from: ނ, reason: contains not printable characters */
    public Object f7340 = null;

    public C2316(InterfaceC2360 interfaceC2360) {
        this.f7336 = interfaceC2360;
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public void m4359() {
        int i = this.f7337;
        if (i == 0) {
            return;
        }
        if (i == 1) {
            this.f7336.mo4355(this.f7338, this.f7339);
        } else if (i == 2) {
            this.f7336.mo4352(this.f7338, this.f7339);
        } else if (i == 3) {
            this.f7336.mo4353(this.f7338, this.f7339, this.f7340);
        }
        this.f7340 = null;
        this.f7337 = 0;
    }

    @Override // p037.p107.p108.InterfaceC2360
    /* JADX INFO: renamed from: ֏ */
    public void mo4352(int i, int i2) {
        int i3;
        if (this.f7337 == 2 && (i3 = this.f7338) >= i && i3 <= i + i2) {
            this.f7339 += i2;
            this.f7338 = i;
        } else {
            m4359();
            this.f7338 = i;
            this.f7339 = i2;
            this.f7337 = 2;
        }
    }

    @Override // p037.p107.p108.InterfaceC2360
    /* JADX INFO: renamed from: ֏ */
    public void mo4353(int i, int i2, Object obj) {
        int i3;
        if (this.f7337 == 3) {
            int i4 = this.f7338;
            int i5 = this.f7339;
            if (i <= i4 + i5 && (i3 = i + i2) >= i4 && this.f7340 == obj) {
                this.f7338 = Math.min(i, i4);
                this.f7339 = Math.max(i5 + i4, i3) - this.f7338;
                return;
            }
        }
        m4359();
        this.f7338 = i;
        this.f7339 = i2;
        this.f7340 = obj;
        this.f7337 = 3;
    }

    @Override // p037.p107.p108.InterfaceC2360
    /* JADX INFO: renamed from: ؠ */
    public void mo4354(int i, int i2) {
        m4359();
        this.f7336.mo4354(i, i2);
    }

    @Override // p037.p107.p108.InterfaceC2360
    /* JADX INFO: renamed from: ހ */
    public void mo4355(int i, int i2) {
        int i3;
        if (this.f7337 == 1 && i >= (i3 = this.f7338)) {
            int i4 = this.f7339;
            if (i <= i3 + i4) {
                this.f7339 = i4 + i2;
                this.f7338 = Math.min(i, i3);
                return;
            }
        }
        m4359();
        this.f7338 = i;
        this.f7339 = i2;
        this.f7337 = 1;
    }
}
