package l3;

import i3.C0636d;
import i3.C0639g;
import java.io.IOException;
import java.lang.reflect.Type;
import java.util.Map;
import q3.C0956a;
import q3.C0957b;

/* JADX INFO: loaded from: classes.dex */
public final class j extends i3.k {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final com.dexterous.flutterlocalnotifications.m f8924a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final com.dexterous.flutterlocalnotifications.m f8925b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final k3.p f8926c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final /* synthetic */ c f8927d;

    public j(c cVar, C0636d c0636d, Type type, i3.k kVar, Type type2, i3.k kVar2, k3.p pVar) {
        this.f8927d = cVar;
        this.f8924a = new com.dexterous.flutterlocalnotifications.m(c0636d, kVar, type);
        this.f8925b = new com.dexterous.flutterlocalnotifications.m(c0636d, kVar2, type2);
        this.f8926c = pVar;
    }

    @Override // i3.k
    public final Object a(C0957b c0957b) throws IOException {
        int iG = c0957b.G();
        if (iG == 9) {
            c0957b.C();
            return null;
        }
        Map map = (Map) this.f8926c.z();
        com.dexterous.flutterlocalnotifications.m mVar = this.f8925b;
        com.dexterous.flutterlocalnotifications.m mVar2 = this.f8924a;
        i3.k kVar = (i3.k) mVar.f4788c;
        i3.k kVar2 = (i3.k) mVar2.f4788c;
        if (iG == 1) {
            c0957b.a();
            while (c0957b.t()) {
                c0957b.a();
                Object objA = kVar2.a(c0957b);
                if (map.put(objA, kVar.a(c0957b)) != null) {
                    throw new C0639g("duplicate key: " + objA);
                }
                c0957b.k();
            }
            c0957b.k();
            return map;
        }
        c0957b.e();
        while (c0957b.t()) {
            C0956a.f9564a.getClass();
            C0956a.a(c0957b);
            Object objA2 = kVar2.a(c0957b);
            if (map.put(objA2, kVar.a(c0957b)) != null) {
                throw new C0639g("duplicate key: " + objA2);
            }
        }
        c0957b.l();
        return map;
    }

    @Override // i3.k
    public final void b(q3.c cVar, Object obj) throws IOException {
        Map map = (Map) obj;
        if (map == null) {
            cVar.o();
            return;
        }
        this.f8927d.getClass();
        com.dexterous.flutterlocalnotifications.m mVar = this.f8925b;
        cVar.f();
        for (Map.Entry entry : map.entrySet()) {
            cVar.m(String.valueOf(entry.getKey()));
            mVar.b(cVar, entry.getValue());
        }
        cVar.l();
    }
}
