mm_end = (uint8_t*)((((unsigned long)end)/(MMREG_SIZE*2))*(MMREG_SIZE*2));
mm_end = end - 15;
static inline void RENAME(rgb32to15)(const uint8_t *src, uint8_t *dst, unsigned src_size){#ifdef HAVE_MMX	const uint8_t *s = src;	const uint8_t *end,*mm_end;	uint16_t *d = (uint16_t *)dst;	end = s + src_size;	mm_end = (uint8_t*)((((unsigned long)end)/(MMREG_SIZE*2))*(MMREG_SIZE*2));	__asm __volatile(PREFETCH"	%0"::"m"(*src):"memory");	__asm __volatile(	    "movq	%0, %%mm7\n\t"	    "movq	%1, %%mm6\n\t"	    ::"m"(red_15mask),"m"(green_15mask));	while(s < mm_end)	{	    __asm __volatile(		PREFETCH" 32%1\n\t"		"movd	%1, %%mm0\n\t"		"movd	4%1, %%mm3\n\t"		"punpckldq 8%1, %%mm0\n\t"		"punpckldq 12%1, %%mm3\n\t"		"movq	%%mm0, %%mm1\n\t"		"movq	%%mm0, %%mm2\n\t"		"movq	%%mm3, %%mm4\n\t"		"movq	%%mm3, %%mm5\n\t"		"psrlq	$3, %%mm0\n\t"		"psrlq	$3, %%mm3\n\t"		"pand	%2, %%mm0\n\t"		"pand	%2, %%mm3\n\t"		"psrlq	$6, %%mm1\n\t"		"psrlq	$6, %%mm4\n\t"		"pand	%%mm6, %%mm1\n\t"		"pand	%%mm6, %%mm4\n\t"		"psrlq	$9, %%mm2\n\t"		"psrlq	$9, %%mm5\n\t"		"pand	%%mm7, %%mm2\n\t"		"pand	%%mm7, %%mm5\n\t"		"por	%%mm1, %%mm0\n\t"		"por	%%mm4, %%mm3\n\t"		"por	%%mm2, %%mm0\n\t"		"por	%%mm5, %%mm3\n\t"		"psllq	$16, %%mm3\n\t"		"por	%%mm3, %%mm0\n\t"		MOVNTQ"	%%mm0, %0\n\t"		:"=m"(*d):"m"(*s),"m"(blue_15mask):"memory");		d += 4;		s += 16;	}	while(s < end)	{		const int b= *s++;		const int g= *s++;		const int r= *s++;		*d++ = (b>>3) | ((g&0xF8)<<2) | ((r&0xF8)<<7);	}	__asm __volatile(SFENCE:::"memory");	__asm __volatile(EMMS:::"memory");#else	unsigned j,i,num_pixels=src_size/4;	uint16_t *d = (uint16_t *)dst;	for(i=0,j=0; j<num_pixels; i+=4,j++)	{		const int b= src[i+0];		const int g= src[i+1];		const int r= src[i+2];		d[j]= (b>>3) | ((g&0xF8)<<2) | ((r&0xF8)<<7);	}#endif}