// File: /workspace/github_cpp_makefile_star2_O1/kebwi[P]Trifid/src/FFT/fftlib.cpp
// Function: ifft8pt(double*, double)
inline void ifft8pt(Float_t *ioptr, Float_t scale){
/***   RADIX 8 ifft	***/
Float_t w0r = 1.0/MYROOT2; /* cos(pi/4)	*/
Float_t f0r, f0i, f1r, f1i, f2r, f2i, f3r, f3i;
Float_t f4r, f4i, f5r, f5i, f6r, f6i, f7r, f7i;
Float_t t0r, t0i, t1r, t1i;
const Float_t Two = 2.0;

	/* bit reversed load */
f0r = ioptr[0];
f0i = ioptr[1];
f1r = ioptr[8];
f1i = ioptr[9];
f2r = ioptr[4];
f2i = ioptr[5];
f3r = ioptr[12];
f3i = ioptr[13];
f4r = ioptr[2];
f4i = ioptr[3];
f5r = ioptr[10];
f5i = ioptr[11];
f6r = ioptr[6];
f6i = ioptr[7];
f7r = ioptr[14];
f7i = ioptr[15];

			/* Butterflys		*/
			/*
			f0	-	-	t0	-	-	f0	-	-	f0
			f1	-  1 -	f1	-	-	f1	-	-	f1
			f2	-	-	f2	-  1 -	f2	-	-	f2
			f3	-  1 -	t1	-  i -	f3	-	-	f3
			f4	-	-	t0	-	-	f4	-  1 -	t0
			f5	-  1 -	f5	-	-	f5	- w3 -	f4
			f6	-	-	f6	-  1 -	f6	-  i -	t1
			f7	-  1 -	t1	-  i -	f7	- iw3-	f6
			*/

t0r = f0r + f1r;
t0i = f0i + f1i;
f1r = f0r - f1r;
f1i = f0i - f1i;

t1r = f2r - f3r;
t1i = f2i - f3i;
f2r = f2r + f3r;
f2i = f2i + f3i;

f0r = t0r + f2r;
f0i = t0i + f2i;
f2r = t0r - f2r;
f2i = t0i - f2i;

f3r = f1r + t1i;
f3i = f1i - t1r;
f1r = f1r - t1i;
f1i = f1i + t1r;


t0r = f4r + f5r;
t0i = f4i + f5i;
f5r = f4r - f5r;
f5i = f4i - f5i;

t1r = f6r - f7r;
t1i = f6i - f7i;
f6r = f6r + f7r;
f6i = f6i + f7i;

f4r = t0r + f6r;
f4i = t0i + f6i;
f6r = t0r - f6r;
f6i = t0i - f6i;

f7r = f5r + t1i;
f7i = f5i - t1r;
f5r = f5r - t1i;
f5i = f5i + t1r;


t0r = f0r - f4r;
t0i = f0i - f4i;
f0r = f0r + f4r;
f0i = f0i + f4i;

t1r = f2r + f6i;
t1i = f2i - f6r;
f2r = f2r - f6i;
f2i = f2i + f6r;

f4r = f1r - f5r * w0r + f5i * w0r;
f4i = f1i - f5r * w0r - f5i * w0r;
f1r = f1r * Two - f4r;
f1i = f1i * Two - f4i;

f6r = f3r + f7r * w0r + f7i * w0r;
f6i = f3i - f7r * w0r + f7i * w0r;
f3r = f3r * Two - f6r;
f3i = f3i * Two - f6i;

	/* store result */
ioptr[0] = scale*f0r;
ioptr[1] = scale*f0i;
ioptr[2] = scale*f1r;
ioptr[3] = scale*f1i;
ioptr[4] = scale*f2r;
ioptr[5] = scale*f2i;
ioptr[6] = scale*f3r;
ioptr[7] = scale*f3i;
ioptr[8] = scale*t0r;
ioptr[9] = scale*t0i;
ioptr[10] = scale*f4r;
ioptr[11] = scale*f4i;
ioptr[12] = scale*t1r;
ioptr[13] = scale*t1i;
ioptr[14] = scale*f6r;
ioptr[15] = scale*f6i;
}

