package h.s;

import java.util.Arrays;
import java.util.Comparator;
import java.util.List;

/* JADX INFO: Access modifiers changed from: package-private */
/* JADX INFO: compiled from: _ArraysJvm.kt */
/* JADX INFO: loaded from: classes.dex */
public class g extends f {
    public static <T> List<T> b(T[] tArr) {
        h.x.d.k.d(tArr, "<this>");
        List<T> listA = i.a(tArr);
        h.x.d.k.c(listA, "asList(this)");
        return listA;
    }

    public static byte[] c(byte[] bArr, byte[] bArr2, int i2, int i3, int i4) {
        h.x.d.k.d(bArr, "<this>");
        h.x.d.k.d(bArr2, "destination");
        System.arraycopy(bArr, i3, bArr2, i2, i4 - i3);
        return bArr2;
    }

    public static final <T> T[] d(T[] tArr, T[] tArr2, int i2, int i3, int i4) {
        h.x.d.k.d(tArr, "<this>");
        h.x.d.k.d(tArr2, "destination");
        System.arraycopy(tArr, i3, tArr2, i2, i4 - i3);
        return tArr2;
    }

    public static /* synthetic */ byte[] e(byte[] bArr, byte[] bArr2, int i2, int i3, int i4, int i5, Object obj) {
        if ((i5 & 2) != 0) {
            i2 = 0;
        }
        if ((i5 & 4) != 0) {
            i3 = 0;
        }
        if ((i5 & 8) != 0) {
            i4 = bArr.length;
        }
        d.c(bArr, bArr2, i2, i3, i4);
        return bArr2;
    }

    public static /* synthetic */ Object[] f(Object[] objArr, Object[] objArr2, int i2, int i3, int i4, int i5, Object obj) {
        if ((i5 & 2) != 0) {
            i2 = 0;
        }
        if ((i5 & 4) != 0) {
            i3 = 0;
        }
        if ((i5 & 8) != 0) {
            i4 = objArr.length;
        }
        d(objArr, objArr2, i2, i3, i4);
        return objArr2;
    }

    public static byte[] g(byte[] bArr, int i2, int i3) {
        h.x.d.k.d(bArr, "<this>");
        e.a(i3, bArr.length);
        byte[] bArrCopyOfRange = Arrays.copyOfRange(bArr, i2, i3);
        h.x.d.k.c(bArrCopyOfRange, "copyOfRange(this, fromIndex, toIndex)");
        return bArrCopyOfRange;
    }

    public static final void h(int[] iArr, int i2, int i3, int i4) {
        h.x.d.k.d(iArr, "<this>");
        Arrays.fill(iArr, i3, i4, i2);
    }

    public static <T> void i(T[] tArr, T t, int i2, int i3) {
        h.x.d.k.d(tArr, "<this>");
        Arrays.fill(tArr, i2, i3, t);
    }

    public static final void j(boolean[] zArr, boolean z, int i2, int i3) {
        h.x.d.k.d(zArr, "<this>");
        Arrays.fill(zArr, i2, i3, z);
    }

    public static /* synthetic */ void k(int[] iArr, int i2, int i3, int i4, int i5, Object obj) {
        if ((i5 & 2) != 0) {
            i3 = 0;
        }
        if ((i5 & 4) != 0) {
            i4 = iArr.length;
        }
        h(iArr, i2, i3, i4);
    }

    public static /* synthetic */ void l(Object[] objArr, Object obj, int i2, int i3, int i4, Object obj2) {
        if ((i4 & 2) != 0) {
            i2 = 0;
        }
        if ((i4 & 4) != 0) {
            i3 = objArr.length;
        }
        i(objArr, obj, i2, i3);
    }

    public static /* synthetic */ void m(boolean[] zArr, boolean z, int i2, int i3, int i4, Object obj) {
        if ((i4 & 2) != 0) {
            i2 = 0;
        }
        if ((i4 & 4) != 0) {
            i3 = zArr.length;
        }
        j(zArr, z, i2, i3);
    }

    public static final <T> void n(T[] tArr, Comparator<? super T> comparator) {
        h.x.d.k.d(tArr, "<this>");
        h.x.d.k.d(comparator, "comparator");
        if (tArr.length > 1) {
            Arrays.sort(tArr, comparator);
        }
    }
}
