package o;

import android.graphics.Rect;
import android.view.View;
import java.io.File;
import java.util.Comparator;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.Nk, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final /* synthetic */ class C0347Nk implements Comparator {
    public final /* synthetic */ int a;

    public /* synthetic */ C0347Nk(int i) {
        this.a = i;
    }

    @Override // java.util.Comparator
    public final int compare(Object obj, Object obj2) {
        switch (this.a) {
            case 0:
                return F3.m(((GI) obj).b, ((GI) obj2).b);
            case 1:
                return Long.compare(((File) obj2).lastModified(), ((File) obj).lastModified());
            case 2:
                return ((File) obj2).getName().compareTo(((File) obj).getName());
            case 3:
                String name = ((File) obj).getName();
                int i = C2939xo.f;
                return name.substring(0, i).compareTo(((File) obj2).getName().substring(0, i));
            case 4:
                View view = (View) obj;
                View view2 = (View) obj2;
                if (view == view2) {
                    return 0;
                }
                ZQ zq = AbstractC1270gA.d;
                Rect rect = (Rect) zq.g(view);
                Rect rect2 = (Rect) zq.g(view2);
                int i2 = rect.top - rect2.top;
                return i2 == 0 ? rect.bottom - rect2.bottom : i2;
            case 5:
                View view3 = (View) obj;
                View view4 = (View) obj2;
                if (view3 == view4) {
                    return 0;
                }
                ZQ zq2 = AbstractC1270gA.d;
                Rect rect3 = (Rect) zq2.g(view3);
                Rect rect4 = (Rect) zq2.g(view4);
                int i3 = rect3.left - rect4.left;
                return i3 == 0 ? (rect3.right - rect4.right) * AbstractC1270gA.c : AbstractC1270gA.c * i3;
            case 6:
                byte[] bArr = (byte[]) obj;
                byte[] bArr2 = (byte[]) obj2;
                if (bArr.length != bArr2.length) {
                    return bArr.length - bArr2.length;
                }
                for (int i4 = 0; i4 < bArr.length; i4++) {
                    byte b = bArr[i4];
                    byte b2 = bArr2[i4];
                    if (b != b2) {
                        return b - b2;
                    }
                }
                return 0;
            case 7:
                C3001yV c3001yV = (C3001yV) obj;
                C3001yV c3001yV2 = (C3001yV) obj2;
                return (((Number) c3001yV.m).intValue() - ((Number) c3001yV.l).intValue()) - (((Number) c3001yV2.m).intValue() - ((Number) c3001yV2.l).intValue());
            case 8:
                C2420sK c2420sK = (C2420sK) obj;
                C2420sK c2420sK2 = (C2420sK) obj2;
                float f = c2420sK.O.f773o.N;
                float f2 = c2420sK2.O.f773o.N;
                return f == f2 ? F3.m(c2420sK.t(), c2420sK2.t()) : Float.compare(f, f2);
            default:
                return ((C1202fb) ((AbstractC0584Wn) obj)).a.compareTo(((C1202fb) ((AbstractC0584Wn) obj2)).a);
        }
    }
}