// Assembly:
movapd %xmm0, %xmm11
movsd (%rdi), %xmm10
movsd 0x8(%rdi), %xmm7
movsd 0x40(%rdi), %xmm4
movsd 0x48(%rdi), %xmm2
movsd 0x20(%rdi), %xmm6
movsd 0x28(%rdi), %xmm0
movsd 0x60(%rdi), %xmm8
movsd 0x68(%rdi), %xmm15
movsd 0x10(%rdi), %xmm5
movsd 0x18(%rdi), %xmm1
movsd %xmm1, -0x28(%rsp)
movsd 0x50(%rdi), %xmm9
movsd 0x58(%rdi), %xmm3
movsd 0x30(%rdi), %xmm1
movsd 0x70(%rdi), %xmm12
movsd %xmm12, -0x18(%rsp)
movapd %xmm10, %xmm12
addsd %xmm4, %xmm12
subsd %xmm4, %xmm10
movapd %xmm7, %xmm13
addsd %xmm2, %xmm13
subsd %xmm2, %xmm7
movapd %xmm6, %xmm4
subsd %xmm8, %xmm4
addsd %xmm8, %xmm6
movapd %xmm0, %xmm2
subsd %xmm15, %xmm2
addsd %xmm15, %xmm0
movapd %xmm12, %xmm8
addsd %xmm6, %xmm8
movsd %xmm8, -0x20(%rsp)
subsd %xmm6, %xmm12
movsd %xmm12, -0x8(%rsp)
movapd %xmm13, %xmm6
addsd %xmm0, %xmm6
movsd %xmm6, -0x10(%rsp)
subsd %xmm0, %xmm13
movapd %xmm10, %xmm14
addsd %xmm2, %xmm14
subsd %xmm2, %xmm10
movapd %xmm7, %xmm12
subsd %xmm4, %xmm12
addsd %xmm7, %xmm4
movapd %xmm5, %xmm6
addsd %xmm9, %xmm6
subsd %xmm9, %xmm5
movsd -0x28(%rsp), %xmm0
movapd %xmm0, %xmm2
addsd %xmm3, %xmm2
subsd %xmm3, %xmm0
movsd %xmm0, -0x28(%rsp)
movapd %xmm1, %xmm8
movsd -0x18(%rsp), %xmm0
subsd %xmm0, %xmm8
addsd %xmm0, %xmm1
movsd 0x38(%rdi), %xmm9
movsd 0x78(%rdi), %xmm3
movapd %xmm9, %xmm0
subsd %xmm3, %xmm0
addsd %xmm3, %xmm9
movapd %xmm6, %xmm15
addsd %xmm1, %xmm15
subsd %xmm1, %xmm6
movapd %xmm2, %xmm3
addsd %xmm9, %xmm3
subsd %xmm9, %xmm2
movapd %xmm5, %xmm7
addsd %xmm0, %xmm7
subsd %xmm0, %xmm5
movsd -0x28(%rsp), %xmm0
movapd %xmm0, %xmm9
subsd %xmm8, %xmm9
addsd %xmm0, %xmm8
movsd -0x20(%rsp), %xmm1
movapd %xmm1, %xmm0
subsd %xmm15, %xmm0
movsd %xmm0, -0x18(%rsp)
addsd %xmm1, %xmm15
movsd -0x10(%rsp), %xmm1
movapd %xmm1, %xmm0
subsd %xmm3, %xmm0
movsd %xmm0, -0x20(%rsp)
addsd %xmm1, %xmm3
movsd -0x8(%rsp), %xmm1
movapd %xmm1, %xmm0
addsd %xmm2, %xmm0
movsd %xmm0, -0x28(%rsp)
subsd %xmm2, %xmm1
movapd %xmm13, %xmm0
subsd %xmm6, %xmm0
xorpd 0x3b0d(%rip), %xmm5     # 0x2c490
addsd %xmm13, %xmm6
movsd 0x6f10(%rip), %xmm2     # 0x2f8a0
mulsd %xmm2, %xmm5
movapd %xmm5, %xmm13
addsd %xmm10, %xmm13
mulsd %xmm2, %xmm8
addsd %xmm8, %xmm13
addsd %xmm4, %xmm5
subsd %xmm8, %xmm5
mulsd %xmm2, %xmm7
mulsd %xmm2, %xmm9
movapd %xmm12, %xmm2
subsd %xmm7, %xmm2
addsd %xmm14, %xmm7
addsd %xmm9, %xmm7
addsd %xmm2, %xmm9
mulsd %xmm11, %xmm15
movsd %xmm15, (%rdi)
mulsd %xmm11, %xmm3
movsd %xmm3, 0x8(%rdi)
addsd %xmm10, %xmm10
subsd %xmm13, %xmm10
mulsd %xmm11, %xmm10
movsd %xmm10, 0x10(%rdi)
addsd %xmm4, %xmm4
subsd %xmm5, %xmm4
mulsd %xmm11, %xmm4
movsd %xmm4, 0x18(%rdi)
mulsd %xmm11, %xmm1
movsd %xmm1, 0x20(%rdi)
mulsd %xmm11, %xmm6
movsd %xmm6, 0x28(%rdi)
addsd %xmm14, %xmm14
subsd %xmm7, %xmm14
mulsd %xmm11, %xmm14
movsd %xmm14, 0x30(%rdi)
addsd %xmm12, %xmm12
subsd %xmm9, %xmm12
mulsd %xmm11, %xmm12
movsd %xmm12, 0x38(%rdi)
movsd -0x18(%rsp), %xmm2
mulsd %xmm11, %xmm2
movsd %xmm2, 0x40(%rdi)
movsd -0x20(%rsp), %xmm2
mulsd %xmm11, %xmm2
movsd %xmm2, 0x48(%rdi)
mulsd %xmm11, %xmm13
movsd %xmm13, 0x50(%rdi)
mulsd %xmm11, %xmm5
movsd %xmm5, 0x58(%rdi)
movsd -0x28(%rsp), %xmm2
mulsd %xmm11, %xmm2
movsd %xmm2, 0x60(%rdi)
mulsd %xmm11, %xmm0
movsd %xmm0, 0x68(%rdi)
mulsd %xmm11, %xmm7
movsd %xmm7, 0x70(%rdi)
mulsd %xmm11, %xmm9
movsd %xmm9, 0x78(%rdi)
retq