alexandroid/decompiled/jadx/sources/androidx/collection/ScatterSet.java
KaKi87 a47fad5135 📦 Add decompiled Alexa 2.2.730155.0 (jadx, apktool, Hermes strings)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 00:04:16 +01:00

713 lines
32 KiB
Java

package androidx.collection;
import androidx.annotation.IntRange;
import androidx.collection.internal.ContainerHelpersKt;
import androidx.collection.internal.RuntimeHelpersKt;
import androidx.exifinterface.media.ExifInterface;
import com.amazon.alexa.ra.core.ui.markdown.parser.formatter.MarkdownConstants;
import com.amazon.alexa.redesign.view.container.CardStudioAgentSpaceMetrics;
import com.amazon.appmanager.lib.DefaultPreloadManager;
import com.amazon.dee.app.services.metrics.AlexaMetricsConstants;
import com.facebook.react.uimanager.ViewProps;
import io.ktor.util.PathKt$$ExternalSyntheticBUOutline0;
import java.util.Set;
import kotlin.Metadata;
import kotlin.PublishedApi;
import kotlin.Unit;
import kotlin.jvm.JvmField;
import kotlin.jvm.JvmOverloads;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import okio.Buffer$$ExternalSyntheticBUOutline0;
import org.apache.commons.codec.language.bm.Languages;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
@Metadata(d1 = {"\u0000\\\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\b\n\u0002\b\u0005\n\u0002\u0010\u0011\n\u0002\b\u0003\n\u0002\u0010\u0016\n\u0002\b\u0004\n\u0002\u0010\u000b\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0010\"\n\u0002\b\r\n\u0002\u0010\u0002\n\u0002\b\u0007\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010\r\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0000\b6\u0018\u0000*\u0004\b\u0000\u0010\u00012\u00020\u0002B\u0007\b\u0004¢\u0006\u0002\u0010\u0003J:\u0010\u0013\u001a\u00020\u00142!\u0010\u0015\u001a\u001d\u0012\u0013\u0012\u00118\u0000¢\u0006\f\b\u0017\u0012\b\b\u0018\u0012\u0004\b\b(\u0019\u0012\u0004\u0012\u00020\u00140\u0016H\u0086\bø\u0001\u0000\u0082\u0002\b\n\u0006\b\u0001\u0012\u0002\u0010\u0001J\u0006\u0010\u001a\u001a\u00020\u0014J:\u0010\u001a\u001a\u00020\u00142!\u0010\u0015\u001a\u001d\u0012\u0013\u0012\u00118\u0000¢\u0006\f\b\u0017\u0012\b\b\u0018\u0012\u0004\b\b(\u0019\u0012\u0004\u0012\u00020\u00140\u0016H\u0086\bø\u0001\u0000\u0082\u0002\b\n\u0006\b\u0001\u0012\u0002\u0010\u0001J\f\u0010\u001b\u001a\b\u0012\u0004\u0012\u00028\u00000\u001cJ\u0016\u0010\u001d\u001a\u00020\u00142\u0006\u0010\u0019\u001a\u00028\u0000H\u0086\u0002¢\u0006\u0002\u0010\u001eJ\b\u0010\u001f\u001a\u00020\u0005H\u0007J:\u0010\u001f\u001a\u00020\u00052!\u0010\u0015\u001a\u001d\u0012\u0013\u0012\u00118\u0000¢\u0006\f\b\u0017\u0012\b\b\u0018\u0012\u0004\b\b(\u0019\u0012\u0004\u0012\u00020\u00140\u0016H\u0087\bø\u0001\u0000\u0082\u0002\b\n\u0006\b\u0001\u0012\u0002\u0010\u0001J\u0013\u0010 \u001a\u00020\u00142\b\u0010!\u001a\u0004\u0018\u00010\u0002H\u0096\u0002J\u0018\u0010\"\u001a\u00020\u00052\u0006\u0010\u0019\u001a\u00028\u0000H\u0080\b¢\u0006\u0004\b#\u0010$J\u000b\u0010%\u001a\u00028\u0000¢\u0006\u0002\u0010&J?\u0010%\u001a\u00028\u00002!\u0010\u0015\u001a\u001d\u0012\u0013\u0012\u00118\u0000¢\u0006\f\b\u0017\u0012\b\b\u0018\u0012\u0004\b\b(\u0019\u0012\u0004\u0012\u00020\u00140\u0016H\u0086\bø\u0001\u0000\u0082\u0002\b\n\u0006\b\u0001\u0012\u0002\u0010\u0001¢\u0006\u0002\u0010'JA\u0010(\u001a\u0004\u0018\u00018\u00002!\u0010\u0015\u001a\u001d\u0012\u0013\u0012\u00118\u0000¢\u0006\f\b\u0017\u0012\b\b\u0018\u0012\u0004\b\b(\u0019\u0012\u0004\u0012\u00020\u00140\u0016H\u0086\bø\u0001\u0000\u0082\u0002\b\n\u0006\b\u0001\u0012\u0002\u0010\u0001¢\u0006\u0002\u0010'J:\u0010)\u001a\u00020*2!\u0010+\u001a\u001d\u0012\u0013\u0012\u00118\u0000¢\u0006\f\b\u0017\u0012\b\b\u0018\u0012\u0004\b\b(\u0019\u0012\u0004\u0012\u00020*0\u0016H\u0086\bø\u0001\u0000\u0082\u0002\b\n\u0006\b\u0001\u0012\u0002\u0010\u0001J:\u0010,\u001a\u00020*2!\u0010+\u001a\u001d\u0012\u0013\u0012\u00110\u0005¢\u0006\f\b\u0017\u0012\b\b\u0018\u0012\u0004\b\b(-\u0012\u0004\u0012\u00020*0\u0016H\u0081\bø\u0001\u0000\u0082\u0002\b\n\u0006\b\u0001\u0012\u0002\u0010\u0001J\b\u0010.\u001a\u00020\u0005H\u0016J\u0006\u0010/\u001a\u00020\u0014J\u0006\u00100\u001a\u00020\u0014JR\u00101\u001a\u0002022\b\b\u0002\u00103\u001a\u0002042\b\b\u0002\u00105\u001a\u0002042\b\b\u0002\u00106\u001a\u0002042\b\b\u0002\u00107\u001a\u00020\u00052\b\b\u0002\u00108\u001a\u0002042\u0016\b\u0002\u00109\u001a\u0010\u0012\u0004\u0012\u00028\u0000\u0012\u0004\u0012\u000204\u0018\u00010\u0016H\u0007J\u0006\u0010:\u001a\u00020\u0014J\b\u0010;\u001a\u000202H\u0016R\u0012\u0010\u0004\u001a\u00020\u00058\u0000@\u0000X\u0081\u000e¢\u0006\u0002\n\u0000R\u0012\u0010\u0006\u001a\u00020\u00058\u0000@\u0000X\u0081\u000e¢\u0006\u0002\n\u0000R\u0011\u0010\u0007\u001a\u00020\u00058G¢\u0006\u0006\u001a\u0004\b\b\u0010\tR\"\u0010\n\u001a\n\u0012\u0006\u0012\u0004\u0018\u00010\u00020\u000b8\u0000@\u0000X\u0081\u000e¢\u0006\n\n\u0002\u0010\r\u0012\u0004\b\f\u0010\u0003R\u0018\u0010\u000e\u001a\u00020\u000f8\u0000@\u0000X\u0081\u000e¢\u0006\b\n\u0000\u0012\u0004\b\u0010\u0010\u0003R\u0011\u0010\u0011\u001a\u00020\u00058G¢\u0006\u0006\u001a\u0004\b\u0012\u0010\t\u0082\u0001\u0001<\u0082\u0002\u0007\n\u0005\b\u009920\u0001¨\u0006="}, d2 = {"Landroidx/collection/ScatterSet;", ExifInterface.LONGITUDE_EAST, "", "()V", "_capacity", "", "_size", "capacity", "getCapacity", "()I", AlexaMetricsConstants.MetricsComponents.ELEMENTS, "", "getElements$annotations", "[Ljava/lang/Object;", "metadata", "", "getMetadata$annotations", "size", "getSize", "all", "", "predicate", "Lkotlin/Function1;", "Lkotlin/ParameterName;", "name", "element", Languages.ANY, "asSet", "", "contains", "(Ljava/lang/Object;)Z", "count", "equals", CardStudioAgentSpaceMetrics.DimensionValue.SCHEME_OTHER, "findElementIndex", "findElementIndex$collection", "(Ljava/lang/Object;)I", DefaultPreloadManager.METRIC_PATH_FIRST, "()Ljava/lang/Object;", "(Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;", "firstOrNull", "forEach", "", "block", "forEachIndex", "index", "hashCode", "isEmpty", "isNotEmpty", "joinToString", "", "separator", "", "prefix", "postfix", "limit", "truncated", ViewProps.TRANSFORM, "none", "toString", "Landroidx/collection/MutableScatterSet;", "collection"}, k = 1, mv = {1, 9, 0}, xi = 48)
@SourceDebugExtension({"SMAP\nScatterSet.kt\nKotlin\n*S Kotlin\n*F\n+ 1 ScatterSet.kt\nandroidx/collection/ScatterSet\n+ 2 ScatterMap.kt\nandroidx/collection/ScatterMapKt\n*L\n1#1,1210:1\n231#1,3:1211\n200#1,7:1214\n211#1,3:1222\n214#1,9:1226\n234#1:1235\n231#1,3:1236\n200#1,7:1239\n211#1,3:1247\n214#1,9:1251\n234#1:1260\n231#1,3:1261\n200#1,7:1264\n211#1,3:1272\n214#1,9:1276\n234#1:1285\n200#1,7:1288\n211#1,3:1296\n214#1,9:1300\n231#1,3:1309\n200#1,7:1312\n211#1,3:1320\n214#1,9:1324\n234#1:1333\n231#1,3:1334\n200#1,7:1337\n211#1,3:1345\n214#1,9:1349\n234#1:1358\n231#1,3:1359\n200#1,7:1362\n211#1,3:1370\n214#1,9:1374\n234#1:1383\n390#1:1384\n391#1:1388\n393#1,2:1390\n395#1,3:1393\n398#1:1399\n399#1:1403\n400#1:1405\n401#1,4:1408\n407#1:1413\n408#1,8:1415\n231#1,3:1423\n200#1,7:1426\n211#1,3:1434\n214#1,9:1438\n234#1:1447\n231#1,3:1448\n200#1,7:1451\n211#1,3:1459\n214#1,9:1463\n234#1:1472\n231#1,3:1473\n200#1,7:1476\n211#1,3:1484\n214#1,9:1488\n234#1:1497\n1399#2:1221\n1270#2:1225\n1399#2:1246\n1270#2:1250\n1399#2:1271\n1270#2:1275\n1399#2:1286\n1270#2:1287\n1399#2:1295\n1270#2:1299\n1399#2:1319\n1270#2:1323\n1399#2:1344\n1270#2:1348\n1399#2:1369\n1270#2:1373\n1165#2,3:1385\n1179#2:1389\n1175#2:1392\n1372#2,3:1396\n1386#2,3:1400\n1312#2:1404\n1303#2:1406\n1297#2:1407\n1309#2:1412\n1393#2:1414\n1399#2:1433\n1270#2:1437\n1399#2:1458\n1270#2:1462\n1399#2:1483\n1270#2:1487\n1165#2,3:1498\n1179#2:1501\n1175#2:1502\n1372#2,3:1503\n1386#2,3:1506\n1312#2:1509\n1303#2:1510\n1297#2:1511\n1309#2:1512\n1393#2:1513\n*S KotlinDebug\n*F\n+ 1 ScatterSet.kt\nandroidx/collection/ScatterSet\n*L\n163#1:1211,3\n163#1:1214,7\n163#1:1222,3\n163#1:1226,9\n163#1:1235\n179#1:1236,3\n179#1:1239,7\n179#1:1247,3\n179#1:1251,9\n179#1:1260\n193#1:1261,3\n193#1:1264,7\n193#1:1272,3\n193#1:1276,9\n193#1:1285\n233#1:1288,7\n233#1:1296,3\n233#1:1300,9\n245#1:1309,3\n245#1:1312,7\n245#1:1320,3\n245#1:1324,9\n245#1:1333\n257#1:1334,3\n257#1:1337,7\n257#1:1345,3\n257#1:1349,9\n257#1:1358\n274#1:1359,3\n274#1:1362,7\n274#1:1370,3\n274#1:1374,9\n274#1:1383\n283#1:1384\n283#1:1388\n283#1:1390,2\n283#1:1393,3\n283#1:1399\n283#1:1403\n283#1:1405\n283#1:1408,4\n283#1:1413\n283#1:1415,8\n306#1:1423,3\n306#1:1426,7\n306#1:1434,3\n306#1:1438,9\n306#1:1447\n333#1:1448,3\n333#1:1451,7\n333#1:1459,3\n333#1:1463,9\n333#1:1472\n363#1:1473,3\n363#1:1476,7\n363#1:1484,3\n363#1:1488,9\n363#1:1497\n163#1:1221\n163#1:1225\n179#1:1246\n179#1:1250\n193#1:1271\n193#1:1275\n206#1:1286\n213#1:1287\n233#1:1295\n233#1:1299\n245#1:1319\n245#1:1323\n257#1:1344\n257#1:1348\n274#1:1369\n274#1:1373\n283#1:1385,3\n283#1:1389\n283#1:1392\n283#1:1396,3\n283#1:1400,3\n283#1:1404\n283#1:1406\n283#1:1407\n283#1:1412\n283#1:1414\n306#1:1433\n306#1:1437\n333#1:1458\n333#1:1462\n363#1:1483\n363#1:1487\n390#1:1498,3\n391#1:1501\n394#1:1502\n397#1:1503,3\n398#1:1506,3\n399#1:1509\n400#1:1510\n400#1:1511\n404#1:1512\n407#1:1513\n*E\n"})
/* loaded from: classes.dex */
public abstract class ScatterSet<E> {
@JvmField
public int _capacity;
@JvmField
public int _size;
@JvmField
@NotNull
public Object[] elements;
@JvmField
@NotNull
public long[] metadata;
private ScatterSet() {
this.metadata = ScatterMapKt.EmptyGroup;
this.elements = ContainerHelpersKt.EMPTY_OBJECTS;
}
public static /* synthetic */ String joinToString$default(ScatterSet scatterSet, CharSequence charSequence, CharSequence charSequence2, CharSequence charSequence3, int i, CharSequence charSequence4, Function1 function1, int i2, Object obj) {
if (obj != null) {
Buffer$$ExternalSyntheticBUOutline0.m$1("Super calls with default arguments not supported in this target, function: joinToString");
return null;
}
if ((i2 & 1) != 0) {
charSequence = ", ";
}
if ((i2 & 2) != 0) {
charSequence2 = "";
}
if ((i2 & 4) != 0) {
charSequence3 = "";
}
if ((i2 & 8) != 0) {
i = -1;
}
if ((i2 & 16) != 0) {
charSequence4 = "...";
}
if ((i2 & 32) != 0) {
function1 = null;
}
CharSequence charSequence5 = charSequence4;
Function1 function12 = function1;
return scatterSet.joinToString(charSequence, charSequence2, charSequence3, i, charSequence5, function12);
}
public final boolean all(@NotNull Function1<? super E, Boolean> predicate) {
predicate.getClass();
Object[] objArr = this.elements;
long[] jArr = this.metadata;
int length = jArr.length - 2;
if (length < 0) {
return true;
}
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 && !predicate.invoke(objArr[(i << 3) + i3]).booleanValue()) {
return false;
}
j >>= 8;
}
if (i2 != 8) {
return true;
}
}
if (i == length) {
return true;
}
i++;
}
}
public final boolean any(@NotNull Function1<? super E, Boolean> predicate) {
predicate.getClass();
Object[] objArr = this.elements;
long[] jArr = this.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 && predicate.invoke(objArr[(i << 3) + i3]).booleanValue()) {
return true;
}
j >>= 8;
}
if (i2 != 8) {
break;
}
}
if (i == length) {
break;
}
i++;
}
}
return false;
}
@NotNull
public final Set<E> asSet() {
return new SetWrapper(this);
}
/* JADX WARN: Code restructure failed: missing block: B:18:0x006d, code lost:
if (((r7 & ((~r7) << 6)) & (-9187201950435737472L)) == 0) goto L20;
*/
/* JADX WARN: Code restructure failed: missing block: B:21:0x006f, code lost:
r11 = -1;
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final boolean contains(E r18) {
/*
r17 = this;
r0 = r17
r1 = r18
r2 = 0
if (r1 == 0) goto Lc
int r3 = r1.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
r7 = r7[r8]
int r13 = 64 - r9
long r7 = r7 << r13
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
L47:
r15 = 0
int r11 = (r9 > r15 ? 1 : (r9 == r15 ? 0 : -1))
if (r11 == 0) goto L66
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 L60
goto L70
L60:
r15 = 1
long r15 = r9 - r15
long r9 = r9 & r15
goto L47
L66:
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 L74
r11 = -1
L70:
if (r11 < 0) goto L73
return r12
L73:
return r2
L74:
int r6 = r6 + 8
int r3 = r3 + r6
r3 = r3 & r5
goto L1c
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.collection.ScatterSet.contains(java.lang.Object):boolean");
}
@IntRange(from = 0)
public final int count(@NotNull Function1<? super E, Boolean> predicate) {
predicate.getClass();
Object[] objArr = this.elements;
long[] jArr = this.metadata;
int length = jArr.length - 2;
if (length < 0) {
return 0;
}
int i = 0;
int i2 = 0;
while (true) {
long j = jArr[i];
if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
int i3 = 8 - ((~(i - length)) >>> 31);
for (int i4 = 0; i4 < i3; i4++) {
if ((255 & j) < 128 && predicate.invoke(objArr[(i << 3) + i4]).booleanValue()) {
i2++;
}
j >>= 8;
}
if (i3 != 8) {
return i2;
}
}
if (i == length) {
return i2;
}
i++;
}
}
/* JADX WARN: Multi-variable type inference failed */
public boolean equals(@Nullable Object other) {
if (other == this) {
return true;
}
if (!(other instanceof ScatterSet)) {
return false;
}
ScatterSet scatterSet = (ScatterSet) other;
if (scatterSet.get_size() != get_size()) {
return false;
}
Object[] objArr = this.elements;
long[] jArr = this.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 && !scatterSet.contains(objArr[(i << 3) + i3])) {
return false;
}
j >>= 8;
}
if (i2 != 8) {
break;
}
}
if (i == length) {
break;
}
i++;
}
}
return true;
}
public final int findElementIndex$collection(E element) {
int i = 0;
int hashCode = (element != null ? element.hashCode() : 0) * ScatterMapKt.MurmurHashC1;
int i2 = hashCode ^ (hashCode << 16);
int i3 = i2 & 127;
int i4 = this._capacity;
int i5 = i2 >>> 7;
while (true) {
int i6 = i5 & i4;
long[] jArr = this.metadata;
int i7 = i6 >> 3;
int i8 = (i6 & 7) << 3;
long j = ((jArr[i7 + 1] << (64 - i8)) & ((-i8) >> 63)) | (jArr[i7] >>> i8);
long j2 = (i3 * ScatterMapKt.BitmaskLsb) ^ j;
for (long j3 = (~j2) & (j2 - ScatterMapKt.BitmaskLsb) & (-9187201950435737472L); j3 != 0; j3 &= j3 - 1) {
int numberOfTrailingZeros = ((Long.numberOfTrailingZeros(j3) >> 3) + i6) & i4;
if (Intrinsics.areEqual(this.elements[numberOfTrailingZeros], element)) {
return numberOfTrailingZeros;
}
}
if ((j & ((~j) << 6) & (-9187201950435737472L)) != 0) {
return -1;
}
i += 8;
i5 = i6 + i;
}
}
/* JADX WARN: Type inference failed for: r9v5, types: [E, java.lang.Object] */
public final E first(@NotNull Function1<? super E, Boolean> predicate) {
predicate.getClass();
Object[] objArr = this.elements;
long[] jArr = this.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) {
?? r9 = (Object) objArr[(i << 3) + i3];
if (predicate.invoke(r9).booleanValue()) {
return r9;
}
}
j >>= 8;
}
if (i2 != 8) {
break;
}
}
if (i == length) {
break;
}
i++;
}
}
RuntimeHelpersKt.throwNoSuchElementExceptionForInline("Could not find a match");
PathKt$$ExternalSyntheticBUOutline0.m$1();
return null;
}
/* JADX WARN: Type inference failed for: r9v5, types: [E, java.lang.Object] */
@Nullable
public final E firstOrNull(@NotNull Function1<? super E, Boolean> predicate) {
predicate.getClass();
Object[] objArr = this.elements;
long[] jArr = this.metadata;
int length = jArr.length - 2;
if (length < 0) {
return null;
}
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) {
?? r9 = (Object) objArr[(i << 3) + i3];
if (predicate.invoke(r9).booleanValue()) {
return r9;
}
}
j >>= 8;
}
if (i2 != 8) {
return null;
}
}
if (i == length) {
return null;
}
i++;
}
}
public final void forEach(@NotNull Function1<? super E, Unit> block) {
block.getClass();
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) {
block.invoke(objArr[(i << 3) + i3]);
}
j >>= 8;
}
if (i2 != 8) {
return;
}
}
if (i == length) {
return;
} else {
i++;
}
}
}
@PublishedApi
public final void forEachIndex(@NotNull Function1<? super Integer, Unit> block) {
block.getClass();
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) {
DoubleList$$ExternalSyntheticOutline0.m191m(i << 3, i3, (Function1) block);
}
j >>= 8;
}
if (i2 != 8) {
return;
}
}
if (i == length) {
return;
} else {
i++;
}
}
}
@IntRange(from = 0)
/* renamed from: getCapacity, reason: from getter */
public final int get_capacity() {
return this._capacity;
}
@IntRange(from = 0)
/* renamed from: getSize, reason: from getter */
public final int get_size() {
return this._size;
}
public int hashCode() {
int i = (this._capacity * 31) + this._size;
Object[] objArr = this.elements;
long[] jArr = this.metadata;
int length = jArr.length - 2;
if (length >= 0) {
int i2 = 0;
while (true) {
long j = jArr[i2];
if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
int i3 = 8 - ((~(i2 - length)) >>> 31);
for (int i4 = 0; i4 < i3; i4++) {
if ((255 & j) < 128) {
Object obj = objArr[(i2 << 3) + i4];
if (!Intrinsics.areEqual(obj, this)) {
i += obj != null ? obj.hashCode() : 0;
}
}
j >>= 8;
}
if (i3 != 8) {
return i;
}
}
if (i2 == length) {
break;
}
i2++;
}
}
return i;
}
public final boolean isEmpty() {
return this._size == 0;
}
public final boolean isNotEmpty() {
return this._size != 0;
}
@JvmOverloads
@NotNull
public final String joinToString(@NotNull CharSequence separator, @NotNull CharSequence prefix, @NotNull CharSequence postfix, int limit, @NotNull CharSequence truncated, @Nullable Function1<? super E, ? extends CharSequence> transform) {
int i;
StringBuilder m = DoubleList$$ExternalSyntheticOutline0.m(separator, prefix, postfix, truncated, prefix);
Object[] objArr = this.elements;
long[] jArr = this.metadata;
int length = jArr.length - 2;
if (length >= 0) {
int i2 = 0;
int i3 = 0;
loop0: while (true) {
long j = jArr[i2];
if ((((~j) << 7) & j & (-9187201950435737472L)) != -9187201950435737472L) {
int i4 = 8;
int i5 = 8 - ((~(i2 - length)) >>> 31);
int i6 = 0;
while (i6 < i5) {
if ((j & 255) < 128) {
Object obj = objArr[(i2 << 3) + i6];
i = i4;
if (i3 == limit) {
m.append(truncated);
break loop0;
}
if (i3 != 0) {
m.append(separator);
}
if (transform == null) {
m.append(obj);
} else {
m.append(transform.invoke(obj));
}
i3++;
} else {
i = i4;
}
j >>= i;
i6++;
i4 = i;
}
if (i5 != i4) {
break;
}
}
if (i2 == length) {
break;
}
i2++;
}
}
m.append(postfix);
return m.toString();
}
public final boolean none() {
return this._size == 0;
}
@NotNull
public String toString() {
return joinToString$default(this, null, MarkdownConstants.LEFT_BRACKET, MarkdownConstants.RIGHT_BRACKET, 0, null, new Function1<E, CharSequence>(this) { // from class: androidx.collection.ScatterSet$toString$1
final /* synthetic */ ScatterSet<E> this$0;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
{
super(1);
this.this$0 = this;
}
/* JADX WARN: Can't rename method to resolve collision */
@Override // kotlin.jvm.functions.Function1
public final CharSequence invoke(E e) {
return e == this.this$0 ? "(this)" : String.valueOf(e);
}
/* JADX WARN: Multi-variable type inference failed */
@Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ CharSequence invoke(Object obj) {
return invoke((ScatterSet$toString$1<E>) obj);
}
}, 25, null);
}
public /* synthetic */ ScatterSet(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
@PublishedApi
public static /* synthetic */ void getElements$annotations() {
}
@PublishedApi
public static /* synthetic */ void getMetadata$annotations() {
}
public final boolean any() {
return this._size != 0;
}
@IntRange(from = 0)
public final int count() {
return get_size();
}
public final E first() {
Object[] objArr = this.elements;
long[] jArr = this.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) {
return (E) objArr[(i << 3) + i3];
}
j >>= 8;
}
if (i2 != 8) {
break;
}
}
if (i == length) {
break;
}
i++;
}
}
RuntimeHelpersKt.throwNoSuchElementExceptionForInline("The ScatterSet is empty");
PathKt$$ExternalSyntheticBUOutline0.m$1();
return null;
}
@JvmOverloads
@NotNull
public final String joinToString(@NotNull CharSequence charSequence) {
charSequence.getClass();
return joinToString$default(this, charSequence, null, null, 0, null, null, 62, null);
}
@JvmOverloads
@NotNull
public final String joinToString(@NotNull CharSequence charSequence, @NotNull CharSequence charSequence2) {
charSequence.getClass();
charSequence2.getClass();
return joinToString$default(this, charSequence, charSequence2, null, 0, null, null, 60, null);
}
@JvmOverloads
@NotNull
public final String joinToString(@NotNull CharSequence charSequence, @NotNull CharSequence charSequence2, @NotNull CharSequence charSequence3) {
DoubleList$$ExternalSyntheticOutline0.m(charSequence, charSequence2, charSequence3);
return joinToString$default(this, charSequence, charSequence2, charSequence3, 0, null, null, 56, null);
}
@JvmOverloads
@NotNull
public final String joinToString(@NotNull CharSequence charSequence, @NotNull CharSequence charSequence2, @NotNull CharSequence charSequence3, int i) {
DoubleList$$ExternalSyntheticOutline0.m(charSequence, charSequence2, charSequence3);
return joinToString$default(this, charSequence, charSequence2, charSequence3, i, null, null, 48, null);
}
@JvmOverloads
@NotNull
public final String joinToString(@NotNull CharSequence charSequence, @NotNull CharSequence charSequence2, @NotNull CharSequence charSequence3, int i, @NotNull CharSequence charSequence4) {
charSequence.getClass();
charSequence2.getClass();
charSequence3.getClass();
charSequence4.getClass();
return joinToString$default(this, charSequence, charSequence2, charSequence3, i, charSequence4, null, 32, null);
}
@JvmOverloads
@NotNull
public final String joinToString() {
return joinToString$default(this, null, null, null, 0, null, null, 63, null);
}
}