package m4;

import java.util.Collections;
import java.util.IdentityHashMap;
import java.util.List;
import java.util.Map;
import k4.AbstractC2395h;
import k4.C2388a;
import k4.C2389b;

/* JADX INFO: loaded from: classes3.dex */
public final class T1 extends AbstractC2395h {

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final AbstractC2395h f20845d;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public final /* synthetic */ U1 f20846e;

    public T1(U1 u12, AbstractC2395h abstractC2395h) {
        this.f20846e = u12;
        this.f20845d = abstractC2395h;
    }

    @Override // k4.AbstractC2395h
    public final void h(k4.r0 r0Var) {
        this.f20845d.h(r0Var);
        this.f20846e.f20880c.execute(new F1.r(this, 28));
    }

    @Override // k4.AbstractC2395h
    public final void i(k4.l0 l0Var) {
        C2388a c2388a = U1.f20877d;
        C2389b c2389b = l0Var.f19894b;
        if (c2389b.f19842a.get(c2388a) != null) {
            throw new IllegalStateException("RetryingNameResolver can only be used once to wrap a NameResolver");
        }
        List list = Collections.EMPTY_LIST;
        C2389b c2389b2 = C2389b.f19841b;
        c2389b.getClass();
        S1 s12 = new S1(this.f20846e);
        IdentityHashMap identityHashMap = new IdentityHashMap(1);
        identityHashMap.put(c2388a, s12);
        for (Map.Entry entry : c2389b.f19842a.entrySet()) {
            if (!identityHashMap.containsKey(entry.getKey())) {
                identityHashMap.put((C2388a) entry.getKey(), entry.getValue());
            }
        }
        this.f20845d.i(new k4.l0(l0Var.f19893a, new C2389b(identityHashMap), l0Var.f19895c));
    }
}
