// File: /workspace/github_c_makefile_star2_O3/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 0x2e09
cmpl $0x0, 0x44(%rdi)
je 0x2a48
movl 0x4(%rdi), %eax
testl %ecx, %ecx
je 0x2b45
testl %eax, %eax
jle 0x2e07
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 0x29f2
jmp 0x2e07
movslq (%rdi), %r8
movl %r8d, %edi
leal 0x1f(%r8), %eax
testl %r8d, %r8d
cmovnsl %r8d, %eax
sarl $0x5, %eax
testl %ecx, %ecx
je 0x2bab
cmpl $0x1f, %edi
jle 0x2c93
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 0x2a89
movl %edi, %ecx
andl $-0x4, %ecx
leaq (%rdx,%rdi,4), %r9
addq $-0x60, %r9
leaq (%rsi,%rcx), %r10
addq $0x10, %r10
movapd -0x10(%r10), %xmm0
cmpl $0x40, %edi
setge %cl
jl 0x2d4b
leal -0x1(%rax), %r8d
movapd %xmm0, %xmm1
movapd %xmm1, %xmm2
movapd (%r10), %xmm3
movapd 0x10(%r10), %xmm1
addq $0x20, %r10
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(%r9)
movaps %xmm4, (%r9)
addq $-0x80, %r9
decl %r8d
jne 0x2b04
movq %rdi, %r8
jmp 0x2d54
testl %eax, %eax
jle 0x2e07
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 0x2b58
jmp 0x2e07
cmpl $0x20, %r8d
jl 0x2c15
leal (,%rax,4), %r9d
movl %eax, %ecx
shlq $0x4, %r9
addq %rdx, %r9
addq $0x10, %r9
shlq $0x5, %rcx
xorl %r10d, %r10d
movaps (%rsi,%r10,4), %xmm0
movaps 0x10(%rsi,%r10,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,%r10)
movaps %xmm2, (%rdx,%r10)
movaps 0x40(%rsi,%r10,4), %xmm0
movaps 0x50(%rsi,%r10,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, (%r9,%r10)
movaps %xmm2, -0x10(%r9,%r10)
addq $0x20, %r10
cmpq %r10, %rcx
jne 0x2bcd
movl %r8d, %ecx
shrl $0x1f, %ecx
addl %r8d, %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 0x2cbe
leaq 0xb0(%rsi), %rdi
leal -0x1(%rax), %r9d
movapd -0x10(%rdi), %xmm2
movapd (%rdi), %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, %rdi
movapd %xmm2, %xmm1
decl %r9d
jne 0x2c5b
jmp 0x2cc2
leal 0x3(%rdi), %ecx
testl %edi, %edi
cmovnsl %edi, %ecx
sarl $0x2, %ecx
movslq %ecx, %rcx
leaq (%rdx,%r8,4), %r9
addq $-0x60, %r9
leaq (%rsi,%rcx,4), %r10
addq $0x10, %r10
movapd -0x10(%r10), %xmm0
xorl %ecx, %ecx
jmp 0x2d50
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,%r8,4), %rcx
addq $-0x10, %rcx
movapd %xmm2, (%rcx)
cmpl $0x40, %r8d
jl 0x2d39
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 0x2d02
jmp 0x2d3d
movapd %xmm1, %xmm2
movsd %xmm0, %xmm2            # xmm2 = xmm0[0],xmm2[1]
movapd %xmm2, -0x10(%rcx)
jmp 0x2e07
xorl %ecx, %ecx
movq %rdi, %r8
movapd %xmm0, %xmm1
movapd (%r10), %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(%r9)
movaps %xmm2, (%r9)
leal (%rdi,%rdi,2), %r9d
leal (%rdi,%rdi,2), %edi
addl $0x3, %edi
testl %r9d, %r9d
cmovnsl %r9d, %edi
sarl $0x2, %edi
movslq %edi, %rdi
leaq (%rdx,%r8,4), %rdx
addq $-0x20, %rdx
leaq (%rsi,%rdi,4), %rsi
addq $0x10, %rsi
movapd -0x10(%rsi), %xmm0
testb %cl, %cl
je 0x2de3
decl %eax
movapd %xmm0, %xmm1
movapd %xmm1, %xmm2
movapd (%rsi), %xmm3
movapd 0x10(%rsi), %xmm1
addq $0x20, %rsi
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 %eax
jne 0x2dad
jmp 0x2de7
movapd %xmm0, %xmm1
movapd (%rsi), %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)
popq %rax
retq
leaq 0x567c(%rip), %rdi      # 0x848c
leaq 0x5432(%rip), %rsi      # 0x8249
leaq 0x5678(%rip), %rcx      # 0x8496
movl $0x51a, %edx            # imm = 0x51A
callq 0x1090