// File: /workspace/github_c_makefile_star2_O1/pavel-demin[P]ft8d-c/pffft.c
// Function: pffft_cplx_finalize
void pffft_cplx_finalize(int Ncvec, const v4sf *in, v4sf *out, const v4sf *e) {
  int k, dk = Ncvec/SIMD_SZ; // number of 4x4 matrix blocks
  v4sf r0, i0, r1, i1, r2, i2, r3, i3;
  v4sf sr0, dr0, sr1, dr1, si0, di0, si1, di1;
  assert(in != out);
  for (k=0; k < dk; ++k) {
    r0 = in[8*k+0]; i0 = in[8*k+1];
    r1 = in[8*k+2]; i1 = in[8*k+3];
    r2 = in[8*k+4]; i2 = in[8*k+5];
    r3 = in[8*k+6]; i3 = in[8*k+7];
    VTRANSPOSE4(r0,r1,r2,r3);
    VTRANSPOSE4(i0,i1,i2,i3);
    VCPLXMUL(r1,i1,e[k*6+0],e[k*6+1]);
    VCPLXMUL(r2,i2,e[k*6+2],e[k*6+3]);
    VCPLXMUL(r3,i3,e[k*6+4],e[k*6+5]);

    sr0 = VADD(r0,r2); dr0 = VSUB(r0, r2);
    sr1 = VADD(r1,r3); dr1 = VSUB(r1, r3);
    si0 = VADD(i0,i2); di0 = VSUB(i0, i2);
    si1 = VADD(i1,i3); di1 = VSUB(i1, i3);

    /*
      transformation for each column is:

      [1   1   1   1   0   0   0   0]   [r0]
      [1   0  -1   0   0  -1   0   1]   [r1]
      [1  -1   1  -1   0   0   0   0]   [r2]
      [1   0  -1   0   0   1   0  -1]   [r3]
      [0   0   0   0   1   1   1   1] * [i0]
      [0   1   0  -1   1   0  -1   0]   [i1]
      [0   0   0   0   1  -1   1  -1]   [i2]
      [0  -1   0   1   1   0  -1   0]   [i3]
    */

    r0 = VADD(sr0, sr1); i0 = VADD(si0, si1);
    r1 = VADD(dr0, di1); i1 = VSUB(di0, dr1);
    r2 = VSUB(sr0, sr1); i2 = VSUB(si0, si1);
    r3 = VSUB(dr0, di1); i3 = VADD(di0, dr1);

    *out++ = r0; *out++ = i0; *out++ = r1; *out++ = i1;
    *out++ = r2; *out++ = i2; *out++ = r3; *out++ = i3;
  }
}

