/*
 * Copyright (c) 2003, 2006 Matteo Frigo
 * Copyright (c) 2003, 2006 Massachusetts Institute of Technology
 *
 * 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 Sat Jul  1 22:43:46 EDT 2006 */

#include "config.h"



/* cheap-mode: VECTGRADE_FULL succeeded. (330 steps) */
/* Generated by: ../../../genfft-k7/gen_notw -no-randomized-cse -n 16 -sign 1 -name n1k7i_16 */

/*
 * Generator Id's : 
 * $Id: algsimp.ml,v 1.4 2006-01-05 03:04:27 stevenj Exp $
 * $Id: fft.ml,v 1.4 2006-01-05 03:04:27 stevenj Exp $
 * $Id: gen_notw.ml,v 1.12 2006-01-05 03:04:27 stevenj Exp $
 */

/* The following asm code is Copyright (c) 2000-2001 Stefan Kral */
.section .rodata
	.balign 64
KP707106781KP707106781: .float +0.707106781186547524400844362104849039284835938, +0.707106781186547524400844362104849039284835938
chs_lo: .long 0x80000000, 0x00000000
KP923879532KP382683432: .float +0.923879532511286756128183189396788286822416626, +0.382683432365089771728459984030398866761344562
KP382683432KP923879532: .float +0.382683432365089771728459984030398866761344562, +0.923879532511286756128183189396788286822416626
chs_hi: .long 0x00000000, 0x80000000
.text
.text
	.balign 64
n1k7i_16:
	subl $140, %esp
	femms 
	movl %esi, 132(%esp)
	movl 160(%esp), %ecx
	movl 164(%esp), %esi
	movl %ebx, 136(%esp)
	movl 148(%esp), %eax
	movl 156(%esp), %ebx
	movl %edi, 128(%esp)
	sall $2, 172(%esp)
	leal (,%ecx,4), %ecx
	movl %ebp, 124(%esp)
	sall $2, 176(%esp)
	leal (,%esi,4), %esi
	leal (%eax,%ecx,8), %edx
	leal (%ebx,%esi,8), %edi
	.p2align 4,,7
