/*
 * 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:27:58 CET 2002 */

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



DECLARE_SIMD_CONST2 (PK1_000000000NK1_000000000, +1.0000000000000000000000000,
		     -1.0000000000000000000000000);
DECLARE_SIMD_CONST2 (PK500000000PK500000000, +0.5000000000000000000000000,
		     +0.5000000000000000000000000);
DECLARE_SIMD_CONST2 (PK866025403PK866025403, +0.8660254037844386467637232,
		     +0.8660254037844386467637232);

void
fftwi_twiddle_6 (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 += 5)
       {
	    DECLARE_SIMD_TMPVAR2 (t1089);
	    DECLARE_SIMD_TMPVAR2 (t1114);
	    DECLARE_SIMD_TMPVAR2 (t1088);
	    DECLARE_SIMD_TMPVAR2 (t1086);
	    DECLARE_SIMD_TMPVAR2 (t1112);
	    DECLARE_SIMD_TMPVAR2 (t1092);
	    DECLARE_SIMD_TMPVAR2 (t1091);
	    DECLARE_SIMD_TMPVAR2 (t1090);
	    DECLARE_SIMD_TMPVAR2 (t1087);
	    DECLARE_SIMD_TMPVAR2 (t1111);
	    DECLARE_SIMD_TMPVAR2 (t1141);
	    DECLARE_SIMD_TMPVAR2 (t1140);
	    DECLARE_SIMD_TMPVAR2 (t1050);
	    DECLARE_SIMD_TMPVAR2 (t1145);
	    DECLARE_SIMD_TMPVAR2 (t1144);
	    DECLARE_SIMD_TMPVAR2 (t1094);
	    DECLARE_SIMD_TMPVAR2 (t1045);
	    DECLARE_SIMD_TMPVAR2 (t1046);
	    DECLARE_SIMD_TMPVAR2 (t1044);
	    DECLARE_SIMD_TMPVAR2 (t1042);
	    DECLARE_SIMD_TMPVAR2 (t1043);
	    DECLARE_SIMD_TMPVAR2 (t1137);
	    DECLARE_SIMD_TMPVAR2 (t1136);
	    DECLARE_SIMD_TMPVAR2 (t1032);
	    DECLARE_SIMD_TMPVAR2 (t1068);
	    DECLARE_SIMD_TMPVAR2 (t1104);
	    DECLARE_SIMD_TMPVAR2 (t1067);
	    DECLARE_SIMD_TMPVAR2 (t1065);
	    DECLARE_SIMD_TMPVAR2 (t1102);
	    DECLARE_SIMD_TMPVAR2 (t1071);
	    DECLARE_SIMD_TMPVAR2 (t1070);
	    DECLARE_SIMD_TMPVAR2 (t1069);
	    DECLARE_SIMD_TMPVAR2 (t1066);
	    DECLARE_SIMD_TMPVAR2 (t1101);
	    DECLARE_SIMD_TMPVAR2 (t1139);
	    DECLARE_SIMD_TMPVAR2 (t1138);
	    DECLARE_SIMD_TMPVAR2 (t1049);
	    DECLARE_SIMD_TMPVAR2 (t1143);
	    DECLARE_SIMD_TMPVAR2 (t1142);
	    DECLARE_SIMD_TMPVAR2 (t1093);
	    DECLARE_SIMD_TMPVAR2 (t1031);
	    DECLARE_SIMD_TMPVAR2 (t1116);
	    DECLARE_SIMD_TMPVAR2 (t1029);
	    DECLARE_SIMD_TMPVAR2 (t1118);
	    DECLARE_SIMD_TMPVAR2 (t1047);
	    DECLARE_SIMD_TMPVAR2 (t1119);
	    DECLARE_SIMD_TMPVAR2 (t1048);
	    DECLARE_SIMD_TMPVAR2 (t1117);
	    DECLARE_SIMD_TMPVAR2 (t1134);
	    DECLARE_SIMD_TMPVAR2 (t1129);
	    DECLARE_SIMD_TMPVAR2 (t1115);
	    DECLARE_SIMD_TMPVAR2 (t1132);
	    DECLARE_SIMD_TMPVAR2 (t1128);
	    DECLARE_SIMD_TMPVAR2 (t1135);
	    DECLARE_SIMD_TMPVAR2 (t1030);
	    DECLARE_SIMD_TMPVAR2 (t1126);
	    DECLARE_SIMD_TMPVAR2 (t1121);
	    DECLARE_SIMD_TMPVAR2 (t1028);
	    DECLARE_SIMD_TMPVAR2 (t1124);
	    DECLARE_SIMD_TMPVAR2 (t1120);
	    DECLARE_SIMD_TMPVAR2 (t1127);

	    simd_ld2 (inout[iostride * 5], t1089);
	    simd_swap2 (t1089, t1114);
	    simd_ld2 (W[4], t1088);
	    simd_mul2 (t1088, t1089, t1086);
	    simd_mul2 (t1088, t1114, t1112);
	    simd_ld2 (inout[iostride], t1092);
	    simd_swap2 (t1092, t1091);
	    simd_ld2 (W[0], t1090);
	    simd_mul2 (t1090, t1091, t1087);
	    simd_mul2 (t1090, t1092, t1111);
	    simd_unpckL2 (t1086, t1087, t1141);
	    simd_unpckH2 (t1086, t1087, t1140);
	    simd_fmca2 (PK1_000000000NK1_000000000, t1140, t1141, t1050);
	    simd_unpckL2 (t1111, t1112, t1145);
	    simd_unpckH2 (t1111, t1112, t1144);
	    simd_fmca2 (PK1_000000000NK1_000000000, t1144, t1145, t1094);
	    simd_ld2 (inout[iostride * 3], t1045);
	    simd_swap2 (t1045, t1046);
	    simd_ld2 (W[2], t1044);
	    simd_mul2 (t1044, t1045, t1042);
	    simd_mul2 (t1044, t1046, t1043);
	    simd_unpckL2 (t1042, t1043, t1137);
	    simd_unpckH2 (t1042, t1043, t1136);
	    simd_fmca2 (PK1_000000000NK1_000000000, t1136, t1137, t1032);
	    simd_ld2 (inout[iostride * 2], t1068);
	    simd_swap2 (t1068, t1104);
	    simd_ld2 (W[1], t1067);
	    simd_mul2 (t1067, t1068, t1065);
	    simd_mul2 (t1067, t1104, t1102);
	    simd_ld2 (inout[iostride * 4], t1071);
	    simd_swap2 (t1071, t1070);
	    simd_ld2 (W[3], t1069);
	    simd_mul2 (t1069, t1070, t1066);
	    simd_mul2 (t1069, t1071, t1101);
	    simd_unpckL2 (t1065, t1066, t1139);
	    simd_unpckH2 (t1065, t1066, t1138);
	    simd_fmca2 (PK1_000000000NK1_000000000, t1138, t1139, t1049);
	    simd_unpckL2 (t1101, t1102, t1143);
	    simd_unpckH2 (t1101, t1102, t1142);
	    simd_fmca2 (PK1_000000000NK1_000000000, t1142, t1143, t1093);
	    simd_ld2 (inout[0], t1031);
	    simd_add2 (t1031, t1032, t1116);
	    simd_sub2 (t1031, t1032, t1029);
	    simd_add2 (t1049, t1050, t1118);
	    simd_sub2 (t1049, t1050, t1047);
	    simd_add2 (t1093, t1094, t1119);
	    simd_sub2 (t1093, t1094, t1048);
	    simd_add2 (t1118, t1119, t1117);
	    simd_sub2 (t1118, t1119, t1134);
	    simd_fnmca2 (PK500000000PK500000000, t1117, t1116, t1129);
	    simd_add2 (t1116, t1117, t1115);
	    simd_st2 (t1115, inout[0]);
	    simd_swap2 (t1134, t1132);
	    simd_fnmca2 (PK866025403PK866025403, t1132, t1129, t1128);
	    simd_fmca2 (PK866025403PK866025403, t1132, t1129, t1135);
	    simd_st2 (t1128, inout[iostride * 2]);
	    simd_st2 (t1135, inout[iostride * 4]);
	    simd_add2 (t1047, t1048, t1030);
	    simd_sub2 (t1047, t1048, t1126);
	    simd_fnmca2 (PK500000000PK500000000, t1030, t1029, t1121);
	    simd_add2 (t1029, t1030, t1028);
	    simd_st2 (t1028, inout[iostride * 3]);
	    simd_swap2 (t1126, t1124);
	    simd_fnmca2 (PK866025403PK866025403, t1124, t1121, t1120);
	    simd_fmca2 (PK866025403PK866025403, t1124, t1121, t1127);
	    simd_st2 (t1120, inout[iostride * 5]);
	    simd_st2 (t1127, inout[iostride]);
       }
}


static const int twiddle_order[] = { 1, 2, 3, 4, 5 };

fftw_codelet_desc fftwi_twiddle_6_desc = {
     "fftwi_twiddle_6",
     (void (*)()) fftwi_twiddle_6,
     6,
     FFTW_BACKWARD,
     FFTW_TWIDDLE,
     143,
     5,
     twiddle_order,
};
