package Q0;

import J0.O;
import java.util.Iterator;
import n.C2582i;
import n.C2596x;
import n.N;
import n.Y;
import w4.InterfaceC3143e;

/* JADX INFO: loaded from: classes.dex */
public final class n implements A, Iterable, K4.a {

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

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public C2596x f5800b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public boolean f5801c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public boolean f5802d;

    public n() {
        long[] jArr = Y.f21386a;
        this.f5799a = new N();
    }

    public final boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (!(obj instanceof n)) {
            return false;
        }
        n nVar = (n) obj;
        return kotlin.jvm.internal.o.c(this.f5799a, nVar.f5799a) && this.f5801c == nVar.f5801c && this.f5802d == nVar.f5802d;
    }

    @Override // Q0.A
    public final void g(z zVar, Object obj) {
        boolean z6 = obj instanceof C0586a;
        N n6 = this.f5799a;
        if (z6 && n6.b(zVar)) {
            Object objD = n6.d(zVar);
            kotlin.jvm.internal.o.f(objD, "null cannot be cast to non-null type androidx.compose.ui.semantics.AccessibilityAction<*>");
            C0586a c0586a = (C0586a) objD;
            C0586a c0586a2 = (C0586a) obj;
            String str = c0586a2.f5729a;
            if (str == null) {
                str = c0586a.f5729a;
            }
            InterfaceC3143e interfaceC3143e = c0586a2.f5730b;
            if (interfaceC3143e == null) {
                interfaceC3143e = c0586a.f5730b;
            }
            n6.l(zVar, new C0586a(str, interfaceC3143e));
        } else {
            n6.l(zVar, obj);
        }
        zVar.getClass();
    }

    /* JADX WARN: Removed duplicated region for block: B:14:0x005d  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final n h() {
        n nVar = new n();
        nVar.f5801c = this.f5801c;
        nVar.f5802d = this.f5802d;
        N n6 = nVar.f5799a;
        n6.getClass();
        N from = this.f5799a;
        kotlin.jvm.internal.o.h(from, "from");
        Object[] objArr = from.f21382b;
        Object[] objArr2 = from.f21383c;
        long[] jArr = from.f21381a;
        int length = jArr.length - 2;
        if (length >= 0) {
            int i6 = 0;
            while (true) {
                long j4 = jArr[i6];
                if ((((~j4) << 7) & j4 & (-9187201950435737472L)) != -9187201950435737472L) {
                    int i7 = 8 - ((~(i6 - length)) >>> 31);
                    for (int i8 = 0; i8 < i7; i8++) {
                        if ((255 & j4) < 128) {
                            int i9 = (i6 << 3) + i8;
                            n6.l(objArr[i9], objArr2[i9]);
                        }
                        j4 >>= 8;
                    }
                    if (i7 != 8) {
                        break;
                    }
                    if (i6 == length) {
                        break;
                    }
                    i6++;
                }
            }
        }
        return nVar;
    }

    public final int hashCode() {
        return Boolean.hashCode(this.f5802d) + com.google.android.recaptcha.internal.a.f(this.f5799a.hashCode() * 31, 31, this.f5801c);
    }

    @Override // java.lang.Iterable
    public final Iterator iterator() {
        C2596x c2596x = this.f5800b;
        if (c2596x == null) {
            N n6 = this.f5799a;
            n6.getClass();
            C2596x c2596x2 = new C2596x(n6);
            this.f5800b = c2596x2;
            c2596x = c2596x2;
        }
        return ((C2582i) c2596x.entrySet()).iterator();
    }

    public final Object j(z zVar) {
        Object objD = this.f5799a.d(zVar);
        if (objD != null) {
            return objD;
        }
        throw new IllegalStateException("Key not present: " + zVar + " - consider getOrElse or getOrNull");
    }

    public final void k(n nVar) {
        N n6 = nVar.f5799a;
        Object[] objArr = n6.f21382b;
        Object[] objArr2 = n6.f21383c;
        long[] jArr = n6.f21381a;
        int length = jArr.length - 2;
        if (length < 0) {
            return;
        }
        int i6 = 0;
        while (true) {
            long j4 = jArr[i6];
            if ((((~j4) << 7) & j4 & (-9187201950435737472L)) != -9187201950435737472L) {
                int i7 = 8 - ((~(i6 - length)) >>> 31);
                for (int i8 = 0; i8 < i7; i8++) {
                    if ((255 & j4) < 128) {
                        int i9 = (i6 << 3) + i8;
                        Object obj = objArr[i9];
                        Object obj2 = objArr2[i9];
                        z zVar = (z) obj;
                        N n7 = this.f5799a;
                        Object objD = n7.d(zVar);
                        kotlin.jvm.internal.o.f(zVar, "null cannot be cast to non-null type androidx.compose.ui.semantics.SemanticsPropertyKey<kotlin.Any?>");
                        Object objInvoke = zVar.f5864b.invoke(objD, obj2);
                        if (objInvoke != null) {
                            n7.l(zVar, objInvoke);
                        }
                    }
                    j4 >>= 8;
                }
                if (i7 != 8) {
                    return;
                }
            }
            if (i6 == length) {
                return;
            } else {
                i6++;
            }
        }
    }

    /* JADX WARN: Removed duplicated region for block: B:21:0x0078 A[PHI: r2
      0x0078: PHI (r2v6 java.lang.String) = (r2v5 java.lang.String), (r2v7 java.lang.String) binds: [B:13:0x003f, B:20:0x0076] A[DONT_GENERATE, DONT_INLINE]] */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final String toString() {
        String str;
        StringBuilder sb = new StringBuilder();
        if (this.f5801c) {
            sb.append("mergeDescendants=true");
            str = ", ";
        } else {
            str = "";
        }
        if (this.f5802d) {
            sb.append(str);
            sb.append("isClearingSemantics=true");
            str = ", ";
        }
        N n6 = this.f5799a;
        Object[] objArr = n6.f21382b;
        Object[] objArr2 = n6.f21383c;
        long[] jArr = n6.f21381a;
        int length = jArr.length - 2;
        if (length >= 0) {
            int i6 = 0;
            while (true) {
                long j4 = jArr[i6];
                if ((((~j4) << 7) & j4 & (-9187201950435737472L)) != -9187201950435737472L) {
                    int i7 = 8 - ((~(i6 - length)) >>> 31);
                    for (int i8 = 0; i8 < i7; i8++) {
                        if ((255 & j4) < 128) {
                            int i9 = (i6 << 3) + i8;
                            Object obj = objArr[i9];
                            Object obj2 = objArr2[i9];
                            sb.append(str);
                            sb.append(((z) obj).f5863a);
                            sb.append(" : ");
                            sb.append(obj2);
                            str = ", ";
                        }
                        j4 >>= 8;
                    }
                    if (i7 != 8) {
                        break;
                    }
                    if (i6 == length) {
                        break;
                    }
                    i6++;
                }
            }
        }
        return O.u(this) + "{ " + ((Object) sb) + " }";
    }
}
