package o;

import java.util.ArrayList;
import java.util.List;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.f7, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public abstract class AbstractC1168f7 {
    public static final C0977d7 a = new C0977d7("");

    public static final List a(C0977d7 c0977d7, int i, int i2, C1072e7 c1072e7) {
        List list;
        if (i == i2 || (list = c0977d7.l) == null) {
            return null;
        }
        if (i != 0 || i2 < c0977d7.m.length()) {
            ArrayList arrayList = new ArrayList(list.size());
            int size = list.size();
            for (int i3 = 0; i3 < size; i3++) {
                C0881c7 c0881c7 = (C0881c7) list.get(i3);
                if ((c1072e7 != null ? ((Boolean) c1072e7.g(c0881c7.a)).booleanValue() : true) && b(i, i2, c0881c7.b, c0881c7.c)) {
                    arrayList.add(new C0881c7((Z6) c0881c7.a, AbstractC0940cn0.k(c0881c7.b, i, i2) - i, AbstractC0940cn0.k(c0881c7.c, i, i2) - i, c0881c7.d));
                }
            }
            return arrayList;
        }
        if (c1072e7 == null) {
            return list;
        }
        ArrayList arrayList2 = new ArrayList(list.size());
        int size2 = list.size();
        for (int i4 = 0; i4 < size2; i4++) {
            Object obj = list.get(i4);
            if (((Boolean) c1072e7.g(((C0881c7) obj).a)).booleanValue()) {
                arrayList2.add(obj);
            }
        }
        return arrayList2;
    }

    public static final boolean b(int i, int i2, int i3, int i4) {
        return ((i < i4) & (i3 < i2)) | (((i == i2) | (i3 == i4)) & (i == i3));
    }
}
