// File: /workspace/github_c_makefile_star2_O1/pavel-demin[P]ft8d-c/pffft.c
// Function: pffft_zreorder
void pffft_zreorder(PFFFT_Setup *setup, const float *in, float *out, pffft_direction_t direction) {
  int k, N = setup->N, Ncvec = setup->Ncvec;
  const v4sf *vin = (const v4sf*)in;
  v4sf *vout = (v4sf*)out;
  assert(in != out);
  if (setup->transform == PFFFT_REAL) {
    int dk = N/32;
    if (direction == PFFFT_FORWARD) {
      for (k=0; k < dk; ++k) {
        INTERLEAVE2(vin[k*8 + 0], vin[k*8 + 1], vout[2*(0*dk + k) + 0], vout[2*(0*dk + k) + 1]);
        INTERLEAVE2(vin[k*8 + 4], vin[k*8 + 5], vout[2*(2*dk + k) + 0], vout[2*(2*dk + k) + 1]);
      }
      reversed_copy(dk, vin+2, 8, (v4sf*)(out + N/2));
      reversed_copy(dk, vin+6, 8, (v4sf*)(out + N));
    } else {
      for (k=0; k < dk; ++k) {
        UNINTERLEAVE2(vin[2*(0*dk + k) + 0], vin[2*(0*dk + k) + 1], vout[k*8 + 0], vout[k*8 + 1]);
        UNINTERLEAVE2(vin[2*(2*dk + k) + 0], vin[2*(2*dk + k) + 1], vout[k*8 + 4], vout[k*8 + 5]);
      }
      unreversed_copy(dk, (v4sf*)(in + N/4), (v4sf*)(out + N - 6*SIMD_SZ), -8);
      unreversed_copy(dk, (v4sf*)(in + 3*N/4), (v4sf*)(out + N - 2*SIMD_SZ), -8);
    }
  } else {
    if (direction == PFFFT_FORWARD) {
      for (k=0; k < Ncvec; ++k) {
        int kk = (k/4) + (k%4)*(Ncvec/4);
        INTERLEAVE2(vin[k*2], vin[k*2+1], vout[kk*2], vout[kk*2+1]);
      }
    } else {
      for (k=0; k < Ncvec; ++k) {
        int kk = (k/4) + (k%4)*(Ncvec/4);
        UNINTERLEAVE2(vin[kk*2], vin[kk*2+1], vout[k*2], vout[k*2+1]);
      }
    }
  }
}

