package o; import com.google.android.gms.maps.model.BitmapDescriptorFactory; import com.google.common.base.Preconditions; import java.lang.reflect.Array; import java.lang.reflect.Modifier; import java.lang.reflect.Type; import java.math.BigDecimal; import java.math.BigInteger; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; /* renamed from: o.XbG, reason: case insensitive filesystem */ /* loaded from: classes2.dex */ public final class C1169XbG { private static BigDecimal a; private static Byte b; private static Boolean c; public static final ConcurrentHashMap, Object> d; private static BigInteger e; private static Character f; private static RMP g; private static Integer h; private static Float i; private static Double j; private static Short k; private static Long l; private static String m; static { Boolean bool = new Boolean(true); c = bool; String str = new String(); m = str; Character ch = new Character((char) 0); f = ch; Byte b2 = new Byte((byte) 0); b = b2; Short sh = new Short((short) 0); k = sh; Integer num = new Integer(0); h = num; Float f2 = new Float(BitmapDescriptorFactory.HUE_RED); i = f2; Long l2 = new Long(0L); l = l2; Double d2 = new Double(0.0d); j = d2; BigInteger bigInteger = new BigInteger("0"); e = bigInteger; BigDecimal bigDecimal = new BigDecimal("0"); a = bigDecimal; RMP rmp = new RMP(0L); g = rmp; ConcurrentHashMap, Object> concurrentHashMap = new ConcurrentHashMap<>(); d = concurrentHashMap; concurrentHashMap.put(Boolean.class, bool); concurrentHashMap.put(String.class, str); concurrentHashMap.put(Character.class, ch); concurrentHashMap.put(Byte.class, b2); concurrentHashMap.put(Short.class, sh); concurrentHashMap.put(Integer.class, num); concurrentHashMap.put(Float.class, f2); concurrentHashMap.put(Long.class, l2); concurrentHashMap.put(Double.class, d2); concurrentHashMap.put(BigInteger.class, bigInteger); concurrentHashMap.put(BigDecimal.class, bigDecimal); concurrentHashMap.put(RMP.class, rmp); } public static Map e(Object obj) { if (obj == null || (obj != null && obj == d.get(obj.getClass()))) { return Collections.emptyMap(); } if (obj instanceof Map) { return (Map) obj; } return new OLO(obj, false); } /* JADX WARN: Multi-variable type inference failed */ public static T c(T t) { T t2; if (t == 0 || c((Type) t.getClass())) { return t; } if (t instanceof C10246dzE) { return (T) ((C10246dzE) t).clone(); } Class cls = t.getClass(); if (cls.isArray()) { t2 = (T) Array.newInstance(cls.getComponentType(), Array.getLength(t)); } else if (t instanceof YjD) { t2 = (T) ((YjD) t).clone(); } else { if ("java.util.Arrays$ArrayList".equals(cls.getName())) { Object[] array = ((List) t).toArray(); c(array, array); return (T) Arrays.asList(array); } t2 = (T) PXI.c((Class) cls); } c(t, t2); return t2; } public static void c(Object obj, Object obj2) { Coa a2; Class cls = obj.getClass(); int i2 = 0; Preconditions.checkArgument(cls == obj2.getClass()); if (!cls.isArray()) { if (Collection.class.isAssignableFrom(cls)) { Collection collection = (Collection) obj; if (ArrayList.class.isAssignableFrom(cls)) { ((ArrayList) obj2).ensureCapacity(collection.size()); } Collection collection2 = (Collection) obj2; Iterator it = collection.iterator(); while (it.hasNext()) { collection2.add(c(it.next())); } return; } boolean isAssignableFrom = C10246dzE.class.isAssignableFrom(cls); if (isAssignableFrom || !Map.class.isAssignableFrom(cls)) { if (isAssignableFrom) { a2 = ((C10246dzE) obj).classInfo; } else { a2 = Coa.a(cls); } Iterator it2 = a2.c.iterator(); while (it2.hasNext()) { NIm c2 = a2.c(it2.next()); if (!Modifier.isFinal(c2.a.getModifiers()) && (!isAssignableFrom || !c2.d)) { Object d2 = NIm.d(c2.a, obj); if (d2 != null) { c2.c(obj2, c(d2)); } } } return; } if (YjD.class.isAssignableFrom(cls)) { YjD yjD = (YjD) obj2; YjD yjD2 = (YjD) obj; int size = yjD2.size(); while (i2 < size) { yjD.e(i2, c(yjD2.d(i2))); i2++; } return; } Map map = (Map) obj2; for (Map.Entry entry : ((Map) obj).entrySet()) { map.put(entry.getKey(), c(entry.getValue())); } return; } Preconditions.checkArgument(Array.getLength(obj) == Array.getLength(obj2)); Iterator it3 = PXI.c(obj).iterator(); while (it3.hasNext()) { Array.set(obj2, i2, c(it3.next())); i2++; } } public static boolean c(Type type) { if (!(type instanceof Class)) { return false; } Class cls = (Class) type; return cls.isPrimitive() || cls == Character.class || cls == String.class || cls == Integer.class || cls == Long.class || cls == Short.class || cls == Byte.class || cls == Float.class || cls == Double.class || cls == BigInteger.class || cls == BigDecimal.class || cls == RMP.class || cls == Boolean.class; } }