// Assembly:
pushq %rax
leal 0x3(%rdi), %eax
testl %edi, %edi
cmovnsl %edi, %eax
cmpq %rdx, %rsi
je 0x3014
cmpl $0x4, %edi
jl 0x3012
sarl $0x2, %eax
movl %eax, %eax
addq $0x50, %rcx
shlq $0x7, %rax
xorl %edi, %edi
movaps (%rsi,%rdi), %xmm3
movaps 0x10(%rsi,%rdi), %xmm8
movaps 0x20(%rsi,%rdi), %xmm0
movaps 0x30(%rsi,%rdi), %xmm7
movaps 0x40(%rsi,%rdi), %xmm4
movaps 0x50(%rsi,%rdi), %xmm2
movaps 0x60(%rsi,%rdi), %xmm5
movaps 0x70(%rsi,%rdi), %xmm9
movaps %xmm3, %xmm6
unpcklps %xmm0, %xmm6            # xmm6 = xmm6[0],xmm0[0],xmm6[1],xmm0[1]
movaps %xmm4, %xmm1
unpcklps %xmm5, %xmm1            # xmm1 = xmm1[0],xmm5[0],xmm1[1],xmm5[1]
unpckhps %xmm0, %xmm3            # xmm3 = xmm3[2],xmm0[2],xmm3[3],xmm0[3]
unpckhps %xmm5, %xmm4            # xmm4 = xmm4[2],xmm5[2],xmm4[3],xmm5[3]
movaps %xmm6, %xmm0
movlhps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0]
movhlps %xmm6, %xmm1            # xmm1 = xmm6[1],xmm1[1]
movaps %xmm3, %xmm6
movlhps %xmm4, %xmm6            # xmm6 = xmm6[0],xmm4[0]
movhlps %xmm3, %xmm4            # xmm4 = xmm3[1],xmm4[1]
movaps %xmm8, %xmm10
unpcklps %xmm7, %xmm10           # xmm10 = xmm10[0],xmm7[0],xmm10[1],xmm7[1]
movaps %xmm2, %xmm5
unpcklps %xmm9, %xmm5            # xmm5 = xmm5[0],xmm9[0],xmm5[1],xmm9[1]
unpckhps %xmm7, %xmm8            # xmm8 = xmm8[2],xmm7[2],xmm8[3],xmm7[3]
unpckhps %xmm9, %xmm2            # xmm2 = xmm2[2],xmm9[2],xmm2[3],xmm9[3]
movaps %xmm10, %xmm3
movlhps %xmm5, %xmm3            # xmm3 = xmm3[0],xmm5[0]
movhlps %xmm10, %xmm5           # xmm5 = xmm10[1],xmm5[1]
movaps %xmm8, %xmm7
movlhps %xmm2, %xmm7            # xmm7 = xmm7[0],xmm2[0]
movhlps %xmm8, %xmm2            # xmm2 = xmm8[1],xmm2[1]
movaps -0x50(%rcx), %xmm8
movaps -0x40(%rcx), %xmm9
movaps -0x30(%rcx), %xmm10
movaps -0x20(%rcx), %xmm11
movaps %xmm1, %xmm12
mulps %xmm9, %xmm12
mulps %xmm8, %xmm1
mulps %xmm5, %xmm9
subps %xmm9, %xmm1
mulps %xmm8, %xmm5
addps %xmm12, %xmm5
movaps %xmm6, %xmm8
mulps %xmm11, %xmm8
mulps %xmm10, %xmm6
mulps %xmm7, %xmm11
subps %xmm11, %xmm6
mulps %xmm10, %xmm7
addps %xmm8, %xmm7
movaps (%rcx), %xmm8
movaps %xmm4, %xmm9
mulps %xmm8, %xmm9
movaps -0x10(%rcx), %xmm10
mulps %xmm10, %xmm4
mulps %xmm2, %xmm8
subps %xmm8, %xmm4
mulps %xmm10, %xmm2
addps %xmm9, %xmm2
movaps %xmm0, %xmm8
addps %xmm6, %xmm8
subps %xmm6, %xmm0
movaps %xmm1, %xmm6
addps %xmm4, %xmm6
subps %xmm4, %xmm1
movaps %xmm3, %xmm4
addps %xmm7, %xmm4
subps %xmm7, %xmm3
movaps %xmm5, %xmm7
addps %xmm2, %xmm7
subps %xmm2, %xmm5
movaps %xmm8, %xmm2
addps %xmm6, %xmm2
movaps %xmm4, %xmm9
addps %xmm7, %xmm9
movaps %xmm0, %xmm10
addps %xmm5, %xmm10
movaps %xmm3, %xmm11
subps %xmm1, %xmm11
subps %xmm6, %xmm8
subps %xmm7, %xmm4
subps %xmm5, %xmm0
addps %xmm1, %xmm3
movaps %xmm2, (%rdx,%rdi)
movaps %xmm9, 0x10(%rdx,%rdi)
movaps %xmm10, 0x20(%rdx,%rdi)
movaps %xmm11, 0x30(%rdx,%rdi)
movaps %xmm8, 0x40(%rdx,%rdi)
movaps %xmm4, 0x50(%rdx,%rdi)
movaps %xmm0, 0x60(%rdx,%rdi)
movaps %xmm3, 0x70(%rdx,%rdi)
addq $0x60, %rcx
subq $-0x80, %rdi
cmpq %rdi, %rax
jne 0x2e99
popq %rax
retq
leaq 0x5451(%rip), %rdi      # 0x846c
leaq 0x5207(%rip), %rsi      # 0x8229
leaq 0x549b(%rip), %rcx      # 0x84c4
movl $0x53f, %edx            # imm = 0x53F
callq 0x1090