         // Warning, number of coefficients is hardcoded.
          asm volatile(
		//"emms\n\t"
		"push %%rbp\n\t"
		"push %%rax\n\t"
                "push %%rdi\n\t"
		"push %%rcx\n\t"

                "movl %%ecx,%%ebp\n\t"
                "bigloop_mmx"FILTMMX_SKIP_ADD_STR":\n\t"

		"pxor %%mm1,%%mm1\n\t"
                "movl $16, %%ecx\n\t"

                "frup_mmx"FILTMMX_SKIP_ADD_STR":\n\t"

		/*
		PMADDWD mm1,mm2/m64           ; 0F F5 /r             [PENT,MMX] 

		dst[0-31]   := (dst[0-15] * src[0-15]) 
                               + (dst[16-31] * src[16-31]); 
		dst[32-63]  := (dst[32-47] * src[32-47]) 
	                               + (dst[48-63] * src[48-63]);

		*/
		"movq (%%rdi), %%mm0\n\t"
		"pmaddwd (%%rsi), %%mm0\n\t"

		"movq 8(%%rdi), %%mm2\n\t"
		"pmaddwd 8(%%rsi), %%mm2\n\t"

                "movq 16(%%rdi), %%mm3\n\t"
		"pmaddwd 16(%%rsi), %%mm3\n\t"

                "movq 24(%%rdi), %%mm4\n\t"
                "pmaddwd 24(%%rsi), %%mm4\n\t"

                "add $32, %%rdi\n\t"
		"add $32, %%rsi\n\t" 
		"paddd %%mm0, %%mm1\n\t"
		"paddd %%mm2, %%mm1\n\t"
		"decl %%ecx\n\t"
		"paddd %%mm3, %%mm1\n\t"
		"paddd %%mm4, %%mm1\n\t"
		"jnz frup_mmx"FILTMMX_SKIP_ADD_STR"\n\t"

                "movd %%mm1, (%%rax)\n\t"
                "sub $512, %%rdi\n\t"
                "sub $512, %%rsi\n\t"

                "add $4, %%rax\n\t"
                "add %%rdx, %%rdi\n\t"
                "decl %%ebp\n\t"
                "jnz bigloop_mmx"FILTMMX_SKIP_ADD_STR"\n\t"

		"pop %%rcx\n\t"
                "pop %%rdi\n\t"
		"pop %%rax\n\t"
		"emms\n\t"

		"convmmx"FILTMMX_SKIP_ADD_STR":\n\t"

		"movl (%%rax), %%ebp\n\t"
		"sarl $15, %%ebp\n\t"
		#ifndef FILTMMX_SKIP_ADD
		"addl $32767, %%ebp\n\t"
		#endif
		"movl %%ebp, (%%rax)\n\t"
		"add $4, %%rax\n\t"
		"decl %%ecx\n\t"
		"jnz convmmx"FILTMMX_SKIP_ADD_STR"\n\t"
		"pop %%rbp\n\t"
          :
          : "D" (in), "S" (ff->coeffs_i16), "a" (flout), "d" (2*ff->mrratio), "c" (bigcount)
          );
