Add decompiled APK source code (JADX)

- 28,932 files
- Full Java source code
- Smali files
- Resources

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-02-18 14:52:23 -08:00
parent cc210a65ea
commit f9d20bb3fc
26991 changed files with 2541449 additions and 0 deletions

View File

@@ -0,0 +1,518 @@
package androidx.collection;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.collection.internal.ContainerHelpersKt;
import com.ironsource.v8;
import java.lang.reflect.Array;
import java.util.AbstractSet;
import java.util.Collection;
import java.util.Iterator;
import java.util.Map;
import java.util.NoSuchElementException;
import java.util.Set;
/* loaded from: classes.dex */
public class ArrayMap<K, V> extends SimpleArrayMap<K, V> implements Map<K, V> {
@Nullable
ArrayMap<K, V>.EntrySet mEntrySet;
@Nullable
ArrayMap<K, V>.KeySet mKeySet;
@Nullable
ArrayMap<K, V>.ValueCollection mValues;
public ArrayMap() {
}
public ArrayMap(int i) {
super(i);
}
public ArrayMap(@Nullable SimpleArrayMap simpleArrayMap) {
super(simpleArrayMap);
}
public boolean containsAll(@NonNull Collection<?> collection) {
Iterator<?> it = collection.iterator();
while (it.hasNext()) {
if (!containsKey(it.next())) {
return false;
}
}
return true;
}
/* JADX WARN: Multi-variable type inference failed */
@Override // androidx.collection.SimpleArrayMap, java.util.Map
public boolean containsKey(@Nullable Object obj) {
return super.containsKey(obj);
}
/* JADX WARN: Multi-variable type inference failed */
@Override // androidx.collection.SimpleArrayMap, java.util.Map
public boolean containsValue(@Nullable Object obj) {
return super.containsValue(obj);
}
/* JADX WARN: Multi-variable type inference failed */
@Override // androidx.collection.SimpleArrayMap, java.util.Map
public V get(@Nullable Object obj) {
return (V) super.get(obj);
}
/* JADX WARN: Multi-variable type inference failed */
@Override // androidx.collection.SimpleArrayMap, java.util.Map
public V remove(@Nullable Object obj) {
return (V) super.remove(obj);
}
@Override // java.util.Map
public void putAll(@NonNull Map<? extends K, ? extends V> map) {
ensureCapacity(size() + map.size());
for (Map.Entry<? extends K, ? extends V> entry : map.entrySet()) {
put(entry.getKey(), entry.getValue());
}
}
public boolean removeAll(@NonNull Collection<?> collection) {
int size = size();
Iterator<?> it = collection.iterator();
while (it.hasNext()) {
remove(it.next());
}
return size != size();
}
public boolean retainAll(@NonNull Collection<?> collection) {
int size = size();
for (int size2 = size() - 1; size2 >= 0; size2--) {
if (!collection.contains(keyAt(size2))) {
removeAt(size2);
}
}
return size != size();
}
@Override // java.util.Map
@NonNull
public Set<Map.Entry<K, V>> entrySet() {
ArrayMap<K, V>.EntrySet entrySet = this.mEntrySet;
if (entrySet != null) {
return entrySet;
}
ArrayMap<K, V>.EntrySet entrySet2 = new EntrySet();
this.mEntrySet = entrySet2;
return entrySet2;
}
@Override // java.util.Map
@NonNull
public Set<K> keySet() {
ArrayMap<K, V>.KeySet keySet = this.mKeySet;
if (keySet != null) {
return keySet;
}
ArrayMap<K, V>.KeySet keySet2 = new KeySet();
this.mKeySet = keySet2;
return keySet2;
}
@Override // java.util.Map
@NonNull
public Collection<V> values() {
ArrayMap<K, V>.ValueCollection valueCollection = this.mValues;
if (valueCollection != null) {
return valueCollection;
}
ArrayMap<K, V>.ValueCollection valueCollection2 = new ValueCollection();
this.mValues = valueCollection2;
return valueCollection2;
}
public final class EntrySet extends AbstractSet<Map.Entry<K, V>> {
public EntrySet() {
}
@Override // java.util.AbstractCollection, java.util.Collection, java.lang.Iterable, java.util.Set
@NonNull
public Iterator<Map.Entry<K, V>> iterator() {
return new MapIterator();
}
@Override // java.util.AbstractCollection, java.util.Collection, java.util.Set
public int size() {
return ArrayMap.this.size();
}
}
public final class KeySet implements Set<K> {
public KeySet() {
}
@Override // java.util.Set, java.util.Collection
public boolean add(K k) {
throw new UnsupportedOperationException();
}
@Override // java.util.Set, java.util.Collection
public boolean addAll(@NonNull Collection<? extends K> collection) {
throw new UnsupportedOperationException();
}
@Override // java.util.Set, java.util.Collection
public void clear() {
ArrayMap.this.clear();
}
@Override // java.util.Set, java.util.Collection
public boolean contains(Object obj) {
return ArrayMap.this.containsKey(obj);
}
@Override // java.util.Set, java.util.Collection
public boolean containsAll(@NonNull Collection<?> collection) {
return ArrayMap.this.containsAll(collection);
}
@Override // java.util.Set, java.util.Collection
public boolean isEmpty() {
return ArrayMap.this.isEmpty();
}
@Override // java.util.Set, java.util.Collection, java.lang.Iterable
@NonNull
public Iterator<K> iterator() {
return new KeyIterator();
}
@Override // java.util.Set, java.util.Collection
public boolean remove(Object obj) {
int indexOfKey = ArrayMap.this.indexOfKey(obj);
if (indexOfKey < 0) {
return false;
}
ArrayMap.this.removeAt(indexOfKey);
return true;
}
@Override // java.util.Set, java.util.Collection
public boolean removeAll(@NonNull Collection<?> collection) {
return ArrayMap.this.removeAll(collection);
}
@Override // java.util.Set, java.util.Collection
public boolean retainAll(@NonNull Collection<?> collection) {
return ArrayMap.this.retainAll(collection);
}
@Override // java.util.Set, java.util.Collection
public int size() {
return ArrayMap.this.size();
}
@Override // java.util.Set, java.util.Collection
@NonNull
public Object[] toArray() {
int size = ArrayMap.this.size();
Object[] objArr = new Object[size];
for (int i = 0; i < size; i++) {
objArr[i] = ArrayMap.this.keyAt(i);
}
return objArr;
}
@Override // java.util.Set, java.util.Collection
@NonNull
public <T> T[] toArray(@NonNull T[] tArr) {
int size = size();
if (tArr.length < size) {
tArr = (T[]) ((Object[]) Array.newInstance(tArr.getClass().getComponentType(), size));
}
for (int i = 0; i < size; i++) {
tArr[i] = ArrayMap.this.keyAt(i);
}
if (tArr.length > size) {
tArr[size] = null;
}
return tArr;
}
@Override // java.util.Set, java.util.Collection
public boolean equals(Object obj) {
return ArrayMap.equalsSetHelper(this, obj);
}
@Override // java.util.Set, java.util.Collection
public int hashCode() {
int i = 0;
for (int size = ArrayMap.this.size() - 1; size >= 0; size--) {
K keyAt = ArrayMap.this.keyAt(size);
i += keyAt == null ? 0 : keyAt.hashCode();
}
return i;
}
}
public final class ValueCollection implements Collection<V> {
public ValueCollection() {
}
@Override // java.util.Collection
public boolean add(V v) {
throw new UnsupportedOperationException();
}
@Override // java.util.Collection
public boolean addAll(@NonNull Collection<? extends V> collection) {
throw new UnsupportedOperationException();
}
@Override // java.util.Collection
public void clear() {
ArrayMap.this.clear();
}
@Override // java.util.Collection
public boolean contains(Object obj) {
return ArrayMap.this.__restricted$indexOfValue(obj) >= 0;
}
@Override // java.util.Collection
public boolean containsAll(Collection<?> collection) {
Iterator<?> it = collection.iterator();
while (it.hasNext()) {
if (!contains(it.next())) {
return false;
}
}
return true;
}
@Override // java.util.Collection
public boolean isEmpty() {
return ArrayMap.this.isEmpty();
}
@Override // java.util.Collection, java.lang.Iterable
@NonNull
public Iterator<V> iterator() {
return new ValueIterator();
}
@Override // java.util.Collection
public boolean remove(Object obj) {
int __restricted$indexOfValue = ArrayMap.this.__restricted$indexOfValue(obj);
if (__restricted$indexOfValue < 0) {
return false;
}
ArrayMap.this.removeAt(__restricted$indexOfValue);
return true;
}
@Override // java.util.Collection
public boolean removeAll(@NonNull Collection<?> collection) {
int size = ArrayMap.this.size();
int i = 0;
boolean z = false;
while (i < size) {
if (collection.contains(ArrayMap.this.valueAt(i))) {
ArrayMap.this.removeAt(i);
i--;
size--;
z = true;
}
i++;
}
return z;
}
@Override // java.util.Collection
public boolean retainAll(@NonNull Collection<?> collection) {
int size = ArrayMap.this.size();
int i = 0;
boolean z = false;
while (i < size) {
if (!collection.contains(ArrayMap.this.valueAt(i))) {
ArrayMap.this.removeAt(i);
i--;
size--;
z = true;
}
i++;
}
return z;
}
@Override // java.util.Collection
public int size() {
return ArrayMap.this.size();
}
@Override // java.util.Collection
@NonNull
public Object[] toArray() {
int size = ArrayMap.this.size();
Object[] objArr = new Object[size];
for (int i = 0; i < size; i++) {
objArr[i] = ArrayMap.this.valueAt(i);
}
return objArr;
}
@Override // java.util.Collection
@NonNull
public <T> T[] toArray(@NonNull T[] tArr) {
int size = size();
if (tArr.length < size) {
tArr = (T[]) ((Object[]) Array.newInstance(tArr.getClass().getComponentType(), size));
}
for (int i = 0; i < size; i++) {
tArr[i] = ArrayMap.this.valueAt(i);
}
if (tArr.length > size) {
tArr[size] = null;
}
return tArr;
}
}
public final class KeyIterator extends IndexBasedArrayIterator<K> {
public KeyIterator() {
super(ArrayMap.this.size());
}
@Override // androidx.collection.IndexBasedArrayIterator
public K elementAt(int i) {
return ArrayMap.this.keyAt(i);
}
@Override // androidx.collection.IndexBasedArrayIterator
public void removeAt(int i) {
ArrayMap.this.removeAt(i);
}
}
public final class ValueIterator extends IndexBasedArrayIterator<V> {
public ValueIterator() {
super(ArrayMap.this.size());
}
@Override // androidx.collection.IndexBasedArrayIterator
public V elementAt(int i) {
return ArrayMap.this.valueAt(i);
}
@Override // androidx.collection.IndexBasedArrayIterator
public void removeAt(int i) {
ArrayMap.this.removeAt(i);
}
}
public final class MapIterator implements Iterator<Map.Entry<K, V>>, Map.Entry<K, V> {
int mEnd;
boolean mEntryValid;
int mIndex = -1;
@Override // java.util.Iterator
public boolean hasNext() {
return this.mIndex < this.mEnd;
}
public MapIterator() {
this.mEnd = ArrayMap.this.size() - 1;
}
@Override // java.util.Iterator
public Map.Entry<K, V> next() {
if (!hasNext()) {
throw new NoSuchElementException();
}
this.mIndex++;
this.mEntryValid = true;
return this;
}
@Override // java.util.Iterator
public void remove() {
if (!this.mEntryValid) {
throw new IllegalStateException();
}
ArrayMap.this.removeAt(this.mIndex);
this.mIndex--;
this.mEnd--;
this.mEntryValid = false;
}
@Override // java.util.Map.Entry
public K getKey() {
if (!this.mEntryValid) {
throw new IllegalStateException("This container does not support retaining Map.Entry objects");
}
return ArrayMap.this.keyAt(this.mIndex);
}
@Override // java.util.Map.Entry
public V getValue() {
if (!this.mEntryValid) {
throw new IllegalStateException("This container does not support retaining Map.Entry objects");
}
return ArrayMap.this.valueAt(this.mIndex);
}
@Override // java.util.Map.Entry
public V setValue(V v) {
if (!this.mEntryValid) {
throw new IllegalStateException("This container does not support retaining Map.Entry objects");
}
return ArrayMap.this.setValueAt(this.mIndex, v);
}
@Override // java.util.Map.Entry
public boolean equals(Object obj) {
if (!this.mEntryValid) {
throw new IllegalStateException("This container does not support retaining Map.Entry objects");
}
if (!(obj instanceof Map.Entry)) {
return false;
}
Map.Entry entry = (Map.Entry) obj;
return ContainerHelpersKt.equal(entry.getKey(), ArrayMap.this.keyAt(this.mIndex)) && ContainerHelpersKt.equal(entry.getValue(), ArrayMap.this.valueAt(this.mIndex));
}
@Override // java.util.Map.Entry
public int hashCode() {
if (!this.mEntryValid) {
throw new IllegalStateException("This container does not support retaining Map.Entry objects");
}
K keyAt = ArrayMap.this.keyAt(this.mIndex);
V valueAt = ArrayMap.this.valueAt(this.mIndex);
return (keyAt == null ? 0 : keyAt.hashCode()) ^ (valueAt != null ? valueAt.hashCode() : 0);
}
public String toString() {
return getKey() + v8.i.b + getValue();
}
}
public static <T> boolean equalsSetHelper(Set<T> set, Object obj) {
if (set == obj) {
return true;
}
if (obj instanceof Set) {
Set set2 = (Set) obj;
try {
if (set.size() == set2.size()) {
if (set.containsAll(set2)) {
return true;
}
}
return false;
} catch (ClassCastException | NullPointerException unused) {
}
}
return false;
}
}

View File

@@ -0,0 +1,21 @@
package androidx.collection;
import kotlin.Pair;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes.dex */
public final class ArrayMapKt {
public static final <K, V> ArrayMap<K, V> arrayMapOf() {
return new ArrayMap<>();
}
/* JADX WARN: Multi-variable type inference failed */
public static final <K, V> ArrayMap<K, V> arrayMapOf(Pair... pairs) {
Intrinsics.checkNotNullParameter(pairs, "pairs");
ArrayMap<K, V> arrayMap = (ArrayMap<K, V>) new ArrayMap(pairs.length);
for (Pair pair : pairs) {
arrayMap.put(pair.getFirst(), pair.getSecond());
}
return arrayMap;
}
}

View File

@@ -0,0 +1,413 @@
package androidx.collection;
import androidx.collection.internal.ContainerHelpersKt;
import com.applovin.impl.sdk.utils.JsonUtils;
import java.util.Collection;
import java.util.ConcurrentModificationException;
import java.util.Iterator;
import java.util.Set;
import kotlin.collections.ArraysKt___ArraysJvmKt;
import kotlin.collections.CollectionsKt___CollectionsKt;
import kotlin.jvm.internal.ArrayIteratorKt;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlin.jvm.internal.markers.KMutableCollection;
import kotlin.jvm.internal.markers.KMutableSet;
@SourceDebugExtension({"SMAP\nArraySet.jvm.kt\nKotlin\n*S Kotlin\n*F\n+ 1 ArraySet.jvm.kt\nandroidx/collection/ArraySet\n+ 2 ArraySet.kt\nandroidx/collection/ArraySetKt\n*L\n1#1,300:1\n304#2,10:301\n317#2,14:311\n334#2:325\n339#2:326\n345#2:327\n350#2:328\n355#2,61:329\n420#2,17:390\n440#2,6:407\n450#2,60:413\n518#2,9:473\n531#2,22:482\n557#2,7:504\n568#2,19:511\n591#2,6:530\n601#2,6:536\n611#2,5:542\n620#2,8:547\n*S KotlinDebug\n*F\n+ 1 ArraySet.jvm.kt\nandroidx/collection/ArraySet\n*L\n98#1:301,10\n108#1:311,14\n118#1:325\n128#1:326\n138#1:327\n145#1:328\n157#1:329,61\n167#1:390,17\n177#1:407,6\n188#1:413,60\n197#1:473,9\n224#1:482,22\n231#1:504,7\n240#1:511,19\n267#1:530,6\n276#1:536,6\n286#1:542,5\n297#1:547,8\n*E\n"})
/* loaded from: classes.dex */
public final class ArraySet<E> implements Collection<E>, Set<E>, KMutableCollection, KMutableSet {
private int _size;
private Object[] array;
private int[] hashes;
public ArraySet() {
this(0, 1, null);
}
public final Object[] getArray$collection() {
return this.array;
}
public final int[] getHashes$collection() {
return this.hashes;
}
public int getSize() {
return this._size;
}
public final int get_size$collection() {
return this._size;
}
public final void setArray$collection(Object[] objArr) {
Intrinsics.checkNotNullParameter(objArr, "<set-?>");
this.array = objArr;
}
public final void setHashes$collection(int[] iArr) {
Intrinsics.checkNotNullParameter(iArr, "<set-?>");
this.hashes = iArr;
}
public final void set_size$collection(int i) {
this._size = i;
}
public ArraySet(int i) {
this.hashes = ContainerHelpersKt.EMPTY_INTS;
this.array = ContainerHelpersKt.EMPTY_OBJECTS;
if (i > 0) {
ArraySetKt.allocArrays(this, i);
}
}
@Override // java.util.Collection, java.util.Set
public final /* bridge */ int size() {
return getSize();
}
public /* synthetic */ ArraySet(int i, int i2, DefaultConstructorMarker defaultConstructorMarker) {
this((i2 & 1) != 0 ? 0 : i);
}
public ArraySet(ArraySet<? extends E> arraySet) {
this(0);
if (arraySet != null) {
addAll((ArraySet) arraySet);
}
}
public ArraySet(Collection<? extends E> collection) {
this(0);
if (collection != null) {
addAll(collection);
}
}
/* JADX WARN: Multi-variable type inference failed */
public ArraySet(E[] eArr) {
this(0);
if (eArr != null) {
Iterator it = ArrayIteratorKt.iterator(eArr);
while (it.hasNext()) {
add(it.next());
}
}
}
@Override // java.util.Collection, java.util.Set
public final Object[] toArray() {
Object[] copyOfRange;
copyOfRange = ArraysKt___ArraysJvmKt.copyOfRange(this.array, 0, this._size);
return copyOfRange;
}
@Override // java.util.Collection, java.util.Set
public final <T> T[] toArray(T[] array) {
Intrinsics.checkNotNullParameter(array, "array");
T[] result = (T[]) ArraySetJvmUtil.resizeForToArray(array, this._size);
ArraysKt___ArraysJvmKt.copyInto(this.array, result, 0, 0, this._size);
Intrinsics.checkNotNullExpressionValue(result, "result");
return result;
}
@Override // java.util.Collection, java.lang.Iterable, java.util.Set
public Iterator<E> iterator() {
return new ElementIterator();
}
public final class ElementIterator extends IndexBasedArrayIterator<E> {
public ElementIterator() {
super(ArraySet.this.get_size$collection());
}
@Override // androidx.collection.IndexBasedArrayIterator
public E elementAt(int i) {
return ArraySet.this.valueAt(i);
}
@Override // androidx.collection.IndexBasedArrayIterator
public void removeAt(int i) {
ArraySet.this.removeAt(i);
}
}
@Override // java.util.Collection, java.util.Set
public void clear() {
if (get_size$collection() != 0) {
setHashes$collection(ContainerHelpersKt.EMPTY_INTS);
setArray$collection(ContainerHelpersKt.EMPTY_OBJECTS);
set_size$collection(0);
}
if (get_size$collection() != 0) {
throw new ConcurrentModificationException();
}
}
public final void ensureCapacity(int i) {
int i2 = get_size$collection();
if (getHashes$collection().length < i) {
int[] hashes$collection = getHashes$collection();
Object[] array$collection = getArray$collection();
ArraySetKt.allocArrays(this, i);
if (get_size$collection() > 0) {
ArraysKt___ArraysJvmKt.copyInto$default(hashes$collection, getHashes$collection(), 0, 0, get_size$collection(), 6, (Object) null);
ArraysKt___ArraysJvmKt.copyInto$default(array$collection, getArray$collection(), 0, 0, get_size$collection(), 6, (Object) null);
}
}
if (get_size$collection() != i2) {
throw new ConcurrentModificationException();
}
}
@Override // java.util.Collection, java.util.Set
public boolean contains(Object obj) {
return indexOf(obj) >= 0;
}
public final int indexOf(Object obj) {
return obj == null ? ArraySetKt.indexOfNull(this) : ArraySetKt.indexOf(this, obj, obj.hashCode());
}
public final E valueAt(int i) {
return (E) getArray$collection()[i];
}
@Override // java.util.Collection, java.util.Set
public boolean isEmpty() {
return get_size$collection() <= 0;
}
@Override // java.util.Collection, java.util.Set
public boolean add(E e) {
int i;
int indexOf;
int i2 = get_size$collection();
if (e == null) {
indexOf = ArraySetKt.indexOfNull(this);
i = 0;
} else {
int hashCode = e.hashCode();
i = hashCode;
indexOf = ArraySetKt.indexOf(this, e, hashCode);
}
if (indexOf >= 0) {
return false;
}
int i3 = ~indexOf;
if (i2 >= getHashes$collection().length) {
int i4 = 8;
if (i2 >= 8) {
i4 = (i2 >> 1) + i2;
} else if (i2 < 4) {
i4 = 4;
}
int[] hashes$collection = getHashes$collection();
Object[] array$collection = getArray$collection();
ArraySetKt.allocArrays(this, i4);
if (i2 != get_size$collection()) {
throw new ConcurrentModificationException();
}
if (!(getHashes$collection().length == 0)) {
ArraysKt___ArraysJvmKt.copyInto$default(hashes$collection, getHashes$collection(), 0, 0, hashes$collection.length, 6, (Object) null);
ArraysKt___ArraysJvmKt.copyInto$default(array$collection, getArray$collection(), 0, 0, array$collection.length, 6, (Object) null);
}
}
if (i3 < i2) {
int i5 = i3 + 1;
ArraysKt___ArraysJvmKt.copyInto(getHashes$collection(), getHashes$collection(), i5, i3, i2);
ArraysKt___ArraysJvmKt.copyInto(getArray$collection(), getArray$collection(), i5, i3, i2);
}
if (i2 != get_size$collection() || i3 >= getHashes$collection().length) {
throw new ConcurrentModificationException();
}
getHashes$collection()[i3] = i;
getArray$collection()[i3] = e;
set_size$collection(get_size$collection() + 1);
return true;
}
public final void addAll(ArraySet<? extends E> array) {
Intrinsics.checkNotNullParameter(array, "array");
int i = array.get_size$collection();
ensureCapacity(get_size$collection() + i);
if (get_size$collection() != 0) {
for (int i2 = 0; i2 < i; i2++) {
add(array.valueAt(i2));
}
return;
}
if (i > 0) {
ArraysKt___ArraysJvmKt.copyInto$default(array.getHashes$collection(), getHashes$collection(), 0, 0, i, 6, (Object) null);
ArraysKt___ArraysJvmKt.copyInto$default(array.getArray$collection(), getArray$collection(), 0, 0, i, 6, (Object) null);
if (get_size$collection() != 0) {
throw new ConcurrentModificationException();
}
set_size$collection(i);
}
}
@Override // java.util.Collection, java.util.Set
public boolean remove(Object obj) {
int indexOf = indexOf(obj);
if (indexOf < 0) {
return false;
}
removeAt(indexOf);
return true;
}
public final E removeAt(int i) {
int i2 = get_size$collection();
E e = (E) getArray$collection()[i];
if (i2 <= 1) {
clear();
} else {
int i3 = i2 - 1;
if (getHashes$collection().length > 8 && get_size$collection() < getHashes$collection().length / 3) {
int i4 = get_size$collection() > 8 ? get_size$collection() + (get_size$collection() >> 1) : 8;
int[] hashes$collection = getHashes$collection();
Object[] array$collection = getArray$collection();
ArraySetKt.allocArrays(this, i4);
if (i > 0) {
ArraysKt___ArraysJvmKt.copyInto$default(hashes$collection, getHashes$collection(), 0, 0, i, 6, (Object) null);
ArraysKt___ArraysJvmKt.copyInto$default(array$collection, getArray$collection(), 0, 0, i, 6, (Object) null);
}
if (i < i3) {
int i5 = i + 1;
ArraysKt___ArraysJvmKt.copyInto(hashes$collection, getHashes$collection(), i, i5, i2);
ArraysKt___ArraysJvmKt.copyInto(array$collection, getArray$collection(), i, i5, i2);
}
} else {
if (i < i3) {
int i6 = i + 1;
ArraysKt___ArraysJvmKt.copyInto(getHashes$collection(), getHashes$collection(), i, i6, i2);
ArraysKt___ArraysJvmKt.copyInto(getArray$collection(), getArray$collection(), i, i6, i2);
}
getArray$collection()[i3] = null;
}
if (i2 != get_size$collection()) {
throw new ConcurrentModificationException();
}
set_size$collection(i3);
}
return e;
}
public final boolean removeAll(ArraySet<? extends E> array) {
Intrinsics.checkNotNullParameter(array, "array");
int i = array.get_size$collection();
int i2 = get_size$collection();
for (int i3 = 0; i3 < i; i3++) {
remove(array.valueAt(i3));
}
return i2 != get_size$collection();
}
@Override // java.util.Collection, java.util.Set
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if ((obj instanceof Set) && size() == ((Set) obj).size()) {
try {
int i = get_size$collection();
for (int i2 = 0; i2 < i; i2++) {
if (((Set) obj).contains(valueAt(i2))) {
}
}
return true;
} catch (ClassCastException | NullPointerException unused) {
}
}
return false;
}
@Override // java.util.Collection, java.util.Set
public int hashCode() {
int[] hashes$collection = getHashes$collection();
int i = get_size$collection();
int i2 = 0;
for (int i3 = 0; i3 < i; i3++) {
i2 += hashes$collection[i3];
}
return i2;
}
public String toString() {
if (isEmpty()) {
return JsonUtils.EMPTY_JSON;
}
StringBuilder sb = new StringBuilder(get_size$collection() * 14);
sb.append('{');
int i = get_size$collection();
for (int i2 = 0; i2 < i; i2++) {
if (i2 > 0) {
sb.append(", ");
}
E valueAt = valueAt(i2);
if (valueAt != this) {
sb.append(valueAt);
} else {
sb.append("(this Set)");
}
}
sb.append('}');
String sb2 = sb.toString();
Intrinsics.checkNotNullExpressionValue(sb2, "StringBuilder(capacity).…builderAction).toString()");
return sb2;
}
@Override // java.util.Collection, java.util.Set
public boolean containsAll(Collection<? extends Object> elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
Iterator<? extends Object> it = elements.iterator();
while (it.hasNext()) {
if (!contains(it.next())) {
return false;
}
}
return true;
}
@Override // java.util.Collection, java.util.Set
public boolean addAll(Collection<? extends E> elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
ensureCapacity(get_size$collection() + elements.size());
Iterator<? extends E> it = elements.iterator();
boolean z = false;
while (it.hasNext()) {
z |= add(it.next());
}
return z;
}
@Override // java.util.Collection, java.util.Set
public boolean removeAll(Collection<? extends Object> elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
Iterator<? extends Object> it = elements.iterator();
boolean z = false;
while (it.hasNext()) {
z |= remove(it.next());
}
return z;
}
@Override // java.util.Collection, java.util.Set
public boolean retainAll(Collection<? extends Object> elements) {
boolean contains;
Intrinsics.checkNotNullParameter(elements, "elements");
boolean z = false;
for (int i = get_size$collection() - 1; -1 < i; i--) {
contains = CollectionsKt___CollectionsKt.contains(elements, getArray$collection()[i]);
if (!contains) {
removeAt(i);
z = true;
}
}
return z;
}
}

View File

@@ -0,0 +1,19 @@
package androidx.collection;
import java.lang.reflect.Array;
/* loaded from: classes.dex */
class ArraySetJvmUtil {
private ArraySetJvmUtil() {
}
public static <T> T[] resizeForToArray(T[] tArr, int i) {
if (tArr.length < i) {
return (T[]) ((Object[]) Array.newInstance(tArr.getClass().getComponentType(), i));
}
if (tArr.length > i) {
tArr[i] = null;
}
return tArr;
}
}

View File

@@ -0,0 +1,359 @@
package androidx.collection;
import androidx.collection.internal.ContainerHelpersKt;
import com.applovin.impl.sdk.utils.JsonUtils;
import java.util.Collection;
import java.util.ConcurrentModificationException;
import java.util.Iterator;
import java.util.Set;
import kotlin.collections.ArraysKt___ArraysJvmKt;
import kotlin.collections.CollectionsKt___CollectionsKt;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes.dex */
public final class ArraySetKt {
public static final int ARRAY_SET_BASE_SIZE = 4;
public static final <T> ArraySet<T> arraySetOf() {
return new ArraySet<>(0, 1, null);
}
public static final <T> ArraySet<T> arraySetOf(T... values) {
Intrinsics.checkNotNullParameter(values, "values");
ArraySet<T> arraySet = new ArraySet<>(values.length);
for (T t : values) {
arraySet.add(t);
}
return arraySet;
}
public static final <E> int binarySearchInternal(ArraySet<E> arraySet, int i) {
Intrinsics.checkNotNullParameter(arraySet, "<this>");
try {
return ContainerHelpersKt.binarySearch(arraySet.getHashes$collection(), arraySet.get_size$collection(), i);
} catch (IndexOutOfBoundsException unused) {
throw new ConcurrentModificationException();
}
}
public static final <E> int indexOf(ArraySet<E> arraySet, Object obj, int i) {
Intrinsics.checkNotNullParameter(arraySet, "<this>");
int i2 = arraySet.get_size$collection();
if (i2 == 0) {
return -1;
}
int binarySearchInternal = binarySearchInternal(arraySet, i);
if (binarySearchInternal < 0 || Intrinsics.areEqual(obj, arraySet.getArray$collection()[binarySearchInternal])) {
return binarySearchInternal;
}
int i3 = binarySearchInternal + 1;
while (i3 < i2 && arraySet.getHashes$collection()[i3] == i) {
if (Intrinsics.areEqual(obj, arraySet.getArray$collection()[i3])) {
return i3;
}
i3++;
}
for (int i4 = binarySearchInternal - 1; i4 >= 0 && arraySet.getHashes$collection()[i4] == i; i4--) {
if (Intrinsics.areEqual(obj, arraySet.getArray$collection()[i4])) {
return i4;
}
}
return ~i3;
}
public static final <E> int indexOfNull(ArraySet<E> arraySet) {
Intrinsics.checkNotNullParameter(arraySet, "<this>");
return indexOf(arraySet, null, 0);
}
public static final <E> void allocArrays(ArraySet<E> arraySet, int i) {
Intrinsics.checkNotNullParameter(arraySet, "<this>");
arraySet.setHashes$collection(new int[i]);
arraySet.setArray$collection(new Object[i]);
}
public static final <E> void clearInternal(ArraySet<E> arraySet) {
Intrinsics.checkNotNullParameter(arraySet, "<this>");
if (arraySet.get_size$collection() != 0) {
arraySet.setHashes$collection(ContainerHelpersKt.EMPTY_INTS);
arraySet.setArray$collection(ContainerHelpersKt.EMPTY_OBJECTS);
arraySet.set_size$collection(0);
}
if (arraySet.get_size$collection() != 0) {
throw new ConcurrentModificationException();
}
}
public static final <E> void ensureCapacityInternal(ArraySet<E> arraySet, int i) {
Intrinsics.checkNotNullParameter(arraySet, "<this>");
int i2 = arraySet.get_size$collection();
if (arraySet.getHashes$collection().length < i) {
int[] hashes$collection = arraySet.getHashes$collection();
Object[] array$collection = arraySet.getArray$collection();
allocArrays(arraySet, i);
if (arraySet.get_size$collection() > 0) {
ArraysKt___ArraysJvmKt.copyInto$default(hashes$collection, arraySet.getHashes$collection(), 0, 0, arraySet.get_size$collection(), 6, (Object) null);
ArraysKt___ArraysJvmKt.copyInto$default(array$collection, arraySet.getArray$collection(), 0, 0, arraySet.get_size$collection(), 6, (Object) null);
}
}
if (arraySet.get_size$collection() != i2) {
throw new ConcurrentModificationException();
}
}
public static final <E> boolean containsInternal(ArraySet<E> arraySet, E e) {
Intrinsics.checkNotNullParameter(arraySet, "<this>");
return arraySet.indexOf(e) >= 0;
}
public static final <E> int indexOfInternal(ArraySet<E> arraySet, Object obj) {
Intrinsics.checkNotNullParameter(arraySet, "<this>");
return obj == null ? indexOfNull(arraySet) : indexOf(arraySet, obj, obj.hashCode());
}
public static final <E> E valueAtInternal(ArraySet<E> arraySet, int i) {
Intrinsics.checkNotNullParameter(arraySet, "<this>");
return (E) arraySet.getArray$collection()[i];
}
public static final <E> boolean isEmptyInternal(ArraySet<E> arraySet) {
Intrinsics.checkNotNullParameter(arraySet, "<this>");
return arraySet.get_size$collection() <= 0;
}
public static final <E> boolean addInternal(ArraySet<E> arraySet, E e) {
int i;
int indexOf;
Intrinsics.checkNotNullParameter(arraySet, "<this>");
int i2 = arraySet.get_size$collection();
if (e == null) {
indexOf = indexOfNull(arraySet);
i = 0;
} else {
int hashCode = e.hashCode();
i = hashCode;
indexOf = indexOf(arraySet, e, hashCode);
}
if (indexOf >= 0) {
return false;
}
int i3 = ~indexOf;
if (i2 >= arraySet.getHashes$collection().length) {
int i4 = 8;
if (i2 >= 8) {
i4 = (i2 >> 1) + i2;
} else if (i2 < 4) {
i4 = 4;
}
int[] hashes$collection = arraySet.getHashes$collection();
Object[] array$collection = arraySet.getArray$collection();
allocArrays(arraySet, i4);
if (i2 != arraySet.get_size$collection()) {
throw new ConcurrentModificationException();
}
if (!(arraySet.getHashes$collection().length == 0)) {
ArraysKt___ArraysJvmKt.copyInto$default(hashes$collection, arraySet.getHashes$collection(), 0, 0, hashes$collection.length, 6, (Object) null);
ArraysKt___ArraysJvmKt.copyInto$default(array$collection, arraySet.getArray$collection(), 0, 0, array$collection.length, 6, (Object) null);
}
}
if (i3 < i2) {
int i5 = i3 + 1;
ArraysKt___ArraysJvmKt.copyInto(arraySet.getHashes$collection(), arraySet.getHashes$collection(), i5, i3, i2);
ArraysKt___ArraysJvmKt.copyInto(arraySet.getArray$collection(), arraySet.getArray$collection(), i5, i3, i2);
}
if (i2 != arraySet.get_size$collection() || i3 >= arraySet.getHashes$collection().length) {
throw new ConcurrentModificationException();
}
arraySet.getHashes$collection()[i3] = i;
arraySet.getArray$collection()[i3] = e;
arraySet.set_size$collection(arraySet.get_size$collection() + 1);
return true;
}
public static final <E> void addAllInternal(ArraySet<E> arraySet, ArraySet<? extends E> array) {
Intrinsics.checkNotNullParameter(arraySet, "<this>");
Intrinsics.checkNotNullParameter(array, "array");
int i = array.get_size$collection();
arraySet.ensureCapacity(arraySet.get_size$collection() + i);
if (arraySet.get_size$collection() != 0) {
for (int i2 = 0; i2 < i; i2++) {
arraySet.add(array.valueAt(i2));
}
return;
}
if (i > 0) {
ArraysKt___ArraysJvmKt.copyInto$default(array.getHashes$collection(), arraySet.getHashes$collection(), 0, 0, i, 6, (Object) null);
ArraysKt___ArraysJvmKt.copyInto$default(array.getArray$collection(), arraySet.getArray$collection(), 0, 0, i, 6, (Object) null);
if (arraySet.get_size$collection() != 0) {
throw new ConcurrentModificationException();
}
arraySet.set_size$collection(i);
}
}
public static final <E> boolean removeInternal(ArraySet<E> arraySet, E e) {
Intrinsics.checkNotNullParameter(arraySet, "<this>");
int indexOf = arraySet.indexOf(e);
if (indexOf < 0) {
return false;
}
arraySet.removeAt(indexOf);
return true;
}
public static final <E> E removeAtInternal(ArraySet<E> arraySet, int i) {
Intrinsics.checkNotNullParameter(arraySet, "<this>");
int i2 = arraySet.get_size$collection();
E e = (E) arraySet.getArray$collection()[i];
if (i2 <= 1) {
arraySet.clear();
} else {
int i3 = i2 - 1;
if (arraySet.getHashes$collection().length > 8 && arraySet.get_size$collection() < arraySet.getHashes$collection().length / 3) {
int i4 = arraySet.get_size$collection() > 8 ? arraySet.get_size$collection() + (arraySet.get_size$collection() >> 1) : 8;
int[] hashes$collection = arraySet.getHashes$collection();
Object[] array$collection = arraySet.getArray$collection();
allocArrays(arraySet, i4);
if (i > 0) {
ArraysKt___ArraysJvmKt.copyInto$default(hashes$collection, arraySet.getHashes$collection(), 0, 0, i, 6, (Object) null);
ArraysKt___ArraysJvmKt.copyInto$default(array$collection, arraySet.getArray$collection(), 0, 0, i, 6, (Object) null);
}
if (i < i3) {
int i5 = i + 1;
ArraysKt___ArraysJvmKt.copyInto(hashes$collection, arraySet.getHashes$collection(), i, i5, i2);
ArraysKt___ArraysJvmKt.copyInto(array$collection, arraySet.getArray$collection(), i, i5, i2);
}
} else {
if (i < i3) {
int i6 = i + 1;
ArraysKt___ArraysJvmKt.copyInto(arraySet.getHashes$collection(), arraySet.getHashes$collection(), i, i6, i2);
ArraysKt___ArraysJvmKt.copyInto(arraySet.getArray$collection(), arraySet.getArray$collection(), i, i6, i2);
}
arraySet.getArray$collection()[i3] = null;
}
if (i2 != arraySet.get_size$collection()) {
throw new ConcurrentModificationException();
}
arraySet.set_size$collection(i3);
}
return e;
}
public static final <E> boolean removeAllInternal(ArraySet<E> arraySet, ArraySet<? extends E> array) {
Intrinsics.checkNotNullParameter(arraySet, "<this>");
Intrinsics.checkNotNullParameter(array, "array");
int i = array.get_size$collection();
int i2 = arraySet.get_size$collection();
for (int i3 = 0; i3 < i; i3++) {
arraySet.remove(array.valueAt(i3));
}
return i2 != arraySet.get_size$collection();
}
public static final <E> boolean equalsInternal(ArraySet<E> arraySet, Object obj) {
Intrinsics.checkNotNullParameter(arraySet, "<this>");
if (arraySet == obj) {
return true;
}
if (!(obj instanceof Set) || arraySet.size() != ((Set) obj).size()) {
return false;
}
try {
int i = arraySet.get_size$collection();
for (int i2 = 0; i2 < i; i2++) {
if (!((Set) obj).contains(arraySet.valueAt(i2))) {
return false;
}
}
return true;
} catch (ClassCastException | NullPointerException unused) {
return false;
}
}
public static final <E> int hashCodeInternal(ArraySet<E> arraySet) {
Intrinsics.checkNotNullParameter(arraySet, "<this>");
int[] hashes$collection = arraySet.getHashes$collection();
int i = arraySet.get_size$collection();
int i2 = 0;
for (int i3 = 0; i3 < i; i3++) {
i2 += hashes$collection[i3];
}
return i2;
}
public static final <E> String toStringInternal(ArraySet<E> arraySet) {
Intrinsics.checkNotNullParameter(arraySet, "<this>");
if (arraySet.isEmpty()) {
return JsonUtils.EMPTY_JSON;
}
StringBuilder sb = new StringBuilder(arraySet.get_size$collection() * 14);
sb.append('{');
int i = arraySet.get_size$collection();
for (int i2 = 0; i2 < i; i2++) {
if (i2 > 0) {
sb.append(", ");
}
E valueAt = arraySet.valueAt(i2);
if (valueAt != arraySet) {
sb.append(valueAt);
} else {
sb.append("(this Set)");
}
}
sb.append('}');
String sb2 = sb.toString();
Intrinsics.checkNotNullExpressionValue(sb2, "StringBuilder(capacity).…builderAction).toString()");
return sb2;
}
public static final <E> boolean containsAllInternal(ArraySet<E> arraySet, Collection<? extends E> elements) {
Intrinsics.checkNotNullParameter(arraySet, "<this>");
Intrinsics.checkNotNullParameter(elements, "elements");
Iterator<? extends E> it = elements.iterator();
while (it.hasNext()) {
if (!arraySet.contains(it.next())) {
return false;
}
}
return true;
}
public static final <E> boolean addAllInternal(ArraySet<E> arraySet, Collection<? extends E> elements) {
Intrinsics.checkNotNullParameter(arraySet, "<this>");
Intrinsics.checkNotNullParameter(elements, "elements");
arraySet.ensureCapacity(arraySet.get_size$collection() + elements.size());
Iterator<? extends E> it = elements.iterator();
boolean z = false;
while (it.hasNext()) {
z |= arraySet.add(it.next());
}
return z;
}
public static final <E> boolean removeAllInternal(ArraySet<E> arraySet, Collection<? extends E> elements) {
Intrinsics.checkNotNullParameter(arraySet, "<this>");
Intrinsics.checkNotNullParameter(elements, "elements");
Iterator<? extends E> it = elements.iterator();
boolean z = false;
while (it.hasNext()) {
z |= arraySet.remove(it.next());
}
return z;
}
public static final <E> boolean retainAllInternal(ArraySet<E> arraySet, Collection<? extends E> elements) {
boolean contains;
Intrinsics.checkNotNullParameter(arraySet, "<this>");
Intrinsics.checkNotNullParameter(elements, "elements");
boolean z = false;
for (int i = arraySet.get_size$collection() - 1; -1 < i; i--) {
contains = CollectionsKt___CollectionsKt.contains(elements, arraySet.getArray$collection()[i]);
if (!contains) {
arraySet.removeAt(i);
z = true;
}
}
return z;
}
}

View File

@@ -0,0 +1,203 @@
package androidx.collection;
import kotlin.collections.ArraysKt___ArraysJvmKt;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
@SourceDebugExtension({"SMAP\nCircularArray.kt\nKotlin\n*S Kotlin\n*F\n+ 1 CircularArray.kt\nandroidx/collection/CircularArray\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n+ 3 CollectionPlatformUtils.jvm.kt\nandroidx/collection/CollectionPlatformUtils\n*L\n1#1,270:1\n1#2:271\n26#3:272\n26#3:273\n26#3:274\n26#3:275\n26#3:276\n26#3:277\n26#3:278\n*S KotlinDebug\n*F\n+ 1 CircularArray.kt\nandroidx/collection/CircularArray\n*L\n104#1:272\n122#1:273\n152#1:274\n187#1:275\n221#1:276\n235#1:277\n249#1:278\n*E\n"})
/* loaded from: classes.dex */
public final class CircularArray<E> {
private int capacityBitmask;
private E[] elements;
private int head;
private int tail;
public CircularArray() {
this(0, 1, null);
}
public final boolean isEmpty() {
return this.head == this.tail;
}
public final int size() {
return (this.tail - this.head) & this.capacityBitmask;
}
public CircularArray(int i) {
if (i < 1) {
throw new IllegalArgumentException("capacity must be >= 1".toString());
}
if (i > 1073741824) {
throw new IllegalArgumentException("capacity must be <= 2^30".toString());
}
i = Integer.bitCount(i) != 1 ? Integer.highestOneBit(i - 1) << 1 : i;
this.capacityBitmask = i - 1;
this.elements = (E[]) new Object[i];
}
public /* synthetic */ CircularArray(int i, int i2, DefaultConstructorMarker defaultConstructorMarker) {
this((i2 & 1) != 0 ? 8 : i);
}
private final void doubleCapacity() {
E[] eArr = this.elements;
int length = eArr.length;
int i = this.head;
int i2 = length - i;
int i3 = length << 1;
if (i3 < 0) {
throw new RuntimeException("Max array capacity exceeded");
}
E[] eArr2 = (E[]) new Object[i3];
ArraysKt___ArraysJvmKt.copyInto(eArr, eArr2, 0, i, length);
ArraysKt___ArraysJvmKt.copyInto(this.elements, eArr2, i2, 0, this.head);
this.elements = eArr2;
this.head = 0;
this.tail = length;
this.capacityBitmask = i3 - 1;
}
public final void addFirst(E e) {
int i = (this.head - 1) & this.capacityBitmask;
this.head = i;
this.elements[i] = e;
if (i == this.tail) {
doubleCapacity();
}
}
public final void addLast(E e) {
E[] eArr = this.elements;
int i = this.tail;
eArr[i] = e;
int i2 = this.capacityBitmask & (i + 1);
this.tail = i2;
if (i2 == this.head) {
doubleCapacity();
}
}
public final E popFirst() {
int i = this.head;
if (i == this.tail) {
CollectionPlatformUtils collectionPlatformUtils = CollectionPlatformUtils.INSTANCE;
throw new ArrayIndexOutOfBoundsException();
}
E[] eArr = this.elements;
E e = eArr[i];
eArr[i] = null;
this.head = (i + 1) & this.capacityBitmask;
return e;
}
public final E popLast() {
int i = this.head;
int i2 = this.tail;
if (i == i2) {
CollectionPlatformUtils collectionPlatformUtils = CollectionPlatformUtils.INSTANCE;
throw new ArrayIndexOutOfBoundsException();
}
int i3 = this.capacityBitmask & (i2 - 1);
E[] eArr = this.elements;
E e = eArr[i3];
eArr[i3] = null;
this.tail = i3;
return e;
}
public final void clear() {
removeFromStart(size());
}
public final void removeFromStart(int i) {
if (i <= 0) {
return;
}
if (i > size()) {
CollectionPlatformUtils collectionPlatformUtils = CollectionPlatformUtils.INSTANCE;
throw new ArrayIndexOutOfBoundsException();
}
int length = this.elements.length;
int i2 = this.head;
if (i < length - i2) {
length = i2 + i;
}
while (i2 < length) {
this.elements[i2] = null;
i2++;
}
int i3 = this.head;
int i4 = length - i3;
int i5 = i - i4;
this.head = this.capacityBitmask & (i3 + i4);
if (i5 > 0) {
for (int i6 = 0; i6 < i5; i6++) {
this.elements[i6] = null;
}
this.head = i5;
}
}
public final void removeFromEnd(int i) {
if (i <= 0) {
return;
}
if (i > size()) {
CollectionPlatformUtils collectionPlatformUtils = CollectionPlatformUtils.INSTANCE;
throw new ArrayIndexOutOfBoundsException();
}
int i2 = this.tail;
int i3 = i < i2 ? i2 - i : 0;
for (int i4 = i3; i4 < i2; i4++) {
this.elements[i4] = null;
}
int i5 = this.tail;
int i6 = i5 - i3;
int i7 = i - i6;
this.tail = i5 - i6;
if (i7 > 0) {
int length = this.elements.length;
this.tail = length;
int i8 = length - i7;
for (int i9 = i8; i9 < length; i9++) {
this.elements[i9] = null;
}
this.tail = i8;
}
}
public final E getFirst() {
int i = this.head;
if (i == this.tail) {
CollectionPlatformUtils collectionPlatformUtils = CollectionPlatformUtils.INSTANCE;
throw new ArrayIndexOutOfBoundsException();
}
E e = this.elements[i];
Intrinsics.checkNotNull(e);
return e;
}
public final E getLast() {
int i = this.head;
int i2 = this.tail;
if (i == i2) {
CollectionPlatformUtils collectionPlatformUtils = CollectionPlatformUtils.INSTANCE;
throw new ArrayIndexOutOfBoundsException();
}
E e = this.elements[(i2 - 1) & this.capacityBitmask];
Intrinsics.checkNotNull(e);
return e;
}
public final E get(int i) {
if (i < 0 || i >= size()) {
CollectionPlatformUtils collectionPlatformUtils = CollectionPlatformUtils.INSTANCE;
throw new ArrayIndexOutOfBoundsException();
}
E e = this.elements[this.capacityBitmask & (this.head + i)];
Intrinsics.checkNotNull(e);
return e;
}
}

View File

@@ -0,0 +1,157 @@
package androidx.collection;
import kotlin.collections.ArraysKt___ArraysJvmKt;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.SourceDebugExtension;
@SourceDebugExtension({"SMAP\nCircularIntArray.kt\nKotlin\n*S Kotlin\n*F\n+ 1 CircularIntArray.kt\nandroidx/collection/CircularIntArray\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n+ 3 CollectionPlatformUtils.jvm.kt\nandroidx/collection/CollectionPlatformUtils\n*L\n1#1,213:1\n1#2:214\n26#3:215\n26#3:216\n26#3:217\n26#3:218\n26#3:219\n26#3:220\n26#3:221\n*S KotlinDebug\n*F\n+ 1 CircularIntArray.kt\nandroidx/collection/CircularIntArray\n*L\n100#1:215\n113#1:216\n139#1:217\n156#1:218\n169#1:219\n181#1:220\n193#1:221\n*E\n"})
/* loaded from: classes.dex */
public final class CircularIntArray {
private int capacityBitmask;
private int[] elements;
private int head;
private int tail;
public CircularIntArray() {
this(0, 1, null);
}
public final void clear() {
this.tail = this.head;
}
public final boolean isEmpty() {
return this.head == this.tail;
}
public final int size() {
return (this.tail - this.head) & this.capacityBitmask;
}
public CircularIntArray(int i) {
if (i < 1) {
throw new IllegalArgumentException("capacity must be >= 1".toString());
}
if (i > 1073741824) {
throw new IllegalArgumentException("capacity must be <= 2^30".toString());
}
i = Integer.bitCount(i) != 1 ? Integer.highestOneBit(i - 1) << 1 : i;
this.capacityBitmask = i - 1;
this.elements = new int[i];
}
public /* synthetic */ CircularIntArray(int i, int i2, DefaultConstructorMarker defaultConstructorMarker) {
this((i2 & 1) != 0 ? 8 : i);
}
private final void doubleCapacity() {
int[] iArr = this.elements;
int length = iArr.length;
int i = this.head;
int i2 = length - i;
int i3 = length << 1;
if (i3 < 0) {
throw new RuntimeException("Max array capacity exceeded");
}
int[] iArr2 = new int[i3];
ArraysKt___ArraysJvmKt.copyInto(iArr, iArr2, 0, i, length);
ArraysKt___ArraysJvmKt.copyInto(this.elements, iArr2, i2, 0, this.head);
this.elements = iArr2;
this.head = 0;
this.tail = length;
this.capacityBitmask = i3 - 1;
}
public final void addFirst(int i) {
int i2 = (this.head - 1) & this.capacityBitmask;
this.head = i2;
this.elements[i2] = i;
if (i2 == this.tail) {
doubleCapacity();
}
}
public final void addLast(int i) {
int[] iArr = this.elements;
int i2 = this.tail;
iArr[i2] = i;
int i3 = this.capacityBitmask & (i2 + 1);
this.tail = i3;
if (i3 == this.head) {
doubleCapacity();
}
}
public final int popFirst() {
int i = this.head;
if (i == this.tail) {
CollectionPlatformUtils collectionPlatformUtils = CollectionPlatformUtils.INSTANCE;
throw new ArrayIndexOutOfBoundsException();
}
int i2 = this.elements[i];
this.head = (i + 1) & this.capacityBitmask;
return i2;
}
public final int popLast() {
int i = this.head;
int i2 = this.tail;
if (i == i2) {
CollectionPlatformUtils collectionPlatformUtils = CollectionPlatformUtils.INSTANCE;
throw new ArrayIndexOutOfBoundsException();
}
int i3 = this.capacityBitmask & (i2 - 1);
int i4 = this.elements[i3];
this.tail = i3;
return i4;
}
public final void removeFromStart(int i) {
if (i <= 0) {
return;
}
if (i > size()) {
CollectionPlatformUtils collectionPlatformUtils = CollectionPlatformUtils.INSTANCE;
throw new ArrayIndexOutOfBoundsException();
}
this.head = this.capacityBitmask & (this.head + i);
}
public final void removeFromEnd(int i) {
if (i <= 0) {
return;
}
if (i > size()) {
CollectionPlatformUtils collectionPlatformUtils = CollectionPlatformUtils.INSTANCE;
throw new ArrayIndexOutOfBoundsException();
}
this.tail = this.capacityBitmask & (this.tail - i);
}
public final int getFirst() {
int i = this.head;
if (i == this.tail) {
CollectionPlatformUtils collectionPlatformUtils = CollectionPlatformUtils.INSTANCE;
throw new ArrayIndexOutOfBoundsException();
}
return this.elements[i];
}
public final int getLast() {
int i = this.head;
int i2 = this.tail;
if (i == i2) {
CollectionPlatformUtils collectionPlatformUtils = CollectionPlatformUtils.INSTANCE;
throw new ArrayIndexOutOfBoundsException();
}
return this.elements[(i2 - 1) & this.capacityBitmask];
}
public final int get(int i) {
if (i < 0 || i >= size()) {
CollectionPlatformUtils collectionPlatformUtils = CollectionPlatformUtils.INSTANCE;
throw new ArrayIndexOutOfBoundsException();
}
return this.elements[this.capacityBitmask & (this.head + i)];
}
}

View File

@@ -0,0 +1,13 @@
package androidx.collection;
/* loaded from: classes.dex */
public final class CollectionPlatformUtils {
public static final CollectionPlatformUtils INSTANCE = new CollectionPlatformUtils();
private CollectionPlatformUtils() {
}
public final IndexOutOfBoundsException createIndexOutOfBoundsException$collection() {
return new ArrayIndexOutOfBoundsException();
}
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,98 @@
package androidx.collection;
/* loaded from: classes.dex */
public final class FloatFloatMapKt {
private static final MutableFloatFloatMap EmptyFloatFloatMap = new MutableFloatFloatMap(0);
public static final FloatFloatMap emptyFloatFloatMap() {
return EmptyFloatFloatMap;
}
public static final FloatFloatMap floatFloatMapOf() {
return EmptyFloatFloatMap;
}
public static final FloatFloatMap floatFloatMapOf(float f, float f2) {
MutableFloatFloatMap mutableFloatFloatMap = new MutableFloatFloatMap(0, 1, null);
mutableFloatFloatMap.set(f, f2);
return mutableFloatFloatMap;
}
public static final FloatFloatMap floatFloatMapOf(float f, float f2, float f3, float f4) {
MutableFloatFloatMap mutableFloatFloatMap = new MutableFloatFloatMap(0, 1, null);
mutableFloatFloatMap.set(f, f2);
mutableFloatFloatMap.set(f3, f4);
return mutableFloatFloatMap;
}
public static final FloatFloatMap floatFloatMapOf(float f, float f2, float f3, float f4, float f5, float f6) {
MutableFloatFloatMap mutableFloatFloatMap = new MutableFloatFloatMap(0, 1, null);
mutableFloatFloatMap.set(f, f2);
mutableFloatFloatMap.set(f3, f4);
mutableFloatFloatMap.set(f5, f6);
return mutableFloatFloatMap;
}
public static final FloatFloatMap floatFloatMapOf(float f, float f2, float f3, float f4, float f5, float f6, float f7, float f8) {
MutableFloatFloatMap mutableFloatFloatMap = new MutableFloatFloatMap(0, 1, null);
mutableFloatFloatMap.set(f, f2);
mutableFloatFloatMap.set(f3, f4);
mutableFloatFloatMap.set(f5, f6);
mutableFloatFloatMap.set(f7, f8);
return mutableFloatFloatMap;
}
public static final FloatFloatMap floatFloatMapOf(float f, float f2, float f3, float f4, float f5, float f6, float f7, float f8, float f9, float f10) {
MutableFloatFloatMap mutableFloatFloatMap = new MutableFloatFloatMap(0, 1, null);
mutableFloatFloatMap.set(f, f2);
mutableFloatFloatMap.set(f3, f4);
mutableFloatFloatMap.set(f5, f6);
mutableFloatFloatMap.set(f7, f8);
mutableFloatFloatMap.set(f9, f10);
return mutableFloatFloatMap;
}
public static final MutableFloatFloatMap mutableFloatFloatMapOf() {
return new MutableFloatFloatMap(0, 1, null);
}
public static final MutableFloatFloatMap mutableFloatFloatMapOf(float f, float f2) {
MutableFloatFloatMap mutableFloatFloatMap = new MutableFloatFloatMap(0, 1, null);
mutableFloatFloatMap.set(f, f2);
return mutableFloatFloatMap;
}
public static final MutableFloatFloatMap mutableFloatFloatMapOf(float f, float f2, float f3, float f4) {
MutableFloatFloatMap mutableFloatFloatMap = new MutableFloatFloatMap(0, 1, null);
mutableFloatFloatMap.set(f, f2);
mutableFloatFloatMap.set(f3, f4);
return mutableFloatFloatMap;
}
public static final MutableFloatFloatMap mutableFloatFloatMapOf(float f, float f2, float f3, float f4, float f5, float f6) {
MutableFloatFloatMap mutableFloatFloatMap = new MutableFloatFloatMap(0, 1, null);
mutableFloatFloatMap.set(f, f2);
mutableFloatFloatMap.set(f3, f4);
mutableFloatFloatMap.set(f5, f6);
return mutableFloatFloatMap;
}
public static final MutableFloatFloatMap mutableFloatFloatMapOf(float f, float f2, float f3, float f4, float f5, float f6, float f7, float f8) {
MutableFloatFloatMap mutableFloatFloatMap = new MutableFloatFloatMap(0, 1, null);
mutableFloatFloatMap.set(f, f2);
mutableFloatFloatMap.set(f3, f4);
mutableFloatFloatMap.set(f5, f6);
mutableFloatFloatMap.set(f7, f8);
return mutableFloatFloatMap;
}
public static final MutableFloatFloatMap mutableFloatFloatMapOf(float f, float f2, float f3, float f4, float f5, float f6, float f7, float f8, float f9, float f10) {
MutableFloatFloatMap mutableFloatFloatMap = new MutableFloatFloatMap(0, 1, null);
mutableFloatFloatMap.set(f, f2);
mutableFloatFloatMap.set(f3, f4);
mutableFloatFloatMap.set(f5, f6);
mutableFloatFloatMap.set(f7, f8);
mutableFloatFloatMap.set(f9, f10);
return mutableFloatFloatMap;
}
}

View File

@@ -0,0 +1,88 @@
package androidx.collection;
import kotlin.jvm.internal.SourceDebugExtension;
@SourceDebugExtension({"SMAP\nFloatFloatPair.kt\nKotlin\n*S Kotlin\n*F\n+ 1 FloatFloatPair.kt\nandroidx/collection/FloatFloatPair\n+ 2 PackingUtils.kt\nandroidx/collection/PackingUtilsKt\n+ 3 PackingHelpers.jvm.kt\nandroidx/collection/internal/PackingHelpers_jvmKt\n*L\n1#1,85:1\n48#1:93\n54#1:95\n24#2,3:86\n22#3:89\n22#3:90\n22#3:91\n22#3:92\n22#3:94\n*S KotlinDebug\n*F\n+ 1 FloatFloatPair.kt\nandroidx/collection/FloatFloatPair\n*L\n83#1:93\n83#1:95\n42#1:86,3\n48#1:89\n54#1:90\n67#1:91\n81#1:92\n83#1:94\n*E\n"})
/* loaded from: classes.dex */
public final class FloatFloatPair {
public final long packedValue;
/* renamed from: box-impl, reason: not valid java name */
public static final /* synthetic */ FloatFloatPair m10boximpl(long j) {
return new FloatFloatPair(j);
}
/* renamed from: constructor-impl, reason: not valid java name */
public static long m14constructorimpl(long j) {
return j;
}
/* renamed from: equals-impl, reason: not valid java name */
public static boolean m15equalsimpl(long j, Object obj) {
return (obj instanceof FloatFloatPair) && j == ((FloatFloatPair) obj).m21unboximpl();
}
/* renamed from: equals-impl0, reason: not valid java name */
public static final boolean m16equalsimpl0(long j, long j2) {
return j == j2;
}
public static /* synthetic */ void getPackedValue$annotations() {
}
/* renamed from: hashCode-impl, reason: not valid java name */
public static int m19hashCodeimpl(long j) {
return Long.hashCode(j);
}
public boolean equals(Object obj) {
return m15equalsimpl(this.packedValue, obj);
}
public int hashCode() {
return m19hashCodeimpl(this.packedValue);
}
/* renamed from: unbox-impl, reason: not valid java name */
public final /* synthetic */ long m21unboximpl() {
return this.packedValue;
}
/* renamed from: component1-impl, reason: not valid java name */
public static final float m11component1impl(long j) {
return Float.intBitsToFloat((int) (j >> 32));
}
/* renamed from: component2-impl, reason: not valid java name */
public static final float m12component2impl(long j) {
return Float.intBitsToFloat((int) (j & 4294967295L));
}
/* renamed from: getFirst-impl, reason: not valid java name */
public static final float m17getFirstimpl(long j) {
return Float.intBitsToFloat((int) (j >> 32));
}
/* renamed from: getSecond-impl, reason: not valid java name */
public static final float m18getSecondimpl(long j) {
return Float.intBitsToFloat((int) (j & 4294967295L));
}
/* renamed from: constructor-impl, reason: not valid java name */
public static long m13constructorimpl(float f, float f2) {
return m14constructorimpl((Float.floatToRawIntBits(f2) & 4294967295L) | (Float.floatToRawIntBits(f) << 32));
}
private /* synthetic */ FloatFloatPair(long j) {
this.packedValue = j;
}
/* renamed from: toString-impl, reason: not valid java name */
public static String m20toStringimpl(long j) {
return '(' + Float.intBitsToFloat((int) (j >> 32)) + ", " + Float.intBitsToFloat((int) (j & 4294967295L)) + ')';
}
public String toString() {
return m20toStringimpl(this.packedValue);
}
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,98 @@
package androidx.collection;
/* loaded from: classes.dex */
public final class FloatIntMapKt {
private static final MutableFloatIntMap EmptyFloatIntMap = new MutableFloatIntMap(0);
public static final FloatIntMap emptyFloatIntMap() {
return EmptyFloatIntMap;
}
public static final FloatIntMap floatIntMapOf() {
return EmptyFloatIntMap;
}
public static final FloatIntMap floatIntMapOf(float f, int i) {
MutableFloatIntMap mutableFloatIntMap = new MutableFloatIntMap(0, 1, null);
mutableFloatIntMap.set(f, i);
return mutableFloatIntMap;
}
public static final FloatIntMap floatIntMapOf(float f, int i, float f2, int i2) {
MutableFloatIntMap mutableFloatIntMap = new MutableFloatIntMap(0, 1, null);
mutableFloatIntMap.set(f, i);
mutableFloatIntMap.set(f2, i2);
return mutableFloatIntMap;
}
public static final FloatIntMap floatIntMapOf(float f, int i, float f2, int i2, float f3, int i3) {
MutableFloatIntMap mutableFloatIntMap = new MutableFloatIntMap(0, 1, null);
mutableFloatIntMap.set(f, i);
mutableFloatIntMap.set(f2, i2);
mutableFloatIntMap.set(f3, i3);
return mutableFloatIntMap;
}
public static final FloatIntMap floatIntMapOf(float f, int i, float f2, int i2, float f3, int i3, float f4, int i4) {
MutableFloatIntMap mutableFloatIntMap = new MutableFloatIntMap(0, 1, null);
mutableFloatIntMap.set(f, i);
mutableFloatIntMap.set(f2, i2);
mutableFloatIntMap.set(f3, i3);
mutableFloatIntMap.set(f4, i4);
return mutableFloatIntMap;
}
public static final FloatIntMap floatIntMapOf(float f, int i, float f2, int i2, float f3, int i3, float f4, int i4, float f5, int i5) {
MutableFloatIntMap mutableFloatIntMap = new MutableFloatIntMap(0, 1, null);
mutableFloatIntMap.set(f, i);
mutableFloatIntMap.set(f2, i2);
mutableFloatIntMap.set(f3, i3);
mutableFloatIntMap.set(f4, i4);
mutableFloatIntMap.set(f5, i5);
return mutableFloatIntMap;
}
public static final MutableFloatIntMap mutableFloatIntMapOf() {
return new MutableFloatIntMap(0, 1, null);
}
public static final MutableFloatIntMap mutableFloatIntMapOf(float f, int i) {
MutableFloatIntMap mutableFloatIntMap = new MutableFloatIntMap(0, 1, null);
mutableFloatIntMap.set(f, i);
return mutableFloatIntMap;
}
public static final MutableFloatIntMap mutableFloatIntMapOf(float f, int i, float f2, int i2) {
MutableFloatIntMap mutableFloatIntMap = new MutableFloatIntMap(0, 1, null);
mutableFloatIntMap.set(f, i);
mutableFloatIntMap.set(f2, i2);
return mutableFloatIntMap;
}
public static final MutableFloatIntMap mutableFloatIntMapOf(float f, int i, float f2, int i2, float f3, int i3) {
MutableFloatIntMap mutableFloatIntMap = new MutableFloatIntMap(0, 1, null);
mutableFloatIntMap.set(f, i);
mutableFloatIntMap.set(f2, i2);
mutableFloatIntMap.set(f3, i3);
return mutableFloatIntMap;
}
public static final MutableFloatIntMap mutableFloatIntMapOf(float f, int i, float f2, int i2, float f3, int i3, float f4, int i4) {
MutableFloatIntMap mutableFloatIntMap = new MutableFloatIntMap(0, 1, null);
mutableFloatIntMap.set(f, i);
mutableFloatIntMap.set(f2, i2);
mutableFloatIntMap.set(f3, i3);
mutableFloatIntMap.set(f4, i4);
return mutableFloatIntMap;
}
public static final MutableFloatIntMap mutableFloatIntMapOf(float f, int i, float f2, int i2, float f3, int i3, float f4, int i4, float f5, int i5) {
MutableFloatIntMap mutableFloatIntMap = new MutableFloatIntMap(0, 1, null);
mutableFloatIntMap.set(f, i);
mutableFloatIntMap.set(f2, i2);
mutableFloatIntMap.set(f3, i3);
mutableFloatIntMap.set(f4, i4);
mutableFloatIntMap.set(f5, i5);
return mutableFloatIntMap;
}
}

View File

@@ -0,0 +1,715 @@
package androidx.collection;
import androidx.annotation.IntRange;
import com.ironsource.v8;
import java.util.NoSuchElementException;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.functions.Function3;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlin.ranges.RangesKt___RangesKt;
@SourceDebugExtension({"SMAP\nFloatList.kt\nKotlin\n*S Kotlin\n*F\n+ 1 FloatList.kt\nandroidx/collection/FloatList\n*L\n1#1,969:1\n253#1,6:970\n279#1,6:976\n253#1,6:982\n75#1:988\n253#1,6:989\n253#1,6:995\n253#1,6:1001\n266#1,6:1007\n279#1,6:1013\n293#1,6:1019\n70#1:1025\n70#1:1026\n266#1,6:1027\n266#1,6:1033\n293#1,6:1039\n70#1:1045\n279#1,6:1046\n293#1,6:1052\n266#1,6:1058\n266#1,6:1064\n253#1,6:1070\n75#1:1076\n467#1,10:1077\n266#1,4:1087\n477#1,9:1091\n271#1:1100\n486#1,2:1101\n467#1,10:1103\n266#1,4:1113\n477#1,9:1117\n271#1:1126\n486#1,2:1127\n467#1,10:1129\n266#1,4:1139\n477#1,9:1143\n271#1:1152\n486#1,2:1153\n467#1,10:1155\n266#1,4:1165\n477#1,9:1169\n271#1:1178\n486#1,2:1179\n467#1,10:1181\n266#1,4:1191\n477#1,9:1195\n271#1:1204\n486#1,2:1205\n*S KotlinDebug\n*F\n+ 1 FloatList.kt\nandroidx/collection/FloatList\n*L\n96#1:970,6\n110#1:976,6\n122#1:982,6\n135#1:988\n153#1:989,6\n175#1:995,6\n192#1:1001,6\n208#1:1007,6\n225#1:1013,6\n241#1:1019,6\n306#1:1025\n317#1:1026\n343#1:1027,6\n357#1:1033,6\n371#1:1039,6\n397#1:1045\n407#1:1046,6\n420#1:1052,6\n445#1:1058,6\n476#1:1064,6\n494#1:1070,6\n510#1:1076\n-1#1:1077,10\n-1#1:1087,4\n-1#1:1091,9\n-1#1:1100\n-1#1:1101,2\n-1#1:1103,10\n-1#1:1113,4\n-1#1:1117,9\n-1#1:1126\n-1#1:1127,2\n-1#1:1129,10\n-1#1:1139,4\n-1#1:1143,9\n-1#1:1152\n-1#1:1153,2\n-1#1:1155,10\n-1#1:1165,4\n-1#1:1169,9\n-1#1:1178\n-1#1:1179,2\n-1#1:1181,10\n-1#1:1191,4\n-1#1:1195,9\n-1#1:1204\n-1#1:1205,2\n*E\n"})
/* loaded from: classes.dex */
public abstract class FloatList {
public int _size;
public float[] content;
public /* synthetic */ FloatList(int i, DefaultConstructorMarker defaultConstructorMarker) {
this(i);
}
public static /* synthetic */ void getContent$annotations() {
}
public static /* synthetic */ void get_size$annotations() {
}
public final int count() {
return this._size;
}
@IntRange(from = -1)
public final int getLastIndex() {
return this._size - 1;
}
@IntRange(from = 0)
public final int getSize() {
return this._size;
}
public final boolean isEmpty() {
return this._size == 0;
}
public final boolean isNotEmpty() {
return this._size != 0;
}
public final String joinToString() {
return joinToString$default(this, null, null, null, 0, null, 31, null);
}
public final String joinToString(CharSequence separator) {
Intrinsics.checkNotNullParameter(separator, "separator");
return joinToString$default(this, separator, null, null, 0, null, 30, null);
}
public final String joinToString(CharSequence separator, CharSequence prefix) {
Intrinsics.checkNotNullParameter(separator, "separator");
Intrinsics.checkNotNullParameter(prefix, "prefix");
return joinToString$default(this, separator, prefix, null, 0, null, 28, null);
}
public final String joinToString(CharSequence separator, CharSequence prefix, CharSequence postfix) {
Intrinsics.checkNotNullParameter(separator, "separator");
Intrinsics.checkNotNullParameter(prefix, "prefix");
Intrinsics.checkNotNullParameter(postfix, "postfix");
return joinToString$default(this, separator, prefix, postfix, 0, null, 24, null);
}
public final String joinToString(CharSequence separator, CharSequence prefix, CharSequence postfix, int i) {
Intrinsics.checkNotNullParameter(separator, "separator");
Intrinsics.checkNotNullParameter(prefix, "prefix");
Intrinsics.checkNotNullParameter(postfix, "postfix");
return joinToString$default(this, separator, prefix, postfix, i, null, 16, null);
}
private FloatList(int i) {
float[] fArr;
if (i == 0) {
fArr = FloatSetKt.getEmptyFloatArray();
} else {
fArr = new float[i];
}
this.content = fArr;
}
public final boolean containsAll(FloatList elements) {
kotlin.ranges.IntRange until;
Intrinsics.checkNotNullParameter(elements, "elements");
until = RangesKt___RangesKt.until(0, elements._size);
int first = until.getFirst();
int last = until.getLast();
if (first > last) {
return true;
}
while (contains(elements.get(first))) {
if (first == last) {
return true;
}
first++;
}
return false;
}
public final kotlin.ranges.IntRange getIndices() {
kotlin.ranges.IntRange until;
until = RangesKt___RangesKt.until(0, this._size);
return until;
}
public final boolean none() {
return isEmpty();
}
public final boolean any() {
return isNotEmpty();
}
public final float first() {
if (isEmpty()) {
throw new NoSuchElementException("FloatList is empty.");
}
return this.content[0];
}
public final boolean any(Function1 predicate) {
Intrinsics.checkNotNullParameter(predicate, "predicate");
float[] fArr = this.content;
int i = this._size;
for (int i2 = 0; i2 < i; i2++) {
if (((Boolean) predicate.invoke(Float.valueOf(fArr[i2]))).booleanValue()) {
return true;
}
}
return false;
}
public final boolean contains(float f) {
float[] fArr = this.content;
int i = this._size;
for (int i2 = 0; i2 < i; i2++) {
if (fArr[i2] == f) {
return true;
}
}
return false;
}
public final int count(Function1 predicate) {
Intrinsics.checkNotNullParameter(predicate, "predicate");
float[] fArr = this.content;
int i = this._size;
int i2 = 0;
for (int i3 = 0; i3 < i; i3++) {
if (((Boolean) predicate.invoke(Float.valueOf(fArr[i3]))).booleanValue()) {
i2++;
}
}
return i2;
}
public final float first(Function1 predicate) {
Intrinsics.checkNotNullParameter(predicate, "predicate");
float[] fArr = this.content;
int i = this._size;
for (int i2 = 0; i2 < i; i2++) {
float f = fArr[i2];
if (((Boolean) predicate.invoke(Float.valueOf(f))).booleanValue()) {
return f;
}
}
throw new NoSuchElementException("FloatList contains no element matching the predicate.");
}
public final <R> R fold(R r, Function2 operation) {
Intrinsics.checkNotNullParameter(operation, "operation");
float[] fArr = this.content;
int i = this._size;
for (int i2 = 0; i2 < i; i2++) {
r = (R) operation.invoke(r, Float.valueOf(fArr[i2]));
}
return r;
}
public final void forEach(Function1 block) {
Intrinsics.checkNotNullParameter(block, "block");
float[] fArr = this.content;
int i = this._size;
for (int i2 = 0; i2 < i; i2++) {
block.invoke(Float.valueOf(fArr[i2]));
}
}
public int hashCode() {
float[] fArr = this.content;
int i = this._size;
int i2 = 0;
for (int i3 = 0; i3 < i; i3++) {
i2 += Float.hashCode(fArr[i3]) * 31;
}
return i2;
}
public final <R> R foldIndexed(R r, Function3 operation) {
Intrinsics.checkNotNullParameter(operation, "operation");
float[] fArr = this.content;
int i = this._size;
for (int i2 = 0; i2 < i; i2++) {
R r2 = r;
r = (R) operation.invoke(Integer.valueOf(i2), r2, Float.valueOf(fArr[i2]));
}
return r;
}
public final void forEachIndexed(Function2 block) {
Intrinsics.checkNotNullParameter(block, "block");
float[] fArr = this.content;
int i = this._size;
for (int i2 = 0; i2 < i; i2++) {
block.invoke(Integer.valueOf(i2), Float.valueOf(fArr[i2]));
}
}
public final int indexOf(float f) {
float[] fArr = this.content;
int i = this._size;
for (int i2 = 0; i2 < i; i2++) {
if (f == fArr[i2]) {
return i2;
}
}
return -1;
}
public final int indexOfFirst(Function1 predicate) {
Intrinsics.checkNotNullParameter(predicate, "predicate");
float[] fArr = this.content;
int i = this._size;
for (int i2 = 0; i2 < i; i2++) {
if (((Boolean) predicate.invoke(Float.valueOf(fArr[i2]))).booleanValue()) {
return i2;
}
}
return -1;
}
public final <R> R foldRight(R r, Function2 operation) {
Intrinsics.checkNotNullParameter(operation, "operation");
float[] fArr = this.content;
int i = this._size;
while (true) {
i--;
if (-1 >= i) {
return r;
}
r = (R) operation.invoke(Float.valueOf(fArr[i]), r);
}
}
public final void forEachReversed(Function1 block) {
Intrinsics.checkNotNullParameter(block, "block");
float[] fArr = this.content;
int i = this._size;
while (true) {
i--;
if (-1 >= i) {
return;
} else {
block.invoke(Float.valueOf(fArr[i]));
}
}
}
public final float last(Function1 predicate) {
float f;
Intrinsics.checkNotNullParameter(predicate, "predicate");
float[] fArr = this.content;
int i = this._size;
do {
i--;
if (-1 < i) {
f = fArr[i];
} else {
throw new NoSuchElementException("FloatList contains no element matching the predicate.");
}
} while (!((Boolean) predicate.invoke(Float.valueOf(f))).booleanValue());
return f;
}
public final boolean reversedAny(Function1 predicate) {
Intrinsics.checkNotNullParameter(predicate, "predicate");
float[] fArr = this.content;
for (int i = this._size - 1; -1 < i; i--) {
if (((Boolean) predicate.invoke(Float.valueOf(fArr[i]))).booleanValue()) {
return true;
}
}
return false;
}
public final <R> R foldRightIndexed(R r, Function3 operation) {
Intrinsics.checkNotNullParameter(operation, "operation");
float[] fArr = this.content;
int i = this._size;
while (true) {
i--;
if (-1 >= i) {
return r;
}
r = (R) operation.invoke(Integer.valueOf(i), Float.valueOf(fArr[i]), r);
}
}
public final void forEachReversedIndexed(Function2 block) {
Intrinsics.checkNotNullParameter(block, "block");
float[] fArr = this.content;
int i = this._size;
while (true) {
i--;
if (-1 >= i) {
return;
} else {
block.invoke(Integer.valueOf(i), Float.valueOf(fArr[i]));
}
}
}
public final int indexOfLast(Function1 predicate) {
Intrinsics.checkNotNullParameter(predicate, "predicate");
float[] fArr = this.content;
int i = this._size;
do {
i--;
if (-1 >= i) {
return -1;
}
} while (!((Boolean) predicate.invoke(Float.valueOf(fArr[i]))).booleanValue());
return i;
}
public final int lastIndexOf(float f) {
float[] fArr = this.content;
int i = this._size;
do {
i--;
if (-1 >= i) {
return -1;
}
} while (fArr[i] != f);
return i;
}
public final float get(@IntRange(from = 0) int i) {
if (i < 0 || i >= this._size) {
StringBuilder sb = new StringBuilder();
sb.append("Index ");
sb.append(i);
sb.append(" must be in 0..");
sb.append(this._size - 1);
throw new IndexOutOfBoundsException(sb.toString());
}
return this.content[i];
}
public final float elementAt(@IntRange(from = 0) int i) {
if (i < 0 || i >= this._size) {
StringBuilder sb = new StringBuilder();
sb.append("Index ");
sb.append(i);
sb.append(" must be in 0..");
sb.append(this._size - 1);
throw new IndexOutOfBoundsException(sb.toString());
}
return this.content[i];
}
public final float elementAtOrElse(@IntRange(from = 0) int i, Function1 defaultValue) {
Intrinsics.checkNotNullParameter(defaultValue, "defaultValue");
if (i < 0 || i >= this._size) {
return ((Number) defaultValue.invoke(Integer.valueOf(i))).floatValue();
}
return this.content[i];
}
public final float last() {
if (!isEmpty()) {
return this.content[this._size - 1];
}
throw new NoSuchElementException("FloatList is empty.");
}
public static /* synthetic */ String joinToString$default(FloatList floatList, CharSequence charSequence, CharSequence charSequence2, CharSequence charSequence3, int i, CharSequence charSequence4, int i2, Object obj) {
if (obj != null) {
throw new UnsupportedOperationException("Super calls with default arguments not supported in this target, function: joinToString");
}
if ((i2 & 1) != 0) {
charSequence = ", ";
}
CharSequence charSequence5 = (i2 & 2) != 0 ? "" : charSequence2;
CharSequence charSequence6 = (i2 & 4) == 0 ? charSequence3 : "";
if ((i2 & 8) != 0) {
i = -1;
}
int i3 = i;
if ((i2 & 16) != 0) {
charSequence4 = "...";
}
return floatList.joinToString(charSequence, charSequence5, charSequence6, i3, charSequence4);
}
public final String joinToString(CharSequence separator, CharSequence prefix, CharSequence postfix, int i, CharSequence truncated) {
Intrinsics.checkNotNullParameter(separator, "separator");
Intrinsics.checkNotNullParameter(prefix, "prefix");
Intrinsics.checkNotNullParameter(postfix, "postfix");
Intrinsics.checkNotNullParameter(truncated, "truncated");
StringBuilder sb = new StringBuilder();
sb.append(prefix);
float[] fArr = this.content;
int i2 = this._size;
int i3 = 0;
while (true) {
if (i3 < i2) {
float f = fArr[i3];
if (i3 == i) {
sb.append(truncated);
break;
}
if (i3 != 0) {
sb.append(separator);
}
sb.append(f);
i3++;
} else {
sb.append(postfix);
break;
}
}
String sb2 = sb.toString();
Intrinsics.checkNotNullExpressionValue(sb2, "StringBuilder().apply(builderAction).toString()");
return sb2;
}
public static /* synthetic */ String joinToString$default(FloatList floatList, CharSequence separator, CharSequence prefix, CharSequence postfix, int i, CharSequence truncated, Function1 transform, int i2, Object obj) {
if (obj == null) {
if ((i2 & 1) != 0) {
separator = ", ";
}
if ((i2 & 2) != 0) {
prefix = "";
}
if ((i2 & 4) != 0) {
postfix = "";
}
if ((i2 & 8) != 0) {
i = -1;
}
if ((i2 & 16) != 0) {
truncated = "...";
}
Intrinsics.checkNotNullParameter(separator, "separator");
Intrinsics.checkNotNullParameter(prefix, "prefix");
Intrinsics.checkNotNullParameter(postfix, "postfix");
Intrinsics.checkNotNullParameter(truncated, "truncated");
Intrinsics.checkNotNullParameter(transform, "transform");
StringBuilder sb = new StringBuilder();
sb.append(prefix);
float[] fArr = floatList.content;
int i3 = floatList._size;
int i4 = 0;
while (true) {
if (i4 < i3) {
float f = fArr[i4];
if (i4 == i) {
sb.append(truncated);
break;
}
if (i4 != 0) {
sb.append(separator);
}
sb.append((CharSequence) transform.invoke(Float.valueOf(f)));
i4++;
} else {
sb.append(postfix);
break;
}
}
String sb2 = sb.toString();
Intrinsics.checkNotNullExpressionValue(sb2, "StringBuilder().apply(builderAction).toString()");
return sb2;
}
throw new UnsupportedOperationException("Super calls with default arguments not supported in this target, function: joinToString");
}
public final String joinToString(CharSequence separator, CharSequence prefix, CharSequence postfix, int i, CharSequence truncated, Function1 transform) {
Intrinsics.checkNotNullParameter(separator, "separator");
Intrinsics.checkNotNullParameter(prefix, "prefix");
Intrinsics.checkNotNullParameter(postfix, "postfix");
Intrinsics.checkNotNullParameter(truncated, "truncated");
Intrinsics.checkNotNullParameter(transform, "transform");
StringBuilder sb = new StringBuilder();
sb.append(prefix);
float[] fArr = this.content;
int i2 = this._size;
int i3 = 0;
while (true) {
if (i3 < i2) {
float f = fArr[i3];
if (i3 == i) {
sb.append(truncated);
break;
}
if (i3 != 0) {
sb.append(separator);
}
sb.append((CharSequence) transform.invoke(Float.valueOf(f)));
i3++;
} else {
sb.append(postfix);
break;
}
}
String sb2 = sb.toString();
Intrinsics.checkNotNullExpressionValue(sb2, "StringBuilder().apply(builderAction).toString()");
return sb2;
}
public final String joinToString(CharSequence separator, CharSequence prefix, CharSequence postfix, int i, Function1 transform) {
Intrinsics.checkNotNullParameter(separator, "separator");
Intrinsics.checkNotNullParameter(prefix, "prefix");
Intrinsics.checkNotNullParameter(postfix, "postfix");
Intrinsics.checkNotNullParameter(transform, "transform");
StringBuilder sb = new StringBuilder();
sb.append(prefix);
float[] fArr = this.content;
int i2 = this._size;
int i3 = 0;
while (true) {
if (i3 < i2) {
float f = fArr[i3];
if (i3 == i) {
sb.append((CharSequence) "...");
break;
}
if (i3 != 0) {
sb.append(separator);
}
sb.append((CharSequence) transform.invoke(Float.valueOf(f)));
i3++;
} else {
sb.append(postfix);
break;
}
}
String sb2 = sb.toString();
Intrinsics.checkNotNullExpressionValue(sb2, "StringBuilder().apply(builderAction).toString()");
return sb2;
}
public final String joinToString(CharSequence separator, CharSequence prefix, CharSequence postfix, Function1 transform) {
Intrinsics.checkNotNullParameter(separator, "separator");
Intrinsics.checkNotNullParameter(prefix, "prefix");
Intrinsics.checkNotNullParameter(postfix, "postfix");
Intrinsics.checkNotNullParameter(transform, "transform");
StringBuilder sb = new StringBuilder();
sb.append(prefix);
float[] fArr = this.content;
int i = this._size;
int i2 = 0;
while (true) {
if (i2 < i) {
float f = fArr[i2];
if (i2 == -1) {
sb.append((CharSequence) "...");
break;
}
if (i2 != 0) {
sb.append(separator);
}
sb.append((CharSequence) transform.invoke(Float.valueOf(f)));
i2++;
} else {
sb.append(postfix);
break;
}
}
String sb2 = sb.toString();
Intrinsics.checkNotNullExpressionValue(sb2, "StringBuilder().apply(builderAction).toString()");
return sb2;
}
public final String joinToString(CharSequence separator, CharSequence prefix, Function1 transform) {
Intrinsics.checkNotNullParameter(separator, "separator");
Intrinsics.checkNotNullParameter(prefix, "prefix");
Intrinsics.checkNotNullParameter(transform, "transform");
StringBuilder sb = new StringBuilder();
sb.append(prefix);
float[] fArr = this.content;
int i = this._size;
int i2 = 0;
while (true) {
if (i2 < i) {
float f = fArr[i2];
if (i2 == -1) {
sb.append((CharSequence) "...");
break;
}
if (i2 != 0) {
sb.append(separator);
}
sb.append((CharSequence) transform.invoke(Float.valueOf(f)));
i2++;
} else {
sb.append((CharSequence) "");
break;
}
}
String sb2 = sb.toString();
Intrinsics.checkNotNullExpressionValue(sb2, "StringBuilder().apply(builderAction).toString()");
return sb2;
}
public final String joinToString(CharSequence separator, Function1 transform) {
Intrinsics.checkNotNullParameter(separator, "separator");
Intrinsics.checkNotNullParameter(transform, "transform");
StringBuilder sb = new StringBuilder();
sb.append((CharSequence) "");
float[] fArr = this.content;
int i = this._size;
int i2 = 0;
while (true) {
if (i2 < i) {
float f = fArr[i2];
if (i2 == -1) {
sb.append((CharSequence) "...");
break;
}
if (i2 != 0) {
sb.append(separator);
}
sb.append((CharSequence) transform.invoke(Float.valueOf(f)));
i2++;
} else {
sb.append((CharSequence) "");
break;
}
}
String sb2 = sb.toString();
Intrinsics.checkNotNullExpressionValue(sb2, "StringBuilder().apply(builderAction).toString()");
return sb2;
}
public final String joinToString(Function1 transform) {
Intrinsics.checkNotNullParameter(transform, "transform");
StringBuilder sb = new StringBuilder();
sb.append((CharSequence) "");
float[] fArr = this.content;
int i = this._size;
int i2 = 0;
while (true) {
if (i2 < i) {
float f = fArr[i2];
if (i2 == -1) {
sb.append((CharSequence) "...");
break;
}
if (i2 != 0) {
sb.append((CharSequence) ", ");
}
sb.append((CharSequence) transform.invoke(Float.valueOf(f)));
i2++;
} else {
sb.append((CharSequence) "");
break;
}
}
String sb2 = sb.toString();
Intrinsics.checkNotNullExpressionValue(sb2, "StringBuilder().apply(builderAction).toString()");
return sb2;
}
public boolean equals(Object obj) {
kotlin.ranges.IntRange until;
if (obj instanceof FloatList) {
FloatList floatList = (FloatList) obj;
int i = floatList._size;
int i2 = this._size;
if (i == i2) {
float[] fArr = this.content;
float[] fArr2 = floatList.content;
until = RangesKt___RangesKt.until(0, i2);
int first = until.getFirst();
int last = until.getLast();
if (first > last) {
return true;
}
while (fArr[first] == fArr2[first]) {
if (first == last) {
return true;
}
first++;
}
return false;
}
}
return false;
}
public String toString() {
return joinToString$default(this, null, v8.i.d, v8.i.e, 0, null, 25, null);
}
}

View File

@@ -0,0 +1,69 @@
package androidx.collection;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
@SourceDebugExtension({"SMAP\nFloatList.kt\nKotlin\n*S Kotlin\n*F\n+ 1 FloatList.kt\nandroidx/collection/FloatListKt\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n+ 3 FloatList.kt\nandroidx/collection/MutableFloatList\n*L\n1#1,969:1\n1#2:970\n713#3,2:971\n713#3,2:973\n713#3,2:975\n713#3,2:977\n713#3,2:979\n713#3,2:981\n*S KotlinDebug\n*F\n+ 1 FloatList.kt\nandroidx/collection/FloatListKt\n*L\n938#1:971,2\n947#1:973,2\n948#1:975,2\n958#1:977,2\n959#1:979,2\n960#1:981,2\n*E\n"})
/* loaded from: classes.dex */
public final class FloatListKt {
private static final FloatList EmptyFloatList = new MutableFloatList(0);
public static final FloatList emptyFloatList() {
return EmptyFloatList;
}
public static final FloatList floatListOf() {
return EmptyFloatList;
}
public static final FloatList floatListOf(float f) {
return mutableFloatListOf(f);
}
public static final FloatList floatListOf(float f, float f2) {
return mutableFloatListOf(f, f2);
}
public static final FloatList floatListOf(float f, float f2, float f3) {
return mutableFloatListOf(f, f2, f3);
}
public static final FloatList floatListOf(float... elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
MutableFloatList mutableFloatList = new MutableFloatList(elements.length);
mutableFloatList.plusAssign(elements);
return mutableFloatList;
}
public static final MutableFloatList mutableFloatListOf() {
return new MutableFloatList(0, 1, null);
}
public static final MutableFloatList mutableFloatListOf(float f) {
MutableFloatList mutableFloatList = new MutableFloatList(1);
mutableFloatList.add(f);
return mutableFloatList;
}
public static final MutableFloatList mutableFloatListOf(float f, float f2) {
MutableFloatList mutableFloatList = new MutableFloatList(2);
mutableFloatList.add(f);
mutableFloatList.add(f2);
return mutableFloatList;
}
public static final MutableFloatList mutableFloatListOf(float f, float f2, float f3) {
MutableFloatList mutableFloatList = new MutableFloatList(3);
mutableFloatList.add(f);
mutableFloatList.add(f2);
mutableFloatList.add(f3);
return mutableFloatList;
}
public static final MutableFloatList mutableFloatListOf(float... elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
MutableFloatList mutableFloatList = new MutableFloatList(elements.length);
mutableFloatList.plusAssign(elements);
return mutableFloatList;
}
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,98 @@
package androidx.collection;
/* loaded from: classes.dex */
public final class FloatLongMapKt {
private static final MutableFloatLongMap EmptyFloatLongMap = new MutableFloatLongMap(0);
public static final FloatLongMap emptyFloatLongMap() {
return EmptyFloatLongMap;
}
public static final FloatLongMap floatLongMapOf() {
return EmptyFloatLongMap;
}
public static final FloatLongMap floatLongMapOf(float f, long j) {
MutableFloatLongMap mutableFloatLongMap = new MutableFloatLongMap(0, 1, null);
mutableFloatLongMap.set(f, j);
return mutableFloatLongMap;
}
public static final FloatLongMap floatLongMapOf(float f, long j, float f2, long j2) {
MutableFloatLongMap mutableFloatLongMap = new MutableFloatLongMap(0, 1, null);
mutableFloatLongMap.set(f, j);
mutableFloatLongMap.set(f2, j2);
return mutableFloatLongMap;
}
public static final FloatLongMap floatLongMapOf(float f, long j, float f2, long j2, float f3, long j3) {
MutableFloatLongMap mutableFloatLongMap = new MutableFloatLongMap(0, 1, null);
mutableFloatLongMap.set(f, j);
mutableFloatLongMap.set(f2, j2);
mutableFloatLongMap.set(f3, j3);
return mutableFloatLongMap;
}
public static final FloatLongMap floatLongMapOf(float f, long j, float f2, long j2, float f3, long j3, float f4, long j4) {
MutableFloatLongMap mutableFloatLongMap = new MutableFloatLongMap(0, 1, null);
mutableFloatLongMap.set(f, j);
mutableFloatLongMap.set(f2, j2);
mutableFloatLongMap.set(f3, j3);
mutableFloatLongMap.set(f4, j4);
return mutableFloatLongMap;
}
public static final FloatLongMap floatLongMapOf(float f, long j, float f2, long j2, float f3, long j3, float f4, long j4, float f5, long j5) {
MutableFloatLongMap mutableFloatLongMap = new MutableFloatLongMap(0, 1, null);
mutableFloatLongMap.set(f, j);
mutableFloatLongMap.set(f2, j2);
mutableFloatLongMap.set(f3, j3);
mutableFloatLongMap.set(f4, j4);
mutableFloatLongMap.set(f5, j5);
return mutableFloatLongMap;
}
public static final MutableFloatLongMap mutableFloatLongMapOf() {
return new MutableFloatLongMap(0, 1, null);
}
public static final MutableFloatLongMap mutableFloatLongMapOf(float f, long j) {
MutableFloatLongMap mutableFloatLongMap = new MutableFloatLongMap(0, 1, null);
mutableFloatLongMap.set(f, j);
return mutableFloatLongMap;
}
public static final MutableFloatLongMap mutableFloatLongMapOf(float f, long j, float f2, long j2) {
MutableFloatLongMap mutableFloatLongMap = new MutableFloatLongMap(0, 1, null);
mutableFloatLongMap.set(f, j);
mutableFloatLongMap.set(f2, j2);
return mutableFloatLongMap;
}
public static final MutableFloatLongMap mutableFloatLongMapOf(float f, long j, float f2, long j2, float f3, long j3) {
MutableFloatLongMap mutableFloatLongMap = new MutableFloatLongMap(0, 1, null);
mutableFloatLongMap.set(f, j);
mutableFloatLongMap.set(f2, j2);
mutableFloatLongMap.set(f3, j3);
return mutableFloatLongMap;
}
public static final MutableFloatLongMap mutableFloatLongMapOf(float f, long j, float f2, long j2, float f3, long j3, float f4, long j4) {
MutableFloatLongMap mutableFloatLongMap = new MutableFloatLongMap(0, 1, null);
mutableFloatLongMap.set(f, j);
mutableFloatLongMap.set(f2, j2);
mutableFloatLongMap.set(f3, j3);
mutableFloatLongMap.set(f4, j4);
return mutableFloatLongMap;
}
public static final MutableFloatLongMap mutableFloatLongMapOf(float f, long j, float f2, long j2, float f3, long j3, float f4, long j4, float f5, long j5) {
MutableFloatLongMap mutableFloatLongMap = new MutableFloatLongMap(0, 1, null);
mutableFloatLongMap.set(f, j);
mutableFloatLongMap.set(f2, j2);
mutableFloatLongMap.set(f3, j3);
mutableFloatLongMap.set(f4, j4);
mutableFloatLongMap.set(f5, j5);
return mutableFloatLongMap;
}
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,104 @@
package androidx.collection;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes.dex */
public final class FloatObjectMapKt {
private static final MutableFloatObjectMap EmptyFloatObjectMap = new MutableFloatObjectMap(0);
public static final <V> FloatObjectMap<V> emptyFloatObjectMap() {
MutableFloatObjectMap mutableFloatObjectMap = EmptyFloatObjectMap;
Intrinsics.checkNotNull(mutableFloatObjectMap, "null cannot be cast to non-null type androidx.collection.FloatObjectMap<V of androidx.collection.FloatObjectMapKt.emptyFloatObjectMap>");
return mutableFloatObjectMap;
}
public static final <V> FloatObjectMap<V> floatObjectMapOf() {
MutableFloatObjectMap mutableFloatObjectMap = EmptyFloatObjectMap;
Intrinsics.checkNotNull(mutableFloatObjectMap, "null cannot be cast to non-null type androidx.collection.FloatObjectMap<V of androidx.collection.FloatObjectMapKt.floatObjectMapOf>");
return mutableFloatObjectMap;
}
public static final <V> FloatObjectMap<V> floatObjectMapOf(float f, V v) {
MutableFloatObjectMap mutableFloatObjectMap = new MutableFloatObjectMap(0, 1, null);
mutableFloatObjectMap.set(f, v);
return mutableFloatObjectMap;
}
public static final <V> FloatObjectMap<V> floatObjectMapOf(float f, V v, float f2, V v2) {
MutableFloatObjectMap mutableFloatObjectMap = new MutableFloatObjectMap(0, 1, null);
mutableFloatObjectMap.set(f, v);
mutableFloatObjectMap.set(f2, v2);
return mutableFloatObjectMap;
}
public static final <V> FloatObjectMap<V> floatObjectMapOf(float f, V v, float f2, V v2, float f3, V v3) {
MutableFloatObjectMap mutableFloatObjectMap = new MutableFloatObjectMap(0, 1, null);
mutableFloatObjectMap.set(f, v);
mutableFloatObjectMap.set(f2, v2);
mutableFloatObjectMap.set(f3, v3);
return mutableFloatObjectMap;
}
public static final <V> FloatObjectMap<V> floatObjectMapOf(float f, V v, float f2, V v2, float f3, V v3, float f4, V v4) {
MutableFloatObjectMap mutableFloatObjectMap = new MutableFloatObjectMap(0, 1, null);
mutableFloatObjectMap.set(f, v);
mutableFloatObjectMap.set(f2, v2);
mutableFloatObjectMap.set(f3, v3);
mutableFloatObjectMap.set(f4, v4);
return mutableFloatObjectMap;
}
public static final <V> FloatObjectMap<V> floatObjectMapOf(float f, V v, float f2, V v2, float f3, V v3, float f4, V v4, float f5, V v5) {
MutableFloatObjectMap mutableFloatObjectMap = new MutableFloatObjectMap(0, 1, null);
mutableFloatObjectMap.set(f, v);
mutableFloatObjectMap.set(f2, v2);
mutableFloatObjectMap.set(f3, v3);
mutableFloatObjectMap.set(f4, v4);
mutableFloatObjectMap.set(f5, v5);
return mutableFloatObjectMap;
}
public static final <V> MutableFloatObjectMap<V> mutableFloatObjectMapOf() {
return new MutableFloatObjectMap<>(0, 1, null);
}
public static final <V> MutableFloatObjectMap<V> mutableFloatObjectMapOf(float f, V v) {
MutableFloatObjectMap<V> mutableFloatObjectMap = new MutableFloatObjectMap<>(0, 1, null);
mutableFloatObjectMap.set(f, v);
return mutableFloatObjectMap;
}
public static final <V> MutableFloatObjectMap<V> mutableFloatObjectMapOf(float f, V v, float f2, V v2) {
MutableFloatObjectMap<V> mutableFloatObjectMap = new MutableFloatObjectMap<>(0, 1, null);
mutableFloatObjectMap.set(f, v);
mutableFloatObjectMap.set(f2, v2);
return mutableFloatObjectMap;
}
public static final <V> MutableFloatObjectMap<V> mutableFloatObjectMapOf(float f, V v, float f2, V v2, float f3, V v3) {
MutableFloatObjectMap<V> mutableFloatObjectMap = new MutableFloatObjectMap<>(0, 1, null);
mutableFloatObjectMap.set(f, v);
mutableFloatObjectMap.set(f2, v2);
mutableFloatObjectMap.set(f3, v3);
return mutableFloatObjectMap;
}
public static final <V> MutableFloatObjectMap<V> mutableFloatObjectMapOf(float f, V v, float f2, V v2, float f3, V v3, float f4, V v4) {
MutableFloatObjectMap<V> mutableFloatObjectMap = new MutableFloatObjectMap<>(0, 1, null);
mutableFloatObjectMap.set(f, v);
mutableFloatObjectMap.set(f2, v2);
mutableFloatObjectMap.set(f3, v3);
mutableFloatObjectMap.set(f4, v4);
return mutableFloatObjectMap;
}
public static final <V> MutableFloatObjectMap<V> mutableFloatObjectMapOf(float f, V v, float f2, V v2, float f3, V v3, float f4, V v4, float f5, V v5) {
MutableFloatObjectMap<V> mutableFloatObjectMap = new MutableFloatObjectMap<>(0, 1, null);
mutableFloatObjectMap.set(f, v);
mutableFloatObjectMap.set(f2, v2);
mutableFloatObjectMap.set(f3, v3);
mutableFloatObjectMap.set(f4, v4);
mutableFloatObjectMap.set(f5, v5);
return mutableFloatObjectMap;
}
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,79 @@
package androidx.collection;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
@SourceDebugExtension({"SMAP\nFloatSet.kt\nKotlin\n*S Kotlin\n*F\n+ 1 FloatSet.kt\nandroidx/collection/FloatSetKt\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,853:1\n1#2:854\n*E\n"})
/* loaded from: classes.dex */
public final class FloatSetKt {
private static final MutableFloatSet EmptyFloatSet = new MutableFloatSet(0);
private static final float[] EmptyFloatArray = new float[0];
public static final FloatSet emptyFloatSet() {
return EmptyFloatSet;
}
public static final FloatSet floatSetOf() {
return EmptyFloatSet;
}
public static final float[] getEmptyFloatArray() {
return EmptyFloatArray;
}
public static final FloatSet floatSetOf(float f) {
return mutableFloatSetOf(f);
}
public static final FloatSet floatSetOf(float f, float f2) {
return mutableFloatSetOf(f, f2);
}
public static final FloatSet floatSetOf(float f, float f2, float f3) {
return mutableFloatSetOf(f, f2, f3);
}
public static final FloatSet floatSetOf(float... elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
MutableFloatSet mutableFloatSet = new MutableFloatSet(elements.length);
mutableFloatSet.plusAssign(elements);
return mutableFloatSet;
}
public static final MutableFloatSet mutableFloatSetOf() {
return new MutableFloatSet(0, 1, null);
}
public static final MutableFloatSet mutableFloatSetOf(float f) {
MutableFloatSet mutableFloatSet = new MutableFloatSet(1);
mutableFloatSet.plusAssign(f);
return mutableFloatSet;
}
public static final MutableFloatSet mutableFloatSetOf(float f, float f2) {
MutableFloatSet mutableFloatSet = new MutableFloatSet(2);
mutableFloatSet.plusAssign(f);
mutableFloatSet.plusAssign(f2);
return mutableFloatSet;
}
public static final MutableFloatSet mutableFloatSetOf(float f, float f2, float f3) {
MutableFloatSet mutableFloatSet = new MutableFloatSet(3);
mutableFloatSet.plusAssign(f);
mutableFloatSet.plusAssign(f2);
mutableFloatSet.plusAssign(f3);
return mutableFloatSet;
}
public static final MutableFloatSet mutableFloatSetOf(float... elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
MutableFloatSet mutableFloatSet = new MutableFloatSet(elements.length);
mutableFloatSet.plusAssign(elements);
return mutableFloatSet;
}
public static final int hash(float f) {
int hashCode = Float.hashCode(f) * ScatterMapKt.MurmurHashC1;
return hashCode ^ (hashCode << 16);
}
}

View File

@@ -0,0 +1,50 @@
package androidx.collection;
import java.util.Iterator;
import java.util.NoSuchElementException;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlin.jvm.internal.markers.KMutableIterator;
@SourceDebugExtension({"SMAP\nIndexBasedArrayIterator.kt\nKotlin\n*S Kotlin\n*F\n+ 1 IndexBasedArrayIterator.kt\nandroidx/collection/IndexBasedArrayIterator\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,48:1\n1#2:49\n*E\n"})
/* loaded from: classes.dex */
public abstract class IndexBasedArrayIterator<T> implements Iterator<T>, KMutableIterator {
private boolean canRemove;
private int index;
private int size;
public abstract T elementAt(int i);
@Override // java.util.Iterator
public boolean hasNext() {
return this.index < this.size;
}
public abstract void removeAt(int i);
public IndexBasedArrayIterator(int i) {
this.size = i;
}
@Override // java.util.Iterator
public T next() {
if (!hasNext()) {
throw new NoSuchElementException();
}
T elementAt = elementAt(this.index);
this.index++;
this.canRemove = true;
return elementAt;
}
@Override // java.util.Iterator
public void remove() {
if (!this.canRemove) {
throw new IllegalStateException("Call next() before removing an element.".toString());
}
int i = this.index - 1;
this.index = i;
removeAt(i);
this.size--;
this.canRemove = false;
}
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,98 @@
package androidx.collection;
/* loaded from: classes.dex */
public final class IntFloatMapKt {
private static final MutableIntFloatMap EmptyIntFloatMap = new MutableIntFloatMap(0);
public static final IntFloatMap emptyIntFloatMap() {
return EmptyIntFloatMap;
}
public static final IntFloatMap intFloatMapOf() {
return EmptyIntFloatMap;
}
public static final IntFloatMap intFloatMapOf(int i, float f) {
MutableIntFloatMap mutableIntFloatMap = new MutableIntFloatMap(0, 1, null);
mutableIntFloatMap.set(i, f);
return mutableIntFloatMap;
}
public static final IntFloatMap intFloatMapOf(int i, float f, int i2, float f2) {
MutableIntFloatMap mutableIntFloatMap = new MutableIntFloatMap(0, 1, null);
mutableIntFloatMap.set(i, f);
mutableIntFloatMap.set(i2, f2);
return mutableIntFloatMap;
}
public static final IntFloatMap intFloatMapOf(int i, float f, int i2, float f2, int i3, float f3) {
MutableIntFloatMap mutableIntFloatMap = new MutableIntFloatMap(0, 1, null);
mutableIntFloatMap.set(i, f);
mutableIntFloatMap.set(i2, f2);
mutableIntFloatMap.set(i3, f3);
return mutableIntFloatMap;
}
public static final IntFloatMap intFloatMapOf(int i, float f, int i2, float f2, int i3, float f3, int i4, float f4) {
MutableIntFloatMap mutableIntFloatMap = new MutableIntFloatMap(0, 1, null);
mutableIntFloatMap.set(i, f);
mutableIntFloatMap.set(i2, f2);
mutableIntFloatMap.set(i3, f3);
mutableIntFloatMap.set(i4, f4);
return mutableIntFloatMap;
}
public static final IntFloatMap intFloatMapOf(int i, float f, int i2, float f2, int i3, float f3, int i4, float f4, int i5, float f5) {
MutableIntFloatMap mutableIntFloatMap = new MutableIntFloatMap(0, 1, null);
mutableIntFloatMap.set(i, f);
mutableIntFloatMap.set(i2, f2);
mutableIntFloatMap.set(i3, f3);
mutableIntFloatMap.set(i4, f4);
mutableIntFloatMap.set(i5, f5);
return mutableIntFloatMap;
}
public static final MutableIntFloatMap mutableIntFloatMapOf() {
return new MutableIntFloatMap(0, 1, null);
}
public static final MutableIntFloatMap mutableIntFloatMapOf(int i, float f) {
MutableIntFloatMap mutableIntFloatMap = new MutableIntFloatMap(0, 1, null);
mutableIntFloatMap.set(i, f);
return mutableIntFloatMap;
}
public static final MutableIntFloatMap mutableIntFloatMapOf(int i, float f, int i2, float f2) {
MutableIntFloatMap mutableIntFloatMap = new MutableIntFloatMap(0, 1, null);
mutableIntFloatMap.set(i, f);
mutableIntFloatMap.set(i2, f2);
return mutableIntFloatMap;
}
public static final MutableIntFloatMap mutableIntFloatMapOf(int i, float f, int i2, float f2, int i3, float f3) {
MutableIntFloatMap mutableIntFloatMap = new MutableIntFloatMap(0, 1, null);
mutableIntFloatMap.set(i, f);
mutableIntFloatMap.set(i2, f2);
mutableIntFloatMap.set(i3, f3);
return mutableIntFloatMap;
}
public static final MutableIntFloatMap mutableIntFloatMapOf(int i, float f, int i2, float f2, int i3, float f3, int i4, float f4) {
MutableIntFloatMap mutableIntFloatMap = new MutableIntFloatMap(0, 1, null);
mutableIntFloatMap.set(i, f);
mutableIntFloatMap.set(i2, f2);
mutableIntFloatMap.set(i3, f3);
mutableIntFloatMap.set(i4, f4);
return mutableIntFloatMap;
}
public static final MutableIntFloatMap mutableIntFloatMapOf(int i, float f, int i2, float f2, int i3, float f3, int i4, float f4, int i5, float f5) {
MutableIntFloatMap mutableIntFloatMap = new MutableIntFloatMap(0, 1, null);
mutableIntFloatMap.set(i, f);
mutableIntFloatMap.set(i2, f2);
mutableIntFloatMap.set(i3, f3);
mutableIntFloatMap.set(i4, f4);
mutableIntFloatMap.set(i5, f5);
return mutableIntFloatMap;
}
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,98 @@
package androidx.collection;
/* loaded from: classes.dex */
public final class IntIntMapKt {
private static final MutableIntIntMap EmptyIntIntMap = new MutableIntIntMap(0);
public static final IntIntMap emptyIntIntMap() {
return EmptyIntIntMap;
}
public static final IntIntMap intIntMapOf() {
return EmptyIntIntMap;
}
public static final IntIntMap intIntMapOf(int i, int i2) {
MutableIntIntMap mutableIntIntMap = new MutableIntIntMap(0, 1, null);
mutableIntIntMap.set(i, i2);
return mutableIntIntMap;
}
public static final IntIntMap intIntMapOf(int i, int i2, int i3, int i4) {
MutableIntIntMap mutableIntIntMap = new MutableIntIntMap(0, 1, null);
mutableIntIntMap.set(i, i2);
mutableIntIntMap.set(i3, i4);
return mutableIntIntMap;
}
public static final IntIntMap intIntMapOf(int i, int i2, int i3, int i4, int i5, int i6) {
MutableIntIntMap mutableIntIntMap = new MutableIntIntMap(0, 1, null);
mutableIntIntMap.set(i, i2);
mutableIntIntMap.set(i3, i4);
mutableIntIntMap.set(i5, i6);
return mutableIntIntMap;
}
public static final IntIntMap intIntMapOf(int i, int i2, int i3, int i4, int i5, int i6, int i7, int i8) {
MutableIntIntMap mutableIntIntMap = new MutableIntIntMap(0, 1, null);
mutableIntIntMap.set(i, i2);
mutableIntIntMap.set(i3, i4);
mutableIntIntMap.set(i5, i6);
mutableIntIntMap.set(i7, i8);
return mutableIntIntMap;
}
public static final IntIntMap intIntMapOf(int i, int i2, int i3, int i4, int i5, int i6, int i7, int i8, int i9, int i10) {
MutableIntIntMap mutableIntIntMap = new MutableIntIntMap(0, 1, null);
mutableIntIntMap.set(i, i2);
mutableIntIntMap.set(i3, i4);
mutableIntIntMap.set(i5, i6);
mutableIntIntMap.set(i7, i8);
mutableIntIntMap.set(i9, i10);
return mutableIntIntMap;
}
public static final MutableIntIntMap mutableIntIntMapOf() {
return new MutableIntIntMap(0, 1, null);
}
public static final MutableIntIntMap mutableIntIntMapOf(int i, int i2) {
MutableIntIntMap mutableIntIntMap = new MutableIntIntMap(0, 1, null);
mutableIntIntMap.set(i, i2);
return mutableIntIntMap;
}
public static final MutableIntIntMap mutableIntIntMapOf(int i, int i2, int i3, int i4) {
MutableIntIntMap mutableIntIntMap = new MutableIntIntMap(0, 1, null);
mutableIntIntMap.set(i, i2);
mutableIntIntMap.set(i3, i4);
return mutableIntIntMap;
}
public static final MutableIntIntMap mutableIntIntMapOf(int i, int i2, int i3, int i4, int i5, int i6) {
MutableIntIntMap mutableIntIntMap = new MutableIntIntMap(0, 1, null);
mutableIntIntMap.set(i, i2);
mutableIntIntMap.set(i3, i4);
mutableIntIntMap.set(i5, i6);
return mutableIntIntMap;
}
public static final MutableIntIntMap mutableIntIntMapOf(int i, int i2, int i3, int i4, int i5, int i6, int i7, int i8) {
MutableIntIntMap mutableIntIntMap = new MutableIntIntMap(0, 1, null);
mutableIntIntMap.set(i, i2);
mutableIntIntMap.set(i3, i4);
mutableIntIntMap.set(i5, i6);
mutableIntIntMap.set(i7, i8);
return mutableIntIntMap;
}
public static final MutableIntIntMap mutableIntIntMapOf(int i, int i2, int i3, int i4, int i5, int i6, int i7, int i8, int i9, int i10) {
MutableIntIntMap mutableIntIntMap = new MutableIntIntMap(0, 1, null);
mutableIntIntMap.set(i, i2);
mutableIntIntMap.set(i3, i4);
mutableIntIntMap.set(i5, i6);
mutableIntIntMap.set(i7, i8);
mutableIntIntMap.set(i9, i10);
return mutableIntIntMap;
}
}

View File

@@ -0,0 +1,88 @@
package androidx.collection;
import kotlin.jvm.internal.SourceDebugExtension;
@SourceDebugExtension({"SMAP\nIntIntPair.kt\nKotlin\n*S Kotlin\n*F\n+ 1 IntIntPair.kt\nandroidx/collection/IntIntPair\n+ 2 PackingUtils.kt\nandroidx/collection/PackingUtilsKt\n*L\n1#1,83:1\n33#2:84\n*S KotlinDebug\n*F\n+ 1 IntIntPair.kt\nandroidx/collection/IntIntPair\n*L\n41#1:84\n*E\n"})
/* loaded from: classes.dex */
public final class IntIntPair {
public final long packedValue;
/* renamed from: box-impl, reason: not valid java name */
public static final /* synthetic */ IntIntPair m22boximpl(long j) {
return new IntIntPair(j);
}
/* renamed from: component1-impl, reason: not valid java name */
public static final int m23component1impl(long j) {
return (int) (j >> 32);
}
/* renamed from: component2-impl, reason: not valid java name */
public static final int m24component2impl(long j) {
return (int) (j & 4294967295L);
}
/* renamed from: constructor-impl, reason: not valid java name */
public static long m26constructorimpl(long j) {
return j;
}
/* renamed from: equals-impl, reason: not valid java name */
public static boolean m27equalsimpl(long j, Object obj) {
return (obj instanceof IntIntPair) && j == ((IntIntPair) obj).m33unboximpl();
}
/* renamed from: equals-impl0, reason: not valid java name */
public static final boolean m28equalsimpl0(long j, long j2) {
return j == j2;
}
/* renamed from: getFirst-impl, reason: not valid java name */
public static final int m29getFirstimpl(long j) {
return (int) (j >> 32);
}
public static /* synthetic */ void getPackedValue$annotations() {
}
/* renamed from: getSecond-impl, reason: not valid java name */
public static final int m30getSecondimpl(long j) {
return (int) (j & 4294967295L);
}
/* renamed from: hashCode-impl, reason: not valid java name */
public static int m31hashCodeimpl(long j) {
return Long.hashCode(j);
}
public boolean equals(Object obj) {
return m27equalsimpl(this.packedValue, obj);
}
public int hashCode() {
return m31hashCodeimpl(this.packedValue);
}
/* renamed from: unbox-impl, reason: not valid java name */
public final /* synthetic */ long m33unboximpl() {
return this.packedValue;
}
private /* synthetic */ IntIntPair(long j) {
this.packedValue = j;
}
/* renamed from: constructor-impl, reason: not valid java name */
public static long m25constructorimpl(int i, int i2) {
return m26constructorimpl((i2 & 4294967295L) | (i << 32));
}
/* renamed from: toString-impl, reason: not valid java name */
public static String m32toStringimpl(long j) {
return '(' + m29getFirstimpl(j) + ", " + m30getSecondimpl(j) + ')';
}
public String toString() {
return m32toStringimpl(this.packedValue);
}
}

View File

@@ -0,0 +1,715 @@
package androidx.collection;
import androidx.annotation.IntRange;
import com.ironsource.v8;
import java.util.NoSuchElementException;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.functions.Function3;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlin.ranges.RangesKt___RangesKt;
@SourceDebugExtension({"SMAP\nIntList.kt\nKotlin\n*S Kotlin\n*F\n+ 1 IntList.kt\nandroidx/collection/IntList\n*L\n1#1,969:1\n253#1,6:970\n279#1,6:976\n253#1,6:982\n75#1:988\n253#1,6:989\n253#1,6:995\n253#1,6:1001\n266#1,6:1007\n279#1,6:1013\n293#1,6:1019\n70#1:1025\n70#1:1026\n266#1,6:1027\n266#1,6:1033\n293#1,6:1039\n70#1:1045\n279#1,6:1046\n293#1,6:1052\n266#1,6:1058\n266#1,6:1064\n253#1,6:1070\n75#1:1076\n467#1,10:1077\n266#1,4:1087\n477#1,9:1091\n271#1:1100\n486#1,2:1101\n467#1,10:1103\n266#1,4:1113\n477#1,9:1117\n271#1:1126\n486#1,2:1127\n467#1,10:1129\n266#1,4:1139\n477#1,9:1143\n271#1:1152\n486#1,2:1153\n467#1,10:1155\n266#1,4:1165\n477#1,9:1169\n271#1:1178\n486#1,2:1179\n467#1,10:1181\n266#1,4:1191\n477#1,9:1195\n271#1:1204\n486#1,2:1205\n*S KotlinDebug\n*F\n+ 1 IntList.kt\nandroidx/collection/IntList\n*L\n96#1:970,6\n110#1:976,6\n122#1:982,6\n135#1:988\n153#1:989,6\n175#1:995,6\n192#1:1001,6\n208#1:1007,6\n225#1:1013,6\n241#1:1019,6\n306#1:1025\n317#1:1026\n343#1:1027,6\n357#1:1033,6\n371#1:1039,6\n397#1:1045\n407#1:1046,6\n420#1:1052,6\n445#1:1058,6\n476#1:1064,6\n494#1:1070,6\n510#1:1076\n-1#1:1077,10\n-1#1:1087,4\n-1#1:1091,9\n-1#1:1100\n-1#1:1101,2\n-1#1:1103,10\n-1#1:1113,4\n-1#1:1117,9\n-1#1:1126\n-1#1:1127,2\n-1#1:1129,10\n-1#1:1139,4\n-1#1:1143,9\n-1#1:1152\n-1#1:1153,2\n-1#1:1155,10\n-1#1:1165,4\n-1#1:1169,9\n-1#1:1178\n-1#1:1179,2\n-1#1:1181,10\n-1#1:1191,4\n-1#1:1195,9\n-1#1:1204\n-1#1:1205,2\n*E\n"})
/* loaded from: classes.dex */
public abstract class IntList {
public int _size;
public int[] content;
public /* synthetic */ IntList(int i, DefaultConstructorMarker defaultConstructorMarker) {
this(i);
}
public static /* synthetic */ void getContent$annotations() {
}
public static /* synthetic */ void get_size$annotations() {
}
public final int count() {
return this._size;
}
@IntRange(from = -1)
public final int getLastIndex() {
return this._size - 1;
}
@IntRange(from = 0)
public final int getSize() {
return this._size;
}
public final boolean isEmpty() {
return this._size == 0;
}
public final boolean isNotEmpty() {
return this._size != 0;
}
public final String joinToString() {
return joinToString$default(this, null, null, null, 0, null, 31, null);
}
public final String joinToString(CharSequence separator) {
Intrinsics.checkNotNullParameter(separator, "separator");
return joinToString$default(this, separator, null, null, 0, null, 30, null);
}
public final String joinToString(CharSequence separator, CharSequence prefix) {
Intrinsics.checkNotNullParameter(separator, "separator");
Intrinsics.checkNotNullParameter(prefix, "prefix");
return joinToString$default(this, separator, prefix, null, 0, null, 28, null);
}
public final String joinToString(CharSequence separator, CharSequence prefix, CharSequence postfix) {
Intrinsics.checkNotNullParameter(separator, "separator");
Intrinsics.checkNotNullParameter(prefix, "prefix");
Intrinsics.checkNotNullParameter(postfix, "postfix");
return joinToString$default(this, separator, prefix, postfix, 0, null, 24, null);
}
public final String joinToString(CharSequence separator, CharSequence prefix, CharSequence postfix, int i) {
Intrinsics.checkNotNullParameter(separator, "separator");
Intrinsics.checkNotNullParameter(prefix, "prefix");
Intrinsics.checkNotNullParameter(postfix, "postfix");
return joinToString$default(this, separator, prefix, postfix, i, null, 16, null);
}
private IntList(int i) {
int[] iArr;
if (i == 0) {
iArr = IntSetKt.getEmptyIntArray();
} else {
iArr = new int[i];
}
this.content = iArr;
}
public final boolean containsAll(IntList elements) {
kotlin.ranges.IntRange until;
Intrinsics.checkNotNullParameter(elements, "elements");
until = RangesKt___RangesKt.until(0, elements._size);
int first = until.getFirst();
int last = until.getLast();
if (first > last) {
return true;
}
while (contains(elements.get(first))) {
if (first == last) {
return true;
}
first++;
}
return false;
}
public final kotlin.ranges.IntRange getIndices() {
kotlin.ranges.IntRange until;
until = RangesKt___RangesKt.until(0, this._size);
return until;
}
public final boolean none() {
return isEmpty();
}
public final boolean any() {
return isNotEmpty();
}
public final int first() {
if (isEmpty()) {
throw new NoSuchElementException("IntList is empty.");
}
return this.content[0];
}
public final boolean any(Function1 predicate) {
Intrinsics.checkNotNullParameter(predicate, "predicate");
int[] iArr = this.content;
int i = this._size;
for (int i2 = 0; i2 < i; i2++) {
if (((Boolean) predicate.invoke(Integer.valueOf(iArr[i2]))).booleanValue()) {
return true;
}
}
return false;
}
public final boolean contains(int i) {
int[] iArr = this.content;
int i2 = this._size;
for (int i3 = 0; i3 < i2; i3++) {
if (iArr[i3] == i) {
return true;
}
}
return false;
}
public final int count(Function1 predicate) {
Intrinsics.checkNotNullParameter(predicate, "predicate");
int[] iArr = this.content;
int i = this._size;
int i2 = 0;
for (int i3 = 0; i3 < i; i3++) {
if (((Boolean) predicate.invoke(Integer.valueOf(iArr[i3]))).booleanValue()) {
i2++;
}
}
return i2;
}
public final int first(Function1 predicate) {
Intrinsics.checkNotNullParameter(predicate, "predicate");
int[] iArr = this.content;
int i = this._size;
for (int i2 = 0; i2 < i; i2++) {
int i3 = iArr[i2];
if (((Boolean) predicate.invoke(Integer.valueOf(i3))).booleanValue()) {
return i3;
}
}
throw new NoSuchElementException("IntList contains no element matching the predicate.");
}
public final <R> R fold(R r, Function2 operation) {
Intrinsics.checkNotNullParameter(operation, "operation");
int[] iArr = this.content;
int i = this._size;
for (int i2 = 0; i2 < i; i2++) {
r = (R) operation.invoke(r, Integer.valueOf(iArr[i2]));
}
return r;
}
public final void forEach(Function1 block) {
Intrinsics.checkNotNullParameter(block, "block");
int[] iArr = this.content;
int i = this._size;
for (int i2 = 0; i2 < i; i2++) {
block.invoke(Integer.valueOf(iArr[i2]));
}
}
public int hashCode() {
int[] iArr = this.content;
int i = this._size;
int i2 = 0;
for (int i3 = 0; i3 < i; i3++) {
i2 += Integer.hashCode(iArr[i3]) * 31;
}
return i2;
}
public final <R> R foldIndexed(R r, Function3 operation) {
Intrinsics.checkNotNullParameter(operation, "operation");
int[] iArr = this.content;
int i = this._size;
for (int i2 = 0; i2 < i; i2++) {
R r2 = r;
r = (R) operation.invoke(Integer.valueOf(i2), r2, Integer.valueOf(iArr[i2]));
}
return r;
}
public final void forEachIndexed(Function2 block) {
Intrinsics.checkNotNullParameter(block, "block");
int[] iArr = this.content;
int i = this._size;
for (int i2 = 0; i2 < i; i2++) {
block.invoke(Integer.valueOf(i2), Integer.valueOf(iArr[i2]));
}
}
public final int indexOf(int i) {
int[] iArr = this.content;
int i2 = this._size;
for (int i3 = 0; i3 < i2; i3++) {
if (i == iArr[i3]) {
return i3;
}
}
return -1;
}
public final int indexOfFirst(Function1 predicate) {
Intrinsics.checkNotNullParameter(predicate, "predicate");
int[] iArr = this.content;
int i = this._size;
for (int i2 = 0; i2 < i; i2++) {
if (((Boolean) predicate.invoke(Integer.valueOf(iArr[i2]))).booleanValue()) {
return i2;
}
}
return -1;
}
public final <R> R foldRight(R r, Function2 operation) {
Intrinsics.checkNotNullParameter(operation, "operation");
int[] iArr = this.content;
int i = this._size;
while (true) {
i--;
if (-1 >= i) {
return r;
}
r = (R) operation.invoke(Integer.valueOf(iArr[i]), r);
}
}
public final void forEachReversed(Function1 block) {
Intrinsics.checkNotNullParameter(block, "block");
int[] iArr = this.content;
int i = this._size;
while (true) {
i--;
if (-1 >= i) {
return;
} else {
block.invoke(Integer.valueOf(iArr[i]));
}
}
}
public final int last(Function1 predicate) {
int i;
Intrinsics.checkNotNullParameter(predicate, "predicate");
int[] iArr = this.content;
int i2 = this._size;
do {
i2--;
if (-1 < i2) {
i = iArr[i2];
} else {
throw new NoSuchElementException("IntList contains no element matching the predicate.");
}
} while (!((Boolean) predicate.invoke(Integer.valueOf(i))).booleanValue());
return i;
}
public final boolean reversedAny(Function1 predicate) {
Intrinsics.checkNotNullParameter(predicate, "predicate");
int[] iArr = this.content;
for (int i = this._size - 1; -1 < i; i--) {
if (((Boolean) predicate.invoke(Integer.valueOf(iArr[i]))).booleanValue()) {
return true;
}
}
return false;
}
public final <R> R foldRightIndexed(R r, Function3 operation) {
Intrinsics.checkNotNullParameter(operation, "operation");
int[] iArr = this.content;
int i = this._size;
while (true) {
i--;
if (-1 >= i) {
return r;
}
r = (R) operation.invoke(Integer.valueOf(i), Integer.valueOf(iArr[i]), r);
}
}
public final void forEachReversedIndexed(Function2 block) {
Intrinsics.checkNotNullParameter(block, "block");
int[] iArr = this.content;
int i = this._size;
while (true) {
i--;
if (-1 >= i) {
return;
} else {
block.invoke(Integer.valueOf(i), Integer.valueOf(iArr[i]));
}
}
}
public final int indexOfLast(Function1 predicate) {
Intrinsics.checkNotNullParameter(predicate, "predicate");
int[] iArr = this.content;
int i = this._size;
do {
i--;
if (-1 >= i) {
return -1;
}
} while (!((Boolean) predicate.invoke(Integer.valueOf(iArr[i]))).booleanValue());
return i;
}
public final int lastIndexOf(int i) {
int[] iArr = this.content;
int i2 = this._size;
do {
i2--;
if (-1 >= i2) {
return -1;
}
} while (iArr[i2] != i);
return i2;
}
public final int get(@IntRange(from = 0) int i) {
if (i < 0 || i >= this._size) {
StringBuilder sb = new StringBuilder();
sb.append("Index ");
sb.append(i);
sb.append(" must be in 0..");
sb.append(this._size - 1);
throw new IndexOutOfBoundsException(sb.toString());
}
return this.content[i];
}
public final int elementAt(@IntRange(from = 0) int i) {
if (i < 0 || i >= this._size) {
StringBuilder sb = new StringBuilder();
sb.append("Index ");
sb.append(i);
sb.append(" must be in 0..");
sb.append(this._size - 1);
throw new IndexOutOfBoundsException(sb.toString());
}
return this.content[i];
}
public final int elementAtOrElse(@IntRange(from = 0) int i, Function1 defaultValue) {
Intrinsics.checkNotNullParameter(defaultValue, "defaultValue");
if (i < 0 || i >= this._size) {
return ((Number) defaultValue.invoke(Integer.valueOf(i))).intValue();
}
return this.content[i];
}
public final int last() {
if (!isEmpty()) {
return this.content[this._size - 1];
}
throw new NoSuchElementException("IntList is empty.");
}
public static /* synthetic */ String joinToString$default(IntList intList, CharSequence charSequence, CharSequence charSequence2, CharSequence charSequence3, int i, CharSequence charSequence4, int i2, Object obj) {
if (obj != null) {
throw new UnsupportedOperationException("Super calls with default arguments not supported in this target, function: joinToString");
}
if ((i2 & 1) != 0) {
charSequence = ", ";
}
CharSequence charSequence5 = (i2 & 2) != 0 ? "" : charSequence2;
CharSequence charSequence6 = (i2 & 4) == 0 ? charSequence3 : "";
if ((i2 & 8) != 0) {
i = -1;
}
int i3 = i;
if ((i2 & 16) != 0) {
charSequence4 = "...";
}
return intList.joinToString(charSequence, charSequence5, charSequence6, i3, charSequence4);
}
public final String joinToString(CharSequence separator, CharSequence prefix, CharSequence postfix, int i, CharSequence truncated) {
Intrinsics.checkNotNullParameter(separator, "separator");
Intrinsics.checkNotNullParameter(prefix, "prefix");
Intrinsics.checkNotNullParameter(postfix, "postfix");
Intrinsics.checkNotNullParameter(truncated, "truncated");
StringBuilder sb = new StringBuilder();
sb.append(prefix);
int[] iArr = this.content;
int i2 = this._size;
int i3 = 0;
while (true) {
if (i3 < i2) {
int i4 = iArr[i3];
if (i3 == i) {
sb.append(truncated);
break;
}
if (i3 != 0) {
sb.append(separator);
}
sb.append(i4);
i3++;
} else {
sb.append(postfix);
break;
}
}
String sb2 = sb.toString();
Intrinsics.checkNotNullExpressionValue(sb2, "StringBuilder().apply(builderAction).toString()");
return sb2;
}
public static /* synthetic */ String joinToString$default(IntList intList, CharSequence separator, CharSequence prefix, CharSequence postfix, int i, CharSequence truncated, Function1 transform, int i2, Object obj) {
if (obj == null) {
if ((i2 & 1) != 0) {
separator = ", ";
}
if ((i2 & 2) != 0) {
prefix = "";
}
if ((i2 & 4) != 0) {
postfix = "";
}
if ((i2 & 8) != 0) {
i = -1;
}
if ((i2 & 16) != 0) {
truncated = "...";
}
Intrinsics.checkNotNullParameter(separator, "separator");
Intrinsics.checkNotNullParameter(prefix, "prefix");
Intrinsics.checkNotNullParameter(postfix, "postfix");
Intrinsics.checkNotNullParameter(truncated, "truncated");
Intrinsics.checkNotNullParameter(transform, "transform");
StringBuilder sb = new StringBuilder();
sb.append(prefix);
int[] iArr = intList.content;
int i3 = intList._size;
int i4 = 0;
while (true) {
if (i4 < i3) {
int i5 = iArr[i4];
if (i4 == i) {
sb.append(truncated);
break;
}
if (i4 != 0) {
sb.append(separator);
}
sb.append((CharSequence) transform.invoke(Integer.valueOf(i5)));
i4++;
} else {
sb.append(postfix);
break;
}
}
String sb2 = sb.toString();
Intrinsics.checkNotNullExpressionValue(sb2, "StringBuilder().apply(builderAction).toString()");
return sb2;
}
throw new UnsupportedOperationException("Super calls with default arguments not supported in this target, function: joinToString");
}
public final String joinToString(CharSequence separator, CharSequence prefix, CharSequence postfix, int i, CharSequence truncated, Function1 transform) {
Intrinsics.checkNotNullParameter(separator, "separator");
Intrinsics.checkNotNullParameter(prefix, "prefix");
Intrinsics.checkNotNullParameter(postfix, "postfix");
Intrinsics.checkNotNullParameter(truncated, "truncated");
Intrinsics.checkNotNullParameter(transform, "transform");
StringBuilder sb = new StringBuilder();
sb.append(prefix);
int[] iArr = this.content;
int i2 = this._size;
int i3 = 0;
while (true) {
if (i3 < i2) {
int i4 = iArr[i3];
if (i3 == i) {
sb.append(truncated);
break;
}
if (i3 != 0) {
sb.append(separator);
}
sb.append((CharSequence) transform.invoke(Integer.valueOf(i4)));
i3++;
} else {
sb.append(postfix);
break;
}
}
String sb2 = sb.toString();
Intrinsics.checkNotNullExpressionValue(sb2, "StringBuilder().apply(builderAction).toString()");
return sb2;
}
public final String joinToString(CharSequence separator, CharSequence prefix, CharSequence postfix, int i, Function1 transform) {
Intrinsics.checkNotNullParameter(separator, "separator");
Intrinsics.checkNotNullParameter(prefix, "prefix");
Intrinsics.checkNotNullParameter(postfix, "postfix");
Intrinsics.checkNotNullParameter(transform, "transform");
StringBuilder sb = new StringBuilder();
sb.append(prefix);
int[] iArr = this.content;
int i2 = this._size;
int i3 = 0;
while (true) {
if (i3 < i2) {
int i4 = iArr[i3];
if (i3 == i) {
sb.append((CharSequence) "...");
break;
}
if (i3 != 0) {
sb.append(separator);
}
sb.append((CharSequence) transform.invoke(Integer.valueOf(i4)));
i3++;
} else {
sb.append(postfix);
break;
}
}
String sb2 = sb.toString();
Intrinsics.checkNotNullExpressionValue(sb2, "StringBuilder().apply(builderAction).toString()");
return sb2;
}
public final String joinToString(CharSequence separator, CharSequence prefix, CharSequence postfix, Function1 transform) {
Intrinsics.checkNotNullParameter(separator, "separator");
Intrinsics.checkNotNullParameter(prefix, "prefix");
Intrinsics.checkNotNullParameter(postfix, "postfix");
Intrinsics.checkNotNullParameter(transform, "transform");
StringBuilder sb = new StringBuilder();
sb.append(prefix);
int[] iArr = this.content;
int i = this._size;
int i2 = 0;
while (true) {
if (i2 < i) {
int i3 = iArr[i2];
if (i2 == -1) {
sb.append((CharSequence) "...");
break;
}
if (i2 != 0) {
sb.append(separator);
}
sb.append((CharSequence) transform.invoke(Integer.valueOf(i3)));
i2++;
} else {
sb.append(postfix);
break;
}
}
String sb2 = sb.toString();
Intrinsics.checkNotNullExpressionValue(sb2, "StringBuilder().apply(builderAction).toString()");
return sb2;
}
public final String joinToString(CharSequence separator, CharSequence prefix, Function1 transform) {
Intrinsics.checkNotNullParameter(separator, "separator");
Intrinsics.checkNotNullParameter(prefix, "prefix");
Intrinsics.checkNotNullParameter(transform, "transform");
StringBuilder sb = new StringBuilder();
sb.append(prefix);
int[] iArr = this.content;
int i = this._size;
int i2 = 0;
while (true) {
if (i2 < i) {
int i3 = iArr[i2];
if (i2 == -1) {
sb.append((CharSequence) "...");
break;
}
if (i2 != 0) {
sb.append(separator);
}
sb.append((CharSequence) transform.invoke(Integer.valueOf(i3)));
i2++;
} else {
sb.append((CharSequence) "");
break;
}
}
String sb2 = sb.toString();
Intrinsics.checkNotNullExpressionValue(sb2, "StringBuilder().apply(builderAction).toString()");
return sb2;
}
public final String joinToString(CharSequence separator, Function1 transform) {
Intrinsics.checkNotNullParameter(separator, "separator");
Intrinsics.checkNotNullParameter(transform, "transform");
StringBuilder sb = new StringBuilder();
sb.append((CharSequence) "");
int[] iArr = this.content;
int i = this._size;
int i2 = 0;
while (true) {
if (i2 < i) {
int i3 = iArr[i2];
if (i2 == -1) {
sb.append((CharSequence) "...");
break;
}
if (i2 != 0) {
sb.append(separator);
}
sb.append((CharSequence) transform.invoke(Integer.valueOf(i3)));
i2++;
} else {
sb.append((CharSequence) "");
break;
}
}
String sb2 = sb.toString();
Intrinsics.checkNotNullExpressionValue(sb2, "StringBuilder().apply(builderAction).toString()");
return sb2;
}
public final String joinToString(Function1 transform) {
Intrinsics.checkNotNullParameter(transform, "transform");
StringBuilder sb = new StringBuilder();
sb.append((CharSequence) "");
int[] iArr = this.content;
int i = this._size;
int i2 = 0;
while (true) {
if (i2 < i) {
int i3 = iArr[i2];
if (i2 == -1) {
sb.append((CharSequence) "...");
break;
}
if (i2 != 0) {
sb.append((CharSequence) ", ");
}
sb.append((CharSequence) transform.invoke(Integer.valueOf(i3)));
i2++;
} else {
sb.append((CharSequence) "");
break;
}
}
String sb2 = sb.toString();
Intrinsics.checkNotNullExpressionValue(sb2, "StringBuilder().apply(builderAction).toString()");
return sb2;
}
public boolean equals(Object obj) {
kotlin.ranges.IntRange until;
if (obj instanceof IntList) {
IntList intList = (IntList) obj;
int i = intList._size;
int i2 = this._size;
if (i == i2) {
int[] iArr = this.content;
int[] iArr2 = intList.content;
until = RangesKt___RangesKt.until(0, i2);
int first = until.getFirst();
int last = until.getLast();
if (first > last) {
return true;
}
while (iArr[first] == iArr2[first]) {
if (first == last) {
return true;
}
first++;
}
return false;
}
}
return false;
}
public String toString() {
return joinToString$default(this, null, v8.i.d, v8.i.e, 0, null, 25, null);
}
}

View File

@@ -0,0 +1,69 @@
package androidx.collection;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
@SourceDebugExtension({"SMAP\nIntList.kt\nKotlin\n*S Kotlin\n*F\n+ 1 IntList.kt\nandroidx/collection/IntListKt\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n+ 3 IntList.kt\nandroidx/collection/MutableIntList\n*L\n1#1,969:1\n1#2:970\n713#3,2:971\n713#3,2:973\n713#3,2:975\n713#3,2:977\n713#3,2:979\n713#3,2:981\n*S KotlinDebug\n*F\n+ 1 IntList.kt\nandroidx/collection/IntListKt\n*L\n938#1:971,2\n947#1:973,2\n948#1:975,2\n958#1:977,2\n959#1:979,2\n960#1:981,2\n*E\n"})
/* loaded from: classes.dex */
public final class IntListKt {
private static final IntList EmptyIntList = new MutableIntList(0);
public static final IntList emptyIntList() {
return EmptyIntList;
}
public static final IntList intListOf() {
return EmptyIntList;
}
public static final IntList intListOf(int i) {
return mutableIntListOf(i);
}
public static final IntList intListOf(int i, int i2) {
return mutableIntListOf(i, i2);
}
public static final IntList intListOf(int i, int i2, int i3) {
return mutableIntListOf(i, i2, i3);
}
public static final IntList intListOf(int... elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
MutableIntList mutableIntList = new MutableIntList(elements.length);
mutableIntList.plusAssign(elements);
return mutableIntList;
}
public static final MutableIntList mutableIntListOf() {
return new MutableIntList(0, 1, null);
}
public static final MutableIntList mutableIntListOf(int i) {
MutableIntList mutableIntList = new MutableIntList(1);
mutableIntList.add(i);
return mutableIntList;
}
public static final MutableIntList mutableIntListOf(int i, int i2) {
MutableIntList mutableIntList = new MutableIntList(2);
mutableIntList.add(i);
mutableIntList.add(i2);
return mutableIntList;
}
public static final MutableIntList mutableIntListOf(int i, int i2, int i3) {
MutableIntList mutableIntList = new MutableIntList(3);
mutableIntList.add(i);
mutableIntList.add(i2);
mutableIntList.add(i3);
return mutableIntList;
}
public static final MutableIntList mutableIntListOf(int... elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
MutableIntList mutableIntList = new MutableIntList(elements.length);
mutableIntList.plusAssign(elements);
return mutableIntList;
}
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,98 @@
package androidx.collection;
/* loaded from: classes.dex */
public final class IntLongMapKt {
private static final MutableIntLongMap EmptyIntLongMap = new MutableIntLongMap(0);
public static final IntLongMap emptyIntLongMap() {
return EmptyIntLongMap;
}
public static final IntLongMap intLongMapOf() {
return EmptyIntLongMap;
}
public static final IntLongMap intLongMapOf(int i, long j) {
MutableIntLongMap mutableIntLongMap = new MutableIntLongMap(0, 1, null);
mutableIntLongMap.set(i, j);
return mutableIntLongMap;
}
public static final IntLongMap intLongMapOf(int i, long j, int i2, long j2) {
MutableIntLongMap mutableIntLongMap = new MutableIntLongMap(0, 1, null);
mutableIntLongMap.set(i, j);
mutableIntLongMap.set(i2, j2);
return mutableIntLongMap;
}
public static final IntLongMap intLongMapOf(int i, long j, int i2, long j2, int i3, long j3) {
MutableIntLongMap mutableIntLongMap = new MutableIntLongMap(0, 1, null);
mutableIntLongMap.set(i, j);
mutableIntLongMap.set(i2, j2);
mutableIntLongMap.set(i3, j3);
return mutableIntLongMap;
}
public static final IntLongMap intLongMapOf(int i, long j, int i2, long j2, int i3, long j3, int i4, long j4) {
MutableIntLongMap mutableIntLongMap = new MutableIntLongMap(0, 1, null);
mutableIntLongMap.set(i, j);
mutableIntLongMap.set(i2, j2);
mutableIntLongMap.set(i3, j3);
mutableIntLongMap.set(i4, j4);
return mutableIntLongMap;
}
public static final IntLongMap intLongMapOf(int i, long j, int i2, long j2, int i3, long j3, int i4, long j4, int i5, long j5) {
MutableIntLongMap mutableIntLongMap = new MutableIntLongMap(0, 1, null);
mutableIntLongMap.set(i, j);
mutableIntLongMap.set(i2, j2);
mutableIntLongMap.set(i3, j3);
mutableIntLongMap.set(i4, j4);
mutableIntLongMap.set(i5, j5);
return mutableIntLongMap;
}
public static final MutableIntLongMap mutableIntLongMapOf() {
return new MutableIntLongMap(0, 1, null);
}
public static final MutableIntLongMap mutableIntLongMapOf(int i, long j) {
MutableIntLongMap mutableIntLongMap = new MutableIntLongMap(0, 1, null);
mutableIntLongMap.set(i, j);
return mutableIntLongMap;
}
public static final MutableIntLongMap mutableIntLongMapOf(int i, long j, int i2, long j2) {
MutableIntLongMap mutableIntLongMap = new MutableIntLongMap(0, 1, null);
mutableIntLongMap.set(i, j);
mutableIntLongMap.set(i2, j2);
return mutableIntLongMap;
}
public static final MutableIntLongMap mutableIntLongMapOf(int i, long j, int i2, long j2, int i3, long j3) {
MutableIntLongMap mutableIntLongMap = new MutableIntLongMap(0, 1, null);
mutableIntLongMap.set(i, j);
mutableIntLongMap.set(i2, j2);
mutableIntLongMap.set(i3, j3);
return mutableIntLongMap;
}
public static final MutableIntLongMap mutableIntLongMapOf(int i, long j, int i2, long j2, int i3, long j3, int i4, long j4) {
MutableIntLongMap mutableIntLongMap = new MutableIntLongMap(0, 1, null);
mutableIntLongMap.set(i, j);
mutableIntLongMap.set(i2, j2);
mutableIntLongMap.set(i3, j3);
mutableIntLongMap.set(i4, j4);
return mutableIntLongMap;
}
public static final MutableIntLongMap mutableIntLongMapOf(int i, long j, int i2, long j2, int i3, long j3, int i4, long j4, int i5, long j5) {
MutableIntLongMap mutableIntLongMap = new MutableIntLongMap(0, 1, null);
mutableIntLongMap.set(i, j);
mutableIntLongMap.set(i2, j2);
mutableIntLongMap.set(i3, j3);
mutableIntLongMap.set(i4, j4);
mutableIntLongMap.set(i5, j5);
return mutableIntLongMap;
}
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,104 @@
package androidx.collection;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes.dex */
public final class IntObjectMapKt {
private static final MutableIntObjectMap EmptyIntObjectMap = new MutableIntObjectMap(0);
public static final <V> IntObjectMap<V> emptyIntObjectMap() {
MutableIntObjectMap mutableIntObjectMap = EmptyIntObjectMap;
Intrinsics.checkNotNull(mutableIntObjectMap, "null cannot be cast to non-null type androidx.collection.IntObjectMap<V of androidx.collection.IntObjectMapKt.emptyIntObjectMap>");
return mutableIntObjectMap;
}
public static final <V> IntObjectMap<V> intObjectMapOf() {
MutableIntObjectMap mutableIntObjectMap = EmptyIntObjectMap;
Intrinsics.checkNotNull(mutableIntObjectMap, "null cannot be cast to non-null type androidx.collection.IntObjectMap<V of androidx.collection.IntObjectMapKt.intObjectMapOf>");
return mutableIntObjectMap;
}
public static final <V> IntObjectMap<V> intObjectMapOf(int i, V v) {
MutableIntObjectMap mutableIntObjectMap = new MutableIntObjectMap(0, 1, null);
mutableIntObjectMap.set(i, v);
return mutableIntObjectMap;
}
public static final <V> IntObjectMap<V> intObjectMapOf(int i, V v, int i2, V v2) {
MutableIntObjectMap mutableIntObjectMap = new MutableIntObjectMap(0, 1, null);
mutableIntObjectMap.set(i, v);
mutableIntObjectMap.set(i2, v2);
return mutableIntObjectMap;
}
public static final <V> IntObjectMap<V> intObjectMapOf(int i, V v, int i2, V v2, int i3, V v3) {
MutableIntObjectMap mutableIntObjectMap = new MutableIntObjectMap(0, 1, null);
mutableIntObjectMap.set(i, v);
mutableIntObjectMap.set(i2, v2);
mutableIntObjectMap.set(i3, v3);
return mutableIntObjectMap;
}
public static final <V> IntObjectMap<V> intObjectMapOf(int i, V v, int i2, V v2, int i3, V v3, int i4, V v4) {
MutableIntObjectMap mutableIntObjectMap = new MutableIntObjectMap(0, 1, null);
mutableIntObjectMap.set(i, v);
mutableIntObjectMap.set(i2, v2);
mutableIntObjectMap.set(i3, v3);
mutableIntObjectMap.set(i4, v4);
return mutableIntObjectMap;
}
public static final <V> IntObjectMap<V> intObjectMapOf(int i, V v, int i2, V v2, int i3, V v3, int i4, V v4, int i5, V v5) {
MutableIntObjectMap mutableIntObjectMap = new MutableIntObjectMap(0, 1, null);
mutableIntObjectMap.set(i, v);
mutableIntObjectMap.set(i2, v2);
mutableIntObjectMap.set(i3, v3);
mutableIntObjectMap.set(i4, v4);
mutableIntObjectMap.set(i5, v5);
return mutableIntObjectMap;
}
public static final <V> MutableIntObjectMap<V> mutableIntObjectMapOf() {
return new MutableIntObjectMap<>(0, 1, null);
}
public static final <V> MutableIntObjectMap<V> mutableIntObjectMapOf(int i, V v) {
MutableIntObjectMap<V> mutableIntObjectMap = new MutableIntObjectMap<>(0, 1, null);
mutableIntObjectMap.set(i, v);
return mutableIntObjectMap;
}
public static final <V> MutableIntObjectMap<V> mutableIntObjectMapOf(int i, V v, int i2, V v2) {
MutableIntObjectMap<V> mutableIntObjectMap = new MutableIntObjectMap<>(0, 1, null);
mutableIntObjectMap.set(i, v);
mutableIntObjectMap.set(i2, v2);
return mutableIntObjectMap;
}
public static final <V> MutableIntObjectMap<V> mutableIntObjectMapOf(int i, V v, int i2, V v2, int i3, V v3) {
MutableIntObjectMap<V> mutableIntObjectMap = new MutableIntObjectMap<>(0, 1, null);
mutableIntObjectMap.set(i, v);
mutableIntObjectMap.set(i2, v2);
mutableIntObjectMap.set(i3, v3);
return mutableIntObjectMap;
}
public static final <V> MutableIntObjectMap<V> mutableIntObjectMapOf(int i, V v, int i2, V v2, int i3, V v3, int i4, V v4) {
MutableIntObjectMap<V> mutableIntObjectMap = new MutableIntObjectMap<>(0, 1, null);
mutableIntObjectMap.set(i, v);
mutableIntObjectMap.set(i2, v2);
mutableIntObjectMap.set(i3, v3);
mutableIntObjectMap.set(i4, v4);
return mutableIntObjectMap;
}
public static final <V> MutableIntObjectMap<V> mutableIntObjectMapOf(int i, V v, int i2, V v2, int i3, V v3, int i4, V v4, int i5, V v5) {
MutableIntObjectMap<V> mutableIntObjectMap = new MutableIntObjectMap<>(0, 1, null);
mutableIntObjectMap.set(i, v);
mutableIntObjectMap.set(i2, v2);
mutableIntObjectMap.set(i3, v3);
mutableIntObjectMap.set(i4, v4);
mutableIntObjectMap.set(i5, v5);
return mutableIntObjectMap;
}
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,79 @@
package androidx.collection;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
@SourceDebugExtension({"SMAP\nIntSet.kt\nKotlin\n*S Kotlin\n*F\n+ 1 IntSet.kt\nandroidx/collection/IntSetKt\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,853:1\n1#2:854\n*E\n"})
/* loaded from: classes.dex */
public final class IntSetKt {
private static final MutableIntSet EmptyIntSet = new MutableIntSet(0);
private static final int[] EmptyIntArray = new int[0];
public static final IntSet emptyIntSet() {
return EmptyIntSet;
}
public static final int[] getEmptyIntArray() {
return EmptyIntArray;
}
public static final IntSet intSetOf() {
return EmptyIntSet;
}
public static final IntSet intSetOf(int i) {
return mutableIntSetOf(i);
}
public static final IntSet intSetOf(int i, int i2) {
return mutableIntSetOf(i, i2);
}
public static final IntSet intSetOf(int i, int i2, int i3) {
return mutableIntSetOf(i, i2, i3);
}
public static final IntSet intSetOf(int... elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
MutableIntSet mutableIntSet = new MutableIntSet(elements.length);
mutableIntSet.plusAssign(elements);
return mutableIntSet;
}
public static final MutableIntSet mutableIntSetOf() {
return new MutableIntSet(0, 1, null);
}
public static final MutableIntSet mutableIntSetOf(int i) {
MutableIntSet mutableIntSet = new MutableIntSet(1);
mutableIntSet.plusAssign(i);
return mutableIntSet;
}
public static final MutableIntSet mutableIntSetOf(int i, int i2) {
MutableIntSet mutableIntSet = new MutableIntSet(2);
mutableIntSet.plusAssign(i);
mutableIntSet.plusAssign(i2);
return mutableIntSet;
}
public static final MutableIntSet mutableIntSetOf(int i, int i2, int i3) {
MutableIntSet mutableIntSet = new MutableIntSet(3);
mutableIntSet.plusAssign(i);
mutableIntSet.plusAssign(i2);
mutableIntSet.plusAssign(i3);
return mutableIntSet;
}
public static final MutableIntSet mutableIntSetOf(int... elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
MutableIntSet mutableIntSet = new MutableIntSet(elements.length);
mutableIntSet.plusAssign(elements);
return mutableIntSet;
}
public static final int hash(int i) {
int hashCode = Integer.hashCode(i) * ScatterMapKt.MurmurHashC1;
return hashCode ^ (hashCode << 16);
}
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,98 @@
package androidx.collection;
/* loaded from: classes.dex */
public final class LongFloatMapKt {
private static final MutableLongFloatMap EmptyLongFloatMap = new MutableLongFloatMap(0);
public static final LongFloatMap emptyLongFloatMap() {
return EmptyLongFloatMap;
}
public static final LongFloatMap longFloatMapOf() {
return EmptyLongFloatMap;
}
public static final LongFloatMap longFloatMapOf(long j, float f) {
MutableLongFloatMap mutableLongFloatMap = new MutableLongFloatMap(0, 1, null);
mutableLongFloatMap.set(j, f);
return mutableLongFloatMap;
}
public static final LongFloatMap longFloatMapOf(long j, float f, long j2, float f2) {
MutableLongFloatMap mutableLongFloatMap = new MutableLongFloatMap(0, 1, null);
mutableLongFloatMap.set(j, f);
mutableLongFloatMap.set(j2, f2);
return mutableLongFloatMap;
}
public static final LongFloatMap longFloatMapOf(long j, float f, long j2, float f2, long j3, float f3) {
MutableLongFloatMap mutableLongFloatMap = new MutableLongFloatMap(0, 1, null);
mutableLongFloatMap.set(j, f);
mutableLongFloatMap.set(j2, f2);
mutableLongFloatMap.set(j3, f3);
return mutableLongFloatMap;
}
public static final LongFloatMap longFloatMapOf(long j, float f, long j2, float f2, long j3, float f3, long j4, float f4) {
MutableLongFloatMap mutableLongFloatMap = new MutableLongFloatMap(0, 1, null);
mutableLongFloatMap.set(j, f);
mutableLongFloatMap.set(j2, f2);
mutableLongFloatMap.set(j3, f3);
mutableLongFloatMap.set(j4, f4);
return mutableLongFloatMap;
}
public static final LongFloatMap longFloatMapOf(long j, float f, long j2, float f2, long j3, float f3, long j4, float f4, long j5, float f5) {
MutableLongFloatMap mutableLongFloatMap = new MutableLongFloatMap(0, 1, null);
mutableLongFloatMap.set(j, f);
mutableLongFloatMap.set(j2, f2);
mutableLongFloatMap.set(j3, f3);
mutableLongFloatMap.set(j4, f4);
mutableLongFloatMap.set(j5, f5);
return mutableLongFloatMap;
}
public static final MutableLongFloatMap mutableLongFloatMapOf() {
return new MutableLongFloatMap(0, 1, null);
}
public static final MutableLongFloatMap mutableLongFloatMapOf(long j, float f) {
MutableLongFloatMap mutableLongFloatMap = new MutableLongFloatMap(0, 1, null);
mutableLongFloatMap.set(j, f);
return mutableLongFloatMap;
}
public static final MutableLongFloatMap mutableLongFloatMapOf(long j, float f, long j2, float f2) {
MutableLongFloatMap mutableLongFloatMap = new MutableLongFloatMap(0, 1, null);
mutableLongFloatMap.set(j, f);
mutableLongFloatMap.set(j2, f2);
return mutableLongFloatMap;
}
public static final MutableLongFloatMap mutableLongFloatMapOf(long j, float f, long j2, float f2, long j3, float f3) {
MutableLongFloatMap mutableLongFloatMap = new MutableLongFloatMap(0, 1, null);
mutableLongFloatMap.set(j, f);
mutableLongFloatMap.set(j2, f2);
mutableLongFloatMap.set(j3, f3);
return mutableLongFloatMap;
}
public static final MutableLongFloatMap mutableLongFloatMapOf(long j, float f, long j2, float f2, long j3, float f3, long j4, float f4) {
MutableLongFloatMap mutableLongFloatMap = new MutableLongFloatMap(0, 1, null);
mutableLongFloatMap.set(j, f);
mutableLongFloatMap.set(j2, f2);
mutableLongFloatMap.set(j3, f3);
mutableLongFloatMap.set(j4, f4);
return mutableLongFloatMap;
}
public static final MutableLongFloatMap mutableLongFloatMapOf(long j, float f, long j2, float f2, long j3, float f3, long j4, float f4, long j5, float f5) {
MutableLongFloatMap mutableLongFloatMap = new MutableLongFloatMap(0, 1, null);
mutableLongFloatMap.set(j, f);
mutableLongFloatMap.set(j2, f2);
mutableLongFloatMap.set(j3, f3);
mutableLongFloatMap.set(j4, f4);
mutableLongFloatMap.set(j5, f5);
return mutableLongFloatMap;
}
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,98 @@
package androidx.collection;
/* loaded from: classes.dex */
public final class LongIntMapKt {
private static final MutableLongIntMap EmptyLongIntMap = new MutableLongIntMap(0);
public static final LongIntMap emptyLongIntMap() {
return EmptyLongIntMap;
}
public static final LongIntMap longIntMapOf() {
return EmptyLongIntMap;
}
public static final LongIntMap longIntMapOf(long j, int i) {
MutableLongIntMap mutableLongIntMap = new MutableLongIntMap(0, 1, null);
mutableLongIntMap.set(j, i);
return mutableLongIntMap;
}
public static final LongIntMap longIntMapOf(long j, int i, long j2, int i2) {
MutableLongIntMap mutableLongIntMap = new MutableLongIntMap(0, 1, null);
mutableLongIntMap.set(j, i);
mutableLongIntMap.set(j2, i2);
return mutableLongIntMap;
}
public static final LongIntMap longIntMapOf(long j, int i, long j2, int i2, long j3, int i3) {
MutableLongIntMap mutableLongIntMap = new MutableLongIntMap(0, 1, null);
mutableLongIntMap.set(j, i);
mutableLongIntMap.set(j2, i2);
mutableLongIntMap.set(j3, i3);
return mutableLongIntMap;
}
public static final LongIntMap longIntMapOf(long j, int i, long j2, int i2, long j3, int i3, long j4, int i4) {
MutableLongIntMap mutableLongIntMap = new MutableLongIntMap(0, 1, null);
mutableLongIntMap.set(j, i);
mutableLongIntMap.set(j2, i2);
mutableLongIntMap.set(j3, i3);
mutableLongIntMap.set(j4, i4);
return mutableLongIntMap;
}
public static final LongIntMap longIntMapOf(long j, int i, long j2, int i2, long j3, int i3, long j4, int i4, long j5, int i5) {
MutableLongIntMap mutableLongIntMap = new MutableLongIntMap(0, 1, null);
mutableLongIntMap.set(j, i);
mutableLongIntMap.set(j2, i2);
mutableLongIntMap.set(j3, i3);
mutableLongIntMap.set(j4, i4);
mutableLongIntMap.set(j5, i5);
return mutableLongIntMap;
}
public static final MutableLongIntMap mutableLongIntMapOf() {
return new MutableLongIntMap(0, 1, null);
}
public static final MutableLongIntMap mutableLongIntMapOf(long j, int i) {
MutableLongIntMap mutableLongIntMap = new MutableLongIntMap(0, 1, null);
mutableLongIntMap.set(j, i);
return mutableLongIntMap;
}
public static final MutableLongIntMap mutableLongIntMapOf(long j, int i, long j2, int i2) {
MutableLongIntMap mutableLongIntMap = new MutableLongIntMap(0, 1, null);
mutableLongIntMap.set(j, i);
mutableLongIntMap.set(j2, i2);
return mutableLongIntMap;
}
public static final MutableLongIntMap mutableLongIntMapOf(long j, int i, long j2, int i2, long j3, int i3) {
MutableLongIntMap mutableLongIntMap = new MutableLongIntMap(0, 1, null);
mutableLongIntMap.set(j, i);
mutableLongIntMap.set(j2, i2);
mutableLongIntMap.set(j3, i3);
return mutableLongIntMap;
}
public static final MutableLongIntMap mutableLongIntMapOf(long j, int i, long j2, int i2, long j3, int i3, long j4, int i4) {
MutableLongIntMap mutableLongIntMap = new MutableLongIntMap(0, 1, null);
mutableLongIntMap.set(j, i);
mutableLongIntMap.set(j2, i2);
mutableLongIntMap.set(j3, i3);
mutableLongIntMap.set(j4, i4);
return mutableLongIntMap;
}
public static final MutableLongIntMap mutableLongIntMapOf(long j, int i, long j2, int i2, long j3, int i3, long j4, int i4, long j5, int i5) {
MutableLongIntMap mutableLongIntMap = new MutableLongIntMap(0, 1, null);
mutableLongIntMap.set(j, i);
mutableLongIntMap.set(j2, i2);
mutableLongIntMap.set(j3, i3);
mutableLongIntMap.set(j4, i4);
mutableLongIntMap.set(j5, i5);
return mutableLongIntMap;
}
}

View File

@@ -0,0 +1,715 @@
package androidx.collection;
import androidx.annotation.IntRange;
import com.ironsource.v8;
import java.util.NoSuchElementException;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.functions.Function3;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlin.ranges.RangesKt___RangesKt;
@SourceDebugExtension({"SMAP\nLongList.kt\nKotlin\n*S Kotlin\n*F\n+ 1 LongList.kt\nandroidx/collection/LongList\n*L\n1#1,969:1\n253#1,6:970\n279#1,6:976\n253#1,6:982\n75#1:988\n253#1,6:989\n253#1,6:995\n253#1,6:1001\n266#1,6:1007\n279#1,6:1013\n293#1,6:1019\n70#1:1025\n70#1:1026\n266#1,6:1027\n266#1,6:1033\n293#1,6:1039\n70#1:1045\n279#1,6:1046\n293#1,6:1052\n266#1,6:1058\n266#1,6:1064\n253#1,6:1070\n75#1:1076\n467#1,10:1077\n266#1,4:1087\n477#1,9:1091\n271#1:1100\n486#1,2:1101\n467#1,10:1103\n266#1,4:1113\n477#1,9:1117\n271#1:1126\n486#1,2:1127\n467#1,10:1129\n266#1,4:1139\n477#1,9:1143\n271#1:1152\n486#1,2:1153\n467#1,10:1155\n266#1,4:1165\n477#1,9:1169\n271#1:1178\n486#1,2:1179\n467#1,10:1181\n266#1,4:1191\n477#1,9:1195\n271#1:1204\n486#1,2:1205\n*S KotlinDebug\n*F\n+ 1 LongList.kt\nandroidx/collection/LongList\n*L\n96#1:970,6\n110#1:976,6\n122#1:982,6\n135#1:988\n153#1:989,6\n175#1:995,6\n192#1:1001,6\n208#1:1007,6\n225#1:1013,6\n241#1:1019,6\n306#1:1025\n317#1:1026\n343#1:1027,6\n357#1:1033,6\n371#1:1039,6\n397#1:1045\n407#1:1046,6\n420#1:1052,6\n445#1:1058,6\n476#1:1064,6\n494#1:1070,6\n510#1:1076\n-1#1:1077,10\n-1#1:1087,4\n-1#1:1091,9\n-1#1:1100\n-1#1:1101,2\n-1#1:1103,10\n-1#1:1113,4\n-1#1:1117,9\n-1#1:1126\n-1#1:1127,2\n-1#1:1129,10\n-1#1:1139,4\n-1#1:1143,9\n-1#1:1152\n-1#1:1153,2\n-1#1:1155,10\n-1#1:1165,4\n-1#1:1169,9\n-1#1:1178\n-1#1:1179,2\n-1#1:1181,10\n-1#1:1191,4\n-1#1:1195,9\n-1#1:1204\n-1#1:1205,2\n*E\n"})
/* loaded from: classes.dex */
public abstract class LongList {
public int _size;
public long[] content;
public /* synthetic */ LongList(int i, DefaultConstructorMarker defaultConstructorMarker) {
this(i);
}
public static /* synthetic */ void getContent$annotations() {
}
public static /* synthetic */ void get_size$annotations() {
}
public final int count() {
return this._size;
}
@IntRange(from = -1)
public final int getLastIndex() {
return this._size - 1;
}
@IntRange(from = 0)
public final int getSize() {
return this._size;
}
public final boolean isEmpty() {
return this._size == 0;
}
public final boolean isNotEmpty() {
return this._size != 0;
}
public final String joinToString() {
return joinToString$default(this, null, null, null, 0, null, 31, null);
}
public final String joinToString(CharSequence separator) {
Intrinsics.checkNotNullParameter(separator, "separator");
return joinToString$default(this, separator, null, null, 0, null, 30, null);
}
public final String joinToString(CharSequence separator, CharSequence prefix) {
Intrinsics.checkNotNullParameter(separator, "separator");
Intrinsics.checkNotNullParameter(prefix, "prefix");
return joinToString$default(this, separator, prefix, null, 0, null, 28, null);
}
public final String joinToString(CharSequence separator, CharSequence prefix, CharSequence postfix) {
Intrinsics.checkNotNullParameter(separator, "separator");
Intrinsics.checkNotNullParameter(prefix, "prefix");
Intrinsics.checkNotNullParameter(postfix, "postfix");
return joinToString$default(this, separator, prefix, postfix, 0, null, 24, null);
}
public final String joinToString(CharSequence separator, CharSequence prefix, CharSequence postfix, int i) {
Intrinsics.checkNotNullParameter(separator, "separator");
Intrinsics.checkNotNullParameter(prefix, "prefix");
Intrinsics.checkNotNullParameter(postfix, "postfix");
return joinToString$default(this, separator, prefix, postfix, i, null, 16, null);
}
private LongList(int i) {
long[] jArr;
if (i == 0) {
jArr = LongSetKt.getEmptyLongArray();
} else {
jArr = new long[i];
}
this.content = jArr;
}
public final boolean containsAll(LongList elements) {
kotlin.ranges.IntRange until;
Intrinsics.checkNotNullParameter(elements, "elements");
until = RangesKt___RangesKt.until(0, elements._size);
int first = until.getFirst();
int last = until.getLast();
if (first > last) {
return true;
}
while (contains(elements.get(first))) {
if (first == last) {
return true;
}
first++;
}
return false;
}
public final kotlin.ranges.IntRange getIndices() {
kotlin.ranges.IntRange until;
until = RangesKt___RangesKt.until(0, this._size);
return until;
}
public final boolean none() {
return isEmpty();
}
public final boolean any() {
return isNotEmpty();
}
public final long first() {
if (isEmpty()) {
throw new NoSuchElementException("LongList is empty.");
}
return this.content[0];
}
public final boolean any(Function1 predicate) {
Intrinsics.checkNotNullParameter(predicate, "predicate");
long[] jArr = this.content;
int i = this._size;
for (int i2 = 0; i2 < i; i2++) {
if (((Boolean) predicate.invoke(Long.valueOf(jArr[i2]))).booleanValue()) {
return true;
}
}
return false;
}
public final boolean contains(long j) {
long[] jArr = this.content;
int i = this._size;
for (int i2 = 0; i2 < i; i2++) {
if (jArr[i2] == j) {
return true;
}
}
return false;
}
public final int count(Function1 predicate) {
Intrinsics.checkNotNullParameter(predicate, "predicate");
long[] jArr = this.content;
int i = this._size;
int i2 = 0;
for (int i3 = 0; i3 < i; i3++) {
if (((Boolean) predicate.invoke(Long.valueOf(jArr[i3]))).booleanValue()) {
i2++;
}
}
return i2;
}
public final long first(Function1 predicate) {
Intrinsics.checkNotNullParameter(predicate, "predicate");
long[] jArr = this.content;
int i = this._size;
for (int i2 = 0; i2 < i; i2++) {
long j = jArr[i2];
if (((Boolean) predicate.invoke(Long.valueOf(j))).booleanValue()) {
return j;
}
}
throw new NoSuchElementException("LongList contains no element matching the predicate.");
}
public final <R> R fold(R r, Function2 operation) {
Intrinsics.checkNotNullParameter(operation, "operation");
long[] jArr = this.content;
int i = this._size;
for (int i2 = 0; i2 < i; i2++) {
r = (R) operation.invoke(r, Long.valueOf(jArr[i2]));
}
return r;
}
public final void forEach(Function1 block) {
Intrinsics.checkNotNullParameter(block, "block");
long[] jArr = this.content;
int i = this._size;
for (int i2 = 0; i2 < i; i2++) {
block.invoke(Long.valueOf(jArr[i2]));
}
}
public int hashCode() {
long[] jArr = this.content;
int i = this._size;
int i2 = 0;
for (int i3 = 0; i3 < i; i3++) {
i2 += Long.hashCode(jArr[i3]) * 31;
}
return i2;
}
public final <R> R foldIndexed(R r, Function3 operation) {
Intrinsics.checkNotNullParameter(operation, "operation");
long[] jArr = this.content;
int i = this._size;
for (int i2 = 0; i2 < i; i2++) {
R r2 = r;
r = (R) operation.invoke(Integer.valueOf(i2), r2, Long.valueOf(jArr[i2]));
}
return r;
}
public final void forEachIndexed(Function2 block) {
Intrinsics.checkNotNullParameter(block, "block");
long[] jArr = this.content;
int i = this._size;
for (int i2 = 0; i2 < i; i2++) {
block.invoke(Integer.valueOf(i2), Long.valueOf(jArr[i2]));
}
}
public final int indexOf(long j) {
long[] jArr = this.content;
int i = this._size;
for (int i2 = 0; i2 < i; i2++) {
if (j == jArr[i2]) {
return i2;
}
}
return -1;
}
public final int indexOfFirst(Function1 predicate) {
Intrinsics.checkNotNullParameter(predicate, "predicate");
long[] jArr = this.content;
int i = this._size;
for (int i2 = 0; i2 < i; i2++) {
if (((Boolean) predicate.invoke(Long.valueOf(jArr[i2]))).booleanValue()) {
return i2;
}
}
return -1;
}
public final <R> R foldRight(R r, Function2 operation) {
Intrinsics.checkNotNullParameter(operation, "operation");
long[] jArr = this.content;
int i = this._size;
while (true) {
i--;
if (-1 >= i) {
return r;
}
r = (R) operation.invoke(Long.valueOf(jArr[i]), r);
}
}
public final void forEachReversed(Function1 block) {
Intrinsics.checkNotNullParameter(block, "block");
long[] jArr = this.content;
int i = this._size;
while (true) {
i--;
if (-1 >= i) {
return;
} else {
block.invoke(Long.valueOf(jArr[i]));
}
}
}
public final long last(Function1 predicate) {
long j;
Intrinsics.checkNotNullParameter(predicate, "predicate");
long[] jArr = this.content;
int i = this._size;
do {
i--;
if (-1 < i) {
j = jArr[i];
} else {
throw new NoSuchElementException("LongList contains no element matching the predicate.");
}
} while (!((Boolean) predicate.invoke(Long.valueOf(j))).booleanValue());
return j;
}
public final boolean reversedAny(Function1 predicate) {
Intrinsics.checkNotNullParameter(predicate, "predicate");
long[] jArr = this.content;
for (int i = this._size - 1; -1 < i; i--) {
if (((Boolean) predicate.invoke(Long.valueOf(jArr[i]))).booleanValue()) {
return true;
}
}
return false;
}
public final <R> R foldRightIndexed(R r, Function3 operation) {
Intrinsics.checkNotNullParameter(operation, "operation");
long[] jArr = this.content;
int i = this._size;
while (true) {
i--;
if (-1 >= i) {
return r;
}
r = (R) operation.invoke(Integer.valueOf(i), Long.valueOf(jArr[i]), r);
}
}
public final void forEachReversedIndexed(Function2 block) {
Intrinsics.checkNotNullParameter(block, "block");
long[] jArr = this.content;
int i = this._size;
while (true) {
i--;
if (-1 >= i) {
return;
} else {
block.invoke(Integer.valueOf(i), Long.valueOf(jArr[i]));
}
}
}
public final int indexOfLast(Function1 predicate) {
Intrinsics.checkNotNullParameter(predicate, "predicate");
long[] jArr = this.content;
int i = this._size;
do {
i--;
if (-1 >= i) {
return -1;
}
} while (!((Boolean) predicate.invoke(Long.valueOf(jArr[i]))).booleanValue());
return i;
}
public final int lastIndexOf(long j) {
long[] jArr = this.content;
int i = this._size;
do {
i--;
if (-1 >= i) {
return -1;
}
} while (jArr[i] != j);
return i;
}
public final long get(@IntRange(from = 0) int i) {
if (i < 0 || i >= this._size) {
StringBuilder sb = new StringBuilder();
sb.append("Index ");
sb.append(i);
sb.append(" must be in 0..");
sb.append(this._size - 1);
throw new IndexOutOfBoundsException(sb.toString());
}
return this.content[i];
}
public final long elementAt(@IntRange(from = 0) int i) {
if (i < 0 || i >= this._size) {
StringBuilder sb = new StringBuilder();
sb.append("Index ");
sb.append(i);
sb.append(" must be in 0..");
sb.append(this._size - 1);
throw new IndexOutOfBoundsException(sb.toString());
}
return this.content[i];
}
public final long elementAtOrElse(@IntRange(from = 0) int i, Function1 defaultValue) {
Intrinsics.checkNotNullParameter(defaultValue, "defaultValue");
if (i < 0 || i >= this._size) {
return ((Number) defaultValue.invoke(Integer.valueOf(i))).longValue();
}
return this.content[i];
}
public final long last() {
if (!isEmpty()) {
return this.content[this._size - 1];
}
throw new NoSuchElementException("LongList is empty.");
}
public static /* synthetic */ String joinToString$default(LongList longList, CharSequence charSequence, CharSequence charSequence2, CharSequence charSequence3, int i, CharSequence charSequence4, int i2, Object obj) {
if (obj != null) {
throw new UnsupportedOperationException("Super calls with default arguments not supported in this target, function: joinToString");
}
if ((i2 & 1) != 0) {
charSequence = ", ";
}
CharSequence charSequence5 = (i2 & 2) != 0 ? "" : charSequence2;
CharSequence charSequence6 = (i2 & 4) == 0 ? charSequence3 : "";
if ((i2 & 8) != 0) {
i = -1;
}
int i3 = i;
if ((i2 & 16) != 0) {
charSequence4 = "...";
}
return longList.joinToString(charSequence, charSequence5, charSequence6, i3, charSequence4);
}
public final String joinToString(CharSequence separator, CharSequence prefix, CharSequence postfix, int i, CharSequence truncated) {
Intrinsics.checkNotNullParameter(separator, "separator");
Intrinsics.checkNotNullParameter(prefix, "prefix");
Intrinsics.checkNotNullParameter(postfix, "postfix");
Intrinsics.checkNotNullParameter(truncated, "truncated");
StringBuilder sb = new StringBuilder();
sb.append(prefix);
long[] jArr = this.content;
int i2 = this._size;
int i3 = 0;
while (true) {
if (i3 < i2) {
long j = jArr[i3];
if (i3 == i) {
sb.append(truncated);
break;
}
if (i3 != 0) {
sb.append(separator);
}
sb.append(j);
i3++;
} else {
sb.append(postfix);
break;
}
}
String sb2 = sb.toString();
Intrinsics.checkNotNullExpressionValue(sb2, "StringBuilder().apply(builderAction).toString()");
return sb2;
}
public static /* synthetic */ String joinToString$default(LongList longList, CharSequence separator, CharSequence prefix, CharSequence postfix, int i, CharSequence truncated, Function1 transform, int i2, Object obj) {
if (obj == null) {
if ((i2 & 1) != 0) {
separator = ", ";
}
if ((i2 & 2) != 0) {
prefix = "";
}
if ((i2 & 4) != 0) {
postfix = "";
}
if ((i2 & 8) != 0) {
i = -1;
}
if ((i2 & 16) != 0) {
truncated = "...";
}
Intrinsics.checkNotNullParameter(separator, "separator");
Intrinsics.checkNotNullParameter(prefix, "prefix");
Intrinsics.checkNotNullParameter(postfix, "postfix");
Intrinsics.checkNotNullParameter(truncated, "truncated");
Intrinsics.checkNotNullParameter(transform, "transform");
StringBuilder sb = new StringBuilder();
sb.append(prefix);
long[] jArr = longList.content;
int i3 = longList._size;
int i4 = 0;
while (true) {
if (i4 < i3) {
long j = jArr[i4];
if (i4 == i) {
sb.append(truncated);
break;
}
if (i4 != 0) {
sb.append(separator);
}
sb.append((CharSequence) transform.invoke(Long.valueOf(j)));
i4++;
} else {
sb.append(postfix);
break;
}
}
String sb2 = sb.toString();
Intrinsics.checkNotNullExpressionValue(sb2, "StringBuilder().apply(builderAction).toString()");
return sb2;
}
throw new UnsupportedOperationException("Super calls with default arguments not supported in this target, function: joinToString");
}
public final String joinToString(CharSequence separator, CharSequence prefix, CharSequence postfix, int i, CharSequence truncated, Function1 transform) {
Intrinsics.checkNotNullParameter(separator, "separator");
Intrinsics.checkNotNullParameter(prefix, "prefix");
Intrinsics.checkNotNullParameter(postfix, "postfix");
Intrinsics.checkNotNullParameter(truncated, "truncated");
Intrinsics.checkNotNullParameter(transform, "transform");
StringBuilder sb = new StringBuilder();
sb.append(prefix);
long[] jArr = this.content;
int i2 = this._size;
int i3 = 0;
while (true) {
if (i3 < i2) {
long j = jArr[i3];
if (i3 == i) {
sb.append(truncated);
break;
}
if (i3 != 0) {
sb.append(separator);
}
sb.append((CharSequence) transform.invoke(Long.valueOf(j)));
i3++;
} else {
sb.append(postfix);
break;
}
}
String sb2 = sb.toString();
Intrinsics.checkNotNullExpressionValue(sb2, "StringBuilder().apply(builderAction).toString()");
return sb2;
}
public final String joinToString(CharSequence separator, CharSequence prefix, CharSequence postfix, int i, Function1 transform) {
Intrinsics.checkNotNullParameter(separator, "separator");
Intrinsics.checkNotNullParameter(prefix, "prefix");
Intrinsics.checkNotNullParameter(postfix, "postfix");
Intrinsics.checkNotNullParameter(transform, "transform");
StringBuilder sb = new StringBuilder();
sb.append(prefix);
long[] jArr = this.content;
int i2 = this._size;
int i3 = 0;
while (true) {
if (i3 < i2) {
long j = jArr[i3];
if (i3 == i) {
sb.append((CharSequence) "...");
break;
}
if (i3 != 0) {
sb.append(separator);
}
sb.append((CharSequence) transform.invoke(Long.valueOf(j)));
i3++;
} else {
sb.append(postfix);
break;
}
}
String sb2 = sb.toString();
Intrinsics.checkNotNullExpressionValue(sb2, "StringBuilder().apply(builderAction).toString()");
return sb2;
}
public final String joinToString(CharSequence separator, CharSequence prefix, CharSequence postfix, Function1 transform) {
Intrinsics.checkNotNullParameter(separator, "separator");
Intrinsics.checkNotNullParameter(prefix, "prefix");
Intrinsics.checkNotNullParameter(postfix, "postfix");
Intrinsics.checkNotNullParameter(transform, "transform");
StringBuilder sb = new StringBuilder();
sb.append(prefix);
long[] jArr = this.content;
int i = this._size;
int i2 = 0;
while (true) {
if (i2 < i) {
long j = jArr[i2];
if (i2 == -1) {
sb.append((CharSequence) "...");
break;
}
if (i2 != 0) {
sb.append(separator);
}
sb.append((CharSequence) transform.invoke(Long.valueOf(j)));
i2++;
} else {
sb.append(postfix);
break;
}
}
String sb2 = sb.toString();
Intrinsics.checkNotNullExpressionValue(sb2, "StringBuilder().apply(builderAction).toString()");
return sb2;
}
public final String joinToString(CharSequence separator, CharSequence prefix, Function1 transform) {
Intrinsics.checkNotNullParameter(separator, "separator");
Intrinsics.checkNotNullParameter(prefix, "prefix");
Intrinsics.checkNotNullParameter(transform, "transform");
StringBuilder sb = new StringBuilder();
sb.append(prefix);
long[] jArr = this.content;
int i = this._size;
int i2 = 0;
while (true) {
if (i2 < i) {
long j = jArr[i2];
if (i2 == -1) {
sb.append((CharSequence) "...");
break;
}
if (i2 != 0) {
sb.append(separator);
}
sb.append((CharSequence) transform.invoke(Long.valueOf(j)));
i2++;
} else {
sb.append((CharSequence) "");
break;
}
}
String sb2 = sb.toString();
Intrinsics.checkNotNullExpressionValue(sb2, "StringBuilder().apply(builderAction).toString()");
return sb2;
}
public final String joinToString(CharSequence separator, Function1 transform) {
Intrinsics.checkNotNullParameter(separator, "separator");
Intrinsics.checkNotNullParameter(transform, "transform");
StringBuilder sb = new StringBuilder();
sb.append((CharSequence) "");
long[] jArr = this.content;
int i = this._size;
int i2 = 0;
while (true) {
if (i2 < i) {
long j = jArr[i2];
if (i2 == -1) {
sb.append((CharSequence) "...");
break;
}
if (i2 != 0) {
sb.append(separator);
}
sb.append((CharSequence) transform.invoke(Long.valueOf(j)));
i2++;
} else {
sb.append((CharSequence) "");
break;
}
}
String sb2 = sb.toString();
Intrinsics.checkNotNullExpressionValue(sb2, "StringBuilder().apply(builderAction).toString()");
return sb2;
}
public final String joinToString(Function1 transform) {
Intrinsics.checkNotNullParameter(transform, "transform");
StringBuilder sb = new StringBuilder();
sb.append((CharSequence) "");
long[] jArr = this.content;
int i = this._size;
int i2 = 0;
while (true) {
if (i2 < i) {
long j = jArr[i2];
if (i2 == -1) {
sb.append((CharSequence) "...");
break;
}
if (i2 != 0) {
sb.append((CharSequence) ", ");
}
sb.append((CharSequence) transform.invoke(Long.valueOf(j)));
i2++;
} else {
sb.append((CharSequence) "");
break;
}
}
String sb2 = sb.toString();
Intrinsics.checkNotNullExpressionValue(sb2, "StringBuilder().apply(builderAction).toString()");
return sb2;
}
public boolean equals(Object obj) {
kotlin.ranges.IntRange until;
if (obj instanceof LongList) {
LongList longList = (LongList) obj;
int i = longList._size;
int i2 = this._size;
if (i == i2) {
long[] jArr = this.content;
long[] jArr2 = longList.content;
until = RangesKt___RangesKt.until(0, i2);
int first = until.getFirst();
int last = until.getLast();
if (first > last) {
return true;
}
while (jArr[first] == jArr2[first]) {
if (first == last) {
return true;
}
first++;
}
return false;
}
}
return false;
}
public String toString() {
return joinToString$default(this, null, v8.i.d, v8.i.e, 0, null, 25, null);
}
}

View File

@@ -0,0 +1,69 @@
package androidx.collection;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
@SourceDebugExtension({"SMAP\nLongList.kt\nKotlin\n*S Kotlin\n*F\n+ 1 LongList.kt\nandroidx/collection/LongListKt\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n+ 3 LongList.kt\nandroidx/collection/MutableLongList\n*L\n1#1,969:1\n1#2:970\n713#3,2:971\n713#3,2:973\n713#3,2:975\n713#3,2:977\n713#3,2:979\n713#3,2:981\n*S KotlinDebug\n*F\n+ 1 LongList.kt\nandroidx/collection/LongListKt\n*L\n938#1:971,2\n947#1:973,2\n948#1:975,2\n958#1:977,2\n959#1:979,2\n960#1:981,2\n*E\n"})
/* loaded from: classes.dex */
public final class LongListKt {
private static final LongList EmptyLongList = new MutableLongList(0);
public static final LongList emptyLongList() {
return EmptyLongList;
}
public static final LongList longListOf() {
return EmptyLongList;
}
public static final LongList longListOf(long j) {
return mutableLongListOf(j);
}
public static final LongList longListOf(long j, long j2) {
return mutableLongListOf(j, j2);
}
public static final LongList longListOf(long j, long j2, long j3) {
return mutableLongListOf(j, j2, j3);
}
public static final LongList longListOf(long... elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
MutableLongList mutableLongList = new MutableLongList(elements.length);
mutableLongList.plusAssign(elements);
return mutableLongList;
}
public static final MutableLongList mutableLongListOf() {
return new MutableLongList(0, 1, null);
}
public static final MutableLongList mutableLongListOf(long j) {
MutableLongList mutableLongList = new MutableLongList(1);
mutableLongList.add(j);
return mutableLongList;
}
public static final MutableLongList mutableLongListOf(long j, long j2) {
MutableLongList mutableLongList = new MutableLongList(2);
mutableLongList.add(j);
mutableLongList.add(j2);
return mutableLongList;
}
public static final MutableLongList mutableLongListOf(long j, long j2, long j3) {
MutableLongList mutableLongList = new MutableLongList(3);
mutableLongList.add(j);
mutableLongList.add(j2);
mutableLongList.add(j3);
return mutableLongList;
}
public static final MutableLongList mutableLongListOf(long... elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
MutableLongList mutableLongList = new MutableLongList(elements.length);
mutableLongList.plusAssign(elements);
return mutableLongList;
}
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,98 @@
package androidx.collection;
/* loaded from: classes.dex */
public final class LongLongMapKt {
private static final MutableLongLongMap EmptyLongLongMap = new MutableLongLongMap(0);
public static final LongLongMap emptyLongLongMap() {
return EmptyLongLongMap;
}
public static final LongLongMap longLongMapOf() {
return EmptyLongLongMap;
}
public static final LongLongMap longLongMapOf(long j, long j2) {
MutableLongLongMap mutableLongLongMap = new MutableLongLongMap(0, 1, null);
mutableLongLongMap.set(j, j2);
return mutableLongLongMap;
}
public static final LongLongMap longLongMapOf(long j, long j2, long j3, long j4) {
MutableLongLongMap mutableLongLongMap = new MutableLongLongMap(0, 1, null);
mutableLongLongMap.set(j, j2);
mutableLongLongMap.set(j3, j4);
return mutableLongLongMap;
}
public static final LongLongMap longLongMapOf(long j, long j2, long j3, long j4, long j5, long j6) {
MutableLongLongMap mutableLongLongMap = new MutableLongLongMap(0, 1, null);
mutableLongLongMap.set(j, j2);
mutableLongLongMap.set(j3, j4);
mutableLongLongMap.set(j5, j6);
return mutableLongLongMap;
}
public static final LongLongMap longLongMapOf(long j, long j2, long j3, long j4, long j5, long j6, long j7, long j8) {
MutableLongLongMap mutableLongLongMap = new MutableLongLongMap(0, 1, null);
mutableLongLongMap.set(j, j2);
mutableLongLongMap.set(j3, j4);
mutableLongLongMap.set(j5, j6);
mutableLongLongMap.set(j7, j8);
return mutableLongLongMap;
}
public static final LongLongMap longLongMapOf(long j, long j2, long j3, long j4, long j5, long j6, long j7, long j8, long j9, long j10) {
MutableLongLongMap mutableLongLongMap = new MutableLongLongMap(0, 1, null);
mutableLongLongMap.set(j, j2);
mutableLongLongMap.set(j3, j4);
mutableLongLongMap.set(j5, j6);
mutableLongLongMap.set(j7, j8);
mutableLongLongMap.set(j9, j10);
return mutableLongLongMap;
}
public static final MutableLongLongMap mutableLongLongMapOf() {
return new MutableLongLongMap(0, 1, null);
}
public static final MutableLongLongMap mutableLongLongMapOf(long j, long j2) {
MutableLongLongMap mutableLongLongMap = new MutableLongLongMap(0, 1, null);
mutableLongLongMap.set(j, j2);
return mutableLongLongMap;
}
public static final MutableLongLongMap mutableLongLongMapOf(long j, long j2, long j3, long j4) {
MutableLongLongMap mutableLongLongMap = new MutableLongLongMap(0, 1, null);
mutableLongLongMap.set(j, j2);
mutableLongLongMap.set(j3, j4);
return mutableLongLongMap;
}
public static final MutableLongLongMap mutableLongLongMapOf(long j, long j2, long j3, long j4, long j5, long j6) {
MutableLongLongMap mutableLongLongMap = new MutableLongLongMap(0, 1, null);
mutableLongLongMap.set(j, j2);
mutableLongLongMap.set(j3, j4);
mutableLongLongMap.set(j5, j6);
return mutableLongLongMap;
}
public static final MutableLongLongMap mutableLongLongMapOf(long j, long j2, long j3, long j4, long j5, long j6, long j7, long j8) {
MutableLongLongMap mutableLongLongMap = new MutableLongLongMap(0, 1, null);
mutableLongLongMap.set(j, j2);
mutableLongLongMap.set(j3, j4);
mutableLongLongMap.set(j5, j6);
mutableLongLongMap.set(j7, j8);
return mutableLongLongMap;
}
public static final MutableLongLongMap mutableLongLongMapOf(long j, long j2, long j3, long j4, long j5, long j6, long j7, long j8, long j9, long j10) {
MutableLongLongMap mutableLongLongMap = new MutableLongLongMap(0, 1, null);
mutableLongLongMap.set(j, j2);
mutableLongLongMap.set(j3, j4);
mutableLongLongMap.set(j5, j6);
mutableLongLongMap.set(j7, j8);
mutableLongLongMap.set(j9, j10);
return mutableLongLongMap;
}
}

View File

@@ -0,0 +1,44 @@
package androidx.collection;
/* loaded from: classes.dex */
public final class LongLongPair {
private final long first;
private final long second;
public final long getFirst() {
return this.first;
}
public final long getSecond() {
return this.second;
}
public LongLongPair(long j, long j2) {
this.first = j;
this.second = j2;
}
public final long component1() {
return getFirst();
}
public final long component2() {
return getSecond();
}
public boolean equals(Object obj) {
if (!(obj instanceof LongLongPair)) {
return false;
}
LongLongPair longLongPair = (LongLongPair) obj;
return longLongPair.first == this.first && longLongPair.second == this.second;
}
public int hashCode() {
return Long.hashCode(this.first) ^ Long.hashCode(this.second);
}
public String toString() {
return '(' + this.first + ", " + this.second + ')';
}
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,104 @@
package androidx.collection;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes.dex */
public final class LongObjectMapKt {
private static final MutableLongObjectMap EmptyLongObjectMap = new MutableLongObjectMap(0);
public static final <V> LongObjectMap<V> emptyLongObjectMap() {
MutableLongObjectMap mutableLongObjectMap = EmptyLongObjectMap;
Intrinsics.checkNotNull(mutableLongObjectMap, "null cannot be cast to non-null type androidx.collection.LongObjectMap<V of androidx.collection.LongObjectMapKt.emptyLongObjectMap>");
return mutableLongObjectMap;
}
public static final <V> LongObjectMap<V> longObjectMapOf() {
MutableLongObjectMap mutableLongObjectMap = EmptyLongObjectMap;
Intrinsics.checkNotNull(mutableLongObjectMap, "null cannot be cast to non-null type androidx.collection.LongObjectMap<V of androidx.collection.LongObjectMapKt.longObjectMapOf>");
return mutableLongObjectMap;
}
public static final <V> LongObjectMap<V> longObjectMapOf(long j, V v) {
MutableLongObjectMap mutableLongObjectMap = new MutableLongObjectMap(0, 1, null);
mutableLongObjectMap.set(j, v);
return mutableLongObjectMap;
}
public static final <V> LongObjectMap<V> longObjectMapOf(long j, V v, long j2, V v2) {
MutableLongObjectMap mutableLongObjectMap = new MutableLongObjectMap(0, 1, null);
mutableLongObjectMap.set(j, v);
mutableLongObjectMap.set(j2, v2);
return mutableLongObjectMap;
}
public static final <V> LongObjectMap<V> longObjectMapOf(long j, V v, long j2, V v2, long j3, V v3) {
MutableLongObjectMap mutableLongObjectMap = new MutableLongObjectMap(0, 1, null);
mutableLongObjectMap.set(j, v);
mutableLongObjectMap.set(j2, v2);
mutableLongObjectMap.set(j3, v3);
return mutableLongObjectMap;
}
public static final <V> LongObjectMap<V> longObjectMapOf(long j, V v, long j2, V v2, long j3, V v3, long j4, V v4) {
MutableLongObjectMap mutableLongObjectMap = new MutableLongObjectMap(0, 1, null);
mutableLongObjectMap.set(j, v);
mutableLongObjectMap.set(j2, v2);
mutableLongObjectMap.set(j3, v3);
mutableLongObjectMap.set(j4, v4);
return mutableLongObjectMap;
}
public static final <V> LongObjectMap<V> longObjectMapOf(long j, V v, long j2, V v2, long j3, V v3, long j4, V v4, long j5, V v5) {
MutableLongObjectMap mutableLongObjectMap = new MutableLongObjectMap(0, 1, null);
mutableLongObjectMap.set(j, v);
mutableLongObjectMap.set(j2, v2);
mutableLongObjectMap.set(j3, v3);
mutableLongObjectMap.set(j4, v4);
mutableLongObjectMap.set(j5, v5);
return mutableLongObjectMap;
}
public static final <V> MutableLongObjectMap<V> mutableLongObjectMapOf() {
return new MutableLongObjectMap<>(0, 1, null);
}
public static final <V> MutableLongObjectMap<V> mutableLongObjectMapOf(long j, V v) {
MutableLongObjectMap<V> mutableLongObjectMap = new MutableLongObjectMap<>(0, 1, null);
mutableLongObjectMap.set(j, v);
return mutableLongObjectMap;
}
public static final <V> MutableLongObjectMap<V> mutableLongObjectMapOf(long j, V v, long j2, V v2) {
MutableLongObjectMap<V> mutableLongObjectMap = new MutableLongObjectMap<>(0, 1, null);
mutableLongObjectMap.set(j, v);
mutableLongObjectMap.set(j2, v2);
return mutableLongObjectMap;
}
public static final <V> MutableLongObjectMap<V> mutableLongObjectMapOf(long j, V v, long j2, V v2, long j3, V v3) {
MutableLongObjectMap<V> mutableLongObjectMap = new MutableLongObjectMap<>(0, 1, null);
mutableLongObjectMap.set(j, v);
mutableLongObjectMap.set(j2, v2);
mutableLongObjectMap.set(j3, v3);
return mutableLongObjectMap;
}
public static final <V> MutableLongObjectMap<V> mutableLongObjectMapOf(long j, V v, long j2, V v2, long j3, V v3, long j4, V v4) {
MutableLongObjectMap<V> mutableLongObjectMap = new MutableLongObjectMap<>(0, 1, null);
mutableLongObjectMap.set(j, v);
mutableLongObjectMap.set(j2, v2);
mutableLongObjectMap.set(j3, v3);
mutableLongObjectMap.set(j4, v4);
return mutableLongObjectMap;
}
public static final <V> MutableLongObjectMap<V> mutableLongObjectMapOf(long j, V v, long j2, V v2, long j3, V v3, long j4, V v4, long j5, V v5) {
MutableLongObjectMap<V> mutableLongObjectMap = new MutableLongObjectMap<>(0, 1, null);
mutableLongObjectMap.set(j, v);
mutableLongObjectMap.set(j2, v2);
mutableLongObjectMap.set(j3, v3);
mutableLongObjectMap.set(j4, v4);
mutableLongObjectMap.set(j5, v5);
return mutableLongObjectMap;
}
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,79 @@
package androidx.collection;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
@SourceDebugExtension({"SMAP\nLongSet.kt\nKotlin\n*S Kotlin\n*F\n+ 1 LongSet.kt\nandroidx/collection/LongSetKt\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,853:1\n1#2:854\n*E\n"})
/* loaded from: classes.dex */
public final class LongSetKt {
private static final MutableLongSet EmptyLongSet = new MutableLongSet(0);
private static final long[] EmptyLongArray = new long[0];
public static final LongSet emptyLongSet() {
return EmptyLongSet;
}
public static final long[] getEmptyLongArray() {
return EmptyLongArray;
}
public static final LongSet longSetOf() {
return EmptyLongSet;
}
public static final LongSet longSetOf(long j) {
return mutableLongSetOf(j);
}
public static final LongSet longSetOf(long j, long j2) {
return mutableLongSetOf(j, j2);
}
public static final LongSet longSetOf(long j, long j2, long j3) {
return mutableLongSetOf(j, j2, j3);
}
public static final LongSet longSetOf(long... elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
MutableLongSet mutableLongSet = new MutableLongSet(elements.length);
mutableLongSet.plusAssign(elements);
return mutableLongSet;
}
public static final MutableLongSet mutableLongSetOf() {
return new MutableLongSet(0, 1, null);
}
public static final MutableLongSet mutableLongSetOf(long j) {
MutableLongSet mutableLongSet = new MutableLongSet(1);
mutableLongSet.plusAssign(j);
return mutableLongSet;
}
public static final MutableLongSet mutableLongSetOf(long j, long j2) {
MutableLongSet mutableLongSet = new MutableLongSet(2);
mutableLongSet.plusAssign(j);
mutableLongSet.plusAssign(j2);
return mutableLongSet;
}
public static final MutableLongSet mutableLongSetOf(long j, long j2, long j3) {
MutableLongSet mutableLongSet = new MutableLongSet(3);
mutableLongSet.plusAssign(j);
mutableLongSet.plusAssign(j2);
mutableLongSet.plusAssign(j3);
return mutableLongSet;
}
public static final MutableLongSet mutableLongSetOf(long... elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
MutableLongSet mutableLongSet = new MutableLongSet(elements.length);
mutableLongSet.plusAssign(elements);
return mutableLongSet;
}
public static final int hash(long j) {
int hashCode = Long.hashCode(j) * ScatterMapKt.MurmurHashC1;
return hashCode ^ (hashCode << 16);
}
}

View File

@@ -0,0 +1,430 @@
package androidx.collection;
import androidx.collection.internal.ContainerHelpersKt;
import com.applovin.impl.sdk.utils.JsonUtils;
import com.ironsource.nb;
import java.util.Arrays;
import kotlin.collections.ArraysKt___ArraysJvmKt;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
@SourceDebugExtension({"SMAP\nLongSparseArray.jvm.kt\nKotlin\n*S Kotlin\n*F\n+ 1 LongSparseArray.jvm.kt\nandroidx/collection/LongSparseArray\n+ 2 LongSparseArray.kt\nandroidx/collection/LongSparseArrayKt\n*L\n1#1,255:1\n243#2:256\n256#2,6:257\n248#2,14:263\n267#2,8:277\n267#2,8:285\n278#2,9:293\n291#2,5:302\n299#2,8:307\n315#2,9:315\n349#2,12:324\n328#2,18:336\n363#2,26:354\n392#2,5:380\n400#2,5:385\n409#2,2:390\n328#2,18:392\n412#2:410\n416#2:411\n420#2,6:412\n328#2,18:418\n427#2:436\n432#2,6:437\n328#2,18:443\n441#2:461\n446#2,6:462\n328#2,18:468\n453#2,2:486\n458#2,2:488\n328#2,18:490\n461#2:508\n466#2,2:509\n328#2,18:511\n469#2,6:529\n479#2:535\n484#2:536\n489#2,8:537\n500#2,6:545\n328#2,18:551\n507#2,10:569\n520#2,21:579\n*S KotlinDebug\n*F\n+ 1 LongSparseArray.jvm.kt\nandroidx/collection/LongSparseArray\n*L\n93#1:256\n93#1:257,6\n100#1:263,14\n106#1:277,8\n111#1:285,8\n120#1:293,9\n125#1:302,5\n134#1:307,8\n145#1:315,9\n151#1:324,12\n151#1:336,18\n151#1:354,26\n157#1:380,5\n168#1:385,5\n173#1:390,2\n173#1:392,18\n173#1:410\n180#1:411\n192#1:412,6\n192#1:418,18\n192#1:436\n204#1:437,6\n204#1:443,18\n204#1:461\n212#1:462,6\n212#1:468,18\n212#1:486,2\n219#1:488,2\n219#1:490,18\n219#1:508\n228#1:509,2\n228#1:511,18\n228#1:529,6\n231#1:535\n234#1:536\n239#1:537,8\n245#1:545,6\n245#1:551,18\n245#1:569,10\n253#1:579,21\n*E\n"})
/* loaded from: classes.dex */
public class LongSparseArray<E> implements Cloneable {
public /* synthetic */ boolean garbage;
public /* synthetic */ long[] keys;
public /* synthetic */ int size;
public /* synthetic */ Object[] values;
public LongSparseArray() {
this(0, 1, null);
}
public LongSparseArray(int i) {
if (i == 0) {
this.keys = ContainerHelpersKt.EMPTY_LONGS;
this.values = ContainerHelpersKt.EMPTY_OBJECTS;
} else {
int idealLongArraySize = ContainerHelpersKt.idealLongArraySize(i);
this.keys = new long[idealLongArraySize];
this.values = new Object[idealLongArraySize];
}
}
public /* synthetic */ LongSparseArray(int i, int i2, DefaultConstructorMarker defaultConstructorMarker) {
this((i2 & 1) != 0 ? 10 : i);
}
/* renamed from: clone, reason: merged with bridge method [inline-methods] */
public LongSparseArray<E> m34clone() {
Object clone = super.clone();
Intrinsics.checkNotNull(clone, "null cannot be cast to non-null type androidx.collection.LongSparseArray<E of androidx.collection.LongSparseArray>");
LongSparseArray<E> longSparseArray = (LongSparseArray) clone;
longSparseArray.keys = (long[]) this.keys.clone();
longSparseArray.values = (Object[]) this.values.clone();
return longSparseArray;
}
public E get(long j) {
int binarySearch = ContainerHelpersKt.binarySearch(this.keys, this.size, j);
if (binarySearch < 0 || this.values[binarySearch] == LongSparseArrayKt.DELETED) {
return null;
}
return (E) this.values[binarySearch];
}
public E get(long j, E e) {
int binarySearch = ContainerHelpersKt.binarySearch(this.keys, this.size, j);
return (binarySearch < 0 || this.values[binarySearch] == LongSparseArrayKt.DELETED) ? e : (E) this.values[binarySearch];
}
public void delete(long j) {
int binarySearch = ContainerHelpersKt.binarySearch(this.keys, this.size, j);
if (binarySearch < 0 || this.values[binarySearch] == LongSparseArrayKt.DELETED) {
return;
}
this.values[binarySearch] = LongSparseArrayKt.DELETED;
this.garbage = true;
}
public void remove(long j) {
int binarySearch = ContainerHelpersKt.binarySearch(this.keys, this.size, j);
if (binarySearch < 0 || this.values[binarySearch] == LongSparseArrayKt.DELETED) {
return;
}
this.values[binarySearch] = LongSparseArrayKt.DELETED;
this.garbage = true;
}
public boolean remove(long j, E e) {
int indexOfKey = indexOfKey(j);
if (indexOfKey < 0 || !Intrinsics.areEqual(e, valueAt(indexOfKey))) {
return false;
}
removeAt(indexOfKey);
return true;
}
public void removeAt(int i) {
if (this.values[i] != LongSparseArrayKt.DELETED) {
this.values[i] = LongSparseArrayKt.DELETED;
this.garbage = true;
}
}
public E replace(long j, E e) {
int indexOfKey = indexOfKey(j);
if (indexOfKey < 0) {
return null;
}
Object[] objArr = this.values;
E e2 = (E) objArr[indexOfKey];
objArr[indexOfKey] = e;
return e2;
}
public boolean replace(long j, E e, E e2) {
int indexOfKey = indexOfKey(j);
if (indexOfKey < 0 || !Intrinsics.areEqual(this.values[indexOfKey], e)) {
return false;
}
this.values[indexOfKey] = e2;
return true;
}
public int indexOfKey(long j) {
if (this.garbage) {
int i = this.size;
long[] jArr = this.keys;
Object[] objArr = this.values;
int i2 = 0;
for (int i3 = 0; i3 < i; i3++) {
Object obj = objArr[i3];
if (obj != LongSparseArrayKt.DELETED) {
if (i3 != i2) {
jArr[i2] = jArr[i3];
objArr[i2] = obj;
objArr[i3] = null;
}
i2++;
}
}
this.garbage = false;
this.size = i2;
}
return ContainerHelpersKt.binarySearch(this.keys, this.size, j);
}
public int indexOfValue(E e) {
if (this.garbage) {
int i = this.size;
long[] jArr = this.keys;
Object[] objArr = this.values;
int i2 = 0;
for (int i3 = 0; i3 < i; i3++) {
Object obj = objArr[i3];
if (obj != LongSparseArrayKt.DELETED) {
if (i3 != i2) {
jArr[i2] = jArr[i3];
objArr[i2] = obj;
objArr[i3] = null;
}
i2++;
}
}
this.garbage = false;
this.size = i2;
}
int i4 = this.size;
for (int i5 = 0; i5 < i4; i5++) {
if (this.values[i5] == e) {
return i5;
}
}
return -1;
}
public long keyAt(int i) {
int i2;
if (i < 0 || i >= (i2 = this.size)) {
throw new IllegalArgumentException(("Expected index to be within 0..size()-1, but was " + i).toString());
}
if (this.garbage) {
long[] jArr = this.keys;
Object[] objArr = this.values;
int i3 = 0;
for (int i4 = 0; i4 < i2; i4++) {
Object obj = objArr[i4];
if (obj != LongSparseArrayKt.DELETED) {
if (i4 != i3) {
jArr[i3] = jArr[i4];
objArr[i3] = obj;
objArr[i4] = null;
}
i3++;
}
}
this.garbage = false;
this.size = i3;
}
return this.keys[i];
}
public void setValueAt(int i, E e) {
int i2;
if (i < 0 || i >= (i2 = this.size)) {
throw new IllegalArgumentException(("Expected index to be within 0..size()-1, but was " + i).toString());
}
if (this.garbage) {
long[] jArr = this.keys;
Object[] objArr = this.values;
int i3 = 0;
for (int i4 = 0; i4 < i2; i4++) {
Object obj = objArr[i4];
if (obj != LongSparseArrayKt.DELETED) {
if (i4 != i3) {
jArr[i3] = jArr[i4];
objArr[i3] = obj;
objArr[i4] = null;
}
i3++;
}
}
this.garbage = false;
this.size = i3;
}
this.values[i] = e;
}
public int size() {
if (this.garbage) {
int i = this.size;
long[] jArr = this.keys;
Object[] objArr = this.values;
int i2 = 0;
for (int i3 = 0; i3 < i; i3++) {
Object obj = objArr[i3];
if (obj != LongSparseArrayKt.DELETED) {
if (i3 != i2) {
jArr[i2] = jArr[i3];
objArr[i2] = obj;
objArr[i3] = null;
}
i2++;
}
}
this.garbage = false;
this.size = i2;
}
return this.size;
}
public E valueAt(int i) {
int i2;
if (i < 0 || i >= (i2 = this.size)) {
throw new IllegalArgumentException(("Expected index to be within 0..size()-1, but was " + i).toString());
}
if (this.garbage) {
long[] jArr = this.keys;
Object[] objArr = this.values;
int i3 = 0;
for (int i4 = 0; i4 < i2; i4++) {
Object obj = objArr[i4];
if (obj != LongSparseArrayKt.DELETED) {
if (i4 != i3) {
jArr[i3] = jArr[i4];
objArr[i3] = obj;
objArr[i4] = null;
}
i3++;
}
}
this.garbage = false;
this.size = i3;
}
return (E) this.values[i];
}
public void put(long j, E e) {
int binarySearch = ContainerHelpersKt.binarySearch(this.keys, this.size, j);
if (binarySearch >= 0) {
this.values[binarySearch] = e;
return;
}
int i = ~binarySearch;
if (i < this.size && this.values[i] == LongSparseArrayKt.DELETED) {
this.keys[i] = j;
this.values[i] = e;
return;
}
if (this.garbage) {
int i2 = this.size;
long[] jArr = this.keys;
if (i2 >= jArr.length) {
Object[] objArr = this.values;
int i3 = 0;
for (int i4 = 0; i4 < i2; i4++) {
Object obj = objArr[i4];
if (obj != LongSparseArrayKt.DELETED) {
if (i4 != i3) {
jArr[i3] = jArr[i4];
objArr[i3] = obj;
objArr[i4] = null;
}
i3++;
}
}
this.garbage = false;
this.size = i3;
i = ~ContainerHelpersKt.binarySearch(this.keys, i3, j);
}
}
int i5 = this.size;
if (i5 >= this.keys.length) {
int idealLongArraySize = ContainerHelpersKt.idealLongArraySize(i5 + 1);
long[] copyOf = Arrays.copyOf(this.keys, idealLongArraySize);
Intrinsics.checkNotNullExpressionValue(copyOf, "copyOf(this, newSize)");
this.keys = copyOf;
Object[] copyOf2 = Arrays.copyOf(this.values, idealLongArraySize);
Intrinsics.checkNotNullExpressionValue(copyOf2, "copyOf(this, newSize)");
this.values = copyOf2;
}
int i6 = this.size;
if (i6 - i != 0) {
long[] jArr2 = this.keys;
int i7 = i + 1;
ArraysKt___ArraysJvmKt.copyInto(jArr2, jArr2, i7, i, i6);
Object[] objArr2 = this.values;
ArraysKt___ArraysJvmKt.copyInto(objArr2, objArr2, i7, i, this.size);
}
this.keys[i] = j;
this.values[i] = e;
this.size++;
}
public void putAll(LongSparseArray<? extends E> other) {
Intrinsics.checkNotNullParameter(other, "other");
int size = other.size();
for (int i = 0; i < size; i++) {
put(other.keyAt(i), other.valueAt(i));
}
}
public E putIfAbsent(long j, E e) {
E e2 = get(j);
if (e2 == null) {
put(j, e);
}
return e2;
}
public boolean isEmpty() {
return size() == 0;
}
public boolean containsKey(long j) {
return indexOfKey(j) >= 0;
}
public boolean containsValue(E e) {
return indexOfValue(e) >= 0;
}
public void clear() {
int i = this.size;
Object[] objArr = this.values;
for (int i2 = 0; i2 < i; i2++) {
objArr[i2] = null;
}
this.size = 0;
this.garbage = false;
}
public void append(long j, E e) {
int i = this.size;
if (i != 0 && j <= this.keys[i - 1]) {
put(j, e);
return;
}
if (this.garbage) {
long[] jArr = this.keys;
if (i >= jArr.length) {
Object[] objArr = this.values;
int i2 = 0;
for (int i3 = 0; i3 < i; i3++) {
Object obj = objArr[i3];
if (obj != LongSparseArrayKt.DELETED) {
if (i3 != i2) {
jArr[i2] = jArr[i3];
objArr[i2] = obj;
objArr[i3] = null;
}
i2++;
}
}
this.garbage = false;
this.size = i2;
}
}
int i4 = this.size;
if (i4 >= this.keys.length) {
int idealLongArraySize = ContainerHelpersKt.idealLongArraySize(i4 + 1);
long[] copyOf = Arrays.copyOf(this.keys, idealLongArraySize);
Intrinsics.checkNotNullExpressionValue(copyOf, "copyOf(this, newSize)");
this.keys = copyOf;
Object[] copyOf2 = Arrays.copyOf(this.values, idealLongArraySize);
Intrinsics.checkNotNullExpressionValue(copyOf2, "copyOf(this, newSize)");
this.values = copyOf2;
}
this.keys[i4] = j;
this.values[i4] = e;
this.size = i4 + 1;
}
public String toString() {
if (size() <= 0) {
return JsonUtils.EMPTY_JSON;
}
StringBuilder sb = new StringBuilder(this.size * 28);
sb.append('{');
int i = this.size;
for (int i2 = 0; i2 < i; i2++) {
if (i2 > 0) {
sb.append(", ");
}
sb.append(keyAt(i2));
sb.append(nb.T);
E valueAt = valueAt(i2);
if (valueAt != sb) {
sb.append(valueAt);
} else {
sb.append("(this Map)");
}
}
sb.append('}');
String sb2 = sb.toString();
Intrinsics.checkNotNullExpressionValue(sb2, "StringBuilder(capacity).…builderAction).toString()");
return sb2;
}
}

View File

@@ -0,0 +1,41 @@
package androidx.collection;
import java.util.Iterator;
import kotlin.jvm.internal.markers.KMappedMarker;
/* JADX INFO: Add missing generic type declarations: [T] */
/* loaded from: classes.dex */
public final class LongSparseArrayKt$valueIterator$1<T> implements Iterator<T>, KMappedMarker {
final /* synthetic */ LongSparseArray<T> $this_valueIterator;
private int index;
public final int getIndex() {
return this.index;
}
@Override // java.util.Iterator
public void remove() {
throw new UnsupportedOperationException("Operation is not supported for read-only collection");
}
public final void setIndex(int i) {
this.index = i;
}
public LongSparseArrayKt$valueIterator$1(LongSparseArray<T> longSparseArray) {
this.$this_valueIterator = longSparseArray;
}
@Override // java.util.Iterator
public boolean hasNext() {
return this.index < this.$this_valueIterator.size();
}
@Override // java.util.Iterator
public T next() {
LongSparseArray<T> longSparseArray = this.$this_valueIterator;
int i = this.index;
this.index = i + 1;
return longSparseArray.valueAt(i);
}
}

View File

@@ -0,0 +1,532 @@
package androidx.collection;
import androidx.collection.internal.ContainerHelpersKt;
import com.applovin.impl.sdk.utils.JsonUtils;
import com.ironsource.nb;
import java.util.Arrays;
import java.util.Iterator;
import kotlin.collections.ArraysKt___ArraysJvmKt;
import kotlin.collections.LongIterator;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
@SourceDebugExtension({"SMAP\nLongSparseArray.kt\nKotlin\n*S Kotlin\n*F\n+ 1 LongSparseArray.kt\nandroidx/collection/LongSparseArrayKt\n*L\n1#1,606:1\n256#1,6:607\n256#1,6:613\n328#1,18:619\n328#1,18:637\n328#1,18:655\n328#1,18:673\n328#1,18:691\n328#1,18:709\n328#1,18:727\n328#1,18:745\n*S KotlinDebug\n*F\n+ 1 LongSparseArray.kt\nandroidx/collection/LongSparseArrayKt\n*L\n243#1:607,6\n248#1:613,6\n360#1:619,18\n410#1:637,18\n425#1:655,18\n437#1:673,18\n451#1:691,18\n459#1:709,18\n467#1:727,18\n505#1:745,18\n*E\n"})
/* loaded from: classes.dex */
public final class LongSparseArrayKt {
private static final Object DELETED = new Object();
public static /* synthetic */ void getSize$annotations(LongSparseArray longSparseArray) {
}
public static final <E> E commonGet(LongSparseArray<E> longSparseArray, long j) {
Intrinsics.checkNotNullParameter(longSparseArray, "<this>");
int binarySearch = ContainerHelpersKt.binarySearch(longSparseArray.keys, longSparseArray.size, j);
if (binarySearch < 0 || longSparseArray.values[binarySearch] == DELETED) {
return null;
}
return (E) longSparseArray.values[binarySearch];
}
public static final <E> E commonGet(LongSparseArray<E> longSparseArray, long j, E e) {
Intrinsics.checkNotNullParameter(longSparseArray, "<this>");
int binarySearch = ContainerHelpersKt.binarySearch(longSparseArray.keys, longSparseArray.size, j);
return (binarySearch < 0 || longSparseArray.values[binarySearch] == DELETED) ? e : (E) longSparseArray.values[binarySearch];
}
public static final <T extends E, E> T commonGetInternal(LongSparseArray<E> longSparseArray, long j, T t) {
Intrinsics.checkNotNullParameter(longSparseArray, "<this>");
int binarySearch = ContainerHelpersKt.binarySearch(longSparseArray.keys, longSparseArray.size, j);
return (binarySearch < 0 || longSparseArray.values[binarySearch] == DELETED) ? t : (T) longSparseArray.values[binarySearch];
}
public static final <E> void commonRemove(LongSparseArray<E> longSparseArray, long j) {
Intrinsics.checkNotNullParameter(longSparseArray, "<this>");
int binarySearch = ContainerHelpersKt.binarySearch(longSparseArray.keys, longSparseArray.size, j);
if (binarySearch < 0 || longSparseArray.values[binarySearch] == DELETED) {
return;
}
longSparseArray.values[binarySearch] = DELETED;
longSparseArray.garbage = true;
}
public static final <E> boolean commonRemove(LongSparseArray<E> longSparseArray, long j, E e) {
Intrinsics.checkNotNullParameter(longSparseArray, "<this>");
int indexOfKey = longSparseArray.indexOfKey(j);
if (indexOfKey < 0 || !Intrinsics.areEqual(e, longSparseArray.valueAt(indexOfKey))) {
return false;
}
longSparseArray.removeAt(indexOfKey);
return true;
}
public static final <E> void commonRemoveAt(LongSparseArray<E> longSparseArray, int i) {
Intrinsics.checkNotNullParameter(longSparseArray, "<this>");
if (longSparseArray.values[i] != DELETED) {
longSparseArray.values[i] = DELETED;
longSparseArray.garbage = true;
}
}
public static final <E> E commonReplace(LongSparseArray<E> longSparseArray, long j, E e) {
Intrinsics.checkNotNullParameter(longSparseArray, "<this>");
int indexOfKey = longSparseArray.indexOfKey(j);
if (indexOfKey < 0) {
return null;
}
Object[] objArr = longSparseArray.values;
E e2 = (E) objArr[indexOfKey];
objArr[indexOfKey] = e;
return e2;
}
public static final <E> boolean commonReplace(LongSparseArray<E> longSparseArray, long j, E e, E e2) {
Intrinsics.checkNotNullParameter(longSparseArray, "<this>");
int indexOfKey = longSparseArray.indexOfKey(j);
if (indexOfKey < 0 || !Intrinsics.areEqual(longSparseArray.values[indexOfKey], e)) {
return false;
}
longSparseArray.values[indexOfKey] = e2;
return true;
}
public static final <E> void commonGc(LongSparseArray<E> longSparseArray) {
Intrinsics.checkNotNullParameter(longSparseArray, "<this>");
int i = longSparseArray.size;
long[] jArr = longSparseArray.keys;
Object[] objArr = longSparseArray.values;
int i2 = 0;
for (int i3 = 0; i3 < i; i3++) {
Object obj = objArr[i3];
if (obj != DELETED) {
if (i3 != i2) {
jArr[i2] = jArr[i3];
objArr[i2] = obj;
objArr[i3] = null;
}
i2++;
}
}
longSparseArray.garbage = false;
longSparseArray.size = i2;
}
public static final <E> void commonPut(LongSparseArray<E> longSparseArray, long j, E e) {
Intrinsics.checkNotNullParameter(longSparseArray, "<this>");
int binarySearch = ContainerHelpersKt.binarySearch(longSparseArray.keys, longSparseArray.size, j);
if (binarySearch >= 0) {
longSparseArray.values[binarySearch] = e;
return;
}
int i = ~binarySearch;
if (i < longSparseArray.size && longSparseArray.values[i] == DELETED) {
longSparseArray.keys[i] = j;
longSparseArray.values[i] = e;
return;
}
if (longSparseArray.garbage) {
int i2 = longSparseArray.size;
long[] jArr = longSparseArray.keys;
if (i2 >= jArr.length) {
Object[] objArr = longSparseArray.values;
int i3 = 0;
for (int i4 = 0; i4 < i2; i4++) {
Object obj = objArr[i4];
if (obj != DELETED) {
if (i4 != i3) {
jArr[i3] = jArr[i4];
objArr[i3] = obj;
objArr[i4] = null;
}
i3++;
}
}
longSparseArray.garbage = false;
longSparseArray.size = i3;
i = ~ContainerHelpersKt.binarySearch(longSparseArray.keys, i3, j);
}
}
int i5 = longSparseArray.size;
if (i5 >= longSparseArray.keys.length) {
int idealLongArraySize = ContainerHelpersKt.idealLongArraySize(i5 + 1);
long[] copyOf = Arrays.copyOf(longSparseArray.keys, idealLongArraySize);
Intrinsics.checkNotNullExpressionValue(copyOf, "copyOf(this, newSize)");
longSparseArray.keys = copyOf;
Object[] copyOf2 = Arrays.copyOf(longSparseArray.values, idealLongArraySize);
Intrinsics.checkNotNullExpressionValue(copyOf2, "copyOf(this, newSize)");
longSparseArray.values = copyOf2;
}
int i6 = longSparseArray.size;
if (i6 - i != 0) {
long[] jArr2 = longSparseArray.keys;
int i7 = i + 1;
ArraysKt___ArraysJvmKt.copyInto(jArr2, jArr2, i7, i, i6);
Object[] objArr2 = longSparseArray.values;
ArraysKt___ArraysJvmKt.copyInto(objArr2, objArr2, i7, i, longSparseArray.size);
}
longSparseArray.keys[i] = j;
longSparseArray.values[i] = e;
longSparseArray.size++;
}
public static final <E> void commonPutAll(LongSparseArray<E> longSparseArray, LongSparseArray<? extends E> other) {
Intrinsics.checkNotNullParameter(longSparseArray, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
int size = other.size();
for (int i = 0; i < size; i++) {
longSparseArray.put(other.keyAt(i), other.valueAt(i));
}
}
public static final <E> E commonPutIfAbsent(LongSparseArray<E> longSparseArray, long j, E e) {
Intrinsics.checkNotNullParameter(longSparseArray, "<this>");
E e2 = longSparseArray.get(j);
if (e2 == null) {
longSparseArray.put(j, e);
}
return e2;
}
public static final <E> int commonSize(LongSparseArray<E> longSparseArray) {
Intrinsics.checkNotNullParameter(longSparseArray, "<this>");
if (longSparseArray.garbage) {
int i = longSparseArray.size;
long[] jArr = longSparseArray.keys;
Object[] objArr = longSparseArray.values;
int i2 = 0;
for (int i3 = 0; i3 < i; i3++) {
Object obj = objArr[i3];
if (obj != DELETED) {
if (i3 != i2) {
jArr[i2] = jArr[i3];
objArr[i2] = obj;
objArr[i3] = null;
}
i2++;
}
}
longSparseArray.garbage = false;
longSparseArray.size = i2;
}
return longSparseArray.size;
}
public static final <E> boolean commonIsEmpty(LongSparseArray<E> longSparseArray) {
Intrinsics.checkNotNullParameter(longSparseArray, "<this>");
return longSparseArray.size() == 0;
}
public static final <E> long commonKeyAt(LongSparseArray<E> longSparseArray, int i) {
int i2;
Intrinsics.checkNotNullParameter(longSparseArray, "<this>");
if (i < 0 || i >= (i2 = longSparseArray.size)) {
throw new IllegalArgumentException(("Expected index to be within 0..size()-1, but was " + i).toString());
}
if (longSparseArray.garbage) {
long[] jArr = longSparseArray.keys;
Object[] objArr = longSparseArray.values;
int i3 = 0;
for (int i4 = 0; i4 < i2; i4++) {
Object obj = objArr[i4];
if (obj != DELETED) {
if (i4 != i3) {
jArr[i3] = jArr[i4];
objArr[i3] = obj;
objArr[i4] = null;
}
i3++;
}
}
longSparseArray.garbage = false;
longSparseArray.size = i3;
}
return longSparseArray.keys[i];
}
public static final <E> E commonValueAt(LongSparseArray<E> longSparseArray, int i) {
int i2;
Intrinsics.checkNotNullParameter(longSparseArray, "<this>");
if (i < 0 || i >= (i2 = longSparseArray.size)) {
throw new IllegalArgumentException(("Expected index to be within 0..size()-1, but was " + i).toString());
}
if (longSparseArray.garbage) {
long[] jArr = longSparseArray.keys;
Object[] objArr = longSparseArray.values;
int i3 = 0;
for (int i4 = 0; i4 < i2; i4++) {
Object obj = objArr[i4];
if (obj != DELETED) {
if (i4 != i3) {
jArr[i3] = jArr[i4];
objArr[i3] = obj;
objArr[i4] = null;
}
i3++;
}
}
longSparseArray.garbage = false;
longSparseArray.size = i3;
}
return (E) longSparseArray.values[i];
}
public static final <E> void commonSetValueAt(LongSparseArray<E> longSparseArray, int i, E e) {
int i2;
Intrinsics.checkNotNullParameter(longSparseArray, "<this>");
if (i < 0 || i >= (i2 = longSparseArray.size)) {
throw new IllegalArgumentException(("Expected index to be within 0..size()-1, but was " + i).toString());
}
if (longSparseArray.garbage) {
long[] jArr = longSparseArray.keys;
Object[] objArr = longSparseArray.values;
int i3 = 0;
for (int i4 = 0; i4 < i2; i4++) {
Object obj = objArr[i4];
if (obj != DELETED) {
if (i4 != i3) {
jArr[i3] = jArr[i4];
objArr[i3] = obj;
objArr[i4] = null;
}
i3++;
}
}
longSparseArray.garbage = false;
longSparseArray.size = i3;
}
longSparseArray.values[i] = e;
}
public static final <E> int commonIndexOfKey(LongSparseArray<E> longSparseArray, long j) {
Intrinsics.checkNotNullParameter(longSparseArray, "<this>");
if (longSparseArray.garbage) {
int i = longSparseArray.size;
long[] jArr = longSparseArray.keys;
Object[] objArr = longSparseArray.values;
int i2 = 0;
for (int i3 = 0; i3 < i; i3++) {
Object obj = objArr[i3];
if (obj != DELETED) {
if (i3 != i2) {
jArr[i2] = jArr[i3];
objArr[i2] = obj;
objArr[i3] = null;
}
i2++;
}
}
longSparseArray.garbage = false;
longSparseArray.size = i2;
}
return ContainerHelpersKt.binarySearch(longSparseArray.keys, longSparseArray.size, j);
}
public static final <E> int commonIndexOfValue(LongSparseArray<E> longSparseArray, E e) {
Intrinsics.checkNotNullParameter(longSparseArray, "<this>");
if (longSparseArray.garbage) {
int i = longSparseArray.size;
long[] jArr = longSparseArray.keys;
Object[] objArr = longSparseArray.values;
int i2 = 0;
for (int i3 = 0; i3 < i; i3++) {
Object obj = objArr[i3];
if (obj != DELETED) {
if (i3 != i2) {
jArr[i2] = jArr[i3];
objArr[i2] = obj;
objArr[i3] = null;
}
i2++;
}
}
longSparseArray.garbage = false;
longSparseArray.size = i2;
}
int i4 = longSparseArray.size;
for (int i5 = 0; i5 < i4; i5++) {
if (longSparseArray.values[i5] == e) {
return i5;
}
}
return -1;
}
public static final <E> boolean commonContainsKey(LongSparseArray<E> longSparseArray, long j) {
Intrinsics.checkNotNullParameter(longSparseArray, "<this>");
return longSparseArray.indexOfKey(j) >= 0;
}
public static final <E> boolean commonContainsValue(LongSparseArray<E> longSparseArray, E e) {
Intrinsics.checkNotNullParameter(longSparseArray, "<this>");
return longSparseArray.indexOfValue(e) >= 0;
}
public static final <E> void commonClear(LongSparseArray<E> longSparseArray) {
Intrinsics.checkNotNullParameter(longSparseArray, "<this>");
int i = longSparseArray.size;
Object[] objArr = longSparseArray.values;
for (int i2 = 0; i2 < i; i2++) {
objArr[i2] = null;
}
longSparseArray.size = 0;
longSparseArray.garbage = false;
}
public static final <E> void commonAppend(LongSparseArray<E> longSparseArray, long j, E e) {
Intrinsics.checkNotNullParameter(longSparseArray, "<this>");
int i = longSparseArray.size;
if (i != 0 && j <= longSparseArray.keys[i - 1]) {
longSparseArray.put(j, e);
return;
}
if (longSparseArray.garbage) {
long[] jArr = longSparseArray.keys;
if (i >= jArr.length) {
Object[] objArr = longSparseArray.values;
int i2 = 0;
for (int i3 = 0; i3 < i; i3++) {
Object obj = objArr[i3];
if (obj != DELETED) {
if (i3 != i2) {
jArr[i2] = jArr[i3];
objArr[i2] = obj;
objArr[i3] = null;
}
i2++;
}
}
longSparseArray.garbage = false;
longSparseArray.size = i2;
}
}
int i4 = longSparseArray.size;
if (i4 >= longSparseArray.keys.length) {
int idealLongArraySize = ContainerHelpersKt.idealLongArraySize(i4 + 1);
long[] copyOf = Arrays.copyOf(longSparseArray.keys, idealLongArraySize);
Intrinsics.checkNotNullExpressionValue(copyOf, "copyOf(this, newSize)");
longSparseArray.keys = copyOf;
Object[] copyOf2 = Arrays.copyOf(longSparseArray.values, idealLongArraySize);
Intrinsics.checkNotNullExpressionValue(copyOf2, "copyOf(this, newSize)");
longSparseArray.values = copyOf2;
}
longSparseArray.keys[i4] = j;
longSparseArray.values[i4] = e;
longSparseArray.size = i4 + 1;
}
public static final <E> String commonToString(LongSparseArray<E> longSparseArray) {
Intrinsics.checkNotNullParameter(longSparseArray, "<this>");
if (longSparseArray.size() <= 0) {
return JsonUtils.EMPTY_JSON;
}
StringBuilder sb = new StringBuilder(longSparseArray.size * 28);
sb.append('{');
int i = longSparseArray.size;
for (int i2 = 0; i2 < i; i2++) {
if (i2 > 0) {
sb.append(", ");
}
sb.append(longSparseArray.keyAt(i2));
sb.append(nb.T);
E valueAt = longSparseArray.valueAt(i2);
if (valueAt != sb) {
sb.append(valueAt);
} else {
sb.append("(this Map)");
}
}
sb.append('}');
String sb2 = sb.toString();
Intrinsics.checkNotNullExpressionValue(sb2, "StringBuilder(capacity).…builderAction).toString()");
return sb2;
}
public static final <T> int getSize(LongSparseArray<T> longSparseArray) {
Intrinsics.checkNotNullParameter(longSparseArray, "<this>");
return longSparseArray.size();
}
public static final <T> boolean contains(LongSparseArray<T> longSparseArray, long j) {
Intrinsics.checkNotNullParameter(longSparseArray, "<this>");
return longSparseArray.containsKey(j);
}
public static final <T> void set(LongSparseArray<T> longSparseArray, long j, T t) {
Intrinsics.checkNotNullParameter(longSparseArray, "<this>");
longSparseArray.put(j, t);
}
public static final <T> LongSparseArray<T> plus(LongSparseArray<T> longSparseArray, LongSparseArray<T> other) {
Intrinsics.checkNotNullParameter(longSparseArray, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
LongSparseArray<T> longSparseArray2 = new LongSparseArray<>(longSparseArray.size() + other.size());
longSparseArray2.putAll(longSparseArray);
longSparseArray2.putAll(other);
return longSparseArray2;
}
public static final <T> T getOrDefault(LongSparseArray<T> longSparseArray, long j, T t) {
Intrinsics.checkNotNullParameter(longSparseArray, "<this>");
return longSparseArray.get(j, t);
}
public static final <T> T getOrElse(LongSparseArray<T> longSparseArray, long j, Function0 defaultValue) {
Intrinsics.checkNotNullParameter(longSparseArray, "<this>");
Intrinsics.checkNotNullParameter(defaultValue, "defaultValue");
T t = longSparseArray.get(j);
return t == null ? (T) defaultValue.invoke() : t;
}
public static final <T> boolean isNotEmpty(LongSparseArray<T> longSparseArray) {
Intrinsics.checkNotNullParameter(longSparseArray, "<this>");
return !longSparseArray.isEmpty();
}
public static final /* synthetic */ boolean remove(LongSparseArray longSparseArray, long j, Object obj) {
Intrinsics.checkNotNullParameter(longSparseArray, "<this>");
return longSparseArray.remove(j, obj);
}
public static final <T> void forEach(LongSparseArray<T> longSparseArray, Function2 action) {
Intrinsics.checkNotNullParameter(longSparseArray, "<this>");
Intrinsics.checkNotNullParameter(action, "action");
int size = longSparseArray.size();
for (int i = 0; i < size; i++) {
action.invoke(Long.valueOf(longSparseArray.keyAt(i)), longSparseArray.valueAt(i));
}
}
public static final <T> LongIterator keyIterator(final LongSparseArray<T> longSparseArray) {
Intrinsics.checkNotNullParameter(longSparseArray, "<this>");
return new LongIterator() { // from class: androidx.collection.LongSparseArrayKt$keyIterator$1
private int index;
public final int getIndex() {
return this.index;
}
public final void setIndex(int i) {
this.index = i;
}
@Override // java.util.Iterator
public boolean hasNext() {
return this.index < longSparseArray.size();
}
@Override // kotlin.collections.LongIterator
public long nextLong() {
LongSparseArray<T> longSparseArray2 = longSparseArray;
int i = this.index;
this.index = i + 1;
return longSparseArray2.keyAt(i);
}
};
}
public static final <T> Iterator<T> valueIterator(LongSparseArray<T> longSparseArray) {
Intrinsics.checkNotNullParameter(longSparseArray, "<this>");
return new LongSparseArrayKt$valueIterator$1(longSparseArray);
}
}

View File

@@ -0,0 +1,318 @@
package androidx.collection;
import androidx.annotation.IntRange;
import androidx.collection.internal.Lock;
import androidx.collection.internal.LruHashMap;
import com.ironsource.nb;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Map;
import kotlin.Unit;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
@SourceDebugExtension({"SMAP\nLruCache.kt\nKotlin\n*S Kotlin\n*F\n+ 1 LruCache.kt\nandroidx/collection/LruCache\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n+ 3 LockExt.kt\nandroidx/collection/internal/LockExtKt\n+ 4 Lock.jvm.kt\nandroidx/collection/internal/Lock\n+ 5 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n*L\n1#1,355:1\n1#2:356\n23#3,3:357\n23#3,3:361\n23#3,3:365\n23#3,3:369\n23#3,3:373\n23#3,3:377\n23#3,3:381\n23#3,3:385\n23#3,3:389\n23#3,3:393\n23#3,3:397\n23#3,3:401\n23#3,3:405\n23#3,3:409\n23#3,3:415\n26#4:360\n26#4:364\n26#4:368\n26#4:372\n26#4:376\n26#4:380\n26#4:384\n26#4:388\n26#4:392\n26#4:396\n26#4:400\n26#4:404\n26#4:408\n26#4:412\n26#4:418\n1855#5,2:413\n*S KotlinDebug\n*F\n+ 1 LruCache.kt\nandroidx/collection/LruCache\n*L\n65#1:357,3\n78#1:361,3\n95#1:365,3\n122#1:369,3\n151#1:373,3\n180#1:377,3\n255#1:381,3\n262#1:385,3\n268#1:389,3\n274#1:393,3\n279#1:397,3\n284#1:401,3\n289#1:405,3\n299#1:409,3\n308#1:415,3\n65#1:360\n78#1:364\n95#1:368\n122#1:372\n151#1:376\n180#1:380\n255#1:384\n262#1:388\n268#1:392\n274#1:396\n279#1:400\n284#1:404\n289#1:408\n299#1:412\n308#1:418\n300#1:413,2\n*E\n"})
/* loaded from: classes.dex */
public class LruCache<K, V> {
private int createCount;
private int evictionCount;
private int hitCount;
private final Lock lock;
private final LruHashMap<K, V> map;
private int maxSize;
private int missCount;
private int putCount;
private int size;
public V create(K key) {
Intrinsics.checkNotNullParameter(key, "key");
return null;
}
public void entryRemoved(boolean z, K key, V oldValue, V v) {
Intrinsics.checkNotNullParameter(key, "key");
Intrinsics.checkNotNullParameter(oldValue, "oldValue");
}
public int sizeOf(K key, V value) {
Intrinsics.checkNotNullParameter(key, "key");
Intrinsics.checkNotNullParameter(value, "value");
return 1;
}
public final int createCount() {
int i;
synchronized (this.lock) {
i = this.createCount;
}
return i;
}
public final int evictionCount() {
int i;
synchronized (this.lock) {
i = this.evictionCount;
}
return i;
}
public final V get(K key) {
V v;
Intrinsics.checkNotNullParameter(key, "key");
synchronized (this.lock) {
V v2 = this.map.get(key);
if (v2 != null) {
this.hitCount++;
return v2;
}
this.missCount++;
V create = create(key);
if (create == null) {
return null;
}
synchronized (this.lock) {
try {
this.createCount++;
v = (V) this.map.put(key, create);
if (v != null) {
this.map.put(key, v);
} else {
this.size += safeSizeOf(key, create);
Unit unit = Unit.INSTANCE;
}
} catch (Throwable th) {
throw th;
}
}
if (v != null) {
entryRemoved(false, key, create, v);
return v;
}
trimToSize(this.maxSize);
return create;
}
}
public final int hitCount() {
int i;
synchronized (this.lock) {
i = this.hitCount;
}
return i;
}
public final int maxSize() {
int i;
synchronized (this.lock) {
i = this.maxSize;
}
return i;
}
public final int missCount() {
int i;
synchronized (this.lock) {
i = this.missCount;
}
return i;
}
public final V put(K key, V value) {
V put;
Intrinsics.checkNotNullParameter(key, "key");
Intrinsics.checkNotNullParameter(value, "value");
synchronized (this.lock) {
try {
this.putCount++;
this.size += safeSizeOf(key, value);
put = this.map.put(key, value);
if (put != null) {
this.size -= safeSizeOf(key, put);
}
Unit unit = Unit.INSTANCE;
} catch (Throwable th) {
throw th;
}
}
if (put != null) {
entryRemoved(false, key, put, value);
}
trimToSize(this.maxSize);
return put;
}
public final int putCount() {
int i;
synchronized (this.lock) {
i = this.putCount;
}
return i;
}
public final V remove(K key) {
V remove;
Intrinsics.checkNotNullParameter(key, "key");
synchronized (this.lock) {
try {
remove = this.map.remove(key);
if (remove != null) {
this.size -= safeSizeOf(key, remove);
}
Unit unit = Unit.INSTANCE;
} catch (Throwable th) {
throw th;
}
}
if (remove != null) {
entryRemoved(false, key, remove, null);
}
return remove;
}
public void resize(@IntRange(from = 1, to = Long.MAX_VALUE) int i) {
if (i > 0) {
synchronized (this.lock) {
this.maxSize = i;
Unit unit = Unit.INSTANCE;
}
trimToSize(i);
return;
}
throw new IllegalArgumentException("maxSize <= 0".toString());
}
public final int size() {
int i;
synchronized (this.lock) {
i = this.size;
}
return i;
}
public String toString() {
String str;
synchronized (this.lock) {
try {
int i = this.hitCount;
int i2 = this.missCount + i;
str = "LruCache[maxSize=" + this.maxSize + ",hits=" + this.hitCount + ",misses=" + this.missCount + ",hitRate=" + (i2 != 0 ? (i * 100) / i2 : 0) + "%]";
} catch (Throwable th) {
throw th;
}
}
return str;
}
/* JADX WARN: Code restructure failed: missing block: B:13:0x0062, code lost:
throw new java.lang.IllegalStateException("LruCache.sizeOf() is reporting inconsistent results!".toString());
*/
/* JADX WARN: Multi-variable type inference failed */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public void trimToSize(int r6) {
/*
r5 = this;
L0:
androidx.collection.internal.Lock r0 = r5.lock
monitor-enter(r0)
int r1 = r5.size // Catch: java.lang.Throwable -> L14
if (r1 < 0) goto L57
androidx.collection.internal.LruHashMap<K, V> r1 = r5.map // Catch: java.lang.Throwable -> L14
boolean r1 = r1.isEmpty() // Catch: java.lang.Throwable -> L14
if (r1 == 0) goto L16
int r1 = r5.size // Catch: java.lang.Throwable -> L14
if (r1 != 0) goto L57
goto L16
L14:
r6 = move-exception
goto L63
L16:
int r1 = r5.size // Catch: java.lang.Throwable -> L14
if (r1 <= r6) goto L55
androidx.collection.internal.LruHashMap<K, V> r1 = r5.map // Catch: java.lang.Throwable -> L14
boolean r1 = r1.isEmpty() // Catch: java.lang.Throwable -> L14
if (r1 == 0) goto L23
goto L55
L23:
androidx.collection.internal.LruHashMap<K, V> r1 = r5.map // Catch: java.lang.Throwable -> L14
java.util.Set r1 = r1.getEntries() // Catch: java.lang.Throwable -> L14
java.lang.Object r1 = kotlin.collections.CollectionsKt.firstOrNull(r1) // Catch: java.lang.Throwable -> L14
java.util.Map$Entry r1 = (java.util.Map.Entry) r1 // Catch: java.lang.Throwable -> L14
if (r1 != 0) goto L33
monitor-exit(r0)
return
L33:
java.lang.Object r2 = r1.getKey() // Catch: java.lang.Throwable -> L14
java.lang.Object r1 = r1.getValue() // Catch: java.lang.Throwable -> L14
androidx.collection.internal.LruHashMap<K, V> r3 = r5.map // Catch: java.lang.Throwable -> L14
r3.remove(r2) // Catch: java.lang.Throwable -> L14
int r3 = r5.size // Catch: java.lang.Throwable -> L14
int r4 = r5.safeSizeOf(r2, r1) // Catch: java.lang.Throwable -> L14
int r3 = r3 - r4
r5.size = r3 // Catch: java.lang.Throwable -> L14
int r3 = r5.evictionCount // Catch: java.lang.Throwable -> L14
r4 = 1
int r3 = r3 + r4
r5.evictionCount = r3 // Catch: java.lang.Throwable -> L14
monitor-exit(r0)
r0 = 0
r5.entryRemoved(r4, r2, r1, r0)
goto L0
L55:
monitor-exit(r0)
return
L57:
java.lang.String r6 = "LruCache.sizeOf() is reporting inconsistent results!"
java.lang.IllegalStateException r1 = new java.lang.IllegalStateException // Catch: java.lang.Throwable -> L14
java.lang.String r6 = r6.toString() // Catch: java.lang.Throwable -> L14
r1.<init>(r6) // Catch: java.lang.Throwable -> L14
throw r1 // Catch: java.lang.Throwable -> L14
L63:
monitor-exit(r0)
throw r6
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.collection.LruCache.trimToSize(int):void");
}
public LruCache(@IntRange(from = 1, to = Long.MAX_VALUE) int i) {
this.maxSize = i;
if (i <= 0) {
throw new IllegalArgumentException("maxSize <= 0".toString());
}
this.map = new LruHashMap<>(0, 0.75f);
this.lock = new Lock();
}
private final int safeSizeOf(K k, V v) {
int sizeOf = sizeOf(k, v);
if (sizeOf >= 0) {
return sizeOf;
}
throw new IllegalStateException(("Negative size: " + k + nb.T + v).toString());
}
public final void evictAll() {
trimToSize(-1);
}
/* JADX WARN: Multi-variable type inference failed */
public final Map<K, V> snapshot() {
LinkedHashMap linkedHashMap = new LinkedHashMap();
synchronized (this.lock) {
try {
Iterator<T> it = this.map.getEntries().iterator();
while (it.hasNext()) {
Map.Entry entry = (Map.Entry) it.next();
linkedHashMap.put(entry.getKey(), entry.getValue());
}
Unit unit = Unit.INSTANCE;
} catch (Throwable th) {
throw th;
}
}
return linkedHashMap;
}
}

View File

@@ -0,0 +1,44 @@
package androidx.collection;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.functions.Function4;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
/* JADX INFO: Add missing generic type declarations: [V, K] */
@SourceDebugExtension({"SMAP\nLruCache.kt\nKotlin\n*S Kotlin\n*F\n+ 1 LruCache.kt\nandroidx/collection/LruCacheKt$lruCache$4\n*L\n1#1,355:1\n*E\n"})
/* loaded from: classes.dex */
public final class LruCacheKt$lruCache$4<K, V> extends LruCache<K, V> {
final /* synthetic */ Function1 $create;
final /* synthetic */ Function4 $onEntryRemoved;
final /* synthetic */ Function2 $sizeOf;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public LruCacheKt$lruCache$4(int i, Function2 function2, Function1 function1, Function4 function4) {
super(i);
this.$sizeOf = function2;
this.$create = function1;
this.$onEntryRemoved = function4;
}
@Override // androidx.collection.LruCache
public int sizeOf(K key, V value) {
Intrinsics.checkNotNullParameter(key, "key");
Intrinsics.checkNotNullParameter(value, "value");
return ((Number) this.$sizeOf.invoke(key, value)).intValue();
}
@Override // androidx.collection.LruCache
public V create(K key) {
Intrinsics.checkNotNullParameter(key, "key");
return (V) this.$create.invoke(key);
}
@Override // androidx.collection.LruCache
public void entryRemoved(boolean z, K key, V oldValue, V v) {
Intrinsics.checkNotNullParameter(key, "key");
Intrinsics.checkNotNullParameter(oldValue, "oldValue");
this.$onEntryRemoved.invoke(Boolean.valueOf(z), key, oldValue, v);
}
}

View File

@@ -0,0 +1,57 @@
package androidx.collection;
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.functions.Function4;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes.dex */
public final class LruCacheKt {
public static /* synthetic */ LruCache lruCache$default(int i, Function2 sizeOf, Function1 create, Function4 onEntryRemoved, int i2, Object obj) {
if ((i2 & 2) != 0) {
sizeOf = new Function2() { // from class: androidx.collection.LruCacheKt$lruCache$1
@Override // kotlin.jvm.functions.Function2
public final Integer invoke(Object obj2, Object obj3) {
Intrinsics.checkNotNullParameter(obj2, "<anonymous parameter 0>");
Intrinsics.checkNotNullParameter(obj3, "<anonymous parameter 1>");
return 1;
}
};
}
if ((i2 & 4) != 0) {
create = new Function1() { // from class: androidx.collection.LruCacheKt$lruCache$2
@Override // kotlin.jvm.functions.Function1
public final Object invoke(Object it) {
Intrinsics.checkNotNullParameter(it, "it");
return null;
}
};
}
if ((i2 & 8) != 0) {
onEntryRemoved = new Function4() { // from class: androidx.collection.LruCacheKt$lruCache$3
public final void invoke(boolean z, Object obj2, Object obj3, Object obj4) {
Intrinsics.checkNotNullParameter(obj2, "<anonymous parameter 1>");
Intrinsics.checkNotNullParameter(obj3, "<anonymous parameter 2>");
}
@Override // kotlin.jvm.functions.Function4
public /* bridge */ /* synthetic */ Object invoke(Object obj2, Object obj3, Object obj4, Object obj5) {
invoke(((Boolean) obj2).booleanValue(), obj3, obj4, obj5);
return Unit.INSTANCE;
}
};
}
Intrinsics.checkNotNullParameter(sizeOf, "sizeOf");
Intrinsics.checkNotNullParameter(create, "create");
Intrinsics.checkNotNullParameter(onEntryRemoved, "onEntryRemoved");
return new LruCacheKt$lruCache$4(i, sizeOf, create, onEntryRemoved);
}
public static final <K, V> LruCache<K, V> lruCache(int i, Function2 sizeOf, Function1 create, Function4 onEntryRemoved) {
Intrinsics.checkNotNullParameter(sizeOf, "sizeOf");
Intrinsics.checkNotNullParameter(create, "create");
Intrinsics.checkNotNullParameter(onEntryRemoved, "onEntryRemoved");
return new LruCacheKt$lruCache$4(i, sizeOf, create, onEntryRemoved);
}
}

View File

@@ -0,0 +1,30 @@
package androidx.collection;
import java.util.Map;
import kotlin.jvm.internal.markers.KMappedMarker;
/* loaded from: classes.dex */
final class MapEntry<K, V> implements Map.Entry<K, V>, KMappedMarker {
private final K key;
private final V value;
@Override // java.util.Map.Entry
public K getKey() {
return this.key;
}
@Override // java.util.Map.Entry
public V getValue() {
return this.value;
}
@Override // java.util.Map.Entry
public V setValue(V v) {
throw new UnsupportedOperationException("Operation is not supported for read-only collection");
}
public MapEntry(K k, V v) {
this.key = k;
this.value = v;
}
}

View File

@@ -0,0 +1,417 @@
package androidx.collection;
import kotlin.ULong;
import kotlin.collections.ArraysKt___ArraysJvmKt;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
@SourceDebugExtension({"SMAP\nFloatFloatMap.kt\nKotlin\n*S Kotlin\n*F\n+ 1 FloatFloatMap.kt\nandroidx/collection/MutableFloatFloatMap\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n+ 3 ScatterMap.kt\nandroidx/collection/ScatterMapKt\n+ 4 FloatFloatMap.kt\nandroidx/collection/FloatFloatMap\n+ 5 FloatSet.kt\nandroidx/collection/FloatSet\n+ 6 FloatList.kt\nandroidx/collection/FloatList\n+ 7 FloatSet.kt\nandroidx/collection/FloatSetKt\n*L\n1#1,1047:1\n1037#1,2:1134\n1041#1,5:1142\n1037#1,2:1173\n1041#1,5:1181\n1037#1,2:1198\n1041#1,5:1206\n1037#1,2:1212\n1041#1,5:1220\n1#2:1048\n1672#3,6:1049\n1826#3:1065\n1688#3:1069\n1826#3:1087\n1688#3:1091\n1826#3:1112\n1688#3:1116\n1672#3,6:1136\n1672#3,6:1147\n1615#3:1156\n1619#3:1157\n1795#3,3:1158\n1809#3,3:1161\n1733#3:1164\n1721#3:1165\n1715#3:1166\n1728#3:1167\n1818#3:1168\n1682#3:1169\n1661#3:1170\n1680#3:1171\n1661#3:1172\n1672#3,6:1175\n1795#3,3:1186\n1826#3:1189\n1715#3:1190\n1685#3:1191\n1661#3:1192\n1615#3:1196\n1619#3:1197\n1672#3,6:1200\n1661#3:1211\n1672#3,6:1214\n1672#3,6:1225\n1672#3,6:1231\n385#4,4:1055\n357#4,6:1059\n367#4,3:1066\n370#4,2:1070\n389#4,2:1072\n373#4,6:1074\n391#4:1080\n357#4,6:1081\n367#4,3:1088\n370#4,9:1092\n262#5,4:1101\n232#5,7:1105\n243#5,3:1113\n246#5,2:1117\n266#5,2:1119\n249#5,6:1121\n268#5:1127\n253#6,6:1128\n849#7,3:1153\n849#7,3:1193\n*S KotlinDebug\n*F\n+ 1 FloatFloatMap.kt\nandroidx/collection/MutableFloatFloatMap\n*L\n875#1:1134,2\n875#1:1142,5\n933#1:1173,2\n933#1:1181,5\n1007#1:1198,2\n1007#1:1206,5\n1023#1:1212,2\n1023#1:1220,5\n711#1:1049,6\n789#1:1065\n789#1:1069\n828#1:1087\n828#1:1091\n855#1:1112\n855#1:1116\n875#1:1136,6\n885#1:1147,6\n899#1:1156\n900#1:1157\n907#1:1158,3\n908#1:1161,3\n909#1:1164\n910#1:1165\n910#1:1166\n914#1:1167\n917#1:1168\n926#1:1169\n926#1:1170\n932#1:1171\n932#1:1172\n933#1:1175,6\n948#1:1186,3\n949#1:1189\n951#1:1190\n1002#1:1191\n1002#1:1192\n1005#1:1196\n1007#1:1197\n1007#1:1200,6\n1021#1:1211\n1023#1:1214,6\n1038#1:1225,6\n1044#1:1231,6\n789#1:1055,4\n789#1:1059,6\n789#1:1066,3\n789#1:1070,2\n789#1:1072,2\n789#1:1074,6\n789#1:1080\n828#1:1081,6\n828#1:1088,3\n828#1:1092,9\n855#1:1101,4\n855#1:1105,7\n855#1:1113,3\n855#1:1117,2\n855#1:1119,2\n855#1:1121,6\n855#1:1127\n864#1:1128,6\n898#1:1153,3\n1004#1:1193,3\n*E\n"})
/* loaded from: classes.dex */
public final class MutableFloatFloatMap extends FloatFloatMap {
private int growthLimit;
public MutableFloatFloatMap() {
this(0, 1, null);
}
public final void minusAssign(FloatList keys) {
Intrinsics.checkNotNullParameter(keys, "keys");
float[] fArr = keys.content;
int i = keys._size;
for (int i2 = 0; i2 < i; i2++) {
remove(fArr[i2]);
}
}
public final void minusAssign(FloatSet keys) {
Intrinsics.checkNotNullParameter(keys, "keys");
float[] fArr = keys.elements;
long[] jArr = keys.metadata;
int length = jArr.length - 2;
if (length < 0) {
return;
}
int i = 0;
while (true) {
long j = jArr[i];
if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
int i2 = 8 - ((~(i - length)) >>> 31);
for (int i3 = 0; i3 < i2; i3++) {
if ((255 & j) < 128) {
remove(fArr[(i << 3) + i3]);
}
j >>= 8;
}
if (i2 != 8) {
return;
}
}
if (i == length) {
return;
} else {
i++;
}
}
}
public final void removeIf(Function2 predicate) {
Intrinsics.checkNotNullParameter(predicate, "predicate");
long[] jArr = this.metadata;
int length = jArr.length - 2;
if (length < 0) {
return;
}
int i = 0;
while (true) {
long j = jArr[i];
if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
int i2 = 8 - ((~(i - length)) >>> 31);
for (int i3 = 0; i3 < i2; i3++) {
if ((255 & j) < 128) {
int i4 = (i << 3) + i3;
if (((Boolean) predicate.invoke(Float.valueOf(this.keys[i4]), Float.valueOf(this.values[i4]))).booleanValue()) {
removeValueAt(i4);
}
}
j >>= 8;
}
if (i2 != 8) {
return;
}
}
if (i == length) {
return;
} else {
i++;
}
}
}
public final void putAll(FloatFloatMap from) {
Intrinsics.checkNotNullParameter(from, "from");
float[] fArr = from.keys;
float[] fArr2 = from.values;
long[] jArr = from.metadata;
int length = jArr.length - 2;
if (length < 0) {
return;
}
int i = 0;
while (true) {
long j = jArr[i];
if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
int i2 = 8 - ((~(i - length)) >>> 31);
for (int i3 = 0; i3 < i2; i3++) {
if ((255 & j) < 128) {
int i4 = (i << 3) + i3;
set(fArr[i4], fArr2[i4]);
}
j >>= 8;
}
if (i2 != 8) {
return;
}
}
if (i == length) {
return;
} else {
i++;
}
}
}
public /* synthetic */ MutableFloatFloatMap(int i, int i2, DefaultConstructorMarker defaultConstructorMarker) {
this((i2 & 1) != 0 ? 6 : i);
}
public MutableFloatFloatMap(int i) {
super(null);
if (i < 0) {
throw new IllegalArgumentException("Capacity must be a positive value.".toString());
}
initializeStorage(ScatterMapKt.unloadedCapacity(i));
}
private final void initializeStorage(int i) {
int max = i > 0 ? Math.max(7, ScatterMapKt.normalizeCapacity(i)) : 0;
this._capacity = max;
initializeMetadata(max);
this.keys = new float[max];
this.values = new float[max];
}
private final void initializeMetadata(int i) {
long[] jArr;
if (i == 0) {
jArr = ScatterMapKt.EmptyGroup;
} else {
jArr = new long[((i + 15) & (-8)) >> 3];
ArraysKt___ArraysJvmKt.fill$default(jArr, -9187201950435737472L, 0, 0, 6, (Object) null);
}
this.metadata = jArr;
int i2 = i >> 3;
long j = 255 << ((i & 7) << 3);
jArr[i2] = (jArr[i2] & (~j)) | j;
initializeGrowth();
}
private final void initializeGrowth() {
this.growthLimit = ScatterMapKt.loadedCapacity(getCapacity()) - this._size;
}
public final float getOrPut(float f, Function0 defaultValue) {
Intrinsics.checkNotNullParameter(defaultValue, "defaultValue");
int findKeyIndex = findKeyIndex(f);
if (findKeyIndex < 0) {
float floatValue = ((Number) defaultValue.invoke()).floatValue();
put(f, floatValue);
return floatValue;
}
return this.values[findKeyIndex];
}
public final void set(float f, float f2) {
int findInsertIndex = findInsertIndex(f);
if (findInsertIndex < 0) {
findInsertIndex = ~findInsertIndex;
}
this.keys[findInsertIndex] = f;
this.values[findInsertIndex] = f2;
}
public final void put(float f, float f2) {
set(f, f2);
}
public final float put(float f, float f2, float f3) {
int findInsertIndex = findInsertIndex(f);
if (findInsertIndex < 0) {
findInsertIndex = ~findInsertIndex;
} else {
f3 = this.values[findInsertIndex];
}
this.keys[findInsertIndex] = f;
this.values[findInsertIndex] = f2;
return f3;
}
public final void plusAssign(FloatFloatMap from) {
Intrinsics.checkNotNullParameter(from, "from");
putAll(from);
}
public final void remove(float f) {
int findKeyIndex = findKeyIndex(f);
if (findKeyIndex >= 0) {
removeValueAt(findKeyIndex);
}
}
public final boolean remove(float f, float f2) {
int findKeyIndex = findKeyIndex(f);
if (findKeyIndex < 0 || this.values[findKeyIndex] != f2) {
return false;
}
removeValueAt(findKeyIndex);
return true;
}
public final void minusAssign(float f) {
remove(f);
}
public final void minusAssign(float[] keys) {
Intrinsics.checkNotNullParameter(keys, "keys");
for (float f : keys) {
remove(f);
}
}
private final int findInsertIndex(float f) {
int hashCode = Float.hashCode(f) * ScatterMapKt.MurmurHashC1;
int i = hashCode ^ (hashCode << 16);
int i2 = i >>> 7;
int i3 = i & 127;
int i4 = this._capacity;
int i5 = i2 & i4;
int i6 = 0;
while (true) {
long[] jArr = this.metadata;
int i7 = i5 >> 3;
int i8 = (i5 & 7) << 3;
long j = ((jArr[i7 + 1] << (64 - i8)) & ((-i8) >> 63)) | (jArr[i7] >>> i8);
long j2 = i3;
int i9 = i6;
long j3 = j ^ (j2 * ScatterMapKt.BitmaskLsb);
for (long j4 = (~j3) & (j3 - ScatterMapKt.BitmaskLsb) & (-9187201950435737472L); j4 != 0; j4 &= j4 - 1) {
int numberOfTrailingZeros = ((Long.numberOfTrailingZeros(j4) >> 3) + i5) & i4;
if (this.keys[numberOfTrailingZeros] == f) {
return numberOfTrailingZeros;
}
}
if ((((~j) << 6) & j & (-9187201950435737472L)) != 0) {
int findFirstAvailableSlot = findFirstAvailableSlot(i2);
if (this.growthLimit == 0 && ((this.metadata[findFirstAvailableSlot >> 3] >> ((findFirstAvailableSlot & 7) << 3)) & 255) != 254) {
adjustStorage();
findFirstAvailableSlot = findFirstAvailableSlot(i2);
}
this._size++;
int i10 = this.growthLimit;
long[] jArr2 = this.metadata;
int i11 = findFirstAvailableSlot >> 3;
long j5 = jArr2[i11];
int i12 = (findFirstAvailableSlot & 7) << 3;
this.growthLimit = i10 - (((j5 >> i12) & 255) == 128 ? 1 : 0);
jArr2[i11] = (j5 & (~(255 << i12))) | (j2 << i12);
int i13 = this._capacity;
int i14 = ((findFirstAvailableSlot - 7) & i13) + (i13 & 7);
int i15 = i14 >> 3;
int i16 = (i14 & 7) << 3;
jArr2[i15] = ((~(255 << i16)) & jArr2[i15]) | (j2 << i16);
return ~findFirstAvailableSlot;
}
i6 = i9 + 8;
i5 = (i5 + i6) & i4;
}
}
public final void clear() {
this._size = 0;
long[] jArr = this.metadata;
if (jArr != ScatterMapKt.EmptyGroup) {
ArraysKt___ArraysJvmKt.fill$default(jArr, -9187201950435737472L, 0, 0, 6, (Object) null);
long[] jArr2 = this.metadata;
int i = this._capacity;
int i2 = i >> 3;
long j = 255 << ((i & 7) << 3);
jArr2[i2] = (jArr2[i2] & (~j)) | j;
}
initializeGrowth();
}
public final int trim() {
int i = this._capacity;
int normalizeCapacity = ScatterMapKt.normalizeCapacity(ScatterMapKt.unloadedCapacity(this._size));
if (normalizeCapacity >= i) {
return 0;
}
resizeStorage(normalizeCapacity);
return i - this._capacity;
}
private final void adjustStorage() {
if (this._capacity > 8 && Long.compareUnsigned(ULong.m4068constructorimpl(ULong.m4068constructorimpl(this._size) * 32), ULong.m4068constructorimpl(ULong.m4068constructorimpl(this._capacity) * 25)) <= 0) {
removeDeletedMarkers();
} else {
resizeStorage(ScatterMapKt.nextCapacity(this._capacity));
}
}
private final void resizeStorage(int i) {
long[] jArr;
float[] fArr;
long[] jArr2 = this.metadata;
float[] fArr2 = this.keys;
float[] fArr3 = this.values;
int i2 = this._capacity;
initializeStorage(i);
float[] fArr4 = this.keys;
float[] fArr5 = this.values;
int i3 = 0;
while (i3 < i2) {
if (((jArr2[i3 >> 3] >> ((i3 & 7) << 3)) & 255) < 128) {
float f = fArr2[i3];
int hashCode = Float.hashCode(f) * ScatterMapKt.MurmurHashC1;
int i4 = hashCode ^ (hashCode << 16);
int findFirstAvailableSlot = findFirstAvailableSlot(i4 >>> 7);
long j = i4 & 127;
long[] jArr3 = this.metadata;
int i5 = findFirstAvailableSlot >> 3;
int i6 = (findFirstAvailableSlot & 7) << 3;
jArr = jArr2;
fArr = fArr2;
jArr3[i5] = (jArr3[i5] & (~(255 << i6))) | (j << i6);
int i7 = this._capacity;
int i8 = ((findFirstAvailableSlot - 7) & i7) + (i7 & 7);
int i9 = i8 >> 3;
int i10 = (i8 & 7) << 3;
jArr3[i9] = ((~(255 << i10)) & jArr3[i9]) | (j << i10);
fArr4[findFirstAvailableSlot] = f;
fArr5[findFirstAvailableSlot] = fArr3[i3];
} else {
jArr = jArr2;
fArr = fArr2;
}
i3++;
jArr2 = jArr;
fArr2 = fArr;
}
}
private final void removeDeletedMarkers() {
long[] jArr = this.metadata;
int i = this._capacity;
int i2 = 0;
for (int i3 = 0; i3 < i; i3++) {
int i4 = i3 >> 3;
int i5 = (i3 & 7) << 3;
if (((jArr[i4] >> i5) & 255) == 254) {
long[] jArr2 = this.metadata;
jArr2[i4] = (128 << i5) | (jArr2[i4] & (~(255 << i5)));
int i6 = this._capacity;
int i7 = ((i3 - 7) & i6) + (i6 & 7);
int i8 = i7 >> 3;
int i9 = (i7 & 7) << 3;
jArr2[i8] = ((~(255 << i9)) & jArr2[i8]) | (128 << i9);
i2++;
}
}
this.growthLimit += i2;
}
private final void writeMetadata(int i, long j) {
long[] jArr = this.metadata;
int i2 = i >> 3;
int i3 = (i & 7) << 3;
jArr[i2] = (jArr[i2] & (~(255 << i3))) | (j << i3);
int i4 = this._capacity;
int i5 = ((i - 7) & i4) + (i4 & 7);
int i6 = i5 >> 3;
int i7 = (i5 & 7) << 3;
jArr[i6] = (j << i7) | (jArr[i6] & (~(255 << i7)));
}
public final void removeValueAt(int i) {
this._size--;
long[] jArr = this.metadata;
int i2 = i >> 3;
int i3 = (i & 7) << 3;
jArr[i2] = (jArr[i2] & (~(255 << i3))) | (254 << i3);
int i4 = this._capacity;
int i5 = ((i - 7) & i4) + (i4 & 7);
int i6 = i5 >> 3;
int i7 = (i5 & 7) << 3;
jArr[i6] = (jArr[i6] & (~(255 << i7))) | (254 << i7);
}
private final int findFirstAvailableSlot(int i) {
int i2 = this._capacity;
int i3 = i & i2;
int i4 = 0;
while (true) {
long[] jArr = this.metadata;
int i5 = i3 >> 3;
int i6 = (i3 & 7) << 3;
long j = ((jArr[i5 + 1] << (64 - i6)) & ((-i6) >> 63)) | (jArr[i5] >>> i6);
long j2 = j & ((~j) << 7) & (-9187201950435737472L);
if (j2 != 0) {
return (i3 + (Long.numberOfTrailingZeros(j2) >> 3)) & i2;
}
i4 += 8;
i3 = (i3 + i4) & i2;
}
}
}

View File

@@ -0,0 +1,417 @@
package androidx.collection;
import kotlin.ULong;
import kotlin.collections.ArraysKt___ArraysJvmKt;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
@SourceDebugExtension({"SMAP\nFloatIntMap.kt\nKotlin\n*S Kotlin\n*F\n+ 1 FloatIntMap.kt\nandroidx/collection/MutableFloatIntMap\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n+ 3 ScatterMap.kt\nandroidx/collection/ScatterMapKt\n+ 4 FloatIntMap.kt\nandroidx/collection/FloatIntMap\n+ 5 FloatSet.kt\nandroidx/collection/FloatSet\n+ 6 FloatList.kt\nandroidx/collection/FloatList\n+ 7 FloatSet.kt\nandroidx/collection/FloatSetKt\n*L\n1#1,1047:1\n1037#1,2:1134\n1041#1,5:1142\n1037#1,2:1173\n1041#1,5:1181\n1037#1,2:1198\n1041#1,5:1206\n1037#1,2:1212\n1041#1,5:1220\n1#2:1048\n1672#3,6:1049\n1826#3:1065\n1688#3:1069\n1826#3:1087\n1688#3:1091\n1826#3:1112\n1688#3:1116\n1672#3,6:1136\n1672#3,6:1147\n1615#3:1156\n1619#3:1157\n1795#3,3:1158\n1809#3,3:1161\n1733#3:1164\n1721#3:1165\n1715#3:1166\n1728#3:1167\n1818#3:1168\n1682#3:1169\n1661#3:1170\n1680#3:1171\n1661#3:1172\n1672#3,6:1175\n1795#3,3:1186\n1826#3:1189\n1715#3:1190\n1685#3:1191\n1661#3:1192\n1615#3:1196\n1619#3:1197\n1672#3,6:1200\n1661#3:1211\n1672#3,6:1214\n1672#3,6:1225\n1672#3,6:1231\n385#4,4:1055\n357#4,6:1059\n367#4,3:1066\n370#4,2:1070\n389#4,2:1072\n373#4,6:1074\n391#4:1080\n357#4,6:1081\n367#4,3:1088\n370#4,9:1092\n262#5,4:1101\n232#5,7:1105\n243#5,3:1113\n246#5,2:1117\n266#5,2:1119\n249#5,6:1121\n268#5:1127\n253#6,6:1128\n849#7,3:1153\n849#7,3:1193\n*S KotlinDebug\n*F\n+ 1 FloatIntMap.kt\nandroidx/collection/MutableFloatIntMap\n*L\n875#1:1134,2\n875#1:1142,5\n933#1:1173,2\n933#1:1181,5\n1007#1:1198,2\n1007#1:1206,5\n1023#1:1212,2\n1023#1:1220,5\n711#1:1049,6\n789#1:1065\n789#1:1069\n828#1:1087\n828#1:1091\n855#1:1112\n855#1:1116\n875#1:1136,6\n885#1:1147,6\n899#1:1156\n900#1:1157\n907#1:1158,3\n908#1:1161,3\n909#1:1164\n910#1:1165\n910#1:1166\n914#1:1167\n917#1:1168\n926#1:1169\n926#1:1170\n932#1:1171\n932#1:1172\n933#1:1175,6\n948#1:1186,3\n949#1:1189\n951#1:1190\n1002#1:1191\n1002#1:1192\n1005#1:1196\n1007#1:1197\n1007#1:1200,6\n1021#1:1211\n1023#1:1214,6\n1038#1:1225,6\n1044#1:1231,6\n789#1:1055,4\n789#1:1059,6\n789#1:1066,3\n789#1:1070,2\n789#1:1072,2\n789#1:1074,6\n789#1:1080\n828#1:1081,6\n828#1:1088,3\n828#1:1092,9\n855#1:1101,4\n855#1:1105,7\n855#1:1113,3\n855#1:1117,2\n855#1:1119,2\n855#1:1121,6\n855#1:1127\n864#1:1128,6\n898#1:1153,3\n1004#1:1193,3\n*E\n"})
/* loaded from: classes.dex */
public final class MutableFloatIntMap extends FloatIntMap {
private int growthLimit;
public MutableFloatIntMap() {
this(0, 1, null);
}
public final void minusAssign(FloatList keys) {
Intrinsics.checkNotNullParameter(keys, "keys");
float[] fArr = keys.content;
int i = keys._size;
for (int i2 = 0; i2 < i; i2++) {
remove(fArr[i2]);
}
}
public final void minusAssign(FloatSet keys) {
Intrinsics.checkNotNullParameter(keys, "keys");
float[] fArr = keys.elements;
long[] jArr = keys.metadata;
int length = jArr.length - 2;
if (length < 0) {
return;
}
int i = 0;
while (true) {
long j = jArr[i];
if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
int i2 = 8 - ((~(i - length)) >>> 31);
for (int i3 = 0; i3 < i2; i3++) {
if ((255 & j) < 128) {
remove(fArr[(i << 3) + i3]);
}
j >>= 8;
}
if (i2 != 8) {
return;
}
}
if (i == length) {
return;
} else {
i++;
}
}
}
public final void removeIf(Function2 predicate) {
Intrinsics.checkNotNullParameter(predicate, "predicate");
long[] jArr = this.metadata;
int length = jArr.length - 2;
if (length < 0) {
return;
}
int i = 0;
while (true) {
long j = jArr[i];
if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
int i2 = 8 - ((~(i - length)) >>> 31);
for (int i3 = 0; i3 < i2; i3++) {
if ((255 & j) < 128) {
int i4 = (i << 3) + i3;
if (((Boolean) predicate.invoke(Float.valueOf(this.keys[i4]), Integer.valueOf(this.values[i4]))).booleanValue()) {
removeValueAt(i4);
}
}
j >>= 8;
}
if (i2 != 8) {
return;
}
}
if (i == length) {
return;
} else {
i++;
}
}
}
public final void putAll(FloatIntMap from) {
Intrinsics.checkNotNullParameter(from, "from");
float[] fArr = from.keys;
int[] iArr = from.values;
long[] jArr = from.metadata;
int length = jArr.length - 2;
if (length < 0) {
return;
}
int i = 0;
while (true) {
long j = jArr[i];
if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
int i2 = 8 - ((~(i - length)) >>> 31);
for (int i3 = 0; i3 < i2; i3++) {
if ((255 & j) < 128) {
int i4 = (i << 3) + i3;
set(fArr[i4], iArr[i4]);
}
j >>= 8;
}
if (i2 != 8) {
return;
}
}
if (i == length) {
return;
} else {
i++;
}
}
}
public /* synthetic */ MutableFloatIntMap(int i, int i2, DefaultConstructorMarker defaultConstructorMarker) {
this((i2 & 1) != 0 ? 6 : i);
}
public MutableFloatIntMap(int i) {
super(null);
if (i < 0) {
throw new IllegalArgumentException("Capacity must be a positive value.".toString());
}
initializeStorage(ScatterMapKt.unloadedCapacity(i));
}
private final void initializeStorage(int i) {
int max = i > 0 ? Math.max(7, ScatterMapKt.normalizeCapacity(i)) : 0;
this._capacity = max;
initializeMetadata(max);
this.keys = new float[max];
this.values = new int[max];
}
private final void initializeMetadata(int i) {
long[] jArr;
if (i == 0) {
jArr = ScatterMapKt.EmptyGroup;
} else {
jArr = new long[((i + 15) & (-8)) >> 3];
ArraysKt___ArraysJvmKt.fill$default(jArr, -9187201950435737472L, 0, 0, 6, (Object) null);
}
this.metadata = jArr;
int i2 = i >> 3;
long j = 255 << ((i & 7) << 3);
jArr[i2] = (jArr[i2] & (~j)) | j;
initializeGrowth();
}
private final void initializeGrowth() {
this.growthLimit = ScatterMapKt.loadedCapacity(getCapacity()) - this._size;
}
public final int getOrPut(float f, Function0 defaultValue) {
Intrinsics.checkNotNullParameter(defaultValue, "defaultValue");
int findKeyIndex = findKeyIndex(f);
if (findKeyIndex < 0) {
int intValue = ((Number) defaultValue.invoke()).intValue();
put(f, intValue);
return intValue;
}
return this.values[findKeyIndex];
}
public final void set(float f, int i) {
int findInsertIndex = findInsertIndex(f);
if (findInsertIndex < 0) {
findInsertIndex = ~findInsertIndex;
}
this.keys[findInsertIndex] = f;
this.values[findInsertIndex] = i;
}
public final void put(float f, int i) {
set(f, i);
}
public final int put(float f, int i, int i2) {
int findInsertIndex = findInsertIndex(f);
if (findInsertIndex < 0) {
findInsertIndex = ~findInsertIndex;
} else {
i2 = this.values[findInsertIndex];
}
this.keys[findInsertIndex] = f;
this.values[findInsertIndex] = i;
return i2;
}
public final void plusAssign(FloatIntMap from) {
Intrinsics.checkNotNullParameter(from, "from");
putAll(from);
}
public final void remove(float f) {
int findKeyIndex = findKeyIndex(f);
if (findKeyIndex >= 0) {
removeValueAt(findKeyIndex);
}
}
public final boolean remove(float f, int i) {
int findKeyIndex = findKeyIndex(f);
if (findKeyIndex < 0 || this.values[findKeyIndex] != i) {
return false;
}
removeValueAt(findKeyIndex);
return true;
}
public final void minusAssign(float f) {
remove(f);
}
public final void minusAssign(float[] keys) {
Intrinsics.checkNotNullParameter(keys, "keys");
for (float f : keys) {
remove(f);
}
}
private final int findInsertIndex(float f) {
int hashCode = Float.hashCode(f) * ScatterMapKt.MurmurHashC1;
int i = hashCode ^ (hashCode << 16);
int i2 = i >>> 7;
int i3 = i & 127;
int i4 = this._capacity;
int i5 = i2 & i4;
int i6 = 0;
while (true) {
long[] jArr = this.metadata;
int i7 = i5 >> 3;
int i8 = (i5 & 7) << 3;
long j = ((jArr[i7 + 1] << (64 - i8)) & ((-i8) >> 63)) | (jArr[i7] >>> i8);
long j2 = i3;
int i9 = i6;
long j3 = j ^ (j2 * ScatterMapKt.BitmaskLsb);
for (long j4 = (~j3) & (j3 - ScatterMapKt.BitmaskLsb) & (-9187201950435737472L); j4 != 0; j4 &= j4 - 1) {
int numberOfTrailingZeros = ((Long.numberOfTrailingZeros(j4) >> 3) + i5) & i4;
if (this.keys[numberOfTrailingZeros] == f) {
return numberOfTrailingZeros;
}
}
if ((((~j) << 6) & j & (-9187201950435737472L)) != 0) {
int findFirstAvailableSlot = findFirstAvailableSlot(i2);
if (this.growthLimit == 0 && ((this.metadata[findFirstAvailableSlot >> 3] >> ((findFirstAvailableSlot & 7) << 3)) & 255) != 254) {
adjustStorage();
findFirstAvailableSlot = findFirstAvailableSlot(i2);
}
this._size++;
int i10 = this.growthLimit;
long[] jArr2 = this.metadata;
int i11 = findFirstAvailableSlot >> 3;
long j5 = jArr2[i11];
int i12 = (findFirstAvailableSlot & 7) << 3;
this.growthLimit = i10 - (((j5 >> i12) & 255) == 128 ? 1 : 0);
jArr2[i11] = (j5 & (~(255 << i12))) | (j2 << i12);
int i13 = this._capacity;
int i14 = ((findFirstAvailableSlot - 7) & i13) + (i13 & 7);
int i15 = i14 >> 3;
int i16 = (i14 & 7) << 3;
jArr2[i15] = ((~(255 << i16)) & jArr2[i15]) | (j2 << i16);
return ~findFirstAvailableSlot;
}
i6 = i9 + 8;
i5 = (i5 + i6) & i4;
}
}
public final void clear() {
this._size = 0;
long[] jArr = this.metadata;
if (jArr != ScatterMapKt.EmptyGroup) {
ArraysKt___ArraysJvmKt.fill$default(jArr, -9187201950435737472L, 0, 0, 6, (Object) null);
long[] jArr2 = this.metadata;
int i = this._capacity;
int i2 = i >> 3;
long j = 255 << ((i & 7) << 3);
jArr2[i2] = (jArr2[i2] & (~j)) | j;
}
initializeGrowth();
}
public final int trim() {
int i = this._capacity;
int normalizeCapacity = ScatterMapKt.normalizeCapacity(ScatterMapKt.unloadedCapacity(this._size));
if (normalizeCapacity >= i) {
return 0;
}
resizeStorage(normalizeCapacity);
return i - this._capacity;
}
private final void adjustStorage() {
if (this._capacity > 8 && Long.compareUnsigned(ULong.m4068constructorimpl(ULong.m4068constructorimpl(this._size) * 32), ULong.m4068constructorimpl(ULong.m4068constructorimpl(this._capacity) * 25)) <= 0) {
removeDeletedMarkers();
} else {
resizeStorage(ScatterMapKt.nextCapacity(this._capacity));
}
}
private final void resizeStorage(int i) {
long[] jArr;
float[] fArr;
long[] jArr2 = this.metadata;
float[] fArr2 = this.keys;
int[] iArr = this.values;
int i2 = this._capacity;
initializeStorage(i);
float[] fArr3 = this.keys;
int[] iArr2 = this.values;
int i3 = 0;
while (i3 < i2) {
if (((jArr2[i3 >> 3] >> ((i3 & 7) << 3)) & 255) < 128) {
float f = fArr2[i3];
int hashCode = Float.hashCode(f) * ScatterMapKt.MurmurHashC1;
int i4 = hashCode ^ (hashCode << 16);
int findFirstAvailableSlot = findFirstAvailableSlot(i4 >>> 7);
long j = i4 & 127;
long[] jArr3 = this.metadata;
int i5 = findFirstAvailableSlot >> 3;
int i6 = (findFirstAvailableSlot & 7) << 3;
jArr = jArr2;
fArr = fArr2;
jArr3[i5] = (jArr3[i5] & (~(255 << i6))) | (j << i6);
int i7 = this._capacity;
int i8 = ((findFirstAvailableSlot - 7) & i7) + (i7 & 7);
int i9 = i8 >> 3;
int i10 = (i8 & 7) << 3;
jArr3[i9] = ((~(255 << i10)) & jArr3[i9]) | (j << i10);
fArr3[findFirstAvailableSlot] = f;
iArr2[findFirstAvailableSlot] = iArr[i3];
} else {
jArr = jArr2;
fArr = fArr2;
}
i3++;
jArr2 = jArr;
fArr2 = fArr;
}
}
private final void removeDeletedMarkers() {
long[] jArr = this.metadata;
int i = this._capacity;
int i2 = 0;
for (int i3 = 0; i3 < i; i3++) {
int i4 = i3 >> 3;
int i5 = (i3 & 7) << 3;
if (((jArr[i4] >> i5) & 255) == 254) {
long[] jArr2 = this.metadata;
jArr2[i4] = (128 << i5) | (jArr2[i4] & (~(255 << i5)));
int i6 = this._capacity;
int i7 = ((i3 - 7) & i6) + (i6 & 7);
int i8 = i7 >> 3;
int i9 = (i7 & 7) << 3;
jArr2[i8] = ((~(255 << i9)) & jArr2[i8]) | (128 << i9);
i2++;
}
}
this.growthLimit += i2;
}
private final void writeMetadata(int i, long j) {
long[] jArr = this.metadata;
int i2 = i >> 3;
int i3 = (i & 7) << 3;
jArr[i2] = (jArr[i2] & (~(255 << i3))) | (j << i3);
int i4 = this._capacity;
int i5 = ((i - 7) & i4) + (i4 & 7);
int i6 = i5 >> 3;
int i7 = (i5 & 7) << 3;
jArr[i6] = (j << i7) | (jArr[i6] & (~(255 << i7)));
}
public final void removeValueAt(int i) {
this._size--;
long[] jArr = this.metadata;
int i2 = i >> 3;
int i3 = (i & 7) << 3;
jArr[i2] = (jArr[i2] & (~(255 << i3))) | (254 << i3);
int i4 = this._capacity;
int i5 = ((i - 7) & i4) + (i4 & 7);
int i6 = i5 >> 3;
int i7 = (i5 & 7) << 3;
jArr[i6] = (jArr[i6] & (~(255 << i7))) | (254 << i7);
}
private final int findFirstAvailableSlot(int i) {
int i2 = this._capacity;
int i3 = i & i2;
int i4 = 0;
while (true) {
long[] jArr = this.metadata;
int i5 = i3 >> 3;
int i6 = (i3 & 7) << 3;
long j = ((jArr[i5 + 1] << (64 - i6)) & ((-i6) >> 63)) | (jArr[i5] >>> i6);
long j2 = j & ((~j) << 7) & (-9187201950435737472L);
if (j2 != 0) {
return (i3 + (Long.numberOfTrailingZeros(j2) >> 3)) & i2;
}
i4 += 8;
i3 = (i3 + i4) & i2;
}
}
}

View File

@@ -0,0 +1,321 @@
package androidx.collection;
import androidx.annotation.IntRange;
import java.util.Arrays;
import kotlin.collections.ArraysKt___ArraysJvmKt;
import kotlin.collections.ArraysKt___ArraysKt;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
@SourceDebugExtension({"SMAP\nFloatList.kt\nKotlin\n*S Kotlin\n*F\n+ 1 FloatList.kt\nandroidx/collection/MutableFloatList\n+ 2 FloatList.kt\nandroidx/collection/FloatList\n+ 3 _Arrays.kt\nkotlin/collections/ArraysKt___ArraysKt\n*L\n1#1,969:1\n549#1:970\n70#2:971\n253#2,6:974\n70#2:980\n70#2:981\n70#2:982\n70#2:989\n70#2:990\n13614#3,2:972\n1687#3,6:983\n*S KotlinDebug\n*F\n+ 1 FloatList.kt\nandroidx/collection/MutableFloatList\n*L\n692#1:970\n753#1:971\n772#1:974,6\n783#1:980\n787#1:981\n834#1:982\n850#1:989\n869#1:990\n763#1:972,2\n836#1:983,6\n*E\n"})
/* loaded from: classes.dex */
public final class MutableFloatList extends FloatList {
public MutableFloatList() {
this(0, 1, null);
}
public final void clear() {
this._size = 0;
}
public final boolean removeAll(FloatList elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
int i = this._size;
int i2 = elements._size - 1;
if (i2 >= 0) {
int i3 = 0;
while (true) {
remove(elements.get(i3));
if (i3 == i2) {
break;
}
i3++;
}
}
return i != this._size;
}
public final void minusAssign(FloatList elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
float[] fArr = elements.content;
int i = elements._size;
for (int i2 = 0; i2 < i; i2++) {
remove(fArr[i2]);
}
}
public /* synthetic */ MutableFloatList(int i, int i2, DefaultConstructorMarker defaultConstructorMarker) {
this((i2 & 1) != 0 ? 16 : i);
}
public MutableFloatList(int i) {
super(i, null);
}
public final int getCapacity() {
return this.content.length;
}
public final boolean add(float f) {
ensureCapacity(this._size + 1);
float[] fArr = this.content;
int i = this._size;
fArr[i] = f;
this._size = i + 1;
return true;
}
public final void add(@IntRange(from = 0) int i, float f) {
int i2;
if (i < 0 || i > (i2 = this._size)) {
throw new IndexOutOfBoundsException("Index " + i + " must be in 0.." + this._size);
}
ensureCapacity(i2 + 1);
float[] fArr = this.content;
int i3 = this._size;
if (i != i3) {
ArraysKt___ArraysJvmKt.copyInto(fArr, fArr, i + 1, i, i3);
}
fArr[i] = f;
this._size++;
}
public final boolean addAll(@IntRange(from = 0) int i, float[] elements) {
int i2;
Intrinsics.checkNotNullParameter(elements, "elements");
if (i < 0 || i > (i2 = this._size)) {
throw new IndexOutOfBoundsException("Index " + i + " must be in 0.." + this._size);
}
if (elements.length == 0) {
return false;
}
ensureCapacity(i2 + elements.length);
float[] fArr = this.content;
int i3 = this._size;
if (i != i3) {
ArraysKt___ArraysJvmKt.copyInto(fArr, fArr, elements.length + i, i, i3);
}
ArraysKt___ArraysJvmKt.copyInto$default(elements, fArr, i, 0, 0, 12, (Object) null);
this._size += elements.length;
return true;
}
public final boolean addAll(@IntRange(from = 0) int i, FloatList elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
if (i < 0 || i > this._size) {
throw new IndexOutOfBoundsException("Index " + i + " must be in 0.." + this._size);
}
if (elements.isEmpty()) {
return false;
}
ensureCapacity(this._size + elements._size);
float[] fArr = this.content;
int i2 = this._size;
if (i != i2) {
ArraysKt___ArraysJvmKt.copyInto(fArr, fArr, elements._size + i, i, i2);
}
ArraysKt___ArraysJvmKt.copyInto(elements.content, fArr, i, 0, elements._size);
this._size += elements._size;
return true;
}
public final boolean addAll(FloatList elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
return addAll(this._size, elements);
}
public final boolean addAll(float[] elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
return addAll(this._size, elements);
}
public final void plusAssign(FloatList elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
addAll(this._size, elements);
}
public final void plusAssign(float[] elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
addAll(this._size, elements);
}
public static /* synthetic */ void trim$default(MutableFloatList mutableFloatList, int i, int i2, Object obj) {
if ((i2 & 1) != 0) {
i = mutableFloatList._size;
}
mutableFloatList.trim(i);
}
public final void trim(int i) {
int max = Math.max(i, this._size);
float[] fArr = this.content;
if (fArr.length > max) {
float[] copyOf = Arrays.copyOf(fArr, max);
Intrinsics.checkNotNullExpressionValue(copyOf, "copyOf(this, newSize)");
this.content = copyOf;
}
}
public final void ensureCapacity(int i) {
float[] fArr = this.content;
if (fArr.length < i) {
float[] copyOf = Arrays.copyOf(fArr, Math.max(i, (fArr.length * 3) / 2));
Intrinsics.checkNotNullExpressionValue(copyOf, "copyOf(this, newSize)");
this.content = copyOf;
}
}
public final void plusAssign(float f) {
add(f);
}
public final void minusAssign(float f) {
remove(f);
}
public final boolean remove(float f) {
int indexOf = indexOf(f);
if (indexOf < 0) {
return false;
}
removeAt(indexOf);
return true;
}
public final boolean removeAll(float[] elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
int i = this._size;
for (float f : elements) {
remove(f);
}
return i != this._size;
}
public final float removeAt(@IntRange(from = 0) int i) {
int i2;
if (i < 0 || i >= (i2 = this._size)) {
StringBuilder sb = new StringBuilder();
sb.append("Index ");
sb.append(i);
sb.append(" must be in 0..");
sb.append(this._size - 1);
throw new IndexOutOfBoundsException(sb.toString());
}
float[] fArr = this.content;
float f = fArr[i];
if (i != i2 - 1) {
ArraysKt___ArraysJvmKt.copyInto(fArr, fArr, i, i + 1, i2);
}
this._size--;
return f;
}
public final void removeRange(@IntRange(from = 0) int i, @IntRange(from = 0) int i2) {
int i3;
if (i < 0 || i > (i3 = this._size) || i2 < 0 || i2 > i3) {
throw new IndexOutOfBoundsException("Start (" + i + ") and end (" + i2 + ") must be in 0.." + this._size);
}
if (i2 >= i) {
if (i2 != i) {
if (i2 < i3) {
float[] fArr = this.content;
ArraysKt___ArraysJvmKt.copyInto(fArr, fArr, i, i2, i3);
}
this._size -= i2 - i;
return;
}
return;
}
throw new IllegalArgumentException("Start (" + i + ") is more than end (" + i2 + ')');
}
/* JADX WARN: Code restructure failed: missing block: B:11:0x0020, code lost:
removeAt(r2);
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final boolean retainAll(float[] r8) {
/*
r7 = this;
java.lang.String r0 = "elements"
kotlin.jvm.internal.Intrinsics.checkNotNullParameter(r8, r0)
int r0 = r7._size
float[] r1 = r7.content
int r2 = r0 + (-1)
Lb:
r3 = 0
r4 = -1
if (r4 >= r2) goto L26
r4 = r1[r2]
int r5 = r8.length
L12:
if (r3 >= r5) goto L20
r6 = r8[r3]
int r6 = (r6 > r4 ? 1 : (r6 == r4 ? 0 : -1))
if (r6 != 0) goto L1d
if (r3 >= 0) goto L23
goto L20
L1d:
int r3 = r3 + 1
goto L12
L20:
r7.removeAt(r2)
L23:
int r2 = r2 + (-1)
goto Lb
L26:
int r8 = r7._size
if (r0 == r8) goto L2b
r3 = 1
L2b:
return r3
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.collection.MutableFloatList.retainAll(float[]):boolean");
}
public final boolean retainAll(FloatList elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
int i = this._size;
float[] fArr = this.content;
for (int i2 = i - 1; -1 < i2; i2--) {
if (!elements.contains(fArr[i2])) {
removeAt(i2);
}
}
return i != this._size;
}
public final float set(@IntRange(from = 0) int i, float f) {
if (i < 0 || i >= this._size) {
StringBuilder sb = new StringBuilder();
sb.append("set index ");
sb.append(i);
sb.append(" must be between 0 .. ");
sb.append(this._size - 1);
throw new IndexOutOfBoundsException(sb.toString());
}
float[] fArr = this.content;
float f2 = fArr[i];
fArr[i] = f;
return f2;
}
public final void sort() {
ArraysKt___ArraysJvmKt.sort(this.content, 0, this._size);
}
public final void sortDescending() {
ArraysKt___ArraysKt.sortDescending(this.content, 0, this._size);
}
public final void minusAssign(float[] elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
for (float f : elements) {
remove(f);
}
}
}

View File

@@ -0,0 +1,417 @@
package androidx.collection;
import kotlin.ULong;
import kotlin.collections.ArraysKt___ArraysJvmKt;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
@SourceDebugExtension({"SMAP\nFloatLongMap.kt\nKotlin\n*S Kotlin\n*F\n+ 1 FloatLongMap.kt\nandroidx/collection/MutableFloatLongMap\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n+ 3 ScatterMap.kt\nandroidx/collection/ScatterMapKt\n+ 4 FloatLongMap.kt\nandroidx/collection/FloatLongMap\n+ 5 FloatSet.kt\nandroidx/collection/FloatSet\n+ 6 FloatList.kt\nandroidx/collection/FloatList\n+ 7 FloatSet.kt\nandroidx/collection/FloatSetKt\n*L\n1#1,1047:1\n1037#1,2:1134\n1041#1,5:1142\n1037#1,2:1173\n1041#1,5:1181\n1037#1,2:1198\n1041#1,5:1206\n1037#1,2:1212\n1041#1,5:1220\n1#2:1048\n1672#3,6:1049\n1826#3:1065\n1688#3:1069\n1826#3:1087\n1688#3:1091\n1826#3:1112\n1688#3:1116\n1672#3,6:1136\n1672#3,6:1147\n1615#3:1156\n1619#3:1157\n1795#3,3:1158\n1809#3,3:1161\n1733#3:1164\n1721#3:1165\n1715#3:1166\n1728#3:1167\n1818#3:1168\n1682#3:1169\n1661#3:1170\n1680#3:1171\n1661#3:1172\n1672#3,6:1175\n1795#3,3:1186\n1826#3:1189\n1715#3:1190\n1685#3:1191\n1661#3:1192\n1615#3:1196\n1619#3:1197\n1672#3,6:1200\n1661#3:1211\n1672#3,6:1214\n1672#3,6:1225\n1672#3,6:1231\n385#4,4:1055\n357#4,6:1059\n367#4,3:1066\n370#4,2:1070\n389#4,2:1072\n373#4,6:1074\n391#4:1080\n357#4,6:1081\n367#4,3:1088\n370#4,9:1092\n262#5,4:1101\n232#5,7:1105\n243#5,3:1113\n246#5,2:1117\n266#5,2:1119\n249#5,6:1121\n268#5:1127\n253#6,6:1128\n849#7,3:1153\n849#7,3:1193\n*S KotlinDebug\n*F\n+ 1 FloatLongMap.kt\nandroidx/collection/MutableFloatLongMap\n*L\n875#1:1134,2\n875#1:1142,5\n933#1:1173,2\n933#1:1181,5\n1007#1:1198,2\n1007#1:1206,5\n1023#1:1212,2\n1023#1:1220,5\n711#1:1049,6\n789#1:1065\n789#1:1069\n828#1:1087\n828#1:1091\n855#1:1112\n855#1:1116\n875#1:1136,6\n885#1:1147,6\n899#1:1156\n900#1:1157\n907#1:1158,3\n908#1:1161,3\n909#1:1164\n910#1:1165\n910#1:1166\n914#1:1167\n917#1:1168\n926#1:1169\n926#1:1170\n932#1:1171\n932#1:1172\n933#1:1175,6\n948#1:1186,3\n949#1:1189\n951#1:1190\n1002#1:1191\n1002#1:1192\n1005#1:1196\n1007#1:1197\n1007#1:1200,6\n1021#1:1211\n1023#1:1214,6\n1038#1:1225,6\n1044#1:1231,6\n789#1:1055,4\n789#1:1059,6\n789#1:1066,3\n789#1:1070,2\n789#1:1072,2\n789#1:1074,6\n789#1:1080\n828#1:1081,6\n828#1:1088,3\n828#1:1092,9\n855#1:1101,4\n855#1:1105,7\n855#1:1113,3\n855#1:1117,2\n855#1:1119,2\n855#1:1121,6\n855#1:1127\n864#1:1128,6\n898#1:1153,3\n1004#1:1193,3\n*E\n"})
/* loaded from: classes.dex */
public final class MutableFloatLongMap extends FloatLongMap {
private int growthLimit;
public MutableFloatLongMap() {
this(0, 1, null);
}
public final void minusAssign(FloatList keys) {
Intrinsics.checkNotNullParameter(keys, "keys");
float[] fArr = keys.content;
int i = keys._size;
for (int i2 = 0; i2 < i; i2++) {
remove(fArr[i2]);
}
}
public final void minusAssign(FloatSet keys) {
Intrinsics.checkNotNullParameter(keys, "keys");
float[] fArr = keys.elements;
long[] jArr = keys.metadata;
int length = jArr.length - 2;
if (length < 0) {
return;
}
int i = 0;
while (true) {
long j = jArr[i];
if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
int i2 = 8 - ((~(i - length)) >>> 31);
for (int i3 = 0; i3 < i2; i3++) {
if ((255 & j) < 128) {
remove(fArr[(i << 3) + i3]);
}
j >>= 8;
}
if (i2 != 8) {
return;
}
}
if (i == length) {
return;
} else {
i++;
}
}
}
public final void removeIf(Function2 predicate) {
Intrinsics.checkNotNullParameter(predicate, "predicate");
long[] jArr = this.metadata;
int length = jArr.length - 2;
if (length < 0) {
return;
}
int i = 0;
while (true) {
long j = jArr[i];
if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
int i2 = 8 - ((~(i - length)) >>> 31);
for (int i3 = 0; i3 < i2; i3++) {
if ((255 & j) < 128) {
int i4 = (i << 3) + i3;
if (((Boolean) predicate.invoke(Float.valueOf(this.keys[i4]), Long.valueOf(this.values[i4]))).booleanValue()) {
removeValueAt(i4);
}
}
j >>= 8;
}
if (i2 != 8) {
return;
}
}
if (i == length) {
return;
} else {
i++;
}
}
}
public final void putAll(FloatLongMap from) {
Intrinsics.checkNotNullParameter(from, "from");
float[] fArr = from.keys;
long[] jArr = from.values;
long[] jArr2 = from.metadata;
int length = jArr2.length - 2;
if (length < 0) {
return;
}
int i = 0;
while (true) {
long j = jArr2[i];
if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
int i2 = 8 - ((~(i - length)) >>> 31);
for (int i3 = 0; i3 < i2; i3++) {
if ((255 & j) < 128) {
int i4 = (i << 3) + i3;
set(fArr[i4], jArr[i4]);
}
j >>= 8;
}
if (i2 != 8) {
return;
}
}
if (i == length) {
return;
} else {
i++;
}
}
}
public /* synthetic */ MutableFloatLongMap(int i, int i2, DefaultConstructorMarker defaultConstructorMarker) {
this((i2 & 1) != 0 ? 6 : i);
}
public MutableFloatLongMap(int i) {
super(null);
if (i < 0) {
throw new IllegalArgumentException("Capacity must be a positive value.".toString());
}
initializeStorage(ScatterMapKt.unloadedCapacity(i));
}
private final void initializeStorage(int i) {
int max = i > 0 ? Math.max(7, ScatterMapKt.normalizeCapacity(i)) : 0;
this._capacity = max;
initializeMetadata(max);
this.keys = new float[max];
this.values = new long[max];
}
private final void initializeMetadata(int i) {
long[] jArr;
if (i == 0) {
jArr = ScatterMapKt.EmptyGroup;
} else {
jArr = new long[((i + 15) & (-8)) >> 3];
ArraysKt___ArraysJvmKt.fill$default(jArr, -9187201950435737472L, 0, 0, 6, (Object) null);
}
this.metadata = jArr;
int i2 = i >> 3;
long j = 255 << ((i & 7) << 3);
jArr[i2] = (jArr[i2] & (~j)) | j;
initializeGrowth();
}
private final void initializeGrowth() {
this.growthLimit = ScatterMapKt.loadedCapacity(getCapacity()) - this._size;
}
public final long getOrPut(float f, Function0 defaultValue) {
Intrinsics.checkNotNullParameter(defaultValue, "defaultValue");
int findKeyIndex = findKeyIndex(f);
if (findKeyIndex < 0) {
long longValue = ((Number) defaultValue.invoke()).longValue();
put(f, longValue);
return longValue;
}
return this.values[findKeyIndex];
}
public final void set(float f, long j) {
int findInsertIndex = findInsertIndex(f);
if (findInsertIndex < 0) {
findInsertIndex = ~findInsertIndex;
}
this.keys[findInsertIndex] = f;
this.values[findInsertIndex] = j;
}
public final void put(float f, long j) {
set(f, j);
}
public final long put(float f, long j, long j2) {
int findInsertIndex = findInsertIndex(f);
if (findInsertIndex < 0) {
findInsertIndex = ~findInsertIndex;
} else {
j2 = this.values[findInsertIndex];
}
this.keys[findInsertIndex] = f;
this.values[findInsertIndex] = j;
return j2;
}
public final void plusAssign(FloatLongMap from) {
Intrinsics.checkNotNullParameter(from, "from");
putAll(from);
}
public final void remove(float f) {
int findKeyIndex = findKeyIndex(f);
if (findKeyIndex >= 0) {
removeValueAt(findKeyIndex);
}
}
public final boolean remove(float f, long j) {
int findKeyIndex = findKeyIndex(f);
if (findKeyIndex < 0 || this.values[findKeyIndex] != j) {
return false;
}
removeValueAt(findKeyIndex);
return true;
}
public final void minusAssign(float f) {
remove(f);
}
public final void minusAssign(float[] keys) {
Intrinsics.checkNotNullParameter(keys, "keys");
for (float f : keys) {
remove(f);
}
}
private final int findInsertIndex(float f) {
int hashCode = Float.hashCode(f) * ScatterMapKt.MurmurHashC1;
int i = hashCode ^ (hashCode << 16);
int i2 = i >>> 7;
int i3 = i & 127;
int i4 = this._capacity;
int i5 = i2 & i4;
int i6 = 0;
while (true) {
long[] jArr = this.metadata;
int i7 = i5 >> 3;
int i8 = (i5 & 7) << 3;
long j = ((jArr[i7 + 1] << (64 - i8)) & ((-i8) >> 63)) | (jArr[i7] >>> i8);
long j2 = i3;
int i9 = i6;
long j3 = j ^ (j2 * ScatterMapKt.BitmaskLsb);
for (long j4 = (~j3) & (j3 - ScatterMapKt.BitmaskLsb) & (-9187201950435737472L); j4 != 0; j4 &= j4 - 1) {
int numberOfTrailingZeros = ((Long.numberOfTrailingZeros(j4) >> 3) + i5) & i4;
if (this.keys[numberOfTrailingZeros] == f) {
return numberOfTrailingZeros;
}
}
if ((((~j) << 6) & j & (-9187201950435737472L)) != 0) {
int findFirstAvailableSlot = findFirstAvailableSlot(i2);
if (this.growthLimit == 0 && ((this.metadata[findFirstAvailableSlot >> 3] >> ((findFirstAvailableSlot & 7) << 3)) & 255) != 254) {
adjustStorage();
findFirstAvailableSlot = findFirstAvailableSlot(i2);
}
this._size++;
int i10 = this.growthLimit;
long[] jArr2 = this.metadata;
int i11 = findFirstAvailableSlot >> 3;
long j5 = jArr2[i11];
int i12 = (findFirstAvailableSlot & 7) << 3;
this.growthLimit = i10 - (((j5 >> i12) & 255) == 128 ? 1 : 0);
jArr2[i11] = (j5 & (~(255 << i12))) | (j2 << i12);
int i13 = this._capacity;
int i14 = ((findFirstAvailableSlot - 7) & i13) + (i13 & 7);
int i15 = i14 >> 3;
int i16 = (i14 & 7) << 3;
jArr2[i15] = ((~(255 << i16)) & jArr2[i15]) | (j2 << i16);
return ~findFirstAvailableSlot;
}
i6 = i9 + 8;
i5 = (i5 + i6) & i4;
}
}
public final void clear() {
this._size = 0;
long[] jArr = this.metadata;
if (jArr != ScatterMapKt.EmptyGroup) {
ArraysKt___ArraysJvmKt.fill$default(jArr, -9187201950435737472L, 0, 0, 6, (Object) null);
long[] jArr2 = this.metadata;
int i = this._capacity;
int i2 = i >> 3;
long j = 255 << ((i & 7) << 3);
jArr2[i2] = (jArr2[i2] & (~j)) | j;
}
initializeGrowth();
}
public final int trim() {
int i = this._capacity;
int normalizeCapacity = ScatterMapKt.normalizeCapacity(ScatterMapKt.unloadedCapacity(this._size));
if (normalizeCapacity >= i) {
return 0;
}
resizeStorage(normalizeCapacity);
return i - this._capacity;
}
private final void adjustStorage() {
if (this._capacity > 8 && Long.compareUnsigned(ULong.m4068constructorimpl(ULong.m4068constructorimpl(this._size) * 32), ULong.m4068constructorimpl(ULong.m4068constructorimpl(this._capacity) * 25)) <= 0) {
removeDeletedMarkers();
} else {
resizeStorage(ScatterMapKt.nextCapacity(this._capacity));
}
}
private final void resizeStorage(int i) {
long[] jArr;
float[] fArr;
long[] jArr2 = this.metadata;
float[] fArr2 = this.keys;
long[] jArr3 = this.values;
int i2 = this._capacity;
initializeStorage(i);
float[] fArr3 = this.keys;
long[] jArr4 = this.values;
int i3 = 0;
while (i3 < i2) {
if (((jArr2[i3 >> 3] >> ((i3 & 7) << 3)) & 255) < 128) {
float f = fArr2[i3];
int hashCode = Float.hashCode(f) * ScatterMapKt.MurmurHashC1;
int i4 = hashCode ^ (hashCode << 16);
int findFirstAvailableSlot = findFirstAvailableSlot(i4 >>> 7);
long j = i4 & 127;
long[] jArr5 = this.metadata;
int i5 = findFirstAvailableSlot >> 3;
int i6 = (findFirstAvailableSlot & 7) << 3;
jArr = jArr2;
fArr = fArr2;
jArr5[i5] = (jArr5[i5] & (~(255 << i6))) | (j << i6);
int i7 = this._capacity;
int i8 = ((findFirstAvailableSlot - 7) & i7) + (i7 & 7);
int i9 = i8 >> 3;
int i10 = (i8 & 7) << 3;
jArr5[i9] = ((~(255 << i10)) & jArr5[i9]) | (j << i10);
fArr3[findFirstAvailableSlot] = f;
jArr4[findFirstAvailableSlot] = jArr3[i3];
} else {
jArr = jArr2;
fArr = fArr2;
}
i3++;
jArr2 = jArr;
fArr2 = fArr;
}
}
private final void removeDeletedMarkers() {
long[] jArr = this.metadata;
int i = this._capacity;
int i2 = 0;
for (int i3 = 0; i3 < i; i3++) {
int i4 = i3 >> 3;
int i5 = (i3 & 7) << 3;
if (((jArr[i4] >> i5) & 255) == 254) {
long[] jArr2 = this.metadata;
jArr2[i4] = (128 << i5) | (jArr2[i4] & (~(255 << i5)));
int i6 = this._capacity;
int i7 = ((i3 - 7) & i6) + (i6 & 7);
int i8 = i7 >> 3;
int i9 = (i7 & 7) << 3;
jArr2[i8] = ((~(255 << i9)) & jArr2[i8]) | (128 << i9);
i2++;
}
}
this.growthLimit += i2;
}
private final void writeMetadata(int i, long j) {
long[] jArr = this.metadata;
int i2 = i >> 3;
int i3 = (i & 7) << 3;
jArr[i2] = (jArr[i2] & (~(255 << i3))) | (j << i3);
int i4 = this._capacity;
int i5 = ((i - 7) & i4) + (i4 & 7);
int i6 = i5 >> 3;
int i7 = (i5 & 7) << 3;
jArr[i6] = (j << i7) | (jArr[i6] & (~(255 << i7)));
}
public final void removeValueAt(int i) {
this._size--;
long[] jArr = this.metadata;
int i2 = i >> 3;
int i3 = (i & 7) << 3;
jArr[i2] = (jArr[i2] & (~(255 << i3))) | (254 << i3);
int i4 = this._capacity;
int i5 = ((i - 7) & i4) + (i4 & 7);
int i6 = i5 >> 3;
int i7 = (i5 & 7) << 3;
jArr[i6] = (jArr[i6] & (~(255 << i7))) | (254 << i7);
}
private final int findFirstAvailableSlot(int i) {
int i2 = this._capacity;
int i3 = i & i2;
int i4 = 0;
while (true) {
long[] jArr = this.metadata;
int i5 = i3 >> 3;
int i6 = (i3 & 7) << 3;
long j = ((jArr[i5 + 1] << (64 - i6)) & ((-i6) >> 63)) | (jArr[i5] >>> i6);
long j2 = j & ((~j) << 7) & (-9187201950435737472L);
if (j2 != 0) {
return (i3 + (Long.numberOfTrailingZeros(j2) >> 3)) & i2;
}
i4 += 8;
i3 = (i3 + i4) & i2;
}
}
}

View File

@@ -0,0 +1,593 @@
package androidx.collection;
import kotlin.ULong;
import kotlin.collections.ArraysKt___ArraysJvmKt;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
@SourceDebugExtension({"SMAP\nFloatObjectMap.kt\nKotlin\n*S Kotlin\n*F\n+ 1 FloatObjectMap.kt\nandroidx/collection/MutableFloatObjectMap\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n+ 3 ScatterMap.kt\nandroidx/collection/ScatterMapKt\n+ 4 FloatObjectMap.kt\nandroidx/collection/FloatObjectMap\n+ 5 FloatSet.kt\nandroidx/collection/FloatSetKt\n+ 6 FloatSet.kt\nandroidx/collection/FloatSet\n+ 7 FloatList.kt\nandroidx/collection/FloatList\n*L\n1#1,1034:1\n820#1,2:1187\n820#1,2:1201\n1024#1,2:1204\n1028#1,5:1212\n1024#1,2:1243\n1028#1,5:1251\n1024#1,2:1268\n1028#1,5:1276\n1024#1,2:1282\n1028#1,5:1290\n1#2:1035\n1672#3,6:1036\n1826#3:1052\n1688#3:1056\n1619#3:1073\n1615#3:1076\n1795#3,3:1081\n1809#3,3:1085\n1733#3:1089\n1721#3:1091\n1715#3:1092\n1728#3:1097\n1818#3:1099\n1619#3:1113\n1615#3:1116\n1795#3,3:1121\n1809#3,3:1125\n1733#3:1129\n1721#3:1131\n1715#3:1132\n1728#3:1137\n1818#3:1139\n1826#3:1154\n1688#3:1158\n1826#3:1179\n1688#3:1183\n1672#3,6:1206\n1672#3,6:1217\n1615#3:1226\n1619#3:1227\n1795#3,3:1228\n1809#3,3:1231\n1733#3:1234\n1721#3:1235\n1715#3:1236\n1728#3:1237\n1818#3:1238\n1682#3:1239\n1661#3:1240\n1680#3:1241\n1661#3:1242\n1672#3,6:1245\n1795#3,3:1256\n1826#3:1259\n1715#3:1260\n1685#3:1261\n1661#3:1262\n1615#3:1266\n1619#3:1267\n1672#3,6:1270\n1661#3:1281\n1672#3,6:1284\n1672#3,6:1295\n1672#3,6:1301\n382#4,4:1042\n354#4,6:1046\n364#4,3:1053\n367#4,2:1057\n387#4,2:1059\n370#4,6:1061\n389#4:1067\n619#4:1068\n620#4:1072\n622#4,2:1074\n624#4,4:1077\n628#4:1084\n629#4:1088\n630#4:1090\n631#4,4:1093\n637#4:1098\n638#4,8:1100\n619#4:1108\n620#4:1112\n622#4,2:1114\n624#4,4:1117\n628#4:1124\n629#4:1128\n630#4:1130\n631#4,4:1133\n637#4:1138\n638#4,8:1140\n354#4,6:1148\n364#4,3:1155\n367#4,9:1159\n849#5,3:1069\n849#5,3:1109\n849#5,3:1223\n849#5,3:1263\n262#6,4:1168\n232#6,7:1172\n243#6,3:1180\n246#6,2:1184\n266#6:1186\n267#6:1189\n249#6,6:1190\n268#6:1196\n253#7,4:1197\n258#7:1203\n*S KotlinDebug\n*F\n+ 1 FloatObjectMap.kt\nandroidx/collection/MutableFloatObjectMap\n*L\n837#1:1187,2\n846#1:1201,2\n856#1:1204,2\n856#1:1212,5\n920#1:1243,2\n920#1:1251,5\n994#1:1268,2\n994#1:1276,5\n1010#1:1282,2\n1010#1:1290,5\n713#1:1036,6\n766#1:1052\n766#1:1056\n782#1:1073\n782#1:1076\n782#1:1081,3\n782#1:1085,3\n782#1:1089\n782#1:1091\n782#1:1092\n782#1:1097\n782#1:1099\n794#1:1113\n794#1:1116\n794#1:1121,3\n794#1:1125,3\n794#1:1129\n794#1:1131\n794#1:1132\n794#1:1137\n794#1:1139\n808#1:1154\n808#1:1158\n836#1:1179\n836#1:1183\n856#1:1206,6\n871#1:1217,6\n886#1:1226\n887#1:1227\n894#1:1228,3\n895#1:1231,3\n896#1:1234\n897#1:1235\n897#1:1236\n901#1:1237\n904#1:1238\n913#1:1239\n913#1:1240\n919#1:1241\n919#1:1242\n920#1:1245,6\n935#1:1256,3\n936#1:1259\n938#1:1260\n989#1:1261\n989#1:1262\n992#1:1266\n994#1:1267\n994#1:1270,6\n1008#1:1281\n1010#1:1284,6\n1025#1:1295,6\n1031#1:1301,6\n766#1:1042,4\n766#1:1046,6\n766#1:1053,3\n766#1:1057,2\n766#1:1059,2\n766#1:1061,6\n766#1:1067\n782#1:1068\n782#1:1072\n782#1:1074,2\n782#1:1077,4\n782#1:1084\n782#1:1088\n782#1:1090\n782#1:1093,4\n782#1:1098\n782#1:1100,8\n794#1:1108\n794#1:1112\n794#1:1114,2\n794#1:1117,4\n794#1:1124\n794#1:1128\n794#1:1130\n794#1:1133,4\n794#1:1138\n794#1:1140,8\n808#1:1148,6\n808#1:1155,3\n808#1:1159,9\n782#1:1069,3\n794#1:1109,3\n885#1:1223,3\n991#1:1263,3\n836#1:1168,4\n836#1:1172,7\n836#1:1180,3\n836#1:1184,2\n836#1:1186\n836#1:1189\n836#1:1190,6\n836#1:1196\n845#1:1197,4\n845#1:1203\n*E\n"})
/* loaded from: classes.dex */
public final class MutableFloatObjectMap<V> extends FloatObjectMap<V> {
private int growthLimit;
public MutableFloatObjectMap() {
this(0, 1, null);
}
public final void minusAssign(FloatList keys) {
Intrinsics.checkNotNullParameter(keys, "keys");
float[] fArr = keys.content;
int i = keys._size;
for (int i2 = 0; i2 < i; i2++) {
remove(fArr[i2]);
}
}
public final void minusAssign(FloatSet keys) {
Intrinsics.checkNotNullParameter(keys, "keys");
float[] fArr = keys.elements;
long[] jArr = keys.metadata;
int length = jArr.length - 2;
if (length < 0) {
return;
}
int i = 0;
while (true) {
long j = jArr[i];
if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
int i2 = 8 - ((~(i - length)) >>> 31);
for (int i3 = 0; i3 < i2; i3++) {
if ((255 & j) < 128) {
remove(fArr[(i << 3) + i3]);
}
j >>= 8;
}
if (i2 != 8) {
return;
}
}
if (i == length) {
return;
} else {
i++;
}
}
}
public final void removeIf(Function2 predicate) {
Intrinsics.checkNotNullParameter(predicate, "predicate");
long[] jArr = this.metadata;
int length = jArr.length - 2;
if (length < 0) {
return;
}
int i = 0;
while (true) {
long j = jArr[i];
if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
int i2 = 8 - ((~(i - length)) >>> 31);
for (int i3 = 0; i3 < i2; i3++) {
if ((255 & j) < 128) {
int i4 = (i << 3) + i3;
if (((Boolean) predicate.invoke(Float.valueOf(this.keys[i4]), this.values[i4])).booleanValue()) {
removeValueAt(i4);
}
}
j >>= 8;
}
if (i2 != 8) {
return;
}
}
if (i == length) {
return;
} else {
i++;
}
}
}
/* JADX WARN: Multi-variable type inference failed */
public final void putAll(FloatObjectMap<V> from) {
Intrinsics.checkNotNullParameter(from, "from");
float[] fArr = from.keys;
Object[] objArr = from.values;
long[] jArr = from.metadata;
int length = jArr.length - 2;
if (length < 0) {
return;
}
int i = 0;
while (true) {
long j = jArr[i];
if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
int i2 = 8 - ((~(i - length)) >>> 31);
for (int i3 = 0; i3 < i2; i3++) {
if ((255 & j) < 128) {
int i4 = (i << 3) + i3;
set(fArr[i4], objArr[i4]);
}
j >>= 8;
}
if (i2 != 8) {
return;
}
}
if (i == length) {
return;
} else {
i++;
}
}
}
public /* synthetic */ MutableFloatObjectMap(int i, int i2, DefaultConstructorMarker defaultConstructorMarker) {
this((i2 & 1) != 0 ? 6 : i);
}
public MutableFloatObjectMap(int i) {
super(null);
if (i < 0) {
throw new IllegalArgumentException("Capacity must be a positive value.".toString());
}
initializeStorage(ScatterMapKt.unloadedCapacity(i));
}
private final void initializeStorage(int i) {
int max = i > 0 ? Math.max(7, ScatterMapKt.normalizeCapacity(i)) : 0;
this._capacity = max;
initializeMetadata(max);
this.keys = new float[max];
this.values = new Object[max];
}
private final void initializeMetadata(int i) {
long[] jArr;
if (i == 0) {
jArr = ScatterMapKt.EmptyGroup;
} else {
jArr = new long[((i + 15) & (-8)) >> 3];
ArraysKt___ArraysJvmKt.fill$default(jArr, -9187201950435737472L, 0, 0, 6, (Object) null);
}
this.metadata = jArr;
int i2 = i >> 3;
long j = 255 << ((i & 7) << 3);
jArr[i2] = (jArr[i2] & (~j)) | j;
initializeGrowth();
}
private final void initializeGrowth() {
this.growthLimit = ScatterMapKt.loadedCapacity(getCapacity()) - this._size;
}
public final V getOrPut(float f, Function0 defaultValue) {
Intrinsics.checkNotNullParameter(defaultValue, "defaultValue");
V v = get(f);
if (v != null) {
return v;
}
V v2 = (V) defaultValue.invoke();
set(f, v2);
return v2;
}
public final void set(float f, V v) {
int findAbsoluteInsertIndex = findAbsoluteInsertIndex(f);
this.keys[findAbsoluteInsertIndex] = f;
this.values[findAbsoluteInsertIndex] = v;
}
public final V put(float f, V v) {
int findAbsoluteInsertIndex = findAbsoluteInsertIndex(f);
Object[] objArr = this.values;
V v2 = (V) objArr[findAbsoluteInsertIndex];
this.keys[findAbsoluteInsertIndex] = f;
objArr[findAbsoluteInsertIndex] = v;
return v2;
}
public final void plusAssign(FloatObjectMap<V> from) {
Intrinsics.checkNotNullParameter(from, "from");
putAll(from);
}
public final void minusAssign(float f) {
remove(f);
}
public final void minusAssign(float[] keys) {
Intrinsics.checkNotNullParameter(keys, "keys");
for (float f : keys) {
remove(f);
}
}
private final int findAbsoluteInsertIndex(float f) {
int hashCode = Float.hashCode(f) * ScatterMapKt.MurmurHashC1;
int i = hashCode ^ (hashCode << 16);
int i2 = i >>> 7;
int i3 = i & 127;
int i4 = this._capacity;
int i5 = i2 & i4;
int i6 = 0;
while (true) {
long[] jArr = this.metadata;
int i7 = i5 >> 3;
int i8 = (i5 & 7) << 3;
long j = ((jArr[i7 + 1] << (64 - i8)) & ((-i8) >> 63)) | (jArr[i7] >>> i8);
long j2 = i3;
int i9 = i6;
long j3 = j ^ (j2 * ScatterMapKt.BitmaskLsb);
for (long j4 = (~j3) & (j3 - ScatterMapKt.BitmaskLsb) & (-9187201950435737472L); j4 != 0; j4 &= j4 - 1) {
int numberOfTrailingZeros = ((Long.numberOfTrailingZeros(j4) >> 3) + i5) & i4;
if (this.keys[numberOfTrailingZeros] == f) {
return numberOfTrailingZeros;
}
}
if ((((~j) << 6) & j & (-9187201950435737472L)) != 0) {
int findFirstAvailableSlot = findFirstAvailableSlot(i2);
if (this.growthLimit == 0 && ((this.metadata[findFirstAvailableSlot >> 3] >> ((findFirstAvailableSlot & 7) << 3)) & 255) != 254) {
adjustStorage();
findFirstAvailableSlot = findFirstAvailableSlot(i2);
}
this._size++;
int i10 = this.growthLimit;
long[] jArr2 = this.metadata;
int i11 = findFirstAvailableSlot >> 3;
long j5 = jArr2[i11];
int i12 = (findFirstAvailableSlot & 7) << 3;
this.growthLimit = i10 - (((j5 >> i12) & 255) == 128 ? 1 : 0);
jArr2[i11] = (j5 & (~(255 << i12))) | (j2 << i12);
int i13 = this._capacity;
int i14 = ((findFirstAvailableSlot - 7) & i13) + (i13 & 7);
int i15 = i14 >> 3;
int i16 = (i14 & 7) << 3;
jArr2[i15] = ((~(255 << i16)) & jArr2[i15]) | (j2 << i16);
return findFirstAvailableSlot;
}
i6 = i9 + 8;
i5 = (i5 + i6) & i4;
}
}
/* JADX WARN: Code restructure failed: missing block: B:16:0x0063, code lost:
if (((r4 & ((~r4) << 6)) & (-9187201950435737472L)) == 0) goto L18;
*/
/* JADX WARN: Code restructure failed: missing block: B:19:0x0065, code lost:
r10 = -1;
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final V remove(float r14) {
/*
r13 = this;
int r0 = java.lang.Float.hashCode(r14)
r1 = -862048943(0xffffffffcc9e2d51, float:-8.293031E7)
int r0 = r0 * r1
int r1 = r0 << 16
r0 = r0 ^ r1
r1 = r0 & 127(0x7f, float:1.78E-43)
int r2 = r13._capacity
int r0 = r0 >>> 7
r0 = r0 & r2
r3 = 0
L13:
long[] r4 = r13.metadata
int r5 = r0 >> 3
r6 = r0 & 7
int r6 = r6 << 3
r7 = r4[r5]
long r7 = r7 >>> r6
int r5 = r5 + 1
r9 = r4[r5]
int r4 = 64 - r6
long r4 = r9 << r4
long r9 = (long) r6
long r9 = -r9
r6 = 63
long r9 = r9 >> r6
long r4 = r4 & r9
long r4 = r4 | r7
long r6 = (long) r1
r8 = 72340172838076673(0x101010101010101, double:7.748604185489348E-304)
long r6 = r6 * r8
long r6 = r6 ^ r4
long r8 = r6 - r8
long r6 = ~r6
long r6 = r6 & r8
r8 = -9187201950435737472(0x8080808080808080, double:-2.937446524422997E-306)
long r6 = r6 & r8
L3f:
r10 = 0
int r12 = (r6 > r10 ? 1 : (r6 == r10 ? 0 : -1))
if (r12 == 0) goto L5c
int r10 = java.lang.Long.numberOfTrailingZeros(r6)
int r10 = r10 >> 3
int r10 = r10 + r0
r10 = r10 & r2
float[] r11 = r13.keys
r11 = r11[r10]
int r11 = (r11 > r14 ? 1 : (r11 == r14 ? 0 : -1))
if (r11 != 0) goto L56
goto L66
L56:
r10 = 1
long r10 = r6 - r10
long r6 = r6 & r10
goto L3f
L5c:
long r6 = ~r4
r12 = 6
long r6 = r6 << r12
long r4 = r4 & r6
long r4 = r4 & r8
int r4 = (r4 > r10 ? 1 : (r4 == r10 ? 0 : -1))
if (r4 == 0) goto L6f
r10 = -1
L66:
if (r10 < 0) goto L6d
java.lang.Object r14 = r13.removeValueAt(r10)
return r14
L6d:
r14 = 0
return r14
L6f:
int r3 = r3 + 8
int r0 = r0 + r3
r0 = r0 & r2
goto L13
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.collection.MutableFloatObjectMap.remove(float):java.lang.Object");
}
/* JADX WARN: Code restructure failed: missing block: B:18:0x0066, code lost:
if (((r6 & ((~r6) << 6)) & (-9187201950435737472L)) == 0) goto L19;
*/
/* JADX WARN: Code restructure failed: missing block: B:21:0x0068, code lost:
r10 = -1;
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final boolean remove(float r17, V r18) {
/*
r16 = this;
r0 = r16
int r1 = java.lang.Float.hashCode(r17)
r2 = -862048943(0xffffffffcc9e2d51, float:-8.293031E7)
int r1 = r1 * r2
int r2 = r1 << 16
r1 = r1 ^ r2
r2 = r1 & 127(0x7f, float:1.78E-43)
int r3 = r0._capacity
int r1 = r1 >>> 7
r1 = r1 & r3
r4 = 0
r5 = r4
L16:
long[] r6 = r0.metadata
int r7 = r1 >> 3
r8 = r1 & 7
int r8 = r8 << 3
r9 = r6[r7]
long r9 = r9 >>> r8
r11 = 1
int r7 = r7 + r11
r12 = r6[r7]
int r6 = 64 - r8
long r6 = r12 << r6
long r12 = (long) r8
long r12 = -r12
r8 = 63
long r12 = r12 >> r8
long r6 = r6 & r12
long r6 = r6 | r9
long r8 = (long) r2
r12 = 72340172838076673(0x101010101010101, double:7.748604185489348E-304)
long r8 = r8 * r12
long r8 = r8 ^ r6
long r12 = r8 - r12
long r8 = ~r8
long r8 = r8 & r12
r12 = -9187201950435737472(0x8080808080808080, double:-2.937446524422997E-306)
long r8 = r8 & r12
L42:
r14 = 0
int r10 = (r8 > r14 ? 1 : (r8 == r14 ? 0 : -1))
if (r10 == 0) goto L5f
int r10 = java.lang.Long.numberOfTrailingZeros(r8)
int r10 = r10 >> 3
int r10 = r10 + r1
r10 = r10 & r3
float[] r14 = r0.keys
r14 = r14[r10]
int r14 = (r14 > r17 ? 1 : (r14 == r17 ? 0 : -1))
if (r14 != 0) goto L59
goto L69
L59:
r14 = 1
long r14 = r8 - r14
long r8 = r8 & r14
goto L42
L5f:
long r8 = ~r6
r10 = 6
long r8 = r8 << r10
long r6 = r6 & r8
long r6 = r6 & r12
int r6 = (r6 > r14 ? 1 : (r6 == r14 ? 0 : -1))
if (r6 == 0) goto L7c
r10 = -1
L69:
if (r10 < 0) goto L7b
java.lang.Object[] r1 = r0.values
r1 = r1[r10]
r6 = r18
boolean r1 = kotlin.jvm.internal.Intrinsics.areEqual(r1, r6)
if (r1 == 0) goto L7b
r0.removeValueAt(r10)
return r11
L7b:
return r4
L7c:
r6 = r18
int r5 = r5 + 8
int r1 = r1 + r5
r1 = r1 & r3
goto L16
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.collection.MutableFloatObjectMap.remove(float, java.lang.Object):boolean");
}
public final void clear() {
this._size = 0;
long[] jArr = this.metadata;
if (jArr != ScatterMapKt.EmptyGroup) {
ArraysKt___ArraysJvmKt.fill$default(jArr, -9187201950435737472L, 0, 0, 6, (Object) null);
long[] jArr2 = this.metadata;
int i = this._capacity;
int i2 = i >> 3;
long j = 255 << ((i & 7) << 3);
jArr2[i2] = (jArr2[i2] & (~j)) | j;
}
ArraysKt___ArraysJvmKt.fill(this.values, (Object) null, 0, this._capacity);
initializeGrowth();
}
public final int trim() {
int i = this._capacity;
int normalizeCapacity = ScatterMapKt.normalizeCapacity(ScatterMapKt.unloadedCapacity(this._size));
if (normalizeCapacity >= i) {
return 0;
}
resizeStorage(normalizeCapacity);
return i - this._capacity;
}
private final void adjustStorage() {
if (this._capacity > 8 && Long.compareUnsigned(ULong.m4068constructorimpl(ULong.m4068constructorimpl(this._size) * 32), ULong.m4068constructorimpl(ULong.m4068constructorimpl(this._capacity) * 25)) <= 0) {
removeDeletedMarkers();
} else {
resizeStorage(ScatterMapKt.nextCapacity(this._capacity));
}
}
private final void resizeStorage(int i) {
long[] jArr;
float[] fArr;
long[] jArr2 = this.metadata;
float[] fArr2 = this.keys;
Object[] objArr = this.values;
int i2 = this._capacity;
initializeStorage(i);
float[] fArr3 = this.keys;
Object[] objArr2 = this.values;
int i3 = 0;
while (i3 < i2) {
if (((jArr2[i3 >> 3] >> ((i3 & 7) << 3)) & 255) < 128) {
float f = fArr2[i3];
int hashCode = Float.hashCode(f) * ScatterMapKt.MurmurHashC1;
int i4 = hashCode ^ (hashCode << 16);
int findFirstAvailableSlot = findFirstAvailableSlot(i4 >>> 7);
long j = i4 & 127;
long[] jArr3 = this.metadata;
int i5 = findFirstAvailableSlot >> 3;
int i6 = (findFirstAvailableSlot & 7) << 3;
jArr = jArr2;
fArr = fArr2;
jArr3[i5] = (jArr3[i5] & (~(255 << i6))) | (j << i6);
int i7 = this._capacity;
int i8 = ((findFirstAvailableSlot - 7) & i7) + (i7 & 7);
int i9 = i8 >> 3;
int i10 = (i8 & 7) << 3;
jArr3[i9] = ((~(255 << i10)) & jArr3[i9]) | (j << i10);
fArr3[findFirstAvailableSlot] = f;
objArr2[findFirstAvailableSlot] = objArr[i3];
} else {
jArr = jArr2;
fArr = fArr2;
}
i3++;
jArr2 = jArr;
fArr2 = fArr;
}
}
private final void removeDeletedMarkers() {
long[] jArr = this.metadata;
int i = this._capacity;
int i2 = 0;
for (int i3 = 0; i3 < i; i3++) {
int i4 = i3 >> 3;
int i5 = (i3 & 7) << 3;
if (((jArr[i4] >> i5) & 255) == 254) {
long[] jArr2 = this.metadata;
jArr2[i4] = (128 << i5) | (jArr2[i4] & (~(255 << i5)));
int i6 = this._capacity;
int i7 = ((i3 - 7) & i6) + (i6 & 7);
int i8 = i7 >> 3;
int i9 = (i7 & 7) << 3;
jArr2[i8] = ((~(255 << i9)) & jArr2[i8]) | (128 << i9);
i2++;
}
}
this.growthLimit += i2;
}
private final void writeMetadata(int i, long j) {
long[] jArr = this.metadata;
int i2 = i >> 3;
int i3 = (i & 7) << 3;
jArr[i2] = (jArr[i2] & (~(255 << i3))) | (j << i3);
int i4 = this._capacity;
int i5 = ((i - 7) & i4) + (i4 & 7);
int i6 = i5 >> 3;
int i7 = (i5 & 7) << 3;
jArr[i6] = (j << i7) | (jArr[i6] & (~(255 << i7)));
}
public final V removeValueAt(int i) {
this._size--;
long[] jArr = this.metadata;
int i2 = i >> 3;
int i3 = (i & 7) << 3;
jArr[i2] = (jArr[i2] & (~(255 << i3))) | (254 << i3);
int i4 = this._capacity;
int i5 = ((i - 7) & i4) + (i4 & 7);
int i6 = i5 >> 3;
int i7 = (i5 & 7) << 3;
jArr[i6] = (jArr[i6] & (~(255 << i7))) | (254 << i7);
Object[] objArr = this.values;
V v = (V) objArr[i];
objArr[i] = null;
return v;
}
private final int findFirstAvailableSlot(int i) {
int i2 = this._capacity;
int i3 = i & i2;
int i4 = 0;
while (true) {
long[] jArr = this.metadata;
int i5 = i3 >> 3;
int i6 = (i3 & 7) << 3;
long j = ((jArr[i5 + 1] << (64 - i6)) & ((-i6) >> 63)) | (jArr[i5] >>> i6);
long j2 = j & ((~j) << 7) & (-9187201950435737472L);
if (j2 != 0) {
return (i3 + (Long.numberOfTrailingZeros(j2) >> 3)) & i2;
}
i4 += 8;
i3 = (i3 + i4) & i2;
}
}
}

View File

@@ -0,0 +1,543 @@
package androidx.collection;
import androidx.annotation.IntRange;
import kotlin.ULong;
import kotlin.collections.ArraysKt___ArraysJvmKt;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
@SourceDebugExtension({"SMAP\nFloatSet.kt\nKotlin\n*S Kotlin\n*F\n+ 1 FloatSet.kt\nandroidx/collection/MutableFloatSet\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n+ 3 ScatterMap.kt\nandroidx/collection/ScatterMapKt\n+ 4 _Arrays.kt\nkotlin/collections/ArraysKt___ArraysKt\n+ 5 FloatSet.kt\nandroidx/collection/FloatSet\n+ 6 FloatSet.kt\nandroidx/collection/FloatSetKt\n*L\n1#1,853:1\n832#1,2:997\n836#1,5:1005\n832#1,2:1036\n836#1,5:1044\n832#1,2:1061\n836#1,5:1069\n832#1,2:1075\n836#1,5:1083\n1#2:854\n1672#3,6:855\n1826#3:874\n1688#3:878\n1619#3:895\n1615#3:898\n1795#3,3:902\n1809#3,3:906\n1733#3:910\n1721#3:912\n1715#3:913\n1728#3:918\n1818#3:920\n1619#3:934\n1615#3:937\n1795#3,3:941\n1809#3,3:945\n1733#3:949\n1721#3:951\n1715#3:952\n1728#3:957\n1818#3:959\n1826#3:981\n1688#3:985\n1672#3,6:999\n1672#3,6:1010\n1615#3:1019\n1619#3:1020\n1795#3,3:1021\n1809#3,3:1024\n1733#3:1027\n1721#3:1028\n1715#3:1029\n1728#3:1030\n1818#3:1031\n1682#3:1032\n1661#3:1033\n1680#3:1034\n1661#3:1035\n1672#3,6:1038\n1795#3,3:1049\n1826#3:1052\n1715#3:1053\n1685#3:1054\n1661#3:1055\n1615#3:1059\n1619#3:1060\n1672#3,6:1063\n1661#3:1074\n1672#3,6:1077\n1672#3,6:1088\n1672#3,6:1094\n13614#4,2:861\n13614#4,2:968\n262#5,4:863\n232#5,7:867\n243#5,3:875\n246#5,2:879\n266#5,2:881\n249#5,6:883\n268#5:889\n442#5:890\n443#5:894\n445#5,2:896\n447#5,3:899\n450#5:905\n451#5:909\n452#5:911\n453#5,4:914\n459#5:919\n460#5,8:921\n442#5:929\n443#5:933\n445#5,2:935\n447#5,3:938\n450#5:944\n451#5:948\n452#5:950\n453#5,4:953\n459#5:958\n460#5,8:960\n262#5,4:970\n232#5,7:974\n243#5,3:982\n246#5,2:986\n266#5,2:988\n249#5,6:990\n268#5:996\n849#6,3:891\n849#6,3:930\n849#6,3:1016\n849#6,3:1056\n*S KotlinDebug\n*F\n+ 1 FloatSet.kt\nandroidx/collection/MutableFloatSet\n*L\n673#1:997,2\n673#1:1005,5\n731#1:1036,2\n731#1:1044,5\n803#1:1061,2\n803#1:1069,5\n818#1:1075,2\n818#1:1083,5\n526#1:855,6\n595#1:874\n595#1:878\n607#1:895\n607#1:898\n607#1:902,3\n607#1:906,3\n607#1:910\n607#1:912\n607#1:913\n607#1:918\n607#1:920\n620#1:934\n620#1:937\n620#1:941,3\n620#1:945,3\n620#1:949\n620#1:951\n620#1:952\n620#1:957\n620#1:959\n663#1:981\n663#1:985\n673#1:999,6\n683#1:1010,6\n697#1:1019\n698#1:1020\n705#1:1021,3\n706#1:1024,3\n707#1:1027\n708#1:1028\n708#1:1029\n712#1:1030\n715#1:1031\n724#1:1032\n724#1:1033\n730#1:1034\n730#1:1035\n731#1:1038,6\n745#1:1049,3\n746#1:1052\n748#1:1053\n798#1:1054\n798#1:1055\n801#1:1059\n803#1:1060\n803#1:1063,6\n816#1:1074\n818#1:1077,6\n833#1:1088,6\n839#1:1094,6\n573#1:861,2\n642#1:968,2\n595#1:863,4\n595#1:867,7\n595#1:875,3\n595#1:879,2\n595#1:881,2\n595#1:883,6\n595#1:889\n607#1:890\n607#1:894\n607#1:896,2\n607#1:899,3\n607#1:905\n607#1:909\n607#1:911\n607#1:914,4\n607#1:919\n607#1:921,8\n620#1:929\n620#1:933\n620#1:935,2\n620#1:938,3\n620#1:944\n620#1:948\n620#1:950\n620#1:953,4\n620#1:958\n620#1:960,8\n663#1:970,4\n663#1:974,7\n663#1:982,3\n663#1:986,2\n663#1:988,2\n663#1:990,6\n663#1:996\n607#1:891,3\n620#1:930,3\n696#1:1016,3\n800#1:1056,3\n*E\n"})
/* loaded from: classes.dex */
public final class MutableFloatSet extends FloatSet {
private int growthLimit;
public MutableFloatSet() {
this(0, 1, null);
}
public final void minusAssign(FloatSet elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
float[] fArr = elements.elements;
long[] jArr = elements.metadata;
int length = jArr.length - 2;
if (length < 0) {
return;
}
int i = 0;
while (true) {
long j = jArr[i];
if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
int i2 = 8 - ((~(i - length)) >>> 31);
for (int i3 = 0; i3 < i2; i3++) {
if ((255 & j) < 128) {
minusAssign(fArr[(i << 3) + i3]);
}
j >>= 8;
}
if (i2 != 8) {
return;
}
}
if (i == length) {
return;
} else {
i++;
}
}
}
public final void plusAssign(FloatSet elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
float[] fArr = elements.elements;
long[] jArr = elements.metadata;
int length = jArr.length - 2;
if (length < 0) {
return;
}
int i = 0;
while (true) {
long j = jArr[i];
if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
int i2 = 8 - ((~(i - length)) >>> 31);
for (int i3 = 0; i3 < i2; i3++) {
if ((255 & j) < 128) {
plusAssign(fArr[(i << 3) + i3]);
}
j >>= 8;
}
if (i2 != 8) {
return;
}
}
if (i == length) {
return;
} else {
i++;
}
}
}
public /* synthetic */ MutableFloatSet(int i, int i2, DefaultConstructorMarker defaultConstructorMarker) {
this((i2 & 1) != 0 ? 6 : i);
}
public MutableFloatSet(int i) {
super(null);
if (i < 0) {
throw new IllegalArgumentException("Capacity must be a positive value.".toString());
}
initializeStorage(ScatterMapKt.unloadedCapacity(i));
}
private final void initializeStorage(int i) {
int max = i > 0 ? Math.max(7, ScatterMapKt.normalizeCapacity(i)) : 0;
this._capacity = max;
initializeMetadata(max);
this.elements = new float[max];
}
private final void initializeMetadata(int i) {
long[] jArr;
if (i == 0) {
jArr = ScatterMapKt.EmptyGroup;
} else {
jArr = new long[((i + 15) & (-8)) >> 3];
ArraysKt___ArraysJvmKt.fill$default(jArr, -9187201950435737472L, 0, 0, 6, (Object) null);
}
this.metadata = jArr;
int i2 = i >> 3;
long j = 255 << ((i & 7) << 3);
jArr[i2] = (jArr[i2] & (~j)) | j;
initializeGrowth();
}
private final void initializeGrowth() {
this.growthLimit = ScatterMapKt.loadedCapacity(getCapacity()) - this._size;
}
public final boolean add(float f) {
int i = this._size;
this.elements[findAbsoluteInsertIndex(f)] = f;
return this._size != i;
}
public final void plusAssign(float f) {
this.elements[findAbsoluteInsertIndex(f)] = f;
}
public final boolean addAll(float[] elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
int i = this._size;
plusAssign(elements);
return i != this._size;
}
public final boolean addAll(FloatSet elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
int i = this._size;
plusAssign(elements);
return i != this._size;
}
public final boolean removeAll(float[] elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
int i = this._size;
minusAssign(elements);
return i != this._size;
}
public final boolean removeAll(FloatSet elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
int i = this._size;
minusAssign(elements);
return i != this._size;
}
public final void clear() {
this._size = 0;
long[] jArr = this.metadata;
if (jArr != ScatterMapKt.EmptyGroup) {
ArraysKt___ArraysJvmKt.fill$default(jArr, -9187201950435737472L, 0, 0, 6, (Object) null);
long[] jArr2 = this.metadata;
int i = this._capacity;
int i2 = i >> 3;
long j = 255 << ((i & 7) << 3);
jArr2[i2] = (jArr2[i2] & (~j)) | j;
}
initializeGrowth();
}
@IntRange(from = 0)
public final int trim() {
int i = this._capacity;
int normalizeCapacity = ScatterMapKt.normalizeCapacity(ScatterMapKt.unloadedCapacity(this._size));
if (normalizeCapacity >= i) {
return 0;
}
resizeStorage(normalizeCapacity);
return i - this._capacity;
}
private final void adjustStorage() {
if (this._capacity > 8 && Long.compareUnsigned(ULong.m4068constructorimpl(ULong.m4068constructorimpl(this._size) * 32), ULong.m4068constructorimpl(ULong.m4068constructorimpl(this._capacity) * 25)) <= 0) {
removeDeletedMarkers();
} else {
resizeStorage(ScatterMapKt.nextCapacity(this._capacity));
}
}
private final void resizeStorage(int i) {
long[] jArr;
float[] fArr;
long[] jArr2 = this.metadata;
float[] fArr2 = this.elements;
int i2 = this._capacity;
initializeStorage(i);
float[] fArr3 = this.elements;
int i3 = 0;
while (i3 < i2) {
if (((jArr2[i3 >> 3] >> ((i3 & 7) << 3)) & 255) < 128) {
float f = fArr2[i3];
int hashCode = Float.hashCode(f) * ScatterMapKt.MurmurHashC1;
int i4 = hashCode ^ (hashCode << 16);
int findFirstAvailableSlot = findFirstAvailableSlot(i4 >>> 7);
long j = i4 & 127;
long[] jArr3 = this.metadata;
int i5 = findFirstAvailableSlot >> 3;
int i6 = (findFirstAvailableSlot & 7) << 3;
jArr = jArr2;
fArr = fArr2;
jArr3[i5] = ((~(255 << i6)) & jArr3[i5]) | (j << i6);
int i7 = this._capacity;
int i8 = ((findFirstAvailableSlot - 7) & i7) + (i7 & 7);
int i9 = i8 >> 3;
int i10 = (i8 & 7) << 3;
jArr3[i9] = ((~(255 << i10)) & jArr3[i9]) | (j << i10);
fArr3[findFirstAvailableSlot] = f;
} else {
jArr = jArr2;
fArr = fArr2;
}
i3++;
jArr2 = jArr;
fArr2 = fArr;
}
}
private final int findAbsoluteInsertIndex(float f) {
int hashCode = Float.hashCode(f) * ScatterMapKt.MurmurHashC1;
int i = hashCode ^ (hashCode << 16);
int i2 = i >>> 7;
int i3 = i & 127;
int i4 = this._capacity;
int i5 = i2 & i4;
int i6 = 0;
while (true) {
long[] jArr = this.metadata;
int i7 = i5 >> 3;
int i8 = (i5 & 7) << 3;
long j = ((jArr[i7 + 1] << (64 - i8)) & ((-i8) >> 63)) | (jArr[i7] >>> i8);
long j2 = i3;
int i9 = i6;
long j3 = j ^ (j2 * ScatterMapKt.BitmaskLsb);
for (long j4 = (~j3) & (j3 - ScatterMapKt.BitmaskLsb) & (-9187201950435737472L); j4 != 0; j4 &= j4 - 1) {
int numberOfTrailingZeros = ((Long.numberOfTrailingZeros(j4) >> 3) + i5) & i4;
if (this.elements[numberOfTrailingZeros] == f) {
return numberOfTrailingZeros;
}
}
if ((((~j) << 6) & j & (-9187201950435737472L)) != 0) {
int findFirstAvailableSlot = findFirstAvailableSlot(i2);
if (this.growthLimit == 0 && ((this.metadata[findFirstAvailableSlot >> 3] >> ((findFirstAvailableSlot & 7) << 3)) & 255) != 254) {
adjustStorage();
findFirstAvailableSlot = findFirstAvailableSlot(i2);
}
this._size++;
int i10 = this.growthLimit;
long[] jArr2 = this.metadata;
int i11 = findFirstAvailableSlot >> 3;
long j5 = jArr2[i11];
int i12 = (findFirstAvailableSlot & 7) << 3;
this.growthLimit = i10 - (((j5 >> i12) & 255) == 128 ? 1 : 0);
jArr2[i11] = (j5 & (~(255 << i12))) | (j2 << i12);
int i13 = this._capacity;
int i14 = ((findFirstAvailableSlot - 7) & i13) + (i13 & 7);
int i15 = i14 >> 3;
int i16 = (i14 & 7) << 3;
jArr2[i15] = ((~(255 << i16)) & jArr2[i15]) | (j2 << i16);
return findFirstAvailableSlot;
}
i6 = i9 + 8;
i5 = (i5 + i6) & i4;
}
}
/* JADX WARN: Code restructure failed: missing block: B:16:0x0063, code lost:
if (((r4 & ((~r4) << 6)) & (-9187201950435737472L)) == 0) goto L16;
*/
/* JADX WARN: Code restructure failed: missing block: B:19:0x0065, code lost:
r10 = -1;
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final void minusAssign(float r14) {
/*
r13 = this;
int r0 = java.lang.Float.hashCode(r14)
r1 = -862048943(0xffffffffcc9e2d51, float:-8.293031E7)
int r0 = r0 * r1
int r1 = r0 << 16
r0 = r0 ^ r1
r1 = r0 & 127(0x7f, float:1.78E-43)
int r2 = r13._capacity
int r0 = r0 >>> 7
r0 = r0 & r2
r3 = 0
L13:
long[] r4 = r13.metadata
int r5 = r0 >> 3
r6 = r0 & 7
int r6 = r6 << 3
r7 = r4[r5]
long r7 = r7 >>> r6
int r5 = r5 + 1
r9 = r4[r5]
int r4 = 64 - r6
long r4 = r9 << r4
long r9 = (long) r6
long r9 = -r9
r6 = 63
long r9 = r9 >> r6
long r4 = r4 & r9
long r4 = r4 | r7
long r6 = (long) r1
r8 = 72340172838076673(0x101010101010101, double:7.748604185489348E-304)
long r6 = r6 * r8
long r6 = r6 ^ r4
long r8 = r6 - r8
long r6 = ~r6
long r6 = r6 & r8
r8 = -9187201950435737472(0x8080808080808080, double:-2.937446524422997E-306)
long r6 = r6 & r8
L3f:
r10 = 0
int r12 = (r6 > r10 ? 1 : (r6 == r10 ? 0 : -1))
if (r12 == 0) goto L5c
int r10 = java.lang.Long.numberOfTrailingZeros(r6)
int r10 = r10 >> 3
int r10 = r10 + r0
r10 = r10 & r2
float[] r11 = r13.elements
r11 = r11[r10]
int r11 = (r11 > r14 ? 1 : (r11 == r14 ? 0 : -1))
if (r11 != 0) goto L56
goto L66
L56:
r10 = 1
long r10 = r6 - r10
long r6 = r6 & r10
goto L3f
L5c:
long r6 = ~r4
r12 = 6
long r6 = r6 << r12
long r4 = r4 & r6
long r4 = r4 & r8
int r4 = (r4 > r10 ? 1 : (r4 == r10 ? 0 : -1))
if (r4 == 0) goto L6c
r10 = -1
L66:
if (r10 < 0) goto L6b
r13.removeElementAt(r10)
L6b:
return
L6c:
int r3 = r3 + 8
int r0 = r0 + r3
r0 = r0 & r2
goto L13
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.collection.MutableFloatSet.minusAssign(float):void");
}
/* JADX WARN: Code restructure failed: missing block: B:17:0x0066, code lost:
if (((r6 & ((~r6) << 6)) & (-9187201950435737472L)) == 0) goto L18;
*/
/* JADX WARN: Code restructure failed: missing block: B:20:0x0068, code lost:
r10 = -1;
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final boolean remove(float r17) {
/*
r16 = this;
r0 = r16
int r1 = java.lang.Float.hashCode(r17)
r2 = -862048943(0xffffffffcc9e2d51, float:-8.293031E7)
int r1 = r1 * r2
int r2 = r1 << 16
r1 = r1 ^ r2
r2 = r1 & 127(0x7f, float:1.78E-43)
int r3 = r0._capacity
int r1 = r1 >>> 7
r1 = r1 & r3
r4 = 0
r5 = r4
L16:
long[] r6 = r0.metadata
int r7 = r1 >> 3
r8 = r1 & 7
int r8 = r8 << 3
r9 = r6[r7]
long r9 = r9 >>> r8
r11 = 1
int r7 = r7 + r11
r12 = r6[r7]
int r6 = 64 - r8
long r6 = r12 << r6
long r12 = (long) r8
long r12 = -r12
r8 = 63
long r12 = r12 >> r8
long r6 = r6 & r12
long r6 = r6 | r9
long r8 = (long) r2
r12 = 72340172838076673(0x101010101010101, double:7.748604185489348E-304)
long r8 = r8 * r12
long r8 = r8 ^ r6
long r12 = r8 - r12
long r8 = ~r8
long r8 = r8 & r12
r12 = -9187201950435737472(0x8080808080808080, double:-2.937446524422997E-306)
long r8 = r8 & r12
L42:
r14 = 0
int r10 = (r8 > r14 ? 1 : (r8 == r14 ? 0 : -1))
if (r10 == 0) goto L5f
int r10 = java.lang.Long.numberOfTrailingZeros(r8)
int r10 = r10 >> 3
int r10 = r10 + r1
r10 = r10 & r3
float[] r14 = r0.elements
r14 = r14[r10]
int r14 = (r14 > r17 ? 1 : (r14 == r17 ? 0 : -1))
if (r14 != 0) goto L59
goto L69
L59:
r14 = 1
long r14 = r8 - r14
long r8 = r8 & r14
goto L42
L5f:
long r8 = ~r6
r10 = 6
long r8 = r8 << r10
long r6 = r6 & r8
long r6 = r6 & r12
int r6 = (r6 > r14 ? 1 : (r6 == r14 ? 0 : -1))
if (r6 == 0) goto L72
r10 = -1
L69:
if (r10 < 0) goto L6c
r4 = r11
L6c:
if (r4 == 0) goto L71
r0.removeElementAt(r10)
L71:
return r4
L72:
int r5 = r5 + 8
int r1 = r1 + r5
r1 = r1 & r3
goto L16
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.collection.MutableFloatSet.remove(float):boolean");
}
public final void plusAssign(float[] elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
for (float f : elements) {
plusAssign(f);
}
}
public final void minusAssign(float[] elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
for (float f : elements) {
minusAssign(f);
}
}
private final void removeDeletedMarkers() {
long[] jArr = this.metadata;
int i = this._capacity;
int i2 = 0;
for (int i3 = 0; i3 < i; i3++) {
int i4 = i3 >> 3;
int i5 = (i3 & 7) << 3;
if (((jArr[i4] >> i5) & 255) == 254) {
long[] jArr2 = this.metadata;
jArr2[i4] = (128 << i5) | (jArr2[i4] & (~(255 << i5)));
int i6 = this._capacity;
int i7 = ((i3 - 7) & i6) + (i6 & 7);
int i8 = i7 >> 3;
int i9 = (i7 & 7) << 3;
jArr2[i8] = ((~(255 << i9)) & jArr2[i8]) | (128 << i9);
i2++;
}
}
this.growthLimit += i2;
}
private final void removeElementAt(int i) {
this._size--;
long[] jArr = this.metadata;
int i2 = i >> 3;
int i3 = (i & 7) << 3;
jArr[i2] = (jArr[i2] & (~(255 << i3))) | (254 << i3);
int i4 = this._capacity;
int i5 = ((i - 7) & i4) + (i4 & 7);
int i6 = i5 >> 3;
int i7 = (i5 & 7) << 3;
jArr[i6] = (jArr[i6] & (~(255 << i7))) | (254 << i7);
}
private final void writeMetadata(int i, long j) {
long[] jArr = this.metadata;
int i2 = i >> 3;
int i3 = (i & 7) << 3;
jArr[i2] = (jArr[i2] & (~(255 << i3))) | (j << i3);
int i4 = this._capacity;
int i5 = ((i - 7) & i4) + (i4 & 7);
int i6 = i5 >> 3;
int i7 = (i5 & 7) << 3;
jArr[i6] = (j << i7) | (jArr[i6] & (~(255 << i7)));
}
private final int findFirstAvailableSlot(int i) {
int i2 = this._capacity;
int i3 = i & i2;
int i4 = 0;
while (true) {
long[] jArr = this.metadata;
int i5 = i3 >> 3;
int i6 = (i3 & 7) << 3;
long j = ((jArr[i5 + 1] << (64 - i6)) & ((-i6) >> 63)) | (jArr[i5] >>> i6);
long j2 = j & ((~j) << 7) & (-9187201950435737472L);
if (j2 != 0) {
return (i3 + (Long.numberOfTrailingZeros(j2) >> 3)) & i2;
}
i4 += 8;
i3 = (i3 + i4) & i2;
}
}
}

View File

@@ -0,0 +1,417 @@
package androidx.collection;
import kotlin.ULong;
import kotlin.collections.ArraysKt___ArraysJvmKt;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
@SourceDebugExtension({"SMAP\nIntFloatMap.kt\nKotlin\n*S Kotlin\n*F\n+ 1 IntFloatMap.kt\nandroidx/collection/MutableIntFloatMap\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n+ 3 ScatterMap.kt\nandroidx/collection/ScatterMapKt\n+ 4 IntFloatMap.kt\nandroidx/collection/IntFloatMap\n+ 5 IntSet.kt\nandroidx/collection/IntSet\n+ 6 IntList.kt\nandroidx/collection/IntList\n+ 7 IntSet.kt\nandroidx/collection/IntSetKt\n*L\n1#1,1047:1\n1037#1,2:1134\n1041#1,5:1142\n1037#1,2:1173\n1041#1,5:1181\n1037#1,2:1198\n1041#1,5:1206\n1037#1,2:1212\n1041#1,5:1220\n1#2:1048\n1672#3,6:1049\n1826#3:1065\n1688#3:1069\n1826#3:1087\n1688#3:1091\n1826#3:1112\n1688#3:1116\n1672#3,6:1136\n1672#3,6:1147\n1615#3:1156\n1619#3:1157\n1795#3,3:1158\n1809#3,3:1161\n1733#3:1164\n1721#3:1165\n1715#3:1166\n1728#3:1167\n1818#3:1168\n1682#3:1169\n1661#3:1170\n1680#3:1171\n1661#3:1172\n1672#3,6:1175\n1795#3,3:1186\n1826#3:1189\n1715#3:1190\n1685#3:1191\n1661#3:1192\n1615#3:1196\n1619#3:1197\n1672#3,6:1200\n1661#3:1211\n1672#3,6:1214\n1672#3,6:1225\n1672#3,6:1231\n385#4,4:1055\n357#4,6:1059\n367#4,3:1066\n370#4,2:1070\n389#4,2:1072\n373#4,6:1074\n391#4:1080\n357#4,6:1081\n367#4,3:1088\n370#4,9:1092\n262#5,4:1101\n232#5,7:1105\n243#5,3:1113\n246#5,2:1117\n266#5,2:1119\n249#5,6:1121\n268#5:1127\n253#6,6:1128\n849#7,3:1153\n849#7,3:1193\n*S KotlinDebug\n*F\n+ 1 IntFloatMap.kt\nandroidx/collection/MutableIntFloatMap\n*L\n875#1:1134,2\n875#1:1142,5\n933#1:1173,2\n933#1:1181,5\n1007#1:1198,2\n1007#1:1206,5\n1023#1:1212,2\n1023#1:1220,5\n711#1:1049,6\n789#1:1065\n789#1:1069\n828#1:1087\n828#1:1091\n855#1:1112\n855#1:1116\n875#1:1136,6\n885#1:1147,6\n899#1:1156\n900#1:1157\n907#1:1158,3\n908#1:1161,3\n909#1:1164\n910#1:1165\n910#1:1166\n914#1:1167\n917#1:1168\n926#1:1169\n926#1:1170\n932#1:1171\n932#1:1172\n933#1:1175,6\n948#1:1186,3\n949#1:1189\n951#1:1190\n1002#1:1191\n1002#1:1192\n1005#1:1196\n1007#1:1197\n1007#1:1200,6\n1021#1:1211\n1023#1:1214,6\n1038#1:1225,6\n1044#1:1231,6\n789#1:1055,4\n789#1:1059,6\n789#1:1066,3\n789#1:1070,2\n789#1:1072,2\n789#1:1074,6\n789#1:1080\n828#1:1081,6\n828#1:1088,3\n828#1:1092,9\n855#1:1101,4\n855#1:1105,7\n855#1:1113,3\n855#1:1117,2\n855#1:1119,2\n855#1:1121,6\n855#1:1127\n864#1:1128,6\n898#1:1153,3\n1004#1:1193,3\n*E\n"})
/* loaded from: classes.dex */
public final class MutableIntFloatMap extends IntFloatMap {
private int growthLimit;
public MutableIntFloatMap() {
this(0, 1, null);
}
public final void minusAssign(IntList keys) {
Intrinsics.checkNotNullParameter(keys, "keys");
int[] iArr = keys.content;
int i = keys._size;
for (int i2 = 0; i2 < i; i2++) {
remove(iArr[i2]);
}
}
public final void minusAssign(IntSet keys) {
Intrinsics.checkNotNullParameter(keys, "keys");
int[] iArr = keys.elements;
long[] jArr = keys.metadata;
int length = jArr.length - 2;
if (length < 0) {
return;
}
int i = 0;
while (true) {
long j = jArr[i];
if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
int i2 = 8 - ((~(i - length)) >>> 31);
for (int i3 = 0; i3 < i2; i3++) {
if ((255 & j) < 128) {
remove(iArr[(i << 3) + i3]);
}
j >>= 8;
}
if (i2 != 8) {
return;
}
}
if (i == length) {
return;
} else {
i++;
}
}
}
public final void removeIf(Function2 predicate) {
Intrinsics.checkNotNullParameter(predicate, "predicate");
long[] jArr = this.metadata;
int length = jArr.length - 2;
if (length < 0) {
return;
}
int i = 0;
while (true) {
long j = jArr[i];
if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
int i2 = 8 - ((~(i - length)) >>> 31);
for (int i3 = 0; i3 < i2; i3++) {
if ((255 & j) < 128) {
int i4 = (i << 3) + i3;
if (((Boolean) predicate.invoke(Integer.valueOf(this.keys[i4]), Float.valueOf(this.values[i4]))).booleanValue()) {
removeValueAt(i4);
}
}
j >>= 8;
}
if (i2 != 8) {
return;
}
}
if (i == length) {
return;
} else {
i++;
}
}
}
public final void putAll(IntFloatMap from) {
Intrinsics.checkNotNullParameter(from, "from");
int[] iArr = from.keys;
float[] fArr = from.values;
long[] jArr = from.metadata;
int length = jArr.length - 2;
if (length < 0) {
return;
}
int i = 0;
while (true) {
long j = jArr[i];
if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
int i2 = 8 - ((~(i - length)) >>> 31);
for (int i3 = 0; i3 < i2; i3++) {
if ((255 & j) < 128) {
int i4 = (i << 3) + i3;
set(iArr[i4], fArr[i4]);
}
j >>= 8;
}
if (i2 != 8) {
return;
}
}
if (i == length) {
return;
} else {
i++;
}
}
}
public /* synthetic */ MutableIntFloatMap(int i, int i2, DefaultConstructorMarker defaultConstructorMarker) {
this((i2 & 1) != 0 ? 6 : i);
}
public MutableIntFloatMap(int i) {
super(null);
if (i < 0) {
throw new IllegalArgumentException("Capacity must be a positive value.".toString());
}
initializeStorage(ScatterMapKt.unloadedCapacity(i));
}
private final void initializeStorage(int i) {
int max = i > 0 ? Math.max(7, ScatterMapKt.normalizeCapacity(i)) : 0;
this._capacity = max;
initializeMetadata(max);
this.keys = new int[max];
this.values = new float[max];
}
private final void initializeMetadata(int i) {
long[] jArr;
if (i == 0) {
jArr = ScatterMapKt.EmptyGroup;
} else {
jArr = new long[((i + 15) & (-8)) >> 3];
ArraysKt___ArraysJvmKt.fill$default(jArr, -9187201950435737472L, 0, 0, 6, (Object) null);
}
this.metadata = jArr;
int i2 = i >> 3;
long j = 255 << ((i & 7) << 3);
jArr[i2] = (jArr[i2] & (~j)) | j;
initializeGrowth();
}
private final void initializeGrowth() {
this.growthLimit = ScatterMapKt.loadedCapacity(getCapacity()) - this._size;
}
public final float getOrPut(int i, Function0 defaultValue) {
Intrinsics.checkNotNullParameter(defaultValue, "defaultValue");
int findKeyIndex = findKeyIndex(i);
if (findKeyIndex < 0) {
float floatValue = ((Number) defaultValue.invoke()).floatValue();
put(i, floatValue);
return floatValue;
}
return this.values[findKeyIndex];
}
public final void set(int i, float f) {
int findInsertIndex = findInsertIndex(i);
if (findInsertIndex < 0) {
findInsertIndex = ~findInsertIndex;
}
this.keys[findInsertIndex] = i;
this.values[findInsertIndex] = f;
}
public final void put(int i, float f) {
set(i, f);
}
public final float put(int i, float f, float f2) {
int findInsertIndex = findInsertIndex(i);
if (findInsertIndex < 0) {
findInsertIndex = ~findInsertIndex;
} else {
f2 = this.values[findInsertIndex];
}
this.keys[findInsertIndex] = i;
this.values[findInsertIndex] = f;
return f2;
}
public final void plusAssign(IntFloatMap from) {
Intrinsics.checkNotNullParameter(from, "from");
putAll(from);
}
public final void remove(int i) {
int findKeyIndex = findKeyIndex(i);
if (findKeyIndex >= 0) {
removeValueAt(findKeyIndex);
}
}
public final boolean remove(int i, float f) {
int findKeyIndex = findKeyIndex(i);
if (findKeyIndex < 0 || this.values[findKeyIndex] != f) {
return false;
}
removeValueAt(findKeyIndex);
return true;
}
public final void minusAssign(int i) {
remove(i);
}
public final void minusAssign(int[] keys) {
Intrinsics.checkNotNullParameter(keys, "keys");
for (int i : keys) {
remove(i);
}
}
private final int findInsertIndex(int i) {
int hashCode = Integer.hashCode(i) * ScatterMapKt.MurmurHashC1;
int i2 = hashCode ^ (hashCode << 16);
int i3 = i2 >>> 7;
int i4 = i2 & 127;
int i5 = this._capacity;
int i6 = i3 & i5;
int i7 = 0;
while (true) {
long[] jArr = this.metadata;
int i8 = i6 >> 3;
int i9 = (i6 & 7) << 3;
long j = ((jArr[i8 + 1] << (64 - i9)) & ((-i9) >> 63)) | (jArr[i8] >>> i9);
long j2 = i4;
int i10 = i7;
long j3 = j ^ (j2 * ScatterMapKt.BitmaskLsb);
for (long j4 = (~j3) & (j3 - ScatterMapKt.BitmaskLsb) & (-9187201950435737472L); j4 != 0; j4 &= j4 - 1) {
int numberOfTrailingZeros = ((Long.numberOfTrailingZeros(j4) >> 3) + i6) & i5;
if (this.keys[numberOfTrailingZeros] == i) {
return numberOfTrailingZeros;
}
}
if ((((~j) << 6) & j & (-9187201950435737472L)) != 0) {
int findFirstAvailableSlot = findFirstAvailableSlot(i3);
if (this.growthLimit == 0 && ((this.metadata[findFirstAvailableSlot >> 3] >> ((findFirstAvailableSlot & 7) << 3)) & 255) != 254) {
adjustStorage();
findFirstAvailableSlot = findFirstAvailableSlot(i3);
}
this._size++;
int i11 = this.growthLimit;
long[] jArr2 = this.metadata;
int i12 = findFirstAvailableSlot >> 3;
long j5 = jArr2[i12];
int i13 = (findFirstAvailableSlot & 7) << 3;
this.growthLimit = i11 - (((j5 >> i13) & 255) == 128 ? 1 : 0);
jArr2[i12] = ((~(255 << i13)) & j5) | (j2 << i13);
int i14 = this._capacity;
int i15 = ((findFirstAvailableSlot - 7) & i14) + (i14 & 7);
int i16 = i15 >> 3;
int i17 = (i15 & 7) << 3;
jArr2[i16] = ((~(255 << i17)) & jArr2[i16]) | (j2 << i17);
return ~findFirstAvailableSlot;
}
i7 = i10 + 8;
i6 = (i6 + i7) & i5;
}
}
public final void clear() {
this._size = 0;
long[] jArr = this.metadata;
if (jArr != ScatterMapKt.EmptyGroup) {
ArraysKt___ArraysJvmKt.fill$default(jArr, -9187201950435737472L, 0, 0, 6, (Object) null);
long[] jArr2 = this.metadata;
int i = this._capacity;
int i2 = i >> 3;
long j = 255 << ((i & 7) << 3);
jArr2[i2] = (jArr2[i2] & (~j)) | j;
}
initializeGrowth();
}
public final int trim() {
int i = this._capacity;
int normalizeCapacity = ScatterMapKt.normalizeCapacity(ScatterMapKt.unloadedCapacity(this._size));
if (normalizeCapacity >= i) {
return 0;
}
resizeStorage(normalizeCapacity);
return i - this._capacity;
}
private final void adjustStorage() {
if (this._capacity > 8 && Long.compareUnsigned(ULong.m4068constructorimpl(ULong.m4068constructorimpl(this._size) * 32), ULong.m4068constructorimpl(ULong.m4068constructorimpl(this._capacity) * 25)) <= 0) {
removeDeletedMarkers();
} else {
resizeStorage(ScatterMapKt.nextCapacity(this._capacity));
}
}
private final void resizeStorage(int i) {
long[] jArr;
int[] iArr;
long[] jArr2 = this.metadata;
int[] iArr2 = this.keys;
float[] fArr = this.values;
int i2 = this._capacity;
initializeStorage(i);
int[] iArr3 = this.keys;
float[] fArr2 = this.values;
int i3 = 0;
while (i3 < i2) {
if (((jArr2[i3 >> 3] >> ((i3 & 7) << 3)) & 255) < 128) {
int i4 = iArr2[i3];
int hashCode = Integer.hashCode(i4) * ScatterMapKt.MurmurHashC1;
int i5 = hashCode ^ (hashCode << 16);
int findFirstAvailableSlot = findFirstAvailableSlot(i5 >>> 7);
long j = i5 & 127;
long[] jArr3 = this.metadata;
int i6 = findFirstAvailableSlot >> 3;
int i7 = (findFirstAvailableSlot & 7) << 3;
jArr = jArr2;
iArr = iArr2;
jArr3[i6] = (jArr3[i6] & (~(255 << i7))) | (j << i7);
int i8 = this._capacity;
int i9 = ((findFirstAvailableSlot - 7) & i8) + (i8 & 7);
int i10 = i9 >> 3;
int i11 = (i9 & 7) << 3;
jArr3[i10] = ((~(255 << i11)) & jArr3[i10]) | (j << i11);
iArr3[findFirstAvailableSlot] = i4;
fArr2[findFirstAvailableSlot] = fArr[i3];
} else {
jArr = jArr2;
iArr = iArr2;
}
i3++;
jArr2 = jArr;
iArr2 = iArr;
}
}
private final void removeDeletedMarkers() {
long[] jArr = this.metadata;
int i = this._capacity;
int i2 = 0;
for (int i3 = 0; i3 < i; i3++) {
int i4 = i3 >> 3;
int i5 = (i3 & 7) << 3;
if (((jArr[i4] >> i5) & 255) == 254) {
long[] jArr2 = this.metadata;
jArr2[i4] = (128 << i5) | (jArr2[i4] & (~(255 << i5)));
int i6 = this._capacity;
int i7 = ((i3 - 7) & i6) + (i6 & 7);
int i8 = i7 >> 3;
int i9 = (i7 & 7) << 3;
jArr2[i8] = ((~(255 << i9)) & jArr2[i8]) | (128 << i9);
i2++;
}
}
this.growthLimit += i2;
}
private final void writeMetadata(int i, long j) {
long[] jArr = this.metadata;
int i2 = i >> 3;
int i3 = (i & 7) << 3;
jArr[i2] = (jArr[i2] & (~(255 << i3))) | (j << i3);
int i4 = this._capacity;
int i5 = ((i - 7) & i4) + (i4 & 7);
int i6 = i5 >> 3;
int i7 = (i5 & 7) << 3;
jArr[i6] = (j << i7) | (jArr[i6] & (~(255 << i7)));
}
public final void removeValueAt(int i) {
this._size--;
long[] jArr = this.metadata;
int i2 = i >> 3;
int i3 = (i & 7) << 3;
jArr[i2] = (jArr[i2] & (~(255 << i3))) | (254 << i3);
int i4 = this._capacity;
int i5 = ((i - 7) & i4) + (i4 & 7);
int i6 = i5 >> 3;
int i7 = (i5 & 7) << 3;
jArr[i6] = (jArr[i6] & (~(255 << i7))) | (254 << i7);
}
private final int findFirstAvailableSlot(int i) {
int i2 = this._capacity;
int i3 = i & i2;
int i4 = 0;
while (true) {
long[] jArr = this.metadata;
int i5 = i3 >> 3;
int i6 = (i3 & 7) << 3;
long j = ((jArr[i5 + 1] << (64 - i6)) & ((-i6) >> 63)) | (jArr[i5] >>> i6);
long j2 = j & ((~j) << 7) & (-9187201950435737472L);
if (j2 != 0) {
return (i3 + (Long.numberOfTrailingZeros(j2) >> 3)) & i2;
}
i4 += 8;
i3 = (i3 + i4) & i2;
}
}
}

View File

@@ -0,0 +1,417 @@
package androidx.collection;
import kotlin.ULong;
import kotlin.collections.ArraysKt___ArraysJvmKt;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
@SourceDebugExtension({"SMAP\nIntIntMap.kt\nKotlin\n*S Kotlin\n*F\n+ 1 IntIntMap.kt\nandroidx/collection/MutableIntIntMap\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n+ 3 ScatterMap.kt\nandroidx/collection/ScatterMapKt\n+ 4 IntIntMap.kt\nandroidx/collection/IntIntMap\n+ 5 IntSet.kt\nandroidx/collection/IntSet\n+ 6 IntList.kt\nandroidx/collection/IntList\n+ 7 IntSet.kt\nandroidx/collection/IntSetKt\n*L\n1#1,1047:1\n1037#1,2:1134\n1041#1,5:1142\n1037#1,2:1173\n1041#1,5:1181\n1037#1,2:1198\n1041#1,5:1206\n1037#1,2:1212\n1041#1,5:1220\n1#2:1048\n1672#3,6:1049\n1826#3:1065\n1688#3:1069\n1826#3:1087\n1688#3:1091\n1826#3:1112\n1688#3:1116\n1672#3,6:1136\n1672#3,6:1147\n1615#3:1156\n1619#3:1157\n1795#3,3:1158\n1809#3,3:1161\n1733#3:1164\n1721#3:1165\n1715#3:1166\n1728#3:1167\n1818#3:1168\n1682#3:1169\n1661#3:1170\n1680#3:1171\n1661#3:1172\n1672#3,6:1175\n1795#3,3:1186\n1826#3:1189\n1715#3:1190\n1685#3:1191\n1661#3:1192\n1615#3:1196\n1619#3:1197\n1672#3,6:1200\n1661#3:1211\n1672#3,6:1214\n1672#3,6:1225\n1672#3,6:1231\n385#4,4:1055\n357#4,6:1059\n367#4,3:1066\n370#4,2:1070\n389#4,2:1072\n373#4,6:1074\n391#4:1080\n357#4,6:1081\n367#4,3:1088\n370#4,9:1092\n262#5,4:1101\n232#5,7:1105\n243#5,3:1113\n246#5,2:1117\n266#5,2:1119\n249#5,6:1121\n268#5:1127\n253#6,6:1128\n849#7,3:1153\n849#7,3:1193\n*S KotlinDebug\n*F\n+ 1 IntIntMap.kt\nandroidx/collection/MutableIntIntMap\n*L\n875#1:1134,2\n875#1:1142,5\n933#1:1173,2\n933#1:1181,5\n1007#1:1198,2\n1007#1:1206,5\n1023#1:1212,2\n1023#1:1220,5\n711#1:1049,6\n789#1:1065\n789#1:1069\n828#1:1087\n828#1:1091\n855#1:1112\n855#1:1116\n875#1:1136,6\n885#1:1147,6\n899#1:1156\n900#1:1157\n907#1:1158,3\n908#1:1161,3\n909#1:1164\n910#1:1165\n910#1:1166\n914#1:1167\n917#1:1168\n926#1:1169\n926#1:1170\n932#1:1171\n932#1:1172\n933#1:1175,6\n948#1:1186,3\n949#1:1189\n951#1:1190\n1002#1:1191\n1002#1:1192\n1005#1:1196\n1007#1:1197\n1007#1:1200,6\n1021#1:1211\n1023#1:1214,6\n1038#1:1225,6\n1044#1:1231,6\n789#1:1055,4\n789#1:1059,6\n789#1:1066,3\n789#1:1070,2\n789#1:1072,2\n789#1:1074,6\n789#1:1080\n828#1:1081,6\n828#1:1088,3\n828#1:1092,9\n855#1:1101,4\n855#1:1105,7\n855#1:1113,3\n855#1:1117,2\n855#1:1119,2\n855#1:1121,6\n855#1:1127\n864#1:1128,6\n898#1:1153,3\n1004#1:1193,3\n*E\n"})
/* loaded from: classes.dex */
public final class MutableIntIntMap extends IntIntMap {
private int growthLimit;
public MutableIntIntMap() {
this(0, 1, null);
}
public final void minusAssign(IntList keys) {
Intrinsics.checkNotNullParameter(keys, "keys");
int[] iArr = keys.content;
int i = keys._size;
for (int i2 = 0; i2 < i; i2++) {
remove(iArr[i2]);
}
}
public final void minusAssign(IntSet keys) {
Intrinsics.checkNotNullParameter(keys, "keys");
int[] iArr = keys.elements;
long[] jArr = keys.metadata;
int length = jArr.length - 2;
if (length < 0) {
return;
}
int i = 0;
while (true) {
long j = jArr[i];
if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
int i2 = 8 - ((~(i - length)) >>> 31);
for (int i3 = 0; i3 < i2; i3++) {
if ((255 & j) < 128) {
remove(iArr[(i << 3) + i3]);
}
j >>= 8;
}
if (i2 != 8) {
return;
}
}
if (i == length) {
return;
} else {
i++;
}
}
}
public final void removeIf(Function2 predicate) {
Intrinsics.checkNotNullParameter(predicate, "predicate");
long[] jArr = this.metadata;
int length = jArr.length - 2;
if (length < 0) {
return;
}
int i = 0;
while (true) {
long j = jArr[i];
if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
int i2 = 8 - ((~(i - length)) >>> 31);
for (int i3 = 0; i3 < i2; i3++) {
if ((255 & j) < 128) {
int i4 = (i << 3) + i3;
if (((Boolean) predicate.invoke(Integer.valueOf(this.keys[i4]), Integer.valueOf(this.values[i4]))).booleanValue()) {
removeValueAt(i4);
}
}
j >>= 8;
}
if (i2 != 8) {
return;
}
}
if (i == length) {
return;
} else {
i++;
}
}
}
public final void putAll(IntIntMap from) {
Intrinsics.checkNotNullParameter(from, "from");
int[] iArr = from.keys;
int[] iArr2 = from.values;
long[] jArr = from.metadata;
int length = jArr.length - 2;
if (length < 0) {
return;
}
int i = 0;
while (true) {
long j = jArr[i];
if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
int i2 = 8 - ((~(i - length)) >>> 31);
for (int i3 = 0; i3 < i2; i3++) {
if ((255 & j) < 128) {
int i4 = (i << 3) + i3;
set(iArr[i4], iArr2[i4]);
}
j >>= 8;
}
if (i2 != 8) {
return;
}
}
if (i == length) {
return;
} else {
i++;
}
}
}
public /* synthetic */ MutableIntIntMap(int i, int i2, DefaultConstructorMarker defaultConstructorMarker) {
this((i2 & 1) != 0 ? 6 : i);
}
public MutableIntIntMap(int i) {
super(null);
if (i < 0) {
throw new IllegalArgumentException("Capacity must be a positive value.".toString());
}
initializeStorage(ScatterMapKt.unloadedCapacity(i));
}
private final void initializeStorage(int i) {
int max = i > 0 ? Math.max(7, ScatterMapKt.normalizeCapacity(i)) : 0;
this._capacity = max;
initializeMetadata(max);
this.keys = new int[max];
this.values = new int[max];
}
private final void initializeMetadata(int i) {
long[] jArr;
if (i == 0) {
jArr = ScatterMapKt.EmptyGroup;
} else {
jArr = new long[((i + 15) & (-8)) >> 3];
ArraysKt___ArraysJvmKt.fill$default(jArr, -9187201950435737472L, 0, 0, 6, (Object) null);
}
this.metadata = jArr;
int i2 = i >> 3;
long j = 255 << ((i & 7) << 3);
jArr[i2] = (jArr[i2] & (~j)) | j;
initializeGrowth();
}
private final void initializeGrowth() {
this.growthLimit = ScatterMapKt.loadedCapacity(getCapacity()) - this._size;
}
public final int getOrPut(int i, Function0 defaultValue) {
Intrinsics.checkNotNullParameter(defaultValue, "defaultValue");
int findKeyIndex = findKeyIndex(i);
if (findKeyIndex < 0) {
int intValue = ((Number) defaultValue.invoke()).intValue();
put(i, intValue);
return intValue;
}
return this.values[findKeyIndex];
}
public final void set(int i, int i2) {
int findInsertIndex = findInsertIndex(i);
if (findInsertIndex < 0) {
findInsertIndex = ~findInsertIndex;
}
this.keys[findInsertIndex] = i;
this.values[findInsertIndex] = i2;
}
public final void put(int i, int i2) {
set(i, i2);
}
public final int put(int i, int i2, int i3) {
int findInsertIndex = findInsertIndex(i);
if (findInsertIndex < 0) {
findInsertIndex = ~findInsertIndex;
} else {
i3 = this.values[findInsertIndex];
}
this.keys[findInsertIndex] = i;
this.values[findInsertIndex] = i2;
return i3;
}
public final void plusAssign(IntIntMap from) {
Intrinsics.checkNotNullParameter(from, "from");
putAll(from);
}
public final void remove(int i) {
int findKeyIndex = findKeyIndex(i);
if (findKeyIndex >= 0) {
removeValueAt(findKeyIndex);
}
}
public final boolean remove(int i, int i2) {
int findKeyIndex = findKeyIndex(i);
if (findKeyIndex < 0 || this.values[findKeyIndex] != i2) {
return false;
}
removeValueAt(findKeyIndex);
return true;
}
public final void minusAssign(int i) {
remove(i);
}
public final void minusAssign(int[] keys) {
Intrinsics.checkNotNullParameter(keys, "keys");
for (int i : keys) {
remove(i);
}
}
private final int findInsertIndex(int i) {
int hashCode = Integer.hashCode(i) * ScatterMapKt.MurmurHashC1;
int i2 = hashCode ^ (hashCode << 16);
int i3 = i2 >>> 7;
int i4 = i2 & 127;
int i5 = this._capacity;
int i6 = i3 & i5;
int i7 = 0;
while (true) {
long[] jArr = this.metadata;
int i8 = i6 >> 3;
int i9 = (i6 & 7) << 3;
long j = ((jArr[i8 + 1] << (64 - i9)) & ((-i9) >> 63)) | (jArr[i8] >>> i9);
long j2 = i4;
int i10 = i7;
long j3 = j ^ (j2 * ScatterMapKt.BitmaskLsb);
for (long j4 = (~j3) & (j3 - ScatterMapKt.BitmaskLsb) & (-9187201950435737472L); j4 != 0; j4 &= j4 - 1) {
int numberOfTrailingZeros = ((Long.numberOfTrailingZeros(j4) >> 3) + i6) & i5;
if (this.keys[numberOfTrailingZeros] == i) {
return numberOfTrailingZeros;
}
}
if ((((~j) << 6) & j & (-9187201950435737472L)) != 0) {
int findFirstAvailableSlot = findFirstAvailableSlot(i3);
if (this.growthLimit == 0 && ((this.metadata[findFirstAvailableSlot >> 3] >> ((findFirstAvailableSlot & 7) << 3)) & 255) != 254) {
adjustStorage();
findFirstAvailableSlot = findFirstAvailableSlot(i3);
}
this._size++;
int i11 = this.growthLimit;
long[] jArr2 = this.metadata;
int i12 = findFirstAvailableSlot >> 3;
long j5 = jArr2[i12];
int i13 = (findFirstAvailableSlot & 7) << 3;
this.growthLimit = i11 - (((j5 >> i13) & 255) == 128 ? 1 : 0);
jArr2[i12] = ((~(255 << i13)) & j5) | (j2 << i13);
int i14 = this._capacity;
int i15 = ((findFirstAvailableSlot - 7) & i14) + (i14 & 7);
int i16 = i15 >> 3;
int i17 = (i15 & 7) << 3;
jArr2[i16] = ((~(255 << i17)) & jArr2[i16]) | (j2 << i17);
return ~findFirstAvailableSlot;
}
i7 = i10 + 8;
i6 = (i6 + i7) & i5;
}
}
public final void clear() {
this._size = 0;
long[] jArr = this.metadata;
if (jArr != ScatterMapKt.EmptyGroup) {
ArraysKt___ArraysJvmKt.fill$default(jArr, -9187201950435737472L, 0, 0, 6, (Object) null);
long[] jArr2 = this.metadata;
int i = this._capacity;
int i2 = i >> 3;
long j = 255 << ((i & 7) << 3);
jArr2[i2] = (jArr2[i2] & (~j)) | j;
}
initializeGrowth();
}
public final int trim() {
int i = this._capacity;
int normalizeCapacity = ScatterMapKt.normalizeCapacity(ScatterMapKt.unloadedCapacity(this._size));
if (normalizeCapacity >= i) {
return 0;
}
resizeStorage(normalizeCapacity);
return i - this._capacity;
}
private final void adjustStorage() {
if (this._capacity > 8 && Long.compareUnsigned(ULong.m4068constructorimpl(ULong.m4068constructorimpl(this._size) * 32), ULong.m4068constructorimpl(ULong.m4068constructorimpl(this._capacity) * 25)) <= 0) {
removeDeletedMarkers();
} else {
resizeStorage(ScatterMapKt.nextCapacity(this._capacity));
}
}
private final void resizeStorage(int i) {
long[] jArr;
int[] iArr;
long[] jArr2 = this.metadata;
int[] iArr2 = this.keys;
int[] iArr3 = this.values;
int i2 = this._capacity;
initializeStorage(i);
int[] iArr4 = this.keys;
int[] iArr5 = this.values;
int i3 = 0;
while (i3 < i2) {
if (((jArr2[i3 >> 3] >> ((i3 & 7) << 3)) & 255) < 128) {
int i4 = iArr2[i3];
int hashCode = Integer.hashCode(i4) * ScatterMapKt.MurmurHashC1;
int i5 = hashCode ^ (hashCode << 16);
int findFirstAvailableSlot = findFirstAvailableSlot(i5 >>> 7);
long j = i5 & 127;
long[] jArr3 = this.metadata;
int i6 = findFirstAvailableSlot >> 3;
int i7 = (findFirstAvailableSlot & 7) << 3;
jArr = jArr2;
iArr = iArr2;
jArr3[i6] = (jArr3[i6] & (~(255 << i7))) | (j << i7);
int i8 = this._capacity;
int i9 = ((findFirstAvailableSlot - 7) & i8) + (i8 & 7);
int i10 = i9 >> 3;
int i11 = (i9 & 7) << 3;
jArr3[i10] = ((~(255 << i11)) & jArr3[i10]) | (j << i11);
iArr4[findFirstAvailableSlot] = i4;
iArr5[findFirstAvailableSlot] = iArr3[i3];
} else {
jArr = jArr2;
iArr = iArr2;
}
i3++;
jArr2 = jArr;
iArr2 = iArr;
}
}
private final void removeDeletedMarkers() {
long[] jArr = this.metadata;
int i = this._capacity;
int i2 = 0;
for (int i3 = 0; i3 < i; i3++) {
int i4 = i3 >> 3;
int i5 = (i3 & 7) << 3;
if (((jArr[i4] >> i5) & 255) == 254) {
long[] jArr2 = this.metadata;
jArr2[i4] = (128 << i5) | (jArr2[i4] & (~(255 << i5)));
int i6 = this._capacity;
int i7 = ((i3 - 7) & i6) + (i6 & 7);
int i8 = i7 >> 3;
int i9 = (i7 & 7) << 3;
jArr2[i8] = ((~(255 << i9)) & jArr2[i8]) | (128 << i9);
i2++;
}
}
this.growthLimit += i2;
}
private final void writeMetadata(int i, long j) {
long[] jArr = this.metadata;
int i2 = i >> 3;
int i3 = (i & 7) << 3;
jArr[i2] = (jArr[i2] & (~(255 << i3))) | (j << i3);
int i4 = this._capacity;
int i5 = ((i - 7) & i4) + (i4 & 7);
int i6 = i5 >> 3;
int i7 = (i5 & 7) << 3;
jArr[i6] = (j << i7) | (jArr[i6] & (~(255 << i7)));
}
public final void removeValueAt(int i) {
this._size--;
long[] jArr = this.metadata;
int i2 = i >> 3;
int i3 = (i & 7) << 3;
jArr[i2] = (jArr[i2] & (~(255 << i3))) | (254 << i3);
int i4 = this._capacity;
int i5 = ((i - 7) & i4) + (i4 & 7);
int i6 = i5 >> 3;
int i7 = (i5 & 7) << 3;
jArr[i6] = (jArr[i6] & (~(255 << i7))) | (254 << i7);
}
private final int findFirstAvailableSlot(int i) {
int i2 = this._capacity;
int i3 = i & i2;
int i4 = 0;
while (true) {
long[] jArr = this.metadata;
int i5 = i3 >> 3;
int i6 = (i3 & 7) << 3;
long j = ((jArr[i5 + 1] << (64 - i6)) & ((-i6) >> 63)) | (jArr[i5] >>> i6);
long j2 = j & ((~j) << 7) & (-9187201950435737472L);
if (j2 != 0) {
return (i3 + (Long.numberOfTrailingZeros(j2) >> 3)) & i2;
}
i4 += 8;
i3 = (i3 + i4) & i2;
}
}
}

View File

@@ -0,0 +1,320 @@
package androidx.collection;
import androidx.annotation.IntRange;
import java.util.Arrays;
import kotlin.collections.ArraysKt___ArraysJvmKt;
import kotlin.collections.ArraysKt___ArraysKt;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
@SourceDebugExtension({"SMAP\nIntList.kt\nKotlin\n*S Kotlin\n*F\n+ 1 IntList.kt\nandroidx/collection/MutableIntList\n+ 2 IntList.kt\nandroidx/collection/IntList\n+ 3 _Arrays.kt\nkotlin/collections/ArraysKt___ArraysKt\n*L\n1#1,969:1\n549#1:970\n70#2:971\n253#2,6:974\n70#2:980\n70#2:981\n70#2:982\n70#2:989\n70#2:990\n13600#3,2:972\n1663#3,6:983\n*S KotlinDebug\n*F\n+ 1 IntList.kt\nandroidx/collection/MutableIntList\n*L\n692#1:970\n753#1:971\n772#1:974,6\n783#1:980\n787#1:981\n834#1:982\n850#1:989\n869#1:990\n763#1:972,2\n836#1:983,6\n*E\n"})
/* loaded from: classes.dex */
public final class MutableIntList extends IntList {
public MutableIntList() {
this(0, 1, null);
}
public final void clear() {
this._size = 0;
}
public final boolean removeAll(IntList elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
int i = this._size;
int i2 = elements._size - 1;
if (i2 >= 0) {
int i3 = 0;
while (true) {
remove(elements.get(i3));
if (i3 == i2) {
break;
}
i3++;
}
}
return i != this._size;
}
public final void minusAssign(IntList elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
int[] iArr = elements.content;
int i = elements._size;
for (int i2 = 0; i2 < i; i2++) {
remove(iArr[i2]);
}
}
public /* synthetic */ MutableIntList(int i, int i2, DefaultConstructorMarker defaultConstructorMarker) {
this((i2 & 1) != 0 ? 16 : i);
}
public MutableIntList(int i) {
super(i, null);
}
public final int getCapacity() {
return this.content.length;
}
public final boolean add(int i) {
ensureCapacity(this._size + 1);
int[] iArr = this.content;
int i2 = this._size;
iArr[i2] = i;
this._size = i2 + 1;
return true;
}
public final void add(@IntRange(from = 0) int i, int i2) {
int i3;
if (i < 0 || i > (i3 = this._size)) {
throw new IndexOutOfBoundsException("Index " + i + " must be in 0.." + this._size);
}
ensureCapacity(i3 + 1);
int[] iArr = this.content;
int i4 = this._size;
if (i != i4) {
ArraysKt___ArraysJvmKt.copyInto(iArr, iArr, i + 1, i, i4);
}
iArr[i] = i2;
this._size++;
}
public final boolean addAll(@IntRange(from = 0) int i, int[] elements) {
int i2;
Intrinsics.checkNotNullParameter(elements, "elements");
if (i < 0 || i > (i2 = this._size)) {
throw new IndexOutOfBoundsException("Index " + i + " must be in 0.." + this._size);
}
if (elements.length == 0) {
return false;
}
ensureCapacity(i2 + elements.length);
int[] iArr = this.content;
int i3 = this._size;
if (i != i3) {
ArraysKt___ArraysJvmKt.copyInto(iArr, iArr, elements.length + i, i, i3);
}
ArraysKt___ArraysJvmKt.copyInto$default(elements, iArr, i, 0, 0, 12, (Object) null);
this._size += elements.length;
return true;
}
public final boolean addAll(@IntRange(from = 0) int i, IntList elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
if (i < 0 || i > this._size) {
throw new IndexOutOfBoundsException("Index " + i + " must be in 0.." + this._size);
}
if (elements.isEmpty()) {
return false;
}
ensureCapacity(this._size + elements._size);
int[] iArr = this.content;
int i2 = this._size;
if (i != i2) {
ArraysKt___ArraysJvmKt.copyInto(iArr, iArr, elements._size + i, i, i2);
}
ArraysKt___ArraysJvmKt.copyInto(elements.content, iArr, i, 0, elements._size);
this._size += elements._size;
return true;
}
public final boolean addAll(IntList elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
return addAll(this._size, elements);
}
public final boolean addAll(int[] elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
return addAll(this._size, elements);
}
public final void plusAssign(IntList elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
addAll(this._size, elements);
}
public final void plusAssign(int[] elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
addAll(this._size, elements);
}
public static /* synthetic */ void trim$default(MutableIntList mutableIntList, int i, int i2, Object obj) {
if ((i2 & 1) != 0) {
i = mutableIntList._size;
}
mutableIntList.trim(i);
}
public final void trim(int i) {
int max = Math.max(i, this._size);
int[] iArr = this.content;
if (iArr.length > max) {
int[] copyOf = Arrays.copyOf(iArr, max);
Intrinsics.checkNotNullExpressionValue(copyOf, "copyOf(this, newSize)");
this.content = copyOf;
}
}
public final void ensureCapacity(int i) {
int[] iArr = this.content;
if (iArr.length < i) {
int[] copyOf = Arrays.copyOf(iArr, Math.max(i, (iArr.length * 3) / 2));
Intrinsics.checkNotNullExpressionValue(copyOf, "copyOf(this, newSize)");
this.content = copyOf;
}
}
public final void plusAssign(int i) {
add(i);
}
public final void minusAssign(int i) {
remove(i);
}
public final boolean remove(int i) {
int indexOf = indexOf(i);
if (indexOf < 0) {
return false;
}
removeAt(indexOf);
return true;
}
public final boolean removeAll(int[] elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
int i = this._size;
for (int i2 : elements) {
remove(i2);
}
return i != this._size;
}
public final int removeAt(@IntRange(from = 0) int i) {
int i2;
if (i < 0 || i >= (i2 = this._size)) {
StringBuilder sb = new StringBuilder();
sb.append("Index ");
sb.append(i);
sb.append(" must be in 0..");
sb.append(this._size - 1);
throw new IndexOutOfBoundsException(sb.toString());
}
int[] iArr = this.content;
int i3 = iArr[i];
if (i != i2 - 1) {
ArraysKt___ArraysJvmKt.copyInto(iArr, iArr, i, i + 1, i2);
}
this._size--;
return i3;
}
public final void removeRange(@IntRange(from = 0) int i, @IntRange(from = 0) int i2) {
int i3;
if (i < 0 || i > (i3 = this._size) || i2 < 0 || i2 > i3) {
throw new IndexOutOfBoundsException("Start (" + i + ") and end (" + i2 + ") must be in 0.." + this._size);
}
if (i2 >= i) {
if (i2 != i) {
if (i2 < i3) {
int[] iArr = this.content;
ArraysKt___ArraysJvmKt.copyInto(iArr, iArr, i, i2, i3);
}
this._size -= i2 - i;
return;
}
return;
}
throw new IllegalArgumentException("Start (" + i + ") is more than end (" + i2 + ')');
}
/* JADX WARN: Code restructure failed: missing block: B:11:0x001e, code lost:
removeAt(r2);
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final boolean retainAll(int[] r8) {
/*
r7 = this;
java.lang.String r0 = "elements"
kotlin.jvm.internal.Intrinsics.checkNotNullParameter(r8, r0)
int r0 = r7._size
int[] r1 = r7.content
int r2 = r0 + (-1)
Lb:
r3 = 0
r4 = -1
if (r4 >= r2) goto L24
r4 = r1[r2]
int r5 = r8.length
L12:
if (r3 >= r5) goto L1e
r6 = r8[r3]
if (r6 != r4) goto L1b
if (r3 >= 0) goto L21
goto L1e
L1b:
int r3 = r3 + 1
goto L12
L1e:
r7.removeAt(r2)
L21:
int r2 = r2 + (-1)
goto Lb
L24:
int r8 = r7._size
if (r0 == r8) goto L29
r3 = 1
L29:
return r3
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.collection.MutableIntList.retainAll(int[]):boolean");
}
public final boolean retainAll(IntList elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
int i = this._size;
int[] iArr = this.content;
for (int i2 = i - 1; -1 < i2; i2--) {
if (!elements.contains(iArr[i2])) {
removeAt(i2);
}
}
return i != this._size;
}
public final int set(@IntRange(from = 0) int i, int i2) {
if (i < 0 || i >= this._size) {
StringBuilder sb = new StringBuilder();
sb.append("set index ");
sb.append(i);
sb.append(" must be between 0 .. ");
sb.append(this._size - 1);
throw new IndexOutOfBoundsException(sb.toString());
}
int[] iArr = this.content;
int i3 = iArr[i];
iArr[i] = i2;
return i3;
}
public final void sort() {
ArraysKt___ArraysJvmKt.sort(this.content, 0, this._size);
}
public final void sortDescending() {
ArraysKt___ArraysKt.sortDescending(this.content, 0, this._size);
}
public final void minusAssign(int[] elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
for (int i : elements) {
remove(i);
}
}
}

View File

@@ -0,0 +1,417 @@
package androidx.collection;
import kotlin.ULong;
import kotlin.collections.ArraysKt___ArraysJvmKt;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
@SourceDebugExtension({"SMAP\nIntLongMap.kt\nKotlin\n*S Kotlin\n*F\n+ 1 IntLongMap.kt\nandroidx/collection/MutableIntLongMap\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n+ 3 ScatterMap.kt\nandroidx/collection/ScatterMapKt\n+ 4 IntLongMap.kt\nandroidx/collection/IntLongMap\n+ 5 IntSet.kt\nandroidx/collection/IntSet\n+ 6 IntList.kt\nandroidx/collection/IntList\n+ 7 IntSet.kt\nandroidx/collection/IntSetKt\n*L\n1#1,1047:1\n1037#1,2:1134\n1041#1,5:1142\n1037#1,2:1173\n1041#1,5:1181\n1037#1,2:1198\n1041#1,5:1206\n1037#1,2:1212\n1041#1,5:1220\n1#2:1048\n1672#3,6:1049\n1826#3:1065\n1688#3:1069\n1826#3:1087\n1688#3:1091\n1826#3:1112\n1688#3:1116\n1672#3,6:1136\n1672#3,6:1147\n1615#3:1156\n1619#3:1157\n1795#3,3:1158\n1809#3,3:1161\n1733#3:1164\n1721#3:1165\n1715#3:1166\n1728#3:1167\n1818#3:1168\n1682#3:1169\n1661#3:1170\n1680#3:1171\n1661#3:1172\n1672#3,6:1175\n1795#3,3:1186\n1826#3:1189\n1715#3:1190\n1685#3:1191\n1661#3:1192\n1615#3:1196\n1619#3:1197\n1672#3,6:1200\n1661#3:1211\n1672#3,6:1214\n1672#3,6:1225\n1672#3,6:1231\n385#4,4:1055\n357#4,6:1059\n367#4,3:1066\n370#4,2:1070\n389#4,2:1072\n373#4,6:1074\n391#4:1080\n357#4,6:1081\n367#4,3:1088\n370#4,9:1092\n262#5,4:1101\n232#5,7:1105\n243#5,3:1113\n246#5,2:1117\n266#5,2:1119\n249#5,6:1121\n268#5:1127\n253#6,6:1128\n849#7,3:1153\n849#7,3:1193\n*S KotlinDebug\n*F\n+ 1 IntLongMap.kt\nandroidx/collection/MutableIntLongMap\n*L\n875#1:1134,2\n875#1:1142,5\n933#1:1173,2\n933#1:1181,5\n1007#1:1198,2\n1007#1:1206,5\n1023#1:1212,2\n1023#1:1220,5\n711#1:1049,6\n789#1:1065\n789#1:1069\n828#1:1087\n828#1:1091\n855#1:1112\n855#1:1116\n875#1:1136,6\n885#1:1147,6\n899#1:1156\n900#1:1157\n907#1:1158,3\n908#1:1161,3\n909#1:1164\n910#1:1165\n910#1:1166\n914#1:1167\n917#1:1168\n926#1:1169\n926#1:1170\n932#1:1171\n932#1:1172\n933#1:1175,6\n948#1:1186,3\n949#1:1189\n951#1:1190\n1002#1:1191\n1002#1:1192\n1005#1:1196\n1007#1:1197\n1007#1:1200,6\n1021#1:1211\n1023#1:1214,6\n1038#1:1225,6\n1044#1:1231,6\n789#1:1055,4\n789#1:1059,6\n789#1:1066,3\n789#1:1070,2\n789#1:1072,2\n789#1:1074,6\n789#1:1080\n828#1:1081,6\n828#1:1088,3\n828#1:1092,9\n855#1:1101,4\n855#1:1105,7\n855#1:1113,3\n855#1:1117,2\n855#1:1119,2\n855#1:1121,6\n855#1:1127\n864#1:1128,6\n898#1:1153,3\n1004#1:1193,3\n*E\n"})
/* loaded from: classes.dex */
public final class MutableIntLongMap extends IntLongMap {
private int growthLimit;
public MutableIntLongMap() {
this(0, 1, null);
}
public final void minusAssign(IntList keys) {
Intrinsics.checkNotNullParameter(keys, "keys");
int[] iArr = keys.content;
int i = keys._size;
for (int i2 = 0; i2 < i; i2++) {
remove(iArr[i2]);
}
}
public final void minusAssign(IntSet keys) {
Intrinsics.checkNotNullParameter(keys, "keys");
int[] iArr = keys.elements;
long[] jArr = keys.metadata;
int length = jArr.length - 2;
if (length < 0) {
return;
}
int i = 0;
while (true) {
long j = jArr[i];
if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
int i2 = 8 - ((~(i - length)) >>> 31);
for (int i3 = 0; i3 < i2; i3++) {
if ((255 & j) < 128) {
remove(iArr[(i << 3) + i3]);
}
j >>= 8;
}
if (i2 != 8) {
return;
}
}
if (i == length) {
return;
} else {
i++;
}
}
}
public final void removeIf(Function2 predicate) {
Intrinsics.checkNotNullParameter(predicate, "predicate");
long[] jArr = this.metadata;
int length = jArr.length - 2;
if (length < 0) {
return;
}
int i = 0;
while (true) {
long j = jArr[i];
if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
int i2 = 8 - ((~(i - length)) >>> 31);
for (int i3 = 0; i3 < i2; i3++) {
if ((255 & j) < 128) {
int i4 = (i << 3) + i3;
if (((Boolean) predicate.invoke(Integer.valueOf(this.keys[i4]), Long.valueOf(this.values[i4]))).booleanValue()) {
removeValueAt(i4);
}
}
j >>= 8;
}
if (i2 != 8) {
return;
}
}
if (i == length) {
return;
} else {
i++;
}
}
}
public final void putAll(IntLongMap from) {
Intrinsics.checkNotNullParameter(from, "from");
int[] iArr = from.keys;
long[] jArr = from.values;
long[] jArr2 = from.metadata;
int length = jArr2.length - 2;
if (length < 0) {
return;
}
int i = 0;
while (true) {
long j = jArr2[i];
if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
int i2 = 8 - ((~(i - length)) >>> 31);
for (int i3 = 0; i3 < i2; i3++) {
if ((255 & j) < 128) {
int i4 = (i << 3) + i3;
set(iArr[i4], jArr[i4]);
}
j >>= 8;
}
if (i2 != 8) {
return;
}
}
if (i == length) {
return;
} else {
i++;
}
}
}
public /* synthetic */ MutableIntLongMap(int i, int i2, DefaultConstructorMarker defaultConstructorMarker) {
this((i2 & 1) != 0 ? 6 : i);
}
public MutableIntLongMap(int i) {
super(null);
if (i < 0) {
throw new IllegalArgumentException("Capacity must be a positive value.".toString());
}
initializeStorage(ScatterMapKt.unloadedCapacity(i));
}
private final void initializeStorage(int i) {
int max = i > 0 ? Math.max(7, ScatterMapKt.normalizeCapacity(i)) : 0;
this._capacity = max;
initializeMetadata(max);
this.keys = new int[max];
this.values = new long[max];
}
private final void initializeMetadata(int i) {
long[] jArr;
if (i == 0) {
jArr = ScatterMapKt.EmptyGroup;
} else {
jArr = new long[((i + 15) & (-8)) >> 3];
ArraysKt___ArraysJvmKt.fill$default(jArr, -9187201950435737472L, 0, 0, 6, (Object) null);
}
this.metadata = jArr;
int i2 = i >> 3;
long j = 255 << ((i & 7) << 3);
jArr[i2] = (jArr[i2] & (~j)) | j;
initializeGrowth();
}
private final void initializeGrowth() {
this.growthLimit = ScatterMapKt.loadedCapacity(getCapacity()) - this._size;
}
public final long getOrPut(int i, Function0 defaultValue) {
Intrinsics.checkNotNullParameter(defaultValue, "defaultValue");
int findKeyIndex = findKeyIndex(i);
if (findKeyIndex < 0) {
long longValue = ((Number) defaultValue.invoke()).longValue();
put(i, longValue);
return longValue;
}
return this.values[findKeyIndex];
}
public final void set(int i, long j) {
int findInsertIndex = findInsertIndex(i);
if (findInsertIndex < 0) {
findInsertIndex = ~findInsertIndex;
}
this.keys[findInsertIndex] = i;
this.values[findInsertIndex] = j;
}
public final void put(int i, long j) {
set(i, j);
}
public final long put(int i, long j, long j2) {
int findInsertIndex = findInsertIndex(i);
if (findInsertIndex < 0) {
findInsertIndex = ~findInsertIndex;
} else {
j2 = this.values[findInsertIndex];
}
this.keys[findInsertIndex] = i;
this.values[findInsertIndex] = j;
return j2;
}
public final void plusAssign(IntLongMap from) {
Intrinsics.checkNotNullParameter(from, "from");
putAll(from);
}
public final void remove(int i) {
int findKeyIndex = findKeyIndex(i);
if (findKeyIndex >= 0) {
removeValueAt(findKeyIndex);
}
}
public final boolean remove(int i, long j) {
int findKeyIndex = findKeyIndex(i);
if (findKeyIndex < 0 || this.values[findKeyIndex] != j) {
return false;
}
removeValueAt(findKeyIndex);
return true;
}
public final void minusAssign(int i) {
remove(i);
}
public final void minusAssign(int[] keys) {
Intrinsics.checkNotNullParameter(keys, "keys");
for (int i : keys) {
remove(i);
}
}
private final int findInsertIndex(int i) {
int hashCode = Integer.hashCode(i) * ScatterMapKt.MurmurHashC1;
int i2 = hashCode ^ (hashCode << 16);
int i3 = i2 >>> 7;
int i4 = i2 & 127;
int i5 = this._capacity;
int i6 = i3 & i5;
int i7 = 0;
while (true) {
long[] jArr = this.metadata;
int i8 = i6 >> 3;
int i9 = (i6 & 7) << 3;
long j = ((jArr[i8 + 1] << (64 - i9)) & ((-i9) >> 63)) | (jArr[i8] >>> i9);
long j2 = i4;
int i10 = i7;
long j3 = j ^ (j2 * ScatterMapKt.BitmaskLsb);
for (long j4 = (~j3) & (j3 - ScatterMapKt.BitmaskLsb) & (-9187201950435737472L); j4 != 0; j4 &= j4 - 1) {
int numberOfTrailingZeros = ((Long.numberOfTrailingZeros(j4) >> 3) + i6) & i5;
if (this.keys[numberOfTrailingZeros] == i) {
return numberOfTrailingZeros;
}
}
if ((((~j) << 6) & j & (-9187201950435737472L)) != 0) {
int findFirstAvailableSlot = findFirstAvailableSlot(i3);
if (this.growthLimit == 0 && ((this.metadata[findFirstAvailableSlot >> 3] >> ((findFirstAvailableSlot & 7) << 3)) & 255) != 254) {
adjustStorage();
findFirstAvailableSlot = findFirstAvailableSlot(i3);
}
this._size++;
int i11 = this.growthLimit;
long[] jArr2 = this.metadata;
int i12 = findFirstAvailableSlot >> 3;
long j5 = jArr2[i12];
int i13 = (findFirstAvailableSlot & 7) << 3;
this.growthLimit = i11 - (((j5 >> i13) & 255) == 128 ? 1 : 0);
jArr2[i12] = ((~(255 << i13)) & j5) | (j2 << i13);
int i14 = this._capacity;
int i15 = ((findFirstAvailableSlot - 7) & i14) + (i14 & 7);
int i16 = i15 >> 3;
int i17 = (i15 & 7) << 3;
jArr2[i16] = ((~(255 << i17)) & jArr2[i16]) | (j2 << i17);
return ~findFirstAvailableSlot;
}
i7 = i10 + 8;
i6 = (i6 + i7) & i5;
}
}
public final void clear() {
this._size = 0;
long[] jArr = this.metadata;
if (jArr != ScatterMapKt.EmptyGroup) {
ArraysKt___ArraysJvmKt.fill$default(jArr, -9187201950435737472L, 0, 0, 6, (Object) null);
long[] jArr2 = this.metadata;
int i = this._capacity;
int i2 = i >> 3;
long j = 255 << ((i & 7) << 3);
jArr2[i2] = (jArr2[i2] & (~j)) | j;
}
initializeGrowth();
}
public final int trim() {
int i = this._capacity;
int normalizeCapacity = ScatterMapKt.normalizeCapacity(ScatterMapKt.unloadedCapacity(this._size));
if (normalizeCapacity >= i) {
return 0;
}
resizeStorage(normalizeCapacity);
return i - this._capacity;
}
private final void adjustStorage() {
if (this._capacity > 8 && Long.compareUnsigned(ULong.m4068constructorimpl(ULong.m4068constructorimpl(this._size) * 32), ULong.m4068constructorimpl(ULong.m4068constructorimpl(this._capacity) * 25)) <= 0) {
removeDeletedMarkers();
} else {
resizeStorage(ScatterMapKt.nextCapacity(this._capacity));
}
}
private final void resizeStorage(int i) {
long[] jArr;
int[] iArr;
long[] jArr2 = this.metadata;
int[] iArr2 = this.keys;
long[] jArr3 = this.values;
int i2 = this._capacity;
initializeStorage(i);
int[] iArr3 = this.keys;
long[] jArr4 = this.values;
int i3 = 0;
while (i3 < i2) {
if (((jArr2[i3 >> 3] >> ((i3 & 7) << 3)) & 255) < 128) {
int i4 = iArr2[i3];
int hashCode = Integer.hashCode(i4) * ScatterMapKt.MurmurHashC1;
int i5 = hashCode ^ (hashCode << 16);
int findFirstAvailableSlot = findFirstAvailableSlot(i5 >>> 7);
long j = i5 & 127;
long[] jArr5 = this.metadata;
int i6 = findFirstAvailableSlot >> 3;
int i7 = (findFirstAvailableSlot & 7) << 3;
jArr = jArr2;
iArr = iArr2;
jArr5[i6] = (jArr5[i6] & (~(255 << i7))) | (j << i7);
int i8 = this._capacity;
int i9 = ((findFirstAvailableSlot - 7) & i8) + (i8 & 7);
int i10 = i9 >> 3;
int i11 = (i9 & 7) << 3;
jArr5[i10] = ((~(255 << i11)) & jArr5[i10]) | (j << i11);
iArr3[findFirstAvailableSlot] = i4;
jArr4[findFirstAvailableSlot] = jArr3[i3];
} else {
jArr = jArr2;
iArr = iArr2;
}
i3++;
jArr2 = jArr;
iArr2 = iArr;
}
}
private final void removeDeletedMarkers() {
long[] jArr = this.metadata;
int i = this._capacity;
int i2 = 0;
for (int i3 = 0; i3 < i; i3++) {
int i4 = i3 >> 3;
int i5 = (i3 & 7) << 3;
if (((jArr[i4] >> i5) & 255) == 254) {
long[] jArr2 = this.metadata;
jArr2[i4] = (128 << i5) | (jArr2[i4] & (~(255 << i5)));
int i6 = this._capacity;
int i7 = ((i3 - 7) & i6) + (i6 & 7);
int i8 = i7 >> 3;
int i9 = (i7 & 7) << 3;
jArr2[i8] = ((~(255 << i9)) & jArr2[i8]) | (128 << i9);
i2++;
}
}
this.growthLimit += i2;
}
private final void writeMetadata(int i, long j) {
long[] jArr = this.metadata;
int i2 = i >> 3;
int i3 = (i & 7) << 3;
jArr[i2] = (jArr[i2] & (~(255 << i3))) | (j << i3);
int i4 = this._capacity;
int i5 = ((i - 7) & i4) + (i4 & 7);
int i6 = i5 >> 3;
int i7 = (i5 & 7) << 3;
jArr[i6] = (j << i7) | (jArr[i6] & (~(255 << i7)));
}
public final void removeValueAt(int i) {
this._size--;
long[] jArr = this.metadata;
int i2 = i >> 3;
int i3 = (i & 7) << 3;
jArr[i2] = (jArr[i2] & (~(255 << i3))) | (254 << i3);
int i4 = this._capacity;
int i5 = ((i - 7) & i4) + (i4 & 7);
int i6 = i5 >> 3;
int i7 = (i5 & 7) << 3;
jArr[i6] = (jArr[i6] & (~(255 << i7))) | (254 << i7);
}
private final int findFirstAvailableSlot(int i) {
int i2 = this._capacity;
int i3 = i & i2;
int i4 = 0;
while (true) {
long[] jArr = this.metadata;
int i5 = i3 >> 3;
int i6 = (i3 & 7) << 3;
long j = ((jArr[i5 + 1] << (64 - i6)) & ((-i6) >> 63)) | (jArr[i5] >>> i6);
long j2 = j & ((~j) << 7) & (-9187201950435737472L);
if (j2 != 0) {
return (i3 + (Long.numberOfTrailingZeros(j2) >> 3)) & i2;
}
i4 += 8;
i3 = (i3 + i4) & i2;
}
}
}

View File

@@ -0,0 +1,592 @@
package androidx.collection;
import kotlin.ULong;
import kotlin.collections.ArraysKt___ArraysJvmKt;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
@SourceDebugExtension({"SMAP\nIntObjectMap.kt\nKotlin\n*S Kotlin\n*F\n+ 1 IntObjectMap.kt\nandroidx/collection/MutableIntObjectMap\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n+ 3 ScatterMap.kt\nandroidx/collection/ScatterMapKt\n+ 4 IntObjectMap.kt\nandroidx/collection/IntObjectMap\n+ 5 IntSet.kt\nandroidx/collection/IntSetKt\n+ 6 IntSet.kt\nandroidx/collection/IntSet\n+ 7 IntList.kt\nandroidx/collection/IntList\n*L\n1#1,1034:1\n820#1,2:1187\n820#1,2:1201\n1024#1,2:1204\n1028#1,5:1212\n1024#1,2:1243\n1028#1,5:1251\n1024#1,2:1268\n1028#1,5:1276\n1024#1,2:1282\n1028#1,5:1290\n1#2:1035\n1672#3,6:1036\n1826#3:1052\n1688#3:1056\n1619#3:1073\n1615#3:1076\n1795#3,3:1081\n1809#3,3:1085\n1733#3:1089\n1721#3:1091\n1715#3:1092\n1728#3:1097\n1818#3:1099\n1619#3:1113\n1615#3:1116\n1795#3,3:1121\n1809#3,3:1125\n1733#3:1129\n1721#3:1131\n1715#3:1132\n1728#3:1137\n1818#3:1139\n1826#3:1154\n1688#3:1158\n1826#3:1179\n1688#3:1183\n1672#3,6:1206\n1672#3,6:1217\n1615#3:1226\n1619#3:1227\n1795#3,3:1228\n1809#3,3:1231\n1733#3:1234\n1721#3:1235\n1715#3:1236\n1728#3:1237\n1818#3:1238\n1682#3:1239\n1661#3:1240\n1680#3:1241\n1661#3:1242\n1672#3,6:1245\n1795#3,3:1256\n1826#3:1259\n1715#3:1260\n1685#3:1261\n1661#3:1262\n1615#3:1266\n1619#3:1267\n1672#3,6:1270\n1661#3:1281\n1672#3,6:1284\n1672#3,6:1295\n1672#3,6:1301\n382#4,4:1042\n354#4,6:1046\n364#4,3:1053\n367#4,2:1057\n387#4,2:1059\n370#4,6:1061\n389#4:1067\n619#4:1068\n620#4:1072\n622#4,2:1074\n624#4,4:1077\n628#4:1084\n629#4:1088\n630#4:1090\n631#4,4:1093\n637#4:1098\n638#4,8:1100\n619#4:1108\n620#4:1112\n622#4,2:1114\n624#4,4:1117\n628#4:1124\n629#4:1128\n630#4:1130\n631#4,4:1133\n637#4:1138\n638#4,8:1140\n354#4,6:1148\n364#4,3:1155\n367#4,9:1159\n849#5,3:1069\n849#5,3:1109\n849#5,3:1223\n849#5,3:1263\n262#6,4:1168\n232#6,7:1172\n243#6,3:1180\n246#6,2:1184\n266#6:1186\n267#6:1189\n249#6,6:1190\n268#6:1196\n253#7,4:1197\n258#7:1203\n*S KotlinDebug\n*F\n+ 1 IntObjectMap.kt\nandroidx/collection/MutableIntObjectMap\n*L\n837#1:1187,2\n846#1:1201,2\n856#1:1204,2\n856#1:1212,5\n920#1:1243,2\n920#1:1251,5\n994#1:1268,2\n994#1:1276,5\n1010#1:1282,2\n1010#1:1290,5\n713#1:1036,6\n766#1:1052\n766#1:1056\n782#1:1073\n782#1:1076\n782#1:1081,3\n782#1:1085,3\n782#1:1089\n782#1:1091\n782#1:1092\n782#1:1097\n782#1:1099\n794#1:1113\n794#1:1116\n794#1:1121,3\n794#1:1125,3\n794#1:1129\n794#1:1131\n794#1:1132\n794#1:1137\n794#1:1139\n808#1:1154\n808#1:1158\n836#1:1179\n836#1:1183\n856#1:1206,6\n871#1:1217,6\n886#1:1226\n887#1:1227\n894#1:1228,3\n895#1:1231,3\n896#1:1234\n897#1:1235\n897#1:1236\n901#1:1237\n904#1:1238\n913#1:1239\n913#1:1240\n919#1:1241\n919#1:1242\n920#1:1245,6\n935#1:1256,3\n936#1:1259\n938#1:1260\n989#1:1261\n989#1:1262\n992#1:1266\n994#1:1267\n994#1:1270,6\n1008#1:1281\n1010#1:1284,6\n1025#1:1295,6\n1031#1:1301,6\n766#1:1042,4\n766#1:1046,6\n766#1:1053,3\n766#1:1057,2\n766#1:1059,2\n766#1:1061,6\n766#1:1067\n782#1:1068\n782#1:1072\n782#1:1074,2\n782#1:1077,4\n782#1:1084\n782#1:1088\n782#1:1090\n782#1:1093,4\n782#1:1098\n782#1:1100,8\n794#1:1108\n794#1:1112\n794#1:1114,2\n794#1:1117,4\n794#1:1124\n794#1:1128\n794#1:1130\n794#1:1133,4\n794#1:1138\n794#1:1140,8\n808#1:1148,6\n808#1:1155,3\n808#1:1159,9\n782#1:1069,3\n794#1:1109,3\n885#1:1223,3\n991#1:1263,3\n836#1:1168,4\n836#1:1172,7\n836#1:1180,3\n836#1:1184,2\n836#1:1186\n836#1:1189\n836#1:1190,6\n836#1:1196\n845#1:1197,4\n845#1:1203\n*E\n"})
/* loaded from: classes.dex */
public final class MutableIntObjectMap<V> extends IntObjectMap<V> {
private int growthLimit;
public MutableIntObjectMap() {
this(0, 1, null);
}
public final void minusAssign(IntList keys) {
Intrinsics.checkNotNullParameter(keys, "keys");
int[] iArr = keys.content;
int i = keys._size;
for (int i2 = 0; i2 < i; i2++) {
remove(iArr[i2]);
}
}
public final void minusAssign(IntSet keys) {
Intrinsics.checkNotNullParameter(keys, "keys");
int[] iArr = keys.elements;
long[] jArr = keys.metadata;
int length = jArr.length - 2;
if (length < 0) {
return;
}
int i = 0;
while (true) {
long j = jArr[i];
if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
int i2 = 8 - ((~(i - length)) >>> 31);
for (int i3 = 0; i3 < i2; i3++) {
if ((255 & j) < 128) {
remove(iArr[(i << 3) + i3]);
}
j >>= 8;
}
if (i2 != 8) {
return;
}
}
if (i == length) {
return;
} else {
i++;
}
}
}
public final void removeIf(Function2 predicate) {
Intrinsics.checkNotNullParameter(predicate, "predicate");
long[] jArr = this.metadata;
int length = jArr.length - 2;
if (length < 0) {
return;
}
int i = 0;
while (true) {
long j = jArr[i];
if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
int i2 = 8 - ((~(i - length)) >>> 31);
for (int i3 = 0; i3 < i2; i3++) {
if ((255 & j) < 128) {
int i4 = (i << 3) + i3;
if (((Boolean) predicate.invoke(Integer.valueOf(this.keys[i4]), this.values[i4])).booleanValue()) {
removeValueAt(i4);
}
}
j >>= 8;
}
if (i2 != 8) {
return;
}
}
if (i == length) {
return;
} else {
i++;
}
}
}
/* JADX WARN: Multi-variable type inference failed */
public final void putAll(IntObjectMap<V> from) {
Intrinsics.checkNotNullParameter(from, "from");
int[] iArr = from.keys;
Object[] objArr = from.values;
long[] jArr = from.metadata;
int length = jArr.length - 2;
if (length < 0) {
return;
}
int i = 0;
while (true) {
long j = jArr[i];
if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
int i2 = 8 - ((~(i - length)) >>> 31);
for (int i3 = 0; i3 < i2; i3++) {
if ((255 & j) < 128) {
int i4 = (i << 3) + i3;
set(iArr[i4], objArr[i4]);
}
j >>= 8;
}
if (i2 != 8) {
return;
}
}
if (i == length) {
return;
} else {
i++;
}
}
}
public /* synthetic */ MutableIntObjectMap(int i, int i2, DefaultConstructorMarker defaultConstructorMarker) {
this((i2 & 1) != 0 ? 6 : i);
}
public MutableIntObjectMap(int i) {
super(null);
if (i < 0) {
throw new IllegalArgumentException("Capacity must be a positive value.".toString());
}
initializeStorage(ScatterMapKt.unloadedCapacity(i));
}
private final void initializeStorage(int i) {
int max = i > 0 ? Math.max(7, ScatterMapKt.normalizeCapacity(i)) : 0;
this._capacity = max;
initializeMetadata(max);
this.keys = new int[max];
this.values = new Object[max];
}
private final void initializeMetadata(int i) {
long[] jArr;
if (i == 0) {
jArr = ScatterMapKt.EmptyGroup;
} else {
jArr = new long[((i + 15) & (-8)) >> 3];
ArraysKt___ArraysJvmKt.fill$default(jArr, -9187201950435737472L, 0, 0, 6, (Object) null);
}
this.metadata = jArr;
int i2 = i >> 3;
long j = 255 << ((i & 7) << 3);
jArr[i2] = (jArr[i2] & (~j)) | j;
initializeGrowth();
}
private final void initializeGrowth() {
this.growthLimit = ScatterMapKt.loadedCapacity(getCapacity()) - this._size;
}
public final V getOrPut(int i, Function0 defaultValue) {
Intrinsics.checkNotNullParameter(defaultValue, "defaultValue");
V v = get(i);
if (v != null) {
return v;
}
V v2 = (V) defaultValue.invoke();
set(i, v2);
return v2;
}
public final void set(int i, V v) {
int findAbsoluteInsertIndex = findAbsoluteInsertIndex(i);
this.keys[findAbsoluteInsertIndex] = i;
this.values[findAbsoluteInsertIndex] = v;
}
public final V put(int i, V v) {
int findAbsoluteInsertIndex = findAbsoluteInsertIndex(i);
Object[] objArr = this.values;
V v2 = (V) objArr[findAbsoluteInsertIndex];
this.keys[findAbsoluteInsertIndex] = i;
objArr[findAbsoluteInsertIndex] = v;
return v2;
}
public final void plusAssign(IntObjectMap<V> from) {
Intrinsics.checkNotNullParameter(from, "from");
putAll(from);
}
public final void minusAssign(int i) {
remove(i);
}
public final void minusAssign(int[] keys) {
Intrinsics.checkNotNullParameter(keys, "keys");
for (int i : keys) {
remove(i);
}
}
private final int findAbsoluteInsertIndex(int i) {
int hashCode = Integer.hashCode(i) * ScatterMapKt.MurmurHashC1;
int i2 = hashCode ^ (hashCode << 16);
int i3 = i2 >>> 7;
int i4 = i2 & 127;
int i5 = this._capacity;
int i6 = i3 & i5;
int i7 = 0;
while (true) {
long[] jArr = this.metadata;
int i8 = i6 >> 3;
int i9 = (i6 & 7) << 3;
long j = ((jArr[i8 + 1] << (64 - i9)) & ((-i9) >> 63)) | (jArr[i8] >>> i9);
long j2 = i4;
int i10 = i7;
long j3 = j ^ (j2 * ScatterMapKt.BitmaskLsb);
for (long j4 = (~j3) & (j3 - ScatterMapKt.BitmaskLsb) & (-9187201950435737472L); j4 != 0; j4 &= j4 - 1) {
int numberOfTrailingZeros = ((Long.numberOfTrailingZeros(j4) >> 3) + i6) & i5;
if (this.keys[numberOfTrailingZeros] == i) {
return numberOfTrailingZeros;
}
}
if ((((~j) << 6) & j & (-9187201950435737472L)) != 0) {
int findFirstAvailableSlot = findFirstAvailableSlot(i3);
if (this.growthLimit == 0 && ((this.metadata[findFirstAvailableSlot >> 3] >> ((findFirstAvailableSlot & 7) << 3)) & 255) != 254) {
adjustStorage();
findFirstAvailableSlot = findFirstAvailableSlot(i3);
}
this._size++;
int i11 = this.growthLimit;
long[] jArr2 = this.metadata;
int i12 = findFirstAvailableSlot >> 3;
long j5 = jArr2[i12];
int i13 = (findFirstAvailableSlot & 7) << 3;
this.growthLimit = i11 - (((j5 >> i13) & 255) == 128 ? 1 : 0);
jArr2[i12] = ((~(255 << i13)) & j5) | (j2 << i13);
int i14 = this._capacity;
int i15 = ((findFirstAvailableSlot - 7) & i14) + (i14 & 7);
int i16 = i15 >> 3;
int i17 = (i15 & 7) << 3;
jArr2[i16] = ((~(255 << i17)) & jArr2[i16]) | (j2 << i17);
return findFirstAvailableSlot;
}
i7 = i10 + 8;
i6 = (i6 + i7) & i5;
}
}
/* JADX WARN: Code restructure failed: missing block: B:16:0x0061, code lost:
if (((r4 & ((~r4) << 6)) & (-9187201950435737472L)) == 0) goto L18;
*/
/* JADX WARN: Code restructure failed: missing block: B:19:0x0063, code lost:
r10 = -1;
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final V remove(int r14) {
/*
r13 = this;
int r0 = java.lang.Integer.hashCode(r14)
r1 = -862048943(0xffffffffcc9e2d51, float:-8.293031E7)
int r0 = r0 * r1
int r1 = r0 << 16
r0 = r0 ^ r1
r1 = r0 & 127(0x7f, float:1.78E-43)
int r2 = r13._capacity
int r0 = r0 >>> 7
r0 = r0 & r2
r3 = 0
L13:
long[] r4 = r13.metadata
int r5 = r0 >> 3
r6 = r0 & 7
int r6 = r6 << 3
r7 = r4[r5]
long r7 = r7 >>> r6
int r5 = r5 + 1
r9 = r4[r5]
int r4 = 64 - r6
long r4 = r9 << r4
long r9 = (long) r6
long r9 = -r9
r6 = 63
long r9 = r9 >> r6
long r4 = r4 & r9
long r4 = r4 | r7
long r6 = (long) r1
r8 = 72340172838076673(0x101010101010101, double:7.748604185489348E-304)
long r6 = r6 * r8
long r6 = r6 ^ r4
long r8 = r6 - r8
long r6 = ~r6
long r6 = r6 & r8
r8 = -9187201950435737472(0x8080808080808080, double:-2.937446524422997E-306)
long r6 = r6 & r8
L3f:
r10 = 0
int r12 = (r6 > r10 ? 1 : (r6 == r10 ? 0 : -1))
if (r12 == 0) goto L5a
int r10 = java.lang.Long.numberOfTrailingZeros(r6)
int r10 = r10 >> 3
int r10 = r10 + r0
r10 = r10 & r2
int[] r11 = r13.keys
r11 = r11[r10]
if (r11 != r14) goto L54
goto L64
L54:
r10 = 1
long r10 = r6 - r10
long r6 = r6 & r10
goto L3f
L5a:
long r6 = ~r4
r12 = 6
long r6 = r6 << r12
long r4 = r4 & r6
long r4 = r4 & r8
int r4 = (r4 > r10 ? 1 : (r4 == r10 ? 0 : -1))
if (r4 == 0) goto L6d
r10 = -1
L64:
if (r10 < 0) goto L6b
java.lang.Object r14 = r13.removeValueAt(r10)
return r14
L6b:
r14 = 0
return r14
L6d:
int r3 = r3 + 8
int r0 = r0 + r3
r0 = r0 & r2
goto L13
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.collection.MutableIntObjectMap.remove(int):java.lang.Object");
}
/* JADX WARN: Code restructure failed: missing block: B:18:0x0067, code lost:
if (((r6 & ((~r6) << 6)) & (-9187201950435737472L)) == 0) goto L19;
*/
/* JADX WARN: Code restructure failed: missing block: B:21:0x0069, code lost:
r10 = -1;
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final boolean remove(int r19, V r20) {
/*
r18 = this;
r0 = r18
int r1 = java.lang.Integer.hashCode(r19)
r2 = -862048943(0xffffffffcc9e2d51, float:-8.293031E7)
int r1 = r1 * r2
int r2 = r1 << 16
r1 = r1 ^ r2
r2 = r1 & 127(0x7f, float:1.78E-43)
int r3 = r0._capacity
int r1 = r1 >>> 7
r1 = r1 & r3
r4 = 0
r5 = r4
L16:
long[] r6 = r0.metadata
int r7 = r1 >> 3
r8 = r1 & 7
int r8 = r8 << 3
r9 = r6[r7]
long r9 = r9 >>> r8
r11 = 1
int r7 = r7 + r11
r12 = r6[r7]
int r6 = 64 - r8
long r6 = r12 << r6
long r12 = (long) r8
long r12 = -r12
r8 = 63
long r12 = r12 >> r8
long r6 = r6 & r12
long r6 = r6 | r9
long r8 = (long) r2
r12 = 72340172838076673(0x101010101010101, double:7.748604185489348E-304)
long r8 = r8 * r12
long r8 = r8 ^ r6
long r12 = r8 - r12
long r8 = ~r8
long r8 = r8 & r12
r12 = -9187201950435737472(0x8080808080808080, double:-2.937446524422997E-306)
long r8 = r8 & r12
L42:
r14 = 0
int r10 = (r8 > r14 ? 1 : (r8 == r14 ? 0 : -1))
if (r10 == 0) goto L60
int r10 = java.lang.Long.numberOfTrailingZeros(r8)
int r10 = r10 >> 3
int r10 = r10 + r1
r10 = r10 & r3
int[] r14 = r0.keys
r14 = r14[r10]
r15 = r19
if (r14 != r15) goto L59
goto L6a
L59:
r16 = 1
long r16 = r8 - r16
long r8 = r8 & r16
goto L42
L60:
long r8 = ~r6
r10 = 6
long r8 = r8 << r10
long r6 = r6 & r8
long r6 = r6 & r12
int r6 = (r6 > r14 ? 1 : (r6 == r14 ? 0 : -1))
if (r6 == 0) goto L7d
r10 = -1
L6a:
if (r10 < 0) goto L7c
java.lang.Object[] r1 = r0.values
r1 = r1[r10]
r6 = r20
boolean r1 = kotlin.jvm.internal.Intrinsics.areEqual(r1, r6)
if (r1 == 0) goto L7c
r0.removeValueAt(r10)
return r11
L7c:
return r4
L7d:
r6 = r20
int r5 = r5 + 8
int r1 = r1 + r5
r1 = r1 & r3
goto L16
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.collection.MutableIntObjectMap.remove(int, java.lang.Object):boolean");
}
public final void clear() {
this._size = 0;
long[] jArr = this.metadata;
if (jArr != ScatterMapKt.EmptyGroup) {
ArraysKt___ArraysJvmKt.fill$default(jArr, -9187201950435737472L, 0, 0, 6, (Object) null);
long[] jArr2 = this.metadata;
int i = this._capacity;
int i2 = i >> 3;
long j = 255 << ((i & 7) << 3);
jArr2[i2] = (jArr2[i2] & (~j)) | j;
}
ArraysKt___ArraysJvmKt.fill(this.values, (Object) null, 0, this._capacity);
initializeGrowth();
}
public final int trim() {
int i = this._capacity;
int normalizeCapacity = ScatterMapKt.normalizeCapacity(ScatterMapKt.unloadedCapacity(this._size));
if (normalizeCapacity >= i) {
return 0;
}
resizeStorage(normalizeCapacity);
return i - this._capacity;
}
private final void adjustStorage() {
if (this._capacity > 8 && Long.compareUnsigned(ULong.m4068constructorimpl(ULong.m4068constructorimpl(this._size) * 32), ULong.m4068constructorimpl(ULong.m4068constructorimpl(this._capacity) * 25)) <= 0) {
removeDeletedMarkers();
} else {
resizeStorage(ScatterMapKt.nextCapacity(this._capacity));
}
}
private final void resizeStorage(int i) {
long[] jArr;
int[] iArr;
long[] jArr2 = this.metadata;
int[] iArr2 = this.keys;
Object[] objArr = this.values;
int i2 = this._capacity;
initializeStorage(i);
int[] iArr3 = this.keys;
Object[] objArr2 = this.values;
int i3 = 0;
while (i3 < i2) {
if (((jArr2[i3 >> 3] >> ((i3 & 7) << 3)) & 255) < 128) {
int i4 = iArr2[i3];
int hashCode = Integer.hashCode(i4) * ScatterMapKt.MurmurHashC1;
int i5 = hashCode ^ (hashCode << 16);
int findFirstAvailableSlot = findFirstAvailableSlot(i5 >>> 7);
long j = i5 & 127;
long[] jArr3 = this.metadata;
int i6 = findFirstAvailableSlot >> 3;
int i7 = (findFirstAvailableSlot & 7) << 3;
jArr = jArr2;
iArr = iArr2;
jArr3[i6] = (jArr3[i6] & (~(255 << i7))) | (j << i7);
int i8 = this._capacity;
int i9 = ((findFirstAvailableSlot - 7) & i8) + (i8 & 7);
int i10 = i9 >> 3;
int i11 = (i9 & 7) << 3;
jArr3[i10] = ((~(255 << i11)) & jArr3[i10]) | (j << i11);
iArr3[findFirstAvailableSlot] = i4;
objArr2[findFirstAvailableSlot] = objArr[i3];
} else {
jArr = jArr2;
iArr = iArr2;
}
i3++;
jArr2 = jArr;
iArr2 = iArr;
}
}
private final void removeDeletedMarkers() {
long[] jArr = this.metadata;
int i = this._capacity;
int i2 = 0;
for (int i3 = 0; i3 < i; i3++) {
int i4 = i3 >> 3;
int i5 = (i3 & 7) << 3;
if (((jArr[i4] >> i5) & 255) == 254) {
long[] jArr2 = this.metadata;
jArr2[i4] = (128 << i5) | (jArr2[i4] & (~(255 << i5)));
int i6 = this._capacity;
int i7 = ((i3 - 7) & i6) + (i6 & 7);
int i8 = i7 >> 3;
int i9 = (i7 & 7) << 3;
jArr2[i8] = ((~(255 << i9)) & jArr2[i8]) | (128 << i9);
i2++;
}
}
this.growthLimit += i2;
}
private final void writeMetadata(int i, long j) {
long[] jArr = this.metadata;
int i2 = i >> 3;
int i3 = (i & 7) << 3;
jArr[i2] = (jArr[i2] & (~(255 << i3))) | (j << i3);
int i4 = this._capacity;
int i5 = ((i - 7) & i4) + (i4 & 7);
int i6 = i5 >> 3;
int i7 = (i5 & 7) << 3;
jArr[i6] = (j << i7) | (jArr[i6] & (~(255 << i7)));
}
public final V removeValueAt(int i) {
this._size--;
long[] jArr = this.metadata;
int i2 = i >> 3;
int i3 = (i & 7) << 3;
jArr[i2] = (jArr[i2] & (~(255 << i3))) | (254 << i3);
int i4 = this._capacity;
int i5 = ((i - 7) & i4) + (i4 & 7);
int i6 = i5 >> 3;
int i7 = (i5 & 7) << 3;
jArr[i6] = (jArr[i6] & (~(255 << i7))) | (254 << i7);
Object[] objArr = this.values;
V v = (V) objArr[i];
objArr[i] = null;
return v;
}
private final int findFirstAvailableSlot(int i) {
int i2 = this._capacity;
int i3 = i & i2;
int i4 = 0;
while (true) {
long[] jArr = this.metadata;
int i5 = i3 >> 3;
int i6 = (i3 & 7) << 3;
long j = ((jArr[i5 + 1] << (64 - i6)) & ((-i6) >> 63)) | (jArr[i5] >>> i6);
long j2 = j & ((~j) << 7) & (-9187201950435737472L);
if (j2 != 0) {
return (i3 + (Long.numberOfTrailingZeros(j2) >> 3)) & i2;
}
i4 += 8;
i3 = (i3 + i4) & i2;
}
}
}

View File

@@ -0,0 +1,542 @@
package androidx.collection;
import androidx.annotation.IntRange;
import kotlin.ULong;
import kotlin.collections.ArraysKt___ArraysJvmKt;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
@SourceDebugExtension({"SMAP\nIntSet.kt\nKotlin\n*S Kotlin\n*F\n+ 1 IntSet.kt\nandroidx/collection/MutableIntSet\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n+ 3 ScatterMap.kt\nandroidx/collection/ScatterMapKt\n+ 4 _Arrays.kt\nkotlin/collections/ArraysKt___ArraysKt\n+ 5 IntSet.kt\nandroidx/collection/IntSet\n+ 6 IntSet.kt\nandroidx/collection/IntSetKt\n*L\n1#1,853:1\n832#1,2:997\n836#1,5:1005\n832#1,2:1036\n836#1,5:1044\n832#1,2:1061\n836#1,5:1069\n832#1,2:1075\n836#1,5:1083\n1#2:854\n1672#3,6:855\n1826#3:874\n1688#3:878\n1619#3:895\n1615#3:898\n1795#3,3:902\n1809#3,3:906\n1733#3:910\n1721#3:912\n1715#3:913\n1728#3:918\n1818#3:920\n1619#3:934\n1615#3:937\n1795#3,3:941\n1809#3,3:945\n1733#3:949\n1721#3:951\n1715#3:952\n1728#3:957\n1818#3:959\n1826#3:981\n1688#3:985\n1672#3,6:999\n1672#3,6:1010\n1615#3:1019\n1619#3:1020\n1795#3,3:1021\n1809#3,3:1024\n1733#3:1027\n1721#3:1028\n1715#3:1029\n1728#3:1030\n1818#3:1031\n1682#3:1032\n1661#3:1033\n1680#3:1034\n1661#3:1035\n1672#3,6:1038\n1795#3,3:1049\n1826#3:1052\n1715#3:1053\n1685#3:1054\n1661#3:1055\n1615#3:1059\n1619#3:1060\n1672#3,6:1063\n1661#3:1074\n1672#3,6:1077\n1672#3,6:1088\n1672#3,6:1094\n13600#4,2:861\n13600#4,2:968\n262#5,4:863\n232#5,7:867\n243#5,3:875\n246#5,2:879\n266#5,2:881\n249#5,6:883\n268#5:889\n442#5:890\n443#5:894\n445#5,2:896\n447#5,3:899\n450#5:905\n451#5:909\n452#5:911\n453#5,4:914\n459#5:919\n460#5,8:921\n442#5:929\n443#5:933\n445#5,2:935\n447#5,3:938\n450#5:944\n451#5:948\n452#5:950\n453#5,4:953\n459#5:958\n460#5,8:960\n262#5,4:970\n232#5,7:974\n243#5,3:982\n246#5,2:986\n266#5,2:988\n249#5,6:990\n268#5:996\n849#6,3:891\n849#6,3:930\n849#6,3:1016\n849#6,3:1056\n*S KotlinDebug\n*F\n+ 1 IntSet.kt\nandroidx/collection/MutableIntSet\n*L\n673#1:997,2\n673#1:1005,5\n731#1:1036,2\n731#1:1044,5\n803#1:1061,2\n803#1:1069,5\n818#1:1075,2\n818#1:1083,5\n526#1:855,6\n595#1:874\n595#1:878\n607#1:895\n607#1:898\n607#1:902,3\n607#1:906,3\n607#1:910\n607#1:912\n607#1:913\n607#1:918\n607#1:920\n620#1:934\n620#1:937\n620#1:941,3\n620#1:945,3\n620#1:949\n620#1:951\n620#1:952\n620#1:957\n620#1:959\n663#1:981\n663#1:985\n673#1:999,6\n683#1:1010,6\n697#1:1019\n698#1:1020\n705#1:1021,3\n706#1:1024,3\n707#1:1027\n708#1:1028\n708#1:1029\n712#1:1030\n715#1:1031\n724#1:1032\n724#1:1033\n730#1:1034\n730#1:1035\n731#1:1038,6\n745#1:1049,3\n746#1:1052\n748#1:1053\n798#1:1054\n798#1:1055\n801#1:1059\n803#1:1060\n803#1:1063,6\n816#1:1074\n818#1:1077,6\n833#1:1088,6\n839#1:1094,6\n573#1:861,2\n642#1:968,2\n595#1:863,4\n595#1:867,7\n595#1:875,3\n595#1:879,2\n595#1:881,2\n595#1:883,6\n595#1:889\n607#1:890\n607#1:894\n607#1:896,2\n607#1:899,3\n607#1:905\n607#1:909\n607#1:911\n607#1:914,4\n607#1:919\n607#1:921,8\n620#1:929\n620#1:933\n620#1:935,2\n620#1:938,3\n620#1:944\n620#1:948\n620#1:950\n620#1:953,4\n620#1:958\n620#1:960,8\n663#1:970,4\n663#1:974,7\n663#1:982,3\n663#1:986,2\n663#1:988,2\n663#1:990,6\n663#1:996\n607#1:891,3\n620#1:930,3\n696#1:1016,3\n800#1:1056,3\n*E\n"})
/* loaded from: classes.dex */
public final class MutableIntSet extends IntSet {
private int growthLimit;
public MutableIntSet() {
this(0, 1, null);
}
public final void minusAssign(IntSet elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
int[] iArr = elements.elements;
long[] jArr = elements.metadata;
int length = jArr.length - 2;
if (length < 0) {
return;
}
int i = 0;
while (true) {
long j = jArr[i];
if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
int i2 = 8 - ((~(i - length)) >>> 31);
for (int i3 = 0; i3 < i2; i3++) {
if ((255 & j) < 128) {
minusAssign(iArr[(i << 3) + i3]);
}
j >>= 8;
}
if (i2 != 8) {
return;
}
}
if (i == length) {
return;
} else {
i++;
}
}
}
public final void plusAssign(IntSet elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
int[] iArr = elements.elements;
long[] jArr = elements.metadata;
int length = jArr.length - 2;
if (length < 0) {
return;
}
int i = 0;
while (true) {
long j = jArr[i];
if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
int i2 = 8 - ((~(i - length)) >>> 31);
for (int i3 = 0; i3 < i2; i3++) {
if ((255 & j) < 128) {
plusAssign(iArr[(i << 3) + i3]);
}
j >>= 8;
}
if (i2 != 8) {
return;
}
}
if (i == length) {
return;
} else {
i++;
}
}
}
public /* synthetic */ MutableIntSet(int i, int i2, DefaultConstructorMarker defaultConstructorMarker) {
this((i2 & 1) != 0 ? 6 : i);
}
public MutableIntSet(int i) {
super(null);
if (i < 0) {
throw new IllegalArgumentException("Capacity must be a positive value.".toString());
}
initializeStorage(ScatterMapKt.unloadedCapacity(i));
}
private final void initializeStorage(int i) {
int max = i > 0 ? Math.max(7, ScatterMapKt.normalizeCapacity(i)) : 0;
this._capacity = max;
initializeMetadata(max);
this.elements = new int[max];
}
private final void initializeMetadata(int i) {
long[] jArr;
if (i == 0) {
jArr = ScatterMapKt.EmptyGroup;
} else {
jArr = new long[((i + 15) & (-8)) >> 3];
ArraysKt___ArraysJvmKt.fill$default(jArr, -9187201950435737472L, 0, 0, 6, (Object) null);
}
this.metadata = jArr;
int i2 = i >> 3;
long j = 255 << ((i & 7) << 3);
jArr[i2] = (jArr[i2] & (~j)) | j;
initializeGrowth();
}
private final void initializeGrowth() {
this.growthLimit = ScatterMapKt.loadedCapacity(getCapacity()) - this._size;
}
public final boolean add(int i) {
int i2 = this._size;
this.elements[findAbsoluteInsertIndex(i)] = i;
return this._size != i2;
}
public final void plusAssign(int i) {
this.elements[findAbsoluteInsertIndex(i)] = i;
}
public final boolean addAll(int[] elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
int i = this._size;
plusAssign(elements);
return i != this._size;
}
public final boolean addAll(IntSet elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
int i = this._size;
plusAssign(elements);
return i != this._size;
}
public final boolean removeAll(int[] elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
int i = this._size;
minusAssign(elements);
return i != this._size;
}
public final boolean removeAll(IntSet elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
int i = this._size;
minusAssign(elements);
return i != this._size;
}
public final void clear() {
this._size = 0;
long[] jArr = this.metadata;
if (jArr != ScatterMapKt.EmptyGroup) {
ArraysKt___ArraysJvmKt.fill$default(jArr, -9187201950435737472L, 0, 0, 6, (Object) null);
long[] jArr2 = this.metadata;
int i = this._capacity;
int i2 = i >> 3;
long j = 255 << ((i & 7) << 3);
jArr2[i2] = (jArr2[i2] & (~j)) | j;
}
initializeGrowth();
}
@IntRange(from = 0)
public final int trim() {
int i = this._capacity;
int normalizeCapacity = ScatterMapKt.normalizeCapacity(ScatterMapKt.unloadedCapacity(this._size));
if (normalizeCapacity >= i) {
return 0;
}
resizeStorage(normalizeCapacity);
return i - this._capacity;
}
private final void adjustStorage() {
if (this._capacity > 8 && Long.compareUnsigned(ULong.m4068constructorimpl(ULong.m4068constructorimpl(this._size) * 32), ULong.m4068constructorimpl(ULong.m4068constructorimpl(this._capacity) * 25)) <= 0) {
removeDeletedMarkers();
} else {
resizeStorage(ScatterMapKt.nextCapacity(this._capacity));
}
}
private final void resizeStorage(int i) {
long[] jArr;
int[] iArr;
long[] jArr2 = this.metadata;
int[] iArr2 = this.elements;
int i2 = this._capacity;
initializeStorage(i);
int[] iArr3 = this.elements;
int i3 = 0;
while (i3 < i2) {
if (((jArr2[i3 >> 3] >> ((i3 & 7) << 3)) & 255) < 128) {
int i4 = iArr2[i3];
int hashCode = Integer.hashCode(i4) * ScatterMapKt.MurmurHashC1;
int i5 = hashCode ^ (hashCode << 16);
int findFirstAvailableSlot = findFirstAvailableSlot(i5 >>> 7);
long j = i5 & 127;
long[] jArr3 = this.metadata;
int i6 = findFirstAvailableSlot >> 3;
int i7 = (findFirstAvailableSlot & 7) << 3;
jArr = jArr2;
iArr = iArr2;
jArr3[i6] = ((~(255 << i7)) & jArr3[i6]) | (j << i7);
int i8 = this._capacity;
int i9 = ((findFirstAvailableSlot - 7) & i8) + (i8 & 7);
int i10 = i9 >> 3;
int i11 = (i9 & 7) << 3;
jArr3[i10] = ((~(255 << i11)) & jArr3[i10]) | (j << i11);
iArr3[findFirstAvailableSlot] = i4;
} else {
jArr = jArr2;
iArr = iArr2;
}
i3++;
jArr2 = jArr;
iArr2 = iArr;
}
}
private final int findAbsoluteInsertIndex(int i) {
int hashCode = Integer.hashCode(i) * ScatterMapKt.MurmurHashC1;
int i2 = hashCode ^ (hashCode << 16);
int i3 = i2 >>> 7;
int i4 = i2 & 127;
int i5 = this._capacity;
int i6 = i3 & i5;
int i7 = 0;
while (true) {
long[] jArr = this.metadata;
int i8 = i6 >> 3;
int i9 = (i6 & 7) << 3;
long j = ((jArr[i8 + 1] << (64 - i9)) & ((-i9) >> 63)) | (jArr[i8] >>> i9);
long j2 = i4;
int i10 = i7;
long j3 = j ^ (j2 * ScatterMapKt.BitmaskLsb);
for (long j4 = (~j3) & (j3 - ScatterMapKt.BitmaskLsb) & (-9187201950435737472L); j4 != 0; j4 &= j4 - 1) {
int numberOfTrailingZeros = ((Long.numberOfTrailingZeros(j4) >> 3) + i6) & i5;
if (this.elements[numberOfTrailingZeros] == i) {
return numberOfTrailingZeros;
}
}
if ((((~j) << 6) & j & (-9187201950435737472L)) != 0) {
int findFirstAvailableSlot = findFirstAvailableSlot(i3);
if (this.growthLimit == 0 && ((this.metadata[findFirstAvailableSlot >> 3] >> ((findFirstAvailableSlot & 7) << 3)) & 255) != 254) {
adjustStorage();
findFirstAvailableSlot = findFirstAvailableSlot(i3);
}
this._size++;
int i11 = this.growthLimit;
long[] jArr2 = this.metadata;
int i12 = findFirstAvailableSlot >> 3;
long j5 = jArr2[i12];
int i13 = (findFirstAvailableSlot & 7) << 3;
this.growthLimit = i11 - (((j5 >> i13) & 255) == 128 ? 1 : 0);
jArr2[i12] = ((~(255 << i13)) & j5) | (j2 << i13);
int i14 = this._capacity;
int i15 = ((findFirstAvailableSlot - 7) & i14) + (i14 & 7);
int i16 = i15 >> 3;
int i17 = (i15 & 7) << 3;
jArr2[i16] = ((~(255 << i17)) & jArr2[i16]) | (j2 << i17);
return findFirstAvailableSlot;
}
i7 = i10 + 8;
i6 = (i6 + i7) & i5;
}
}
/* JADX WARN: Code restructure failed: missing block: B:16:0x0061, code lost:
if (((r4 & ((~r4) << 6)) & (-9187201950435737472L)) == 0) goto L16;
*/
/* JADX WARN: Code restructure failed: missing block: B:19:0x0063, code lost:
r10 = -1;
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final void minusAssign(int r14) {
/*
r13 = this;
int r0 = java.lang.Integer.hashCode(r14)
r1 = -862048943(0xffffffffcc9e2d51, float:-8.293031E7)
int r0 = r0 * r1
int r1 = r0 << 16
r0 = r0 ^ r1
r1 = r0 & 127(0x7f, float:1.78E-43)
int r2 = r13._capacity
int r0 = r0 >>> 7
r0 = r0 & r2
r3 = 0
L13:
long[] r4 = r13.metadata
int r5 = r0 >> 3
r6 = r0 & 7
int r6 = r6 << 3
r7 = r4[r5]
long r7 = r7 >>> r6
int r5 = r5 + 1
r9 = r4[r5]
int r4 = 64 - r6
long r4 = r9 << r4
long r9 = (long) r6
long r9 = -r9
r6 = 63
long r9 = r9 >> r6
long r4 = r4 & r9
long r4 = r4 | r7
long r6 = (long) r1
r8 = 72340172838076673(0x101010101010101, double:7.748604185489348E-304)
long r6 = r6 * r8
long r6 = r6 ^ r4
long r8 = r6 - r8
long r6 = ~r6
long r6 = r6 & r8
r8 = -9187201950435737472(0x8080808080808080, double:-2.937446524422997E-306)
long r6 = r6 & r8
L3f:
r10 = 0
int r12 = (r6 > r10 ? 1 : (r6 == r10 ? 0 : -1))
if (r12 == 0) goto L5a
int r10 = java.lang.Long.numberOfTrailingZeros(r6)
int r10 = r10 >> 3
int r10 = r10 + r0
r10 = r10 & r2
int[] r11 = r13.elements
r11 = r11[r10]
if (r11 != r14) goto L54
goto L64
L54:
r10 = 1
long r10 = r6 - r10
long r6 = r6 & r10
goto L3f
L5a:
long r6 = ~r4
r12 = 6
long r6 = r6 << r12
long r4 = r4 & r6
long r4 = r4 & r8
int r4 = (r4 > r10 ? 1 : (r4 == r10 ? 0 : -1))
if (r4 == 0) goto L6a
r10 = -1
L64:
if (r10 < 0) goto L69
r13.removeElementAt(r10)
L69:
return
L6a:
int r3 = r3 + 8
int r0 = r0 + r3
r0 = r0 & r2
goto L13
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.collection.MutableIntSet.minusAssign(int):void");
}
/* JADX WARN: Code restructure failed: missing block: B:17:0x0067, code lost:
if (((r6 & ((~r6) << 6)) & (-9187201950435737472L)) == 0) goto L18;
*/
/* JADX WARN: Code restructure failed: missing block: B:20:0x0069, code lost:
r10 = -1;
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final boolean remove(int r19) {
/*
r18 = this;
r0 = r18
int r1 = java.lang.Integer.hashCode(r19)
r2 = -862048943(0xffffffffcc9e2d51, float:-8.293031E7)
int r1 = r1 * r2
int r2 = r1 << 16
r1 = r1 ^ r2
r2 = r1 & 127(0x7f, float:1.78E-43)
int r3 = r0._capacity
int r1 = r1 >>> 7
r1 = r1 & r3
r4 = 0
r5 = r4
L16:
long[] r6 = r0.metadata
int r7 = r1 >> 3
r8 = r1 & 7
int r8 = r8 << 3
r9 = r6[r7]
long r9 = r9 >>> r8
r11 = 1
int r7 = r7 + r11
r12 = r6[r7]
int r6 = 64 - r8
long r6 = r12 << r6
long r12 = (long) r8
long r12 = -r12
r8 = 63
long r12 = r12 >> r8
long r6 = r6 & r12
long r6 = r6 | r9
long r8 = (long) r2
r12 = 72340172838076673(0x101010101010101, double:7.748604185489348E-304)
long r8 = r8 * r12
long r8 = r8 ^ r6
long r12 = r8 - r12
long r8 = ~r8
long r8 = r8 & r12
r12 = -9187201950435737472(0x8080808080808080, double:-2.937446524422997E-306)
long r8 = r8 & r12
L42:
r14 = 0
int r10 = (r8 > r14 ? 1 : (r8 == r14 ? 0 : -1))
if (r10 == 0) goto L60
int r10 = java.lang.Long.numberOfTrailingZeros(r8)
int r10 = r10 >> 3
int r10 = r10 + r1
r10 = r10 & r3
int[] r14 = r0.elements
r14 = r14[r10]
r15 = r19
if (r14 != r15) goto L59
goto L6a
L59:
r16 = 1
long r16 = r8 - r16
long r8 = r8 & r16
goto L42
L60:
long r8 = ~r6
r10 = 6
long r8 = r8 << r10
long r6 = r6 & r8
long r6 = r6 & r12
int r6 = (r6 > r14 ? 1 : (r6 == r14 ? 0 : -1))
if (r6 == 0) goto L73
r10 = -1
L6a:
if (r10 < 0) goto L6d
r4 = r11
L6d:
if (r4 == 0) goto L72
r0.removeElementAt(r10)
L72:
return r4
L73:
int r5 = r5 + 8
int r1 = r1 + r5
r1 = r1 & r3
goto L16
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.collection.MutableIntSet.remove(int):boolean");
}
private final void removeDeletedMarkers() {
long[] jArr = this.metadata;
int i = this._capacity;
int i2 = 0;
for (int i3 = 0; i3 < i; i3++) {
int i4 = i3 >> 3;
int i5 = (i3 & 7) << 3;
if (((jArr[i4] >> i5) & 255) == 254) {
long[] jArr2 = this.metadata;
jArr2[i4] = (128 << i5) | (jArr2[i4] & (~(255 << i5)));
int i6 = this._capacity;
int i7 = ((i3 - 7) & i6) + (i6 & 7);
int i8 = i7 >> 3;
int i9 = (i7 & 7) << 3;
jArr2[i8] = ((~(255 << i9)) & jArr2[i8]) | (128 << i9);
i2++;
}
}
this.growthLimit += i2;
}
private final void removeElementAt(int i) {
this._size--;
long[] jArr = this.metadata;
int i2 = i >> 3;
int i3 = (i & 7) << 3;
jArr[i2] = (jArr[i2] & (~(255 << i3))) | (254 << i3);
int i4 = this._capacity;
int i5 = ((i - 7) & i4) + (i4 & 7);
int i6 = i5 >> 3;
int i7 = (i5 & 7) << 3;
jArr[i6] = (jArr[i6] & (~(255 << i7))) | (254 << i7);
}
private final void writeMetadata(int i, long j) {
long[] jArr = this.metadata;
int i2 = i >> 3;
int i3 = (i & 7) << 3;
jArr[i2] = (jArr[i2] & (~(255 << i3))) | (j << i3);
int i4 = this._capacity;
int i5 = ((i - 7) & i4) + (i4 & 7);
int i6 = i5 >> 3;
int i7 = (i5 & 7) << 3;
jArr[i6] = (j << i7) | (jArr[i6] & (~(255 << i7)));
}
private final int findFirstAvailableSlot(int i) {
int i2 = this._capacity;
int i3 = i & i2;
int i4 = 0;
while (true) {
long[] jArr = this.metadata;
int i5 = i3 >> 3;
int i6 = (i3 & 7) << 3;
long j = ((jArr[i5 + 1] << (64 - i6)) & ((-i6) >> 63)) | (jArr[i5] >>> i6);
long j2 = j & ((~j) << 7) & (-9187201950435737472L);
if (j2 != 0) {
return (i3 + (Long.numberOfTrailingZeros(j2) >> 3)) & i2;
}
i4 += 8;
i3 = (i3 + i4) & i2;
}
}
public final void minusAssign(int[] elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
for (int i : elements) {
minusAssign(i);
}
}
public final void plusAssign(int[] elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
for (int i : elements) {
plusAssign(i);
}
}
}

View File

@@ -0,0 +1,417 @@
package androidx.collection;
import kotlin.ULong;
import kotlin.collections.ArraysKt___ArraysJvmKt;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
@SourceDebugExtension({"SMAP\nLongFloatMap.kt\nKotlin\n*S Kotlin\n*F\n+ 1 LongFloatMap.kt\nandroidx/collection/MutableLongFloatMap\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n+ 3 ScatterMap.kt\nandroidx/collection/ScatterMapKt\n+ 4 LongFloatMap.kt\nandroidx/collection/LongFloatMap\n+ 5 LongSet.kt\nandroidx/collection/LongSet\n+ 6 LongList.kt\nandroidx/collection/LongList\n+ 7 LongSet.kt\nandroidx/collection/LongSetKt\n*L\n1#1,1047:1\n1037#1,2:1134\n1041#1,5:1142\n1037#1,2:1173\n1041#1,5:1181\n1037#1,2:1198\n1041#1,5:1206\n1037#1,2:1212\n1041#1,5:1220\n1#2:1048\n1672#3,6:1049\n1826#3:1065\n1688#3:1069\n1826#3:1087\n1688#3:1091\n1826#3:1112\n1688#3:1116\n1672#3,6:1136\n1672#3,6:1147\n1615#3:1156\n1619#3:1157\n1795#3,3:1158\n1809#3,3:1161\n1733#3:1164\n1721#3:1165\n1715#3:1166\n1728#3:1167\n1818#3:1168\n1682#3:1169\n1661#3:1170\n1680#3:1171\n1661#3:1172\n1672#3,6:1175\n1795#3,3:1186\n1826#3:1189\n1715#3:1190\n1685#3:1191\n1661#3:1192\n1615#3:1196\n1619#3:1197\n1672#3,6:1200\n1661#3:1211\n1672#3,6:1214\n1672#3,6:1225\n1672#3,6:1231\n385#4,4:1055\n357#4,6:1059\n367#4,3:1066\n370#4,2:1070\n389#4,2:1072\n373#4,6:1074\n391#4:1080\n357#4,6:1081\n367#4,3:1088\n370#4,9:1092\n262#5,4:1101\n232#5,7:1105\n243#5,3:1113\n246#5,2:1117\n266#5,2:1119\n249#5,6:1121\n268#5:1127\n253#6,6:1128\n849#7,3:1153\n849#7,3:1193\n*S KotlinDebug\n*F\n+ 1 LongFloatMap.kt\nandroidx/collection/MutableLongFloatMap\n*L\n875#1:1134,2\n875#1:1142,5\n933#1:1173,2\n933#1:1181,5\n1007#1:1198,2\n1007#1:1206,5\n1023#1:1212,2\n1023#1:1220,5\n711#1:1049,6\n789#1:1065\n789#1:1069\n828#1:1087\n828#1:1091\n855#1:1112\n855#1:1116\n875#1:1136,6\n885#1:1147,6\n899#1:1156\n900#1:1157\n907#1:1158,3\n908#1:1161,3\n909#1:1164\n910#1:1165\n910#1:1166\n914#1:1167\n917#1:1168\n926#1:1169\n926#1:1170\n932#1:1171\n932#1:1172\n933#1:1175,6\n948#1:1186,3\n949#1:1189\n951#1:1190\n1002#1:1191\n1002#1:1192\n1005#1:1196\n1007#1:1197\n1007#1:1200,6\n1021#1:1211\n1023#1:1214,6\n1038#1:1225,6\n1044#1:1231,6\n789#1:1055,4\n789#1:1059,6\n789#1:1066,3\n789#1:1070,2\n789#1:1072,2\n789#1:1074,6\n789#1:1080\n828#1:1081,6\n828#1:1088,3\n828#1:1092,9\n855#1:1101,4\n855#1:1105,7\n855#1:1113,3\n855#1:1117,2\n855#1:1119,2\n855#1:1121,6\n855#1:1127\n864#1:1128,6\n898#1:1153,3\n1004#1:1193,3\n*E\n"})
/* loaded from: classes.dex */
public final class MutableLongFloatMap extends LongFloatMap {
private int growthLimit;
public MutableLongFloatMap() {
this(0, 1, null);
}
public final void minusAssign(LongList keys) {
Intrinsics.checkNotNullParameter(keys, "keys");
long[] jArr = keys.content;
int i = keys._size;
for (int i2 = 0; i2 < i; i2++) {
remove(jArr[i2]);
}
}
public final void minusAssign(LongSet keys) {
Intrinsics.checkNotNullParameter(keys, "keys");
long[] jArr = keys.elements;
long[] jArr2 = keys.metadata;
int length = jArr2.length - 2;
if (length < 0) {
return;
}
int i = 0;
while (true) {
long j = jArr2[i];
if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
int i2 = 8 - ((~(i - length)) >>> 31);
for (int i3 = 0; i3 < i2; i3++) {
if ((255 & j) < 128) {
remove(jArr[(i << 3) + i3]);
}
j >>= 8;
}
if (i2 != 8) {
return;
}
}
if (i == length) {
return;
} else {
i++;
}
}
}
public final void removeIf(Function2 predicate) {
Intrinsics.checkNotNullParameter(predicate, "predicate");
long[] jArr = this.metadata;
int length = jArr.length - 2;
if (length < 0) {
return;
}
int i = 0;
while (true) {
long j = jArr[i];
if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
int i2 = 8 - ((~(i - length)) >>> 31);
for (int i3 = 0; i3 < i2; i3++) {
if ((255 & j) < 128) {
int i4 = (i << 3) + i3;
if (((Boolean) predicate.invoke(Long.valueOf(this.keys[i4]), Float.valueOf(this.values[i4]))).booleanValue()) {
removeValueAt(i4);
}
}
j >>= 8;
}
if (i2 != 8) {
return;
}
}
if (i == length) {
return;
} else {
i++;
}
}
}
public final void putAll(LongFloatMap from) {
Intrinsics.checkNotNullParameter(from, "from");
long[] jArr = from.keys;
float[] fArr = from.values;
long[] jArr2 = from.metadata;
int length = jArr2.length - 2;
if (length < 0) {
return;
}
int i = 0;
while (true) {
long j = jArr2[i];
if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
int i2 = 8 - ((~(i - length)) >>> 31);
for (int i3 = 0; i3 < i2; i3++) {
if ((255 & j) < 128) {
int i4 = (i << 3) + i3;
set(jArr[i4], fArr[i4]);
}
j >>= 8;
}
if (i2 != 8) {
return;
}
}
if (i == length) {
return;
} else {
i++;
}
}
}
public /* synthetic */ MutableLongFloatMap(int i, int i2, DefaultConstructorMarker defaultConstructorMarker) {
this((i2 & 1) != 0 ? 6 : i);
}
public MutableLongFloatMap(int i) {
super(null);
if (i < 0) {
throw new IllegalArgumentException("Capacity must be a positive value.".toString());
}
initializeStorage(ScatterMapKt.unloadedCapacity(i));
}
private final void initializeStorage(int i) {
int max = i > 0 ? Math.max(7, ScatterMapKt.normalizeCapacity(i)) : 0;
this._capacity = max;
initializeMetadata(max);
this.keys = new long[max];
this.values = new float[max];
}
private final void initializeMetadata(int i) {
long[] jArr;
if (i == 0) {
jArr = ScatterMapKt.EmptyGroup;
} else {
jArr = new long[((i + 15) & (-8)) >> 3];
ArraysKt___ArraysJvmKt.fill$default(jArr, -9187201950435737472L, 0, 0, 6, (Object) null);
}
this.metadata = jArr;
int i2 = i >> 3;
long j = 255 << ((i & 7) << 3);
jArr[i2] = (jArr[i2] & (~j)) | j;
initializeGrowth();
}
private final void initializeGrowth() {
this.growthLimit = ScatterMapKt.loadedCapacity(getCapacity()) - this._size;
}
public final float getOrPut(long j, Function0 defaultValue) {
Intrinsics.checkNotNullParameter(defaultValue, "defaultValue");
int findKeyIndex = findKeyIndex(j);
if (findKeyIndex < 0) {
float floatValue = ((Number) defaultValue.invoke()).floatValue();
put(j, floatValue);
return floatValue;
}
return this.values[findKeyIndex];
}
public final void set(long j, float f) {
int findInsertIndex = findInsertIndex(j);
if (findInsertIndex < 0) {
findInsertIndex = ~findInsertIndex;
}
this.keys[findInsertIndex] = j;
this.values[findInsertIndex] = f;
}
public final void put(long j, float f) {
set(j, f);
}
public final float put(long j, float f, float f2) {
int findInsertIndex = findInsertIndex(j);
if (findInsertIndex < 0) {
findInsertIndex = ~findInsertIndex;
} else {
f2 = this.values[findInsertIndex];
}
this.keys[findInsertIndex] = j;
this.values[findInsertIndex] = f;
return f2;
}
public final void plusAssign(LongFloatMap from) {
Intrinsics.checkNotNullParameter(from, "from");
putAll(from);
}
public final void remove(long j) {
int findKeyIndex = findKeyIndex(j);
if (findKeyIndex >= 0) {
removeValueAt(findKeyIndex);
}
}
public final boolean remove(long j, float f) {
int findKeyIndex = findKeyIndex(j);
if (findKeyIndex < 0 || this.values[findKeyIndex] != f) {
return false;
}
removeValueAt(findKeyIndex);
return true;
}
public final void minusAssign(long j) {
remove(j);
}
public final void minusAssign(long[] keys) {
Intrinsics.checkNotNullParameter(keys, "keys");
for (long j : keys) {
remove(j);
}
}
private final int findInsertIndex(long j) {
int hashCode = Long.hashCode(j) * ScatterMapKt.MurmurHashC1;
int i = hashCode ^ (hashCode << 16);
int i2 = i >>> 7;
int i3 = i & 127;
int i4 = this._capacity;
int i5 = i2 & i4;
int i6 = 0;
while (true) {
long[] jArr = this.metadata;
int i7 = i5 >> 3;
int i8 = (i5 & 7) << 3;
long j2 = ((jArr[i7 + 1] << (64 - i8)) & ((-i8) >> 63)) | (jArr[i7] >>> i8);
long j3 = i3;
int i9 = i6;
long j4 = j2 ^ (j3 * ScatterMapKt.BitmaskLsb);
for (long j5 = (~j4) & (j4 - ScatterMapKt.BitmaskLsb) & (-9187201950435737472L); j5 != 0; j5 &= j5 - 1) {
int numberOfTrailingZeros = ((Long.numberOfTrailingZeros(j5) >> 3) + i5) & i4;
if (this.keys[numberOfTrailingZeros] == j) {
return numberOfTrailingZeros;
}
}
if ((((~j2) << 6) & j2 & (-9187201950435737472L)) != 0) {
int findFirstAvailableSlot = findFirstAvailableSlot(i2);
if (this.growthLimit == 0 && ((this.metadata[findFirstAvailableSlot >> 3] >> ((findFirstAvailableSlot & 7) << 3)) & 255) != 254) {
adjustStorage();
findFirstAvailableSlot = findFirstAvailableSlot(i2);
}
this._size++;
int i10 = this.growthLimit;
long[] jArr2 = this.metadata;
int i11 = findFirstAvailableSlot >> 3;
long j6 = jArr2[i11];
int i12 = (findFirstAvailableSlot & 7) << 3;
this.growthLimit = i10 - (((j6 >> i12) & 255) == 128 ? 1 : 0);
jArr2[i11] = (j6 & (~(255 << i12))) | (j3 << i12);
int i13 = this._capacity;
int i14 = ((findFirstAvailableSlot - 7) & i13) + (i13 & 7);
int i15 = i14 >> 3;
int i16 = (i14 & 7) << 3;
jArr2[i15] = ((~(255 << i16)) & jArr2[i15]) | (j3 << i16);
return ~findFirstAvailableSlot;
}
i6 = i9 + 8;
i5 = (i5 + i6) & i4;
}
}
public final void clear() {
this._size = 0;
long[] jArr = this.metadata;
if (jArr != ScatterMapKt.EmptyGroup) {
ArraysKt___ArraysJvmKt.fill$default(jArr, -9187201950435737472L, 0, 0, 6, (Object) null);
long[] jArr2 = this.metadata;
int i = this._capacity;
int i2 = i >> 3;
long j = 255 << ((i & 7) << 3);
jArr2[i2] = (jArr2[i2] & (~j)) | j;
}
initializeGrowth();
}
public final int trim() {
int i = this._capacity;
int normalizeCapacity = ScatterMapKt.normalizeCapacity(ScatterMapKt.unloadedCapacity(this._size));
if (normalizeCapacity >= i) {
return 0;
}
resizeStorage(normalizeCapacity);
return i - this._capacity;
}
private final void adjustStorage() {
if (this._capacity > 8 && Long.compareUnsigned(ULong.m4068constructorimpl(ULong.m4068constructorimpl(this._size) * 32), ULong.m4068constructorimpl(ULong.m4068constructorimpl(this._capacity) * 25)) <= 0) {
removeDeletedMarkers();
} else {
resizeStorage(ScatterMapKt.nextCapacity(this._capacity));
}
}
private final void resizeStorage(int i) {
long[] jArr;
long[] jArr2;
long[] jArr3 = this.metadata;
long[] jArr4 = this.keys;
float[] fArr = this.values;
int i2 = this._capacity;
initializeStorage(i);
long[] jArr5 = this.keys;
float[] fArr2 = this.values;
int i3 = 0;
while (i3 < i2) {
if (((jArr3[i3 >> 3] >> ((i3 & 7) << 3)) & 255) < 128) {
long j = jArr4[i3];
int hashCode = Long.hashCode(j) * ScatterMapKt.MurmurHashC1;
int i4 = hashCode ^ (hashCode << 16);
int findFirstAvailableSlot = findFirstAvailableSlot(i4 >>> 7);
long j2 = i4 & 127;
long[] jArr6 = this.metadata;
int i5 = findFirstAvailableSlot >> 3;
int i6 = (findFirstAvailableSlot & 7) << 3;
jArr = jArr3;
jArr2 = jArr4;
jArr6[i5] = (jArr6[i5] & (~(255 << i6))) | (j2 << i6);
int i7 = this._capacity;
int i8 = ((findFirstAvailableSlot - 7) & i7) + (i7 & 7);
int i9 = i8 >> 3;
int i10 = (i8 & 7) << 3;
jArr6[i9] = (jArr6[i9] & (~(255 << i10))) | (j2 << i10);
jArr5[findFirstAvailableSlot] = j;
fArr2[findFirstAvailableSlot] = fArr[i3];
} else {
jArr = jArr3;
jArr2 = jArr4;
}
i3++;
jArr3 = jArr;
jArr4 = jArr2;
}
}
private final void removeDeletedMarkers() {
long[] jArr = this.metadata;
int i = this._capacity;
int i2 = 0;
for (int i3 = 0; i3 < i; i3++) {
int i4 = i3 >> 3;
int i5 = (i3 & 7) << 3;
if (((jArr[i4] >> i5) & 255) == 254) {
long[] jArr2 = this.metadata;
jArr2[i4] = (128 << i5) | (jArr2[i4] & (~(255 << i5)));
int i6 = this._capacity;
int i7 = ((i3 - 7) & i6) + (i6 & 7);
int i8 = i7 >> 3;
int i9 = (i7 & 7) << 3;
jArr2[i8] = ((~(255 << i9)) & jArr2[i8]) | (128 << i9);
i2++;
}
}
this.growthLimit += i2;
}
private final void writeMetadata(int i, long j) {
long[] jArr = this.metadata;
int i2 = i >> 3;
int i3 = (i & 7) << 3;
jArr[i2] = (jArr[i2] & (~(255 << i3))) | (j << i3);
int i4 = this._capacity;
int i5 = ((i - 7) & i4) + (i4 & 7);
int i6 = i5 >> 3;
int i7 = (i5 & 7) << 3;
jArr[i6] = (j << i7) | (jArr[i6] & (~(255 << i7)));
}
public final void removeValueAt(int i) {
this._size--;
long[] jArr = this.metadata;
int i2 = i >> 3;
int i3 = (i & 7) << 3;
jArr[i2] = (jArr[i2] & (~(255 << i3))) | (254 << i3);
int i4 = this._capacity;
int i5 = ((i - 7) & i4) + (i4 & 7);
int i6 = i5 >> 3;
int i7 = (i5 & 7) << 3;
jArr[i6] = (jArr[i6] & (~(255 << i7))) | (254 << i7);
}
private final int findFirstAvailableSlot(int i) {
int i2 = this._capacity;
int i3 = i & i2;
int i4 = 0;
while (true) {
long[] jArr = this.metadata;
int i5 = i3 >> 3;
int i6 = (i3 & 7) << 3;
long j = ((jArr[i5 + 1] << (64 - i6)) & ((-i6) >> 63)) | (jArr[i5] >>> i6);
long j2 = j & ((~j) << 7) & (-9187201950435737472L);
if (j2 != 0) {
return (i3 + (Long.numberOfTrailingZeros(j2) >> 3)) & i2;
}
i4 += 8;
i3 = (i3 + i4) & i2;
}
}
}

View File

@@ -0,0 +1,417 @@
package androidx.collection;
import kotlin.ULong;
import kotlin.collections.ArraysKt___ArraysJvmKt;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
@SourceDebugExtension({"SMAP\nLongIntMap.kt\nKotlin\n*S Kotlin\n*F\n+ 1 LongIntMap.kt\nandroidx/collection/MutableLongIntMap\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n+ 3 ScatterMap.kt\nandroidx/collection/ScatterMapKt\n+ 4 LongIntMap.kt\nandroidx/collection/LongIntMap\n+ 5 LongSet.kt\nandroidx/collection/LongSet\n+ 6 LongList.kt\nandroidx/collection/LongList\n+ 7 LongSet.kt\nandroidx/collection/LongSetKt\n*L\n1#1,1047:1\n1037#1,2:1134\n1041#1,5:1142\n1037#1,2:1173\n1041#1,5:1181\n1037#1,2:1198\n1041#1,5:1206\n1037#1,2:1212\n1041#1,5:1220\n1#2:1048\n1672#3,6:1049\n1826#3:1065\n1688#3:1069\n1826#3:1087\n1688#3:1091\n1826#3:1112\n1688#3:1116\n1672#3,6:1136\n1672#3,6:1147\n1615#3:1156\n1619#3:1157\n1795#3,3:1158\n1809#3,3:1161\n1733#3:1164\n1721#3:1165\n1715#3:1166\n1728#3:1167\n1818#3:1168\n1682#3:1169\n1661#3:1170\n1680#3:1171\n1661#3:1172\n1672#3,6:1175\n1795#3,3:1186\n1826#3:1189\n1715#3:1190\n1685#3:1191\n1661#3:1192\n1615#3:1196\n1619#3:1197\n1672#3,6:1200\n1661#3:1211\n1672#3,6:1214\n1672#3,6:1225\n1672#3,6:1231\n385#4,4:1055\n357#4,6:1059\n367#4,3:1066\n370#4,2:1070\n389#4,2:1072\n373#4,6:1074\n391#4:1080\n357#4,6:1081\n367#4,3:1088\n370#4,9:1092\n262#5,4:1101\n232#5,7:1105\n243#5,3:1113\n246#5,2:1117\n266#5,2:1119\n249#5,6:1121\n268#5:1127\n253#6,6:1128\n849#7,3:1153\n849#7,3:1193\n*S KotlinDebug\n*F\n+ 1 LongIntMap.kt\nandroidx/collection/MutableLongIntMap\n*L\n875#1:1134,2\n875#1:1142,5\n933#1:1173,2\n933#1:1181,5\n1007#1:1198,2\n1007#1:1206,5\n1023#1:1212,2\n1023#1:1220,5\n711#1:1049,6\n789#1:1065\n789#1:1069\n828#1:1087\n828#1:1091\n855#1:1112\n855#1:1116\n875#1:1136,6\n885#1:1147,6\n899#1:1156\n900#1:1157\n907#1:1158,3\n908#1:1161,3\n909#1:1164\n910#1:1165\n910#1:1166\n914#1:1167\n917#1:1168\n926#1:1169\n926#1:1170\n932#1:1171\n932#1:1172\n933#1:1175,6\n948#1:1186,3\n949#1:1189\n951#1:1190\n1002#1:1191\n1002#1:1192\n1005#1:1196\n1007#1:1197\n1007#1:1200,6\n1021#1:1211\n1023#1:1214,6\n1038#1:1225,6\n1044#1:1231,6\n789#1:1055,4\n789#1:1059,6\n789#1:1066,3\n789#1:1070,2\n789#1:1072,2\n789#1:1074,6\n789#1:1080\n828#1:1081,6\n828#1:1088,3\n828#1:1092,9\n855#1:1101,4\n855#1:1105,7\n855#1:1113,3\n855#1:1117,2\n855#1:1119,2\n855#1:1121,6\n855#1:1127\n864#1:1128,6\n898#1:1153,3\n1004#1:1193,3\n*E\n"})
/* loaded from: classes.dex */
public final class MutableLongIntMap extends LongIntMap {
private int growthLimit;
public MutableLongIntMap() {
this(0, 1, null);
}
public final void minusAssign(LongList keys) {
Intrinsics.checkNotNullParameter(keys, "keys");
long[] jArr = keys.content;
int i = keys._size;
for (int i2 = 0; i2 < i; i2++) {
remove(jArr[i2]);
}
}
public final void minusAssign(LongSet keys) {
Intrinsics.checkNotNullParameter(keys, "keys");
long[] jArr = keys.elements;
long[] jArr2 = keys.metadata;
int length = jArr2.length - 2;
if (length < 0) {
return;
}
int i = 0;
while (true) {
long j = jArr2[i];
if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
int i2 = 8 - ((~(i - length)) >>> 31);
for (int i3 = 0; i3 < i2; i3++) {
if ((255 & j) < 128) {
remove(jArr[(i << 3) + i3]);
}
j >>= 8;
}
if (i2 != 8) {
return;
}
}
if (i == length) {
return;
} else {
i++;
}
}
}
public final void removeIf(Function2 predicate) {
Intrinsics.checkNotNullParameter(predicate, "predicate");
long[] jArr = this.metadata;
int length = jArr.length - 2;
if (length < 0) {
return;
}
int i = 0;
while (true) {
long j = jArr[i];
if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
int i2 = 8 - ((~(i - length)) >>> 31);
for (int i3 = 0; i3 < i2; i3++) {
if ((255 & j) < 128) {
int i4 = (i << 3) + i3;
if (((Boolean) predicate.invoke(Long.valueOf(this.keys[i4]), Integer.valueOf(this.values[i4]))).booleanValue()) {
removeValueAt(i4);
}
}
j >>= 8;
}
if (i2 != 8) {
return;
}
}
if (i == length) {
return;
} else {
i++;
}
}
}
public final void putAll(LongIntMap from) {
Intrinsics.checkNotNullParameter(from, "from");
long[] jArr = from.keys;
int[] iArr = from.values;
long[] jArr2 = from.metadata;
int length = jArr2.length - 2;
if (length < 0) {
return;
}
int i = 0;
while (true) {
long j = jArr2[i];
if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
int i2 = 8 - ((~(i - length)) >>> 31);
for (int i3 = 0; i3 < i2; i3++) {
if ((255 & j) < 128) {
int i4 = (i << 3) + i3;
set(jArr[i4], iArr[i4]);
}
j >>= 8;
}
if (i2 != 8) {
return;
}
}
if (i == length) {
return;
} else {
i++;
}
}
}
public /* synthetic */ MutableLongIntMap(int i, int i2, DefaultConstructorMarker defaultConstructorMarker) {
this((i2 & 1) != 0 ? 6 : i);
}
public MutableLongIntMap(int i) {
super(null);
if (i < 0) {
throw new IllegalArgumentException("Capacity must be a positive value.".toString());
}
initializeStorage(ScatterMapKt.unloadedCapacity(i));
}
private final void initializeStorage(int i) {
int max = i > 0 ? Math.max(7, ScatterMapKt.normalizeCapacity(i)) : 0;
this._capacity = max;
initializeMetadata(max);
this.keys = new long[max];
this.values = new int[max];
}
private final void initializeMetadata(int i) {
long[] jArr;
if (i == 0) {
jArr = ScatterMapKt.EmptyGroup;
} else {
jArr = new long[((i + 15) & (-8)) >> 3];
ArraysKt___ArraysJvmKt.fill$default(jArr, -9187201950435737472L, 0, 0, 6, (Object) null);
}
this.metadata = jArr;
int i2 = i >> 3;
long j = 255 << ((i & 7) << 3);
jArr[i2] = (jArr[i2] & (~j)) | j;
initializeGrowth();
}
private final void initializeGrowth() {
this.growthLimit = ScatterMapKt.loadedCapacity(getCapacity()) - this._size;
}
public final int getOrPut(long j, Function0 defaultValue) {
Intrinsics.checkNotNullParameter(defaultValue, "defaultValue");
int findKeyIndex = findKeyIndex(j);
if (findKeyIndex < 0) {
int intValue = ((Number) defaultValue.invoke()).intValue();
put(j, intValue);
return intValue;
}
return this.values[findKeyIndex];
}
public final void set(long j, int i) {
int findInsertIndex = findInsertIndex(j);
if (findInsertIndex < 0) {
findInsertIndex = ~findInsertIndex;
}
this.keys[findInsertIndex] = j;
this.values[findInsertIndex] = i;
}
public final void put(long j, int i) {
set(j, i);
}
public final int put(long j, int i, int i2) {
int findInsertIndex = findInsertIndex(j);
if (findInsertIndex < 0) {
findInsertIndex = ~findInsertIndex;
} else {
i2 = this.values[findInsertIndex];
}
this.keys[findInsertIndex] = j;
this.values[findInsertIndex] = i;
return i2;
}
public final void plusAssign(LongIntMap from) {
Intrinsics.checkNotNullParameter(from, "from");
putAll(from);
}
public final void remove(long j) {
int findKeyIndex = findKeyIndex(j);
if (findKeyIndex >= 0) {
removeValueAt(findKeyIndex);
}
}
public final boolean remove(long j, int i) {
int findKeyIndex = findKeyIndex(j);
if (findKeyIndex < 0 || this.values[findKeyIndex] != i) {
return false;
}
removeValueAt(findKeyIndex);
return true;
}
public final void minusAssign(long j) {
remove(j);
}
public final void minusAssign(long[] keys) {
Intrinsics.checkNotNullParameter(keys, "keys");
for (long j : keys) {
remove(j);
}
}
private final int findInsertIndex(long j) {
int hashCode = Long.hashCode(j) * ScatterMapKt.MurmurHashC1;
int i = hashCode ^ (hashCode << 16);
int i2 = i >>> 7;
int i3 = i & 127;
int i4 = this._capacity;
int i5 = i2 & i4;
int i6 = 0;
while (true) {
long[] jArr = this.metadata;
int i7 = i5 >> 3;
int i8 = (i5 & 7) << 3;
long j2 = ((jArr[i7 + 1] << (64 - i8)) & ((-i8) >> 63)) | (jArr[i7] >>> i8);
long j3 = i3;
int i9 = i6;
long j4 = j2 ^ (j3 * ScatterMapKt.BitmaskLsb);
for (long j5 = (~j4) & (j4 - ScatterMapKt.BitmaskLsb) & (-9187201950435737472L); j5 != 0; j5 &= j5 - 1) {
int numberOfTrailingZeros = ((Long.numberOfTrailingZeros(j5) >> 3) + i5) & i4;
if (this.keys[numberOfTrailingZeros] == j) {
return numberOfTrailingZeros;
}
}
if ((((~j2) << 6) & j2 & (-9187201950435737472L)) != 0) {
int findFirstAvailableSlot = findFirstAvailableSlot(i2);
if (this.growthLimit == 0 && ((this.metadata[findFirstAvailableSlot >> 3] >> ((findFirstAvailableSlot & 7) << 3)) & 255) != 254) {
adjustStorage();
findFirstAvailableSlot = findFirstAvailableSlot(i2);
}
this._size++;
int i10 = this.growthLimit;
long[] jArr2 = this.metadata;
int i11 = findFirstAvailableSlot >> 3;
long j6 = jArr2[i11];
int i12 = (findFirstAvailableSlot & 7) << 3;
this.growthLimit = i10 - (((j6 >> i12) & 255) == 128 ? 1 : 0);
jArr2[i11] = (j6 & (~(255 << i12))) | (j3 << i12);
int i13 = this._capacity;
int i14 = ((findFirstAvailableSlot - 7) & i13) + (i13 & 7);
int i15 = i14 >> 3;
int i16 = (i14 & 7) << 3;
jArr2[i15] = ((~(255 << i16)) & jArr2[i15]) | (j3 << i16);
return ~findFirstAvailableSlot;
}
i6 = i9 + 8;
i5 = (i5 + i6) & i4;
}
}
public final void clear() {
this._size = 0;
long[] jArr = this.metadata;
if (jArr != ScatterMapKt.EmptyGroup) {
ArraysKt___ArraysJvmKt.fill$default(jArr, -9187201950435737472L, 0, 0, 6, (Object) null);
long[] jArr2 = this.metadata;
int i = this._capacity;
int i2 = i >> 3;
long j = 255 << ((i & 7) << 3);
jArr2[i2] = (jArr2[i2] & (~j)) | j;
}
initializeGrowth();
}
public final int trim() {
int i = this._capacity;
int normalizeCapacity = ScatterMapKt.normalizeCapacity(ScatterMapKt.unloadedCapacity(this._size));
if (normalizeCapacity >= i) {
return 0;
}
resizeStorage(normalizeCapacity);
return i - this._capacity;
}
private final void adjustStorage() {
if (this._capacity > 8 && Long.compareUnsigned(ULong.m4068constructorimpl(ULong.m4068constructorimpl(this._size) * 32), ULong.m4068constructorimpl(ULong.m4068constructorimpl(this._capacity) * 25)) <= 0) {
removeDeletedMarkers();
} else {
resizeStorage(ScatterMapKt.nextCapacity(this._capacity));
}
}
private final void resizeStorage(int i) {
long[] jArr;
long[] jArr2;
long[] jArr3 = this.metadata;
long[] jArr4 = this.keys;
int[] iArr = this.values;
int i2 = this._capacity;
initializeStorage(i);
long[] jArr5 = this.keys;
int[] iArr2 = this.values;
int i3 = 0;
while (i3 < i2) {
if (((jArr3[i3 >> 3] >> ((i3 & 7) << 3)) & 255) < 128) {
long j = jArr4[i3];
int hashCode = Long.hashCode(j) * ScatterMapKt.MurmurHashC1;
int i4 = hashCode ^ (hashCode << 16);
int findFirstAvailableSlot = findFirstAvailableSlot(i4 >>> 7);
long j2 = i4 & 127;
long[] jArr6 = this.metadata;
int i5 = findFirstAvailableSlot >> 3;
int i6 = (findFirstAvailableSlot & 7) << 3;
jArr = jArr3;
jArr2 = jArr4;
jArr6[i5] = (jArr6[i5] & (~(255 << i6))) | (j2 << i6);
int i7 = this._capacity;
int i8 = ((findFirstAvailableSlot - 7) & i7) + (i7 & 7);
int i9 = i8 >> 3;
int i10 = (i8 & 7) << 3;
jArr6[i9] = (jArr6[i9] & (~(255 << i10))) | (j2 << i10);
jArr5[findFirstAvailableSlot] = j;
iArr2[findFirstAvailableSlot] = iArr[i3];
} else {
jArr = jArr3;
jArr2 = jArr4;
}
i3++;
jArr3 = jArr;
jArr4 = jArr2;
}
}
private final void removeDeletedMarkers() {
long[] jArr = this.metadata;
int i = this._capacity;
int i2 = 0;
for (int i3 = 0; i3 < i; i3++) {
int i4 = i3 >> 3;
int i5 = (i3 & 7) << 3;
if (((jArr[i4] >> i5) & 255) == 254) {
long[] jArr2 = this.metadata;
jArr2[i4] = (128 << i5) | (jArr2[i4] & (~(255 << i5)));
int i6 = this._capacity;
int i7 = ((i3 - 7) & i6) + (i6 & 7);
int i8 = i7 >> 3;
int i9 = (i7 & 7) << 3;
jArr2[i8] = ((~(255 << i9)) & jArr2[i8]) | (128 << i9);
i2++;
}
}
this.growthLimit += i2;
}
private final void writeMetadata(int i, long j) {
long[] jArr = this.metadata;
int i2 = i >> 3;
int i3 = (i & 7) << 3;
jArr[i2] = (jArr[i2] & (~(255 << i3))) | (j << i3);
int i4 = this._capacity;
int i5 = ((i - 7) & i4) + (i4 & 7);
int i6 = i5 >> 3;
int i7 = (i5 & 7) << 3;
jArr[i6] = (j << i7) | (jArr[i6] & (~(255 << i7)));
}
public final void removeValueAt(int i) {
this._size--;
long[] jArr = this.metadata;
int i2 = i >> 3;
int i3 = (i & 7) << 3;
jArr[i2] = (jArr[i2] & (~(255 << i3))) | (254 << i3);
int i4 = this._capacity;
int i5 = ((i - 7) & i4) + (i4 & 7);
int i6 = i5 >> 3;
int i7 = (i5 & 7) << 3;
jArr[i6] = (jArr[i6] & (~(255 << i7))) | (254 << i7);
}
private final int findFirstAvailableSlot(int i) {
int i2 = this._capacity;
int i3 = i & i2;
int i4 = 0;
while (true) {
long[] jArr = this.metadata;
int i5 = i3 >> 3;
int i6 = (i3 & 7) << 3;
long j = ((jArr[i5 + 1] << (64 - i6)) & ((-i6) >> 63)) | (jArr[i5] >>> i6);
long j2 = j & ((~j) << 7) & (-9187201950435737472L);
if (j2 != 0) {
return (i3 + (Long.numberOfTrailingZeros(j2) >> 3)) & i2;
}
i4 += 8;
i3 = (i3 + i4) & i2;
}
}
}

View File

@@ -0,0 +1,321 @@
package androidx.collection;
import androidx.annotation.IntRange;
import java.util.Arrays;
import kotlin.collections.ArraysKt___ArraysJvmKt;
import kotlin.collections.ArraysKt___ArraysKt;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
@SourceDebugExtension({"SMAP\nLongList.kt\nKotlin\n*S Kotlin\n*F\n+ 1 LongList.kt\nandroidx/collection/MutableLongList\n+ 2 LongList.kt\nandroidx/collection/LongList\n+ 3 _Arrays.kt\nkotlin/collections/ArraysKt___ArraysKt\n*L\n1#1,969:1\n549#1:970\n70#2:971\n253#2,6:974\n70#2:980\n70#2:981\n70#2:982\n70#2:989\n70#2:990\n13607#3,2:972\n1675#3,6:983\n*S KotlinDebug\n*F\n+ 1 LongList.kt\nandroidx/collection/MutableLongList\n*L\n692#1:970\n753#1:971\n772#1:974,6\n783#1:980\n787#1:981\n834#1:982\n850#1:989\n869#1:990\n763#1:972,2\n836#1:983,6\n*E\n"})
/* loaded from: classes.dex */
public final class MutableLongList extends LongList {
public MutableLongList() {
this(0, 1, null);
}
public final void clear() {
this._size = 0;
}
public final boolean removeAll(LongList elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
int i = this._size;
int i2 = elements._size - 1;
if (i2 >= 0) {
int i3 = 0;
while (true) {
remove(elements.get(i3));
if (i3 == i2) {
break;
}
i3++;
}
}
return i != this._size;
}
public final void minusAssign(LongList elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
long[] jArr = elements.content;
int i = elements._size;
for (int i2 = 0; i2 < i; i2++) {
remove(jArr[i2]);
}
}
public /* synthetic */ MutableLongList(int i, int i2, DefaultConstructorMarker defaultConstructorMarker) {
this((i2 & 1) != 0 ? 16 : i);
}
public MutableLongList(int i) {
super(i, null);
}
public final int getCapacity() {
return this.content.length;
}
public final boolean add(long j) {
ensureCapacity(this._size + 1);
long[] jArr = this.content;
int i = this._size;
jArr[i] = j;
this._size = i + 1;
return true;
}
public final void add(@IntRange(from = 0) int i, long j) {
int i2;
if (i < 0 || i > (i2 = this._size)) {
throw new IndexOutOfBoundsException("Index " + i + " must be in 0.." + this._size);
}
ensureCapacity(i2 + 1);
long[] jArr = this.content;
int i3 = this._size;
if (i != i3) {
ArraysKt___ArraysJvmKt.copyInto(jArr, jArr, i + 1, i, i3);
}
jArr[i] = j;
this._size++;
}
public final boolean addAll(@IntRange(from = 0) int i, long[] elements) {
int i2;
Intrinsics.checkNotNullParameter(elements, "elements");
if (i < 0 || i > (i2 = this._size)) {
throw new IndexOutOfBoundsException("Index " + i + " must be in 0.." + this._size);
}
if (elements.length == 0) {
return false;
}
ensureCapacity(i2 + elements.length);
long[] jArr = this.content;
int i3 = this._size;
if (i != i3) {
ArraysKt___ArraysJvmKt.copyInto(jArr, jArr, elements.length + i, i, i3);
}
ArraysKt___ArraysJvmKt.copyInto$default(elements, jArr, i, 0, 0, 12, (Object) null);
this._size += elements.length;
return true;
}
public final boolean addAll(@IntRange(from = 0) int i, LongList elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
if (i < 0 || i > this._size) {
throw new IndexOutOfBoundsException("Index " + i + " must be in 0.." + this._size);
}
if (elements.isEmpty()) {
return false;
}
ensureCapacity(this._size + elements._size);
long[] jArr = this.content;
int i2 = this._size;
if (i != i2) {
ArraysKt___ArraysJvmKt.copyInto(jArr, jArr, elements._size + i, i, i2);
}
ArraysKt___ArraysJvmKt.copyInto(elements.content, jArr, i, 0, elements._size);
this._size += elements._size;
return true;
}
public final boolean addAll(LongList elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
return addAll(this._size, elements);
}
public final boolean addAll(long[] elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
return addAll(this._size, elements);
}
public final void plusAssign(LongList elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
addAll(this._size, elements);
}
public final void plusAssign(long[] elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
addAll(this._size, elements);
}
public static /* synthetic */ void trim$default(MutableLongList mutableLongList, int i, int i2, Object obj) {
if ((i2 & 1) != 0) {
i = mutableLongList._size;
}
mutableLongList.trim(i);
}
public final void trim(int i) {
int max = Math.max(i, this._size);
long[] jArr = this.content;
if (jArr.length > max) {
long[] copyOf = Arrays.copyOf(jArr, max);
Intrinsics.checkNotNullExpressionValue(copyOf, "copyOf(this, newSize)");
this.content = copyOf;
}
}
public final void ensureCapacity(int i) {
long[] jArr = this.content;
if (jArr.length < i) {
long[] copyOf = Arrays.copyOf(jArr, Math.max(i, (jArr.length * 3) / 2));
Intrinsics.checkNotNullExpressionValue(copyOf, "copyOf(this, newSize)");
this.content = copyOf;
}
}
public final void plusAssign(long j) {
add(j);
}
public final void minusAssign(long j) {
remove(j);
}
public final boolean remove(long j) {
int indexOf = indexOf(j);
if (indexOf < 0) {
return false;
}
removeAt(indexOf);
return true;
}
public final boolean removeAll(long[] elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
int i = this._size;
for (long j : elements) {
remove(j);
}
return i != this._size;
}
public final long removeAt(@IntRange(from = 0) int i) {
int i2;
if (i < 0 || i >= (i2 = this._size)) {
StringBuilder sb = new StringBuilder();
sb.append("Index ");
sb.append(i);
sb.append(" must be in 0..");
sb.append(this._size - 1);
throw new IndexOutOfBoundsException(sb.toString());
}
long[] jArr = this.content;
long j = jArr[i];
if (i != i2 - 1) {
ArraysKt___ArraysJvmKt.copyInto(jArr, jArr, i, i + 1, i2);
}
this._size--;
return j;
}
public final void removeRange(@IntRange(from = 0) int i, @IntRange(from = 0) int i2) {
int i3;
if (i < 0 || i > (i3 = this._size) || i2 < 0 || i2 > i3) {
throw new IndexOutOfBoundsException("Start (" + i + ") and end (" + i2 + ") must be in 0.." + this._size);
}
if (i2 >= i) {
if (i2 != i) {
if (i2 < i3) {
long[] jArr = this.content;
ArraysKt___ArraysJvmKt.copyInto(jArr, jArr, i, i2, i3);
}
this._size -= i2 - i;
return;
}
return;
}
throw new IllegalArgumentException("Start (" + i + ") is more than end (" + i2 + ')');
}
/* JADX WARN: Code restructure failed: missing block: B:11:0x0020, code lost:
removeAt(r2);
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final boolean retainAll(long[] r10) {
/*
r9 = this;
java.lang.String r0 = "elements"
kotlin.jvm.internal.Intrinsics.checkNotNullParameter(r10, r0)
int r0 = r9._size
long[] r1 = r9.content
int r2 = r0 + (-1)
Lb:
r3 = 0
r4 = -1
if (r4 >= r2) goto L26
r4 = r1[r2]
int r6 = r10.length
L12:
if (r3 >= r6) goto L20
r7 = r10[r3]
int r7 = (r7 > r4 ? 1 : (r7 == r4 ? 0 : -1))
if (r7 != 0) goto L1d
if (r3 >= 0) goto L23
goto L20
L1d:
int r3 = r3 + 1
goto L12
L20:
r9.removeAt(r2)
L23:
int r2 = r2 + (-1)
goto Lb
L26:
int r10 = r9._size
if (r0 == r10) goto L2b
r3 = 1
L2b:
return r3
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.collection.MutableLongList.retainAll(long[]):boolean");
}
public final boolean retainAll(LongList elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
int i = this._size;
long[] jArr = this.content;
for (int i2 = i - 1; -1 < i2; i2--) {
if (!elements.contains(jArr[i2])) {
removeAt(i2);
}
}
return i != this._size;
}
public final long set(@IntRange(from = 0) int i, long j) {
if (i < 0 || i >= this._size) {
StringBuilder sb = new StringBuilder();
sb.append("set index ");
sb.append(i);
sb.append(" must be between 0 .. ");
sb.append(this._size - 1);
throw new IndexOutOfBoundsException(sb.toString());
}
long[] jArr = this.content;
long j2 = jArr[i];
jArr[i] = j;
return j2;
}
public final void sort() {
ArraysKt___ArraysJvmKt.sort(this.content, 0, this._size);
}
public final void sortDescending() {
ArraysKt___ArraysKt.sortDescending(this.content, 0, this._size);
}
public final void minusAssign(long[] elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
for (long j : elements) {
remove(j);
}
}
}

View File

@@ -0,0 +1,417 @@
package androidx.collection;
import kotlin.ULong;
import kotlin.collections.ArraysKt___ArraysJvmKt;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
@SourceDebugExtension({"SMAP\nLongLongMap.kt\nKotlin\n*S Kotlin\n*F\n+ 1 LongLongMap.kt\nandroidx/collection/MutableLongLongMap\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n+ 3 ScatterMap.kt\nandroidx/collection/ScatterMapKt\n+ 4 LongLongMap.kt\nandroidx/collection/LongLongMap\n+ 5 LongSet.kt\nandroidx/collection/LongSet\n+ 6 LongList.kt\nandroidx/collection/LongList\n+ 7 LongSet.kt\nandroidx/collection/LongSetKt\n*L\n1#1,1047:1\n1037#1,2:1134\n1041#1,5:1142\n1037#1,2:1173\n1041#1,5:1181\n1037#1,2:1198\n1041#1,5:1206\n1037#1,2:1212\n1041#1,5:1220\n1#2:1048\n1672#3,6:1049\n1826#3:1065\n1688#3:1069\n1826#3:1087\n1688#3:1091\n1826#3:1112\n1688#3:1116\n1672#3,6:1136\n1672#3,6:1147\n1615#3:1156\n1619#3:1157\n1795#3,3:1158\n1809#3,3:1161\n1733#3:1164\n1721#3:1165\n1715#3:1166\n1728#3:1167\n1818#3:1168\n1682#3:1169\n1661#3:1170\n1680#3:1171\n1661#3:1172\n1672#3,6:1175\n1795#3,3:1186\n1826#3:1189\n1715#3:1190\n1685#3:1191\n1661#3:1192\n1615#3:1196\n1619#3:1197\n1672#3,6:1200\n1661#3:1211\n1672#3,6:1214\n1672#3,6:1225\n1672#3,6:1231\n385#4,4:1055\n357#4,6:1059\n367#4,3:1066\n370#4,2:1070\n389#4,2:1072\n373#4,6:1074\n391#4:1080\n357#4,6:1081\n367#4,3:1088\n370#4,9:1092\n262#5,4:1101\n232#5,7:1105\n243#5,3:1113\n246#5,2:1117\n266#5,2:1119\n249#5,6:1121\n268#5:1127\n253#6,6:1128\n849#7,3:1153\n849#7,3:1193\n*S KotlinDebug\n*F\n+ 1 LongLongMap.kt\nandroidx/collection/MutableLongLongMap\n*L\n875#1:1134,2\n875#1:1142,5\n933#1:1173,2\n933#1:1181,5\n1007#1:1198,2\n1007#1:1206,5\n1023#1:1212,2\n1023#1:1220,5\n711#1:1049,6\n789#1:1065\n789#1:1069\n828#1:1087\n828#1:1091\n855#1:1112\n855#1:1116\n875#1:1136,6\n885#1:1147,6\n899#1:1156\n900#1:1157\n907#1:1158,3\n908#1:1161,3\n909#1:1164\n910#1:1165\n910#1:1166\n914#1:1167\n917#1:1168\n926#1:1169\n926#1:1170\n932#1:1171\n932#1:1172\n933#1:1175,6\n948#1:1186,3\n949#1:1189\n951#1:1190\n1002#1:1191\n1002#1:1192\n1005#1:1196\n1007#1:1197\n1007#1:1200,6\n1021#1:1211\n1023#1:1214,6\n1038#1:1225,6\n1044#1:1231,6\n789#1:1055,4\n789#1:1059,6\n789#1:1066,3\n789#1:1070,2\n789#1:1072,2\n789#1:1074,6\n789#1:1080\n828#1:1081,6\n828#1:1088,3\n828#1:1092,9\n855#1:1101,4\n855#1:1105,7\n855#1:1113,3\n855#1:1117,2\n855#1:1119,2\n855#1:1121,6\n855#1:1127\n864#1:1128,6\n898#1:1153,3\n1004#1:1193,3\n*E\n"})
/* loaded from: classes.dex */
public final class MutableLongLongMap extends LongLongMap {
private int growthLimit;
public MutableLongLongMap() {
this(0, 1, null);
}
public final void minusAssign(LongList keys) {
Intrinsics.checkNotNullParameter(keys, "keys");
long[] jArr = keys.content;
int i = keys._size;
for (int i2 = 0; i2 < i; i2++) {
remove(jArr[i2]);
}
}
public final void minusAssign(LongSet keys) {
Intrinsics.checkNotNullParameter(keys, "keys");
long[] jArr = keys.elements;
long[] jArr2 = keys.metadata;
int length = jArr2.length - 2;
if (length < 0) {
return;
}
int i = 0;
while (true) {
long j = jArr2[i];
if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
int i2 = 8 - ((~(i - length)) >>> 31);
for (int i3 = 0; i3 < i2; i3++) {
if ((255 & j) < 128) {
remove(jArr[(i << 3) + i3]);
}
j >>= 8;
}
if (i2 != 8) {
return;
}
}
if (i == length) {
return;
} else {
i++;
}
}
}
public final void removeIf(Function2 predicate) {
Intrinsics.checkNotNullParameter(predicate, "predicate");
long[] jArr = this.metadata;
int length = jArr.length - 2;
if (length < 0) {
return;
}
int i = 0;
while (true) {
long j = jArr[i];
if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
int i2 = 8 - ((~(i - length)) >>> 31);
for (int i3 = 0; i3 < i2; i3++) {
if ((255 & j) < 128) {
int i4 = (i << 3) + i3;
if (((Boolean) predicate.invoke(Long.valueOf(this.keys[i4]), Long.valueOf(this.values[i4]))).booleanValue()) {
removeValueAt(i4);
}
}
j >>= 8;
}
if (i2 != 8) {
return;
}
}
if (i == length) {
return;
} else {
i++;
}
}
}
public final void putAll(LongLongMap from) {
Intrinsics.checkNotNullParameter(from, "from");
long[] jArr = from.keys;
long[] jArr2 = from.values;
long[] jArr3 = from.metadata;
int length = jArr3.length - 2;
if (length < 0) {
return;
}
int i = 0;
while (true) {
long j = jArr3[i];
if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
int i2 = 8 - ((~(i - length)) >>> 31);
for (int i3 = 0; i3 < i2; i3++) {
if ((255 & j) < 128) {
int i4 = (i << 3) + i3;
set(jArr[i4], jArr2[i4]);
}
j >>= 8;
}
if (i2 != 8) {
return;
}
}
if (i == length) {
return;
} else {
i++;
}
}
}
public /* synthetic */ MutableLongLongMap(int i, int i2, DefaultConstructorMarker defaultConstructorMarker) {
this((i2 & 1) != 0 ? 6 : i);
}
public MutableLongLongMap(int i) {
super(null);
if (i < 0) {
throw new IllegalArgumentException("Capacity must be a positive value.".toString());
}
initializeStorage(ScatterMapKt.unloadedCapacity(i));
}
private final void initializeStorage(int i) {
int max = i > 0 ? Math.max(7, ScatterMapKt.normalizeCapacity(i)) : 0;
this._capacity = max;
initializeMetadata(max);
this.keys = new long[max];
this.values = new long[max];
}
private final void initializeMetadata(int i) {
long[] jArr;
if (i == 0) {
jArr = ScatterMapKt.EmptyGroup;
} else {
jArr = new long[((i + 15) & (-8)) >> 3];
ArraysKt___ArraysJvmKt.fill$default(jArr, -9187201950435737472L, 0, 0, 6, (Object) null);
}
this.metadata = jArr;
int i2 = i >> 3;
long j = 255 << ((i & 7) << 3);
jArr[i2] = (jArr[i2] & (~j)) | j;
initializeGrowth();
}
private final void initializeGrowth() {
this.growthLimit = ScatterMapKt.loadedCapacity(getCapacity()) - this._size;
}
public final long getOrPut(long j, Function0 defaultValue) {
Intrinsics.checkNotNullParameter(defaultValue, "defaultValue");
int findKeyIndex = findKeyIndex(j);
if (findKeyIndex < 0) {
long longValue = ((Number) defaultValue.invoke()).longValue();
put(j, longValue);
return longValue;
}
return this.values[findKeyIndex];
}
public final void set(long j, long j2) {
int findInsertIndex = findInsertIndex(j);
if (findInsertIndex < 0) {
findInsertIndex = ~findInsertIndex;
}
this.keys[findInsertIndex] = j;
this.values[findInsertIndex] = j2;
}
public final void put(long j, long j2) {
set(j, j2);
}
public final long put(long j, long j2, long j3) {
int findInsertIndex = findInsertIndex(j);
if (findInsertIndex < 0) {
findInsertIndex = ~findInsertIndex;
} else {
j3 = this.values[findInsertIndex];
}
this.keys[findInsertIndex] = j;
this.values[findInsertIndex] = j2;
return j3;
}
public final void plusAssign(LongLongMap from) {
Intrinsics.checkNotNullParameter(from, "from");
putAll(from);
}
public final void remove(long j) {
int findKeyIndex = findKeyIndex(j);
if (findKeyIndex >= 0) {
removeValueAt(findKeyIndex);
}
}
public final boolean remove(long j, long j2) {
int findKeyIndex = findKeyIndex(j);
if (findKeyIndex < 0 || this.values[findKeyIndex] != j2) {
return false;
}
removeValueAt(findKeyIndex);
return true;
}
public final void minusAssign(long j) {
remove(j);
}
public final void minusAssign(long[] keys) {
Intrinsics.checkNotNullParameter(keys, "keys");
for (long j : keys) {
remove(j);
}
}
private final int findInsertIndex(long j) {
int hashCode = Long.hashCode(j) * ScatterMapKt.MurmurHashC1;
int i = hashCode ^ (hashCode << 16);
int i2 = i >>> 7;
int i3 = i & 127;
int i4 = this._capacity;
int i5 = i2 & i4;
int i6 = 0;
while (true) {
long[] jArr = this.metadata;
int i7 = i5 >> 3;
int i8 = (i5 & 7) << 3;
long j2 = ((jArr[i7 + 1] << (64 - i8)) & ((-i8) >> 63)) | (jArr[i7] >>> i8);
long j3 = i3;
int i9 = i6;
long j4 = j2 ^ (j3 * ScatterMapKt.BitmaskLsb);
for (long j5 = (~j4) & (j4 - ScatterMapKt.BitmaskLsb) & (-9187201950435737472L); j5 != 0; j5 &= j5 - 1) {
int numberOfTrailingZeros = ((Long.numberOfTrailingZeros(j5) >> 3) + i5) & i4;
if (this.keys[numberOfTrailingZeros] == j) {
return numberOfTrailingZeros;
}
}
if ((((~j2) << 6) & j2 & (-9187201950435737472L)) != 0) {
int findFirstAvailableSlot = findFirstAvailableSlot(i2);
if (this.growthLimit == 0 && ((this.metadata[findFirstAvailableSlot >> 3] >> ((findFirstAvailableSlot & 7) << 3)) & 255) != 254) {
adjustStorage();
findFirstAvailableSlot = findFirstAvailableSlot(i2);
}
this._size++;
int i10 = this.growthLimit;
long[] jArr2 = this.metadata;
int i11 = findFirstAvailableSlot >> 3;
long j6 = jArr2[i11];
int i12 = (findFirstAvailableSlot & 7) << 3;
this.growthLimit = i10 - (((j6 >> i12) & 255) == 128 ? 1 : 0);
jArr2[i11] = (j6 & (~(255 << i12))) | (j3 << i12);
int i13 = this._capacity;
int i14 = ((findFirstAvailableSlot - 7) & i13) + (i13 & 7);
int i15 = i14 >> 3;
int i16 = (i14 & 7) << 3;
jArr2[i15] = ((~(255 << i16)) & jArr2[i15]) | (j3 << i16);
return ~findFirstAvailableSlot;
}
i6 = i9 + 8;
i5 = (i5 + i6) & i4;
}
}
public final void clear() {
this._size = 0;
long[] jArr = this.metadata;
if (jArr != ScatterMapKt.EmptyGroup) {
ArraysKt___ArraysJvmKt.fill$default(jArr, -9187201950435737472L, 0, 0, 6, (Object) null);
long[] jArr2 = this.metadata;
int i = this._capacity;
int i2 = i >> 3;
long j = 255 << ((i & 7) << 3);
jArr2[i2] = (jArr2[i2] & (~j)) | j;
}
initializeGrowth();
}
public final int trim() {
int i = this._capacity;
int normalizeCapacity = ScatterMapKt.normalizeCapacity(ScatterMapKt.unloadedCapacity(this._size));
if (normalizeCapacity >= i) {
return 0;
}
resizeStorage(normalizeCapacity);
return i - this._capacity;
}
private final void adjustStorage() {
if (this._capacity > 8 && Long.compareUnsigned(ULong.m4068constructorimpl(ULong.m4068constructorimpl(this._size) * 32), ULong.m4068constructorimpl(ULong.m4068constructorimpl(this._capacity) * 25)) <= 0) {
removeDeletedMarkers();
} else {
resizeStorage(ScatterMapKt.nextCapacity(this._capacity));
}
}
private final void resizeStorage(int i) {
long[] jArr;
long[] jArr2;
long[] jArr3 = this.metadata;
long[] jArr4 = this.keys;
long[] jArr5 = this.values;
int i2 = this._capacity;
initializeStorage(i);
long[] jArr6 = this.keys;
long[] jArr7 = this.values;
int i3 = 0;
while (i3 < i2) {
if (((jArr3[i3 >> 3] >> ((i3 & 7) << 3)) & 255) < 128) {
long j = jArr4[i3];
int hashCode = Long.hashCode(j) * ScatterMapKt.MurmurHashC1;
int i4 = hashCode ^ (hashCode << 16);
int findFirstAvailableSlot = findFirstAvailableSlot(i4 >>> 7);
long j2 = i4 & 127;
long[] jArr8 = this.metadata;
int i5 = findFirstAvailableSlot >> 3;
int i6 = (findFirstAvailableSlot & 7) << 3;
jArr = jArr3;
jArr2 = jArr4;
jArr8[i5] = (jArr8[i5] & (~(255 << i6))) | (j2 << i6);
int i7 = this._capacity;
int i8 = ((findFirstAvailableSlot - 7) & i7) + (i7 & 7);
int i9 = i8 >> 3;
int i10 = (i8 & 7) << 3;
jArr8[i9] = (jArr8[i9] & (~(255 << i10))) | (j2 << i10);
jArr6[findFirstAvailableSlot] = j;
jArr7[findFirstAvailableSlot] = jArr5[i3];
} else {
jArr = jArr3;
jArr2 = jArr4;
}
i3++;
jArr3 = jArr;
jArr4 = jArr2;
}
}
private final void removeDeletedMarkers() {
long[] jArr = this.metadata;
int i = this._capacity;
int i2 = 0;
for (int i3 = 0; i3 < i; i3++) {
int i4 = i3 >> 3;
int i5 = (i3 & 7) << 3;
if (((jArr[i4] >> i5) & 255) == 254) {
long[] jArr2 = this.metadata;
jArr2[i4] = (128 << i5) | (jArr2[i4] & (~(255 << i5)));
int i6 = this._capacity;
int i7 = ((i3 - 7) & i6) + (i6 & 7);
int i8 = i7 >> 3;
int i9 = (i7 & 7) << 3;
jArr2[i8] = ((~(255 << i9)) & jArr2[i8]) | (128 << i9);
i2++;
}
}
this.growthLimit += i2;
}
private final void writeMetadata(int i, long j) {
long[] jArr = this.metadata;
int i2 = i >> 3;
int i3 = (i & 7) << 3;
jArr[i2] = (jArr[i2] & (~(255 << i3))) | (j << i3);
int i4 = this._capacity;
int i5 = ((i - 7) & i4) + (i4 & 7);
int i6 = i5 >> 3;
int i7 = (i5 & 7) << 3;
jArr[i6] = (j << i7) | (jArr[i6] & (~(255 << i7)));
}
public final void removeValueAt(int i) {
this._size--;
long[] jArr = this.metadata;
int i2 = i >> 3;
int i3 = (i & 7) << 3;
jArr[i2] = (jArr[i2] & (~(255 << i3))) | (254 << i3);
int i4 = this._capacity;
int i5 = ((i - 7) & i4) + (i4 & 7);
int i6 = i5 >> 3;
int i7 = (i5 & 7) << 3;
jArr[i6] = (jArr[i6] & (~(255 << i7))) | (254 << i7);
}
private final int findFirstAvailableSlot(int i) {
int i2 = this._capacity;
int i3 = i & i2;
int i4 = 0;
while (true) {
long[] jArr = this.metadata;
int i5 = i3 >> 3;
int i6 = (i3 & 7) << 3;
long j = ((jArr[i5 + 1] << (64 - i6)) & ((-i6) >> 63)) | (jArr[i5] >>> i6);
long j2 = j & ((~j) << 7) & (-9187201950435737472L);
if (j2 != 0) {
return (i3 + (Long.numberOfTrailingZeros(j2) >> 3)) & i2;
}
i4 += 8;
i3 = (i3 + i4) & i2;
}
}
}

View File

@@ -0,0 +1,594 @@
package androidx.collection;
import kotlin.ULong;
import kotlin.collections.ArraysKt___ArraysJvmKt;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
@SourceDebugExtension({"SMAP\nLongObjectMap.kt\nKotlin\n*S Kotlin\n*F\n+ 1 LongObjectMap.kt\nandroidx/collection/MutableLongObjectMap\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n+ 3 ScatterMap.kt\nandroidx/collection/ScatterMapKt\n+ 4 LongObjectMap.kt\nandroidx/collection/LongObjectMap\n+ 5 LongSet.kt\nandroidx/collection/LongSetKt\n+ 6 LongSet.kt\nandroidx/collection/LongSet\n+ 7 LongList.kt\nandroidx/collection/LongList\n*L\n1#1,1034:1\n820#1,2:1187\n820#1,2:1201\n1024#1,2:1204\n1028#1,5:1212\n1024#1,2:1243\n1028#1,5:1251\n1024#1,2:1268\n1028#1,5:1276\n1024#1,2:1282\n1028#1,5:1290\n1#2:1035\n1672#3,6:1036\n1826#3:1052\n1688#3:1056\n1619#3:1073\n1615#3:1076\n1795#3,3:1081\n1809#3,3:1085\n1733#3:1089\n1721#3:1091\n1715#3:1092\n1728#3:1097\n1818#3:1099\n1619#3:1113\n1615#3:1116\n1795#3,3:1121\n1809#3,3:1125\n1733#3:1129\n1721#3:1131\n1715#3:1132\n1728#3:1137\n1818#3:1139\n1826#3:1154\n1688#3:1158\n1826#3:1179\n1688#3:1183\n1672#3,6:1206\n1672#3,6:1217\n1615#3:1226\n1619#3:1227\n1795#3,3:1228\n1809#3,3:1231\n1733#3:1234\n1721#3:1235\n1715#3:1236\n1728#3:1237\n1818#3:1238\n1682#3:1239\n1661#3:1240\n1680#3:1241\n1661#3:1242\n1672#3,6:1245\n1795#3,3:1256\n1826#3:1259\n1715#3:1260\n1685#3:1261\n1661#3:1262\n1615#3:1266\n1619#3:1267\n1672#3,6:1270\n1661#3:1281\n1672#3,6:1284\n1672#3,6:1295\n1672#3,6:1301\n382#4,4:1042\n354#4,6:1046\n364#4,3:1053\n367#4,2:1057\n387#4,2:1059\n370#4,6:1061\n389#4:1067\n619#4:1068\n620#4:1072\n622#4,2:1074\n624#4,4:1077\n628#4:1084\n629#4:1088\n630#4:1090\n631#4,4:1093\n637#4:1098\n638#4,8:1100\n619#4:1108\n620#4:1112\n622#4,2:1114\n624#4,4:1117\n628#4:1124\n629#4:1128\n630#4:1130\n631#4,4:1133\n637#4:1138\n638#4,8:1140\n354#4,6:1148\n364#4,3:1155\n367#4,9:1159\n849#5,3:1069\n849#5,3:1109\n849#5,3:1223\n849#5,3:1263\n262#6,4:1168\n232#6,7:1172\n243#6,3:1180\n246#6,2:1184\n266#6:1186\n267#6:1189\n249#6,6:1190\n268#6:1196\n253#7,4:1197\n258#7:1203\n*S KotlinDebug\n*F\n+ 1 LongObjectMap.kt\nandroidx/collection/MutableLongObjectMap\n*L\n837#1:1187,2\n846#1:1201,2\n856#1:1204,2\n856#1:1212,5\n920#1:1243,2\n920#1:1251,5\n994#1:1268,2\n994#1:1276,5\n1010#1:1282,2\n1010#1:1290,5\n713#1:1036,6\n766#1:1052\n766#1:1056\n782#1:1073\n782#1:1076\n782#1:1081,3\n782#1:1085,3\n782#1:1089\n782#1:1091\n782#1:1092\n782#1:1097\n782#1:1099\n794#1:1113\n794#1:1116\n794#1:1121,3\n794#1:1125,3\n794#1:1129\n794#1:1131\n794#1:1132\n794#1:1137\n794#1:1139\n808#1:1154\n808#1:1158\n836#1:1179\n836#1:1183\n856#1:1206,6\n871#1:1217,6\n886#1:1226\n887#1:1227\n894#1:1228,3\n895#1:1231,3\n896#1:1234\n897#1:1235\n897#1:1236\n901#1:1237\n904#1:1238\n913#1:1239\n913#1:1240\n919#1:1241\n919#1:1242\n920#1:1245,6\n935#1:1256,3\n936#1:1259\n938#1:1260\n989#1:1261\n989#1:1262\n992#1:1266\n994#1:1267\n994#1:1270,6\n1008#1:1281\n1010#1:1284,6\n1025#1:1295,6\n1031#1:1301,6\n766#1:1042,4\n766#1:1046,6\n766#1:1053,3\n766#1:1057,2\n766#1:1059,2\n766#1:1061,6\n766#1:1067\n782#1:1068\n782#1:1072\n782#1:1074,2\n782#1:1077,4\n782#1:1084\n782#1:1088\n782#1:1090\n782#1:1093,4\n782#1:1098\n782#1:1100,8\n794#1:1108\n794#1:1112\n794#1:1114,2\n794#1:1117,4\n794#1:1124\n794#1:1128\n794#1:1130\n794#1:1133,4\n794#1:1138\n794#1:1140,8\n808#1:1148,6\n808#1:1155,3\n808#1:1159,9\n782#1:1069,3\n794#1:1109,3\n885#1:1223,3\n991#1:1263,3\n836#1:1168,4\n836#1:1172,7\n836#1:1180,3\n836#1:1184,2\n836#1:1186\n836#1:1189\n836#1:1190,6\n836#1:1196\n845#1:1197,4\n845#1:1203\n*E\n"})
/* loaded from: classes.dex */
public final class MutableLongObjectMap<V> extends LongObjectMap<V> {
private int growthLimit;
public MutableLongObjectMap() {
this(0, 1, null);
}
public final void minusAssign(LongList keys) {
Intrinsics.checkNotNullParameter(keys, "keys");
long[] jArr = keys.content;
int i = keys._size;
for (int i2 = 0; i2 < i; i2++) {
remove(jArr[i2]);
}
}
public final void minusAssign(LongSet keys) {
Intrinsics.checkNotNullParameter(keys, "keys");
long[] jArr = keys.elements;
long[] jArr2 = keys.metadata;
int length = jArr2.length - 2;
if (length < 0) {
return;
}
int i = 0;
while (true) {
long j = jArr2[i];
if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
int i2 = 8 - ((~(i - length)) >>> 31);
for (int i3 = 0; i3 < i2; i3++) {
if ((255 & j) < 128) {
remove(jArr[(i << 3) + i3]);
}
j >>= 8;
}
if (i2 != 8) {
return;
}
}
if (i == length) {
return;
} else {
i++;
}
}
}
public final void removeIf(Function2 predicate) {
Intrinsics.checkNotNullParameter(predicate, "predicate");
long[] jArr = this.metadata;
int length = jArr.length - 2;
if (length < 0) {
return;
}
int i = 0;
while (true) {
long j = jArr[i];
if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
int i2 = 8 - ((~(i - length)) >>> 31);
for (int i3 = 0; i3 < i2; i3++) {
if ((255 & j) < 128) {
int i4 = (i << 3) + i3;
if (((Boolean) predicate.invoke(Long.valueOf(this.keys[i4]), this.values[i4])).booleanValue()) {
removeValueAt(i4);
}
}
j >>= 8;
}
if (i2 != 8) {
return;
}
}
if (i == length) {
return;
} else {
i++;
}
}
}
/* JADX WARN: Multi-variable type inference failed */
public final void putAll(LongObjectMap<V> from) {
Intrinsics.checkNotNullParameter(from, "from");
long[] jArr = from.keys;
Object[] objArr = from.values;
long[] jArr2 = from.metadata;
int length = jArr2.length - 2;
if (length < 0) {
return;
}
int i = 0;
while (true) {
long j = jArr2[i];
if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
int i2 = 8 - ((~(i - length)) >>> 31);
for (int i3 = 0; i3 < i2; i3++) {
if ((255 & j) < 128) {
int i4 = (i << 3) + i3;
set(jArr[i4], objArr[i4]);
}
j >>= 8;
}
if (i2 != 8) {
return;
}
}
if (i == length) {
return;
} else {
i++;
}
}
}
public /* synthetic */ MutableLongObjectMap(int i, int i2, DefaultConstructorMarker defaultConstructorMarker) {
this((i2 & 1) != 0 ? 6 : i);
}
public MutableLongObjectMap(int i) {
super(null);
if (i < 0) {
throw new IllegalArgumentException("Capacity must be a positive value.".toString());
}
initializeStorage(ScatterMapKt.unloadedCapacity(i));
}
private final void initializeStorage(int i) {
int max = i > 0 ? Math.max(7, ScatterMapKt.normalizeCapacity(i)) : 0;
this._capacity = max;
initializeMetadata(max);
this.keys = new long[max];
this.values = new Object[max];
}
private final void initializeMetadata(int i) {
long[] jArr;
if (i == 0) {
jArr = ScatterMapKt.EmptyGroup;
} else {
jArr = new long[((i + 15) & (-8)) >> 3];
ArraysKt___ArraysJvmKt.fill$default(jArr, -9187201950435737472L, 0, 0, 6, (Object) null);
}
this.metadata = jArr;
int i2 = i >> 3;
long j = 255 << ((i & 7) << 3);
jArr[i2] = (jArr[i2] & (~j)) | j;
initializeGrowth();
}
private final void initializeGrowth() {
this.growthLimit = ScatterMapKt.loadedCapacity(getCapacity()) - this._size;
}
public final V getOrPut(long j, Function0 defaultValue) {
Intrinsics.checkNotNullParameter(defaultValue, "defaultValue");
V v = get(j);
if (v != null) {
return v;
}
V v2 = (V) defaultValue.invoke();
set(j, v2);
return v2;
}
public final void set(long j, V v) {
int findAbsoluteInsertIndex = findAbsoluteInsertIndex(j);
this.keys[findAbsoluteInsertIndex] = j;
this.values[findAbsoluteInsertIndex] = v;
}
public final V put(long j, V v) {
int findAbsoluteInsertIndex = findAbsoluteInsertIndex(j);
Object[] objArr = this.values;
V v2 = (V) objArr[findAbsoluteInsertIndex];
this.keys[findAbsoluteInsertIndex] = j;
objArr[findAbsoluteInsertIndex] = v;
return v2;
}
public final void plusAssign(LongObjectMap<V> from) {
Intrinsics.checkNotNullParameter(from, "from");
putAll(from);
}
public final void minusAssign(long j) {
remove(j);
}
public final void minusAssign(long[] keys) {
Intrinsics.checkNotNullParameter(keys, "keys");
for (long j : keys) {
remove(j);
}
}
private final int findAbsoluteInsertIndex(long j) {
int hashCode = Long.hashCode(j) * ScatterMapKt.MurmurHashC1;
int i = hashCode ^ (hashCode << 16);
int i2 = i >>> 7;
int i3 = i & 127;
int i4 = this._capacity;
int i5 = i2 & i4;
int i6 = 0;
while (true) {
long[] jArr = this.metadata;
int i7 = i5 >> 3;
int i8 = (i5 & 7) << 3;
long j2 = ((jArr[i7 + 1] << (64 - i8)) & ((-i8) >> 63)) | (jArr[i7] >>> i8);
long j3 = i3;
int i9 = i6;
long j4 = j2 ^ (j3 * ScatterMapKt.BitmaskLsb);
for (long j5 = (~j4) & (j4 - ScatterMapKt.BitmaskLsb) & (-9187201950435737472L); j5 != 0; j5 &= j5 - 1) {
int numberOfTrailingZeros = ((Long.numberOfTrailingZeros(j5) >> 3) + i5) & i4;
if (this.keys[numberOfTrailingZeros] == j) {
return numberOfTrailingZeros;
}
}
if ((((~j2) << 6) & j2 & (-9187201950435737472L)) != 0) {
int findFirstAvailableSlot = findFirstAvailableSlot(i2);
if (this.growthLimit == 0 && ((this.metadata[findFirstAvailableSlot >> 3] >> ((findFirstAvailableSlot & 7) << 3)) & 255) != 254) {
adjustStorage();
findFirstAvailableSlot = findFirstAvailableSlot(i2);
}
this._size++;
int i10 = this.growthLimit;
long[] jArr2 = this.metadata;
int i11 = findFirstAvailableSlot >> 3;
long j6 = jArr2[i11];
int i12 = (findFirstAvailableSlot & 7) << 3;
this.growthLimit = i10 - (((j6 >> i12) & 255) == 128 ? 1 : 0);
jArr2[i11] = (j6 & (~(255 << i12))) | (j3 << i12);
int i13 = this._capacity;
int i14 = ((findFirstAvailableSlot - 7) & i13) + (i13 & 7);
int i15 = i14 >> 3;
int i16 = (i14 & 7) << 3;
jArr2[i15] = ((~(255 << i16)) & jArr2[i15]) | (j3 << i16);
return findFirstAvailableSlot;
}
i6 = i9 + 8;
i5 = (i5 + i6) & i4;
}
}
/* JADX WARN: Code restructure failed: missing block: B:16:0x0064, code lost:
if (((r5 & ((~r5) << 6)) & (-9187201950435737472L)) == 0) goto L18;
*/
/* JADX WARN: Code restructure failed: missing block: B:19:0x0066, code lost:
r11 = -1;
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final V remove(long r16) {
/*
r15 = this;
r0 = r15
int r1 = java.lang.Long.hashCode(r16)
r2 = -862048943(0xffffffffcc9e2d51, float:-8.293031E7)
int r1 = r1 * r2
int r2 = r1 << 16
r1 = r1 ^ r2
r2 = r1 & 127(0x7f, float:1.78E-43)
int r3 = r0._capacity
int r1 = r1 >>> 7
r1 = r1 & r3
r4 = 0
L14:
long[] r5 = r0.metadata
int r6 = r1 >> 3
r7 = r1 & 7
int r7 = r7 << 3
r8 = r5[r6]
long r8 = r8 >>> r7
int r6 = r6 + 1
r10 = r5[r6]
int r5 = 64 - r7
long r5 = r10 << r5
long r10 = (long) r7
long r10 = -r10
r7 = 63
long r10 = r10 >> r7
long r5 = r5 & r10
long r5 = r5 | r8
long r7 = (long) r2
r9 = 72340172838076673(0x101010101010101, double:7.748604185489348E-304)
long r7 = r7 * r9
long r7 = r7 ^ r5
long r9 = r7 - r9
long r7 = ~r7
long r7 = r7 & r9
r9 = -9187201950435737472(0x8080808080808080, double:-2.937446524422997E-306)
long r7 = r7 & r9
L40:
r11 = 0
int r13 = (r7 > r11 ? 1 : (r7 == r11 ? 0 : -1))
if (r13 == 0) goto L5d
int r11 = java.lang.Long.numberOfTrailingZeros(r7)
int r11 = r11 >> 3
int r11 = r11 + r1
r11 = r11 & r3
long[] r12 = r0.keys
r13 = r12[r11]
int r12 = (r13 > r16 ? 1 : (r13 == r16 ? 0 : -1))
if (r12 != 0) goto L57
goto L67
L57:
r11 = 1
long r11 = r7 - r11
long r7 = r7 & r11
goto L40
L5d:
long r7 = ~r5
r13 = 6
long r7 = r7 << r13
long r5 = r5 & r7
long r5 = r5 & r9
int r5 = (r5 > r11 ? 1 : (r5 == r11 ? 0 : -1))
if (r5 == 0) goto L70
r11 = -1
L67:
if (r11 < 0) goto L6e
java.lang.Object r1 = r15.removeValueAt(r11)
return r1
L6e:
r1 = 0
return r1
L70:
int r4 = r4 + 8
int r1 = r1 + r4
r1 = r1 & r3
goto L14
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.collection.MutableLongObjectMap.remove(long):java.lang.Object");
}
/* JADX WARN: Code restructure failed: missing block: B:18:0x0066, code lost:
if (((r6 & ((~r6) << 6)) & (-9187201950435737472L)) == 0) goto L19;
*/
/* JADX WARN: Code restructure failed: missing block: B:21:0x0068, code lost:
r10 = -1;
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final boolean remove(long r18, V r20) {
/*
r17 = this;
r0 = r17
int r1 = java.lang.Long.hashCode(r18)
r2 = -862048943(0xffffffffcc9e2d51, float:-8.293031E7)
int r1 = r1 * r2
int r2 = r1 << 16
r1 = r1 ^ r2
r2 = r1 & 127(0x7f, float:1.78E-43)
int r3 = r0._capacity
int r1 = r1 >>> 7
r1 = r1 & r3
r4 = 0
r5 = r4
L16:
long[] r6 = r0.metadata
int r7 = r1 >> 3
r8 = r1 & 7
int r8 = r8 << 3
r9 = r6[r7]
long r9 = r9 >>> r8
r11 = 1
int r7 = r7 + r11
r12 = r6[r7]
int r6 = 64 - r8
long r6 = r12 << r6
long r12 = (long) r8
long r12 = -r12
r8 = 63
long r12 = r12 >> r8
long r6 = r6 & r12
long r6 = r6 | r9
long r8 = (long) r2
r12 = 72340172838076673(0x101010101010101, double:7.748604185489348E-304)
long r8 = r8 * r12
long r8 = r8 ^ r6
long r12 = r8 - r12
long r8 = ~r8
long r8 = r8 & r12
r12 = -9187201950435737472(0x8080808080808080, double:-2.937446524422997E-306)
long r8 = r8 & r12
L42:
r14 = 0
int r10 = (r8 > r14 ? 1 : (r8 == r14 ? 0 : -1))
if (r10 == 0) goto L5f
int r10 = java.lang.Long.numberOfTrailingZeros(r8)
int r10 = r10 >> 3
int r10 = r10 + r1
r10 = r10 & r3
long[] r14 = r0.keys
r15 = r14[r10]
int r14 = (r15 > r18 ? 1 : (r15 == r18 ? 0 : -1))
if (r14 != 0) goto L59
goto L69
L59:
r14 = 1
long r14 = r8 - r14
long r8 = r8 & r14
goto L42
L5f:
long r8 = ~r6
r10 = 6
long r8 = r8 << r10
long r6 = r6 & r8
long r6 = r6 & r12
int r6 = (r6 > r14 ? 1 : (r6 == r14 ? 0 : -1))
if (r6 == 0) goto L7c
r10 = -1
L69:
if (r10 < 0) goto L7b
java.lang.Object[] r1 = r0.values
r1 = r1[r10]
r6 = r20
boolean r1 = kotlin.jvm.internal.Intrinsics.areEqual(r1, r6)
if (r1 == 0) goto L7b
r0.removeValueAt(r10)
return r11
L7b:
return r4
L7c:
r6 = r20
int r5 = r5 + 8
int r1 = r1 + r5
r1 = r1 & r3
goto L16
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.collection.MutableLongObjectMap.remove(long, java.lang.Object):boolean");
}
public final void clear() {
this._size = 0;
long[] jArr = this.metadata;
if (jArr != ScatterMapKt.EmptyGroup) {
ArraysKt___ArraysJvmKt.fill$default(jArr, -9187201950435737472L, 0, 0, 6, (Object) null);
long[] jArr2 = this.metadata;
int i = this._capacity;
int i2 = i >> 3;
long j = 255 << ((i & 7) << 3);
jArr2[i2] = (jArr2[i2] & (~j)) | j;
}
ArraysKt___ArraysJvmKt.fill(this.values, (Object) null, 0, this._capacity);
initializeGrowth();
}
public final int trim() {
int i = this._capacity;
int normalizeCapacity = ScatterMapKt.normalizeCapacity(ScatterMapKt.unloadedCapacity(this._size));
if (normalizeCapacity >= i) {
return 0;
}
resizeStorage(normalizeCapacity);
return i - this._capacity;
}
private final void adjustStorage() {
if (this._capacity > 8 && Long.compareUnsigned(ULong.m4068constructorimpl(ULong.m4068constructorimpl(this._size) * 32), ULong.m4068constructorimpl(ULong.m4068constructorimpl(this._capacity) * 25)) <= 0) {
removeDeletedMarkers();
} else {
resizeStorage(ScatterMapKt.nextCapacity(this._capacity));
}
}
private final void resizeStorage(int i) {
long[] jArr;
long[] jArr2;
long[] jArr3 = this.metadata;
long[] jArr4 = this.keys;
Object[] objArr = this.values;
int i2 = this._capacity;
initializeStorage(i);
long[] jArr5 = this.keys;
Object[] objArr2 = this.values;
int i3 = 0;
while (i3 < i2) {
if (((jArr3[i3 >> 3] >> ((i3 & 7) << 3)) & 255) < 128) {
long j = jArr4[i3];
int hashCode = Long.hashCode(j) * ScatterMapKt.MurmurHashC1;
int i4 = hashCode ^ (hashCode << 16);
int findFirstAvailableSlot = findFirstAvailableSlot(i4 >>> 7);
long j2 = i4 & 127;
long[] jArr6 = this.metadata;
int i5 = findFirstAvailableSlot >> 3;
int i6 = (findFirstAvailableSlot & 7) << 3;
jArr = jArr3;
jArr2 = jArr4;
jArr6[i5] = (jArr6[i5] & (~(255 << i6))) | (j2 << i6);
int i7 = this._capacity;
int i8 = ((findFirstAvailableSlot - 7) & i7) + (i7 & 7);
int i9 = i8 >> 3;
int i10 = (i8 & 7) << 3;
jArr6[i9] = (jArr6[i9] & (~(255 << i10))) | (j2 << i10);
jArr5[findFirstAvailableSlot] = j;
objArr2[findFirstAvailableSlot] = objArr[i3];
} else {
jArr = jArr3;
jArr2 = jArr4;
}
i3++;
jArr3 = jArr;
jArr4 = jArr2;
}
}
private final void removeDeletedMarkers() {
long[] jArr = this.metadata;
int i = this._capacity;
int i2 = 0;
for (int i3 = 0; i3 < i; i3++) {
int i4 = i3 >> 3;
int i5 = (i3 & 7) << 3;
if (((jArr[i4] >> i5) & 255) == 254) {
long[] jArr2 = this.metadata;
jArr2[i4] = (128 << i5) | (jArr2[i4] & (~(255 << i5)));
int i6 = this._capacity;
int i7 = ((i3 - 7) & i6) + (i6 & 7);
int i8 = i7 >> 3;
int i9 = (i7 & 7) << 3;
jArr2[i8] = ((~(255 << i9)) & jArr2[i8]) | (128 << i9);
i2++;
}
}
this.growthLimit += i2;
}
private final void writeMetadata(int i, long j) {
long[] jArr = this.metadata;
int i2 = i >> 3;
int i3 = (i & 7) << 3;
jArr[i2] = (jArr[i2] & (~(255 << i3))) | (j << i3);
int i4 = this._capacity;
int i5 = ((i - 7) & i4) + (i4 & 7);
int i6 = i5 >> 3;
int i7 = (i5 & 7) << 3;
jArr[i6] = (j << i7) | (jArr[i6] & (~(255 << i7)));
}
public final V removeValueAt(int i) {
this._size--;
long[] jArr = this.metadata;
int i2 = i >> 3;
int i3 = (i & 7) << 3;
jArr[i2] = (jArr[i2] & (~(255 << i3))) | (254 << i3);
int i4 = this._capacity;
int i5 = ((i - 7) & i4) + (i4 & 7);
int i6 = i5 >> 3;
int i7 = (i5 & 7) << 3;
jArr[i6] = (jArr[i6] & (~(255 << i7))) | (254 << i7);
Object[] objArr = this.values;
V v = (V) objArr[i];
objArr[i] = null;
return v;
}
private final int findFirstAvailableSlot(int i) {
int i2 = this._capacity;
int i3 = i & i2;
int i4 = 0;
while (true) {
long[] jArr = this.metadata;
int i5 = i3 >> 3;
int i6 = (i3 & 7) << 3;
long j = ((jArr[i5 + 1] << (64 - i6)) & ((-i6) >> 63)) | (jArr[i5] >>> i6);
long j2 = j & ((~j) << 7) & (-9187201950435737472L);
if (j2 != 0) {
return (i3 + (Long.numberOfTrailingZeros(j2) >> 3)) & i2;
}
i4 += 8;
i3 = (i3 + i4) & i2;
}
}
}

View File

@@ -0,0 +1,544 @@
package androidx.collection;
import androidx.annotation.IntRange;
import kotlin.ULong;
import kotlin.collections.ArraysKt___ArraysJvmKt;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
@SourceDebugExtension({"SMAP\nLongSet.kt\nKotlin\n*S Kotlin\n*F\n+ 1 LongSet.kt\nandroidx/collection/MutableLongSet\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n+ 3 ScatterMap.kt\nandroidx/collection/ScatterMapKt\n+ 4 _Arrays.kt\nkotlin/collections/ArraysKt___ArraysKt\n+ 5 LongSet.kt\nandroidx/collection/LongSet\n+ 6 LongSet.kt\nandroidx/collection/LongSetKt\n*L\n1#1,853:1\n832#1,2:997\n836#1,5:1005\n832#1,2:1036\n836#1,5:1044\n832#1,2:1061\n836#1,5:1069\n832#1,2:1075\n836#1,5:1083\n1#2:854\n1672#3,6:855\n1826#3:874\n1688#3:878\n1619#3:895\n1615#3:898\n1795#3,3:902\n1809#3,3:906\n1733#3:910\n1721#3:912\n1715#3:913\n1728#3:918\n1818#3:920\n1619#3:934\n1615#3:937\n1795#3,3:941\n1809#3,3:945\n1733#3:949\n1721#3:951\n1715#3:952\n1728#3:957\n1818#3:959\n1826#3:981\n1688#3:985\n1672#3,6:999\n1672#3,6:1010\n1615#3:1019\n1619#3:1020\n1795#3,3:1021\n1809#3,3:1024\n1733#3:1027\n1721#3:1028\n1715#3:1029\n1728#3:1030\n1818#3:1031\n1682#3:1032\n1661#3:1033\n1680#3:1034\n1661#3:1035\n1672#3,6:1038\n1795#3,3:1049\n1826#3:1052\n1715#3:1053\n1685#3:1054\n1661#3:1055\n1615#3:1059\n1619#3:1060\n1672#3,6:1063\n1661#3:1074\n1672#3,6:1077\n1672#3,6:1088\n1672#3,6:1094\n13607#4,2:861\n13607#4,2:968\n262#5,4:863\n232#5,7:867\n243#5,3:875\n246#5,2:879\n266#5,2:881\n249#5,6:883\n268#5:889\n442#5:890\n443#5:894\n445#5,2:896\n447#5,3:899\n450#5:905\n451#5:909\n452#5:911\n453#5,4:914\n459#5:919\n460#5,8:921\n442#5:929\n443#5:933\n445#5,2:935\n447#5,3:938\n450#5:944\n451#5:948\n452#5:950\n453#5,4:953\n459#5:958\n460#5,8:960\n262#5,4:970\n232#5,7:974\n243#5,3:982\n246#5,2:986\n266#5,2:988\n249#5,6:990\n268#5:996\n849#6,3:891\n849#6,3:930\n849#6,3:1016\n849#6,3:1056\n*S KotlinDebug\n*F\n+ 1 LongSet.kt\nandroidx/collection/MutableLongSet\n*L\n673#1:997,2\n673#1:1005,5\n731#1:1036,2\n731#1:1044,5\n803#1:1061,2\n803#1:1069,5\n818#1:1075,2\n818#1:1083,5\n526#1:855,6\n595#1:874\n595#1:878\n607#1:895\n607#1:898\n607#1:902,3\n607#1:906,3\n607#1:910\n607#1:912\n607#1:913\n607#1:918\n607#1:920\n620#1:934\n620#1:937\n620#1:941,3\n620#1:945,3\n620#1:949\n620#1:951\n620#1:952\n620#1:957\n620#1:959\n663#1:981\n663#1:985\n673#1:999,6\n683#1:1010,6\n697#1:1019\n698#1:1020\n705#1:1021,3\n706#1:1024,3\n707#1:1027\n708#1:1028\n708#1:1029\n712#1:1030\n715#1:1031\n724#1:1032\n724#1:1033\n730#1:1034\n730#1:1035\n731#1:1038,6\n745#1:1049,3\n746#1:1052\n748#1:1053\n798#1:1054\n798#1:1055\n801#1:1059\n803#1:1060\n803#1:1063,6\n816#1:1074\n818#1:1077,6\n833#1:1088,6\n839#1:1094,6\n573#1:861,2\n642#1:968,2\n595#1:863,4\n595#1:867,7\n595#1:875,3\n595#1:879,2\n595#1:881,2\n595#1:883,6\n595#1:889\n607#1:890\n607#1:894\n607#1:896,2\n607#1:899,3\n607#1:905\n607#1:909\n607#1:911\n607#1:914,4\n607#1:919\n607#1:921,8\n620#1:929\n620#1:933\n620#1:935,2\n620#1:938,3\n620#1:944\n620#1:948\n620#1:950\n620#1:953,4\n620#1:958\n620#1:960,8\n663#1:970,4\n663#1:974,7\n663#1:982,3\n663#1:986,2\n663#1:988,2\n663#1:990,6\n663#1:996\n607#1:891,3\n620#1:930,3\n696#1:1016,3\n800#1:1056,3\n*E\n"})
/* loaded from: classes.dex */
public final class MutableLongSet extends LongSet {
private int growthLimit;
public MutableLongSet() {
this(0, 1, null);
}
public final void minusAssign(LongSet elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
long[] jArr = elements.elements;
long[] jArr2 = elements.metadata;
int length = jArr2.length - 2;
if (length < 0) {
return;
}
int i = 0;
while (true) {
long j = jArr2[i];
if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
int i2 = 8 - ((~(i - length)) >>> 31);
for (int i3 = 0; i3 < i2; i3++) {
if ((255 & j) < 128) {
minusAssign(jArr[(i << 3) + i3]);
}
j >>= 8;
}
if (i2 != 8) {
return;
}
}
if (i == length) {
return;
} else {
i++;
}
}
}
public final void plusAssign(LongSet elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
long[] jArr = elements.elements;
long[] jArr2 = elements.metadata;
int length = jArr2.length - 2;
if (length < 0) {
return;
}
int i = 0;
while (true) {
long j = jArr2[i];
if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
int i2 = 8 - ((~(i - length)) >>> 31);
for (int i3 = 0; i3 < i2; i3++) {
if ((255 & j) < 128) {
plusAssign(jArr[(i << 3) + i3]);
}
j >>= 8;
}
if (i2 != 8) {
return;
}
}
if (i == length) {
return;
} else {
i++;
}
}
}
public /* synthetic */ MutableLongSet(int i, int i2, DefaultConstructorMarker defaultConstructorMarker) {
this((i2 & 1) != 0 ? 6 : i);
}
public MutableLongSet(int i) {
super(null);
if (i < 0) {
throw new IllegalArgumentException("Capacity must be a positive value.".toString());
}
initializeStorage(ScatterMapKt.unloadedCapacity(i));
}
private final void initializeStorage(int i) {
int max = i > 0 ? Math.max(7, ScatterMapKt.normalizeCapacity(i)) : 0;
this._capacity = max;
initializeMetadata(max);
this.elements = new long[max];
}
private final void initializeMetadata(int i) {
long[] jArr;
if (i == 0) {
jArr = ScatterMapKt.EmptyGroup;
} else {
jArr = new long[((i + 15) & (-8)) >> 3];
ArraysKt___ArraysJvmKt.fill$default(jArr, -9187201950435737472L, 0, 0, 6, (Object) null);
}
this.metadata = jArr;
int i2 = i >> 3;
long j = 255 << ((i & 7) << 3);
jArr[i2] = (jArr[i2] & (~j)) | j;
initializeGrowth();
}
private final void initializeGrowth() {
this.growthLimit = ScatterMapKt.loadedCapacity(getCapacity()) - this._size;
}
public final boolean add(long j) {
int i = this._size;
this.elements[findAbsoluteInsertIndex(j)] = j;
return this._size != i;
}
public final void plusAssign(long j) {
this.elements[findAbsoluteInsertIndex(j)] = j;
}
public final boolean addAll(long[] elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
int i = this._size;
plusAssign(elements);
return i != this._size;
}
public final boolean addAll(LongSet elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
int i = this._size;
plusAssign(elements);
return i != this._size;
}
public final boolean removeAll(long[] elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
int i = this._size;
minusAssign(elements);
return i != this._size;
}
public final boolean removeAll(LongSet elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
int i = this._size;
minusAssign(elements);
return i != this._size;
}
public final void clear() {
this._size = 0;
long[] jArr = this.metadata;
if (jArr != ScatterMapKt.EmptyGroup) {
ArraysKt___ArraysJvmKt.fill$default(jArr, -9187201950435737472L, 0, 0, 6, (Object) null);
long[] jArr2 = this.metadata;
int i = this._capacity;
int i2 = i >> 3;
long j = 255 << ((i & 7) << 3);
jArr2[i2] = (jArr2[i2] & (~j)) | j;
}
initializeGrowth();
}
@IntRange(from = 0)
public final int trim() {
int i = this._capacity;
int normalizeCapacity = ScatterMapKt.normalizeCapacity(ScatterMapKt.unloadedCapacity(this._size));
if (normalizeCapacity >= i) {
return 0;
}
resizeStorage(normalizeCapacity);
return i - this._capacity;
}
private final void adjustStorage() {
if (this._capacity > 8 && Long.compareUnsigned(ULong.m4068constructorimpl(ULong.m4068constructorimpl(this._size) * 32), ULong.m4068constructorimpl(ULong.m4068constructorimpl(this._capacity) * 25)) <= 0) {
removeDeletedMarkers();
} else {
resizeStorage(ScatterMapKt.nextCapacity(this._capacity));
}
}
private final void resizeStorage(int i) {
long[] jArr;
long[] jArr2;
long[] jArr3 = this.metadata;
long[] jArr4 = this.elements;
int i2 = this._capacity;
initializeStorage(i);
long[] jArr5 = this.elements;
int i3 = 0;
while (i3 < i2) {
if (((jArr3[i3 >> 3] >> ((i3 & 7) << 3)) & 255) < 128) {
long j = jArr4[i3];
int hashCode = Long.hashCode(j) * ScatterMapKt.MurmurHashC1;
int i4 = hashCode ^ (hashCode << 16);
int findFirstAvailableSlot = findFirstAvailableSlot(i4 >>> 7);
long j2 = i4 & 127;
long[] jArr6 = this.metadata;
int i5 = findFirstAvailableSlot >> 3;
int i6 = (findFirstAvailableSlot & 7) << 3;
jArr = jArr3;
jArr2 = jArr4;
jArr6[i5] = (jArr6[i5] & (~(255 << i6))) | (j2 << i6);
int i7 = this._capacity;
int i8 = ((findFirstAvailableSlot - 7) & i7) + (i7 & 7);
int i9 = i8 >> 3;
int i10 = (i8 & 7) << 3;
jArr6[i9] = ((~(255 << i10)) & jArr6[i9]) | (j2 << i10);
jArr5[findFirstAvailableSlot] = j;
} else {
jArr = jArr3;
jArr2 = jArr4;
}
i3++;
jArr3 = jArr;
jArr4 = jArr2;
}
}
private final int findAbsoluteInsertIndex(long j) {
int hashCode = Long.hashCode(j) * ScatterMapKt.MurmurHashC1;
int i = hashCode ^ (hashCode << 16);
int i2 = i >>> 7;
int i3 = i & 127;
int i4 = this._capacity;
int i5 = i2 & i4;
int i6 = 0;
while (true) {
long[] jArr = this.metadata;
int i7 = i5 >> 3;
int i8 = (i5 & 7) << 3;
long j2 = ((jArr[i7 + 1] << (64 - i8)) & ((-i8) >> 63)) | (jArr[i7] >>> i8);
long j3 = i3;
int i9 = i6;
long j4 = j2 ^ (j3 * ScatterMapKt.BitmaskLsb);
for (long j5 = (~j4) & (j4 - ScatterMapKt.BitmaskLsb) & (-9187201950435737472L); j5 != 0; j5 &= j5 - 1) {
int numberOfTrailingZeros = ((Long.numberOfTrailingZeros(j5) >> 3) + i5) & i4;
if (this.elements[numberOfTrailingZeros] == j) {
return numberOfTrailingZeros;
}
}
if ((((~j2) << 6) & j2 & (-9187201950435737472L)) != 0) {
int findFirstAvailableSlot = findFirstAvailableSlot(i2);
if (this.growthLimit == 0 && ((this.metadata[findFirstAvailableSlot >> 3] >> ((findFirstAvailableSlot & 7) << 3)) & 255) != 254) {
adjustStorage();
findFirstAvailableSlot = findFirstAvailableSlot(i2);
}
this._size++;
int i10 = this.growthLimit;
long[] jArr2 = this.metadata;
int i11 = findFirstAvailableSlot >> 3;
long j6 = jArr2[i11];
int i12 = (findFirstAvailableSlot & 7) << 3;
this.growthLimit = i10 - (((j6 >> i12) & 255) == 128 ? 1 : 0);
jArr2[i11] = (j6 & (~(255 << i12))) | (j3 << i12);
int i13 = this._capacity;
int i14 = ((findFirstAvailableSlot - 7) & i13) + (i13 & 7);
int i15 = i14 >> 3;
int i16 = (i14 & 7) << 3;
jArr2[i15] = ((~(255 << i16)) & jArr2[i15]) | (j3 << i16);
return findFirstAvailableSlot;
}
i6 = i9 + 8;
i5 = (i5 + i6) & i4;
}
}
/* JADX WARN: Code restructure failed: missing block: B:16:0x0064, code lost:
if (((r5 & ((~r5) << 6)) & (-9187201950435737472L)) == 0) goto L16;
*/
/* JADX WARN: Code restructure failed: missing block: B:19:0x0066, code lost:
r11 = -1;
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final void minusAssign(long r16) {
/*
r15 = this;
r0 = r15
int r1 = java.lang.Long.hashCode(r16)
r2 = -862048943(0xffffffffcc9e2d51, float:-8.293031E7)
int r1 = r1 * r2
int r2 = r1 << 16
r1 = r1 ^ r2
r2 = r1 & 127(0x7f, float:1.78E-43)
int r3 = r0._capacity
int r1 = r1 >>> 7
r1 = r1 & r3
r4 = 0
L14:
long[] r5 = r0.metadata
int r6 = r1 >> 3
r7 = r1 & 7
int r7 = r7 << 3
r8 = r5[r6]
long r8 = r8 >>> r7
int r6 = r6 + 1
r10 = r5[r6]
int r5 = 64 - r7
long r5 = r10 << r5
long r10 = (long) r7
long r10 = -r10
r7 = 63
long r10 = r10 >> r7
long r5 = r5 & r10
long r5 = r5 | r8
long r7 = (long) r2
r9 = 72340172838076673(0x101010101010101, double:7.748604185489348E-304)
long r7 = r7 * r9
long r7 = r7 ^ r5
long r9 = r7 - r9
long r7 = ~r7
long r7 = r7 & r9
r9 = -9187201950435737472(0x8080808080808080, double:-2.937446524422997E-306)
long r7 = r7 & r9
L40:
r11 = 0
int r13 = (r7 > r11 ? 1 : (r7 == r11 ? 0 : -1))
if (r13 == 0) goto L5d
int r11 = java.lang.Long.numberOfTrailingZeros(r7)
int r11 = r11 >> 3
int r11 = r11 + r1
r11 = r11 & r3
long[] r12 = r0.elements
r13 = r12[r11]
int r12 = (r13 > r16 ? 1 : (r13 == r16 ? 0 : -1))
if (r12 != 0) goto L57
goto L67
L57:
r11 = 1
long r11 = r7 - r11
long r7 = r7 & r11
goto L40
L5d:
long r7 = ~r5
r13 = 6
long r7 = r7 << r13
long r5 = r5 & r7
long r5 = r5 & r9
int r5 = (r5 > r11 ? 1 : (r5 == r11 ? 0 : -1))
if (r5 == 0) goto L6d
r11 = -1
L67:
if (r11 < 0) goto L6c
r15.removeElementAt(r11)
L6c:
return
L6d:
int r4 = r4 + 8
int r1 = r1 + r4
r1 = r1 & r3
goto L14
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.collection.MutableLongSet.minusAssign(long):void");
}
/* JADX WARN: Code restructure failed: missing block: B:17:0x0066, code lost:
if (((r6 & ((~r6) << 6)) & (-9187201950435737472L)) == 0) goto L18;
*/
/* JADX WARN: Code restructure failed: missing block: B:20:0x0068, code lost:
r10 = -1;
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final boolean remove(long r18) {
/*
r17 = this;
r0 = r17
int r1 = java.lang.Long.hashCode(r18)
r2 = -862048943(0xffffffffcc9e2d51, float:-8.293031E7)
int r1 = r1 * r2
int r2 = r1 << 16
r1 = r1 ^ r2
r2 = r1 & 127(0x7f, float:1.78E-43)
int r3 = r0._capacity
int r1 = r1 >>> 7
r1 = r1 & r3
r4 = 0
r5 = r4
L16:
long[] r6 = r0.metadata
int r7 = r1 >> 3
r8 = r1 & 7
int r8 = r8 << 3
r9 = r6[r7]
long r9 = r9 >>> r8
r11 = 1
int r7 = r7 + r11
r12 = r6[r7]
int r6 = 64 - r8
long r6 = r12 << r6
long r12 = (long) r8
long r12 = -r12
r8 = 63
long r12 = r12 >> r8
long r6 = r6 & r12
long r6 = r6 | r9
long r8 = (long) r2
r12 = 72340172838076673(0x101010101010101, double:7.748604185489348E-304)
long r8 = r8 * r12
long r8 = r8 ^ r6
long r12 = r8 - r12
long r8 = ~r8
long r8 = r8 & r12
r12 = -9187201950435737472(0x8080808080808080, double:-2.937446524422997E-306)
long r8 = r8 & r12
L42:
r14 = 0
int r10 = (r8 > r14 ? 1 : (r8 == r14 ? 0 : -1))
if (r10 == 0) goto L5f
int r10 = java.lang.Long.numberOfTrailingZeros(r8)
int r10 = r10 >> 3
int r10 = r10 + r1
r10 = r10 & r3
long[] r14 = r0.elements
r15 = r14[r10]
int r14 = (r15 > r18 ? 1 : (r15 == r18 ? 0 : -1))
if (r14 != 0) goto L59
goto L69
L59:
r14 = 1
long r14 = r8 - r14
long r8 = r8 & r14
goto L42
L5f:
long r8 = ~r6
r10 = 6
long r8 = r8 << r10
long r6 = r6 & r8
long r6 = r6 & r12
int r6 = (r6 > r14 ? 1 : (r6 == r14 ? 0 : -1))
if (r6 == 0) goto L72
r10 = -1
L69:
if (r10 < 0) goto L6c
r4 = r11
L6c:
if (r4 == 0) goto L71
r0.removeElementAt(r10)
L71:
return r4
L72:
int r5 = r5 + 8
int r1 = r1 + r5
r1 = r1 & r3
goto L16
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.collection.MutableLongSet.remove(long):boolean");
}
public final void plusAssign(long[] elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
for (long j : elements) {
plusAssign(j);
}
}
public final void minusAssign(long[] elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
for (long j : elements) {
minusAssign(j);
}
}
private final void removeDeletedMarkers() {
long[] jArr = this.metadata;
int i = this._capacity;
int i2 = 0;
for (int i3 = 0; i3 < i; i3++) {
int i4 = i3 >> 3;
int i5 = (i3 & 7) << 3;
if (((jArr[i4] >> i5) & 255) == 254) {
long[] jArr2 = this.metadata;
jArr2[i4] = (128 << i5) | (jArr2[i4] & (~(255 << i5)));
int i6 = this._capacity;
int i7 = ((i3 - 7) & i6) + (i6 & 7);
int i8 = i7 >> 3;
int i9 = (i7 & 7) << 3;
jArr2[i8] = ((~(255 << i9)) & jArr2[i8]) | (128 << i9);
i2++;
}
}
this.growthLimit += i2;
}
private final void removeElementAt(int i) {
this._size--;
long[] jArr = this.metadata;
int i2 = i >> 3;
int i3 = (i & 7) << 3;
jArr[i2] = (jArr[i2] & (~(255 << i3))) | (254 << i3);
int i4 = this._capacity;
int i5 = ((i - 7) & i4) + (i4 & 7);
int i6 = i5 >> 3;
int i7 = (i5 & 7) << 3;
jArr[i6] = (jArr[i6] & (~(255 << i7))) | (254 << i7);
}
private final void writeMetadata(int i, long j) {
long[] jArr = this.metadata;
int i2 = i >> 3;
int i3 = (i & 7) << 3;
jArr[i2] = (jArr[i2] & (~(255 << i3))) | (j << i3);
int i4 = this._capacity;
int i5 = ((i - 7) & i4) + (i4 & 7);
int i6 = i5 >> 3;
int i7 = (i5 & 7) << 3;
jArr[i6] = (j << i7) | (jArr[i6] & (~(255 << i7)));
}
private final int findFirstAvailableSlot(int i) {
int i2 = this._capacity;
int i3 = i & i2;
int i4 = 0;
while (true) {
long[] jArr = this.metadata;
int i5 = i3 >> 3;
int i6 = (i3 & 7) << 3;
long j = ((jArr[i5 + 1] << (64 - i6)) & ((-i6) >> 63)) | (jArr[i5] >>> i6);
long j2 = j & ((~j) << 7) & (-9187201950435737472L);
if (j2 != 0) {
return (i3 + (Long.numberOfTrailingZeros(j2) >> 3)) & i2;
}
i4 += 8;
i3 = (i3 + i4) & i2;
}
}
}

View File

@@ -0,0 +1,57 @@
package androidx.collection;
import java.util.Map;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.markers.KMutableMap;
/* loaded from: classes.dex */
final class MutableMapEntry<K, V> implements Map.Entry<K, V>, KMutableMap.Entry {
private final int index;
private final Object[] keys;
private final Object[] values;
public static /* synthetic */ void getKey$annotations() {
}
public static /* synthetic */ void getValue$annotations() {
}
public final int getIndex() {
return this.index;
}
public final Object[] getKeys() {
return this.keys;
}
public final Object[] getValues() {
return this.values;
}
public MutableMapEntry(Object[] keys, Object[] values, int i) {
Intrinsics.checkNotNullParameter(keys, "keys");
Intrinsics.checkNotNullParameter(values, "values");
this.keys = keys;
this.values = values;
this.index = i;
}
@Override // java.util.Map.Entry
public V setValue(V v) {
Object[] objArr = this.values;
int i = this.index;
V v2 = (V) objArr[i];
objArr[i] = v;
return v2;
}
@Override // java.util.Map.Entry
public K getKey() {
return (K) this.keys[this.index];
}
@Override // java.util.Map.Entry
public V getValue() {
return (V) this.values[this.index];
}
}

View File

@@ -0,0 +1,427 @@
package androidx.collection;
import java.util.Iterator;
import kotlin.ULong;
import kotlin.collections.ArraysKt___ArraysJvmKt;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlin.sequences.Sequence;
@SourceDebugExtension({"SMAP\nObjectFloatMap.kt\nKotlin\n*S Kotlin\n*F\n+ 1 ObjectFloatMap.kt\nandroidx/collection/MutableObjectFloatMap\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n+ 3 ScatterMap.kt\nandroidx/collection/ScatterMapKt\n+ 4 ObjectFloatMap.kt\nandroidx/collection/ObjectFloatMap\n+ 5 ScatterSet.kt\nandroidx/collection/ScatterSet\n*L\n1#1,1074:1\n1064#1,2:1155\n1068#1,5:1163\n1064#1,2:1194\n1068#1,5:1202\n1064#1,2:1219\n1068#1,5:1227\n1064#1,2:1233\n1068#1,5:1241\n1#2:1075\n1672#3,6:1076\n1826#3:1092\n1688#3:1096\n1826#3:1114\n1688#3:1118\n1826#3:1139\n1688#3:1143\n1672#3,6:1157\n1672#3,6:1168\n1605#3,3:1174\n1615#3:1177\n1619#3:1178\n1795#3,3:1179\n1809#3,3:1182\n1733#3:1185\n1721#3:1186\n1715#3:1187\n1728#3:1188\n1818#3:1189\n1682#3:1190\n1661#3:1191\n1680#3:1192\n1661#3:1193\n1672#3,6:1196\n1795#3,3:1207\n1826#3:1210\n1715#3:1211\n1685#3:1212\n1661#3:1213\n1605#3,3:1214\n1615#3:1217\n1619#3:1218\n1672#3,6:1221\n1661#3:1232\n1672#3,6:1235\n1672#3,6:1246\n1672#3,6:1252\n401#4,4:1082\n373#4,6:1086\n383#4,3:1093\n386#4,2:1097\n406#4,2:1099\n389#4,6:1101\n408#4:1107\n373#4,6:1108\n383#4,3:1115\n386#4,9:1119\n267#5,4:1128\n237#5,7:1132\n248#5,3:1140\n251#5,2:1144\n272#5,2:1146\n254#5,6:1148\n274#5:1154\n*S KotlinDebug\n*F\n+ 1 ObjectFloatMap.kt\nandroidx/collection/MutableObjectFloatMap\n*L\n900#1:1155,2\n900#1:1163,5\n960#1:1194,2\n960#1:1202,5\n1034#1:1219,2\n1034#1:1227,5\n1050#1:1233,2\n1050#1:1241,5\n728#1:1076,6\n804#1:1092\n804#1:1096\n843#1:1114\n843#1:1118\n889#1:1139\n889#1:1143\n900#1:1157,6\n911#1:1168,6\n925#1:1174,3\n926#1:1177\n927#1:1178\n934#1:1179,3\n935#1:1182,3\n936#1:1185\n937#1:1186\n937#1:1187\n941#1:1188\n944#1:1189\n953#1:1190\n953#1:1191\n959#1:1192\n959#1:1193\n960#1:1196,6\n975#1:1207,3\n976#1:1210\n978#1:1211\n1029#1:1212\n1029#1:1213\n1031#1:1214,3\n1032#1:1217\n1034#1:1218\n1034#1:1221,6\n1048#1:1232\n1050#1:1235,6\n1065#1:1246,6\n1071#1:1252,6\n804#1:1082,4\n804#1:1086,6\n804#1:1093,3\n804#1:1097,2\n804#1:1099,2\n804#1:1101,6\n804#1:1107\n843#1:1108,6\n843#1:1115,3\n843#1:1119,9\n889#1:1128,4\n889#1:1132,7\n889#1:1140,3\n889#1:1144,2\n889#1:1146,2\n889#1:1148,6\n889#1:1154\n*E\n"})
/* loaded from: classes.dex */
public final class MutableObjectFloatMap<K> extends ObjectFloatMap<K> {
private int growthLimit;
public MutableObjectFloatMap() {
this(0, 1, null);
}
/* JADX WARN: Multi-variable type inference failed */
public final void minusAssign(ScatterSet<K> keys) {
Intrinsics.checkNotNullParameter(keys, "keys");
Object[] objArr = keys.elements;
long[] jArr = keys.metadata;
int length = jArr.length - 2;
if (length < 0) {
return;
}
int i = 0;
while (true) {
long j = jArr[i];
if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
int i2 = 8 - ((~(i - length)) >>> 31);
for (int i3 = 0; i3 < i2; i3++) {
if ((255 & j) < 128) {
remove(objArr[(i << 3) + i3]);
}
j >>= 8;
}
if (i2 != 8) {
return;
}
}
if (i == length) {
return;
} else {
i++;
}
}
}
public final void removeIf(Function2 predicate) {
Intrinsics.checkNotNullParameter(predicate, "predicate");
long[] jArr = this.metadata;
int length = jArr.length - 2;
if (length < 0) {
return;
}
int i = 0;
while (true) {
long j = jArr[i];
if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
int i2 = 8 - ((~(i - length)) >>> 31);
for (int i3 = 0; i3 < i2; i3++) {
if ((255 & j) < 128) {
int i4 = (i << 3) + i3;
if (((Boolean) predicate.invoke(this.keys[i4], Float.valueOf(this.values[i4]))).booleanValue()) {
removeValueAt(i4);
}
}
j >>= 8;
}
if (i2 != 8) {
return;
}
}
if (i == length) {
return;
} else {
i++;
}
}
}
/* JADX WARN: Multi-variable type inference failed */
public final void putAll(ObjectFloatMap<K> from) {
Intrinsics.checkNotNullParameter(from, "from");
Object[] objArr = from.keys;
float[] fArr = from.values;
long[] jArr = from.metadata;
int length = jArr.length - 2;
if (length < 0) {
return;
}
int i = 0;
while (true) {
long j = jArr[i];
if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
int i2 = 8 - ((~(i - length)) >>> 31);
for (int i3 = 0; i3 < i2; i3++) {
if ((255 & j) < 128) {
int i4 = (i << 3) + i3;
set(objArr[i4], fArr[i4]);
}
j >>= 8;
}
if (i2 != 8) {
return;
}
}
if (i == length) {
return;
} else {
i++;
}
}
}
public /* synthetic */ MutableObjectFloatMap(int i, int i2, DefaultConstructorMarker defaultConstructorMarker) {
this((i2 & 1) != 0 ? 6 : i);
}
public MutableObjectFloatMap(int i) {
super(null);
if (i < 0) {
throw new IllegalArgumentException("Capacity must be a positive value.".toString());
}
initializeStorage(ScatterMapKt.unloadedCapacity(i));
}
private final void initializeStorage(int i) {
int max = i > 0 ? Math.max(7, ScatterMapKt.normalizeCapacity(i)) : 0;
this._capacity = max;
initializeMetadata(max);
this.keys = new Object[max];
this.values = new float[max];
}
private final void initializeMetadata(int i) {
long[] jArr;
if (i == 0) {
jArr = ScatterMapKt.EmptyGroup;
} else {
jArr = new long[((i + 15) & (-8)) >> 3];
ArraysKt___ArraysJvmKt.fill$default(jArr, -9187201950435737472L, 0, 0, 6, (Object) null);
}
this.metadata = jArr;
int i2 = i >> 3;
long j = 255 << ((i & 7) << 3);
jArr[i2] = (jArr[i2] & (~j)) | j;
initializeGrowth();
}
private final void initializeGrowth() {
this.growthLimit = ScatterMapKt.loadedCapacity(getCapacity()) - this._size;
}
public final float getOrPut(K k, Function0 defaultValue) {
Intrinsics.checkNotNullParameter(defaultValue, "defaultValue");
int findKeyIndex = findKeyIndex(k);
if (findKeyIndex >= 0) {
return this.values[findKeyIndex];
}
float floatValue = ((Number) defaultValue.invoke()).floatValue();
set(k, floatValue);
return floatValue;
}
public final void set(K k, float f) {
int findIndex = findIndex(k);
if (findIndex < 0) {
findIndex = ~findIndex;
}
this.keys[findIndex] = k;
this.values[findIndex] = f;
}
public final void put(K k, float f) {
set(k, f);
}
public final float put(K k, float f, float f2) {
int findIndex = findIndex(k);
if (findIndex < 0) {
findIndex = ~findIndex;
} else {
f2 = this.values[findIndex];
}
this.keys[findIndex] = k;
this.values[findIndex] = f;
return f2;
}
public final void plusAssign(ObjectFloatMap<K> from) {
Intrinsics.checkNotNullParameter(from, "from");
putAll(from);
}
public final void remove(K k) {
int findKeyIndex = findKeyIndex(k);
if (findKeyIndex >= 0) {
removeValueAt(findKeyIndex);
}
}
public final boolean remove(K k, float f) {
int findKeyIndex = findKeyIndex(k);
if (findKeyIndex < 0 || this.values[findKeyIndex] != f) {
return false;
}
removeValueAt(findKeyIndex);
return true;
}
public final void minusAssign(K k) {
remove(k);
}
public final void minusAssign(K[] keys) {
Intrinsics.checkNotNullParameter(keys, "keys");
for (K k : keys) {
remove(k);
}
}
public final void minusAssign(Iterable<? extends K> keys) {
Intrinsics.checkNotNullParameter(keys, "keys");
Iterator<? extends K> it = keys.iterator();
while (it.hasNext()) {
remove(it.next());
}
}
/* JADX WARN: Multi-variable type inference failed */
public final void minusAssign(Sequence keys) {
Intrinsics.checkNotNullParameter(keys, "keys");
Iterator it = keys.iterator();
while (it.hasNext()) {
remove(it.next());
}
}
public final void clear() {
this._size = 0;
long[] jArr = this.metadata;
if (jArr != ScatterMapKt.EmptyGroup) {
ArraysKt___ArraysJvmKt.fill$default(jArr, -9187201950435737472L, 0, 0, 6, (Object) null);
long[] jArr2 = this.metadata;
int i = this._capacity;
int i2 = i >> 3;
long j = 255 << ((i & 7) << 3);
jArr2[i2] = (jArr2[i2] & (~j)) | j;
}
ArraysKt___ArraysJvmKt.fill(this.keys, (Object) null, 0, this._capacity);
initializeGrowth();
}
public final int trim() {
int i = this._capacity;
int normalizeCapacity = ScatterMapKt.normalizeCapacity(ScatterMapKt.unloadedCapacity(this._size));
if (normalizeCapacity >= i) {
return 0;
}
resizeStorage(normalizeCapacity);
return i - this._capacity;
}
private final void adjustStorage() {
if (this._capacity > 8 && Long.compareUnsigned(ULong.m4068constructorimpl(ULong.m4068constructorimpl(this._size) * 32), ULong.m4068constructorimpl(ULong.m4068constructorimpl(this._capacity) * 25)) <= 0) {
removeDeletedMarkers();
} else {
resizeStorage(ScatterMapKt.nextCapacity(this._capacity));
}
}
private final void resizeStorage(int i) {
int i2;
long[] jArr = this.metadata;
Object[] objArr = this.keys;
float[] fArr = this.values;
int i3 = this._capacity;
initializeStorage(i);
Object[] objArr2 = this.keys;
float[] fArr2 = this.values;
int i4 = 0;
while (i4 < i3) {
if (((jArr[i4 >> 3] >> ((i4 & 7) << 3)) & 255) < 128) {
Object obj = objArr[i4];
int hashCode = (obj != null ? obj.hashCode() : 0) * ScatterMapKt.MurmurHashC1;
int i5 = hashCode ^ (hashCode << 16);
int findFirstAvailableSlot = findFirstAvailableSlot(i5 >>> 7);
long j = i5 & 127;
long[] jArr2 = this.metadata;
int i6 = findFirstAvailableSlot >> 3;
int i7 = (findFirstAvailableSlot & 7) << 3;
i2 = i4;
jArr2[i6] = (jArr2[i6] & (~(255 << i7))) | (j << i7);
int i8 = this._capacity;
int i9 = ((findFirstAvailableSlot - 7) & i8) + (i8 & 7);
int i10 = i9 >> 3;
int i11 = (i9 & 7) << 3;
jArr2[i10] = (jArr2[i10] & (~(255 << i11))) | (j << i11);
objArr2[findFirstAvailableSlot] = obj;
fArr2[findFirstAvailableSlot] = fArr[i2];
} else {
i2 = i4;
}
i4 = i2 + 1;
}
}
private final int findIndex(K k) {
int hashCode = (k != null ? k.hashCode() : 0) * ScatterMapKt.MurmurHashC1;
int i = hashCode ^ (hashCode << 16);
int i2 = i >>> 7;
int i3 = i & 127;
int i4 = this._capacity;
int i5 = i2 & i4;
int i6 = 0;
while (true) {
long[] jArr = this.metadata;
int i7 = i5 >> 3;
int i8 = (i5 & 7) << 3;
long j = ((jArr[i7 + 1] << (64 - i8)) & ((-i8) >> 63)) | (jArr[i7] >>> i8);
long j2 = i3;
int i9 = i3;
long j3 = j ^ (j2 * ScatterMapKt.BitmaskLsb);
for (long j4 = (~j3) & (j3 - ScatterMapKt.BitmaskLsb) & (-9187201950435737472L); j4 != 0; j4 &= j4 - 1) {
int numberOfTrailingZeros = (i5 + (Long.numberOfTrailingZeros(j4) >> 3)) & i4;
if (Intrinsics.areEqual(this.keys[numberOfTrailingZeros], k)) {
return numberOfTrailingZeros;
}
}
if ((((~j) << 6) & j & (-9187201950435737472L)) != 0) {
int findFirstAvailableSlot = findFirstAvailableSlot(i2);
if (this.growthLimit == 0 && ((this.metadata[findFirstAvailableSlot >> 3] >> ((findFirstAvailableSlot & 7) << 3)) & 255) != 254) {
adjustStorage();
findFirstAvailableSlot = findFirstAvailableSlot(i2);
}
this._size++;
int i10 = this.growthLimit;
long[] jArr2 = this.metadata;
int i11 = findFirstAvailableSlot >> 3;
long j5 = jArr2[i11];
int i12 = (findFirstAvailableSlot & 7) << 3;
this.growthLimit = i10 - (((j5 >> i12) & 255) == 128 ? 1 : 0);
jArr2[i11] = (j5 & (~(255 << i12))) | (j2 << i12);
int i13 = this._capacity;
int i14 = ((findFirstAvailableSlot - 7) & i13) + (i13 & 7);
int i15 = i14 >> 3;
int i16 = (i14 & 7) << 3;
jArr2[i15] = ((~(255 << i16)) & jArr2[i15]) | (j2 << i16);
return ~findFirstAvailableSlot;
}
i6 += 8;
i5 = (i5 + i6) & i4;
i3 = i9;
}
}
private final void removeDeletedMarkers() {
long[] jArr = this.metadata;
int i = this._capacity;
int i2 = 0;
for (int i3 = 0; i3 < i; i3++) {
int i4 = i3 >> 3;
int i5 = (i3 & 7) << 3;
if (((jArr[i4] >> i5) & 255) == 254) {
long[] jArr2 = this.metadata;
jArr2[i4] = (128 << i5) | (jArr2[i4] & (~(255 << i5)));
int i6 = this._capacity;
int i7 = ((i3 - 7) & i6) + (i6 & 7);
int i8 = i7 >> 3;
int i9 = (i7 & 7) << 3;
jArr2[i8] = ((~(255 << i9)) & jArr2[i8]) | (128 << i9);
i2++;
}
}
this.growthLimit += i2;
}
private final void writeMetadata(int i, long j) {
long[] jArr = this.metadata;
int i2 = i >> 3;
int i3 = (i & 7) << 3;
jArr[i2] = (jArr[i2] & (~(255 << i3))) | (j << i3);
int i4 = this._capacity;
int i5 = ((i - 7) & i4) + (i4 & 7);
int i6 = i5 >> 3;
int i7 = (i5 & 7) << 3;
jArr[i6] = (j << i7) | (jArr[i6] & (~(255 << i7)));
}
public final void removeValueAt(int i) {
this._size--;
long[] jArr = this.metadata;
int i2 = i >> 3;
int i3 = (i & 7) << 3;
jArr[i2] = (jArr[i2] & (~(255 << i3))) | (254 << i3);
int i4 = this._capacity;
int i5 = ((i - 7) & i4) + (i4 & 7);
int i6 = i5 >> 3;
int i7 = (i5 & 7) << 3;
jArr[i6] = (jArr[i6] & (~(255 << i7))) | (254 << i7);
this.keys[i] = null;
}
private final int findFirstAvailableSlot(int i) {
int i2 = this._capacity;
int i3 = i & i2;
int i4 = 0;
while (true) {
long[] jArr = this.metadata;
int i5 = i3 >> 3;
int i6 = (i3 & 7) << 3;
long j = ((jArr[i5 + 1] << (64 - i6)) & ((-i6) >> 63)) | (jArr[i5] >>> i6);
long j2 = j & ((~j) << 7) & (-9187201950435737472L);
if (j2 != 0) {
return (i3 + (Long.numberOfTrailingZeros(j2) >> 3)) & i2;
}
i4 += 8;
i3 = (i3 + i4) & i2;
}
}
}

View File

@@ -0,0 +1,427 @@
package androidx.collection;
import java.util.Iterator;
import kotlin.ULong;
import kotlin.collections.ArraysKt___ArraysJvmKt;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlin.sequences.Sequence;
@SourceDebugExtension({"SMAP\nObjectIntMap.kt\nKotlin\n*S Kotlin\n*F\n+ 1 ObjectIntMap.kt\nandroidx/collection/MutableObjectIntMap\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n+ 3 ScatterMap.kt\nandroidx/collection/ScatterMapKt\n+ 4 ObjectIntMap.kt\nandroidx/collection/ObjectIntMap\n+ 5 ScatterSet.kt\nandroidx/collection/ScatterSet\n*L\n1#1,1074:1\n1064#1,2:1155\n1068#1,5:1163\n1064#1,2:1194\n1068#1,5:1202\n1064#1,2:1219\n1068#1,5:1227\n1064#1,2:1233\n1068#1,5:1241\n1#2:1075\n1672#3,6:1076\n1826#3:1092\n1688#3:1096\n1826#3:1114\n1688#3:1118\n1826#3:1139\n1688#3:1143\n1672#3,6:1157\n1672#3,6:1168\n1605#3,3:1174\n1615#3:1177\n1619#3:1178\n1795#3,3:1179\n1809#3,3:1182\n1733#3:1185\n1721#3:1186\n1715#3:1187\n1728#3:1188\n1818#3:1189\n1682#3:1190\n1661#3:1191\n1680#3:1192\n1661#3:1193\n1672#3,6:1196\n1795#3,3:1207\n1826#3:1210\n1715#3:1211\n1685#3:1212\n1661#3:1213\n1605#3,3:1214\n1615#3:1217\n1619#3:1218\n1672#3,6:1221\n1661#3:1232\n1672#3,6:1235\n1672#3,6:1246\n1672#3,6:1252\n401#4,4:1082\n373#4,6:1086\n383#4,3:1093\n386#4,2:1097\n406#4,2:1099\n389#4,6:1101\n408#4:1107\n373#4,6:1108\n383#4,3:1115\n386#4,9:1119\n267#5,4:1128\n237#5,7:1132\n248#5,3:1140\n251#5,2:1144\n272#5,2:1146\n254#5,6:1148\n274#5:1154\n*S KotlinDebug\n*F\n+ 1 ObjectIntMap.kt\nandroidx/collection/MutableObjectIntMap\n*L\n900#1:1155,2\n900#1:1163,5\n960#1:1194,2\n960#1:1202,5\n1034#1:1219,2\n1034#1:1227,5\n1050#1:1233,2\n1050#1:1241,5\n728#1:1076,6\n804#1:1092\n804#1:1096\n843#1:1114\n843#1:1118\n889#1:1139\n889#1:1143\n900#1:1157,6\n911#1:1168,6\n925#1:1174,3\n926#1:1177\n927#1:1178\n934#1:1179,3\n935#1:1182,3\n936#1:1185\n937#1:1186\n937#1:1187\n941#1:1188\n944#1:1189\n953#1:1190\n953#1:1191\n959#1:1192\n959#1:1193\n960#1:1196,6\n975#1:1207,3\n976#1:1210\n978#1:1211\n1029#1:1212\n1029#1:1213\n1031#1:1214,3\n1032#1:1217\n1034#1:1218\n1034#1:1221,6\n1048#1:1232\n1050#1:1235,6\n1065#1:1246,6\n1071#1:1252,6\n804#1:1082,4\n804#1:1086,6\n804#1:1093,3\n804#1:1097,2\n804#1:1099,2\n804#1:1101,6\n804#1:1107\n843#1:1108,6\n843#1:1115,3\n843#1:1119,9\n889#1:1128,4\n889#1:1132,7\n889#1:1140,3\n889#1:1144,2\n889#1:1146,2\n889#1:1148,6\n889#1:1154\n*E\n"})
/* loaded from: classes.dex */
public final class MutableObjectIntMap<K> extends ObjectIntMap<K> {
private int growthLimit;
public MutableObjectIntMap() {
this(0, 1, null);
}
/* JADX WARN: Multi-variable type inference failed */
public final void minusAssign(ScatterSet<K> keys) {
Intrinsics.checkNotNullParameter(keys, "keys");
Object[] objArr = keys.elements;
long[] jArr = keys.metadata;
int length = jArr.length - 2;
if (length < 0) {
return;
}
int i = 0;
while (true) {
long j = jArr[i];
if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
int i2 = 8 - ((~(i - length)) >>> 31);
for (int i3 = 0; i3 < i2; i3++) {
if ((255 & j) < 128) {
remove(objArr[(i << 3) + i3]);
}
j >>= 8;
}
if (i2 != 8) {
return;
}
}
if (i == length) {
return;
} else {
i++;
}
}
}
public final void removeIf(Function2 predicate) {
Intrinsics.checkNotNullParameter(predicate, "predicate");
long[] jArr = this.metadata;
int length = jArr.length - 2;
if (length < 0) {
return;
}
int i = 0;
while (true) {
long j = jArr[i];
if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
int i2 = 8 - ((~(i - length)) >>> 31);
for (int i3 = 0; i3 < i2; i3++) {
if ((255 & j) < 128) {
int i4 = (i << 3) + i3;
if (((Boolean) predicate.invoke(this.keys[i4], Integer.valueOf(this.values[i4]))).booleanValue()) {
removeValueAt(i4);
}
}
j >>= 8;
}
if (i2 != 8) {
return;
}
}
if (i == length) {
return;
} else {
i++;
}
}
}
/* JADX WARN: Multi-variable type inference failed */
public final void putAll(ObjectIntMap<K> from) {
Intrinsics.checkNotNullParameter(from, "from");
Object[] objArr = from.keys;
int[] iArr = from.values;
long[] jArr = from.metadata;
int length = jArr.length - 2;
if (length < 0) {
return;
}
int i = 0;
while (true) {
long j = jArr[i];
if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
int i2 = 8 - ((~(i - length)) >>> 31);
for (int i3 = 0; i3 < i2; i3++) {
if ((255 & j) < 128) {
int i4 = (i << 3) + i3;
set(objArr[i4], iArr[i4]);
}
j >>= 8;
}
if (i2 != 8) {
return;
}
}
if (i == length) {
return;
} else {
i++;
}
}
}
public /* synthetic */ MutableObjectIntMap(int i, int i2, DefaultConstructorMarker defaultConstructorMarker) {
this((i2 & 1) != 0 ? 6 : i);
}
public MutableObjectIntMap(int i) {
super(null);
if (i < 0) {
throw new IllegalArgumentException("Capacity must be a positive value.".toString());
}
initializeStorage(ScatterMapKt.unloadedCapacity(i));
}
private final void initializeStorage(int i) {
int max = i > 0 ? Math.max(7, ScatterMapKt.normalizeCapacity(i)) : 0;
this._capacity = max;
initializeMetadata(max);
this.keys = new Object[max];
this.values = new int[max];
}
private final void initializeMetadata(int i) {
long[] jArr;
if (i == 0) {
jArr = ScatterMapKt.EmptyGroup;
} else {
jArr = new long[((i + 15) & (-8)) >> 3];
ArraysKt___ArraysJvmKt.fill$default(jArr, -9187201950435737472L, 0, 0, 6, (Object) null);
}
this.metadata = jArr;
int i2 = i >> 3;
long j = 255 << ((i & 7) << 3);
jArr[i2] = (jArr[i2] & (~j)) | j;
initializeGrowth();
}
private final void initializeGrowth() {
this.growthLimit = ScatterMapKt.loadedCapacity(getCapacity()) - this._size;
}
public final int getOrPut(K k, Function0 defaultValue) {
Intrinsics.checkNotNullParameter(defaultValue, "defaultValue");
int findKeyIndex = findKeyIndex(k);
if (findKeyIndex >= 0) {
return this.values[findKeyIndex];
}
int intValue = ((Number) defaultValue.invoke()).intValue();
set(k, intValue);
return intValue;
}
public final void set(K k, int i) {
int findIndex = findIndex(k);
if (findIndex < 0) {
findIndex = ~findIndex;
}
this.keys[findIndex] = k;
this.values[findIndex] = i;
}
public final void put(K k, int i) {
set(k, i);
}
public final int put(K k, int i, int i2) {
int findIndex = findIndex(k);
if (findIndex < 0) {
findIndex = ~findIndex;
} else {
i2 = this.values[findIndex];
}
this.keys[findIndex] = k;
this.values[findIndex] = i;
return i2;
}
public final void plusAssign(ObjectIntMap<K> from) {
Intrinsics.checkNotNullParameter(from, "from");
putAll(from);
}
public final void remove(K k) {
int findKeyIndex = findKeyIndex(k);
if (findKeyIndex >= 0) {
removeValueAt(findKeyIndex);
}
}
public final boolean remove(K k, int i) {
int findKeyIndex = findKeyIndex(k);
if (findKeyIndex < 0 || this.values[findKeyIndex] != i) {
return false;
}
removeValueAt(findKeyIndex);
return true;
}
public final void minusAssign(K k) {
remove(k);
}
public final void minusAssign(K[] keys) {
Intrinsics.checkNotNullParameter(keys, "keys");
for (K k : keys) {
remove(k);
}
}
public final void minusAssign(Iterable<? extends K> keys) {
Intrinsics.checkNotNullParameter(keys, "keys");
Iterator<? extends K> it = keys.iterator();
while (it.hasNext()) {
remove(it.next());
}
}
/* JADX WARN: Multi-variable type inference failed */
public final void minusAssign(Sequence keys) {
Intrinsics.checkNotNullParameter(keys, "keys");
Iterator it = keys.iterator();
while (it.hasNext()) {
remove(it.next());
}
}
public final void clear() {
this._size = 0;
long[] jArr = this.metadata;
if (jArr != ScatterMapKt.EmptyGroup) {
ArraysKt___ArraysJvmKt.fill$default(jArr, -9187201950435737472L, 0, 0, 6, (Object) null);
long[] jArr2 = this.metadata;
int i = this._capacity;
int i2 = i >> 3;
long j = 255 << ((i & 7) << 3);
jArr2[i2] = (jArr2[i2] & (~j)) | j;
}
ArraysKt___ArraysJvmKt.fill(this.keys, (Object) null, 0, this._capacity);
initializeGrowth();
}
public final int trim() {
int i = this._capacity;
int normalizeCapacity = ScatterMapKt.normalizeCapacity(ScatterMapKt.unloadedCapacity(this._size));
if (normalizeCapacity >= i) {
return 0;
}
resizeStorage(normalizeCapacity);
return i - this._capacity;
}
private final void adjustStorage() {
if (this._capacity > 8 && Long.compareUnsigned(ULong.m4068constructorimpl(ULong.m4068constructorimpl(this._size) * 32), ULong.m4068constructorimpl(ULong.m4068constructorimpl(this._capacity) * 25)) <= 0) {
removeDeletedMarkers();
} else {
resizeStorage(ScatterMapKt.nextCapacity(this._capacity));
}
}
private final void resizeStorage(int i) {
int i2;
long[] jArr = this.metadata;
Object[] objArr = this.keys;
int[] iArr = this.values;
int i3 = this._capacity;
initializeStorage(i);
Object[] objArr2 = this.keys;
int[] iArr2 = this.values;
int i4 = 0;
while (i4 < i3) {
if (((jArr[i4 >> 3] >> ((i4 & 7) << 3)) & 255) < 128) {
Object obj = objArr[i4];
int hashCode = (obj != null ? obj.hashCode() : 0) * ScatterMapKt.MurmurHashC1;
int i5 = hashCode ^ (hashCode << 16);
int findFirstAvailableSlot = findFirstAvailableSlot(i5 >>> 7);
long j = i5 & 127;
long[] jArr2 = this.metadata;
int i6 = findFirstAvailableSlot >> 3;
int i7 = (findFirstAvailableSlot & 7) << 3;
i2 = i4;
jArr2[i6] = (jArr2[i6] & (~(255 << i7))) | (j << i7);
int i8 = this._capacity;
int i9 = ((findFirstAvailableSlot - 7) & i8) + (i8 & 7);
int i10 = i9 >> 3;
int i11 = (i9 & 7) << 3;
jArr2[i10] = (jArr2[i10] & (~(255 << i11))) | (j << i11);
objArr2[findFirstAvailableSlot] = obj;
iArr2[findFirstAvailableSlot] = iArr[i2];
} else {
i2 = i4;
}
i4 = i2 + 1;
}
}
private final int findIndex(K k) {
int hashCode = (k != null ? k.hashCode() : 0) * ScatterMapKt.MurmurHashC1;
int i = hashCode ^ (hashCode << 16);
int i2 = i >>> 7;
int i3 = i & 127;
int i4 = this._capacity;
int i5 = i2 & i4;
int i6 = 0;
while (true) {
long[] jArr = this.metadata;
int i7 = i5 >> 3;
int i8 = (i5 & 7) << 3;
long j = ((jArr[i7 + 1] << (64 - i8)) & ((-i8) >> 63)) | (jArr[i7] >>> i8);
long j2 = i3;
int i9 = i3;
long j3 = j ^ (j2 * ScatterMapKt.BitmaskLsb);
for (long j4 = (~j3) & (j3 - ScatterMapKt.BitmaskLsb) & (-9187201950435737472L); j4 != 0; j4 &= j4 - 1) {
int numberOfTrailingZeros = (i5 + (Long.numberOfTrailingZeros(j4) >> 3)) & i4;
if (Intrinsics.areEqual(this.keys[numberOfTrailingZeros], k)) {
return numberOfTrailingZeros;
}
}
if ((((~j) << 6) & j & (-9187201950435737472L)) != 0) {
int findFirstAvailableSlot = findFirstAvailableSlot(i2);
if (this.growthLimit == 0 && ((this.metadata[findFirstAvailableSlot >> 3] >> ((findFirstAvailableSlot & 7) << 3)) & 255) != 254) {
adjustStorage();
findFirstAvailableSlot = findFirstAvailableSlot(i2);
}
this._size++;
int i10 = this.growthLimit;
long[] jArr2 = this.metadata;
int i11 = findFirstAvailableSlot >> 3;
long j5 = jArr2[i11];
int i12 = (findFirstAvailableSlot & 7) << 3;
this.growthLimit = i10 - (((j5 >> i12) & 255) == 128 ? 1 : 0);
jArr2[i11] = (j5 & (~(255 << i12))) | (j2 << i12);
int i13 = this._capacity;
int i14 = ((findFirstAvailableSlot - 7) & i13) + (i13 & 7);
int i15 = i14 >> 3;
int i16 = (i14 & 7) << 3;
jArr2[i15] = ((~(255 << i16)) & jArr2[i15]) | (j2 << i16);
return ~findFirstAvailableSlot;
}
i6 += 8;
i5 = (i5 + i6) & i4;
i3 = i9;
}
}
private final void removeDeletedMarkers() {
long[] jArr = this.metadata;
int i = this._capacity;
int i2 = 0;
for (int i3 = 0; i3 < i; i3++) {
int i4 = i3 >> 3;
int i5 = (i3 & 7) << 3;
if (((jArr[i4] >> i5) & 255) == 254) {
long[] jArr2 = this.metadata;
jArr2[i4] = (128 << i5) | (jArr2[i4] & (~(255 << i5)));
int i6 = this._capacity;
int i7 = ((i3 - 7) & i6) + (i6 & 7);
int i8 = i7 >> 3;
int i9 = (i7 & 7) << 3;
jArr2[i8] = ((~(255 << i9)) & jArr2[i8]) | (128 << i9);
i2++;
}
}
this.growthLimit += i2;
}
private final void writeMetadata(int i, long j) {
long[] jArr = this.metadata;
int i2 = i >> 3;
int i3 = (i & 7) << 3;
jArr[i2] = (jArr[i2] & (~(255 << i3))) | (j << i3);
int i4 = this._capacity;
int i5 = ((i - 7) & i4) + (i4 & 7);
int i6 = i5 >> 3;
int i7 = (i5 & 7) << 3;
jArr[i6] = (j << i7) | (jArr[i6] & (~(255 << i7)));
}
public final void removeValueAt(int i) {
this._size--;
long[] jArr = this.metadata;
int i2 = i >> 3;
int i3 = (i & 7) << 3;
jArr[i2] = (jArr[i2] & (~(255 << i3))) | (254 << i3);
int i4 = this._capacity;
int i5 = ((i - 7) & i4) + (i4 & 7);
int i6 = i5 >> 3;
int i7 = (i5 & 7) << 3;
jArr[i6] = (jArr[i6] & (~(255 << i7))) | (254 << i7);
this.keys[i] = null;
}
private final int findFirstAvailableSlot(int i) {
int i2 = this._capacity;
int i3 = i & i2;
int i4 = 0;
while (true) {
long[] jArr = this.metadata;
int i5 = i3 >> 3;
int i6 = (i3 & 7) << 3;
long j = ((jArr[i5 + 1] << (64 - i6)) & ((-i6) >> 63)) | (jArr[i5] >>> i6);
long j2 = j & ((~j) << 7) & (-9187201950435737472L);
if (j2 != 0) {
return (i3 + (Long.numberOfTrailingZeros(j2) >> 3)) & i2;
}
i4 += 8;
i3 = (i3 + i4) & i2;
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,427 @@
package androidx.collection;
import java.util.Iterator;
import kotlin.ULong;
import kotlin.collections.ArraysKt___ArraysJvmKt;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlin.sequences.Sequence;
@SourceDebugExtension({"SMAP\nObjectLongMap.kt\nKotlin\n*S Kotlin\n*F\n+ 1 ObjectLongMap.kt\nandroidx/collection/MutableObjectLongMap\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n+ 3 ScatterMap.kt\nandroidx/collection/ScatterMapKt\n+ 4 ObjectLongMap.kt\nandroidx/collection/ObjectLongMap\n+ 5 ScatterSet.kt\nandroidx/collection/ScatterSet\n*L\n1#1,1074:1\n1064#1,2:1155\n1068#1,5:1163\n1064#1,2:1194\n1068#1,5:1202\n1064#1,2:1219\n1068#1,5:1227\n1064#1,2:1233\n1068#1,5:1241\n1#2:1075\n1672#3,6:1076\n1826#3:1092\n1688#3:1096\n1826#3:1114\n1688#3:1118\n1826#3:1139\n1688#3:1143\n1672#3,6:1157\n1672#3,6:1168\n1605#3,3:1174\n1615#3:1177\n1619#3:1178\n1795#3,3:1179\n1809#3,3:1182\n1733#3:1185\n1721#3:1186\n1715#3:1187\n1728#3:1188\n1818#3:1189\n1682#3:1190\n1661#3:1191\n1680#3:1192\n1661#3:1193\n1672#3,6:1196\n1795#3,3:1207\n1826#3:1210\n1715#3:1211\n1685#3:1212\n1661#3:1213\n1605#3,3:1214\n1615#3:1217\n1619#3:1218\n1672#3,6:1221\n1661#3:1232\n1672#3,6:1235\n1672#3,6:1246\n1672#3,6:1252\n401#4,4:1082\n373#4,6:1086\n383#4,3:1093\n386#4,2:1097\n406#4,2:1099\n389#4,6:1101\n408#4:1107\n373#4,6:1108\n383#4,3:1115\n386#4,9:1119\n267#5,4:1128\n237#5,7:1132\n248#5,3:1140\n251#5,2:1144\n272#5,2:1146\n254#5,6:1148\n274#5:1154\n*S KotlinDebug\n*F\n+ 1 ObjectLongMap.kt\nandroidx/collection/MutableObjectLongMap\n*L\n900#1:1155,2\n900#1:1163,5\n960#1:1194,2\n960#1:1202,5\n1034#1:1219,2\n1034#1:1227,5\n1050#1:1233,2\n1050#1:1241,5\n728#1:1076,6\n804#1:1092\n804#1:1096\n843#1:1114\n843#1:1118\n889#1:1139\n889#1:1143\n900#1:1157,6\n911#1:1168,6\n925#1:1174,3\n926#1:1177\n927#1:1178\n934#1:1179,3\n935#1:1182,3\n936#1:1185\n937#1:1186\n937#1:1187\n941#1:1188\n944#1:1189\n953#1:1190\n953#1:1191\n959#1:1192\n959#1:1193\n960#1:1196,6\n975#1:1207,3\n976#1:1210\n978#1:1211\n1029#1:1212\n1029#1:1213\n1031#1:1214,3\n1032#1:1217\n1034#1:1218\n1034#1:1221,6\n1048#1:1232\n1050#1:1235,6\n1065#1:1246,6\n1071#1:1252,6\n804#1:1082,4\n804#1:1086,6\n804#1:1093,3\n804#1:1097,2\n804#1:1099,2\n804#1:1101,6\n804#1:1107\n843#1:1108,6\n843#1:1115,3\n843#1:1119,9\n889#1:1128,4\n889#1:1132,7\n889#1:1140,3\n889#1:1144,2\n889#1:1146,2\n889#1:1148,6\n889#1:1154\n*E\n"})
/* loaded from: classes.dex */
public final class MutableObjectLongMap<K> extends ObjectLongMap<K> {
private int growthLimit;
public MutableObjectLongMap() {
this(0, 1, null);
}
/* JADX WARN: Multi-variable type inference failed */
public final void minusAssign(ScatterSet<K> keys) {
Intrinsics.checkNotNullParameter(keys, "keys");
Object[] objArr = keys.elements;
long[] jArr = keys.metadata;
int length = jArr.length - 2;
if (length < 0) {
return;
}
int i = 0;
while (true) {
long j = jArr[i];
if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
int i2 = 8 - ((~(i - length)) >>> 31);
for (int i3 = 0; i3 < i2; i3++) {
if ((255 & j) < 128) {
remove(objArr[(i << 3) + i3]);
}
j >>= 8;
}
if (i2 != 8) {
return;
}
}
if (i == length) {
return;
} else {
i++;
}
}
}
public final void removeIf(Function2 predicate) {
Intrinsics.checkNotNullParameter(predicate, "predicate");
long[] jArr = this.metadata;
int length = jArr.length - 2;
if (length < 0) {
return;
}
int i = 0;
while (true) {
long j = jArr[i];
if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
int i2 = 8 - ((~(i - length)) >>> 31);
for (int i3 = 0; i3 < i2; i3++) {
if ((255 & j) < 128) {
int i4 = (i << 3) + i3;
if (((Boolean) predicate.invoke(this.keys[i4], Long.valueOf(this.values[i4]))).booleanValue()) {
removeValueAt(i4);
}
}
j >>= 8;
}
if (i2 != 8) {
return;
}
}
if (i == length) {
return;
} else {
i++;
}
}
}
/* JADX WARN: Multi-variable type inference failed */
public final void putAll(ObjectLongMap<K> from) {
Intrinsics.checkNotNullParameter(from, "from");
Object[] objArr = from.keys;
long[] jArr = from.values;
long[] jArr2 = from.metadata;
int length = jArr2.length - 2;
if (length < 0) {
return;
}
int i = 0;
while (true) {
long j = jArr2[i];
if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
int i2 = 8 - ((~(i - length)) >>> 31);
for (int i3 = 0; i3 < i2; i3++) {
if ((255 & j) < 128) {
int i4 = (i << 3) + i3;
set(objArr[i4], jArr[i4]);
}
j >>= 8;
}
if (i2 != 8) {
return;
}
}
if (i == length) {
return;
} else {
i++;
}
}
}
public /* synthetic */ MutableObjectLongMap(int i, int i2, DefaultConstructorMarker defaultConstructorMarker) {
this((i2 & 1) != 0 ? 6 : i);
}
public MutableObjectLongMap(int i) {
super(null);
if (i < 0) {
throw new IllegalArgumentException("Capacity must be a positive value.".toString());
}
initializeStorage(ScatterMapKt.unloadedCapacity(i));
}
private final void initializeStorage(int i) {
int max = i > 0 ? Math.max(7, ScatterMapKt.normalizeCapacity(i)) : 0;
this._capacity = max;
initializeMetadata(max);
this.keys = new Object[max];
this.values = new long[max];
}
private final void initializeMetadata(int i) {
long[] jArr;
if (i == 0) {
jArr = ScatterMapKt.EmptyGroup;
} else {
jArr = new long[((i + 15) & (-8)) >> 3];
ArraysKt___ArraysJvmKt.fill$default(jArr, -9187201950435737472L, 0, 0, 6, (Object) null);
}
this.metadata = jArr;
int i2 = i >> 3;
long j = 255 << ((i & 7) << 3);
jArr[i2] = (jArr[i2] & (~j)) | j;
initializeGrowth();
}
private final void initializeGrowth() {
this.growthLimit = ScatterMapKt.loadedCapacity(getCapacity()) - this._size;
}
public final long getOrPut(K k, Function0 defaultValue) {
Intrinsics.checkNotNullParameter(defaultValue, "defaultValue");
int findKeyIndex = findKeyIndex(k);
if (findKeyIndex >= 0) {
return this.values[findKeyIndex];
}
long longValue = ((Number) defaultValue.invoke()).longValue();
set(k, longValue);
return longValue;
}
public final void set(K k, long j) {
int findIndex = findIndex(k);
if (findIndex < 0) {
findIndex = ~findIndex;
}
this.keys[findIndex] = k;
this.values[findIndex] = j;
}
public final void put(K k, long j) {
set(k, j);
}
public final long put(K k, long j, long j2) {
int findIndex = findIndex(k);
if (findIndex < 0) {
findIndex = ~findIndex;
} else {
j2 = this.values[findIndex];
}
this.keys[findIndex] = k;
this.values[findIndex] = j;
return j2;
}
public final void plusAssign(ObjectLongMap<K> from) {
Intrinsics.checkNotNullParameter(from, "from");
putAll(from);
}
public final void remove(K k) {
int findKeyIndex = findKeyIndex(k);
if (findKeyIndex >= 0) {
removeValueAt(findKeyIndex);
}
}
public final boolean remove(K k, long j) {
int findKeyIndex = findKeyIndex(k);
if (findKeyIndex < 0 || this.values[findKeyIndex] != j) {
return false;
}
removeValueAt(findKeyIndex);
return true;
}
public final void minusAssign(K k) {
remove(k);
}
public final void minusAssign(K[] keys) {
Intrinsics.checkNotNullParameter(keys, "keys");
for (K k : keys) {
remove(k);
}
}
public final void minusAssign(Iterable<? extends K> keys) {
Intrinsics.checkNotNullParameter(keys, "keys");
Iterator<? extends K> it = keys.iterator();
while (it.hasNext()) {
remove(it.next());
}
}
/* JADX WARN: Multi-variable type inference failed */
public final void minusAssign(Sequence keys) {
Intrinsics.checkNotNullParameter(keys, "keys");
Iterator it = keys.iterator();
while (it.hasNext()) {
remove(it.next());
}
}
public final void clear() {
this._size = 0;
long[] jArr = this.metadata;
if (jArr != ScatterMapKt.EmptyGroup) {
ArraysKt___ArraysJvmKt.fill$default(jArr, -9187201950435737472L, 0, 0, 6, (Object) null);
long[] jArr2 = this.metadata;
int i = this._capacity;
int i2 = i >> 3;
long j = 255 << ((i & 7) << 3);
jArr2[i2] = (jArr2[i2] & (~j)) | j;
}
ArraysKt___ArraysJvmKt.fill(this.keys, (Object) null, 0, this._capacity);
initializeGrowth();
}
public final int trim() {
int i = this._capacity;
int normalizeCapacity = ScatterMapKt.normalizeCapacity(ScatterMapKt.unloadedCapacity(this._size));
if (normalizeCapacity >= i) {
return 0;
}
resizeStorage(normalizeCapacity);
return i - this._capacity;
}
private final void adjustStorage() {
if (this._capacity > 8 && Long.compareUnsigned(ULong.m4068constructorimpl(ULong.m4068constructorimpl(this._size) * 32), ULong.m4068constructorimpl(ULong.m4068constructorimpl(this._capacity) * 25)) <= 0) {
removeDeletedMarkers();
} else {
resizeStorage(ScatterMapKt.nextCapacity(this._capacity));
}
}
private final void resizeStorage(int i) {
int i2;
long[] jArr = this.metadata;
Object[] objArr = this.keys;
long[] jArr2 = this.values;
int i3 = this._capacity;
initializeStorage(i);
Object[] objArr2 = this.keys;
long[] jArr3 = this.values;
int i4 = 0;
while (i4 < i3) {
if (((jArr[i4 >> 3] >> ((i4 & 7) << 3)) & 255) < 128) {
Object obj = objArr[i4];
int hashCode = (obj != null ? obj.hashCode() : 0) * ScatterMapKt.MurmurHashC1;
int i5 = hashCode ^ (hashCode << 16);
int findFirstAvailableSlot = findFirstAvailableSlot(i5 >>> 7);
long j = i5 & 127;
long[] jArr4 = this.metadata;
int i6 = findFirstAvailableSlot >> 3;
int i7 = (findFirstAvailableSlot & 7) << 3;
i2 = i4;
jArr4[i6] = (jArr4[i6] & (~(255 << i7))) | (j << i7);
int i8 = this._capacity;
int i9 = ((findFirstAvailableSlot - 7) & i8) + (i8 & 7);
int i10 = i9 >> 3;
int i11 = (i9 & 7) << 3;
jArr4[i10] = (jArr4[i10] & (~(255 << i11))) | (j << i11);
objArr2[findFirstAvailableSlot] = obj;
jArr3[findFirstAvailableSlot] = jArr2[i2];
} else {
i2 = i4;
}
i4 = i2 + 1;
}
}
private final int findIndex(K k) {
int hashCode = (k != null ? k.hashCode() : 0) * ScatterMapKt.MurmurHashC1;
int i = hashCode ^ (hashCode << 16);
int i2 = i >>> 7;
int i3 = i & 127;
int i4 = this._capacity;
int i5 = i2 & i4;
int i6 = 0;
while (true) {
long[] jArr = this.metadata;
int i7 = i5 >> 3;
int i8 = (i5 & 7) << 3;
long j = ((jArr[i7 + 1] << (64 - i8)) & ((-i8) >> 63)) | (jArr[i7] >>> i8);
long j2 = i3;
int i9 = i3;
long j3 = j ^ (j2 * ScatterMapKt.BitmaskLsb);
for (long j4 = (~j3) & (j3 - ScatterMapKt.BitmaskLsb) & (-9187201950435737472L); j4 != 0; j4 &= j4 - 1) {
int numberOfTrailingZeros = (i5 + (Long.numberOfTrailingZeros(j4) >> 3)) & i4;
if (Intrinsics.areEqual(this.keys[numberOfTrailingZeros], k)) {
return numberOfTrailingZeros;
}
}
if ((((~j) << 6) & j & (-9187201950435737472L)) != 0) {
int findFirstAvailableSlot = findFirstAvailableSlot(i2);
if (this.growthLimit == 0 && ((this.metadata[findFirstAvailableSlot >> 3] >> ((findFirstAvailableSlot & 7) << 3)) & 255) != 254) {
adjustStorage();
findFirstAvailableSlot = findFirstAvailableSlot(i2);
}
this._size++;
int i10 = this.growthLimit;
long[] jArr2 = this.metadata;
int i11 = findFirstAvailableSlot >> 3;
long j5 = jArr2[i11];
int i12 = (findFirstAvailableSlot & 7) << 3;
this.growthLimit = i10 - (((j5 >> i12) & 255) == 128 ? 1 : 0);
jArr2[i11] = (j5 & (~(255 << i12))) | (j2 << i12);
int i13 = this._capacity;
int i14 = ((findFirstAvailableSlot - 7) & i13) + (i13 & 7);
int i15 = i14 >> 3;
int i16 = (i14 & 7) << 3;
jArr2[i15] = ((~(255 << i16)) & jArr2[i15]) | (j2 << i16);
return ~findFirstAvailableSlot;
}
i6 += 8;
i5 = (i5 + i6) & i4;
i3 = i9;
}
}
private final void removeDeletedMarkers() {
long[] jArr = this.metadata;
int i = this._capacity;
int i2 = 0;
for (int i3 = 0; i3 < i; i3++) {
int i4 = i3 >> 3;
int i5 = (i3 & 7) << 3;
if (((jArr[i4] >> i5) & 255) == 254) {
long[] jArr2 = this.metadata;
jArr2[i4] = (128 << i5) | (jArr2[i4] & (~(255 << i5)));
int i6 = this._capacity;
int i7 = ((i3 - 7) & i6) + (i6 & 7);
int i8 = i7 >> 3;
int i9 = (i7 & 7) << 3;
jArr2[i8] = ((~(255 << i9)) & jArr2[i8]) | (128 << i9);
i2++;
}
}
this.growthLimit += i2;
}
private final void writeMetadata(int i, long j) {
long[] jArr = this.metadata;
int i2 = i >> 3;
int i3 = (i & 7) << 3;
jArr[i2] = (jArr[i2] & (~(255 << i3))) | (j << i3);
int i4 = this._capacity;
int i5 = ((i - 7) & i4) + (i4 & 7);
int i6 = i5 >> 3;
int i7 = (i5 & 7) << 3;
jArr[i6] = (j << i7) | (jArr[i6] & (~(255 << i7)));
}
public final void removeValueAt(int i) {
this._size--;
long[] jArr = this.metadata;
int i2 = i >> 3;
int i3 = (i & 7) << 3;
jArr[i2] = (jArr[i2] & (~(255 << i3))) | (254 << i3);
int i4 = this._capacity;
int i5 = ((i - 7) & i4) + (i4 & 7);
int i6 = i5 >> 3;
int i7 = (i5 & 7) << 3;
jArr[i6] = (jArr[i6] & (~(255 << i7))) | (254 << i7);
this.keys[i] = null;
}
private final int findFirstAvailableSlot(int i) {
int i2 = this._capacity;
int i3 = i & i2;
int i4 = 0;
while (true) {
long[] jArr = this.metadata;
int i5 = i3 >> 3;
int i6 = (i3 & 7) << 3;
long j = ((jArr[i5 + 1] << (64 - i6)) & ((-i6) >> 63)) | (jArr[i5] >>> i6);
long j2 = j & ((~j) << 7) & (-9187201950435737472L);
if (j2 != 0) {
return (i3 + (Long.numberOfTrailingZeros(j2) >> 3)) & i2;
}
i4 += 8;
i3 = (i3 + i4) & i2;
}
}
}

View File

@@ -0,0 +1,124 @@
package androidx.collection;
import java.util.Iterator;
import java.util.Map;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.RestrictedSuspendLambda;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlin.jvm.internal.markers.KMutableIterator;
import kotlin.sequences.SequenceScope;
import kotlin.sequences.SequencesKt__SequenceBuilderKt;
/* JADX INFO: Add missing generic type declarations: [V, K] */
/* loaded from: classes.dex */
public final class MutableScatterMap$MutableMapWrapper$entries$1$iterator$1<K, V> implements Iterator<Map.Entry<K, V>>, KMutableIterator {
private int current = -1;
private Iterator<? extends Map.Entry<K, V>> iterator;
final /* synthetic */ MutableScatterMap<K, V> this$0;
public final int getCurrent() {
return this.current;
}
public final Iterator<Map.Entry<K, V>> getIterator() {
return this.iterator;
}
public final void setCurrent(int i) {
this.current = i;
}
public final void setIterator(Iterator<? extends Map.Entry<K, V>> it) {
Intrinsics.checkNotNullParameter(it, "<set-?>");
this.iterator = it;
}
public MutableScatterMap$MutableMapWrapper$entries$1$iterator$1(MutableScatterMap<K, V> mutableScatterMap) {
Iterator<? extends Map.Entry<K, V>> it;
this.this$0 = mutableScatterMap;
it = SequencesKt__SequenceBuilderKt.iterator(new AnonymousClass1(mutableScatterMap, this, null));
this.iterator = it;
}
@DebugMetadata(c = "androidx.collection.MutableScatterMap$MutableMapWrapper$entries$1$iterator$1$1", f = "ScatterMap.kt", l = {1328}, m = "invokeSuspend")
@SourceDebugExtension({"SMAP\nScatterMap.kt\nKotlin\n*S Kotlin\n*F\n+ 1 ScatterMap.kt\nandroidx/collection/MutableScatterMap$MutableMapWrapper$entries$1$iterator$1$1\n+ 2 ScatterMap.kt\nandroidx/collection/ScatterMap\n+ 3 ScatterMap.kt\nandroidx/collection/ScatterMapKt\n*L\n1#1,1850:1\n363#2,6:1851\n373#2,3:1858\n376#2,9:1862\n1826#3:1857\n1688#3:1861\n*S KotlinDebug\n*F\n+ 1 ScatterMap.kt\nandroidx/collection/MutableScatterMap$MutableMapWrapper$entries$1$iterator$1$1\n*L\n1326#1:1851,6\n1326#1:1858,3\n1326#1:1862,9\n1326#1:1857\n1326#1:1861\n*E\n"})
/* renamed from: androidx.collection.MutableScatterMap$MutableMapWrapper$entries$1$iterator$1$1, reason: invalid class name */
public static final class AnonymousClass1 extends RestrictedSuspendLambda implements Function2 {
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;
Object L$3;
int label;
final /* synthetic */ MutableScatterMap<K, V> this$0;
final /* synthetic */ MutableScatterMap$MutableMapWrapper$entries$1$iterator$1 this$1;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public AnonymousClass1(MutableScatterMap mutableScatterMap, MutableScatterMap$MutableMapWrapper$entries$1$iterator$1 mutableScatterMap$MutableMapWrapper$entries$1$iterator$1, Continuation continuation) {
super(2, continuation);
this.this$0 = mutableScatterMap;
this.this$1 = mutableScatterMap$MutableMapWrapper$entries$1$iterator$1;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation create(Object obj, Continuation continuation) {
AnonymousClass1 anonymousClass1 = new AnonymousClass1(this.this$0, this.this$1, continuation);
anonymousClass1.L$0 = obj;
return anonymousClass1;
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(SequenceScope sequenceScope, Continuation continuation) {
return ((AnonymousClass1) create(sequenceScope, continuation)).invokeSuspend(Unit.INSTANCE);
}
/* JADX WARN: Removed duplicated region for block: B:16:0x00c6 */
/* JADX WARN: Removed duplicated region for block: B:20:0x00d9 */
/* JADX WARN: Removed duplicated region for block: B:23:0x005f */
/* JADX WARN: Removed duplicated region for block: B:24:0x00d5 */
/* JADX WARN: Removed duplicated region for block: B:8:0x0078 */
/* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:14:0x00b2 -> B:5:0x00b6). Please report as a decompilation issue!!! */
/* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:15:0x00bd -> B:6:0x00bf). Please report as a decompilation issue!!! */
/* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:23:0x005f -> B:7:0x0076). Please report as a decompilation issue!!! */
/* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:24:0x00d5 -> B:19:0x00d7). Please report as a decompilation issue!!! */
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final java.lang.Object invokeSuspend(java.lang.Object r24) {
/*
Method dump skipped, instructions count: 228
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.collection.MutableScatterMap$MutableMapWrapper$entries$1$iterator$1.AnonymousClass1.invokeSuspend(java.lang.Object):java.lang.Object");
}
}
@Override // java.util.Iterator
public boolean hasNext() {
return this.iterator.hasNext();
}
@Override // java.util.Iterator
public Map.Entry<K, V> next() {
return this.iterator.next();
}
@Override // java.util.Iterator
public void remove() {
int i = this.current;
if (i != -1) {
this.this$0.removeValueAt(i);
this.current = -1;
}
}
}

View File

@@ -0,0 +1,337 @@
package androidx.collection;
import java.util.Collection;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
import kotlin.jvm.internal.CollectionToArray;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlin.jvm.internal.TypeIntrinsics;
import kotlin.jvm.internal.markers.KMutableSet;
/* JADX INFO: Add missing generic type declarations: [V, K] */
@SourceDebugExtension({"SMAP\nScatterMap.kt\nKotlin\n*S Kotlin\n*F\n+ 1 ScatterMap.kt\nandroidx/collection/MutableScatterMap$MutableMapWrapper$entries$1\n+ 2 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n+ 3 ScatterMap.kt\nandroidx/collection/ScatterMap\n+ 4 ScatterMap.kt\nandroidx/collection/ScatterMapKt\n*L\n1#1,1850:1\n1726#2,3:1851\n363#3,6:1854\n373#3,3:1861\n376#3,9:1865\n363#3,6:1874\n373#3,3:1881\n376#3,9:1885\n633#3:1894\n634#3:1898\n636#3,2:1900\n638#3,4:1903\n642#3:1910\n643#3:1914\n644#3:1916\n645#3,4:1919\n651#3:1924\n652#3,8:1926\n1826#4:1860\n1688#4:1864\n1826#4:1880\n1688#4:1884\n1605#4,3:1895\n1619#4:1899\n1615#4:1902\n1795#4,3:1907\n1809#4,3:1911\n1733#4:1915\n1721#4:1917\n1715#4:1918\n1728#4:1923\n1818#4:1925\n*S KotlinDebug\n*F\n+ 1 ScatterMap.kt\nandroidx/collection/MutableScatterMap$MutableMapWrapper$entries$1\n*L\n1358#1:1851,3\n1376#1:1854,6\n1376#1:1861,3\n1376#1:1865,9\n1398#1:1874,6\n1398#1:1881,3\n1398#1:1885,9\n1413#1:1894\n1413#1:1898\n1413#1:1900,2\n1413#1:1903,4\n1413#1:1910\n1413#1:1914\n1413#1:1916\n1413#1:1919,4\n1413#1:1924\n1413#1:1926,8\n1376#1:1860\n1376#1:1864\n1398#1:1880\n1398#1:1884\n1413#1:1895,3\n1413#1:1899\n1413#1:1902\n1413#1:1907,3\n1413#1:1911,3\n1413#1:1915\n1413#1:1917\n1413#1:1918\n1413#1:1923\n1413#1:1925\n*E\n"})
/* loaded from: classes.dex */
public final class MutableScatterMap$MutableMapWrapper$entries$1<K, V> implements Set<Map.Entry<K, V>>, KMutableSet {
final /* synthetic */ MutableScatterMap<K, V> this$0;
@Override // java.util.Set, java.util.Collection
public Object[] toArray() {
return CollectionToArray.toArray(this);
}
@Override // java.util.Set, java.util.Collection
public <T> T[] toArray(T[] array) {
Intrinsics.checkNotNullParameter(array, "array");
return (T[]) CollectionToArray.toArray(this, array);
}
@Override // java.util.Set, java.util.Collection
public boolean removeAll(Collection<? extends Object> elements) {
boolean z;
int i;
Intrinsics.checkNotNullParameter(elements, "elements");
MutableScatterMap<K, V> mutableScatterMap = this.this$0;
long[] jArr = mutableScatterMap.metadata;
int length = jArr.length - 2;
if (length >= 0) {
int i2 = 0;
boolean z2 = false;
while (true) {
long j = jArr[i2];
if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
int i3 = 8;
int i4 = 8 - ((~(i2 - length)) >>> 31);
int i5 = 0;
while (i5 < i4) {
if ((255 & j) < 128) {
int i6 = (i2 << 3) + i5;
Iterator<? extends Object> it = elements.iterator();
while (true) {
if (!it.hasNext()) {
break;
}
Map.Entry entry = (Map.Entry) it.next();
if (Intrinsics.areEqual(entry.getKey(), mutableScatterMap.keys[i6]) && Intrinsics.areEqual(entry.getValue(), mutableScatterMap.values[i6])) {
mutableScatterMap.removeValueAt(i6);
z2 = true;
break;
}
}
i = 8;
} else {
i = i3;
}
j >>= i;
i5++;
i3 = i;
}
if (i4 != i3) {
return z2;
}
}
if (i2 == length) {
z = z2;
break;
}
i2++;
}
} else {
z = false;
}
return z;
}
@Override // java.util.Set, java.util.Collection
public boolean retainAll(Collection<? extends Object> elements) {
boolean z;
int i;
Intrinsics.checkNotNullParameter(elements, "elements");
MutableScatterMap<K, V> mutableScatterMap = this.this$0;
long[] jArr = mutableScatterMap.metadata;
int length = jArr.length - 2;
if (length >= 0) {
int i2 = 0;
boolean z2 = false;
while (true) {
long j = jArr[i2];
if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
int i3 = 8;
int i4 = 8 - ((~(i2 - length)) >>> 31);
int i5 = 0;
while (i5 < i4) {
if ((255 & j) < 128) {
int i6 = (i2 << 3) + i5;
Iterator<? extends Object> it = elements.iterator();
while (true) {
if (it.hasNext()) {
Map.Entry entry = (Map.Entry) it.next();
if (Intrinsics.areEqual(entry.getKey(), mutableScatterMap.keys[i6]) && Intrinsics.areEqual(entry.getValue(), mutableScatterMap.values[i6])) {
break;
}
} else {
mutableScatterMap.removeValueAt(i6);
z2 = true;
break;
}
}
i = 8;
} else {
i = i3;
}
j >>= i;
i5++;
i3 = i;
}
if (i4 != i3) {
return z2;
}
}
if (i2 == length) {
z = z2;
break;
}
i2++;
}
} else {
z = false;
}
return z;
}
public MutableScatterMap$MutableMapWrapper$entries$1(MutableScatterMap<K, V> mutableScatterMap) {
this.this$0 = mutableScatterMap;
}
@Override // java.util.Set, java.util.Collection
public final /* bridge */ boolean contains(Object obj) {
if (TypeIntrinsics.isMutableMapEntry(obj)) {
return contains((Map.Entry) obj);
}
return false;
}
@Override // java.util.Set, java.util.Collection
public final /* bridge */ boolean remove(Object obj) {
if (TypeIntrinsics.isMutableMapEntry(obj)) {
return remove((Map.Entry) obj);
}
return false;
}
@Override // java.util.Set, java.util.Collection
public final /* bridge */ int size() {
return getSize();
}
public int getSize() {
return this.this$0._size;
}
@Override // java.util.Set, java.util.Collection
public boolean isEmpty() {
return this.this$0.isEmpty();
}
@Override // java.util.Set, java.util.Collection, java.lang.Iterable
public Iterator<Map.Entry<K, V>> iterator() {
return new MutableScatterMap$MutableMapWrapper$entries$1$iterator$1(this.this$0);
}
@Override // java.util.Set, java.util.Collection
public void clear() {
this.this$0.clear();
}
/* JADX WARN: Multi-variable type inference failed */
@Override // java.util.Set, java.util.Collection
public boolean containsAll(Collection<? extends Object> elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
Collection<? extends Object> collection = elements;
MutableScatterMap<K, V> mutableScatterMap = this.this$0;
if (collection.isEmpty()) {
return true;
}
Iterator<T> it = collection.iterator();
while (it.hasNext()) {
Map.Entry entry = (Map.Entry) it.next();
if (!Intrinsics.areEqual(mutableScatterMap.get(entry.getKey()), entry.getValue())) {
return false;
}
}
return true;
}
public boolean contains(Map.Entry<K, V> element) {
Intrinsics.checkNotNullParameter(element, "element");
return Intrinsics.areEqual(this.this$0.get(element.getKey()), element.getValue());
}
@Override // java.util.Set, java.util.Collection
public boolean addAll(Collection<? extends Map.Entry<K, V>> elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
throw new UnsupportedOperationException();
}
@Override // java.util.Set, java.util.Collection
public boolean add(Map.Entry<K, V> element) {
Intrinsics.checkNotNullParameter(element, "element");
throw new UnsupportedOperationException();
}
/* JADX WARN: Code restructure failed: missing block: B:22:0x0079, code lost:
if (((r9 & ((~r9) << 6)) & (-9187201950435737472L)) == 0) goto L24;
*/
/* JADX WARN: Code restructure failed: missing block: B:25:0x007b, code lost:
r15 = -1;
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public boolean remove(java.util.Map.Entry<K, V> r20) {
/*
r19 = this;
r0 = r19
java.lang.String r1 = "element"
r2 = r20
kotlin.jvm.internal.Intrinsics.checkNotNullParameter(r2, r1)
androidx.collection.MutableScatterMap<K, V> r1 = r0.this$0
java.lang.Object r3 = r20.getKey()
if (r3 == 0) goto L16
int r5 = r3.hashCode()
goto L17
L16:
r5 = 0
L17:
r6 = -862048943(0xffffffffcc9e2d51, float:-8.293031E7)
int r5 = r5 * r6
int r6 = r5 << 16
r5 = r5 ^ r6
r6 = r5 & 127(0x7f, float:1.78E-43)
int r7 = r1._capacity
int r5 = r5 >>> 7
r5 = r5 & r7
r8 = 0
L26:
long[] r9 = r1.metadata
int r10 = r5 >> 3
r11 = r5 & 7
int r11 = r11 << 3
r12 = r9[r10]
long r12 = r12 >>> r11
r14 = 1
int r10 = r10 + r14
r15 = r9[r10]
int r9 = 64 - r11
long r9 = r15 << r9
long r14 = (long) r11
long r14 = -r14
r11 = 63
long r14 = r14 >> r11
long r9 = r9 & r14
long r9 = r9 | r12
long r11 = (long) r6
r13 = 72340172838076673(0x101010101010101, double:7.748604185489348E-304)
long r11 = r11 * r13
long r11 = r11 ^ r9
long r13 = r11 - r13
long r11 = ~r11
long r11 = r11 & r13
r13 = -9187201950435737472(0x8080808080808080, double:-2.937446524422997E-306)
long r11 = r11 & r13
L52:
r17 = 0
int r15 = (r11 > r17 ? 1 : (r11 == r17 ? 0 : -1))
if (r15 == 0) goto L72
int r15 = java.lang.Long.numberOfTrailingZeros(r11)
int r15 = r15 >> 3
int r15 = r15 + r5
r15 = r15 & r7
java.lang.Object[] r4 = r1.keys
r4 = r4[r15]
boolean r4 = kotlin.jvm.internal.Intrinsics.areEqual(r4, r3)
if (r4 == 0) goto L6b
goto L7c
L6b:
r17 = 1
long r17 = r11 - r17
long r11 = r11 & r17
goto L52
L72:
long r11 = ~r9
r4 = 6
long r11 = r11 << r4
long r9 = r9 & r11
long r9 = r9 & r13
int r4 = (r9 > r17 ? 1 : (r9 == r17 ? 0 : -1))
if (r4 == 0) goto L97
r15 = -1
L7c:
if (r15 < 0) goto L95
androidx.collection.MutableScatterMap<K, V> r1 = r0.this$0
java.lang.Object[] r1 = r1.values
r1 = r1[r15]
java.lang.Object r2 = r20.getValue()
boolean r1 = kotlin.jvm.internal.Intrinsics.areEqual(r1, r2)
if (r1 == 0) goto L95
androidx.collection.MutableScatterMap<K, V> r1 = r0.this$0
r1.removeValueAt(r15)
r1 = 1
return r1
L95:
r4 = 0
return r4
L97:
r4 = 0
int r8 = r8 + 8
int r5 = r5 + r8
r5 = r5 & r7
goto L26
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.collection.MutableScatterMap$MutableMapWrapper$entries$1.remove(java.util.Map$Entry):boolean");
}
}

View File

@@ -0,0 +1,171 @@
package androidx.collection;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.RestrictedSuspendLambda;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlin.sequences.SequenceScope;
@DebugMetadata(c = "androidx.collection.MutableScatterMap$MutableMapWrapper$keys$1$iterator$1$iterator$1", f = "ScatterMap.kt", l = {1431}, m = "invokeSuspend")
@SourceDebugExtension({"SMAP\nScatterMap.kt\nKotlin\n*S Kotlin\n*F\n+ 1 ScatterMap.kt\nandroidx/collection/MutableScatterMap$MutableMapWrapper$keys$1$iterator$1$iterator$1\n+ 2 ScatterMap.kt\nandroidx/collection/ScatterMap\n+ 3 ScatterMap.kt\nandroidx/collection/ScatterMapKt\n*L\n1#1,1850:1\n363#2,6:1851\n373#2,3:1858\n376#2,9:1862\n1826#3:1857\n1688#3:1861\n*S KotlinDebug\n*F\n+ 1 ScatterMap.kt\nandroidx/collection/MutableScatterMap$MutableMapWrapper$keys$1$iterator$1$iterator$1\n*L\n1430#1:1851,6\n1430#1:1858,3\n1430#1:1862,9\n1430#1:1857\n1430#1:1861\n*E\n"})
/* loaded from: classes.dex */
public final class MutableScatterMap$MutableMapWrapper$keys$1$iterator$1$iterator$1 extends RestrictedSuspendLambda implements Function2 {
int I$0;
int I$1;
int I$2;
int I$3;
long J$0;
private /* synthetic */ Object L$0;
Object L$1;
int label;
final /* synthetic */ MutableScatterMap<K, V> this$0;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public MutableScatterMap$MutableMapWrapper$keys$1$iterator$1$iterator$1(MutableScatterMap<K, V> mutableScatterMap, Continuation continuation) {
super(2, continuation);
this.this$0 = mutableScatterMap;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation create(Object obj, Continuation continuation) {
MutableScatterMap$MutableMapWrapper$keys$1$iterator$1$iterator$1 mutableScatterMap$MutableMapWrapper$keys$1$iterator$1$iterator$1 = new MutableScatterMap$MutableMapWrapper$keys$1$iterator$1$iterator$1(this.this$0, continuation);
mutableScatterMap$MutableMapWrapper$keys$1$iterator$1$iterator$1.L$0 = obj;
return mutableScatterMap$MutableMapWrapper$keys$1$iterator$1$iterator$1;
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(SequenceScope sequenceScope, Continuation continuation) {
return ((MutableScatterMap$MutableMapWrapper$keys$1$iterator$1$iterator$1) create(sequenceScope, continuation)).invokeSuspend(Unit.INSTANCE);
}
/* JADX WARN: Removed duplicated region for block: B:15:0x009f */
/* JADX WARN: Removed duplicated region for block: B:18:0x00a8 */
/* JADX WARN: Removed duplicated region for block: B:21:0x0054 */
/* JADX WARN: Removed duplicated region for block: B:8:0x006b */
/* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:14:0x0092 -> B:5:0x0097). Please report as a decompilation issue!!! */
/* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:20:0x0052 -> B:17:0x00a6). Please report as a decompilation issue!!! */
/* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:21:0x0054 -> B:7:0x0069). Please report as a decompilation issue!!! */
/* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:9:0x0072 -> B:6:0x009c). Please report as a decompilation issue!!! */
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final java.lang.Object invokeSuspend(java.lang.Object r22) {
/*
r21 = this;
r0 = r21
java.lang.Object r1 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()
int r2 = r0.label
r3 = 0
r4 = 8
r5 = 1
if (r2 == 0) goto L32
if (r2 != r5) goto L2a
int r2 = r0.I$3
int r6 = r0.I$2
long r7 = r0.J$0
int r9 = r0.I$1
int r10 = r0.I$0
java.lang.Object r11 = r0.L$1
long[] r11 = (long[]) r11
java.lang.Object r12 = r0.L$0
kotlin.sequences.SequenceScope r12 = (kotlin.sequences.SequenceScope) r12
kotlin.ResultKt.throwOnFailure(r22)
r13 = r12
r12 = r11
r11 = r0
goto L97
L2a:
java.lang.IllegalStateException r1 = new java.lang.IllegalStateException
java.lang.String r2 = "call to 'resume' before 'invoke' with coroutine"
r1.<init>(r2)
throw r1
L32:
kotlin.ResultKt.throwOnFailure(r22)
java.lang.Object r2 = r0.L$0
kotlin.sequences.SequenceScope r2 = (kotlin.sequences.SequenceScope) r2
androidx.collection.MutableScatterMap<K, V> r6 = r0.this$0
long[] r6 = r6.metadata
int r7 = r6.length
int r7 = r7 + (-2)
if (r7 < 0) goto Lab
r9 = r0
r8 = r3
L44:
r10 = r6[r8]
long r12 = ~r10
r14 = 7
long r12 = r12 << r14
long r12 = r12 & r10
r14 = -9187201950435737472(0x8080808080808080, double:-2.937446524422997E-306)
long r12 = r12 & r14
int r12 = (r12 > r14 ? 1 : (r12 == r14 ? 0 : -1))
if (r12 == 0) goto La6
int r12 = r8 - r7
int r12 = ~r12
int r12 = r12 >>> 31
int r12 = 8 - r12
r13 = r2
r2 = r3
r18 = r12
r12 = r6
r6 = r18
r19 = r10
r11 = r7
r10 = r9
r9 = r8
r7 = r19
L69:
if (r2 >= r6) goto L9f
r14 = 255(0xff, double:1.26E-321)
long r14 = r14 & r7
r16 = 128(0x80, double:6.3E-322)
int r14 = (r14 > r16 ? 1 : (r14 == r16 ? 0 : -1))
if (r14 >= 0) goto L9c
int r14 = r9 << 3
int r14 = r14 + r2
java.lang.Integer r14 = kotlin.coroutines.jvm.internal.Boxing.boxInt(r14)
r10.L$0 = r13
r10.L$1 = r12
r10.I$0 = r11
r10.I$1 = r9
r10.J$0 = r7
r10.I$2 = r6
r10.I$3 = r2
r10.label = r5
java.lang.Object r14 = r13.yield(r14, r10)
if (r14 != r1) goto L92
return r1
L92:
r18 = r11
r11 = r10
r10 = r18
L97:
r18 = r11
r11 = r10
r10 = r18
L9c:
long r7 = r7 >> r4
int r2 = r2 + r5
goto L69
L9f:
if (r6 != r4) goto Lab
r8 = r9
r9 = r10
r7 = r11
r6 = r12
r2 = r13
La6:
if (r8 == r7) goto Lab
int r8 = r8 + 1
goto L44
Lab:
kotlin.Unit r1 = kotlin.Unit.INSTANCE
return r1
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.collection.MutableScatterMap$MutableMapWrapper$keys$1$iterator$1$iterator$1.invokeSuspend(java.lang.Object):java.lang.Object");
}
}

View File

@@ -0,0 +1,42 @@
package androidx.collection;
import java.util.Iterator;
import kotlin.jvm.internal.markers.KMutableIterator;
import kotlin.sequences.SequencesKt__SequenceBuilderKt;
/* JADX INFO: Add missing generic type declarations: [K] */
/* loaded from: classes.dex */
public final class MutableScatterMap$MutableMapWrapper$keys$1$iterator$1<K> implements Iterator<K>, KMutableIterator {
private int current;
private final Iterator<Integer> iterator;
final /* synthetic */ MutableScatterMap<K, V> this$0;
public MutableScatterMap$MutableMapWrapper$keys$1$iterator$1(MutableScatterMap<K, V> mutableScatterMap) {
Iterator<Integer> it;
this.this$0 = mutableScatterMap;
it = SequencesKt__SequenceBuilderKt.iterator(new MutableScatterMap$MutableMapWrapper$keys$1$iterator$1$iterator$1(mutableScatterMap, null));
this.iterator = it;
this.current = -1;
}
@Override // java.util.Iterator
public boolean hasNext() {
return this.iterator.hasNext();
}
@Override // java.util.Iterator
public K next() {
int intValue = this.iterator.next().intValue();
this.current = intValue;
return (K) this.this$0.keys[intValue];
}
@Override // java.util.Iterator
public void remove() {
int i = this.current;
if (i >= 0) {
this.this$0.removeValueAt(i);
this.current = -1;
}
}
}

View File

@@ -0,0 +1,276 @@
package androidx.collection;
import java.util.Collection;
import java.util.Iterator;
import java.util.Set;
import kotlin.collections.CollectionsKt___CollectionsKt;
import kotlin.jvm.internal.CollectionToArray;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlin.jvm.internal.markers.KMutableSet;
/* JADX INFO: Add missing generic type declarations: [K] */
@SourceDebugExtension({"SMAP\nScatterMap.kt\nKotlin\n*S Kotlin\n*F\n+ 1 ScatterMap.kt\nandroidx/collection/MutableScatterMap$MutableMapWrapper$keys$1\n+ 2 ScatterMap.kt\nandroidx/collection/ScatterMap\n+ 3 ScatterMap.kt\nandroidx/collection/ScatterMapKt\n+ 4 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n*L\n1#1,1850:1\n363#2,6:1851\n373#2,3:1858\n376#2,9:1862\n363#2,6:1871\n373#2,3:1878\n376#2,9:1882\n633#2:1891\n634#2:1895\n636#2,2:1897\n638#2,4:1900\n642#2:1907\n643#2:1911\n644#2:1913\n645#2,4:1916\n651#2:1921\n652#2,8:1923\n1826#3:1857\n1688#3:1861\n1826#3:1877\n1688#3:1881\n1605#3,3:1892\n1619#3:1896\n1615#3:1899\n1795#3,3:1904\n1809#3,3:1908\n1733#3:1912\n1721#3:1914\n1715#3:1915\n1728#3:1920\n1818#3:1922\n1726#4,3:1931\n*S KotlinDebug\n*F\n+ 1 ScatterMap.kt\nandroidx/collection/MutableScatterMap$MutableMapWrapper$keys$1\n*L\n1466#1:1851,6\n1466#1:1858,3\n1466#1:1862,9\n1477#1:1871,6\n1477#1:1878,3\n1477#1:1882,9\n1487#1:1891\n1487#1:1895\n1487#1:1897,2\n1487#1:1900,4\n1487#1:1907\n1487#1:1911\n1487#1:1913\n1487#1:1916,4\n1487#1:1921\n1487#1:1923,8\n1466#1:1857\n1466#1:1861\n1477#1:1877\n1477#1:1881\n1487#1:1892,3\n1487#1:1896\n1487#1:1899\n1487#1:1904,3\n1487#1:1908,3\n1487#1:1912\n1487#1:1914\n1487#1:1915\n1487#1:1920\n1487#1:1922\n1496#1:1931,3\n*E\n"})
/* loaded from: classes.dex */
public final class MutableScatterMap$MutableMapWrapper$keys$1<K> implements Set<K>, KMutableSet {
final /* synthetic */ MutableScatterMap<K, V> this$0;
@Override // java.util.Set, java.util.Collection
public Object[] toArray() {
return CollectionToArray.toArray(this);
}
@Override // java.util.Set, java.util.Collection
public <T> T[] toArray(T[] array) {
Intrinsics.checkNotNullParameter(array, "array");
return (T[]) CollectionToArray.toArray(this, array);
}
@Override // java.util.Set, java.util.Collection
public boolean removeAll(Collection<? extends Object> elements) {
boolean contains;
Intrinsics.checkNotNullParameter(elements, "elements");
MutableScatterMap<K, V> mutableScatterMap = this.this$0;
long[] jArr = mutableScatterMap.metadata;
int length = jArr.length - 2;
boolean z = false;
if (length >= 0) {
int i = 0;
boolean z2 = false;
while (true) {
long j = jArr[i];
if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
int i2 = 8 - ((~(i - length)) >>> 31);
for (int i3 = 0; i3 < i2; i3++) {
if ((255 & j) < 128) {
int i4 = (i << 3) + i3;
contains = CollectionsKt___CollectionsKt.contains(elements, mutableScatterMap.keys[i4]);
if (contains) {
mutableScatterMap.removeValueAt(i4);
z2 = true;
}
}
j >>= 8;
}
if (i2 != 8) {
return z2;
}
}
if (i == length) {
z = z2;
break;
}
i++;
}
}
return z;
}
@Override // java.util.Set, java.util.Collection
public boolean retainAll(Collection<? extends Object> elements) {
boolean contains;
Intrinsics.checkNotNullParameter(elements, "elements");
MutableScatterMap<K, V> mutableScatterMap = this.this$0;
long[] jArr = mutableScatterMap.metadata;
int length = jArr.length - 2;
boolean z = false;
if (length >= 0) {
int i = 0;
boolean z2 = false;
while (true) {
long j = jArr[i];
if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
int i2 = 8 - ((~(i - length)) >>> 31);
for (int i3 = 0; i3 < i2; i3++) {
if ((255 & j) < 128) {
int i4 = (i << 3) + i3;
contains = CollectionsKt___CollectionsKt.contains(elements, mutableScatterMap.keys[i4]);
if (!contains) {
mutableScatterMap.removeValueAt(i4);
z2 = true;
}
}
j >>= 8;
}
if (i2 != 8) {
return z2;
}
}
if (i == length) {
z = z2;
break;
}
i++;
}
}
return z;
}
public MutableScatterMap$MutableMapWrapper$keys$1(MutableScatterMap<K, V> mutableScatterMap) {
this.this$0 = mutableScatterMap;
}
@Override // java.util.Set, java.util.Collection
public final /* bridge */ int size() {
return getSize();
}
public int getSize() {
return this.this$0._size;
}
@Override // java.util.Set, java.util.Collection
public boolean isEmpty() {
return this.this$0.isEmpty();
}
@Override // java.util.Set, java.util.Collection, java.lang.Iterable
public Iterator<K> iterator() {
return new MutableScatterMap$MutableMapWrapper$keys$1$iterator$1(this.this$0);
}
@Override // java.util.Set, java.util.Collection
public void clear() {
this.this$0.clear();
}
@Override // java.util.Set, java.util.Collection
public boolean addAll(Collection<? extends K> elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
throw new UnsupportedOperationException();
}
@Override // java.util.Set, java.util.Collection
public boolean add(K k) {
throw new UnsupportedOperationException();
}
/* JADX WARN: Multi-variable type inference failed */
@Override // java.util.Set, java.util.Collection
public boolean containsAll(Collection<? extends Object> elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
Collection<? extends Object> collection = elements;
MutableScatterMap<K, V> mutableScatterMap = this.this$0;
if (collection.isEmpty()) {
return true;
}
Iterator<T> it = collection.iterator();
while (it.hasNext()) {
if (!mutableScatterMap.containsKey(it.next())) {
return false;
}
}
return true;
}
@Override // java.util.Set, java.util.Collection
public boolean contains(Object obj) {
return this.this$0.containsKey(obj);
}
/* JADX WARN: Code restructure failed: missing block: B:19:0x0070, code lost:
if (((r8 & ((~r8) << 6)) & (-9187201950435737472L)) == 0) goto L22;
*/
/* JADX WARN: Code restructure failed: missing block: B:22:0x0072, code lost:
r12 = -1;
*/
@Override // java.util.Set, java.util.Collection
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public boolean remove(java.lang.Object r19) {
/*
r18 = this;
r0 = r18
r1 = r19
androidx.collection.MutableScatterMap<K, V> r2 = r0.this$0
if (r1 == 0) goto Ld
int r4 = r19.hashCode()
goto Le
Ld:
r4 = 0
Le:
r5 = -862048943(0xffffffffcc9e2d51, float:-8.293031E7)
int r4 = r4 * r5
int r5 = r4 << 16
r4 = r4 ^ r5
r5 = r4 & 127(0x7f, float:1.78E-43)
int r6 = r2._capacity
int r4 = r4 >>> 7
r4 = r4 & r6
r7 = 0
L1d:
long[] r8 = r2.metadata
int r9 = r4 >> 3
r10 = r4 & 7
int r10 = r10 << 3
r11 = r8[r9]
long r11 = r11 >>> r10
r13 = 1
int r9 = r9 + r13
r14 = r8[r9]
int r8 = 64 - r10
long r8 = r14 << r8
long r14 = (long) r10
long r14 = -r14
r10 = 63
long r14 = r14 >> r10
long r8 = r8 & r14
long r8 = r8 | r11
long r10 = (long) r5
r14 = 72340172838076673(0x101010101010101, double:7.748604185489348E-304)
long r10 = r10 * r14
long r10 = r10 ^ r8
long r14 = r10 - r14
long r10 = ~r10
long r10 = r10 & r14
r14 = -9187201950435737472(0x8080808080808080, double:-2.937446524422997E-306)
long r10 = r10 & r14
L49:
r16 = 0
int r12 = (r10 > r16 ? 1 : (r10 == r16 ? 0 : -1))
if (r12 == 0) goto L69
int r12 = java.lang.Long.numberOfTrailingZeros(r10)
int r12 = r12 >> 3
int r12 = r12 + r4
r12 = r12 & r6
java.lang.Object[] r3 = r2.keys
r3 = r3[r12]
boolean r3 = kotlin.jvm.internal.Intrinsics.areEqual(r3, r1)
if (r3 == 0) goto L62
goto L73
L62:
r16 = 1
long r16 = r10 - r16
long r10 = r10 & r16
goto L49
L69:
long r10 = ~r8
r3 = 6
long r10 = r10 << r3
long r8 = r8 & r10
long r8 = r8 & r14
int r3 = (r8 > r16 ? 1 : (r8 == r16 ? 0 : -1))
if (r3 == 0) goto L7d
r12 = -1
L73:
if (r12 < 0) goto L7b
androidx.collection.MutableScatterMap<K, V> r1 = r0.this$0
r1.removeValueAt(r12)
return r13
L7b:
r3 = 0
return r3
L7d:
r3 = 0
int r7 = r7 + 8
int r4 = r4 + r7
r4 = r4 & r6
goto L1d
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.collection.MutableScatterMap$MutableMapWrapper$keys$1.remove(java.lang.Object):boolean");
}
}

View File

@@ -0,0 +1,171 @@
package androidx.collection;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.RestrictedSuspendLambda;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlin.sequences.SequenceScope;
@DebugMetadata(c = "androidx.collection.MutableScatterMap$MutableMapWrapper$values$1$iterator$1$iterator$1", f = "ScatterMap.kt", l = {1511}, m = "invokeSuspend")
@SourceDebugExtension({"SMAP\nScatterMap.kt\nKotlin\n*S Kotlin\n*F\n+ 1 ScatterMap.kt\nandroidx/collection/MutableScatterMap$MutableMapWrapper$values$1$iterator$1$iterator$1\n+ 2 ScatterMap.kt\nandroidx/collection/ScatterMap\n+ 3 ScatterMap.kt\nandroidx/collection/ScatterMapKt\n*L\n1#1,1850:1\n363#2,6:1851\n373#2,3:1858\n376#2,9:1862\n1826#3:1857\n1688#3:1861\n*S KotlinDebug\n*F\n+ 1 ScatterMap.kt\nandroidx/collection/MutableScatterMap$MutableMapWrapper$values$1$iterator$1$iterator$1\n*L\n1510#1:1851,6\n1510#1:1858,3\n1510#1:1862,9\n1510#1:1857\n1510#1:1861\n*E\n"})
/* loaded from: classes.dex */
public final class MutableScatterMap$MutableMapWrapper$values$1$iterator$1$iterator$1 extends RestrictedSuspendLambda implements Function2 {
int I$0;
int I$1;
int I$2;
int I$3;
long J$0;
private /* synthetic */ Object L$0;
Object L$1;
int label;
final /* synthetic */ MutableScatterMap<K, V> this$0;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public MutableScatterMap$MutableMapWrapper$values$1$iterator$1$iterator$1(MutableScatterMap<K, V> mutableScatterMap, Continuation continuation) {
super(2, continuation);
this.this$0 = mutableScatterMap;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation create(Object obj, Continuation continuation) {
MutableScatterMap$MutableMapWrapper$values$1$iterator$1$iterator$1 mutableScatterMap$MutableMapWrapper$values$1$iterator$1$iterator$1 = new MutableScatterMap$MutableMapWrapper$values$1$iterator$1$iterator$1(this.this$0, continuation);
mutableScatterMap$MutableMapWrapper$values$1$iterator$1$iterator$1.L$0 = obj;
return mutableScatterMap$MutableMapWrapper$values$1$iterator$1$iterator$1;
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(SequenceScope sequenceScope, Continuation continuation) {
return ((MutableScatterMap$MutableMapWrapper$values$1$iterator$1$iterator$1) create(sequenceScope, continuation)).invokeSuspend(Unit.INSTANCE);
}
/* JADX WARN: Removed duplicated region for block: B:15:0x009f */
/* JADX WARN: Removed duplicated region for block: B:18:0x00a8 */
/* JADX WARN: Removed duplicated region for block: B:21:0x0054 */
/* JADX WARN: Removed duplicated region for block: B:8:0x006b */
/* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:14:0x0092 -> B:5:0x0097). Please report as a decompilation issue!!! */
/* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:20:0x0052 -> B:17:0x00a6). Please report as a decompilation issue!!! */
/* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:21:0x0054 -> B:7:0x0069). Please report as a decompilation issue!!! */
/* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:9:0x0072 -> B:6:0x009c). Please report as a decompilation issue!!! */
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final java.lang.Object invokeSuspend(java.lang.Object r22) {
/*
r21 = this;
r0 = r21
java.lang.Object r1 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()
int r2 = r0.label
r3 = 0
r4 = 8
r5 = 1
if (r2 == 0) goto L32
if (r2 != r5) goto L2a
int r2 = r0.I$3
int r6 = r0.I$2
long r7 = r0.J$0
int r9 = r0.I$1
int r10 = r0.I$0
java.lang.Object r11 = r0.L$1
long[] r11 = (long[]) r11
java.lang.Object r12 = r0.L$0
kotlin.sequences.SequenceScope r12 = (kotlin.sequences.SequenceScope) r12
kotlin.ResultKt.throwOnFailure(r22)
r13 = r12
r12 = r11
r11 = r0
goto L97
L2a:
java.lang.IllegalStateException r1 = new java.lang.IllegalStateException
java.lang.String r2 = "call to 'resume' before 'invoke' with coroutine"
r1.<init>(r2)
throw r1
L32:
kotlin.ResultKt.throwOnFailure(r22)
java.lang.Object r2 = r0.L$0
kotlin.sequences.SequenceScope r2 = (kotlin.sequences.SequenceScope) r2
androidx.collection.MutableScatterMap<K, V> r6 = r0.this$0
long[] r6 = r6.metadata
int r7 = r6.length
int r7 = r7 + (-2)
if (r7 < 0) goto Lab
r9 = r0
r8 = r3
L44:
r10 = r6[r8]
long r12 = ~r10
r14 = 7
long r12 = r12 << r14
long r12 = r12 & r10
r14 = -9187201950435737472(0x8080808080808080, double:-2.937446524422997E-306)
long r12 = r12 & r14
int r12 = (r12 > r14 ? 1 : (r12 == r14 ? 0 : -1))
if (r12 == 0) goto La6
int r12 = r8 - r7
int r12 = ~r12
int r12 = r12 >>> 31
int r12 = 8 - r12
r13 = r2
r2 = r3
r18 = r12
r12 = r6
r6 = r18
r19 = r10
r11 = r7
r10 = r9
r9 = r8
r7 = r19
L69:
if (r2 >= r6) goto L9f
r14 = 255(0xff, double:1.26E-321)
long r14 = r14 & r7
r16 = 128(0x80, double:6.3E-322)
int r14 = (r14 > r16 ? 1 : (r14 == r16 ? 0 : -1))
if (r14 >= 0) goto L9c
int r14 = r9 << 3
int r14 = r14 + r2
java.lang.Integer r14 = kotlin.coroutines.jvm.internal.Boxing.boxInt(r14)
r10.L$0 = r13
r10.L$1 = r12
r10.I$0 = r11
r10.I$1 = r9
r10.J$0 = r7
r10.I$2 = r6
r10.I$3 = r2
r10.label = r5
java.lang.Object r14 = r13.yield(r14, r10)
if (r14 != r1) goto L92
return r1
L92:
r18 = r11
r11 = r10
r10 = r18
L97:
r18 = r11
r11 = r10
r10 = r18
L9c:
long r7 = r7 >> r4
int r2 = r2 + r5
goto L69
L9f:
if (r6 != r4) goto Lab
r8 = r9
r9 = r10
r7 = r11
r6 = r12
r2 = r13
La6:
if (r8 == r7) goto Lab
int r8 = r8 + 1
goto L44
Lab:
kotlin.Unit r1 = kotlin.Unit.INSTANCE
return r1
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.collection.MutableScatterMap$MutableMapWrapper$values$1$iterator$1$iterator$1.invokeSuspend(java.lang.Object):java.lang.Object");
}
}

View File

@@ -0,0 +1,42 @@
package androidx.collection;
import java.util.Iterator;
import kotlin.jvm.internal.markers.KMutableIterator;
import kotlin.sequences.SequencesKt__SequenceBuilderKt;
/* JADX INFO: Add missing generic type declarations: [V] */
/* loaded from: classes.dex */
public final class MutableScatterMap$MutableMapWrapper$values$1$iterator$1<V> implements Iterator<V>, KMutableIterator {
private int current;
private final Iterator<Integer> iterator;
final /* synthetic */ MutableScatterMap<K, V> this$0;
public MutableScatterMap$MutableMapWrapper$values$1$iterator$1(MutableScatterMap<K, V> mutableScatterMap) {
Iterator<Integer> it;
this.this$0 = mutableScatterMap;
it = SequencesKt__SequenceBuilderKt.iterator(new MutableScatterMap$MutableMapWrapper$values$1$iterator$1$iterator$1(mutableScatterMap, null));
this.iterator = it;
this.current = -1;
}
@Override // java.util.Iterator
public boolean hasNext() {
return this.iterator.hasNext();
}
@Override // java.util.Iterator
public V next() {
int intValue = this.iterator.next().intValue();
this.current = intValue;
return (V) this.this$0.values[intValue];
}
@Override // java.util.Iterator
public void remove() {
int i = this.current;
if (i >= 0) {
this.this$0.removeValueAt(i);
this.current = -1;
}
}
}

View File

@@ -0,0 +1,203 @@
package androidx.collection;
import java.util.Collection;
import java.util.Iterator;
import kotlin.collections.CollectionsKt___CollectionsKt;
import kotlin.jvm.internal.CollectionToArray;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlin.jvm.internal.markers.KMutableCollection;
/* JADX INFO: Add missing generic type declarations: [V] */
@SourceDebugExtension({"SMAP\nScatterMap.kt\nKotlin\n*S Kotlin\n*F\n+ 1 ScatterMap.kt\nandroidx/collection/MutableScatterMap$MutableMapWrapper$values$1\n+ 2 ScatterMap.kt\nandroidx/collection/ScatterMap\n+ 3 ScatterMap.kt\nandroidx/collection/ScatterMapKt\n+ 4 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n*L\n1#1,1850:1\n363#2,6:1851\n373#2,3:1858\n376#2,9:1862\n363#2,6:1871\n373#2,3:1878\n376#2,9:1882\n363#2,6:1891\n373#2,3:1898\n376#2,9:1902\n1826#3:1857\n1688#3:1861\n1826#3:1877\n1688#3:1881\n1826#3:1897\n1688#3:1901\n1726#4,3:1911\n*S KotlinDebug\n*F\n+ 1 ScatterMap.kt\nandroidx/collection/MutableScatterMap$MutableMapWrapper$values$1\n*L\n1546#1:1851,6\n1546#1:1858,3\n1546#1:1862,9\n1557#1:1871,6\n1557#1:1878,3\n1557#1:1882,9\n1567#1:1891,6\n1567#1:1898,3\n1567#1:1902,9\n1546#1:1857\n1546#1:1861\n1557#1:1877\n1557#1:1881\n1567#1:1897\n1567#1:1901\n1577#1:1911,3\n*E\n"})
/* loaded from: classes.dex */
public final class MutableScatterMap$MutableMapWrapper$values$1<V> implements Collection<V>, KMutableCollection {
final /* synthetic */ MutableScatterMap<K, V> this$0;
@Override // java.util.Collection
public Object[] toArray() {
return CollectionToArray.toArray(this);
}
@Override // java.util.Collection
public <T> T[] toArray(T[] array) {
Intrinsics.checkNotNullParameter(array, "array");
return (T[]) CollectionToArray.toArray(this, array);
}
@Override // java.util.Collection
public boolean remove(Object obj) {
MutableScatterMap<K, V> mutableScatterMap = this.this$0;
long[] jArr = mutableScatterMap.metadata;
int length = jArr.length - 2;
if (length >= 0) {
int i = 0;
while (true) {
long j = jArr[i];
if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
int i2 = 8 - ((~(i - length)) >>> 31);
for (int i3 = 0; i3 < i2; i3++) {
if ((255 & j) < 128) {
int i4 = (i << 3) + i3;
if (Intrinsics.areEqual(mutableScatterMap.values[i4], obj)) {
mutableScatterMap.removeValueAt(i4);
return true;
}
}
j >>= 8;
}
if (i2 != 8) {
break;
}
}
if (i == length) {
break;
}
i++;
}
}
return false;
}
@Override // java.util.Collection
public boolean removeAll(Collection<? extends Object> elements) {
boolean contains;
Intrinsics.checkNotNullParameter(elements, "elements");
MutableScatterMap<K, V> mutableScatterMap = this.this$0;
long[] jArr = mutableScatterMap.metadata;
int length = jArr.length - 2;
boolean z = false;
if (length >= 0) {
int i = 0;
boolean z2 = false;
while (true) {
long j = jArr[i];
if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
int i2 = 8 - ((~(i - length)) >>> 31);
for (int i3 = 0; i3 < i2; i3++) {
if ((255 & j) < 128) {
int i4 = (i << 3) + i3;
contains = CollectionsKt___CollectionsKt.contains(elements, mutableScatterMap.values[i4]);
if (contains) {
mutableScatterMap.removeValueAt(i4);
z2 = true;
}
}
j >>= 8;
}
if (i2 != 8) {
return z2;
}
}
if (i == length) {
z = z2;
break;
}
i++;
}
}
return z;
}
@Override // java.util.Collection
public boolean retainAll(Collection<? extends Object> elements) {
boolean contains;
Intrinsics.checkNotNullParameter(elements, "elements");
MutableScatterMap<K, V> mutableScatterMap = this.this$0;
long[] jArr = mutableScatterMap.metadata;
int length = jArr.length - 2;
boolean z = false;
if (length >= 0) {
int i = 0;
boolean z2 = false;
while (true) {
long j = jArr[i];
if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
int i2 = 8 - ((~(i - length)) >>> 31);
for (int i3 = 0; i3 < i2; i3++) {
if ((255 & j) < 128) {
int i4 = (i << 3) + i3;
contains = CollectionsKt___CollectionsKt.contains(elements, mutableScatterMap.values[i4]);
if (!contains) {
mutableScatterMap.removeValueAt(i4);
z2 = true;
}
}
j >>= 8;
}
if (i2 != 8) {
return z2;
}
}
if (i == length) {
z = z2;
break;
}
i++;
}
}
return z;
}
public MutableScatterMap$MutableMapWrapper$values$1(MutableScatterMap<K, V> mutableScatterMap) {
this.this$0 = mutableScatterMap;
}
@Override // java.util.Collection
public final /* bridge */ int size() {
return getSize();
}
public int getSize() {
return this.this$0._size;
}
@Override // java.util.Collection
public boolean isEmpty() {
return this.this$0.isEmpty();
}
@Override // java.util.Collection, java.lang.Iterable
public Iterator<V> iterator() {
return new MutableScatterMap$MutableMapWrapper$values$1$iterator$1(this.this$0);
}
@Override // java.util.Collection
public void clear() {
this.this$0.clear();
}
@Override // java.util.Collection
public boolean addAll(Collection<? extends V> elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
throw new UnsupportedOperationException();
}
@Override // java.util.Collection
public boolean add(V v) {
throw new UnsupportedOperationException();
}
/* JADX WARN: Multi-variable type inference failed */
@Override // java.util.Collection
public boolean containsAll(Collection<? extends Object> elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
Collection<? extends Object> collection = elements;
MutableScatterMap<K, V> mutableScatterMap = this.this$0;
if (collection.isEmpty()) {
return true;
}
Iterator<T> it = collection.iterator();
while (it.hasNext()) {
if (!mutableScatterMap.containsValue(it.next())) {
return false;
}
}
return true;
}
@Override // java.util.Collection
public boolean contains(Object obj) {
return this.this$0.containsValue(obj);
}
}

View File

@@ -0,0 +1,756 @@
package androidx.collection;
import java.util.Collection;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
import kotlin.Pair;
import kotlin.ULong;
import kotlin.collections.ArraysKt___ArraysJvmKt;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlin.jvm.internal.markers.KMutableMap;
import kotlin.sequences.Sequence;
@SourceDebugExtension({"SMAP\nScatterMap.kt\nKotlin\n*S Kotlin\n*F\n+ 1 ScatterMap.kt\nandroidx/collection/MutableScatterMap\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n+ 3 ScatterMap.kt\nandroidx/collection/ScatterMapKt\n+ 4 _Maps.kt\nkotlin/collections/MapsKt___MapsKt\n+ 5 ScatterMap.kt\nandroidx/collection/ScatterMap\n+ 6 ScatterSet.kt\nandroidx/collection/ScatterSet\n+ 7 ObjectList.kt\nandroidx/collection/ObjectList\n*L\n1#1,1850:1\n1284#1,2:2019\n1288#1,5:2027\n1284#1,2:2058\n1288#1,5:2066\n1284#1,2:2083\n1288#1,5:2091\n1284#1,2:2097\n1288#1,5:2105\n1#2:1851\n1672#3,6:1852\n1826#3:1870\n1688#3:1874\n1605#3,3:1887\n1619#3:1891\n1615#3:1894\n1795#3,3:1899\n1809#3,3:1903\n1733#3:1907\n1721#3:1909\n1715#3:1910\n1728#3:1915\n1818#3:1917\n1605#3,3:1927\n1619#3:1931\n1615#3:1934\n1795#3,3:1939\n1809#3,3:1943\n1733#3:1947\n1721#3:1949\n1715#3:1950\n1728#3:1955\n1818#3:1957\n1826#3:1972\n1688#3:1976\n1826#3:1997\n1688#3:2001\n1672#3,6:2021\n1672#3,6:2032\n1605#3,3:2038\n1615#3:2041\n1619#3:2042\n1795#3,3:2043\n1809#3,3:2046\n1733#3:2049\n1721#3:2050\n1715#3:2051\n1728#3:2052\n1818#3:2053\n1682#3:2054\n1661#3:2055\n1680#3:2056\n1661#3:2057\n1672#3,6:2060\n1795#3,3:2071\n1826#3:2074\n1715#3:2075\n1685#3:2076\n1661#3:2077\n1605#3,3:2078\n1615#3:2081\n1619#3:2082\n1672#3,6:2085\n1661#3:2096\n1672#3,6:2099\n1672#3,6:2110\n1672#3,6:2116\n215#4,2:1858\n391#5,4:1860\n363#5,6:1864\n373#5,3:1871\n376#5,2:1875\n396#5,2:1877\n379#5,6:1879\n398#5:1885\n633#5:1886\n634#5:1890\n636#5,2:1892\n638#5,4:1895\n642#5:1902\n643#5:1906\n644#5:1908\n645#5,4:1911\n651#5:1916\n652#5,8:1918\n633#5:1926\n634#5:1930\n636#5,2:1932\n638#5,4:1935\n642#5:1942\n643#5:1946\n644#5:1948\n645#5,4:1951\n651#5:1956\n652#5,8:1958\n363#5,6:1966\n373#5,3:1973\n376#5,9:1977\n267#6,4:1986\n237#6,7:1990\n248#6,3:1998\n251#6,2:2002\n272#6,2:2004\n254#6,6:2006\n274#6:2012\n305#7,6:2013\n*S KotlinDebug\n*F\n+ 1 ScatterMap.kt\nandroidx/collection/MutableScatterMap\n*L\n1113#1:2019,2\n1113#1:2027,5\n1180#1:2058,2\n1180#1:2066,5\n1254#1:2083,2\n1254#1:2091,5\n1270#1:2097,2\n1270#1:2105,5\n848#1:1852,6\n972#1:1870\n972#1:1874\n1021#1:1887,3\n1021#1:1891\n1021#1:1894\n1021#1:1899,3\n1021#1:1903,3\n1021#1:1907\n1021#1:1909\n1021#1:1910\n1021#1:1915\n1021#1:1917\n1033#1:1927,3\n1033#1:1931\n1033#1:1934\n1033#1:1939,3\n1033#1:1943,3\n1033#1:1947\n1033#1:1949\n1033#1:1950\n1033#1:1955\n1033#1:1957\n1047#1:1972\n1047#1:1976\n1093#1:1997\n1093#1:2001\n1113#1:2021,6\n1129#1:2032,6\n1145#1:2038,3\n1146#1:2041\n1147#1:2042\n1154#1:2043,3\n1155#1:2046,3\n1156#1:2049\n1157#1:2050\n1157#1:2051\n1161#1:2052\n1164#1:2053\n1173#1:2054\n1173#1:2055\n1179#1:2056\n1179#1:2057\n1180#1:2060,6\n1195#1:2071,3\n1196#1:2074\n1198#1:2075\n1249#1:2076\n1249#1:2077\n1251#1:2078,3\n1252#1:2081\n1254#1:2082\n1254#1:2085,6\n1268#1:2096\n1270#1:2099,6\n1285#1:2110,6\n1291#1:2116,6\n963#1:1858,2\n972#1:1860,4\n972#1:1864,6\n972#1:1871,3\n972#1:1875,2\n972#1:1877,2\n972#1:1879,6\n972#1:1885\n1021#1:1886\n1021#1:1890\n1021#1:1892,2\n1021#1:1895,4\n1021#1:1902\n1021#1:1906\n1021#1:1908\n1021#1:1911,4\n1021#1:1916\n1021#1:1918,8\n1033#1:1926\n1033#1:1930\n1033#1:1932,2\n1033#1:1935,4\n1033#1:1942\n1033#1:1946\n1033#1:1948\n1033#1:1951,4\n1033#1:1956\n1033#1:1958,8\n1047#1:1966,6\n1047#1:1973,3\n1047#1:1977,9\n1093#1:1986,4\n1093#1:1990,7\n1093#1:1998,3\n1093#1:2002,2\n1093#1:2004,2\n1093#1:2006,6\n1093#1:2012\n1102#1:2013,6\n*E\n"})
/* loaded from: classes.dex */
public final class MutableScatterMap<K, V> extends ScatterMap<K, V> {
private int growthLimit;
public MutableScatterMap() {
this(0, 1, null);
}
@SourceDebugExtension({"SMAP\nScatterMap.kt\nKotlin\n*S Kotlin\n*F\n+ 1 ScatterMap.kt\nandroidx/collection/MutableScatterMap$MutableMapWrapper\n+ 2 _Maps.kt\nkotlin/collections/MapsKt___MapsKt\n*L\n1#1,1850:1\n215#2,2:1851\n*S KotlinDebug\n*F\n+ 1 ScatterMap.kt\nandroidx/collection/MutableScatterMap$MutableMapWrapper\n*L\n1590#1:1851,2\n*E\n"})
public final class MutableMapWrapper extends ScatterMap<K, V>.MapWrapper implements Map<K, V>, KMutableMap {
@Override // androidx.collection.ScatterMap.MapWrapper, java.util.Map
public void putAll(Map<? extends K, ? extends V> from) {
Intrinsics.checkNotNullParameter(from, "from");
for (Map.Entry<? extends K, ? extends V> entry : from.entrySet()) {
put(entry.getKey(), entry.getValue());
}
}
public MutableMapWrapper() {
super();
}
@Override // androidx.collection.ScatterMap.MapWrapper
public Set<Map.Entry<K, V>> getEntries() {
return new MutableScatterMap$MutableMapWrapper$entries$1(MutableScatterMap.this);
}
@Override // androidx.collection.ScatterMap.MapWrapper
public Set<K> getKeys() {
return new MutableScatterMap$MutableMapWrapper$keys$1(MutableScatterMap.this);
}
@Override // androidx.collection.ScatterMap.MapWrapper
public Collection<V> getValues() {
return new MutableScatterMap$MutableMapWrapper$values$1(MutableScatterMap.this);
}
@Override // androidx.collection.ScatterMap.MapWrapper, java.util.Map
public void clear() {
MutableScatterMap.this.clear();
}
@Override // androidx.collection.ScatterMap.MapWrapper, java.util.Map
public V remove(Object obj) {
return MutableScatterMap.this.remove(obj);
}
@Override // androidx.collection.ScatterMap.MapWrapper, java.util.Map
public V put(K k, V v) {
return MutableScatterMap.this.put(k, v);
}
}
public final void putAll(Map<K, ? extends V> from) {
Intrinsics.checkNotNullParameter(from, "from");
for (Map.Entry<K, ? extends V> entry : from.entrySet()) {
set(entry.getKey(), entry.getValue());
}
}
/* JADX WARN: Multi-variable type inference failed */
public final void minusAssign(ScatterSet<K> keys) {
Intrinsics.checkNotNullParameter(keys, "keys");
Object[] objArr = keys.elements;
long[] jArr = keys.metadata;
int length = jArr.length - 2;
if (length < 0) {
return;
}
int i = 0;
while (true) {
long j = jArr[i];
if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
int i2 = 8 - ((~(i - length)) >>> 31);
for (int i3 = 0; i3 < i2; i3++) {
if ((255 & j) < 128) {
remove(objArr[(i << 3) + i3]);
}
j >>= 8;
}
if (i2 != 8) {
return;
}
}
if (i == length) {
return;
} else {
i++;
}
}
}
/* JADX WARN: Multi-variable type inference failed */
public final void minusAssign(ObjectList<K> keys) {
Intrinsics.checkNotNullParameter(keys, "keys");
Object[] objArr = keys.content;
int i = keys._size;
for (int i2 = 0; i2 < i; i2++) {
remove(objArr[i2]);
}
}
public final void removeIf(Function2 predicate) {
Intrinsics.checkNotNullParameter(predicate, "predicate");
long[] jArr = this.metadata;
int length = jArr.length - 2;
if (length < 0) {
return;
}
int i = 0;
while (true) {
long j = jArr[i];
if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
int i2 = 8 - ((~(i - length)) >>> 31);
for (int i3 = 0; i3 < i2; i3++) {
if ((255 & j) < 128) {
int i4 = (i << 3) + i3;
if (((Boolean) predicate.invoke(this.keys[i4], this.values[i4])).booleanValue()) {
removeValueAt(i4);
}
}
j >>= 8;
}
if (i2 != 8) {
return;
}
}
if (i == length) {
return;
} else {
i++;
}
}
}
/* JADX WARN: Multi-variable type inference failed */
public final void putAll(ScatterMap<K, V> from) {
Intrinsics.checkNotNullParameter(from, "from");
Object[] objArr = from.keys;
Object[] objArr2 = from.values;
long[] jArr = from.metadata;
int length = jArr.length - 2;
if (length < 0) {
return;
}
int i = 0;
while (true) {
long j = jArr[i];
if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
int i2 = 8 - ((~(i - length)) >>> 31);
for (int i3 = 0; i3 < i2; i3++) {
if ((255 & j) < 128) {
int i4 = (i << 3) + i3;
set(objArr[i4], objArr2[i4]);
}
j >>= 8;
}
if (i2 != 8) {
return;
}
}
if (i == length) {
return;
} else {
i++;
}
}
}
public /* synthetic */ MutableScatterMap(int i, int i2, DefaultConstructorMarker defaultConstructorMarker) {
this((i2 & 1) != 0 ? 6 : i);
}
public MutableScatterMap(int i) {
super(null);
if (i < 0) {
throw new IllegalArgumentException("Capacity must be a positive value.".toString());
}
initializeStorage(ScatterMapKt.unloadedCapacity(i));
}
private final void initializeStorage(int i) {
int max = i > 0 ? Math.max(7, ScatterMapKt.normalizeCapacity(i)) : 0;
this._capacity = max;
initializeMetadata(max);
this.keys = new Object[max];
this.values = new Object[max];
}
private final void initializeMetadata(int i) {
long[] jArr;
if (i == 0) {
jArr = ScatterMapKt.EmptyGroup;
} else {
jArr = new long[((i + 15) & (-8)) >> 3];
ArraysKt___ArraysJvmKt.fill$default(jArr, -9187201950435737472L, 0, 0, 6, (Object) null);
}
this.metadata = jArr;
int i2 = i >> 3;
long j = 255 << ((i & 7) << 3);
jArr[i2] = (jArr[i2] & (~j)) | j;
initializeGrowth();
}
private final void initializeGrowth() {
this.growthLimit = ScatterMapKt.loadedCapacity(getCapacity()) - this._size;
}
public final V getOrPut(K k, Function0 defaultValue) {
Intrinsics.checkNotNullParameter(defaultValue, "defaultValue");
V v = get(k);
if (v != null) {
return v;
}
V v2 = (V) defaultValue.invoke();
set(k, v2);
return v2;
}
public final V compute(K k, Function2 computeBlock) {
Intrinsics.checkNotNullParameter(computeBlock, "computeBlock");
int findInsertIndex = findInsertIndex(k);
boolean z = findInsertIndex < 0;
V v = (V) computeBlock.invoke(k, z ? null : this.values[findInsertIndex]);
if (z) {
int i = ~findInsertIndex;
this.keys[i] = k;
this.values[i] = v;
} else {
this.values[findInsertIndex] = v;
}
return v;
}
public final void set(K k, V v) {
int findInsertIndex = findInsertIndex(k);
if (findInsertIndex < 0) {
findInsertIndex = ~findInsertIndex;
}
this.keys[findInsertIndex] = k;
this.values[findInsertIndex] = v;
}
public final V put(K k, V v) {
int findInsertIndex = findInsertIndex(k);
if (findInsertIndex < 0) {
findInsertIndex = ~findInsertIndex;
}
Object[] objArr = this.values;
V v2 = (V) objArr[findInsertIndex];
this.keys[findInsertIndex] = k;
objArr[findInsertIndex] = v;
return v2;
}
/* JADX WARN: Multi-variable type inference failed */
public final void putAll(Pair[] pairs) {
Intrinsics.checkNotNullParameter(pairs, "pairs");
for (Pair pair : pairs) {
set(pair.component1(), pair.component2());
}
}
/* JADX WARN: Multi-variable type inference failed */
public final void putAll(Iterable<? extends Pair> pairs) {
Intrinsics.checkNotNullParameter(pairs, "pairs");
for (Pair pair : pairs) {
set(pair.component1(), pair.component2());
}
}
/* JADX WARN: Multi-variable type inference failed */
public final void putAll(Sequence pairs) {
Intrinsics.checkNotNullParameter(pairs, "pairs");
Iterator it = pairs.iterator();
while (it.hasNext()) {
Pair pair = (Pair) it.next();
set(pair.component1(), pair.component2());
}
}
/* JADX WARN: Multi-variable type inference failed */
public final void plusAssign(Pair pair) {
Intrinsics.checkNotNullParameter(pair, "pair");
set(pair.getFirst(), pair.getSecond());
}
public final void plusAssign(Pair[] pairs) {
Intrinsics.checkNotNullParameter(pairs, "pairs");
putAll(pairs);
}
public final void plusAssign(Iterable<? extends Pair> pairs) {
Intrinsics.checkNotNullParameter(pairs, "pairs");
putAll(pairs);
}
public final void plusAssign(Sequence pairs) {
Intrinsics.checkNotNullParameter(pairs, "pairs");
putAll(pairs);
}
public final void plusAssign(Map<K, ? extends V> from) {
Intrinsics.checkNotNullParameter(from, "from");
putAll(from);
}
public final void plusAssign(ScatterMap<K, V> from) {
Intrinsics.checkNotNullParameter(from, "from");
putAll(from);
}
public final void minusAssign(K k) {
remove(k);
}
public final void minusAssign(K[] keys) {
Intrinsics.checkNotNullParameter(keys, "keys");
for (K k : keys) {
remove(k);
}
}
public final void minusAssign(Iterable<? extends K> keys) {
Intrinsics.checkNotNullParameter(keys, "keys");
Iterator<? extends K> it = keys.iterator();
while (it.hasNext()) {
remove(it.next());
}
}
/* JADX WARN: Multi-variable type inference failed */
public final void minusAssign(Sequence keys) {
Intrinsics.checkNotNullParameter(keys, "keys");
Iterator it = keys.iterator();
while (it.hasNext()) {
remove(it.next());
}
}
public final void clear() {
this._size = 0;
long[] jArr = this.metadata;
if (jArr != ScatterMapKt.EmptyGroup) {
ArraysKt___ArraysJvmKt.fill$default(jArr, -9187201950435737472L, 0, 0, 6, (Object) null);
long[] jArr2 = this.metadata;
int i = this._capacity;
int i2 = i >> 3;
long j = 255 << ((i & 7) << 3);
jArr2[i2] = (jArr2[i2] & (~j)) | j;
}
ArraysKt___ArraysJvmKt.fill(this.values, (Object) null, 0, this._capacity);
ArraysKt___ArraysJvmKt.fill(this.keys, (Object) null, 0, this._capacity);
initializeGrowth();
}
public final int trim() {
int i = this._capacity;
int normalizeCapacity = ScatterMapKt.normalizeCapacity(ScatterMapKt.unloadedCapacity(this._size));
if (normalizeCapacity >= i) {
return 0;
}
resizeStorage(normalizeCapacity);
return i - this._capacity;
}
private final void adjustStorage() {
if (this._capacity > 8 && Long.compareUnsigned(ULong.m4068constructorimpl(ULong.m4068constructorimpl(this._size) * 32), ULong.m4068constructorimpl(ULong.m4068constructorimpl(this._capacity) * 25)) <= 0) {
resizeStorage(this._capacity);
} else {
resizeStorage(ScatterMapKt.nextCapacity(this._capacity));
}
}
private final void resizeStorage(int i) {
int i2;
long[] jArr = this.metadata;
Object[] objArr = this.keys;
Object[] objArr2 = this.values;
int i3 = this._capacity;
initializeStorage(i);
Object[] objArr3 = this.keys;
Object[] objArr4 = this.values;
int i4 = 0;
while (i4 < i3) {
if (((jArr[i4 >> 3] >> ((i4 & 7) << 3)) & 255) < 128) {
Object obj = objArr[i4];
int hashCode = (obj != null ? obj.hashCode() : 0) * ScatterMapKt.MurmurHashC1;
int i5 = hashCode ^ (hashCode << 16);
int findFirstAvailableSlot = findFirstAvailableSlot(i5 >>> 7);
long j = i5 & 127;
long[] jArr2 = this.metadata;
int i6 = findFirstAvailableSlot >> 3;
int i7 = (findFirstAvailableSlot & 7) << 3;
i2 = i4;
jArr2[i6] = (jArr2[i6] & (~(255 << i7))) | (j << i7);
int i8 = this._capacity;
int i9 = ((findFirstAvailableSlot - 7) & i8) + (i8 & 7);
int i10 = i9 >> 3;
int i11 = (i9 & 7) << 3;
jArr2[i10] = (jArr2[i10] & (~(255 << i11))) | (j << i11);
objArr3[findFirstAvailableSlot] = obj;
objArr4[findFirstAvailableSlot] = objArr2[i2];
} else {
i2 = i4;
}
i4 = i2 + 1;
}
}
public final Map<K, V> asMutableMap() {
return new MutableMapWrapper();
}
public final int findInsertIndex(K k) {
int hashCode = (k != null ? k.hashCode() : 0) * ScatterMapKt.MurmurHashC1;
int i = hashCode ^ (hashCode << 16);
int i2 = i >>> 7;
int i3 = i & 127;
int i4 = this._capacity;
int i5 = i2 & i4;
int i6 = 0;
while (true) {
long[] jArr = this.metadata;
int i7 = i5 >> 3;
int i8 = (i5 & 7) << 3;
long j = ((jArr[i7 + 1] << (64 - i8)) & ((-i8) >> 63)) | (jArr[i7] >>> i8);
long j2 = i3;
int i9 = i3;
long j3 = j ^ (j2 * ScatterMapKt.BitmaskLsb);
for (long j4 = (~j3) & (j3 - ScatterMapKt.BitmaskLsb) & (-9187201950435737472L); j4 != 0; j4 &= j4 - 1) {
int numberOfTrailingZeros = (i5 + (Long.numberOfTrailingZeros(j4) >> 3)) & i4;
if (Intrinsics.areEqual(this.keys[numberOfTrailingZeros], k)) {
return numberOfTrailingZeros;
}
}
if ((((~j) << 6) & j & (-9187201950435737472L)) != 0) {
int findFirstAvailableSlot = findFirstAvailableSlot(i2);
if (this.growthLimit == 0 && ((this.metadata[findFirstAvailableSlot >> 3] >> ((findFirstAvailableSlot & 7) << 3)) & 255) != 254) {
adjustStorage();
findFirstAvailableSlot = findFirstAvailableSlot(i2);
}
this._size++;
int i10 = this.growthLimit;
long[] jArr2 = this.metadata;
int i11 = findFirstAvailableSlot >> 3;
long j5 = jArr2[i11];
int i12 = (findFirstAvailableSlot & 7) << 3;
this.growthLimit = i10 - (((j5 >> i12) & 255) == 128 ? 1 : 0);
jArr2[i11] = (j5 & (~(255 << i12))) | (j2 << i12);
int i13 = this._capacity;
int i14 = ((findFirstAvailableSlot - 7) & i13) + (i13 & 7);
int i15 = i14 >> 3;
int i16 = (i14 & 7) << 3;
jArr2[i15] = ((~(255 << i16)) & jArr2[i15]) | (j2 << i16);
return ~findFirstAvailableSlot;
}
i6 += 8;
i5 = (i5 + i6) & i4;
i3 = i9;
}
}
/* JADX WARN: Code restructure failed: missing block: B:19:0x0069, code lost:
if (((r4 & ((~r4) << 6)) & (-9187201950435737472L)) == 0) goto L22;
*/
/* JADX WARN: Code restructure failed: missing block: B:22:0x006b, code lost:
r10 = -1;
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final V remove(K r14) {
/*
r13 = this;
r0 = 0
if (r14 == 0) goto L8
int r1 = r14.hashCode()
goto L9
L8:
r1 = r0
L9:
r2 = -862048943(0xffffffffcc9e2d51, float:-8.293031E7)
int r1 = r1 * r2
int r2 = r1 << 16
r1 = r1 ^ r2
r2 = r1 & 127(0x7f, float:1.78E-43)
int r3 = r13._capacity
int r1 = r1 >>> 7
L16:
r1 = r1 & r3
long[] r4 = r13.metadata
int r5 = r1 >> 3
r6 = r1 & 7
int r6 = r6 << 3
r7 = r4[r5]
long r7 = r7 >>> r6
int r5 = r5 + 1
r9 = r4[r5]
int r4 = 64 - r6
long r4 = r9 << r4
long r9 = (long) r6
long r9 = -r9
r6 = 63
long r9 = r9 >> r6
long r4 = r4 & r9
long r4 = r4 | r7
long r6 = (long) r2
r8 = 72340172838076673(0x101010101010101, double:7.748604185489348E-304)
long r6 = r6 * r8
long r6 = r6 ^ r4
long r8 = r6 - r8
long r6 = ~r6
long r6 = r6 & r8
r8 = -9187201950435737472(0x8080808080808080, double:-2.937446524422997E-306)
long r6 = r6 & r8
L43:
r10 = 0
int r12 = (r6 > r10 ? 1 : (r6 == r10 ? 0 : -1))
if (r12 == 0) goto L62
int r10 = java.lang.Long.numberOfTrailingZeros(r6)
int r10 = r10 >> 3
int r10 = r10 + r1
r10 = r10 & r3
java.lang.Object[] r11 = r13.keys
r11 = r11[r10]
boolean r11 = kotlin.jvm.internal.Intrinsics.areEqual(r11, r14)
if (r11 == 0) goto L5c
goto L6c
L5c:
r10 = 1
long r10 = r6 - r10
long r6 = r6 & r10
goto L43
L62:
long r6 = ~r4
r12 = 6
long r6 = r6 << r12
long r4 = r4 & r6
long r4 = r4 & r8
int r4 = (r4 > r10 ? 1 : (r4 == r10 ? 0 : -1))
if (r4 == 0) goto L75
r10 = -1
L6c:
if (r10 < 0) goto L73
java.lang.Object r14 = r13.removeValueAt(r10)
return r14
L73:
r14 = 0
return r14
L75:
int r0 = r0 + 8
int r1 = r1 + r0
goto L16
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.collection.MutableScatterMap.remove(java.lang.Object):java.lang.Object");
}
/* JADX WARN: Code restructure failed: missing block: B:21:0x006e, code lost:
if (((r7 & ((~r7) << 6)) & (-9187201950435737472L)) == 0) goto L23;
*/
/* JADX WARN: Code restructure failed: missing block: B:24:0x0070, code lost:
r11 = -1;
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final boolean remove(K r18, V r19) {
/*
r17 = this;
r0 = r17
r1 = r18
r2 = 0
if (r1 == 0) goto Lc
int r3 = r18.hashCode()
goto Ld
Lc:
r3 = r2
Ld:
r4 = -862048943(0xffffffffcc9e2d51, float:-8.293031E7)
int r3 = r3 * r4
int r4 = r3 << 16
r3 = r3 ^ r4
r4 = r3 & 127(0x7f, float:1.78E-43)
int r5 = r0._capacity
int r3 = r3 >>> 7
r3 = r3 & r5
r6 = r2
L1c:
long[] r7 = r0.metadata
int r8 = r3 >> 3
r9 = r3 & 7
int r9 = r9 << 3
r10 = r7[r8]
long r10 = r10 >>> r9
r12 = 1
int r8 = r8 + r12
r13 = r7[r8]
int r7 = 64 - r9
long r7 = r13 << r7
long r13 = (long) r9
long r13 = -r13
r9 = 63
long r13 = r13 >> r9
long r7 = r7 & r13
long r7 = r7 | r10
long r9 = (long) r4
r13 = 72340172838076673(0x101010101010101, double:7.748604185489348E-304)
long r9 = r9 * r13
long r9 = r9 ^ r7
long r13 = r9 - r13
long r9 = ~r9
long r9 = r9 & r13
r13 = -9187201950435737472(0x8080808080808080, double:-2.937446524422997E-306)
long r9 = r9 & r13
L48:
r15 = 0
int r11 = (r9 > r15 ? 1 : (r9 == r15 ? 0 : -1))
if (r11 == 0) goto L67
int r11 = java.lang.Long.numberOfTrailingZeros(r9)
int r11 = r11 >> 3
int r11 = r11 + r3
r11 = r11 & r5
java.lang.Object[] r15 = r0.keys
r15 = r15[r11]
boolean r15 = kotlin.jvm.internal.Intrinsics.areEqual(r15, r1)
if (r15 == 0) goto L61
goto L71
L61:
r15 = 1
long r15 = r9 - r15
long r9 = r9 & r15
goto L48
L67:
long r9 = ~r7
r11 = 6
long r9 = r9 << r11
long r7 = r7 & r9
long r7 = r7 & r13
int r7 = (r7 > r15 ? 1 : (r7 == r15 ? 0 : -1))
if (r7 == 0) goto L84
r11 = -1
L71:
if (r11 < 0) goto L83
java.lang.Object[] r1 = r0.values
r1 = r1[r11]
r7 = r19
boolean r1 = kotlin.jvm.internal.Intrinsics.areEqual(r1, r7)
if (r1 == 0) goto L83
r0.removeValueAt(r11)
return r12
L83:
return r2
L84:
r7 = r19
int r6 = r6 + 8
int r3 = r3 + r6
r3 = r3 & r5
goto L1c
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.collection.MutableScatterMap.remove(java.lang.Object, java.lang.Object):boolean");
}
private final void removeDeletedMarkers() {
long[] jArr = this.metadata;
int i = this._capacity;
int i2 = 0;
for (int i3 = 0; i3 < i; i3++) {
int i4 = i3 >> 3;
int i5 = (i3 & 7) << 3;
if (((jArr[i4] >> i5) & 255) == 254) {
long[] jArr2 = this.metadata;
jArr2[i4] = (128 << i5) | (jArr2[i4] & (~(255 << i5)));
int i6 = this._capacity;
int i7 = ((i3 - 7) & i6) + (i6 & 7);
int i8 = i7 >> 3;
int i9 = (i7 & 7) << 3;
jArr2[i8] = ((~(255 << i9)) & jArr2[i8]) | (128 << i9);
i2++;
}
}
this.growthLimit += i2;
}
private final void writeMetadata(int i, long j) {
long[] jArr = this.metadata;
int i2 = i >> 3;
int i3 = (i & 7) << 3;
jArr[i2] = (jArr[i2] & (~(255 << i3))) | (j << i3);
int i4 = this._capacity;
int i5 = ((i - 7) & i4) + (i4 & 7);
int i6 = i5 >> 3;
int i7 = (i5 & 7) << 3;
jArr[i6] = (j << i7) | (jArr[i6] & (~(255 << i7)));
}
public final V removeValueAt(int i) {
this._size--;
long[] jArr = this.metadata;
int i2 = i >> 3;
int i3 = (i & 7) << 3;
jArr[i2] = (jArr[i2] & (~(255 << i3))) | (254 << i3);
int i4 = this._capacity;
int i5 = ((i - 7) & i4) + (i4 & 7);
int i6 = i5 >> 3;
int i7 = (i5 & 7) << 3;
jArr[i6] = (jArr[i6] & (~(255 << i7))) | (254 << i7);
this.keys[i] = null;
Object[] objArr = this.values;
V v = (V) objArr[i];
objArr[i] = null;
return v;
}
private final int findFirstAvailableSlot(int i) {
int i2 = this._capacity;
int i3 = i & i2;
int i4 = 0;
while (true) {
long[] jArr = this.metadata;
int i5 = i3 >> 3;
int i6 = (i3 & 7) << 3;
long j = ((jArr[i5 + 1] << (64 - i6)) & ((-i6) >> 63)) | (jArr[i5] >>> i6);
long j2 = j & ((~j) << 7) & (-9187201950435737472L);
if (j2 != 0) {
return (i3 + (Long.numberOfTrailingZeros(j2) >> 3)) & i2;
}
i4 += 8;
i3 = (i3 + i4) & i2;
}
}
}

View File

@@ -0,0 +1,68 @@
package androidx.collection;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.RestrictedSuspendLambda;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlin.sequences.SequenceScope;
@DebugMetadata(c = "androidx.collection.MutableScatterSet$MutableSetWrapper$iterator$1$iterator$1", f = "ScatterSet.kt", l = {1060}, m = "invokeSuspend")
@SourceDebugExtension({"SMAP\nScatterSet.kt\nKotlin\n*S Kotlin\n*F\n+ 1 ScatterSet.kt\nandroidx/collection/MutableScatterSet$MutableSetWrapper$iterator$1$iterator$1\n+ 2 ScatterSet.kt\nandroidx/collection/ScatterSet\n+ 3 ScatterMap.kt\nandroidx/collection/ScatterMapKt\n*L\n1#1,1100:1\n237#2,7:1101\n248#2,3:1109\n251#2,9:1113\n1826#3:1108\n1688#3:1112\n*S KotlinDebug\n*F\n+ 1 ScatterSet.kt\nandroidx/collection/MutableScatterSet$MutableSetWrapper$iterator$1$iterator$1\n*L\n1057#1:1101,7\n1057#1:1109,3\n1057#1:1113,9\n1057#1:1108\n1057#1:1112\n*E\n"})
/* loaded from: classes.dex */
public final class MutableScatterSet$MutableSetWrapper$iterator$1$iterator$1 extends RestrictedSuspendLambda implements Function2 {
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;
Object L$3;
int label;
final /* synthetic */ MutableScatterSet<E> this$0;
final /* synthetic */ MutableScatterSet$MutableSetWrapper$iterator$1 this$1;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public MutableScatterSet$MutableSetWrapper$iterator$1$iterator$1(MutableScatterSet mutableScatterSet, MutableScatterSet$MutableSetWrapper$iterator$1 mutableScatterSet$MutableSetWrapper$iterator$1, Continuation continuation) {
super(2, continuation);
this.this$0 = mutableScatterSet;
this.this$1 = mutableScatterSet$MutableSetWrapper$iterator$1;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation create(Object obj, Continuation continuation) {
MutableScatterSet$MutableSetWrapper$iterator$1$iterator$1 mutableScatterSet$MutableSetWrapper$iterator$1$iterator$1 = new MutableScatterSet$MutableSetWrapper$iterator$1$iterator$1(this.this$0, this.this$1, continuation);
mutableScatterSet$MutableSetWrapper$iterator$1$iterator$1.L$0 = obj;
return mutableScatterSet$MutableSetWrapper$iterator$1$iterator$1;
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(SequenceScope sequenceScope, Continuation continuation) {
return ((MutableScatterSet$MutableSetWrapper$iterator$1$iterator$1) create(sequenceScope, continuation)).invokeSuspend(Unit.INSTANCE);
}
/* JADX WARN: Removed duplicated region for block: B:16:0x00b7 */
/* JADX WARN: Removed duplicated region for block: B:20:0x00c8 */
/* JADX WARN: Removed duplicated region for block: B:23:0x005e */
/* JADX WARN: Removed duplicated region for block: B:24:0x00c5 */
/* JADX WARN: Removed duplicated region for block: B:8:0x0077 */
/* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:14:0x00a7 -> B:5:0x00ab). Please report as a decompilation issue!!! */
/* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:15:0x00b2 -> B:6:0x00b3). Please report as a decompilation issue!!! */
/* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:23:0x005e -> B:7:0x0075). Please report as a decompilation issue!!! */
/* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:24:0x00c5 -> B:19:0x00c6). Please report as a decompilation issue!!! */
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final java.lang.Object invokeSuspend(java.lang.Object r24) {
/*
Method dump skipped, instructions count: 208
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.collection.MutableScatterSet$MutableSetWrapper$iterator$1$iterator$1.invokeSuspend(java.lang.Object):java.lang.Object");
}
}

View File

@@ -0,0 +1,51 @@
package androidx.collection;
import java.util.Iterator;
import kotlin.jvm.internal.markers.KMutableIterator;
import kotlin.sequences.SequencesKt__SequenceBuilderKt;
/* JADX INFO: Add missing generic type declarations: [E] */
/* loaded from: classes.dex */
public final class MutableScatterSet$MutableSetWrapper$iterator$1<E> implements Iterator<E>, KMutableIterator {
private int current = -1;
private final Iterator<E> iterator;
final /* synthetic */ MutableScatterSet<E> this$0;
public final int getCurrent() {
return this.current;
}
public final Iterator<E> getIterator() {
return this.iterator;
}
public final void setCurrent(int i) {
this.current = i;
}
public MutableScatterSet$MutableSetWrapper$iterator$1(MutableScatterSet<E> mutableScatterSet) {
Iterator<E> it;
this.this$0 = mutableScatterSet;
it = SequencesKt__SequenceBuilderKt.iterator(new MutableScatterSet$MutableSetWrapper$iterator$1$iterator$1(mutableScatterSet, this, null));
this.iterator = it;
}
@Override // java.util.Iterator
public boolean hasNext() {
return this.iterator.hasNext();
}
@Override // java.util.Iterator
public E next() {
return this.iterator.next();
}
@Override // java.util.Iterator
public void remove() {
int i = this.current;
if (i != -1) {
this.this$0.removeElementAt(i);
this.current = -1;
}
}
}

View File

@@ -0,0 +1,776 @@
package androidx.collection;
import androidx.annotation.IntRange;
import java.util.Collection;
import java.util.Iterator;
import java.util.Set;
import kotlin.ULong;
import kotlin.collections.ArraysKt___ArraysJvmKt;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlin.jvm.internal.markers.KMutableSet;
import kotlin.sequences.Sequence;
@SourceDebugExtension({"SMAP\nScatterSet.kt\nKotlin\n*S Kotlin\n*F\n+ 1 ScatterSet.kt\nandroidx/collection/MutableScatterSet\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n+ 3 ScatterMap.kt\nandroidx/collection/ScatterMapKt\n+ 4 _Arrays.kt\nkotlin/collections/ArraysKt___ArraysKt\n+ 5 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n+ 6 _Sequences.kt\nkotlin/sequences/SequencesKt___SequencesKt\n+ 7 ScatterSet.kt\nandroidx/collection/ScatterSet\n+ 8 ObjectList.kt\nandroidx/collection/ObjectList\n*L\n1#1,1100:1\n1018#1,2:1285\n1022#1,5:1293\n1018#1,2:1324\n1022#1,5:1332\n1018#1,2:1349\n1022#1,5:1357\n1018#1,2:1363\n1022#1,5:1371\n1#2:1101\n1672#3,6:1102\n1826#3:1125\n1688#3:1129\n1605#3,3:1148\n1619#3:1152\n1615#3:1155\n1795#3,3:1159\n1809#3,3:1163\n1733#3:1167\n1721#3:1169\n1715#3:1170\n1728#3:1175\n1818#3:1177\n1605#3,3:1187\n1619#3:1191\n1615#3:1194\n1795#3,3:1198\n1809#3,3:1202\n1733#3:1206\n1721#3:1208\n1715#3:1209\n1728#3:1214\n1818#3:1216\n1826#3:1242\n1688#3:1246\n1826#3:1271\n1688#3:1275\n1672#3,6:1287\n1672#3,6:1298\n1605#3,3:1304\n1615#3:1307\n1619#3:1308\n1795#3,3:1309\n1809#3,3:1312\n1733#3:1315\n1721#3:1316\n1715#3:1317\n1728#3:1318\n1818#3:1319\n1682#3:1320\n1661#3:1321\n1680#3:1322\n1661#3:1323\n1672#3,6:1326\n1795#3,3:1337\n1826#3:1340\n1715#3:1341\n1685#3:1342\n1661#3:1343\n1605#3,3:1344\n1615#3:1347\n1619#3:1348\n1672#3,6:1351\n1661#3:1362\n1672#3,6:1365\n1672#3,6:1376\n1672#3,6:1382\n13579#4,2:1108\n13579#4,2:1225\n1855#5,2:1110\n1855#5,2:1229\n1295#6,2:1112\n1295#6,2:1227\n267#7,4:1114\n237#7,7:1118\n248#7,3:1126\n251#7,2:1130\n272#7,2:1132\n254#7,6:1134\n274#7:1140\n433#7:1147\n434#7:1151\n436#7,2:1153\n438#7,3:1156\n441#7:1162\n442#7:1166\n443#7:1168\n444#7,4:1171\n450#7:1176\n451#7,8:1178\n433#7:1186\n434#7:1190\n436#7,2:1192\n438#7,3:1195\n441#7:1201\n442#7:1205\n443#7:1207\n444#7,4:1210\n450#7:1215\n451#7,8:1217\n267#7,4:1231\n237#7,7:1235\n248#7,3:1243\n251#7,2:1247\n272#7,2:1249\n254#7,6:1251\n274#7:1257\n237#7,7:1264\n248#7,3:1272\n251#7,9:1276\n305#8,6:1141\n305#8,6:1258\n*S KotlinDebug\n*F\n+ 1 ScatterSet.kt\nandroidx/collection/MutableScatterSet\n*L\n857#1:1285,2\n857#1:1293,5\n917#1:1324,2\n917#1:1332,5\n989#1:1349,2\n989#1:1357,5\n1004#1:1363,2\n1004#1:1371,5\n567#1:1102,6\n692#1:1125\n692#1:1129\n714#1:1148,3\n714#1:1152\n714#1:1155\n714#1:1159,3\n714#1:1163,3\n714#1:1167\n714#1:1169\n714#1:1170\n714#1:1175\n714#1:1177\n727#1:1187,3\n727#1:1191\n727#1:1194\n727#1:1198,3\n727#1:1202,3\n727#1:1206\n727#1:1208\n727#1:1209\n727#1:1214\n727#1:1216\n823#1:1242\n823#1:1246\n843#1:1271\n843#1:1275\n857#1:1287,6\n868#1:1298,6\n882#1:1304,3\n883#1:1307\n884#1:1308\n891#1:1309,3\n892#1:1312,3\n893#1:1315\n894#1:1316\n894#1:1317\n898#1:1318\n901#1:1319\n910#1:1320\n910#1:1321\n916#1:1322\n916#1:1323\n917#1:1326,6\n931#1:1337,3\n932#1:1340\n934#1:1341\n984#1:1342\n984#1:1343\n986#1:1344,3\n987#1:1347\n989#1:1348\n989#1:1351,6\n1002#1:1362\n1004#1:1365,6\n1019#1:1376,6\n1025#1:1382,6\n662#1:1108,2\n793#1:1225,2\n672#1:1110,2\n813#1:1229,2\n682#1:1112,2\n803#1:1227,2\n692#1:1114,4\n692#1:1118,7\n692#1:1126,3\n692#1:1130,2\n692#1:1132,2\n692#1:1134,6\n692#1:1140\n714#1:1147\n714#1:1151\n714#1:1153,2\n714#1:1156,3\n714#1:1162\n714#1:1166\n714#1:1168\n714#1:1171,4\n714#1:1176\n714#1:1178,8\n727#1:1186\n727#1:1190\n727#1:1192,2\n727#1:1195,3\n727#1:1201\n727#1:1205\n727#1:1207\n727#1:1210,4\n727#1:1215\n727#1:1217,8\n823#1:1231,4\n823#1:1235,7\n823#1:1243,3\n823#1:1247,2\n823#1:1249,2\n823#1:1251,6\n823#1:1257\n843#1:1264,7\n843#1:1272,3\n843#1:1276,9\n702#1:1141,6\n833#1:1258,6\n*E\n"})
/* loaded from: classes.dex */
public final class MutableScatterSet<E> extends ScatterSet<E> {
private int growthLimit;
public MutableScatterSet() {
this(0, 1, null);
}
@SourceDebugExtension({"SMAP\nScatterSet.kt\nKotlin\n*S Kotlin\n*F\n+ 1 ScatterSet.kt\nandroidx/collection/MutableScatterSet$MutableSetWrapper\n+ 2 ScatterSet.kt\nandroidx/collection/ScatterSet\n+ 3 ScatterMap.kt\nandroidx/collection/ScatterMapKt\n*L\n1#1,1100:1\n237#2,7:1101\n248#2,3:1109\n251#2,9:1113\n1826#3:1108\n1688#3:1112\n*S KotlinDebug\n*F\n+ 1 ScatterSet.kt\nandroidx/collection/MutableScatterSet$MutableSetWrapper\n*L\n1080#1:1101,7\n1080#1:1109,3\n1080#1:1113,9\n1080#1:1108\n1080#1:1112\n*E\n"})
public final class MutableSetWrapper extends ScatterSet<E>.SetWrapper implements Set<E>, KMutableSet {
@Override // androidx.collection.ScatterSet.SetWrapper, java.util.Set, java.util.Collection
public boolean retainAll(Collection<? extends Object> elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
MutableScatterSet<E> mutableScatterSet = MutableScatterSet.this;
long[] jArr = mutableScatterSet.metadata;
int length = jArr.length - 2;
boolean z = false;
if (length >= 0) {
int i = 0;
boolean z2 = false;
while (true) {
long j = jArr[i];
if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
int i2 = 8 - ((~(i - length)) >>> 31);
for (int i3 = 0; i3 < i2; i3++) {
if ((255 & j) < 128) {
int i4 = (i << 3) + i3;
if (!elements.contains(mutableScatterSet.elements[i4])) {
mutableScatterSet.removeElementAt(i4);
z2 = true;
}
}
j >>= 8;
}
if (i2 != 8) {
return z2;
}
}
if (i == length) {
z = z2;
break;
}
i++;
}
}
return z;
}
public MutableSetWrapper() {
super();
}
@Override // androidx.collection.ScatterSet.SetWrapper, java.util.Set, java.util.Collection
public boolean add(E e) {
return MutableScatterSet.this.add(e);
}
@Override // androidx.collection.ScatterSet.SetWrapper, java.util.Set, java.util.Collection
public boolean addAll(Collection<? extends E> elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
return MutableScatterSet.this.addAll(elements);
}
@Override // androidx.collection.ScatterSet.SetWrapper, java.util.Set, java.util.Collection
public void clear() {
MutableScatterSet.this.clear();
}
@Override // androidx.collection.ScatterSet.SetWrapper, java.util.Set, java.util.Collection, java.lang.Iterable
public Iterator<E> iterator() {
return new MutableScatterSet$MutableSetWrapper$iterator$1(MutableScatterSet.this);
}
@Override // androidx.collection.ScatterSet.SetWrapper, java.util.Set, java.util.Collection
public boolean remove(Object obj) {
return MutableScatterSet.this.remove(obj);
}
/* JADX WARN: Multi-variable type inference failed */
@Override // androidx.collection.ScatterSet.SetWrapper, java.util.Set, java.util.Collection
public boolean removeAll(Collection<? extends Object> elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
int size = MutableScatterSet.this.getSize();
Iterator<? extends Object> it = elements.iterator();
while (it.hasNext()) {
MutableScatterSet.this.minusAssign((MutableScatterSet<E>) it.next());
}
return size != MutableScatterSet.this.getSize();
}
}
public final void removeIf(Function1 predicate) {
Intrinsics.checkNotNullParameter(predicate, "predicate");
Object[] objArr = this.elements;
long[] jArr = this.metadata;
int length = jArr.length - 2;
if (length < 0) {
return;
}
int i = 0;
while (true) {
long j = jArr[i];
if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
int i2 = 8 - ((~(i - length)) >>> 31);
for (int i3 = 0; i3 < i2; i3++) {
if ((255 & j) < 128) {
int i4 = (i << 3) + i3;
if (((Boolean) predicate.invoke(objArr[i4])).booleanValue()) {
removeElementAt(i4);
}
}
j >>= 8;
}
if (i2 != 8) {
return;
}
}
if (i == length) {
return;
} else {
i++;
}
}
}
/* JADX WARN: Multi-variable type inference failed */
public final void minusAssign(ScatterSet<E> elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
Object[] objArr = elements.elements;
long[] jArr = elements.metadata;
int length = jArr.length - 2;
if (length < 0) {
return;
}
int i = 0;
while (true) {
long j = jArr[i];
if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
int i2 = 8 - ((~(i - length)) >>> 31);
for (int i3 = 0; i3 < i2; i3++) {
if ((255 & j) < 128) {
minusAssign((MutableScatterSet<E>) objArr[(i << 3) + i3]);
}
j >>= 8;
}
if (i2 != 8) {
return;
}
}
if (i == length) {
return;
} else {
i++;
}
}
}
/* JADX WARN: Multi-variable type inference failed */
public final void plusAssign(ScatterSet<E> elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
Object[] objArr = elements.elements;
long[] jArr = elements.metadata;
int length = jArr.length - 2;
if (length < 0) {
return;
}
int i = 0;
while (true) {
long j = jArr[i];
if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
int i2 = 8 - ((~(i - length)) >>> 31);
for (int i3 = 0; i3 < i2; i3++) {
if ((255 & j) < 128) {
plusAssign((MutableScatterSet<E>) objArr[(i << 3) + i3]);
}
j >>= 8;
}
if (i2 != 8) {
return;
}
}
if (i == length) {
return;
} else {
i++;
}
}
}
/* JADX WARN: Multi-variable type inference failed */
public final void minusAssign(ObjectList<E> elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
Object[] objArr = elements.content;
int i = elements._size;
for (int i2 = 0; i2 < i; i2++) {
minusAssign((MutableScatterSet<E>) objArr[i2]);
}
}
/* JADX WARN: Multi-variable type inference failed */
public final void plusAssign(ObjectList<E> elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
Object[] objArr = elements.content;
int i = elements._size;
for (int i2 = 0; i2 < i; i2++) {
plusAssign((MutableScatterSet<E>) objArr[i2]);
}
}
public /* synthetic */ MutableScatterSet(int i, int i2, DefaultConstructorMarker defaultConstructorMarker) {
this((i2 & 1) != 0 ? 6 : i);
}
public MutableScatterSet(int i) {
super(null);
if (i < 0) {
throw new IllegalArgumentException("Capacity must be a positive value.".toString());
}
initializeStorage(ScatterMapKt.unloadedCapacity(i));
}
private final void initializeStorage(int i) {
int max = i > 0 ? Math.max(7, ScatterMapKt.normalizeCapacity(i)) : 0;
this._capacity = max;
initializeMetadata(max);
this.elements = new Object[max];
}
private final void initializeMetadata(int i) {
long[] jArr;
if (i == 0) {
jArr = ScatterMapKt.EmptyGroup;
} else {
jArr = new long[((i + 15) & (-8)) >> 3];
ArraysKt___ArraysJvmKt.fill$default(jArr, -9187201950435737472L, 0, 0, 6, (Object) null);
}
this.metadata = jArr;
int i2 = i >> 3;
long j = 255 << ((i & 7) << 3);
jArr[i2] = (jArr[i2] & (~j)) | j;
initializeGrowth();
}
private final void initializeGrowth() {
this.growthLimit = ScatterMapKt.loadedCapacity(getCapacity()) - this._size;
}
public final boolean add(E e) {
int size = getSize();
this.elements[findAbsoluteInsertIndex(e)] = e;
return getSize() != size;
}
public final void plusAssign(E e) {
this.elements[findAbsoluteInsertIndex(e)] = e;
}
public final boolean addAll(E[] elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
int size = getSize();
plusAssign((Object[]) elements);
return size != getSize();
}
public final boolean addAll(Iterable<? extends E> elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
int size = getSize();
plusAssign((Iterable) elements);
return size != getSize();
}
public final boolean addAll(Sequence elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
int size = getSize();
plusAssign(elements);
return size != getSize();
}
public final boolean addAll(ScatterSet<E> elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
int size = getSize();
plusAssign((ScatterSet) elements);
return size != getSize();
}
public final boolean addAll(ObjectList<E> elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
int size = getSize();
plusAssign((ObjectList) elements);
return size != getSize();
}
public final boolean removeAll(E[] elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
int size = getSize();
minusAssign((Object[]) elements);
return size != getSize();
}
public final boolean removeAll(Sequence elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
int size = getSize();
minusAssign(elements);
return size != getSize();
}
public final boolean removeAll(Iterable<? extends E> elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
int size = getSize();
minusAssign((Iterable) elements);
return size != getSize();
}
public final boolean removeAll(ScatterSet<E> elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
int size = getSize();
minusAssign((ScatterSet) elements);
return size != getSize();
}
public final boolean removeAll(ObjectList<E> elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
int size = getSize();
minusAssign((ObjectList) elements);
return size != getSize();
}
public final void clear() {
this._size = 0;
long[] jArr = this.metadata;
if (jArr != ScatterMapKt.EmptyGroup) {
ArraysKt___ArraysJvmKt.fill$default(jArr, -9187201950435737472L, 0, 0, 6, (Object) null);
long[] jArr2 = this.metadata;
int i = this._capacity;
int i2 = i >> 3;
long j = 255 << ((i & 7) << 3);
jArr2[i2] = (jArr2[i2] & (~j)) | j;
}
ArraysKt___ArraysJvmKt.fill(this.elements, (Object) null, 0, this._capacity);
initializeGrowth();
}
@IntRange(from = 0)
public final int trim() {
int i = this._capacity;
int normalizeCapacity = ScatterMapKt.normalizeCapacity(ScatterMapKt.unloadedCapacity(this._size));
if (normalizeCapacity >= i) {
return 0;
}
resizeStorage(normalizeCapacity);
return i - this._capacity;
}
private final void adjustStorage() {
if (this._capacity > 8 && Long.compareUnsigned(ULong.m4068constructorimpl(ULong.m4068constructorimpl(this._size) * 32), ULong.m4068constructorimpl(ULong.m4068constructorimpl(this._capacity) * 25)) <= 0) {
removeDeletedMarkers();
} else {
resizeStorage(ScatterMapKt.nextCapacity(this._capacity));
}
}
private final void resizeStorage(int i) {
int i2;
long[] jArr = this.metadata;
Object[] objArr = this.elements;
int i3 = this._capacity;
initializeStorage(i);
Object[] objArr2 = this.elements;
int i4 = 0;
while (i4 < i3) {
if (((jArr[i4 >> 3] >> ((i4 & 7) << 3)) & 255) < 128) {
Object obj = objArr[i4];
int hashCode = (obj != null ? obj.hashCode() : 0) * ScatterMapKt.MurmurHashC1;
int i5 = hashCode ^ (hashCode << 16);
int findFirstAvailableSlot = findFirstAvailableSlot(i5 >>> 7);
long j = i5 & 127;
long[] jArr2 = this.metadata;
int i6 = findFirstAvailableSlot >> 3;
int i7 = (findFirstAvailableSlot & 7) << 3;
i2 = i4;
jArr2[i6] = (jArr2[i6] & (~(255 << i7))) | (j << i7);
int i8 = this._capacity;
int i9 = ((findFirstAvailableSlot - 7) & i8) + (i8 & 7);
int i10 = i9 >> 3;
int i11 = (i9 & 7) << 3;
jArr2[i10] = ((~(255 << i11)) & jArr2[i10]) | (j << i11);
objArr2[findFirstAvailableSlot] = obj;
} else {
i2 = i4;
}
i4 = i2 + 1;
}
}
public final Set<E> asMutableSet() {
return new MutableSetWrapper();
}
/* JADX WARN: Multi-variable type inference failed */
public final void plusAssign(Sequence elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
Iterator it = elements.iterator();
while (it.hasNext()) {
plusAssign((MutableScatterSet<E>) it.next());
}
}
/* JADX WARN: Multi-variable type inference failed */
public final void minusAssign(Sequence elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
Iterator it = elements.iterator();
while (it.hasNext()) {
minusAssign((MutableScatterSet<E>) it.next());
}
}
private final int findAbsoluteInsertIndex(E e) {
int hashCode = (e != null ? e.hashCode() : 0) * ScatterMapKt.MurmurHashC1;
int i = hashCode ^ (hashCode << 16);
int i2 = i >>> 7;
int i3 = i & 127;
int i4 = this._capacity;
int i5 = i2 & i4;
int i6 = 0;
while (true) {
long[] jArr = this.metadata;
int i7 = i5 >> 3;
int i8 = (i5 & 7) << 3;
long j = ((jArr[i7 + 1] << (64 - i8)) & ((-i8) >> 63)) | (jArr[i7] >>> i8);
long j2 = i3;
int i9 = i3;
long j3 = j ^ (j2 * ScatterMapKt.BitmaskLsb);
for (long j4 = (~j3) & (j3 - ScatterMapKt.BitmaskLsb) & (-9187201950435737472L); j4 != 0; j4 &= j4 - 1) {
int numberOfTrailingZeros = (i5 + (Long.numberOfTrailingZeros(j4) >> 3)) & i4;
if (Intrinsics.areEqual(this.elements[numberOfTrailingZeros], e)) {
return numberOfTrailingZeros;
}
}
if ((((~j) << 6) & j & (-9187201950435737472L)) != 0) {
int findFirstAvailableSlot = findFirstAvailableSlot(i2);
if (this.growthLimit == 0 && ((this.metadata[findFirstAvailableSlot >> 3] >> ((findFirstAvailableSlot & 7) << 3)) & 255) != 254) {
adjustStorage();
findFirstAvailableSlot = findFirstAvailableSlot(i2);
}
this._size++;
int i10 = this.growthLimit;
long[] jArr2 = this.metadata;
int i11 = findFirstAvailableSlot >> 3;
long j5 = jArr2[i11];
int i12 = (findFirstAvailableSlot & 7) << 3;
this.growthLimit = i10 - (((j5 >> i12) & 255) == 128 ? 1 : 0);
jArr2[i11] = (j5 & (~(255 << i12))) | (j2 << i12);
int i13 = this._capacity;
int i14 = ((findFirstAvailableSlot - 7) & i13) + (i13 & 7);
int i15 = i14 >> 3;
int i16 = (i14 & 7) << 3;
jArr2[i15] = ((~(255 << i16)) & jArr2[i15]) | (j2 << i16);
return findFirstAvailableSlot;
}
i6 += 8;
i5 = (i5 + i6) & i4;
i3 = i9;
}
}
/* JADX WARN: Code restructure failed: missing block: B:19:0x0069, code lost:
if (((r4 & ((~r4) << 6)) & (-9187201950435737472L)) == 0) goto L20;
*/
/* JADX WARN: Code restructure failed: missing block: B:22:0x006b, code lost:
r10 = -1;
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final void minusAssign(E r14) {
/*
r13 = this;
r0 = 0
if (r14 == 0) goto L8
int r1 = r14.hashCode()
goto L9
L8:
r1 = r0
L9:
r2 = -862048943(0xffffffffcc9e2d51, float:-8.293031E7)
int r1 = r1 * r2
int r2 = r1 << 16
r1 = r1 ^ r2
r2 = r1 & 127(0x7f, float:1.78E-43)
int r3 = r13._capacity
int r1 = r1 >>> 7
L16:
r1 = r1 & r3
long[] r4 = r13.metadata
int r5 = r1 >> 3
r6 = r1 & 7
int r6 = r6 << 3
r7 = r4[r5]
long r7 = r7 >>> r6
int r5 = r5 + 1
r9 = r4[r5]
int r4 = 64 - r6
long r4 = r9 << r4
long r9 = (long) r6
long r9 = -r9
r6 = 63
long r9 = r9 >> r6
long r4 = r4 & r9
long r4 = r4 | r7
long r6 = (long) r2
r8 = 72340172838076673(0x101010101010101, double:7.748604185489348E-304)
long r6 = r6 * r8
long r6 = r6 ^ r4
long r8 = r6 - r8
long r6 = ~r6
long r6 = r6 & r8
r8 = -9187201950435737472(0x8080808080808080, double:-2.937446524422997E-306)
long r6 = r6 & r8
L43:
r10 = 0
int r12 = (r6 > r10 ? 1 : (r6 == r10 ? 0 : -1))
if (r12 == 0) goto L62
int r10 = java.lang.Long.numberOfTrailingZeros(r6)
int r10 = r10 >> 3
int r10 = r10 + r1
r10 = r10 & r3
java.lang.Object[] r11 = r13.elements
r11 = r11[r10]
boolean r11 = kotlin.jvm.internal.Intrinsics.areEqual(r11, r14)
if (r11 == 0) goto L5c
goto L6c
L5c:
r10 = 1
long r10 = r6 - r10
long r6 = r6 & r10
goto L43
L62:
long r6 = ~r4
r12 = 6
long r6 = r6 << r12
long r4 = r4 & r6
long r4 = r4 & r8
int r4 = (r4 > r10 ? 1 : (r4 == r10 ? 0 : -1))
if (r4 == 0) goto L72
r10 = -1
L6c:
if (r10 < 0) goto L71
r13.removeElementAt(r10)
L71:
return
L72:
int r0 = r0 + 8
int r1 = r1 + r0
goto L16
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.collection.MutableScatterSet.minusAssign(java.lang.Object):void");
}
/* JADX WARN: Code restructure failed: missing block: B:20:0x006e, code lost:
if (((r7 & ((~r7) << 6)) & (-9187201950435737472L)) == 0) goto L22;
*/
/* JADX WARN: Code restructure failed: missing block: B:23:0x0070, code lost:
r11 = -1;
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final boolean remove(E r18) {
/*
r17 = this;
r0 = r17
r1 = r18
r2 = 0
if (r1 == 0) goto Lc
int r3 = r18.hashCode()
goto Ld
Lc:
r3 = r2
Ld:
r4 = -862048943(0xffffffffcc9e2d51, float:-8.293031E7)
int r3 = r3 * r4
int r4 = r3 << 16
r3 = r3 ^ r4
r4 = r3 & 127(0x7f, float:1.78E-43)
int r5 = r0._capacity
int r3 = r3 >>> 7
r3 = r3 & r5
r6 = r2
L1c:
long[] r7 = r0.metadata
int r8 = r3 >> 3
r9 = r3 & 7
int r9 = r9 << 3
r10 = r7[r8]
long r10 = r10 >>> r9
r12 = 1
int r8 = r8 + r12
r13 = r7[r8]
int r7 = 64 - r9
long r7 = r13 << r7
long r13 = (long) r9
long r13 = -r13
r9 = 63
long r13 = r13 >> r9
long r7 = r7 & r13
long r7 = r7 | r10
long r9 = (long) r4
r13 = 72340172838076673(0x101010101010101, double:7.748604185489348E-304)
long r9 = r9 * r13
long r9 = r9 ^ r7
long r13 = r9 - r13
long r9 = ~r9
long r9 = r9 & r13
r13 = -9187201950435737472(0x8080808080808080, double:-2.937446524422997E-306)
long r9 = r9 & r13
L48:
r15 = 0
int r11 = (r9 > r15 ? 1 : (r9 == r15 ? 0 : -1))
if (r11 == 0) goto L67
int r11 = java.lang.Long.numberOfTrailingZeros(r9)
int r11 = r11 >> 3
int r11 = r11 + r3
r11 = r11 & r5
java.lang.Object[] r15 = r0.elements
r15 = r15[r11]
boolean r15 = kotlin.jvm.internal.Intrinsics.areEqual(r15, r1)
if (r15 == 0) goto L61
goto L71
L61:
r15 = 1
long r15 = r9 - r15
long r9 = r9 & r15
goto L48
L67:
long r9 = ~r7
r11 = 6
long r9 = r9 << r11
long r7 = r7 & r9
long r7 = r7 & r13
int r7 = (r7 > r15 ? 1 : (r7 == r15 ? 0 : -1))
if (r7 == 0) goto L7a
r11 = -1
L71:
if (r11 < 0) goto L74
r2 = r12
L74:
if (r2 == 0) goto L79
r0.removeElementAt(r11)
L79:
return r2
L7a:
int r6 = r6 + 8
int r3 = r3 + r6
r3 = r3 & r5
goto L1c
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.collection.MutableScatterSet.remove(java.lang.Object):boolean");
}
private final void removeDeletedMarkers() {
long[] jArr = this.metadata;
int i = this._capacity;
int i2 = 0;
for (int i3 = 0; i3 < i; i3++) {
int i4 = i3 >> 3;
int i5 = (i3 & 7) << 3;
if (((jArr[i4] >> i5) & 255) == 254) {
long[] jArr2 = this.metadata;
jArr2[i4] = (128 << i5) | (jArr2[i4] & (~(255 << i5)));
int i6 = this._capacity;
int i7 = ((i3 - 7) & i6) + (i6 & 7);
int i8 = i7 >> 3;
int i9 = (i7 & 7) << 3;
jArr2[i8] = ((~(255 << i9)) & jArr2[i8]) | (128 << i9);
i2++;
}
}
this.growthLimit += i2;
}
private final void writeMetadata(int i, long j) {
long[] jArr = this.metadata;
int i2 = i >> 3;
int i3 = (i & 7) << 3;
jArr[i2] = (jArr[i2] & (~(255 << i3))) | (j << i3);
int i4 = this._capacity;
int i5 = ((i - 7) & i4) + (i4 & 7);
int i6 = i5 >> 3;
int i7 = (i5 & 7) << 3;
jArr[i6] = (j << i7) | (jArr[i6] & (~(255 << i7)));
}
public final void removeElementAt(int i) {
this._size--;
long[] jArr = this.metadata;
int i2 = i >> 3;
int i3 = (i & 7) << 3;
jArr[i2] = (jArr[i2] & (~(255 << i3))) | (254 << i3);
int i4 = this._capacity;
int i5 = ((i - 7) & i4) + (i4 & 7);
int i6 = i5 >> 3;
int i7 = (i5 & 7) << 3;
jArr[i6] = (jArr[i6] & (~(255 << i7))) | (254 << i7);
this.elements[i] = null;
}
private final int findFirstAvailableSlot(int i) {
int i2 = this._capacity;
int i3 = i & i2;
int i4 = 0;
while (true) {
long[] jArr = this.metadata;
int i5 = i3 >> 3;
int i6 = (i3 & 7) << 3;
long j = ((jArr[i5 + 1] << (64 - i6)) & ((-i6) >> 63)) | (jArr[i5] >>> i6);
long j2 = j & ((~j) << 7) & (-9187201950435737472L);
if (j2 != 0) {
return (i3 + (Long.numberOfTrailingZeros(j2) >> 3)) & i2;
}
i4 += 8;
i3 = (i3 + i4) & i2;
}
}
public final void minusAssign(Iterable<? extends E> elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
Iterator<? extends E> it = elements.iterator();
while (it.hasNext()) {
minusAssign((MutableScatterSet<E>) it.next());
}
}
public final void plusAssign(Iterable<? extends E> elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
Iterator<? extends E> it = elements.iterator();
while (it.hasNext()) {
plusAssign((MutableScatterSet<E>) it.next());
}
}
public final void minusAssign(E[] elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
for (E e : elements) {
minusAssign((MutableScatterSet<E>) e);
}
}
public final void plusAssign(E[] elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
for (E e : elements) {
plusAssign((MutableScatterSet<E>) e);
}
}
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,104 @@
package androidx.collection;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes.dex */
public final class ObjectFloatMapKt {
private static final MutableObjectFloatMap<Object> EmptyObjectFloatMap = new MutableObjectFloatMap<>(0);
public static final <K> ObjectFloatMap<K> emptyObjectFloatMap() {
MutableObjectFloatMap<Object> mutableObjectFloatMap = EmptyObjectFloatMap;
Intrinsics.checkNotNull(mutableObjectFloatMap, "null cannot be cast to non-null type androidx.collection.ObjectFloatMap<K of androidx.collection.ObjectFloatMapKt.emptyObjectFloatMap>");
return mutableObjectFloatMap;
}
public static final <K> ObjectFloatMap<K> objectFloatMap() {
MutableObjectFloatMap<Object> mutableObjectFloatMap = EmptyObjectFloatMap;
Intrinsics.checkNotNull(mutableObjectFloatMap, "null cannot be cast to non-null type androidx.collection.ObjectFloatMap<K of androidx.collection.ObjectFloatMapKt.objectFloatMap>");
return mutableObjectFloatMap;
}
public static final <K> ObjectFloatMap<K> objectFloatMapOf(K k, float f) {
MutableObjectFloatMap mutableObjectFloatMap = new MutableObjectFloatMap(0, 1, null);
mutableObjectFloatMap.set(k, f);
return mutableObjectFloatMap;
}
public static final <K> ObjectFloatMap<K> objectFloatMapOf(K k, float f, K k2, float f2) {
MutableObjectFloatMap mutableObjectFloatMap = new MutableObjectFloatMap(0, 1, null);
mutableObjectFloatMap.set(k, f);
mutableObjectFloatMap.set(k2, f2);
return mutableObjectFloatMap;
}
public static final <K> ObjectFloatMap<K> objectFloatMapOf(K k, float f, K k2, float f2, K k3, float f3) {
MutableObjectFloatMap mutableObjectFloatMap = new MutableObjectFloatMap(0, 1, null);
mutableObjectFloatMap.set(k, f);
mutableObjectFloatMap.set(k2, f2);
mutableObjectFloatMap.set(k3, f3);
return mutableObjectFloatMap;
}
public static final <K> ObjectFloatMap<K> objectFloatMapOf(K k, float f, K k2, float f2, K k3, float f3, K k4, float f4) {
MutableObjectFloatMap mutableObjectFloatMap = new MutableObjectFloatMap(0, 1, null);
mutableObjectFloatMap.set(k, f);
mutableObjectFloatMap.set(k2, f2);
mutableObjectFloatMap.set(k3, f3);
mutableObjectFloatMap.set(k4, f4);
return mutableObjectFloatMap;
}
public static final <K> ObjectFloatMap<K> objectFloatMapOf(K k, float f, K k2, float f2, K k3, float f3, K k4, float f4, K k5, float f5) {
MutableObjectFloatMap mutableObjectFloatMap = new MutableObjectFloatMap(0, 1, null);
mutableObjectFloatMap.set(k, f);
mutableObjectFloatMap.set(k2, f2);
mutableObjectFloatMap.set(k3, f3);
mutableObjectFloatMap.set(k4, f4);
mutableObjectFloatMap.set(k5, f5);
return mutableObjectFloatMap;
}
public static final <K> MutableObjectFloatMap<K> mutableObjectFloatMapOf() {
return new MutableObjectFloatMap<>(0, 1, null);
}
public static final <K> MutableObjectFloatMap<K> mutableObjectFloatMapOf(K k, float f) {
MutableObjectFloatMap<K> mutableObjectFloatMap = new MutableObjectFloatMap<>(0, 1, null);
mutableObjectFloatMap.set(k, f);
return mutableObjectFloatMap;
}
public static final <K> MutableObjectFloatMap<K> mutableObjectFloatMapOf(K k, float f, K k2, float f2) {
MutableObjectFloatMap<K> mutableObjectFloatMap = new MutableObjectFloatMap<>(0, 1, null);
mutableObjectFloatMap.set(k, f);
mutableObjectFloatMap.set(k2, f2);
return mutableObjectFloatMap;
}
public static final <K> MutableObjectFloatMap<K> mutableObjectFloatMapOf(K k, float f, K k2, float f2, K k3, float f3) {
MutableObjectFloatMap<K> mutableObjectFloatMap = new MutableObjectFloatMap<>(0, 1, null);
mutableObjectFloatMap.set(k, f);
mutableObjectFloatMap.set(k2, f2);
mutableObjectFloatMap.set(k3, f3);
return mutableObjectFloatMap;
}
public static final <K> MutableObjectFloatMap<K> mutableObjectFloatMapOf(K k, float f, K k2, float f2, K k3, float f3, K k4, float f4) {
MutableObjectFloatMap<K> mutableObjectFloatMap = new MutableObjectFloatMap<>(0, 1, null);
mutableObjectFloatMap.set(k, f);
mutableObjectFloatMap.set(k2, f2);
mutableObjectFloatMap.set(k3, f3);
mutableObjectFloatMap.set(k4, f4);
return mutableObjectFloatMap;
}
public static final <K> MutableObjectFloatMap<K> mutableObjectFloatMapOf(K k, float f, K k2, float f2, K k3, float f3, K k4, float f4, K k5, float f5) {
MutableObjectFloatMap<K> mutableObjectFloatMap = new MutableObjectFloatMap<>(0, 1, null);
mutableObjectFloatMap.set(k, f);
mutableObjectFloatMap.set(k2, f2);
mutableObjectFloatMap.set(k3, f3);
mutableObjectFloatMap.set(k4, f4);
mutableObjectFloatMap.set(k5, f5);
return mutableObjectFloatMap;
}
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,104 @@
package androidx.collection;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes.dex */
public final class ObjectIntMapKt {
private static final MutableObjectIntMap<Object> EmptyObjectIntMap = new MutableObjectIntMap<>(0);
public static final <K> ObjectIntMap<K> emptyObjectIntMap() {
MutableObjectIntMap<Object> mutableObjectIntMap = EmptyObjectIntMap;
Intrinsics.checkNotNull(mutableObjectIntMap, "null cannot be cast to non-null type androidx.collection.ObjectIntMap<K of androidx.collection.ObjectIntMapKt.emptyObjectIntMap>");
return mutableObjectIntMap;
}
public static final <K> ObjectIntMap<K> objectIntMap() {
MutableObjectIntMap<Object> mutableObjectIntMap = EmptyObjectIntMap;
Intrinsics.checkNotNull(mutableObjectIntMap, "null cannot be cast to non-null type androidx.collection.ObjectIntMap<K of androidx.collection.ObjectIntMapKt.objectIntMap>");
return mutableObjectIntMap;
}
public static final <K> ObjectIntMap<K> objectIntMapOf(K k, int i) {
MutableObjectIntMap mutableObjectIntMap = new MutableObjectIntMap(0, 1, null);
mutableObjectIntMap.set(k, i);
return mutableObjectIntMap;
}
public static final <K> ObjectIntMap<K> objectIntMapOf(K k, int i, K k2, int i2) {
MutableObjectIntMap mutableObjectIntMap = new MutableObjectIntMap(0, 1, null);
mutableObjectIntMap.set(k, i);
mutableObjectIntMap.set(k2, i2);
return mutableObjectIntMap;
}
public static final <K> ObjectIntMap<K> objectIntMapOf(K k, int i, K k2, int i2, K k3, int i3) {
MutableObjectIntMap mutableObjectIntMap = new MutableObjectIntMap(0, 1, null);
mutableObjectIntMap.set(k, i);
mutableObjectIntMap.set(k2, i2);
mutableObjectIntMap.set(k3, i3);
return mutableObjectIntMap;
}
public static final <K> ObjectIntMap<K> objectIntMapOf(K k, int i, K k2, int i2, K k3, int i3, K k4, int i4) {
MutableObjectIntMap mutableObjectIntMap = new MutableObjectIntMap(0, 1, null);
mutableObjectIntMap.set(k, i);
mutableObjectIntMap.set(k2, i2);
mutableObjectIntMap.set(k3, i3);
mutableObjectIntMap.set(k4, i4);
return mutableObjectIntMap;
}
public static final <K> ObjectIntMap<K> objectIntMapOf(K k, int i, K k2, int i2, K k3, int i3, K k4, int i4, K k5, int i5) {
MutableObjectIntMap mutableObjectIntMap = new MutableObjectIntMap(0, 1, null);
mutableObjectIntMap.set(k, i);
mutableObjectIntMap.set(k2, i2);
mutableObjectIntMap.set(k3, i3);
mutableObjectIntMap.set(k4, i4);
mutableObjectIntMap.set(k5, i5);
return mutableObjectIntMap;
}
public static final <K> MutableObjectIntMap<K> mutableObjectIntMapOf() {
return new MutableObjectIntMap<>(0, 1, null);
}
public static final <K> MutableObjectIntMap<K> mutableObjectIntMapOf(K k, int i) {
MutableObjectIntMap<K> mutableObjectIntMap = new MutableObjectIntMap<>(0, 1, null);
mutableObjectIntMap.set(k, i);
return mutableObjectIntMap;
}
public static final <K> MutableObjectIntMap<K> mutableObjectIntMapOf(K k, int i, K k2, int i2) {
MutableObjectIntMap<K> mutableObjectIntMap = new MutableObjectIntMap<>(0, 1, null);
mutableObjectIntMap.set(k, i);
mutableObjectIntMap.set(k2, i2);
return mutableObjectIntMap;
}
public static final <K> MutableObjectIntMap<K> mutableObjectIntMapOf(K k, int i, K k2, int i2, K k3, int i3) {
MutableObjectIntMap<K> mutableObjectIntMap = new MutableObjectIntMap<>(0, 1, null);
mutableObjectIntMap.set(k, i);
mutableObjectIntMap.set(k2, i2);
mutableObjectIntMap.set(k3, i3);
return mutableObjectIntMap;
}
public static final <K> MutableObjectIntMap<K> mutableObjectIntMapOf(K k, int i, K k2, int i2, K k3, int i3, K k4, int i4) {
MutableObjectIntMap<K> mutableObjectIntMap = new MutableObjectIntMap<>(0, 1, null);
mutableObjectIntMap.set(k, i);
mutableObjectIntMap.set(k2, i2);
mutableObjectIntMap.set(k3, i3);
mutableObjectIntMap.set(k4, i4);
return mutableObjectIntMap;
}
public static final <K> MutableObjectIntMap<K> mutableObjectIntMapOf(K k, int i, K k2, int i2, K k3, int i3, K k4, int i4, K k5, int i5) {
MutableObjectIntMap<K> mutableObjectIntMap = new MutableObjectIntMap<>(0, 1, null);
mutableObjectIntMap.set(k, i);
mutableObjectIntMap.set(k2, i2);
mutableObjectIntMap.set(k3, i3);
mutableObjectIntMap.set(k4, i4);
mutableObjectIntMap.set(k5, i5);
return mutableObjectIntMap;
}
}

View File

@@ -0,0 +1,597 @@
package androidx.collection;
import androidx.annotation.IntRange;
import com.ironsource.v8;
import java.util.Iterator;
import java.util.List;
import java.util.NoSuchElementException;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.functions.Function3;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlin.ranges.RangesKt___RangesKt;
@SourceDebugExtension({"SMAP\nObjectList.kt\nKotlin\n*S Kotlin\n*F\n+ 1 ObjectList.kt\nandroidx/collection/ObjectList\n+ 2 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n*L\n1#1,1618:1\n305#1,6:1619\n331#1,6:1625\n305#1,6:1633\n305#1,6:1639\n305#1,6:1645\n305#1,6:1651\n305#1,6:1657\n318#1,6:1663\n331#1,6:1669\n345#1,6:1675\n75#1:1681\n75#1:1682\n318#1,6:1683\n318#1,6:1689\n318#1,6:1695\n345#1,6:1701\n75#1:1707\n331#1,6:1708\n75#1:1714\n331#1,6:1715\n345#1,6:1721\n345#1,6:1727\n318#1,6:1733\n305#1,6:1739\n80#1:1745\n1855#2,2:1631\n*S KotlinDebug\n*F\n+ 1 ObjectList.kt\nandroidx/collection/ObjectList\n*L\n101#1:1619,6\n115#1:1625,6\n168#1:1633,6\n186#1:1639,6\n209#1:1645,6\n227#1:1651,6\n244#1:1657,6\n260#1:1663,6\n277#1:1669,6\n293#1:1675,6\n358#1:1681\n369#1:1682\n399#1:1683,6\n405#1:1689,6\n421#1:1695,6\n435#1:1701,6\n461#1:1707\n472#1:1708,6\n483#1:1714\n492#1:1715,6\n509#1:1721,6\n515#1:1727,6\n545#1:1733,6\n576#1:1739,6\n592#1:1745\n157#1:1631,2\n*E\n"})
/* loaded from: classes.dex */
public abstract class ObjectList<E> {
public int _size;
public Object[] content;
public /* synthetic */ ObjectList(int i, DefaultConstructorMarker defaultConstructorMarker) {
this(i);
}
public static /* synthetic */ void getContent$annotations() {
}
public static /* synthetic */ void get_size$annotations() {
}
public abstract List<E> asList();
public final int count() {
return this._size;
}
@IntRange(from = -1)
public final int getLastIndex() {
return this._size - 1;
}
@IntRange(from = 0)
public final int getSize() {
return this._size;
}
public final boolean isEmpty() {
return this._size == 0;
}
public final boolean isNotEmpty() {
return this._size != 0;
}
public final String joinToString() {
return joinToString$default(this, null, null, null, 0, null, null, 63, null);
}
public final String joinToString(CharSequence separator) {
Intrinsics.checkNotNullParameter(separator, "separator");
return joinToString$default(this, separator, null, null, 0, null, null, 62, null);
}
public final String joinToString(CharSequence separator, CharSequence prefix) {
Intrinsics.checkNotNullParameter(separator, "separator");
Intrinsics.checkNotNullParameter(prefix, "prefix");
return joinToString$default(this, separator, prefix, null, 0, null, null, 60, null);
}
public final String joinToString(CharSequence separator, CharSequence prefix, CharSequence postfix) {
Intrinsics.checkNotNullParameter(separator, "separator");
Intrinsics.checkNotNullParameter(prefix, "prefix");
Intrinsics.checkNotNullParameter(postfix, "postfix");
return joinToString$default(this, separator, prefix, postfix, 0, null, null, 56, null);
}
public final String joinToString(CharSequence separator, CharSequence prefix, CharSequence postfix, int i) {
Intrinsics.checkNotNullParameter(separator, "separator");
Intrinsics.checkNotNullParameter(prefix, "prefix");
Intrinsics.checkNotNullParameter(postfix, "postfix");
return joinToString$default(this, separator, prefix, postfix, i, null, null, 48, null);
}
public final String joinToString(CharSequence separator, CharSequence prefix, CharSequence postfix, int i, CharSequence truncated) {
Intrinsics.checkNotNullParameter(separator, "separator");
Intrinsics.checkNotNullParameter(prefix, "prefix");
Intrinsics.checkNotNullParameter(postfix, "postfix");
Intrinsics.checkNotNullParameter(truncated, "truncated");
return joinToString$default(this, separator, prefix, postfix, i, truncated, null, 32, null);
}
private ObjectList(int i) {
Object[] objArr;
if (i == 0) {
objArr = ObjectListKt.EmptyArray;
} else {
objArr = new Object[i];
}
this.content = objArr;
}
public final kotlin.ranges.IntRange getIndices() {
kotlin.ranges.IntRange until;
until = RangesKt___RangesKt.until(0, this._size);
return until;
}
public final boolean none() {
return isEmpty();
}
public final boolean any() {
return isNotEmpty();
}
public final boolean contains(E e) {
return indexOf(e) >= 0;
}
public final boolean containsAll(E[] elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
for (E e : elements) {
if (!contains(e)) {
return false;
}
}
return true;
}
public final boolean containsAll(List<? extends E> elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
int size = elements.size();
for (int i = 0; i < size; i++) {
if (!contains(elements.get(i))) {
return false;
}
}
return true;
}
public final E first() {
if (isEmpty()) {
throw new NoSuchElementException("ObjectList is empty.");
}
return (E) this.content[0];
}
public final E firstOrNull() {
if (isEmpty()) {
return null;
}
return get(0);
}
/* JADX WARN: Multi-variable type inference failed */
public final boolean containsAll(ObjectList<E> elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
Object[] objArr = elements.content;
int i = elements._size;
for (int i2 = 0; i2 < i; i2++) {
if (!contains(objArr[i2])) {
return false;
}
}
return true;
}
public final boolean any(Function1 predicate) {
Intrinsics.checkNotNullParameter(predicate, "predicate");
Object[] objArr = this.content;
int i = this._size;
for (int i2 = 0; i2 < i; i2++) {
if (((Boolean) predicate.invoke(objArr[i2])).booleanValue()) {
return true;
}
}
return false;
}
public final int count(Function1 predicate) {
Intrinsics.checkNotNullParameter(predicate, "predicate");
Object[] objArr = this.content;
int i = this._size;
int i2 = 0;
for (int i3 = 0; i3 < i; i3++) {
if (((Boolean) predicate.invoke(objArr[i3])).booleanValue()) {
i2++;
}
}
return i2;
}
public final E first(Function1 predicate) {
Intrinsics.checkNotNullParameter(predicate, "predicate");
Object[] objArr = this.content;
int i = this._size;
for (int i2 = 0; i2 < i; i2++) {
E e = (E) objArr[i2];
if (((Boolean) predicate.invoke(e)).booleanValue()) {
return e;
}
}
throw new NoSuchElementException("ObjectList contains no element matching the predicate.");
}
public final E firstOrNull(Function1 predicate) {
Intrinsics.checkNotNullParameter(predicate, "predicate");
Object[] objArr = this.content;
int i = this._size;
for (int i2 = 0; i2 < i; i2++) {
E e = (E) objArr[i2];
if (((Boolean) predicate.invoke(e)).booleanValue()) {
return e;
}
}
return null;
}
public final <R> R fold(R r, Function2 operation) {
Intrinsics.checkNotNullParameter(operation, "operation");
Object[] objArr = this.content;
int i = this._size;
for (int i2 = 0; i2 < i; i2++) {
r = (R) operation.invoke(r, objArr[i2]);
}
return r;
}
public final void forEach(Function1 block) {
Intrinsics.checkNotNullParameter(block, "block");
Object[] objArr = this.content;
int i = this._size;
for (int i2 = 0; i2 < i; i2++) {
block.invoke(objArr[i2]);
}
}
public int hashCode() {
Object[] objArr = this.content;
int i = this._size;
int i2 = 0;
for (int i3 = 0; i3 < i; i3++) {
Object obj = objArr[i3];
i2 += (obj != null ? obj.hashCode() : 0) * 31;
}
return i2;
}
public final <R> R foldIndexed(R r, Function3 operation) {
Intrinsics.checkNotNullParameter(operation, "operation");
Object[] objArr = this.content;
int i = this._size;
for (int i2 = 0; i2 < i; i2++) {
r = (R) operation.invoke(Integer.valueOf(i2), r, objArr[i2]);
}
return r;
}
public final void forEachIndexed(Function2 block) {
Intrinsics.checkNotNullParameter(block, "block");
Object[] objArr = this.content;
int i = this._size;
for (int i2 = 0; i2 < i; i2++) {
block.invoke(Integer.valueOf(i2), objArr[i2]);
}
}
public final int indexOf(E e) {
int i = 0;
if (e == null) {
Object[] objArr = this.content;
int i2 = this._size;
while (i < i2) {
if (objArr[i] == null) {
return i;
}
i++;
}
return -1;
}
Object[] objArr2 = this.content;
int i3 = this._size;
while (i < i3) {
if (e.equals(objArr2[i])) {
return i;
}
i++;
}
return -1;
}
public final int indexOfFirst(Function1 predicate) {
Intrinsics.checkNotNullParameter(predicate, "predicate");
Object[] objArr = this.content;
int i = this._size;
for (int i2 = 0; i2 < i; i2++) {
if (((Boolean) predicate.invoke(objArr[i2])).booleanValue()) {
return i2;
}
}
return -1;
}
public final <R> R foldRight(R r, Function2 operation) {
Intrinsics.checkNotNullParameter(operation, "operation");
Object[] objArr = this.content;
int i = this._size;
while (true) {
i--;
if (-1 >= i) {
return r;
}
r = (R) operation.invoke(objArr[i], r);
}
}
public final void forEachReversed(Function1 block) {
Intrinsics.checkNotNullParameter(block, "block");
Object[] objArr = this.content;
int i = this._size;
while (true) {
i--;
if (-1 >= i) {
return;
} else {
block.invoke(objArr[i]);
}
}
}
public final E last(Function1 predicate) {
E e;
Intrinsics.checkNotNullParameter(predicate, "predicate");
Object[] objArr = this.content;
int i = this._size;
do {
i--;
if (-1 < i) {
e = (E) objArr[i];
} else {
throw new NoSuchElementException("ObjectList contains no element matching the predicate.");
}
} while (!((Boolean) predicate.invoke(e)).booleanValue());
return e;
}
public final E lastOrNull(Function1 predicate) {
E e;
Intrinsics.checkNotNullParameter(predicate, "predicate");
Object[] objArr = this.content;
int i = this._size;
do {
i--;
if (-1 >= i) {
return null;
}
e = (E) objArr[i];
} while (!((Boolean) predicate.invoke(e)).booleanValue());
return e;
}
public final boolean reversedAny(Function1 predicate) {
Intrinsics.checkNotNullParameter(predicate, "predicate");
Object[] objArr = this.content;
for (int i = this._size - 1; -1 < i; i--) {
if (((Boolean) predicate.invoke(objArr[i])).booleanValue()) {
return true;
}
}
return false;
}
public final <R> R foldRightIndexed(R r, Function3 operation) {
Intrinsics.checkNotNullParameter(operation, "operation");
Object[] objArr = this.content;
int i = this._size;
while (true) {
i--;
if (-1 >= i) {
return r;
}
r = (R) operation.invoke(Integer.valueOf(i), objArr[i], r);
}
}
public final void forEachReversedIndexed(Function2 block) {
Intrinsics.checkNotNullParameter(block, "block");
Object[] objArr = this.content;
int i = this._size;
while (true) {
i--;
if (-1 >= i) {
return;
} else {
block.invoke(Integer.valueOf(i), objArr[i]);
}
}
}
public final int indexOfLast(Function1 predicate) {
Intrinsics.checkNotNullParameter(predicate, "predicate");
Object[] objArr = this.content;
int i = this._size;
do {
i--;
if (-1 >= i) {
return -1;
}
} while (!((Boolean) predicate.invoke(objArr[i])).booleanValue());
return i;
}
public final int lastIndexOf(E e) {
if (e == null) {
Object[] objArr = this.content;
for (int i = this._size - 1; -1 < i; i--) {
if (objArr[i] == null) {
return i;
}
}
} else {
Object[] objArr2 = this.content;
for (int i2 = this._size - 1; -1 < i2; i2--) {
if (e.equals(objArr2[i2])) {
return i2;
}
}
}
return -1;
}
public final E get(@IntRange(from = 0) int i) {
if (i < 0 || i >= this._size) {
StringBuilder sb = new StringBuilder();
sb.append("Index ");
sb.append(i);
sb.append(" must be in 0..");
sb.append(this._size - 1);
throw new IndexOutOfBoundsException(sb.toString());
}
return (E) this.content[i];
}
public final E elementAt(@IntRange(from = 0) int i) {
if (i < 0 || i >= this._size) {
StringBuilder sb = new StringBuilder();
sb.append("Index ");
sb.append(i);
sb.append(" must be in 0..");
sb.append(this._size - 1);
throw new IndexOutOfBoundsException(sb.toString());
}
return (E) this.content[i];
}
public final E elementAtOrElse(@IntRange(from = 0) int i, Function1 defaultValue) {
Intrinsics.checkNotNullParameter(defaultValue, "defaultValue");
if (i < 0 || i >= this._size) {
return (E) defaultValue.invoke(Integer.valueOf(i));
}
return (E) this.content[i];
}
public final E last() {
if (!isEmpty()) {
return (E) this.content[this._size - 1];
}
throw new NoSuchElementException("ObjectList is empty.");
}
public final E lastOrNull() {
if (isEmpty()) {
return null;
}
return (E) this.content[this._size - 1];
}
public static /* synthetic */ String joinToString$default(ObjectList objectList, CharSequence charSequence, CharSequence charSequence2, CharSequence charSequence3, int i, CharSequence charSequence4, Function1 function1, int i2, Object obj) {
if (obj != null) {
throw new UnsupportedOperationException("Super calls with default arguments not supported in this target, function: joinToString");
}
if ((i2 & 1) != 0) {
charSequence = ", ";
}
CharSequence charSequence5 = (i2 & 2) != 0 ? "" : charSequence2;
CharSequence charSequence6 = (i2 & 4) == 0 ? charSequence3 : "";
if ((i2 & 8) != 0) {
i = -1;
}
int i3 = i;
if ((i2 & 16) != 0) {
charSequence4 = "...";
}
CharSequence charSequence7 = charSequence4;
if ((i2 & 32) != 0) {
function1 = null;
}
return objectList.joinToString(charSequence, charSequence5, charSequence6, i3, charSequence7, function1);
}
public final String joinToString(CharSequence separator, CharSequence prefix, CharSequence postfix, int i, CharSequence truncated, Function1 function1) {
Intrinsics.checkNotNullParameter(separator, "separator");
Intrinsics.checkNotNullParameter(prefix, "prefix");
Intrinsics.checkNotNullParameter(postfix, "postfix");
Intrinsics.checkNotNullParameter(truncated, "truncated");
StringBuilder sb = new StringBuilder();
sb.append(prefix);
Object[] objArr = this.content;
int i2 = this._size;
int i3 = 0;
while (true) {
if (i3 < i2) {
Object obj = objArr[i3];
if (i3 == i) {
sb.append(truncated);
break;
}
if (i3 != 0) {
sb.append(separator);
}
if (function1 == null) {
sb.append(obj);
} else {
sb.append((CharSequence) function1.invoke(obj));
}
i3++;
} else {
sb.append(postfix);
break;
}
}
String sb2 = sb.toString();
Intrinsics.checkNotNullExpressionValue(sb2, "StringBuilder().apply(builderAction).toString()");
return sb2;
}
public boolean equals(Object obj) {
kotlin.ranges.IntRange until;
if (obj instanceof ObjectList) {
ObjectList objectList = (ObjectList) obj;
int i = objectList._size;
int i2 = this._size;
if (i == i2) {
Object[] objArr = this.content;
Object[] objArr2 = objectList.content;
until = RangesKt___RangesKt.until(0, i2);
int first = until.getFirst();
int last = until.getLast();
if (first > last) {
return true;
}
while (Intrinsics.areEqual(objArr[first], objArr2[first])) {
if (first == last) {
return true;
}
first++;
}
return false;
}
}
return false;
}
public String toString() {
return joinToString$default(this, null, v8.i.d, v8.i.e, 0, null, new Function1(this) { // from class: androidx.collection.ObjectList$toString$1
final /* synthetic */ ObjectList<E> this$0;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
{
super(1);
this.this$0 = this;
}
@Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ Object invoke(Object obj) {
return invoke((ObjectList$toString$1) obj);
}
@Override // kotlin.jvm.functions.Function1
public final CharSequence invoke(E e) {
return e == this.this$0 ? "(this)" : String.valueOf(e);
}
}, 25, null);
}
public final boolean containsAll(Iterable<? extends E> elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
Iterator<? extends E> it = elements.iterator();
while (it.hasNext()) {
if (!contains(it.next())) {
return false;
}
}
return true;
}
}

View File

@@ -0,0 +1,98 @@
package androidx.collection;
import java.util.List;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
@SourceDebugExtension({"SMAP\nObjectList.kt\nKotlin\n*S Kotlin\n*F\n+ 1 ObjectList.kt\nandroidx/collection/ObjectListKt\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n+ 3 ObjectList.kt\nandroidx/collection/MutableObjectList\n*L\n1#1,1618:1\n1#2:1619\n948#3,2:1620\n948#3,2:1622\n948#3,2:1624\n948#3,2:1626\n948#3,2:1628\n948#3,2:1630\n*S KotlinDebug\n*F\n+ 1 ObjectList.kt\nandroidx/collection/ObjectListKt\n*L\n1587#1:1620,2\n1596#1:1622,2\n1597#1:1624,2\n1607#1:1626,2\n1608#1:1628,2\n1609#1:1630,2\n*E\n"})
/* loaded from: classes.dex */
public final class ObjectListKt {
private static final Object[] EmptyArray = new Object[0];
private static final ObjectList<Object> EmptyObjectList = new MutableObjectList(0);
/* JADX INFO: Access modifiers changed from: private */
public static final void checkIndex(List<?> list, int i) {
int size = list.size();
if (i < 0 || i >= size) {
throw new IndexOutOfBoundsException("Index " + i + " is out of bounds. The list has " + size + " elements.");
}
}
/* JADX INFO: Access modifiers changed from: private */
public static final void checkSubIndex(List<?> list, int i, int i2) {
int size = list.size();
if (i > i2) {
throw new IllegalArgumentException("Indices are out of order. fromIndex (" + i + ") is greater than toIndex (" + i2 + ").");
}
if (i < 0) {
throw new IndexOutOfBoundsException("fromIndex (" + i + ") is less than 0.");
}
if (i2 <= size) {
return;
}
throw new IndexOutOfBoundsException("toIndex (" + i2 + ") is more than than the list size (" + size + ')');
}
public static final <E> ObjectList<E> emptyObjectList() {
ObjectList<E> objectList = (ObjectList<E>) EmptyObjectList;
Intrinsics.checkNotNull(objectList, "null cannot be cast to non-null type androidx.collection.ObjectList<E of androidx.collection.ObjectListKt.emptyObjectList>");
return objectList;
}
public static final <E> ObjectList<E> objectListOf() {
ObjectList<E> objectList = (ObjectList<E>) EmptyObjectList;
Intrinsics.checkNotNull(objectList, "null cannot be cast to non-null type androidx.collection.ObjectList<E of androidx.collection.ObjectListKt.objectListOf>");
return objectList;
}
public static final <E> ObjectList<E> objectListOf(E e) {
return mutableObjectListOf(e);
}
public static final <E> ObjectList<E> objectListOf(E e, E e2) {
return mutableObjectListOf(e, e2);
}
public static final <E> ObjectList<E> objectListOf(E e, E e2, E e3) {
return mutableObjectListOf(e, e2, e3);
}
public static final <E> ObjectList<E> objectListOf(E... elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
MutableObjectList mutableObjectList = new MutableObjectList(elements.length);
mutableObjectList.plusAssign((Object[]) elements);
return mutableObjectList;
}
public static final <E> MutableObjectList<E> mutableObjectListOf() {
return new MutableObjectList<>(0, 1, null);
}
public static final <E> MutableObjectList<E> mutableObjectListOf(E e) {
MutableObjectList<E> mutableObjectList = new MutableObjectList<>(1);
mutableObjectList.add(e);
return mutableObjectList;
}
public static final <E> MutableObjectList<E> mutableObjectListOf(E e, E e2) {
MutableObjectList<E> mutableObjectList = new MutableObjectList<>(2);
mutableObjectList.add(e);
mutableObjectList.add(e2);
return mutableObjectList;
}
public static final <E> MutableObjectList<E> mutableObjectListOf(E e, E e2, E e3) {
MutableObjectList<E> mutableObjectList = new MutableObjectList<>(3);
mutableObjectList.add(e);
mutableObjectList.add(e2);
mutableObjectList.add(e3);
return mutableObjectList;
}
public static final <E> MutableObjectList<E> mutableObjectListOf(E... elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
MutableObjectList<E> mutableObjectList = new MutableObjectList<>(elements.length);
mutableObjectList.plusAssign((Object[]) elements);
return mutableObjectList;
}
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,104 @@
package androidx.collection;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes.dex */
public final class ObjectLongMapKt {
private static final MutableObjectLongMap<Object> EmptyObjectLongMap = new MutableObjectLongMap<>(0);
public static final <K> ObjectLongMap<K> emptyObjectLongMap() {
MutableObjectLongMap<Object> mutableObjectLongMap = EmptyObjectLongMap;
Intrinsics.checkNotNull(mutableObjectLongMap, "null cannot be cast to non-null type androidx.collection.ObjectLongMap<K of androidx.collection.ObjectLongMapKt.emptyObjectLongMap>");
return mutableObjectLongMap;
}
public static final <K> ObjectLongMap<K> objectLongMap() {
MutableObjectLongMap<Object> mutableObjectLongMap = EmptyObjectLongMap;
Intrinsics.checkNotNull(mutableObjectLongMap, "null cannot be cast to non-null type androidx.collection.ObjectLongMap<K of androidx.collection.ObjectLongMapKt.objectLongMap>");
return mutableObjectLongMap;
}
public static final <K> ObjectLongMap<K> objectLongMapOf(K k, long j) {
MutableObjectLongMap mutableObjectLongMap = new MutableObjectLongMap(0, 1, null);
mutableObjectLongMap.set(k, j);
return mutableObjectLongMap;
}
public static final <K> ObjectLongMap<K> objectLongMapOf(K k, long j, K k2, long j2) {
MutableObjectLongMap mutableObjectLongMap = new MutableObjectLongMap(0, 1, null);
mutableObjectLongMap.set(k, j);
mutableObjectLongMap.set(k2, j2);
return mutableObjectLongMap;
}
public static final <K> ObjectLongMap<K> objectLongMapOf(K k, long j, K k2, long j2, K k3, long j3) {
MutableObjectLongMap mutableObjectLongMap = new MutableObjectLongMap(0, 1, null);
mutableObjectLongMap.set(k, j);
mutableObjectLongMap.set(k2, j2);
mutableObjectLongMap.set(k3, j3);
return mutableObjectLongMap;
}
public static final <K> ObjectLongMap<K> objectLongMapOf(K k, long j, K k2, long j2, K k3, long j3, K k4, long j4) {
MutableObjectLongMap mutableObjectLongMap = new MutableObjectLongMap(0, 1, null);
mutableObjectLongMap.set(k, j);
mutableObjectLongMap.set(k2, j2);
mutableObjectLongMap.set(k3, j3);
mutableObjectLongMap.set(k4, j4);
return mutableObjectLongMap;
}
public static final <K> ObjectLongMap<K> objectLongMapOf(K k, long j, K k2, long j2, K k3, long j3, K k4, long j4, K k5, long j5) {
MutableObjectLongMap mutableObjectLongMap = new MutableObjectLongMap(0, 1, null);
mutableObjectLongMap.set(k, j);
mutableObjectLongMap.set(k2, j2);
mutableObjectLongMap.set(k3, j3);
mutableObjectLongMap.set(k4, j4);
mutableObjectLongMap.set(k5, j5);
return mutableObjectLongMap;
}
public static final <K> MutableObjectLongMap<K> mutableObjectLongMapOf() {
return new MutableObjectLongMap<>(0, 1, null);
}
public static final <K> MutableObjectLongMap<K> mutableObjectLongMapOf(K k, long j) {
MutableObjectLongMap<K> mutableObjectLongMap = new MutableObjectLongMap<>(0, 1, null);
mutableObjectLongMap.set(k, j);
return mutableObjectLongMap;
}
public static final <K> MutableObjectLongMap<K> mutableObjectLongMapOf(K k, long j, K k2, long j2) {
MutableObjectLongMap<K> mutableObjectLongMap = new MutableObjectLongMap<>(0, 1, null);
mutableObjectLongMap.set(k, j);
mutableObjectLongMap.set(k2, j2);
return mutableObjectLongMap;
}
public static final <K> MutableObjectLongMap<K> mutableObjectLongMapOf(K k, long j, K k2, long j2, K k3, long j3) {
MutableObjectLongMap<K> mutableObjectLongMap = new MutableObjectLongMap<>(0, 1, null);
mutableObjectLongMap.set(k, j);
mutableObjectLongMap.set(k2, j2);
mutableObjectLongMap.set(k3, j3);
return mutableObjectLongMap;
}
public static final <K> MutableObjectLongMap<K> mutableObjectLongMapOf(K k, long j, K k2, long j2, K k3, long j3, K k4, long j4) {
MutableObjectLongMap<K> mutableObjectLongMap = new MutableObjectLongMap<>(0, 1, null);
mutableObjectLongMap.set(k, j);
mutableObjectLongMap.set(k2, j2);
mutableObjectLongMap.set(k3, j3);
mutableObjectLongMap.set(k4, j4);
return mutableObjectLongMap;
}
public static final <K> MutableObjectLongMap<K> mutableObjectLongMapOf(K k, long j, K k2, long j2, K k3, long j3, K k4, long j4, K k5, long j5) {
MutableObjectLongMap<K> mutableObjectLongMap = new MutableObjectLongMap<>(0, 1, null);
mutableObjectLongMap.set(k, j);
mutableObjectLongMap.set(k2, j2);
mutableObjectLongMap.set(k3, j3);
mutableObjectLongMap.set(k4, j4);
mutableObjectLongMap.set(k5, j5);
return mutableObjectLongMap;
}
}

View File

@@ -0,0 +1,12 @@
package androidx.collection;
/* loaded from: classes.dex */
public final class PackingUtilsKt {
public static final long packInts(int i, int i2) {
return (i2 & 4294967295L) | (i << 32);
}
public static final long packFloats(float f, float f2) {
return (Float.floatToRawIntBits(f2) & 4294967295L) | (Float.floatToRawIntBits(f) << 32);
}
}

View File

@@ -0,0 +1,66 @@
package androidx.collection;
import com.ironsource.mediationsdk.logger.IronSourceError;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.RestrictedSuspendLambda;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlin.sequences.SequenceScope;
@DebugMetadata(c = "androidx.collection.ScatterMap$MapWrapper$entries$1$iterator$1", f = "ScatterMap.kt", l = {IronSourceError.ERROR_NT_LOAD_AFTER_LONG_INITIATION}, m = "invokeSuspend")
@SourceDebugExtension({"SMAP\nScatterMap.kt\nKotlin\n*S Kotlin\n*F\n+ 1 ScatterMap.kt\nandroidx/collection/ScatterMap$MapWrapper$entries$1$iterator$1\n+ 2 ScatterMap.kt\nandroidx/collection/ScatterMap\n+ 3 ScatterMap.kt\nandroidx/collection/ScatterMapKt\n*L\n1#1,1850:1\n363#2,6:1851\n373#2,3:1858\n376#2,9:1862\n1826#3:1857\n1688#3:1861\n*S KotlinDebug\n*F\n+ 1 ScatterMap.kt\nandroidx/collection/ScatterMap$MapWrapper$entries$1$iterator$1\n*L\n699#1:1851,6\n699#1:1858,3\n699#1:1862,9\n699#1:1857\n699#1:1861\n*E\n"})
/* loaded from: classes.dex */
public final class ScatterMap$MapWrapper$entries$1$iterator$1 extends RestrictedSuspendLambda implements Function2 {
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 */ ScatterMap<K, V> this$0;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public ScatterMap$MapWrapper$entries$1$iterator$1(ScatterMap<K, V> scatterMap, Continuation continuation) {
super(2, continuation);
this.this$0 = scatterMap;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation create(Object obj, Continuation continuation) {
ScatterMap$MapWrapper$entries$1$iterator$1 scatterMap$MapWrapper$entries$1$iterator$1 = new ScatterMap$MapWrapper$entries$1$iterator$1(this.this$0, continuation);
scatterMap$MapWrapper$entries$1$iterator$1.L$0 = obj;
return scatterMap$MapWrapper$entries$1$iterator$1;
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(SequenceScope sequenceScope, Continuation continuation) {
return ((ScatterMap$MapWrapper$entries$1$iterator$1) create(sequenceScope, continuation)).invokeSuspend(Unit.INSTANCE);
}
/* JADX WARN: Removed duplicated region for block: B:17:0x00b2 */
/* JADX WARN: Removed duplicated region for block: B:21:0x00c0 */
/* JADX WARN: Removed duplicated region for block: B:24:0x0056 */
/* JADX WARN: Removed duplicated region for block: B:25:0x00bc */
/* JADX WARN: Removed duplicated region for block: B:9:0x006d */
/* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:15:0x00a0 -> B:5:0x00a4). Please report as a decompilation issue!!! */
/* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:16:0x00ab -> B:6:0x00a8). Please report as a decompilation issue!!! */
/* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:24:0x0056 -> B:8:0x006b). Please report as a decompilation issue!!! */
/* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:25:0x00bc -> B:20:0x00be). Please report as a decompilation issue!!! */
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final java.lang.Object invokeSuspend(java.lang.Object r23) {
/*
Method dump skipped, instructions count: 200
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.collection.ScatterMap$MapWrapper$entries$1$iterator$1.invokeSuspend(java.lang.Object):java.lang.Object");
}
}

Some files were not shown because too many files have changed in this diff Show More