NetMirror.apk
Download file
package D2;
import java.lang.reflect.Array;
import java.util.Arrays;
import java.util.Collection;
import java.util.Iterator;
/* JADX INFO: loaded from: classes.dex */
public abstract class f {
/* JADX INFO: renamed from: a, reason: collision with root package name */
private static final Object[] f181a = new Object[0];
public static final Object[] a(Collection collection) {
h.f(collection, "collection");
int size = collection.size();
if (size != 0) {
Iterator it = collection.iterator();
if (it.hasNext()) {
Object[] objArrCopyOf = new Object[size];
int i3 = 0;
while (true) {
int i4 = i3 + 1;
objArrCopyOf[i3] = it.next();
if (i4 >= objArrCopyOf.length) {
if (!it.hasNext()) {
return objArrCopyOf;
}
int i5 = ((i4 * 3) + 1) >>> 1;
if (i5 <= i4) {
i5 = 2147483645;
if (i4 >= 2147483645) {
throw new OutOfMemoryError();
}
}
objArrCopyOf = Arrays.copyOf(objArrCopyOf, i5);
h.e(objArrCopyOf, "copyOf(...)");
} else if (!it.hasNext()) {
Object[] objArrCopyOf2 = Arrays.copyOf(objArrCopyOf, i4);
h.e(objArrCopyOf2, "copyOf(...)");
return objArrCopyOf2;
}
i3 = i4;
}
}
}
return f181a;
}
public static final Object[] b(Collection collection, Object[] objArr) {
Object[] objArrCopyOf;
h.f(collection, "collection");
objArr.getClass();
int size = collection.size();
int i3 = 0;
if (size == 0) {
if (objArr.length <= 0) {
return objArr;
}
objArr[0] = null;
return objArr;
}
Iterator it = collection.iterator();
if (!it.hasNext()) {
if (objArr.length <= 0) {
return objArr;
}
objArr[0] = null;
return objArr;
}
if (size <= objArr.length) {
objArrCopyOf = objArr;
} else {
Object objNewInstance = Array.newInstance(objArr.getClass().getComponentType(), size);
h.d(objNewInstance, "null cannot be cast to non-null type kotlin.Array<kotlin.Any?>");
objArrCopyOf = (Object[]) objNewInstance;
}
while (true) {
int i4 = i3 + 1;
objArrCopyOf[i3] = it.next();
if (i4 >= objArrCopyOf.length) {
if (!it.hasNext()) {
return objArrCopyOf;
}
int i5 = ((i4 * 3) + 1) >>> 1;
if (i5 <= i4) {
i5 = 2147483645;
if (i4 >= 2147483645) {
throw new OutOfMemoryError();
}
}
objArrCopyOf = Arrays.copyOf(objArrCopyOf, i5);
h.e(objArrCopyOf, "copyOf(...)");
} else if (!it.hasNext()) {
if (objArrCopyOf == objArr) {
objArr[i4] = null;
return objArr;
}
Object[] objArrCopyOf2 = Arrays.copyOf(objArrCopyOf, i4);
h.e(objArrCopyOf2, "copyOf(...)");
return objArrCopyOf2;
}
i3 = i4;
}
}
}
⚠️ This content was hidden by an advertisement filtering extension in your browser. Please disable it and reload the page to access the decompiled content.
We only display one small text ad to keep this service free. Here's what it looks like:
Read the Docs for Business: You write the docs. We do the rest.
Try it today!Ad by EthicalAds
Download file