// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x180, %rsp            # imm = 0x180
movq %rdi, -0xc8(%rbp)
movq %rsi, -0xd0(%rbp)
movq %rdx, -0xd8(%rbp)
movl %ecx, -0xdc(%rbp)
movq -0xc8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0xe4(%rbp)
movq -0xc8(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0xe8(%rbp)
movq -0xd0(%rbp), %rax
movq %rax, -0xf0(%rbp)
movq -0xd8(%rbp), %rax
movq %rax, -0xf8(%rbp)
movq -0xd0(%rbp), %rax
cmpq -0xd8(%rbp), %rax
je 0x6783
jmp 0x67a2
leaq 0x1202d(%rip), %rdi     # 0x187b7
leaq 0x11a4d(%rip), %rsi     # 0x181de
movl $0x51a, %edx            # imm = 0x51A
leaq 0x12024(%rip), %rcx     # 0x187c1
callq 0x1090
movq -0xc8(%rbp), %rax
cmpl $0x0, 0x44(%rax)
jne 0x6be6
movl -0xe4(%rbp), %eax
movl $0x20, %ecx
cltd
idivl %ecx
movl %eax, -0xfc(%rbp)
cmpl $0x0, -0xdc(%rbp)
jne 0x69ed
movl $0x0, -0xe0(%rbp)
movl -0xe0(%rbp), %eax
cmpl -0xfc(%rbp), %eax
jge 0x697d
movq -0xf0(%rbp), %rax
movl -0xe0(%rbp), %ecx
shll $0x3, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
movaps (%rax,%rcx), %xmm1
movaps 0x10(%rax,%rcx), %xmm0
movaps %xmm1, -0x70(%rbp)
movaps %xmm0, -0x80(%rbp)
movaps -0x70(%rbp), %xmm0
movaps -0x80(%rbp), %xmm1
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movaps %xmm0, -0x110(%rbp)
movq -0xf0(%rbp), %rax
movl -0xe0(%rbp), %ecx
shll $0x3, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
movaps (%rax,%rcx), %xmm1
movaps 0x10(%rax,%rcx), %xmm0
movaps %xmm1, -0x10(%rbp)
movaps %xmm0, -0x20(%rbp)
movaps -0x10(%rbp), %xmm0
movaps -0x20(%rbp), %xmm1
unpckhps %xmm1, %xmm0            # xmm0 = xmm0[2],xmm1[2],xmm0[3],xmm1[3]
movq -0xf8(%rbp), %rax
movl -0xe0(%rbp), %ecx
addl %ecx, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
movaps %xmm0, 0x10(%rax,%rcx)
movaps -0x110(%rbp), %xmm0
movq -0xf8(%rbp), %rax
movl -0xe0(%rbp), %ecx
addl %ecx, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
movaps %xmm0, (%rax,%rcx)
movq -0xf0(%rbp), %rax
movl -0xe0(%rbp), %ecx
shll $0x3, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
movaps 0x40(%rax,%rcx), %xmm1
movaps 0x50(%rax,%rcx), %xmm0
movaps %xmm1, -0x90(%rbp)
movaps %xmm0, -0xa0(%rbp)
movaps -0x90(%rbp), %xmm0
movaps -0xa0(%rbp), %xmm1
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movaps %xmm0, -0x120(%rbp)
movq -0xf0(%rbp), %rax
movl -0xe0(%rbp), %ecx
shll $0x3, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
movaps 0x40(%rax,%rcx), %xmm1
movaps 0x50(%rax,%rcx), %xmm0
movaps %xmm1, -0x30(%rbp)
movaps %xmm0, -0x40(%rbp)
movaps -0x30(%rbp), %xmm0
movaps -0x40(%rbp), %xmm1
unpckhps %xmm1, %xmm0            # xmm0 = xmm0[2],xmm1[2],xmm0[3],xmm1[3]
movq -0xf8(%rbp), %rax
movl -0xfc(%rbp), %ecx
shll %ecx
addl -0xe0(%rbp), %ecx
shll %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movaps %xmm0, (%rax)
movaps -0x120(%rbp), %xmm0
movq -0xf8(%rbp), %rax
movl -0xfc(%rbp), %ecx
shll %ecx
addl -0xe0(%rbp), %ecx
shll %ecx
addl $0x0, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movaps %xmm0, (%rax)
movl -0xe0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xe0(%rbp)
jmp 0x67de
movl -0xfc(%rbp), %edi
movq -0xf0(%rbp), %rsi
addq $0x20, %rsi
movq -0xd8(%rbp), %rcx
movl -0xe4(%rbp), %eax
movl $0x2, %r8d
cltd
idivl %r8d
cltq
shlq $0x2, %rax
addq %rax, %rcx
movl $0x8, %edx
callq 0x6e30
movl -0xfc(%rbp), %edi
movq -0xf0(%rbp), %rsi
addq $0x60, %rsi
movq -0xd8(%rbp), %rcx
movslq -0xe4(%rbp), %rax
shlq $0x2, %rax
addq %rax, %rcx
movl $0x8, %edx
callq 0x6e30
jmp 0x6be1
movl $0x0, -0xe0(%rbp)
movl -0xe0(%rbp), %eax
cmpl -0xfc(%rbp), %eax
jge 0x6b52
movq -0xf0(%rbp), %rax
movl -0xe0(%rbp), %ecx
addl %ecx, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
movaps (%rax,%rcx), %xmm0
movaps 0x10(%rax,%rcx), %xmm1
shufps $0x88, %xmm1, %xmm0     # xmm0 = xmm0[0,2],xmm1[0,2]
movaps %xmm0, -0x130(%rbp)
movq -0xf0(%rbp), %rax
movl -0xe0(%rbp), %ecx
movl %ecx, %edx
addl %edx, %edx
movslq %edx, %rdx
shlq $0x4, %rdx
movaps (%rax,%rdx), %xmm0
movaps 0x10(%rax,%rdx), %xmm1
shufps $0xdd, %xmm1, %xmm0     # xmm0 = xmm0[1,3],xmm1[1,3]
movq -0xf8(%rbp), %rax
shll $0x3, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
movaps %xmm0, 0x10(%rax,%rcx)
movaps -0x130(%rbp), %xmm0
movq -0xf8(%rbp), %rax
movl -0xe0(%rbp), %ecx
shll $0x3, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
movaps %xmm0, (%rax,%rcx)
movq -0xf0(%rbp), %rax
movl -0xfc(%rbp), %ecx
movl -0xe0(%rbp), %esi
movl %ecx, %edx
movl %esi, %ecx
leal (%rcx,%rdx,2), %ecx
addl %ecx, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
movaps (%rax,%rcx), %xmm0
movaps 0x10(%rax,%rcx), %xmm1
shufps $0x88, %xmm1, %xmm0     # xmm0 = xmm0[0,2],xmm1[0,2]
movaps %xmm0, -0x140(%rbp)
movq -0xf0(%rbp), %rax
movl -0xfc(%rbp), %ecx
movl -0xe0(%rbp), %esi
movl %ecx, %edx
movl %esi, %ecx
leal (%rcx,%rdx,2), %ecx
addl %ecx, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
movaps (%rax,%rcx), %xmm0
movaps 0x10(%rax,%rcx), %xmm1
shufps $0xdd, %xmm1, %xmm0     # xmm0 = xmm0[1,3],xmm1[1,3]
movq -0xf8(%rbp), %rax
movl -0xe0(%rbp), %ecx
shll $0x3, %ecx
addl $0x5, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movaps %xmm0, (%rax)
movaps -0x140(%rbp), %xmm0
movq -0xf8(%rbp), %rax
movl -0xe0(%rbp), %ecx
shll $0x3, %ecx
addl $0x4, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movaps %xmm0, (%rax)
movl -0xe0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xe0(%rbp)
jmp 0x69f7
movl -0xfc(%rbp), %edi
movq -0xd0(%rbp), %rsi
movl -0xe4(%rbp), %eax
movl $0x4, %ecx
cltd
idivl %ecx
cltq
shlq $0x2, %rax
addq %rax, %rsi
movq -0xd8(%rbp), %rdx
movslq -0xe4(%rbp), %rax
shlq $0x2, %rax
addq %rax, %rdx
addq $-0x60, %rdx
movl $0xfffffff8, %ecx       # imm = 0xFFFFFFF8
callq 0x7050
movl -0xfc(%rbp), %edi
movq -0xd0(%rbp), %rsi
imull $0x3, -0xe4(%rbp), %eax
movl $0x4, %ecx
cltd
idivl %ecx
cltq
shlq $0x2, %rax
addq %rax, %rsi
movq -0xd8(%rbp), %rdx
movslq -0xe4(%rbp), %rax
shlq $0x2, %rax
addq %rax, %rdx
addq $-0x20, %rdx
movl $0xfffffff8, %ecx       # imm = 0xFFFFFFF8
callq 0x7050
jmp 0x6e18
cmpl $0x0, -0xdc(%rbp)
jne 0x6d1b
movl $0x0, -0xe0(%rbp)
movl -0xe0(%rbp), %eax
cmpl -0xe8(%rbp), %eax
jge 0x6d16
movl -0xe0(%rbp), %ecx
movl %ecx, %eax
addl $0x3, %eax
testl %ecx, %ecx
movl %ecx, %edx
cmovsl %eax, %edx
movl %edx, %eax
sarl $0x2, %eax
andl $-0x4, %edx
subl %edx, %ecx
movl -0xe8(%rbp), %edx
movl %edx, %esi
addl $0x3, %esi
testl %edx, %edx
cmovsl %esi, %edx
sarl $0x2, %edx
imull %edx, %ecx
addl %ecx, %eax
movl %eax, -0x144(%rbp)
movq -0xf0(%rbp), %rax
movl -0xe0(%rbp), %ecx
addl %ecx, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
movaps (%rax,%rcx), %xmm1
movaps 0x10(%rax,%rcx), %xmm0
movaps %xmm1, -0xb0(%rbp)
movaps %xmm0, -0xc0(%rbp)
movaps -0xb0(%rbp), %xmm0
movaps -0xc0(%rbp), %xmm1
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movaps %xmm0, -0x160(%rbp)
movq -0xf0(%rbp), %rax
movl -0xe0(%rbp), %ecx
addl %ecx, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
movaps (%rax,%rcx), %xmm1
movaps 0x10(%rax,%rcx), %xmm0
movaps %xmm1, -0x50(%rbp)
movaps %xmm0, -0x60(%rbp)
movaps -0x50(%rbp), %xmm0
movaps -0x60(%rbp), %xmm1
unpckhps %xmm1, %xmm0            # xmm0 = xmm0[2],xmm1[2],xmm0[3],xmm1[3]
movq -0xf8(%rbp), %rax
movl -0x144(%rbp), %ecx
shll %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movaps %xmm0, (%rax)
movaps -0x160(%rbp), %xmm0
movq -0xf8(%rbp), %rax
movl -0x144(%rbp), %ecx
shll %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movaps %xmm0, (%rax)
movl -0xe0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xe0(%rbp)
jmp 0x6bfd
jmp 0x6e16
movl $0x0, -0xe0(%rbp)
movl -0xe0(%rbp), %eax
cmpl -0xe8(%rbp), %eax
jge 0x6e14
movl -0xe0(%rbp), %ecx
movl %ecx, %eax
addl $0x3, %eax
testl %ecx, %ecx
movl %ecx, %edx
cmovsl %eax, %edx
movl %edx, %eax
sarl $0x2, %eax
andl $-0x4, %edx
subl %edx, %ecx
movl -0xe8(%rbp), %edx
movl %edx, %esi
addl $0x3, %esi
testl %edx, %edx
cmovsl %esi, %edx
sarl $0x2, %edx
imull %edx, %ecx
addl %ecx, %eax
movl %eax, -0x164(%rbp)
movq -0xf0(%rbp), %rax
movl -0x164(%rbp), %ecx
addl %ecx, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
movaps (%rax,%rcx), %xmm0
movaps 0x10(%rax,%rcx), %xmm1
shufps $0x88, %xmm1, %xmm0     # xmm0 = xmm0[0,2],xmm1[0,2]
movaps %xmm0, -0x180(%rbp)
movq -0xf0(%rbp), %rax
movl -0x164(%rbp), %ecx
addl %ecx, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
movaps (%rax,%rcx), %xmm0
movaps 0x10(%rax,%rcx), %xmm1
shufps $0xdd, %xmm1, %xmm0     # xmm0 = xmm0[1,3],xmm1[1,3]
movq -0xf8(%rbp), %rax
movl -0xe0(%rbp), %ecx
shll %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movaps %xmm0, (%rax)
movaps -0x180(%rbp), %xmm0
movq -0xf8(%rbp), %rax
movl -0xe0(%rbp), %ecx
shll %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movaps %xmm0, (%rax)
movl -0xe0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xe0(%rbp)
jmp 0x6d25
jmp 0x6e16
jmp 0x6e18
addq $0x180, %rsp            # imm = 0x180
popq %rbp
retq
nopw %cs:(%rax,%rax)