package c5; import c5.i; import java.lang.reflect.Type; import java.lang.reflect.TypeVariable; import z4.q; /* loaded from: classes2.dex */ final class l extends q { /* renamed from: a, reason: collision with root package name */ private final z4.e f3778a; /* renamed from: b, reason: collision with root package name */ private final q f3779b; /* renamed from: c, reason: collision with root package name */ private final Type f3780c; l(z4.e eVar, q qVar, Type type) { this.f3778a = eVar; this.f3779b = qVar; this.f3780c = type; } private Type e(Type type, Object obj) { return obj != null ? (type == Object.class || (type instanceof TypeVariable) || (type instanceof Class)) ? obj.getClass() : type : type; } @Override // z4.q public Object b(g5.a aVar) { return this.f3779b.b(aVar); } @Override // z4.q public void d(g5.c cVar, Object obj) { q qVar = this.f3779b; Type e10 = e(this.f3780c, obj); if (e10 != this.f3780c) { qVar = this.f3778a.m(f5.a.b(e10)); if (qVar instanceof i.b) { q qVar2 = this.f3779b; if (!(qVar2 instanceof i.b)) { qVar = qVar2; } } } qVar.d(cVar, obj); } }