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

import X.0SJ;
import X.0SP;
import X.0SQ;
import com.bytedance.android.livesdk.model._Portal_ProtoDecoder;
import com.bytedance.android.livesdkapi.message._CommonMessageData_ProtoDecoder;
import com.bytedance.covode.number.Covode;
import com.bytedance.ugc.glue.monitor.UGCMonitor;

public final class _PortalMessage_ProtoDecoder implements 0SJ<PortalMessage> {
    static {
        Covode.recordClassIndex(19277);
    }

    public final /* synthetic */ Object LIZIZ(0SP r8) {
        PortalMessage portalMessage = new PortalMessage();
        long LIZ = r8.LIZ();
        while (true) {
            int LIZIZ = r8.LIZIZ();
            if (LIZIZ != -1) {
                switch (LIZIZ) {
                    case 1:
                        portalMessage.LJJJJ = _CommonMessageData_ProtoDecoder.LIZ(r8);
                        break;
                    case 2:
                        portalMessage.LIZ = (int) r8.LJFF();
                        break;
                    case UGCMonitor.STATUS_RESPONSE /*3*/:
                        portalMessage.LIZIZ = r8.LJFF();
                        break;
                    case UGCMonitor.STATUS_FINISH /*4*/:
                        portalMessage.LIZJ = r8.LJFF();
                        break;
                    case 5:
                        portalMessage.LIZLLL = _PortalMessage_PortalBuy_ProtoDecoder.LIZ(r8);
                        break;
                    case 6:
                        portalMessage.LJ = _PortalMessage_PortalInvite_ProtoDecoder.LIZ(r8);
                        break;
                    case 7:
                        portalMessage.LJFF = _PortalMessage_PortalFinish_ProtoDecoder.LIZ(r8);
                        break;
                    case 8:
                        portalMessage.LJII = _Portal_ProtoDecoder.LIZ(r8);
                        break;
                    case 9:
                        portalMessage.LJIIIIZZ = Long.valueOf(r8.LJFF());
                        break;
                    default:
                        0SQ.LIZJ(r8);
                        break;
                }
            } else {
                r8.LIZ(LIZ);
                portalMessage.LIZJ();
                return portalMessage;
            }
        }
    }
}
