package androidx.compose.runtime.collection;

import A4.d;
import A4.g;
import C4.e;
import C4.i;
import K4.a;
import R4.m;
import androidx.compose.runtime.internal.StabilityInferred;
import java.util.Collection;
import java.util.Iterator;
import java.util.Set;
import kotlin.jvm.internal.n;
import m3.AbstractC2467b;
import n.Z;
import w4.C3137A;

/* JADX INFO: loaded from: classes.dex */
@StabilityInferred(parameters = 0)
public final class ScatterSetWrapper<T> implements Set<T>, a {
    public static final int $stable = 8;
    private final Z set;

    /* JADX INFO: renamed from: androidx.compose.runtime.collection.ScatterSetWrapper$iterator$1, reason: invalid class name */
    @e(c = "androidx.compose.runtime.collection.ScatterSetWrapper$iterator$1", f = "ScatterSetWrapper.kt", l = {31}, m = "invokeSuspend", v = 1)
    public static final class AnonymousClass1 extends i implements J4.e {
        int I$0;
        int I$1;
        int I$2;
        int I$3;
        long J$0;
        private /* synthetic */ Object L$0;
        Object L$1;
        Object L$2;
        int label;
        final /* synthetic */ ScatterSetWrapper<T> this$0;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        public AnonymousClass1(ScatterSetWrapper<T> scatterSetWrapper, d dVar) {
            super(2, dVar);
            this.this$0 = scatterSetWrapper;
        }

        @Override // C4.a
        public final d create(Object obj, d dVar) {
            AnonymousClass1 anonymousClass1 = new AnonymousClass1(this.this$0, dVar);
            anonymousClass1.L$0 = obj;
            return anonymousClass1;
        }

        @Override // J4.e
        public final Object invoke(m mVar, d dVar) {
            return ((AnonymousClass1) create(mVar, dVar)).invokeSuspend(C3137A.f25453a);
        }

        /* JADX WARN: Removed duplicated region for block: B:13:0x0057  */
        /* JADX WARN: Removed duplicated region for block: B:15:0x006a  */
        /* JADX WARN: Removed duplicated region for block: B:20:0x0093  */
        /* JADX WARN: Removed duplicated region for block: B:23:0x009b  */
        /* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:12:0x0055 -> B:22:0x0099). Please report as a decompilation issue!!! */
        /* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:13:0x0057 -> B:14:0x0068). Please report as a decompilation issue!!! */
        /* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:16:0x0071 -> B:19:0x0090). Please report as a decompilation issue!!! */
        @Override // C4.a
        /*
            Code decompiled incorrectly, please refer to instructions dump.
        */
        public final Object invokeSuspend(Object obj) {
            m mVar;
            Object[] objArr;
            long[] jArr;
            int length;
            int i6;
            long j4;
            B4.a aVar = B4.a.f492a;
            int i7 = this.label;
            if (i7 == 0) {
                AbstractC2467b.l(obj);
                mVar = (m) this.L$0;
                Z set$runtime = this.this$0.getSet$runtime();
                objArr = set$runtime.f21389b;
                jArr = set$runtime.f21388a;
                length = jArr.length - 2;
                if (length >= 0) {
                    i6 = 0;
                    j4 = jArr[i6];
                    if ((((~j4) << 7) & j4 & (-9187201950435737472L)) != -9187201950435737472L) {
                    }
                    if (i6 != length) {
                    }
                }
                return C3137A.f25453a;
            }
            if (i7 != 1) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            int i8 = this.I$3;
            int i9 = this.I$2;
            long j6 = this.J$0;
            i6 = this.I$1;
            int i10 = this.I$0;
            long[] jArr2 = (long[]) this.L$2;
            Object[] objArr2 = (Object[]) this.L$1;
            m mVar2 = (m) this.L$0;
            AbstractC2467b.l(obj);
            j6 >>= 8;
            i8++;
            if (i8 < i9) {
                if (i9 == 8) {
                    length = i10;
                    jArr = jArr2;
                    objArr = objArr2;
                    mVar = mVar2;
                    if (i6 != length) {
                        i6++;
                        j4 = jArr[i6];
                        if ((((~j4) << 7) & j4 & (-9187201950435737472L)) != -9187201950435737472L) {
                            mVar2 = mVar;
                            i8 = 0;
                            jArr2 = jArr;
                            i10 = length;
                            i9 = 8 - ((~(i6 - length)) >>> 31);
                            objArr2 = objArr;
                            j6 = j4;
                            if (i8 < i9) {
                                if ((255 & j6) < 128) {
                                    Object obj2 = objArr2[(i6 << 3) + i8];
                                    this.L$0 = mVar2;
                                    this.L$1 = objArr2;
                                    this.L$2 = jArr2;
                                    this.I$0 = i10;
                                    this.I$1 = i6;
                                    this.J$0 = j6;
                                    this.I$2 = i9;
                                    this.I$3 = i8;
                                    this.label = 1;
                                    mVar2.a(this, obj2);
                                    B4.a aVar2 = B4.a.f492a;
                                    return aVar;
                                }
                                j6 >>= 8;
                                i8++;
                                if (i8 < i9) {
                                }
                            }
                        }
                        if (i6 != length) {
                        }
                    }
                }
                return C3137A.f25453a;
            }
        }
    }

