package y0;

import java.util.List;

/* JADX INFO: Access modifiers changed from: package-private */
/* loaded from: classes.dex */
public final class p1 {

    /* renamed from: a, reason: collision with root package name */
    private final androidx.collection.g0 f51751a;

    private /* synthetic */ p1(androidx.collection.g0 g0Var) {
        this.f51751a = g0Var;
    }

    public static final /* synthetic */ p1 a(androidx.collection.g0 g0Var) {
        return new p1(g0Var);
    }

    public static androidx.collection.g0 b(androidx.collection.g0 g0Var) {
        return g0Var;
    }

    public static boolean c(androidx.collection.g0 g0Var, Object obj) {
        return (obj instanceof p1) && kotlin.jvm.internal.t.b(g0Var, ((p1) obj).h());
    }

    public static int d(androidx.collection.g0 g0Var) {
        return g0Var.hashCode();
    }

    public static final Object e(androidx.collection.g0 g0Var, Object obj) {
        Object b10 = g0Var.b(obj);
        if (b10 == null) {
            return null;
        }
        if (kotlin.jvm.internal.v0.l(b10)) {
            List b11 = kotlin.jvm.internal.v0.b(b10);
            Object remove = b11.remove(0);
            if (b11.isEmpty()) {
                g0Var.o(obj);
            }
            b10 = remove;
        } else {
            g0Var.o(obj);
        }
        kotlin.jvm.internal.t.e(b10, "null cannot be cast to non-null type V of androidx.compose.runtime.MutableScatterMultiMap.pop_impl$lambda$1");
        return b10;
    }

    public static final void f(androidx.collection.g0 g0Var, Object obj, Object obj2) {
        int k10 = g0Var.k(obj);
        boolean z10 = k10 < 0;
        Object obj3 = z10 ? null : g0Var.f1368c[k10];
        if (obj3 != null) {
            if (kotlin.jvm.internal.v0.l(obj3)) {
                kotlin.jvm.internal.t.e(obj3, "null cannot be cast to non-null type kotlin.collections.MutableList<V of androidx.compose.runtime.MutableScatterMultiMap.put_impl$lambda$0>");
                List b10 = kotlin.jvm.internal.v0.b(obj3);
                b10.add(obj2);
                obj2 = b10;
            } else {
                obj2 = sm.u.q(obj3, obj2);
            }
        }
        if (!z10) {
            g0Var.f1368c[k10] = obj2;
            return;
        }
        int i10 = ~k10;
        g0Var.f1367b[i10] = obj;
        g0Var.f1368c[i10] = obj2;
    }

    public static String g(androidx.collection.g0 g0Var) {
        return "MutableScatterMultiMap(map=" + g0Var + ')';
    }

    public boolean equals(Object obj) {
        return c(this.f51751a, obj);
    }

    public final /* synthetic */ androidx.collection.g0 h() {
        return this.f51751a;
    }

    public int hashCode() {
        return d(this.f51751a);
    }

    public String toString() {
        return g(this.f51751a);
    }
}
