static inline int GET_TOK(TM2Context *ctx,int type) {

    if(ctx->tok_ptrs[type] >= ctx->tok_lens[type]) {

        av_log(ctx->avctx, AV_LOG_ERROR, "Read token from stream %i out of bounds (%i>=%i)\n", type, ctx->tok_ptrs[type], ctx->tok_lens[type]);

        return 0;

    }

    if(type <= TM2_MOT)

        return ctx->deltas[type][ctx->tokens[type][ctx->tok_ptrs[type]++]];

    return ctx->tokens[type][ctx->tok_ptrs[type]++];

}

static inline int GET_TOK(TM2Context *ctx,int type) {

    if(ctx->tok_ptrs[type] >= ctx->tok_lens[type]) {

        av_log(ctx->avctx, AV_LOG_ERROR, "Read token from stream %i out of bounds (%i>=%i)\n", type, ctx->tok_ptrs[type], ctx->tok_lens[type]);

        return 0;

    }

    if(type <= TM2_MOT)

        return ctx->deltas[type][ctx->tokens[type][ctx->tok_ptrs[type]++]];

    return ctx->tokens[type][ctx->tok_ptrs[type]++];

}

    if(type <= TM2_MOT)
static inline int FUNC_0(TM2Context *VAR_0,int VAR_1) {

    if(VAR_0->tok_ptrs[VAR_1] >= VAR_0->tok_lens[VAR_1]) {

        av_log(VAR_0->avctx, AV_LOG_ERROR, "Read token from stream %i out of bounds (%i>=%i)\n", VAR_1, VAR_0->tok_ptrs[VAR_1], VAR_0->tok_lens[VAR_1]);

        return 0;

    }

    if(VAR_1 <= TM2_MOT)

        return VAR_0->deltas[VAR_1][VAR_0->tokens[VAR_1][VAR_0->tok_ptrs[VAR_1]++]];

    return VAR_0->tokens[VAR_1][VAR_0->tok_ptrs[VAR_1]++];

}

static inline int FUNC_0(TM2Context *VAR_0,int VAR_1) { if(VAR_0->tok_ptrs[VAR_1] >= VAR_0->tok_lens[VAR_1]) { av_log(VAR_0->avctx, AV_LOG_ERROR, "Read token from stream %i out of bounds (%i>=%i)\n", VAR_1, VAR_0->tok_ptrs[VAR_1], VAR_0->tok_lens[VAR_1]); return 0; } if(VAR_1 <= TM2_MOT)
return VAR_0->deltas[VAR_1][VAR_0->tokens[VAR_1][VAR_0->tok_ptrs[VAR_1]++]]; return VAR_0->tokens[VAR_1][VAR_0->tok_ptrs[VAR_1]++]; }