/*
 * Copyright (c) 1997-1999 Massachusetts Institute of Technology
 * Copyright (c) 2000-2002 Stefan Kral
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 */

/* This file was automatically generated --- DO NOT EDIT */
/* Generated on Tue Feb 19 15:11:14 CET 2002 */

#include <fftw-int.h>
#include <fftw.h>



DECLARE_SIMD_CONST2 (PK1_000000000NK1_000000000, +1.0000000000000000000000000,
		     -1.0000000000000000000000000);

void
fftw_twiddle_2 (fftw_complex * ioC, const fftw_complex * twC, int iostride,
		int m, int dist)
{
     fftw_simd2 *inout = (fftw_simd2 *) ioC;
     const fftw_simd2 *W = (const fftw_simd2 *) twC;

     for (; m > 0; m--, inout += dist, W += 1)
       {
	    DECLARE_SIMD_TMPVAR2 (t1027);
	    DECLARE_SIMD_TMPVAR2 (t1028);
	    DECLARE_SIMD_TMPVAR2 (t1026);
	    DECLARE_SIMD_TMPVAR2 (t1024);
	    DECLARE_SIMD_TMPVAR2 (t1025);
	    DECLARE_SIMD_TMPVAR2 (t1031);
	    DECLARE_SIMD_TMPVAR2 (t1030);
	    DECLARE_SIMD_TMPVAR2 (t1014);
	    DECLARE_SIMD_TMPVAR2 (t1013);
	    DECLARE_SIMD_TMPVAR2 (t1029);
	    DECLARE_SIMD_TMPVAR2 (t1012);

	    simd_ld2 (inout[iostride], t1027);
	    simd_swap2 (t1027, t1028);
	    simd_ld2 (W[0], t1026);
	    simd_mul2 (t1026, t1027, t1024);
	    simd_mul2 (t1026, t1028, t1025);
	    simd_unpckL2 (t1024, t1025, t1031);
	    simd_unpckH2 (t1024, t1025, t1030);
	    simd_fnmca2 (PK1_000000000NK1_000000000, t1030, t1031, t1014);
	    simd_ld2 (inout[0], t1013);
	    simd_add2 (t1013, t1014, t1029);
	    simd_sub2 (t1013, t1014, t1012);
	    simd_st2 (t1029, inout[0]);
	    simd_st2 (t1012, inout[iostride]);
       }
}


static const int twiddle_order[] = { 1 };

fftw_codelet_desc fftw_twiddle_2_desc = {
     "fftw_twiddle_2",
     (void (*)()) fftw_twiddle_2,
     2,
     FFTW_FORWARD,
     FFTW_TWIDDLE,
     44,
     1,
     twiddle_order,
};
