package o; import java.util.Collection; import java.util.Collections; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; /* renamed from: o.gaQ, reason: case insensitive filesystem */ /* loaded from: classes.dex */ public class C14857gaQ extends C14855gaN { public static final Map b(C13396fZU... c13396fZUArr) { C14957gcv.e(c13396fZUArr, ""); if (c13396fZUArr.length > 0) { LinkedHashMap linkedHashMap = new LinkedHashMap(C14856gaP.a(c13396fZUArr.length)); C14957gcv.e(c13396fZUArr, ""); C14957gcv.e(linkedHashMap, ""); C14856gaP.e(linkedHashMap, c13396fZUArr); return linkedHashMap; } C14854gaM c14854gaM = C14854gaM.c; C14957gcv.d(c14854gaM, ""); return c14854gaM; } public static final void e(Map map, C13396fZU[] c13396fZUArr) { C14957gcv.e(map, ""); C14957gcv.e(c13396fZUArr, ""); for (C13396fZU c13396fZU : c13396fZUArr) { map.put((Object) c13396fZU.d, (Object) c13396fZU.e); } } public static final void d(Map map, Iterable> iterable) { C14957gcv.e(map, ""); C14957gcv.e(iterable, ""); for (C13396fZU c13396fZU : iterable) { map.put((Object) c13396fZU.d, (Object) c13396fZU.e); } } public static final Map c(Iterable> iterable) { C14957gcv.e(iterable, ""); if (iterable instanceof Collection) { Collection collection = (Collection) iterable; int size = collection.size(); if (size == 0) { C14854gaM c14854gaM = C14854gaM.c; C14957gcv.d(c14854gaM, ""); return c14854gaM; } if (size == 1) { C13396fZU next = iterable instanceof List ? (C13396fZU) ((List) iterable).get(0) : iterable.iterator().next(); C14957gcv.e(next, ""); Map singletonMap = Collections.singletonMap(next.d, next.e); C14957gcv.c(singletonMap, ""); return singletonMap; } LinkedHashMap linkedHashMap = new LinkedHashMap(C14856gaP.a(collection.size())); C14957gcv.e(iterable, ""); C14957gcv.e(linkedHashMap, ""); C14856gaP.d(linkedHashMap, iterable); return linkedHashMap; } LinkedHashMap linkedHashMap2 = new LinkedHashMap(); C14957gcv.e(iterable, ""); C14957gcv.e(linkedHashMap2, ""); C14856gaP.d(linkedHashMap2, iterable); return C14856gaP.d(linkedHashMap2); } public static final Map c(Map map) { C14957gcv.e(map, ""); int size = map.size(); if (size == 0) { C14854gaM c14854gaM = C14854gaM.c; C14957gcv.d(c14854gaM, ""); return c14854gaM; } if (size == 1) { return C14856gaP.a(map); } C14957gcv.e(map, ""); return new LinkedHashMap(map); } /* JADX WARN: Multi-variable type inference failed */ public static final Map d(Map map) { C14957gcv.e(map, ""); int size = map.size(); if (size != 0) { return size == 1 ? C14856gaP.a(map) : map; } C14854gaM c14854gaM = C14854gaM.c; C14957gcv.d(c14854gaM, ""); return c14854gaM; } }