package FSaI4_7.IFxWkV_5;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
/* compiled from: Collections.kt */
/* loaded from: classes.dex */
public class FSaI4_7 extends IMuAHx_6 {
    public static final <T> Collection<T> KQgRr5e_0(T[] tArr) {
        FSaI4_7.Xgtqvk_8.QxJ9d_1.IFxWkV_5.QxJ9d_1(tArr, "$receiver");
        return new KQgRr5e_0(tArr, false);
    }

    /* renamed from: KQgRr5e_0  reason: collision with other method in class */
    public static final <T> List<T> m0KQgRr5e_0(T... tArr) {
        FSaI4_7.Xgtqvk_8.QxJ9d_1.IFxWkV_5.QxJ9d_1(tArr, "elements");
        return tArr.length == 0 ? new ArrayList() : new ArrayList(new KQgRr5e_0(tArr, true));
    }

    public static /* bridge */ /* synthetic */ int KQgRr5e_0(List list, Comparable comparable, int i, int i2, int i3, Object obj) {
        if ((i3 & 2) != 0) {
            i = 0;
        }
        if ((i3 & 4) != 0) {
            i2 = list.size();
        }
        return KQgRr5e_0(list, comparable, i, i2);
    }

    public static final <T extends Comparable<? super T>> int KQgRr5e_0(List<? extends T> list, T t, int i, int i2) {
        FSaI4_7.Xgtqvk_8.QxJ9d_1.IFxWkV_5.QxJ9d_1(list, "$receiver");
        KQgRr5e_0(list.size(), i, i2);
        int i3 = i2 - 1;
        while (i <= i3) {
            int i4 = (i + i3) >>> 1;
            int KQgRr5e_0 = FSaI4_7.IMuAHx_6.KQgRr5e_0.KQgRr5e_0(list.get(i4), t);
            if (KQgRr5e_0 < 0) {
                i = i4 + 1;
            } else if (KQgRr5e_0 <= 0) {
                return i4;
            } else {
                i3 = i4 - 1;
            }
        }
        return -(i + 1);
    }

    public static final void KQgRr5e_0(int i, int i2, int i3) {
        if (i2 > i3) {
            throw new IllegalArgumentException("fromIndex (" + i2 + ") is greater than toIndex (" + i3 + ").");
        } else if (i2 < 0) {
            throw new IndexOutOfBoundsException("fromIndex (" + i2 + ") is less than zero.");
        } else if (i3 <= i) {
        } else {
            throw new IndexOutOfBoundsException("toIndex (" + i3 + ") is greater than size (" + i + ").");
        }
    }
}
