package m5;

import java.util.LinkedHashMap;
import l5.C;

/* JADX INFO: loaded from: classes3.dex */
public final class s extends o {

    /* JADX INFO: renamed from: i, reason: collision with root package name */
    public String f21275i;

    /* JADX INFO: renamed from: j, reason: collision with root package name */
    public boolean f21276j;

    @Override // m5.o
    public final l5.m I() {
        return new l5.y((LinkedHashMap) this.f21264h);
    }

    @Override // m5.o
    public final void L(String key, l5.m element) {
        kotlin.jvm.internal.o.h(key, "key");
        kotlin.jvm.internal.o.h(element, "element");
        if (!this.f21276j) {
            LinkedHashMap linkedHashMap = (LinkedHashMap) this.f21264h;
            String str = this.f21275i;
            if (str == null) {
                kotlin.jvm.internal.o.n("tag");
                throw null;
            }
            linkedHashMap.put(str, element);
            this.f21276j = true;
            return;
        }
        if (element instanceof C) {
            this.f21275i = ((C) element).g();
            this.f21276j = false;
        } else {
            if (element instanceof l5.y) {
                throw l.b(l5.A.f20326b);
            }
            if (!(element instanceof l5.e)) {
                throw new E3.v();
            }
            throw l.b(l5.g.f20341b);
        }
    }
}
