// File: /workspace/github_c_makefile_star2_O2/diaxen[P]fft-garden/mr_dit_dr_S_P.c
// Function: mr_dit_dr
static inline void
mr_dit_dr(const complex double * restrict in,
	      complex double * restrict out,
	      int s, int log2_N)
{
  unsigned l = 1 << (log2_N - s);
  unsigned stride = 1 << s;

  switch (l)
    {
    case 2:			/* last stage radix 2 */
      ct_dit_bf2_0(1, stride, out, in);
      break;

    case 4:			/* last stage radix 4 */
      mr_dit_bf4_0(1, stride, out, in);
      break;

    default:
      l >>= 2;
      mr_dit_dr(in,              out,         s + 2, log2_N);
      mr_dit_dr(in + stride,     out + l,     s + 2, log2_N);
      mr_dit_dr(in + stride * 2, out + 2 * l, s + 2, log2_N);
      mr_dit_dr(in + stride * 3, out + 3 * l, s + 2, log2_N);

      mr_dit_bf4_0(l, l, out, out);
      mr_dit_bf4_1(l, out + l / 2);

      for (unsigned k = 1; k < l / 2; k++)
        {
          complex double w1 = get_twiddle(k << s, log2_N);
          complex double w2 = get_twiddle(k * 2 << s, log2_N);
          complex double w3 = get_twiddle(k * 3 << s, log2_N);
          mr_dit_bf4(l, out + k, w1, w2, w3);
          mr_dit_bf4(l, out + l - k, conj(w1 * I), -conj(w2), -conj(w3 * I));
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rsi, %r8
movq %rdi, %r12
movl %ecx, 0x14(%rsp)
subl %edx, %ecx
pushq $0x1
popq %r13
movl %r13d, %ebx
shll %cl, %ebx
movq %rdx, 0x20(%rsp)
movl %edx, %ecx
shll %cl, %r13d
cmpl $0x4, %ebx
je 0x1920
cmpl $0x2, %ebx
jne 0x1942
movl %r13d, %eax
shlq $0x4, %rax
movupd (%r12), %xmm0
movupd (%r12,%rax), %xmm1
movapd %xmm0, %xmm2
addpd %xmm1, %xmm2
movupd %xmm2, (%r8)
subpd %xmm1, %xmm0
movupd %xmm0, 0x10(%r8)
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x1
popq %rdi
movl %r13d, %esi
movq %r8, %rdx
movq %r12, %rcx
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1e6f
movl %ebx, %ebp
shrl $0x2, %ebp
movq %rbx, 0x40(%rsp)
movq 0x20(%rsp), %rax
leal 0x2(%rax), %ebx
movq %r12, %rdi
movq %r8, %r15
movq %r8, %rsi
movl %ebx, %edx
movl 0x14(%rsp), %ecx
callq 0x18aa
movl %r13d, %edi
movq %r15, %r13
shlq $0x4, %rdi
addq %r12, %rdi
movq %rbp, %rax
shlq $0x4, %rax
movq %rax, 0x38(%rsp)
leaq (%r15,%rax), %rsi
movl %ebx, %edx
movl %ebx, 0x8(%rsp)
movl 0x14(%rsp), %r14d
movl %r14d, %ecx
callq 0x18aa
pushq $0x2
popq %rax
movl %eax, 0x1c(%rsp)
movl %eax, %edi
movq 0x20(%rsp), %rcx
shll %cl, %edi
shlq $0x4, %rdi
addq %r12, %rdi
leal (,%rbp,2), %r15d
shlq $0x4, %r15
leaq (%r15,%r13), %rsi
movl %ebx, %edx
movl %r14d, %ecx
callq 0x18aa
pushq $0x3
popq %rax
movl %eax, 0x18(%rsp)
movl %eax, %edi
movq 0x20(%rsp), %rcx
movq 0x40(%rsp), %r14
shll %cl, %edi
shlq $0x4, %rdi
addq %r12, %rdi
leal (%rbp,%rbp,2), %ebx
shlq $0x4, %rbx
leaq (%rbx,%r13), %rsi
movl 0x8(%rsp), %edx
movl 0x14(%rsp), %ecx
callq 0x18aa
movl %ebp, %edi
movq %rbp, 0x68(%rsp)
movl %ebp, %esi
movq %r15, %rbp
movq %r13, %rdx
movq %r13, %rcx
callq 0x1e6f
shrl $0x3, %r14d
movq %r14, %rax
shlq $0x4, %rax
leaq (%rax,%r13), %r12
movsd (%r13,%rax), %xmm6
movsd 0x8(%r13,%rax), %xmm7
movsd (%r15,%r12), %xmm0
movsd 0x8(%r15,%r12), %xmm1
movsd 0x1628(%rip), %xmm9     # 0x3070
movapd %xmm0, %xmm8
mulsd %xmm9, %xmm8
mulsd %xmm1, %xmm9
addsd %xmm1, %xmm8
subsd %xmm0, %xmm9
ucomisd %xmm8, %xmm8
jp 0x1d64
addq %r12, %rbp
movq 0x38(%rsp), %r15
leaq (%r12,%r15), %rcx
movupd (%r12,%r15), %xmm0
movapd 0x17aa(%rip), %xmm1     # 0x3230
mulpd %xmm1, %xmm0
leaq (%r12,%rbx), %rax
movupd (%r12,%rbx), %xmm2
mulpd %xmm1, %xmm2
movapd %xmm0, %xmm10
unpckhpd %xmm0, %xmm10           # xmm10 = xmm10[1],xmm0[1]
movapd %xmm0, %xmm11
addsd %xmm10, %xmm11
subsd %xmm0, %xmm10
movapd %xmm2, %xmm12
unpckhpd %xmm2, %xmm12           # xmm12 = xmm12[1],xmm2[1]
movapd %xmm12, %xmm3
subsd %xmm2, %xmm3
xorpd 0x1563(%rip), %xmm12    # 0x3030
subsd %xmm2, %xmm12
movapd %xmm11, %xmm5
subsd %xmm3, %xmm5
movapd %xmm10, %xmm4
subsd %xmm12, %xmm4
xorpd %xmm2, %xmm2
movapd %xmm5, %xmm0
mulsd %xmm2, %xmm0
movapd %xmm4, %xmm1
mulsd %xmm2, %xmm1
subsd %xmm4, %xmm0
addsd %xmm5, %xmm1
ucomisd %xmm0, %xmm0
jp 0x1dab
addsd %xmm12, %xmm10
addsd %xmm3, %xmm11
movapd %xmm7, %xmm2
subsd %xmm9, %xmm2
movapd %xmm6, %xmm3
subsd %xmm8, %xmm3
addsd %xmm9, %xmm7
addsd %xmm8, %xmm6
movapd %xmm6, %xmm4
addsd %xmm11, %xmm4
movapd %xmm7, %xmm5
addsd %xmm10, %xmm5
movsd %xmm4, (%r12)
movsd %xmm5, 0x8(%r12)
movapd %xmm3, %xmm4
subsd %xmm0, %xmm4
movapd %xmm2, %xmm5
subsd %xmm1, %xmm5
movsd %xmm4, (%rcx)
movsd %xmm5, 0x8(%rcx)
subsd %xmm11, %xmm6
subsd %xmm10, %xmm7
movsd %xmm6, (%rbp)
movsd %xmm7, 0x8(%rbp)
addsd %xmm0, %xmm3
addsd %xmm1, %xmm2
movsd %xmm3, (%rax)
movsd %xmm2, 0x8(%rax)
leaq (%r15,%r13), %r12
addq $-0x10, %r12
addq $0x10, %r13
pushq $0x1
popq %rbp
cmpq %r14, %rbp
jae 0x190e
movq %r14, %rbx
movl %ebp, %edi
movq %r13, %r15
movq 0x20(%rsp), %r13
movl %r13d, %ecx
shll %cl, %edi
movl 0x14(%rsp), %r14d
movl %r14d, %esi
callq 0x1f8e
movsd %xmm0, 0x8(%rsp)
movsd %xmm1, 0x50(%rsp)
movl 0x1c(%rsp), %edi
movl %r13d, %ecx
shll %cl, %edi
movl %r14d, %esi
callq 0x1f8e
movapd %xmm0, 0x40(%rsp)
movsd %xmm1, 0x38(%rsp)
movl 0x18(%rsp), %edi
movl %r13d, %ecx
movq %r15, %r13
shll %cl, %edi
movl %r14d, %esi
callq 0x1f8e
movapd %xmm0, %xmm4
movapd %xmm1, %xmm5
movq 0x68(%rsp), %rdi
movq %r15, %rsi
movsd 0x8(%rsp), %xmm0
movsd 0x50(%rsp), %xmm1
movaps 0x40(%rsp), %xmm2
movsd 0x38(%rsp), %xmm3
movsd %xmm4, 0x30(%rsp)
movsd %xmm5, 0x28(%rsp)
callq 0x1fe3
movsd 0x50(%rsp), %xmm4
movsd 0x8(%rsp), %xmm2
movapd %xmm2, %xmm3
xorpd %xmm0, %xmm0
mulsd %xmm0, %xmm3
movapd %xmm4, %xmm1
mulsd %xmm0, %xmm1
subsd %xmm4, %xmm3
addsd %xmm2, %xmm1
ucomisd %xmm3, %xmm3
jp 0x1cec
movsd 0x30(%rsp), %xmm2
movapd %xmm2, %xmm4
xorpd %xmm0, %xmm0
mulsd %xmm0, %xmm4
movsd 0x28(%rsp), %xmm6
movapd %xmm6, %xmm5
mulsd %xmm0, %xmm5
subsd %xmm6, %xmm4
addsd %xmm2, %xmm5
ucomisd %xmm4, %xmm4
movq %rbx, %r14
jp 0x1d18
xorpd 0x138b(%rip), %xmm4     # 0x3030
movapd 0x1383(%rip), %xmm0     # 0x3030
xorpd %xmm0, %xmm1
movapd 0x40(%rsp), %xmm2
xorpd %xmm0, %xmm2
movq 0x68(%rsp), %rdi
movq %r12, %rsi
movapd %xmm3, %xmm0
movsd 0x38(%rsp), %xmm3
callq 0x1fe3
incq %rbp
addl $0x3, 0x18(%rsp)
addl $0x2, 0x1c(%rsp)
addq $0x10, %r13
addq $-0x10, %r12
jmp 0x1b9d
ucomisd %xmm1, %xmm1
jnp 0x1c6c
movapd %xmm2, %xmm0
xorpd %xmm2, %xmm2
movapd %xmm4, %xmm1
movsd 0x151e(%rip), %xmm3     # 0x3228
callq 0x23c0
movapd %xmm0, %xmm3
jmp 0x1c6c
ucomisd %xmm5, %xmm5
jnp 0x1c9d
xorpd %xmm2, %xmm2
movsd 0x30(%rsp), %xmm0
movapd %xmm1, 0x50(%rsp)
movsd 0x28(%rsp), %xmm1
movsd %xmm3, 0x8(%rsp)
movsd 0x14e2(%rip), %xmm3     # 0x3228
callq 0x23c0
movsd 0x8(%rsp), %xmm3
movapd %xmm0, %xmm4
movapd %xmm1, %xmm5
movapd 0x50(%rsp), %xmm1
jmp 0x1c9d
ucomisd %xmm9, %xmm9
jnp 0x1a6c
movsd 0x12f9(%rip), %xmm2     # 0x3070
movsd 0x14a1(%rip), %xmm3     # 0x3220
movsd %xmm6, 0x40(%rsp)
movsd %xmm7, 0x8(%rsp)
callq 0x23c0
movsd 0x8(%rsp), %xmm7
movsd 0x40(%rsp), %xmm6
movapd %xmm0, %xmm8
movapd %xmm1, %xmm9
jmp 0x1a6c
ucomisd %xmm1, %xmm1
jnp 0x1b0b
movapd %xmm3, 0x80(%rsp)
movsd 0x1462(%rip), %xmm3     # 0x3228
movapd %xmm5, %xmm0
movapd %xmm4, %xmm1
movsd %xmm6, 0x40(%rsp)
movsd %xmm7, 0x8(%rsp)
movsd %xmm8, 0x50(%rsp)
movsd %xmm9, 0x30(%rsp)
movq %rax, 0x28(%rsp)
movq %rcx, %rbx
movapd %xmm10, 0xa0(%rsp)
movapd %xmm11, 0x90(%rsp)
movapd %xmm12, 0x70(%rsp)
callq 0x23c0
movapd 0x70(%rsp), %xmm12
movapd 0x80(%rsp), %xmm3
movapd 0x90(%rsp), %xmm11
movapd 0xa0(%rsp), %xmm10
movq %rbx, %rcx
movq 0x28(%rsp), %rax
movsd 0x30(%rsp), %xmm9
movsd 0x50(%rsp), %xmm8
movsd 0x8(%rsp), %xmm7
movsd 0x40(%rsp), %xmm6
jmp 0x1b0b