static void get_pixels_altivec(int16_t *restrict block, const uint8_t *pixels,

                               ptrdiff_t line_size)

{

    int i;

    vec_u8 perm = vec_lvsl(0, pixels);

    const vec_u8 zero = (const vec_u8)vec_splat_u8(0);



    for (i = 0; i < 8; i++) {

        /* Read potentially unaligned pixels.

         * We're reading 16 pixels, and actually only want 8,

         * but we simply ignore the extras. */

        vec_u8 pixl = vec_ld(0, pixels);

        vec_u8 pixr = vec_ld(7, pixels);

        vec_u8 bytes = vec_perm(pixl, pixr, perm);



        // Convert the bytes into shorts.

        vec_s16 shorts = (vec_s16)vec_mergeh(zero, bytes);



        // Save the data to the block, we assume the block is 16-byte aligned.

        vec_st(shorts, i * 16, (vec_s16 *)block);



        pixels += line_size;

    }

}

static void get_pixels_altivec(int16_t *restrict block, const uint8_t *pixels,

                               ptrdiff_t line_size)

{

    int i;

    vec_u8 perm = vec_lvsl(0, pixels);

    const vec_u8 zero = (const vec_u8)vec_splat_u8(0);



    for (i = 0; i < 8; i++) {

        





        vec_u8 pixl = vec_ld(0, pixels);

        vec_u8 pixr = vec_ld(7, pixels);

        vec_u8 bytes = vec_perm(pixl, pixr, perm);



        

        vec_s16 shorts = (vec_s16)vec_mergeh(zero, bytes);



        

        vec_st(shorts, i * 16, (vec_s16 *)block);



        pixels += line_size;

    }

}

    vec_u8 perm = vec_lvsl(0, pixels);
static void FUNC_0(int16_t *restrict VAR_0, const uint8_t *VAR_1,

                               ptrdiff_t VAR_2)

{

    int VAR_3;

    vec_u8 perm = vec_lvsl(0, VAR_1);

    const vec_u8 VAR_4 = (const vec_u8)vec_splat_u8(0);



    for (VAR_3 = 0; VAR_3 < 8; VAR_3++) {

        





        vec_u8 pixl = vec_ld(0, VAR_1);

        vec_u8 pixr = vec_ld(7, VAR_1);

        vec_u8 bytes = vec_perm(pixl, pixr, perm);



        

        vec_s16 shorts = (vec_s16)vec_mergeh(VAR_4, bytes);



        

        vec_st(shorts, VAR_3 * 16, (vec_s16 *)VAR_0);



        VAR_1 += VAR_2;

    }

}

static void FUNC_0(int16_t *restrict VAR_0, const uint8_t *VAR_1,
ptrdiff_t VAR_2)
{ int VAR_3; vec_u8 perm = vec_lvsl(0, VAR_1); const vec_u8 VAR_4 = (const vec_u8)vec_splat_u8(0); for (VAR_3 = 0; VAR_3 < 8; VAR_3++) { vec_u8 pixl = vec_ld(0, VAR_1); vec_u8 pixr = vec_ld(7, VAR_1); vec_u8 bytes = vec_perm(pixl, pixr, perm); vec_s16 shorts = (vec_s16)vec_mergeh(VAR_4, bytes); vec_st(shorts, VAR_3 * 16, (vec_s16 *)VAR_0); VAR_1 += VAR_2; } }