Rabbit-R1/android (non root)/java/sources/kotlin/collections/ArraysKt___ArraysKt.java

20682 lines
1.2 MiB
Java
Raw Normal View History

2024-05-21 21:08:36 +00:00
package kotlin.collections;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.exifinterface.media.ExifInterface;
import androidx.media3.exoplayer.upstream.CmcdHeadersFactory;
import defpackage.DeviceControl$Companion$$ExternalSyntheticLambda3;
import io.sentry.protocol.MetricSummary;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Comparator;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.NoSuchElementException;
import java.util.Set;
import kotlin.Deprecated;
import kotlin.DeprecatedSinceKotlin;
import kotlin.Metadata;
import kotlin.Pair;
import kotlin.ReplaceWith;
import kotlin.TuplesKt;
import kotlin.UInt;
import kotlin.ULong;
import kotlin.Unit;
import kotlin.comparisons.ComparisonsKt;
import kotlin.comparisons.ComparisonsKt__ComparisonsKt$compareBy$2;
import kotlin.comparisons.ComparisonsKt__ComparisonsKt$compareByDescending$1;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.functions.Function3;
import kotlin.jvm.internal.ArrayIteratorKt;
import kotlin.jvm.internal.ArrayIteratorsKt;
import kotlin.jvm.internal.Intrinsics;
import kotlin.random.Random;
import kotlin.ranges.IntRange;
import kotlin.ranges.RangesKt;
import kotlin.sequences.Sequence;
import kotlin.sequences.SequencesKt;
import kotlin.text.StringsKt;
import tech.rabbit.r1launcher.BuildConfig;
/* JADX INFO: Access modifiers changed from: package-private */
/* compiled from: _Arrays.kt */
@Metadata(d1 = {"\u0000Þ\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0011\n\u0002\b\u0002\n\u0002\u0010\u0018\n\u0000\n\u0002\u0010\u0012\n\u0000\n\u0002\u0010\u0019\n\u0000\n\u0002\u0010\u0013\n\u0000\n\u0002\u0010\u0014\n\u0000\n\u0002\u0010\u0015\n\u0000\n\u0002\u0010\u0016\n\u0000\n\u0002\u0010\u0017\n\u0002\b\u0002\n\u0002\u0010\b\n\u0002\b\u000b\n\u0002\u0010\u000b\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0005\n\u0002\u0010\f\n\u0002\u0010\u0006\n\u0002\u0010\u0007\n\u0002\u0010\t\n\u0002\u0010\n\n\u0002\b\u0003\n\u0002\u0010\u001c\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010$\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0010%\n\u0002\b+\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0010 \n\u0002\b\u001a\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0010\u001f\n\u0002\b\u000b\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0010\u0000\n\u0002\b;\n\u0002\u0018\u0002\n\u0002\b\f\n\u0002\u0010\u0002\n\u0002\b\b\n\u0002\u0010!\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0010\"\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\r\n\u0002\b\u000e\n\u0002\u0010\u000e\n\u0002\b\r\n\u0002\u0010\u000f\n\u0002\b%\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b.\n\u0002\u0018\u0002\n\u0002\bO\n\u0002\u0010\u001e\n\u0002\b#\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b)\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\b\n\u0002\u0010#\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0017\u001a7\u0010\"\u001a\u00020#\"\u0004\b\u0000\u0010\u0002*\n\u0012\u0006\b\u0001\u0012\u0002H\u00020\u00032\u0012\u0010$\u001a\u000e\u0012\u0004\u0012\u0002H\u0002\u0012\u0004\u0012\u00020#0%H\u0086\\u0001\u0000¢\u0006\u0002\u0010&\u001a$\u0010\"\u001a\u00020#*\u00020\u00062\u0012\u0010$\u001a\u000e\u0012\u0004\u0012\u00020#\u0012\u0004\u0012\u00020#0%H\u0086\\u0001\u0000\u001a$\u0010\"\u001a\u00020#*\u00020\b2\u0012\u0010$\u001a\u000e\u0012\u0004\u0012\u00020'\u0012\u0004\u0012\u00020#0%H\u0086\\u0001\u0000\u001a$\u0010\"\u001a\u00020#*\u00020\n2\u0012\u0010$\u001a\u000e\u0012\u0004\u0012\u00020(\u0012\u0004\u0012\u00020#0%H\u0086\\u0001\u0000\u001a$\u0010\"\u001a\u00020#*\u00020\f2\u0012\u0010$\u001a\u000e\u0012\u0004\u0012\u00020)\u0012\u0004\u0012\u00020#0%H\u0086\\u0001\u0000\u001a$\u0010\"\u001a\u00020#*\u00020\u000e2\u0012\u0010$\u001a\u000e\u0012\u0004\u0012\u00020*\u0012\u0004\u0012\u00020#0%H\u0086\\u0001\u0000\u001a$\u0010\"\u001a\u00020#*\u00020\u00102\u0012\u0010$\u001a\u000e\u0012\u0004\u0012\u00020\u0017\u0012\u0004\u0012\u00020#0%H\u0086\\u0001\u0000\u001a$\u0010\"\u001a\u00020#*\u00020\u00122\u0012\u0010$\u001a\u000e\u0012\u0004\u0012\u00020+\u0012\u0004\u0012\u00020#0%H\u0086\\u0001\u0000\u001a$\u0010\"\u001a\u00020#*\u00020\u00142\u0012\u0010$\u001a\u000e\u0012\u0004\u0012\u00020,\u0012\u0004\u0012\u00020#0%H\u0086\\u0001\u0000\u001a\u001d\u0010-\u001a\u00020#\"\u0004\b\u0000\u0010\u0002*\n\u0012\u0006\b\u0001\u0012\u0002H\u00020\u0003¢\u0006\u0002\u0010.\u001a7\u0010-\u001a\u00020#\"\u0004\b\u0000\u0010\u0002*\n\u0012\u0006\b\u0001\u0012\u0002H\u00020\u00032\u0012\u0010$\u001a\u000e\u0012\u0004\u0012\u0002H\u0002\u0012\u0004\u0012\u00020#0%H\u0086\\u0001\u0000¢\u0006\u0002\u0010&\u001a\n\u0010-\u001a\u00020#*\u00020\u0006\u001a$\u0010-\u001a\u00020#*\u00020\u00062\u0012\u0010$\u001a\u000e\u0012\u0004\u0012\u00020#\u0012\u0004\u0012\u00020#0%H\u0086\\u0001\u0000\u001a\n\u0010-\u001a\u00020#*\u00020\b\u001a$\u0010-\u001a\u00020#*\u00020\b2\u0012\u0010$\u001a\u000e\u0012\u0004\u0012\u00020'\u0012\u0004\u0012\u00020#0%H\u0086\\u0001\u0000\u001a\n\u0010-\u001a\u00020#*\u00020\n\u001a$\u0010-\u001a\u00020#*\u00020\n2\u0012\u0010$\u001a\u000e\u0012\u0004\u0012\u00020(\u0012\u0004\u0012\u00020#0%H\u0086\\u0001\u0000\u001a\n\u0010-\u001a\u00020#*\u00020\f\u001a$\u0010-\u001a\u00020#*\u00020\f2\u0012\u0010$\u001a\u000e\u0012\u0004\u0012\u00020)\u0012\u0004\u0012\u00020#0%H\u0086\\u0001\u0000\u001a\n\u0010-\u001a\u00020#*\u00020\u000e\u001a$\u0010-\u001a\u00020#
/* loaded from: classes3.dex */
public class ArraysKt___ArraysKt extends ArraysKt___ArraysJvmKt {
private static final <T> T component1(T[] tArr) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
return tArr[0];
}
private static final byte component1(byte[] bArr) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
return bArr[0];
}
private static final short component1(short[] sArr) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
return sArr[0];
}
private static final int component1(int[] iArr) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
return iArr[0];
}
private static final long component1(long[] jArr) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
return jArr[0];
}
private static final float component1(float[] fArr) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
return fArr[0];
}
private static final double component1(double[] dArr) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
return dArr[0];
}
private static final boolean component1(boolean[] zArr) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
return zArr[0];
}
private static final char component1(char[] cArr) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
return cArr[0];
}
private static final <T> T component2(T[] tArr) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
return tArr[1];
}
private static final byte component2(byte[] bArr) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
return bArr[1];
}
private static final short component2(short[] sArr) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
return sArr[1];
}
private static final int component2(int[] iArr) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
return iArr[1];
}
private static final long component2(long[] jArr) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
return jArr[1];
}
private static final float component2(float[] fArr) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
return fArr[1];
}
private static final double component2(double[] dArr) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
return dArr[1];
}
private static final boolean component2(boolean[] zArr) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
return zArr[1];
}
private static final char component2(char[] cArr) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
return cArr[1];
}
private static final <T> T component3(T[] tArr) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
return tArr[2];
}
private static final byte component3(byte[] bArr) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
return bArr[2];
}
private static final short component3(short[] sArr) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
return sArr[2];
}
private static final int component3(int[] iArr) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
return iArr[2];
}
private static final long component3(long[] jArr) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
return jArr[2];
}
private static final float component3(float[] fArr) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
return fArr[2];
}
private static final double component3(double[] dArr) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
return dArr[2];
}
private static final boolean component3(boolean[] zArr) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
return zArr[2];
}
private static final char component3(char[] cArr) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
return cArr[2];
}
private static final <T> T component4(T[] tArr) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
return tArr[3];
}
private static final byte component4(byte[] bArr) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
return bArr[3];
}
private static final short component4(short[] sArr) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
return sArr[3];
}
private static final int component4(int[] iArr) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
return iArr[3];
}
private static final long component4(long[] jArr) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
return jArr[3];
}
private static final float component4(float[] fArr) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
return fArr[3];
}
private static final double component4(double[] dArr) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
return dArr[3];
}
private static final boolean component4(boolean[] zArr) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
return zArr[3];
}
private static final char component4(char[] cArr) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
return cArr[3];
}
private static final <T> T component5(T[] tArr) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
return tArr[4];
}
private static final byte component5(byte[] bArr) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
return bArr[4];
}
private static final short component5(short[] sArr) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
return sArr[4];
}
private static final int component5(int[] iArr) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
return iArr[4];
}
private static final long component5(long[] jArr) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
return jArr[4];
}
private static final float component5(float[] fArr) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
return fArr[4];
}
private static final double component5(double[] dArr) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
return dArr[4];
}
private static final boolean component5(boolean[] zArr) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
return zArr[4];
}
private static final char component5(char[] cArr) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
return cArr[4];
}
public static final <T> boolean contains(T[] tArr, T t) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
return ArraysKt.indexOf(tArr, t) >= 0;
}
public static final boolean contains(byte[] bArr, byte b) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
return ArraysKt.indexOf(bArr, b) >= 0;
}
public static final boolean contains(short[] sArr, short s) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
return ArraysKt.indexOf(sArr, s) >= 0;
}
public static final boolean contains(int[] iArr, int i) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
return ArraysKt.indexOf(iArr, i) >= 0;
}
public static final boolean contains(long[] jArr, long j) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
return ArraysKt.indexOf(jArr, j) >= 0;
}
public static final boolean contains(boolean[] zArr, boolean z) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
return ArraysKt.indexOf(zArr, z) >= 0;
}
public static final boolean contains(char[] cArr, char c) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
return ArraysKt.indexOf(cArr, c) >= 0;
}
private static final <T> T elementAtOrElse(T[] tArr, int i, Function1<? super Integer, ? extends T> defaultValue) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(defaultValue, "defaultValue");
return (i < 0 || i > ArraysKt.getLastIndex(tArr)) ? defaultValue.invoke(Integer.valueOf(i)) : tArr[i];
}
private static final byte elementAtOrElse(byte[] bArr, int i, Function1<? super Integer, Byte> defaultValue) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(defaultValue, "defaultValue");
return (i < 0 || i > ArraysKt.getLastIndex(bArr)) ? defaultValue.invoke(Integer.valueOf(i)).byteValue() : bArr[i];
}
private static final short elementAtOrElse(short[] sArr, int i, Function1<? super Integer, Short> defaultValue) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(defaultValue, "defaultValue");
return (i < 0 || i > ArraysKt.getLastIndex(sArr)) ? defaultValue.invoke(Integer.valueOf(i)).shortValue() : sArr[i];
}
private static final int elementAtOrElse(int[] iArr, int i, Function1<? super Integer, Integer> defaultValue) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(defaultValue, "defaultValue");
return (i < 0 || i > ArraysKt.getLastIndex(iArr)) ? defaultValue.invoke(Integer.valueOf(i)).intValue() : iArr[i];
}
private static final long elementAtOrElse(long[] jArr, int i, Function1<? super Integer, Long> defaultValue) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(defaultValue, "defaultValue");
return (i < 0 || i > ArraysKt.getLastIndex(jArr)) ? defaultValue.invoke(Integer.valueOf(i)).longValue() : jArr[i];
}
private static final float elementAtOrElse(float[] fArr, int i, Function1<? super Integer, Float> defaultValue) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(defaultValue, "defaultValue");
return (i < 0 || i > ArraysKt.getLastIndex(fArr)) ? defaultValue.invoke(Integer.valueOf(i)).floatValue() : fArr[i];
}
private static final double elementAtOrElse(double[] dArr, int i, Function1<? super Integer, Double> defaultValue) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(defaultValue, "defaultValue");
return (i < 0 || i > ArraysKt.getLastIndex(dArr)) ? defaultValue.invoke(Integer.valueOf(i)).doubleValue() : dArr[i];
}
private static final boolean elementAtOrElse(boolean[] zArr, int i, Function1<? super Integer, Boolean> defaultValue) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(defaultValue, "defaultValue");
return (i < 0 || i > ArraysKt.getLastIndex(zArr)) ? defaultValue.invoke(Integer.valueOf(i)).booleanValue() : zArr[i];
}
private static final char elementAtOrElse(char[] cArr, int i, Function1<? super Integer, Character> defaultValue) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(defaultValue, "defaultValue");
return (i < 0 || i > ArraysKt.getLastIndex(cArr)) ? defaultValue.invoke(Integer.valueOf(i)).charValue() : cArr[i];
}
private static final <T> T elementAtOrNull(T[] tArr, int i) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
return (T) ArraysKt.getOrNull(tArr, i);
}
private static final Byte elementAtOrNull(byte[] bArr, int i) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
return ArraysKt.getOrNull(bArr, i);
}
private static final Short elementAtOrNull(short[] sArr, int i) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
return ArraysKt.getOrNull(sArr, i);
}
private static final Integer elementAtOrNull(int[] iArr, int i) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
return ArraysKt.getOrNull(iArr, i);
}
private static final Long elementAtOrNull(long[] jArr, int i) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
return ArraysKt.getOrNull(jArr, i);
}
private static final Float elementAtOrNull(float[] fArr, int i) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
return ArraysKt.getOrNull(fArr, i);
}
private static final Double elementAtOrNull(double[] dArr, int i) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
return ArraysKt.getOrNull(dArr, i);
}
private static final Boolean elementAtOrNull(boolean[] zArr, int i) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
return ArraysKt.getOrNull(zArr, i);
}
private static final Character elementAtOrNull(char[] cArr, int i) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
return ArraysKt.getOrNull(cArr, i);
}
public static final <T> T first(T[] tArr) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
if (tArr.length == 0) {
throw new NoSuchElementException("Array is empty.");
}
return tArr[0];
}
public static final byte first(byte[] bArr) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
if (bArr.length == 0) {
throw new NoSuchElementException("Array is empty.");
}
return bArr[0];
}
public static final short first(short[] sArr) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
if (sArr.length == 0) {
throw new NoSuchElementException("Array is empty.");
}
return sArr[0];
}
public static final int first(int[] iArr) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
if (iArr.length == 0) {
throw new NoSuchElementException("Array is empty.");
}
return iArr[0];
}
public static final long first(long[] jArr) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
if (jArr.length == 0) {
throw new NoSuchElementException("Array is empty.");
}
return jArr[0];
}
public static final float first(float[] fArr) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
if (fArr.length == 0) {
throw new NoSuchElementException("Array is empty.");
}
return fArr[0];
}
public static final double first(double[] dArr) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
if (dArr.length == 0) {
throw new NoSuchElementException("Array is empty.");
}
return dArr[0];
}
public static final boolean first(boolean[] zArr) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
if (zArr.length == 0) {
throw new NoSuchElementException("Array is empty.");
}
return zArr[0];
}
public static final char first(char[] cArr) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
if (cArr.length == 0) {
throw new NoSuchElementException("Array is empty.");
}
return cArr[0];
}
public static final <T> T first(T[] tArr, Function1<? super T, Boolean> predicate) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (T t : tArr) {
if (predicate.invoke(t).booleanValue()) {
return t;
}
}
throw new NoSuchElementException("Array contains no element matching the predicate.");
}
public static final byte first(byte[] bArr, Function1<? super Byte, Boolean> predicate) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (byte b : bArr) {
if (predicate.invoke(Byte.valueOf(b)).booleanValue()) {
return b;
}
}
throw new NoSuchElementException("Array contains no element matching the predicate.");
}
public static final short first(short[] sArr, Function1<? super Short, Boolean> predicate) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (short s : sArr) {
if (predicate.invoke(Short.valueOf(s)).booleanValue()) {
return s;
}
}
throw new NoSuchElementException("Array contains no element matching the predicate.");
}
public static final int first(int[] iArr, Function1<? super Integer, Boolean> predicate) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (int i : iArr) {
if (predicate.invoke(Integer.valueOf(i)).booleanValue()) {
return i;
}
}
throw new NoSuchElementException("Array contains no element matching the predicate.");
}
public static final long first(long[] jArr, Function1<? super Long, Boolean> predicate) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (long j : jArr) {
if (predicate.invoke(Long.valueOf(j)).booleanValue()) {
return j;
}
}
throw new NoSuchElementException("Array contains no element matching the predicate.");
}
public static final float first(float[] fArr, Function1<? super Float, Boolean> predicate) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (float f : fArr) {
if (predicate.invoke(Float.valueOf(f)).booleanValue()) {
return f;
}
}
throw new NoSuchElementException("Array contains no element matching the predicate.");
}
public static final double first(double[] dArr, Function1<? super Double, Boolean> predicate) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (double d : dArr) {
if (predicate.invoke(Double.valueOf(d)).booleanValue()) {
return d;
}
}
throw new NoSuchElementException("Array contains no element matching the predicate.");
}
public static final boolean first(boolean[] zArr, Function1<? super Boolean, Boolean> predicate) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (boolean z : zArr) {
if (predicate.invoke(Boolean.valueOf(z)).booleanValue()) {
return z;
}
}
throw new NoSuchElementException("Array contains no element matching the predicate.");
}
public static final char first(char[] cArr, Function1<? super Character, Boolean> predicate) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (char c : cArr) {
if (predicate.invoke(Character.valueOf(c)).booleanValue()) {
return c;
}
}
throw new NoSuchElementException("Array contains no element matching the predicate.");
}
private static final <T, R> R firstNotNullOf(T[] tArr, Function1<? super T, ? extends R> transform) {
R r;
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(transform, "transform");
int length = tArr.length;
int i = 0;
while (true) {
if (i < length) {
r = transform.invoke(tArr[i]);
if (r != null) {
break;
}
i++;
} else {
r = null;
break;
}
}
if (r != null) {
return r;
}
throw new NoSuchElementException("No element of the array was transformed to a non-null value.");
}
private static final <T, R> R firstNotNullOfOrNull(T[] tArr, Function1<? super T, ? extends R> transform) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(transform, "transform");
for (T t : tArr) {
R invoke = transform.invoke(t);
if (invoke != null) {
return invoke;
}
}
return null;
}
public static final <T> T firstOrNull(T[] tArr) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
if (tArr.length == 0) {
return null;
}
return tArr[0];
}
public static final Byte firstOrNull(byte[] bArr) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
if (bArr.length == 0) {
return null;
}
return Byte.valueOf(bArr[0]);
}
public static final Short firstOrNull(short[] sArr) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
if (sArr.length == 0) {
return null;
}
return Short.valueOf(sArr[0]);
}
public static final Integer firstOrNull(int[] iArr) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
if (iArr.length == 0) {
return null;
}
return Integer.valueOf(iArr[0]);
}
public static final Long firstOrNull(long[] jArr) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
if (jArr.length == 0) {
return null;
}
return Long.valueOf(jArr[0]);
}
public static final Float firstOrNull(float[] fArr) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
if (fArr.length == 0) {
return null;
}
return Float.valueOf(fArr[0]);
}
public static final Double firstOrNull(double[] dArr) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
if (dArr.length == 0) {
return null;
}
return Double.valueOf(dArr[0]);
}
public static final Boolean firstOrNull(boolean[] zArr) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
if (zArr.length == 0) {
return null;
}
return Boolean.valueOf(zArr[0]);
}
public static final Character firstOrNull(char[] cArr) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
if (cArr.length == 0) {
return null;
}
return Character.valueOf(cArr[0]);
}
public static final <T> T firstOrNull(T[] tArr, Function1<? super T, Boolean> predicate) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (T t : tArr) {
if (predicate.invoke(t).booleanValue()) {
return t;
}
}
return null;
}
public static final Byte firstOrNull(byte[] bArr, Function1<? super Byte, Boolean> predicate) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (byte b : bArr) {
if (predicate.invoke(Byte.valueOf(b)).booleanValue()) {
return Byte.valueOf(b);
}
}
return null;
}
public static final Short firstOrNull(short[] sArr, Function1<? super Short, Boolean> predicate) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (short s : sArr) {
if (predicate.invoke(Short.valueOf(s)).booleanValue()) {
return Short.valueOf(s);
}
}
return null;
}
public static final Integer firstOrNull(int[] iArr, Function1<? super Integer, Boolean> predicate) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (int i : iArr) {
if (predicate.invoke(Integer.valueOf(i)).booleanValue()) {
return Integer.valueOf(i);
}
}
return null;
}
public static final Long firstOrNull(long[] jArr, Function1<? super Long, Boolean> predicate) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (long j : jArr) {
if (predicate.invoke(Long.valueOf(j)).booleanValue()) {
return Long.valueOf(j);
}
}
return null;
}
public static final Float firstOrNull(float[] fArr, Function1<? super Float, Boolean> predicate) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (float f : fArr) {
if (predicate.invoke(Float.valueOf(f)).booleanValue()) {
return Float.valueOf(f);
}
}
return null;
}
public static final Double firstOrNull(double[] dArr, Function1<? super Double, Boolean> predicate) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (double d : dArr) {
if (predicate.invoke(Double.valueOf(d)).booleanValue()) {
return Double.valueOf(d);
}
}
return null;
}
public static final Boolean firstOrNull(boolean[] zArr, Function1<? super Boolean, Boolean> predicate) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (boolean z : zArr) {
if (predicate.invoke(Boolean.valueOf(z)).booleanValue()) {
return Boolean.valueOf(z);
}
}
return null;
}
public static final Character firstOrNull(char[] cArr, Function1<? super Character, Boolean> predicate) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (char c : cArr) {
if (predicate.invoke(Character.valueOf(c)).booleanValue()) {
return Character.valueOf(c);
}
}
return null;
}
private static final <T> T getOrElse(T[] tArr, int i, Function1<? super Integer, ? extends T> defaultValue) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(defaultValue, "defaultValue");
return (i < 0 || i > ArraysKt.getLastIndex(tArr)) ? defaultValue.invoke(Integer.valueOf(i)) : tArr[i];
}
private static final byte getOrElse(byte[] bArr, int i, Function1<? super Integer, Byte> defaultValue) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(defaultValue, "defaultValue");
return (i < 0 || i > ArraysKt.getLastIndex(bArr)) ? defaultValue.invoke(Integer.valueOf(i)).byteValue() : bArr[i];
}
private static final short getOrElse(short[] sArr, int i, Function1<? super Integer, Short> defaultValue) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(defaultValue, "defaultValue");
return (i < 0 || i > ArraysKt.getLastIndex(sArr)) ? defaultValue.invoke(Integer.valueOf(i)).shortValue() : sArr[i];
}
private static final int getOrElse(int[] iArr, int i, Function1<? super Integer, Integer> defaultValue) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(defaultValue, "defaultValue");
return (i < 0 || i > ArraysKt.getLastIndex(iArr)) ? defaultValue.invoke(Integer.valueOf(i)).intValue() : iArr[i];
}
private static final long getOrElse(long[] jArr, int i, Function1<? super Integer, Long> defaultValue) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(defaultValue, "defaultValue");
return (i < 0 || i > ArraysKt.getLastIndex(jArr)) ? defaultValue.invoke(Integer.valueOf(i)).longValue() : jArr[i];
}
private static final float getOrElse(float[] fArr, int i, Function1<? super Integer, Float> defaultValue) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(defaultValue, "defaultValue");
return (i < 0 || i > ArraysKt.getLastIndex(fArr)) ? defaultValue.invoke(Integer.valueOf(i)).floatValue() : fArr[i];
}
private static final double getOrElse(double[] dArr, int i, Function1<? super Integer, Double> defaultValue) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(defaultValue, "defaultValue");
return (i < 0 || i > ArraysKt.getLastIndex(dArr)) ? defaultValue.invoke(Integer.valueOf(i)).doubleValue() : dArr[i];
}
private static final boolean getOrElse(boolean[] zArr, int i, Function1<? super Integer, Boolean> defaultValue) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(defaultValue, "defaultValue");
return (i < 0 || i > ArraysKt.getLastIndex(zArr)) ? defaultValue.invoke(Integer.valueOf(i)).booleanValue() : zArr[i];
}
private static final char getOrElse(char[] cArr, int i, Function1<? super Integer, Character> defaultValue) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(defaultValue, "defaultValue");
return (i < 0 || i > ArraysKt.getLastIndex(cArr)) ? defaultValue.invoke(Integer.valueOf(i)).charValue() : cArr[i];
}
public static final <T> T getOrNull(T[] tArr, int i) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
if (i < 0 || i > ArraysKt.getLastIndex(tArr)) {
return null;
}
return tArr[i];
}
public static final Byte getOrNull(byte[] bArr, int i) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
if (i < 0 || i > ArraysKt.getLastIndex(bArr)) {
return null;
}
return Byte.valueOf(bArr[i]);
}
public static final Short getOrNull(short[] sArr, int i) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
if (i < 0 || i > ArraysKt.getLastIndex(sArr)) {
return null;
}
return Short.valueOf(sArr[i]);
}
public static final Integer getOrNull(int[] iArr, int i) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
if (i < 0 || i > ArraysKt.getLastIndex(iArr)) {
return null;
}
return Integer.valueOf(iArr[i]);
}
public static final Long getOrNull(long[] jArr, int i) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
if (i < 0 || i > ArraysKt.getLastIndex(jArr)) {
return null;
}
return Long.valueOf(jArr[i]);
}
public static final Float getOrNull(float[] fArr, int i) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
if (i < 0 || i > ArraysKt.getLastIndex(fArr)) {
return null;
}
return Float.valueOf(fArr[i]);
}
public static final Double getOrNull(double[] dArr, int i) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
if (i < 0 || i > ArraysKt.getLastIndex(dArr)) {
return null;
}
return Double.valueOf(dArr[i]);
}
public static final Boolean getOrNull(boolean[] zArr, int i) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
if (i < 0 || i > ArraysKt.getLastIndex(zArr)) {
return null;
}
return Boolean.valueOf(zArr[i]);
}
public static final Character getOrNull(char[] cArr, int i) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
if (i < 0 || i > ArraysKt.getLastIndex(cArr)) {
return null;
}
return Character.valueOf(cArr[i]);
}
public static final <T> int indexOf(T[] tArr, T t) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
int i = 0;
if (t == null) {
int length = tArr.length;
while (i < length) {
if (tArr[i] == null) {
return i;
}
i++;
}
return -1;
}
int length2 = tArr.length;
while (i < length2) {
if (Intrinsics.areEqual(t, tArr[i])) {
return i;
}
i++;
}
return -1;
}
public static final int indexOf(byte[] bArr, byte b) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
int length = bArr.length;
for (int i = 0; i < length; i++) {
if (b == bArr[i]) {
return i;
}
}
return -1;
}
public static final int indexOf(short[] sArr, short s) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
int length = sArr.length;
for (int i = 0; i < length; i++) {
if (s == sArr[i]) {
return i;
}
}
return -1;
}
public static final int indexOf(int[] iArr, int i) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
int length = iArr.length;
for (int i2 = 0; i2 < length; i2++) {
if (i == iArr[i2]) {
return i2;
}
}
return -1;
}
public static final int indexOf(long[] jArr, long j) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
int length = jArr.length;
for (int i = 0; i < length; i++) {
if (j == jArr[i]) {
return i;
}
}
return -1;
}
@Deprecated(message = "The function has unclear behavior when searching for NaN or zero values and will be removed soon. Use 'indexOfFirst { it == element }' instead to continue using this behavior, or '.asList().indexOf(element: T)' to get the same search behavior as in a list.", replaceWith = @ReplaceWith(expression = "indexOfFirst { it == element }", imports = {}))
@DeprecatedSinceKotlin(errorSince = "1.6", hiddenSince = "1.7", warningSince = "1.4")
public static final /* synthetic */ int indexOf(float[] fArr, float f) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
int length = fArr.length;
for (int i = 0; i < length; i++) {
if (f == fArr[i]) {
return i;
}
}
return -1;
}
@Deprecated(message = "The function has unclear behavior when searching for NaN or zero values and will be removed soon. Use 'indexOfFirst { it == element }' instead to continue using this behavior, or '.asList().indexOf(element: T)' to get the same search behavior as in a list.", replaceWith = @ReplaceWith(expression = "indexOfFirst { it == element }", imports = {}))
@DeprecatedSinceKotlin(errorSince = "1.6", hiddenSince = "1.7", warningSince = "1.4")
public static final /* synthetic */ int indexOf(double[] dArr, double d) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
int length = dArr.length;
for (int i = 0; i < length; i++) {
if (d == dArr[i]) {
return i;
}
}
return -1;
}
public static final int indexOf(boolean[] zArr, boolean z) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
int length = zArr.length;
for (int i = 0; i < length; i++) {
if (z == zArr[i]) {
return i;
}
}
return -1;
}
public static final int indexOf(char[] cArr, char c) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
int length = cArr.length;
for (int i = 0; i < length; i++) {
if (c == cArr[i]) {
return i;
}
}
return -1;
}
public static final <T> int indexOfFirst(T[] tArr, Function1<? super T, Boolean> predicate) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
int length = tArr.length;
for (int i = 0; i < length; i++) {
if (predicate.invoke(tArr[i]).booleanValue()) {
return i;
}
}
return -1;
}
public static final int indexOfFirst(byte[] bArr, Function1<? super Byte, Boolean> predicate) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
int length = bArr.length;
for (int i = 0; i < length; i++) {
if (predicate.invoke(Byte.valueOf(bArr[i])).booleanValue()) {
return i;
}
}
return -1;
}
public static final int indexOfFirst(short[] sArr, Function1<? super Short, Boolean> predicate) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
int length = sArr.length;
for (int i = 0; i < length; i++) {
if (predicate.invoke(Short.valueOf(sArr[i])).booleanValue()) {
return i;
}
}
return -1;
}
public static final int indexOfFirst(int[] iArr, Function1<? super Integer, Boolean> predicate) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
int length = iArr.length;
for (int i = 0; i < length; i++) {
if (predicate.invoke(Integer.valueOf(iArr[i])).booleanValue()) {
return i;
}
}
return -1;
}
public static final int indexOfFirst(long[] jArr, Function1<? super Long, Boolean> predicate) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
int length = jArr.length;
for (int i = 0; i < length; i++) {
if (predicate.invoke(Long.valueOf(jArr[i])).booleanValue()) {
return i;
}
}
return -1;
}
public static final int indexOfFirst(float[] fArr, Function1<? super Float, Boolean> predicate) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
int length = fArr.length;
for (int i = 0; i < length; i++) {
if (predicate.invoke(Float.valueOf(fArr[i])).booleanValue()) {
return i;
}
}
return -1;
}
public static final int indexOfFirst(double[] dArr, Function1<? super Double, Boolean> predicate) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
int length = dArr.length;
for (int i = 0; i < length; i++) {
if (predicate.invoke(Double.valueOf(dArr[i])).booleanValue()) {
return i;
}
}
return -1;
}
public static final int indexOfFirst(boolean[] zArr, Function1<? super Boolean, Boolean> predicate) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
int length = zArr.length;
for (int i = 0; i < length; i++) {
if (predicate.invoke(Boolean.valueOf(zArr[i])).booleanValue()) {
return i;
}
}
return -1;
}
public static final int indexOfFirst(char[] cArr, Function1<? super Character, Boolean> predicate) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
int length = cArr.length;
for (int i = 0; i < length; i++) {
if (predicate.invoke(Character.valueOf(cArr[i])).booleanValue()) {
return i;
}
}
return -1;
}
public static final <T> int indexOfLast(T[] tArr, Function1<? super T, Boolean> predicate) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
int length = tArr.length - 1;
if (length >= 0) {
while (true) {
int i = length - 1;
if (predicate.invoke(tArr[length]).booleanValue()) {
return length;
}
if (i < 0) {
break;
}
length = i;
}
}
return -1;
}
public static final int indexOfLast(byte[] bArr, Function1<? super Byte, Boolean> predicate) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
int length = bArr.length - 1;
if (length >= 0) {
while (true) {
int i = length - 1;
if (predicate.invoke(Byte.valueOf(bArr[length])).booleanValue()) {
return length;
}
if (i < 0) {
break;
}
length = i;
}
}
return -1;
}
public static final int indexOfLast(short[] sArr, Function1<? super Short, Boolean> predicate) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
int length = sArr.length - 1;
if (length >= 0) {
while (true) {
int i = length - 1;
if (predicate.invoke(Short.valueOf(sArr[length])).booleanValue()) {
return length;
}
if (i < 0) {
break;
}
length = i;
}
}
return -1;
}
public static final int indexOfLast(int[] iArr, Function1<? super Integer, Boolean> predicate) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
int length = iArr.length - 1;
if (length >= 0) {
while (true) {
int i = length - 1;
if (predicate.invoke(Integer.valueOf(iArr[length])).booleanValue()) {
return length;
}
if (i < 0) {
break;
}
length = i;
}
}
return -1;
}
public static final int indexOfLast(long[] jArr, Function1<? super Long, Boolean> predicate) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
int length = jArr.length - 1;
if (length >= 0) {
while (true) {
int i = length - 1;
if (predicate.invoke(Long.valueOf(jArr[length])).booleanValue()) {
return length;
}
if (i < 0) {
break;
}
length = i;
}
}
return -1;
}
public static final int indexOfLast(float[] fArr, Function1<? super Float, Boolean> predicate) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
int length = fArr.length - 1;
if (length >= 0) {
while (true) {
int i = length - 1;
if (predicate.invoke(Float.valueOf(fArr[length])).booleanValue()) {
return length;
}
if (i < 0) {
break;
}
length = i;
}
}
return -1;
}
public static final int indexOfLast(double[] dArr, Function1<? super Double, Boolean> predicate) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
int length = dArr.length - 1;
if (length >= 0) {
while (true) {
int i = length - 1;
if (predicate.invoke(Double.valueOf(dArr[length])).booleanValue()) {
return length;
}
if (i < 0) {
break;
}
length = i;
}
}
return -1;
}
public static final int indexOfLast(boolean[] zArr, Function1<? super Boolean, Boolean> predicate) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
int length = zArr.length - 1;
if (length >= 0) {
while (true) {
int i = length - 1;
if (predicate.invoke(Boolean.valueOf(zArr[length])).booleanValue()) {
return length;
}
if (i < 0) {
break;
}
length = i;
}
}
return -1;
}
public static final int indexOfLast(char[] cArr, Function1<? super Character, Boolean> predicate) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
int length = cArr.length - 1;
if (length >= 0) {
while (true) {
int i = length - 1;
if (predicate.invoke(Character.valueOf(cArr[length])).booleanValue()) {
return length;
}
if (i < 0) {
break;
}
length = i;
}
}
return -1;
}
public static final <T> T last(T[] tArr) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
if (tArr.length == 0) {
throw new NoSuchElementException("Array is empty.");
}
return tArr[ArraysKt.getLastIndex(tArr)];
}
public static final byte last(byte[] bArr) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
if (bArr.length == 0) {
throw new NoSuchElementException("Array is empty.");
}
return bArr[ArraysKt.getLastIndex(bArr)];
}
public static final short last(short[] sArr) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
if (sArr.length == 0) {
throw new NoSuchElementException("Array is empty.");
}
return sArr[ArraysKt.getLastIndex(sArr)];
}
public static final int last(int[] iArr) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
if (iArr.length == 0) {
throw new NoSuchElementException("Array is empty.");
}
return iArr[ArraysKt.getLastIndex(iArr)];
}
public static final long last(long[] jArr) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
if (jArr.length == 0) {
throw new NoSuchElementException("Array is empty.");
}
return jArr[ArraysKt.getLastIndex(jArr)];
}
public static final float last(float[] fArr) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
if (fArr.length == 0) {
throw new NoSuchElementException("Array is empty.");
}
return fArr[ArraysKt.getLastIndex(fArr)];
}
public static final double last(double[] dArr) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
if (dArr.length == 0) {
throw new NoSuchElementException("Array is empty.");
}
return dArr[ArraysKt.getLastIndex(dArr)];
}
public static final boolean last(boolean[] zArr) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
if (zArr.length == 0) {
throw new NoSuchElementException("Array is empty.");
}
return zArr[ArraysKt.getLastIndex(zArr)];
}
public static final char last(char[] cArr) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
if (cArr.length == 0) {
throw new NoSuchElementException("Array is empty.");
}
return cArr[ArraysKt.getLastIndex(cArr)];
}
public static final <T> T last(T[] tArr, Function1<? super T, Boolean> predicate) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
int length = tArr.length - 1;
if (length >= 0) {
while (true) {
int i = length - 1;
T t = tArr[length];
if (!predicate.invoke(t).booleanValue()) {
if (i < 0) {
break;
}
length = i;
} else {
return t;
}
}
}
throw new NoSuchElementException("Array contains no element matching the predicate.");
}
public static final byte last(byte[] bArr, Function1<? super Byte, Boolean> predicate) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
int length = bArr.length - 1;
if (length >= 0) {
while (true) {
int i = length - 1;
byte b = bArr[length];
if (!predicate.invoke(Byte.valueOf(b)).booleanValue()) {
if (i < 0) {
break;
}
length = i;
} else {
return b;
}
}
}
throw new NoSuchElementException("Array contains no element matching the predicate.");
}
public static final short last(short[] sArr, Function1<? super Short, Boolean> predicate) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
int length = sArr.length - 1;
if (length >= 0) {
while (true) {
int i = length - 1;
short s = sArr[length];
if (!predicate.invoke(Short.valueOf(s)).booleanValue()) {
if (i < 0) {
break;
}
length = i;
} else {
return s;
}
}
}
throw new NoSuchElementException("Array contains no element matching the predicate.");
}
public static final int last(int[] iArr, Function1<? super Integer, Boolean> predicate) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
int length = iArr.length - 1;
if (length >= 0) {
while (true) {
int i = length - 1;
int i2 = iArr[length];
if (!predicate.invoke(Integer.valueOf(i2)).booleanValue()) {
if (i < 0) {
break;
}
length = i;
} else {
return i2;
}
}
}
throw new NoSuchElementException("Array contains no element matching the predicate.");
}
public static final long last(long[] jArr, Function1<? super Long, Boolean> predicate) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
int length = jArr.length - 1;
if (length >= 0) {
while (true) {
int i = length - 1;
long j = jArr[length];
if (!predicate.invoke(Long.valueOf(j)).booleanValue()) {
if (i < 0) {
break;
}
length = i;
} else {
return j;
}
}
}
throw new NoSuchElementException("Array contains no element matching the predicate.");
}
public static final float last(float[] fArr, Function1<? super Float, Boolean> predicate) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
int length = fArr.length - 1;
if (length >= 0) {
while (true) {
int i = length - 1;
float f = fArr[length];
if (!predicate.invoke(Float.valueOf(f)).booleanValue()) {
if (i < 0) {
break;
}
length = i;
} else {
return f;
}
}
}
throw new NoSuchElementException("Array contains no element matching the predicate.");
}
public static final double last(double[] dArr, Function1<? super Double, Boolean> predicate) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
int length = dArr.length - 1;
if (length >= 0) {
while (true) {
int i = length - 1;
double d = dArr[length];
if (!predicate.invoke(Double.valueOf(d)).booleanValue()) {
if (i < 0) {
break;
}
length = i;
} else {
return d;
}
}
}
throw new NoSuchElementException("Array contains no element matching the predicate.");
}
public static final boolean last(boolean[] zArr, Function1<? super Boolean, Boolean> predicate) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
int length = zArr.length - 1;
if (length >= 0) {
while (true) {
int i = length - 1;
boolean z = zArr[length];
if (!predicate.invoke(Boolean.valueOf(z)).booleanValue()) {
if (i < 0) {
break;
}
length = i;
} else {
return z;
}
}
}
throw new NoSuchElementException("Array contains no element matching the predicate.");
}
public static final char last(char[] cArr, Function1<? super Character, Boolean> predicate) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
int length = cArr.length - 1;
if (length >= 0) {
while (true) {
int i = length - 1;
char c = cArr[length];
if (!predicate.invoke(Character.valueOf(c)).booleanValue()) {
if (i < 0) {
break;
}
length = i;
} else {
return c;
}
}
}
throw new NoSuchElementException("Array contains no element matching the predicate.");
}
public static final <T> int lastIndexOf(T[] tArr, T t) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
if (t == null) {
int length = tArr.length - 1;
if (length >= 0) {
while (true) {
int i = length - 1;
if (tArr[length] == null) {
return length;
}
if (i < 0) {
break;
}
length = i;
}
}
} else {
int length2 = tArr.length - 1;
if (length2 >= 0) {
while (true) {
int i2 = length2 - 1;
if (Intrinsics.areEqual(t, tArr[length2])) {
return length2;
}
if (i2 < 0) {
break;
}
length2 = i2;
}
}
}
return -1;
}
public static final int lastIndexOf(byte[] bArr, byte b) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
int length = bArr.length - 1;
if (length >= 0) {
while (true) {
int i = length - 1;
if (b == bArr[length]) {
return length;
}
if (i < 0) {
break;
}
length = i;
}
}
return -1;
}
public static final int lastIndexOf(short[] sArr, short s) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
int length = sArr.length - 1;
if (length >= 0) {
while (true) {
int i = length - 1;
if (s == sArr[length]) {
return length;
}
if (i < 0) {
break;
}
length = i;
}
}
return -1;
}
public static final int lastIndexOf(int[] iArr, int i) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
int length = iArr.length - 1;
if (length >= 0) {
while (true) {
int i2 = length - 1;
if (i == iArr[length]) {
return length;
}
if (i2 < 0) {
break;
}
length = i2;
}
}
return -1;
}
public static final int lastIndexOf(long[] jArr, long j) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
int length = jArr.length - 1;
if (length >= 0) {
while (true) {
int i = length - 1;
if (j == jArr[length]) {
return length;
}
if (i < 0) {
break;
}
length = i;
}
}
return -1;
}
@Deprecated(message = "The function has unclear behavior when searching for NaN or zero values and will be removed soon. Use 'indexOfLast { it == element }' instead to continue using this behavior, or '.asList().lastIndexOf(element: T)' to get the same search behavior as in a list.", replaceWith = @ReplaceWith(expression = "indexOfLast { it == element }", imports = {}))
@DeprecatedSinceKotlin(errorSince = "1.6", hiddenSince = "1.7", warningSince = "1.4")
public static final /* synthetic */ int lastIndexOf(float[] fArr, float f) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
int length = fArr.length - 1;
if (length >= 0) {
while (true) {
int i = length - 1;
if (f == fArr[length]) {
return length;
}
if (i < 0) {
break;
}
length = i;
}
}
return -1;
}
@Deprecated(message = "The function has unclear behavior when searching for NaN or zero values and will be removed soon. Use 'indexOfLast { it == element }' instead to continue using this behavior, or '.asList().lastIndexOf(element: T)' to get the same search behavior as in a list.", replaceWith = @ReplaceWith(expression = "indexOfLast { it == element }", imports = {}))
@DeprecatedSinceKotlin(errorSince = "1.6", hiddenSince = "1.7", warningSince = "1.4")
public static final /* synthetic */ int lastIndexOf(double[] dArr, double d) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
int length = dArr.length - 1;
if (length >= 0) {
while (true) {
int i = length - 1;
if (d == dArr[length]) {
return length;
}
if (i < 0) {
break;
}
length = i;
}
}
return -1;
}
public static final int lastIndexOf(boolean[] zArr, boolean z) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
int length = zArr.length - 1;
if (length >= 0) {
while (true) {
int i = length - 1;
if (z == zArr[length]) {
return length;
}
if (i < 0) {
break;
}
length = i;
}
}
return -1;
}
public static final int lastIndexOf(char[] cArr, char c) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
int length = cArr.length - 1;
if (length >= 0) {
while (true) {
int i = length - 1;
if (c == cArr[length]) {
return length;
}
if (i < 0) {
break;
}
length = i;
}
}
return -1;
}
public static final <T> T lastOrNull(T[] tArr) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
if (tArr.length == 0) {
return null;
}
return tArr[tArr.length - 1];
}
public static final Byte lastOrNull(byte[] bArr) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
if (bArr.length == 0) {
return null;
}
return Byte.valueOf(bArr[bArr.length - 1]);
}
public static final Short lastOrNull(short[] sArr) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
if (sArr.length == 0) {
return null;
}
return Short.valueOf(sArr[sArr.length - 1]);
}
public static final Integer lastOrNull(int[] iArr) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
if (iArr.length == 0) {
return null;
}
return Integer.valueOf(iArr[iArr.length - 1]);
}
public static final Long lastOrNull(long[] jArr) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
if (jArr.length == 0) {
return null;
}
return Long.valueOf(jArr[jArr.length - 1]);
}
public static final Float lastOrNull(float[] fArr) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
if (fArr.length == 0) {
return null;
}
return Float.valueOf(fArr[fArr.length - 1]);
}
public static final Double lastOrNull(double[] dArr) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
if (dArr.length == 0) {
return null;
}
return Double.valueOf(dArr[dArr.length - 1]);
}
public static final Boolean lastOrNull(boolean[] zArr) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
if (zArr.length == 0) {
return null;
}
return Boolean.valueOf(zArr[zArr.length - 1]);
}
public static final Character lastOrNull(char[] cArr) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
if (cArr.length == 0) {
return null;
}
return Character.valueOf(cArr[cArr.length - 1]);
}
public static final <T> T lastOrNull(T[] tArr, Function1<? super T, Boolean> predicate) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
int length = tArr.length - 1;
if (length < 0) {
return null;
}
while (true) {
int i = length - 1;
T t = tArr[length];
if (predicate.invoke(t).booleanValue()) {
return t;
}
if (i < 0) {
return null;
}
length = i;
}
}
public static final Byte lastOrNull(byte[] bArr, Function1<? super Byte, Boolean> predicate) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
int length = bArr.length - 1;
if (length < 0) {
return null;
}
while (true) {
int i = length - 1;
byte b = bArr[length];
if (predicate.invoke(Byte.valueOf(b)).booleanValue()) {
return Byte.valueOf(b);
}
if (i < 0) {
return null;
}
length = i;
}
}
public static final Short lastOrNull(short[] sArr, Function1<? super Short, Boolean> predicate) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
int length = sArr.length - 1;
if (length < 0) {
return null;
}
while (true) {
int i = length - 1;
short s = sArr[length];
if (predicate.invoke(Short.valueOf(s)).booleanValue()) {
return Short.valueOf(s);
}
if (i < 0) {
return null;
}
length = i;
}
}
public static final Integer lastOrNull(int[] iArr, Function1<? super Integer, Boolean> predicate) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
int length = iArr.length - 1;
if (length < 0) {
return null;
}
while (true) {
int i = length - 1;
int i2 = iArr[length];
if (predicate.invoke(Integer.valueOf(i2)).booleanValue()) {
return Integer.valueOf(i2);
}
if (i < 0) {
return null;
}
length = i;
}
}
public static final Long lastOrNull(long[] jArr, Function1<? super Long, Boolean> predicate) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
int length = jArr.length - 1;
if (length < 0) {
return null;
}
while (true) {
int i = length - 1;
long j = jArr[length];
if (predicate.invoke(Long.valueOf(j)).booleanValue()) {
return Long.valueOf(j);
}
if (i < 0) {
return null;
}
length = i;
}
}
public static final Float lastOrNull(float[] fArr, Function1<? super Float, Boolean> predicate) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
int length = fArr.length - 1;
if (length < 0) {
return null;
}
while (true) {
int i = length - 1;
float f = fArr[length];
if (predicate.invoke(Float.valueOf(f)).booleanValue()) {
return Float.valueOf(f);
}
if (i < 0) {
return null;
}
length = i;
}
}
public static final Double lastOrNull(double[] dArr, Function1<? super Double, Boolean> predicate) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
int length = dArr.length - 1;
if (length < 0) {
return null;
}
while (true) {
int i = length - 1;
double d = dArr[length];
if (predicate.invoke(Double.valueOf(d)).booleanValue()) {
return Double.valueOf(d);
}
if (i < 0) {
return null;
}
length = i;
}
}
public static final Boolean lastOrNull(boolean[] zArr, Function1<? super Boolean, Boolean> predicate) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
int length = zArr.length - 1;
if (length < 0) {
return null;
}
while (true) {
int i = length - 1;
boolean z = zArr[length];
if (predicate.invoke(Boolean.valueOf(z)).booleanValue()) {
return Boolean.valueOf(z);
}
if (i < 0) {
return null;
}
length = i;
}
}
public static final Character lastOrNull(char[] cArr, Function1<? super Character, Boolean> predicate) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
int length = cArr.length - 1;
if (length < 0) {
return null;
}
while (true) {
int i = length - 1;
char c = cArr[length];
if (predicate.invoke(Character.valueOf(c)).booleanValue()) {
return Character.valueOf(c);
}
if (i < 0) {
return null;
}
length = i;
}
}
private static final <T> T random(T[] tArr) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
return (T) ArraysKt.random(tArr, Random.INSTANCE);
}
private static final byte random(byte[] bArr) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
return ArraysKt.random(bArr, (Random) Random.INSTANCE);
}
private static final short random(short[] sArr) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
return ArraysKt.random(sArr, (Random) Random.INSTANCE);
}
private static final int random(int[] iArr) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
return ArraysKt.random(iArr, (Random) Random.INSTANCE);
}
private static final long random(long[] jArr) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
return ArraysKt.random(jArr, (Random) Random.INSTANCE);
}
private static final float random(float[] fArr) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
return ArraysKt.random(fArr, (Random) Random.INSTANCE);
}
private static final double random(double[] dArr) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
return ArraysKt.random(dArr, Random.INSTANCE);
}
private static final boolean random(boolean[] zArr) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
return ArraysKt.random(zArr, Random.INSTANCE);
}
private static final char random(char[] cArr) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
return ArraysKt.random(cArr, (Random) Random.INSTANCE);
}
public static final <T> T random(T[] tArr, Random random) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(random, "random");
if (tArr.length == 0) {
throw new NoSuchElementException("Array is empty.");
}
return tArr[random.nextInt(tArr.length)];
}
public static final byte random(byte[] bArr, Random random) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(random, "random");
if (bArr.length == 0) {
throw new NoSuchElementException("Array is empty.");
}
return bArr[random.nextInt(bArr.length)];
}
public static final short random(short[] sArr, Random random) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(random, "random");
if (sArr.length == 0) {
throw new NoSuchElementException("Array is empty.");
}
return sArr[random.nextInt(sArr.length)];
}
public static final int random(int[] iArr, Random random) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(random, "random");
if (iArr.length == 0) {
throw new NoSuchElementException("Array is empty.");
}
return iArr[random.nextInt(iArr.length)];
}
public static final long random(long[] jArr, Random random) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(random, "random");
if (jArr.length == 0) {
throw new NoSuchElementException("Array is empty.");
}
return jArr[random.nextInt(jArr.length)];
}
public static final float random(float[] fArr, Random random) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(random, "random");
if (fArr.length == 0) {
throw new NoSuchElementException("Array is empty.");
}
return fArr[random.nextInt(fArr.length)];
}
public static final double random(double[] dArr, Random random) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(random, "random");
if (dArr.length == 0) {
throw new NoSuchElementException("Array is empty.");
}
return dArr[random.nextInt(dArr.length)];
}
public static final boolean random(boolean[] zArr, Random random) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(random, "random");
if (zArr.length == 0) {
throw new NoSuchElementException("Array is empty.");
}
return zArr[random.nextInt(zArr.length)];
}
public static final char random(char[] cArr, Random random) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(random, "random");
if (cArr.length == 0) {
throw new NoSuchElementException("Array is empty.");
}
return cArr[random.nextInt(cArr.length)];
}
private static final <T> T randomOrNull(T[] tArr) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
return (T) ArraysKt.randomOrNull(tArr, Random.INSTANCE);
}
private static final Byte randomOrNull(byte[] bArr) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
return ArraysKt.randomOrNull(bArr, (Random) Random.INSTANCE);
}
private static final Short randomOrNull(short[] sArr) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
return ArraysKt.randomOrNull(sArr, (Random) Random.INSTANCE);
}
private static final Integer randomOrNull(int[] iArr) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
return ArraysKt.randomOrNull(iArr, (Random) Random.INSTANCE);
}
private static final Long randomOrNull(long[] jArr) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
return ArraysKt.randomOrNull(jArr, (Random) Random.INSTANCE);
}
private static final Float randomOrNull(float[] fArr) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
return ArraysKt.randomOrNull(fArr, (Random) Random.INSTANCE);
}
private static final Double randomOrNull(double[] dArr) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
return ArraysKt.randomOrNull(dArr, Random.INSTANCE);
}
private static final Boolean randomOrNull(boolean[] zArr) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
return ArraysKt.randomOrNull(zArr, Random.INSTANCE);
}
private static final Character randomOrNull(char[] cArr) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
return ArraysKt.randomOrNull(cArr, (Random) Random.INSTANCE);
}
public static final <T> T randomOrNull(T[] tArr, Random random) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(random, "random");
if (tArr.length == 0) {
return null;
}
return tArr[random.nextInt(tArr.length)];
}
public static final Byte randomOrNull(byte[] bArr, Random random) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(random, "random");
if (bArr.length == 0) {
return null;
}
return Byte.valueOf(bArr[random.nextInt(bArr.length)]);
}
public static final Short randomOrNull(short[] sArr, Random random) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(random, "random");
if (sArr.length == 0) {
return null;
}
return Short.valueOf(sArr[random.nextInt(sArr.length)]);
}
public static final Integer randomOrNull(int[] iArr, Random random) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(random, "random");
if (iArr.length == 0) {
return null;
}
return Integer.valueOf(iArr[random.nextInt(iArr.length)]);
}
public static final Long randomOrNull(long[] jArr, Random random) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(random, "random");
if (jArr.length == 0) {
return null;
}
return Long.valueOf(jArr[random.nextInt(jArr.length)]);
}
public static final Float randomOrNull(float[] fArr, Random random) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(random, "random");
if (fArr.length == 0) {
return null;
}
return Float.valueOf(fArr[random.nextInt(fArr.length)]);
}
public static final Double randomOrNull(double[] dArr, Random random) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(random, "random");
if (dArr.length == 0) {
return null;
}
return Double.valueOf(dArr[random.nextInt(dArr.length)]);
}
public static final Boolean randomOrNull(boolean[] zArr, Random random) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(random, "random");
if (zArr.length == 0) {
return null;
}
return Boolean.valueOf(zArr[random.nextInt(zArr.length)]);
}
public static final Character randomOrNull(char[] cArr, Random random) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(random, "random");
if (cArr.length == 0) {
return null;
}
return Character.valueOf(cArr[random.nextInt(cArr.length)]);
}
public static final <T> T single(T[] tArr) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
int length = tArr.length;
if (length == 0) {
throw new NoSuchElementException("Array is empty.");
}
if (length == 1) {
return tArr[0];
}
throw new IllegalArgumentException("Array has more than one element.");
}
public static final byte single(byte[] bArr) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
int length = bArr.length;
if (length == 0) {
throw new NoSuchElementException("Array is empty.");
}
if (length == 1) {
return bArr[0];
}
throw new IllegalArgumentException("Array has more than one element.");
}
public static final short single(short[] sArr) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
int length = sArr.length;
if (length == 0) {
throw new NoSuchElementException("Array is empty.");
}
if (length == 1) {
return sArr[0];
}
throw new IllegalArgumentException("Array has more than one element.");
}
public static final int single(int[] iArr) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
int length = iArr.length;
if (length == 0) {
throw new NoSuchElementException("Array is empty.");
}
if (length == 1) {
return iArr[0];
}
throw new IllegalArgumentException("Array has more than one element.");
}
public static final long single(long[] jArr) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
int length = jArr.length;
if (length == 0) {
throw new NoSuchElementException("Array is empty.");
}
if (length == 1) {
return jArr[0];
}
throw new IllegalArgumentException("Array has more than one element.");
}
public static final float single(float[] fArr) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
int length = fArr.length;
if (length == 0) {
throw new NoSuchElementException("Array is empty.");
}
if (length == 1) {
return fArr[0];
}
throw new IllegalArgumentException("Array has more than one element.");
}
public static final double single(double[] dArr) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
int length = dArr.length;
if (length == 0) {
throw new NoSuchElementException("Array is empty.");
}
if (length == 1) {
return dArr[0];
}
throw new IllegalArgumentException("Array has more than one element.");
}
public static final boolean single(boolean[] zArr) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
int length = zArr.length;
if (length == 0) {
throw new NoSuchElementException("Array is empty.");
}
if (length == 1) {
return zArr[0];
}
throw new IllegalArgumentException("Array has more than one element.");
}
public static final char single(char[] cArr) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
int length = cArr.length;
if (length == 0) {
throw new NoSuchElementException("Array is empty.");
}
if (length == 1) {
return cArr[0];
}
throw new IllegalArgumentException("Array has more than one element.");
}
public static final <T> T single(T[] tArr, Function1<? super T, Boolean> predicate) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
T t = null;
boolean z = false;
for (T t2 : tArr) {
if (predicate.invoke(t2).booleanValue()) {
if (z) {
throw new IllegalArgumentException("Array contains more than one matching element.");
}
z = true;
t = t2;
}
}
if (z) {
return t;
}
throw new NoSuchElementException("Array contains no element matching the predicate.");
}
public static final byte single(byte[] bArr, Function1<? super Byte, Boolean> predicate) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
Byte b = null;
boolean z = false;
for (byte b2 : bArr) {
if (predicate.invoke(Byte.valueOf(b2)).booleanValue()) {
if (z) {
throw new IllegalArgumentException("Array contains more than one matching element.");
}
b = Byte.valueOf(b2);
z = true;
}
}
if (!z) {
throw new NoSuchElementException("Array contains no element matching the predicate.");
}
Intrinsics.checkNotNull(b, "null cannot be cast to non-null type kotlin.Byte");
return b.byteValue();
}
public static final short single(short[] sArr, Function1<? super Short, Boolean> predicate) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
Short sh = null;
boolean z = false;
for (short s : sArr) {
if (predicate.invoke(Short.valueOf(s)).booleanValue()) {
if (z) {
throw new IllegalArgumentException("Array contains more than one matching element.");
}
sh = Short.valueOf(s);
z = true;
}
}
if (!z) {
throw new NoSuchElementException("Array contains no element matching the predicate.");
}
Intrinsics.checkNotNull(sh, "null cannot be cast to non-null type kotlin.Short");
return sh.shortValue();
}
public static final int single(int[] iArr, Function1<? super Integer, Boolean> predicate) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
Integer num = null;
boolean z = false;
for (int i : iArr) {
if (predicate.invoke(Integer.valueOf(i)).booleanValue()) {
if (z) {
throw new IllegalArgumentException("Array contains more than one matching element.");
}
num = Integer.valueOf(i);
z = true;
}
}
if (!z) {
throw new NoSuchElementException("Array contains no element matching the predicate.");
}
Intrinsics.checkNotNull(num, "null cannot be cast to non-null type kotlin.Int");
return num.intValue();
}
public static final long single(long[] jArr, Function1<? super Long, Boolean> predicate) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
Long l = null;
boolean z = false;
for (long j : jArr) {
if (predicate.invoke(Long.valueOf(j)).booleanValue()) {
if (z) {
throw new IllegalArgumentException("Array contains more than one matching element.");
}
l = Long.valueOf(j);
z = true;
}
}
if (!z) {
throw new NoSuchElementException("Array contains no element matching the predicate.");
}
Intrinsics.checkNotNull(l, "null cannot be cast to non-null type kotlin.Long");
return l.longValue();
}
public static final float single(float[] fArr, Function1<? super Float, Boolean> predicate) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
Float f = null;
boolean z = false;
for (float f2 : fArr) {
if (predicate.invoke(Float.valueOf(f2)).booleanValue()) {
if (z) {
throw new IllegalArgumentException("Array contains more than one matching element.");
}
f = Float.valueOf(f2);
z = true;
}
}
if (!z) {
throw new NoSuchElementException("Array contains no element matching the predicate.");
}
Intrinsics.checkNotNull(f, "null cannot be cast to non-null type kotlin.Float");
return f.floatValue();
}
public static final double single(double[] dArr, Function1<? super Double, Boolean> predicate) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
Double d = null;
boolean z = false;
for (double d2 : dArr) {
if (predicate.invoke(Double.valueOf(d2)).booleanValue()) {
if (z) {
throw new IllegalArgumentException("Array contains more than one matching element.");
}
d = Double.valueOf(d2);
z = true;
}
}
if (!z) {
throw new NoSuchElementException("Array contains no element matching the predicate.");
}
Intrinsics.checkNotNull(d, "null cannot be cast to non-null type kotlin.Double");
return d.doubleValue();
}
public static final boolean single(boolean[] zArr, Function1<? super Boolean, Boolean> predicate) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
Boolean bool = null;
boolean z = false;
for (boolean z2 : zArr) {
if (predicate.invoke(Boolean.valueOf(z2)).booleanValue()) {
if (z) {
throw new IllegalArgumentException("Array contains more than one matching element.");
}
bool = Boolean.valueOf(z2);
z = true;
}
}
if (!z) {
throw new NoSuchElementException("Array contains no element matching the predicate.");
}
Intrinsics.checkNotNull(bool, "null cannot be cast to non-null type kotlin.Boolean");
return bool.booleanValue();
}
public static final char single(char[] cArr, Function1<? super Character, Boolean> predicate) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
Character ch = null;
boolean z = false;
for (char c : cArr) {
if (predicate.invoke(Character.valueOf(c)).booleanValue()) {
if (z) {
throw new IllegalArgumentException("Array contains more than one matching element.");
}
ch = Character.valueOf(c);
z = true;
}
}
if (!z) {
throw new NoSuchElementException("Array contains no element matching the predicate.");
}
Intrinsics.checkNotNull(ch, "null cannot be cast to non-null type kotlin.Char");
return ch.charValue();
}
public static final <T> T singleOrNull(T[] tArr) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
if (tArr.length == 1) {
return tArr[0];
}
return null;
}
public static final Byte singleOrNull(byte[] bArr) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
if (bArr.length == 1) {
return Byte.valueOf(bArr[0]);
}
return null;
}
public static final Short singleOrNull(short[] sArr) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
if (sArr.length == 1) {
return Short.valueOf(sArr[0]);
}
return null;
}
public static final Integer singleOrNull(int[] iArr) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
if (iArr.length == 1) {
return Integer.valueOf(iArr[0]);
}
return null;
}
public static final Long singleOrNull(long[] jArr) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
if (jArr.length == 1) {
return Long.valueOf(jArr[0]);
}
return null;
}
public static final Float singleOrNull(float[] fArr) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
if (fArr.length == 1) {
return Float.valueOf(fArr[0]);
}
return null;
}
public static final Double singleOrNull(double[] dArr) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
if (dArr.length == 1) {
return Double.valueOf(dArr[0]);
}
return null;
}
public static final Boolean singleOrNull(boolean[] zArr) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
if (zArr.length == 1) {
return Boolean.valueOf(zArr[0]);
}
return null;
}
public static final Character singleOrNull(char[] cArr) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
if (cArr.length == 1) {
return Character.valueOf(cArr[0]);
}
return null;
}
public static final <T> T singleOrNull(T[] tArr, Function1<? super T, Boolean> predicate) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
T t = null;
boolean z = false;
for (T t2 : tArr) {
if (predicate.invoke(t2).booleanValue()) {
if (z) {
return null;
}
z = true;
t = t2;
}
}
if (z) {
return t;
}
return null;
}
public static final Byte singleOrNull(byte[] bArr, Function1<? super Byte, Boolean> predicate) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
Byte b = null;
boolean z = false;
for (byte b2 : bArr) {
if (predicate.invoke(Byte.valueOf(b2)).booleanValue()) {
if (z) {
return null;
}
b = Byte.valueOf(b2);
z = true;
}
}
if (z) {
return b;
}
return null;
}
public static final Short singleOrNull(short[] sArr, Function1<? super Short, Boolean> predicate) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
Short sh = null;
boolean z = false;
for (short s : sArr) {
if (predicate.invoke(Short.valueOf(s)).booleanValue()) {
if (z) {
return null;
}
sh = Short.valueOf(s);
z = true;
}
}
if (z) {
return sh;
}
return null;
}
public static final Integer singleOrNull(int[] iArr, Function1<? super Integer, Boolean> predicate) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
Integer num = null;
boolean z = false;
for (int i : iArr) {
if (predicate.invoke(Integer.valueOf(i)).booleanValue()) {
if (z) {
return null;
}
num = Integer.valueOf(i);
z = true;
}
}
if (z) {
return num;
}
return null;
}
public static final Long singleOrNull(long[] jArr, Function1<? super Long, Boolean> predicate) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
Long l = null;
boolean z = false;
for (long j : jArr) {
if (predicate.invoke(Long.valueOf(j)).booleanValue()) {
if (z) {
return null;
}
l = Long.valueOf(j);
z = true;
}
}
if (z) {
return l;
}
return null;
}
public static final Float singleOrNull(float[] fArr, Function1<? super Float, Boolean> predicate) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
Float f = null;
boolean z = false;
for (float f2 : fArr) {
if (predicate.invoke(Float.valueOf(f2)).booleanValue()) {
if (z) {
return null;
}
f = Float.valueOf(f2);
z = true;
}
}
if (z) {
return f;
}
return null;
}
public static final Double singleOrNull(double[] dArr, Function1<? super Double, Boolean> predicate) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
Double d = null;
boolean z = false;
for (double d2 : dArr) {
if (predicate.invoke(Double.valueOf(d2)).booleanValue()) {
if (z) {
return null;
}
d = Double.valueOf(d2);
z = true;
}
}
if (z) {
return d;
}
return null;
}
public static final Boolean singleOrNull(boolean[] zArr, Function1<? super Boolean, Boolean> predicate) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
Boolean bool = null;
boolean z = false;
for (boolean z2 : zArr) {
if (predicate.invoke(Boolean.valueOf(z2)).booleanValue()) {
if (z) {
return null;
}
bool = Boolean.valueOf(z2);
z = true;
}
}
if (z) {
return bool;
}
return null;
}
public static final Character singleOrNull(char[] cArr, Function1<? super Character, Boolean> predicate) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
Character ch = null;
boolean z = false;
for (char c : cArr) {
if (predicate.invoke(Character.valueOf(c)).booleanValue()) {
if (z) {
return null;
}
ch = Character.valueOf(c);
z = true;
}
}
if (z) {
return ch;
}
return null;
}
public static final <T> List<T> drop(T[] tArr, int i) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
if (i < 0) {
throw new IllegalArgumentException(("Requested element count " + i + " is less than zero.").toString());
}
return ArraysKt.takeLast(tArr, RangesKt.coerceAtLeast(tArr.length - i, 0));
}
public static final List<Byte> drop(byte[] bArr, int i) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
if (i < 0) {
throw new IllegalArgumentException(("Requested element count " + i + " is less than zero.").toString());
}
return ArraysKt.takeLast(bArr, RangesKt.coerceAtLeast(bArr.length - i, 0));
}
public static final List<Short> drop(short[] sArr, int i) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
if (i < 0) {
throw new IllegalArgumentException(("Requested element count " + i + " is less than zero.").toString());
}
return ArraysKt.takeLast(sArr, RangesKt.coerceAtLeast(sArr.length - i, 0));
}
public static final List<Integer> drop(int[] iArr, int i) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
if (i < 0) {
throw new IllegalArgumentException(("Requested element count " + i + " is less than zero.").toString());
}
return ArraysKt.takeLast(iArr, RangesKt.coerceAtLeast(iArr.length - i, 0));
}
public static final List<Long> drop(long[] jArr, int i) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
if (i < 0) {
throw new IllegalArgumentException(("Requested element count " + i + " is less than zero.").toString());
}
return ArraysKt.takeLast(jArr, RangesKt.coerceAtLeast(jArr.length - i, 0));
}
public static final List<Float> drop(float[] fArr, int i) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
if (i < 0) {
throw new IllegalArgumentException(("Requested element count " + i + " is less than zero.").toString());
}
return ArraysKt.takeLast(fArr, RangesKt.coerceAtLeast(fArr.length - i, 0));
}
public static final List<Double> drop(double[] dArr, int i) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
if (i < 0) {
throw new IllegalArgumentException(("Requested element count " + i + " is less than zero.").toString());
}
return ArraysKt.takeLast(dArr, RangesKt.coerceAtLeast(dArr.length - i, 0));
}
public static final List<Boolean> drop(boolean[] zArr, int i) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
if (i < 0) {
throw new IllegalArgumentException(("Requested element count " + i + " is less than zero.").toString());
}
return ArraysKt.takeLast(zArr, RangesKt.coerceAtLeast(zArr.length - i, 0));
}
public static final List<Character> drop(char[] cArr, int i) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
if (i < 0) {
throw new IllegalArgumentException(("Requested element count " + i + " is less than zero.").toString());
}
return ArraysKt.takeLast(cArr, RangesKt.coerceAtLeast(cArr.length - i, 0));
}
public static final <T> List<T> dropLast(T[] tArr, int i) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
if (i < 0) {
throw new IllegalArgumentException(("Requested element count " + i + " is less than zero.").toString());
}
return ArraysKt.take(tArr, RangesKt.coerceAtLeast(tArr.length - i, 0));
}
public static final List<Byte> dropLast(byte[] bArr, int i) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
if (i < 0) {
throw new IllegalArgumentException(("Requested element count " + i + " is less than zero.").toString());
}
return ArraysKt.take(bArr, RangesKt.coerceAtLeast(bArr.length - i, 0));
}
public static final List<Short> dropLast(short[] sArr, int i) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
if (i < 0) {
throw new IllegalArgumentException(("Requested element count " + i + " is less than zero.").toString());
}
return ArraysKt.take(sArr, RangesKt.coerceAtLeast(sArr.length - i, 0));
}
public static final List<Integer> dropLast(int[] iArr, int i) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
if (i < 0) {
throw new IllegalArgumentException(("Requested element count " + i + " is less than zero.").toString());
}
return ArraysKt.take(iArr, RangesKt.coerceAtLeast(iArr.length - i, 0));
}
public static final List<Long> dropLast(long[] jArr, int i) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
if (i < 0) {
throw new IllegalArgumentException(("Requested element count " + i + " is less than zero.").toString());
}
return ArraysKt.take(jArr, RangesKt.coerceAtLeast(jArr.length - i, 0));
}
public static final List<Float> dropLast(float[] fArr, int i) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
if (i < 0) {
throw new IllegalArgumentException(("Requested element count " + i + " is less than zero.").toString());
}
return ArraysKt.take(fArr, RangesKt.coerceAtLeast(fArr.length - i, 0));
}
public static final List<Double> dropLast(double[] dArr, int i) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
if (i < 0) {
throw new IllegalArgumentException(("Requested element count " + i + " is less than zero.").toString());
}
return ArraysKt.take(dArr, RangesKt.coerceAtLeast(dArr.length - i, 0));
}
public static final List<Boolean> dropLast(boolean[] zArr, int i) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
if (i < 0) {
throw new IllegalArgumentException(("Requested element count " + i + " is less than zero.").toString());
}
return ArraysKt.take(zArr, RangesKt.coerceAtLeast(zArr.length - i, 0));
}
public static final List<Character> dropLast(char[] cArr, int i) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
if (i < 0) {
throw new IllegalArgumentException(("Requested element count " + i + " is less than zero.").toString());
}
return ArraysKt.take(cArr, RangesKt.coerceAtLeast(cArr.length - i, 0));
}
public static final <T> List<T> dropLastWhile(T[] tArr, Function1<? super T, Boolean> predicate) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (int lastIndex = ArraysKt.getLastIndex(tArr); -1 < lastIndex; lastIndex--) {
if (!predicate.invoke(tArr[lastIndex]).booleanValue()) {
return ArraysKt.take(tArr, lastIndex + 1);
}
}
return CollectionsKt.emptyList();
}
public static final List<Byte> dropLastWhile(byte[] bArr, Function1<? super Byte, Boolean> predicate) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (int lastIndex = ArraysKt.getLastIndex(bArr); -1 < lastIndex; lastIndex--) {
if (!predicate.invoke(Byte.valueOf(bArr[lastIndex])).booleanValue()) {
return ArraysKt.take(bArr, lastIndex + 1);
}
}
return CollectionsKt.emptyList();
}
public static final List<Short> dropLastWhile(short[] sArr, Function1<? super Short, Boolean> predicate) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (int lastIndex = ArraysKt.getLastIndex(sArr); -1 < lastIndex; lastIndex--) {
if (!predicate.invoke(Short.valueOf(sArr[lastIndex])).booleanValue()) {
return ArraysKt.take(sArr, lastIndex + 1);
}
}
return CollectionsKt.emptyList();
}
public static final List<Integer> dropLastWhile(int[] iArr, Function1<? super Integer, Boolean> predicate) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (int lastIndex = ArraysKt.getLastIndex(iArr); -1 < lastIndex; lastIndex--) {
if (!predicate.invoke(Integer.valueOf(iArr[lastIndex])).booleanValue()) {
return ArraysKt.take(iArr, lastIndex + 1);
}
}
return CollectionsKt.emptyList();
}
public static final List<Long> dropLastWhile(long[] jArr, Function1<? super Long, Boolean> predicate) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (int lastIndex = ArraysKt.getLastIndex(jArr); -1 < lastIndex; lastIndex--) {
if (!predicate.invoke(Long.valueOf(jArr[lastIndex])).booleanValue()) {
return ArraysKt.take(jArr, lastIndex + 1);
}
}
return CollectionsKt.emptyList();
}
public static final List<Float> dropLastWhile(float[] fArr, Function1<? super Float, Boolean> predicate) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (int lastIndex = ArraysKt.getLastIndex(fArr); -1 < lastIndex; lastIndex--) {
if (!predicate.invoke(Float.valueOf(fArr[lastIndex])).booleanValue()) {
return ArraysKt.take(fArr, lastIndex + 1);
}
}
return CollectionsKt.emptyList();
}
public static final List<Double> dropLastWhile(double[] dArr, Function1<? super Double, Boolean> predicate) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (int lastIndex = ArraysKt.getLastIndex(dArr); -1 < lastIndex; lastIndex--) {
if (!predicate.invoke(Double.valueOf(dArr[lastIndex])).booleanValue()) {
return ArraysKt.take(dArr, lastIndex + 1);
}
}
return CollectionsKt.emptyList();
}
public static final List<Boolean> dropLastWhile(boolean[] zArr, Function1<? super Boolean, Boolean> predicate) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (int lastIndex = ArraysKt.getLastIndex(zArr); -1 < lastIndex; lastIndex--) {
if (!predicate.invoke(Boolean.valueOf(zArr[lastIndex])).booleanValue()) {
return ArraysKt.take(zArr, lastIndex + 1);
}
}
return CollectionsKt.emptyList();
}
public static final List<Character> dropLastWhile(char[] cArr, Function1<? super Character, Boolean> predicate) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (int lastIndex = ArraysKt.getLastIndex(cArr); -1 < lastIndex; lastIndex--) {
if (!predicate.invoke(Character.valueOf(cArr[lastIndex])).booleanValue()) {
return ArraysKt.take(cArr, lastIndex + 1);
}
}
return CollectionsKt.emptyList();
}
public static final <T> List<T> dropWhile(T[] tArr, Function1<? super T, Boolean> predicate) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
ArrayList arrayList = new ArrayList();
boolean z = false;
for (T t : tArr) {
if (z) {
arrayList.add(t);
} else if (!predicate.invoke(t).booleanValue()) {
arrayList.add(t);
z = true;
}
}
return arrayList;
}
public static final List<Byte> dropWhile(byte[] bArr, Function1<? super Byte, Boolean> predicate) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
ArrayList arrayList = new ArrayList();
boolean z = false;
for (byte b : bArr) {
if (z) {
arrayList.add(Byte.valueOf(b));
} else if (!predicate.invoke(Byte.valueOf(b)).booleanValue()) {
arrayList.add(Byte.valueOf(b));
z = true;
}
}
return arrayList;
}
public static final List<Short> dropWhile(short[] sArr, Function1<? super Short, Boolean> predicate) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
ArrayList arrayList = new ArrayList();
boolean z = false;
for (short s : sArr) {
if (z) {
arrayList.add(Short.valueOf(s));
} else if (!predicate.invoke(Short.valueOf(s)).booleanValue()) {
arrayList.add(Short.valueOf(s));
z = true;
}
}
return arrayList;
}
public static final List<Integer> dropWhile(int[] iArr, Function1<? super Integer, Boolean> predicate) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
ArrayList arrayList = new ArrayList();
boolean z = false;
for (int i : iArr) {
if (z) {
arrayList.add(Integer.valueOf(i));
} else if (!predicate.invoke(Integer.valueOf(i)).booleanValue()) {
arrayList.add(Integer.valueOf(i));
z = true;
}
}
return arrayList;
}
public static final List<Long> dropWhile(long[] jArr, Function1<? super Long, Boolean> predicate) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
ArrayList arrayList = new ArrayList();
boolean z = false;
for (long j : jArr) {
if (z) {
arrayList.add(Long.valueOf(j));
} else if (!predicate.invoke(Long.valueOf(j)).booleanValue()) {
arrayList.add(Long.valueOf(j));
z = true;
}
}
return arrayList;
}
public static final List<Float> dropWhile(float[] fArr, Function1<? super Float, Boolean> predicate) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
ArrayList arrayList = new ArrayList();
boolean z = false;
for (float f : fArr) {
if (z) {
arrayList.add(Float.valueOf(f));
} else if (!predicate.invoke(Float.valueOf(f)).booleanValue()) {
arrayList.add(Float.valueOf(f));
z = true;
}
}
return arrayList;
}
public static final List<Double> dropWhile(double[] dArr, Function1<? super Double, Boolean> predicate) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
ArrayList arrayList = new ArrayList();
boolean z = false;
for (double d : dArr) {
if (z) {
arrayList.add(Double.valueOf(d));
} else if (!predicate.invoke(Double.valueOf(d)).booleanValue()) {
arrayList.add(Double.valueOf(d));
z = true;
}
}
return arrayList;
}
public static final List<Boolean> dropWhile(boolean[] zArr, Function1<? super Boolean, Boolean> predicate) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
ArrayList arrayList = new ArrayList();
boolean z = false;
for (boolean z2 : zArr) {
if (z) {
arrayList.add(Boolean.valueOf(z2));
} else if (!predicate.invoke(Boolean.valueOf(z2)).booleanValue()) {
arrayList.add(Boolean.valueOf(z2));
z = true;
}
}
return arrayList;
}
public static final List<Character> dropWhile(char[] cArr, Function1<? super Character, Boolean> predicate) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
ArrayList arrayList = new ArrayList();
boolean z = false;
for (char c : cArr) {
if (z) {
arrayList.add(Character.valueOf(c));
} else if (!predicate.invoke(Character.valueOf(c)).booleanValue()) {
arrayList.add(Character.valueOf(c));
z = true;
}
}
return arrayList;
}
public static final <T> List<T> filter(T[] tArr, Function1<? super T, Boolean> predicate) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
ArrayList arrayList = new ArrayList();
for (T t : tArr) {
if (predicate.invoke(t).booleanValue()) {
arrayList.add(t);
}
}
return arrayList;
}
public static final List<Byte> filter(byte[] bArr, Function1<? super Byte, Boolean> predicate) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
ArrayList arrayList = new ArrayList();
for (byte b : bArr) {
if (predicate.invoke(Byte.valueOf(b)).booleanValue()) {
arrayList.add(Byte.valueOf(b));
}
}
return arrayList;
}
public static final List<Short> filter(short[] sArr, Function1<? super Short, Boolean> predicate) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
ArrayList arrayList = new ArrayList();
for (short s : sArr) {
if (predicate.invoke(Short.valueOf(s)).booleanValue()) {
arrayList.add(Short.valueOf(s));
}
}
return arrayList;
}
public static final List<Integer> filter(int[] iArr, Function1<? super Integer, Boolean> predicate) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
ArrayList arrayList = new ArrayList();
for (int i : iArr) {
if (predicate.invoke(Integer.valueOf(i)).booleanValue()) {
arrayList.add(Integer.valueOf(i));
}
}
return arrayList;
}
public static final List<Long> filter(long[] jArr, Function1<? super Long, Boolean> predicate) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
ArrayList arrayList = new ArrayList();
for (long j : jArr) {
if (predicate.invoke(Long.valueOf(j)).booleanValue()) {
arrayList.add(Long.valueOf(j));
}
}
return arrayList;
}
public static final List<Float> filter(float[] fArr, Function1<? super Float, Boolean> predicate) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
ArrayList arrayList = new ArrayList();
for (float f : fArr) {
if (predicate.invoke(Float.valueOf(f)).booleanValue()) {
arrayList.add(Float.valueOf(f));
}
}
return arrayList;
}
public static final List<Double> filter(double[] dArr, Function1<? super Double, Boolean> predicate) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
ArrayList arrayList = new ArrayList();
for (double d : dArr) {
if (predicate.invoke(Double.valueOf(d)).booleanValue()) {
arrayList.add(Double.valueOf(d));
}
}
return arrayList;
}
public static final List<Boolean> filter(boolean[] zArr, Function1<? super Boolean, Boolean> predicate) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
ArrayList arrayList = new ArrayList();
for (boolean z : zArr) {
if (predicate.invoke(Boolean.valueOf(z)).booleanValue()) {
arrayList.add(Boolean.valueOf(z));
}
}
return arrayList;
}
public static final List<Character> filter(char[] cArr, Function1<? super Character, Boolean> predicate) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
ArrayList arrayList = new ArrayList();
for (char c : cArr) {
if (predicate.invoke(Character.valueOf(c)).booleanValue()) {
arrayList.add(Character.valueOf(c));
}
}
return arrayList;
}
public static final <T> List<T> filterIndexed(T[] tArr, Function2<? super Integer, ? super T, Boolean> predicate) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
ArrayList arrayList = new ArrayList();
int length = tArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
T t = tArr[i];
int i3 = i2 + 1;
if (predicate.invoke(Integer.valueOf(i2), t).booleanValue()) {
arrayList.add(t);
}
i++;
i2 = i3;
}
return arrayList;
}
public static final List<Byte> filterIndexed(byte[] bArr, Function2<? super Integer, ? super Byte, Boolean> predicate) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
ArrayList arrayList = new ArrayList();
int length = bArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
byte b = bArr[i];
int i3 = i2 + 1;
if (predicate.invoke(Integer.valueOf(i2), Byte.valueOf(b)).booleanValue()) {
arrayList.add(Byte.valueOf(b));
}
i++;
i2 = i3;
}
return arrayList;
}
public static final List<Short> filterIndexed(short[] sArr, Function2<? super Integer, ? super Short, Boolean> predicate) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
ArrayList arrayList = new ArrayList();
int length = sArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
short s = sArr[i];
int i3 = i2 + 1;
if (predicate.invoke(Integer.valueOf(i2), Short.valueOf(s)).booleanValue()) {
arrayList.add(Short.valueOf(s));
}
i++;
i2 = i3;
}
return arrayList;
}
public static final List<Integer> filterIndexed(int[] iArr, Function2<? super Integer, ? super Integer, Boolean> predicate) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
ArrayList arrayList = new ArrayList();
int length = iArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
int i3 = iArr[i];
int i4 = i2 + 1;
if (predicate.invoke(Integer.valueOf(i2), Integer.valueOf(i3)).booleanValue()) {
arrayList.add(Integer.valueOf(i3));
}
i++;
i2 = i4;
}
return arrayList;
}
public static final List<Long> filterIndexed(long[] jArr, Function2<? super Integer, ? super Long, Boolean> predicate) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
ArrayList arrayList = new ArrayList();
int length = jArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
long j = jArr[i];
int i3 = i2 + 1;
if (predicate.invoke(Integer.valueOf(i2), Long.valueOf(j)).booleanValue()) {
arrayList.add(Long.valueOf(j));
}
i++;
i2 = i3;
}
return arrayList;
}
public static final List<Float> filterIndexed(float[] fArr, Function2<? super Integer, ? super Float, Boolean> predicate) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
ArrayList arrayList = new ArrayList();
int length = fArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
float f = fArr[i];
int i3 = i2 + 1;
if (predicate.invoke(Integer.valueOf(i2), Float.valueOf(f)).booleanValue()) {
arrayList.add(Float.valueOf(f));
}
i++;
i2 = i3;
}
return arrayList;
}
public static final List<Double> filterIndexed(double[] dArr, Function2<? super Integer, ? super Double, Boolean> predicate) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
ArrayList arrayList = new ArrayList();
int length = dArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
double d = dArr[i];
int i3 = i2 + 1;
if (predicate.invoke(Integer.valueOf(i2), Double.valueOf(d)).booleanValue()) {
arrayList.add(Double.valueOf(d));
}
i++;
i2 = i3;
}
return arrayList;
}
public static final List<Boolean> filterIndexed(boolean[] zArr, Function2<? super Integer, ? super Boolean, Boolean> predicate) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
ArrayList arrayList = new ArrayList();
int length = zArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
boolean z = zArr[i];
int i3 = i2 + 1;
if (predicate.invoke(Integer.valueOf(i2), Boolean.valueOf(z)).booleanValue()) {
arrayList.add(Boolean.valueOf(z));
}
i++;
i2 = i3;
}
return arrayList;
}
public static final List<Character> filterIndexed(char[] cArr, Function2<? super Integer, ? super Character, Boolean> predicate) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
ArrayList arrayList = new ArrayList();
int length = cArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
char c = cArr[i];
int i3 = i2 + 1;
if (predicate.invoke(Integer.valueOf(i2), Character.valueOf(c)).booleanValue()) {
arrayList.add(Character.valueOf(c));
}
i++;
i2 = i3;
}
return arrayList;
}
public static final /* synthetic */ <R> List<R> filterIsInstance(Object[] objArr) {
Intrinsics.checkNotNullParameter(objArr, "<this>");
ArrayList arrayList = new ArrayList();
for (Object obj : objArr) {
Intrinsics.reifiedOperationMarker(3, "R");
if (obj instanceof Object) {
arrayList.add(obj);
}
}
return arrayList;
}
public static final /* synthetic */ <R, C extends Collection<? super R>> C filterIsInstanceTo(Object[] objArr, C destination) {
Intrinsics.checkNotNullParameter(objArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
for (Object obj : objArr) {
Intrinsics.reifiedOperationMarker(3, "R");
if (obj instanceof Object) {
destination.add(obj);
}
}
return destination;
}
public static final <T> List<T> filterNot(T[] tArr, Function1<? super T, Boolean> predicate) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
ArrayList arrayList = new ArrayList();
for (T t : tArr) {
if (!predicate.invoke(t).booleanValue()) {
arrayList.add(t);
}
}
return arrayList;
}
public static final List<Byte> filterNot(byte[] bArr, Function1<? super Byte, Boolean> predicate) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
ArrayList arrayList = new ArrayList();
for (byte b : bArr) {
if (!predicate.invoke(Byte.valueOf(b)).booleanValue()) {
arrayList.add(Byte.valueOf(b));
}
}
return arrayList;
}
public static final List<Short> filterNot(short[] sArr, Function1<? super Short, Boolean> predicate) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
ArrayList arrayList = new ArrayList();
for (short s : sArr) {
if (!predicate.invoke(Short.valueOf(s)).booleanValue()) {
arrayList.add(Short.valueOf(s));
}
}
return arrayList;
}
public static final List<Integer> filterNot(int[] iArr, Function1<? super Integer, Boolean> predicate) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
ArrayList arrayList = new ArrayList();
for (int i : iArr) {
if (!predicate.invoke(Integer.valueOf(i)).booleanValue()) {
arrayList.add(Integer.valueOf(i));
}
}
return arrayList;
}
public static final List<Long> filterNot(long[] jArr, Function1<? super Long, Boolean> predicate) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
ArrayList arrayList = new ArrayList();
for (long j : jArr) {
if (!predicate.invoke(Long.valueOf(j)).booleanValue()) {
arrayList.add(Long.valueOf(j));
}
}
return arrayList;
}
public static final List<Float> filterNot(float[] fArr, Function1<? super Float, Boolean> predicate) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
ArrayList arrayList = new ArrayList();
for (float f : fArr) {
if (!predicate.invoke(Float.valueOf(f)).booleanValue()) {
arrayList.add(Float.valueOf(f));
}
}
return arrayList;
}
public static final List<Double> filterNot(double[] dArr, Function1<? super Double, Boolean> predicate) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
ArrayList arrayList = new ArrayList();
for (double d : dArr) {
if (!predicate.invoke(Double.valueOf(d)).booleanValue()) {
arrayList.add(Double.valueOf(d));
}
}
return arrayList;
}
public static final List<Boolean> filterNot(boolean[] zArr, Function1<? super Boolean, Boolean> predicate) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
ArrayList arrayList = new ArrayList();
for (boolean z : zArr) {
if (!predicate.invoke(Boolean.valueOf(z)).booleanValue()) {
arrayList.add(Boolean.valueOf(z));
}
}
return arrayList;
}
public static final List<Character> filterNot(char[] cArr, Function1<? super Character, Boolean> predicate) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
ArrayList arrayList = new ArrayList();
for (char c : cArr) {
if (!predicate.invoke(Character.valueOf(c)).booleanValue()) {
arrayList.add(Character.valueOf(c));
}
}
return arrayList;
}
public static final <T> List<T> filterNotNull(T[] tArr) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
return (List) ArraysKt.filterNotNullTo(tArr, new ArrayList());
}
public static final <C extends Collection<? super T>, T> C filterNotNullTo(T[] tArr, C destination) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
for (T t : tArr) {
if (t != null) {
destination.add(t);
}
}
return destination;
}
public static final <T, C extends Collection<? super T>> C filterNotTo(T[] tArr, C destination, Function1<? super T, Boolean> predicate) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (T t : tArr) {
if (!predicate.invoke(t).booleanValue()) {
destination.add(t);
}
}
return destination;
}
public static final <C extends Collection<? super Byte>> C filterNotTo(byte[] bArr, C destination, Function1<? super Byte, Boolean> predicate) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (byte b : bArr) {
if (!predicate.invoke(Byte.valueOf(b)).booleanValue()) {
destination.add(Byte.valueOf(b));
}
}
return destination;
}
public static final <C extends Collection<? super Short>> C filterNotTo(short[] sArr, C destination, Function1<? super Short, Boolean> predicate) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (short s : sArr) {
if (!predicate.invoke(Short.valueOf(s)).booleanValue()) {
destination.add(Short.valueOf(s));
}
}
return destination;
}
public static final <C extends Collection<? super Integer>> C filterNotTo(int[] iArr, C destination, Function1<? super Integer, Boolean> predicate) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (int i : iArr) {
if (!predicate.invoke(Integer.valueOf(i)).booleanValue()) {
destination.add(Integer.valueOf(i));
}
}
return destination;
}
public static final <C extends Collection<? super Long>> C filterNotTo(long[] jArr, C destination, Function1<? super Long, Boolean> predicate) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (long j : jArr) {
if (!predicate.invoke(Long.valueOf(j)).booleanValue()) {
destination.add(Long.valueOf(j));
}
}
return destination;
}
public static final <C extends Collection<? super Float>> C filterNotTo(float[] fArr, C destination, Function1<? super Float, Boolean> predicate) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (float f : fArr) {
if (!predicate.invoke(Float.valueOf(f)).booleanValue()) {
destination.add(Float.valueOf(f));
}
}
return destination;
}
public static final <C extends Collection<? super Double>> C filterNotTo(double[] dArr, C destination, Function1<? super Double, Boolean> predicate) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (double d : dArr) {
if (!predicate.invoke(Double.valueOf(d)).booleanValue()) {
destination.add(Double.valueOf(d));
}
}
return destination;
}
public static final <C extends Collection<? super Boolean>> C filterNotTo(boolean[] zArr, C destination, Function1<? super Boolean, Boolean> predicate) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (boolean z : zArr) {
if (!predicate.invoke(Boolean.valueOf(z)).booleanValue()) {
destination.add(Boolean.valueOf(z));
}
}
return destination;
}
public static final <C extends Collection<? super Character>> C filterNotTo(char[] cArr, C destination, Function1<? super Character, Boolean> predicate) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (char c : cArr) {
if (!predicate.invoke(Character.valueOf(c)).booleanValue()) {
destination.add(Character.valueOf(c));
}
}
return destination;
}
public static final <T, C extends Collection<? super T>> C filterTo(T[] tArr, C destination, Function1<? super T, Boolean> predicate) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (T t : tArr) {
if (predicate.invoke(t).booleanValue()) {
destination.add(t);
}
}
return destination;
}
public static final <C extends Collection<? super Byte>> C filterTo(byte[] bArr, C destination, Function1<? super Byte, Boolean> predicate) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (byte b : bArr) {
if (predicate.invoke(Byte.valueOf(b)).booleanValue()) {
destination.add(Byte.valueOf(b));
}
}
return destination;
}
public static final <C extends Collection<? super Short>> C filterTo(short[] sArr, C destination, Function1<? super Short, Boolean> predicate) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (short s : sArr) {
if (predicate.invoke(Short.valueOf(s)).booleanValue()) {
destination.add(Short.valueOf(s));
}
}
return destination;
}
public static final <C extends Collection<? super Integer>> C filterTo(int[] iArr, C destination, Function1<? super Integer, Boolean> predicate) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (int i : iArr) {
if (predicate.invoke(Integer.valueOf(i)).booleanValue()) {
destination.add(Integer.valueOf(i));
}
}
return destination;
}
public static final <C extends Collection<? super Long>> C filterTo(long[] jArr, C destination, Function1<? super Long, Boolean> predicate) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (long j : jArr) {
if (predicate.invoke(Long.valueOf(j)).booleanValue()) {
destination.add(Long.valueOf(j));
}
}
return destination;
}
public static final <C extends Collection<? super Float>> C filterTo(float[] fArr, C destination, Function1<? super Float, Boolean> predicate) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (float f : fArr) {
if (predicate.invoke(Float.valueOf(f)).booleanValue()) {
destination.add(Float.valueOf(f));
}
}
return destination;
}
public static final <C extends Collection<? super Double>> C filterTo(double[] dArr, C destination, Function1<? super Double, Boolean> predicate) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (double d : dArr) {
if (predicate.invoke(Double.valueOf(d)).booleanValue()) {
destination.add(Double.valueOf(d));
}
}
return destination;
}
public static final <C extends Collection<? super Boolean>> C filterTo(boolean[] zArr, C destination, Function1<? super Boolean, Boolean> predicate) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (boolean z : zArr) {
if (predicate.invoke(Boolean.valueOf(z)).booleanValue()) {
destination.add(Boolean.valueOf(z));
}
}
return destination;
}
public static final <C extends Collection<? super Character>> C filterTo(char[] cArr, C destination, Function1<? super Character, Boolean> predicate) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (char c : cArr) {
if (predicate.invoke(Character.valueOf(c)).booleanValue()) {
destination.add(Character.valueOf(c));
}
}
return destination;
}
public static final <T> List<T> slice(T[] tArr, IntRange indices) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(indices, "indices");
return indices.isEmpty() ? CollectionsKt.emptyList() : ArraysKt.asList(ArraysKt.copyOfRange(tArr, indices.getStart().intValue(), indices.getEndInclusive().intValue() + 1));
}
public static final List<Byte> slice(byte[] bArr, IntRange indices) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(indices, "indices");
return indices.isEmpty() ? CollectionsKt.emptyList() : ArraysKt.asList(ArraysKt.copyOfRange(bArr, indices.getStart().intValue(), indices.getEndInclusive().intValue() + 1));
}
public static final List<Short> slice(short[] sArr, IntRange indices) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(indices, "indices");
return indices.isEmpty() ? CollectionsKt.emptyList() : ArraysKt.asList(ArraysKt.copyOfRange(sArr, indices.getStart().intValue(), indices.getEndInclusive().intValue() + 1));
}
public static final List<Integer> slice(int[] iArr, IntRange indices) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(indices, "indices");
return indices.isEmpty() ? CollectionsKt.emptyList() : ArraysKt.asList(ArraysKt.copyOfRange(iArr, indices.getStart().intValue(), indices.getEndInclusive().intValue() + 1));
}
public static final List<Long> slice(long[] jArr, IntRange indices) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(indices, "indices");
return indices.isEmpty() ? CollectionsKt.emptyList() : ArraysKt.asList(ArraysKt.copyOfRange(jArr, indices.getStart().intValue(), indices.getEndInclusive().intValue() + 1));
}
public static final List<Float> slice(float[] fArr, IntRange indices) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(indices, "indices");
return indices.isEmpty() ? CollectionsKt.emptyList() : ArraysKt.asList(ArraysKt.copyOfRange(fArr, indices.getStart().intValue(), indices.getEndInclusive().intValue() + 1));
}
public static final List<Double> slice(double[] dArr, IntRange indices) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(indices, "indices");
return indices.isEmpty() ? CollectionsKt.emptyList() : ArraysKt.asList(ArraysKt.copyOfRange(dArr, indices.getStart().intValue(), indices.getEndInclusive().intValue() + 1));
}
public static final List<Boolean> slice(boolean[] zArr, IntRange indices) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(indices, "indices");
return indices.isEmpty() ? CollectionsKt.emptyList() : ArraysKt.asList(ArraysKt.copyOfRange(zArr, indices.getStart().intValue(), indices.getEndInclusive().intValue() + 1));
}
public static final List<Character> slice(char[] cArr, IntRange indices) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(indices, "indices");
return indices.isEmpty() ? CollectionsKt.emptyList() : ArraysKt.asList(ArraysKt.copyOfRange(cArr, indices.getStart().intValue(), indices.getEndInclusive().intValue() + 1));
}
public static final <T> List<T> slice(T[] tArr, Iterable<Integer> indices) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(indices, "indices");
int collectionSizeOrDefault = CollectionsKt.collectionSizeOrDefault(indices, 10);
if (collectionSizeOrDefault == 0) {
return CollectionsKt.emptyList();
}
ArrayList arrayList = new ArrayList(collectionSizeOrDefault);
Iterator<Integer> it = indices.iterator();
while (it.hasNext()) {
arrayList.add(tArr[it.next().intValue()]);
}
return arrayList;
}
public static final List<Byte> slice(byte[] bArr, Iterable<Integer> indices) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(indices, "indices");
int collectionSizeOrDefault = CollectionsKt.collectionSizeOrDefault(indices, 10);
if (collectionSizeOrDefault == 0) {
return CollectionsKt.emptyList();
}
ArrayList arrayList = new ArrayList(collectionSizeOrDefault);
Iterator<Integer> it = indices.iterator();
while (it.hasNext()) {
arrayList.add(Byte.valueOf(bArr[it.next().intValue()]));
}
return arrayList;
}
public static final List<Short> slice(short[] sArr, Iterable<Integer> indices) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(indices, "indices");
int collectionSizeOrDefault = CollectionsKt.collectionSizeOrDefault(indices, 10);
if (collectionSizeOrDefault == 0) {
return CollectionsKt.emptyList();
}
ArrayList arrayList = new ArrayList(collectionSizeOrDefault);
Iterator<Integer> it = indices.iterator();
while (it.hasNext()) {
arrayList.add(Short.valueOf(sArr[it.next().intValue()]));
}
return arrayList;
}
public static final List<Integer> slice(int[] iArr, Iterable<Integer> indices) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(indices, "indices");
int collectionSizeOrDefault = CollectionsKt.collectionSizeOrDefault(indices, 10);
if (collectionSizeOrDefault == 0) {
return CollectionsKt.emptyList();
}
ArrayList arrayList = new ArrayList(collectionSizeOrDefault);
Iterator<Integer> it = indices.iterator();
while (it.hasNext()) {
arrayList.add(Integer.valueOf(iArr[it.next().intValue()]));
}
return arrayList;
}
public static final List<Long> slice(long[] jArr, Iterable<Integer> indices) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(indices, "indices");
int collectionSizeOrDefault = CollectionsKt.collectionSizeOrDefault(indices, 10);
if (collectionSizeOrDefault == 0) {
return CollectionsKt.emptyList();
}
ArrayList arrayList = new ArrayList(collectionSizeOrDefault);
Iterator<Integer> it = indices.iterator();
while (it.hasNext()) {
arrayList.add(Long.valueOf(jArr[it.next().intValue()]));
}
return arrayList;
}
public static final List<Float> slice(float[] fArr, Iterable<Integer> indices) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(indices, "indices");
int collectionSizeOrDefault = CollectionsKt.collectionSizeOrDefault(indices, 10);
if (collectionSizeOrDefault == 0) {
return CollectionsKt.emptyList();
}
ArrayList arrayList = new ArrayList(collectionSizeOrDefault);
Iterator<Integer> it = indices.iterator();
while (it.hasNext()) {
arrayList.add(Float.valueOf(fArr[it.next().intValue()]));
}
return arrayList;
}
public static final List<Double> slice(double[] dArr, Iterable<Integer> indices) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(indices, "indices");
int collectionSizeOrDefault = CollectionsKt.collectionSizeOrDefault(indices, 10);
if (collectionSizeOrDefault == 0) {
return CollectionsKt.emptyList();
}
ArrayList arrayList = new ArrayList(collectionSizeOrDefault);
Iterator<Integer> it = indices.iterator();
while (it.hasNext()) {
arrayList.add(Double.valueOf(dArr[it.next().intValue()]));
}
return arrayList;
}
public static final List<Boolean> slice(boolean[] zArr, Iterable<Integer> indices) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(indices, "indices");
int collectionSizeOrDefault = CollectionsKt.collectionSizeOrDefault(indices, 10);
if (collectionSizeOrDefault == 0) {
return CollectionsKt.emptyList();
}
ArrayList arrayList = new ArrayList(collectionSizeOrDefault);
Iterator<Integer> it = indices.iterator();
while (it.hasNext()) {
arrayList.add(Boolean.valueOf(zArr[it.next().intValue()]));
}
return arrayList;
}
public static final List<Character> slice(char[] cArr, Iterable<Integer> indices) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(indices, "indices");
int collectionSizeOrDefault = CollectionsKt.collectionSizeOrDefault(indices, 10);
if (collectionSizeOrDefault == 0) {
return CollectionsKt.emptyList();
}
ArrayList arrayList = new ArrayList(collectionSizeOrDefault);
Iterator<Integer> it = indices.iterator();
while (it.hasNext()) {
arrayList.add(Character.valueOf(cArr[it.next().intValue()]));
}
return arrayList;
}
public static final <T> T[] sliceArray(T[] tArr, Collection<Integer> indices) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(indices, "indices");
T[] tArr2 = (T[]) ArraysKt.arrayOfNulls(tArr, indices.size());
Iterator<Integer> it = indices.iterator();
int i = 0;
while (it.hasNext()) {
tArr2[i] = tArr[it.next().intValue()];
i++;
}
return tArr2;
}
public static final byte[] sliceArray(byte[] bArr, Collection<Integer> indices) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(indices, "indices");
byte[] bArr2 = new byte[indices.size()];
Iterator<Integer> it = indices.iterator();
int i = 0;
while (it.hasNext()) {
bArr2[i] = bArr[it.next().intValue()];
i++;
}
return bArr2;
}
public static final short[] sliceArray(short[] sArr, Collection<Integer> indices) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(indices, "indices");
short[] sArr2 = new short[indices.size()];
Iterator<Integer> it = indices.iterator();
int i = 0;
while (it.hasNext()) {
sArr2[i] = sArr[it.next().intValue()];
i++;
}
return sArr2;
}
public static final int[] sliceArray(int[] iArr, Collection<Integer> indices) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(indices, "indices");
int[] iArr2 = new int[indices.size()];
Iterator<Integer> it = indices.iterator();
int i = 0;
while (it.hasNext()) {
iArr2[i] = iArr[it.next().intValue()];
i++;
}
return iArr2;
}
public static final long[] sliceArray(long[] jArr, Collection<Integer> indices) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(indices, "indices");
long[] jArr2 = new long[indices.size()];
Iterator<Integer> it = indices.iterator();
int i = 0;
while (it.hasNext()) {
jArr2[i] = jArr[it.next().intValue()];
i++;
}
return jArr2;
}
public static final float[] sliceArray(float[] fArr, Collection<Integer> indices) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(indices, "indices");
float[] fArr2 = new float[indices.size()];
Iterator<Integer> it = indices.iterator();
int i = 0;
while (it.hasNext()) {
fArr2[i] = fArr[it.next().intValue()];
i++;
}
return fArr2;
}
public static final double[] sliceArray(double[] dArr, Collection<Integer> indices) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(indices, "indices");
double[] dArr2 = new double[indices.size()];
Iterator<Integer> it = indices.iterator();
int i = 0;
while (it.hasNext()) {
dArr2[i] = dArr[it.next().intValue()];
i++;
}
return dArr2;
}
public static final boolean[] sliceArray(boolean[] zArr, Collection<Integer> indices) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(indices, "indices");
boolean[] zArr2 = new boolean[indices.size()];
Iterator<Integer> it = indices.iterator();
int i = 0;
while (it.hasNext()) {
zArr2[i] = zArr[it.next().intValue()];
i++;
}
return zArr2;
}
public static final char[] sliceArray(char[] cArr, Collection<Integer> indices) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(indices, "indices");
char[] cArr2 = new char[indices.size()];
Iterator<Integer> it = indices.iterator();
int i = 0;
while (it.hasNext()) {
cArr2[i] = cArr[it.next().intValue()];
i++;
}
return cArr2;
}
public static final <T> T[] sliceArray(T[] tArr, IntRange indices) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(indices, "indices");
return indices.isEmpty() ? (T[]) ArraysKt.copyOfRange(tArr, 0, 0) : (T[]) ArraysKt.copyOfRange(tArr, indices.getStart().intValue(), indices.getEndInclusive().intValue() + 1);
}
public static final byte[] sliceArray(byte[] bArr, IntRange indices) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(indices, "indices");
return indices.isEmpty() ? new byte[0] : ArraysKt.copyOfRange(bArr, indices.getStart().intValue(), indices.getEndInclusive().intValue() + 1);
}
public static final short[] sliceArray(short[] sArr, IntRange indices) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(indices, "indices");
return indices.isEmpty() ? new short[0] : ArraysKt.copyOfRange(sArr, indices.getStart().intValue(), indices.getEndInclusive().intValue() + 1);
}
public static final int[] sliceArray(int[] iArr, IntRange indices) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(indices, "indices");
return indices.isEmpty() ? new int[0] : ArraysKt.copyOfRange(iArr, indices.getStart().intValue(), indices.getEndInclusive().intValue() + 1);
}
public static final long[] sliceArray(long[] jArr, IntRange indices) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(indices, "indices");
return indices.isEmpty() ? new long[0] : ArraysKt.copyOfRange(jArr, indices.getStart().intValue(), indices.getEndInclusive().intValue() + 1);
}
public static final float[] sliceArray(float[] fArr, IntRange indices) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(indices, "indices");
return indices.isEmpty() ? new float[0] : ArraysKt.copyOfRange(fArr, indices.getStart().intValue(), indices.getEndInclusive().intValue() + 1);
}
public static final double[] sliceArray(double[] dArr, IntRange indices) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(indices, "indices");
return indices.isEmpty() ? new double[0] : ArraysKt.copyOfRange(dArr, indices.getStart().intValue(), indices.getEndInclusive().intValue() + 1);
}
public static final boolean[] sliceArray(boolean[] zArr, IntRange indices) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(indices, "indices");
return indices.isEmpty() ? new boolean[0] : ArraysKt.copyOfRange(zArr, indices.getStart().intValue(), indices.getEndInclusive().intValue() + 1);
}
public static final char[] sliceArray(char[] cArr, IntRange indices) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(indices, "indices");
return indices.isEmpty() ? new char[0] : ArraysKt.copyOfRange(cArr, indices.getStart().intValue(), indices.getEndInclusive().intValue() + 1);
}
public static final <T> List<T> take(T[] tArr, int i) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
if (i < 0) {
throw new IllegalArgumentException(("Requested element count " + i + " is less than zero.").toString());
}
if (i == 0) {
return CollectionsKt.emptyList();
}
if (i >= tArr.length) {
return ArraysKt.toList(tArr);
}
if (i == 1) {
return CollectionsKt.listOf(tArr[0]);
}
ArrayList arrayList = new ArrayList(i);
int i2 = 0;
for (T t : tArr) {
arrayList.add(t);
i2++;
if (i2 == i) {
break;
}
}
return arrayList;
}
public static final List<Byte> take(byte[] bArr, int i) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
if (i < 0) {
throw new IllegalArgumentException(("Requested element count " + i + " is less than zero.").toString());
}
if (i == 0) {
return CollectionsKt.emptyList();
}
if (i >= bArr.length) {
return ArraysKt.toList(bArr);
}
if (i == 1) {
return CollectionsKt.listOf(Byte.valueOf(bArr[0]));
}
ArrayList arrayList = new ArrayList(i);
int i2 = 0;
for (byte b : bArr) {
arrayList.add(Byte.valueOf(b));
i2++;
if (i2 == i) {
break;
}
}
return arrayList;
}
public static final List<Short> take(short[] sArr, int i) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
if (i < 0) {
throw new IllegalArgumentException(("Requested element count " + i + " is less than zero.").toString());
}
if (i == 0) {
return CollectionsKt.emptyList();
}
if (i >= sArr.length) {
return ArraysKt.toList(sArr);
}
if (i == 1) {
return CollectionsKt.listOf(Short.valueOf(sArr[0]));
}
ArrayList arrayList = new ArrayList(i);
int i2 = 0;
for (short s : sArr) {
arrayList.add(Short.valueOf(s));
i2++;
if (i2 == i) {
break;
}
}
return arrayList;
}
public static final List<Integer> take(int[] iArr, int i) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
if (i < 0) {
throw new IllegalArgumentException(("Requested element count " + i + " is less than zero.").toString());
}
if (i == 0) {
return CollectionsKt.emptyList();
}
if (i >= iArr.length) {
return ArraysKt.toList(iArr);
}
if (i == 1) {
return CollectionsKt.listOf(Integer.valueOf(iArr[0]));
}
ArrayList arrayList = new ArrayList(i);
int i2 = 0;
for (int i3 : iArr) {
arrayList.add(Integer.valueOf(i3));
i2++;
if (i2 == i) {
break;
}
}
return arrayList;
}
public static final List<Long> take(long[] jArr, int i) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
if (i < 0) {
throw new IllegalArgumentException(("Requested element count " + i + " is less than zero.").toString());
}
if (i == 0) {
return CollectionsKt.emptyList();
}
if (i >= jArr.length) {
return ArraysKt.toList(jArr);
}
if (i == 1) {
return CollectionsKt.listOf(Long.valueOf(jArr[0]));
}
ArrayList arrayList = new ArrayList(i);
int i2 = 0;
for (long j : jArr) {
arrayList.add(Long.valueOf(j));
i2++;
if (i2 == i) {
break;
}
}
return arrayList;
}
public static final List<Float> take(float[] fArr, int i) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
if (i < 0) {
throw new IllegalArgumentException(("Requested element count " + i + " is less than zero.").toString());
}
if (i == 0) {
return CollectionsKt.emptyList();
}
if (i >= fArr.length) {
return ArraysKt.toList(fArr);
}
if (i == 1) {
return CollectionsKt.listOf(Float.valueOf(fArr[0]));
}
ArrayList arrayList = new ArrayList(i);
int i2 = 0;
for (float f : fArr) {
arrayList.add(Float.valueOf(f));
i2++;
if (i2 == i) {
break;
}
}
return arrayList;
}
public static final List<Double> take(double[] dArr, int i) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
if (i < 0) {
throw new IllegalArgumentException(("Requested element count " + i + " is less than zero.").toString());
}
if (i == 0) {
return CollectionsKt.emptyList();
}
if (i >= dArr.length) {
return ArraysKt.toList(dArr);
}
if (i == 1) {
return CollectionsKt.listOf(Double.valueOf(dArr[0]));
}
ArrayList arrayList = new ArrayList(i);
int i2 = 0;
for (double d : dArr) {
arrayList.add(Double.valueOf(d));
i2++;
if (i2 == i) {
break;
}
}
return arrayList;
}
public static final List<Boolean> take(boolean[] zArr, int i) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
if (i < 0) {
throw new IllegalArgumentException(("Requested element count " + i + " is less than zero.").toString());
}
if (i == 0) {
return CollectionsKt.emptyList();
}
if (i >= zArr.length) {
return ArraysKt.toList(zArr);
}
if (i == 1) {
return CollectionsKt.listOf(Boolean.valueOf(zArr[0]));
}
ArrayList arrayList = new ArrayList(i);
int i2 = 0;
for (boolean z : zArr) {
arrayList.add(Boolean.valueOf(z));
i2++;
if (i2 == i) {
break;
}
}
return arrayList;
}
public static final List<Character> take(char[] cArr, int i) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
if (i < 0) {
throw new IllegalArgumentException(("Requested element count " + i + " is less than zero.").toString());
}
if (i == 0) {
return CollectionsKt.emptyList();
}
if (i >= cArr.length) {
return ArraysKt.toList(cArr);
}
if (i == 1) {
return CollectionsKt.listOf(Character.valueOf(cArr[0]));
}
ArrayList arrayList = new ArrayList(i);
int i2 = 0;
for (char c : cArr) {
arrayList.add(Character.valueOf(c));
i2++;
if (i2 == i) {
break;
}
}
return arrayList;
}
public static final <T> List<T> takeLast(T[] tArr, int i) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
if (i < 0) {
throw new IllegalArgumentException(("Requested element count " + i + " is less than zero.").toString());
}
if (i == 0) {
return CollectionsKt.emptyList();
}
int length = tArr.length;
if (i >= length) {
return ArraysKt.toList(tArr);
}
if (i == 1) {
return CollectionsKt.listOf(tArr[length - 1]);
}
ArrayList arrayList = new ArrayList(i);
for (int i2 = length - i; i2 < length; i2++) {
arrayList.add(tArr[i2]);
}
return arrayList;
}
public static final List<Byte> takeLast(byte[] bArr, int i) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
if (i < 0) {
throw new IllegalArgumentException(("Requested element count " + i + " is less than zero.").toString());
}
if (i == 0) {
return CollectionsKt.emptyList();
}
int length = bArr.length;
if (i >= length) {
return ArraysKt.toList(bArr);
}
if (i == 1) {
return CollectionsKt.listOf(Byte.valueOf(bArr[length - 1]));
}
ArrayList arrayList = new ArrayList(i);
for (int i2 = length - i; i2 < length; i2++) {
arrayList.add(Byte.valueOf(bArr[i2]));
}
return arrayList;
}
public static final List<Short> takeLast(short[] sArr, int i) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
if (i < 0) {
throw new IllegalArgumentException(("Requested element count " + i + " is less than zero.").toString());
}
if (i == 0) {
return CollectionsKt.emptyList();
}
int length = sArr.length;
if (i >= length) {
return ArraysKt.toList(sArr);
}
if (i == 1) {
return CollectionsKt.listOf(Short.valueOf(sArr[length - 1]));
}
ArrayList arrayList = new ArrayList(i);
for (int i2 = length - i; i2 < length; i2++) {
arrayList.add(Short.valueOf(sArr[i2]));
}
return arrayList;
}
public static final List<Integer> takeLast(int[] iArr, int i) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
if (i < 0) {
throw new IllegalArgumentException(("Requested element count " + i + " is less than zero.").toString());
}
if (i == 0) {
return CollectionsKt.emptyList();
}
int length = iArr.length;
if (i >= length) {
return ArraysKt.toList(iArr);
}
if (i == 1) {
return CollectionsKt.listOf(Integer.valueOf(iArr[length - 1]));
}
ArrayList arrayList = new ArrayList(i);
for (int i2 = length - i; i2 < length; i2++) {
arrayList.add(Integer.valueOf(iArr[i2]));
}
return arrayList;
}
public static final List<Long> takeLast(long[] jArr, int i) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
if (i < 0) {
throw new IllegalArgumentException(("Requested element count " + i + " is less than zero.").toString());
}
if (i == 0) {
return CollectionsKt.emptyList();
}
int length = jArr.length;
if (i >= length) {
return ArraysKt.toList(jArr);
}
if (i == 1) {
return CollectionsKt.listOf(Long.valueOf(jArr[length - 1]));
}
ArrayList arrayList = new ArrayList(i);
for (int i2 = length - i; i2 < length; i2++) {
arrayList.add(Long.valueOf(jArr[i2]));
}
return arrayList;
}
public static final List<Float> takeLast(float[] fArr, int i) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
if (i < 0) {
throw new IllegalArgumentException(("Requested element count " + i + " is less than zero.").toString());
}
if (i == 0) {
return CollectionsKt.emptyList();
}
int length = fArr.length;
if (i >= length) {
return ArraysKt.toList(fArr);
}
if (i == 1) {
return CollectionsKt.listOf(Float.valueOf(fArr[length - 1]));
}
ArrayList arrayList = new ArrayList(i);
for (int i2 = length - i; i2 < length; i2++) {
arrayList.add(Float.valueOf(fArr[i2]));
}
return arrayList;
}
public static final List<Double> takeLast(double[] dArr, int i) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
if (i < 0) {
throw new IllegalArgumentException(("Requested element count " + i + " is less than zero.").toString());
}
if (i == 0) {
return CollectionsKt.emptyList();
}
int length = dArr.length;
if (i >= length) {
return ArraysKt.toList(dArr);
}
if (i == 1) {
return CollectionsKt.listOf(Double.valueOf(dArr[length - 1]));
}
ArrayList arrayList = new ArrayList(i);
for (int i2 = length - i; i2 < length; i2++) {
arrayList.add(Double.valueOf(dArr[i2]));
}
return arrayList;
}
public static final List<Boolean> takeLast(boolean[] zArr, int i) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
if (i < 0) {
throw new IllegalArgumentException(("Requested element count " + i + " is less than zero.").toString());
}
if (i == 0) {
return CollectionsKt.emptyList();
}
int length = zArr.length;
if (i >= length) {
return ArraysKt.toList(zArr);
}
if (i == 1) {
return CollectionsKt.listOf(Boolean.valueOf(zArr[length - 1]));
}
ArrayList arrayList = new ArrayList(i);
for (int i2 = length - i; i2 < length; i2++) {
arrayList.add(Boolean.valueOf(zArr[i2]));
}
return arrayList;
}
public static final List<Character> takeLast(char[] cArr, int i) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
if (i < 0) {
throw new IllegalArgumentException(("Requested element count " + i + " is less than zero.").toString());
}
if (i == 0) {
return CollectionsKt.emptyList();
}
int length = cArr.length;
if (i >= length) {
return ArraysKt.toList(cArr);
}
if (i == 1) {
return CollectionsKt.listOf(Character.valueOf(cArr[length - 1]));
}
ArrayList arrayList = new ArrayList(i);
for (int i2 = length - i; i2 < length; i2++) {
arrayList.add(Character.valueOf(cArr[i2]));
}
return arrayList;
}
public static final <T> List<T> takeLastWhile(T[] tArr, Function1<? super T, Boolean> predicate) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (int lastIndex = ArraysKt.getLastIndex(tArr); -1 < lastIndex; lastIndex--) {
if (!predicate.invoke(tArr[lastIndex]).booleanValue()) {
return ArraysKt.drop(tArr, lastIndex + 1);
}
}
return ArraysKt.toList(tArr);
}
public static final List<Byte> takeLastWhile(byte[] bArr, Function1<? super Byte, Boolean> predicate) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (int lastIndex = ArraysKt.getLastIndex(bArr); -1 < lastIndex; lastIndex--) {
if (!predicate.invoke(Byte.valueOf(bArr[lastIndex])).booleanValue()) {
return ArraysKt.drop(bArr, lastIndex + 1);
}
}
return ArraysKt.toList(bArr);
}
public static final List<Short> takeLastWhile(short[] sArr, Function1<? super Short, Boolean> predicate) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (int lastIndex = ArraysKt.getLastIndex(sArr); -1 < lastIndex; lastIndex--) {
if (!predicate.invoke(Short.valueOf(sArr[lastIndex])).booleanValue()) {
return ArraysKt.drop(sArr, lastIndex + 1);
}
}
return ArraysKt.toList(sArr);
}
public static final List<Integer> takeLastWhile(int[] iArr, Function1<? super Integer, Boolean> predicate) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (int lastIndex = ArraysKt.getLastIndex(iArr); -1 < lastIndex; lastIndex--) {
if (!predicate.invoke(Integer.valueOf(iArr[lastIndex])).booleanValue()) {
return ArraysKt.drop(iArr, lastIndex + 1);
}
}
return ArraysKt.toList(iArr);
}
public static final List<Long> takeLastWhile(long[] jArr, Function1<? super Long, Boolean> predicate) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (int lastIndex = ArraysKt.getLastIndex(jArr); -1 < lastIndex; lastIndex--) {
if (!predicate.invoke(Long.valueOf(jArr[lastIndex])).booleanValue()) {
return ArraysKt.drop(jArr, lastIndex + 1);
}
}
return ArraysKt.toList(jArr);
}
public static final List<Float> takeLastWhile(float[] fArr, Function1<? super Float, Boolean> predicate) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (int lastIndex = ArraysKt.getLastIndex(fArr); -1 < lastIndex; lastIndex--) {
if (!predicate.invoke(Float.valueOf(fArr[lastIndex])).booleanValue()) {
return ArraysKt.drop(fArr, lastIndex + 1);
}
}
return ArraysKt.toList(fArr);
}
public static final List<Double> takeLastWhile(double[] dArr, Function1<? super Double, Boolean> predicate) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (int lastIndex = ArraysKt.getLastIndex(dArr); -1 < lastIndex; lastIndex--) {
if (!predicate.invoke(Double.valueOf(dArr[lastIndex])).booleanValue()) {
return ArraysKt.drop(dArr, lastIndex + 1);
}
}
return ArraysKt.toList(dArr);
}
public static final List<Boolean> takeLastWhile(boolean[] zArr, Function1<? super Boolean, Boolean> predicate) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (int lastIndex = ArraysKt.getLastIndex(zArr); -1 < lastIndex; lastIndex--) {
if (!predicate.invoke(Boolean.valueOf(zArr[lastIndex])).booleanValue()) {
return ArraysKt.drop(zArr, lastIndex + 1);
}
}
return ArraysKt.toList(zArr);
}
public static final List<Character> takeLastWhile(char[] cArr, Function1<? super Character, Boolean> predicate) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (int lastIndex = ArraysKt.getLastIndex(cArr); -1 < lastIndex; lastIndex--) {
if (!predicate.invoke(Character.valueOf(cArr[lastIndex])).booleanValue()) {
return ArraysKt.drop(cArr, lastIndex + 1);
}
}
return ArraysKt.toList(cArr);
}
public static final <T> List<T> takeWhile(T[] tArr, Function1<? super T, Boolean> predicate) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
ArrayList arrayList = new ArrayList();
for (T t : tArr) {
if (!predicate.invoke(t).booleanValue()) {
break;
}
arrayList.add(t);
}
return arrayList;
}
public static final List<Byte> takeWhile(byte[] bArr, Function1<? super Byte, Boolean> predicate) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
ArrayList arrayList = new ArrayList();
for (byte b : bArr) {
if (!predicate.invoke(Byte.valueOf(b)).booleanValue()) {
break;
}
arrayList.add(Byte.valueOf(b));
}
return arrayList;
}
public static final List<Short> takeWhile(short[] sArr, Function1<? super Short, Boolean> predicate) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
ArrayList arrayList = new ArrayList();
for (short s : sArr) {
if (!predicate.invoke(Short.valueOf(s)).booleanValue()) {
break;
}
arrayList.add(Short.valueOf(s));
}
return arrayList;
}
public static final List<Integer> takeWhile(int[] iArr, Function1<? super Integer, Boolean> predicate) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
ArrayList arrayList = new ArrayList();
for (int i : iArr) {
if (!predicate.invoke(Integer.valueOf(i)).booleanValue()) {
break;
}
arrayList.add(Integer.valueOf(i));
}
return arrayList;
}
public static final List<Long> takeWhile(long[] jArr, Function1<? super Long, Boolean> predicate) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
ArrayList arrayList = new ArrayList();
for (long j : jArr) {
if (!predicate.invoke(Long.valueOf(j)).booleanValue()) {
break;
}
arrayList.add(Long.valueOf(j));
}
return arrayList;
}
public static final List<Float> takeWhile(float[] fArr, Function1<? super Float, Boolean> predicate) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
ArrayList arrayList = new ArrayList();
for (float f : fArr) {
if (!predicate.invoke(Float.valueOf(f)).booleanValue()) {
break;
}
arrayList.add(Float.valueOf(f));
}
return arrayList;
}
public static final List<Double> takeWhile(double[] dArr, Function1<? super Double, Boolean> predicate) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
ArrayList arrayList = new ArrayList();
for (double d : dArr) {
if (!predicate.invoke(Double.valueOf(d)).booleanValue()) {
break;
}
arrayList.add(Double.valueOf(d));
}
return arrayList;
}
public static final List<Boolean> takeWhile(boolean[] zArr, Function1<? super Boolean, Boolean> predicate) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
ArrayList arrayList = new ArrayList();
for (boolean z : zArr) {
if (!predicate.invoke(Boolean.valueOf(z)).booleanValue()) {
break;
}
arrayList.add(Boolean.valueOf(z));
}
return arrayList;
}
public static final List<Character> takeWhile(char[] cArr, Function1<? super Character, Boolean> predicate) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
ArrayList arrayList = new ArrayList();
for (char c : cArr) {
if (!predicate.invoke(Character.valueOf(c)).booleanValue()) {
break;
}
arrayList.add(Character.valueOf(c));
}
return arrayList;
}
/* JADX WARN: Type inference failed for: r0v4, types: [kotlin.collections.IntIterator] */
public static final <T> void reverse(T[] tArr) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
int length = (tArr.length / 2) - 1;
if (length < 0) {
return;
}
int lastIndex = ArraysKt.getLastIndex(tArr);
?? it = new IntRange(0, length).iterator();
while (it.hasNext()) {
int nextInt = it.nextInt();
T t = tArr[nextInt];
tArr[nextInt] = tArr[lastIndex];
tArr[lastIndex] = t;
lastIndex--;
}
}
/* JADX WARN: Type inference failed for: r0v4, types: [kotlin.collections.IntIterator] */
public static final void reverse(byte[] bArr) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
int length = (bArr.length / 2) - 1;
if (length < 0) {
return;
}
int lastIndex = ArraysKt.getLastIndex(bArr);
?? it = new IntRange(0, length).iterator();
while (it.hasNext()) {
int nextInt = it.nextInt();
byte b = bArr[nextInt];
bArr[nextInt] = bArr[lastIndex];
bArr[lastIndex] = b;
lastIndex--;
}
}
/* JADX WARN: Type inference failed for: r0v4, types: [kotlin.collections.IntIterator] */
public static final void reverse(short[] sArr) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
int length = (sArr.length / 2) - 1;
if (length < 0) {
return;
}
int lastIndex = ArraysKt.getLastIndex(sArr);
?? it = new IntRange(0, length).iterator();
while (it.hasNext()) {
int nextInt = it.nextInt();
short s = sArr[nextInt];
sArr[nextInt] = sArr[lastIndex];
sArr[lastIndex] = s;
lastIndex--;
}
}
/* JADX WARN: Type inference failed for: r0v4, types: [kotlin.collections.IntIterator] */
public static final void reverse(int[] iArr) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
int length = (iArr.length / 2) - 1;
if (length < 0) {
return;
}
int lastIndex = ArraysKt.getLastIndex(iArr);
?? it = new IntRange(0, length).iterator();
while (it.hasNext()) {
int nextInt = it.nextInt();
int i = iArr[nextInt];
iArr[nextInt] = iArr[lastIndex];
iArr[lastIndex] = i;
lastIndex--;
}
}
/* JADX WARN: Type inference failed for: r0v4, types: [kotlin.collections.IntIterator] */
public static final void reverse(long[] jArr) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
int length = (jArr.length / 2) - 1;
if (length < 0) {
return;
}
int lastIndex = ArraysKt.getLastIndex(jArr);
?? it = new IntRange(0, length).iterator();
while (it.hasNext()) {
int nextInt = it.nextInt();
long j = jArr[nextInt];
jArr[nextInt] = jArr[lastIndex];
jArr[lastIndex] = j;
lastIndex--;
}
}
/* JADX WARN: Type inference failed for: r0v4, types: [kotlin.collections.IntIterator] */
public static final void reverse(float[] fArr) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
int length = (fArr.length / 2) - 1;
if (length < 0) {
return;
}
int lastIndex = ArraysKt.getLastIndex(fArr);
?? it = new IntRange(0, length).iterator();
while (it.hasNext()) {
int nextInt = it.nextInt();
float f = fArr[nextInt];
fArr[nextInt] = fArr[lastIndex];
fArr[lastIndex] = f;
lastIndex--;
}
}
/* JADX WARN: Type inference failed for: r0v4, types: [kotlin.collections.IntIterator] */
public static final void reverse(double[] dArr) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
int length = (dArr.length / 2) - 1;
if (length < 0) {
return;
}
int lastIndex = ArraysKt.getLastIndex(dArr);
?? it = new IntRange(0, length).iterator();
while (it.hasNext()) {
int nextInt = it.nextInt();
double d = dArr[nextInt];
dArr[nextInt] = dArr[lastIndex];
dArr[lastIndex] = d;
lastIndex--;
}
}
/* JADX WARN: Type inference failed for: r0v4, types: [kotlin.collections.IntIterator] */
public static final void reverse(boolean[] zArr) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
int length = (zArr.length / 2) - 1;
if (length < 0) {
return;
}
int lastIndex = ArraysKt.getLastIndex(zArr);
?? it = new IntRange(0, length).iterator();
while (it.hasNext()) {
int nextInt = it.nextInt();
boolean z = zArr[nextInt];
zArr[nextInt] = zArr[lastIndex];
zArr[lastIndex] = z;
lastIndex--;
}
}
/* JADX WARN: Type inference failed for: r0v4, types: [kotlin.collections.IntIterator] */
public static final void reverse(char[] cArr) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
int length = (cArr.length / 2) - 1;
if (length < 0) {
return;
}
int lastIndex = ArraysKt.getLastIndex(cArr);
?? it = new IntRange(0, length).iterator();
while (it.hasNext()) {
int nextInt = it.nextInt();
char c = cArr[nextInt];
cArr[nextInt] = cArr[lastIndex];
cArr[lastIndex] = c;
lastIndex--;
}
}
public static final <T> void reverse(T[] tArr, int i, int i2) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
AbstractList.INSTANCE.checkRangeIndexes$kotlin_stdlib(i, i2, tArr.length);
int i3 = (i + i2) / 2;
if (i == i3) {
return;
}
int i4 = i2 - 1;
while (i < i3) {
T t = tArr[i];
tArr[i] = tArr[i4];
tArr[i4] = t;
i4--;
i++;
}
}
public static final void reverse(byte[] bArr, int i, int i2) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
AbstractList.INSTANCE.checkRangeIndexes$kotlin_stdlib(i, i2, bArr.length);
int i3 = (i + i2) / 2;
if (i == i3) {
return;
}
int i4 = i2 - 1;
while (i < i3) {
byte b = bArr[i];
bArr[i] = bArr[i4];
bArr[i4] = b;
i4--;
i++;
}
}
public static final void reverse(short[] sArr, int i, int i2) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
AbstractList.INSTANCE.checkRangeIndexes$kotlin_stdlib(i, i2, sArr.length);
int i3 = (i + i2) / 2;
if (i == i3) {
return;
}
int i4 = i2 - 1;
while (i < i3) {
short s = sArr[i];
sArr[i] = sArr[i4];
sArr[i4] = s;
i4--;
i++;
}
}
public static final void reverse(int[] iArr, int i, int i2) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
AbstractList.INSTANCE.checkRangeIndexes$kotlin_stdlib(i, i2, iArr.length);
int i3 = (i + i2) / 2;
if (i == i3) {
return;
}
int i4 = i2 - 1;
while (i < i3) {
int i5 = iArr[i];
iArr[i] = iArr[i4];
iArr[i4] = i5;
i4--;
i++;
}
}
public static final void reverse(long[] jArr, int i, int i2) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
AbstractList.INSTANCE.checkRangeIndexes$kotlin_stdlib(i, i2, jArr.length);
int i3 = (i + i2) / 2;
if (i == i3) {
return;
}
int i4 = i2 - 1;
while (i < i3) {
long j = jArr[i];
jArr[i] = jArr[i4];
jArr[i4] = j;
i4--;
i++;
}
}
public static final void reverse(float[] fArr, int i, int i2) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
AbstractList.INSTANCE.checkRangeIndexes$kotlin_stdlib(i, i2, fArr.length);
int i3 = (i + i2) / 2;
if (i == i3) {
return;
}
int i4 = i2 - 1;
while (i < i3) {
float f = fArr[i];
fArr[i] = fArr[i4];
fArr[i4] = f;
i4--;
i++;
}
}
public static final void reverse(double[] dArr, int i, int i2) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
AbstractList.INSTANCE.checkRangeIndexes$kotlin_stdlib(i, i2, dArr.length);
int i3 = (i + i2) / 2;
if (i == i3) {
return;
}
int i4 = i2 - 1;
while (i < i3) {
double d = dArr[i];
dArr[i] = dArr[i4];
dArr[i4] = d;
i4--;
i++;
}
}
public static final void reverse(boolean[] zArr, int i, int i2) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
AbstractList.INSTANCE.checkRangeIndexes$kotlin_stdlib(i, i2, zArr.length);
int i3 = (i + i2) / 2;
if (i == i3) {
return;
}
int i4 = i2 - 1;
while (i < i3) {
boolean z = zArr[i];
zArr[i] = zArr[i4];
zArr[i4] = z;
i4--;
i++;
}
}
public static final void reverse(char[] cArr, int i, int i2) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
AbstractList.INSTANCE.checkRangeIndexes$kotlin_stdlib(i, i2, cArr.length);
int i3 = (i + i2) / 2;
if (i == i3) {
return;
}
int i4 = i2 - 1;
while (i < i3) {
char c = cArr[i];
cArr[i] = cArr[i4];
cArr[i4] = c;
i4--;
i++;
}
}
public static final <T> List<T> reversed(T[] tArr) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
if (tArr.length == 0) {
return CollectionsKt.emptyList();
}
List<T> mutableList = ArraysKt.toMutableList(tArr);
CollectionsKt.reverse(mutableList);
return mutableList;
}
public static final List<Byte> reversed(byte[] bArr) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
if (bArr.length == 0) {
return CollectionsKt.emptyList();
}
List<Byte> mutableList = ArraysKt.toMutableList(bArr);
CollectionsKt.reverse(mutableList);
return mutableList;
}
public static final List<Short> reversed(short[] sArr) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
if (sArr.length == 0) {
return CollectionsKt.emptyList();
}
List<Short> mutableList = ArraysKt.toMutableList(sArr);
CollectionsKt.reverse(mutableList);
return mutableList;
}
public static final List<Integer> reversed(int[] iArr) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
if (iArr.length == 0) {
return CollectionsKt.emptyList();
}
List<Integer> mutableList = ArraysKt.toMutableList(iArr);
CollectionsKt.reverse(mutableList);
return mutableList;
}
public static final List<Long> reversed(long[] jArr) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
if (jArr.length == 0) {
return CollectionsKt.emptyList();
}
List<Long> mutableList = ArraysKt.toMutableList(jArr);
CollectionsKt.reverse(mutableList);
return mutableList;
}
public static final List<Float> reversed(float[] fArr) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
if (fArr.length == 0) {
return CollectionsKt.emptyList();
}
List<Float> mutableList = ArraysKt.toMutableList(fArr);
CollectionsKt.reverse(mutableList);
return mutableList;
}
public static final List<Double> reversed(double[] dArr) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
if (dArr.length == 0) {
return CollectionsKt.emptyList();
}
List<Double> mutableList = ArraysKt.toMutableList(dArr);
CollectionsKt.reverse(mutableList);
return mutableList;
}
public static final List<Boolean> reversed(boolean[] zArr) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
if (zArr.length == 0) {
return CollectionsKt.emptyList();
}
List<Boolean> mutableList = ArraysKt.toMutableList(zArr);
CollectionsKt.reverse(mutableList);
return mutableList;
}
public static final List<Character> reversed(char[] cArr) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
if (cArr.length == 0) {
return CollectionsKt.emptyList();
}
List<Character> mutableList = ArraysKt.toMutableList(cArr);
CollectionsKt.reverse(mutableList);
return mutableList;
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
public static final <T> T[] reversedArray(T[] tArr) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
if (tArr.length == 0) {
return tArr;
}
T[] tArr2 = (T[]) ArraysKt.arrayOfNulls(tArr, tArr.length);
int lastIndex = ArraysKt.getLastIndex(tArr);
?? it = new IntRange(0, lastIndex).iterator();
while (it.hasNext()) {
int nextInt = it.nextInt();
tArr2[lastIndex - nextInt] = tArr[nextInt];
}
return tArr2;
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
public static final byte[] reversedArray(byte[] bArr) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
if (bArr.length == 0) {
return bArr;
}
byte[] bArr2 = new byte[bArr.length];
int lastIndex = ArraysKt.getLastIndex(bArr);
?? it = new IntRange(0, lastIndex).iterator();
while (it.hasNext()) {
int nextInt = it.nextInt();
bArr2[lastIndex - nextInt] = bArr[nextInt];
}
return bArr2;
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
public static final short[] reversedArray(short[] sArr) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
if (sArr.length == 0) {
return sArr;
}
short[] sArr2 = new short[sArr.length];
int lastIndex = ArraysKt.getLastIndex(sArr);
?? it = new IntRange(0, lastIndex).iterator();
while (it.hasNext()) {
int nextInt = it.nextInt();
sArr2[lastIndex - nextInt] = sArr[nextInt];
}
return sArr2;
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
public static final int[] reversedArray(int[] iArr) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
if (iArr.length == 0) {
return iArr;
}
int[] iArr2 = new int[iArr.length];
int lastIndex = ArraysKt.getLastIndex(iArr);
?? it = new IntRange(0, lastIndex).iterator();
while (it.hasNext()) {
int nextInt = it.nextInt();
iArr2[lastIndex - nextInt] = iArr[nextInt];
}
return iArr2;
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
public static final long[] reversedArray(long[] jArr) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
if (jArr.length == 0) {
return jArr;
}
long[] jArr2 = new long[jArr.length];
int lastIndex = ArraysKt.getLastIndex(jArr);
?? it = new IntRange(0, lastIndex).iterator();
while (it.hasNext()) {
int nextInt = it.nextInt();
jArr2[lastIndex - nextInt] = jArr[nextInt];
}
return jArr2;
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
public static final float[] reversedArray(float[] fArr) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
if (fArr.length == 0) {
return fArr;
}
float[] fArr2 = new float[fArr.length];
int lastIndex = ArraysKt.getLastIndex(fArr);
?? it = new IntRange(0, lastIndex).iterator();
while (it.hasNext()) {
int nextInt = it.nextInt();
fArr2[lastIndex - nextInt] = fArr[nextInt];
}
return fArr2;
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
public static final double[] reversedArray(double[] dArr) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
if (dArr.length == 0) {
return dArr;
}
double[] dArr2 = new double[dArr.length];
int lastIndex = ArraysKt.getLastIndex(dArr);
?? it = new IntRange(0, lastIndex).iterator();
while (it.hasNext()) {
int nextInt = it.nextInt();
dArr2[lastIndex - nextInt] = dArr[nextInt];
}
return dArr2;
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
public static final boolean[] reversedArray(boolean[] zArr) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
if (zArr.length == 0) {
return zArr;
}
boolean[] zArr2 = new boolean[zArr.length];
int lastIndex = ArraysKt.getLastIndex(zArr);
?? it = new IntRange(0, lastIndex).iterator();
while (it.hasNext()) {
int nextInt = it.nextInt();
zArr2[lastIndex - nextInt] = zArr[nextInt];
}
return zArr2;
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
public static final char[] reversedArray(char[] cArr) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
if (cArr.length == 0) {
return cArr;
}
char[] cArr2 = new char[cArr.length];
int lastIndex = ArraysKt.getLastIndex(cArr);
?? it = new IntRange(0, lastIndex).iterator();
while (it.hasNext()) {
int nextInt = it.nextInt();
cArr2[lastIndex - nextInt] = cArr[nextInt];
}
return cArr2;
}
public static final <T> void shuffle(T[] tArr) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
ArraysKt.shuffle(tArr, Random.INSTANCE);
}
public static final void shuffle(byte[] bArr) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
ArraysKt.shuffle(bArr, (Random) Random.INSTANCE);
}
public static final void shuffle(short[] sArr) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
ArraysKt.shuffle(sArr, (Random) Random.INSTANCE);
}
public static final void shuffle(int[] iArr) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
ArraysKt.shuffle(iArr, (Random) Random.INSTANCE);
}
public static final void shuffle(long[] jArr) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
ArraysKt.shuffle(jArr, (Random) Random.INSTANCE);
}
public static final void shuffle(float[] fArr) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
ArraysKt.shuffle(fArr, (Random) Random.INSTANCE);
}
public static final void shuffle(double[] dArr) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
ArraysKt.shuffle(dArr, Random.INSTANCE);
}
public static final void shuffle(boolean[] zArr) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
ArraysKt.shuffle(zArr, Random.INSTANCE);
}
public static final void shuffle(char[] cArr) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
ArraysKt.shuffle(cArr, (Random) Random.INSTANCE);
}
public static final <T> void shuffle(T[] tArr, Random random) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(random, "random");
for (int lastIndex = ArraysKt.getLastIndex(tArr); lastIndex > 0; lastIndex--) {
int nextInt = random.nextInt(lastIndex + 1);
T t = tArr[lastIndex];
tArr[lastIndex] = tArr[nextInt];
tArr[nextInt] = t;
}
}
public static final void shuffle(byte[] bArr, Random random) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(random, "random");
for (int lastIndex = ArraysKt.getLastIndex(bArr); lastIndex > 0; lastIndex--) {
int nextInt = random.nextInt(lastIndex + 1);
byte b = bArr[lastIndex];
bArr[lastIndex] = bArr[nextInt];
bArr[nextInt] = b;
}
}
public static final void shuffle(short[] sArr, Random random) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(random, "random");
for (int lastIndex = ArraysKt.getLastIndex(sArr); lastIndex > 0; lastIndex--) {
int nextInt = random.nextInt(lastIndex + 1);
short s = sArr[lastIndex];
sArr[lastIndex] = sArr[nextInt];
sArr[nextInt] = s;
}
}
public static final void shuffle(int[] iArr, Random random) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(random, "random");
for (int lastIndex = ArraysKt.getLastIndex(iArr); lastIndex > 0; lastIndex--) {
int nextInt = random.nextInt(lastIndex + 1);
int i = iArr[lastIndex];
iArr[lastIndex] = iArr[nextInt];
iArr[nextInt] = i;
}
}
public static final void shuffle(long[] jArr, Random random) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(random, "random");
for (int lastIndex = ArraysKt.getLastIndex(jArr); lastIndex > 0; lastIndex--) {
int nextInt = random.nextInt(lastIndex + 1);
long j = jArr[lastIndex];
jArr[lastIndex] = jArr[nextInt];
jArr[nextInt] = j;
}
}
public static final void shuffle(float[] fArr, Random random) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(random, "random");
for (int lastIndex = ArraysKt.getLastIndex(fArr); lastIndex > 0; lastIndex--) {
int nextInt = random.nextInt(lastIndex + 1);
float f = fArr[lastIndex];
fArr[lastIndex] = fArr[nextInt];
fArr[nextInt] = f;
}
}
public static final void shuffle(double[] dArr, Random random) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(random, "random");
for (int lastIndex = ArraysKt.getLastIndex(dArr); lastIndex > 0; lastIndex--) {
int nextInt = random.nextInt(lastIndex + 1);
double d = dArr[lastIndex];
dArr[lastIndex] = dArr[nextInt];
dArr[nextInt] = d;
}
}
public static final void shuffle(boolean[] zArr, Random random) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(random, "random");
for (int lastIndex = ArraysKt.getLastIndex(zArr); lastIndex > 0; lastIndex--) {
int nextInt = random.nextInt(lastIndex + 1);
boolean z = zArr[lastIndex];
zArr[lastIndex] = zArr[nextInt];
zArr[nextInt] = z;
}
}
public static final void shuffle(char[] cArr, Random random) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(random, "random");
for (int lastIndex = ArraysKt.getLastIndex(cArr); lastIndex > 0; lastIndex--) {
int nextInt = random.nextInt(lastIndex + 1);
char c = cArr[lastIndex];
cArr[lastIndex] = cArr[nextInt];
cArr[nextInt] = c;
}
}
public static final <T, R extends Comparable<? super R>> void sortBy(T[] tArr, Function1<? super T, ? extends R> selector) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (tArr.length > 1) {
ArraysKt.sortWith(tArr, new ComparisonsKt__ComparisonsKt$compareBy$2(selector));
}
}
public static final <T, R extends Comparable<? super R>> void sortByDescending(T[] tArr, Function1<? super T, ? extends R> selector) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (tArr.length > 1) {
ArraysKt.sortWith(tArr, new ComparisonsKt__ComparisonsKt$compareByDescending$1(selector));
}
}
public static final <T extends Comparable<? super T>> void sortDescending(T[] tArr) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
ArraysKt.sortWith(tArr, ComparisonsKt.reverseOrder());
}
public static final void sortDescending(byte[] bArr) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
if (bArr.length > 1) {
ArraysKt.sort(bArr);
ArraysKt.reverse(bArr);
}
}
public static final void sortDescending(short[] sArr) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
if (sArr.length > 1) {
ArraysKt.sort(sArr);
ArraysKt.reverse(sArr);
}
}
public static final void sortDescending(int[] iArr) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
if (iArr.length > 1) {
ArraysKt.sort(iArr);
ArraysKt.reverse(iArr);
}
}
public static final void sortDescending(long[] jArr) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
if (jArr.length > 1) {
ArraysKt.sort(jArr);
ArraysKt.reverse(jArr);
}
}
public static final void sortDescending(float[] fArr) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
if (fArr.length > 1) {
ArraysKt.sort(fArr);
ArraysKt.reverse(fArr);
}
}
public static final void sortDescending(double[] dArr) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
if (dArr.length > 1) {
ArraysKt.sort(dArr);
ArraysKt.reverse(dArr);
}
}
public static final void sortDescending(char[] cArr) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
if (cArr.length > 1) {
ArraysKt.sort(cArr);
ArraysKt.reverse(cArr);
}
}
public static final <T extends Comparable<? super T>> List<T> sorted(T[] tArr) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
return ArraysKt.asList(ArraysKt.sortedArray(tArr));
}
public static final List<Byte> sorted(byte[] bArr) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Byte[] typedArray = ArraysKt.toTypedArray(bArr);
ArraysKt.sort((Object[]) typedArray);
return ArraysKt.asList(typedArray);
}
public static final List<Short> sorted(short[] sArr) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Short[] typedArray = ArraysKt.toTypedArray(sArr);
ArraysKt.sort((Object[]) typedArray);
return ArraysKt.asList(typedArray);
}
public static final List<Integer> sorted(int[] iArr) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Integer[] typedArray = ArraysKt.toTypedArray(iArr);
ArraysKt.sort((Object[]) typedArray);
return ArraysKt.asList(typedArray);
}
public static final List<Long> sorted(long[] jArr) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Long[] typedArray = ArraysKt.toTypedArray(jArr);
ArraysKt.sort((Object[]) typedArray);
return ArraysKt.asList(typedArray);
}
public static final List<Float> sorted(float[] fArr) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Float[] typedArray = ArraysKt.toTypedArray(fArr);
ArraysKt.sort((Object[]) typedArray);
return ArraysKt.asList(typedArray);
}
public static final List<Double> sorted(double[] dArr) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Double[] typedArray = ArraysKt.toTypedArray(dArr);
ArraysKt.sort((Object[]) typedArray);
return ArraysKt.asList(typedArray);
}
public static final List<Character> sorted(char[] cArr) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Character[] typedArray = ArraysKt.toTypedArray(cArr);
ArraysKt.sort((Object[]) typedArray);
return ArraysKt.asList(typedArray);
}
public static final <T extends Comparable<? super T>> T[] sortedArray(T[] tArr) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
if (tArr.length == 0) {
return tArr;
}
Object[] copyOf = Arrays.copyOf(tArr, tArr.length);
Intrinsics.checkNotNullExpressionValue(copyOf, "copyOf(...)");
T[] tArr2 = (T[]) ((Comparable[]) copyOf);
ArraysKt.sort((Object[]) tArr2);
return tArr2;
}
public static final byte[] sortedArray(byte[] bArr) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
if (bArr.length == 0) {
return bArr;
}
byte[] copyOf = Arrays.copyOf(bArr, bArr.length);
Intrinsics.checkNotNullExpressionValue(copyOf, "copyOf(...)");
ArraysKt.sort(copyOf);
return copyOf;
}
public static final short[] sortedArray(short[] sArr) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
if (sArr.length == 0) {
return sArr;
}
short[] copyOf = Arrays.copyOf(sArr, sArr.length);
Intrinsics.checkNotNullExpressionValue(copyOf, "copyOf(...)");
ArraysKt.sort(copyOf);
return copyOf;
}
public static final int[] sortedArray(int[] iArr) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
if (iArr.length == 0) {
return iArr;
}
int[] copyOf = Arrays.copyOf(iArr, iArr.length);
Intrinsics.checkNotNullExpressionValue(copyOf, "copyOf(...)");
ArraysKt.sort(copyOf);
return copyOf;
}
public static final long[] sortedArray(long[] jArr) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
if (jArr.length == 0) {
return jArr;
}
long[] copyOf = Arrays.copyOf(jArr, jArr.length);
Intrinsics.checkNotNullExpressionValue(copyOf, "copyOf(...)");
ArraysKt.sort(copyOf);
return copyOf;
}
public static final float[] sortedArray(float[] fArr) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
if (fArr.length == 0) {
return fArr;
}
float[] copyOf = Arrays.copyOf(fArr, fArr.length);
Intrinsics.checkNotNullExpressionValue(copyOf, "copyOf(...)");
ArraysKt.sort(copyOf);
return copyOf;
}
public static final double[] sortedArray(double[] dArr) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
if (dArr.length == 0) {
return dArr;
}
double[] copyOf = Arrays.copyOf(dArr, dArr.length);
Intrinsics.checkNotNullExpressionValue(copyOf, "copyOf(...)");
ArraysKt.sort(copyOf);
return copyOf;
}
public static final char[] sortedArray(char[] cArr) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
if (cArr.length == 0) {
return cArr;
}
char[] copyOf = Arrays.copyOf(cArr, cArr.length);
Intrinsics.checkNotNullExpressionValue(copyOf, "copyOf(...)");
ArraysKt.sort(copyOf);
return copyOf;
}
public static final <T extends Comparable<? super T>> T[] sortedArrayDescending(T[] tArr) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
if (tArr.length == 0) {
return tArr;
}
Object[] copyOf = Arrays.copyOf(tArr, tArr.length);
Intrinsics.checkNotNullExpressionValue(copyOf, "copyOf(...)");
T[] tArr2 = (T[]) ((Comparable[]) copyOf);
ArraysKt.sortWith(tArr2, ComparisonsKt.reverseOrder());
return tArr2;
}
public static final byte[] sortedArrayDescending(byte[] bArr) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
if (bArr.length == 0) {
return bArr;
}
byte[] copyOf = Arrays.copyOf(bArr, bArr.length);
Intrinsics.checkNotNullExpressionValue(copyOf, "copyOf(...)");
ArraysKt.sortDescending(copyOf);
return copyOf;
}
public static final short[] sortedArrayDescending(short[] sArr) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
if (sArr.length == 0) {
return sArr;
}
short[] copyOf = Arrays.copyOf(sArr, sArr.length);
Intrinsics.checkNotNullExpressionValue(copyOf, "copyOf(...)");
ArraysKt.sortDescending(copyOf);
return copyOf;
}
public static final int[] sortedArrayDescending(int[] iArr) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
if (iArr.length == 0) {
return iArr;
}
int[] copyOf = Arrays.copyOf(iArr, iArr.length);
Intrinsics.checkNotNullExpressionValue(copyOf, "copyOf(...)");
ArraysKt.sortDescending(copyOf);
return copyOf;
}
public static final long[] sortedArrayDescending(long[] jArr) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
if (jArr.length == 0) {
return jArr;
}
long[] copyOf = Arrays.copyOf(jArr, jArr.length);
Intrinsics.checkNotNullExpressionValue(copyOf, "copyOf(...)");
ArraysKt.sortDescending(copyOf);
return copyOf;
}
public static final float[] sortedArrayDescending(float[] fArr) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
if (fArr.length == 0) {
return fArr;
}
float[] copyOf = Arrays.copyOf(fArr, fArr.length);
Intrinsics.checkNotNullExpressionValue(copyOf, "copyOf(...)");
ArraysKt.sortDescending(copyOf);
return copyOf;
}
public static final double[] sortedArrayDescending(double[] dArr) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
if (dArr.length == 0) {
return dArr;
}
double[] copyOf = Arrays.copyOf(dArr, dArr.length);
Intrinsics.checkNotNullExpressionValue(copyOf, "copyOf(...)");
ArraysKt.sortDescending(copyOf);
return copyOf;
}
public static final char[] sortedArrayDescending(char[] cArr) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
if (cArr.length == 0) {
return cArr;
}
char[] copyOf = Arrays.copyOf(cArr, cArr.length);
Intrinsics.checkNotNullExpressionValue(copyOf, "copyOf(...)");
ArraysKt.sortDescending(copyOf);
return copyOf;
}
public static final <T> T[] sortedArrayWith(T[] tArr, Comparator<? super T> comparator) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
if (tArr.length == 0) {
return tArr;
}
T[] tArr2 = (T[]) Arrays.copyOf(tArr, tArr.length);
Intrinsics.checkNotNullExpressionValue(tArr2, "copyOf(...)");
ArraysKt.sortWith(tArr2, comparator);
return tArr2;
}
public static final <T, R extends Comparable<? super R>> List<T> sortedBy(T[] tArr, Function1<? super T, ? extends R> selector) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
return ArraysKt.sortedWith(tArr, new ComparisonsKt__ComparisonsKt$compareBy$2(selector));
}
public static final <R extends Comparable<? super R>> List<Byte> sortedBy(byte[] bArr, Function1<? super Byte, ? extends R> selector) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
return ArraysKt.sortedWith(bArr, (Comparator<? super Byte>) new ComparisonsKt__ComparisonsKt$compareBy$2(selector));
}
public static final <R extends Comparable<? super R>> List<Short> sortedBy(short[] sArr, Function1<? super Short, ? extends R> selector) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
return ArraysKt.sortedWith(sArr, (Comparator<? super Short>) new ComparisonsKt__ComparisonsKt$compareBy$2(selector));
}
public static final <R extends Comparable<? super R>> List<Integer> sortedBy(int[] iArr, Function1<? super Integer, ? extends R> selector) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
return ArraysKt.sortedWith(iArr, (Comparator<? super Integer>) new ComparisonsKt__ComparisonsKt$compareBy$2(selector));
}
public static final <R extends Comparable<? super R>> List<Long> sortedBy(long[] jArr, Function1<? super Long, ? extends R> selector) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
return ArraysKt.sortedWith(jArr, (Comparator<? super Long>) new ComparisonsKt__ComparisonsKt$compareBy$2(selector));
}
public static final <R extends Comparable<? super R>> List<Float> sortedBy(float[] fArr, Function1<? super Float, ? extends R> selector) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
return ArraysKt.sortedWith(fArr, (Comparator<? super Float>) new ComparisonsKt__ComparisonsKt$compareBy$2(selector));
}
public static final <R extends Comparable<? super R>> List<Double> sortedBy(double[] dArr, Function1<? super Double, ? extends R> selector) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
return ArraysKt.sortedWith(dArr, new ComparisonsKt__ComparisonsKt$compareBy$2(selector));
}
public static final <R extends Comparable<? super R>> List<Boolean> sortedBy(boolean[] zArr, Function1<? super Boolean, ? extends R> selector) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
return ArraysKt.sortedWith(zArr, new ComparisonsKt__ComparisonsKt$compareBy$2(selector));
}
public static final <R extends Comparable<? super R>> List<Character> sortedBy(char[] cArr, Function1<? super Character, ? extends R> selector) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
return ArraysKt.sortedWith(cArr, (Comparator<? super Character>) new ComparisonsKt__ComparisonsKt$compareBy$2(selector));
}
public static final <T, R extends Comparable<? super R>> List<T> sortedByDescending(T[] tArr, Function1<? super T, ? extends R> selector) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
return ArraysKt.sortedWith(tArr, new ComparisonsKt__ComparisonsKt$compareByDescending$1(selector));
}
public static final <R extends Comparable<? super R>> List<Byte> sortedByDescending(byte[] bArr, Function1<? super Byte, ? extends R> selector) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
return ArraysKt.sortedWith(bArr, (Comparator<? super Byte>) new ComparisonsKt__ComparisonsKt$compareByDescending$1(selector));
}
public static final <R extends Comparable<? super R>> List<Short> sortedByDescending(short[] sArr, Function1<? super Short, ? extends R> selector) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
return ArraysKt.sortedWith(sArr, (Comparator<? super Short>) new ComparisonsKt__ComparisonsKt$compareByDescending$1(selector));
}
public static final <R extends Comparable<? super R>> List<Integer> sortedByDescending(int[] iArr, Function1<? super Integer, ? extends R> selector) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
return ArraysKt.sortedWith(iArr, (Comparator<? super Integer>) new ComparisonsKt__ComparisonsKt$compareByDescending$1(selector));
}
public static final <R extends Comparable<? super R>> List<Long> sortedByDescending(long[] jArr, Function1<? super Long, ? extends R> selector) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
return ArraysKt.sortedWith(jArr, (Comparator<? super Long>) new ComparisonsKt__ComparisonsKt$compareByDescending$1(selector));
}
public static final <R extends Comparable<? super R>> List<Float> sortedByDescending(float[] fArr, Function1<? super Float, ? extends R> selector) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
return ArraysKt.sortedWith(fArr, (Comparator<? super Float>) new ComparisonsKt__ComparisonsKt$compareByDescending$1(selector));
}
public static final <R extends Comparable<? super R>> List<Double> sortedByDescending(double[] dArr, Function1<? super Double, ? extends R> selector) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
return ArraysKt.sortedWith(dArr, new ComparisonsKt__ComparisonsKt$compareByDescending$1(selector));
}
public static final <R extends Comparable<? super R>> List<Boolean> sortedByDescending(boolean[] zArr, Function1<? super Boolean, ? extends R> selector) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
return ArraysKt.sortedWith(zArr, new ComparisonsKt__ComparisonsKt$compareByDescending$1(selector));
}
public static final <R extends Comparable<? super R>> List<Character> sortedByDescending(char[] cArr, Function1<? super Character, ? extends R> selector) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
return ArraysKt.sortedWith(cArr, (Comparator<? super Character>) new ComparisonsKt__ComparisonsKt$compareByDescending$1(selector));
}
public static final <T extends Comparable<? super T>> List<T> sortedDescending(T[] tArr) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
return ArraysKt.sortedWith(tArr, ComparisonsKt.reverseOrder());
}
public static final List<Byte> sortedDescending(byte[] bArr) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
byte[] copyOf = Arrays.copyOf(bArr, bArr.length);
Intrinsics.checkNotNullExpressionValue(copyOf, "copyOf(...)");
ArraysKt.sort(copyOf);
return ArraysKt.reversed(copyOf);
}
public static final List<Short> sortedDescending(short[] sArr) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
short[] copyOf = Arrays.copyOf(sArr, sArr.length);
Intrinsics.checkNotNullExpressionValue(copyOf, "copyOf(...)");
ArraysKt.sort(copyOf);
return ArraysKt.reversed(copyOf);
}
public static final List<Integer> sortedDescending(int[] iArr) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
int[] copyOf = Arrays.copyOf(iArr, iArr.length);
Intrinsics.checkNotNullExpressionValue(copyOf, "copyOf(...)");
ArraysKt.sort(copyOf);
return ArraysKt.reversed(copyOf);
}
public static final List<Long> sortedDescending(long[] jArr) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
long[] copyOf = Arrays.copyOf(jArr, jArr.length);
Intrinsics.checkNotNullExpressionValue(copyOf, "copyOf(...)");
ArraysKt.sort(copyOf);
return ArraysKt.reversed(copyOf);
}
public static final List<Float> sortedDescending(float[] fArr) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
float[] copyOf = Arrays.copyOf(fArr, fArr.length);
Intrinsics.checkNotNullExpressionValue(copyOf, "copyOf(...)");
ArraysKt.sort(copyOf);
return ArraysKt.reversed(copyOf);
}
public static final List<Double> sortedDescending(double[] dArr) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
double[] copyOf = Arrays.copyOf(dArr, dArr.length);
Intrinsics.checkNotNullExpressionValue(copyOf, "copyOf(...)");
ArraysKt.sort(copyOf);
return ArraysKt.reversed(copyOf);
}
public static final List<Character> sortedDescending(char[] cArr) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
char[] copyOf = Arrays.copyOf(cArr, cArr.length);
Intrinsics.checkNotNullExpressionValue(copyOf, "copyOf(...)");
ArraysKt.sort(copyOf);
return ArraysKt.reversed(copyOf);
}
public static final <T> List<T> sortedWith(T[] tArr, Comparator<? super T> comparator) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
return ArraysKt.asList(ArraysKt.sortedArrayWith(tArr, comparator));
}
public static final List<Byte> sortedWith(byte[] bArr, Comparator<? super Byte> comparator) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
Byte[] typedArray = ArraysKt.toTypedArray(bArr);
ArraysKt.sortWith(typedArray, comparator);
return ArraysKt.asList(typedArray);
}
public static final List<Short> sortedWith(short[] sArr, Comparator<? super Short> comparator) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
Short[] typedArray = ArraysKt.toTypedArray(sArr);
ArraysKt.sortWith(typedArray, comparator);
return ArraysKt.asList(typedArray);
}
public static final List<Integer> sortedWith(int[] iArr, Comparator<? super Integer> comparator) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
Integer[] typedArray = ArraysKt.toTypedArray(iArr);
ArraysKt.sortWith(typedArray, comparator);
return ArraysKt.asList(typedArray);
}
public static final List<Long> sortedWith(long[] jArr, Comparator<? super Long> comparator) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
Long[] typedArray = ArraysKt.toTypedArray(jArr);
ArraysKt.sortWith(typedArray, comparator);
return ArraysKt.asList(typedArray);
}
public static final List<Float> sortedWith(float[] fArr, Comparator<? super Float> comparator) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
Float[] typedArray = ArraysKt.toTypedArray(fArr);
ArraysKt.sortWith(typedArray, comparator);
return ArraysKt.asList(typedArray);
}
public static final List<Double> sortedWith(double[] dArr, Comparator<? super Double> comparator) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
Double[] typedArray = ArraysKt.toTypedArray(dArr);
ArraysKt.sortWith(typedArray, comparator);
return ArraysKt.asList(typedArray);
}
public static final List<Boolean> sortedWith(boolean[] zArr, Comparator<? super Boolean> comparator) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
Boolean[] typedArray = ArraysKt.toTypedArray(zArr);
ArraysKt.sortWith(typedArray, comparator);
return ArraysKt.asList(typedArray);
}
public static final List<Character> sortedWith(char[] cArr, Comparator<? super Character> comparator) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
Character[] typedArray = ArraysKt.toTypedArray(cArr);
ArraysKt.sortWith(typedArray, comparator);
return ArraysKt.asList(typedArray);
}
public static final <T> IntRange getIndices(T[] tArr) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
return new IntRange(0, ArraysKt.getLastIndex(tArr));
}
public static final IntRange getIndices(byte[] bArr) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
return new IntRange(0, ArraysKt.getLastIndex(bArr));
}
public static final IntRange getIndices(short[] sArr) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
return new IntRange(0, ArraysKt.getLastIndex(sArr));
}
public static final IntRange getIndices(int[] iArr) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
return new IntRange(0, ArraysKt.getLastIndex(iArr));
}
public static final IntRange getIndices(long[] jArr) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
return new IntRange(0, ArraysKt.getLastIndex(jArr));
}
public static final IntRange getIndices(float[] fArr) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
return new IntRange(0, ArraysKt.getLastIndex(fArr));
}
public static final IntRange getIndices(double[] dArr) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
return new IntRange(0, ArraysKt.getLastIndex(dArr));
}
public static final IntRange getIndices(boolean[] zArr) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
return new IntRange(0, ArraysKt.getLastIndex(zArr));
}
public static final IntRange getIndices(char[] cArr) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
return new IntRange(0, ArraysKt.getLastIndex(cArr));
}
private static final <T> boolean isEmpty(T[] tArr) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
return tArr.length == 0;
}
private static final boolean isEmpty(byte[] bArr) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
return bArr.length == 0;
}
private static final boolean isEmpty(short[] sArr) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
return sArr.length == 0;
}
private static final boolean isEmpty(int[] iArr) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
return iArr.length == 0;
}
private static final boolean isEmpty(long[] jArr) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
return jArr.length == 0;
}
private static final boolean isEmpty(float[] fArr) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
return fArr.length == 0;
}
private static final boolean isEmpty(double[] dArr) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
return dArr.length == 0;
}
private static final boolean isEmpty(boolean[] zArr) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
return zArr.length == 0;
}
private static final boolean isEmpty(char[] cArr) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
return cArr.length == 0;
}
private static final <T> boolean isNotEmpty(T[] tArr) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
return !(tArr.length == 0);
}
private static final boolean isNotEmpty(byte[] bArr) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
return !(bArr.length == 0);
}
private static final boolean isNotEmpty(short[] sArr) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
return !(sArr.length == 0);
}
private static final boolean isNotEmpty(int[] iArr) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
return !(iArr.length == 0);
}
private static final boolean isNotEmpty(long[] jArr) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
return !(jArr.length == 0);
}
private static final boolean isNotEmpty(float[] fArr) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
return !(fArr.length == 0);
}
private static final boolean isNotEmpty(double[] dArr) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
return !(dArr.length == 0);
}
private static final boolean isNotEmpty(boolean[] zArr) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
return !(zArr.length == 0);
}
private static final boolean isNotEmpty(char[] cArr) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
return !(cArr.length == 0);
}
public static final <T> int getLastIndex(T[] tArr) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
return tArr.length - 1;
}
public static final int getLastIndex(byte[] bArr) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
return bArr.length - 1;
}
public static final int getLastIndex(short[] sArr) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
return sArr.length - 1;
}
public static final int getLastIndex(int[] iArr) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
return iArr.length - 1;
}
public static final int getLastIndex(long[] jArr) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
return jArr.length - 1;
}
public static final int getLastIndex(float[] fArr) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
return fArr.length - 1;
}
public static final int getLastIndex(double[] dArr) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
return dArr.length - 1;
}
public static final int getLastIndex(boolean[] zArr) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
return zArr.length - 1;
}
public static final int getLastIndex(char[] cArr) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
return cArr.length - 1;
}
public static final <T extends Comparable<? super T>> void sortDescending(T[] tArr, int i, int i2) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
ArraysKt.sortWith(tArr, ComparisonsKt.reverseOrder(), i, i2);
}
public static final void sortDescending(byte[] bArr, int i, int i2) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
ArraysKt.sort(bArr, i, i2);
ArraysKt.reverse(bArr, i, i2);
}
public static final void sortDescending(short[] sArr, int i, int i2) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
ArraysKt.sort(sArr, i, i2);
ArraysKt.reverse(sArr, i, i2);
}
public static final void sortDescending(int[] iArr, int i, int i2) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
ArraysKt.sort(iArr, i, i2);
ArraysKt.reverse(iArr, i, i2);
}
public static final void sortDescending(long[] jArr, int i, int i2) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
ArraysKt.sort(jArr, i, i2);
ArraysKt.reverse(jArr, i, i2);
}
public static final void sortDescending(float[] fArr, int i, int i2) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
ArraysKt.sort(fArr, i, i2);
ArraysKt.reverse(fArr, i, i2);
}
public static final void sortDescending(double[] dArr, int i, int i2) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
ArraysKt.sort(dArr, i, i2);
ArraysKt.reverse(dArr, i, i2);
}
public static final void sortDescending(char[] cArr, int i, int i2) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
ArraysKt.sort(cArr, i, i2);
ArraysKt.reverse(cArr, i, i2);
}
public static final boolean[] toBooleanArray(Boolean[] boolArr) {
Intrinsics.checkNotNullParameter(boolArr, "<this>");
int length = boolArr.length;
boolean[] zArr = new boolean[length];
for (int i = 0; i < length; i++) {
zArr[i] = boolArr[i].booleanValue();
}
return zArr;
}
public static final byte[] toByteArray(Byte[] bArr) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
int length = bArr.length;
byte[] bArr2 = new byte[length];
for (int i = 0; i < length; i++) {
bArr2[i] = bArr[i].byteValue();
}
return bArr2;
}
public static final char[] toCharArray(Character[] chArr) {
Intrinsics.checkNotNullParameter(chArr, "<this>");
int length = chArr.length;
char[] cArr = new char[length];
for (int i = 0; i < length; i++) {
cArr[i] = chArr[i].charValue();
}
return cArr;
}
public static final double[] toDoubleArray(Double[] dArr) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
int length = dArr.length;
double[] dArr2 = new double[length];
for (int i = 0; i < length; i++) {
dArr2[i] = dArr[i].doubleValue();
}
return dArr2;
}
public static final float[] toFloatArray(Float[] fArr) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
int length = fArr.length;
float[] fArr2 = new float[length];
for (int i = 0; i < length; i++) {
fArr2[i] = fArr[i].floatValue();
}
return fArr2;
}
public static final int[] toIntArray(Integer[] numArr) {
Intrinsics.checkNotNullParameter(numArr, "<this>");
int length = numArr.length;
int[] iArr = new int[length];
for (int i = 0; i < length; i++) {
iArr[i] = numArr[i].intValue();
}
return iArr;
}
public static final long[] toLongArray(Long[] lArr) {
Intrinsics.checkNotNullParameter(lArr, "<this>");
int length = lArr.length;
long[] jArr = new long[length];
for (int i = 0; i < length; i++) {
jArr[i] = lArr[i].longValue();
}
return jArr;
}
public static final short[] toShortArray(Short[] shArr) {
Intrinsics.checkNotNullParameter(shArr, "<this>");
int length = shArr.length;
short[] sArr = new short[length];
for (int i = 0; i < length; i++) {
sArr[i] = shArr[i].shortValue();
}
return sArr;
}
/* JADX WARN: Multi-variable type inference failed */
public static final <T, K, V> Map<K, V> associate(T[] tArr, Function1<? super T, ? extends Pair<? extends K, ? extends V>> transform) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(transform, "transform");
LinkedHashMap linkedHashMap = new LinkedHashMap(RangesKt.coerceAtLeast(MapsKt.mapCapacity(tArr.length), 16));
for (DeviceControl$Companion$$ExternalSyntheticLambda3 deviceControl$Companion$$ExternalSyntheticLambda3 : tArr) {
Pair<? extends K, ? extends V> invoke = transform.invoke(deviceControl$Companion$$ExternalSyntheticLambda3);
linkedHashMap.put(invoke.getFirst(), invoke.getSecond());
}
return linkedHashMap;
}
public static final <K, V> Map<K, V> associate(byte[] bArr, Function1<? super Byte, ? extends Pair<? extends K, ? extends V>> transform) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(transform, "transform");
LinkedHashMap linkedHashMap = new LinkedHashMap(RangesKt.coerceAtLeast(MapsKt.mapCapacity(bArr.length), 16));
for (byte b : bArr) {
Pair<? extends K, ? extends V> invoke = transform.invoke(Byte.valueOf(b));
linkedHashMap.put(invoke.getFirst(), invoke.getSecond());
}
return linkedHashMap;
}
public static final <K, V> Map<K, V> associate(short[] sArr, Function1<? super Short, ? extends Pair<? extends K, ? extends V>> transform) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(transform, "transform");
LinkedHashMap linkedHashMap = new LinkedHashMap(RangesKt.coerceAtLeast(MapsKt.mapCapacity(sArr.length), 16));
for (short s : sArr) {
Pair<? extends K, ? extends V> invoke = transform.invoke(Short.valueOf(s));
linkedHashMap.put(invoke.getFirst(), invoke.getSecond());
}
return linkedHashMap;
}
public static final <K, V> Map<K, V> associate(int[] iArr, Function1<? super Integer, ? extends Pair<? extends K, ? extends V>> transform) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(transform, "transform");
LinkedHashMap linkedHashMap = new LinkedHashMap(RangesKt.coerceAtLeast(MapsKt.mapCapacity(iArr.length), 16));
for (int i : iArr) {
Pair<? extends K, ? extends V> invoke = transform.invoke(Integer.valueOf(i));
linkedHashMap.put(invoke.getFirst(), invoke.getSecond());
}
return linkedHashMap;
}
public static final <K, V> Map<K, V> associate(long[] jArr, Function1<? super Long, ? extends Pair<? extends K, ? extends V>> transform) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(transform, "transform");
LinkedHashMap linkedHashMap = new LinkedHashMap(RangesKt.coerceAtLeast(MapsKt.mapCapacity(jArr.length), 16));
for (long j : jArr) {
Pair<? extends K, ? extends V> invoke = transform.invoke(Long.valueOf(j));
linkedHashMap.put(invoke.getFirst(), invoke.getSecond());
}
return linkedHashMap;
}
public static final <K, V> Map<K, V> associate(float[] fArr, Function1<? super Float, ? extends Pair<? extends K, ? extends V>> transform) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(transform, "transform");
LinkedHashMap linkedHashMap = new LinkedHashMap(RangesKt.coerceAtLeast(MapsKt.mapCapacity(fArr.length), 16));
for (float f : fArr) {
Pair<? extends K, ? extends V> invoke = transform.invoke(Float.valueOf(f));
linkedHashMap.put(invoke.getFirst(), invoke.getSecond());
}
return linkedHashMap;
}
public static final <K, V> Map<K, V> associate(double[] dArr, Function1<? super Double, ? extends Pair<? extends K, ? extends V>> transform) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(transform, "transform");
LinkedHashMap linkedHashMap = new LinkedHashMap(RangesKt.coerceAtLeast(MapsKt.mapCapacity(dArr.length), 16));
for (double d : dArr) {
Pair<? extends K, ? extends V> invoke = transform.invoke(Double.valueOf(d));
linkedHashMap.put(invoke.getFirst(), invoke.getSecond());
}
return linkedHashMap;
}
public static final <K, V> Map<K, V> associate(boolean[] zArr, Function1<? super Boolean, ? extends Pair<? extends K, ? extends V>> transform) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(transform, "transform");
LinkedHashMap linkedHashMap = new LinkedHashMap(RangesKt.coerceAtLeast(MapsKt.mapCapacity(zArr.length), 16));
for (boolean z : zArr) {
Pair<? extends K, ? extends V> invoke = transform.invoke(Boolean.valueOf(z));
linkedHashMap.put(invoke.getFirst(), invoke.getSecond());
}
return linkedHashMap;
}
public static final <K, V> Map<K, V> associate(char[] cArr, Function1<? super Character, ? extends Pair<? extends K, ? extends V>> transform) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(transform, "transform");
LinkedHashMap linkedHashMap = new LinkedHashMap(RangesKt.coerceAtLeast(MapsKt.mapCapacity(cArr.length), 16));
for (char c : cArr) {
Pair<? extends K, ? extends V> invoke = transform.invoke(Character.valueOf(c));
linkedHashMap.put(invoke.getFirst(), invoke.getSecond());
}
return linkedHashMap;
}
public static final <T, K> Map<K, T> associateBy(T[] tArr, Function1<? super T, ? extends K> keySelector) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(keySelector, "keySelector");
LinkedHashMap linkedHashMap = new LinkedHashMap(RangesKt.coerceAtLeast(MapsKt.mapCapacity(tArr.length), 16));
for (T t : tArr) {
linkedHashMap.put(keySelector.invoke(t), t);
}
return linkedHashMap;
}
public static final <K> Map<K, Byte> associateBy(byte[] bArr, Function1<? super Byte, ? extends K> keySelector) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(keySelector, "keySelector");
LinkedHashMap linkedHashMap = new LinkedHashMap(RangesKt.coerceAtLeast(MapsKt.mapCapacity(bArr.length), 16));
for (byte b : bArr) {
linkedHashMap.put(keySelector.invoke(Byte.valueOf(b)), Byte.valueOf(b));
}
return linkedHashMap;
}
public static final <K> Map<K, Short> associateBy(short[] sArr, Function1<? super Short, ? extends K> keySelector) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(keySelector, "keySelector");
LinkedHashMap linkedHashMap = new LinkedHashMap(RangesKt.coerceAtLeast(MapsKt.mapCapacity(sArr.length), 16));
for (short s : sArr) {
linkedHashMap.put(keySelector.invoke(Short.valueOf(s)), Short.valueOf(s));
}
return linkedHashMap;
}
public static final <K> Map<K, Integer> associateBy(int[] iArr, Function1<? super Integer, ? extends K> keySelector) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(keySelector, "keySelector");
LinkedHashMap linkedHashMap = new LinkedHashMap(RangesKt.coerceAtLeast(MapsKt.mapCapacity(iArr.length), 16));
for (int i : iArr) {
linkedHashMap.put(keySelector.invoke(Integer.valueOf(i)), Integer.valueOf(i));
}
return linkedHashMap;
}
public static final <K> Map<K, Long> associateBy(long[] jArr, Function1<? super Long, ? extends K> keySelector) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(keySelector, "keySelector");
LinkedHashMap linkedHashMap = new LinkedHashMap(RangesKt.coerceAtLeast(MapsKt.mapCapacity(jArr.length), 16));
for (long j : jArr) {
linkedHashMap.put(keySelector.invoke(Long.valueOf(j)), Long.valueOf(j));
}
return linkedHashMap;
}
public static final <K> Map<K, Float> associateBy(float[] fArr, Function1<? super Float, ? extends K> keySelector) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(keySelector, "keySelector");
LinkedHashMap linkedHashMap = new LinkedHashMap(RangesKt.coerceAtLeast(MapsKt.mapCapacity(fArr.length), 16));
for (float f : fArr) {
linkedHashMap.put(keySelector.invoke(Float.valueOf(f)), Float.valueOf(f));
}
return linkedHashMap;
}
public static final <K> Map<K, Double> associateBy(double[] dArr, Function1<? super Double, ? extends K> keySelector) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(keySelector, "keySelector");
LinkedHashMap linkedHashMap = new LinkedHashMap(RangesKt.coerceAtLeast(MapsKt.mapCapacity(dArr.length), 16));
for (double d : dArr) {
linkedHashMap.put(keySelector.invoke(Double.valueOf(d)), Double.valueOf(d));
}
return linkedHashMap;
}
public static final <K> Map<K, Boolean> associateBy(boolean[] zArr, Function1<? super Boolean, ? extends K> keySelector) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(keySelector, "keySelector");
LinkedHashMap linkedHashMap = new LinkedHashMap(RangesKt.coerceAtLeast(MapsKt.mapCapacity(zArr.length), 16));
for (boolean z : zArr) {
linkedHashMap.put(keySelector.invoke(Boolean.valueOf(z)), Boolean.valueOf(z));
}
return linkedHashMap;
}
public static final <K> Map<K, Character> associateBy(char[] cArr, Function1<? super Character, ? extends K> keySelector) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(keySelector, "keySelector");
LinkedHashMap linkedHashMap = new LinkedHashMap(RangesKt.coerceAtLeast(MapsKt.mapCapacity(cArr.length), 16));
for (char c : cArr) {
linkedHashMap.put(keySelector.invoke(Character.valueOf(c)), Character.valueOf(c));
}
return linkedHashMap;
}
public static final <T, K, V> Map<K, V> associateBy(T[] tArr, Function1<? super T, ? extends K> keySelector, Function1<? super T, ? extends V> valueTransform) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(keySelector, "keySelector");
Intrinsics.checkNotNullParameter(valueTransform, "valueTransform");
LinkedHashMap linkedHashMap = new LinkedHashMap(RangesKt.coerceAtLeast(MapsKt.mapCapacity(tArr.length), 16));
for (T t : tArr) {
linkedHashMap.put(keySelector.invoke(t), valueTransform.invoke(t));
}
return linkedHashMap;
}
public static final <K, V> Map<K, V> associateBy(byte[] bArr, Function1<? super Byte, ? extends K> keySelector, Function1<? super Byte, ? extends V> valueTransform) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(keySelector, "keySelector");
Intrinsics.checkNotNullParameter(valueTransform, "valueTransform");
LinkedHashMap linkedHashMap = new LinkedHashMap(RangesKt.coerceAtLeast(MapsKt.mapCapacity(bArr.length), 16));
for (byte b : bArr) {
linkedHashMap.put(keySelector.invoke(Byte.valueOf(b)), valueTransform.invoke(Byte.valueOf(b)));
}
return linkedHashMap;
}
public static final <K, V> Map<K, V> associateBy(short[] sArr, Function1<? super Short, ? extends K> keySelector, Function1<? super Short, ? extends V> valueTransform) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(keySelector, "keySelector");
Intrinsics.checkNotNullParameter(valueTransform, "valueTransform");
LinkedHashMap linkedHashMap = new LinkedHashMap(RangesKt.coerceAtLeast(MapsKt.mapCapacity(sArr.length), 16));
for (short s : sArr) {
linkedHashMap.put(keySelector.invoke(Short.valueOf(s)), valueTransform.invoke(Short.valueOf(s)));
}
return linkedHashMap;
}
public static final <K, V> Map<K, V> associateBy(int[] iArr, Function1<? super Integer, ? extends K> keySelector, Function1<? super Integer, ? extends V> valueTransform) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(keySelector, "keySelector");
Intrinsics.checkNotNullParameter(valueTransform, "valueTransform");
LinkedHashMap linkedHashMap = new LinkedHashMap(RangesKt.coerceAtLeast(MapsKt.mapCapacity(iArr.length), 16));
for (int i : iArr) {
linkedHashMap.put(keySelector.invoke(Integer.valueOf(i)), valueTransform.invoke(Integer.valueOf(i)));
}
return linkedHashMap;
}
public static final <K, V> Map<K, V> associateBy(long[] jArr, Function1<? super Long, ? extends K> keySelector, Function1<? super Long, ? extends V> valueTransform) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(keySelector, "keySelector");
Intrinsics.checkNotNullParameter(valueTransform, "valueTransform");
LinkedHashMap linkedHashMap = new LinkedHashMap(RangesKt.coerceAtLeast(MapsKt.mapCapacity(jArr.length), 16));
for (long j : jArr) {
linkedHashMap.put(keySelector.invoke(Long.valueOf(j)), valueTransform.invoke(Long.valueOf(j)));
}
return linkedHashMap;
}
public static final <K, V> Map<K, V> associateBy(float[] fArr, Function1<? super Float, ? extends K> keySelector, Function1<? super Float, ? extends V> valueTransform) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(keySelector, "keySelector");
Intrinsics.checkNotNullParameter(valueTransform, "valueTransform");
LinkedHashMap linkedHashMap = new LinkedHashMap(RangesKt.coerceAtLeast(MapsKt.mapCapacity(fArr.length), 16));
for (float f : fArr) {
linkedHashMap.put(keySelector.invoke(Float.valueOf(f)), valueTransform.invoke(Float.valueOf(f)));
}
return linkedHashMap;
}
public static final <K, V> Map<K, V> associateBy(double[] dArr, Function1<? super Double, ? extends K> keySelector, Function1<? super Double, ? extends V> valueTransform) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(keySelector, "keySelector");
Intrinsics.checkNotNullParameter(valueTransform, "valueTransform");
LinkedHashMap linkedHashMap = new LinkedHashMap(RangesKt.coerceAtLeast(MapsKt.mapCapacity(dArr.length), 16));
for (double d : dArr) {
linkedHashMap.put(keySelector.invoke(Double.valueOf(d)), valueTransform.invoke(Double.valueOf(d)));
}
return linkedHashMap;
}
public static final <K, V> Map<K, V> associateBy(boolean[] zArr, Function1<? super Boolean, ? extends K> keySelector, Function1<? super Boolean, ? extends V> valueTransform) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(keySelector, "keySelector");
Intrinsics.checkNotNullParameter(valueTransform, "valueTransform");
LinkedHashMap linkedHashMap = new LinkedHashMap(RangesKt.coerceAtLeast(MapsKt.mapCapacity(zArr.length), 16));
for (boolean z : zArr) {
linkedHashMap.put(keySelector.invoke(Boolean.valueOf(z)), valueTransform.invoke(Boolean.valueOf(z)));
}
return linkedHashMap;
}
public static final <K, V> Map<K, V> associateBy(char[] cArr, Function1<? super Character, ? extends K> keySelector, Function1<? super Character, ? extends V> valueTransform) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(keySelector, "keySelector");
Intrinsics.checkNotNullParameter(valueTransform, "valueTransform");
LinkedHashMap linkedHashMap = new LinkedHashMap(RangesKt.coerceAtLeast(MapsKt.mapCapacity(cArr.length), 16));
for (char c : cArr) {
linkedHashMap.put(keySelector.invoke(Character.valueOf(c)), valueTransform.invoke(Character.valueOf(c)));
}
return linkedHashMap;
}
public static final <T, K, M extends Map<? super K, ? super T>> M associateByTo(T[] tArr, M destination, Function1<? super T, ? extends K> keySelector) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(keySelector, "keySelector");
for (T t : tArr) {
destination.put(keySelector.invoke(t), t);
}
return destination;
}
public static final <K, M extends Map<? super K, ? super Byte>> M associateByTo(byte[] bArr, M destination, Function1<? super Byte, ? extends K> keySelector) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(keySelector, "keySelector");
for (byte b : bArr) {
destination.put(keySelector.invoke(Byte.valueOf(b)), Byte.valueOf(b));
}
return destination;
}
public static final <K, M extends Map<? super K, ? super Short>> M associateByTo(short[] sArr, M destination, Function1<? super Short, ? extends K> keySelector) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(keySelector, "keySelector");
for (short s : sArr) {
destination.put(keySelector.invoke(Short.valueOf(s)), Short.valueOf(s));
}
return destination;
}
public static final <K, M extends Map<? super K, ? super Integer>> M associateByTo(int[] iArr, M destination, Function1<? super Integer, ? extends K> keySelector) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(keySelector, "keySelector");
for (int i : iArr) {
destination.put(keySelector.invoke(Integer.valueOf(i)), Integer.valueOf(i));
}
return destination;
}
public static final <K, M extends Map<? super K, ? super Long>> M associateByTo(long[] jArr, M destination, Function1<? super Long, ? extends K> keySelector) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(keySelector, "keySelector");
for (long j : jArr) {
destination.put(keySelector.invoke(Long.valueOf(j)), Long.valueOf(j));
}
return destination;
}
public static final <K, M extends Map<? super K, ? super Float>> M associateByTo(float[] fArr, M destination, Function1<? super Float, ? extends K> keySelector) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(keySelector, "keySelector");
for (float f : fArr) {
destination.put(keySelector.invoke(Float.valueOf(f)), Float.valueOf(f));
}
return destination;
}
public static final <K, M extends Map<? super K, ? super Double>> M associateByTo(double[] dArr, M destination, Function1<? super Double, ? extends K> keySelector) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(keySelector, "keySelector");
for (double d : dArr) {
destination.put(keySelector.invoke(Double.valueOf(d)), Double.valueOf(d));
}
return destination;
}
public static final <K, M extends Map<? super K, ? super Boolean>> M associateByTo(boolean[] zArr, M destination, Function1<? super Boolean, ? extends K> keySelector) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(keySelector, "keySelector");
for (boolean z : zArr) {
destination.put(keySelector.invoke(Boolean.valueOf(z)), Boolean.valueOf(z));
}
return destination;
}
public static final <K, M extends Map<? super K, ? super Character>> M associateByTo(char[] cArr, M destination, Function1<? super Character, ? extends K> keySelector) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(keySelector, "keySelector");
for (char c : cArr) {
destination.put(keySelector.invoke(Character.valueOf(c)), Character.valueOf(c));
}
return destination;
}
public static final <T, K, V, M extends Map<? super K, ? super V>> M associateByTo(T[] tArr, M destination, Function1<? super T, ? extends K> keySelector, Function1<? super T, ? extends V> valueTransform) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(keySelector, "keySelector");
Intrinsics.checkNotNullParameter(valueTransform, "valueTransform");
for (T t : tArr) {
destination.put(keySelector.invoke(t), valueTransform.invoke(t));
}
return destination;
}
public static final <K, V, M extends Map<? super K, ? super V>> M associateByTo(byte[] bArr, M destination, Function1<? super Byte, ? extends K> keySelector, Function1<? super Byte, ? extends V> valueTransform) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(keySelector, "keySelector");
Intrinsics.checkNotNullParameter(valueTransform, "valueTransform");
for (byte b : bArr) {
destination.put(keySelector.invoke(Byte.valueOf(b)), valueTransform.invoke(Byte.valueOf(b)));
}
return destination;
}
public static final <K, V, M extends Map<? super K, ? super V>> M associateByTo(short[] sArr, M destination, Function1<? super Short, ? extends K> keySelector, Function1<? super Short, ? extends V> valueTransform) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(keySelector, "keySelector");
Intrinsics.checkNotNullParameter(valueTransform, "valueTransform");
for (short s : sArr) {
destination.put(keySelector.invoke(Short.valueOf(s)), valueTransform.invoke(Short.valueOf(s)));
}
return destination;
}
public static final <K, V, M extends Map<? super K, ? super V>> M associateByTo(int[] iArr, M destination, Function1<? super Integer, ? extends K> keySelector, Function1<? super Integer, ? extends V> valueTransform) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(keySelector, "keySelector");
Intrinsics.checkNotNullParameter(valueTransform, "valueTransform");
for (int i : iArr) {
destination.put(keySelector.invoke(Integer.valueOf(i)), valueTransform.invoke(Integer.valueOf(i)));
}
return destination;
}
public static final <K, V, M extends Map<? super K, ? super V>> M associateByTo(long[] jArr, M destination, Function1<? super Long, ? extends K> keySelector, Function1<? super Long, ? extends V> valueTransform) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(keySelector, "keySelector");
Intrinsics.checkNotNullParameter(valueTransform, "valueTransform");
for (long j : jArr) {
destination.put(keySelector.invoke(Long.valueOf(j)), valueTransform.invoke(Long.valueOf(j)));
}
return destination;
}
public static final <K, V, M extends Map<? super K, ? super V>> M associateByTo(float[] fArr, M destination, Function1<? super Float, ? extends K> keySelector, Function1<? super Float, ? extends V> valueTransform) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(keySelector, "keySelector");
Intrinsics.checkNotNullParameter(valueTransform, "valueTransform");
for (float f : fArr) {
destination.put(keySelector.invoke(Float.valueOf(f)), valueTransform.invoke(Float.valueOf(f)));
}
return destination;
}
public static final <K, V, M extends Map<? super K, ? super V>> M associateByTo(double[] dArr, M destination, Function1<? super Double, ? extends K> keySelector, Function1<? super Double, ? extends V> valueTransform) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(keySelector, "keySelector");
Intrinsics.checkNotNullParameter(valueTransform, "valueTransform");
for (double d : dArr) {
destination.put(keySelector.invoke(Double.valueOf(d)), valueTransform.invoke(Double.valueOf(d)));
}
return destination;
}
public static final <K, V, M extends Map<? super K, ? super V>> M associateByTo(boolean[] zArr, M destination, Function1<? super Boolean, ? extends K> keySelector, Function1<? super Boolean, ? extends V> valueTransform) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(keySelector, "keySelector");
Intrinsics.checkNotNullParameter(valueTransform, "valueTransform");
for (boolean z : zArr) {
destination.put(keySelector.invoke(Boolean.valueOf(z)), valueTransform.invoke(Boolean.valueOf(z)));
}
return destination;
}
public static final <K, V, M extends Map<? super K, ? super V>> M associateByTo(char[] cArr, M destination, Function1<? super Character, ? extends K> keySelector, Function1<? super Character, ? extends V> valueTransform) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(keySelector, "keySelector");
Intrinsics.checkNotNullParameter(valueTransform, "valueTransform");
for (char c : cArr) {
destination.put(keySelector.invoke(Character.valueOf(c)), valueTransform.invoke(Character.valueOf(c)));
}
return destination;
}
public static final <T, K, V, M extends Map<? super K, ? super V>> M associateTo(T[] tArr, M destination, Function1<? super T, ? extends Pair<? extends K, ? extends V>> transform) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(transform, "transform");
for (T t : tArr) {
Pair<? extends K, ? extends V> invoke = transform.invoke(t);
destination.put(invoke.getFirst(), invoke.getSecond());
}
return destination;
}
public static final <K, V, M extends Map<? super K, ? super V>> M associateTo(byte[] bArr, M destination, Function1<? super Byte, ? extends Pair<? extends K, ? extends V>> transform) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(transform, "transform");
for (byte b : bArr) {
Pair<? extends K, ? extends V> invoke = transform.invoke(Byte.valueOf(b));
destination.put(invoke.getFirst(), invoke.getSecond());
}
return destination;
}
public static final <K, V, M extends Map<? super K, ? super V>> M associateTo(short[] sArr, M destination, Function1<? super Short, ? extends Pair<? extends K, ? extends V>> transform) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(transform, "transform");
for (short s : sArr) {
Pair<? extends K, ? extends V> invoke = transform.invoke(Short.valueOf(s));
destination.put(invoke.getFirst(), invoke.getSecond());
}
return destination;
}
public static final <K, V, M extends Map<? super K, ? super V>> M associateTo(int[] iArr, M destination, Function1<? super Integer, ? extends Pair<? extends K, ? extends V>> transform) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(transform, "transform");
for (int i : iArr) {
Pair<? extends K, ? extends V> invoke = transform.invoke(Integer.valueOf(i));
destination.put(invoke.getFirst(), invoke.getSecond());
}
return destination;
}
public static final <K, V, M extends Map<? super K, ? super V>> M associateTo(long[] jArr, M destination, Function1<? super Long, ? extends Pair<? extends K, ? extends V>> transform) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(transform, "transform");
for (long j : jArr) {
Pair<? extends K, ? extends V> invoke = transform.invoke(Long.valueOf(j));
destination.put(invoke.getFirst(), invoke.getSecond());
}
return destination;
}
public static final <K, V, M extends Map<? super K, ? super V>> M associateTo(float[] fArr, M destination, Function1<? super Float, ? extends Pair<? extends K, ? extends V>> transform) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(transform, "transform");
for (float f : fArr) {
Pair<? extends K, ? extends V> invoke = transform.invoke(Float.valueOf(f));
destination.put(invoke.getFirst(), invoke.getSecond());
}
return destination;
}
public static final <K, V, M extends Map<? super K, ? super V>> M associateTo(double[] dArr, M destination, Function1<? super Double, ? extends Pair<? extends K, ? extends V>> transform) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(transform, "transform");
for (double d : dArr) {
Pair<? extends K, ? extends V> invoke = transform.invoke(Double.valueOf(d));
destination.put(invoke.getFirst(), invoke.getSecond());
}
return destination;
}
public static final <K, V, M extends Map<? super K, ? super V>> M associateTo(boolean[] zArr, M destination, Function1<? super Boolean, ? extends Pair<? extends K, ? extends V>> transform) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(transform, "transform");
for (boolean z : zArr) {
Pair<? extends K, ? extends V> invoke = transform.invoke(Boolean.valueOf(z));
destination.put(invoke.getFirst(), invoke.getSecond());
}
return destination;
}
public static final <K, V, M extends Map<? super K, ? super V>> M associateTo(char[] cArr, M destination, Function1<? super Character, ? extends Pair<? extends K, ? extends V>> transform) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(transform, "transform");
for (char c : cArr) {
Pair<? extends K, ? extends V> invoke = transform.invoke(Character.valueOf(c));
destination.put(invoke.getFirst(), invoke.getSecond());
}
return destination;
}
public static final <K, V> Map<K, V> associateWith(K[] kArr, Function1<? super K, ? extends V> valueSelector) {
Intrinsics.checkNotNullParameter(kArr, "<this>");
Intrinsics.checkNotNullParameter(valueSelector, "valueSelector");
LinkedHashMap linkedHashMap = new LinkedHashMap(RangesKt.coerceAtLeast(MapsKt.mapCapacity(kArr.length), 16));
for (K k : kArr) {
linkedHashMap.put(k, valueSelector.invoke(k));
}
return linkedHashMap;
}
private static final <V> Map<Byte, V> associateWith(byte[] bArr, Function1<? super Byte, ? extends V> valueSelector) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(valueSelector, "valueSelector");
LinkedHashMap linkedHashMap = new LinkedHashMap(RangesKt.coerceAtLeast(MapsKt.mapCapacity(bArr.length), 16));
for (byte b : bArr) {
linkedHashMap.put(Byte.valueOf(b), valueSelector.invoke(Byte.valueOf(b)));
}
return linkedHashMap;
}
private static final <V> Map<Short, V> associateWith(short[] sArr, Function1<? super Short, ? extends V> valueSelector) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(valueSelector, "valueSelector");
LinkedHashMap linkedHashMap = new LinkedHashMap(RangesKt.coerceAtLeast(MapsKt.mapCapacity(sArr.length), 16));
for (short s : sArr) {
linkedHashMap.put(Short.valueOf(s), valueSelector.invoke(Short.valueOf(s)));
}
return linkedHashMap;
}
private static final <V> Map<Integer, V> associateWith(int[] iArr, Function1<? super Integer, ? extends V> valueSelector) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(valueSelector, "valueSelector");
LinkedHashMap linkedHashMap = new LinkedHashMap(RangesKt.coerceAtLeast(MapsKt.mapCapacity(iArr.length), 16));
for (int i : iArr) {
linkedHashMap.put(Integer.valueOf(i), valueSelector.invoke(Integer.valueOf(i)));
}
return linkedHashMap;
}
private static final <V> Map<Long, V> associateWith(long[] jArr, Function1<? super Long, ? extends V> valueSelector) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(valueSelector, "valueSelector");
LinkedHashMap linkedHashMap = new LinkedHashMap(RangesKt.coerceAtLeast(MapsKt.mapCapacity(jArr.length), 16));
for (long j : jArr) {
linkedHashMap.put(Long.valueOf(j), valueSelector.invoke(Long.valueOf(j)));
}
return linkedHashMap;
}
private static final <V> Map<Float, V> associateWith(float[] fArr, Function1<? super Float, ? extends V> valueSelector) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(valueSelector, "valueSelector");
LinkedHashMap linkedHashMap = new LinkedHashMap(RangesKt.coerceAtLeast(MapsKt.mapCapacity(fArr.length), 16));
for (float f : fArr) {
linkedHashMap.put(Float.valueOf(f), valueSelector.invoke(Float.valueOf(f)));
}
return linkedHashMap;
}
private static final <V> Map<Double, V> associateWith(double[] dArr, Function1<? super Double, ? extends V> valueSelector) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(valueSelector, "valueSelector");
LinkedHashMap linkedHashMap = new LinkedHashMap(RangesKt.coerceAtLeast(MapsKt.mapCapacity(dArr.length), 16));
for (double d : dArr) {
linkedHashMap.put(Double.valueOf(d), valueSelector.invoke(Double.valueOf(d)));
}
return linkedHashMap;
}
private static final <V> Map<Boolean, V> associateWith(boolean[] zArr, Function1<? super Boolean, ? extends V> valueSelector) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(valueSelector, "valueSelector");
LinkedHashMap linkedHashMap = new LinkedHashMap(RangesKt.coerceAtLeast(MapsKt.mapCapacity(zArr.length), 16));
for (boolean z : zArr) {
linkedHashMap.put(Boolean.valueOf(z), valueSelector.invoke(Boolean.valueOf(z)));
}
return linkedHashMap;
}
private static final <V> Map<Character, V> associateWith(char[] cArr, Function1<? super Character, ? extends V> valueSelector) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(valueSelector, "valueSelector");
LinkedHashMap linkedHashMap = new LinkedHashMap(RangesKt.coerceAtLeast(MapsKt.mapCapacity(RangesKt.coerceAtMost(cArr.length, 128)), 16));
for (char c : cArr) {
linkedHashMap.put(Character.valueOf(c), valueSelector.invoke(Character.valueOf(c)));
}
return linkedHashMap;
}
public static final <K, V, M extends Map<? super K, ? super V>> M associateWithTo(K[] kArr, M destination, Function1<? super K, ? extends V> valueSelector) {
Intrinsics.checkNotNullParameter(kArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(valueSelector, "valueSelector");
for (K k : kArr) {
destination.put(k, valueSelector.invoke(k));
}
return destination;
}
private static final <V, M extends Map<? super Byte, ? super V>> M associateWithTo(byte[] bArr, M destination, Function1<? super Byte, ? extends V> valueSelector) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(valueSelector, "valueSelector");
for (byte b : bArr) {
destination.put(Byte.valueOf(b), valueSelector.invoke(Byte.valueOf(b)));
}
return destination;
}
private static final <V, M extends Map<? super Short, ? super V>> M associateWithTo(short[] sArr, M destination, Function1<? super Short, ? extends V> valueSelector) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(valueSelector, "valueSelector");
for (short s : sArr) {
destination.put(Short.valueOf(s), valueSelector.invoke(Short.valueOf(s)));
}
return destination;
}
private static final <V, M extends Map<? super Integer, ? super V>> M associateWithTo(int[] iArr, M destination, Function1<? super Integer, ? extends V> valueSelector) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(valueSelector, "valueSelector");
for (int i : iArr) {
destination.put(Integer.valueOf(i), valueSelector.invoke(Integer.valueOf(i)));
}
return destination;
}
private static final <V, M extends Map<? super Long, ? super V>> M associateWithTo(long[] jArr, M destination, Function1<? super Long, ? extends V> valueSelector) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(valueSelector, "valueSelector");
for (long j : jArr) {
destination.put(Long.valueOf(j), valueSelector.invoke(Long.valueOf(j)));
}
return destination;
}
private static final <V, M extends Map<? super Float, ? super V>> M associateWithTo(float[] fArr, M destination, Function1<? super Float, ? extends V> valueSelector) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(valueSelector, "valueSelector");
for (float f : fArr) {
destination.put(Float.valueOf(f), valueSelector.invoke(Float.valueOf(f)));
}
return destination;
}
private static final <V, M extends Map<? super Double, ? super V>> M associateWithTo(double[] dArr, M destination, Function1<? super Double, ? extends V> valueSelector) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(valueSelector, "valueSelector");
for (double d : dArr) {
destination.put(Double.valueOf(d), valueSelector.invoke(Double.valueOf(d)));
}
return destination;
}
private static final <V, M extends Map<? super Boolean, ? super V>> M associateWithTo(boolean[] zArr, M destination, Function1<? super Boolean, ? extends V> valueSelector) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(valueSelector, "valueSelector");
for (boolean z : zArr) {
destination.put(Boolean.valueOf(z), valueSelector.invoke(Boolean.valueOf(z)));
}
return destination;
}
private static final <V, M extends Map<? super Character, ? super V>> M associateWithTo(char[] cArr, M destination, Function1<? super Character, ? extends V> valueSelector) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(valueSelector, "valueSelector");
for (char c : cArr) {
destination.put(Character.valueOf(c), valueSelector.invoke(Character.valueOf(c)));
}
return destination;
}
public static final <T, C extends Collection<? super T>> C toCollection(T[] tArr, C destination) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
for (T t : tArr) {
destination.add(t);
}
return destination;
}
public static final <C extends Collection<? super Byte>> C toCollection(byte[] bArr, C destination) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
for (byte b : bArr) {
destination.add(Byte.valueOf(b));
}
return destination;
}
public static final <C extends Collection<? super Short>> C toCollection(short[] sArr, C destination) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
for (short s : sArr) {
destination.add(Short.valueOf(s));
}
return destination;
}
public static final <C extends Collection<? super Integer>> C toCollection(int[] iArr, C destination) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
for (int i : iArr) {
destination.add(Integer.valueOf(i));
}
return destination;
}
public static final <C extends Collection<? super Long>> C toCollection(long[] jArr, C destination) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
for (long j : jArr) {
destination.add(Long.valueOf(j));
}
return destination;
}
public static final <C extends Collection<? super Float>> C toCollection(float[] fArr, C destination) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
for (float f : fArr) {
destination.add(Float.valueOf(f));
}
return destination;
}
public static final <C extends Collection<? super Double>> C toCollection(double[] dArr, C destination) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
for (double d : dArr) {
destination.add(Double.valueOf(d));
}
return destination;
}
public static final <C extends Collection<? super Boolean>> C toCollection(boolean[] zArr, C destination) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
for (boolean z : zArr) {
destination.add(Boolean.valueOf(z));
}
return destination;
}
public static final <C extends Collection<? super Character>> C toCollection(char[] cArr, C destination) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
for (char c : cArr) {
destination.add(Character.valueOf(c));
}
return destination;
}
public static final <T> HashSet<T> toHashSet(T[] tArr) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
return (HashSet) ArraysKt.toCollection(tArr, new HashSet(MapsKt.mapCapacity(tArr.length)));
}
public static final HashSet<Byte> toHashSet(byte[] bArr) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
return (HashSet) ArraysKt.toCollection(bArr, new HashSet(MapsKt.mapCapacity(bArr.length)));
}
public static final HashSet<Short> toHashSet(short[] sArr) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
return (HashSet) ArraysKt.toCollection(sArr, new HashSet(MapsKt.mapCapacity(sArr.length)));
}
public static final HashSet<Integer> toHashSet(int[] iArr) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
return (HashSet) ArraysKt.toCollection(iArr, new HashSet(MapsKt.mapCapacity(iArr.length)));
}
public static final HashSet<Long> toHashSet(long[] jArr) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
return (HashSet) ArraysKt.toCollection(jArr, new HashSet(MapsKt.mapCapacity(jArr.length)));
}
public static final HashSet<Float> toHashSet(float[] fArr) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
return (HashSet) ArraysKt.toCollection(fArr, new HashSet(MapsKt.mapCapacity(fArr.length)));
}
public static final HashSet<Double> toHashSet(double[] dArr) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
return (HashSet) ArraysKt.toCollection(dArr, new HashSet(MapsKt.mapCapacity(dArr.length)));
}
public static final HashSet<Boolean> toHashSet(boolean[] zArr) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
return (HashSet) ArraysKt.toCollection(zArr, new HashSet(MapsKt.mapCapacity(zArr.length)));
}
public static final HashSet<Character> toHashSet(char[] cArr) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
return (HashSet) ArraysKt.toCollection(cArr, new HashSet(MapsKt.mapCapacity(RangesKt.coerceAtMost(cArr.length, 128))));
}
public static final <T> List<T> toList(T[] tArr) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
int length = tArr.length;
if (length == 0) {
return CollectionsKt.emptyList();
}
if (length == 1) {
return CollectionsKt.listOf(tArr[0]);
}
return ArraysKt.toMutableList(tArr);
}
public static final List<Byte> toList(byte[] bArr) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
int length = bArr.length;
if (length == 0) {
return CollectionsKt.emptyList();
}
if (length == 1) {
return CollectionsKt.listOf(Byte.valueOf(bArr[0]));
}
return ArraysKt.toMutableList(bArr);
}
public static final List<Short> toList(short[] sArr) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
int length = sArr.length;
if (length == 0) {
return CollectionsKt.emptyList();
}
if (length == 1) {
return CollectionsKt.listOf(Short.valueOf(sArr[0]));
}
return ArraysKt.toMutableList(sArr);
}
public static final List<Integer> toList(int[] iArr) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
int length = iArr.length;
if (length == 0) {
return CollectionsKt.emptyList();
}
if (length == 1) {
return CollectionsKt.listOf(Integer.valueOf(iArr[0]));
}
return ArraysKt.toMutableList(iArr);
}
public static final List<Long> toList(long[] jArr) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
int length = jArr.length;
if (length == 0) {
return CollectionsKt.emptyList();
}
if (length == 1) {
return CollectionsKt.listOf(Long.valueOf(jArr[0]));
}
return ArraysKt.toMutableList(jArr);
}
public static final List<Float> toList(float[] fArr) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
int length = fArr.length;
if (length == 0) {
return CollectionsKt.emptyList();
}
if (length == 1) {
return CollectionsKt.listOf(Float.valueOf(fArr[0]));
}
return ArraysKt.toMutableList(fArr);
}
public static final List<Double> toList(double[] dArr) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
int length = dArr.length;
if (length == 0) {
return CollectionsKt.emptyList();
}
if (length == 1) {
return CollectionsKt.listOf(Double.valueOf(dArr[0]));
}
return ArraysKt.toMutableList(dArr);
}
public static final List<Boolean> toList(boolean[] zArr) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
int length = zArr.length;
if (length == 0) {
return CollectionsKt.emptyList();
}
if (length == 1) {
return CollectionsKt.listOf(Boolean.valueOf(zArr[0]));
}
return ArraysKt.toMutableList(zArr);
}
public static final List<Character> toList(char[] cArr) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
int length = cArr.length;
if (length == 0) {
return CollectionsKt.emptyList();
}
if (length == 1) {
return CollectionsKt.listOf(Character.valueOf(cArr[0]));
}
return ArraysKt.toMutableList(cArr);
}
public static final <T> List<T> toMutableList(T[] tArr) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
return new ArrayList(CollectionsKt.asCollection(tArr));
}
public static final List<Byte> toMutableList(byte[] bArr) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
ArrayList arrayList = new ArrayList(bArr.length);
for (byte b : bArr) {
arrayList.add(Byte.valueOf(b));
}
return arrayList;
}
public static final List<Short> toMutableList(short[] sArr) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
ArrayList arrayList = new ArrayList(sArr.length);
for (short s : sArr) {
arrayList.add(Short.valueOf(s));
}
return arrayList;
}
public static final List<Integer> toMutableList(int[] iArr) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
ArrayList arrayList = new ArrayList(iArr.length);
for (int i : iArr) {
arrayList.add(Integer.valueOf(i));
}
return arrayList;
}
public static final List<Long> toMutableList(long[] jArr) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
ArrayList arrayList = new ArrayList(jArr.length);
for (long j : jArr) {
arrayList.add(Long.valueOf(j));
}
return arrayList;
}
public static final List<Float> toMutableList(float[] fArr) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
ArrayList arrayList = new ArrayList(fArr.length);
for (float f : fArr) {
arrayList.add(Float.valueOf(f));
}
return arrayList;
}
public static final List<Double> toMutableList(double[] dArr) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
ArrayList arrayList = new ArrayList(dArr.length);
for (double d : dArr) {
arrayList.add(Double.valueOf(d));
}
return arrayList;
}
public static final List<Boolean> toMutableList(boolean[] zArr) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
ArrayList arrayList = new ArrayList(zArr.length);
for (boolean z : zArr) {
arrayList.add(Boolean.valueOf(z));
}
return arrayList;
}
public static final List<Character> toMutableList(char[] cArr) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
ArrayList arrayList = new ArrayList(cArr.length);
for (char c : cArr) {
arrayList.add(Character.valueOf(c));
}
return arrayList;
}
public static final <T> Set<T> toSet(T[] tArr) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
int length = tArr.length;
if (length == 0) {
return SetsKt.emptySet();
}
if (length == 1) {
return SetsKt.setOf(tArr[0]);
}
return (Set) ArraysKt.toCollection(tArr, new LinkedHashSet(MapsKt.mapCapacity(tArr.length)));
}
public static final Set<Byte> toSet(byte[] bArr) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
int length = bArr.length;
if (length == 0) {
return SetsKt.emptySet();
}
if (length == 1) {
return SetsKt.setOf(Byte.valueOf(bArr[0]));
}
return (Set) ArraysKt.toCollection(bArr, new LinkedHashSet(MapsKt.mapCapacity(bArr.length)));
}
public static final Set<Short> toSet(short[] sArr) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
int length = sArr.length;
if (length == 0) {
return SetsKt.emptySet();
}
if (length == 1) {
return SetsKt.setOf(Short.valueOf(sArr[0]));
}
return (Set) ArraysKt.toCollection(sArr, new LinkedHashSet(MapsKt.mapCapacity(sArr.length)));
}
public static final Set<Integer> toSet(int[] iArr) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
int length = iArr.length;
if (length == 0) {
return SetsKt.emptySet();
}
if (length == 1) {
return SetsKt.setOf(Integer.valueOf(iArr[0]));
}
return (Set) ArraysKt.toCollection(iArr, new LinkedHashSet(MapsKt.mapCapacity(iArr.length)));
}
public static final Set<Long> toSet(long[] jArr) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
int length = jArr.length;
if (length == 0) {
return SetsKt.emptySet();
}
if (length == 1) {
return SetsKt.setOf(Long.valueOf(jArr[0]));
}
return (Set) ArraysKt.toCollection(jArr, new LinkedHashSet(MapsKt.mapCapacity(jArr.length)));
}
public static final Set<Float> toSet(float[] fArr) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
int length = fArr.length;
if (length == 0) {
return SetsKt.emptySet();
}
if (length == 1) {
return SetsKt.setOf(Float.valueOf(fArr[0]));
}
return (Set) ArraysKt.toCollection(fArr, new LinkedHashSet(MapsKt.mapCapacity(fArr.length)));
}
public static final Set<Double> toSet(double[] dArr) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
int length = dArr.length;
if (length == 0) {
return SetsKt.emptySet();
}
if (length == 1) {
return SetsKt.setOf(Double.valueOf(dArr[0]));
}
return (Set) ArraysKt.toCollection(dArr, new LinkedHashSet(MapsKt.mapCapacity(dArr.length)));
}
public static final Set<Boolean> toSet(boolean[] zArr) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
int length = zArr.length;
if (length == 0) {
return SetsKt.emptySet();
}
if (length == 1) {
return SetsKt.setOf(Boolean.valueOf(zArr[0]));
}
return (Set) ArraysKt.toCollection(zArr, new LinkedHashSet(MapsKt.mapCapacity(zArr.length)));
}
public static final Set<Character> toSet(char[] cArr) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
int length = cArr.length;
if (length == 0) {
return SetsKt.emptySet();
}
if (length == 1) {
return SetsKt.setOf(Character.valueOf(cArr[0]));
}
return (Set) ArraysKt.toCollection(cArr, new LinkedHashSet(MapsKt.mapCapacity(RangesKt.coerceAtMost(cArr.length, 128))));
}
public static final <T, R> List<R> flatMap(T[] tArr, Function1<? super T, ? extends Iterable<? extends R>> transform) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(transform, "transform");
ArrayList arrayList = new ArrayList();
for (T t : tArr) {
CollectionsKt.addAll(arrayList, transform.invoke(t));
}
return arrayList;
}
public static final <R> List<R> flatMap(byte[] bArr, Function1<? super Byte, ? extends Iterable<? extends R>> transform) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(transform, "transform");
ArrayList arrayList = new ArrayList();
for (byte b : bArr) {
CollectionsKt.addAll(arrayList, transform.invoke(Byte.valueOf(b)));
}
return arrayList;
}
public static final <R> List<R> flatMap(short[] sArr, Function1<? super Short, ? extends Iterable<? extends R>> transform) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(transform, "transform");
ArrayList arrayList = new ArrayList();
for (short s : sArr) {
CollectionsKt.addAll(arrayList, transform.invoke(Short.valueOf(s)));
}
return arrayList;
}
public static final <R> List<R> flatMap(int[] iArr, Function1<? super Integer, ? extends Iterable<? extends R>> transform) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(transform, "transform");
ArrayList arrayList = new ArrayList();
for (int i : iArr) {
CollectionsKt.addAll(arrayList, transform.invoke(Integer.valueOf(i)));
}
return arrayList;
}
public static final <R> List<R> flatMap(long[] jArr, Function1<? super Long, ? extends Iterable<? extends R>> transform) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(transform, "transform");
ArrayList arrayList = new ArrayList();
for (long j : jArr) {
CollectionsKt.addAll(arrayList, transform.invoke(Long.valueOf(j)));
}
return arrayList;
}
public static final <R> List<R> flatMap(float[] fArr, Function1<? super Float, ? extends Iterable<? extends R>> transform) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(transform, "transform");
ArrayList arrayList = new ArrayList();
for (float f : fArr) {
CollectionsKt.addAll(arrayList, transform.invoke(Float.valueOf(f)));
}
return arrayList;
}
public static final <R> List<R> flatMap(double[] dArr, Function1<? super Double, ? extends Iterable<? extends R>> transform) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(transform, "transform");
ArrayList arrayList = new ArrayList();
for (double d : dArr) {
CollectionsKt.addAll(arrayList, transform.invoke(Double.valueOf(d)));
}
return arrayList;
}
public static final <R> List<R> flatMap(boolean[] zArr, Function1<? super Boolean, ? extends Iterable<? extends R>> transform) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(transform, "transform");
ArrayList arrayList = new ArrayList();
for (boolean z : zArr) {
CollectionsKt.addAll(arrayList, transform.invoke(Boolean.valueOf(z)));
}
return arrayList;
}
public static final <R> List<R> flatMap(char[] cArr, Function1<? super Character, ? extends Iterable<? extends R>> transform) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(transform, "transform");
ArrayList arrayList = new ArrayList();
for (char c : cArr) {
CollectionsKt.addAll(arrayList, transform.invoke(Character.valueOf(c)));
}
return arrayList;
}
public static final <T, R> List<R> flatMapSequence(T[] tArr, Function1<? super T, ? extends Sequence<? extends R>> transform) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(transform, "transform");
ArrayList arrayList = new ArrayList();
for (T t : tArr) {
CollectionsKt.addAll(arrayList, transform.invoke(t));
}
return arrayList;
}
private static final <T, R> List<R> flatMapIndexedIterable(T[] tArr, Function2<? super Integer, ? super T, ? extends Iterable<? extends R>> transform) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(transform, "transform");
ArrayList arrayList = new ArrayList();
int length = tArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
CollectionsKt.addAll(arrayList, transform.invoke(Integer.valueOf(i2), tArr[i]));
i++;
i2++;
}
return arrayList;
}
private static final <R> List<R> flatMapIndexedIterable(byte[] bArr, Function2<? super Integer, ? super Byte, ? extends Iterable<? extends R>> transform) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(transform, "transform");
ArrayList arrayList = new ArrayList();
int length = bArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
CollectionsKt.addAll(arrayList, transform.invoke(Integer.valueOf(i2), Byte.valueOf(bArr[i])));
i++;
i2++;
}
return arrayList;
}
private static final <R> List<R> flatMapIndexedIterable(short[] sArr, Function2<? super Integer, ? super Short, ? extends Iterable<? extends R>> transform) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(transform, "transform");
ArrayList arrayList = new ArrayList();
int length = sArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
CollectionsKt.addAll(arrayList, transform.invoke(Integer.valueOf(i2), Short.valueOf(sArr[i])));
i++;
i2++;
}
return arrayList;
}
private static final <R> List<R> flatMapIndexedIterable(int[] iArr, Function2<? super Integer, ? super Integer, ? extends Iterable<? extends R>> transform) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(transform, "transform");
ArrayList arrayList = new ArrayList();
int length = iArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
CollectionsKt.addAll(arrayList, transform.invoke(Integer.valueOf(i2), Integer.valueOf(iArr[i])));
i++;
i2++;
}
return arrayList;
}
private static final <R> List<R> flatMapIndexedIterable(long[] jArr, Function2<? super Integer, ? super Long, ? extends Iterable<? extends R>> transform) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(transform, "transform");
ArrayList arrayList = new ArrayList();
int length = jArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
CollectionsKt.addAll(arrayList, transform.invoke(Integer.valueOf(i2), Long.valueOf(jArr[i])));
i++;
i2++;
}
return arrayList;
}
private static final <R> List<R> flatMapIndexedIterable(float[] fArr, Function2<? super Integer, ? super Float, ? extends Iterable<? extends R>> transform) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(transform, "transform");
ArrayList arrayList = new ArrayList();
int length = fArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
CollectionsKt.addAll(arrayList, transform.invoke(Integer.valueOf(i2), Float.valueOf(fArr[i])));
i++;
i2++;
}
return arrayList;
}
private static final <R> List<R> flatMapIndexedIterable(double[] dArr, Function2<? super Integer, ? super Double, ? extends Iterable<? extends R>> transform) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(transform, "transform");
ArrayList arrayList = new ArrayList();
int length = dArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
CollectionsKt.addAll(arrayList, transform.invoke(Integer.valueOf(i2), Double.valueOf(dArr[i])));
i++;
i2++;
}
return arrayList;
}
private static final <R> List<R> flatMapIndexedIterable(boolean[] zArr, Function2<? super Integer, ? super Boolean, ? extends Iterable<? extends R>> transform) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(transform, "transform");
ArrayList arrayList = new ArrayList();
int length = zArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
CollectionsKt.addAll(arrayList, transform.invoke(Integer.valueOf(i2), Boolean.valueOf(zArr[i])));
i++;
i2++;
}
return arrayList;
}
private static final <R> List<R> flatMapIndexedIterable(char[] cArr, Function2<? super Integer, ? super Character, ? extends Iterable<? extends R>> transform) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(transform, "transform");
ArrayList arrayList = new ArrayList();
int length = cArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
CollectionsKt.addAll(arrayList, transform.invoke(Integer.valueOf(i2), Character.valueOf(cArr[i])));
i++;
i2++;
}
return arrayList;
}
private static final <T, R> List<R> flatMapIndexedSequence(T[] tArr, Function2<? super Integer, ? super T, ? extends Sequence<? extends R>> transform) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(transform, "transform");
ArrayList arrayList = new ArrayList();
int length = tArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
CollectionsKt.addAll(arrayList, transform.invoke(Integer.valueOf(i2), tArr[i]));
i++;
i2++;
}
return arrayList;
}
private static final <T, R, C extends Collection<? super R>> C flatMapIndexedIterableTo(T[] tArr, C destination, Function2<? super Integer, ? super T, ? extends Iterable<? extends R>> transform) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(transform, "transform");
int length = tArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
CollectionsKt.addAll(destination, transform.invoke(Integer.valueOf(i2), tArr[i]));
i++;
i2++;
}
return destination;
}
private static final <R, C extends Collection<? super R>> C flatMapIndexedIterableTo(byte[] bArr, C destination, Function2<? super Integer, ? super Byte, ? extends Iterable<? extends R>> transform) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(transform, "transform");
int length = bArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
CollectionsKt.addAll(destination, transform.invoke(Integer.valueOf(i2), Byte.valueOf(bArr[i])));
i++;
i2++;
}
return destination;
}
private static final <R, C extends Collection<? super R>> C flatMapIndexedIterableTo(short[] sArr, C destination, Function2<? super Integer, ? super Short, ? extends Iterable<? extends R>> transform) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(transform, "transform");
int length = sArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
CollectionsKt.addAll(destination, transform.invoke(Integer.valueOf(i2), Short.valueOf(sArr[i])));
i++;
i2++;
}
return destination;
}
private static final <R, C extends Collection<? super R>> C flatMapIndexedIterableTo(int[] iArr, C destination, Function2<? super Integer, ? super Integer, ? extends Iterable<? extends R>> transform) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(transform, "transform");
int length = iArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
CollectionsKt.addAll(destination, transform.invoke(Integer.valueOf(i2), Integer.valueOf(iArr[i])));
i++;
i2++;
}
return destination;
}
private static final <R, C extends Collection<? super R>> C flatMapIndexedIterableTo(long[] jArr, C destination, Function2<? super Integer, ? super Long, ? extends Iterable<? extends R>> transform) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(transform, "transform");
int length = jArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
CollectionsKt.addAll(destination, transform.invoke(Integer.valueOf(i2), Long.valueOf(jArr[i])));
i++;
i2++;
}
return destination;
}
private static final <R, C extends Collection<? super R>> C flatMapIndexedIterableTo(float[] fArr, C destination, Function2<? super Integer, ? super Float, ? extends Iterable<? extends R>> transform) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(transform, "transform");
int length = fArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
CollectionsKt.addAll(destination, transform.invoke(Integer.valueOf(i2), Float.valueOf(fArr[i])));
i++;
i2++;
}
return destination;
}
private static final <R, C extends Collection<? super R>> C flatMapIndexedIterableTo(double[] dArr, C destination, Function2<? super Integer, ? super Double, ? extends Iterable<? extends R>> transform) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(transform, "transform");
int length = dArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
CollectionsKt.addAll(destination, transform.invoke(Integer.valueOf(i2), Double.valueOf(dArr[i])));
i++;
i2++;
}
return destination;
}
private static final <R, C extends Collection<? super R>> C flatMapIndexedIterableTo(boolean[] zArr, C destination, Function2<? super Integer, ? super Boolean, ? extends Iterable<? extends R>> transform) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(transform, "transform");
int length = zArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
CollectionsKt.addAll(destination, transform.invoke(Integer.valueOf(i2), Boolean.valueOf(zArr[i])));
i++;
i2++;
}
return destination;
}
private static final <R, C extends Collection<? super R>> C flatMapIndexedIterableTo(char[] cArr, C destination, Function2<? super Integer, ? super Character, ? extends Iterable<? extends R>> transform) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(transform, "transform");
int length = cArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
CollectionsKt.addAll(destination, transform.invoke(Integer.valueOf(i2), Character.valueOf(cArr[i])));
i++;
i2++;
}
return destination;
}
private static final <T, R, C extends Collection<? super R>> C flatMapIndexedSequenceTo(T[] tArr, C destination, Function2<? super Integer, ? super T, ? extends Sequence<? extends R>> transform) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(transform, "transform");
int length = tArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
CollectionsKt.addAll(destination, transform.invoke(Integer.valueOf(i2), tArr[i]));
i++;
i2++;
}
return destination;
}
public static final <T, R, C extends Collection<? super R>> C flatMapTo(T[] tArr, C destination, Function1<? super T, ? extends Iterable<? extends R>> transform) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(transform, "transform");
for (T t : tArr) {
CollectionsKt.addAll(destination, transform.invoke(t));
}
return destination;
}
public static final <R, C extends Collection<? super R>> C flatMapTo(byte[] bArr, C destination, Function1<? super Byte, ? extends Iterable<? extends R>> transform) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(transform, "transform");
for (byte b : bArr) {
CollectionsKt.addAll(destination, transform.invoke(Byte.valueOf(b)));
}
return destination;
}
public static final <R, C extends Collection<? super R>> C flatMapTo(short[] sArr, C destination, Function1<? super Short, ? extends Iterable<? extends R>> transform) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(transform, "transform");
for (short s : sArr) {
CollectionsKt.addAll(destination, transform.invoke(Short.valueOf(s)));
}
return destination;
}
public static final <R, C extends Collection<? super R>> C flatMapTo(int[] iArr, C destination, Function1<? super Integer, ? extends Iterable<? extends R>> transform) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(transform, "transform");
for (int i : iArr) {
CollectionsKt.addAll(destination, transform.invoke(Integer.valueOf(i)));
}
return destination;
}
public static final <R, C extends Collection<? super R>> C flatMapTo(long[] jArr, C destination, Function1<? super Long, ? extends Iterable<? extends R>> transform) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(transform, "transform");
for (long j : jArr) {
CollectionsKt.addAll(destination, transform.invoke(Long.valueOf(j)));
}
return destination;
}
public static final <R, C extends Collection<? super R>> C flatMapTo(float[] fArr, C destination, Function1<? super Float, ? extends Iterable<? extends R>> transform) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(transform, "transform");
for (float f : fArr) {
CollectionsKt.addAll(destination, transform.invoke(Float.valueOf(f)));
}
return destination;
}
public static final <R, C extends Collection<? super R>> C flatMapTo(double[] dArr, C destination, Function1<? super Double, ? extends Iterable<? extends R>> transform) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(transform, "transform");
for (double d : dArr) {
CollectionsKt.addAll(destination, transform.invoke(Double.valueOf(d)));
}
return destination;
}
public static final <R, C extends Collection<? super R>> C flatMapTo(boolean[] zArr, C destination, Function1<? super Boolean, ? extends Iterable<? extends R>> transform) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(transform, "transform");
for (boolean z : zArr) {
CollectionsKt.addAll(destination, transform.invoke(Boolean.valueOf(z)));
}
return destination;
}
public static final <R, C extends Collection<? super R>> C flatMapTo(char[] cArr, C destination, Function1<? super Character, ? extends Iterable<? extends R>> transform) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(transform, "transform");
for (char c : cArr) {
CollectionsKt.addAll(destination, transform.invoke(Character.valueOf(c)));
}
return destination;
}
public static final <T, R, C extends Collection<? super R>> C flatMapSequenceTo(T[] tArr, C destination, Function1<? super T, ? extends Sequence<? extends R>> transform) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(transform, "transform");
for (T t : tArr) {
CollectionsKt.addAll(destination, transform.invoke(t));
}
return destination;
}
public static final <T, K> Map<K, List<T>> groupBy(T[] tArr, Function1<? super T, ? extends K> keySelector) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(keySelector, "keySelector");
LinkedHashMap linkedHashMap = new LinkedHashMap();
for (T t : tArr) {
K invoke = keySelector.invoke(t);
Object obj = linkedHashMap.get(invoke);
if (obj == null) {
obj = (List) new ArrayList();
linkedHashMap.put(invoke, obj);
}
((List) obj).add(t);
}
return linkedHashMap;
}
public static final <K> Map<K, List<Byte>> groupBy(byte[] bArr, Function1<? super Byte, ? extends K> keySelector) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(keySelector, "keySelector");
LinkedHashMap linkedHashMap = new LinkedHashMap();
for (byte b : bArr) {
K invoke = keySelector.invoke(Byte.valueOf(b));
Object obj = linkedHashMap.get(invoke);
if (obj == null) {
obj = (List) new ArrayList();
linkedHashMap.put(invoke, obj);
}
((List) obj).add(Byte.valueOf(b));
}
return linkedHashMap;
}
public static final <K> Map<K, List<Short>> groupBy(short[] sArr, Function1<? super Short, ? extends K> keySelector) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(keySelector, "keySelector");
LinkedHashMap linkedHashMap = new LinkedHashMap();
for (short s : sArr) {
K invoke = keySelector.invoke(Short.valueOf(s));
Object obj = linkedHashMap.get(invoke);
if (obj == null) {
obj = (List) new ArrayList();
linkedHashMap.put(invoke, obj);
}
((List) obj).add(Short.valueOf(s));
}
return linkedHashMap;
}
public static final <K> Map<K, List<Integer>> groupBy(int[] iArr, Function1<? super Integer, ? extends K> keySelector) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(keySelector, "keySelector");
LinkedHashMap linkedHashMap = new LinkedHashMap();
for (int i : iArr) {
K invoke = keySelector.invoke(Integer.valueOf(i));
Object obj = linkedHashMap.get(invoke);
if (obj == null) {
obj = (List) new ArrayList();
linkedHashMap.put(invoke, obj);
}
((List) obj).add(Integer.valueOf(i));
}
return linkedHashMap;
}
public static final <K> Map<K, List<Long>> groupBy(long[] jArr, Function1<? super Long, ? extends K> keySelector) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(keySelector, "keySelector");
LinkedHashMap linkedHashMap = new LinkedHashMap();
for (long j : jArr) {
K invoke = keySelector.invoke(Long.valueOf(j));
Object obj = linkedHashMap.get(invoke);
if (obj == null) {
obj = (List) new ArrayList();
linkedHashMap.put(invoke, obj);
}
((List) obj).add(Long.valueOf(j));
}
return linkedHashMap;
}
public static final <K> Map<K, List<Float>> groupBy(float[] fArr, Function1<? super Float, ? extends K> keySelector) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(keySelector, "keySelector");
LinkedHashMap linkedHashMap = new LinkedHashMap();
for (float f : fArr) {
K invoke = keySelector.invoke(Float.valueOf(f));
Object obj = linkedHashMap.get(invoke);
if (obj == null) {
obj = (List) new ArrayList();
linkedHashMap.put(invoke, obj);
}
((List) obj).add(Float.valueOf(f));
}
return linkedHashMap;
}
public static final <K> Map<K, List<Double>> groupBy(double[] dArr, Function1<? super Double, ? extends K> keySelector) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(keySelector, "keySelector");
LinkedHashMap linkedHashMap = new LinkedHashMap();
for (double d : dArr) {
K invoke = keySelector.invoke(Double.valueOf(d));
Object obj = linkedHashMap.get(invoke);
if (obj == null) {
obj = (List) new ArrayList();
linkedHashMap.put(invoke, obj);
}
((List) obj).add(Double.valueOf(d));
}
return linkedHashMap;
}
public static final <K> Map<K, List<Boolean>> groupBy(boolean[] zArr, Function1<? super Boolean, ? extends K> keySelector) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(keySelector, "keySelector");
LinkedHashMap linkedHashMap = new LinkedHashMap();
for (boolean z : zArr) {
K invoke = keySelector.invoke(Boolean.valueOf(z));
Object obj = linkedHashMap.get(invoke);
if (obj == null) {
obj = (List) new ArrayList();
linkedHashMap.put(invoke, obj);
}
((List) obj).add(Boolean.valueOf(z));
}
return linkedHashMap;
}
public static final <K> Map<K, List<Character>> groupBy(char[] cArr, Function1<? super Character, ? extends K> keySelector) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(keySelector, "keySelector");
LinkedHashMap linkedHashMap = new LinkedHashMap();
for (char c : cArr) {
K invoke = keySelector.invoke(Character.valueOf(c));
Object obj = linkedHashMap.get(invoke);
if (obj == null) {
obj = (List) new ArrayList();
linkedHashMap.put(invoke, obj);
}
((List) obj).add(Character.valueOf(c));
}
return linkedHashMap;
}
/* JADX WARN: Multi-variable type inference failed */
public static final <T, K, V> Map<K, List<V>> groupBy(T[] tArr, Function1<? super T, ? extends K> keySelector, Function1<? super T, ? extends V> valueTransform) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(keySelector, "keySelector");
Intrinsics.checkNotNullParameter(valueTransform, "valueTransform");
LinkedHashMap linkedHashMap = new LinkedHashMap();
for (DeviceControl$Companion$$ExternalSyntheticLambda3 deviceControl$Companion$$ExternalSyntheticLambda3 : tArr) {
K invoke = keySelector.invoke(deviceControl$Companion$$ExternalSyntheticLambda3);
ArrayList arrayList = linkedHashMap.get(invoke);
if (arrayList == null) {
arrayList = new ArrayList();
linkedHashMap.put(invoke, arrayList);
}
arrayList.add(valueTransform.invoke(deviceControl$Companion$$ExternalSyntheticLambda3));
}
return linkedHashMap;
}
public static final <K, V> Map<K, List<V>> groupBy(byte[] bArr, Function1<? super Byte, ? extends K> keySelector, Function1<? super Byte, ? extends V> valueTransform) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(keySelector, "keySelector");
Intrinsics.checkNotNullParameter(valueTransform, "valueTransform");
LinkedHashMap linkedHashMap = new LinkedHashMap();
for (byte b : bArr) {
K invoke = keySelector.invoke(Byte.valueOf(b));
ArrayList arrayList = linkedHashMap.get(invoke);
if (arrayList == null) {
arrayList = new ArrayList();
linkedHashMap.put(invoke, arrayList);
}
arrayList.add(valueTransform.invoke(Byte.valueOf(b)));
}
return linkedHashMap;
}
public static final <K, V> Map<K, List<V>> groupBy(short[] sArr, Function1<? super Short, ? extends K> keySelector, Function1<? super Short, ? extends V> valueTransform) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(keySelector, "keySelector");
Intrinsics.checkNotNullParameter(valueTransform, "valueTransform");
LinkedHashMap linkedHashMap = new LinkedHashMap();
for (short s : sArr) {
K invoke = keySelector.invoke(Short.valueOf(s));
ArrayList arrayList = linkedHashMap.get(invoke);
if (arrayList == null) {
arrayList = new ArrayList();
linkedHashMap.put(invoke, arrayList);
}
arrayList.add(valueTransform.invoke(Short.valueOf(s)));
}
return linkedHashMap;
}
public static final <K, V> Map<K, List<V>> groupBy(int[] iArr, Function1<? super Integer, ? extends K> keySelector, Function1<? super Integer, ? extends V> valueTransform) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(keySelector, "keySelector");
Intrinsics.checkNotNullParameter(valueTransform, "valueTransform");
LinkedHashMap linkedHashMap = new LinkedHashMap();
for (int i : iArr) {
K invoke = keySelector.invoke(Integer.valueOf(i));
ArrayList arrayList = linkedHashMap.get(invoke);
if (arrayList == null) {
arrayList = new ArrayList();
linkedHashMap.put(invoke, arrayList);
}
arrayList.add(valueTransform.invoke(Integer.valueOf(i)));
}
return linkedHashMap;
}
public static final <K, V> Map<K, List<V>> groupBy(long[] jArr, Function1<? super Long, ? extends K> keySelector, Function1<? super Long, ? extends V> valueTransform) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(keySelector, "keySelector");
Intrinsics.checkNotNullParameter(valueTransform, "valueTransform");
LinkedHashMap linkedHashMap = new LinkedHashMap();
for (long j : jArr) {
K invoke = keySelector.invoke(Long.valueOf(j));
ArrayList arrayList = linkedHashMap.get(invoke);
if (arrayList == null) {
arrayList = new ArrayList();
linkedHashMap.put(invoke, arrayList);
}
arrayList.add(valueTransform.invoke(Long.valueOf(j)));
}
return linkedHashMap;
}
public static final <K, V> Map<K, List<V>> groupBy(float[] fArr, Function1<? super Float, ? extends K> keySelector, Function1<? super Float, ? extends V> valueTransform) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(keySelector, "keySelector");
Intrinsics.checkNotNullParameter(valueTransform, "valueTransform");
LinkedHashMap linkedHashMap = new LinkedHashMap();
for (float f : fArr) {
K invoke = keySelector.invoke(Float.valueOf(f));
ArrayList arrayList = linkedHashMap.get(invoke);
if (arrayList == null) {
arrayList = new ArrayList();
linkedHashMap.put(invoke, arrayList);
}
arrayList.add(valueTransform.invoke(Float.valueOf(f)));
}
return linkedHashMap;
}
public static final <K, V> Map<K, List<V>> groupBy(double[] dArr, Function1<? super Double, ? extends K> keySelector, Function1<? super Double, ? extends V> valueTransform) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(keySelector, "keySelector");
Intrinsics.checkNotNullParameter(valueTransform, "valueTransform");
LinkedHashMap linkedHashMap = new LinkedHashMap();
for (double d : dArr) {
K invoke = keySelector.invoke(Double.valueOf(d));
ArrayList arrayList = linkedHashMap.get(invoke);
if (arrayList == null) {
arrayList = new ArrayList();
linkedHashMap.put(invoke, arrayList);
}
arrayList.add(valueTransform.invoke(Double.valueOf(d)));
}
return linkedHashMap;
}
public static final <K, V> Map<K, List<V>> groupBy(boolean[] zArr, Function1<? super Boolean, ? extends K> keySelector, Function1<? super Boolean, ? extends V> valueTransform) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(keySelector, "keySelector");
Intrinsics.checkNotNullParameter(valueTransform, "valueTransform");
LinkedHashMap linkedHashMap = new LinkedHashMap();
for (boolean z : zArr) {
K invoke = keySelector.invoke(Boolean.valueOf(z));
ArrayList arrayList = linkedHashMap.get(invoke);
if (arrayList == null) {
arrayList = new ArrayList();
linkedHashMap.put(invoke, arrayList);
}
arrayList.add(valueTransform.invoke(Boolean.valueOf(z)));
}
return linkedHashMap;
}
public static final <K, V> Map<K, List<V>> groupBy(char[] cArr, Function1<? super Character, ? extends K> keySelector, Function1<? super Character, ? extends V> valueTransform) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(keySelector, "keySelector");
Intrinsics.checkNotNullParameter(valueTransform, "valueTransform");
LinkedHashMap linkedHashMap = new LinkedHashMap();
for (char c : cArr) {
K invoke = keySelector.invoke(Character.valueOf(c));
ArrayList arrayList = linkedHashMap.get(invoke);
if (arrayList == null) {
arrayList = new ArrayList();
linkedHashMap.put(invoke, arrayList);
}
arrayList.add(valueTransform.invoke(Character.valueOf(c)));
}
return linkedHashMap;
}
public static final <T, K, M extends Map<? super K, List<T>>> M groupByTo(T[] tArr, M destination, Function1<? super T, ? extends K> keySelector) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(keySelector, "keySelector");
for (T t : tArr) {
K invoke = keySelector.invoke(t);
Object obj = destination.get(invoke);
if (obj == null) {
obj = (List) new ArrayList();
destination.put(invoke, obj);
}
((List) obj).add(t);
}
return destination;
}
public static final <K, M extends Map<? super K, List<Byte>>> M groupByTo(byte[] bArr, M destination, Function1<? super Byte, ? extends K> keySelector) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(keySelector, "keySelector");
for (byte b : bArr) {
K invoke = keySelector.invoke(Byte.valueOf(b));
Object obj = destination.get(invoke);
if (obj == null) {
obj = (List) new ArrayList();
destination.put(invoke, obj);
}
((List) obj).add(Byte.valueOf(b));
}
return destination;
}
public static final <K, M extends Map<? super K, List<Short>>> M groupByTo(short[] sArr, M destination, Function1<? super Short, ? extends K> keySelector) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(keySelector, "keySelector");
for (short s : sArr) {
K invoke = keySelector.invoke(Short.valueOf(s));
Object obj = destination.get(invoke);
if (obj == null) {
obj = (List) new ArrayList();
destination.put(invoke, obj);
}
((List) obj).add(Short.valueOf(s));
}
return destination;
}
public static final <K, M extends Map<? super K, List<Integer>>> M groupByTo(int[] iArr, M destination, Function1<? super Integer, ? extends K> keySelector) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(keySelector, "keySelector");
for (int i : iArr) {
K invoke = keySelector.invoke(Integer.valueOf(i));
Object obj = destination.get(invoke);
if (obj == null) {
obj = (List) new ArrayList();
destination.put(invoke, obj);
}
((List) obj).add(Integer.valueOf(i));
}
return destination;
}
public static final <K, M extends Map<? super K, List<Long>>> M groupByTo(long[] jArr, M destination, Function1<? super Long, ? extends K> keySelector) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(keySelector, "keySelector");
for (long j : jArr) {
K invoke = keySelector.invoke(Long.valueOf(j));
Object obj = destination.get(invoke);
if (obj == null) {
obj = (List) new ArrayList();
destination.put(invoke, obj);
}
((List) obj).add(Long.valueOf(j));
}
return destination;
}
public static final <K, M extends Map<? super K, List<Float>>> M groupByTo(float[] fArr, M destination, Function1<? super Float, ? extends K> keySelector) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(keySelector, "keySelector");
for (float f : fArr) {
K invoke = keySelector.invoke(Float.valueOf(f));
Object obj = destination.get(invoke);
if (obj == null) {
obj = (List) new ArrayList();
destination.put(invoke, obj);
}
((List) obj).add(Float.valueOf(f));
}
return destination;
}
public static final <K, M extends Map<? super K, List<Double>>> M groupByTo(double[] dArr, M destination, Function1<? super Double, ? extends K> keySelector) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(keySelector, "keySelector");
for (double d : dArr) {
K invoke = keySelector.invoke(Double.valueOf(d));
Object obj = destination.get(invoke);
if (obj == null) {
obj = (List) new ArrayList();
destination.put(invoke, obj);
}
((List) obj).add(Double.valueOf(d));
}
return destination;
}
public static final <K, M extends Map<? super K, List<Boolean>>> M groupByTo(boolean[] zArr, M destination, Function1<? super Boolean, ? extends K> keySelector) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(keySelector, "keySelector");
for (boolean z : zArr) {
K invoke = keySelector.invoke(Boolean.valueOf(z));
Object obj = destination.get(invoke);
if (obj == null) {
obj = (List) new ArrayList();
destination.put(invoke, obj);
}
((List) obj).add(Boolean.valueOf(z));
}
return destination;
}
public static final <K, M extends Map<? super K, List<Character>>> M groupByTo(char[] cArr, M destination, Function1<? super Character, ? extends K> keySelector) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(keySelector, "keySelector");
for (char c : cArr) {
K invoke = keySelector.invoke(Character.valueOf(c));
Object obj = destination.get(invoke);
if (obj == null) {
obj = (List) new ArrayList();
destination.put(invoke, obj);
}
((List) obj).add(Character.valueOf(c));
}
return destination;
}
/* JADX WARN: Multi-variable type inference failed */
public static final <T, K, V, M extends Map<? super K, List<V>>> M groupByTo(T[] tArr, M destination, Function1<? super T, ? extends K> keySelector, Function1<? super T, ? extends V> valueTransform) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(keySelector, "keySelector");
Intrinsics.checkNotNullParameter(valueTransform, "valueTransform");
for (T t : tArr) {
K invoke = keySelector.invoke(t);
Object obj = destination.get(invoke);
if (obj == null) {
obj = (List) new ArrayList();
destination.put(invoke, obj);
}
((List) obj).add(valueTransform.invoke(t));
}
return destination;
}
/* JADX WARN: Multi-variable type inference failed */
public static final <K, V, M extends Map<? super K, List<V>>> M groupByTo(byte[] bArr, M destination, Function1<? super Byte, ? extends K> keySelector, Function1<? super Byte, ? extends V> valueTransform) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(keySelector, "keySelector");
Intrinsics.checkNotNullParameter(valueTransform, "valueTransform");
for (byte b : bArr) {
K invoke = keySelector.invoke(Byte.valueOf(b));
Object obj = destination.get(invoke);
if (obj == null) {
obj = (List) new ArrayList();
destination.put(invoke, obj);
}
((List) obj).add(valueTransform.invoke(Byte.valueOf(b)));
}
return destination;
}
/* JADX WARN: Multi-variable type inference failed */
public static final <K, V, M extends Map<? super K, List<V>>> M groupByTo(short[] sArr, M destination, Function1<? super Short, ? extends K> keySelector, Function1<? super Short, ? extends V> valueTransform) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(keySelector, "keySelector");
Intrinsics.checkNotNullParameter(valueTransform, "valueTransform");
for (short s : sArr) {
K invoke = keySelector.invoke(Short.valueOf(s));
Object obj = destination.get(invoke);
if (obj == null) {
obj = (List) new ArrayList();
destination.put(invoke, obj);
}
((List) obj).add(valueTransform.invoke(Short.valueOf(s)));
}
return destination;
}
/* JADX WARN: Multi-variable type inference failed */
public static final <K, V, M extends Map<? super K, List<V>>> M groupByTo(int[] iArr, M destination, Function1<? super Integer, ? extends K> keySelector, Function1<? super Integer, ? extends V> valueTransform) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(keySelector, "keySelector");
Intrinsics.checkNotNullParameter(valueTransform, "valueTransform");
for (int i : iArr) {
K invoke = keySelector.invoke(Integer.valueOf(i));
Object obj = destination.get(invoke);
if (obj == null) {
obj = (List) new ArrayList();
destination.put(invoke, obj);
}
((List) obj).add(valueTransform.invoke(Integer.valueOf(i)));
}
return destination;
}
/* JADX WARN: Multi-variable type inference failed */
public static final <K, V, M extends Map<? super K, List<V>>> M groupByTo(long[] jArr, M destination, Function1<? super Long, ? extends K> keySelector, Function1<? super Long, ? extends V> valueTransform) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(keySelector, "keySelector");
Intrinsics.checkNotNullParameter(valueTransform, "valueTransform");
for (long j : jArr) {
K invoke = keySelector.invoke(Long.valueOf(j));
Object obj = destination.get(invoke);
if (obj == null) {
obj = (List) new ArrayList();
destination.put(invoke, obj);
}
((List) obj).add(valueTransform.invoke(Long.valueOf(j)));
}
return destination;
}
/* JADX WARN: Multi-variable type inference failed */
public static final <K, V, M extends Map<? super K, List<V>>> M groupByTo(float[] fArr, M destination, Function1<? super Float, ? extends K> keySelector, Function1<? super Float, ? extends V> valueTransform) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(keySelector, "keySelector");
Intrinsics.checkNotNullParameter(valueTransform, "valueTransform");
for (float f : fArr) {
K invoke = keySelector.invoke(Float.valueOf(f));
Object obj = destination.get(invoke);
if (obj == null) {
obj = (List) new ArrayList();
destination.put(invoke, obj);
}
((List) obj).add(valueTransform.invoke(Float.valueOf(f)));
}
return destination;
}
/* JADX WARN: Multi-variable type inference failed */
public static final <K, V, M extends Map<? super K, List<V>>> M groupByTo(double[] dArr, M destination, Function1<? super Double, ? extends K> keySelector, Function1<? super Double, ? extends V> valueTransform) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(keySelector, "keySelector");
Intrinsics.checkNotNullParameter(valueTransform, "valueTransform");
for (double d : dArr) {
K invoke = keySelector.invoke(Double.valueOf(d));
Object obj = destination.get(invoke);
if (obj == null) {
obj = (List) new ArrayList();
destination.put(invoke, obj);
}
((List) obj).add(valueTransform.invoke(Double.valueOf(d)));
}
return destination;
}
/* JADX WARN: Multi-variable type inference failed */
public static final <K, V, M extends Map<? super K, List<V>>> M groupByTo(boolean[] zArr, M destination, Function1<? super Boolean, ? extends K> keySelector, Function1<? super Boolean, ? extends V> valueTransform) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(keySelector, "keySelector");
Intrinsics.checkNotNullParameter(valueTransform, "valueTransform");
for (boolean z : zArr) {
K invoke = keySelector.invoke(Boolean.valueOf(z));
Object obj = destination.get(invoke);
if (obj == null) {
obj = (List) new ArrayList();
destination.put(invoke, obj);
}
((List) obj).add(valueTransform.invoke(Boolean.valueOf(z)));
}
return destination;
}
/* JADX WARN: Multi-variable type inference failed */
public static final <K, V, M extends Map<? super K, List<V>>> M groupByTo(char[] cArr, M destination, Function1<? super Character, ? extends K> keySelector, Function1<? super Character, ? extends V> valueTransform) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(keySelector, "keySelector");
Intrinsics.checkNotNullParameter(valueTransform, "valueTransform");
for (char c : cArr) {
K invoke = keySelector.invoke(Character.valueOf(c));
Object obj = destination.get(invoke);
if (obj == null) {
obj = (List) new ArrayList();
destination.put(invoke, obj);
}
((List) obj).add(valueTransform.invoke(Character.valueOf(c)));
}
return destination;
}
public static final <T, K> Grouping<T, K> groupingBy(final T[] tArr, final Function1<? super T, ? extends K> keySelector) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(keySelector, "keySelector");
return new Grouping<T, K>() { // from class: kotlin.collections.ArraysKt___ArraysKt$groupingBy$1
@Override // kotlin.collections.Grouping
public Iterator<T> sourceIterator() {
return ArrayIteratorKt.iterator(tArr);
}
@Override // kotlin.collections.Grouping
public K keyOf(T element) {
return keySelector.invoke(element);
}
};
}
public static final <T, R> List<R> map(T[] tArr, Function1<? super T, ? extends R> transform) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(transform, "transform");
ArrayList arrayList = new ArrayList(tArr.length);
for (T t : tArr) {
arrayList.add(transform.invoke(t));
}
return arrayList;
}
public static final <R> List<R> map(byte[] bArr, Function1<? super Byte, ? extends R> transform) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(transform, "transform");
ArrayList arrayList = new ArrayList(bArr.length);
for (byte b : bArr) {
arrayList.add(transform.invoke(Byte.valueOf(b)));
}
return arrayList;
}
public static final <R> List<R> map(short[] sArr, Function1<? super Short, ? extends R> transform) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(transform, "transform");
ArrayList arrayList = new ArrayList(sArr.length);
for (short s : sArr) {
arrayList.add(transform.invoke(Short.valueOf(s)));
}
return arrayList;
}
public static final <R> List<R> map(int[] iArr, Function1<? super Integer, ? extends R> transform) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(transform, "transform");
ArrayList arrayList = new ArrayList(iArr.length);
for (int i : iArr) {
arrayList.add(transform.invoke(Integer.valueOf(i)));
}
return arrayList;
}
public static final <R> List<R> map(long[] jArr, Function1<? super Long, ? extends R> transform) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(transform, "transform");
ArrayList arrayList = new ArrayList(jArr.length);
for (long j : jArr) {
arrayList.add(transform.invoke(Long.valueOf(j)));
}
return arrayList;
}
public static final <R> List<R> map(float[] fArr, Function1<? super Float, ? extends R> transform) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(transform, "transform");
ArrayList arrayList = new ArrayList(fArr.length);
for (float f : fArr) {
arrayList.add(transform.invoke(Float.valueOf(f)));
}
return arrayList;
}
public static final <R> List<R> map(double[] dArr, Function1<? super Double, ? extends R> transform) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(transform, "transform");
ArrayList arrayList = new ArrayList(dArr.length);
for (double d : dArr) {
arrayList.add(transform.invoke(Double.valueOf(d)));
}
return arrayList;
}
public static final <R> List<R> map(boolean[] zArr, Function1<? super Boolean, ? extends R> transform) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(transform, "transform");
ArrayList arrayList = new ArrayList(zArr.length);
for (boolean z : zArr) {
arrayList.add(transform.invoke(Boolean.valueOf(z)));
}
return arrayList;
}
public static final <R> List<R> map(char[] cArr, Function1<? super Character, ? extends R> transform) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(transform, "transform");
ArrayList arrayList = new ArrayList(cArr.length);
for (char c : cArr) {
arrayList.add(transform.invoke(Character.valueOf(c)));
}
return arrayList;
}
public static final <T, R> List<R> mapIndexed(T[] tArr, Function2<? super Integer, ? super T, ? extends R> transform) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(transform, "transform");
ArrayList arrayList = new ArrayList(tArr.length);
int length = tArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
arrayList.add(transform.invoke(Integer.valueOf(i2), tArr[i]));
i++;
i2++;
}
return arrayList;
}
public static final <R> List<R> mapIndexed(byte[] bArr, Function2<? super Integer, ? super Byte, ? extends R> transform) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(transform, "transform");
ArrayList arrayList = new ArrayList(bArr.length);
int length = bArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
arrayList.add(transform.invoke(Integer.valueOf(i2), Byte.valueOf(bArr[i])));
i++;
i2++;
}
return arrayList;
}
public static final <R> List<R> mapIndexed(short[] sArr, Function2<? super Integer, ? super Short, ? extends R> transform) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(transform, "transform");
ArrayList arrayList = new ArrayList(sArr.length);
int length = sArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
arrayList.add(transform.invoke(Integer.valueOf(i2), Short.valueOf(sArr[i])));
i++;
i2++;
}
return arrayList;
}
public static final <R> List<R> mapIndexed(int[] iArr, Function2<? super Integer, ? super Integer, ? extends R> transform) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(transform, "transform");
ArrayList arrayList = new ArrayList(iArr.length);
int length = iArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
arrayList.add(transform.invoke(Integer.valueOf(i2), Integer.valueOf(iArr[i])));
i++;
i2++;
}
return arrayList;
}
public static final <R> List<R> mapIndexed(long[] jArr, Function2<? super Integer, ? super Long, ? extends R> transform) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(transform, "transform");
ArrayList arrayList = new ArrayList(jArr.length);
int length = jArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
arrayList.add(transform.invoke(Integer.valueOf(i2), Long.valueOf(jArr[i])));
i++;
i2++;
}
return arrayList;
}
public static final <R> List<R> mapIndexed(float[] fArr, Function2<? super Integer, ? super Float, ? extends R> transform) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(transform, "transform");
ArrayList arrayList = new ArrayList(fArr.length);
int length = fArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
arrayList.add(transform.invoke(Integer.valueOf(i2), Float.valueOf(fArr[i])));
i++;
i2++;
}
return arrayList;
}
public static final <R> List<R> mapIndexed(double[] dArr, Function2<? super Integer, ? super Double, ? extends R> transform) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(transform, "transform");
ArrayList arrayList = new ArrayList(dArr.length);
int length = dArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
arrayList.add(transform.invoke(Integer.valueOf(i2), Double.valueOf(dArr[i])));
i++;
i2++;
}
return arrayList;
}
public static final <R> List<R> mapIndexed(boolean[] zArr, Function2<? super Integer, ? super Boolean, ? extends R> transform) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(transform, "transform");
ArrayList arrayList = new ArrayList(zArr.length);
int length = zArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
arrayList.add(transform.invoke(Integer.valueOf(i2), Boolean.valueOf(zArr[i])));
i++;
i2++;
}
return arrayList;
}
public static final <R> List<R> mapIndexed(char[] cArr, Function2<? super Integer, ? super Character, ? extends R> transform) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(transform, "transform");
ArrayList arrayList = new ArrayList(cArr.length);
int length = cArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
arrayList.add(transform.invoke(Integer.valueOf(i2), Character.valueOf(cArr[i])));
i++;
i2++;
}
return arrayList;
}
public static final <T, R> List<R> mapIndexedNotNull(T[] tArr, Function2<? super Integer, ? super T, ? extends R> transform) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(transform, "transform");
ArrayList arrayList = new ArrayList();
int length = tArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
int i3 = i2 + 1;
R invoke = transform.invoke(Integer.valueOf(i2), tArr[i]);
if (invoke != null) {
arrayList.add(invoke);
}
i++;
i2 = i3;
}
return arrayList;
}
public static final <T, R, C extends Collection<? super R>> C mapIndexedTo(T[] tArr, C destination, Function2<? super Integer, ? super T, ? extends R> transform) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(transform, "transform");
int length = tArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
destination.add(transform.invoke(Integer.valueOf(i2), tArr[i]));
i++;
i2++;
}
return destination;
}
public static final <R, C extends Collection<? super R>> C mapIndexedTo(byte[] bArr, C destination, Function2<? super Integer, ? super Byte, ? extends R> transform) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(transform, "transform");
int length = bArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
destination.add(transform.invoke(Integer.valueOf(i2), Byte.valueOf(bArr[i])));
i++;
i2++;
}
return destination;
}
public static final <R, C extends Collection<? super R>> C mapIndexedTo(short[] sArr, C destination, Function2<? super Integer, ? super Short, ? extends R> transform) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(transform, "transform");
int length = sArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
destination.add(transform.invoke(Integer.valueOf(i2), Short.valueOf(sArr[i])));
i++;
i2++;
}
return destination;
}
public static final <R, C extends Collection<? super R>> C mapIndexedTo(int[] iArr, C destination, Function2<? super Integer, ? super Integer, ? extends R> transform) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(transform, "transform");
int length = iArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
destination.add(transform.invoke(Integer.valueOf(i2), Integer.valueOf(iArr[i])));
i++;
i2++;
}
return destination;
}
public static final <R, C extends Collection<? super R>> C mapIndexedTo(long[] jArr, C destination, Function2<? super Integer, ? super Long, ? extends R> transform) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(transform, "transform");
int length = jArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
destination.add(transform.invoke(Integer.valueOf(i2), Long.valueOf(jArr[i])));
i++;
i2++;
}
return destination;
}
public static final <R, C extends Collection<? super R>> C mapIndexedTo(float[] fArr, C destination, Function2<? super Integer, ? super Float, ? extends R> transform) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(transform, "transform");
int length = fArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
destination.add(transform.invoke(Integer.valueOf(i2), Float.valueOf(fArr[i])));
i++;
i2++;
}
return destination;
}
public static final <R, C extends Collection<? super R>> C mapIndexedTo(double[] dArr, C destination, Function2<? super Integer, ? super Double, ? extends R> transform) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(transform, "transform");
int length = dArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
destination.add(transform.invoke(Integer.valueOf(i2), Double.valueOf(dArr[i])));
i++;
i2++;
}
return destination;
}
public static final <R, C extends Collection<? super R>> C mapIndexedTo(boolean[] zArr, C destination, Function2<? super Integer, ? super Boolean, ? extends R> transform) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(transform, "transform");
int length = zArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
destination.add(transform.invoke(Integer.valueOf(i2), Boolean.valueOf(zArr[i])));
i++;
i2++;
}
return destination;
}
public static final <R, C extends Collection<? super R>> C mapIndexedTo(char[] cArr, C destination, Function2<? super Integer, ? super Character, ? extends R> transform) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(transform, "transform");
int length = cArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
destination.add(transform.invoke(Integer.valueOf(i2), Character.valueOf(cArr[i])));
i++;
i2++;
}
return destination;
}
public static final <T, R> List<R> mapNotNull(T[] tArr, Function1<? super T, ? extends R> transform) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(transform, "transform");
ArrayList arrayList = new ArrayList();
for (T t : tArr) {
R invoke = transform.invoke(t);
if (invoke != null) {
arrayList.add(invoke);
}
}
return arrayList;
}
public static final <T, R, C extends Collection<? super R>> C mapTo(T[] tArr, C destination, Function1<? super T, ? extends R> transform) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(transform, "transform");
for (T t : tArr) {
destination.add(transform.invoke(t));
}
return destination;
}
public static final <R, C extends Collection<? super R>> C mapTo(byte[] bArr, C destination, Function1<? super Byte, ? extends R> transform) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(transform, "transform");
for (byte b : bArr) {
destination.add(transform.invoke(Byte.valueOf(b)));
}
return destination;
}
public static final <R, C extends Collection<? super R>> C mapTo(short[] sArr, C destination, Function1<? super Short, ? extends R> transform) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(transform, "transform");
for (short s : sArr) {
destination.add(transform.invoke(Short.valueOf(s)));
}
return destination;
}
public static final <R, C extends Collection<? super R>> C mapTo(int[] iArr, C destination, Function1<? super Integer, ? extends R> transform) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(transform, "transform");
for (int i : iArr) {
destination.add(transform.invoke(Integer.valueOf(i)));
}
return destination;
}
public static final <R, C extends Collection<? super R>> C mapTo(long[] jArr, C destination, Function1<? super Long, ? extends R> transform) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(transform, "transform");
for (long j : jArr) {
destination.add(transform.invoke(Long.valueOf(j)));
}
return destination;
}
public static final <R, C extends Collection<? super R>> C mapTo(float[] fArr, C destination, Function1<? super Float, ? extends R> transform) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(transform, "transform");
for (float f : fArr) {
destination.add(transform.invoke(Float.valueOf(f)));
}
return destination;
}
public static final <R, C extends Collection<? super R>> C mapTo(double[] dArr, C destination, Function1<? super Double, ? extends R> transform) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(transform, "transform");
for (double d : dArr) {
destination.add(transform.invoke(Double.valueOf(d)));
}
return destination;
}
public static final <R, C extends Collection<? super R>> C mapTo(boolean[] zArr, C destination, Function1<? super Boolean, ? extends R> transform) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(transform, "transform");
for (boolean z : zArr) {
destination.add(transform.invoke(Boolean.valueOf(z)));
}
return destination;
}
public static final <R, C extends Collection<? super R>> C mapTo(char[] cArr, C destination, Function1<? super Character, ? extends R> transform) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(transform, "transform");
for (char c : cArr) {
destination.add(transform.invoke(Character.valueOf(c)));
}
return destination;
}
public static final <T> Iterable<IndexedValue<T>> withIndex(final T[] tArr) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
return new IndexingIterable(new Function0<Iterator<? extends T>>() { // from class: kotlin.collections.ArraysKt___ArraysKt$withIndex$1
/* JADX INFO: Access modifiers changed from: package-private */
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
{
super(0);
}
@Override // kotlin.jvm.functions.Function0
public final Iterator<T> invoke() {
return ArrayIteratorKt.iterator(tArr);
}
});
}
public static final Iterable<IndexedValue<Byte>> withIndex(final byte[] bArr) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
return new IndexingIterable(new Function0<Iterator<? extends Byte>>() { // from class: kotlin.collections.ArraysKt___ArraysKt$withIndex$2
/* JADX INFO: Access modifiers changed from: package-private */
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
{
super(0);
}
@Override // kotlin.jvm.functions.Function0
public final Iterator<? extends Byte> invoke() {
return ArrayIteratorsKt.iterator(bArr);
}
});
}
public static final Iterable<IndexedValue<Short>> withIndex(final short[] sArr) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
return new IndexingIterable(new Function0<Iterator<? extends Short>>() { // from class: kotlin.collections.ArraysKt___ArraysKt$withIndex$3
/* JADX INFO: Access modifiers changed from: package-private */
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
{
super(0);
}
@Override // kotlin.jvm.functions.Function0
public final Iterator<? extends Short> invoke() {
return ArrayIteratorsKt.iterator(sArr);
}
});
}
public static final Iterable<IndexedValue<Integer>> withIndex(final int[] iArr) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
return new IndexingIterable(new Function0<Iterator<? extends Integer>>() { // from class: kotlin.collections.ArraysKt___ArraysKt$withIndex$4
/* JADX INFO: Access modifiers changed from: package-private */
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
{
super(0);
}
@Override // kotlin.jvm.functions.Function0
public final Iterator<? extends Integer> invoke() {
return ArrayIteratorsKt.iterator(iArr);
}
});
}
public static final Iterable<IndexedValue<Long>> withIndex(final long[] jArr) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
return new IndexingIterable(new Function0<Iterator<? extends Long>>() { // from class: kotlin.collections.ArraysKt___ArraysKt$withIndex$5
/* JADX INFO: Access modifiers changed from: package-private */
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
{
super(0);
}
@Override // kotlin.jvm.functions.Function0
public final Iterator<? extends Long> invoke() {
return ArrayIteratorsKt.iterator(jArr);
}
});
}
public static final Iterable<IndexedValue<Float>> withIndex(final float[] fArr) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
return new IndexingIterable(new Function0<Iterator<? extends Float>>() { // from class: kotlin.collections.ArraysKt___ArraysKt$withIndex$6
/* JADX INFO: Access modifiers changed from: package-private */
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
{
super(0);
}
@Override // kotlin.jvm.functions.Function0
public final Iterator<? extends Float> invoke() {
return ArrayIteratorsKt.iterator(fArr);
}
});
}
public static final Iterable<IndexedValue<Double>> withIndex(final double[] dArr) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
return new IndexingIterable(new Function0<Iterator<? extends Double>>() { // from class: kotlin.collections.ArraysKt___ArraysKt$withIndex$7
/* JADX INFO: Access modifiers changed from: package-private */
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
{
super(0);
}
@Override // kotlin.jvm.functions.Function0
public final Iterator<? extends Double> invoke() {
return ArrayIteratorsKt.iterator(dArr);
}
});
}
public static final Iterable<IndexedValue<Boolean>> withIndex(final boolean[] zArr) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
return new IndexingIterable(new Function0<Iterator<? extends Boolean>>() { // from class: kotlin.collections.ArraysKt___ArraysKt$withIndex$8
/* JADX INFO: Access modifiers changed from: package-private */
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
{
super(0);
}
@Override // kotlin.jvm.functions.Function0
public final Iterator<? extends Boolean> invoke() {
return ArrayIteratorsKt.iterator(zArr);
}
});
}
public static final Iterable<IndexedValue<Character>> withIndex(final char[] cArr) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
return new IndexingIterable(new Function0<Iterator<? extends Character>>() { // from class: kotlin.collections.ArraysKt___ArraysKt$withIndex$9
/* JADX INFO: Access modifiers changed from: package-private */
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
{
super(0);
}
@Override // kotlin.jvm.functions.Function0
public final Iterator<? extends Character> invoke() {
return ArrayIteratorsKt.iterator(cArr);
}
});
}
public static final <T> List<T> distinct(T[] tArr) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
return CollectionsKt.toList(ArraysKt.toMutableSet(tArr));
}
public static final List<Byte> distinct(byte[] bArr) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
return CollectionsKt.toList(ArraysKt.toMutableSet(bArr));
}
public static final List<Short> distinct(short[] sArr) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
return CollectionsKt.toList(ArraysKt.toMutableSet(sArr));
}
public static final List<Integer> distinct(int[] iArr) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
return CollectionsKt.toList(ArraysKt.toMutableSet(iArr));
}
public static final List<Long> distinct(long[] jArr) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
return CollectionsKt.toList(ArraysKt.toMutableSet(jArr));
}
public static final List<Float> distinct(float[] fArr) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
return CollectionsKt.toList(ArraysKt.toMutableSet(fArr));
}
public static final List<Double> distinct(double[] dArr) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
return CollectionsKt.toList(ArraysKt.toMutableSet(dArr));
}
public static final List<Boolean> distinct(boolean[] zArr) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
return CollectionsKt.toList(ArraysKt.toMutableSet(zArr));
}
public static final List<Character> distinct(char[] cArr) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
return CollectionsKt.toList(ArraysKt.toMutableSet(cArr));
}
public static final <T, K> List<T> distinctBy(T[] tArr, Function1<? super T, ? extends K> selector) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
HashSet hashSet = new HashSet();
ArrayList arrayList = new ArrayList();
for (T t : tArr) {
if (hashSet.add(selector.invoke(t))) {
arrayList.add(t);
}
}
return arrayList;
}
public static final <K> List<Byte> distinctBy(byte[] bArr, Function1<? super Byte, ? extends K> selector) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
HashSet hashSet = new HashSet();
ArrayList arrayList = new ArrayList();
for (byte b : bArr) {
if (hashSet.add(selector.invoke(Byte.valueOf(b)))) {
arrayList.add(Byte.valueOf(b));
}
}
return arrayList;
}
public static final <K> List<Short> distinctBy(short[] sArr, Function1<? super Short, ? extends K> selector) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
HashSet hashSet = new HashSet();
ArrayList arrayList = new ArrayList();
for (short s : sArr) {
if (hashSet.add(selector.invoke(Short.valueOf(s)))) {
arrayList.add(Short.valueOf(s));
}
}
return arrayList;
}
public static final <K> List<Integer> distinctBy(int[] iArr, Function1<? super Integer, ? extends K> selector) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
HashSet hashSet = new HashSet();
ArrayList arrayList = new ArrayList();
for (int i : iArr) {
if (hashSet.add(selector.invoke(Integer.valueOf(i)))) {
arrayList.add(Integer.valueOf(i));
}
}
return arrayList;
}
public static final <K> List<Long> distinctBy(long[] jArr, Function1<? super Long, ? extends K> selector) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
HashSet hashSet = new HashSet();
ArrayList arrayList = new ArrayList();
for (long j : jArr) {
if (hashSet.add(selector.invoke(Long.valueOf(j)))) {
arrayList.add(Long.valueOf(j));
}
}
return arrayList;
}
public static final <K> List<Float> distinctBy(float[] fArr, Function1<? super Float, ? extends K> selector) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
HashSet hashSet = new HashSet();
ArrayList arrayList = new ArrayList();
for (float f : fArr) {
if (hashSet.add(selector.invoke(Float.valueOf(f)))) {
arrayList.add(Float.valueOf(f));
}
}
return arrayList;
}
public static final <K> List<Double> distinctBy(double[] dArr, Function1<? super Double, ? extends K> selector) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
HashSet hashSet = new HashSet();
ArrayList arrayList = new ArrayList();
for (double d : dArr) {
if (hashSet.add(selector.invoke(Double.valueOf(d)))) {
arrayList.add(Double.valueOf(d));
}
}
return arrayList;
}
public static final <K> List<Boolean> distinctBy(boolean[] zArr, Function1<? super Boolean, ? extends K> selector) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
HashSet hashSet = new HashSet();
ArrayList arrayList = new ArrayList();
for (boolean z : zArr) {
if (hashSet.add(selector.invoke(Boolean.valueOf(z)))) {
arrayList.add(Boolean.valueOf(z));
}
}
return arrayList;
}
public static final <K> List<Character> distinctBy(char[] cArr, Function1<? super Character, ? extends K> selector) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
HashSet hashSet = new HashSet();
ArrayList arrayList = new ArrayList();
for (char c : cArr) {
if (hashSet.add(selector.invoke(Character.valueOf(c)))) {
arrayList.add(Character.valueOf(c));
}
}
return arrayList;
}
public static final <T> Set<T> intersect(T[] tArr, Iterable<? extends T> other) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
Set<T> mutableSet = ArraysKt.toMutableSet(tArr);
CollectionsKt.retainAll(mutableSet, other);
return mutableSet;
}
public static final Set<Byte> intersect(byte[] bArr, Iterable<Byte> other) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
Set<Byte> mutableSet = ArraysKt.toMutableSet(bArr);
CollectionsKt.retainAll(mutableSet, other);
return mutableSet;
}
public static final Set<Short> intersect(short[] sArr, Iterable<Short> other) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
Set<Short> mutableSet = ArraysKt.toMutableSet(sArr);
CollectionsKt.retainAll(mutableSet, other);
return mutableSet;
}
public static final Set<Integer> intersect(int[] iArr, Iterable<Integer> other) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
Set<Integer> mutableSet = ArraysKt.toMutableSet(iArr);
CollectionsKt.retainAll(mutableSet, other);
return mutableSet;
}
public static final Set<Long> intersect(long[] jArr, Iterable<Long> other) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
Set<Long> mutableSet = ArraysKt.toMutableSet(jArr);
CollectionsKt.retainAll(mutableSet, other);
return mutableSet;
}
public static final Set<Float> intersect(float[] fArr, Iterable<Float> other) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
Set<Float> mutableSet = ArraysKt.toMutableSet(fArr);
CollectionsKt.retainAll(mutableSet, other);
return mutableSet;
}
public static final Set<Double> intersect(double[] dArr, Iterable<Double> other) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
Set<Double> mutableSet = ArraysKt.toMutableSet(dArr);
CollectionsKt.retainAll(mutableSet, other);
return mutableSet;
}
public static final Set<Boolean> intersect(boolean[] zArr, Iterable<Boolean> other) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
Set<Boolean> mutableSet = ArraysKt.toMutableSet(zArr);
CollectionsKt.retainAll(mutableSet, other);
return mutableSet;
}
public static final Set<Character> intersect(char[] cArr, Iterable<Character> other) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
Set<Character> mutableSet = ArraysKt.toMutableSet(cArr);
CollectionsKt.retainAll(mutableSet, other);
return mutableSet;
}
public static final <T> Set<T> subtract(T[] tArr, Iterable<? extends T> other) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
Set<T> mutableSet = ArraysKt.toMutableSet(tArr);
CollectionsKt.removeAll(mutableSet, other);
return mutableSet;
}
public static final Set<Byte> subtract(byte[] bArr, Iterable<Byte> other) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
Set<Byte> mutableSet = ArraysKt.toMutableSet(bArr);
CollectionsKt.removeAll(mutableSet, other);
return mutableSet;
}
public static final Set<Short> subtract(short[] sArr, Iterable<Short> other) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
Set<Short> mutableSet = ArraysKt.toMutableSet(sArr);
CollectionsKt.removeAll(mutableSet, other);
return mutableSet;
}
public static final Set<Integer> subtract(int[] iArr, Iterable<Integer> other) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
Set<Integer> mutableSet = ArraysKt.toMutableSet(iArr);
CollectionsKt.removeAll(mutableSet, other);
return mutableSet;
}
public static final Set<Long> subtract(long[] jArr, Iterable<Long> other) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
Set<Long> mutableSet = ArraysKt.toMutableSet(jArr);
CollectionsKt.removeAll(mutableSet, other);
return mutableSet;
}
public static final Set<Float> subtract(float[] fArr, Iterable<Float> other) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
Set<Float> mutableSet = ArraysKt.toMutableSet(fArr);
CollectionsKt.removeAll(mutableSet, other);
return mutableSet;
}
public static final Set<Double> subtract(double[] dArr, Iterable<Double> other) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
Set<Double> mutableSet = ArraysKt.toMutableSet(dArr);
CollectionsKt.removeAll(mutableSet, other);
return mutableSet;
}
public static final Set<Boolean> subtract(boolean[] zArr, Iterable<Boolean> other) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
Set<Boolean> mutableSet = ArraysKt.toMutableSet(zArr);
CollectionsKt.removeAll(mutableSet, other);
return mutableSet;
}
public static final Set<Character> subtract(char[] cArr, Iterable<Character> other) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
Set<Character> mutableSet = ArraysKt.toMutableSet(cArr);
CollectionsKt.removeAll(mutableSet, other);
return mutableSet;
}
public static final <T> Set<T> toMutableSet(T[] tArr) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
return (Set) ArraysKt.toCollection(tArr, new LinkedHashSet(MapsKt.mapCapacity(tArr.length)));
}
public static final Set<Byte> toMutableSet(byte[] bArr) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
return (Set) ArraysKt.toCollection(bArr, new LinkedHashSet(MapsKt.mapCapacity(bArr.length)));
}
public static final Set<Short> toMutableSet(short[] sArr) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
return (Set) ArraysKt.toCollection(sArr, new LinkedHashSet(MapsKt.mapCapacity(sArr.length)));
}
public static final Set<Integer> toMutableSet(int[] iArr) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
return (Set) ArraysKt.toCollection(iArr, new LinkedHashSet(MapsKt.mapCapacity(iArr.length)));
}
public static final Set<Long> toMutableSet(long[] jArr) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
return (Set) ArraysKt.toCollection(jArr, new LinkedHashSet(MapsKt.mapCapacity(jArr.length)));
}
public static final Set<Float> toMutableSet(float[] fArr) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
return (Set) ArraysKt.toCollection(fArr, new LinkedHashSet(MapsKt.mapCapacity(fArr.length)));
}
public static final Set<Double> toMutableSet(double[] dArr) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
return (Set) ArraysKt.toCollection(dArr, new LinkedHashSet(MapsKt.mapCapacity(dArr.length)));
}
public static final Set<Boolean> toMutableSet(boolean[] zArr) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
return (Set) ArraysKt.toCollection(zArr, new LinkedHashSet(MapsKt.mapCapacity(zArr.length)));
}
public static final Set<Character> toMutableSet(char[] cArr) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
return (Set) ArraysKt.toCollection(cArr, new LinkedHashSet(MapsKt.mapCapacity(RangesKt.coerceAtMost(cArr.length, 128))));
}
public static final <T> Set<T> union(T[] tArr, Iterable<? extends T> other) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
Set<T> mutableSet = ArraysKt.toMutableSet(tArr);
CollectionsKt.addAll(mutableSet, other);
return mutableSet;
}
public static final Set<Byte> union(byte[] bArr, Iterable<Byte> other) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
Set<Byte> mutableSet = ArraysKt.toMutableSet(bArr);
CollectionsKt.addAll(mutableSet, other);
return mutableSet;
}
public static final Set<Short> union(short[] sArr, Iterable<Short> other) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
Set<Short> mutableSet = ArraysKt.toMutableSet(sArr);
CollectionsKt.addAll(mutableSet, other);
return mutableSet;
}
public static final Set<Integer> union(int[] iArr, Iterable<Integer> other) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
Set<Integer> mutableSet = ArraysKt.toMutableSet(iArr);
CollectionsKt.addAll(mutableSet, other);
return mutableSet;
}
public static final Set<Long> union(long[] jArr, Iterable<Long> other) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
Set<Long> mutableSet = ArraysKt.toMutableSet(jArr);
CollectionsKt.addAll(mutableSet, other);
return mutableSet;
}
public static final Set<Float> union(float[] fArr, Iterable<Float> other) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
Set<Float> mutableSet = ArraysKt.toMutableSet(fArr);
CollectionsKt.addAll(mutableSet, other);
return mutableSet;
}
public static final Set<Double> union(double[] dArr, Iterable<Double> other) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
Set<Double> mutableSet = ArraysKt.toMutableSet(dArr);
CollectionsKt.addAll(mutableSet, other);
return mutableSet;
}
public static final Set<Boolean> union(boolean[] zArr, Iterable<Boolean> other) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
Set<Boolean> mutableSet = ArraysKt.toMutableSet(zArr);
CollectionsKt.addAll(mutableSet, other);
return mutableSet;
}
public static final Set<Character> union(char[] cArr, Iterable<Character> other) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
Set<Character> mutableSet = ArraysKt.toMutableSet(cArr);
CollectionsKt.addAll(mutableSet, other);
return mutableSet;
}
public static final <T> boolean all(T[] tArr, Function1<? super T, Boolean> predicate) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (T t : tArr) {
if (!predicate.invoke(t).booleanValue()) {
return false;
}
}
return true;
}
public static final boolean all(byte[] bArr, Function1<? super Byte, Boolean> predicate) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (byte b : bArr) {
if (!predicate.invoke(Byte.valueOf(b)).booleanValue()) {
return false;
}
}
return true;
}
public static final boolean all(short[] sArr, Function1<? super Short, Boolean> predicate) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (short s : sArr) {
if (!predicate.invoke(Short.valueOf(s)).booleanValue()) {
return false;
}
}
return true;
}
public static final boolean all(int[] iArr, Function1<? super Integer, Boolean> predicate) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (int i : iArr) {
if (!predicate.invoke(Integer.valueOf(i)).booleanValue()) {
return false;
}
}
return true;
}
public static final boolean all(long[] jArr, Function1<? super Long, Boolean> predicate) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (long j : jArr) {
if (!predicate.invoke(Long.valueOf(j)).booleanValue()) {
return false;
}
}
return true;
}
public static final boolean all(float[] fArr, Function1<? super Float, Boolean> predicate) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (float f : fArr) {
if (!predicate.invoke(Float.valueOf(f)).booleanValue()) {
return false;
}
}
return true;
}
public static final boolean all(double[] dArr, Function1<? super Double, Boolean> predicate) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (double d : dArr) {
if (!predicate.invoke(Double.valueOf(d)).booleanValue()) {
return false;
}
}
return true;
}
public static final boolean all(boolean[] zArr, Function1<? super Boolean, Boolean> predicate) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (boolean z : zArr) {
if (!predicate.invoke(Boolean.valueOf(z)).booleanValue()) {
return false;
}
}
return true;
}
public static final boolean all(char[] cArr, Function1<? super Character, Boolean> predicate) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (char c : cArr) {
if (!predicate.invoke(Character.valueOf(c)).booleanValue()) {
return false;
}
}
return true;
}
public static final <T> boolean any(T[] tArr) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
return !(tArr.length == 0);
}
public static final boolean any(byte[] bArr) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
return !(bArr.length == 0);
}
public static final boolean any(short[] sArr) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
return !(sArr.length == 0);
}
public static final boolean any(int[] iArr) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
return !(iArr.length == 0);
}
public static final boolean any(long[] jArr) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
return !(jArr.length == 0);
}
public static final boolean any(float[] fArr) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
return !(fArr.length == 0);
}
public static final boolean any(double[] dArr) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
return !(dArr.length == 0);
}
public static final boolean any(boolean[] zArr) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
return !(zArr.length == 0);
}
public static final boolean any(char[] cArr) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
return !(cArr.length == 0);
}
public static final <T> boolean any(T[] tArr, Function1<? super T, Boolean> predicate) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (T t : tArr) {
if (predicate.invoke(t).booleanValue()) {
return true;
}
}
return false;
}
public static final boolean any(byte[] bArr, Function1<? super Byte, Boolean> predicate) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (byte b : bArr) {
if (predicate.invoke(Byte.valueOf(b)).booleanValue()) {
return true;
}
}
return false;
}
public static final boolean any(short[] sArr, Function1<? super Short, Boolean> predicate) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (short s : sArr) {
if (predicate.invoke(Short.valueOf(s)).booleanValue()) {
return true;
}
}
return false;
}
public static final boolean any(int[] iArr, Function1<? super Integer, Boolean> predicate) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (int i : iArr) {
if (predicate.invoke(Integer.valueOf(i)).booleanValue()) {
return true;
}
}
return false;
}
public static final boolean any(long[] jArr, Function1<? super Long, Boolean> predicate) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (long j : jArr) {
if (predicate.invoke(Long.valueOf(j)).booleanValue()) {
return true;
}
}
return false;
}
public static final boolean any(float[] fArr, Function1<? super Float, Boolean> predicate) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (float f : fArr) {
if (predicate.invoke(Float.valueOf(f)).booleanValue()) {
return true;
}
}
return false;
}
public static final boolean any(double[] dArr, Function1<? super Double, Boolean> predicate) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (double d : dArr) {
if (predicate.invoke(Double.valueOf(d)).booleanValue()) {
return true;
}
}
return false;
}
public static final boolean any(boolean[] zArr, Function1<? super Boolean, Boolean> predicate) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (boolean z : zArr) {
if (predicate.invoke(Boolean.valueOf(z)).booleanValue()) {
return true;
}
}
return false;
}
public static final boolean any(char[] cArr, Function1<? super Character, Boolean> predicate) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (char c : cArr) {
if (predicate.invoke(Character.valueOf(c)).booleanValue()) {
return true;
}
}
return false;
}
private static final <T> int count(T[] tArr) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
return tArr.length;
}
private static final int count(byte[] bArr) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
return bArr.length;
}
private static final int count(short[] sArr) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
return sArr.length;
}
private static final int count(int[] iArr) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
return iArr.length;
}
private static final int count(long[] jArr) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
return jArr.length;
}
private static final int count(float[] fArr) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
return fArr.length;
}
private static final int count(double[] dArr) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
return dArr.length;
}
private static final int count(boolean[] zArr) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
return zArr.length;
}
private static final int count(char[] cArr) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
return cArr.length;
}
public static final <T> int count(T[] tArr, Function1<? super T, Boolean> predicate) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
int i = 0;
for (T t : tArr) {
if (predicate.invoke(t).booleanValue()) {
i++;
}
}
return i;
}
public static final int count(byte[] bArr, Function1<? super Byte, Boolean> predicate) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
int i = 0;
for (byte b : bArr) {
if (predicate.invoke(Byte.valueOf(b)).booleanValue()) {
i++;
}
}
return i;
}
public static final int count(short[] sArr, Function1<? super Short, Boolean> predicate) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
int i = 0;
for (short s : sArr) {
if (predicate.invoke(Short.valueOf(s)).booleanValue()) {
i++;
}
}
return i;
}
public static final int count(int[] iArr, Function1<? super Integer, Boolean> predicate) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
int i = 0;
for (int i2 : iArr) {
if (predicate.invoke(Integer.valueOf(i2)).booleanValue()) {
i++;
}
}
return i;
}
public static final int count(long[] jArr, Function1<? super Long, Boolean> predicate) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
int i = 0;
for (long j : jArr) {
if (predicate.invoke(Long.valueOf(j)).booleanValue()) {
i++;
}
}
return i;
}
public static final int count(float[] fArr, Function1<? super Float, Boolean> predicate) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
int i = 0;
for (float f : fArr) {
if (predicate.invoke(Float.valueOf(f)).booleanValue()) {
i++;
}
}
return i;
}
public static final int count(double[] dArr, Function1<? super Double, Boolean> predicate) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
int i = 0;
for (double d : dArr) {
if (predicate.invoke(Double.valueOf(d)).booleanValue()) {
i++;
}
}
return i;
}
public static final int count(boolean[] zArr, Function1<? super Boolean, Boolean> predicate) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
int i = 0;
for (boolean z : zArr) {
if (predicate.invoke(Boolean.valueOf(z)).booleanValue()) {
i++;
}
}
return i;
}
public static final int count(char[] cArr, Function1<? super Character, Boolean> predicate) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
int i = 0;
for (char c : cArr) {
if (predicate.invoke(Character.valueOf(c)).booleanValue()) {
i++;
}
}
return i;
}
/* JADX WARN: Multi-variable type inference failed */
public static final <T, R> R fold(T[] tArr, R r, Function2<? super R, ? super T, ? extends R> operation) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
for (DeviceControl$Companion$$ExternalSyntheticLambda3 deviceControl$Companion$$ExternalSyntheticLambda3 : tArr) {
r = operation.invoke(r, deviceControl$Companion$$ExternalSyntheticLambda3);
}
return r;
}
public static final <R> R fold(byte[] bArr, R r, Function2<? super R, ? super Byte, ? extends R> operation) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
for (byte b : bArr) {
r = operation.invoke(r, Byte.valueOf(b));
}
return r;
}
public static final <R> R fold(short[] sArr, R r, Function2<? super R, ? super Short, ? extends R> operation) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
for (short s : sArr) {
r = operation.invoke(r, Short.valueOf(s));
}
return r;
}
public static final <R> R fold(int[] iArr, R r, Function2<? super R, ? super Integer, ? extends R> operation) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
for (int i : iArr) {
r = operation.invoke(r, Integer.valueOf(i));
}
return r;
}
public static final <R> R fold(long[] jArr, R r, Function2<? super R, ? super Long, ? extends R> operation) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
for (long j : jArr) {
r = operation.invoke(r, Long.valueOf(j));
}
return r;
}
public static final <R> R fold(float[] fArr, R r, Function2<? super R, ? super Float, ? extends R> operation) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
for (float f : fArr) {
r = operation.invoke(r, Float.valueOf(f));
}
return r;
}
public static final <R> R fold(double[] dArr, R r, Function2<? super R, ? super Double, ? extends R> operation) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
for (double d : dArr) {
r = operation.invoke(r, Double.valueOf(d));
}
return r;
}
public static final <R> R fold(boolean[] zArr, R r, Function2<? super R, ? super Boolean, ? extends R> operation) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
for (boolean z : zArr) {
r = operation.invoke(r, Boolean.valueOf(z));
}
return r;
}
public static final <R> R fold(char[] cArr, R r, Function2<? super R, ? super Character, ? extends R> operation) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
for (char c : cArr) {
r = operation.invoke(r, Character.valueOf(c));
}
return r;
}
/* JADX WARN: Multi-variable type inference failed */
public static final <T, R> R foldIndexed(T[] tArr, R r, Function3<? super Integer, ? super R, ? super T, ? extends R> operation) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
int length = tArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
r = operation.invoke(Integer.valueOf(i2), r, tArr[i]);
i++;
i2++;
}
return r;
}
public static final <R> R foldIndexed(byte[] bArr, R r, Function3<? super Integer, ? super R, ? super Byte, ? extends R> operation) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
int length = bArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
r = operation.invoke(Integer.valueOf(i2), r, Byte.valueOf(bArr[i]));
i++;
i2++;
}
return r;
}
public static final <R> R foldIndexed(short[] sArr, R r, Function3<? super Integer, ? super R, ? super Short, ? extends R> operation) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
int length = sArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
r = operation.invoke(Integer.valueOf(i2), r, Short.valueOf(sArr[i]));
i++;
i2++;
}
return r;
}
public static final <R> R foldIndexed(int[] iArr, R r, Function3<? super Integer, ? super R, ? super Integer, ? extends R> operation) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
int length = iArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
r = operation.invoke(Integer.valueOf(i2), r, Integer.valueOf(iArr[i]));
i++;
i2++;
}
return r;
}
public static final <R> R foldIndexed(long[] jArr, R r, Function3<? super Integer, ? super R, ? super Long, ? extends R> operation) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
int length = jArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
r = operation.invoke(Integer.valueOf(i2), r, Long.valueOf(jArr[i]));
i++;
i2++;
}
return r;
}
public static final <R> R foldIndexed(float[] fArr, R r, Function3<? super Integer, ? super R, ? super Float, ? extends R> operation) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
int length = fArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
r = operation.invoke(Integer.valueOf(i2), r, Float.valueOf(fArr[i]));
i++;
i2++;
}
return r;
}
public static final <R> R foldIndexed(double[] dArr, R r, Function3<? super Integer, ? super R, ? super Double, ? extends R> operation) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
int length = dArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
r = operation.invoke(Integer.valueOf(i2), r, Double.valueOf(dArr[i]));
i++;
i2++;
}
return r;
}
public static final <R> R foldIndexed(boolean[] zArr, R r, Function3<? super Integer, ? super R, ? super Boolean, ? extends R> operation) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
int length = zArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
r = operation.invoke(Integer.valueOf(i2), r, Boolean.valueOf(zArr[i]));
i++;
i2++;
}
return r;
}
public static final <R> R foldIndexed(char[] cArr, R r, Function3<? super Integer, ? super R, ? super Character, ? extends R> operation) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
int length = cArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
r = operation.invoke(Integer.valueOf(i2), r, Character.valueOf(cArr[i]));
i++;
i2++;
}
return r;
}
/* JADX WARN: Multi-variable type inference failed */
public static final <T, R> R foldRight(T[] tArr, R r, Function2<? super T, ? super R, ? extends R> operation) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
for (int lastIndex = ArraysKt.getLastIndex(tArr); lastIndex >= 0; lastIndex--) {
r = operation.invoke(tArr[lastIndex], r);
}
return r;
}
public static final <R> R foldRight(byte[] bArr, R r, Function2<? super Byte, ? super R, ? extends R> operation) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
for (int lastIndex = ArraysKt.getLastIndex(bArr); lastIndex >= 0; lastIndex--) {
r = operation.invoke(Byte.valueOf(bArr[lastIndex]), r);
}
return r;
}
public static final <R> R foldRight(short[] sArr, R r, Function2<? super Short, ? super R, ? extends R> operation) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
for (int lastIndex = ArraysKt.getLastIndex(sArr); lastIndex >= 0; lastIndex--) {
r = operation.invoke(Short.valueOf(sArr[lastIndex]), r);
}
return r;
}
public static final <R> R foldRight(int[] iArr, R r, Function2<? super Integer, ? super R, ? extends R> operation) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
for (int lastIndex = ArraysKt.getLastIndex(iArr); lastIndex >= 0; lastIndex--) {
r = operation.invoke(Integer.valueOf(iArr[lastIndex]), r);
}
return r;
}
public static final <R> R foldRight(long[] jArr, R r, Function2<? super Long, ? super R, ? extends R> operation) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
for (int lastIndex = ArraysKt.getLastIndex(jArr); lastIndex >= 0; lastIndex--) {
r = operation.invoke(Long.valueOf(jArr[lastIndex]), r);
}
return r;
}
public static final <R> R foldRight(float[] fArr, R r, Function2<? super Float, ? super R, ? extends R> operation) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
for (int lastIndex = ArraysKt.getLastIndex(fArr); lastIndex >= 0; lastIndex--) {
r = operation.invoke(Float.valueOf(fArr[lastIndex]), r);
}
return r;
}
public static final <R> R foldRight(double[] dArr, R r, Function2<? super Double, ? super R, ? extends R> operation) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
for (int lastIndex = ArraysKt.getLastIndex(dArr); lastIndex >= 0; lastIndex--) {
r = operation.invoke(Double.valueOf(dArr[lastIndex]), r);
}
return r;
}
public static final <R> R foldRight(boolean[] zArr, R r, Function2<? super Boolean, ? super R, ? extends R> operation) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
for (int lastIndex = ArraysKt.getLastIndex(zArr); lastIndex >= 0; lastIndex--) {
r = operation.invoke(Boolean.valueOf(zArr[lastIndex]), r);
}
return r;
}
public static final <R> R foldRight(char[] cArr, R r, Function2<? super Character, ? super R, ? extends R> operation) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
for (int lastIndex = ArraysKt.getLastIndex(cArr); lastIndex >= 0; lastIndex--) {
r = operation.invoke(Character.valueOf(cArr[lastIndex]), r);
}
return r;
}
/* JADX WARN: Multi-variable type inference failed */
public static final <T, R> R foldRightIndexed(T[] tArr, R r, Function3<? super Integer, ? super T, ? super R, ? extends R> operation) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
for (int lastIndex = ArraysKt.getLastIndex(tArr); lastIndex >= 0; lastIndex--) {
r = operation.invoke(Integer.valueOf(lastIndex), tArr[lastIndex], r);
}
return r;
}
public static final <R> R foldRightIndexed(byte[] bArr, R r, Function3<? super Integer, ? super Byte, ? super R, ? extends R> operation) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
for (int lastIndex = ArraysKt.getLastIndex(bArr); lastIndex >= 0; lastIndex--) {
r = operation.invoke(Integer.valueOf(lastIndex), Byte.valueOf(bArr[lastIndex]), r);
}
return r;
}
public static final <R> R foldRightIndexed(short[] sArr, R r, Function3<? super Integer, ? super Short, ? super R, ? extends R> operation) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
for (int lastIndex = ArraysKt.getLastIndex(sArr); lastIndex >= 0; lastIndex--) {
r = operation.invoke(Integer.valueOf(lastIndex), Short.valueOf(sArr[lastIndex]), r);
}
return r;
}
public static final <R> R foldRightIndexed(int[] iArr, R r, Function3<? super Integer, ? super Integer, ? super R, ? extends R> operation) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
for (int lastIndex = ArraysKt.getLastIndex(iArr); lastIndex >= 0; lastIndex--) {
r = operation.invoke(Integer.valueOf(lastIndex), Integer.valueOf(iArr[lastIndex]), r);
}
return r;
}
public static final <R> R foldRightIndexed(long[] jArr, R r, Function3<? super Integer, ? super Long, ? super R, ? extends R> operation) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
for (int lastIndex = ArraysKt.getLastIndex(jArr); lastIndex >= 0; lastIndex--) {
r = operation.invoke(Integer.valueOf(lastIndex), Long.valueOf(jArr[lastIndex]), r);
}
return r;
}
public static final <R> R foldRightIndexed(float[] fArr, R r, Function3<? super Integer, ? super Float, ? super R, ? extends R> operation) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
for (int lastIndex = ArraysKt.getLastIndex(fArr); lastIndex >= 0; lastIndex--) {
r = operation.invoke(Integer.valueOf(lastIndex), Float.valueOf(fArr[lastIndex]), r);
}
return r;
}
public static final <R> R foldRightIndexed(double[] dArr, R r, Function3<? super Integer, ? super Double, ? super R, ? extends R> operation) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
for (int lastIndex = ArraysKt.getLastIndex(dArr); lastIndex >= 0; lastIndex--) {
r = operation.invoke(Integer.valueOf(lastIndex), Double.valueOf(dArr[lastIndex]), r);
}
return r;
}
public static final <R> R foldRightIndexed(boolean[] zArr, R r, Function3<? super Integer, ? super Boolean, ? super R, ? extends R> operation) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
for (int lastIndex = ArraysKt.getLastIndex(zArr); lastIndex >= 0; lastIndex--) {
r = operation.invoke(Integer.valueOf(lastIndex), Boolean.valueOf(zArr[lastIndex]), r);
}
return r;
}
public static final <R> R foldRightIndexed(char[] cArr, R r, Function3<? super Integer, ? super Character, ? super R, ? extends R> operation) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
for (int lastIndex = ArraysKt.getLastIndex(cArr); lastIndex >= 0; lastIndex--) {
r = operation.invoke(Integer.valueOf(lastIndex), Character.valueOf(cArr[lastIndex]), r);
}
return r;
}
public static final <T> void forEach(T[] tArr, Function1<? super T, Unit> action) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(action, "action");
for (T t : tArr) {
action.invoke(t);
}
}
public static final void forEach(byte[] bArr, Function1<? super Byte, Unit> action) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(action, "action");
for (byte b : bArr) {
action.invoke(Byte.valueOf(b));
}
}
public static final void forEach(short[] sArr, Function1<? super Short, Unit> action) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(action, "action");
for (short s : sArr) {
action.invoke(Short.valueOf(s));
}
}
public static final void forEach(int[] iArr, Function1<? super Integer, Unit> action) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(action, "action");
for (int i : iArr) {
action.invoke(Integer.valueOf(i));
}
}
public static final void forEach(long[] jArr, Function1<? super Long, Unit> action) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(action, "action");
for (long j : jArr) {
action.invoke(Long.valueOf(j));
}
}
public static final void forEach(float[] fArr, Function1<? super Float, Unit> action) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(action, "action");
for (float f : fArr) {
action.invoke(Float.valueOf(f));
}
}
public static final void forEach(double[] dArr, Function1<? super Double, Unit> action) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(action, "action");
for (double d : dArr) {
action.invoke(Double.valueOf(d));
}
}
public static final void forEach(boolean[] zArr, Function1<? super Boolean, Unit> action) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(action, "action");
for (boolean z : zArr) {
action.invoke(Boolean.valueOf(z));
}
}
public static final void forEach(char[] cArr, Function1<? super Character, Unit> action) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(action, "action");
for (char c : cArr) {
action.invoke(Character.valueOf(c));
}
}
public static final <T> void forEachIndexed(T[] tArr, Function2<? super Integer, ? super T, Unit> action) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(action, "action");
int length = tArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
action.invoke(Integer.valueOf(i2), tArr[i]);
i++;
i2++;
}
}
public static final void forEachIndexed(byte[] bArr, Function2<? super Integer, ? super Byte, Unit> action) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(action, "action");
int length = bArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
action.invoke(Integer.valueOf(i2), Byte.valueOf(bArr[i]));
i++;
i2++;
}
}
public static final void forEachIndexed(short[] sArr, Function2<? super Integer, ? super Short, Unit> action) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(action, "action");
int length = sArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
action.invoke(Integer.valueOf(i2), Short.valueOf(sArr[i]));
i++;
i2++;
}
}
public static final void forEachIndexed(int[] iArr, Function2<? super Integer, ? super Integer, Unit> action) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(action, "action");
int length = iArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
action.invoke(Integer.valueOf(i2), Integer.valueOf(iArr[i]));
i++;
i2++;
}
}
public static final void forEachIndexed(long[] jArr, Function2<? super Integer, ? super Long, Unit> action) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(action, "action");
int length = jArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
action.invoke(Integer.valueOf(i2), Long.valueOf(jArr[i]));
i++;
i2++;
}
}
public static final void forEachIndexed(float[] fArr, Function2<? super Integer, ? super Float, Unit> action) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(action, "action");
int length = fArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
action.invoke(Integer.valueOf(i2), Float.valueOf(fArr[i]));
i++;
i2++;
}
}
public static final void forEachIndexed(double[] dArr, Function2<? super Integer, ? super Double, Unit> action) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(action, "action");
int length = dArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
action.invoke(Integer.valueOf(i2), Double.valueOf(dArr[i]));
i++;
i2++;
}
}
public static final void forEachIndexed(boolean[] zArr, Function2<? super Integer, ? super Boolean, Unit> action) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(action, "action");
int length = zArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
action.invoke(Integer.valueOf(i2), Boolean.valueOf(zArr[i]));
i++;
i2++;
}
}
public static final void forEachIndexed(char[] cArr, Function2<? super Integer, ? super Character, Unit> action) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(action, "action");
int length = cArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
action.invoke(Integer.valueOf(i2), Character.valueOf(cArr[i]));
i++;
i2++;
}
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
public static final double maxOrThrow(Double[] dArr) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
if (dArr.length == 0) {
throw new NoSuchElementException();
}
double doubleValue = dArr[0].doubleValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(dArr)).iterator();
while (it.hasNext()) {
doubleValue = Math.max(doubleValue, dArr[it.nextInt()].doubleValue());
}
return doubleValue;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final float maxOrThrow(Float[] fArr) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
if (fArr.length == 0) {
throw new NoSuchElementException();
}
float floatValue = fArr[0].floatValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(fArr)).iterator();
while (it.hasNext()) {
floatValue = Math.max(floatValue, fArr[it.nextInt()].floatValue());
}
return floatValue;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final <T extends Comparable<? super T>> T maxOrThrow(T[] tArr) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
if (tArr.length == 0) {
throw new NoSuchElementException();
}
T t = tArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(tArr)).iterator();
while (it.hasNext()) {
T t2 = tArr[it.nextInt()];
if (t.compareTo(t2) < 0) {
t = t2;
}
}
return t;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final byte maxOrThrow(byte[] bArr) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
if (bArr.length == 0) {
throw new NoSuchElementException();
}
byte b = bArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(bArr)).iterator();
while (it.hasNext()) {
byte b2 = bArr[it.nextInt()];
if (b < b2) {
b = b2;
}
}
return b;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final short maxOrThrow(short[] sArr) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
if (sArr.length == 0) {
throw new NoSuchElementException();
}
short s = sArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(sArr)).iterator();
while (it.hasNext()) {
short s2 = sArr[it.nextInt()];
if (s < s2) {
s = s2;
}
}
return s;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final int maxOrThrow(int[] iArr) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
if (iArr.length == 0) {
throw new NoSuchElementException();
}
int i = iArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(iArr)).iterator();
while (it.hasNext()) {
int i2 = iArr[it.nextInt()];
if (i < i2) {
i = i2;
}
}
return i;
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
public static final long maxOrThrow(long[] jArr) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
if (jArr.length == 0) {
throw new NoSuchElementException();
}
long j = jArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(jArr)).iterator();
while (it.hasNext()) {
long j2 = jArr[it.nextInt()];
if (j < j2) {
j = j2;
}
}
return j;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final float maxOrThrow(float[] fArr) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
if (fArr.length == 0) {
throw new NoSuchElementException();
}
float f = fArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(fArr)).iterator();
while (it.hasNext()) {
f = Math.max(f, fArr[it.nextInt()]);
}
return f;
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
public static final double maxOrThrow(double[] dArr) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
if (dArr.length == 0) {
throw new NoSuchElementException();
}
double d = dArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(dArr)).iterator();
while (it.hasNext()) {
d = Math.max(d, dArr[it.nextInt()]);
}
return d;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final char maxOrThrow(char[] cArr) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
if (cArr.length == 0) {
throw new NoSuchElementException();
}
char c = cArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(cArr)).iterator();
while (it.hasNext()) {
char c2 = cArr[it.nextInt()];
if (Intrinsics.compare((int) c, (int) c2) < 0) {
c = c2;
}
}
return c;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final <T, R extends Comparable<? super R>> T maxByOrThrow(T[] tArr, Function1<? super T, ? extends R> selector) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (tArr.length == 0) {
throw new NoSuchElementException();
}
T t = tArr[0];
int lastIndex = ArraysKt.getLastIndex(tArr);
if (lastIndex == 0) {
return t;
}
R invoke = selector.invoke(t);
?? it = new IntRange(1, lastIndex).iterator();
while (it.hasNext()) {
T t2 = tArr[it.nextInt()];
R invoke2 = selector.invoke(t2);
if (invoke.compareTo(invoke2) < 0) {
t = t2;
invoke = invoke2;
}
}
return t;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final <R extends Comparable<? super R>> byte maxByOrThrow(byte[] bArr, Function1<? super Byte, ? extends R> selector) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (bArr.length == 0) {
throw new NoSuchElementException();
}
byte b = bArr[0];
int lastIndex = ArraysKt.getLastIndex(bArr);
if (lastIndex == 0) {
return b;
}
R invoke = selector.invoke(Byte.valueOf(b));
?? it = new IntRange(1, lastIndex).iterator();
while (it.hasNext()) {
byte b2 = bArr[it.nextInt()];
R invoke2 = selector.invoke(Byte.valueOf(b2));
if (invoke.compareTo(invoke2) < 0) {
b = b2;
invoke = invoke2;
}
}
return b;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final <R extends Comparable<? super R>> short maxByOrThrow(short[] sArr, Function1<? super Short, ? extends R> selector) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (sArr.length == 0) {
throw new NoSuchElementException();
}
short s = sArr[0];
int lastIndex = ArraysKt.getLastIndex(sArr);
if (lastIndex == 0) {
return s;
}
R invoke = selector.invoke(Short.valueOf(s));
?? it = new IntRange(1, lastIndex).iterator();
while (it.hasNext()) {
short s2 = sArr[it.nextInt()];
R invoke2 = selector.invoke(Short.valueOf(s2));
if (invoke.compareTo(invoke2) < 0) {
s = s2;
invoke = invoke2;
}
}
return s;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final <R extends Comparable<? super R>> int maxByOrThrow(int[] iArr, Function1<? super Integer, ? extends R> selector) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (iArr.length == 0) {
throw new NoSuchElementException();
}
int i = iArr[0];
int lastIndex = ArraysKt.getLastIndex(iArr);
if (lastIndex == 0) {
return i;
}
R invoke = selector.invoke(Integer.valueOf(i));
?? it = new IntRange(1, lastIndex).iterator();
while (it.hasNext()) {
int i2 = iArr[it.nextInt()];
R invoke2 = selector.invoke(Integer.valueOf(i2));
if (invoke.compareTo(invoke2) < 0) {
i = i2;
invoke = invoke2;
}
}
return i;
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
public static final <R extends Comparable<? super R>> long maxByOrThrow(long[] jArr, Function1<? super Long, ? extends R> selector) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (jArr.length == 0) {
throw new NoSuchElementException();
}
long j = jArr[0];
int lastIndex = ArraysKt.getLastIndex(jArr);
if (lastIndex == 0) {
return j;
}
R invoke = selector.invoke(Long.valueOf(j));
?? it = new IntRange(1, lastIndex).iterator();
while (it.hasNext()) {
long j2 = jArr[it.nextInt()];
R invoke2 = selector.invoke(Long.valueOf(j2));
if (invoke.compareTo(invoke2) < 0) {
j = j2;
invoke = invoke2;
}
}
return j;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final <R extends Comparable<? super R>> float maxByOrThrow(float[] fArr, Function1<? super Float, ? extends R> selector) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (fArr.length == 0) {
throw new NoSuchElementException();
}
float f = fArr[0];
int lastIndex = ArraysKt.getLastIndex(fArr);
if (lastIndex == 0) {
return f;
}
R invoke = selector.invoke(Float.valueOf(f));
?? it = new IntRange(1, lastIndex).iterator();
while (it.hasNext()) {
float f2 = fArr[it.nextInt()];
R invoke2 = selector.invoke(Float.valueOf(f2));
if (invoke.compareTo(invoke2) < 0) {
f = f2;
invoke = invoke2;
}
}
return f;
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
public static final <R extends Comparable<? super R>> double maxByOrThrow(double[] dArr, Function1<? super Double, ? extends R> selector) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (dArr.length == 0) {
throw new NoSuchElementException();
}
double d = dArr[0];
int lastIndex = ArraysKt.getLastIndex(dArr);
if (lastIndex == 0) {
return d;
}
R invoke = selector.invoke(Double.valueOf(d));
?? it = new IntRange(1, lastIndex).iterator();
while (it.hasNext()) {
double d2 = dArr[it.nextInt()];
R invoke2 = selector.invoke(Double.valueOf(d2));
if (invoke.compareTo(invoke2) < 0) {
d = d2;
invoke = invoke2;
}
}
return d;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final <R extends Comparable<? super R>> boolean maxByOrThrow(boolean[] zArr, Function1<? super Boolean, ? extends R> selector) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (zArr.length == 0) {
throw new NoSuchElementException();
}
boolean z = zArr[0];
int lastIndex = ArraysKt.getLastIndex(zArr);
if (lastIndex == 0) {
return z;
}
R invoke = selector.invoke(Boolean.valueOf(z));
?? it = new IntRange(1, lastIndex).iterator();
while (it.hasNext()) {
boolean z2 = zArr[it.nextInt()];
R invoke2 = selector.invoke(Boolean.valueOf(z2));
if (invoke.compareTo(invoke2) < 0) {
z = z2;
invoke = invoke2;
}
}
return z;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final <R extends Comparable<? super R>> char maxByOrThrow(char[] cArr, Function1<? super Character, ? extends R> selector) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (cArr.length == 0) {
throw new NoSuchElementException();
}
char c = cArr[0];
int lastIndex = ArraysKt.getLastIndex(cArr);
if (lastIndex == 0) {
return c;
}
R invoke = selector.invoke(Character.valueOf(c));
?? it = new IntRange(1, lastIndex).iterator();
while (it.hasNext()) {
char c2 = cArr[it.nextInt()];
R invoke2 = selector.invoke(Character.valueOf(c2));
if (invoke.compareTo(invoke2) < 0) {
c = c2;
invoke = invoke2;
}
}
return c;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final <T, R extends Comparable<? super R>> T maxByOrNull(T[] tArr, Function1<? super T, ? extends R> selector) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (tArr.length == 0) {
return null;
}
T t = tArr[0];
int lastIndex = ArraysKt.getLastIndex(tArr);
if (lastIndex == 0) {
return t;
}
R invoke = selector.invoke(t);
?? it = new IntRange(1, lastIndex).iterator();
while (it.hasNext()) {
T t2 = tArr[it.nextInt()];
R invoke2 = selector.invoke(t2);
if (invoke.compareTo(invoke2) < 0) {
t = t2;
invoke = invoke2;
}
}
return t;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final <R extends Comparable<? super R>> Byte maxByOrNull(byte[] bArr, Function1<? super Byte, ? extends R> selector) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (bArr.length == 0) {
return null;
}
byte b = bArr[0];
int lastIndex = ArraysKt.getLastIndex(bArr);
if (lastIndex == 0) {
return Byte.valueOf(b);
}
R invoke = selector.invoke(Byte.valueOf(b));
?? it = new IntRange(1, lastIndex).iterator();
while (it.hasNext()) {
byte b2 = bArr[it.nextInt()];
R invoke2 = selector.invoke(Byte.valueOf(b2));
if (invoke.compareTo(invoke2) < 0) {
b = b2;
invoke = invoke2;
}
}
return Byte.valueOf(b);
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final <R extends Comparable<? super R>> Short maxByOrNull(short[] sArr, Function1<? super Short, ? extends R> selector) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (sArr.length == 0) {
return null;
}
short s = sArr[0];
int lastIndex = ArraysKt.getLastIndex(sArr);
if (lastIndex == 0) {
return Short.valueOf(s);
}
R invoke = selector.invoke(Short.valueOf(s));
?? it = new IntRange(1, lastIndex).iterator();
while (it.hasNext()) {
short s2 = sArr[it.nextInt()];
R invoke2 = selector.invoke(Short.valueOf(s2));
if (invoke.compareTo(invoke2) < 0) {
s = s2;
invoke = invoke2;
}
}
return Short.valueOf(s);
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final <R extends Comparable<? super R>> Integer maxByOrNull(int[] iArr, Function1<? super Integer, ? extends R> selector) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (iArr.length == 0) {
return null;
}
int i = iArr[0];
int lastIndex = ArraysKt.getLastIndex(iArr);
if (lastIndex == 0) {
return Integer.valueOf(i);
}
R invoke = selector.invoke(Integer.valueOf(i));
?? it = new IntRange(1, lastIndex).iterator();
while (it.hasNext()) {
int i2 = iArr[it.nextInt()];
R invoke2 = selector.invoke(Integer.valueOf(i2));
if (invoke.compareTo(invoke2) < 0) {
i = i2;
invoke = invoke2;
}
}
return Integer.valueOf(i);
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
public static final <R extends Comparable<? super R>> Long maxByOrNull(long[] jArr, Function1<? super Long, ? extends R> selector) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (jArr.length == 0) {
return null;
}
long j = jArr[0];
int lastIndex = ArraysKt.getLastIndex(jArr);
if (lastIndex == 0) {
return Long.valueOf(j);
}
R invoke = selector.invoke(Long.valueOf(j));
?? it = new IntRange(1, lastIndex).iterator();
while (it.hasNext()) {
long j2 = jArr[it.nextInt()];
R invoke2 = selector.invoke(Long.valueOf(j2));
if (invoke.compareTo(invoke2) < 0) {
j = j2;
invoke = invoke2;
}
}
return Long.valueOf(j);
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final <R extends Comparable<? super R>> Float maxByOrNull(float[] fArr, Function1<? super Float, ? extends R> selector) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (fArr.length == 0) {
return null;
}
float f = fArr[0];
int lastIndex = ArraysKt.getLastIndex(fArr);
if (lastIndex == 0) {
return Float.valueOf(f);
}
R invoke = selector.invoke(Float.valueOf(f));
?? it = new IntRange(1, lastIndex).iterator();
while (it.hasNext()) {
float f2 = fArr[it.nextInt()];
R invoke2 = selector.invoke(Float.valueOf(f2));
if (invoke.compareTo(invoke2) < 0) {
f = f2;
invoke = invoke2;
}
}
return Float.valueOf(f);
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
public static final <R extends Comparable<? super R>> Double maxByOrNull(double[] dArr, Function1<? super Double, ? extends R> selector) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (dArr.length == 0) {
return null;
}
double d = dArr[0];
int lastIndex = ArraysKt.getLastIndex(dArr);
if (lastIndex == 0) {
return Double.valueOf(d);
}
R invoke = selector.invoke(Double.valueOf(d));
?? it = new IntRange(1, lastIndex).iterator();
while (it.hasNext()) {
double d2 = dArr[it.nextInt()];
R invoke2 = selector.invoke(Double.valueOf(d2));
if (invoke.compareTo(invoke2) < 0) {
d = d2;
invoke = invoke2;
}
}
return Double.valueOf(d);
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final <R extends Comparable<? super R>> Boolean maxByOrNull(boolean[] zArr, Function1<? super Boolean, ? extends R> selector) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (zArr.length == 0) {
return null;
}
boolean z = zArr[0];
int lastIndex = ArraysKt.getLastIndex(zArr);
if (lastIndex == 0) {
return Boolean.valueOf(z);
}
R invoke = selector.invoke(Boolean.valueOf(z));
?? it = new IntRange(1, lastIndex).iterator();
while (it.hasNext()) {
boolean z2 = zArr[it.nextInt()];
R invoke2 = selector.invoke(Boolean.valueOf(z2));
if (invoke.compareTo(invoke2) < 0) {
z = z2;
invoke = invoke2;
}
}
return Boolean.valueOf(z);
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final <R extends Comparable<? super R>> Character maxByOrNull(char[] cArr, Function1<? super Character, ? extends R> selector) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (cArr.length == 0) {
return null;
}
char c = cArr[0];
int lastIndex = ArraysKt.getLastIndex(cArr);
if (lastIndex == 0) {
return Character.valueOf(c);
}
R invoke = selector.invoke(Character.valueOf(c));
?? it = new IntRange(1, lastIndex).iterator();
while (it.hasNext()) {
char c2 = cArr[it.nextInt()];
R invoke2 = selector.invoke(Character.valueOf(c2));
if (invoke.compareTo(invoke2) < 0) {
c = c2;
invoke = invoke2;
}
}
return Character.valueOf(c);
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
private static final <T> double maxOf(T[] tArr, Function1<? super T, Double> selector) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (tArr.length == 0) {
throw new NoSuchElementException();
}
double doubleValue = selector.invoke(tArr[0]).doubleValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(tArr)).iterator();
while (it.hasNext()) {
doubleValue = Math.max(doubleValue, selector.invoke(tArr[it.nextInt()]).doubleValue());
}
return doubleValue;
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
private static final double maxOf(byte[] bArr, Function1<? super Byte, Double> selector) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (bArr.length == 0) {
throw new NoSuchElementException();
}
double doubleValue = selector.invoke(Byte.valueOf(bArr[0])).doubleValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(bArr)).iterator();
while (it.hasNext()) {
doubleValue = Math.max(doubleValue, selector.invoke(Byte.valueOf(bArr[it.nextInt()])).doubleValue());
}
return doubleValue;
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
private static final double maxOf(short[] sArr, Function1<? super Short, Double> selector) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (sArr.length == 0) {
throw new NoSuchElementException();
}
double doubleValue = selector.invoke(Short.valueOf(sArr[0])).doubleValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(sArr)).iterator();
while (it.hasNext()) {
doubleValue = Math.max(doubleValue, selector.invoke(Short.valueOf(sArr[it.nextInt()])).doubleValue());
}
return doubleValue;
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
private static final double maxOf(int[] iArr, Function1<? super Integer, Double> selector) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (iArr.length == 0) {
throw new NoSuchElementException();
}
double doubleValue = selector.invoke(Integer.valueOf(iArr[0])).doubleValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(iArr)).iterator();
while (it.hasNext()) {
doubleValue = Math.max(doubleValue, selector.invoke(Integer.valueOf(iArr[it.nextInt()])).doubleValue());
}
return doubleValue;
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
private static final double maxOf(long[] jArr, Function1<? super Long, Double> selector) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (jArr.length == 0) {
throw new NoSuchElementException();
}
double doubleValue = selector.invoke(Long.valueOf(jArr[0])).doubleValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(jArr)).iterator();
while (it.hasNext()) {
doubleValue = Math.max(doubleValue, selector.invoke(Long.valueOf(jArr[it.nextInt()])).doubleValue());
}
return doubleValue;
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
private static final double maxOf(float[] fArr, Function1<? super Float, Double> selector) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (fArr.length == 0) {
throw new NoSuchElementException();
}
double doubleValue = selector.invoke(Float.valueOf(fArr[0])).doubleValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(fArr)).iterator();
while (it.hasNext()) {
doubleValue = Math.max(doubleValue, selector.invoke(Float.valueOf(fArr[it.nextInt()])).doubleValue());
}
return doubleValue;
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
private static final double maxOf(double[] dArr, Function1<? super Double, Double> selector) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (dArr.length == 0) {
throw new NoSuchElementException();
}
double doubleValue = selector.invoke(Double.valueOf(dArr[0])).doubleValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(dArr)).iterator();
while (it.hasNext()) {
doubleValue = Math.max(doubleValue, selector.invoke(Double.valueOf(dArr[it.nextInt()])).doubleValue());
}
return doubleValue;
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
private static final double maxOf(boolean[] zArr, Function1<? super Boolean, Double> selector) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (zArr.length == 0) {
throw new NoSuchElementException();
}
double doubleValue = selector.invoke(Boolean.valueOf(zArr[0])).doubleValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(zArr)).iterator();
while (it.hasNext()) {
doubleValue = Math.max(doubleValue, selector.invoke(Boolean.valueOf(zArr[it.nextInt()])).doubleValue());
}
return doubleValue;
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
private static final double maxOf(char[] cArr, Function1<? super Character, Double> selector) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (cArr.length == 0) {
throw new NoSuchElementException();
}
double doubleValue = selector.invoke(Character.valueOf(cArr[0])).doubleValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(cArr)).iterator();
while (it.hasNext()) {
doubleValue = Math.max(doubleValue, selector.invoke(Character.valueOf(cArr[it.nextInt()])).doubleValue());
}
return doubleValue;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
/* renamed from: maxOf, reason: collision with other method in class */
private static final <T> float m6059maxOf(T[] tArr, Function1<? super T, Float> selector) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (tArr.length == 0) {
throw new NoSuchElementException();
}
float floatValue = selector.invoke(tArr[0]).floatValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(tArr)).iterator();
while (it.hasNext()) {
floatValue = Math.max(floatValue, selector.invoke(tArr[it.nextInt()]).floatValue());
}
return floatValue;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
/* renamed from: maxOf, reason: collision with other method in class */
private static final float m6053maxOf(byte[] bArr, Function1<? super Byte, Float> selector) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (bArr.length == 0) {
throw new NoSuchElementException();
}
float floatValue = selector.invoke(Byte.valueOf(bArr[0])).floatValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(bArr)).iterator();
while (it.hasNext()) {
floatValue = Math.max(floatValue, selector.invoke(Byte.valueOf(bArr[it.nextInt()])).floatValue());
}
return floatValue;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
/* renamed from: maxOf, reason: collision with other method in class */
private static final float m6060maxOf(short[] sArr, Function1<? super Short, Float> selector) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (sArr.length == 0) {
throw new NoSuchElementException();
}
float floatValue = selector.invoke(Short.valueOf(sArr[0])).floatValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(sArr)).iterator();
while (it.hasNext()) {
floatValue = Math.max(floatValue, selector.invoke(Short.valueOf(sArr[it.nextInt()])).floatValue());
}
return floatValue;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
/* renamed from: maxOf, reason: collision with other method in class */
private static final float m6057maxOf(int[] iArr, Function1<? super Integer, Float> selector) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (iArr.length == 0) {
throw new NoSuchElementException();
}
float floatValue = selector.invoke(Integer.valueOf(iArr[0])).floatValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(iArr)).iterator();
while (it.hasNext()) {
floatValue = Math.max(floatValue, selector.invoke(Integer.valueOf(iArr[it.nextInt()])).floatValue());
}
return floatValue;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
/* renamed from: maxOf, reason: collision with other method in class */
private static final float m6058maxOf(long[] jArr, Function1<? super Long, Float> selector) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (jArr.length == 0) {
throw new NoSuchElementException();
}
float floatValue = selector.invoke(Long.valueOf(jArr[0])).floatValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(jArr)).iterator();
while (it.hasNext()) {
floatValue = Math.max(floatValue, selector.invoke(Long.valueOf(jArr[it.nextInt()])).floatValue());
}
return floatValue;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
/* renamed from: maxOf, reason: collision with other method in class */
private static final float m6056maxOf(float[] fArr, Function1<? super Float, Float> selector) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (fArr.length == 0) {
throw new NoSuchElementException();
}
float floatValue = selector.invoke(Float.valueOf(fArr[0])).floatValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(fArr)).iterator();
while (it.hasNext()) {
floatValue = Math.max(floatValue, selector.invoke(Float.valueOf(fArr[it.nextInt()])).floatValue());
}
return floatValue;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
/* renamed from: maxOf, reason: collision with other method in class */
private static final float m6055maxOf(double[] dArr, Function1<? super Double, Float> selector) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (dArr.length == 0) {
throw new NoSuchElementException();
}
float floatValue = selector.invoke(Double.valueOf(dArr[0])).floatValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(dArr)).iterator();
while (it.hasNext()) {
floatValue = Math.max(floatValue, selector.invoke(Double.valueOf(dArr[it.nextInt()])).floatValue());
}
return floatValue;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
/* renamed from: maxOf, reason: collision with other method in class */
private static final float m6061maxOf(boolean[] zArr, Function1<? super Boolean, Float> selector) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (zArr.length == 0) {
throw new NoSuchElementException();
}
float floatValue = selector.invoke(Boolean.valueOf(zArr[0])).floatValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(zArr)).iterator();
while (it.hasNext()) {
floatValue = Math.max(floatValue, selector.invoke(Boolean.valueOf(zArr[it.nextInt()])).floatValue());
}
return floatValue;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
/* renamed from: maxOf, reason: collision with other method in class */
private static final float m6054maxOf(char[] cArr, Function1<? super Character, Float> selector) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (cArr.length == 0) {
throw new NoSuchElementException();
}
float floatValue = selector.invoke(Character.valueOf(cArr[0])).floatValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(cArr)).iterator();
while (it.hasNext()) {
floatValue = Math.max(floatValue, selector.invoke(Character.valueOf(cArr[it.nextInt()])).floatValue());
}
return floatValue;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
/* renamed from: maxOf, reason: collision with other method in class */
private static final <T, R extends Comparable<? super R>> R m6068maxOf(T[] tArr, Function1<? super T, ? extends R> selector) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (tArr.length == 0) {
throw new NoSuchElementException();
}
R invoke = selector.invoke(tArr[0]);
?? it = new IntRange(1, ArraysKt.getLastIndex(tArr)).iterator();
while (it.hasNext()) {
R invoke2 = selector.invoke(tArr[it.nextInt()]);
if (invoke.compareTo(invoke2) < 0) {
invoke = invoke2;
}
}
return invoke;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
/* renamed from: maxOf, reason: collision with other method in class */
private static final <R extends Comparable<? super R>> R m6062maxOf(byte[] bArr, Function1<? super Byte, ? extends R> selector) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (bArr.length == 0) {
throw new NoSuchElementException();
}
R invoke = selector.invoke(Byte.valueOf(bArr[0]));
?? it = new IntRange(1, ArraysKt.getLastIndex(bArr)).iterator();
while (it.hasNext()) {
R invoke2 = selector.invoke(Byte.valueOf(bArr[it.nextInt()]));
if (invoke.compareTo(invoke2) < 0) {
invoke = invoke2;
}
}
return invoke;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
/* renamed from: maxOf, reason: collision with other method in class */
private static final <R extends Comparable<? super R>> R m6069maxOf(short[] sArr, Function1<? super Short, ? extends R> selector) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (sArr.length == 0) {
throw new NoSuchElementException();
}
R invoke = selector.invoke(Short.valueOf(sArr[0]));
?? it = new IntRange(1, ArraysKt.getLastIndex(sArr)).iterator();
while (it.hasNext()) {
R invoke2 = selector.invoke(Short.valueOf(sArr[it.nextInt()]));
if (invoke.compareTo(invoke2) < 0) {
invoke = invoke2;
}
}
return invoke;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
/* renamed from: maxOf, reason: collision with other method in class */
private static final <R extends Comparable<? super R>> R m6066maxOf(int[] iArr, Function1<? super Integer, ? extends R> selector) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (iArr.length == 0) {
throw new NoSuchElementException();
}
R invoke = selector.invoke(Integer.valueOf(iArr[0]));
?? it = new IntRange(1, ArraysKt.getLastIndex(iArr)).iterator();
while (it.hasNext()) {
R invoke2 = selector.invoke(Integer.valueOf(iArr[it.nextInt()]));
if (invoke.compareTo(invoke2) < 0) {
invoke = invoke2;
}
}
return invoke;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
/* renamed from: maxOf, reason: collision with other method in class */
private static final <R extends Comparable<? super R>> R m6067maxOf(long[] jArr, Function1<? super Long, ? extends R> selector) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (jArr.length == 0) {
throw new NoSuchElementException();
}
R invoke = selector.invoke(Long.valueOf(jArr[0]));
?? it = new IntRange(1, ArraysKt.getLastIndex(jArr)).iterator();
while (it.hasNext()) {
R invoke2 = selector.invoke(Long.valueOf(jArr[it.nextInt()]));
if (invoke.compareTo(invoke2) < 0) {
invoke = invoke2;
}
}
return invoke;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
/* renamed from: maxOf, reason: collision with other method in class */
private static final <R extends Comparable<? super R>> R m6065maxOf(float[] fArr, Function1<? super Float, ? extends R> selector) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (fArr.length == 0) {
throw new NoSuchElementException();
}
R invoke = selector.invoke(Float.valueOf(fArr[0]));
?? it = new IntRange(1, ArraysKt.getLastIndex(fArr)).iterator();
while (it.hasNext()) {
R invoke2 = selector.invoke(Float.valueOf(fArr[it.nextInt()]));
if (invoke.compareTo(invoke2) < 0) {
invoke = invoke2;
}
}
return invoke;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
/* renamed from: maxOf, reason: collision with other method in class */
private static final <R extends Comparable<? super R>> R m6064maxOf(double[] dArr, Function1<? super Double, ? extends R> selector) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (dArr.length == 0) {
throw new NoSuchElementException();
}
R invoke = selector.invoke(Double.valueOf(dArr[0]));
?? it = new IntRange(1, ArraysKt.getLastIndex(dArr)).iterator();
while (it.hasNext()) {
R invoke2 = selector.invoke(Double.valueOf(dArr[it.nextInt()]));
if (invoke.compareTo(invoke2) < 0) {
invoke = invoke2;
}
}
return invoke;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
/* renamed from: maxOf, reason: collision with other method in class */
private static final <R extends Comparable<? super R>> R m6070maxOf(boolean[] zArr, Function1<? super Boolean, ? extends R> selector) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (zArr.length == 0) {
throw new NoSuchElementException();
}
R invoke = selector.invoke(Boolean.valueOf(zArr[0]));
?? it = new IntRange(1, ArraysKt.getLastIndex(zArr)).iterator();
while (it.hasNext()) {
R invoke2 = selector.invoke(Boolean.valueOf(zArr[it.nextInt()]));
if (invoke.compareTo(invoke2) < 0) {
invoke = invoke2;
}
}
return invoke;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
/* renamed from: maxOf, reason: collision with other method in class */
private static final <R extends Comparable<? super R>> R m6063maxOf(char[] cArr, Function1<? super Character, ? extends R> selector) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (cArr.length == 0) {
throw new NoSuchElementException();
}
R invoke = selector.invoke(Character.valueOf(cArr[0]));
?? it = new IntRange(1, ArraysKt.getLastIndex(cArr)).iterator();
while (it.hasNext()) {
R invoke2 = selector.invoke(Character.valueOf(cArr[it.nextInt()]));
if (invoke.compareTo(invoke2) < 0) {
invoke = invoke2;
}
}
return invoke;
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
/* renamed from: maxOfOrNull, reason: collision with other method in class */
private static final <T> Double m6077maxOfOrNull(T[] tArr, Function1<? super T, Double> selector) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (tArr.length == 0) {
return null;
}
double doubleValue = selector.invoke(tArr[0]).doubleValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(tArr)).iterator();
while (it.hasNext()) {
doubleValue = Math.max(doubleValue, selector.invoke(tArr[it.nextInt()]).doubleValue());
}
return Double.valueOf(doubleValue);
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
/* renamed from: maxOfOrNull, reason: collision with other method in class */
private static final Double m6071maxOfOrNull(byte[] bArr, Function1<? super Byte, Double> selector) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (bArr.length == 0) {
return null;
}
double doubleValue = selector.invoke(Byte.valueOf(bArr[0])).doubleValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(bArr)).iterator();
while (it.hasNext()) {
doubleValue = Math.max(doubleValue, selector.invoke(Byte.valueOf(bArr[it.nextInt()])).doubleValue());
}
return Double.valueOf(doubleValue);
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
/* renamed from: maxOfOrNull, reason: collision with other method in class */
private static final Double m6078maxOfOrNull(short[] sArr, Function1<? super Short, Double> selector) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (sArr.length == 0) {
return null;
}
double doubleValue = selector.invoke(Short.valueOf(sArr[0])).doubleValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(sArr)).iterator();
while (it.hasNext()) {
doubleValue = Math.max(doubleValue, selector.invoke(Short.valueOf(sArr[it.nextInt()])).doubleValue());
}
return Double.valueOf(doubleValue);
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
/* renamed from: maxOfOrNull, reason: collision with other method in class */
private static final Double m6075maxOfOrNull(int[] iArr, Function1<? super Integer, Double> selector) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (iArr.length == 0) {
return null;
}
double doubleValue = selector.invoke(Integer.valueOf(iArr[0])).doubleValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(iArr)).iterator();
while (it.hasNext()) {
doubleValue = Math.max(doubleValue, selector.invoke(Integer.valueOf(iArr[it.nextInt()])).doubleValue());
}
return Double.valueOf(doubleValue);
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
/* renamed from: maxOfOrNull, reason: collision with other method in class */
private static final Double m6076maxOfOrNull(long[] jArr, Function1<? super Long, Double> selector) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (jArr.length == 0) {
return null;
}
double doubleValue = selector.invoke(Long.valueOf(jArr[0])).doubleValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(jArr)).iterator();
while (it.hasNext()) {
doubleValue = Math.max(doubleValue, selector.invoke(Long.valueOf(jArr[it.nextInt()])).doubleValue());
}
return Double.valueOf(doubleValue);
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
/* renamed from: maxOfOrNull, reason: collision with other method in class */
private static final Double m6074maxOfOrNull(float[] fArr, Function1<? super Float, Double> selector) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (fArr.length == 0) {
return null;
}
double doubleValue = selector.invoke(Float.valueOf(fArr[0])).doubleValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(fArr)).iterator();
while (it.hasNext()) {
doubleValue = Math.max(doubleValue, selector.invoke(Float.valueOf(fArr[it.nextInt()])).doubleValue());
}
return Double.valueOf(doubleValue);
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
/* renamed from: maxOfOrNull, reason: collision with other method in class */
private static final Double m6073maxOfOrNull(double[] dArr, Function1<? super Double, Double> selector) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (dArr.length == 0) {
return null;
}
double doubleValue = selector.invoke(Double.valueOf(dArr[0])).doubleValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(dArr)).iterator();
while (it.hasNext()) {
doubleValue = Math.max(doubleValue, selector.invoke(Double.valueOf(dArr[it.nextInt()])).doubleValue());
}
return Double.valueOf(doubleValue);
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
/* renamed from: maxOfOrNull, reason: collision with other method in class */
private static final Double m6079maxOfOrNull(boolean[] zArr, Function1<? super Boolean, Double> selector) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (zArr.length == 0) {
return null;
}
double doubleValue = selector.invoke(Boolean.valueOf(zArr[0])).doubleValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(zArr)).iterator();
while (it.hasNext()) {
doubleValue = Math.max(doubleValue, selector.invoke(Boolean.valueOf(zArr[it.nextInt()])).doubleValue());
}
return Double.valueOf(doubleValue);
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
/* renamed from: maxOfOrNull, reason: collision with other method in class */
private static final Double m6072maxOfOrNull(char[] cArr, Function1<? super Character, Double> selector) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (cArr.length == 0) {
return null;
}
double doubleValue = selector.invoke(Character.valueOf(cArr[0])).doubleValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(cArr)).iterator();
while (it.hasNext()) {
doubleValue = Math.max(doubleValue, selector.invoke(Character.valueOf(cArr[it.nextInt()])).doubleValue());
}
return Double.valueOf(doubleValue);
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
/* renamed from: maxOfOrNull, reason: collision with other method in class */
private static final <T> Float m6086maxOfOrNull(T[] tArr, Function1<? super T, Float> selector) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (tArr.length == 0) {
return null;
}
float floatValue = selector.invoke(tArr[0]).floatValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(tArr)).iterator();
while (it.hasNext()) {
floatValue = Math.max(floatValue, selector.invoke(tArr[it.nextInt()]).floatValue());
}
return Float.valueOf(floatValue);
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
/* renamed from: maxOfOrNull, reason: collision with other method in class */
private static final Float m6080maxOfOrNull(byte[] bArr, Function1<? super Byte, Float> selector) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (bArr.length == 0) {
return null;
}
float floatValue = selector.invoke(Byte.valueOf(bArr[0])).floatValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(bArr)).iterator();
while (it.hasNext()) {
floatValue = Math.max(floatValue, selector.invoke(Byte.valueOf(bArr[it.nextInt()])).floatValue());
}
return Float.valueOf(floatValue);
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
/* renamed from: maxOfOrNull, reason: collision with other method in class */
private static final Float m6087maxOfOrNull(short[] sArr, Function1<? super Short, Float> selector) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (sArr.length == 0) {
return null;
}
float floatValue = selector.invoke(Short.valueOf(sArr[0])).floatValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(sArr)).iterator();
while (it.hasNext()) {
floatValue = Math.max(floatValue, selector.invoke(Short.valueOf(sArr[it.nextInt()])).floatValue());
}
return Float.valueOf(floatValue);
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
/* renamed from: maxOfOrNull, reason: collision with other method in class */
private static final Float m6084maxOfOrNull(int[] iArr, Function1<? super Integer, Float> selector) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (iArr.length == 0) {
return null;
}
float floatValue = selector.invoke(Integer.valueOf(iArr[0])).floatValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(iArr)).iterator();
while (it.hasNext()) {
floatValue = Math.max(floatValue, selector.invoke(Integer.valueOf(iArr[it.nextInt()])).floatValue());
}
return Float.valueOf(floatValue);
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
/* renamed from: maxOfOrNull, reason: collision with other method in class */
private static final Float m6085maxOfOrNull(long[] jArr, Function1<? super Long, Float> selector) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (jArr.length == 0) {
return null;
}
float floatValue = selector.invoke(Long.valueOf(jArr[0])).floatValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(jArr)).iterator();
while (it.hasNext()) {
floatValue = Math.max(floatValue, selector.invoke(Long.valueOf(jArr[it.nextInt()])).floatValue());
}
return Float.valueOf(floatValue);
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
/* renamed from: maxOfOrNull, reason: collision with other method in class */
private static final Float m6083maxOfOrNull(float[] fArr, Function1<? super Float, Float> selector) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (fArr.length == 0) {
return null;
}
float floatValue = selector.invoke(Float.valueOf(fArr[0])).floatValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(fArr)).iterator();
while (it.hasNext()) {
floatValue = Math.max(floatValue, selector.invoke(Float.valueOf(fArr[it.nextInt()])).floatValue());
}
return Float.valueOf(floatValue);
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
/* renamed from: maxOfOrNull, reason: collision with other method in class */
private static final Float m6082maxOfOrNull(double[] dArr, Function1<? super Double, Float> selector) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (dArr.length == 0) {
return null;
}
float floatValue = selector.invoke(Double.valueOf(dArr[0])).floatValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(dArr)).iterator();
while (it.hasNext()) {
floatValue = Math.max(floatValue, selector.invoke(Double.valueOf(dArr[it.nextInt()])).floatValue());
}
return Float.valueOf(floatValue);
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
/* renamed from: maxOfOrNull, reason: collision with other method in class */
private static final Float m6088maxOfOrNull(boolean[] zArr, Function1<? super Boolean, Float> selector) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (zArr.length == 0) {
return null;
}
float floatValue = selector.invoke(Boolean.valueOf(zArr[0])).floatValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(zArr)).iterator();
while (it.hasNext()) {
floatValue = Math.max(floatValue, selector.invoke(Boolean.valueOf(zArr[it.nextInt()])).floatValue());
}
return Float.valueOf(floatValue);
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
/* renamed from: maxOfOrNull, reason: collision with other method in class */
private static final Float m6081maxOfOrNull(char[] cArr, Function1<? super Character, Float> selector) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (cArr.length == 0) {
return null;
}
float floatValue = selector.invoke(Character.valueOf(cArr[0])).floatValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(cArr)).iterator();
while (it.hasNext()) {
floatValue = Math.max(floatValue, selector.invoke(Character.valueOf(cArr[it.nextInt()])).floatValue());
}
return Float.valueOf(floatValue);
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
private static final <T, R extends Comparable<? super R>> R maxOfOrNull(T[] tArr, Function1<? super T, ? extends R> selector) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (tArr.length == 0) {
return null;
}
R invoke = selector.invoke(tArr[0]);
?? it = new IntRange(1, ArraysKt.getLastIndex(tArr)).iterator();
while (it.hasNext()) {
R invoke2 = selector.invoke(tArr[it.nextInt()]);
if (invoke.compareTo(invoke2) < 0) {
invoke = invoke2;
}
}
return invoke;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
private static final <R extends Comparable<? super R>> R maxOfOrNull(byte[] bArr, Function1<? super Byte, ? extends R> selector) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (bArr.length == 0) {
return null;
}
R invoke = selector.invoke(Byte.valueOf(bArr[0]));
?? it = new IntRange(1, ArraysKt.getLastIndex(bArr)).iterator();
while (it.hasNext()) {
R invoke2 = selector.invoke(Byte.valueOf(bArr[it.nextInt()]));
if (invoke.compareTo(invoke2) < 0) {
invoke = invoke2;
}
}
return invoke;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
private static final <R extends Comparable<? super R>> R maxOfOrNull(short[] sArr, Function1<? super Short, ? extends R> selector) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (sArr.length == 0) {
return null;
}
R invoke = selector.invoke(Short.valueOf(sArr[0]));
?? it = new IntRange(1, ArraysKt.getLastIndex(sArr)).iterator();
while (it.hasNext()) {
R invoke2 = selector.invoke(Short.valueOf(sArr[it.nextInt()]));
if (invoke.compareTo(invoke2) < 0) {
invoke = invoke2;
}
}
return invoke;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
private static final <R extends Comparable<? super R>> R maxOfOrNull(int[] iArr, Function1<? super Integer, ? extends R> selector) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (iArr.length == 0) {
return null;
}
R invoke = selector.invoke(Integer.valueOf(iArr[0]));
?? it = new IntRange(1, ArraysKt.getLastIndex(iArr)).iterator();
while (it.hasNext()) {
R invoke2 = selector.invoke(Integer.valueOf(iArr[it.nextInt()]));
if (invoke.compareTo(invoke2) < 0) {
invoke = invoke2;
}
}
return invoke;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
private static final <R extends Comparable<? super R>> R maxOfOrNull(long[] jArr, Function1<? super Long, ? extends R> selector) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (jArr.length == 0) {
return null;
}
R invoke = selector.invoke(Long.valueOf(jArr[0]));
?? it = new IntRange(1, ArraysKt.getLastIndex(jArr)).iterator();
while (it.hasNext()) {
R invoke2 = selector.invoke(Long.valueOf(jArr[it.nextInt()]));
if (invoke.compareTo(invoke2) < 0) {
invoke = invoke2;
}
}
return invoke;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
private static final <R extends Comparable<? super R>> R maxOfOrNull(float[] fArr, Function1<? super Float, ? extends R> selector) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (fArr.length == 0) {
return null;
}
R invoke = selector.invoke(Float.valueOf(fArr[0]));
?? it = new IntRange(1, ArraysKt.getLastIndex(fArr)).iterator();
while (it.hasNext()) {
R invoke2 = selector.invoke(Float.valueOf(fArr[it.nextInt()]));
if (invoke.compareTo(invoke2) < 0) {
invoke = invoke2;
}
}
return invoke;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
private static final <R extends Comparable<? super R>> R maxOfOrNull(double[] dArr, Function1<? super Double, ? extends R> selector) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (dArr.length == 0) {
return null;
}
R invoke = selector.invoke(Double.valueOf(dArr[0]));
?? it = new IntRange(1, ArraysKt.getLastIndex(dArr)).iterator();
while (it.hasNext()) {
R invoke2 = selector.invoke(Double.valueOf(dArr[it.nextInt()]));
if (invoke.compareTo(invoke2) < 0) {
invoke = invoke2;
}
}
return invoke;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
private static final <R extends Comparable<? super R>> R maxOfOrNull(boolean[] zArr, Function1<? super Boolean, ? extends R> selector) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (zArr.length == 0) {
return null;
}
R invoke = selector.invoke(Boolean.valueOf(zArr[0]));
?? it = new IntRange(1, ArraysKt.getLastIndex(zArr)).iterator();
while (it.hasNext()) {
R invoke2 = selector.invoke(Boolean.valueOf(zArr[it.nextInt()]));
if (invoke.compareTo(invoke2) < 0) {
invoke = invoke2;
}
}
return invoke;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
private static final <R extends Comparable<? super R>> R maxOfOrNull(char[] cArr, Function1<? super Character, ? extends R> selector) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (cArr.length == 0) {
return null;
}
R invoke = selector.invoke(Character.valueOf(cArr[0]));
?? it = new IntRange(1, ArraysKt.getLastIndex(cArr)).iterator();
while (it.hasNext()) {
R invoke2 = selector.invoke(Character.valueOf(cArr[it.nextInt()]));
if (invoke.compareTo(invoke2) < 0) {
invoke = invoke2;
}
}
return invoke;
}
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Type inference failed for: r0v5, types: [java.lang.Object] */
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
/* JADX WARN: Type inference failed for: r2v3, types: [java.lang.Object] */
private static final <T, R> R maxOfWith(T[] tArr, Comparator<? super R> comparator, Function1<? super T, ? extends R> selector) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
Intrinsics.checkNotNullParameter(selector, "selector");
if (tArr.length == 0) {
throw new NoSuchElementException();
}
Object obj = (R) selector.invoke(tArr[0]);
?? it = new IntRange(1, ArraysKt.getLastIndex(tArr)).iterator();
while (it.hasNext()) {
Object obj2 = (R) selector.invoke(tArr[it.nextInt()]);
if (comparator.compare(obj, obj2) < 0) {
obj = (R) obj2;
}
}
return (R) obj;
}
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
private static final <R> R maxOfWith(byte[] bArr, Comparator<? super R> comparator, Function1<? super Byte, ? extends R> selector) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
Intrinsics.checkNotNullParameter(selector, "selector");
if (bArr.length == 0) {
throw new NoSuchElementException();
}
Object obj = (R) selector.invoke(Byte.valueOf(bArr[0]));
?? it = new IntRange(1, ArraysKt.getLastIndex(bArr)).iterator();
while (it.hasNext()) {
Object obj2 = (R) selector.invoke(Byte.valueOf(bArr[it.nextInt()]));
if (comparator.compare(obj, obj2) < 0) {
obj = (R) obj2;
}
}
return (R) obj;
}
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
private static final <R> R maxOfWith(short[] sArr, Comparator<? super R> comparator, Function1<? super Short, ? extends R> selector) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
Intrinsics.checkNotNullParameter(selector, "selector");
if (sArr.length == 0) {
throw new NoSuchElementException();
}
Object obj = (R) selector.invoke(Short.valueOf(sArr[0]));
?? it = new IntRange(1, ArraysKt.getLastIndex(sArr)).iterator();
while (it.hasNext()) {
Object obj2 = (R) selector.invoke(Short.valueOf(sArr[it.nextInt()]));
if (comparator.compare(obj, obj2) < 0) {
obj = (R) obj2;
}
}
return (R) obj;
}
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
private static final <R> R maxOfWith(int[] iArr, Comparator<? super R> comparator, Function1<? super Integer, ? extends R> selector) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
Intrinsics.checkNotNullParameter(selector, "selector");
if (iArr.length == 0) {
throw new NoSuchElementException();
}
Object obj = (R) selector.invoke(Integer.valueOf(iArr[0]));
?? it = new IntRange(1, ArraysKt.getLastIndex(iArr)).iterator();
while (it.hasNext()) {
Object obj2 = (R) selector.invoke(Integer.valueOf(iArr[it.nextInt()]));
if (comparator.compare(obj, obj2) < 0) {
obj = (R) obj2;
}
}
return (R) obj;
}
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
private static final <R> R maxOfWith(long[] jArr, Comparator<? super R> comparator, Function1<? super Long, ? extends R> selector) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
Intrinsics.checkNotNullParameter(selector, "selector");
if (jArr.length == 0) {
throw new NoSuchElementException();
}
Object obj = (R) selector.invoke(Long.valueOf(jArr[0]));
?? it = new IntRange(1, ArraysKt.getLastIndex(jArr)).iterator();
while (it.hasNext()) {
Object obj2 = (R) selector.invoke(Long.valueOf(jArr[it.nextInt()]));
if (comparator.compare(obj, obj2) < 0) {
obj = (R) obj2;
}
}
return (R) obj;
}
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
private static final <R> R maxOfWith(float[] fArr, Comparator<? super R> comparator, Function1<? super Float, ? extends R> selector) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
Intrinsics.checkNotNullParameter(selector, "selector");
if (fArr.length == 0) {
throw new NoSuchElementException();
}
Object obj = (R) selector.invoke(Float.valueOf(fArr[0]));
?? it = new IntRange(1, ArraysKt.getLastIndex(fArr)).iterator();
while (it.hasNext()) {
Object obj2 = (R) selector.invoke(Float.valueOf(fArr[it.nextInt()]));
if (comparator.compare(obj, obj2) < 0) {
obj = (R) obj2;
}
}
return (R) obj;
}
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
private static final <R> R maxOfWith(double[] dArr, Comparator<? super R> comparator, Function1<? super Double, ? extends R> selector) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
Intrinsics.checkNotNullParameter(selector, "selector");
if (dArr.length == 0) {
throw new NoSuchElementException();
}
Object obj = (R) selector.invoke(Double.valueOf(dArr[0]));
?? it = new IntRange(1, ArraysKt.getLastIndex(dArr)).iterator();
while (it.hasNext()) {
Object obj2 = (R) selector.invoke(Double.valueOf(dArr[it.nextInt()]));
if (comparator.compare(obj, obj2) < 0) {
obj = (R) obj2;
}
}
return (R) obj;
}
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
private static final <R> R maxOfWith(boolean[] zArr, Comparator<? super R> comparator, Function1<? super Boolean, ? extends R> selector) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
Intrinsics.checkNotNullParameter(selector, "selector");
if (zArr.length == 0) {
throw new NoSuchElementException();
}
Object obj = (R) selector.invoke(Boolean.valueOf(zArr[0]));
?? it = new IntRange(1, ArraysKt.getLastIndex(zArr)).iterator();
while (it.hasNext()) {
Object obj2 = (R) selector.invoke(Boolean.valueOf(zArr[it.nextInt()]));
if (comparator.compare(obj, obj2) < 0) {
obj = (R) obj2;
}
}
return (R) obj;
}
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
private static final <R> R maxOfWith(char[] cArr, Comparator<? super R> comparator, Function1<? super Character, ? extends R> selector) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
Intrinsics.checkNotNullParameter(selector, "selector");
if (cArr.length == 0) {
throw new NoSuchElementException();
}
Object obj = (R) selector.invoke(Character.valueOf(cArr[0]));
?? it = new IntRange(1, ArraysKt.getLastIndex(cArr)).iterator();
while (it.hasNext()) {
Object obj2 = (R) selector.invoke(Character.valueOf(cArr[it.nextInt()]));
if (comparator.compare(obj, obj2) < 0) {
obj = (R) obj2;
}
}
return (R) obj;
}
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Type inference failed for: r0v5, types: [java.lang.Object] */
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
/* JADX WARN: Type inference failed for: r2v3, types: [java.lang.Object] */
private static final <T, R> R maxOfWithOrNull(T[] tArr, Comparator<? super R> comparator, Function1<? super T, ? extends R> selector) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
Intrinsics.checkNotNullParameter(selector, "selector");
if (tArr.length == 0) {
return null;
}
Object obj = (R) selector.invoke(tArr[0]);
?? it = new IntRange(1, ArraysKt.getLastIndex(tArr)).iterator();
while (it.hasNext()) {
Object obj2 = (R) selector.invoke(tArr[it.nextInt()]);
if (comparator.compare(obj, obj2) < 0) {
obj = (R) obj2;
}
}
return (R) obj;
}
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
private static final <R> R maxOfWithOrNull(byte[] bArr, Comparator<? super R> comparator, Function1<? super Byte, ? extends R> selector) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
Intrinsics.checkNotNullParameter(selector, "selector");
if (bArr.length == 0) {
return null;
}
Object obj = (R) selector.invoke(Byte.valueOf(bArr[0]));
?? it = new IntRange(1, ArraysKt.getLastIndex(bArr)).iterator();
while (it.hasNext()) {
Object obj2 = (R) selector.invoke(Byte.valueOf(bArr[it.nextInt()]));
if (comparator.compare(obj, obj2) < 0) {
obj = (R) obj2;
}
}
return (R) obj;
}
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
private static final <R> R maxOfWithOrNull(short[] sArr, Comparator<? super R> comparator, Function1<? super Short, ? extends R> selector) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
Intrinsics.checkNotNullParameter(selector, "selector");
if (sArr.length == 0) {
return null;
}
Object obj = (R) selector.invoke(Short.valueOf(sArr[0]));
?? it = new IntRange(1, ArraysKt.getLastIndex(sArr)).iterator();
while (it.hasNext()) {
Object obj2 = (R) selector.invoke(Short.valueOf(sArr[it.nextInt()]));
if (comparator.compare(obj, obj2) < 0) {
obj = (R) obj2;
}
}
return (R) obj;
}
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
private static final <R> R maxOfWithOrNull(int[] iArr, Comparator<? super R> comparator, Function1<? super Integer, ? extends R> selector) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
Intrinsics.checkNotNullParameter(selector, "selector");
if (iArr.length == 0) {
return null;
}
Object obj = (R) selector.invoke(Integer.valueOf(iArr[0]));
?? it = new IntRange(1, ArraysKt.getLastIndex(iArr)).iterator();
while (it.hasNext()) {
Object obj2 = (R) selector.invoke(Integer.valueOf(iArr[it.nextInt()]));
if (comparator.compare(obj, obj2) < 0) {
obj = (R) obj2;
}
}
return (R) obj;
}
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
private static final <R> R maxOfWithOrNull(long[] jArr, Comparator<? super R> comparator, Function1<? super Long, ? extends R> selector) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
Intrinsics.checkNotNullParameter(selector, "selector");
if (jArr.length == 0) {
return null;
}
Object obj = (R) selector.invoke(Long.valueOf(jArr[0]));
?? it = new IntRange(1, ArraysKt.getLastIndex(jArr)).iterator();
while (it.hasNext()) {
Object obj2 = (R) selector.invoke(Long.valueOf(jArr[it.nextInt()]));
if (comparator.compare(obj, obj2) < 0) {
obj = (R) obj2;
}
}
return (R) obj;
}
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
private static final <R> R maxOfWithOrNull(float[] fArr, Comparator<? super R> comparator, Function1<? super Float, ? extends R> selector) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
Intrinsics.checkNotNullParameter(selector, "selector");
if (fArr.length == 0) {
return null;
}
Object obj = (R) selector.invoke(Float.valueOf(fArr[0]));
?? it = new IntRange(1, ArraysKt.getLastIndex(fArr)).iterator();
while (it.hasNext()) {
Object obj2 = (R) selector.invoke(Float.valueOf(fArr[it.nextInt()]));
if (comparator.compare(obj, obj2) < 0) {
obj = (R) obj2;
}
}
return (R) obj;
}
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
private static final <R> R maxOfWithOrNull(double[] dArr, Comparator<? super R> comparator, Function1<? super Double, ? extends R> selector) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
Intrinsics.checkNotNullParameter(selector, "selector");
if (dArr.length == 0) {
return null;
}
Object obj = (R) selector.invoke(Double.valueOf(dArr[0]));
?? it = new IntRange(1, ArraysKt.getLastIndex(dArr)).iterator();
while (it.hasNext()) {
Object obj2 = (R) selector.invoke(Double.valueOf(dArr[it.nextInt()]));
if (comparator.compare(obj, obj2) < 0) {
obj = (R) obj2;
}
}
return (R) obj;
}
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
private static final <R> R maxOfWithOrNull(boolean[] zArr, Comparator<? super R> comparator, Function1<? super Boolean, ? extends R> selector) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
Intrinsics.checkNotNullParameter(selector, "selector");
if (zArr.length == 0) {
return null;
}
Object obj = (R) selector.invoke(Boolean.valueOf(zArr[0]));
?? it = new IntRange(1, ArraysKt.getLastIndex(zArr)).iterator();
while (it.hasNext()) {
Object obj2 = (R) selector.invoke(Boolean.valueOf(zArr[it.nextInt()]));
if (comparator.compare(obj, obj2) < 0) {
obj = (R) obj2;
}
}
return (R) obj;
}
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
private static final <R> R maxOfWithOrNull(char[] cArr, Comparator<? super R> comparator, Function1<? super Character, ? extends R> selector) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
Intrinsics.checkNotNullParameter(selector, "selector");
if (cArr.length == 0) {
return null;
}
Object obj = (R) selector.invoke(Character.valueOf(cArr[0]));
?? it = new IntRange(1, ArraysKt.getLastIndex(cArr)).iterator();
while (it.hasNext()) {
Object obj2 = (R) selector.invoke(Character.valueOf(cArr[it.nextInt()]));
if (comparator.compare(obj, obj2) < 0) {
obj = (R) obj2;
}
}
return (R) obj;
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
public static final Double maxOrNull(Double[] dArr) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
if (dArr.length == 0) {
return null;
}
double doubleValue = dArr[0].doubleValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(dArr)).iterator();
while (it.hasNext()) {
doubleValue = Math.max(doubleValue, dArr[it.nextInt()].doubleValue());
}
return Double.valueOf(doubleValue);
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final Float maxOrNull(Float[] fArr) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
if (fArr.length == 0) {
return null;
}
float floatValue = fArr[0].floatValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(fArr)).iterator();
while (it.hasNext()) {
floatValue = Math.max(floatValue, fArr[it.nextInt()].floatValue());
}
return Float.valueOf(floatValue);
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final <T extends Comparable<? super T>> T maxOrNull(T[] tArr) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
if (tArr.length == 0) {
return null;
}
T t = tArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(tArr)).iterator();
while (it.hasNext()) {
T t2 = tArr[it.nextInt()];
if (t.compareTo(t2) < 0) {
t = t2;
}
}
return t;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final Byte maxOrNull(byte[] bArr) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
if (bArr.length == 0) {
return null;
}
byte b = bArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(bArr)).iterator();
while (it.hasNext()) {
byte b2 = bArr[it.nextInt()];
if (b < b2) {
b = b2;
}
}
return Byte.valueOf(b);
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final Short maxOrNull(short[] sArr) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
if (sArr.length == 0) {
return null;
}
short s = sArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(sArr)).iterator();
while (it.hasNext()) {
short s2 = sArr[it.nextInt()];
if (s < s2) {
s = s2;
}
}
return Short.valueOf(s);
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final Integer maxOrNull(int[] iArr) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
if (iArr.length == 0) {
return null;
}
int i = iArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(iArr)).iterator();
while (it.hasNext()) {
int i2 = iArr[it.nextInt()];
if (i < i2) {
i = i2;
}
}
return Integer.valueOf(i);
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
public static final Long maxOrNull(long[] jArr) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
if (jArr.length == 0) {
return null;
}
long j = jArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(jArr)).iterator();
while (it.hasNext()) {
long j2 = jArr[it.nextInt()];
if (j < j2) {
j = j2;
}
}
return Long.valueOf(j);
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final Float maxOrNull(float[] fArr) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
if (fArr.length == 0) {
return null;
}
float f = fArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(fArr)).iterator();
while (it.hasNext()) {
f = Math.max(f, fArr[it.nextInt()]);
}
return Float.valueOf(f);
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
public static final Double maxOrNull(double[] dArr) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
if (dArr.length == 0) {
return null;
}
double d = dArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(dArr)).iterator();
while (it.hasNext()) {
d = Math.max(d, dArr[it.nextInt()]);
}
return Double.valueOf(d);
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final Character maxOrNull(char[] cArr) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
if (cArr.length == 0) {
return null;
}
char c = cArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(cArr)).iterator();
while (it.hasNext()) {
char c2 = cArr[it.nextInt()];
if (Intrinsics.compare((int) c, (int) c2) < 0) {
c = c2;
}
}
return Character.valueOf(c);
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final <T> T maxWithOrThrow(T[] tArr, Comparator<? super T> comparator) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
if (tArr.length == 0) {
throw new NoSuchElementException();
}
T t = tArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(tArr)).iterator();
while (it.hasNext()) {
T t2 = tArr[it.nextInt()];
if (comparator.compare(t, t2) < 0) {
t = t2;
}
}
return t;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final byte maxWithOrThrow(byte[] bArr, Comparator<? super Byte> comparator) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
if (bArr.length == 0) {
throw new NoSuchElementException();
}
byte b = bArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(bArr)).iterator();
while (it.hasNext()) {
byte b2 = bArr[it.nextInt()];
if (comparator.compare(Byte.valueOf(b), Byte.valueOf(b2)) < 0) {
b = b2;
}
}
return b;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final short maxWithOrThrow(short[] sArr, Comparator<? super Short> comparator) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
if (sArr.length == 0) {
throw new NoSuchElementException();
}
short s = sArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(sArr)).iterator();
while (it.hasNext()) {
short s2 = sArr[it.nextInt()];
if (comparator.compare(Short.valueOf(s), Short.valueOf(s2)) < 0) {
s = s2;
}
}
return s;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final int maxWithOrThrow(int[] iArr, Comparator<? super Integer> comparator) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
if (iArr.length == 0) {
throw new NoSuchElementException();
}
int i = iArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(iArr)).iterator();
while (it.hasNext()) {
int i2 = iArr[it.nextInt()];
if (comparator.compare(Integer.valueOf(i), Integer.valueOf(i2)) < 0) {
i = i2;
}
}
return i;
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
public static final long maxWithOrThrow(long[] jArr, Comparator<? super Long> comparator) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
if (jArr.length == 0) {
throw new NoSuchElementException();
}
long j = jArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(jArr)).iterator();
while (it.hasNext()) {
long j2 = jArr[it.nextInt()];
if (comparator.compare(Long.valueOf(j), Long.valueOf(j2)) < 0) {
j = j2;
}
}
return j;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final float maxWithOrThrow(float[] fArr, Comparator<? super Float> comparator) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
if (fArr.length == 0) {
throw new NoSuchElementException();
}
float f = fArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(fArr)).iterator();
while (it.hasNext()) {
float f2 = fArr[it.nextInt()];
if (comparator.compare(Float.valueOf(f), Float.valueOf(f2)) < 0) {
f = f2;
}
}
return f;
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
public static final double maxWithOrThrow(double[] dArr, Comparator<? super Double> comparator) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
if (dArr.length == 0) {
throw new NoSuchElementException();
}
double d = dArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(dArr)).iterator();
while (it.hasNext()) {
double d2 = dArr[it.nextInt()];
if (comparator.compare(Double.valueOf(d), Double.valueOf(d2)) < 0) {
d = d2;
}
}
return d;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final boolean maxWithOrThrow(boolean[] zArr, Comparator<? super Boolean> comparator) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
if (zArr.length == 0) {
throw new NoSuchElementException();
}
boolean z = zArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(zArr)).iterator();
while (it.hasNext()) {
boolean z2 = zArr[it.nextInt()];
if (comparator.compare(Boolean.valueOf(z), Boolean.valueOf(z2)) < 0) {
z = z2;
}
}
return z;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final char maxWithOrThrow(char[] cArr, Comparator<? super Character> comparator) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
if (cArr.length == 0) {
throw new NoSuchElementException();
}
char c = cArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(cArr)).iterator();
while (it.hasNext()) {
char c2 = cArr[it.nextInt()];
if (comparator.compare(Character.valueOf(c), Character.valueOf(c2)) < 0) {
c = c2;
}
}
return c;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final <T> T maxWithOrNull(T[] tArr, Comparator<? super T> comparator) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
if (tArr.length == 0) {
return null;
}
T t = tArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(tArr)).iterator();
while (it.hasNext()) {
T t2 = tArr[it.nextInt()];
if (comparator.compare(t, t2) < 0) {
t = t2;
}
}
return t;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final Byte maxWithOrNull(byte[] bArr, Comparator<? super Byte> comparator) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
if (bArr.length == 0) {
return null;
}
byte b = bArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(bArr)).iterator();
while (it.hasNext()) {
byte b2 = bArr[it.nextInt()];
if (comparator.compare(Byte.valueOf(b), Byte.valueOf(b2)) < 0) {
b = b2;
}
}
return Byte.valueOf(b);
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final Short maxWithOrNull(short[] sArr, Comparator<? super Short> comparator) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
if (sArr.length == 0) {
return null;
}
short s = sArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(sArr)).iterator();
while (it.hasNext()) {
short s2 = sArr[it.nextInt()];
if (comparator.compare(Short.valueOf(s), Short.valueOf(s2)) < 0) {
s = s2;
}
}
return Short.valueOf(s);
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final Integer maxWithOrNull(int[] iArr, Comparator<? super Integer> comparator) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
if (iArr.length == 0) {
return null;
}
int i = iArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(iArr)).iterator();
while (it.hasNext()) {
int i2 = iArr[it.nextInt()];
if (comparator.compare(Integer.valueOf(i), Integer.valueOf(i2)) < 0) {
i = i2;
}
}
return Integer.valueOf(i);
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
public static final Long maxWithOrNull(long[] jArr, Comparator<? super Long> comparator) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
if (jArr.length == 0) {
return null;
}
long j = jArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(jArr)).iterator();
while (it.hasNext()) {
long j2 = jArr[it.nextInt()];
if (comparator.compare(Long.valueOf(j), Long.valueOf(j2)) < 0) {
j = j2;
}
}
return Long.valueOf(j);
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final Float maxWithOrNull(float[] fArr, Comparator<? super Float> comparator) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
if (fArr.length == 0) {
return null;
}
float f = fArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(fArr)).iterator();
while (it.hasNext()) {
float f2 = fArr[it.nextInt()];
if (comparator.compare(Float.valueOf(f), Float.valueOf(f2)) < 0) {
f = f2;
}
}
return Float.valueOf(f);
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
public static final Double maxWithOrNull(double[] dArr, Comparator<? super Double> comparator) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
if (dArr.length == 0) {
return null;
}
double d = dArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(dArr)).iterator();
while (it.hasNext()) {
double d2 = dArr[it.nextInt()];
if (comparator.compare(Double.valueOf(d), Double.valueOf(d2)) < 0) {
d = d2;
}
}
return Double.valueOf(d);
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final Boolean maxWithOrNull(boolean[] zArr, Comparator<? super Boolean> comparator) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
if (zArr.length == 0) {
return null;
}
boolean z = zArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(zArr)).iterator();
while (it.hasNext()) {
boolean z2 = zArr[it.nextInt()];
if (comparator.compare(Boolean.valueOf(z), Boolean.valueOf(z2)) < 0) {
z = z2;
}
}
return Boolean.valueOf(z);
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final Character maxWithOrNull(char[] cArr, Comparator<? super Character> comparator) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
if (cArr.length == 0) {
return null;
}
char c = cArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(cArr)).iterator();
while (it.hasNext()) {
char c2 = cArr[it.nextInt()];
if (comparator.compare(Character.valueOf(c), Character.valueOf(c2)) < 0) {
c = c2;
}
}
return Character.valueOf(c);
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
public static final double minOrThrow(Double[] dArr) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
if (dArr.length == 0) {
throw new NoSuchElementException();
}
double doubleValue = dArr[0].doubleValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(dArr)).iterator();
while (it.hasNext()) {
doubleValue = Math.min(doubleValue, dArr[it.nextInt()].doubleValue());
}
return doubleValue;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final float minOrThrow(Float[] fArr) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
if (fArr.length == 0) {
throw new NoSuchElementException();
}
float floatValue = fArr[0].floatValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(fArr)).iterator();
while (it.hasNext()) {
floatValue = Math.min(floatValue, fArr[it.nextInt()].floatValue());
}
return floatValue;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final <T extends Comparable<? super T>> T minOrThrow(T[] tArr) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
if (tArr.length == 0) {
throw new NoSuchElementException();
}
T t = tArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(tArr)).iterator();
while (it.hasNext()) {
T t2 = tArr[it.nextInt()];
if (t.compareTo(t2) > 0) {
t = t2;
}
}
return t;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final byte minOrThrow(byte[] bArr) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
if (bArr.length == 0) {
throw new NoSuchElementException();
}
byte b = bArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(bArr)).iterator();
while (it.hasNext()) {
byte b2 = bArr[it.nextInt()];
if (b > b2) {
b = b2;
}
}
return b;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final short minOrThrow(short[] sArr) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
if (sArr.length == 0) {
throw new NoSuchElementException();
}
short s = sArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(sArr)).iterator();
while (it.hasNext()) {
short s2 = sArr[it.nextInt()];
if (s > s2) {
s = s2;
}
}
return s;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final int minOrThrow(int[] iArr) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
if (iArr.length == 0) {
throw new NoSuchElementException();
}
int i = iArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(iArr)).iterator();
while (it.hasNext()) {
int i2 = iArr[it.nextInt()];
if (i > i2) {
i = i2;
}
}
return i;
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
public static final long minOrThrow(long[] jArr) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
if (jArr.length == 0) {
throw new NoSuchElementException();
}
long j = jArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(jArr)).iterator();
while (it.hasNext()) {
long j2 = jArr[it.nextInt()];
if (j > j2) {
j = j2;
}
}
return j;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final float minOrThrow(float[] fArr) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
if (fArr.length == 0) {
throw new NoSuchElementException();
}
float f = fArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(fArr)).iterator();
while (it.hasNext()) {
f = Math.min(f, fArr[it.nextInt()]);
}
return f;
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
public static final double minOrThrow(double[] dArr) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
if (dArr.length == 0) {
throw new NoSuchElementException();
}
double d = dArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(dArr)).iterator();
while (it.hasNext()) {
d = Math.min(d, dArr[it.nextInt()]);
}
return d;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final char minOrThrow(char[] cArr) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
if (cArr.length == 0) {
throw new NoSuchElementException();
}
char c = cArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(cArr)).iterator();
while (it.hasNext()) {
char c2 = cArr[it.nextInt()];
if (Intrinsics.compare((int) c, (int) c2) > 0) {
c = c2;
}
}
return c;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final <T, R extends Comparable<? super R>> T minByOrThrow(T[] tArr, Function1<? super T, ? extends R> selector) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (tArr.length == 0) {
throw new NoSuchElementException();
}
T t = tArr[0];
int lastIndex = ArraysKt.getLastIndex(tArr);
if (lastIndex == 0) {
return t;
}
R invoke = selector.invoke(t);
?? it = new IntRange(1, lastIndex).iterator();
while (it.hasNext()) {
T t2 = tArr[it.nextInt()];
R invoke2 = selector.invoke(t2);
if (invoke.compareTo(invoke2) > 0) {
t = t2;
invoke = invoke2;
}
}
return t;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final <R extends Comparable<? super R>> byte minByOrThrow(byte[] bArr, Function1<? super Byte, ? extends R> selector) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (bArr.length == 0) {
throw new NoSuchElementException();
}
byte b = bArr[0];
int lastIndex = ArraysKt.getLastIndex(bArr);
if (lastIndex == 0) {
return b;
}
R invoke = selector.invoke(Byte.valueOf(b));
?? it = new IntRange(1, lastIndex).iterator();
while (it.hasNext()) {
byte b2 = bArr[it.nextInt()];
R invoke2 = selector.invoke(Byte.valueOf(b2));
if (invoke.compareTo(invoke2) > 0) {
b = b2;
invoke = invoke2;
}
}
return b;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final <R extends Comparable<? super R>> short minByOrThrow(short[] sArr, Function1<? super Short, ? extends R> selector) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (sArr.length == 0) {
throw new NoSuchElementException();
}
short s = sArr[0];
int lastIndex = ArraysKt.getLastIndex(sArr);
if (lastIndex == 0) {
return s;
}
R invoke = selector.invoke(Short.valueOf(s));
?? it = new IntRange(1, lastIndex).iterator();
while (it.hasNext()) {
short s2 = sArr[it.nextInt()];
R invoke2 = selector.invoke(Short.valueOf(s2));
if (invoke.compareTo(invoke2) > 0) {
s = s2;
invoke = invoke2;
}
}
return s;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final <R extends Comparable<? super R>> int minByOrThrow(int[] iArr, Function1<? super Integer, ? extends R> selector) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (iArr.length == 0) {
throw new NoSuchElementException();
}
int i = iArr[0];
int lastIndex = ArraysKt.getLastIndex(iArr);
if (lastIndex == 0) {
return i;
}
R invoke = selector.invoke(Integer.valueOf(i));
?? it = new IntRange(1, lastIndex).iterator();
while (it.hasNext()) {
int i2 = iArr[it.nextInt()];
R invoke2 = selector.invoke(Integer.valueOf(i2));
if (invoke.compareTo(invoke2) > 0) {
i = i2;
invoke = invoke2;
}
}
return i;
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
public static final <R extends Comparable<? super R>> long minByOrThrow(long[] jArr, Function1<? super Long, ? extends R> selector) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (jArr.length == 0) {
throw new NoSuchElementException();
}
long j = jArr[0];
int lastIndex = ArraysKt.getLastIndex(jArr);
if (lastIndex == 0) {
return j;
}
R invoke = selector.invoke(Long.valueOf(j));
?? it = new IntRange(1, lastIndex).iterator();
while (it.hasNext()) {
long j2 = jArr[it.nextInt()];
R invoke2 = selector.invoke(Long.valueOf(j2));
if (invoke.compareTo(invoke2) > 0) {
j = j2;
invoke = invoke2;
}
}
return j;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final <R extends Comparable<? super R>> float minByOrThrow(float[] fArr, Function1<? super Float, ? extends R> selector) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (fArr.length == 0) {
throw new NoSuchElementException();
}
float f = fArr[0];
int lastIndex = ArraysKt.getLastIndex(fArr);
if (lastIndex == 0) {
return f;
}
R invoke = selector.invoke(Float.valueOf(f));
?? it = new IntRange(1, lastIndex).iterator();
while (it.hasNext()) {
float f2 = fArr[it.nextInt()];
R invoke2 = selector.invoke(Float.valueOf(f2));
if (invoke.compareTo(invoke2) > 0) {
f = f2;
invoke = invoke2;
}
}
return f;
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
public static final <R extends Comparable<? super R>> double minByOrThrow(double[] dArr, Function1<? super Double, ? extends R> selector) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (dArr.length == 0) {
throw new NoSuchElementException();
}
double d = dArr[0];
int lastIndex = ArraysKt.getLastIndex(dArr);
if (lastIndex == 0) {
return d;
}
R invoke = selector.invoke(Double.valueOf(d));
?? it = new IntRange(1, lastIndex).iterator();
while (it.hasNext()) {
double d2 = dArr[it.nextInt()];
R invoke2 = selector.invoke(Double.valueOf(d2));
if (invoke.compareTo(invoke2) > 0) {
d = d2;
invoke = invoke2;
}
}
return d;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final <R extends Comparable<? super R>> boolean minByOrThrow(boolean[] zArr, Function1<? super Boolean, ? extends R> selector) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (zArr.length == 0) {
throw new NoSuchElementException();
}
boolean z = zArr[0];
int lastIndex = ArraysKt.getLastIndex(zArr);
if (lastIndex == 0) {
return z;
}
R invoke = selector.invoke(Boolean.valueOf(z));
?? it = new IntRange(1, lastIndex).iterator();
while (it.hasNext()) {
boolean z2 = zArr[it.nextInt()];
R invoke2 = selector.invoke(Boolean.valueOf(z2));
if (invoke.compareTo(invoke2) > 0) {
z = z2;
invoke = invoke2;
}
}
return z;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final <R extends Comparable<? super R>> char minByOrThrow(char[] cArr, Function1<? super Character, ? extends R> selector) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (cArr.length == 0) {
throw new NoSuchElementException();
}
char c = cArr[0];
int lastIndex = ArraysKt.getLastIndex(cArr);
if (lastIndex == 0) {
return c;
}
R invoke = selector.invoke(Character.valueOf(c));
?? it = new IntRange(1, lastIndex).iterator();
while (it.hasNext()) {
char c2 = cArr[it.nextInt()];
R invoke2 = selector.invoke(Character.valueOf(c2));
if (invoke.compareTo(invoke2) > 0) {
c = c2;
invoke = invoke2;
}
}
return c;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final <T, R extends Comparable<? super R>> T minByOrNull(T[] tArr, Function1<? super T, ? extends R> selector) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (tArr.length == 0) {
return null;
}
T t = tArr[0];
int lastIndex = ArraysKt.getLastIndex(tArr);
if (lastIndex == 0) {
return t;
}
R invoke = selector.invoke(t);
?? it = new IntRange(1, lastIndex).iterator();
while (it.hasNext()) {
T t2 = tArr[it.nextInt()];
R invoke2 = selector.invoke(t2);
if (invoke.compareTo(invoke2) > 0) {
t = t2;
invoke = invoke2;
}
}
return t;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final <R extends Comparable<? super R>> Byte minByOrNull(byte[] bArr, Function1<? super Byte, ? extends R> selector) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (bArr.length == 0) {
return null;
}
byte b = bArr[0];
int lastIndex = ArraysKt.getLastIndex(bArr);
if (lastIndex == 0) {
return Byte.valueOf(b);
}
R invoke = selector.invoke(Byte.valueOf(b));
?? it = new IntRange(1, lastIndex).iterator();
while (it.hasNext()) {
byte b2 = bArr[it.nextInt()];
R invoke2 = selector.invoke(Byte.valueOf(b2));
if (invoke.compareTo(invoke2) > 0) {
b = b2;
invoke = invoke2;
}
}
return Byte.valueOf(b);
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final <R extends Comparable<? super R>> Short minByOrNull(short[] sArr, Function1<? super Short, ? extends R> selector) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (sArr.length == 0) {
return null;
}
short s = sArr[0];
int lastIndex = ArraysKt.getLastIndex(sArr);
if (lastIndex == 0) {
return Short.valueOf(s);
}
R invoke = selector.invoke(Short.valueOf(s));
?? it = new IntRange(1, lastIndex).iterator();
while (it.hasNext()) {
short s2 = sArr[it.nextInt()];
R invoke2 = selector.invoke(Short.valueOf(s2));
if (invoke.compareTo(invoke2) > 0) {
s = s2;
invoke = invoke2;
}
}
return Short.valueOf(s);
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final <R extends Comparable<? super R>> Integer minByOrNull(int[] iArr, Function1<? super Integer, ? extends R> selector) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (iArr.length == 0) {
return null;
}
int i = iArr[0];
int lastIndex = ArraysKt.getLastIndex(iArr);
if (lastIndex == 0) {
return Integer.valueOf(i);
}
R invoke = selector.invoke(Integer.valueOf(i));
?? it = new IntRange(1, lastIndex).iterator();
while (it.hasNext()) {
int i2 = iArr[it.nextInt()];
R invoke2 = selector.invoke(Integer.valueOf(i2));
if (invoke.compareTo(invoke2) > 0) {
i = i2;
invoke = invoke2;
}
}
return Integer.valueOf(i);
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
public static final <R extends Comparable<? super R>> Long minByOrNull(long[] jArr, Function1<? super Long, ? extends R> selector) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (jArr.length == 0) {
return null;
}
long j = jArr[0];
int lastIndex = ArraysKt.getLastIndex(jArr);
if (lastIndex == 0) {
return Long.valueOf(j);
}
R invoke = selector.invoke(Long.valueOf(j));
?? it = new IntRange(1, lastIndex).iterator();
while (it.hasNext()) {
long j2 = jArr[it.nextInt()];
R invoke2 = selector.invoke(Long.valueOf(j2));
if (invoke.compareTo(invoke2) > 0) {
j = j2;
invoke = invoke2;
}
}
return Long.valueOf(j);
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final <R extends Comparable<? super R>> Float minByOrNull(float[] fArr, Function1<? super Float, ? extends R> selector) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (fArr.length == 0) {
return null;
}
float f = fArr[0];
int lastIndex = ArraysKt.getLastIndex(fArr);
if (lastIndex == 0) {
return Float.valueOf(f);
}
R invoke = selector.invoke(Float.valueOf(f));
?? it = new IntRange(1, lastIndex).iterator();
while (it.hasNext()) {
float f2 = fArr[it.nextInt()];
R invoke2 = selector.invoke(Float.valueOf(f2));
if (invoke.compareTo(invoke2) > 0) {
f = f2;
invoke = invoke2;
}
}
return Float.valueOf(f);
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
public static final <R extends Comparable<? super R>> Double minByOrNull(double[] dArr, Function1<? super Double, ? extends R> selector) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (dArr.length == 0) {
return null;
}
double d = dArr[0];
int lastIndex = ArraysKt.getLastIndex(dArr);
if (lastIndex == 0) {
return Double.valueOf(d);
}
R invoke = selector.invoke(Double.valueOf(d));
?? it = new IntRange(1, lastIndex).iterator();
while (it.hasNext()) {
double d2 = dArr[it.nextInt()];
R invoke2 = selector.invoke(Double.valueOf(d2));
if (invoke.compareTo(invoke2) > 0) {
d = d2;
invoke = invoke2;
}
}
return Double.valueOf(d);
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final <R extends Comparable<? super R>> Boolean minByOrNull(boolean[] zArr, Function1<? super Boolean, ? extends R> selector) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (zArr.length == 0) {
return null;
}
boolean z = zArr[0];
int lastIndex = ArraysKt.getLastIndex(zArr);
if (lastIndex == 0) {
return Boolean.valueOf(z);
}
R invoke = selector.invoke(Boolean.valueOf(z));
?? it = new IntRange(1, lastIndex).iterator();
while (it.hasNext()) {
boolean z2 = zArr[it.nextInt()];
R invoke2 = selector.invoke(Boolean.valueOf(z2));
if (invoke.compareTo(invoke2) > 0) {
z = z2;
invoke = invoke2;
}
}
return Boolean.valueOf(z);
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final <R extends Comparable<? super R>> Character minByOrNull(char[] cArr, Function1<? super Character, ? extends R> selector) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (cArr.length == 0) {
return null;
}
char c = cArr[0];
int lastIndex = ArraysKt.getLastIndex(cArr);
if (lastIndex == 0) {
return Character.valueOf(c);
}
R invoke = selector.invoke(Character.valueOf(c));
?? it = new IntRange(1, lastIndex).iterator();
while (it.hasNext()) {
char c2 = cArr[it.nextInt()];
R invoke2 = selector.invoke(Character.valueOf(c2));
if (invoke.compareTo(invoke2) > 0) {
c = c2;
invoke = invoke2;
}
}
return Character.valueOf(c);
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
private static final <T> double minOf(T[] tArr, Function1<? super T, Double> selector) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (tArr.length == 0) {
throw new NoSuchElementException();
}
double doubleValue = selector.invoke(tArr[0]).doubleValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(tArr)).iterator();
while (it.hasNext()) {
doubleValue = Math.min(doubleValue, selector.invoke(tArr[it.nextInt()]).doubleValue());
}
return doubleValue;
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
private static final double minOf(byte[] bArr, Function1<? super Byte, Double> selector) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (bArr.length == 0) {
throw new NoSuchElementException();
}
double doubleValue = selector.invoke(Byte.valueOf(bArr[0])).doubleValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(bArr)).iterator();
while (it.hasNext()) {
doubleValue = Math.min(doubleValue, selector.invoke(Byte.valueOf(bArr[it.nextInt()])).doubleValue());
}
return doubleValue;
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
private static final double minOf(short[] sArr, Function1<? super Short, Double> selector) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (sArr.length == 0) {
throw new NoSuchElementException();
}
double doubleValue = selector.invoke(Short.valueOf(sArr[0])).doubleValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(sArr)).iterator();
while (it.hasNext()) {
doubleValue = Math.min(doubleValue, selector.invoke(Short.valueOf(sArr[it.nextInt()])).doubleValue());
}
return doubleValue;
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
private static final double minOf(int[] iArr, Function1<? super Integer, Double> selector) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (iArr.length == 0) {
throw new NoSuchElementException();
}
double doubleValue = selector.invoke(Integer.valueOf(iArr[0])).doubleValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(iArr)).iterator();
while (it.hasNext()) {
doubleValue = Math.min(doubleValue, selector.invoke(Integer.valueOf(iArr[it.nextInt()])).doubleValue());
}
return doubleValue;
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
private static final double minOf(long[] jArr, Function1<? super Long, Double> selector) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (jArr.length == 0) {
throw new NoSuchElementException();
}
double doubleValue = selector.invoke(Long.valueOf(jArr[0])).doubleValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(jArr)).iterator();
while (it.hasNext()) {
doubleValue = Math.min(doubleValue, selector.invoke(Long.valueOf(jArr[it.nextInt()])).doubleValue());
}
return doubleValue;
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
private static final double minOf(float[] fArr, Function1<? super Float, Double> selector) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (fArr.length == 0) {
throw new NoSuchElementException();
}
double doubleValue = selector.invoke(Float.valueOf(fArr[0])).doubleValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(fArr)).iterator();
while (it.hasNext()) {
doubleValue = Math.min(doubleValue, selector.invoke(Float.valueOf(fArr[it.nextInt()])).doubleValue());
}
return doubleValue;
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
private static final double minOf(double[] dArr, Function1<? super Double, Double> selector) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (dArr.length == 0) {
throw new NoSuchElementException();
}
double doubleValue = selector.invoke(Double.valueOf(dArr[0])).doubleValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(dArr)).iterator();
while (it.hasNext()) {
doubleValue = Math.min(doubleValue, selector.invoke(Double.valueOf(dArr[it.nextInt()])).doubleValue());
}
return doubleValue;
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
private static final double minOf(boolean[] zArr, Function1<? super Boolean, Double> selector) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (zArr.length == 0) {
throw new NoSuchElementException();
}
double doubleValue = selector.invoke(Boolean.valueOf(zArr[0])).doubleValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(zArr)).iterator();
while (it.hasNext()) {
doubleValue = Math.min(doubleValue, selector.invoke(Boolean.valueOf(zArr[it.nextInt()])).doubleValue());
}
return doubleValue;
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
private static final double minOf(char[] cArr, Function1<? super Character, Double> selector) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (cArr.length == 0) {
throw new NoSuchElementException();
}
double doubleValue = selector.invoke(Character.valueOf(cArr[0])).doubleValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(cArr)).iterator();
while (it.hasNext()) {
doubleValue = Math.min(doubleValue, selector.invoke(Character.valueOf(cArr[it.nextInt()])).doubleValue());
}
return doubleValue;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
/* renamed from: minOf, reason: collision with other method in class */
private static final <T> float m6095minOf(T[] tArr, Function1<? super T, Float> selector) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (tArr.length == 0) {
throw new NoSuchElementException();
}
float floatValue = selector.invoke(tArr[0]).floatValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(tArr)).iterator();
while (it.hasNext()) {
floatValue = Math.min(floatValue, selector.invoke(tArr[it.nextInt()]).floatValue());
}
return floatValue;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
/* renamed from: minOf, reason: collision with other method in class */
private static final float m6089minOf(byte[] bArr, Function1<? super Byte, Float> selector) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (bArr.length == 0) {
throw new NoSuchElementException();
}
float floatValue = selector.invoke(Byte.valueOf(bArr[0])).floatValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(bArr)).iterator();
while (it.hasNext()) {
floatValue = Math.min(floatValue, selector.invoke(Byte.valueOf(bArr[it.nextInt()])).floatValue());
}
return floatValue;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
/* renamed from: minOf, reason: collision with other method in class */
private static final float m6096minOf(short[] sArr, Function1<? super Short, Float> selector) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (sArr.length == 0) {
throw new NoSuchElementException();
}
float floatValue = selector.invoke(Short.valueOf(sArr[0])).floatValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(sArr)).iterator();
while (it.hasNext()) {
floatValue = Math.min(floatValue, selector.invoke(Short.valueOf(sArr[it.nextInt()])).floatValue());
}
return floatValue;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
/* renamed from: minOf, reason: collision with other method in class */
private static final float m6093minOf(int[] iArr, Function1<? super Integer, Float> selector) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (iArr.length == 0) {
throw new NoSuchElementException();
}
float floatValue = selector.invoke(Integer.valueOf(iArr[0])).floatValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(iArr)).iterator();
while (it.hasNext()) {
floatValue = Math.min(floatValue, selector.invoke(Integer.valueOf(iArr[it.nextInt()])).floatValue());
}
return floatValue;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
/* renamed from: minOf, reason: collision with other method in class */
private static final float m6094minOf(long[] jArr, Function1<? super Long, Float> selector) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (jArr.length == 0) {
throw new NoSuchElementException();
}
float floatValue = selector.invoke(Long.valueOf(jArr[0])).floatValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(jArr)).iterator();
while (it.hasNext()) {
floatValue = Math.min(floatValue, selector.invoke(Long.valueOf(jArr[it.nextInt()])).floatValue());
}
return floatValue;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
/* renamed from: minOf, reason: collision with other method in class */
private static final float m6092minOf(float[] fArr, Function1<? super Float, Float> selector) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (fArr.length == 0) {
throw new NoSuchElementException();
}
float floatValue = selector.invoke(Float.valueOf(fArr[0])).floatValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(fArr)).iterator();
while (it.hasNext()) {
floatValue = Math.min(floatValue, selector.invoke(Float.valueOf(fArr[it.nextInt()])).floatValue());
}
return floatValue;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
/* renamed from: minOf, reason: collision with other method in class */
private static final float m6091minOf(double[] dArr, Function1<? super Double, Float> selector) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (dArr.length == 0) {
throw new NoSuchElementException();
}
float floatValue = selector.invoke(Double.valueOf(dArr[0])).floatValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(dArr)).iterator();
while (it.hasNext()) {
floatValue = Math.min(floatValue, selector.invoke(Double.valueOf(dArr[it.nextInt()])).floatValue());
}
return floatValue;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
/* renamed from: minOf, reason: collision with other method in class */
private static final float m6097minOf(boolean[] zArr, Function1<? super Boolean, Float> selector) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (zArr.length == 0) {
throw new NoSuchElementException();
}
float floatValue = selector.invoke(Boolean.valueOf(zArr[0])).floatValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(zArr)).iterator();
while (it.hasNext()) {
floatValue = Math.min(floatValue, selector.invoke(Boolean.valueOf(zArr[it.nextInt()])).floatValue());
}
return floatValue;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
/* renamed from: minOf, reason: collision with other method in class */
private static final float m6090minOf(char[] cArr, Function1<? super Character, Float> selector) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (cArr.length == 0) {
throw new NoSuchElementException();
}
float floatValue = selector.invoke(Character.valueOf(cArr[0])).floatValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(cArr)).iterator();
while (it.hasNext()) {
floatValue = Math.min(floatValue, selector.invoke(Character.valueOf(cArr[it.nextInt()])).floatValue());
}
return floatValue;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
/* renamed from: minOf, reason: collision with other method in class */
private static final <T, R extends Comparable<? super R>> R m6104minOf(T[] tArr, Function1<? super T, ? extends R> selector) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (tArr.length == 0) {
throw new NoSuchElementException();
}
R invoke = selector.invoke(tArr[0]);
?? it = new IntRange(1, ArraysKt.getLastIndex(tArr)).iterator();
while (it.hasNext()) {
R invoke2 = selector.invoke(tArr[it.nextInt()]);
if (invoke.compareTo(invoke2) > 0) {
invoke = invoke2;
}
}
return invoke;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
/* renamed from: minOf, reason: collision with other method in class */
private static final <R extends Comparable<? super R>> R m6098minOf(byte[] bArr, Function1<? super Byte, ? extends R> selector) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (bArr.length == 0) {
throw new NoSuchElementException();
}
R invoke = selector.invoke(Byte.valueOf(bArr[0]));
?? it = new IntRange(1, ArraysKt.getLastIndex(bArr)).iterator();
while (it.hasNext()) {
R invoke2 = selector.invoke(Byte.valueOf(bArr[it.nextInt()]));
if (invoke.compareTo(invoke2) > 0) {
invoke = invoke2;
}
}
return invoke;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
/* renamed from: minOf, reason: collision with other method in class */
private static final <R extends Comparable<? super R>> R m6105minOf(short[] sArr, Function1<? super Short, ? extends R> selector) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (sArr.length == 0) {
throw new NoSuchElementException();
}
R invoke = selector.invoke(Short.valueOf(sArr[0]));
?? it = new IntRange(1, ArraysKt.getLastIndex(sArr)).iterator();
while (it.hasNext()) {
R invoke2 = selector.invoke(Short.valueOf(sArr[it.nextInt()]));
if (invoke.compareTo(invoke2) > 0) {
invoke = invoke2;
}
}
return invoke;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
/* renamed from: minOf, reason: collision with other method in class */
private static final <R extends Comparable<? super R>> R m6102minOf(int[] iArr, Function1<? super Integer, ? extends R> selector) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (iArr.length == 0) {
throw new NoSuchElementException();
}
R invoke = selector.invoke(Integer.valueOf(iArr[0]));
?? it = new IntRange(1, ArraysKt.getLastIndex(iArr)).iterator();
while (it.hasNext()) {
R invoke2 = selector.invoke(Integer.valueOf(iArr[it.nextInt()]));
if (invoke.compareTo(invoke2) > 0) {
invoke = invoke2;
}
}
return invoke;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
/* renamed from: minOf, reason: collision with other method in class */
private static final <R extends Comparable<? super R>> R m6103minOf(long[] jArr, Function1<? super Long, ? extends R> selector) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (jArr.length == 0) {
throw new NoSuchElementException();
}
R invoke = selector.invoke(Long.valueOf(jArr[0]));
?? it = new IntRange(1, ArraysKt.getLastIndex(jArr)).iterator();
while (it.hasNext()) {
R invoke2 = selector.invoke(Long.valueOf(jArr[it.nextInt()]));
if (invoke.compareTo(invoke2) > 0) {
invoke = invoke2;
}
}
return invoke;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
/* renamed from: minOf, reason: collision with other method in class */
private static final <R extends Comparable<? super R>> R m6101minOf(float[] fArr, Function1<? super Float, ? extends R> selector) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (fArr.length == 0) {
throw new NoSuchElementException();
}
R invoke = selector.invoke(Float.valueOf(fArr[0]));
?? it = new IntRange(1, ArraysKt.getLastIndex(fArr)).iterator();
while (it.hasNext()) {
R invoke2 = selector.invoke(Float.valueOf(fArr[it.nextInt()]));
if (invoke.compareTo(invoke2) > 0) {
invoke = invoke2;
}
}
return invoke;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
/* renamed from: minOf, reason: collision with other method in class */
private static final <R extends Comparable<? super R>> R m6100minOf(double[] dArr, Function1<? super Double, ? extends R> selector) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (dArr.length == 0) {
throw new NoSuchElementException();
}
R invoke = selector.invoke(Double.valueOf(dArr[0]));
?? it = new IntRange(1, ArraysKt.getLastIndex(dArr)).iterator();
while (it.hasNext()) {
R invoke2 = selector.invoke(Double.valueOf(dArr[it.nextInt()]));
if (invoke.compareTo(invoke2) > 0) {
invoke = invoke2;
}
}
return invoke;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
/* renamed from: minOf, reason: collision with other method in class */
private static final <R extends Comparable<? super R>> R m6106minOf(boolean[] zArr, Function1<? super Boolean, ? extends R> selector) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (zArr.length == 0) {
throw new NoSuchElementException();
}
R invoke = selector.invoke(Boolean.valueOf(zArr[0]));
?? it = new IntRange(1, ArraysKt.getLastIndex(zArr)).iterator();
while (it.hasNext()) {
R invoke2 = selector.invoke(Boolean.valueOf(zArr[it.nextInt()]));
if (invoke.compareTo(invoke2) > 0) {
invoke = invoke2;
}
}
return invoke;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
/* renamed from: minOf, reason: collision with other method in class */
private static final <R extends Comparable<? super R>> R m6099minOf(char[] cArr, Function1<? super Character, ? extends R> selector) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (cArr.length == 0) {
throw new NoSuchElementException();
}
R invoke = selector.invoke(Character.valueOf(cArr[0]));
?? it = new IntRange(1, ArraysKt.getLastIndex(cArr)).iterator();
while (it.hasNext()) {
R invoke2 = selector.invoke(Character.valueOf(cArr[it.nextInt()]));
if (invoke.compareTo(invoke2) > 0) {
invoke = invoke2;
}
}
return invoke;
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
/* renamed from: minOfOrNull, reason: collision with other method in class */
private static final <T> Double m6113minOfOrNull(T[] tArr, Function1<? super T, Double> selector) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (tArr.length == 0) {
return null;
}
double doubleValue = selector.invoke(tArr[0]).doubleValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(tArr)).iterator();
while (it.hasNext()) {
doubleValue = Math.min(doubleValue, selector.invoke(tArr[it.nextInt()]).doubleValue());
}
return Double.valueOf(doubleValue);
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
/* renamed from: minOfOrNull, reason: collision with other method in class */
private static final Double m6107minOfOrNull(byte[] bArr, Function1<? super Byte, Double> selector) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (bArr.length == 0) {
return null;
}
double doubleValue = selector.invoke(Byte.valueOf(bArr[0])).doubleValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(bArr)).iterator();
while (it.hasNext()) {
doubleValue = Math.min(doubleValue, selector.invoke(Byte.valueOf(bArr[it.nextInt()])).doubleValue());
}
return Double.valueOf(doubleValue);
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
/* renamed from: minOfOrNull, reason: collision with other method in class */
private static final Double m6114minOfOrNull(short[] sArr, Function1<? super Short, Double> selector) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (sArr.length == 0) {
return null;
}
double doubleValue = selector.invoke(Short.valueOf(sArr[0])).doubleValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(sArr)).iterator();
while (it.hasNext()) {
doubleValue = Math.min(doubleValue, selector.invoke(Short.valueOf(sArr[it.nextInt()])).doubleValue());
}
return Double.valueOf(doubleValue);
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
/* renamed from: minOfOrNull, reason: collision with other method in class */
private static final Double m6111minOfOrNull(int[] iArr, Function1<? super Integer, Double> selector) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (iArr.length == 0) {
return null;
}
double doubleValue = selector.invoke(Integer.valueOf(iArr[0])).doubleValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(iArr)).iterator();
while (it.hasNext()) {
doubleValue = Math.min(doubleValue, selector.invoke(Integer.valueOf(iArr[it.nextInt()])).doubleValue());
}
return Double.valueOf(doubleValue);
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
/* renamed from: minOfOrNull, reason: collision with other method in class */
private static final Double m6112minOfOrNull(long[] jArr, Function1<? super Long, Double> selector) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (jArr.length == 0) {
return null;
}
double doubleValue = selector.invoke(Long.valueOf(jArr[0])).doubleValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(jArr)).iterator();
while (it.hasNext()) {
doubleValue = Math.min(doubleValue, selector.invoke(Long.valueOf(jArr[it.nextInt()])).doubleValue());
}
return Double.valueOf(doubleValue);
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
/* renamed from: minOfOrNull, reason: collision with other method in class */
private static final Double m6110minOfOrNull(float[] fArr, Function1<? super Float, Double> selector) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (fArr.length == 0) {
return null;
}
double doubleValue = selector.invoke(Float.valueOf(fArr[0])).doubleValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(fArr)).iterator();
while (it.hasNext()) {
doubleValue = Math.min(doubleValue, selector.invoke(Float.valueOf(fArr[it.nextInt()])).doubleValue());
}
return Double.valueOf(doubleValue);
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
/* renamed from: minOfOrNull, reason: collision with other method in class */
private static final Double m6109minOfOrNull(double[] dArr, Function1<? super Double, Double> selector) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (dArr.length == 0) {
return null;
}
double doubleValue = selector.invoke(Double.valueOf(dArr[0])).doubleValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(dArr)).iterator();
while (it.hasNext()) {
doubleValue = Math.min(doubleValue, selector.invoke(Double.valueOf(dArr[it.nextInt()])).doubleValue());
}
return Double.valueOf(doubleValue);
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
/* renamed from: minOfOrNull, reason: collision with other method in class */
private static final Double m6115minOfOrNull(boolean[] zArr, Function1<? super Boolean, Double> selector) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (zArr.length == 0) {
return null;
}
double doubleValue = selector.invoke(Boolean.valueOf(zArr[0])).doubleValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(zArr)).iterator();
while (it.hasNext()) {
doubleValue = Math.min(doubleValue, selector.invoke(Boolean.valueOf(zArr[it.nextInt()])).doubleValue());
}
return Double.valueOf(doubleValue);
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
/* renamed from: minOfOrNull, reason: collision with other method in class */
private static final Double m6108minOfOrNull(char[] cArr, Function1<? super Character, Double> selector) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (cArr.length == 0) {
return null;
}
double doubleValue = selector.invoke(Character.valueOf(cArr[0])).doubleValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(cArr)).iterator();
while (it.hasNext()) {
doubleValue = Math.min(doubleValue, selector.invoke(Character.valueOf(cArr[it.nextInt()])).doubleValue());
}
return Double.valueOf(doubleValue);
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
/* renamed from: minOfOrNull, reason: collision with other method in class */
private static final <T> Float m6122minOfOrNull(T[] tArr, Function1<? super T, Float> selector) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (tArr.length == 0) {
return null;
}
float floatValue = selector.invoke(tArr[0]).floatValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(tArr)).iterator();
while (it.hasNext()) {
floatValue = Math.min(floatValue, selector.invoke(tArr[it.nextInt()]).floatValue());
}
return Float.valueOf(floatValue);
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
/* renamed from: minOfOrNull, reason: collision with other method in class */
private static final Float m6116minOfOrNull(byte[] bArr, Function1<? super Byte, Float> selector) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (bArr.length == 0) {
return null;
}
float floatValue = selector.invoke(Byte.valueOf(bArr[0])).floatValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(bArr)).iterator();
while (it.hasNext()) {
floatValue = Math.min(floatValue, selector.invoke(Byte.valueOf(bArr[it.nextInt()])).floatValue());
}
return Float.valueOf(floatValue);
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
/* renamed from: minOfOrNull, reason: collision with other method in class */
private static final Float m6123minOfOrNull(short[] sArr, Function1<? super Short, Float> selector) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (sArr.length == 0) {
return null;
}
float floatValue = selector.invoke(Short.valueOf(sArr[0])).floatValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(sArr)).iterator();
while (it.hasNext()) {
floatValue = Math.min(floatValue, selector.invoke(Short.valueOf(sArr[it.nextInt()])).floatValue());
}
return Float.valueOf(floatValue);
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
/* renamed from: minOfOrNull, reason: collision with other method in class */
private static final Float m6120minOfOrNull(int[] iArr, Function1<? super Integer, Float> selector) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (iArr.length == 0) {
return null;
}
float floatValue = selector.invoke(Integer.valueOf(iArr[0])).floatValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(iArr)).iterator();
while (it.hasNext()) {
floatValue = Math.min(floatValue, selector.invoke(Integer.valueOf(iArr[it.nextInt()])).floatValue());
}
return Float.valueOf(floatValue);
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
/* renamed from: minOfOrNull, reason: collision with other method in class */
private static final Float m6121minOfOrNull(long[] jArr, Function1<? super Long, Float> selector) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (jArr.length == 0) {
return null;
}
float floatValue = selector.invoke(Long.valueOf(jArr[0])).floatValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(jArr)).iterator();
while (it.hasNext()) {
floatValue = Math.min(floatValue, selector.invoke(Long.valueOf(jArr[it.nextInt()])).floatValue());
}
return Float.valueOf(floatValue);
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
/* renamed from: minOfOrNull, reason: collision with other method in class */
private static final Float m6119minOfOrNull(float[] fArr, Function1<? super Float, Float> selector) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (fArr.length == 0) {
return null;
}
float floatValue = selector.invoke(Float.valueOf(fArr[0])).floatValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(fArr)).iterator();
while (it.hasNext()) {
floatValue = Math.min(floatValue, selector.invoke(Float.valueOf(fArr[it.nextInt()])).floatValue());
}
return Float.valueOf(floatValue);
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
/* renamed from: minOfOrNull, reason: collision with other method in class */
private static final Float m6118minOfOrNull(double[] dArr, Function1<? super Double, Float> selector) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (dArr.length == 0) {
return null;
}
float floatValue = selector.invoke(Double.valueOf(dArr[0])).floatValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(dArr)).iterator();
while (it.hasNext()) {
floatValue = Math.min(floatValue, selector.invoke(Double.valueOf(dArr[it.nextInt()])).floatValue());
}
return Float.valueOf(floatValue);
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
/* renamed from: minOfOrNull, reason: collision with other method in class */
private static final Float m6124minOfOrNull(boolean[] zArr, Function1<? super Boolean, Float> selector) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (zArr.length == 0) {
return null;
}
float floatValue = selector.invoke(Boolean.valueOf(zArr[0])).floatValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(zArr)).iterator();
while (it.hasNext()) {
floatValue = Math.min(floatValue, selector.invoke(Boolean.valueOf(zArr[it.nextInt()])).floatValue());
}
return Float.valueOf(floatValue);
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
/* renamed from: minOfOrNull, reason: collision with other method in class */
private static final Float m6117minOfOrNull(char[] cArr, Function1<? super Character, Float> selector) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (cArr.length == 0) {
return null;
}
float floatValue = selector.invoke(Character.valueOf(cArr[0])).floatValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(cArr)).iterator();
while (it.hasNext()) {
floatValue = Math.min(floatValue, selector.invoke(Character.valueOf(cArr[it.nextInt()])).floatValue());
}
return Float.valueOf(floatValue);
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
private static final <T, R extends Comparable<? super R>> R minOfOrNull(T[] tArr, Function1<? super T, ? extends R> selector) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (tArr.length == 0) {
return null;
}
R invoke = selector.invoke(tArr[0]);
?? it = new IntRange(1, ArraysKt.getLastIndex(tArr)).iterator();
while (it.hasNext()) {
R invoke2 = selector.invoke(tArr[it.nextInt()]);
if (invoke.compareTo(invoke2) > 0) {
invoke = invoke2;
}
}
return invoke;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
private static final <R extends Comparable<? super R>> R minOfOrNull(byte[] bArr, Function1<? super Byte, ? extends R> selector) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (bArr.length == 0) {
return null;
}
R invoke = selector.invoke(Byte.valueOf(bArr[0]));
?? it = new IntRange(1, ArraysKt.getLastIndex(bArr)).iterator();
while (it.hasNext()) {
R invoke2 = selector.invoke(Byte.valueOf(bArr[it.nextInt()]));
if (invoke.compareTo(invoke2) > 0) {
invoke = invoke2;
}
}
return invoke;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
private static final <R extends Comparable<? super R>> R minOfOrNull(short[] sArr, Function1<? super Short, ? extends R> selector) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (sArr.length == 0) {
return null;
}
R invoke = selector.invoke(Short.valueOf(sArr[0]));
?? it = new IntRange(1, ArraysKt.getLastIndex(sArr)).iterator();
while (it.hasNext()) {
R invoke2 = selector.invoke(Short.valueOf(sArr[it.nextInt()]));
if (invoke.compareTo(invoke2) > 0) {
invoke = invoke2;
}
}
return invoke;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
private static final <R extends Comparable<? super R>> R minOfOrNull(int[] iArr, Function1<? super Integer, ? extends R> selector) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (iArr.length == 0) {
return null;
}
R invoke = selector.invoke(Integer.valueOf(iArr[0]));
?? it = new IntRange(1, ArraysKt.getLastIndex(iArr)).iterator();
while (it.hasNext()) {
R invoke2 = selector.invoke(Integer.valueOf(iArr[it.nextInt()]));
if (invoke.compareTo(invoke2) > 0) {
invoke = invoke2;
}
}
return invoke;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
private static final <R extends Comparable<? super R>> R minOfOrNull(long[] jArr, Function1<? super Long, ? extends R> selector) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (jArr.length == 0) {
return null;
}
R invoke = selector.invoke(Long.valueOf(jArr[0]));
?? it = new IntRange(1, ArraysKt.getLastIndex(jArr)).iterator();
while (it.hasNext()) {
R invoke2 = selector.invoke(Long.valueOf(jArr[it.nextInt()]));
if (invoke.compareTo(invoke2) > 0) {
invoke = invoke2;
}
}
return invoke;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
private static final <R extends Comparable<? super R>> R minOfOrNull(float[] fArr, Function1<? super Float, ? extends R> selector) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (fArr.length == 0) {
return null;
}
R invoke = selector.invoke(Float.valueOf(fArr[0]));
?? it = new IntRange(1, ArraysKt.getLastIndex(fArr)).iterator();
while (it.hasNext()) {
R invoke2 = selector.invoke(Float.valueOf(fArr[it.nextInt()]));
if (invoke.compareTo(invoke2) > 0) {
invoke = invoke2;
}
}
return invoke;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
private static final <R extends Comparable<? super R>> R minOfOrNull(double[] dArr, Function1<? super Double, ? extends R> selector) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (dArr.length == 0) {
return null;
}
R invoke = selector.invoke(Double.valueOf(dArr[0]));
?? it = new IntRange(1, ArraysKt.getLastIndex(dArr)).iterator();
while (it.hasNext()) {
R invoke2 = selector.invoke(Double.valueOf(dArr[it.nextInt()]));
if (invoke.compareTo(invoke2) > 0) {
invoke = invoke2;
}
}
return invoke;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
private static final <R extends Comparable<? super R>> R minOfOrNull(boolean[] zArr, Function1<? super Boolean, ? extends R> selector) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (zArr.length == 0) {
return null;
}
R invoke = selector.invoke(Boolean.valueOf(zArr[0]));
?? it = new IntRange(1, ArraysKt.getLastIndex(zArr)).iterator();
while (it.hasNext()) {
R invoke2 = selector.invoke(Boolean.valueOf(zArr[it.nextInt()]));
if (invoke.compareTo(invoke2) > 0) {
invoke = invoke2;
}
}
return invoke;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
private static final <R extends Comparable<? super R>> R minOfOrNull(char[] cArr, Function1<? super Character, ? extends R> selector) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
if (cArr.length == 0) {
return null;
}
R invoke = selector.invoke(Character.valueOf(cArr[0]));
?? it = new IntRange(1, ArraysKt.getLastIndex(cArr)).iterator();
while (it.hasNext()) {
R invoke2 = selector.invoke(Character.valueOf(cArr[it.nextInt()]));
if (invoke.compareTo(invoke2) > 0) {
invoke = invoke2;
}
}
return invoke;
}
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Type inference failed for: r0v5, types: [java.lang.Object] */
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
/* JADX WARN: Type inference failed for: r2v3, types: [java.lang.Object] */
private static final <T, R> R minOfWith(T[] tArr, Comparator<? super R> comparator, Function1<? super T, ? extends R> selector) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
Intrinsics.checkNotNullParameter(selector, "selector");
if (tArr.length == 0) {
throw new NoSuchElementException();
}
Object obj = (R) selector.invoke(tArr[0]);
?? it = new IntRange(1, ArraysKt.getLastIndex(tArr)).iterator();
while (it.hasNext()) {
Object obj2 = (R) selector.invoke(tArr[it.nextInt()]);
if (comparator.compare(obj, obj2) > 0) {
obj = (R) obj2;
}
}
return (R) obj;
}
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
private static final <R> R minOfWith(byte[] bArr, Comparator<? super R> comparator, Function1<? super Byte, ? extends R> selector) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
Intrinsics.checkNotNullParameter(selector, "selector");
if (bArr.length == 0) {
throw new NoSuchElementException();
}
Object obj = (R) selector.invoke(Byte.valueOf(bArr[0]));
?? it = new IntRange(1, ArraysKt.getLastIndex(bArr)).iterator();
while (it.hasNext()) {
Object obj2 = (R) selector.invoke(Byte.valueOf(bArr[it.nextInt()]));
if (comparator.compare(obj, obj2) > 0) {
obj = (R) obj2;
}
}
return (R) obj;
}
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
private static final <R> R minOfWith(short[] sArr, Comparator<? super R> comparator, Function1<? super Short, ? extends R> selector) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
Intrinsics.checkNotNullParameter(selector, "selector");
if (sArr.length == 0) {
throw new NoSuchElementException();
}
Object obj = (R) selector.invoke(Short.valueOf(sArr[0]));
?? it = new IntRange(1, ArraysKt.getLastIndex(sArr)).iterator();
while (it.hasNext()) {
Object obj2 = (R) selector.invoke(Short.valueOf(sArr[it.nextInt()]));
if (comparator.compare(obj, obj2) > 0) {
obj = (R) obj2;
}
}
return (R) obj;
}
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
private static final <R> R minOfWith(int[] iArr, Comparator<? super R> comparator, Function1<? super Integer, ? extends R> selector) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
Intrinsics.checkNotNullParameter(selector, "selector");
if (iArr.length == 0) {
throw new NoSuchElementException();
}
Object obj = (R) selector.invoke(Integer.valueOf(iArr[0]));
?? it = new IntRange(1, ArraysKt.getLastIndex(iArr)).iterator();
while (it.hasNext()) {
Object obj2 = (R) selector.invoke(Integer.valueOf(iArr[it.nextInt()]));
if (comparator.compare(obj, obj2) > 0) {
obj = (R) obj2;
}
}
return (R) obj;
}
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
private static final <R> R minOfWith(long[] jArr, Comparator<? super R> comparator, Function1<? super Long, ? extends R> selector) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
Intrinsics.checkNotNullParameter(selector, "selector");
if (jArr.length == 0) {
throw new NoSuchElementException();
}
Object obj = (R) selector.invoke(Long.valueOf(jArr[0]));
?? it = new IntRange(1, ArraysKt.getLastIndex(jArr)).iterator();
while (it.hasNext()) {
Object obj2 = (R) selector.invoke(Long.valueOf(jArr[it.nextInt()]));
if (comparator.compare(obj, obj2) > 0) {
obj = (R) obj2;
}
}
return (R) obj;
}
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
private static final <R> R minOfWith(float[] fArr, Comparator<? super R> comparator, Function1<? super Float, ? extends R> selector) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
Intrinsics.checkNotNullParameter(selector, "selector");
if (fArr.length == 0) {
throw new NoSuchElementException();
}
Object obj = (R) selector.invoke(Float.valueOf(fArr[0]));
?? it = new IntRange(1, ArraysKt.getLastIndex(fArr)).iterator();
while (it.hasNext()) {
Object obj2 = (R) selector.invoke(Float.valueOf(fArr[it.nextInt()]));
if (comparator.compare(obj, obj2) > 0) {
obj = (R) obj2;
}
}
return (R) obj;
}
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
private static final <R> R minOfWith(double[] dArr, Comparator<? super R> comparator, Function1<? super Double, ? extends R> selector) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
Intrinsics.checkNotNullParameter(selector, "selector");
if (dArr.length == 0) {
throw new NoSuchElementException();
}
Object obj = (R) selector.invoke(Double.valueOf(dArr[0]));
?? it = new IntRange(1, ArraysKt.getLastIndex(dArr)).iterator();
while (it.hasNext()) {
Object obj2 = (R) selector.invoke(Double.valueOf(dArr[it.nextInt()]));
if (comparator.compare(obj, obj2) > 0) {
obj = (R) obj2;
}
}
return (R) obj;
}
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
private static final <R> R minOfWith(boolean[] zArr, Comparator<? super R> comparator, Function1<? super Boolean, ? extends R> selector) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
Intrinsics.checkNotNullParameter(selector, "selector");
if (zArr.length == 0) {
throw new NoSuchElementException();
}
Object obj = (R) selector.invoke(Boolean.valueOf(zArr[0]));
?? it = new IntRange(1, ArraysKt.getLastIndex(zArr)).iterator();
while (it.hasNext()) {
Object obj2 = (R) selector.invoke(Boolean.valueOf(zArr[it.nextInt()]));
if (comparator.compare(obj, obj2) > 0) {
obj = (R) obj2;
}
}
return (R) obj;
}
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
private static final <R> R minOfWith(char[] cArr, Comparator<? super R> comparator, Function1<? super Character, ? extends R> selector) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
Intrinsics.checkNotNullParameter(selector, "selector");
if (cArr.length == 0) {
throw new NoSuchElementException();
}
Object obj = (R) selector.invoke(Character.valueOf(cArr[0]));
?? it = new IntRange(1, ArraysKt.getLastIndex(cArr)).iterator();
while (it.hasNext()) {
Object obj2 = (R) selector.invoke(Character.valueOf(cArr[it.nextInt()]));
if (comparator.compare(obj, obj2) > 0) {
obj = (R) obj2;
}
}
return (R) obj;
}
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Type inference failed for: r0v5, types: [java.lang.Object] */
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
/* JADX WARN: Type inference failed for: r2v3, types: [java.lang.Object] */
private static final <T, R> R minOfWithOrNull(T[] tArr, Comparator<? super R> comparator, Function1<? super T, ? extends R> selector) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
Intrinsics.checkNotNullParameter(selector, "selector");
if (tArr.length == 0) {
return null;
}
Object obj = (R) selector.invoke(tArr[0]);
?? it = new IntRange(1, ArraysKt.getLastIndex(tArr)).iterator();
while (it.hasNext()) {
Object obj2 = (R) selector.invoke(tArr[it.nextInt()]);
if (comparator.compare(obj, obj2) > 0) {
obj = (R) obj2;
}
}
return (R) obj;
}
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
private static final <R> R minOfWithOrNull(byte[] bArr, Comparator<? super R> comparator, Function1<? super Byte, ? extends R> selector) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
Intrinsics.checkNotNullParameter(selector, "selector");
if (bArr.length == 0) {
return null;
}
Object obj = (R) selector.invoke(Byte.valueOf(bArr[0]));
?? it = new IntRange(1, ArraysKt.getLastIndex(bArr)).iterator();
while (it.hasNext()) {
Object obj2 = (R) selector.invoke(Byte.valueOf(bArr[it.nextInt()]));
if (comparator.compare(obj, obj2) > 0) {
obj = (R) obj2;
}
}
return (R) obj;
}
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
private static final <R> R minOfWithOrNull(short[] sArr, Comparator<? super R> comparator, Function1<? super Short, ? extends R> selector) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
Intrinsics.checkNotNullParameter(selector, "selector");
if (sArr.length == 0) {
return null;
}
Object obj = (R) selector.invoke(Short.valueOf(sArr[0]));
?? it = new IntRange(1, ArraysKt.getLastIndex(sArr)).iterator();
while (it.hasNext()) {
Object obj2 = (R) selector.invoke(Short.valueOf(sArr[it.nextInt()]));
if (comparator.compare(obj, obj2) > 0) {
obj = (R) obj2;
}
}
return (R) obj;
}
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
private static final <R> R minOfWithOrNull(int[] iArr, Comparator<? super R> comparator, Function1<? super Integer, ? extends R> selector) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
Intrinsics.checkNotNullParameter(selector, "selector");
if (iArr.length == 0) {
return null;
}
Object obj = (R) selector.invoke(Integer.valueOf(iArr[0]));
?? it = new IntRange(1, ArraysKt.getLastIndex(iArr)).iterator();
while (it.hasNext()) {
Object obj2 = (R) selector.invoke(Integer.valueOf(iArr[it.nextInt()]));
if (comparator.compare(obj, obj2) > 0) {
obj = (R) obj2;
}
}
return (R) obj;
}
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
private static final <R> R minOfWithOrNull(long[] jArr, Comparator<? super R> comparator, Function1<? super Long, ? extends R> selector) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
Intrinsics.checkNotNullParameter(selector, "selector");
if (jArr.length == 0) {
return null;
}
Object obj = (R) selector.invoke(Long.valueOf(jArr[0]));
?? it = new IntRange(1, ArraysKt.getLastIndex(jArr)).iterator();
while (it.hasNext()) {
Object obj2 = (R) selector.invoke(Long.valueOf(jArr[it.nextInt()]));
if (comparator.compare(obj, obj2) > 0) {
obj = (R) obj2;
}
}
return (R) obj;
}
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
private static final <R> R minOfWithOrNull(float[] fArr, Comparator<? super R> comparator, Function1<? super Float, ? extends R> selector) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
Intrinsics.checkNotNullParameter(selector, "selector");
if (fArr.length == 0) {
return null;
}
Object obj = (R) selector.invoke(Float.valueOf(fArr[0]));
?? it = new IntRange(1, ArraysKt.getLastIndex(fArr)).iterator();
while (it.hasNext()) {
Object obj2 = (R) selector.invoke(Float.valueOf(fArr[it.nextInt()]));
if (comparator.compare(obj, obj2) > 0) {
obj = (R) obj2;
}
}
return (R) obj;
}
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
private static final <R> R minOfWithOrNull(double[] dArr, Comparator<? super R> comparator, Function1<? super Double, ? extends R> selector) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
Intrinsics.checkNotNullParameter(selector, "selector");
if (dArr.length == 0) {
return null;
}
Object obj = (R) selector.invoke(Double.valueOf(dArr[0]));
?? it = new IntRange(1, ArraysKt.getLastIndex(dArr)).iterator();
while (it.hasNext()) {
Object obj2 = (R) selector.invoke(Double.valueOf(dArr[it.nextInt()]));
if (comparator.compare(obj, obj2) > 0) {
obj = (R) obj2;
}
}
return (R) obj;
}
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
private static final <R> R minOfWithOrNull(boolean[] zArr, Comparator<? super R> comparator, Function1<? super Boolean, ? extends R> selector) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
Intrinsics.checkNotNullParameter(selector, "selector");
if (zArr.length == 0) {
return null;
}
Object obj = (R) selector.invoke(Boolean.valueOf(zArr[0]));
?? it = new IntRange(1, ArraysKt.getLastIndex(zArr)).iterator();
while (it.hasNext()) {
Object obj2 = (R) selector.invoke(Boolean.valueOf(zArr[it.nextInt()]));
if (comparator.compare(obj, obj2) > 0) {
obj = (R) obj2;
}
}
return (R) obj;
}
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
private static final <R> R minOfWithOrNull(char[] cArr, Comparator<? super R> comparator, Function1<? super Character, ? extends R> selector) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
Intrinsics.checkNotNullParameter(selector, "selector");
if (cArr.length == 0) {
return null;
}
Object obj = (R) selector.invoke(Character.valueOf(cArr[0]));
?? it = new IntRange(1, ArraysKt.getLastIndex(cArr)).iterator();
while (it.hasNext()) {
Object obj2 = (R) selector.invoke(Character.valueOf(cArr[it.nextInt()]));
if (comparator.compare(obj, obj2) > 0) {
obj = (R) obj2;
}
}
return (R) obj;
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
public static final Double minOrNull(Double[] dArr) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
if (dArr.length == 0) {
return null;
}
double doubleValue = dArr[0].doubleValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(dArr)).iterator();
while (it.hasNext()) {
doubleValue = Math.min(doubleValue, dArr[it.nextInt()].doubleValue());
}
return Double.valueOf(doubleValue);
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final Float minOrNull(Float[] fArr) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
if (fArr.length == 0) {
return null;
}
float floatValue = fArr[0].floatValue();
?? it = new IntRange(1, ArraysKt.getLastIndex(fArr)).iterator();
while (it.hasNext()) {
floatValue = Math.min(floatValue, fArr[it.nextInt()].floatValue());
}
return Float.valueOf(floatValue);
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final <T extends Comparable<? super T>> T minOrNull(T[] tArr) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
if (tArr.length == 0) {
return null;
}
T t = tArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(tArr)).iterator();
while (it.hasNext()) {
T t2 = tArr[it.nextInt()];
if (t.compareTo(t2) > 0) {
t = t2;
}
}
return t;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final Byte minOrNull(byte[] bArr) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
if (bArr.length == 0) {
return null;
}
byte b = bArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(bArr)).iterator();
while (it.hasNext()) {
byte b2 = bArr[it.nextInt()];
if (b > b2) {
b = b2;
}
}
return Byte.valueOf(b);
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final Short minOrNull(short[] sArr) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
if (sArr.length == 0) {
return null;
}
short s = sArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(sArr)).iterator();
while (it.hasNext()) {
short s2 = sArr[it.nextInt()];
if (s > s2) {
s = s2;
}
}
return Short.valueOf(s);
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final Integer minOrNull(int[] iArr) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
if (iArr.length == 0) {
return null;
}
int i = iArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(iArr)).iterator();
while (it.hasNext()) {
int i2 = iArr[it.nextInt()];
if (i > i2) {
i = i2;
}
}
return Integer.valueOf(i);
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
public static final Long minOrNull(long[] jArr) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
if (jArr.length == 0) {
return null;
}
long j = jArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(jArr)).iterator();
while (it.hasNext()) {
long j2 = jArr[it.nextInt()];
if (j > j2) {
j = j2;
}
}
return Long.valueOf(j);
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final Float minOrNull(float[] fArr) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
if (fArr.length == 0) {
return null;
}
float f = fArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(fArr)).iterator();
while (it.hasNext()) {
f = Math.min(f, fArr[it.nextInt()]);
}
return Float.valueOf(f);
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
public static final Double minOrNull(double[] dArr) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
if (dArr.length == 0) {
return null;
}
double d = dArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(dArr)).iterator();
while (it.hasNext()) {
d = Math.min(d, dArr[it.nextInt()]);
}
return Double.valueOf(d);
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final Character minOrNull(char[] cArr) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
if (cArr.length == 0) {
return null;
}
char c = cArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(cArr)).iterator();
while (it.hasNext()) {
char c2 = cArr[it.nextInt()];
if (Intrinsics.compare((int) c, (int) c2) > 0) {
c = c2;
}
}
return Character.valueOf(c);
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final <T> T minWithOrThrow(T[] tArr, Comparator<? super T> comparator) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
if (tArr.length == 0) {
throw new NoSuchElementException();
}
T t = tArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(tArr)).iterator();
while (it.hasNext()) {
T t2 = tArr[it.nextInt()];
if (comparator.compare(t, t2) > 0) {
t = t2;
}
}
return t;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final byte minWithOrThrow(byte[] bArr, Comparator<? super Byte> comparator) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
if (bArr.length == 0) {
throw new NoSuchElementException();
}
byte b = bArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(bArr)).iterator();
while (it.hasNext()) {
byte b2 = bArr[it.nextInt()];
if (comparator.compare(Byte.valueOf(b), Byte.valueOf(b2)) > 0) {
b = b2;
}
}
return b;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final short minWithOrThrow(short[] sArr, Comparator<? super Short> comparator) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
if (sArr.length == 0) {
throw new NoSuchElementException();
}
short s = sArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(sArr)).iterator();
while (it.hasNext()) {
short s2 = sArr[it.nextInt()];
if (comparator.compare(Short.valueOf(s), Short.valueOf(s2)) > 0) {
s = s2;
}
}
return s;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final int minWithOrThrow(int[] iArr, Comparator<? super Integer> comparator) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
if (iArr.length == 0) {
throw new NoSuchElementException();
}
int i = iArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(iArr)).iterator();
while (it.hasNext()) {
int i2 = iArr[it.nextInt()];
if (comparator.compare(Integer.valueOf(i), Integer.valueOf(i2)) > 0) {
i = i2;
}
}
return i;
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
public static final long minWithOrThrow(long[] jArr, Comparator<? super Long> comparator) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
if (jArr.length == 0) {
throw new NoSuchElementException();
}
long j = jArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(jArr)).iterator();
while (it.hasNext()) {
long j2 = jArr[it.nextInt()];
if (comparator.compare(Long.valueOf(j), Long.valueOf(j2)) > 0) {
j = j2;
}
}
return j;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final float minWithOrThrow(float[] fArr, Comparator<? super Float> comparator) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
if (fArr.length == 0) {
throw new NoSuchElementException();
}
float f = fArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(fArr)).iterator();
while (it.hasNext()) {
float f2 = fArr[it.nextInt()];
if (comparator.compare(Float.valueOf(f), Float.valueOf(f2)) > 0) {
f = f2;
}
}
return f;
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
public static final double minWithOrThrow(double[] dArr, Comparator<? super Double> comparator) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
if (dArr.length == 0) {
throw new NoSuchElementException();
}
double d = dArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(dArr)).iterator();
while (it.hasNext()) {
double d2 = dArr[it.nextInt()];
if (comparator.compare(Double.valueOf(d), Double.valueOf(d2)) > 0) {
d = d2;
}
}
return d;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final boolean minWithOrThrow(boolean[] zArr, Comparator<? super Boolean> comparator) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
if (zArr.length == 0) {
throw new NoSuchElementException();
}
boolean z = zArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(zArr)).iterator();
while (it.hasNext()) {
boolean z2 = zArr[it.nextInt()];
if (comparator.compare(Boolean.valueOf(z), Boolean.valueOf(z2)) > 0) {
z = z2;
}
}
return z;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final char minWithOrThrow(char[] cArr, Comparator<? super Character> comparator) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
if (cArr.length == 0) {
throw new NoSuchElementException();
}
char c = cArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(cArr)).iterator();
while (it.hasNext()) {
char c2 = cArr[it.nextInt()];
if (comparator.compare(Character.valueOf(c), Character.valueOf(c2)) > 0) {
c = c2;
}
}
return c;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final <T> T minWithOrNull(T[] tArr, Comparator<? super T> comparator) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
if (tArr.length == 0) {
return null;
}
T t = tArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(tArr)).iterator();
while (it.hasNext()) {
T t2 = tArr[it.nextInt()];
if (comparator.compare(t, t2) > 0) {
t = t2;
}
}
return t;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final Byte minWithOrNull(byte[] bArr, Comparator<? super Byte> comparator) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
if (bArr.length == 0) {
return null;
}
byte b = bArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(bArr)).iterator();
while (it.hasNext()) {
byte b2 = bArr[it.nextInt()];
if (comparator.compare(Byte.valueOf(b), Byte.valueOf(b2)) > 0) {
b = b2;
}
}
return Byte.valueOf(b);
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final Short minWithOrNull(short[] sArr, Comparator<? super Short> comparator) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
if (sArr.length == 0) {
return null;
}
short s = sArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(sArr)).iterator();
while (it.hasNext()) {
short s2 = sArr[it.nextInt()];
if (comparator.compare(Short.valueOf(s), Short.valueOf(s2)) > 0) {
s = s2;
}
}
return Short.valueOf(s);
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final Integer minWithOrNull(int[] iArr, Comparator<? super Integer> comparator) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
if (iArr.length == 0) {
return null;
}
int i = iArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(iArr)).iterator();
while (it.hasNext()) {
int i2 = iArr[it.nextInt()];
if (comparator.compare(Integer.valueOf(i), Integer.valueOf(i2)) > 0) {
i = i2;
}
}
return Integer.valueOf(i);
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
public static final Long minWithOrNull(long[] jArr, Comparator<? super Long> comparator) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
if (jArr.length == 0) {
return null;
}
long j = jArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(jArr)).iterator();
while (it.hasNext()) {
long j2 = jArr[it.nextInt()];
if (comparator.compare(Long.valueOf(j), Long.valueOf(j2)) > 0) {
j = j2;
}
}
return Long.valueOf(j);
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final Float minWithOrNull(float[] fArr, Comparator<? super Float> comparator) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
if (fArr.length == 0) {
return null;
}
float f = fArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(fArr)).iterator();
while (it.hasNext()) {
float f2 = fArr[it.nextInt()];
if (comparator.compare(Float.valueOf(f), Float.valueOf(f2)) > 0) {
f = f2;
}
}
return Float.valueOf(f);
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
public static final Double minWithOrNull(double[] dArr, Comparator<? super Double> comparator) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
if (dArr.length == 0) {
return null;
}
double d = dArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(dArr)).iterator();
while (it.hasNext()) {
double d2 = dArr[it.nextInt()];
if (comparator.compare(Double.valueOf(d), Double.valueOf(d2)) > 0) {
d = d2;
}
}
return Double.valueOf(d);
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final Boolean minWithOrNull(boolean[] zArr, Comparator<? super Boolean> comparator) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
if (zArr.length == 0) {
return null;
}
boolean z = zArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(zArr)).iterator();
while (it.hasNext()) {
boolean z2 = zArr[it.nextInt()];
if (comparator.compare(Boolean.valueOf(z), Boolean.valueOf(z2)) > 0) {
z = z2;
}
}
return Boolean.valueOf(z);
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final Character minWithOrNull(char[] cArr, Comparator<? super Character> comparator) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(comparator, "comparator");
if (cArr.length == 0) {
return null;
}
char c = cArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(cArr)).iterator();
while (it.hasNext()) {
char c2 = cArr[it.nextInt()];
if (comparator.compare(Character.valueOf(c), Character.valueOf(c2)) > 0) {
c = c2;
}
}
return Character.valueOf(c);
}
public static final <T> boolean none(T[] tArr) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
return tArr.length == 0;
}
public static final boolean none(byte[] bArr) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
return bArr.length == 0;
}
public static final boolean none(short[] sArr) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
return sArr.length == 0;
}
public static final boolean none(int[] iArr) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
return iArr.length == 0;
}
public static final boolean none(long[] jArr) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
return jArr.length == 0;
}
public static final boolean none(float[] fArr) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
return fArr.length == 0;
}
public static final boolean none(double[] dArr) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
return dArr.length == 0;
}
public static final boolean none(boolean[] zArr) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
return zArr.length == 0;
}
public static final boolean none(char[] cArr) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
return cArr.length == 0;
}
public static final <T> boolean none(T[] tArr, Function1<? super T, Boolean> predicate) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (T t : tArr) {
if (predicate.invoke(t).booleanValue()) {
return false;
}
}
return true;
}
public static final boolean none(byte[] bArr, Function1<? super Byte, Boolean> predicate) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (byte b : bArr) {
if (predicate.invoke(Byte.valueOf(b)).booleanValue()) {
return false;
}
}
return true;
}
public static final boolean none(short[] sArr, Function1<? super Short, Boolean> predicate) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (short s : sArr) {
if (predicate.invoke(Short.valueOf(s)).booleanValue()) {
return false;
}
}
return true;
}
public static final boolean none(int[] iArr, Function1<? super Integer, Boolean> predicate) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (int i : iArr) {
if (predicate.invoke(Integer.valueOf(i)).booleanValue()) {
return false;
}
}
return true;
}
public static final boolean none(long[] jArr, Function1<? super Long, Boolean> predicate) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (long j : jArr) {
if (predicate.invoke(Long.valueOf(j)).booleanValue()) {
return false;
}
}
return true;
}
public static final boolean none(float[] fArr, Function1<? super Float, Boolean> predicate) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (float f : fArr) {
if (predicate.invoke(Float.valueOf(f)).booleanValue()) {
return false;
}
}
return true;
}
public static final boolean none(double[] dArr, Function1<? super Double, Boolean> predicate) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (double d : dArr) {
if (predicate.invoke(Double.valueOf(d)).booleanValue()) {
return false;
}
}
return true;
}
public static final boolean none(boolean[] zArr, Function1<? super Boolean, Boolean> predicate) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (boolean z : zArr) {
if (predicate.invoke(Boolean.valueOf(z)).booleanValue()) {
return false;
}
}
return true;
}
public static final boolean none(char[] cArr, Function1<? super Character, Boolean> predicate) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (char c : cArr) {
if (predicate.invoke(Character.valueOf(c)).booleanValue()) {
return false;
}
}
return true;
}
private static final <T> T[] onEach(T[] tArr, Function1<? super T, Unit> action) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(action, "action");
for (T t : tArr) {
action.invoke(t);
}
return tArr;
}
private static final byte[] onEach(byte[] bArr, Function1<? super Byte, Unit> action) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(action, "action");
for (byte b : bArr) {
action.invoke(Byte.valueOf(b));
}
return bArr;
}
private static final short[] onEach(short[] sArr, Function1<? super Short, Unit> action) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(action, "action");
for (short s : sArr) {
action.invoke(Short.valueOf(s));
}
return sArr;
}
private static final int[] onEach(int[] iArr, Function1<? super Integer, Unit> action) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(action, "action");
for (int i : iArr) {
action.invoke(Integer.valueOf(i));
}
return iArr;
}
private static final long[] onEach(long[] jArr, Function1<? super Long, Unit> action) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(action, "action");
for (long j : jArr) {
action.invoke(Long.valueOf(j));
}
return jArr;
}
private static final float[] onEach(float[] fArr, Function1<? super Float, Unit> action) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(action, "action");
for (float f : fArr) {
action.invoke(Float.valueOf(f));
}
return fArr;
}
private static final double[] onEach(double[] dArr, Function1<? super Double, Unit> action) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(action, "action");
for (double d : dArr) {
action.invoke(Double.valueOf(d));
}
return dArr;
}
private static final boolean[] onEach(boolean[] zArr, Function1<? super Boolean, Unit> action) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(action, "action");
for (boolean z : zArr) {
action.invoke(Boolean.valueOf(z));
}
return zArr;
}
private static final char[] onEach(char[] cArr, Function1<? super Character, Unit> action) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(action, "action");
for (char c : cArr) {
action.invoke(Character.valueOf(c));
}
return cArr;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final <S, T extends S> S reduce(T[] tArr, Function2<? super S, ? super T, ? extends S> operation) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (tArr.length == 0) {
throw new UnsupportedOperationException("Empty array can't be reduced.");
}
S s = (S) tArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(tArr)).iterator();
while (it.hasNext()) {
s = operation.invoke(s, (Object) tArr[it.nextInt()]);
}
return s;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final byte reduce(byte[] bArr, Function2<? super Byte, ? super Byte, Byte> operation) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (bArr.length == 0) {
throw new UnsupportedOperationException("Empty array can't be reduced.");
}
byte b = bArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(bArr)).iterator();
while (it.hasNext()) {
b = operation.invoke(Byte.valueOf(b), Byte.valueOf(bArr[it.nextInt()])).byteValue();
}
return b;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final short reduce(short[] sArr, Function2<? super Short, ? super Short, Short> operation) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (sArr.length == 0) {
throw new UnsupportedOperationException("Empty array can't be reduced.");
}
short s = sArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(sArr)).iterator();
while (it.hasNext()) {
s = operation.invoke(Short.valueOf(s), Short.valueOf(sArr[it.nextInt()])).shortValue();
}
return s;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final int reduce(int[] iArr, Function2<? super Integer, ? super Integer, Integer> operation) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (iArr.length == 0) {
throw new UnsupportedOperationException("Empty array can't be reduced.");
}
int i = iArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(iArr)).iterator();
while (it.hasNext()) {
i = operation.invoke(Integer.valueOf(i), Integer.valueOf(iArr[it.nextInt()])).intValue();
}
return i;
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
public static final long reduce(long[] jArr, Function2<? super Long, ? super Long, Long> operation) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (jArr.length == 0) {
throw new UnsupportedOperationException("Empty array can't be reduced.");
}
long j = jArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(jArr)).iterator();
while (it.hasNext()) {
j = operation.invoke(Long.valueOf(j), Long.valueOf(jArr[it.nextInt()])).longValue();
}
return j;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final float reduce(float[] fArr, Function2<? super Float, ? super Float, Float> operation) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (fArr.length == 0) {
throw new UnsupportedOperationException("Empty array can't be reduced.");
}
float f = fArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(fArr)).iterator();
while (it.hasNext()) {
f = operation.invoke(Float.valueOf(f), Float.valueOf(fArr[it.nextInt()])).floatValue();
}
return f;
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
public static final double reduce(double[] dArr, Function2<? super Double, ? super Double, Double> operation) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (dArr.length == 0) {
throw new UnsupportedOperationException("Empty array can't be reduced.");
}
double d = dArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(dArr)).iterator();
while (it.hasNext()) {
d = operation.invoke(Double.valueOf(d), Double.valueOf(dArr[it.nextInt()])).doubleValue();
}
return d;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final boolean reduce(boolean[] zArr, Function2<? super Boolean, ? super Boolean, Boolean> operation) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (zArr.length == 0) {
throw new UnsupportedOperationException("Empty array can't be reduced.");
}
boolean z = zArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(zArr)).iterator();
while (it.hasNext()) {
z = operation.invoke(Boolean.valueOf(z), Boolean.valueOf(zArr[it.nextInt()])).booleanValue();
}
return z;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final char reduce(char[] cArr, Function2<? super Character, ? super Character, Character> operation) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (cArr.length == 0) {
throw new UnsupportedOperationException("Empty array can't be reduced.");
}
char c = cArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(cArr)).iterator();
while (it.hasNext()) {
c = operation.invoke(Character.valueOf(c), Character.valueOf(cArr[it.nextInt()])).charValue();
}
return c;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final <S, T extends S> S reduceIndexed(T[] tArr, Function3<? super Integer, ? super S, ? super T, ? extends S> operation) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (tArr.length == 0) {
throw new UnsupportedOperationException("Empty array can't be reduced.");
}
S s = (S) tArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(tArr)).iterator();
while (it.hasNext()) {
int nextInt = it.nextInt();
s = operation.invoke(Integer.valueOf(nextInt), s, (Object) tArr[nextInt]);
}
return s;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final byte reduceIndexed(byte[] bArr, Function3<? super Integer, ? super Byte, ? super Byte, Byte> operation) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (bArr.length == 0) {
throw new UnsupportedOperationException("Empty array can't be reduced.");
}
byte b = bArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(bArr)).iterator();
while (it.hasNext()) {
int nextInt = it.nextInt();
b = operation.invoke(Integer.valueOf(nextInt), Byte.valueOf(b), Byte.valueOf(bArr[nextInt])).byteValue();
}
return b;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final short reduceIndexed(short[] sArr, Function3<? super Integer, ? super Short, ? super Short, Short> operation) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (sArr.length == 0) {
throw new UnsupportedOperationException("Empty array can't be reduced.");
}
short s = sArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(sArr)).iterator();
while (it.hasNext()) {
int nextInt = it.nextInt();
s = operation.invoke(Integer.valueOf(nextInt), Short.valueOf(s), Short.valueOf(sArr[nextInt])).shortValue();
}
return s;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final int reduceIndexed(int[] iArr, Function3<? super Integer, ? super Integer, ? super Integer, Integer> operation) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (iArr.length == 0) {
throw new UnsupportedOperationException("Empty array can't be reduced.");
}
int i = iArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(iArr)).iterator();
while (it.hasNext()) {
int nextInt = it.nextInt();
i = operation.invoke(Integer.valueOf(nextInt), Integer.valueOf(i), Integer.valueOf(iArr[nextInt])).intValue();
}
return i;
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
public static final long reduceIndexed(long[] jArr, Function3<? super Integer, ? super Long, ? super Long, Long> operation) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (jArr.length == 0) {
throw new UnsupportedOperationException("Empty array can't be reduced.");
}
long j = jArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(jArr)).iterator();
while (it.hasNext()) {
int nextInt = it.nextInt();
j = operation.invoke(Integer.valueOf(nextInt), Long.valueOf(j), Long.valueOf(jArr[nextInt])).longValue();
}
return j;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final float reduceIndexed(float[] fArr, Function3<? super Integer, ? super Float, ? super Float, Float> operation) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (fArr.length == 0) {
throw new UnsupportedOperationException("Empty array can't be reduced.");
}
float f = fArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(fArr)).iterator();
while (it.hasNext()) {
int nextInt = it.nextInt();
f = operation.invoke(Integer.valueOf(nextInt), Float.valueOf(f), Float.valueOf(fArr[nextInt])).floatValue();
}
return f;
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
public static final double reduceIndexed(double[] dArr, Function3<? super Integer, ? super Double, ? super Double, Double> operation) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (dArr.length == 0) {
throw new UnsupportedOperationException("Empty array can't be reduced.");
}
double d = dArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(dArr)).iterator();
while (it.hasNext()) {
int nextInt = it.nextInt();
d = operation.invoke(Integer.valueOf(nextInt), Double.valueOf(d), Double.valueOf(dArr[nextInt])).doubleValue();
}
return d;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final boolean reduceIndexed(boolean[] zArr, Function3<? super Integer, ? super Boolean, ? super Boolean, Boolean> operation) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (zArr.length == 0) {
throw new UnsupportedOperationException("Empty array can't be reduced.");
}
boolean z = zArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(zArr)).iterator();
while (it.hasNext()) {
int nextInt = it.nextInt();
z = operation.invoke(Integer.valueOf(nextInt), Boolean.valueOf(z), Boolean.valueOf(zArr[nextInt])).booleanValue();
}
return z;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final char reduceIndexed(char[] cArr, Function3<? super Integer, ? super Character, ? super Character, Character> operation) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (cArr.length == 0) {
throw new UnsupportedOperationException("Empty array can't be reduced.");
}
char c = cArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(cArr)).iterator();
while (it.hasNext()) {
int nextInt = it.nextInt();
c = operation.invoke(Integer.valueOf(nextInt), Character.valueOf(c), Character.valueOf(cArr[nextInt])).charValue();
}
return c;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final <S, T extends S> S reduceIndexedOrNull(T[] tArr, Function3<? super Integer, ? super S, ? super T, ? extends S> operation) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (tArr.length == 0) {
return null;
}
S s = (S) tArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(tArr)).iterator();
while (it.hasNext()) {
int nextInt = it.nextInt();
s = operation.invoke(Integer.valueOf(nextInt), s, (Object) tArr[nextInt]);
}
return s;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final Byte reduceIndexedOrNull(byte[] bArr, Function3<? super Integer, ? super Byte, ? super Byte, Byte> operation) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (bArr.length == 0) {
return null;
}
byte b = bArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(bArr)).iterator();
while (it.hasNext()) {
int nextInt = it.nextInt();
b = operation.invoke(Integer.valueOf(nextInt), Byte.valueOf(b), Byte.valueOf(bArr[nextInt])).byteValue();
}
return Byte.valueOf(b);
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final Short reduceIndexedOrNull(short[] sArr, Function3<? super Integer, ? super Short, ? super Short, Short> operation) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (sArr.length == 0) {
return null;
}
short s = sArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(sArr)).iterator();
while (it.hasNext()) {
int nextInt = it.nextInt();
s = operation.invoke(Integer.valueOf(nextInt), Short.valueOf(s), Short.valueOf(sArr[nextInt])).shortValue();
}
return Short.valueOf(s);
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final Integer reduceIndexedOrNull(int[] iArr, Function3<? super Integer, ? super Integer, ? super Integer, Integer> operation) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (iArr.length == 0) {
return null;
}
int i = iArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(iArr)).iterator();
while (it.hasNext()) {
int nextInt = it.nextInt();
i = operation.invoke(Integer.valueOf(nextInt), Integer.valueOf(i), Integer.valueOf(iArr[nextInt])).intValue();
}
return Integer.valueOf(i);
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
public static final Long reduceIndexedOrNull(long[] jArr, Function3<? super Integer, ? super Long, ? super Long, Long> operation) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (jArr.length == 0) {
return null;
}
long j = jArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(jArr)).iterator();
while (it.hasNext()) {
int nextInt = it.nextInt();
j = operation.invoke(Integer.valueOf(nextInt), Long.valueOf(j), Long.valueOf(jArr[nextInt])).longValue();
}
return Long.valueOf(j);
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final Float reduceIndexedOrNull(float[] fArr, Function3<? super Integer, ? super Float, ? super Float, Float> operation) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (fArr.length == 0) {
return null;
}
float f = fArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(fArr)).iterator();
while (it.hasNext()) {
int nextInt = it.nextInt();
f = operation.invoke(Integer.valueOf(nextInt), Float.valueOf(f), Float.valueOf(fArr[nextInt])).floatValue();
}
return Float.valueOf(f);
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
public static final Double reduceIndexedOrNull(double[] dArr, Function3<? super Integer, ? super Double, ? super Double, Double> operation) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (dArr.length == 0) {
return null;
}
double d = dArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(dArr)).iterator();
while (it.hasNext()) {
int nextInt = it.nextInt();
d = operation.invoke(Integer.valueOf(nextInt), Double.valueOf(d), Double.valueOf(dArr[nextInt])).doubleValue();
}
return Double.valueOf(d);
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final Boolean reduceIndexedOrNull(boolean[] zArr, Function3<? super Integer, ? super Boolean, ? super Boolean, Boolean> operation) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (zArr.length == 0) {
return null;
}
boolean z = zArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(zArr)).iterator();
while (it.hasNext()) {
int nextInt = it.nextInt();
z = operation.invoke(Integer.valueOf(nextInt), Boolean.valueOf(z), Boolean.valueOf(zArr[nextInt])).booleanValue();
}
return Boolean.valueOf(z);
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final Character reduceIndexedOrNull(char[] cArr, Function3<? super Integer, ? super Character, ? super Character, Character> operation) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (cArr.length == 0) {
return null;
}
char c = cArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(cArr)).iterator();
while (it.hasNext()) {
int nextInt = it.nextInt();
c = operation.invoke(Integer.valueOf(nextInt), Character.valueOf(c), Character.valueOf(cArr[nextInt])).charValue();
}
return Character.valueOf(c);
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final <S, T extends S> S reduceOrNull(T[] tArr, Function2<? super S, ? super T, ? extends S> operation) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (tArr.length == 0) {
return null;
}
S s = (S) tArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(tArr)).iterator();
while (it.hasNext()) {
s = operation.invoke(s, (Object) tArr[it.nextInt()]);
}
return s;
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final Byte reduceOrNull(byte[] bArr, Function2<? super Byte, ? super Byte, Byte> operation) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (bArr.length == 0) {
return null;
}
byte b = bArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(bArr)).iterator();
while (it.hasNext()) {
b = operation.invoke(Byte.valueOf(b), Byte.valueOf(bArr[it.nextInt()])).byteValue();
}
return Byte.valueOf(b);
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final Short reduceOrNull(short[] sArr, Function2<? super Short, ? super Short, Short> operation) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (sArr.length == 0) {
return null;
}
short s = sArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(sArr)).iterator();
while (it.hasNext()) {
s = operation.invoke(Short.valueOf(s), Short.valueOf(sArr[it.nextInt()])).shortValue();
}
return Short.valueOf(s);
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final Integer reduceOrNull(int[] iArr, Function2<? super Integer, ? super Integer, Integer> operation) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (iArr.length == 0) {
return null;
}
int i = iArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(iArr)).iterator();
while (it.hasNext()) {
i = operation.invoke(Integer.valueOf(i), Integer.valueOf(iArr[it.nextInt()])).intValue();
}
return Integer.valueOf(i);
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
public static final Long reduceOrNull(long[] jArr, Function2<? super Long, ? super Long, Long> operation) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (jArr.length == 0) {
return null;
}
long j = jArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(jArr)).iterator();
while (it.hasNext()) {
j = operation.invoke(Long.valueOf(j), Long.valueOf(jArr[it.nextInt()])).longValue();
}
return Long.valueOf(j);
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final Float reduceOrNull(float[] fArr, Function2<? super Float, ? super Float, Float> operation) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (fArr.length == 0) {
return null;
}
float f = fArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(fArr)).iterator();
while (it.hasNext()) {
f = operation.invoke(Float.valueOf(f), Float.valueOf(fArr[it.nextInt()])).floatValue();
}
return Float.valueOf(f);
}
/* JADX WARN: Type inference failed for: r2v1, types: [kotlin.collections.IntIterator] */
public static final Double reduceOrNull(double[] dArr, Function2<? super Double, ? super Double, Double> operation) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (dArr.length == 0) {
return null;
}
double d = dArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(dArr)).iterator();
while (it.hasNext()) {
d = operation.invoke(Double.valueOf(d), Double.valueOf(dArr[it.nextInt()])).doubleValue();
}
return Double.valueOf(d);
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final Boolean reduceOrNull(boolean[] zArr, Function2<? super Boolean, ? super Boolean, Boolean> operation) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (zArr.length == 0) {
return null;
}
boolean z = zArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(zArr)).iterator();
while (it.hasNext()) {
z = operation.invoke(Boolean.valueOf(z), Boolean.valueOf(zArr[it.nextInt()])).booleanValue();
}
return Boolean.valueOf(z);
}
/* JADX WARN: Type inference failed for: r1v1, types: [kotlin.collections.IntIterator] */
public static final Character reduceOrNull(char[] cArr, Function2<? super Character, ? super Character, Character> operation) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (cArr.length == 0) {
return null;
}
char c = cArr[0];
?? it = new IntRange(1, ArraysKt.getLastIndex(cArr)).iterator();
while (it.hasNext()) {
c = operation.invoke(Character.valueOf(c), Character.valueOf(cArr[it.nextInt()])).charValue();
}
return Character.valueOf(c);
}
public static final <S, T extends S> S reduceRight(T[] tArr, Function2<? super T, ? super S, ? extends S> operation) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
int lastIndex = ArraysKt.getLastIndex(tArr);
if (lastIndex < 0) {
throw new UnsupportedOperationException("Empty array can't be reduced.");
}
S s = (S) tArr[lastIndex];
for (int i = lastIndex - 1; i >= 0; i--) {
s = operation.invoke((Object) tArr[i], s);
}
return s;
}
public static final byte reduceRight(byte[] bArr, Function2<? super Byte, ? super Byte, Byte> operation) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
int lastIndex = ArraysKt.getLastIndex(bArr);
if (lastIndex < 0) {
throw new UnsupportedOperationException("Empty array can't be reduced.");
}
byte b = bArr[lastIndex];
for (int i = lastIndex - 1; i >= 0; i--) {
b = operation.invoke(Byte.valueOf(bArr[i]), Byte.valueOf(b)).byteValue();
}
return b;
}
public static final short reduceRight(short[] sArr, Function2<? super Short, ? super Short, Short> operation) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
int lastIndex = ArraysKt.getLastIndex(sArr);
if (lastIndex < 0) {
throw new UnsupportedOperationException("Empty array can't be reduced.");
}
short s = sArr[lastIndex];
for (int i = lastIndex - 1; i >= 0; i--) {
s = operation.invoke(Short.valueOf(sArr[i]), Short.valueOf(s)).shortValue();
}
return s;
}
public static final int reduceRight(int[] iArr, Function2<? super Integer, ? super Integer, Integer> operation) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
int lastIndex = ArraysKt.getLastIndex(iArr);
if (lastIndex < 0) {
throw new UnsupportedOperationException("Empty array can't be reduced.");
}
int i = iArr[lastIndex];
for (int i2 = lastIndex - 1; i2 >= 0; i2--) {
i = operation.invoke(Integer.valueOf(iArr[i2]), Integer.valueOf(i)).intValue();
}
return i;
}
public static final long reduceRight(long[] jArr, Function2<? super Long, ? super Long, Long> operation) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
int lastIndex = ArraysKt.getLastIndex(jArr);
if (lastIndex < 0) {
throw new UnsupportedOperationException("Empty array can't be reduced.");
}
long j = jArr[lastIndex];
for (int i = lastIndex - 1; i >= 0; i--) {
j = operation.invoke(Long.valueOf(jArr[i]), Long.valueOf(j)).longValue();
}
return j;
}
public static final float reduceRight(float[] fArr, Function2<? super Float, ? super Float, Float> operation) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
int lastIndex = ArraysKt.getLastIndex(fArr);
if (lastIndex < 0) {
throw new UnsupportedOperationException("Empty array can't be reduced.");
}
float f = fArr[lastIndex];
for (int i = lastIndex - 1; i >= 0; i--) {
f = operation.invoke(Float.valueOf(fArr[i]), Float.valueOf(f)).floatValue();
}
return f;
}
public static final double reduceRight(double[] dArr, Function2<? super Double, ? super Double, Double> operation) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
int lastIndex = ArraysKt.getLastIndex(dArr);
if (lastIndex < 0) {
throw new UnsupportedOperationException("Empty array can't be reduced.");
}
double d = dArr[lastIndex];
for (int i = lastIndex - 1; i >= 0; i--) {
d = operation.invoke(Double.valueOf(dArr[i]), Double.valueOf(d)).doubleValue();
}
return d;
}
public static final boolean reduceRight(boolean[] zArr, Function2<? super Boolean, ? super Boolean, Boolean> operation) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
int lastIndex = ArraysKt.getLastIndex(zArr);
if (lastIndex < 0) {
throw new UnsupportedOperationException("Empty array can't be reduced.");
}
boolean z = zArr[lastIndex];
for (int i = lastIndex - 1; i >= 0; i--) {
z = operation.invoke(Boolean.valueOf(zArr[i]), Boolean.valueOf(z)).booleanValue();
}
return z;
}
public static final char reduceRight(char[] cArr, Function2<? super Character, ? super Character, Character> operation) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
int lastIndex = ArraysKt.getLastIndex(cArr);
if (lastIndex < 0) {
throw new UnsupportedOperationException("Empty array can't be reduced.");
}
char c = cArr[lastIndex];
for (int i = lastIndex - 1; i >= 0; i--) {
c = operation.invoke(Character.valueOf(cArr[i]), Character.valueOf(c)).charValue();
}
return c;
}
public static final <S, T extends S> S reduceRightIndexed(T[] tArr, Function3<? super Integer, ? super T, ? super S, ? extends S> operation) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
int lastIndex = ArraysKt.getLastIndex(tArr);
if (lastIndex < 0) {
throw new UnsupportedOperationException("Empty array can't be reduced.");
}
S s = (S) tArr[lastIndex];
for (int i = lastIndex - 1; i >= 0; i--) {
s = operation.invoke(Integer.valueOf(i), (Object) tArr[i], s);
}
return s;
}
public static final byte reduceRightIndexed(byte[] bArr, Function3<? super Integer, ? super Byte, ? super Byte, Byte> operation) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
int lastIndex = ArraysKt.getLastIndex(bArr);
if (lastIndex < 0) {
throw new UnsupportedOperationException("Empty array can't be reduced.");
}
byte b = bArr[lastIndex];
for (int i = lastIndex - 1; i >= 0; i--) {
b = operation.invoke(Integer.valueOf(i), Byte.valueOf(bArr[i]), Byte.valueOf(b)).byteValue();
}
return b;
}
public static final short reduceRightIndexed(short[] sArr, Function3<? super Integer, ? super Short, ? super Short, Short> operation) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
int lastIndex = ArraysKt.getLastIndex(sArr);
if (lastIndex < 0) {
throw new UnsupportedOperationException("Empty array can't be reduced.");
}
short s = sArr[lastIndex];
for (int i = lastIndex - 1; i >= 0; i--) {
s = operation.invoke(Integer.valueOf(i), Short.valueOf(sArr[i]), Short.valueOf(s)).shortValue();
}
return s;
}
public static final int reduceRightIndexed(int[] iArr, Function3<? super Integer, ? super Integer, ? super Integer, Integer> operation) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
int lastIndex = ArraysKt.getLastIndex(iArr);
if (lastIndex < 0) {
throw new UnsupportedOperationException("Empty array can't be reduced.");
}
int i = iArr[lastIndex];
for (int i2 = lastIndex - 1; i2 >= 0; i2--) {
i = operation.invoke(Integer.valueOf(i2), Integer.valueOf(iArr[i2]), Integer.valueOf(i)).intValue();
}
return i;
}
public static final long reduceRightIndexed(long[] jArr, Function3<? super Integer, ? super Long, ? super Long, Long> operation) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
int lastIndex = ArraysKt.getLastIndex(jArr);
if (lastIndex < 0) {
throw new UnsupportedOperationException("Empty array can't be reduced.");
}
long j = jArr[lastIndex];
for (int i = lastIndex - 1; i >= 0; i--) {
j = operation.invoke(Integer.valueOf(i), Long.valueOf(jArr[i]), Long.valueOf(j)).longValue();
}
return j;
}
public static final float reduceRightIndexed(float[] fArr, Function3<? super Integer, ? super Float, ? super Float, Float> operation) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
int lastIndex = ArraysKt.getLastIndex(fArr);
if (lastIndex < 0) {
throw new UnsupportedOperationException("Empty array can't be reduced.");
}
float f = fArr[lastIndex];
for (int i = lastIndex - 1; i >= 0; i--) {
f = operation.invoke(Integer.valueOf(i), Float.valueOf(fArr[i]), Float.valueOf(f)).floatValue();
}
return f;
}
public static final double reduceRightIndexed(double[] dArr, Function3<? super Integer, ? super Double, ? super Double, Double> operation) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
int lastIndex = ArraysKt.getLastIndex(dArr);
if (lastIndex < 0) {
throw new UnsupportedOperationException("Empty array can't be reduced.");
}
double d = dArr[lastIndex];
for (int i = lastIndex - 1; i >= 0; i--) {
d = operation.invoke(Integer.valueOf(i), Double.valueOf(dArr[i]), Double.valueOf(d)).doubleValue();
}
return d;
}
public static final boolean reduceRightIndexed(boolean[] zArr, Function3<? super Integer, ? super Boolean, ? super Boolean, Boolean> operation) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
int lastIndex = ArraysKt.getLastIndex(zArr);
if (lastIndex < 0) {
throw new UnsupportedOperationException("Empty array can't be reduced.");
}
boolean z = zArr[lastIndex];
for (int i = lastIndex - 1; i >= 0; i--) {
z = operation.invoke(Integer.valueOf(i), Boolean.valueOf(zArr[i]), Boolean.valueOf(z)).booleanValue();
}
return z;
}
public static final char reduceRightIndexed(char[] cArr, Function3<? super Integer, ? super Character, ? super Character, Character> operation) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
int lastIndex = ArraysKt.getLastIndex(cArr);
if (lastIndex < 0) {
throw new UnsupportedOperationException("Empty array can't be reduced.");
}
char c = cArr[lastIndex];
for (int i = lastIndex - 1; i >= 0; i--) {
c = operation.invoke(Integer.valueOf(i), Character.valueOf(cArr[i]), Character.valueOf(c)).charValue();
}
return c;
}
public static final <S, T extends S> S reduceRightIndexedOrNull(T[] tArr, Function3<? super Integer, ? super T, ? super S, ? extends S> operation) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
int lastIndex = ArraysKt.getLastIndex(tArr);
if (lastIndex < 0) {
return null;
}
S s = (S) tArr[lastIndex];
for (int i = lastIndex - 1; i >= 0; i--) {
s = operation.invoke(Integer.valueOf(i), (Object) tArr[i], s);
}
return s;
}
public static final Byte reduceRightIndexedOrNull(byte[] bArr, Function3<? super Integer, ? super Byte, ? super Byte, Byte> operation) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
int lastIndex = ArraysKt.getLastIndex(bArr);
if (lastIndex < 0) {
return null;
}
byte b = bArr[lastIndex];
for (int i = lastIndex - 1; i >= 0; i--) {
b = operation.invoke(Integer.valueOf(i), Byte.valueOf(bArr[i]), Byte.valueOf(b)).byteValue();
}
return Byte.valueOf(b);
}
public static final Short reduceRightIndexedOrNull(short[] sArr, Function3<? super Integer, ? super Short, ? super Short, Short> operation) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
int lastIndex = ArraysKt.getLastIndex(sArr);
if (lastIndex < 0) {
return null;
}
short s = sArr[lastIndex];
for (int i = lastIndex - 1; i >= 0; i--) {
s = operation.invoke(Integer.valueOf(i), Short.valueOf(sArr[i]), Short.valueOf(s)).shortValue();
}
return Short.valueOf(s);
}
public static final Integer reduceRightIndexedOrNull(int[] iArr, Function3<? super Integer, ? super Integer, ? super Integer, Integer> operation) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
int lastIndex = ArraysKt.getLastIndex(iArr);
if (lastIndex < 0) {
return null;
}
int i = iArr[lastIndex];
for (int i2 = lastIndex - 1; i2 >= 0; i2--) {
i = operation.invoke(Integer.valueOf(i2), Integer.valueOf(iArr[i2]), Integer.valueOf(i)).intValue();
}
return Integer.valueOf(i);
}
public static final Long reduceRightIndexedOrNull(long[] jArr, Function3<? super Integer, ? super Long, ? super Long, Long> operation) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
int lastIndex = ArraysKt.getLastIndex(jArr);
if (lastIndex < 0) {
return null;
}
long j = jArr[lastIndex];
for (int i = lastIndex - 1; i >= 0; i--) {
j = operation.invoke(Integer.valueOf(i), Long.valueOf(jArr[i]), Long.valueOf(j)).longValue();
}
return Long.valueOf(j);
}
public static final Float reduceRightIndexedOrNull(float[] fArr, Function3<? super Integer, ? super Float, ? super Float, Float> operation) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
int lastIndex = ArraysKt.getLastIndex(fArr);
if (lastIndex < 0) {
return null;
}
float f = fArr[lastIndex];
for (int i = lastIndex - 1; i >= 0; i--) {
f = operation.invoke(Integer.valueOf(i), Float.valueOf(fArr[i]), Float.valueOf(f)).floatValue();
}
return Float.valueOf(f);
}
public static final Double reduceRightIndexedOrNull(double[] dArr, Function3<? super Integer, ? super Double, ? super Double, Double> operation) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
int lastIndex = ArraysKt.getLastIndex(dArr);
if (lastIndex < 0) {
return null;
}
double d = dArr[lastIndex];
for (int i = lastIndex - 1; i >= 0; i--) {
d = operation.invoke(Integer.valueOf(i), Double.valueOf(dArr[i]), Double.valueOf(d)).doubleValue();
}
return Double.valueOf(d);
}
public static final Boolean reduceRightIndexedOrNull(boolean[] zArr, Function3<? super Integer, ? super Boolean, ? super Boolean, Boolean> operation) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
int lastIndex = ArraysKt.getLastIndex(zArr);
if (lastIndex < 0) {
return null;
}
boolean z = zArr[lastIndex];
for (int i = lastIndex - 1; i >= 0; i--) {
z = operation.invoke(Integer.valueOf(i), Boolean.valueOf(zArr[i]), Boolean.valueOf(z)).booleanValue();
}
return Boolean.valueOf(z);
}
public static final Character reduceRightIndexedOrNull(char[] cArr, Function3<? super Integer, ? super Character, ? super Character, Character> operation) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
int lastIndex = ArraysKt.getLastIndex(cArr);
if (lastIndex < 0) {
return null;
}
char c = cArr[lastIndex];
for (int i = lastIndex - 1; i >= 0; i--) {
c = operation.invoke(Integer.valueOf(i), Character.valueOf(cArr[i]), Character.valueOf(c)).charValue();
}
return Character.valueOf(c);
}
public static final <S, T extends S> S reduceRightOrNull(T[] tArr, Function2<? super T, ? super S, ? extends S> operation) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
int lastIndex = ArraysKt.getLastIndex(tArr);
if (lastIndex < 0) {
return null;
}
S s = (S) tArr[lastIndex];
for (int i = lastIndex - 1; i >= 0; i--) {
s = operation.invoke((Object) tArr[i], s);
}
return s;
}
public static final Byte reduceRightOrNull(byte[] bArr, Function2<? super Byte, ? super Byte, Byte> operation) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
int lastIndex = ArraysKt.getLastIndex(bArr);
if (lastIndex < 0) {
return null;
}
byte b = bArr[lastIndex];
for (int i = lastIndex - 1; i >= 0; i--) {
b = operation.invoke(Byte.valueOf(bArr[i]), Byte.valueOf(b)).byteValue();
}
return Byte.valueOf(b);
}
public static final Short reduceRightOrNull(short[] sArr, Function2<? super Short, ? super Short, Short> operation) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
int lastIndex = ArraysKt.getLastIndex(sArr);
if (lastIndex < 0) {
return null;
}
short s = sArr[lastIndex];
for (int i = lastIndex - 1; i >= 0; i--) {
s = operation.invoke(Short.valueOf(sArr[i]), Short.valueOf(s)).shortValue();
}
return Short.valueOf(s);
}
public static final Integer reduceRightOrNull(int[] iArr, Function2<? super Integer, ? super Integer, Integer> operation) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
int lastIndex = ArraysKt.getLastIndex(iArr);
if (lastIndex < 0) {
return null;
}
int i = iArr[lastIndex];
for (int i2 = lastIndex - 1; i2 >= 0; i2--) {
i = operation.invoke(Integer.valueOf(iArr[i2]), Integer.valueOf(i)).intValue();
}
return Integer.valueOf(i);
}
public static final Long reduceRightOrNull(long[] jArr, Function2<? super Long, ? super Long, Long> operation) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
int lastIndex = ArraysKt.getLastIndex(jArr);
if (lastIndex < 0) {
return null;
}
long j = jArr[lastIndex];
for (int i = lastIndex - 1; i >= 0; i--) {
j = operation.invoke(Long.valueOf(jArr[i]), Long.valueOf(j)).longValue();
}
return Long.valueOf(j);
}
public static final Float reduceRightOrNull(float[] fArr, Function2<? super Float, ? super Float, Float> operation) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
int lastIndex = ArraysKt.getLastIndex(fArr);
if (lastIndex < 0) {
return null;
}
float f = fArr[lastIndex];
for (int i = lastIndex - 1; i >= 0; i--) {
f = operation.invoke(Float.valueOf(fArr[i]), Float.valueOf(f)).floatValue();
}
return Float.valueOf(f);
}
public static final Double reduceRightOrNull(double[] dArr, Function2<? super Double, ? super Double, Double> operation) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
int lastIndex = ArraysKt.getLastIndex(dArr);
if (lastIndex < 0) {
return null;
}
double d = dArr[lastIndex];
for (int i = lastIndex - 1; i >= 0; i--) {
d = operation.invoke(Double.valueOf(dArr[i]), Double.valueOf(d)).doubleValue();
}
return Double.valueOf(d);
}
public static final Boolean reduceRightOrNull(boolean[] zArr, Function2<? super Boolean, ? super Boolean, Boolean> operation) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
int lastIndex = ArraysKt.getLastIndex(zArr);
if (lastIndex < 0) {
return null;
}
boolean z = zArr[lastIndex];
for (int i = lastIndex - 1; i >= 0; i--) {
z = operation.invoke(Boolean.valueOf(zArr[i]), Boolean.valueOf(z)).booleanValue();
}
return Boolean.valueOf(z);
}
public static final Character reduceRightOrNull(char[] cArr, Function2<? super Character, ? super Character, Character> operation) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
int lastIndex = ArraysKt.getLastIndex(cArr);
if (lastIndex < 0) {
return null;
}
char c = cArr[lastIndex];
for (int i = lastIndex - 1; i >= 0; i--) {
c = operation.invoke(Character.valueOf(cArr[i]), Character.valueOf(c)).charValue();
}
return Character.valueOf(c);
}
/* JADX WARN: Multi-variable type inference failed */
public static final <T, R> List<R> runningFold(T[] tArr, R r, Function2<? super R, ? super T, ? extends R> operation) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (tArr.length == 0) {
return CollectionsKt.listOf(r);
}
ArrayList arrayList = new ArrayList(tArr.length + 1);
arrayList.add(r);
for (DeviceControl$Companion$$ExternalSyntheticLambda3 deviceControl$Companion$$ExternalSyntheticLambda3 : tArr) {
r = operation.invoke(r, deviceControl$Companion$$ExternalSyntheticLambda3);
arrayList.add(r);
}
return arrayList;
}
private static final <R> List<R> runningFold(byte[] bArr, R r, Function2<? super R, ? super Byte, ? extends R> operation) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (bArr.length == 0) {
return CollectionsKt.listOf(r);
}
ArrayList arrayList = new ArrayList(bArr.length + 1);
arrayList.add(r);
for (byte b : bArr) {
r = operation.invoke(r, Byte.valueOf(b));
arrayList.add(r);
}
return arrayList;
}
private static final <R> List<R> runningFold(short[] sArr, R r, Function2<? super R, ? super Short, ? extends R> operation) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (sArr.length == 0) {
return CollectionsKt.listOf(r);
}
ArrayList arrayList = new ArrayList(sArr.length + 1);
arrayList.add(r);
for (short s : sArr) {
r = operation.invoke(r, Short.valueOf(s));
arrayList.add(r);
}
return arrayList;
}
private static final <R> List<R> runningFold(int[] iArr, R r, Function2<? super R, ? super Integer, ? extends R> operation) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (iArr.length == 0) {
return CollectionsKt.listOf(r);
}
ArrayList arrayList = new ArrayList(iArr.length + 1);
arrayList.add(r);
for (int i : iArr) {
r = operation.invoke(r, Integer.valueOf(i));
arrayList.add(r);
}
return arrayList;
}
private static final <R> List<R> runningFold(long[] jArr, R r, Function2<? super R, ? super Long, ? extends R> operation) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (jArr.length == 0) {
return CollectionsKt.listOf(r);
}
ArrayList arrayList = new ArrayList(jArr.length + 1);
arrayList.add(r);
for (long j : jArr) {
r = operation.invoke(r, Long.valueOf(j));
arrayList.add(r);
}
return arrayList;
}
private static final <R> List<R> runningFold(float[] fArr, R r, Function2<? super R, ? super Float, ? extends R> operation) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (fArr.length == 0) {
return CollectionsKt.listOf(r);
}
ArrayList arrayList = new ArrayList(fArr.length + 1);
arrayList.add(r);
for (float f : fArr) {
r = operation.invoke(r, Float.valueOf(f));
arrayList.add(r);
}
return arrayList;
}
private static final <R> List<R> runningFold(double[] dArr, R r, Function2<? super R, ? super Double, ? extends R> operation) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (dArr.length == 0) {
return CollectionsKt.listOf(r);
}
ArrayList arrayList = new ArrayList(dArr.length + 1);
arrayList.add(r);
for (double d : dArr) {
r = operation.invoke(r, Double.valueOf(d));
arrayList.add(r);
}
return arrayList;
}
private static final <R> List<R> runningFold(boolean[] zArr, R r, Function2<? super R, ? super Boolean, ? extends R> operation) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (zArr.length == 0) {
return CollectionsKt.listOf(r);
}
ArrayList arrayList = new ArrayList(zArr.length + 1);
arrayList.add(r);
for (boolean z : zArr) {
r = operation.invoke(r, Boolean.valueOf(z));
arrayList.add(r);
}
return arrayList;
}
private static final <R> List<R> runningFold(char[] cArr, R r, Function2<? super R, ? super Character, ? extends R> operation) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (cArr.length == 0) {
return CollectionsKt.listOf(r);
}
ArrayList arrayList = new ArrayList(cArr.length + 1);
arrayList.add(r);
for (char c : cArr) {
r = operation.invoke(r, Character.valueOf(c));
arrayList.add(r);
}
return arrayList;
}
/* JADX WARN: Multi-variable type inference failed */
public static final <T, R> List<R> runningFoldIndexed(T[] tArr, R r, Function3<? super Integer, ? super R, ? super T, ? extends R> operation) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (tArr.length == 0) {
return CollectionsKt.listOf(r);
}
ArrayList arrayList = new ArrayList(tArr.length + 1);
arrayList.add(r);
int length = tArr.length;
for (int i = 0; i < length; i++) {
r = operation.invoke(Integer.valueOf(i), r, tArr[i]);
arrayList.add(r);
}
return arrayList;
}
private static final <R> List<R> runningFoldIndexed(byte[] bArr, R r, Function3<? super Integer, ? super R, ? super Byte, ? extends R> operation) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (bArr.length == 0) {
return CollectionsKt.listOf(r);
}
ArrayList arrayList = new ArrayList(bArr.length + 1);
arrayList.add(r);
int length = bArr.length;
for (int i = 0; i < length; i++) {
r = operation.invoke(Integer.valueOf(i), r, Byte.valueOf(bArr[i]));
arrayList.add(r);
}
return arrayList;
}
private static final <R> List<R> runningFoldIndexed(short[] sArr, R r, Function3<? super Integer, ? super R, ? super Short, ? extends R> operation) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (sArr.length == 0) {
return CollectionsKt.listOf(r);
}
ArrayList arrayList = new ArrayList(sArr.length + 1);
arrayList.add(r);
int length = sArr.length;
for (int i = 0; i < length; i++) {
r = operation.invoke(Integer.valueOf(i), r, Short.valueOf(sArr[i]));
arrayList.add(r);
}
return arrayList;
}
private static final <R> List<R> runningFoldIndexed(int[] iArr, R r, Function3<? super Integer, ? super R, ? super Integer, ? extends R> operation) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (iArr.length == 0) {
return CollectionsKt.listOf(r);
}
ArrayList arrayList = new ArrayList(iArr.length + 1);
arrayList.add(r);
int length = iArr.length;
for (int i = 0; i < length; i++) {
r = operation.invoke(Integer.valueOf(i), r, Integer.valueOf(iArr[i]));
arrayList.add(r);
}
return arrayList;
}
private static final <R> List<R> runningFoldIndexed(long[] jArr, R r, Function3<? super Integer, ? super R, ? super Long, ? extends R> operation) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (jArr.length == 0) {
return CollectionsKt.listOf(r);
}
ArrayList arrayList = new ArrayList(jArr.length + 1);
arrayList.add(r);
int length = jArr.length;
for (int i = 0; i < length; i++) {
r = operation.invoke(Integer.valueOf(i), r, Long.valueOf(jArr[i]));
arrayList.add(r);
}
return arrayList;
}
private static final <R> List<R> runningFoldIndexed(float[] fArr, R r, Function3<? super Integer, ? super R, ? super Float, ? extends R> operation) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (fArr.length == 0) {
return CollectionsKt.listOf(r);
}
ArrayList arrayList = new ArrayList(fArr.length + 1);
arrayList.add(r);
int length = fArr.length;
for (int i = 0; i < length; i++) {
r = operation.invoke(Integer.valueOf(i), r, Float.valueOf(fArr[i]));
arrayList.add(r);
}
return arrayList;
}
private static final <R> List<R> runningFoldIndexed(double[] dArr, R r, Function3<? super Integer, ? super R, ? super Double, ? extends R> operation) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (dArr.length == 0) {
return CollectionsKt.listOf(r);
}
ArrayList arrayList = new ArrayList(dArr.length + 1);
arrayList.add(r);
int length = dArr.length;
for (int i = 0; i < length; i++) {
r = operation.invoke(Integer.valueOf(i), r, Double.valueOf(dArr[i]));
arrayList.add(r);
}
return arrayList;
}
private static final <R> List<R> runningFoldIndexed(boolean[] zArr, R r, Function3<? super Integer, ? super R, ? super Boolean, ? extends R> operation) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (zArr.length == 0) {
return CollectionsKt.listOf(r);
}
ArrayList arrayList = new ArrayList(zArr.length + 1);
arrayList.add(r);
int length = zArr.length;
for (int i = 0; i < length; i++) {
r = operation.invoke(Integer.valueOf(i), r, Boolean.valueOf(zArr[i]));
arrayList.add(r);
}
return arrayList;
}
private static final <R> List<R> runningFoldIndexed(char[] cArr, R r, Function3<? super Integer, ? super R, ? super Character, ? extends R> operation) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (cArr.length == 0) {
return CollectionsKt.listOf(r);
}
ArrayList arrayList = new ArrayList(cArr.length + 1);
arrayList.add(r);
int length = cArr.length;
for (int i = 0; i < length; i++) {
r = operation.invoke(Integer.valueOf(i), r, Character.valueOf(cArr[i]));
arrayList.add(r);
}
return arrayList;
}
public static final <S, T extends S> List<S> runningReduce(T[] tArr, Function2<? super S, ? super T, ? extends S> operation) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (tArr.length == 0) {
return CollectionsKt.emptyList();
}
S s = (Object) tArr[0];
ArrayList arrayList = new ArrayList(tArr.length);
arrayList.add(s);
int length = tArr.length;
for (int i = 1; i < length; i++) {
s = operation.invoke(s, (Object) tArr[i]);
arrayList.add(s);
}
return arrayList;
}
private static final List<Byte> runningReduce(byte[] bArr, Function2<? super Byte, ? super Byte, Byte> operation) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (bArr.length == 0) {
return CollectionsKt.emptyList();
}
byte b = bArr[0];
ArrayList arrayList = new ArrayList(bArr.length);
arrayList.add(Byte.valueOf(b));
int length = bArr.length;
for (int i = 1; i < length; i++) {
b = operation.invoke(Byte.valueOf(b), Byte.valueOf(bArr[i])).byteValue();
arrayList.add(Byte.valueOf(b));
}
return arrayList;
}
private static final List<Short> runningReduce(short[] sArr, Function2<? super Short, ? super Short, Short> operation) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (sArr.length == 0) {
return CollectionsKt.emptyList();
}
short s = sArr[0];
ArrayList arrayList = new ArrayList(sArr.length);
arrayList.add(Short.valueOf(s));
int length = sArr.length;
for (int i = 1; i < length; i++) {
s = operation.invoke(Short.valueOf(s), Short.valueOf(sArr[i])).shortValue();
arrayList.add(Short.valueOf(s));
}
return arrayList;
}
private static final List<Integer> runningReduce(int[] iArr, Function2<? super Integer, ? super Integer, Integer> operation) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (iArr.length == 0) {
return CollectionsKt.emptyList();
}
int i = iArr[0];
ArrayList arrayList = new ArrayList(iArr.length);
arrayList.add(Integer.valueOf(i));
int length = iArr.length;
for (int i2 = 1; i2 < length; i2++) {
i = operation.invoke(Integer.valueOf(i), Integer.valueOf(iArr[i2])).intValue();
arrayList.add(Integer.valueOf(i));
}
return arrayList;
}
private static final List<Long> runningReduce(long[] jArr, Function2<? super Long, ? super Long, Long> operation) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (jArr.length == 0) {
return CollectionsKt.emptyList();
}
long j = jArr[0];
ArrayList arrayList = new ArrayList(jArr.length);
arrayList.add(Long.valueOf(j));
int length = jArr.length;
for (int i = 1; i < length; i++) {
j = operation.invoke(Long.valueOf(j), Long.valueOf(jArr[i])).longValue();
arrayList.add(Long.valueOf(j));
}
return arrayList;
}
private static final List<Float> runningReduce(float[] fArr, Function2<? super Float, ? super Float, Float> operation) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (fArr.length == 0) {
return CollectionsKt.emptyList();
}
float f = fArr[0];
ArrayList arrayList = new ArrayList(fArr.length);
arrayList.add(Float.valueOf(f));
int length = fArr.length;
for (int i = 1; i < length; i++) {
f = operation.invoke(Float.valueOf(f), Float.valueOf(fArr[i])).floatValue();
arrayList.add(Float.valueOf(f));
}
return arrayList;
}
private static final List<Double> runningReduce(double[] dArr, Function2<? super Double, ? super Double, Double> operation) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (dArr.length == 0) {
return CollectionsKt.emptyList();
}
double d = dArr[0];
ArrayList arrayList = new ArrayList(dArr.length);
arrayList.add(Double.valueOf(d));
int length = dArr.length;
for (int i = 1; i < length; i++) {
d = operation.invoke(Double.valueOf(d), Double.valueOf(dArr[i])).doubleValue();
arrayList.add(Double.valueOf(d));
}
return arrayList;
}
private static final List<Boolean> runningReduce(boolean[] zArr, Function2<? super Boolean, ? super Boolean, Boolean> operation) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (zArr.length == 0) {
return CollectionsKt.emptyList();
}
boolean z = zArr[0];
ArrayList arrayList = new ArrayList(zArr.length);
arrayList.add(Boolean.valueOf(z));
int length = zArr.length;
for (int i = 1; i < length; i++) {
z = operation.invoke(Boolean.valueOf(z), Boolean.valueOf(zArr[i])).booleanValue();
arrayList.add(Boolean.valueOf(z));
}
return arrayList;
}
private static final List<Character> runningReduce(char[] cArr, Function2<? super Character, ? super Character, Character> operation) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (cArr.length == 0) {
return CollectionsKt.emptyList();
}
char c = cArr[0];
ArrayList arrayList = new ArrayList(cArr.length);
arrayList.add(Character.valueOf(c));
int length = cArr.length;
for (int i = 1; i < length; i++) {
c = operation.invoke(Character.valueOf(c), Character.valueOf(cArr[i])).charValue();
arrayList.add(Character.valueOf(c));
}
return arrayList;
}
public static final <S, T extends S> List<S> runningReduceIndexed(T[] tArr, Function3<? super Integer, ? super S, ? super T, ? extends S> operation) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (tArr.length == 0) {
return CollectionsKt.emptyList();
}
S s = (Object) tArr[0];
ArrayList arrayList = new ArrayList(tArr.length);
arrayList.add(s);
int length = tArr.length;
for (int i = 1; i < length; i++) {
s = operation.invoke(Integer.valueOf(i), s, (Object) tArr[i]);
arrayList.add(s);
}
return arrayList;
}
private static final List<Byte> runningReduceIndexed(byte[] bArr, Function3<? super Integer, ? super Byte, ? super Byte, Byte> operation) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (bArr.length == 0) {
return CollectionsKt.emptyList();
}
byte b = bArr[0];
ArrayList arrayList = new ArrayList(bArr.length);
arrayList.add(Byte.valueOf(b));
int length = bArr.length;
for (int i = 1; i < length; i++) {
b = operation.invoke(Integer.valueOf(i), Byte.valueOf(b), Byte.valueOf(bArr[i])).byteValue();
arrayList.add(Byte.valueOf(b));
}
return arrayList;
}
private static final List<Short> runningReduceIndexed(short[] sArr, Function3<? super Integer, ? super Short, ? super Short, Short> operation) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (sArr.length == 0) {
return CollectionsKt.emptyList();
}
short s = sArr[0];
ArrayList arrayList = new ArrayList(sArr.length);
arrayList.add(Short.valueOf(s));
int length = sArr.length;
for (int i = 1; i < length; i++) {
s = operation.invoke(Integer.valueOf(i), Short.valueOf(s), Short.valueOf(sArr[i])).shortValue();
arrayList.add(Short.valueOf(s));
}
return arrayList;
}
private static final List<Integer> runningReduceIndexed(int[] iArr, Function3<? super Integer, ? super Integer, ? super Integer, Integer> operation) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (iArr.length == 0) {
return CollectionsKt.emptyList();
}
int i = iArr[0];
ArrayList arrayList = new ArrayList(iArr.length);
arrayList.add(Integer.valueOf(i));
int length = iArr.length;
for (int i2 = 1; i2 < length; i2++) {
i = operation.invoke(Integer.valueOf(i2), Integer.valueOf(i), Integer.valueOf(iArr[i2])).intValue();
arrayList.add(Integer.valueOf(i));
}
return arrayList;
}
private static final List<Long> runningReduceIndexed(long[] jArr, Function3<? super Integer, ? super Long, ? super Long, Long> operation) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (jArr.length == 0) {
return CollectionsKt.emptyList();
}
long j = jArr[0];
ArrayList arrayList = new ArrayList(jArr.length);
arrayList.add(Long.valueOf(j));
int length = jArr.length;
for (int i = 1; i < length; i++) {
j = operation.invoke(Integer.valueOf(i), Long.valueOf(j), Long.valueOf(jArr[i])).longValue();
arrayList.add(Long.valueOf(j));
}
return arrayList;
}
private static final List<Float> runningReduceIndexed(float[] fArr, Function3<? super Integer, ? super Float, ? super Float, Float> operation) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (fArr.length == 0) {
return CollectionsKt.emptyList();
}
float f = fArr[0];
ArrayList arrayList = new ArrayList(fArr.length);
arrayList.add(Float.valueOf(f));
int length = fArr.length;
for (int i = 1; i < length; i++) {
f = operation.invoke(Integer.valueOf(i), Float.valueOf(f), Float.valueOf(fArr[i])).floatValue();
arrayList.add(Float.valueOf(f));
}
return arrayList;
}
private static final List<Double> runningReduceIndexed(double[] dArr, Function3<? super Integer, ? super Double, ? super Double, Double> operation) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (dArr.length == 0) {
return CollectionsKt.emptyList();
}
double d = dArr[0];
ArrayList arrayList = new ArrayList(dArr.length);
arrayList.add(Double.valueOf(d));
int length = dArr.length;
for (int i = 1; i < length; i++) {
d = operation.invoke(Integer.valueOf(i), Double.valueOf(d), Double.valueOf(dArr[i])).doubleValue();
arrayList.add(Double.valueOf(d));
}
return arrayList;
}
private static final List<Boolean> runningReduceIndexed(boolean[] zArr, Function3<? super Integer, ? super Boolean, ? super Boolean, Boolean> operation) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (zArr.length == 0) {
return CollectionsKt.emptyList();
}
boolean z = zArr[0];
ArrayList arrayList = new ArrayList(zArr.length);
arrayList.add(Boolean.valueOf(z));
int length = zArr.length;
for (int i = 1; i < length; i++) {
z = operation.invoke(Integer.valueOf(i), Boolean.valueOf(z), Boolean.valueOf(zArr[i])).booleanValue();
arrayList.add(Boolean.valueOf(z));
}
return arrayList;
}
private static final List<Character> runningReduceIndexed(char[] cArr, Function3<? super Integer, ? super Character, ? super Character, Character> operation) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (cArr.length == 0) {
return CollectionsKt.emptyList();
}
char c = cArr[0];
ArrayList arrayList = new ArrayList(cArr.length);
arrayList.add(Character.valueOf(c));
int length = cArr.length;
for (int i = 1; i < length; i++) {
c = operation.invoke(Integer.valueOf(i), Character.valueOf(c), Character.valueOf(cArr[i])).charValue();
arrayList.add(Character.valueOf(c));
}
return arrayList;
}
private static final <R> List<R> scan(byte[] bArr, R r, Function2<? super R, ? super Byte, ? extends R> operation) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (bArr.length == 0) {
return CollectionsKt.listOf(r);
}
ArrayList arrayList = new ArrayList(bArr.length + 1);
arrayList.add(r);
for (byte b : bArr) {
r = operation.invoke(r, Byte.valueOf(b));
arrayList.add(r);
}
return arrayList;
}
private static final <R> List<R> scan(short[] sArr, R r, Function2<? super R, ? super Short, ? extends R> operation) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (sArr.length == 0) {
return CollectionsKt.listOf(r);
}
ArrayList arrayList = new ArrayList(sArr.length + 1);
arrayList.add(r);
for (short s : sArr) {
r = operation.invoke(r, Short.valueOf(s));
arrayList.add(r);
}
return arrayList;
}
private static final <R> List<R> scan(int[] iArr, R r, Function2<? super R, ? super Integer, ? extends R> operation) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (iArr.length == 0) {
return CollectionsKt.listOf(r);
}
ArrayList arrayList = new ArrayList(iArr.length + 1);
arrayList.add(r);
for (int i : iArr) {
r = operation.invoke(r, Integer.valueOf(i));
arrayList.add(r);
}
return arrayList;
}
private static final <R> List<R> scan(long[] jArr, R r, Function2<? super R, ? super Long, ? extends R> operation) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (jArr.length == 0) {
return CollectionsKt.listOf(r);
}
ArrayList arrayList = new ArrayList(jArr.length + 1);
arrayList.add(r);
for (long j : jArr) {
r = operation.invoke(r, Long.valueOf(j));
arrayList.add(r);
}
return arrayList;
}
private static final <R> List<R> scan(float[] fArr, R r, Function2<? super R, ? super Float, ? extends R> operation) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (fArr.length == 0) {
return CollectionsKt.listOf(r);
}
ArrayList arrayList = new ArrayList(fArr.length + 1);
arrayList.add(r);
for (float f : fArr) {
r = operation.invoke(r, Float.valueOf(f));
arrayList.add(r);
}
return arrayList;
}
private static final <R> List<R> scan(double[] dArr, R r, Function2<? super R, ? super Double, ? extends R> operation) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (dArr.length == 0) {
return CollectionsKt.listOf(r);
}
ArrayList arrayList = new ArrayList(dArr.length + 1);
arrayList.add(r);
for (double d : dArr) {
r = operation.invoke(r, Double.valueOf(d));
arrayList.add(r);
}
return arrayList;
}
private static final <R> List<R> scan(boolean[] zArr, R r, Function2<? super R, ? super Boolean, ? extends R> operation) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (zArr.length == 0) {
return CollectionsKt.listOf(r);
}
ArrayList arrayList = new ArrayList(zArr.length + 1);
arrayList.add(r);
for (boolean z : zArr) {
r = operation.invoke(r, Boolean.valueOf(z));
arrayList.add(r);
}
return arrayList;
}
private static final <R> List<R> scan(char[] cArr, R r, Function2<? super R, ? super Character, ? extends R> operation) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (cArr.length == 0) {
return CollectionsKt.listOf(r);
}
ArrayList arrayList = new ArrayList(cArr.length + 1);
arrayList.add(r);
for (char c : cArr) {
r = operation.invoke(r, Character.valueOf(c));
arrayList.add(r);
}
return arrayList;
}
private static final <R> List<R> scanIndexed(byte[] bArr, R r, Function3<? super Integer, ? super R, ? super Byte, ? extends R> operation) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (bArr.length == 0) {
return CollectionsKt.listOf(r);
}
ArrayList arrayList = new ArrayList(bArr.length + 1);
arrayList.add(r);
int length = bArr.length;
for (int i = 0; i < length; i++) {
r = operation.invoke(Integer.valueOf(i), r, Byte.valueOf(bArr[i]));
arrayList.add(r);
}
return arrayList;
}
private static final <R> List<R> scanIndexed(short[] sArr, R r, Function3<? super Integer, ? super R, ? super Short, ? extends R> operation) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (sArr.length == 0) {
return CollectionsKt.listOf(r);
}
ArrayList arrayList = new ArrayList(sArr.length + 1);
arrayList.add(r);
int length = sArr.length;
for (int i = 0; i < length; i++) {
r = operation.invoke(Integer.valueOf(i), r, Short.valueOf(sArr[i]));
arrayList.add(r);
}
return arrayList;
}
private static final <R> List<R> scanIndexed(int[] iArr, R r, Function3<? super Integer, ? super R, ? super Integer, ? extends R> operation) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (iArr.length == 0) {
return CollectionsKt.listOf(r);
}
ArrayList arrayList = new ArrayList(iArr.length + 1);
arrayList.add(r);
int length = iArr.length;
for (int i = 0; i < length; i++) {
r = operation.invoke(Integer.valueOf(i), r, Integer.valueOf(iArr[i]));
arrayList.add(r);
}
return arrayList;
}
private static final <R> List<R> scanIndexed(long[] jArr, R r, Function3<? super Integer, ? super R, ? super Long, ? extends R> operation) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (jArr.length == 0) {
return CollectionsKt.listOf(r);
}
ArrayList arrayList = new ArrayList(jArr.length + 1);
arrayList.add(r);
int length = jArr.length;
for (int i = 0; i < length; i++) {
r = operation.invoke(Integer.valueOf(i), r, Long.valueOf(jArr[i]));
arrayList.add(r);
}
return arrayList;
}
private static final <R> List<R> scanIndexed(float[] fArr, R r, Function3<? super Integer, ? super R, ? super Float, ? extends R> operation) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (fArr.length == 0) {
return CollectionsKt.listOf(r);
}
ArrayList arrayList = new ArrayList(fArr.length + 1);
arrayList.add(r);
int length = fArr.length;
for (int i = 0; i < length; i++) {
r = operation.invoke(Integer.valueOf(i), r, Float.valueOf(fArr[i]));
arrayList.add(r);
}
return arrayList;
}
private static final <R> List<R> scanIndexed(double[] dArr, R r, Function3<? super Integer, ? super R, ? super Double, ? extends R> operation) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (dArr.length == 0) {
return CollectionsKt.listOf(r);
}
ArrayList arrayList = new ArrayList(dArr.length + 1);
arrayList.add(r);
int length = dArr.length;
for (int i = 0; i < length; i++) {
r = operation.invoke(Integer.valueOf(i), r, Double.valueOf(dArr[i]));
arrayList.add(r);
}
return arrayList;
}
private static final <R> List<R> scanIndexed(boolean[] zArr, R r, Function3<? super Integer, ? super R, ? super Boolean, ? extends R> operation) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (zArr.length == 0) {
return CollectionsKt.listOf(r);
}
ArrayList arrayList = new ArrayList(zArr.length + 1);
arrayList.add(r);
int length = zArr.length;
for (int i = 0; i < length; i++) {
r = operation.invoke(Integer.valueOf(i), r, Boolean.valueOf(zArr[i]));
arrayList.add(r);
}
return arrayList;
}
private static final <R> List<R> scanIndexed(char[] cArr, R r, Function3<? super Integer, ? super R, ? super Character, ? extends R> operation) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (cArr.length == 0) {
return CollectionsKt.listOf(r);
}
ArrayList arrayList = new ArrayList(cArr.length + 1);
arrayList.add(r);
int length = cArr.length;
for (int i = 0; i < length; i++) {
r = operation.invoke(Integer.valueOf(i), r, Character.valueOf(cArr[i]));
arrayList.add(r);
}
return arrayList;
}
@Deprecated(message = "Use sumOf instead.", replaceWith = @ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
@DeprecatedSinceKotlin(warningSince = "1.5")
public static final <T> int sumBy(T[] tArr, Function1<? super T, Integer> selector) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
int i = 0;
for (T t : tArr) {
i += selector.invoke(t).intValue();
}
return i;
}
@Deprecated(message = "Use sumOf instead.", replaceWith = @ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
@DeprecatedSinceKotlin(warningSince = "1.5")
public static final int sumBy(byte[] bArr, Function1<? super Byte, Integer> selector) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
int i = 0;
for (byte b : bArr) {
i += selector.invoke(Byte.valueOf(b)).intValue();
}
return i;
}
@Deprecated(message = "Use sumOf instead.", replaceWith = @ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
@DeprecatedSinceKotlin(warningSince = "1.5")
public static final int sumBy(short[] sArr, Function1<? super Short, Integer> selector) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
int i = 0;
for (short s : sArr) {
i += selector.invoke(Short.valueOf(s)).intValue();
}
return i;
}
@Deprecated(message = "Use sumOf instead.", replaceWith = @ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
@DeprecatedSinceKotlin(warningSince = "1.5")
public static final int sumBy(int[] iArr, Function1<? super Integer, Integer> selector) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
int i = 0;
for (int i2 : iArr) {
i += selector.invoke(Integer.valueOf(i2)).intValue();
}
return i;
}
@Deprecated(message = "Use sumOf instead.", replaceWith = @ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
@DeprecatedSinceKotlin(warningSince = "1.5")
public static final int sumBy(long[] jArr, Function1<? super Long, Integer> selector) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
int i = 0;
for (long j : jArr) {
i += selector.invoke(Long.valueOf(j)).intValue();
}
return i;
}
@Deprecated(message = "Use sumOf instead.", replaceWith = @ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
@DeprecatedSinceKotlin(warningSince = "1.5")
public static final int sumBy(float[] fArr, Function1<? super Float, Integer> selector) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
int i = 0;
for (float f : fArr) {
i += selector.invoke(Float.valueOf(f)).intValue();
}
return i;
}
@Deprecated(message = "Use sumOf instead.", replaceWith = @ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
@DeprecatedSinceKotlin(warningSince = "1.5")
public static final int sumBy(double[] dArr, Function1<? super Double, Integer> selector) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
int i = 0;
for (double d : dArr) {
i += selector.invoke(Double.valueOf(d)).intValue();
}
return i;
}
@Deprecated(message = "Use sumOf instead.", replaceWith = @ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
@DeprecatedSinceKotlin(warningSince = "1.5")
public static final int sumBy(boolean[] zArr, Function1<? super Boolean, Integer> selector) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
int i = 0;
for (boolean z : zArr) {
i += selector.invoke(Boolean.valueOf(z)).intValue();
}
return i;
}
@Deprecated(message = "Use sumOf instead.", replaceWith = @ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
@DeprecatedSinceKotlin(warningSince = "1.5")
public static final int sumBy(char[] cArr, Function1<? super Character, Integer> selector) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
int i = 0;
for (char c : cArr) {
i += selector.invoke(Character.valueOf(c)).intValue();
}
return i;
}
@Deprecated(message = "Use sumOf instead.", replaceWith = @ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
@DeprecatedSinceKotlin(warningSince = "1.5")
public static final <T> double sumByDouble(T[] tArr, Function1<? super T, Double> selector) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
double d = BuildConfig.SENTRY_SAMPLE_RATE;
for (T t : tArr) {
d += selector.invoke(t).doubleValue();
}
return d;
}
@Deprecated(message = "Use sumOf instead.", replaceWith = @ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
@DeprecatedSinceKotlin(warningSince = "1.5")
public static final double sumByDouble(byte[] bArr, Function1<? super Byte, Double> selector) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
double d = BuildConfig.SENTRY_SAMPLE_RATE;
for (byte b : bArr) {
d += selector.invoke(Byte.valueOf(b)).doubleValue();
}
return d;
}
@Deprecated(message = "Use sumOf instead.", replaceWith = @ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
@DeprecatedSinceKotlin(warningSince = "1.5")
public static final double sumByDouble(short[] sArr, Function1<? super Short, Double> selector) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
double d = BuildConfig.SENTRY_SAMPLE_RATE;
for (short s : sArr) {
d += selector.invoke(Short.valueOf(s)).doubleValue();
}
return d;
}
@Deprecated(message = "Use sumOf instead.", replaceWith = @ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
@DeprecatedSinceKotlin(warningSince = "1.5")
public static final double sumByDouble(int[] iArr, Function1<? super Integer, Double> selector) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
double d = BuildConfig.SENTRY_SAMPLE_RATE;
for (int i : iArr) {
d += selector.invoke(Integer.valueOf(i)).doubleValue();
}
return d;
}
@Deprecated(message = "Use sumOf instead.", replaceWith = @ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
@DeprecatedSinceKotlin(warningSince = "1.5")
public static final double sumByDouble(long[] jArr, Function1<? super Long, Double> selector) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
double d = BuildConfig.SENTRY_SAMPLE_RATE;
for (long j : jArr) {
d += selector.invoke(Long.valueOf(j)).doubleValue();
}
return d;
}
@Deprecated(message = "Use sumOf instead.", replaceWith = @ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
@DeprecatedSinceKotlin(warningSince = "1.5")
public static final double sumByDouble(float[] fArr, Function1<? super Float, Double> selector) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
double d = BuildConfig.SENTRY_SAMPLE_RATE;
for (float f : fArr) {
d += selector.invoke(Float.valueOf(f)).doubleValue();
}
return d;
}
@Deprecated(message = "Use sumOf instead.", replaceWith = @ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
@DeprecatedSinceKotlin(warningSince = "1.5")
public static final double sumByDouble(double[] dArr, Function1<? super Double, Double> selector) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
double d = BuildConfig.SENTRY_SAMPLE_RATE;
for (double d2 : dArr) {
d += selector.invoke(Double.valueOf(d2)).doubleValue();
}
return d;
}
@Deprecated(message = "Use sumOf instead.", replaceWith = @ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
@DeprecatedSinceKotlin(warningSince = "1.5")
public static final double sumByDouble(boolean[] zArr, Function1<? super Boolean, Double> selector) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
double d = BuildConfig.SENTRY_SAMPLE_RATE;
for (boolean z : zArr) {
d += selector.invoke(Boolean.valueOf(z)).doubleValue();
}
return d;
}
@Deprecated(message = "Use sumOf instead.", replaceWith = @ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
@DeprecatedSinceKotlin(warningSince = "1.5")
public static final double sumByDouble(char[] cArr, Function1<? super Character, Double> selector) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
double d = BuildConfig.SENTRY_SAMPLE_RATE;
for (char c : cArr) {
d += selector.invoke(Character.valueOf(c)).doubleValue();
}
return d;
}
private static final <T> double sumOfDouble(T[] tArr, Function1<? super T, Double> selector) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
double d = BuildConfig.SENTRY_SAMPLE_RATE;
for (T t : tArr) {
d += selector.invoke(t).doubleValue();
}
return d;
}
private static final double sumOfDouble(byte[] bArr, Function1<? super Byte, Double> selector) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
double d = BuildConfig.SENTRY_SAMPLE_RATE;
for (byte b : bArr) {
d += selector.invoke(Byte.valueOf(b)).doubleValue();
}
return d;
}
private static final double sumOfDouble(short[] sArr, Function1<? super Short, Double> selector) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
double d = BuildConfig.SENTRY_SAMPLE_RATE;
for (short s : sArr) {
d += selector.invoke(Short.valueOf(s)).doubleValue();
}
return d;
}
private static final double sumOfDouble(int[] iArr, Function1<? super Integer, Double> selector) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
double d = BuildConfig.SENTRY_SAMPLE_RATE;
for (int i : iArr) {
d += selector.invoke(Integer.valueOf(i)).doubleValue();
}
return d;
}
private static final double sumOfDouble(long[] jArr, Function1<? super Long, Double> selector) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
double d = BuildConfig.SENTRY_SAMPLE_RATE;
for (long j : jArr) {
d += selector.invoke(Long.valueOf(j)).doubleValue();
}
return d;
}
private static final double sumOfDouble(float[] fArr, Function1<? super Float, Double> selector) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
double d = BuildConfig.SENTRY_SAMPLE_RATE;
for (float f : fArr) {
d += selector.invoke(Float.valueOf(f)).doubleValue();
}
return d;
}
private static final double sumOfDouble(double[] dArr, Function1<? super Double, Double> selector) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
double d = BuildConfig.SENTRY_SAMPLE_RATE;
for (double d2 : dArr) {
d += selector.invoke(Double.valueOf(d2)).doubleValue();
}
return d;
}
private static final double sumOfDouble(boolean[] zArr, Function1<? super Boolean, Double> selector) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
double d = BuildConfig.SENTRY_SAMPLE_RATE;
for (boolean z : zArr) {
d += selector.invoke(Boolean.valueOf(z)).doubleValue();
}
return d;
}
private static final double sumOfDouble(char[] cArr, Function1<? super Character, Double> selector) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
double d = BuildConfig.SENTRY_SAMPLE_RATE;
for (char c : cArr) {
d += selector.invoke(Character.valueOf(c)).doubleValue();
}
return d;
}
private static final <T> int sumOfInt(T[] tArr, Function1<? super T, Integer> selector) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
int i = 0;
for (T t : tArr) {
i += selector.invoke(t).intValue();
}
return i;
}
private static final int sumOfInt(byte[] bArr, Function1<? super Byte, Integer> selector) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
int i = 0;
for (byte b : bArr) {
i += selector.invoke(Byte.valueOf(b)).intValue();
}
return i;
}
private static final int sumOfInt(short[] sArr, Function1<? super Short, Integer> selector) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
int i = 0;
for (short s : sArr) {
i += selector.invoke(Short.valueOf(s)).intValue();
}
return i;
}
private static final int sumOfInt(int[] iArr, Function1<? super Integer, Integer> selector) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
int i = 0;
for (int i2 : iArr) {
i += selector.invoke(Integer.valueOf(i2)).intValue();
}
return i;
}
private static final int sumOfInt(long[] jArr, Function1<? super Long, Integer> selector) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
int i = 0;
for (long j : jArr) {
i += selector.invoke(Long.valueOf(j)).intValue();
}
return i;
}
private static final int sumOfInt(float[] fArr, Function1<? super Float, Integer> selector) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
int i = 0;
for (float f : fArr) {
i += selector.invoke(Float.valueOf(f)).intValue();
}
return i;
}
private static final int sumOfInt(double[] dArr, Function1<? super Double, Integer> selector) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
int i = 0;
for (double d : dArr) {
i += selector.invoke(Double.valueOf(d)).intValue();
}
return i;
}
private static final int sumOfInt(boolean[] zArr, Function1<? super Boolean, Integer> selector) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
int i = 0;
for (boolean z : zArr) {
i += selector.invoke(Boolean.valueOf(z)).intValue();
}
return i;
}
private static final int sumOfInt(char[] cArr, Function1<? super Character, Integer> selector) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
int i = 0;
for (char c : cArr) {
i += selector.invoke(Character.valueOf(c)).intValue();
}
return i;
}
private static final <T> long sumOfLong(T[] tArr, Function1<? super T, Long> selector) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
long j = 0;
for (T t : tArr) {
j += selector.invoke(t).longValue();
}
return j;
}
private static final long sumOfLong(byte[] bArr, Function1<? super Byte, Long> selector) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
long j = 0;
for (byte b : bArr) {
j += selector.invoke(Byte.valueOf(b)).longValue();
}
return j;
}
private static final long sumOfLong(short[] sArr, Function1<? super Short, Long> selector) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
long j = 0;
for (short s : sArr) {
j += selector.invoke(Short.valueOf(s)).longValue();
}
return j;
}
private static final long sumOfLong(int[] iArr, Function1<? super Integer, Long> selector) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
long j = 0;
for (int i : iArr) {
j += selector.invoke(Integer.valueOf(i)).longValue();
}
return j;
}
private static final long sumOfLong(long[] jArr, Function1<? super Long, Long> selector) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
long j = 0;
for (long j2 : jArr) {
j += selector.invoke(Long.valueOf(j2)).longValue();
}
return j;
}
private static final long sumOfLong(float[] fArr, Function1<? super Float, Long> selector) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
long j = 0;
for (float f : fArr) {
j += selector.invoke(Float.valueOf(f)).longValue();
}
return j;
}
private static final long sumOfLong(double[] dArr, Function1<? super Double, Long> selector) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
long j = 0;
for (double d : dArr) {
j += selector.invoke(Double.valueOf(d)).longValue();
}
return j;
}
private static final long sumOfLong(boolean[] zArr, Function1<? super Boolean, Long> selector) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
long j = 0;
for (boolean z : zArr) {
j += selector.invoke(Boolean.valueOf(z)).longValue();
}
return j;
}
private static final long sumOfLong(char[] cArr, Function1<? super Character, Long> selector) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
long j = 0;
for (char c : cArr) {
j += selector.invoke(Character.valueOf(c)).longValue();
}
return j;
}
private static final <T> int sumOfUInt(T[] tArr, Function1<? super T, UInt> selector) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
int m5793constructorimpl = UInt.m5793constructorimpl(0);
for (T t : tArr) {
m5793constructorimpl = UInt.m5793constructorimpl(m5793constructorimpl + selector.invoke(t).getData());
}
return m5793constructorimpl;
}
private static final int sumOfUInt(byte[] bArr, Function1<? super Byte, UInt> selector) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
int m5793constructorimpl = UInt.m5793constructorimpl(0);
for (byte b : bArr) {
m5793constructorimpl = UInt.m5793constructorimpl(m5793constructorimpl + selector.invoke(Byte.valueOf(b)).getData());
}
return m5793constructorimpl;
}
private static final int sumOfUInt(short[] sArr, Function1<? super Short, UInt> selector) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
int m5793constructorimpl = UInt.m5793constructorimpl(0);
for (short s : sArr) {
m5793constructorimpl = UInt.m5793constructorimpl(m5793constructorimpl + selector.invoke(Short.valueOf(s)).getData());
}
return m5793constructorimpl;
}
private static final int sumOfUInt(int[] iArr, Function1<? super Integer, UInt> selector) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
int m5793constructorimpl = UInt.m5793constructorimpl(0);
for (int i : iArr) {
m5793constructorimpl = UInt.m5793constructorimpl(m5793constructorimpl + selector.invoke(Integer.valueOf(i)).getData());
}
return m5793constructorimpl;
}
private static final int sumOfUInt(long[] jArr, Function1<? super Long, UInt> selector) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
int m5793constructorimpl = UInt.m5793constructorimpl(0);
for (long j : jArr) {
m5793constructorimpl = UInt.m5793constructorimpl(m5793constructorimpl + selector.invoke(Long.valueOf(j)).getData());
}
return m5793constructorimpl;
}
private static final int sumOfUInt(float[] fArr, Function1<? super Float, UInt> selector) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
int m5793constructorimpl = UInt.m5793constructorimpl(0);
for (float f : fArr) {
m5793constructorimpl = UInt.m5793constructorimpl(m5793constructorimpl + selector.invoke(Float.valueOf(f)).getData());
}
return m5793constructorimpl;
}
private static final int sumOfUInt(double[] dArr, Function1<? super Double, UInt> selector) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
int m5793constructorimpl = UInt.m5793constructorimpl(0);
for (double d : dArr) {
m5793constructorimpl = UInt.m5793constructorimpl(m5793constructorimpl + selector.invoke(Double.valueOf(d)).getData());
}
return m5793constructorimpl;
}
private static final int sumOfUInt(boolean[] zArr, Function1<? super Boolean, UInt> selector) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
int m5793constructorimpl = UInt.m5793constructorimpl(0);
for (boolean z : zArr) {
m5793constructorimpl = UInt.m5793constructorimpl(m5793constructorimpl + selector.invoke(Boolean.valueOf(z)).getData());
}
return m5793constructorimpl;
}
private static final int sumOfUInt(char[] cArr, Function1<? super Character, UInt> selector) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
int m5793constructorimpl = UInt.m5793constructorimpl(0);
for (char c : cArr) {
m5793constructorimpl = UInt.m5793constructorimpl(m5793constructorimpl + selector.invoke(Character.valueOf(c)).getData());
}
return m5793constructorimpl;
}
private static final <T> long sumOfULong(T[] tArr, Function1<? super T, ULong> selector) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
long m5872constructorimpl = ULong.m5872constructorimpl(0L);
for (T t : tArr) {
m5872constructorimpl = ULong.m5872constructorimpl(m5872constructorimpl + selector.invoke(t).getData());
}
return m5872constructorimpl;
}
private static final long sumOfULong(byte[] bArr, Function1<? super Byte, ULong> selector) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
long m5872constructorimpl = ULong.m5872constructorimpl(0L);
for (byte b : bArr) {
m5872constructorimpl = ULong.m5872constructorimpl(m5872constructorimpl + selector.invoke(Byte.valueOf(b)).getData());
}
return m5872constructorimpl;
}
private static final long sumOfULong(short[] sArr, Function1<? super Short, ULong> selector) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
long m5872constructorimpl = ULong.m5872constructorimpl(0L);
for (short s : sArr) {
m5872constructorimpl = ULong.m5872constructorimpl(m5872constructorimpl + selector.invoke(Short.valueOf(s)).getData());
}
return m5872constructorimpl;
}
private static final long sumOfULong(int[] iArr, Function1<? super Integer, ULong> selector) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
long m5872constructorimpl = ULong.m5872constructorimpl(0L);
for (int i : iArr) {
m5872constructorimpl = ULong.m5872constructorimpl(m5872constructorimpl + selector.invoke(Integer.valueOf(i)).getData());
}
return m5872constructorimpl;
}
private static final long sumOfULong(long[] jArr, Function1<? super Long, ULong> selector) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
long m5872constructorimpl = ULong.m5872constructorimpl(0L);
for (long j : jArr) {
m5872constructorimpl = ULong.m5872constructorimpl(m5872constructorimpl + selector.invoke(Long.valueOf(j)).getData());
}
return m5872constructorimpl;
}
private static final long sumOfULong(float[] fArr, Function1<? super Float, ULong> selector) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
long m5872constructorimpl = ULong.m5872constructorimpl(0L);
for (float f : fArr) {
m5872constructorimpl = ULong.m5872constructorimpl(m5872constructorimpl + selector.invoke(Float.valueOf(f)).getData());
}
return m5872constructorimpl;
}
private static final long sumOfULong(double[] dArr, Function1<? super Double, ULong> selector) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
long m5872constructorimpl = ULong.m5872constructorimpl(0L);
for (double d : dArr) {
m5872constructorimpl = ULong.m5872constructorimpl(m5872constructorimpl + selector.invoke(Double.valueOf(d)).getData());
}
return m5872constructorimpl;
}
private static final long sumOfULong(boolean[] zArr, Function1<? super Boolean, ULong> selector) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
long m5872constructorimpl = ULong.m5872constructorimpl(0L);
for (boolean z : zArr) {
m5872constructorimpl = ULong.m5872constructorimpl(m5872constructorimpl + selector.invoke(Boolean.valueOf(z)).getData());
}
return m5872constructorimpl;
}
private static final long sumOfULong(char[] cArr, Function1<? super Character, ULong> selector) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(selector, "selector");
long m5872constructorimpl = ULong.m5872constructorimpl(0L);
for (char c : cArr) {
m5872constructorimpl = ULong.m5872constructorimpl(m5872constructorimpl + selector.invoke(Character.valueOf(c)).getData());
}
return m5872constructorimpl;
}
public static final <T> T[] requireNoNulls(T[] tArr) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
for (T t : tArr) {
if (t == null) {
throw new IllegalArgumentException("null element found in " + tArr + '.');
}
}
return tArr;
}
public static final <T> Pair<List<T>, List<T>> partition(T[] tArr, Function1<? super T, Boolean> predicate) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
ArrayList arrayList = new ArrayList();
ArrayList arrayList2 = new ArrayList();
for (T t : tArr) {
if (predicate.invoke(t).booleanValue()) {
arrayList.add(t);
} else {
arrayList2.add(t);
}
}
return new Pair<>(arrayList, arrayList2);
}
public static final Pair<List<Byte>, List<Byte>> partition(byte[] bArr, Function1<? super Byte, Boolean> predicate) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
ArrayList arrayList = new ArrayList();
ArrayList arrayList2 = new ArrayList();
for (byte b : bArr) {
if (predicate.invoke(Byte.valueOf(b)).booleanValue()) {
arrayList.add(Byte.valueOf(b));
} else {
arrayList2.add(Byte.valueOf(b));
}
}
return new Pair<>(arrayList, arrayList2);
}
public static final Pair<List<Short>, List<Short>> partition(short[] sArr, Function1<? super Short, Boolean> predicate) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
ArrayList arrayList = new ArrayList();
ArrayList arrayList2 = new ArrayList();
for (short s : sArr) {
if (predicate.invoke(Short.valueOf(s)).booleanValue()) {
arrayList.add(Short.valueOf(s));
} else {
arrayList2.add(Short.valueOf(s));
}
}
return new Pair<>(arrayList, arrayList2);
}
public static final Pair<List<Integer>, List<Integer>> partition(int[] iArr, Function1<? super Integer, Boolean> predicate) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
ArrayList arrayList = new ArrayList();
ArrayList arrayList2 = new ArrayList();
for (int i : iArr) {
if (predicate.invoke(Integer.valueOf(i)).booleanValue()) {
arrayList.add(Integer.valueOf(i));
} else {
arrayList2.add(Integer.valueOf(i));
}
}
return new Pair<>(arrayList, arrayList2);
}
public static final Pair<List<Long>, List<Long>> partition(long[] jArr, Function1<? super Long, Boolean> predicate) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
ArrayList arrayList = new ArrayList();
ArrayList arrayList2 = new ArrayList();
for (long j : jArr) {
if (predicate.invoke(Long.valueOf(j)).booleanValue()) {
arrayList.add(Long.valueOf(j));
} else {
arrayList2.add(Long.valueOf(j));
}
}
return new Pair<>(arrayList, arrayList2);
}
public static final Pair<List<Float>, List<Float>> partition(float[] fArr, Function1<? super Float, Boolean> predicate) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
ArrayList arrayList = new ArrayList();
ArrayList arrayList2 = new ArrayList();
for (float f : fArr) {
if (predicate.invoke(Float.valueOf(f)).booleanValue()) {
arrayList.add(Float.valueOf(f));
} else {
arrayList2.add(Float.valueOf(f));
}
}
return new Pair<>(arrayList, arrayList2);
}
public static final Pair<List<Double>, List<Double>> partition(double[] dArr, Function1<? super Double, Boolean> predicate) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
ArrayList arrayList = new ArrayList();
ArrayList arrayList2 = new ArrayList();
for (double d : dArr) {
if (predicate.invoke(Double.valueOf(d)).booleanValue()) {
arrayList.add(Double.valueOf(d));
} else {
arrayList2.add(Double.valueOf(d));
}
}
return new Pair<>(arrayList, arrayList2);
}
public static final Pair<List<Boolean>, List<Boolean>> partition(boolean[] zArr, Function1<? super Boolean, Boolean> predicate) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
ArrayList arrayList = new ArrayList();
ArrayList arrayList2 = new ArrayList();
for (boolean z : zArr) {
if (predicate.invoke(Boolean.valueOf(z)).booleanValue()) {
arrayList.add(Boolean.valueOf(z));
} else {
arrayList2.add(Boolean.valueOf(z));
}
}
return new Pair<>(arrayList, arrayList2);
}
public static final Pair<List<Character>, List<Character>> partition(char[] cArr, Function1<? super Character, Boolean> predicate) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
ArrayList arrayList = new ArrayList();
ArrayList arrayList2 = new ArrayList();
for (char c : cArr) {
if (predicate.invoke(Character.valueOf(c)).booleanValue()) {
arrayList.add(Character.valueOf(c));
} else {
arrayList2.add(Character.valueOf(c));
}
}
return new Pair<>(arrayList, arrayList2);
}
public static final <T, R, V> List<V> zip(T[] tArr, R[] other, Function2<? super T, ? super R, ? extends V> transform) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
Intrinsics.checkNotNullParameter(transform, "transform");
int min = Math.min(tArr.length, other.length);
ArrayList arrayList = new ArrayList(min);
for (int i = 0; i < min; i++) {
arrayList.add(transform.invoke(tArr[i], other[i]));
}
return arrayList;
}
public static final <R, V> List<V> zip(byte[] bArr, R[] other, Function2<? super Byte, ? super R, ? extends V> transform) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
Intrinsics.checkNotNullParameter(transform, "transform");
int min = Math.min(bArr.length, other.length);
ArrayList arrayList = new ArrayList(min);
for (int i = 0; i < min; i++) {
arrayList.add(transform.invoke(Byte.valueOf(bArr[i]), other[i]));
}
return arrayList;
}
public static final <R, V> List<V> zip(short[] sArr, R[] other, Function2<? super Short, ? super R, ? extends V> transform) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
Intrinsics.checkNotNullParameter(transform, "transform");
int min = Math.min(sArr.length, other.length);
ArrayList arrayList = new ArrayList(min);
for (int i = 0; i < min; i++) {
arrayList.add(transform.invoke(Short.valueOf(sArr[i]), other[i]));
}
return arrayList;
}
public static final <R, V> List<V> zip(int[] iArr, R[] other, Function2<? super Integer, ? super R, ? extends V> transform) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
Intrinsics.checkNotNullParameter(transform, "transform");
int min = Math.min(iArr.length, other.length);
ArrayList arrayList = new ArrayList(min);
for (int i = 0; i < min; i++) {
arrayList.add(transform.invoke(Integer.valueOf(iArr[i]), other[i]));
}
return arrayList;
}
public static final <R, V> List<V> zip(long[] jArr, R[] other, Function2<? super Long, ? super R, ? extends V> transform) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
Intrinsics.checkNotNullParameter(transform, "transform");
int min = Math.min(jArr.length, other.length);
ArrayList arrayList = new ArrayList(min);
for (int i = 0; i < min; i++) {
arrayList.add(transform.invoke(Long.valueOf(jArr[i]), other[i]));
}
return arrayList;
}
public static final <R, V> List<V> zip(float[] fArr, R[] other, Function2<? super Float, ? super R, ? extends V> transform) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
Intrinsics.checkNotNullParameter(transform, "transform");
int min = Math.min(fArr.length, other.length);
ArrayList arrayList = new ArrayList(min);
for (int i = 0; i < min; i++) {
arrayList.add(transform.invoke(Float.valueOf(fArr[i]), other[i]));
}
return arrayList;
}
public static final <R, V> List<V> zip(double[] dArr, R[] other, Function2<? super Double, ? super R, ? extends V> transform) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
Intrinsics.checkNotNullParameter(transform, "transform");
int min = Math.min(dArr.length, other.length);
ArrayList arrayList = new ArrayList(min);
for (int i = 0; i < min; i++) {
arrayList.add(transform.invoke(Double.valueOf(dArr[i]), other[i]));
}
return arrayList;
}
public static final <R, V> List<V> zip(boolean[] zArr, R[] other, Function2<? super Boolean, ? super R, ? extends V> transform) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
Intrinsics.checkNotNullParameter(transform, "transform");
int min = Math.min(zArr.length, other.length);
ArrayList arrayList = new ArrayList(min);
for (int i = 0; i < min; i++) {
arrayList.add(transform.invoke(Boolean.valueOf(zArr[i]), other[i]));
}
return arrayList;
}
public static final <R, V> List<V> zip(char[] cArr, R[] other, Function2<? super Character, ? super R, ? extends V> transform) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
Intrinsics.checkNotNullParameter(transform, "transform");
int min = Math.min(cArr.length, other.length);
ArrayList arrayList = new ArrayList(min);
for (int i = 0; i < min; i++) {
arrayList.add(transform.invoke(Character.valueOf(cArr[i]), other[i]));
}
return arrayList;
}
/* JADX WARN: Multi-variable type inference failed */
public static final <T, R, V> List<V> zip(T[] tArr, Iterable<? extends R> other, Function2<? super T, ? super R, ? extends V> transform) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
Intrinsics.checkNotNullParameter(transform, "transform");
int length = tArr.length;
ArrayList arrayList = new ArrayList(Math.min(CollectionsKt.collectionSizeOrDefault(other, 10), length));
int i = 0;
for (R r : other) {
if (i >= length) {
break;
}
arrayList.add(transform.invoke(tArr[i], r));
i++;
}
return arrayList;
}
public static final <R, V> List<V> zip(byte[] bArr, Iterable<? extends R> other, Function2<? super Byte, ? super R, ? extends V> transform) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
Intrinsics.checkNotNullParameter(transform, "transform");
int length = bArr.length;
ArrayList arrayList = new ArrayList(Math.min(CollectionsKt.collectionSizeOrDefault(other, 10), length));
int i = 0;
for (R r : other) {
if (i >= length) {
break;
}
arrayList.add(transform.invoke(Byte.valueOf(bArr[i]), r));
i++;
}
return arrayList;
}
public static final <R, V> List<V> zip(short[] sArr, Iterable<? extends R> other, Function2<? super Short, ? super R, ? extends V> transform) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
Intrinsics.checkNotNullParameter(transform, "transform");
int length = sArr.length;
ArrayList arrayList = new ArrayList(Math.min(CollectionsKt.collectionSizeOrDefault(other, 10), length));
int i = 0;
for (R r : other) {
if (i >= length) {
break;
}
arrayList.add(transform.invoke(Short.valueOf(sArr[i]), r));
i++;
}
return arrayList;
}
public static final <R, V> List<V> zip(int[] iArr, Iterable<? extends R> other, Function2<? super Integer, ? super R, ? extends V> transform) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
Intrinsics.checkNotNullParameter(transform, "transform");
int length = iArr.length;
ArrayList arrayList = new ArrayList(Math.min(CollectionsKt.collectionSizeOrDefault(other, 10), length));
int i = 0;
for (R r : other) {
if (i >= length) {
break;
}
arrayList.add(transform.invoke(Integer.valueOf(iArr[i]), r));
i++;
}
return arrayList;
}
public static final <R, V> List<V> zip(long[] jArr, Iterable<? extends R> other, Function2<? super Long, ? super R, ? extends V> transform) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
Intrinsics.checkNotNullParameter(transform, "transform");
int length = jArr.length;
ArrayList arrayList = new ArrayList(Math.min(CollectionsKt.collectionSizeOrDefault(other, 10), length));
int i = 0;
for (R r : other) {
if (i >= length) {
break;
}
arrayList.add(transform.invoke(Long.valueOf(jArr[i]), r));
i++;
}
return arrayList;
}
public static final <R, V> List<V> zip(float[] fArr, Iterable<? extends R> other, Function2<? super Float, ? super R, ? extends V> transform) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
Intrinsics.checkNotNullParameter(transform, "transform");
int length = fArr.length;
ArrayList arrayList = new ArrayList(Math.min(CollectionsKt.collectionSizeOrDefault(other, 10), length));
int i = 0;
for (R r : other) {
if (i >= length) {
break;
}
arrayList.add(transform.invoke(Float.valueOf(fArr[i]), r));
i++;
}
return arrayList;
}
public static final <R, V> List<V> zip(double[] dArr, Iterable<? extends R> other, Function2<? super Double, ? super R, ? extends V> transform) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
Intrinsics.checkNotNullParameter(transform, "transform");
int length = dArr.length;
ArrayList arrayList = new ArrayList(Math.min(CollectionsKt.collectionSizeOrDefault(other, 10), length));
int i = 0;
for (R r : other) {
if (i >= length) {
break;
}
arrayList.add(transform.invoke(Double.valueOf(dArr[i]), r));
i++;
}
return arrayList;
}
public static final <R, V> List<V> zip(boolean[] zArr, Iterable<? extends R> other, Function2<? super Boolean, ? super R, ? extends V> transform) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
Intrinsics.checkNotNullParameter(transform, "transform");
int length = zArr.length;
ArrayList arrayList = new ArrayList(Math.min(CollectionsKt.collectionSizeOrDefault(other, 10), length));
int i = 0;
for (R r : other) {
if (i >= length) {
break;
}
arrayList.add(transform.invoke(Boolean.valueOf(zArr[i]), r));
i++;
}
return arrayList;
}
public static final <R, V> List<V> zip(char[] cArr, Iterable<? extends R> other, Function2<? super Character, ? super R, ? extends V> transform) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
Intrinsics.checkNotNullParameter(transform, "transform");
int length = cArr.length;
ArrayList arrayList = new ArrayList(Math.min(CollectionsKt.collectionSizeOrDefault(other, 10), length));
int i = 0;
for (R r : other) {
if (i >= length) {
break;
}
arrayList.add(transform.invoke(Character.valueOf(cArr[i]), r));
i++;
}
return arrayList;
}
public static final <V> List<V> zip(byte[] bArr, byte[] other, Function2<? super Byte, ? super Byte, ? extends V> transform) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
Intrinsics.checkNotNullParameter(transform, "transform");
int min = Math.min(bArr.length, other.length);
ArrayList arrayList = new ArrayList(min);
for (int i = 0; i < min; i++) {
arrayList.add(transform.invoke(Byte.valueOf(bArr[i]), Byte.valueOf(other[i])));
}
return arrayList;
}
public static final <V> List<V> zip(short[] sArr, short[] other, Function2<? super Short, ? super Short, ? extends V> transform) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
Intrinsics.checkNotNullParameter(transform, "transform");
int min = Math.min(sArr.length, other.length);
ArrayList arrayList = new ArrayList(min);
for (int i = 0; i < min; i++) {
arrayList.add(transform.invoke(Short.valueOf(sArr[i]), Short.valueOf(other[i])));
}
return arrayList;
}
public static final <V> List<V> zip(int[] iArr, int[] other, Function2<? super Integer, ? super Integer, ? extends V> transform) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
Intrinsics.checkNotNullParameter(transform, "transform");
int min = Math.min(iArr.length, other.length);
ArrayList arrayList = new ArrayList(min);
for (int i = 0; i < min; i++) {
arrayList.add(transform.invoke(Integer.valueOf(iArr[i]), Integer.valueOf(other[i])));
}
return arrayList;
}
public static final <V> List<V> zip(long[] jArr, long[] other, Function2<? super Long, ? super Long, ? extends V> transform) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
Intrinsics.checkNotNullParameter(transform, "transform");
int min = Math.min(jArr.length, other.length);
ArrayList arrayList = new ArrayList(min);
for (int i = 0; i < min; i++) {
arrayList.add(transform.invoke(Long.valueOf(jArr[i]), Long.valueOf(other[i])));
}
return arrayList;
}
public static final <V> List<V> zip(float[] fArr, float[] other, Function2<? super Float, ? super Float, ? extends V> transform) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
Intrinsics.checkNotNullParameter(transform, "transform");
int min = Math.min(fArr.length, other.length);
ArrayList arrayList = new ArrayList(min);
for (int i = 0; i < min; i++) {
arrayList.add(transform.invoke(Float.valueOf(fArr[i]), Float.valueOf(other[i])));
}
return arrayList;
}
public static final <V> List<V> zip(double[] dArr, double[] other, Function2<? super Double, ? super Double, ? extends V> transform) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
Intrinsics.checkNotNullParameter(transform, "transform");
int min = Math.min(dArr.length, other.length);
ArrayList arrayList = new ArrayList(min);
for (int i = 0; i < min; i++) {
arrayList.add(transform.invoke(Double.valueOf(dArr[i]), Double.valueOf(other[i])));
}
return arrayList;
}
public static final <V> List<V> zip(boolean[] zArr, boolean[] other, Function2<? super Boolean, ? super Boolean, ? extends V> transform) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
Intrinsics.checkNotNullParameter(transform, "transform");
int min = Math.min(zArr.length, other.length);
ArrayList arrayList = new ArrayList(min);
for (int i = 0; i < min; i++) {
arrayList.add(transform.invoke(Boolean.valueOf(zArr[i]), Boolean.valueOf(other[i])));
}
return arrayList;
}
public static final <V> List<V> zip(char[] cArr, char[] other, Function2<? super Character, ? super Character, ? extends V> transform) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
Intrinsics.checkNotNullParameter(transform, "transform");
int min = Math.min(cArr.length, other.length);
ArrayList arrayList = new ArrayList(min);
for (int i = 0; i < min; i++) {
arrayList.add(transform.invoke(Character.valueOf(cArr[i]), Character.valueOf(other[i])));
}
return arrayList;
}
public static final <T, A extends Appendable> A joinTo(T[] tArr, A buffer, CharSequence separator, CharSequence prefix, CharSequence postfix, int i, CharSequence truncated, Function1<? super T, ? extends CharSequence> function1) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(buffer, "buffer");
Intrinsics.checkNotNullParameter(separator, "separator");
Intrinsics.checkNotNullParameter(prefix, "prefix");
Intrinsics.checkNotNullParameter(postfix, "postfix");
Intrinsics.checkNotNullParameter(truncated, "truncated");
buffer.append(prefix);
int i2 = 0;
for (T t : tArr) {
i2++;
if (i2 > 1) {
buffer.append(separator);
}
if (i >= 0 && i2 > i) {
break;
}
StringsKt.appendElement(buffer, t, function1);
}
if (i >= 0 && i2 > i) {
buffer.append(truncated);
}
buffer.append(postfix);
return buffer;
}
public static final <A extends Appendable> A joinTo(byte[] bArr, A buffer, CharSequence separator, CharSequence prefix, CharSequence postfix, int i, CharSequence truncated, Function1<? super Byte, ? extends CharSequence> function1) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(buffer, "buffer");
Intrinsics.checkNotNullParameter(separator, "separator");
Intrinsics.checkNotNullParameter(prefix, "prefix");
Intrinsics.checkNotNullParameter(postfix, "postfix");
Intrinsics.checkNotNullParameter(truncated, "truncated");
buffer.append(prefix);
int i2 = 0;
for (byte b : bArr) {
i2++;
if (i2 > 1) {
buffer.append(separator);
}
if (i >= 0 && i2 > i) {
break;
}
if (function1 != null) {
buffer.append(function1.invoke(Byte.valueOf(b)));
} else {
buffer.append(String.valueOf((int) b));
}
}
if (i >= 0 && i2 > i) {
buffer.append(truncated);
}
buffer.append(postfix);
return buffer;
}
public static final <A extends Appendable> A joinTo(short[] sArr, A buffer, CharSequence separator, CharSequence prefix, CharSequence postfix, int i, CharSequence truncated, Function1<? super Short, ? extends CharSequence> function1) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(buffer, "buffer");
Intrinsics.checkNotNullParameter(separator, "separator");
Intrinsics.checkNotNullParameter(prefix, "prefix");
Intrinsics.checkNotNullParameter(postfix, "postfix");
Intrinsics.checkNotNullParameter(truncated, "truncated");
buffer.append(prefix);
int i2 = 0;
for (short s : sArr) {
i2++;
if (i2 > 1) {
buffer.append(separator);
}
if (i >= 0 && i2 > i) {
break;
}
if (function1 != null) {
buffer.append(function1.invoke(Short.valueOf(s)));
} else {
buffer.append(String.valueOf((int) s));
}
}
if (i >= 0 && i2 > i) {
buffer.append(truncated);
}
buffer.append(postfix);
return buffer;
}
public static final <A extends Appendable> A joinTo(int[] iArr, A buffer, CharSequence separator, CharSequence prefix, CharSequence postfix, int i, CharSequence truncated, Function1<? super Integer, ? extends CharSequence> function1) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(buffer, "buffer");
Intrinsics.checkNotNullParameter(separator, "separator");
Intrinsics.checkNotNullParameter(prefix, "prefix");
Intrinsics.checkNotNullParameter(postfix, "postfix");
Intrinsics.checkNotNullParameter(truncated, "truncated");
buffer.append(prefix);
int i2 = 0;
for (int i3 : iArr) {
i2++;
if (i2 > 1) {
buffer.append(separator);
}
if (i >= 0 && i2 > i) {
break;
}
if (function1 != null) {
buffer.append(function1.invoke(Integer.valueOf(i3)));
} else {
buffer.append(String.valueOf(i3));
}
}
if (i >= 0 && i2 > i) {
buffer.append(truncated);
}
buffer.append(postfix);
return buffer;
}
public static final <A extends Appendable> A joinTo(long[] jArr, A buffer, CharSequence separator, CharSequence prefix, CharSequence postfix, int i, CharSequence truncated, Function1<? super Long, ? extends CharSequence> function1) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(buffer, "buffer");
Intrinsics.checkNotNullParameter(separator, "separator");
Intrinsics.checkNotNullParameter(prefix, "prefix");
Intrinsics.checkNotNullParameter(postfix, "postfix");
Intrinsics.checkNotNullParameter(truncated, "truncated");
buffer.append(prefix);
int i2 = 0;
for (long j : jArr) {
i2++;
if (i2 > 1) {
buffer.append(separator);
}
if (i >= 0 && i2 > i) {
break;
}
if (function1 != null) {
buffer.append(function1.invoke(Long.valueOf(j)));
} else {
buffer.append(String.valueOf(j));
}
}
if (i >= 0 && i2 > i) {
buffer.append(truncated);
}
buffer.append(postfix);
return buffer;
}
public static final <A extends Appendable> A joinTo(float[] fArr, A buffer, CharSequence separator, CharSequence prefix, CharSequence postfix, int i, CharSequence truncated, Function1<? super Float, ? extends CharSequence> function1) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(buffer, "buffer");
Intrinsics.checkNotNullParameter(separator, "separator");
Intrinsics.checkNotNullParameter(prefix, "prefix");
Intrinsics.checkNotNullParameter(postfix, "postfix");
Intrinsics.checkNotNullParameter(truncated, "truncated");
buffer.append(prefix);
int i2 = 0;
for (float f : fArr) {
i2++;
if (i2 > 1) {
buffer.append(separator);
}
if (i >= 0 && i2 > i) {
break;
}
if (function1 != null) {
buffer.append(function1.invoke(Float.valueOf(f)));
} else {
buffer.append(String.valueOf(f));
}
}
if (i >= 0 && i2 > i) {
buffer.append(truncated);
}
buffer.append(postfix);
return buffer;
}
public static final <A extends Appendable> A joinTo(double[] dArr, A buffer, CharSequence separator, CharSequence prefix, CharSequence postfix, int i, CharSequence truncated, Function1<? super Double, ? extends CharSequence> function1) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(buffer, "buffer");
Intrinsics.checkNotNullParameter(separator, "separator");
Intrinsics.checkNotNullParameter(prefix, "prefix");
Intrinsics.checkNotNullParameter(postfix, "postfix");
Intrinsics.checkNotNullParameter(truncated, "truncated");
buffer.append(prefix);
int i2 = 0;
for (double d : dArr) {
i2++;
if (i2 > 1) {
buffer.append(separator);
}
if (i >= 0 && i2 > i) {
break;
}
if (function1 != null) {
buffer.append(function1.invoke(Double.valueOf(d)));
} else {
buffer.append(String.valueOf(d));
}
}
if (i >= 0 && i2 > i) {
buffer.append(truncated);
}
buffer.append(postfix);
return buffer;
}
public static final <A extends Appendable> A joinTo(boolean[] zArr, A buffer, CharSequence separator, CharSequence prefix, CharSequence postfix, int i, CharSequence truncated, Function1<? super Boolean, ? extends CharSequence> function1) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(buffer, "buffer");
Intrinsics.checkNotNullParameter(separator, "separator");
Intrinsics.checkNotNullParameter(prefix, "prefix");
Intrinsics.checkNotNullParameter(postfix, "postfix");
Intrinsics.checkNotNullParameter(truncated, "truncated");
buffer.append(prefix);
int i2 = 0;
for (boolean z : zArr) {
i2++;
if (i2 > 1) {
buffer.append(separator);
}
if (i >= 0 && i2 > i) {
break;
}
if (function1 != null) {
buffer.append(function1.invoke(Boolean.valueOf(z)));
} else {
buffer.append(String.valueOf(z));
}
}
if (i >= 0 && i2 > i) {
buffer.append(truncated);
}
buffer.append(postfix);
return buffer;
}
public static final <A extends Appendable> A joinTo(char[] cArr, A buffer, CharSequence separator, CharSequence prefix, CharSequence postfix, int i, CharSequence truncated, Function1<? super Character, ? extends CharSequence> function1) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(buffer, "buffer");
Intrinsics.checkNotNullParameter(separator, "separator");
Intrinsics.checkNotNullParameter(prefix, "prefix");
Intrinsics.checkNotNullParameter(postfix, "postfix");
Intrinsics.checkNotNullParameter(truncated, "truncated");
buffer.append(prefix);
int i2 = 0;
for (char c : cArr) {
i2++;
if (i2 > 1) {
buffer.append(separator);
}
if (i >= 0 && i2 > i) {
break;
}
if (function1 != null) {
buffer.append(function1.invoke(Character.valueOf(c)));
} else {
buffer.append(c);
}
}
if (i >= 0 && i2 > i) {
buffer.append(truncated);
}
buffer.append(postfix);
return buffer;
}
public static /* synthetic */ String joinToString$default(Object[] objArr, CharSequence charSequence, CharSequence charSequence2, CharSequence charSequence3, int i, CharSequence charSequence4, Function1 function1, int i2, Object obj) {
if ((i2 & 1) != 0) {
}
if ((i2 & 2) != 0) {
}
CharSequence charSequence5 = charSequence2;
if ((i2 & 4) != 0) {
}
CharSequence charSequence6 = charSequence3;
if ((i2 & 8) != 0) {
i = -1;
}
int i3 = i;
if ((i2 & 16) != 0) {
}
CharSequence charSequence7 = charSequence4;
if ((i2 & 32) != 0) {
function1 = null;
}
return ArraysKt.joinToString(objArr, charSequence, charSequence5, charSequence6, i3, charSequence7, function1);
}
public static final <T> String joinToString(T[] tArr, CharSequence separator, CharSequence prefix, CharSequence postfix, int i, CharSequence truncated, Function1<? super T, ? extends CharSequence> function1) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(separator, "separator");
Intrinsics.checkNotNullParameter(prefix, "prefix");
Intrinsics.checkNotNullParameter(postfix, "postfix");
Intrinsics.checkNotNullParameter(truncated, "truncated");
String sb = ((StringBuilder) ArraysKt.joinTo(tArr, new StringBuilder(), separator, prefix, postfix, i, truncated, function1)).toString();
Intrinsics.checkNotNullExpressionValue(sb, "toString(...)");
return sb;
}
public static /* synthetic */ String joinToString$default(byte[] bArr, CharSequence charSequence, CharSequence charSequence2, CharSequence charSequence3, int i, CharSequence charSequence4, Function1 function1, int i2, Object obj) {
if ((i2 & 1) != 0) {
}
if ((i2 & 2) != 0) {
}
CharSequence charSequence5 = charSequence2;
if ((i2 & 4) != 0) {
}
CharSequence charSequence6 = charSequence3;
if ((i2 & 8) != 0) {
i = -1;
}
int i3 = i;
if ((i2 & 16) != 0) {
}
CharSequence charSequence7 = charSequence4;
if ((i2 & 32) != 0) {
function1 = null;
}
return ArraysKt.joinToString(bArr, charSequence, charSequence5, charSequence6, i3, charSequence7, (Function1<? super Byte, ? extends CharSequence>) function1);
}
public static final String joinToString(byte[] bArr, CharSequence separator, CharSequence prefix, CharSequence postfix, int i, CharSequence truncated, Function1<? super Byte, ? extends CharSequence> function1) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(separator, "separator");
Intrinsics.checkNotNullParameter(prefix, "prefix");
Intrinsics.checkNotNullParameter(postfix, "postfix");
Intrinsics.checkNotNullParameter(truncated, "truncated");
String sb = ((StringBuilder) ArraysKt.joinTo(bArr, new StringBuilder(), separator, prefix, postfix, i, truncated, function1)).toString();
Intrinsics.checkNotNullExpressionValue(sb, "toString(...)");
return sb;
}
public static /* synthetic */ String joinToString$default(short[] sArr, CharSequence charSequence, CharSequence charSequence2, CharSequence charSequence3, int i, CharSequence charSequence4, Function1 function1, int i2, Object obj) {
if ((i2 & 1) != 0) {
}
if ((i2 & 2) != 0) {
}
CharSequence charSequence5 = charSequence2;
if ((i2 & 4) != 0) {
}
CharSequence charSequence6 = charSequence3;
if ((i2 & 8) != 0) {
i = -1;
}
int i3 = i;
if ((i2 & 16) != 0) {
}
CharSequence charSequence7 = charSequence4;
if ((i2 & 32) != 0) {
function1 = null;
}
return ArraysKt.joinToString(sArr, charSequence, charSequence5, charSequence6, i3, charSequence7, (Function1<? super Short, ? extends CharSequence>) function1);
}
public static final String joinToString(short[] sArr, CharSequence separator, CharSequence prefix, CharSequence postfix, int i, CharSequence truncated, Function1<? super Short, ? extends CharSequence> function1) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(separator, "separator");
Intrinsics.checkNotNullParameter(prefix, "prefix");
Intrinsics.checkNotNullParameter(postfix, "postfix");
Intrinsics.checkNotNullParameter(truncated, "truncated");
String sb = ((StringBuilder) ArraysKt.joinTo(sArr, new StringBuilder(), separator, prefix, postfix, i, truncated, function1)).toString();
Intrinsics.checkNotNullExpressionValue(sb, "toString(...)");
return sb;
}
public static /* synthetic */ String joinToString$default(int[] iArr, CharSequence charSequence, CharSequence charSequence2, CharSequence charSequence3, int i, CharSequence charSequence4, Function1 function1, int i2, Object obj) {
if ((i2 & 1) != 0) {
}
if ((i2 & 2) != 0) {
}
CharSequence charSequence5 = charSequence2;
if ((i2 & 4) != 0) {
}
CharSequence charSequence6 = charSequence3;
if ((i2 & 8) != 0) {
i = -1;
}
int i3 = i;
if ((i2 & 16) != 0) {
}
CharSequence charSequence7 = charSequence4;
if ((i2 & 32) != 0) {
function1 = null;
}
return ArraysKt.joinToString(iArr, charSequence, charSequence5, charSequence6, i3, charSequence7, (Function1<? super Integer, ? extends CharSequence>) function1);
}
public static final String joinToString(int[] iArr, CharSequence separator, CharSequence prefix, CharSequence postfix, int i, CharSequence truncated, Function1<? super Integer, ? extends CharSequence> function1) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(separator, "separator");
Intrinsics.checkNotNullParameter(prefix, "prefix");
Intrinsics.checkNotNullParameter(postfix, "postfix");
Intrinsics.checkNotNullParameter(truncated, "truncated");
String sb = ((StringBuilder) ArraysKt.joinTo(iArr, new StringBuilder(), separator, prefix, postfix, i, truncated, function1)).toString();
Intrinsics.checkNotNullExpressionValue(sb, "toString(...)");
return sb;
}
public static /* synthetic */ String joinToString$default(long[] jArr, CharSequence charSequence, CharSequence charSequence2, CharSequence charSequence3, int i, CharSequence charSequence4, Function1 function1, int i2, Object obj) {
if ((i2 & 1) != 0) {
}
if ((i2 & 2) != 0) {
}
CharSequence charSequence5 = charSequence2;
if ((i2 & 4) != 0) {
}
CharSequence charSequence6 = charSequence3;
if ((i2 & 8) != 0) {
i = -1;
}
int i3 = i;
if ((i2 & 16) != 0) {
}
CharSequence charSequence7 = charSequence4;
if ((i2 & 32) != 0) {
function1 = null;
}
return ArraysKt.joinToString(jArr, charSequence, charSequence5, charSequence6, i3, charSequence7, (Function1<? super Long, ? extends CharSequence>) function1);
}
public static final String joinToString(long[] jArr, CharSequence separator, CharSequence prefix, CharSequence postfix, int i, CharSequence truncated, Function1<? super Long, ? extends CharSequence> function1) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(separator, "separator");
Intrinsics.checkNotNullParameter(prefix, "prefix");
Intrinsics.checkNotNullParameter(postfix, "postfix");
Intrinsics.checkNotNullParameter(truncated, "truncated");
String sb = ((StringBuilder) ArraysKt.joinTo(jArr, new StringBuilder(), separator, prefix, postfix, i, truncated, function1)).toString();
Intrinsics.checkNotNullExpressionValue(sb, "toString(...)");
return sb;
}
public static /* synthetic */ String joinToString$default(float[] fArr, CharSequence charSequence, CharSequence charSequence2, CharSequence charSequence3, int i, CharSequence charSequence4, Function1 function1, int i2, Object obj) {
if ((i2 & 1) != 0) {
}
if ((i2 & 2) != 0) {
}
CharSequence charSequence5 = charSequence2;
if ((i2 & 4) != 0) {
}
CharSequence charSequence6 = charSequence3;
if ((i2 & 8) != 0) {
i = -1;
}
int i3 = i;
if ((i2 & 16) != 0) {
}
CharSequence charSequence7 = charSequence4;
if ((i2 & 32) != 0) {
function1 = null;
}
return ArraysKt.joinToString(fArr, charSequence, charSequence5, charSequence6, i3, charSequence7, (Function1<? super Float, ? extends CharSequence>) function1);
}
public static final String joinToString(float[] fArr, CharSequence separator, CharSequence prefix, CharSequence postfix, int i, CharSequence truncated, Function1<? super Float, ? extends CharSequence> function1) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(separator, "separator");
Intrinsics.checkNotNullParameter(prefix, "prefix");
Intrinsics.checkNotNullParameter(postfix, "postfix");
Intrinsics.checkNotNullParameter(truncated, "truncated");
String sb = ((StringBuilder) ArraysKt.joinTo(fArr, new StringBuilder(), separator, prefix, postfix, i, truncated, function1)).toString();
Intrinsics.checkNotNullExpressionValue(sb, "toString(...)");
return sb;
}
public static /* synthetic */ String joinToString$default(double[] dArr, CharSequence charSequence, CharSequence charSequence2, CharSequence charSequence3, int i, CharSequence charSequence4, Function1 function1, int i2, Object obj) {
if ((i2 & 1) != 0) {
}
if ((i2 & 2) != 0) {
}
CharSequence charSequence5 = charSequence2;
if ((i2 & 4) != 0) {
}
CharSequence charSequence6 = charSequence3;
if ((i2 & 8) != 0) {
i = -1;
}
int i3 = i;
if ((i2 & 16) != 0) {
}
CharSequence charSequence7 = charSequence4;
if ((i2 & 32) != 0) {
function1 = null;
}
return ArraysKt.joinToString(dArr, charSequence, charSequence5, charSequence6, i3, charSequence7, (Function1<? super Double, ? extends CharSequence>) function1);
}
public static final String joinToString(double[] dArr, CharSequence separator, CharSequence prefix, CharSequence postfix, int i, CharSequence truncated, Function1<? super Double, ? extends CharSequence> function1) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(separator, "separator");
Intrinsics.checkNotNullParameter(prefix, "prefix");
Intrinsics.checkNotNullParameter(postfix, "postfix");
Intrinsics.checkNotNullParameter(truncated, "truncated");
String sb = ((StringBuilder) ArraysKt.joinTo(dArr, new StringBuilder(), separator, prefix, postfix, i, truncated, function1)).toString();
Intrinsics.checkNotNullExpressionValue(sb, "toString(...)");
return sb;
}
public static /* synthetic */ String joinToString$default(boolean[] zArr, CharSequence charSequence, CharSequence charSequence2, CharSequence charSequence3, int i, CharSequence charSequence4, Function1 function1, int i2, Object obj) {
if ((i2 & 1) != 0) {
}
if ((i2 & 2) != 0) {
}
CharSequence charSequence5 = charSequence2;
if ((i2 & 4) != 0) {
}
CharSequence charSequence6 = charSequence3;
if ((i2 & 8) != 0) {
i = -1;
}
int i3 = i;
if ((i2 & 16) != 0) {
}
CharSequence charSequence7 = charSequence4;
if ((i2 & 32) != 0) {
function1 = null;
}
return ArraysKt.joinToString(zArr, charSequence, charSequence5, charSequence6, i3, charSequence7, (Function1<? super Boolean, ? extends CharSequence>) function1);
}
public static final String joinToString(boolean[] zArr, CharSequence separator, CharSequence prefix, CharSequence postfix, int i, CharSequence truncated, Function1<? super Boolean, ? extends CharSequence> function1) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(separator, "separator");
Intrinsics.checkNotNullParameter(prefix, "prefix");
Intrinsics.checkNotNullParameter(postfix, "postfix");
Intrinsics.checkNotNullParameter(truncated, "truncated");
String sb = ((StringBuilder) ArraysKt.joinTo(zArr, new StringBuilder(), separator, prefix, postfix, i, truncated, function1)).toString();
Intrinsics.checkNotNullExpressionValue(sb, "toString(...)");
return sb;
}
public static /* synthetic */ String joinToString$default(char[] cArr, CharSequence charSequence, CharSequence charSequence2, CharSequence charSequence3, int i, CharSequence charSequence4, Function1 function1, int i2, Object obj) {
if ((i2 & 1) != 0) {
}
if ((i2 & 2) != 0) {
}
CharSequence charSequence5 = charSequence2;
if ((i2 & 4) != 0) {
}
CharSequence charSequence6 = charSequence3;
if ((i2 & 8) != 0) {
i = -1;
}
int i3 = i;
if ((i2 & 16) != 0) {
}
CharSequence charSequence7 = charSequence4;
if ((i2 & 32) != 0) {
function1 = null;
}
return ArraysKt.joinToString(cArr, charSequence, charSequence5, charSequence6, i3, charSequence7, (Function1<? super Character, ? extends CharSequence>) function1);
}
public static final String joinToString(char[] cArr, CharSequence separator, CharSequence prefix, CharSequence postfix, int i, CharSequence truncated, Function1<? super Character, ? extends CharSequence> function1) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(separator, "separator");
Intrinsics.checkNotNullParameter(prefix, "prefix");
Intrinsics.checkNotNullParameter(postfix, "postfix");
Intrinsics.checkNotNullParameter(truncated, "truncated");
String sb = ((StringBuilder) ArraysKt.joinTo(cArr, new StringBuilder(), separator, prefix, postfix, i, truncated, function1)).toString();
Intrinsics.checkNotNullExpressionValue(sb, "toString(...)");
return sb;
}
public static final <T> Iterable<T> asIterable(T[] tArr) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
return tArr.length == 0 ? CollectionsKt.emptyList() : new ArraysKt___ArraysKt$asIterable$$inlined$Iterable$1(tArr);
}
public static final Iterable<Byte> asIterable(byte[] bArr) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
return bArr.length == 0 ? CollectionsKt.emptyList() : new ArraysKt___ArraysKt$asIterable$$inlined$Iterable$2(bArr);
}
public static final Iterable<Short> asIterable(short[] sArr) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
return sArr.length == 0 ? CollectionsKt.emptyList() : new ArraysKt___ArraysKt$asIterable$$inlined$Iterable$3(sArr);
}
public static final Iterable<Integer> asIterable(int[] iArr) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
return iArr.length == 0 ? CollectionsKt.emptyList() : new ArraysKt___ArraysKt$asIterable$$inlined$Iterable$4(iArr);
}
public static final Iterable<Long> asIterable(long[] jArr) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
return jArr.length == 0 ? CollectionsKt.emptyList() : new ArraysKt___ArraysKt$asIterable$$inlined$Iterable$5(jArr);
}
public static final Iterable<Float> asIterable(float[] fArr) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
return fArr.length == 0 ? CollectionsKt.emptyList() : new ArraysKt___ArraysKt$asIterable$$inlined$Iterable$6(fArr);
}
public static final Iterable<Double> asIterable(double[] dArr) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
return dArr.length == 0 ? CollectionsKt.emptyList() : new ArraysKt___ArraysKt$asIterable$$inlined$Iterable$7(dArr);
}
public static final Iterable<Boolean> asIterable(boolean[] zArr) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
return zArr.length == 0 ? CollectionsKt.emptyList() : new ArraysKt___ArraysKt$asIterable$$inlined$Iterable$8(zArr);
}
public static final Iterable<Character> asIterable(char[] cArr) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
return cArr.length == 0 ? CollectionsKt.emptyList() : new ArraysKt___ArraysKt$asIterable$$inlined$Iterable$9(cArr);
}
public static final <T> Sequence<T> asSequence(final T[] tArr) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
return tArr.length == 0 ? SequencesKt.emptySequence() : new Sequence<T>() { // from class: kotlin.collections.ArraysKt___ArraysKt$asSequence$$inlined$Sequence$1
@Override // kotlin.sequences.Sequence
public Iterator<T> iterator() {
return ArrayIteratorKt.iterator(tArr);
}
};
}
public static final Sequence<Byte> asSequence(final byte[] bArr) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
return bArr.length == 0 ? SequencesKt.emptySequence() : new Sequence<Byte>() { // from class: kotlin.collections.ArraysKt___ArraysKt$asSequence$$inlined$Sequence$2
@Override // kotlin.sequences.Sequence
public Iterator<Byte> iterator() {
return ArrayIteratorsKt.iterator(bArr);
}
};
}
public static final Sequence<Short> asSequence(final short[] sArr) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
return sArr.length == 0 ? SequencesKt.emptySequence() : new Sequence<Short>() { // from class: kotlin.collections.ArraysKt___ArraysKt$asSequence$$inlined$Sequence$3
@Override // kotlin.sequences.Sequence
public Iterator<Short> iterator() {
return ArrayIteratorsKt.iterator(sArr);
}
};
}
public static final Sequence<Integer> asSequence(final int[] iArr) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
return iArr.length == 0 ? SequencesKt.emptySequence() : new Sequence<Integer>() { // from class: kotlin.collections.ArraysKt___ArraysKt$asSequence$$inlined$Sequence$4
@Override // kotlin.sequences.Sequence
public Iterator<Integer> iterator() {
return ArrayIteratorsKt.iterator(iArr);
}
};
}
public static final Sequence<Long> asSequence(final long[] jArr) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
return jArr.length == 0 ? SequencesKt.emptySequence() : new Sequence<Long>() { // from class: kotlin.collections.ArraysKt___ArraysKt$asSequence$$inlined$Sequence$5
@Override // kotlin.sequences.Sequence
public Iterator<Long> iterator() {
return ArrayIteratorsKt.iterator(jArr);
}
};
}
public static final Sequence<Float> asSequence(final float[] fArr) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
return fArr.length == 0 ? SequencesKt.emptySequence() : new Sequence<Float>() { // from class: kotlin.collections.ArraysKt___ArraysKt$asSequence$$inlined$Sequence$6
@Override // kotlin.sequences.Sequence
public Iterator<Float> iterator() {
return ArrayIteratorsKt.iterator(fArr);
}
};
}
public static final Sequence<Double> asSequence(final double[] dArr) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
return dArr.length == 0 ? SequencesKt.emptySequence() : new Sequence<Double>() { // from class: kotlin.collections.ArraysKt___ArraysKt$asSequence$$inlined$Sequence$7
@Override // kotlin.sequences.Sequence
public Iterator<Double> iterator() {
return ArrayIteratorsKt.iterator(dArr);
}
};
}
public static final Sequence<Boolean> asSequence(final boolean[] zArr) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
return zArr.length == 0 ? SequencesKt.emptySequence() : new Sequence<Boolean>() { // from class: kotlin.collections.ArraysKt___ArraysKt$asSequence$$inlined$Sequence$8
@Override // kotlin.sequences.Sequence
public Iterator<Boolean> iterator() {
return ArrayIteratorsKt.iterator(zArr);
}
};
}
public static final Sequence<Character> asSequence(final char[] cArr) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
return cArr.length == 0 ? SequencesKt.emptySequence() : new Sequence<Character>() { // from class: kotlin.collections.ArraysKt___ArraysKt$asSequence$$inlined$Sequence$9
@Override // kotlin.sequences.Sequence
public Iterator<Character> iterator() {
return ArrayIteratorsKt.iterator(cArr);
}
};
}
public static final double averageOfByte(Byte[] bArr) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
double d = BuildConfig.SENTRY_SAMPLE_RATE;
int i = 0;
for (Byte b : bArr) {
d += b.byteValue();
i++;
}
if (i == 0) {
return Double.NaN;
}
return d / i;
}
public static final double averageOfShort(Short[] shArr) {
Intrinsics.checkNotNullParameter(shArr, "<this>");
double d = BuildConfig.SENTRY_SAMPLE_RATE;
int i = 0;
for (Short sh : shArr) {
d += sh.shortValue();
i++;
}
if (i == 0) {
return Double.NaN;
}
return d / i;
}
public static final double averageOfInt(Integer[] numArr) {
Intrinsics.checkNotNullParameter(numArr, "<this>");
double d = BuildConfig.SENTRY_SAMPLE_RATE;
int i = 0;
for (Integer num : numArr) {
d += num.intValue();
i++;
}
if (i == 0) {
return Double.NaN;
}
return d / i;
}
public static final double averageOfLong(Long[] lArr) {
Intrinsics.checkNotNullParameter(lArr, "<this>");
double d = BuildConfig.SENTRY_SAMPLE_RATE;
int i = 0;
for (Long l : lArr) {
d += l.longValue();
i++;
}
if (i == 0) {
return Double.NaN;
}
return d / i;
}
public static final double averageOfFloat(Float[] fArr) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
double d = BuildConfig.SENTRY_SAMPLE_RATE;
int i = 0;
for (Float f : fArr) {
d += f.floatValue();
i++;
}
if (i == 0) {
return Double.NaN;
}
return d / i;
}
public static final double averageOfDouble(Double[] dArr) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
double d = BuildConfig.SENTRY_SAMPLE_RATE;
int i = 0;
for (Double d2 : dArr) {
d += d2.doubleValue();
i++;
}
if (i == 0) {
return Double.NaN;
}
return d / i;
}
public static final double average(byte[] bArr) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
double d = BuildConfig.SENTRY_SAMPLE_RATE;
int i = 0;
for (byte b : bArr) {
d += b;
i++;
}
if (i == 0) {
return Double.NaN;
}
return d / i;
}
public static final double average(short[] sArr) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
double d = BuildConfig.SENTRY_SAMPLE_RATE;
int i = 0;
for (short s : sArr) {
d += s;
i++;
}
if (i == 0) {
return Double.NaN;
}
return d / i;
}
public static final double average(int[] iArr) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
double d = BuildConfig.SENTRY_SAMPLE_RATE;
int i = 0;
for (int i2 : iArr) {
d += i2;
i++;
}
if (i == 0) {
return Double.NaN;
}
return d / i;
}
public static final double average(long[] jArr) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
double d = BuildConfig.SENTRY_SAMPLE_RATE;
int i = 0;
for (long j : jArr) {
d += j;
i++;
}
if (i == 0) {
return Double.NaN;
}
return d / i;
}
public static final double average(float[] fArr) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
double d = BuildConfig.SENTRY_SAMPLE_RATE;
int i = 0;
for (float f : fArr) {
d += f;
i++;
}
if (i == 0) {
return Double.NaN;
}
return d / i;
}
public static final double average(double[] dArr) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
double d = BuildConfig.SENTRY_SAMPLE_RATE;
int i = 0;
for (double d2 : dArr) {
d += d2;
i++;
}
if (i == 0) {
return Double.NaN;
}
return d / i;
}
public static final int sumOfByte(Byte[] bArr) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
int i = 0;
for (Byte b : bArr) {
i += b.byteValue();
}
return i;
}
public static final int sumOfShort(Short[] shArr) {
Intrinsics.checkNotNullParameter(shArr, "<this>");
int i = 0;
for (Short sh : shArr) {
i += sh.shortValue();
}
return i;
}
public static final int sumOfInt(Integer[] numArr) {
Intrinsics.checkNotNullParameter(numArr, "<this>");
int i = 0;
for (Integer num : numArr) {
i += num.intValue();
}
return i;
}
public static final long sumOfLong(Long[] lArr) {
Intrinsics.checkNotNullParameter(lArr, "<this>");
long j = 0;
for (Long l : lArr) {
j += l.longValue();
}
return j;
}
public static final float sumOfFloat(Float[] fArr) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
float f = 0.0f;
for (Float f2 : fArr) {
f += f2.floatValue();
}
return f;
}
public static final double sumOfDouble(Double[] dArr) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
double d = BuildConfig.SENTRY_SAMPLE_RATE;
for (Double d2 : dArr) {
d += d2.doubleValue();
}
return d;
}
public static final int sum(byte[] bArr) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
int i = 0;
for (byte b : bArr) {
i += b;
}
return i;
}
public static final int sum(short[] sArr) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
int i = 0;
for (short s : sArr) {
i += s;
}
return i;
}
public static final int sum(int[] iArr) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
int i = 0;
for (int i2 : iArr) {
i += i2;
}
return i;
}
public static final long sum(long[] jArr) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
long j = 0;
for (long j2 : jArr) {
j += j2;
}
return j;
}
public static final float sum(float[] fArr) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
float f = 0.0f;
for (float f2 : fArr) {
f += f2;
}
return f;
}
public static final double sum(double[] dArr) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
double d = BuildConfig.SENTRY_SAMPLE_RATE;
for (double d2 : dArr) {
d += d2;
}
return d;
}
@Deprecated(message = "The function has unclear behavior when searching for NaN or zero values and will be removed soon. Use 'any { it == element }' instead to continue using this behavior, or '.asList().contains(element: T)' to get the same search behavior as in a list.", replaceWith = @ReplaceWith(expression = "any { it == element }", imports = {}))
@DeprecatedSinceKotlin(errorSince = "1.6", hiddenSince = "1.7", warningSince = "1.4")
public static final /* synthetic */ boolean contains(float[] fArr, float f) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
for (float f2 : fArr) {
if (f2 == f) {
return true;
}
}
return false;
}
@Deprecated(message = "The function has unclear behavior when searching for NaN or zero values and will be removed soon. Use 'any { it == element }' instead to continue using this behavior, or '.asList().contains(element: T)' to get the same search behavior as in a list.", replaceWith = @ReplaceWith(expression = "any { it == element }", imports = {}))
@DeprecatedSinceKotlin(errorSince = "1.6", hiddenSince = "1.7", warningSince = "1.4")
public static final /* synthetic */ boolean contains(double[] dArr, double d) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
for (double d2 : dArr) {
if (d2 == d) {
return true;
}
}
return false;
}
private static final <T> T find(T[] tArr, Function1<? super T, Boolean> predicate) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (T t : tArr) {
if (predicate.invoke(t).booleanValue()) {
return t;
}
}
return null;
}
private static final Byte find(byte[] bArr, Function1<? super Byte, Boolean> predicate) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (byte b : bArr) {
if (predicate.invoke(Byte.valueOf(b)).booleanValue()) {
return Byte.valueOf(b);
}
}
return null;
}
private static final Short find(short[] sArr, Function1<? super Short, Boolean> predicate) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (short s : sArr) {
if (predicate.invoke(Short.valueOf(s)).booleanValue()) {
return Short.valueOf(s);
}
}
return null;
}
private static final Integer find(int[] iArr, Function1<? super Integer, Boolean> predicate) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (int i : iArr) {
if (predicate.invoke(Integer.valueOf(i)).booleanValue()) {
return Integer.valueOf(i);
}
}
return null;
}
private static final Long find(long[] jArr, Function1<? super Long, Boolean> predicate) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (long j : jArr) {
if (predicate.invoke(Long.valueOf(j)).booleanValue()) {
return Long.valueOf(j);
}
}
return null;
}
private static final Float find(float[] fArr, Function1<? super Float, Boolean> predicate) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (float f : fArr) {
if (predicate.invoke(Float.valueOf(f)).booleanValue()) {
return Float.valueOf(f);
}
}
return null;
}
private static final Double find(double[] dArr, Function1<? super Double, Boolean> predicate) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (double d : dArr) {
if (predicate.invoke(Double.valueOf(d)).booleanValue()) {
return Double.valueOf(d);
}
}
return null;
}
private static final Boolean find(boolean[] zArr, Function1<? super Boolean, Boolean> predicate) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (boolean z : zArr) {
if (predicate.invoke(Boolean.valueOf(z)).booleanValue()) {
return Boolean.valueOf(z);
}
}
return null;
}
private static final Character find(char[] cArr, Function1<? super Character, Boolean> predicate) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
for (char c : cArr) {
if (predicate.invoke(Character.valueOf(c)).booleanValue()) {
return Character.valueOf(c);
}
}
return null;
}
private static final <T> T findLast(T[] tArr, Function1<? super T, Boolean> predicate) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
int length = tArr.length - 1;
if (length >= 0) {
while (true) {
int i = length - 1;
T t = tArr[length];
if (predicate.invoke(t).booleanValue()) {
return t;
}
if (i < 0) {
break;
}
length = i;
}
}
return null;
}
private static final Byte findLast(byte[] bArr, Function1<? super Byte, Boolean> predicate) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
int length = bArr.length - 1;
if (length >= 0) {
while (true) {
int i = length - 1;
byte b = bArr[length];
if (predicate.invoke(Byte.valueOf(b)).booleanValue()) {
return Byte.valueOf(b);
}
if (i < 0) {
break;
}
length = i;
}
}
return null;
}
private static final Short findLast(short[] sArr, Function1<? super Short, Boolean> predicate) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
int length = sArr.length - 1;
if (length >= 0) {
while (true) {
int i = length - 1;
short s = sArr[length];
if (predicate.invoke(Short.valueOf(s)).booleanValue()) {
return Short.valueOf(s);
}
if (i < 0) {
break;
}
length = i;
}
}
return null;
}
private static final Integer findLast(int[] iArr, Function1<? super Integer, Boolean> predicate) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
int length = iArr.length - 1;
if (length >= 0) {
while (true) {
int i = length - 1;
int i2 = iArr[length];
if (predicate.invoke(Integer.valueOf(i2)).booleanValue()) {
return Integer.valueOf(i2);
}
if (i < 0) {
break;
}
length = i;
}
}
return null;
}
private static final Long findLast(long[] jArr, Function1<? super Long, Boolean> predicate) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
int length = jArr.length - 1;
if (length >= 0) {
while (true) {
int i = length - 1;
long j = jArr[length];
if (predicate.invoke(Long.valueOf(j)).booleanValue()) {
return Long.valueOf(j);
}
if (i < 0) {
break;
}
length = i;
}
}
return null;
}
private static final Float findLast(float[] fArr, Function1<? super Float, Boolean> predicate) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
int length = fArr.length - 1;
if (length >= 0) {
while (true) {
int i = length - 1;
float f = fArr[length];
if (predicate.invoke(Float.valueOf(f)).booleanValue()) {
return Float.valueOf(f);
}
if (i < 0) {
break;
}
length = i;
}
}
return null;
}
private static final Double findLast(double[] dArr, Function1<? super Double, Boolean> predicate) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
int length = dArr.length - 1;
if (length >= 0) {
while (true) {
int i = length - 1;
double d = dArr[length];
if (predicate.invoke(Double.valueOf(d)).booleanValue()) {
return Double.valueOf(d);
}
if (i < 0) {
break;
}
length = i;
}
}
return null;
}
private static final Boolean findLast(boolean[] zArr, Function1<? super Boolean, Boolean> predicate) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
int length = zArr.length - 1;
if (length >= 0) {
while (true) {
int i = length - 1;
boolean z = zArr[length];
if (predicate.invoke(Boolean.valueOf(z)).booleanValue()) {
return Boolean.valueOf(z);
}
if (i < 0) {
break;
}
length = i;
}
}
return null;
}
private static final Character findLast(char[] cArr, Function1<? super Character, Boolean> predicate) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(predicate, "predicate");
int length = cArr.length - 1;
if (length >= 0) {
while (true) {
int i = length - 1;
char c = cArr[length];
if (predicate.invoke(Character.valueOf(c)).booleanValue()) {
return Character.valueOf(c);
}
if (i < 0) {
break;
}
length = i;
}
}
return null;
}
public static final <T, C extends Collection<? super T>> C filterIndexedTo(T[] tArr, C destination, Function2<? super Integer, ? super T, Boolean> predicate) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(predicate, "predicate");
int length = tArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
T t = tArr[i];
int i3 = i2 + 1;
if (predicate.invoke(Integer.valueOf(i2), t).booleanValue()) {
destination.add(t);
}
i++;
i2 = i3;
}
return destination;
}
public static final <C extends Collection<? super Byte>> C filterIndexedTo(byte[] bArr, C destination, Function2<? super Integer, ? super Byte, Boolean> predicate) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(predicate, "predicate");
int length = bArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
byte b = bArr[i];
int i3 = i2 + 1;
if (predicate.invoke(Integer.valueOf(i2), Byte.valueOf(b)).booleanValue()) {
destination.add(Byte.valueOf(b));
}
i++;
i2 = i3;
}
return destination;
}
public static final <C extends Collection<? super Short>> C filterIndexedTo(short[] sArr, C destination, Function2<? super Integer, ? super Short, Boolean> predicate) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(predicate, "predicate");
int length = sArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
short s = sArr[i];
int i3 = i2 + 1;
if (predicate.invoke(Integer.valueOf(i2), Short.valueOf(s)).booleanValue()) {
destination.add(Short.valueOf(s));
}
i++;
i2 = i3;
}
return destination;
}
public static final <C extends Collection<? super Integer>> C filterIndexedTo(int[] iArr, C destination, Function2<? super Integer, ? super Integer, Boolean> predicate) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(predicate, "predicate");
int length = iArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
int i3 = iArr[i];
int i4 = i2 + 1;
if (predicate.invoke(Integer.valueOf(i2), Integer.valueOf(i3)).booleanValue()) {
destination.add(Integer.valueOf(i3));
}
i++;
i2 = i4;
}
return destination;
}
public static final <C extends Collection<? super Long>> C filterIndexedTo(long[] jArr, C destination, Function2<? super Integer, ? super Long, Boolean> predicate) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(predicate, "predicate");
int length = jArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
long j = jArr[i];
int i3 = i2 + 1;
if (predicate.invoke(Integer.valueOf(i2), Long.valueOf(j)).booleanValue()) {
destination.add(Long.valueOf(j));
}
i++;
i2 = i3;
}
return destination;
}
public static final <C extends Collection<? super Float>> C filterIndexedTo(float[] fArr, C destination, Function2<? super Integer, ? super Float, Boolean> predicate) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(predicate, "predicate");
int length = fArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
float f = fArr[i];
int i3 = i2 + 1;
if (predicate.invoke(Integer.valueOf(i2), Float.valueOf(f)).booleanValue()) {
destination.add(Float.valueOf(f));
}
i++;
i2 = i3;
}
return destination;
}
public static final <C extends Collection<? super Double>> C filterIndexedTo(double[] dArr, C destination, Function2<? super Integer, ? super Double, Boolean> predicate) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(predicate, "predicate");
int length = dArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
double d = dArr[i];
int i3 = i2 + 1;
if (predicate.invoke(Integer.valueOf(i2), Double.valueOf(d)).booleanValue()) {
destination.add(Double.valueOf(d));
}
i++;
i2 = i3;
}
return destination;
}
public static final <C extends Collection<? super Boolean>> C filterIndexedTo(boolean[] zArr, C destination, Function2<? super Integer, ? super Boolean, Boolean> predicate) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(predicate, "predicate");
int length = zArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
boolean z = zArr[i];
int i3 = i2 + 1;
if (predicate.invoke(Integer.valueOf(i2), Boolean.valueOf(z)).booleanValue()) {
destination.add(Boolean.valueOf(z));
}
i++;
i2 = i3;
}
return destination;
}
public static final <C extends Collection<? super Character>> C filterIndexedTo(char[] cArr, C destination, Function2<? super Integer, ? super Character, Boolean> predicate) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(predicate, "predicate");
int length = cArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
char c = cArr[i];
int i3 = i2 + 1;
if (predicate.invoke(Integer.valueOf(i2), Character.valueOf(c)).booleanValue()) {
destination.add(Character.valueOf(c));
}
i++;
i2 = i3;
}
return destination;
}
public static final <T, R, C extends Collection<? super R>> C mapIndexedNotNullTo(T[] tArr, C destination, Function2<? super Integer, ? super T, ? extends R> transform) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(transform, "transform");
int length = tArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
int i3 = i2 + 1;
R invoke = transform.invoke(Integer.valueOf(i2), tArr[i]);
if (invoke != null) {
destination.add(invoke);
}
i++;
i2 = i3;
}
return destination;
}
public static final <T, R, C extends Collection<? super R>> C mapNotNullTo(T[] tArr, C destination, Function1<? super T, ? extends R> transform) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(destination, "destination");
Intrinsics.checkNotNullParameter(transform, "transform");
for (T t : tArr) {
R invoke = transform.invoke(t);
if (invoke != null) {
destination.add(invoke);
}
}
return destination;
}
private static final <T> T[] onEachIndexed(T[] tArr, Function2<? super Integer, ? super T, Unit> action) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(action, "action");
int length = tArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
action.invoke(Integer.valueOf(i2), tArr[i]);
i++;
i2++;
}
return tArr;
}
private static final byte[] onEachIndexed(byte[] bArr, Function2<? super Integer, ? super Byte, Unit> action) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(action, "action");
int length = bArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
action.invoke(Integer.valueOf(i2), Byte.valueOf(bArr[i]));
i++;
i2++;
}
return bArr;
}
private static final short[] onEachIndexed(short[] sArr, Function2<? super Integer, ? super Short, Unit> action) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(action, "action");
int length = sArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
action.invoke(Integer.valueOf(i2), Short.valueOf(sArr[i]));
i++;
i2++;
}
return sArr;
}
private static final int[] onEachIndexed(int[] iArr, Function2<? super Integer, ? super Integer, Unit> action) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(action, "action");
int length = iArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
action.invoke(Integer.valueOf(i2), Integer.valueOf(iArr[i]));
i++;
i2++;
}
return iArr;
}
private static final long[] onEachIndexed(long[] jArr, Function2<? super Integer, ? super Long, Unit> action) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(action, "action");
int length = jArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
action.invoke(Integer.valueOf(i2), Long.valueOf(jArr[i]));
i++;
i2++;
}
return jArr;
}
private static final float[] onEachIndexed(float[] fArr, Function2<? super Integer, ? super Float, Unit> action) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(action, "action");
int length = fArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
action.invoke(Integer.valueOf(i2), Float.valueOf(fArr[i]));
i++;
i2++;
}
return fArr;
}
private static final double[] onEachIndexed(double[] dArr, Function2<? super Integer, ? super Double, Unit> action) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(action, "action");
int length = dArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
action.invoke(Integer.valueOf(i2), Double.valueOf(dArr[i]));
i++;
i2++;
}
return dArr;
}
private static final boolean[] onEachIndexed(boolean[] zArr, Function2<? super Integer, ? super Boolean, Unit> action) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(action, "action");
int length = zArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
action.invoke(Integer.valueOf(i2), Boolean.valueOf(zArr[i]));
i++;
i2++;
}
return zArr;
}
private static final char[] onEachIndexed(char[] cArr, Function2<? super Integer, ? super Character, Unit> action) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(action, "action");
int length = cArr.length;
int i = 0;
int i2 = 0;
while (i < length) {
action.invoke(Integer.valueOf(i2), Character.valueOf(cArr[i]));
i++;
i2++;
}
return cArr;
}
/* JADX WARN: Multi-variable type inference failed */
public static final <T, R> List<R> scan(T[] tArr, R r, Function2<? super R, ? super T, ? extends R> operation) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (tArr.length == 0) {
return CollectionsKt.listOf(r);
}
ArrayList arrayList = new ArrayList(tArr.length + 1);
arrayList.add(r);
for (DeviceControl$Companion$$ExternalSyntheticLambda3 deviceControl$Companion$$ExternalSyntheticLambda3 : tArr) {
r = operation.invoke(r, deviceControl$Companion$$ExternalSyntheticLambda3);
arrayList.add(r);
}
return arrayList;
}
/* JADX WARN: Multi-variable type inference failed */
public static final <T, R> List<R> scanIndexed(T[] tArr, R r, Function3<? super Integer, ? super R, ? super T, ? extends R> operation) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(operation, "operation");
if (tArr.length == 0) {
return CollectionsKt.listOf(r);
}
ArrayList arrayList = new ArrayList(tArr.length + 1);
arrayList.add(r);
int length = tArr.length;
for (int i = 0; i < length; i++) {
r = operation.invoke(Integer.valueOf(i), r, tArr[i]);
arrayList.add(r);
}
return arrayList;
}
public static final <T, R> List<Pair<T, R>> zip(T[] tArr, R[] other) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
int min = Math.min(tArr.length, other.length);
ArrayList arrayList = new ArrayList(min);
for (int i = 0; i < min; i++) {
arrayList.add(TuplesKt.to(tArr[i], other[i]));
}
return arrayList;
}
public static final <R> List<Pair<Byte, R>> zip(byte[] bArr, R[] other) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
int min = Math.min(bArr.length, other.length);
ArrayList arrayList = new ArrayList(min);
for (int i = 0; i < min; i++) {
byte b = bArr[i];
arrayList.add(TuplesKt.to(Byte.valueOf(b), other[i]));
}
return arrayList;
}
public static final <R> List<Pair<Short, R>> zip(short[] sArr, R[] other) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
int min = Math.min(sArr.length, other.length);
ArrayList arrayList = new ArrayList(min);
for (int i = 0; i < min; i++) {
short s = sArr[i];
arrayList.add(TuplesKt.to(Short.valueOf(s), other[i]));
}
return arrayList;
}
public static final <R> List<Pair<Integer, R>> zip(int[] iArr, R[] other) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
int min = Math.min(iArr.length, other.length);
ArrayList arrayList = new ArrayList(min);
for (int i = 0; i < min; i++) {
int i2 = iArr[i];
arrayList.add(TuplesKt.to(Integer.valueOf(i2), other[i]));
}
return arrayList;
}
public static final <R> List<Pair<Long, R>> zip(long[] jArr, R[] other) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
int min = Math.min(jArr.length, other.length);
ArrayList arrayList = new ArrayList(min);
for (int i = 0; i < min; i++) {
long j = jArr[i];
arrayList.add(TuplesKt.to(Long.valueOf(j), other[i]));
}
return arrayList;
}
public static final <R> List<Pair<Float, R>> zip(float[] fArr, R[] other) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
int min = Math.min(fArr.length, other.length);
ArrayList arrayList = new ArrayList(min);
for (int i = 0; i < min; i++) {
float f = fArr[i];
arrayList.add(TuplesKt.to(Float.valueOf(f), other[i]));
}
return arrayList;
}
public static final <R> List<Pair<Double, R>> zip(double[] dArr, R[] other) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
int min = Math.min(dArr.length, other.length);
ArrayList arrayList = new ArrayList(min);
for (int i = 0; i < min; i++) {
double d = dArr[i];
arrayList.add(TuplesKt.to(Double.valueOf(d), other[i]));
}
return arrayList;
}
public static final <R> List<Pair<Boolean, R>> zip(boolean[] zArr, R[] other) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
int min = Math.min(zArr.length, other.length);
ArrayList arrayList = new ArrayList(min);
for (int i = 0; i < min; i++) {
boolean z = zArr[i];
arrayList.add(TuplesKt.to(Boolean.valueOf(z), other[i]));
}
return arrayList;
}
public static final <R> List<Pair<Character, R>> zip(char[] cArr, R[] other) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
int min = Math.min(cArr.length, other.length);
ArrayList arrayList = new ArrayList(min);
for (int i = 0; i < min; i++) {
char c = cArr[i];
arrayList.add(TuplesKt.to(Character.valueOf(c), other[i]));
}
return arrayList;
}
public static final <T, R> List<Pair<T, R>> zip(T[] tArr, Iterable<? extends R> other) {
Intrinsics.checkNotNullParameter(tArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
int length = tArr.length;
ArrayList arrayList = new ArrayList(Math.min(CollectionsKt.collectionSizeOrDefault(other, 10), length));
int i = 0;
for (R r : other) {
if (i >= length) {
break;
}
arrayList.add(TuplesKt.to(tArr[i], r));
i++;
}
return arrayList;
}
public static final <R> List<Pair<Byte, R>> zip(byte[] bArr, Iterable<? extends R> other) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
int length = bArr.length;
ArrayList arrayList = new ArrayList(Math.min(CollectionsKt.collectionSizeOrDefault(other, 10), length));
int i = 0;
for (R r : other) {
if (i >= length) {
break;
}
arrayList.add(TuplesKt.to(Byte.valueOf(bArr[i]), r));
i++;
}
return arrayList;
}
public static final <R> List<Pair<Short, R>> zip(short[] sArr, Iterable<? extends R> other) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
int length = sArr.length;
ArrayList arrayList = new ArrayList(Math.min(CollectionsKt.collectionSizeOrDefault(other, 10), length));
int i = 0;
for (R r : other) {
if (i >= length) {
break;
}
arrayList.add(TuplesKt.to(Short.valueOf(sArr[i]), r));
i++;
}
return arrayList;
}
public static final <R> List<Pair<Integer, R>> zip(int[] iArr, Iterable<? extends R> other) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
int length = iArr.length;
ArrayList arrayList = new ArrayList(Math.min(CollectionsKt.collectionSizeOrDefault(other, 10), length));
int i = 0;
for (R r : other) {
if (i >= length) {
break;
}
arrayList.add(TuplesKt.to(Integer.valueOf(iArr[i]), r));
i++;
}
return arrayList;
}
public static final <R> List<Pair<Long, R>> zip(long[] jArr, Iterable<? extends R> other) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
int length = jArr.length;
ArrayList arrayList = new ArrayList(Math.min(CollectionsKt.collectionSizeOrDefault(other, 10), length));
int i = 0;
for (R r : other) {
if (i >= length) {
break;
}
arrayList.add(TuplesKt.to(Long.valueOf(jArr[i]), r));
i++;
}
return arrayList;
}
public static final <R> List<Pair<Float, R>> zip(float[] fArr, Iterable<? extends R> other) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
int length = fArr.length;
ArrayList arrayList = new ArrayList(Math.min(CollectionsKt.collectionSizeOrDefault(other, 10), length));
int i = 0;
for (R r : other) {
if (i >= length) {
break;
}
arrayList.add(TuplesKt.to(Float.valueOf(fArr[i]), r));
i++;
}
return arrayList;
}
public static final <R> List<Pair<Double, R>> zip(double[] dArr, Iterable<? extends R> other) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
int length = dArr.length;
ArrayList arrayList = new ArrayList(Math.min(CollectionsKt.collectionSizeOrDefault(other, 10), length));
int i = 0;
for (R r : other) {
if (i >= length) {
break;
}
arrayList.add(TuplesKt.to(Double.valueOf(dArr[i]), r));
i++;
}
return arrayList;
}
public static final <R> List<Pair<Boolean, R>> zip(boolean[] zArr, Iterable<? extends R> other) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
int length = zArr.length;
ArrayList arrayList = new ArrayList(Math.min(CollectionsKt.collectionSizeOrDefault(other, 10), length));
int i = 0;
for (R r : other) {
if (i >= length) {
break;
}
arrayList.add(TuplesKt.to(Boolean.valueOf(zArr[i]), r));
i++;
}
return arrayList;
}
public static final <R> List<Pair<Character, R>> zip(char[] cArr, Iterable<? extends R> other) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
int length = cArr.length;
ArrayList arrayList = new ArrayList(Math.min(CollectionsKt.collectionSizeOrDefault(other, 10), length));
int i = 0;
for (R r : other) {
if (i >= length) {
break;
}
arrayList.add(TuplesKt.to(Character.valueOf(cArr[i]), r));
i++;
}
return arrayList;
}
public static final List<Pair<Byte, Byte>> zip(byte[] bArr, byte[] other) {
Intrinsics.checkNotNullParameter(bArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
int min = Math.min(bArr.length, other.length);
ArrayList arrayList = new ArrayList(min);
for (int i = 0; i < min; i++) {
arrayList.add(TuplesKt.to(Byte.valueOf(bArr[i]), Byte.valueOf(other[i])));
}
return arrayList;
}
public static final List<Pair<Short, Short>> zip(short[] sArr, short[] other) {
Intrinsics.checkNotNullParameter(sArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
int min = Math.min(sArr.length, other.length);
ArrayList arrayList = new ArrayList(min);
for (int i = 0; i < min; i++) {
arrayList.add(TuplesKt.to(Short.valueOf(sArr[i]), Short.valueOf(other[i])));
}
return arrayList;
}
public static final List<Pair<Integer, Integer>> zip(int[] iArr, int[] other) {
Intrinsics.checkNotNullParameter(iArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
int min = Math.min(iArr.length, other.length);
ArrayList arrayList = new ArrayList(min);
for (int i = 0; i < min; i++) {
arrayList.add(TuplesKt.to(Integer.valueOf(iArr[i]), Integer.valueOf(other[i])));
}
return arrayList;
}
public static final List<Pair<Long, Long>> zip(long[] jArr, long[] other) {
Intrinsics.checkNotNullParameter(jArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
int min = Math.min(jArr.length, other.length);
ArrayList arrayList = new ArrayList(min);
for (int i = 0; i < min; i++) {
arrayList.add(TuplesKt.to(Long.valueOf(jArr[i]), Long.valueOf(other[i])));
}
return arrayList;
}
public static final List<Pair<Float, Float>> zip(float[] fArr, float[] other) {
Intrinsics.checkNotNullParameter(fArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
int min = Math.min(fArr.length, other.length);
ArrayList arrayList = new ArrayList(min);
for (int i = 0; i < min; i++) {
arrayList.add(TuplesKt.to(Float.valueOf(fArr[i]), Float.valueOf(other[i])));
}
return arrayList;
}
public static final List<Pair<Double, Double>> zip(double[] dArr, double[] other) {
Intrinsics.checkNotNullParameter(dArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
int min = Math.min(dArr.length, other.length);
ArrayList arrayList = new ArrayList(min);
for (int i = 0; i < min; i++) {
arrayList.add(TuplesKt.to(Double.valueOf(dArr[i]), Double.valueOf(other[i])));
}
return arrayList;
}
public static final List<Pair<Boolean, Boolean>> zip(boolean[] zArr, boolean[] other) {
Intrinsics.checkNotNullParameter(zArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
int min = Math.min(zArr.length, other.length);
ArrayList arrayList = new ArrayList(min);
for (int i = 0; i < min; i++) {
arrayList.add(TuplesKt.to(Boolean.valueOf(zArr[i]), Boolean.valueOf(other[i])));
}
return arrayList;
}
public static final List<Pair<Character, Character>> zip(char[] cArr, char[] other) {
Intrinsics.checkNotNullParameter(cArr, "<this>");
Intrinsics.checkNotNullParameter(other, "other");
int min = Math.min(cArr.length, other.length);
ArrayList arrayList = new ArrayList(min);
for (int i = 0; i < min; i++) {
arrayList.add(TuplesKt.to(Character.valueOf(cArr[i]), Character.valueOf(other[i])));
}
return arrayList;
}
}