package z2;

import android.graphics.Rect;
import kotlin.jvm.internal.o;

/* JADX INFO: loaded from: classes.dex */
public final class b {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final int f26295a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final int f26296b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final int f26297c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final int f26298d;

    static {
        new b(0, 0, 0, 0);
    }

    public b(int i6, int i7, int i8, int i9) {
        this.f26295a = i6;
        this.f26296b = i7;
        this.f26297c = i8;
        this.f26298d = i9;
        if (i6 > i8) {
            throw new IllegalArgumentException(com.google.android.recaptcha.internal.a.i(i6, i8, "Left must be less than or equal to right, left: ", ", right: ").toString());
        }
        if (i7 > i9) {
            throw new IllegalArgumentException(com.google.android.recaptcha.internal.a.i(i7, i9, "top must be less than or equal to bottom, top: ", ", bottom: ").toString());
        }
    }

    public final int a() {
        return this.f26298d - this.f26296b;
    }

    public final int b() {
        return this.f26297c - this.f26295a;
    }

    public final Rect c() {
        return new Rect(this.f26295a, this.f26296b, this.f26297c, this.f26298d);
    }

    public final boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (!b.class.equals(obj != null ? obj.getClass() : null)) {
            return false;
        }
        o.f(obj, "null cannot be cast to non-null type androidx.window.core.Bounds");
        b bVar = (b) obj;
        return this.f26295a == bVar.f26295a && this.f26296b == bVar.f26296b && this.f26297c == bVar.f26297c && this.f26298d == bVar.f26298d;
    }

    public final int hashCode() {
        return (((((this.f26295a * 31) + this.f26296b) * 31) + this.f26297c) * 31) + this.f26298d;
    }

    public final String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(b.class.getSimpleName());
        sb.append(" { [");
        sb.append(this.f26295a);
        sb.append(',');
        sb.append(this.f26296b);
        sb.append(',');
        sb.append(this.f26297c);
        sb.append(',');
        return Z0.o.q(sb, this.f26298d, "] }");
    }

    /* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
    public b(Rect rect) {
        this(rect.left, rect.top, rect.right, rect.bottom);
        o.h(rect, "rect");
    }
}