.L0:
	/* promise simd cell size = 8 */ 
	movq (%eax), %mm1
	movq (%edx), %mm0
	movq (%edx,%ecx,4), %mm3
	movq (%eax,%ecx,4), %mm4
	leal (%ecx,%ecx,2), %ebp
	movq (%edx,%ecx,2), %mm6
	movq (%eax,%ecx,2), %mm7
	movq %mm1, %mm2
	pfadd %mm0, %mm1
	movq %mm4, %mm5
	pfsub %mm3, %mm4
	pfsub %mm0, %mm2
	movq %mm7, %mm0
	pfadd %mm3, %mm5
	pfsub %mm6, %mm7
	movq %mm1, %mm3
	movq %mm4, 8(%esp)
	movq (%eax,%ebp,2), %mm4
	pfadd %mm6, %mm0
	movq %mm2, 0(%esp)
	movq (%edx,%ebp,2), %mm2
	leal (%ecx,%ecx,4), %ebp
	pfadd %mm5, %mm1
	pfsub %mm5, %mm3
	movq %mm7, %mm6
	movq %mm2, %mm5
	pfsub %mm4, %mm2
	movq %mm1, 56(%esp)
	movq (%edx,%ecx), %mm1
	pfadd %mm4, %mm5
	movq %mm3, 32(%esp)
	movq (%eax,%ecx), %mm3
	movq %mm0, %mm4
	pfpnacc %mm2, %mm6
	pswapd %mm2, %mm2
	pfsubr %mm5, %mm0
	pfpnacc %mm7, %mm2
	movq %mm3, %mm7
	pfsub %mm1, %mm3
	pfadd %mm5, %mm4
	movq %mm6, %mm5
	pfadd %mm1, %mm7
	movq %mm0, 40(%esp)
	movq (%eax,%ebp), %mm1
	movq (%edx,%ebp), %mm0
	pfacc %mm2, %mm6
	leal (%ecx,%ecx,2), %ebp
	pfnacc %mm5, %mm2
	movq %mm3, 64(%esp)
	movq %mm4, 48(%esp)
	movq (%eax,%ebp), %mm3
	movq (%edx,%ebp), %mm5
	movq %mm1, %mm4
	leal (%ecx,%ecx,2), %ebp
	pfmul KP707106781KP707106781, %mm6
	pfsub %mm0, %mm1
	pfmul KP707106781KP707106781, %mm2
	pfadd %mm0, %mm4
	leal (%ecx,%ebp,2), %ebp
	movq %mm3, %mm0
	pfadd %mm5, %mm3
	pfsub %mm5, %mm0
	movq %mm1, 72(%esp)
	movq (%edx,%ebp), %mm5
	movq %mm7, %mm1
	pfadd %mm4, %mm7
	movq %mm6, 24(%esp)
	movq (%eax,%ebp), %mm6
	/* simd data load/store barrier */ 
	movq %mm2, 16(%esp)
	pfsub %mm4, %mm1
	leal (%esi,%esi,2), %ebp
	movq %mm5, %mm2
	pxor chs_lo, %mm0
	addl 172(%esp), %eax
	addl 172(%esp), %edx
	pfadd %mm6, %mm5
	pfsub %mm6, %mm2
	movq %mm7, %mm6
	movq %mm5, %mm4
	pfadd %mm3, %mm5
	pswapd %mm2, %mm2
	pfsub %mm3, %mm4
	movq %mm2, %mm3
	pfadd %mm0, %mm2
	pfsubr %mm5, %mm6
	pfsub %mm0, %mm3
	pfadd %mm5, %mm7
	movq %mm1, %mm5
	movq %mm2, %mm0
	pfmul KP923879532KP382683432, %mm2
	pfpnacc %mm4, %mm5
	pswapd %mm4, %mm4
	pfmul KP382683432KP923879532, %mm0
	pswapd %mm6, %mm6
	pfpnacc %mm1, %mm4
	movq %mm3, %mm1
	pfmul KP382683432KP923879532, %mm3
	pxor chs_hi, %mm6
	pfmul KP923879532KP382683432, %mm1
	movq %mm2, 88(%esp)
	movq %mm0, 80(%esp)
	movq %mm3, 112(%esp)
	movq %mm1, 96(%esp)
	movq 72(%esp), %mm0
	movq 64(%esp), %mm3
	movq 56(%esp), %mm1
	pswapd %mm0, %mm0
	movq %mm3, %mm2
	pxor chs_lo, %mm0
	pfsub %mm0, %mm3
	pfadd %mm0, %mm2
	movq %mm3, 104(%esp)
	movq 48(%esp), %mm0
	movq %mm1, %mm3
	pfadd %mm0, %mm1
	pfsub %mm0, %mm3
	movq %mm1, %mm0
	pfadd %mm7, %mm1
	pfsub %mm7, %mm0
	movq %mm3, %mm7
	pfadd %mm6, %mm3
	movq %mm1, (%ebx)
	movq 40(%esp), %mm1
	pfsub %mm6, %mm7
	movq %mm4, %mm6
	pfnacc %mm5, %mm4
	movq %mm0, (%edi)
	movq 32(%esp), %mm0
	movq %mm3, (%ebx,%esi,4)
	pfacc %mm6, %mm5
	pswapd %mm1, %mm1
	pfmul KP707106781KP707106781, %mm4
	pxor chs_hi, %mm1
	movq %mm7, (%edi,%esi,4)
	movq %mm0, %mm3
	pfmul KP707106781KP707106781, %mm5
	pfsub %mm1, %mm0
	pfadd %mm1, %mm3
	pswapd %mm2, %mm1
	pfmul KP923879532KP382683432, %mm2
	pfmul KP923879532KP382683432, %mm1
	movq %mm0, %mm6
	pfadd %mm4, %mm0
	movq %mm3, %mm7
	pfsub %mm5, %mm3
	pfsub %mm4, %mm6
	movq 8(%esp), %mm4
	pfadd %mm5, %mm7
	movq 0(%esp), %mm5
	pfpnacc 112(%esp), %mm2
	movq %mm0, (%ebx,%ebp,2)
	movq %mm3, (%edi,%esi,2)
	movq 96(%esp), %mm3
	pswapd %mm4, %mm4
	movq %mm6, (%edi,%ebp,2)
	movq 24(%esp), %mm6
	movq %mm5, %mm0
	movq %mm7, (%ebx,%esi,2)
	leal (%esi,%esi,4), %ebp
	pxor chs_lo, %mm4
	pfpnacc %mm1, %mm3
	movq %mm2, %mm1
	pfadd %mm4, %mm5
	pfacc %mm3, %mm2
	pfsub %mm4, %mm0
	pfnacc %mm1, %mm3
	movq %mm5, %mm7
	pfadd %mm6, %mm5
	pfsub %mm6, %mm7
	movq 104(%esp), %mm6
	movq %mm5, %mm4
	pfsub %mm2, %mm5
	pswapd %mm6, %mm1
	pfmul KP382683432KP923879532, %mm6
	pfadd %mm2, %mm4
	movq %mm7, %mm2
	pfmul KP382683432KP923879532, %mm1
	pfsub %mm3, %mm7
	movq %mm5, (%edi,%esi)
	movq 16(%esp), %mm5
	pfadd %mm3, %mm2
	movq %mm0, %mm3
	movq %mm4, (%ebx,%esi)
	movq 80(%esp), %mm4
	pfpnacc 88(%esp), %mm6
	movq %mm7, (%edi,%ebp)
	pfsub %mm5, %mm3
	movq %mm2, (%ebx,%ebp)
	leal (%esi,%esi,2), %ebp
	pfadd %mm5, %mm0
	pfpnacc %mm1, %mm4
	leal (%esi,%ebp,2), %ebp
	movq %mm3, %mm1
	movq %mm6, %mm7
	movq %mm0, %mm2
	pfacc %mm4, %mm6
	pfnacc %mm7, %mm4
	pfadd %mm6, %mm2
	pfadd %mm4, %mm1
	pfsub %mm4, %mm3
	pfsub %mm6, %mm0
	movq %mm1, (%ebx,%ebp)
	movq %mm3, (%edi,%ebp)
	leal (%esi,%esi,2), %ebp
	movq %mm2, (%ebx,%ebp)
	addl 176(%esp), %ebx
	movq %mm0, (%edi,%ebp)
	addl 176(%esp), %edi
	decl 168(%esp)
	jnz .L0
	femms 
	movl 136(%esp), %ebx
	movl 132(%esp), %esi
	movl 128(%esp), %edi
	movl 124(%esp), %ebp
	addl $140, %esp
	ret 

.section .rodata
nam:
	.string "n1k7i_16"
	.align 4
desc:
	.long 16
	.long nam
	.double 72
	.double 12
	.double 0
	.double 0
	.long fftwf_kdft_k7_pgenus
	.long 0
	.long 0
	.long 0
	.long 0

.text
	.align 4
.globl fftwf_codelet_n1k7i_16
fftwf_codelet_n1k7i_16:
	subl $12,%esp
	addl $-4,%esp
	pushl $desc
	pushl $n1k7i_16
	pushl 28(%esp)
	call fftwf_kdft_register
	addl $16,%esp
	addl $12,%esp
	ret

