package b5; import java.lang.reflect.Field; import java.util.Collections; import java.util.Iterator; import java.util.List; import z4.q; import z4.r; /* loaded from: classes2.dex */ public final class d implements r, Cloneable { /* renamed from: g, reason: collision with root package name */ public static final d f3173g = new d(); /* renamed from: d, reason: collision with root package name */ private boolean f3177d; /* renamed from: a, reason: collision with root package name */ private double f3174a = -1.0d; /* renamed from: b, reason: collision with root package name */ private int f3175b = 136; /* renamed from: c, reason: collision with root package name */ private boolean f3176c = true; /* renamed from: e, reason: collision with root package name */ private List f3178e = Collections.emptyList(); /* renamed from: f, reason: collision with root package name */ private List f3179f = Collections.emptyList(); class a extends q { /* renamed from: a, reason: collision with root package name */ private q f3180a; /* renamed from: b, reason: collision with root package name */ final /* synthetic */ boolean f3181b; /* renamed from: c, reason: collision with root package name */ final /* synthetic */ boolean f3182c; /* renamed from: d, reason: collision with root package name */ final /* synthetic */ z4.e f3183d; /* renamed from: e, reason: collision with root package name */ final /* synthetic */ f5.a f3184e; a(boolean z10, boolean z11, z4.e eVar, f5.a aVar) { this.f3181b = z10; this.f3182c = z11; this.f3183d = eVar; this.f3184e = aVar; } private q e() { q qVar = this.f3180a; if (qVar != null) { return qVar; } q o10 = this.f3183d.o(d.this, this.f3184e); this.f3180a = o10; return o10; } @Override // z4.q public Object b(g5.a aVar) { if (!this.f3181b) { return e().b(aVar); } aVar.P0(); return null; } @Override // z4.q public void d(g5.c cVar, Object obj) { if (this.f3182c) { cVar.j0(); } else { e().d(cVar, obj); } } } private boolean e(Class cls) { if (this.f3174a == -1.0d || m((a5.d) cls.getAnnotation(a5.d.class), (a5.e) cls.getAnnotation(a5.e.class))) { return (!this.f3176c && i(cls)) || h(cls); } return true; } private boolean f(Class cls, boolean z10) { Iterator it = (z10 ? this.f3178e : this.f3179f).iterator(); if (!it.hasNext()) { return false; } androidx.appcompat.app.m.a(it.next()); throw null; } private boolean h(Class cls) { return !Enum.class.isAssignableFrom(cls) && (cls.isAnonymousClass() || cls.isLocalClass()); } private boolean i(Class cls) { return cls.isMemberClass() && !j(cls); } private boolean j(Class cls) { return (cls.getModifiers() & 8) != 0; } private boolean k(a5.d dVar) { return dVar == null || dVar.value() <= this.f3174a; } private boolean l(a5.e eVar) { return eVar == null || eVar.value() > this.f3174a; } private boolean m(a5.d dVar, a5.e eVar) { return k(dVar) && l(eVar); } @Override // z4.r public q a(z4.e eVar, f5.a aVar) { Class c10 = aVar.c(); boolean e10 = e(c10); boolean z10 = e10 || f(c10, true); boolean z11 = e10 || f(c10, false); if (z10 || z11) { return new a(z11, z10, eVar, aVar); } return null; } /* JADX INFO: Access modifiers changed from: protected */ /* renamed from: b, reason: merged with bridge method [inline-methods] */ public d clone() { try { return (d) super.clone(); } catch (CloneNotSupportedException e10) { throw new AssertionError(e10); } } public boolean d(Class cls, boolean z10) { return e(cls) || f(cls, z10); } public boolean g(Field field, boolean z10) { a5.a aVar; if ((this.f3175b & field.getModifiers()) != 0) { return true; } if ((this.f3174a != -1.0d && !m((a5.d) field.getAnnotation(a5.d.class), (a5.e) field.getAnnotation(a5.e.class))) || field.isSynthetic()) { return true; } if (this.f3177d && ((aVar = (a5.a) field.getAnnotation(a5.a.class)) == null || (!z10 ? aVar.deserialize() : aVar.serialize()))) { return true; } if ((!this.f3176c && i(field.getType())) || h(field.getType())) { return true; } List list = z10 ? this.f3178e : this.f3179f; if (list.isEmpty()) { return false; } new z4.b(field); Iterator it = list.iterator(); if (!it.hasNext()) { return false; } androidx.appcompat.app.m.a(it.next()); throw null; } }