package defpackage;

import androidx.media3.container.NalUnitUtil;
import kotlin.Metadata;

/* JADX INFO: loaded from: classes3.dex */
@Metadata(d1 = {"\u0000\u0002\n\u0000¨\u0006\u0000"}, d2 = {"kotlinx-serialization-json"}, k = 2, mv = {2, 0, 0}, xi = NalUnitUtil.H265_NAL_UNIT_TYPE_UNSPECIFIED)
public final class dz4 {
    public static final sy4 a(ux1 ux1Var) {
        cr4.g(ux1Var, "<this>");
        sy4 sy4Var = ux1Var instanceof sy4 ? (sy4) ux1Var : null;
        if (sy4Var != null) {
            return sy4Var;
        }
        throw new IllegalStateException(fi7.f(iw7.a, ux1Var.getClass(), new StringBuilder("This serializer can be used only with Json format.Expected Decoder to be JsonDecoder, got ")));
    }

    public static final ez4 b(fl2 fl2Var) {
        cr4.g(fl2Var, "<this>");
        ez4 ez4Var = fl2Var instanceof ez4 ? (ez4) fl2Var : null;
        if (ez4Var != null) {
            return ez4Var;
        }
        throw new IllegalStateException(fi7.f(iw7.a, fl2Var.getClass(), new StringBuilder("This serializer can be used only with Json format.Expected Encoder to be JsonEncoder, got ")));
    }
}
