package o; import java.util.ArrayList; import java.util.Collection; import java.util.Comparator; import java.util.Iterator; import java.util.List; /* loaded from: classes3.dex */ public final class YFe { public static final List e(List list) { C14957gcv.e(list, ""); List list2 = list; C14957gcv.e(list2, ""); ArrayList arrayList = new ArrayList(list2 instanceof Collection ? list2.size() : 10); Iterator it = list2.iterator(); while (it.hasNext()) { C13763fgU c13763fgU = (C13763fgU) it.next(); C14957gcv.e(c13763fgU, ""); String str = c13763fgU.b; String str2 = c13763fgU.a; int parseInt = Integer.parseInt(c13763fgU.e); List list3 = c13763fgU.d; C14957gcv.e(list3, ""); ArrayList arrayList2 = new ArrayList(list3 instanceof Collection ? list3.size() : 10); for (FFL ffl : list3) { arrayList2.add(new Cbc(ffl.d, ffl.a, ffl.e, ffl.c, ffl.b, Integer.parseInt(ffl.j), ffl.f, ffl.i)); it = it; } arrayList.add(new C16370nmf(str, str2, parseInt, C14881gav.a((Iterable) arrayList2, (Comparator) new IeS()), c13763fgU.c)); it = it; } return C14881gav.a((Iterable) arrayList, (Comparator) new RVV()); } /* loaded from: classes3.dex */ public static final class IeS implements Comparator { /* JADX WARN: Multi-variable type inference failed */ @Override // java.util.Comparator public final int compare(T t, T t2) { Integer valueOf = Integer.valueOf(((Cbc) t).j); Integer valueOf2 = Integer.valueOf(((Cbc) t2).j); if (valueOf == valueOf2) { return 0; } if (valueOf == null) { return -1; } if (valueOf2 == null) { return 1; } return valueOf.compareTo(valueOf2); } } /* loaded from: classes3.dex */ public static final class RVV implements Comparator { /* JADX WARN: Multi-variable type inference failed */ @Override // java.util.Comparator public final int compare(T t, T t2) { Integer valueOf = Integer.valueOf(((C16370nmf) t).b); Integer valueOf2 = Integer.valueOf(((C16370nmf) t2).b); if (valueOf == valueOf2) { return 0; } if (valueOf == null) { return -1; } if (valueOf2 == null) { return 1; } return valueOf.compareTo(valueOf2); } } }