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

      unsigned k;
      for (k = 1; k < l / 2; 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));
      for (k++; 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 $0x98, %rsp
movq %rsi, 0x8(%rsp)
movq %rdi, %r12
movl %ecx, 0x2c(%rsp)
subl %edx, %ecx
pushq $0x1
popq %r13
movl %r13d, %eax
shll %cl, %eax
movl %edx, %ecx
shll %cl, %r13d
cmpl $0x4, %eax
je 0x1920
cmpl $0x2, %eax
jne 0x1944
movl %r13d, %eax
shlq $0x4, %rax
movupd (%r12), %xmm0
movupd (%r12,%rax), %xmm1
movapd %xmm0, %xmm2
addpd %xmm1, %xmm2
movq 0x8(%rsp), %rax
movupd %xmm2, (%rax)
subpd %xmm1, %xmm0
movupd %xmm0, 0x10(%rax)
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x1
popq %rdi
movl %r13d, %esi
movq 0x8(%rsp), %rdx
movq %r12, %rcx
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1de2
movl %eax, %ebp
shrl $0x2, %ebp
movq %rdx, 0x30(%rsp)
leal 0x2(%rdx), %r15d
movq %r12, %rdi
movq 0x8(%rsp), %rbx
movq %rbx, %rsi
movq %rax, 0x38(%rsp)
movl %r15d, %edx
movl 0x2c(%rsp), %r14d
movl %r14d, %ecx
callq 0x18aa
movl %r13d, %edi
shlq $0x4, %rdi
addq %r12, %rdi
movq %rbp, %rax
shlq $0x4, %rax
movq %rax, 0x20(%rsp)
leaq (%rbx,%rax), %rsi
movl %r15d, %edx
movl %r14d, %ecx
callq 0x18aa
pushq $0x2
popq %rdi
movq 0x30(%rsp), %rcx
shll %cl, %edi
shlq $0x4, %rdi
addq %r12, %rdi
leal (,%rbp,2), %r13d
shlq $0x4, %r13
leaq (%rbx,%r13), %rsi
movl %r15d, %edx
movl %r14d, %ecx
callq 0x18aa
pushq $0x3
popq %rdi
movq 0x30(%rsp), %rcx
shll %cl, %edi
shlq $0x4, %rdi
addq %r12, %rdi
leal (%rbp,%rbp,2), %r12d
shlq $0x4, %r12
leaq (%rbx,%r12), %rsi
movl %r15d, %edx
movl %r14d, %ecx
callq 0x18aa
movl %ebp, %edi
movq %rbp, 0x48(%rsp)
movl %ebp, %esi
movq %rbx, %rdx
movq %rbx, %rcx
callq 0x1de2
movq 0x38(%rsp), %rdx
shrl $0x3, %edx
movq %rdx, %rax
shlq $0x4, %rax
leaq (%rbx,%rax), %r15
movsd (%rbx,%rax), %xmm6
movsd 0x8(%rbx,%rax), %xmm7
movsd (%r13,%r15), %xmm0
movsd 0x8(%r13,%r15), %xmm1
movsd 0x163b(%rip), %xmm9     # 0x3070
movapd %xmm0, %xmm8
mulsd %xmm9, %xmm8
mulsd %xmm1, %xmm9
addsd %xmm1, %xmm8
subsd %xmm0, %xmm9
ucomisd %xmm8, %xmm8
jp 0x1cde
addq %r15, %r13
movq 0x20(%rsp), %rax
leaq (%r15,%rax), %rcx
movupd (%r15,%rax), %xmm0
movapd 0x17bd(%rip), %xmm1     # 0x3230
mulpd %xmm1, %xmm0
leaq (%r15,%r12), %rbp
movupd (%r15,%r12), %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 0x1576(%rip), %xmm12    # 0x3030
subsd %xmm2, %xmm12
movapd %xmm11, %xmm5
subsd %xmm3, %xmm5
movapd %xmm10, %xmm4
subsd %xmm12, %xmm4
xorpd %xmm1, %xmm1
movapd %xmm5, %xmm0
mulsd %xmm1, %xmm0
mulsd %xmm4, %xmm1
subsd %xmm4, %xmm0
addsd %xmm5, %xmm1
ucomisd %xmm0, %xmm0
jp 0x1d2b
movq 0x8(%rsp), %r12
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, (%r15)
movsd %xmm5, 0x8(%r15)
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, (%r13)
movsd %xmm7, 0x8(%r13)
addsd %xmm0, %xmm3
addsd %xmm1, %xmm2
movsd %xmm3, (%rbp)
movsd %xmm2, 0x8(%rbp)
addq $0x20, %r12
pushq $0x6
popq %r13
pushq $0x4
popq %r15
pushq $0x2
popq %rbp
movq %rdx, 0x38(%rsp)
movq 0x30(%rsp), %r14
movl 0x2c(%rsp), %ebx
leaq -0x1(%rbp), %rax
cmpq %rdx, %rax
jae 0x1c40
leaq -0x10(%r12), %rax
movq %rax, 0x8(%rsp)
leal -0x1(%rbp), %edi
movl %r14d, %ecx
shll %cl, %edi
movl %ebx, %esi
callq 0x22d8
movsd %xmm0, 0x20(%rsp)
movsd %xmm1, 0x18(%rsp)
leal -0x2(%r15), %edi
movl %r14d, %ecx
shll %cl, %edi
movl %ebx, %esi
callq 0x22d8
movsd %xmm0, 0x10(%rsp)
movsd %xmm1, 0x40(%rsp)
leal -0x3(%r13), %edi
movl %r14d, %ecx
shll %cl, %edi
movl %ebx, %esi
callq 0x232d
movapd %xmm0, %xmm4
movapd %xmm1, %xmm5
movq 0x48(%rsp), %rdi
movq 0x8(%rsp), %rsi
movsd 0x20(%rsp), %xmm0
movsd 0x18(%rsp), %xmm1
movsd 0x10(%rsp), %xmm2
movsd 0x40(%rsp), %xmm3
callq 0x1f01
movq 0x38(%rsp), %rdx
addl $0x3, %r13d
addl $0x2, %r15d
incq %rbp
addq $0x10, %r12
jmp 0x1b9a
movq 0x30(%rsp), %r14
movq 0x48(%rsp), %rbx
cmpq %rbx, %rbp
jae 0x190e
movl %ebp, %edi
movl %r14d, %ecx
shll %cl, %edi
movl 0x2c(%rsp), %ebx
movl %ebx, %esi
callq 0x22d8
movsd %xmm0, 0x8(%rsp)
movsd %xmm1, 0x20(%rsp)
movl %r15d, %edi
movl %r14d, %ecx
shll %cl, %edi
movl %ebx, %esi
callq 0x22d8
movsd %xmm0, 0x18(%rsp)
movsd %xmm1, 0x10(%rsp)
movl %r13d, %edi
movl %r14d, %ecx
shll %cl, %edi
movl %ebx, %esi
movq 0x48(%rsp), %rbx
callq 0x232d
movapd %xmm0, %xmm4
movapd %xmm1, %xmm5
movl %ebx, %edi
movq %r12, %rsi
movsd 0x8(%rsp), %xmm0
movsd 0x20(%rsp), %xmm1
movsd 0x18(%rsp), %xmm2
movsd 0x10(%rsp), %xmm3
callq 0x1f01
addl $0x3, %r13d
addl $0x2, %r15d
incq %rbp
addq $0x10, %r12
jmp 0x1c4a
ucomisd %xmm9, %xmm9
jnp 0x1a59
movsd 0x137f(%rip), %xmm2     # 0x3070
movsd 0x1527(%rip), %xmm3     # 0x3220
movq %rdx, %rbx
movsd %xmm6, 0x18(%rsp)
movsd %xmm7, 0x10(%rsp)
callq 0x2360
movsd 0x10(%rsp), %xmm7
movsd 0x18(%rsp), %xmm6
movq %rbx, %rdx
movapd %xmm0, %xmm8
movapd %xmm1, %xmm9
jmp 0x1a59
ucomisd %xmm1, %xmm1
movq 0x8(%rsp), %r12
jnp 0x1af9
movapd %xmm3, 0x60(%rsp)
movsd 0x14e0(%rip), %xmm3     # 0x3228
xorpd %xmm2, %xmm2
movapd %xmm5, %xmm0
movapd %xmm4, %xmm1
movq %rdx, %rbx
movsd %xmm6, 0x18(%rsp)
movsd %xmm7, 0x10(%rsp)
movsd %xmm8, 0x20(%rsp)
movsd %xmm9, 0x40(%rsp)
movq %rcx, %r14
movapd %xmm10, 0x80(%rsp)
movapd %xmm11, 0x70(%rsp)
movapd %xmm12, 0x50(%rsp)
callq 0x2360
movapd 0x50(%rsp), %xmm12
movapd 0x60(%rsp), %xmm3
movapd 0x70(%rsp), %xmm11
movapd 0x80(%rsp), %xmm10
movq %r14, %rcx
movsd 0x40(%rsp), %xmm9
movsd 0x20(%rsp), %xmm8
movsd 0x10(%rsp), %xmm7
movsd 0x18(%rsp), %xmm6
movq %rbx, %rdx
jmp 0x1af9