static int cinaudio_decode_frame(AVCodecContext *avctx,

                                 void *data, int *data_size,

                                 AVPacket *avpkt)

{

    const uint8_t *buf = avpkt->data;

    int buf_size = avpkt->size;

    CinAudioContext *cin = avctx->priv_data;

    const uint8_t *src = buf;

    int16_t *samples = data;

    int delta;



    buf_size = FFMIN(buf_size, *data_size/2);



    delta = cin->delta;

    if (cin->initial_decode_frame) {

        cin->initial_decode_frame = 0;

        delta = (int16_t)AV_RL16(src); src += 2;

        *samples++ = delta;

        buf_size -= 2;

    }

    while (buf_size > 0) {

        delta += cinaudio_delta16_table[*src++];

        delta = av_clip_int16(delta);

        *samples++ = delta;

        --buf_size;

    }

    cin->delta = delta;



    *data_size = (uint8_t *)samples - (uint8_t *)data;



    return src - buf;

}

static int cinaudio_decode_frame(AVCodecContext *avctx,

                                 void *data, int *data_size,

                                 AVPacket *avpkt)

{

    const uint8_t *buf = avpkt->data;

    int buf_size = avpkt->size;

    CinAudioContext *cin = avctx->priv_data;

    const uint8_t *src = buf;

    int16_t *samples = data;

    int delta;



    buf_size = FFMIN(buf_size, *data_size/2);



    delta = cin->delta;

    if (cin->initial_decode_frame) {

        cin->initial_decode_frame = 0;

        delta = (int16_t)AV_RL16(src); src += 2;

        *samples++ = delta;

        buf_size -= 2;

    }

    while (buf_size > 0) {

        delta += cinaudio_delta16_table[*src++];

        delta = av_clip_int16(delta);

        *samples++ = delta;

        --buf_size;

    }

    cin->delta = delta;



    *data_size = (uint8_t *)samples - (uint8_t *)data;



    return src - buf;

}

static int FUNC_0(AVCodecContext *VAR_0,

                                 void *VAR_1, int *VAR_2,

                                 AVPacket *VAR_3)

{

    const uint8_t *VAR_4 = VAR_3->VAR_1;

    int VAR_5 = VAR_3->size;

    CinAudioContext *cin = VAR_0->priv_data;

    const uint8_t *VAR_6 = VAR_4;

    int16_t *samples = VAR_1;

    int VAR_7;



    VAR_5 = FFMIN(VAR_5, *VAR_2/2);



    VAR_7 = cin->VAR_7;

    if (cin->initial_decode_frame) {

        cin->initial_decode_frame = 0;

        VAR_7 = (int16_t)AV_RL16(VAR_6); VAR_6 += 2;

        *samples++ = VAR_7;

        VAR_5 -= 2;

    }

    while (VAR_5 > 0) {

        VAR_7 += cinaudio_delta16_table[*VAR_6++];

        VAR_7 = av_clip_int16(VAR_7);

        *samples++ = VAR_7;

        --VAR_5;

    }

    cin->VAR_7 = VAR_7;



    *VAR_2 = (uint8_t *)samples - (uint8_t *)VAR_1;



    return VAR_6 - VAR_4;

}

static int FUNC_0(AVCodecContext *VAR_0,
void *VAR_1, int *VAR_2,
AVPacket *VAR_3)
{ const uint8_t *VAR_4 = VAR_3->VAR_1; int VAR_5 = VAR_3->size; CinAudioContext *cin = VAR_0->priv_data; const uint8_t *VAR_6 = VAR_4; int16_t *samples = VAR_1; int VAR_7; VAR_5 = FFMIN(VAR_5, *VAR_2/2); VAR_7 = cin->VAR_7; if (cin->initial_decode_frame) { cin->initial_decode_frame = 0; VAR_7 = (int16_t)AV_RL16(VAR_6); VAR_6 += 2; *samples++ = VAR_7; VAR_5 -= 2; } while (VAR_5 > 0) { VAR_7 += cinaudio_delta16_table[*VAR_6++]; VAR_7 = av_clip_int16(VAR_7); *samples++ = VAR_7; --VAR_5; } cin->VAR_7 = VAR_7; *VAR_2 = (uint8_t *)samples - (uint8_t *)VAR_1; return VAR_6 - VAR_4; }