package com.bytedance.android.livesdkapi.depend.model.live.match;

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

public final class _MultiMatchPrepareResponse_ProtoDecoder implements 0SJ<MultiMatchPrepareResponse> {
    static {
        Covode.recordClassIndex(22394);
    }

    public final /* synthetic */ Object LIZIZ(0SP r12) {
        MultiMatchPrepareResponse multiMatchPrepareResponse = new MultiMatchPrepareResponse(0);
        multiMatchPrepareResponse.LIZIZ = new HashMap();
        long LIZ = r12.LIZ();
        while (true) {
            int LIZIZ = r12.LIZIZ();
            if (LIZIZ == -1) {
                r12.LIZ(LIZ);
                return multiMatchPrepareResponse;
            } else if (LIZIZ == 1) {
                long LIZ2 = r12.LIZ();
                Long l = null;
                Integer num = null;
                while (true) {
                    int LIZIZ2 = r12.LIZIZ();
                    if (LIZIZ2 == -1) {
                        break;
                    } else if (LIZIZ2 == 1) {
                        l = Long.valueOf(0SQ.LIZIZ(r12));
                    } else if (LIZIZ2 == 2) {
                        num = Integer.valueOf(r12.LJ());
                    }
                }
                r12.LIZ(LIZ2);
                if (l == null) {
                    throw new IllegalStateException("Map key must not be null!");
                } else if (num != null) {
                    multiMatchPrepareResponse.LIZIZ.put(l, num);
                } else {
                    throw new IllegalStateException("Map value must not be null!");
                }
            } else if (LIZIZ != 2) {
                0SQ.LIZJ(r12);
            } else {
                multiMatchPrepareResponse.LIZ = Long.valueOf(0SQ.LIZIZ(r12));
            }
        }
    }
}
