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

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



DECLARE_SIMD_CONST2 (PK1_000000000NK1_000000000, +1.0000000000000000000000000,
		     -1.0000000000000000000000000);
DECLARE_SIMD_CONST2 (PK707106781PK707106781, +0.7071067811865475244008444,
		     +0.7071067811865475244008444);

void
fftw_twiddle_8 (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 += 7)
       {
	    DECLARE_SIMD_TMPVAR2 (t1035);
	    DECLARE_SIMD_TMPVAR2 (t1036);
	    DECLARE_SIMD_TMPVAR2 (t1034);
	    DECLARE_SIMD_TMPVAR2 (t1032);
	    DECLARE_SIMD_TMPVAR2 (t1033);
	    DECLARE_SIMD_TMPVAR2 (t1165);
	    DECLARE_SIMD_TMPVAR2 (t1164);
	    DECLARE_SIMD_TMPVAR2 (t1022);
	    DECLARE_SIMD_TMPVAR2 (t1113);
	    DECLARE_SIMD_TMPVAR2 (t1114);
	    DECLARE_SIMD_TMPVAR2 (t1112);
	    DECLARE_SIMD_TMPVAR2 (t1110);
	    DECLARE_SIMD_TMPVAR2 (t1111);
	    DECLARE_SIMD_TMPVAR2 (t1127);
	    DECLARE_SIMD_TMPVAR2 (t1128);
	    DECLARE_SIMD_TMPVAR2 (t1126);
	    DECLARE_SIMD_TMPVAR2 (t1124);
	    DECLARE_SIMD_TMPVAR2 (t1125);
	    DECLARE_SIMD_TMPVAR2 (t1175);
	    DECLARE_SIMD_TMPVAR2 (t1174);
	    DECLARE_SIMD_TMPVAR2 (t1099);
	    DECLARE_SIMD_TMPVAR2 (t1177);
	    DECLARE_SIMD_TMPVAR2 (t1176);
	    DECLARE_SIMD_TMPVAR2 (t1100);
	    DECLARE_SIMD_TMPVAR2 (t1144);
	    DECLARE_SIMD_TMPVAR2 (t1068);
	    DECLARE_SIMD_TMPVAR2 (t1051);
	    DECLARE_SIMD_TMPVAR2 (t1052);
	    DECLARE_SIMD_TMPVAR2 (t1050);
	    DECLARE_SIMD_TMPVAR2 (t1048);
	    DECLARE_SIMD_TMPVAR2 (t1049);
	    DECLARE_SIMD_TMPVAR2 (t1167);
	    DECLARE_SIMD_TMPVAR2 (t1166);
	    DECLARE_SIMD_TMPVAR2 (t1037);
	    DECLARE_SIMD_TMPVAR2 (t1065);
	    DECLARE_SIMD_TMPVAR2 (t1066);
	    DECLARE_SIMD_TMPVAR2 (t1064);
	    DECLARE_SIMD_TMPVAR2 (t1062);
	    DECLARE_SIMD_TMPVAR2 (t1063);
	    DECLARE_SIMD_TMPVAR2 (t1169);
	    DECLARE_SIMD_TMPVAR2 (t1168);
	    DECLARE_SIMD_TMPVAR2 (t1038);
	    DECLARE_SIMD_TMPVAR2 (t1083);
	    DECLARE_SIMD_TMPVAR2 (t1084);
	    DECLARE_SIMD_TMPVAR2 (t1082);
	    DECLARE_SIMD_TMPVAR2 (t1080);
	    DECLARE_SIMD_TMPVAR2 (t1081);
	    DECLARE_SIMD_TMPVAR2 (t1097);
	    DECLARE_SIMD_TMPVAR2 (t1098);
	    DECLARE_SIMD_TMPVAR2 (t1096);
	    DECLARE_SIMD_TMPVAR2 (t1094);
	    DECLARE_SIMD_TMPVAR2 (t1095);
	    DECLARE_SIMD_TMPVAR2 (t1171);
	    DECLARE_SIMD_TMPVAR2 (t1170);
	    DECLARE_SIMD_TMPVAR2 (t1069);
	    DECLARE_SIMD_TMPVAR2 (t1173);
	    DECLARE_SIMD_TMPVAR2 (t1172);
	    DECLARE_SIMD_TMPVAR2 (t1070);
	    DECLARE_SIMD_TMPVAR2 (t1141);
	    DECLARE_SIMD_TMPVAR2 (t1067);
	    DECLARE_SIMD_TMPVAR2 (t1021);
	    DECLARE_SIMD_TMPVAR2 (t1019);
	    DECLARE_SIMD_TMPVAR2 (t1133);
	    DECLARE_SIMD_TMPVAR2 (t1020);
	    DECLARE_SIMD_TMPVAR2 (t1137);
	    DECLARE_SIMD_TMPVAR2 (t1017);
	    DECLARE_SIMD_TMPVAR2 (t1158);
	    DECLARE_SIMD_TMPVAR2 (t1161);
	    DECLARE_SIMD_TMPVAR2 (t1018);
	    DECLARE_SIMD_TMPVAR2 (t1129);
	    DECLARE_SIMD_TMPVAR2 (t1016);
	    DECLARE_SIMD_TMPVAR2 (t1162);
	    DECLARE_SIMD_TMPVAR2 (t1163);
	    DECLARE_SIMD_TMPVAR2 (t1157);
	    DECLARE_SIMD_TMPVAR2 (t1142);
	    DECLARE_SIMD_TMPVAR2 (t1139);
	    DECLARE_SIMD_TMPVAR2 (t1145);
	    DECLARE_SIMD_TMPVAR2 (t1140);
	    DECLARE_SIMD_TMPVAR2 (t1138);
	    DECLARE_SIMD_TMPVAR2 (t1154);
	    DECLARE_SIMD_TMPVAR2 (t1134);
	    DECLARE_SIMD_TMPVAR2 (t1131);
	    DECLARE_SIMD_TMPVAR2 (t1149);
	    DECLARE_SIMD_TMPVAR2 (t1147);
	    DECLARE_SIMD_TMPVAR2 (t1130);
	    DECLARE_SIMD_TMPVAR2 (t1155);
	    DECLARE_SIMD_TMPVAR2 (t1156);
	    DECLARE_SIMD_TMPVAR2 (t1148);

	    simd_ld2 (inout[iostride * 4], t1035);
	    simd_swap2 (t1035, t1036);
	    simd_ld2 (W[3], t1034);
	    simd_mul2 (t1034, t1035, t1032);
	    simd_mul2 (t1034, t1036, t1033);
	    simd_unpckL2 (t1032, t1033, t1165);
	    simd_unpckH2 (t1032, t1033, t1164);
	    simd_fnmca2 (PK1_000000000NK1_000000000, t1164, t1165, t1022);
	    simd_ld2 (inout[iostride * 7], t1113);
	    simd_swap2 (t1113, t1114);
	    simd_ld2 (W[6], t1112);
	    simd_mul2 (t1112, t1113, t1110);
	    simd_mul2 (t1112, t1114, t1111);
	    simd_ld2 (inout[iostride * 3], t1127);
	    simd_swap2 (t1127, t1128);
	    simd_ld2 (W[2], t1126);
	    simd_mul2 (t1126, t1127, t1124);
	    simd_mul2 (t1126, t1128, t1125);
	    simd_unpckL2 (t1110, t1111, t1175);
	    simd_unpckH2 (t1110, t1111, t1174);
	    simd_fnmca2 (PK1_000000000NK1_000000000, t1174, t1175, t1099);
	    simd_unpckL2 (t1124, t1125, t1177);
	    simd_unpckH2 (t1124, t1125, t1176);
	    simd_fnmca2 (PK1_000000000NK1_000000000, t1176, t1177, t1100);
	    simd_sub2 (t1099, t1100, t1144);
	    simd_add2 (t1099, t1100, t1068);
	    simd_ld2 (inout[iostride * 2], t1051);
	    simd_swap2 (t1051, t1052);
	    simd_ld2 (W[1], t1050);
	    simd_mul2 (t1050, t1051, t1048);
	    simd_mul2 (t1050, t1052, t1049);
	    simd_unpckL2 (t1048, t1049, t1167);
	    simd_unpckH2 (t1048, t1049, t1166);
	    simd_fnmca2 (PK1_000000000NK1_000000000, t1166, t1167, t1037);
	    simd_ld2 (inout[iostride * 6], t1065);
	    simd_swap2 (t1065, t1066);
	    simd_ld2 (W[5], t1064);
	    simd_mul2 (t1064, t1065, t1062);
	    simd_mul2 (t1064, t1066, t1063);
	    simd_unpckL2 (t1062, t1063, t1169);
	    simd_unpckH2 (t1062, t1063, t1168);
	    simd_fnmca2 (PK1_000000000NK1_000000000, t1168, t1169, t1038);
	    simd_ld2 (inout[iostride], t1083);
	    simd_swap2 (t1083, t1084);
	    simd_ld2 (W[0], t1082);
	    simd_mul2 (t1082, t1083, t1080);
	    simd_mul2 (t1082, t1084, t1081);
	    simd_ld2 (inout[iostride * 5], t1097);
	    simd_swap2 (t1097, t1098);
	    simd_ld2 (W[4], t1096);
	    simd_mul2 (t1096, t1097, t1094);
	    simd_mul2 (t1096, t1098, t1095);
	    simd_unpckL2 (t1080, t1081, t1171);
	    simd_unpckH2 (t1080, t1081, t1170);
	    simd_fnmca2 (PK1_000000000NK1_000000000, t1170, t1171, t1069);
	    simd_unpckL2 (t1094, t1095, t1173);
	    simd_unpckH2 (t1094, t1095, t1172);
	    simd_fnmca2 (PK1_000000000NK1_000000000, t1172, t1173, t1070);
	    simd_sub2 (t1069, t1070, t1141);
	    simd_add2 (t1069, t1070, t1067);
	    simd_ld2 (inout[0], t1021);
	    simd_add2 (t1021, t1022, t1019);
	    simd_sub2 (t1021, t1022, t1133);
	    simd_add2 (t1037, t1038, t1020);
	    simd_sub2 (t1037, t1038, t1137);
	    simd_add2 (t1019, t1020, t1017);
	    simd_sub2 (t1019, t1020, t1158);
	    simd_sub2 (t1067, t1068, t1161);
	    simd_add2 (t1067, t1068, t1018);
	    simd_add2 (t1017, t1018, t1129);
	    simd_sub2 (t1017, t1018, t1016);
	    simd_st2 (t1129, inout[0]);
	    simd_st2 (t1016, inout[iostride * 4]);
	    simd_swapchsH2 (t1161, t1162);
	    simd_add2 (t1162, t1158, t1163);
	    simd_sub2 (t1158, t1162, t1157);
	    simd_st2 (t1163, inout[iostride * 2]);
	    simd_st2 (t1157, inout[iostride * 6]);
	    simd_swapchsH2 (t1141, t1142);
	    simd_add2 (t1142, t1141, t1139);
	    simd_swapchsH2 (t1144, t1145);
	    simd_sub2 (t1144, t1145, t1140);
	    simd_add2 (t1139, t1140, t1138);
	    simd_sub2 (t1139, t1140, t1154);
	    simd_swapchsH2 (t1137, t1134);
	    simd_add2 (t1134, t1133, t1131);
	    simd_sub2 (t1133, t1134, t1149);
	    simd_fmca2 (PK707106781PK707106781, t1138, t1131, t1147);
	    simd_fnmca2 (PK707106781PK707106781, t1138, t1131, t1130);
	    simd_st2 (t1147, inout[iostride]);
	    simd_st2 (t1130, inout[iostride * 5]);
	    simd_swapchsH2 (t1154, t1155);
	    simd_fmca2 (PK707106781PK707106781, t1155, t1149, t1156);
	    simd_fnmca2 (PK707106781PK707106781, t1155, t1149, t1148);
	    simd_st2 (t1156, inout[iostride * 3]);
	    simd_st2 (t1148, inout[iostride * 7]);
       }
}


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

fftw_codelet_desc fftw_twiddle_8_desc = {
     "fftw_twiddle_8",
     (void (*)()) fftw_twiddle_8,
     8,
     FFTW_FORWARD,
     FFTW_TWIDDLE,
     176,
     7,
     twiddle_order,
};
