package com.bytedance.android.livesdk.model.message.linkcore;

import X.0SJ;
import X.0SP;
import X.0SQ;
import com.bytedance.covode.number.Covode;
import java.util.HashMap;

public final class _LinkMicCommonResp_ProtoDecoder implements 0SJ<LinkMicCommonResp> {
    static {
        Covode.recordClassIndex(19511);
    }

    public final /* synthetic */ Object LIZIZ(0SP r2) {
        return LIZ(r2);
    }

    public static LinkMicCommonResp LIZ(0SP r11) {
        LinkMicCommonResp linkMicCommonResp = new LinkMicCommonResp(0);
        linkMicCommonResp.LIZJ = new HashMap();
        long LIZ = r11.LIZ();
        while (true) {
            int LIZIZ = r11.LIZIZ();
            if (LIZIZ == -1) {
                r11.LIZ(LIZ);
                return linkMicCommonResp;
            } else if (LIZIZ == 1) {
                linkMicCommonResp.LIZ = Long.valueOf(0SQ.LIZIZ(r11));
            } else if (LIZIZ == 2) {
                linkMicCommonResp.LIZIZ = r11.LIZLLL();
            } else if (LIZIZ != 3) {
                0SQ.LIZJ(r11);
            } else {
                long LIZ2 = r11.LIZ();
                String str = null;
                byte[] bArr = null;
                while (true) {
                    int LIZIZ2 = r11.LIZIZ();
                    if (LIZIZ2 == -1) {
                        break;
                    } else if (LIZIZ2 == 1) {
                        str = r11.LIZLLL();
                    } else if (LIZIZ2 == 2) {
                        bArr = r11.LIZJ();
                    }
                }
                r11.LIZ(LIZ2);
                if (str == null) {
                    throw new IllegalStateException("Map key must not be null!");
                } else if (bArr != null) {
                    linkMicCommonResp.LIZJ.put(str, bArr);
                } else {
                    throw new IllegalStateException("Map value must not be null!");
                }
            }
        }
    }
}
