static inline void h264_deblock_q1(register vector unsigned char p0,

                                                   register vector unsigned char p1,

                                                   register vector unsigned char p2,

                                                   register vector unsigned char q0,

                                                   register vector unsigned char tc0) {



    register vector unsigned char average = vec_avg(p0, q0);

    register vector unsigned char temp;

    register vector unsigned char uncliped;

    register vector unsigned char ones;

    register vector unsigned char max;

    register vector unsigned char min;



    temp = vec_xor(average, p2);

    average = vec_avg(average, p2);     /*avg(p2, avg(p0, q0)) */

    ones = vec_splat_u8(1);

    temp = vec_and(temp, ones);         /*(p2^avg(p0, q0)) & 1 */

    uncliped = vec_subs(average, temp); /*(p2+((p0+q0+1)>>1))>>1 */

    max = vec_adds(p1, tc0);

    min = vec_subs(p1, tc0);

    p1 = vec_max(min, uncliped);

    p1 = vec_min(max, p1);

}

static inline void h264_deblock_q1(register vector unsigned char p0,

                                                   register vector unsigned char p1,

                                                   register vector unsigned char p2,

                                                   register vector unsigned char q0,

                                                   register vector unsigned char tc0) {



    register vector unsigned char average = vec_avg(p0, q0);

    register vector unsigned char temp;

    register vector unsigned char uncliped;

    register vector unsigned char ones;

    register vector unsigned char max;

    register vector unsigned char min;



    temp = vec_xor(average, p2);

    average = vec_avg(average, p2);     

    ones = vec_splat_u8(1);

    temp = vec_and(temp, ones);         

    uncliped = vec_subs(average, temp); 

    max = vec_adds(p1, tc0);

    min = vec_subs(p1, tc0);

    p1 = vec_max(min, uncliped);

    p1 = vec_min(max, p1);

}

static inline void FUNC_0(register vector unsigned char VAR_0,

                                                   register vector unsigned char VAR_1,

                                                   register vector unsigned char VAR_2,

                                                   register vector unsigned char VAR_3,

                                                   register vector unsigned char VAR_4) {



    register vector unsigned char VAR_5 = vec_avg(VAR_0, VAR_3);

    register vector unsigned char VAR_6;

    register vector unsigned char VAR_7;

    register vector unsigned char VAR_8;

    register vector unsigned char VAR_9;

    register vector unsigned char VAR_10;



    VAR_6 = vec_xor(VAR_5, VAR_2);

    VAR_5 = vec_avg(VAR_5, VAR_2);     

    VAR_8 = vec_splat_u8(1);

    VAR_6 = vec_and(VAR_6, VAR_8);         

    VAR_7 = vec_subs(VAR_5, VAR_6); 

    VAR_9 = vec_adds(VAR_1, VAR_4);

    VAR_10 = vec_subs(VAR_1, VAR_4);

    VAR_1 = vec_max(VAR_10, VAR_7);

    VAR_1 = vec_min(VAR_9, VAR_1);

}

static inline void FUNC_0(register vector unsigned char VAR_0,
register vector unsigned char VAR_1,
register vector unsigned char VAR_2,
register vector unsigned char VAR_3,
register vector unsigned char VAR_4) { register vector unsigned char VAR_5 = vec_avg(VAR_0, VAR_3); register vector unsigned char VAR_6; register vector unsigned char VAR_7; register vector unsigned char VAR_8; register vector unsigned char VAR_9; register vector unsigned char VAR_10; VAR_6 = vec_xor(VAR_5, VAR_2); VAR_5 = vec_avg(VAR_5, VAR_2); VAR_8 = vec_splat_u8(1); VAR_6 = vec_and(VAR_6, VAR_8); VAR_7 = vec_subs(VAR_5, VAR_6); VAR_9 = vec_adds(VAR_1, VAR_4); VAR_10 = vec_subs(VAR_1, VAR_4); VAR_1 = vec_max(VAR_10, VAR_7); VAR_1 = vec_min(VAR_9, VAR_1); }