// File: /workspace/github_c_makefile_star2_O2/diaxen[P]fft-garden/mr_dit_dr.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);

      for (unsigned k = 0; k < l; k++)
        mr_dit_bf4(l, out + k,
               get_twiddle(k << s, log2_N),
               get_twiddle(k * 2 << s, log2_N),
               get_twiddle_mr(k * 3 << s, log2_N));
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movl %ecx, %eax
movq %rsi, %rbx
subl %edx, %ecx
pushq $0x1
popq %r13
movl %r13d, %r15d
shll %cl, %r15d
movq %rdx, 0x60(%rsp)
movl %edx, %ecx
shll %cl, %r13d
movq %rdi, %r12
shlq $0x4, %r13
addq %rdi, %r13
cmpl $0x4, %r15d
je 0x1a1a
cmpl $0x2, %r15d
jne 0x1ad8
movupd (%r12), %xmm1
movupd (%r13), %xmm0
movapd %xmm1, %xmm2
addpd %xmm0, %xmm2
movupd %xmm2, (%rbx)
subpd %xmm0, %xmm1
pushq $0x18
popq %rax
pushq $0x10
jmp 0x1abb
pushq $0x2
popq %rax
movq 0x60(%rsp), %rcx
shll %cl, %eax
pushq $0x3
popq %rdx
shll %cl, %edx
shlq $0x4, %rax
shlq $0x4, %rdx
movupd (%r12), %xmm3
movupd (%r13), %xmm5
movupd (%r12,%rax), %xmm6
movupd (%r12,%rdx), %xmm7
movapd %xmm5, %xmm4
subpd %xmm7, %xmm4
xorpd %xmm0, %xmm0
mulpd %xmm4, %xmm0
movapd %xmm4, %xmm1
shufpd $0x1, %xmm4, %xmm1      # xmm1 = xmm1[1],xmm4[0]
movapd %xmm0, %xmm2
subpd %xmm1, %xmm2
addpd %xmm0, %xmm1
movapd %xmm1, %xmm0
movsd %xmm2, %xmm0            # xmm0 = xmm2[0],xmm0[1]
ucomisd %xmm2, %xmm2
jp 0x2014
movapd %xmm3, %xmm1
subpd %xmm6, %xmm1
addpd %xmm7, %xmm5
addpd %xmm6, %xmm3
movapd %xmm3, %xmm2
addpd %xmm5, %xmm2
movupd %xmm2, (%rbx)
movapd %xmm1, %xmm2
subpd %xmm0, %xmm2
movupd %xmm2, 0x10(%rbx)
subpd %xmm5, %xmm3
movupd %xmm3, 0x20(%rbx)
addpd %xmm0, %xmm1
pushq $0x38
popq %rax
pushq $0x30
popq %rcx
movlpd %xmm1, (%rbx,%rcx)
movhpd %xmm1, (%rbx,%rax)
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
shrl $0x2, %r15d
movq 0x60(%rsp), %rcx
leal 0x2(%rcx), %r14d
movq %r12, %rdi
movq %rbx, %rsi
movl %r14d, %edx
movl %r14d, 0x10(%rsp)
movl %eax, %ecx
movl %eax, 0x20(%rsp)
callq 0x19ae
movq %r15, %rbp
shlq $0x4, %rbp
addq %rbx, %rbp
movq %r13, %rdi
movq %rbp, %rsi
movl %r14d, %edx
movl 0x20(%rsp), %r13d
movl %r13d, %ecx
callq 0x19ae
pushq $0x2
popq %rdi
movq 0x60(%rsp), %r14
movl %r14d, %ecx
shll %cl, %edi
shlq $0x4, %rdi
addq %r12, %rdi
leal (%r15,%r15), %esi
movq %rsi, 0x50(%rsp)
shlq $0x4, %rsi
addq %rbx, %rsi
movl 0x10(%rsp), %edx
movl %r13d, %ecx
callq 0x19ae
pushq $0x3
popq %rdi
movl %r14d, %ecx
shll %cl, %edi
shlq $0x4, %rdi
addq %r12, %rdi
leal (%r15,%r15,2), %esi
shlq $0x4, %rsi
addq %rbx, %rsi
movl 0x10(%rsp), %edx
movl %r13d, %ecx
callq 0x19ae
movq 0x50(%rsp), %r8
movq %rbp, %rdi
imulq $0x30, %r15, %r12
addq %rbx, %r12
shlq $0x5, %r15
addq %rbx, %r15
xorl %r13d, %r13d
leaq 0x34ec(%rip), %r9       # 0x5080
xorpd %xmm6, %xmm6
movsd 0x16b0(%rip), %xmm3     # 0x3250
xorl %r14d, %r14d
xorl %ebp, %ebp
cmpq %r14, %r8
je 0x1ac6
movl %r13d, %eax
movq 0x60(%rsp), %rcx
shll %cl, %eax
movl %r14d, %edx
shll %cl, %edx
movq (%r9), %rsi
shlq $0x4, %rdx
movupd (%rsi,%rdx), %xmm7
movl %ebp, %edx
shll %cl, %edx
shlq $0x4, %rax
shlq $0x4, %rdx
movupd (%rsi,%rdx), %xmm5
movsd (%rbx,%r14,8), %xmm8
movsd 0x8(%rbx,%r14,8), %xmm9
movupd (%rsi,%rax), %xmm2
movupd (%rdi,%r14,8), %xmm0
movapd %xmm2, %xmm10
mulpd %xmm0, %xmm10
movapd %xmm2, %xmm1
shufpd $0x1, %xmm2, %xmm1      # xmm1 = xmm1[1],xmm2[0]
mulpd %xmm0, %xmm1
movapd %xmm10, %xmm4
unpckhpd %xmm10, %xmm4           # xmm4 = xmm4[1],xmm10[1]
subsd %xmm4, %xmm10
movapd %xmm1, %xmm11
unpckhpd %xmm1, %xmm11           # xmm11 = xmm11[1],xmm1[1]
addsd %xmm1, %xmm11
ucomisd %xmm10, %xmm10
jp 0x1d8a
movupd (%r15,%r14,8), %xmm0
movapd %xmm7, %xmm12
mulpd %xmm0, %xmm12
movapd %xmm7, %xmm1
shufpd $0x1, %xmm7, %xmm1      # xmm1 = xmm1[1],xmm7[0]
mulpd %xmm0, %xmm1
movapd %xmm12, %xmm2
unpckhpd %xmm12, %xmm2           # xmm2 = xmm2[1],xmm12[1]
subsd %xmm2, %xmm12
movapd %xmm1, %xmm13
unpckhpd %xmm1, %xmm13           # xmm13 = xmm13[1],xmm1[1]
addsd %xmm1, %xmm13
ucomisd %xmm12, %xmm12
jp 0x1e0f
movupd (%r12,%r14,8), %xmm0
movapd %xmm5, %xmm7
mulpd %xmm0, %xmm7
movapd %xmm5, %xmm1
shufpd $0x1, %xmm5, %xmm1      # xmm1 = xmm1[1],xmm5[0]
mulpd %xmm0, %xmm1
movapd %xmm7, %xmm2
unpckhpd %xmm7, %xmm2            # xmm2 = xmm2[1],xmm7[1]
subsd %xmm2, %xmm7
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
addsd %xmm1, %xmm2
ucomisd %xmm7, %xmm7
jp 0x1ea8
movapd %xmm10, %xmm5
subsd %xmm7, %xmm5
movapd %xmm11, %xmm4
subsd %xmm2, %xmm4
movapd %xmm5, %xmm0
mulsd %xmm6, %xmm0
movapd %xmm4, %xmm1
mulsd %xmm6, %xmm1
subsd %xmm4, %xmm0
addsd %xmm5, %xmm1
ucomisd %xmm0, %xmm0
jp 0x1f54
addsd %xmm2, %xmm11
addsd %xmm7, %xmm10
movapd %xmm9, %xmm2
subsd %xmm13, %xmm2
movapd %xmm8, %xmm7
subsd %xmm12, %xmm7
addsd %xmm13, %xmm9
addsd %xmm12, %xmm8
movapd %xmm8, %xmm4
addsd %xmm10, %xmm4
movapd %xmm9, %xmm5
addsd %xmm11, %xmm5
movsd %xmm4, (%rbx,%r14,8)
movsd %xmm5, 0x8(%rbx,%r14,8)
movapd %xmm7, %xmm4
subsd %xmm0, %xmm4
movapd %xmm2, %xmm5
subsd %xmm1, %xmm5
movsd %xmm4, (%rdi,%r14,8)
movsd %xmm5, 0x8(%rdi,%r14,8)
subsd %xmm10, %xmm8
subsd %xmm11, %xmm9
movsd %xmm8, (%r15,%r14,8)
movsd %xmm9, 0x8(%r15,%r14,8)
addsd %xmm0, %xmm7
addsd %xmm1, %xmm2
movsd %xmm7, (%r12,%r14,8)
movsd %xmm2, 0x8(%r12,%r14,8)
addl $0x3, %ebp
addq $0x2, %r14
incl %r13d
jmp 0x1ba5
ucomisd %xmm11, %xmm11
jnp 0x1c32
movapd %xmm2, %xmm3
unpckhpd %xmm2, %xmm3            # xmm3 = xmm3[1],xmm2[1]
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
movq %rdi, 0x10(%rsp)
movsd %xmm8, 0x20(%rsp)
movsd %xmm9, 0x8(%rsp)
movapd %xmm5, 0x30(%rsp)
movapd %xmm7, 0x40(%rsp)
callq 0x2090
movapd 0x40(%rsp), %xmm7
movapd 0x30(%rsp), %xmm5
movsd 0x8(%rsp), %xmm9
movsd 0x20(%rsp), %xmm8
movsd 0x1465(%rip), %xmm3     # 0x3250
xorpd %xmm6, %xmm6
leaq 0x328a(%rip), %r9       # 0x5080
movq 0x50(%rsp), %r8
movq 0x10(%rsp), %rdi
movapd %xmm0, %xmm10
movapd %xmm1, %xmm11
jmp 0x1c32
ucomisd %xmm13, %xmm13
jnp 0x1c78
movapd %xmm7, %xmm2
movapd %xmm7, %xmm3
unpckhpd %xmm7, %xmm3            # xmm3 = xmm3[1],xmm7[1]
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
movq %rdi, 0x10(%rsp)
movsd %xmm8, 0x20(%rsp)
movsd %xmm9, 0x8(%rsp)
movapd %xmm10, 0x40(%rsp)
movapd %xmm11, 0x70(%rsp)
movapd %xmm5, 0x30(%rsp)
callq 0x2090
movapd 0x30(%rsp), %xmm5
movapd 0x70(%rsp), %xmm11
movapd 0x40(%rsp), %xmm10
movsd 0x8(%rsp), %xmm9
movsd 0x20(%rsp), %xmm8
movsd 0x13cc(%rip), %xmm3     # 0x3250
xorpd %xmm6, %xmm6
leaq 0x31f1(%rip), %r9       # 0x5080
movq 0x50(%rsp), %r8
movq 0x10(%rsp), %rdi
movapd %xmm0, %xmm12
movapd %xmm1, %xmm13
jmp 0x1c78
ucomisd %xmm2, %xmm2
jnp 0x1cb5
movapd %xmm5, %xmm2
movapd %xmm5, %xmm3
unpckhpd %xmm5, %xmm3            # xmm3 = xmm3[1],xmm5[1]
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
movq %rdi, 0x10(%rsp)
movsd %xmm8, 0x20(%rsp)
movsd %xmm9, 0x8(%rsp)
movapd %xmm10, 0x40(%rsp)
movapd %xmm11, 0x70(%rsp)
movapd %xmm12, 0x30(%rsp)
movapd %xmm13, 0x80(%rsp)
callq 0x2090
movapd 0x80(%rsp), %xmm13
movapd 0x30(%rsp), %xmm12
movapd 0x70(%rsp), %xmm11
movapd 0x40(%rsp), %xmm10
movsd 0x8(%rsp), %xmm9
movsd 0x20(%rsp), %xmm8
movsd 0x131e(%rip), %xmm3     # 0x3250
xorpd %xmm6, %xmm6
leaq 0x3143(%rip), %r9       # 0x5080
movq 0x50(%rsp), %r8
movq 0x10(%rsp), %rdi
movapd %xmm0, %xmm7
movapd %xmm1, %xmm2
jmp 0x1cb5
ucomisd %xmm1, %xmm1
jnp 0x1ce9
movapd %xmm2, 0x90(%rsp)
xorpd %xmm2, %xmm2
movapd %xmm5, %xmm0
movapd %xmm4, %xmm1
movq %rdi, 0x10(%rsp)
movsd %xmm8, 0x20(%rsp)
movsd %xmm9, 0x8(%rsp)
movapd %xmm10, 0x40(%rsp)
movapd %xmm11, 0x70(%rsp)
movapd %xmm12, 0x30(%rsp)
movapd %xmm13, 0x80(%rsp)
movapd %xmm7, 0xa0(%rsp)
callq 0x2090
movapd 0x90(%rsp), %xmm2
movapd 0xa0(%rsp), %xmm7
movapd 0x80(%rsp), %xmm13
movapd 0x30(%rsp), %xmm12
movapd 0x70(%rsp), %xmm11
movapd 0x40(%rsp), %xmm10
movsd 0x8(%rsp), %xmm9
movsd 0x20(%rsp), %xmm8
movsd 0x1256(%rip), %xmm3     # 0x3250
xorpd %xmm6, %xmm6
leaq 0x307b(%rip), %r9       # 0x5080
movq 0x50(%rsp), %r8
movq 0x10(%rsp), %rdi
jmp 0x1ce9
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
ucomisd %xmm1, %xmm1
jnp 0x1a80
movapd %xmm4, %xmm1
unpckhpd %xmm4, %xmm1            # xmm1 = xmm1[1],xmm4[1]
movapd %xmm3, 0x60(%rsp)
movsd 0x1218(%rip), %xmm3     # 0x3250
xorpd %xmm2, %xmm2
movapd %xmm4, %xmm0
movapd %xmm5, 0x10(%rsp)
movapd %xmm6, 0x50(%rsp)
movapd %xmm7, 0x20(%rsp)
callq 0x2090
movapd 0x20(%rsp), %xmm7
movapd 0x50(%rsp), %xmm6
movapd 0x10(%rsp), %xmm5
movapd 0x60(%rsp), %xmm3
unpcklpd %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0]
jmp 0x1a80