package o;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.kr, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C1711kr implements InterfaceC0764av {
    public final int a;
    public final int b;

    public C1711kr(int i, int i2) {
        this.a = i;
        this.b = i2;
        if (i >= 0 && i2 >= 0) {
            return;
        }
        AbstractC2228qH.a("Expected lengthBeforeCursor and lengthAfterCursor to be non-negative, were " + i + " and " + i2 + " respectively.");
    }

    @Override // o.InterfaceC0764av
    public final void a(C0860bv c0860bv) {
        int i = c0860bv.c;
        C0862bw c0862bw = c0860bv.a;
        int i2 = this.b;
        int iB = i + i2;
        if (((i ^ iB) & (i2 ^ iB)) < 0) {
            iB = c0862bw.b();
        }
        c0860bv.a(c0860bv.c, Math.min(iB, c0862bw.b()));
        int i3 = c0860bv.b;
        int i4 = this.a;
        int i5 = i3 - i4;
        if (((i3 ^ i5) & (i4 ^ i3)) < 0) {
            i5 = 0;
        }
        c0860bv.a(Math.max(0, i5), c0860bv.b);
    }

    public final boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (!(obj instanceof C1711kr)) {
            return false;
        }
        C1711kr c1711kr = (C1711kr) obj;
        return this.a == c1711kr.a && this.b == c1711kr.b;
    }

    public final int hashCode() {
        return (this.a * 31) + this.b;
    }

    public final String toString() {
        StringBuilder sb = new StringBuilder("DeleteSurroundingTextCommand(lengthBeforeCursor=");
        sb.append(this.a);
        sb.append(", lengthAfterCursor=");
        return AbstractC2462sn.m(sb, this.b, ')');
    }
}