// Assembly:
pushq %rax
cmpq %rdx, %rsi
je 0x2e50
cmpl $0x0, 0x44(%rdi)
je 0x2abf
movl 0x4(%rdi), %eax
testl %ecx, %ecx
je 0x2bb7
testl %eax, %eax
jle 0x2e4e
movl %eax, %ecx
shrl $0x2, %ecx
addq $0x10, %rdx
xorl %edi, %edi
movl %edi, %r8d
shrl $0x2, %r8d
movl %edi, %r9d
andl $0x3, %r9d
imull %ecx, %r9d
addl %r8d, %r9d
leal (%r9,%r9), %r8d
shlq $0x4, %r8
movaps (%rsi,%r8), %xmm0
leal 0x1(,%r9,2), %r8d
shlq $0x4, %r8
movaps (%rsi,%r8), %xmm1
movaps %xmm0, %xmm2
shufps $0x88, %xmm1, %xmm2     # xmm2 = xmm2[0,2],xmm1[0,2]
shufps $0xdd, %xmm1, %xmm0     # xmm0 = xmm0[1,3],xmm1[1,3]
movaps %xmm0, (%rdx)
movaps %xmm2, -0x10(%rdx)
incq %rdi
addq $0x20, %rdx
cmpq %rdi, %rax
jne 0x2a69
jmp 0x2e4e
movslq (%rdi), %rdi
leal 0x1f(%rdi), %eax
testl %edi, %edi
cmovnsl %edi, %eax
sarl $0x5, %eax
testl %ecx, %ecx
je 0x2c1d
cmpl $0x20, %edi
jl 0x2b42
leal (,%rax,4), %r8d
movl %eax, %ecx
shlq $0x4, %r8
addq %rsi, %r8
addq $0x10, %r8
shlq $0x5, %rcx
xorl %r9d, %r9d
movaps (%rsi,%r9), %xmm0
movaps 0x10(%rsi,%r9), %xmm1
movaps %xmm0, %xmm2
shufps $0x88, %xmm1, %xmm2     # xmm2 = xmm2[0,2],xmm1[0,2]
shufps $0xdd, %xmm1, %xmm0     # xmm0 = xmm0[1,3],xmm1[1,3]
movaps %xmm0, 0x10(%rdx,%r9,4)
movaps %xmm2, (%rdx,%r9,4)
movaps -0x10(%r8,%r9), %xmm0
movaps (%r8,%r9), %xmm1
movaps %xmm0, %xmm2
shufps $0x88, %xmm1, %xmm2     # xmm2 = xmm2[0,2],xmm1[0,2]
shufps $0xdd, %xmm1, %xmm0     # xmm0 = xmm0[1,3],xmm1[1,3]
movaps %xmm0, 0x50(%rdx,%r9,4)
movaps %xmm2, 0x40(%rdx,%r9,4)
addq $0x20, %r9
cmpq %r9, %rcx
jne 0x2af6
leal 0x3(%rdi), %ecx
testl %edi, %edi
cmovnsl %edi, %ecx
sarl $0x2, %ecx
movslq %ecx, %r8
leaq (%rdx,%rdi,4), %rcx
leaq (%rdx,%rdi,4), %rdx
addq $-0x60, %rdx
leaq (%rsi,%r8,4), %r8
addq $0x10, %r8
movapd -0x10(%r8), %xmm0
cmpl $0x40, %edi
jl 0x2d0b
leal -0x1(%rax), %r9d
movapd %xmm0, %xmm1
movapd %xmm1, %xmm2
movapd (%r8), %xmm3
movapd 0x10(%r8), %xmm1
addq $0x20, %r8
movsd %xmm3, %xmm2            # xmm2 = xmm3[0],xmm2[1]
movsd %xmm1, %xmm3            # xmm3 = xmm1[0],xmm3[1]
movapd %xmm3, %xmm4
shufps $0x88, %xmm2, %xmm4     # xmm4 = xmm4[0,2],xmm2[0,2]
shufps $0xdd, %xmm2, %xmm3     # xmm3 = xmm3[1,3],xmm2[1,3]
movaps %xmm3, 0x10(%rdx)
movaps %xmm4, (%rdx)
addq $-0x80, %rdx
decl %r9d
jne 0x2b7b
jmp 0x2d0f
testl %eax, %eax
jle 0x2e4e
movl %eax, %ecx
shrl $0x2, %ecx
addq $0x10, %rsi
xorl %edi, %edi
movl %edi, %r8d
shrl $0x2, %r8d
movl %edi, %r9d
andl $0x3, %r9d
imull %ecx, %r9d
addl %r8d, %r9d
movaps -0x10(%rsi), %xmm0
movaps (%rsi), %xmm1
movaps %xmm0, %xmm2
unpcklps %xmm1, %xmm2            # xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1]
unpckhps %xmm1, %xmm0            # xmm0 = xmm0[2],xmm1[2],xmm0[3],xmm1[3]
leal 0x1(,%r9,2), %r8d
addl %r9d, %r9d
shlq $0x4, %r8
movaps %xmm0, (%rdx,%r8)
shlq $0x4, %r9
movaps %xmm2, (%rdx,%r9)
incq %rdi
addq $0x20, %rsi
cmpq %rdi, %rax
jne 0x2bca
jmp 0x2e4e
cmpl $0x20, %edi
jl 0x2c86
leal (,%rax,4), %r8d
movl %eax, %ecx
shlq $0x4, %r8
addq %rdx, %r8
addq $0x10, %r8
shlq $0x5, %rcx
xorl %r9d, %r9d
movaps (%rsi,%r9,4), %xmm0
movaps 0x10(%rsi,%r9,4), %xmm1
movaps %xmm0, %xmm2
unpcklps %xmm1, %xmm2            # xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1]
unpckhps %xmm1, %xmm0            # xmm0 = xmm0[2],xmm1[2],xmm0[3],xmm1[3]
movaps %xmm0, 0x10(%rdx,%r9)
movaps %xmm2, (%rdx,%r9)
movaps 0x40(%rsi,%r9,4), %xmm0
movaps 0x50(%rsi,%r9,4), %xmm1
movaps %xmm0, %xmm2
unpcklps %xmm1, %xmm2            # xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1]
unpckhps %xmm1, %xmm0            # xmm0 = xmm0[2],xmm1[2],xmm0[3],xmm1[3]
movaps %xmm0, (%r8,%r9)
movaps %xmm2, -0x10(%r8,%r9)
addq $0x20, %r9
cmpq %r9, %rcx
jne 0x2c3e
movl %edi, %ecx
shrl $0x1f, %ecx
addl %edi, %ecx
sarl %ecx
movslq %ecx, %rcx
movapd 0x20(%rsi), %xmm1
movapd 0x30(%rsi), %xmm2
movapd %xmm1, %xmm0
unpcklps %xmm2, %xmm0            # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
unpckhps %xmm2, %xmm1            # xmm1 = xmm1[2],xmm2[2],xmm1[3],xmm2[3]
movapd %xmm0, %xmm2
movsd %xmm1, %xmm2            # xmm2 = xmm1[0],xmm2[1]
leaq (%rdx,%rcx,4), %rcx
addq $-0x10, %rcx
movapd %xmm2, (%rcx)
cmpl $0x40, %edi
jl 0x2dc5
leaq 0xb0(%rsi), %r8
leal -0x1(%rax), %r9d
movapd -0x10(%r8), %xmm2
movapd (%r8), %xmm3
movapd %xmm2, %xmm4
unpcklps %xmm3, %xmm4            # xmm4 = xmm4[0],xmm3[0],xmm4[1],xmm3[1]
unpckhps %xmm3, %xmm2            # xmm2 = xmm2[2],xmm3[2],xmm2[3],xmm3[3]
movsd %xmm4, %xmm1            # xmm1 = xmm4[0],xmm1[1]
movapd %xmm1, -0x10(%rcx)
movsd %xmm2, %xmm4            # xmm4 = xmm2[0],xmm4[1]
movapd %xmm4, -0x20(%rcx)
addq $-0x20, %rcx
subq $-0x80, %r8
movapd %xmm2, %xmm1
decl %r9d
jne 0x2cce
jmp 0x2dc9
movapd %xmm0, %xmm1
leal (%rdi,%rdi,2), %r9d
leal (%rdi,%rdi,2), %r10d
addl $0x3, %r10d
testl %r9d, %r9d
cmovnsl %r9d, %r10d
sarl $0x2, %r10d
addq $-0x20, %rcx
movapd (%r8), %xmm2
movsd %xmm2, %xmm1            # xmm1 = xmm2[0],xmm1[1]
shufpd $0x2, %xmm2, %xmm0      # xmm0 = xmm0[0],xmm2[1]
movapd %xmm0, %xmm2
shufps $0x88, %xmm1, %xmm2     # xmm2 = xmm2[0,2],xmm1[0,2]
shufps $0xdd, %xmm1, %xmm0     # xmm0 = xmm0[1,3],xmm1[1,3]
movaps %xmm0, 0x10(%rdx)
movaps %xmm2, (%rdx)
movslq %r10d, %rdx
leaq (%rsi,%rdx,4), %rdx
addq $0x10, %rdx
movapd -0x10(%rdx), %xmm0
cmpl $0x40, %edi
jl 0x2d9c
decl %eax
movapd %xmm0, %xmm1
movapd %xmm1, %xmm2
movapd (%rdx), %xmm3
movapd 0x10(%rdx), %xmm1
addq $0x20, %rdx
movsd %xmm3, %xmm2            # xmm2 = xmm3[0],xmm2[1]
movsd %xmm1, %xmm3            # xmm3 = xmm1[0],xmm3[1]
movapd %xmm3, %xmm4
shufps $0x88, %xmm2, %xmm4     # xmm4 = xmm4[0,2],xmm2[0,2]
shufps $0xdd, %xmm2, %xmm3     # xmm3 = xmm3[1,3],xmm2[1,3]
movaps %xmm3, 0x10(%rcx)
movaps %xmm4, (%rcx)
addq $-0x80, %rcx
decl %eax
jne 0x2d66
jmp 0x2da0
movapd %xmm0, %xmm1
movapd (%rdx), %xmm2
movsd %xmm2, %xmm1            # xmm1 = xmm2[0],xmm1[1]
shufpd $0x2, %xmm2, %xmm0      # xmm0 = xmm0[0],xmm2[1]
movapd %xmm0, %xmm2
shufps $0x88, %xmm1, %xmm2     # xmm2 = xmm2[0,2],xmm1[0,2]
shufps $0xdd, %xmm1, %xmm0     # xmm0 = xmm0[1,3],xmm1[1,3]
movaps %xmm0, 0x10(%rcx)
movaps %xmm2, (%rcx)
jmp 0x2e4e
movapd %xmm1, %xmm2
movsd %xmm0, %xmm2            # xmm2 = xmm0[0],xmm2[1]
movapd %xmm2, -0x10(%rcx)
movapd 0x60(%rsi), %xmm1
movapd 0x70(%rsi), %xmm2
movapd %xmm1, %xmm0
unpcklps %xmm2, %xmm0            # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
unpckhps %xmm2, %xmm1            # xmm1 = xmm1[2],xmm2[2],xmm1[3],xmm2[3]
movapd %xmm0, %xmm2
movsd %xmm1, %xmm2            # xmm2 = xmm1[0],xmm2[1]
leaq (%rdx,%rdi,4), %rcx
addq $-0x10, %rcx
movapd %xmm2, -0x10(%rdx,%rdi,4)
cmpl $0x40, %edi
jl 0x2e41
addq $0xf0, %rsi
decl %eax
movapd -0x10(%rsi), %xmm2
movapd (%rsi), %xmm3
movapd %xmm2, %xmm4
unpcklps %xmm3, %xmm4            # xmm4 = xmm4[0],xmm3[0],xmm4[1],xmm3[1]
unpckhps %xmm3, %xmm2            # xmm2 = xmm2[2],xmm3[2],xmm2[3],xmm3[3]
movsd %xmm4, %xmm1            # xmm1 = xmm4[0],xmm1[1]
movapd %xmm1, -0x10(%rcx)
movsd %xmm2, %xmm4            # xmm4 = xmm2[0],xmm4[1]
movapd %xmm4, -0x20(%rcx)
addq $-0x20, %rcx
subq $-0x80, %rsi
movapd %xmm2, %xmm1
decl %eax
jne 0x2e0a
jmp 0x2e45
movapd %xmm1, %xmm2
movsd %xmm0, %xmm2            # xmm2 = xmm0[0],xmm2[1]
movapd %xmm2, -0x10(%rcx)
popq %rax
retq
leaq 0x5615(%rip), %rdi      # 0x846c
leaq 0x53cb(%rip), %rsi      # 0x8229
leaq 0x5611(%rip), %rcx      # 0x8476
movl $0x51a, %edx            # imm = 0x51A
callq 0x1090