    public ScatterSetWrapper(Z z6) {
        this.set = z6;
    }

    @Override // java.util.Set, java.util.Collection
    public boolean add(T t6) {
        throw new UnsupportedOperationException("Operation is not supported for read-only collection");
    }

    @Override // java.util.Set, java.util.Collection
    public boolean addAll(Collection<? extends T> collection) {
        throw new UnsupportedOperationException("Operation is not supported for read-only collection");
    }

    @Override // java.util.Set, java.util.Collection
    public void clear() {
        throw new UnsupportedOperationException("Operation is not supported for read-only collection");
    }

    @Override // java.util.Set, java.util.Collection
    public boolean contains(Object obj) {
        return this.set.a(obj);
    }

    @Override // java.util.Set, java.util.Collection
    public boolean containsAll(Collection<?> collection) {
        Collection<?> collection2 = collection;
        if ((collection2 instanceof Collection) && collection2.isEmpty()) {
            return true;
        }
        Iterator<T> it = collection2.iterator();
        while (it.hasNext()) {
            if (!this.set.a(it.next())) {
                return false;
            }
        }
        return true;
    }

    public final Z getSet$runtime() {
        return this.set;
    }

    public int getSize() {
        return this.set.f21391d;
    }

    @Override // java.util.Set, java.util.Collection
    public boolean isEmpty() {
        return this.set.b();
    }

    @Override // java.util.Set, java.util.Collection, java.lang.Iterable
    public Iterator<T> iterator() {
        return g.L(new AnonymousClass1(this, null));
    }

    @Override // java.util.Set, java.util.Collection
    public boolean remove(Object obj) {
        throw new UnsupportedOperationException("Operation is not supported for read-only collection");
    }

    @Override // java.util.Set, java.util.Collection
    public boolean removeAll(Collection<?> collection) {
        throw new UnsupportedOperationException("Operation is not supported for read-only collection");
    }

    @Override // java.util.Set, java.util.Collection
    public boolean retainAll(Collection<?> collection) {
        throw new UnsupportedOperationException("Operation is not supported for read-only collection");
    }

    @Override // java.util.Set, java.util.Collection
    public final /* bridge */ int size() {
        return getSize();
    }

    @Override // java.util.Set, java.util.Collection
    public Object[] toArray() {
        return n.a(this);
    }

    @Override // java.util.Set, java.util.Collection
    public <T> T[] toArray(T[] tArr) {
        return (T[]) n.b(this, tArr);
    }
}
