package defpackage;

import com.google.crypto.tink.internal.TinkBugException;
import java.security.GeneralSecurityException;
import java.util.HashMap;
import java.util.concurrent.atomic.AtomicReference;

/* renamed from: ᵘᵶ, reason: contains not printable characters */
/* loaded from: classes3.dex */
public final class C2542 {

    /* renamed from: ᵴᵳ, reason: contains not printable characters */
    public static final C2542 f9905;

    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    public final AtomicReference f9906 = new AtomicReference(new C4739(new ᵮᵥٴ(26)));

    static {
        try {
            C2542 c2542 = new C2542();
            c2542.m6413(new C1284(C2170.class, new C1260(19)));
            f9905 = c2542;
        } catch (Exception e) {
            throw new TinkBugException(e);
        }
    }

    /* renamed from: ˇʼʤˎ, reason: contains not printable characters */
    public final synchronized void m6406(C5328 c5328) {
        ᵮᵥٴ r0 = new ᵮᵥٴ((C4739) this.f9906.get());
        c5328.getClass();
        C3678 c3678 = new C3678(C2720.class, c5328.f19955);
        HashMap map = (HashMap) r0.ᵤᵙᵷ;
        if (map.containsKey(c3678)) {
            C5328 c53282 = (C5328) map.get(c3678);
            if (!c53282.equals(c5328) || c5328 != c53282) {
                C0910.m3054(c3678, "Attempt to register non-equal parser for already existing object of type: ");
            }
        } else {
            map.put(c3678, c5328);
        }
        this.f9906.set(new C4739(r0));
    }

    /* renamed from: ˎˏʜʾ, reason: contains not printable characters */
    public final InterfaceC0935 m6407(ˉˇʨ r4) throws GeneralSecurityException {
        C4739 c4739 = (C4739) this.f9906.get();
        c4739.getClass();
        C1046 c1046 = new C1046(r4.getClass(), C3460.class);
        HashMap map = c4739.f17553;
        if (map.containsKey(c1046)) {
            return ((C1284) map.get(c1046)).f5306.mo1442(r4);
        }
        C0190.m1433("No Key serializer for ", c1046, " available");
        return null;
    }

    /* renamed from: ˏˋٴ, reason: contains not printable characters */
    public final synchronized void m6408(C1082 c1082) {
        ᵮᵥٴ r0 = new ᵮᵥٴ((C4739) this.f9906.get());
        C1046 c1046 = new C1046(c1082.f4682, C2720.class);
        HashMap map = (HashMap) r0.ᵾᵬ;
        if (map.containsKey(c1046)) {
            C1082 c10822 = (C1082) map.get(c1046);
            if (!c10822.equals(c1082) || c1082 != c10822) {
                C0910.m3054(c1046, "Attempt to register non-equal serializer for already existing object of type: ");
            }
        } else {
            map.put(c1046, c1082);
        }
        this.f9906.set(new C4739(r0));
    }

    /* renamed from: ˏᵙ, reason: contains not printable characters */
    public final synchronized void m6409(C3739 c3739) {
        ᵮᵥٴ r0 = new ᵮᵥٴ((C4739) this.f9906.get());
        c3739.getClass();
        C3678 c3678 = new C3678(C3460.class, c3739.f13971);
        HashMap map = (HashMap) r0.ᵿʗᵝʽ;
        if (map.containsKey(c3678)) {
            C3739 c37392 = (C3739) map.get(c3678);
            if (!c37392.equals(c3739) || c3739 != c37392) {
                C0910.m3054(c3678, "Attempt to register non-equal parser for already existing object of type: ");
            }
        } else {
            map.put(c3678, c3739);
        }
        this.f9906.set(new C4739(r0));
    }

    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    public final ˉˇʨ m6410(C3460 c3460) {
        C4739 c4739 = (C4739) this.f9906.get();
        c4739.getClass();
        C3678 c3678 = new C3678(C3460.class, (C4542) c3460.f12991);
        HashMap map = c4739.f17554;
        if (map.containsKey(c3678)) {
            return ((C3739) map.get(c3678)).f13972.mo1438(c3460);
        }
        C0190.m1433("No Key Parser for requested key type ", c3678, " available");
        return null;
    }

    /* renamed from: ᵴᵳ, reason: contains not printable characters */
    public final AbstractC0596 m6411(C2720 c2720) throws GeneralSecurityException {
        C4739 c4739 = (C4739) this.f9906.get();
        c4739.getClass();
        C3678 c3678 = new C3678(C2720.class, (C4542) c2720.f10548);
        HashMap map = c4739.f17555;
        if (map.containsKey(c3678)) {
            return ((C5328) map.get(c3678)).f19956.mo1440(c2720);
        }
        C0190.m1433("No Parameters Parser for requested key type ", c3678, " available");
        return null;
    }

    /* renamed from: ᵹᵝᵶ, reason: contains not printable characters */
    public final InterfaceC0935 m6412(AbstractC0596 abstractC0596) throws GeneralSecurityException {
        C4739 c4739 = (C4739) this.f9906.get();
        c4739.getClass();
        C1046 c1046 = new C1046(abstractC0596.getClass(), C2720.class);
        HashMap map = c4739.f17552;
        if (map.containsKey(c1046)) {
            return ((C1082) map.get(c1046)).f4683.mo1436(abstractC0596);
        }
        C0190.m1433("No Key Format serializer for ", c1046, " available");
        return null;
    }

    /* renamed from: ᵻᵢﹳᵰ, reason: contains not printable characters */
    public final synchronized void m6413(C1284 c1284) {
        ᵮᵥٴ r0 = new ᵮᵥٴ((C4739) this.f9906.get());
        C1046 c1046 = new C1046(c1284.f5305, C3460.class);
        HashMap map = (HashMap) r0.ᵢˇᵭ;
        if (map.containsKey(c1046)) {
            C1284 c12842 = (C1284) map.get(c1046);
            if (!c12842.equals(c1284) || c1284 != c12842) {
                C0910.m3054(c1046, "Attempt to register non-equal serializer for already existing object of type: ");
            }
        } else {
            map.put(c1046, c1284);
        }
        this.f9906.set(new C4739(r0));
    }
}
