// File: /workspace/github_c_makefile_star2_O1/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 $0x58, %rsp
movl %ecx, %ebp
movl %edx, %r8d
movl %ecx, %r12d
subl %edx, %r12d
movl $0x1, %r13d
movl $0x1, %ebx
movl %r12d, %ecx
shll %cl, %ebx
movl %r8d, %ecx
shll %cl, %r13d
movq %rdi, %r15
shlq $0x4, %r13
addq %rdi, %r13
cmpl $0x4, %ebx
je 0x1aac
cmpl $0x2, %ebx
jne 0x1bc4
movsd (%r15), %xmm3
movsd 0x8(%r15), %xmm2
movsd (%r13), %xmm0
movsd 0x8(%r13), %xmm1
movapd %xmm3, %xmm4
addsd %xmm0, %xmm4
movapd %xmm2, %xmm5
addsd %xmm1, %xmm5
movsd %xmm4, (%rsi)
movsd %xmm5, 0x8(%rsi)
subsd %xmm0, %xmm3
subsd %xmm1, %xmm2
movl $0x18, %eax
movl $0x10, %ecx
jmp 0x1bab
movsd (%r15), %xmm6
movsd 0x8(%r15), %xmm7
movsd (%r13), %xmm8
movl $0x2, %eax
movl %r8d, %ecx
shll %cl, %eax
movsd 0x8(%r13), %xmm9
shlq $0x4, %rax
movsd (%r15,%rax), %xmm10
movl $0x3, %edx
shll %cl, %edx
movsd 0x8(%r15,%rax), %xmm11
shlq $0x4, %rdx
movsd (%r15,%rdx), %xmm2
movsd 0x8(%r15,%rdx), %xmm3
movapd %xmm8, %xmm5
subsd %xmm2, %xmm5
movapd %xmm9, %xmm4
subsd %xmm3, %xmm4
xorpd %xmm1, %xmm1
movapd %xmm5, %xmm0
mulsd %xmm1, %xmm0
mulsd %xmm4, %xmm1
subsd %xmm4, %xmm0
addsd %xmm5, %xmm1
ucomisd %xmm0, %xmm0
jp 0x2157
addsd %xmm3, %xmm9
addsd %xmm2, %xmm8
movapd %xmm7, %xmm2
subsd %xmm11, %xmm2
movapd %xmm6, %xmm3
subsd %xmm10, %xmm3
addsd %xmm11, %xmm7
addsd %xmm10, %xmm6
movapd %xmm6, %xmm4
addsd %xmm8, %xmm4
movapd %xmm7, %xmm5
addsd %xmm9, %xmm5
movsd %xmm4, (%rsi)
movsd %xmm5, 0x8(%rsi)
movapd %xmm3, %xmm4
subsd %xmm0, %xmm4
movapd %xmm2, %xmm5
subsd %xmm1, %xmm5
movsd %xmm4, 0x10(%rsi)
movsd %xmm5, 0x18(%rsi)
subsd %xmm8, %xmm6
subsd %xmm9, %xmm7
movsd %xmm6, 0x20(%rsi)
movsd %xmm7, 0x28(%rsi)
addsd %xmm0, %xmm3
addsd %xmm1, %xmm2
movl $0x38, %eax
movl $0x30, %ecx
movsd %xmm3, (%rsi,%rcx)
movsd %xmm2, (%rsi,%rax)
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
shrl $0x2, %ebx
leal 0x2(%r8), %r14d
movq %r15, %rdi
movl %r14d, %edx
movl %ebp, %ecx
movq %rsi, 0x8(%rsp)
movq %r8, 0x38(%rsp)
callq 0x1a1e
movq %rbx, %rcx
shlq $0x4, %rcx
movq 0x8(%rsp), %rax
movq %rcx, (%rsp)
leaq (%rax,%rcx), %rsi
movq %r13, %rdi
movl %r14d, %edx
movl %ebp, %ecx
callq 0x1a1e
movl $0x2, %edi
movq 0x38(%rsp), %rcx
shll %cl, %edi
shlq $0x4, %rdi
addq %r15, %rdi
leal (%rbx,%rbx), %esi
shlq $0x4, %rsi
addq 0x8(%rsp), %rsi
movl %r14d, %edx
movl %ebp, %ecx
callq 0x1a1e
movl $0x3, %edi
movq 0x38(%rsp), %rcx
shll %cl, %edi
shlq $0x4, %rdi
addq %r15, %rdi
leal (%rbx,%rbx,2), %esi
shlq $0x4, %rsi
addq 0x8(%rsp), %rsi
movl %r14d, %edx
movl %ebp, %ecx
callq 0x1a1e
movq 0x38(%rsp), %rcx
movq 0x8(%rsp), %rdi
cmpl $0x2, %r12d
jb 0x1bb5
cmpl $0x2, %ebx
movl $0x1, %r8d
cmovael %ebx, %r8d
leaq (%rbx,%rbx,2), %rax
shlq $0x4, %rax
leaq (%rax,%rdi), %r12
addq $0x8, %r12
shlq $0x5, %rbx
leaq (%rbx,%rdi), %r13
addq $0x8, %r13
movq (%rsp), %rax
leaq (%rax,%rdi), %rbp
addq $0x8, %rbp
addl %r8d, %r8d
xorl %r15d, %r15d
leaq 0x33d5(%rip), %r9       # 0x5080
xorpd %xmm6, %xmm6
movsd 0x1599(%rip), %xmm7     # 0x3250
xorl %r14d, %r14d
xorl %ebx, %ebx
movl %r15d, %eax
shll %cl, %eax
movq (%r9), %rdx
shlq $0x4, %rax
movsd (%rdx,%rax), %xmm2
movl %r14d, %esi
shll %cl, %esi
movsd 0x8(%rdx,%rax), %xmm3
shlq $0x4, %rsi
movsd (%rdx,%rsi), %xmm15
movl %ebx, %eax
shll %cl, %eax
movsd 0x8(%rdx,%rsi), %xmm12
shlq $0x4, %rax
movsd (%rdx,%rax), %xmm13
movsd 0x8(%rdx,%rax), %xmm14
movsd (%rdi,%r14,8), %xmm8
movsd 0x8(%rdi,%r14,8), %xmm9
movsd -0x8(%rbp,%r14,8), %xmm0
movsd (%rbp,%r14,8), %xmm1
movapd %xmm2, %xmm10
mulsd %xmm0, %xmm10
movapd %xmm3, %xmm4
mulsd %xmm1, %xmm4
subsd %xmm4, %xmm10
movapd %xmm3, %xmm4
mulsd %xmm0, %xmm4
movapd %xmm2, %xmm11
mulsd %xmm1, %xmm11
addsd %xmm4, %xmm11
ucomisd %xmm10, %xmm10
jp 0x1ecd
movsd -0x8(%r13,%r14,8), %xmm0
movsd (%r13,%r14,8), %xmm1
movapd %xmm15, %xmm5
mulsd %xmm0, %xmm5
movapd %xmm12, %xmm2
mulsd %xmm1, %xmm2
subsd %xmm2, %xmm5
movapd %xmm12, %xmm2
mulsd %xmm0, %xmm2
movapd %xmm12, %xmm3
movapd %xmm15, %xmm12
mulsd %xmm1, %xmm12
addsd %xmm2, %xmm12
ucomisd %xmm5, %xmm5
jp 0x1f65
movsd -0x8(%r12,%r14,8), %xmm0
movsd (%r12,%r14,8), %xmm1
movapd %xmm13, %xmm15
mulsd %xmm0, %xmm15
movapd %xmm14, %xmm2
mulsd %xmm1, %xmm2
subsd %xmm2, %xmm15
movapd %xmm14, %xmm2
mulsd %xmm0, %xmm2
movapd %xmm13, %xmm3
mulsd %xmm1, %xmm3
addsd %xmm2, %xmm3
movsd %xmm3, (%rsp)
ucomisd %xmm15, %xmm15
jp 0x2001
movapd %xmm10, %xmm3
subsd %xmm15, %xmm3
movapd %xmm11, %xmm4
movsd (%rsp), %xmm2
subsd %xmm2, %xmm4
movapd %xmm3, %xmm0
mulsd %xmm6, %xmm0
movapd %xmm4, %xmm1
mulsd %xmm6, %xmm1
subsd %xmm4, %xmm0
addsd %xmm3, %xmm1
ucomisd %xmm0, %xmm0
jp 0x20a7
addsd %xmm2, %xmm11
addsd %xmm15, %xmm10
movapd %xmm9, %xmm2
subsd %xmm12, %xmm2
movapd %xmm8, %xmm3
subsd %xmm5, %xmm3
addsd %xmm12, %xmm9
addsd %xmm5, %xmm8
movapd %xmm8, %xmm4
addsd %xmm10, %xmm4
movapd %xmm9, %xmm5
addsd %xmm11, %xmm5
movsd %xmm4, (%rdi,%r14,8)
movsd %xmm5, 0x8(%rdi,%r14,8)
movapd %xmm3, %xmm4
subsd %xmm0, %xmm4
movapd %xmm2, %xmm5
subsd %xmm1, %xmm5
movsd %xmm4, -0x8(%rbp,%r14,8)
movsd %xmm5, (%rbp,%r14,8)
subsd %xmm10, %xmm8
subsd %xmm11, %xmm9
movsd %xmm8, -0x8(%r13,%r14,8)
movsd %xmm9, (%r13,%r14,8)
addsd %xmm0, %xmm3
addsd %xmm1, %xmm2
movsd %xmm3, -0x8(%r12,%r14,8)
movsd %xmm2, (%r12,%r14,8)
addl $0x3, %ebx
addq $0x2, %r14
incl %r15d
cmpq %r14, %r8
jne 0x1cbc
jmp 0x1bb5
ucomisd %xmm11, %xmm11
jnp 0x1d52
movq %r8, 0x30(%rsp)
movsd %xmm8, 0x28(%rsp)
movsd %xmm9, 0x20(%rsp)
movsd %xmm13, (%rsp)
movsd %xmm14, 0x40(%rsp)
movsd %xmm15, 0x18(%rsp)
movsd %xmm12, 0x10(%rsp)
callq 0x2200
movsd 0x10(%rsp), %xmm12
movsd 0x18(%rsp), %xmm15
movsd 0x40(%rsp), %xmm14
movsd (%rsp), %xmm13
movsd 0x20(%rsp), %xmm9
movsd 0x28(%rsp), %xmm8
movsd 0x1314(%rip), %xmm7     # 0x3250
xorpd %xmm6, %xmm6
leaq 0x3139(%rip), %r9       # 0x5080
movq 0x30(%rsp), %r8
movq 0x38(%rsp), %rcx
movq 0x8(%rsp), %rdi
movapd %xmm0, %xmm10
movapd %xmm1, %xmm11
jmp 0x1d52
ucomisd %xmm12, %xmm12
jnp 0x1d9d
movapd %xmm15, %xmm2
movq %r8, 0x30(%rsp)
movsd %xmm8, 0x28(%rsp)
movsd %xmm9, 0x20(%rsp)
movsd %xmm10, 0x18(%rsp)
movsd %xmm11, 0x10(%rsp)
movsd %xmm13, (%rsp)
movsd %xmm14, 0x40(%rsp)
callq 0x2200
movsd 0x40(%rsp), %xmm14
movsd (%rsp), %xmm13
movsd 0x10(%rsp), %xmm11
movsd 0x18(%rsp), %xmm10
movsd 0x20(%rsp), %xmm9
movsd 0x28(%rsp), %xmm8
movsd 0x1277(%rip), %xmm7     # 0x3250
xorpd %xmm6, %xmm6
leaq 0x309c(%rip), %r9       # 0x5080
movq 0x30(%rsp), %r8
movq 0x38(%rsp), %rcx
movq 0x8(%rsp), %rdi
movapd %xmm0, %xmm5
movapd %xmm1, %xmm12
jmp 0x1d9d
movsd (%rsp), %xmm4
ucomisd %xmm4, %xmm4
jnp 0x1de8
movapd %xmm14, %xmm3
movapd %xmm13, %xmm2
movq %r8, 0x30(%rsp)
movsd %xmm8, 0x28(%rsp)
movsd %xmm9, 0x20(%rsp)
movsd %xmm10, 0x18(%rsp)
movsd %xmm11, 0x10(%rsp)
movsd %xmm5, 0x40(%rsp)
movsd %xmm12, 0x48(%rsp)
callq 0x2200
movsd 0x48(%rsp), %xmm12
movsd 0x40(%rsp), %xmm5
movsd 0x10(%rsp), %xmm11
movsd 0x18(%rsp), %xmm10
movsd 0x20(%rsp), %xmm9
movsd 0x28(%rsp), %xmm8
movsd 0x11d2(%rip), %xmm7     # 0x3250
xorpd %xmm6, %xmm6
leaq 0x2ff7(%rip), %r9       # 0x5080
movq 0x30(%rsp), %r8
movq 0x38(%rsp), %rcx
movq 0x8(%rsp), %rdi
movapd %xmm0, %xmm15
movsd %xmm1, (%rsp)
jmp 0x1de8
ucomisd %xmm1, %xmm1
jnp 0x1e22
xorpd %xmm2, %xmm2
movapd %xmm3, %xmm0
movapd %xmm4, %xmm1
movapd %xmm7, %xmm3
movq %r8, 0x30(%rsp)
movsd %xmm8, 0x28(%rsp)
movsd %xmm9, 0x20(%rsp)
movsd %xmm10, 0x18(%rsp)
movsd %xmm11, 0x10(%rsp)
movsd %xmm5, 0x40(%rsp)
movsd %xmm12, 0x48(%rsp)
movsd %xmm15, 0x50(%rsp)
callq 0x2200
movsd (%rsp), %xmm2
movsd 0x50(%rsp), %xmm15
movsd 0x48(%rsp), %xmm12
movsd 0x40(%rsp), %xmm5
movsd 0x10(%rsp), %xmm11
movsd 0x18(%rsp), %xmm10
movsd 0x20(%rsp), %xmm9
movsd 0x28(%rsp), %xmm8
movsd 0x1118(%rip), %xmm7     # 0x3250
xorpd %xmm6, %xmm6
leaq 0x2f3d(%rip), %r9       # 0x5080
movq 0x30(%rsp), %r8
movq 0x38(%rsp), %rcx
movq 0x8(%rsp), %rdi
jmp 0x1e22
ucomisd %xmm1, %xmm1
jnp 0x1b2a
movsd %xmm3, 0x10(%rsp)
movsd 0x10e1(%rip), %xmm3     # 0x3250
movsd %xmm2, 0x18(%rsp)
xorpd %xmm2, %xmm2
movapd %xmm5, %xmm0
movapd %xmm4, %xmm1
movq %rsi, %rbx
movsd %xmm6, (%rsp)
movsd %xmm7, 0x8(%rsp)
movsd %xmm8, 0x38(%rsp)
movsd %xmm9, 0x30(%rsp)
movsd %xmm10, 0x28(%rsp)
movsd %xmm11, 0x20(%rsp)
callq 0x2200
movsd 0x10(%rsp), %xmm3
movsd 0x18(%rsp), %xmm2
movsd 0x20(%rsp), %xmm11
movsd 0x28(%rsp), %xmm10
movsd 0x30(%rsp), %xmm9
movsd 0x38(%rsp), %xmm8
movsd 0x8(%rsp), %xmm7
movsd (%rsp), %xmm6
movq %rbx, %rsi
jmp 0x1b2a