/*
 * 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:15 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
fftw_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 (t1031);
	    DECLARE_SIMD_TMPVAR2 (t1032);
	    DECLARE_SIMD_TMPVAR2 (t1030);
	    DECLARE_SIMD_TMPVAR2 (t1028);
	    DECLARE_SIMD_TMPVAR2 (t1029);
	    DECLARE_SIMD_TMPVAR2 (t1119);
	    DECLARE_SIMD_TMPVAR2 (t1118);
	    DECLARE_SIMD_TMPVAR2 (t1018);
	    DECLARE_SIMD_TMPVAR2 (t1093);
	    DECLARE_SIMD_TMPVAR2 (t1094);
	    DECLARE_SIMD_TMPVAR2 (t1092);
	    DECLARE_SIMD_TMPVAR2 (t1090);
	    DECLARE_SIMD_TMPVAR2 (t1091);
	    DECLARE_SIMD_TMPVAR2 (t1127);
	    DECLARE_SIMD_TMPVAR2 (t1126);
	    DECLARE_SIMD_TMPVAR2 (t1066);
	    DECLARE_SIMD_TMPVAR2 (t1079);
	    DECLARE_SIMD_TMPVAR2 (t1080);
	    DECLARE_SIMD_TMPVAR2 (t1078);
	    DECLARE_SIMD_TMPVAR2 (t1076);
	    DECLARE_SIMD_TMPVAR2 (t1077);
	    DECLARE_SIMD_TMPVAR2 (t1125);
	    DECLARE_SIMD_TMPVAR2 (t1124);
	    DECLARE_SIMD_TMPVAR2 (t1065);
	    DECLARE_SIMD_TMPVAR2 (t1063);
	    DECLARE_SIMD_TMPVAR2 (t1064);
	    DECLARE_SIMD_TMPVAR2 (t1062);
	    DECLARE_SIMD_TMPVAR2 (t1060);
	    DECLARE_SIMD_TMPVAR2 (t1061);
	    DECLARE_SIMD_TMPVAR2 (t1123);
	    DECLARE_SIMD_TMPVAR2 (t1122);
	    DECLARE_SIMD_TMPVAR2 (t1036);
	    DECLARE_SIMD_TMPVAR2 (t1049);
	    DECLARE_SIMD_TMPVAR2 (t1050);
	    DECLARE_SIMD_TMPVAR2 (t1048);
	    DECLARE_SIMD_TMPVAR2 (t1046);
	    DECLARE_SIMD_TMPVAR2 (t1047);
	    DECLARE_SIMD_TMPVAR2 (t1121);
	    DECLARE_SIMD_TMPVAR2 (t1120);
	    DECLARE_SIMD_TMPVAR2 (t1035);
	    DECLARE_SIMD_TMPVAR2 (t1017);
	    DECLARE_SIMD_TMPVAR2 (t1096);
	    DECLARE_SIMD_TMPVAR2 (t1015);
	    DECLARE_SIMD_TMPVAR2 (t1098);
	    DECLARE_SIMD_TMPVAR2 (t1033);
	    DECLARE_SIMD_TMPVAR2 (t1099);
	    DECLARE_SIMD_TMPVAR2 (t1034);
	    DECLARE_SIMD_TMPVAR2 (t1097);
	    DECLARE_SIMD_TMPVAR2 (t1115);
	    DECLARE_SIMD_TMPVAR2 (t1110);
	    DECLARE_SIMD_TMPVAR2 (t1095);
	    DECLARE_SIMD_TMPVAR2 (t1116);
	    DECLARE_SIMD_TMPVAR2 (t1109);
	    DECLARE_SIMD_TMPVAR2 (t1117);
	    DECLARE_SIMD_TMPVAR2 (t1016);
	    DECLARE_SIMD_TMPVAR2 (t1106);
	    DECLARE_SIMD_TMPVAR2 (t1101);
	    DECLARE_SIMD_TMPVAR2 (t1014);
	    DECLARE_SIMD_TMPVAR2 (t1107);
	    DECLARE_SIMD_TMPVAR2 (t1100);
	    DECLARE_SIMD_TMPVAR2 (t1108);

	    simd_ld2 (inout[iostride * 3], t1031);
	    simd_swap2 (t1031, t1032);
	    simd_ld2 (W[2], t1030);
	    simd_mul2 (t1030, t1031, t1028);
	    simd_mul2 (t1030, t1032, t1029);
	    simd_unpckL2 (t1028, t1029, t1119);
	    simd_unpckH2 (t1028, t1029, t1118);
	    simd_fnmca2 (PK1_000000000NK1_000000000, t1118, t1119, t1018);
	    simd_ld2 (inout[iostride], t1093);
	    simd_swap2 (t1093, t1094);
	    simd_ld2 (W[0], t1092);
	    simd_mul2 (t1092, t1093, t1090);
	    simd_mul2 (t1092, t1094, t1091);
	    simd_unpckL2 (t1090, t1091, t1127);
	    simd_unpckH2 (t1090, t1091, t1126);
	    simd_fnmca2 (PK1_000000000NK1_000000000, t1126, t1127, t1066);
	    simd_ld2 (inout[iostride * 4], t1079);
	    simd_swap2 (t1079, t1080);
	    simd_ld2 (W[3], t1078);
	    simd_mul2 (t1078, t1079, t1076);
	    simd_mul2 (t1078, t1080, t1077);
	    simd_unpckL2 (t1076, t1077, t1125);
	    simd_unpckH2 (t1076, t1077, t1124);
	    simd_fnmca2 (PK1_000000000NK1_000000000, t1124, t1125, t1065);
	    simd_ld2 (inout[iostride * 5], t1063);
	    simd_swap2 (t1063, t1064);
	    simd_ld2 (W[4], t1062);
	    simd_mul2 (t1062, t1063, t1060);
	    simd_mul2 (t1062, t1064, t1061);
	    simd_unpckL2 (t1060, t1061, t1123);
	    simd_unpckH2 (t1060, t1061, t1122);
	    simd_fnmca2 (PK1_000000000NK1_000000000, t1122, t1123, t1036);
	    simd_ld2 (inout[iostride * 2], t1049);
	    simd_swap2 (t1049, t1050);
	    simd_ld2 (W[1], t1048);
	    simd_mul2 (t1048, t1049, t1046);
	    simd_mul2 (t1048, t1050, t1047);
	    simd_unpckL2 (t1046, t1047, t1121);
	    simd_unpckH2 (t1046, t1047, t1120);
	    simd_fnmca2 (PK1_000000000NK1_000000000, t1120, t1121, t1035);
	    simd_ld2 (inout[0], t1017);
	    simd_add2 (t1017, t1018, t1096);
	    simd_sub2 (t1017, t1018, t1015);
	    simd_add2 (t1035, t1036, t1098);
	    simd_sub2 (t1035, t1036, t1033);
	    simd_add2 (t1065, t1066, t1099);
	    simd_sub2 (t1065, t1066, t1034);
	    simd_add2 (t1098, t1099, t1097);
	    simd_sub2 (t1098, t1099, t1115);
	    simd_fnmca2 (PK500000000PK500000000, t1097, t1096, t1110);
	    simd_add2 (t1096, t1097, t1095);
	    simd_st2 (t1095, inout[0]);
	    simd_swapchsH2 (t1115, t1116);
	    simd_fnmca2 (PK866025403PK866025403, t1116, t1110, t1109);
	    simd_fmca2 (PK866025403PK866025403, t1116, t1110, t1117);
	    simd_st2 (t1109, inout[iostride * 2]);
	    simd_st2 (t1117, inout[iostride * 4]);
	    simd_add2 (t1033, t1034, t1016);
	    simd_sub2 (t1033, t1034, t1106);
	    simd_fnmca2 (PK500000000PK500000000, t1016, t1015, t1101);
	    simd_add2 (t1015, t1016, t1014);
	    simd_st2 (t1014, inout[iostride * 3]);
	    simd_swapchsH2 (t1106, t1107);
	    simd_fnmca2 (PK866025403PK866025403, t1107, t1101, t1100);
	    simd_fmca2 (PK866025403PK866025403, t1107, t1101, t1108);
	    simd_st2 (t1100, inout[iostride * 5]);
	    simd_st2 (t1108, inout[iostride]);
       }
}


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

fftw_codelet_desc fftw_twiddle_6_desc = {
     "fftw_twiddle_6",
     (void (*)()) fftw_twiddle_6,
     6,
     FFTW_FORWARD,
     FFTW_TWIDDLE,
     132,
     5,
     twiddle_order,
};
