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

import X.0SJ;
import X.0SP;
import X.0SQ;
import com.bytedance.android.livesdk.model._Gift_ProtoDecoder;
import com.bytedance.covode.number.Covode;
import java.util.ArrayList;

public final class _GiftListResult_ProtoDecoder implements 0SJ<GiftListResult> {
    static {
        Covode.recordClassIndex(16462);
    }

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

    public static GiftListResult LIZ(0SP r5) {
        GiftListResult giftListResult = new GiftListResult();
        giftListResult.LJFF = new ArrayList();
        giftListResult.LJ = new ArrayList();
        giftListResult.LIZJ = new ArrayList();
        long LIZ = r5.LIZ();
        while (true) {
            int LIZIZ = r5.LIZIZ();
            if (LIZIZ != -1) {
                switch (LIZIZ) {
                    case 1:
                        giftListResult.LIZLLL = _GiftsInfo_ProtoDecoder.LIZ(r5);
                        break;
                    case 2:
                        giftListResult.LIZJ.add(_Gift_ProtoDecoder.LIZ(r5));
                        break;
                    case 3:
                        giftListResult.LJ.add(_GiftPage_ProtoDecoder.LIZ(r5));
                        break;
                    case 4:
                        giftListResult.LJFF.add(_DoodleTemplate_ProtoDecoder.LIZ(r5));
                        break;
                    case 5:
                        giftListResult.LIZ = r5.LIZLLL();
                        break;
                    case 6:
                        giftListResult.LIZIZ = r5.LJ();
                        break;
                    default:
                        0SQ.LIZJ(r5);
                        break;
                }
            } else {
                r5.LIZ(LIZ);
                return giftListResult;
            }
        }
    }
}
