// File: /workspace/github_c_makefile_star2_O1/diaxen[P]fft-garden/sr_dit_dr_S_P.c
// Function: sr_dit_dr
static void
sr_dit_dr(unsigned log2_N,
	  const complex double * restrict in,
	  complex double * restrict out,
	  unsigned l, unsigned i)
{
  unsigned is = 1 << (log2_N - l);
  unsigned os = 1 << (l - 2);
  unsigned t = log2_N - l;

  switch (l)
    {
    case 1:                     /* size 2 base case  */
      ct_dit_bf2_0(1, is, out, in + i);
      break;

    case 2:                     /* size 4 base case  */
      // sr_dit_dr(log2_N, in, out, 1, i);
      ct_dit_bf2_0(1, is * 2, out, in + i);

      out[2] = in[i + is];
      out[3] = in[i + 3 * is];
      sr_dit_bf4_0(1, out);
      break;

    default:
      sr_dit_dr(log2_N, in, out, l - 1, i);
      sr_dit_dr(log2_N, in, out + os * 2, l - 2, i + is);
      sr_dit_dr(log2_N, in, out + 3 * os, l - 2, i + 3 * is);

      unsigned k;
      sr_dit_bf4_0(os, out);
      sr_dit_bf4_pi4(os, out + os / 2);

      for (k = 1; k < os / 2; k++)
	{
	  complex double w1 = get_twiddle(k << t, log2_N);
	  complex double w3 = get_twiddle_sr(k << t, log2_N);
	  sr_dit_bf4(os, out + k, w1, w3);
	  sr_dit_bf4(os, out + os - k, conj(w1 * I), -conj(w3 * I));
	}
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %ecx, %eax
movq %rdx, %rbx
movl %edi, %ecx
subl %eax, %ecx
movl $0x1, %r15d
movl %ecx, 0xc(%rsp)
shll %cl, %r15d
movq %rsi, %r12
movl $0x1, %r14d
leal -0x2(%rax), %ecx
shll %cl, %r14d
cmpl $0x2, %eax
je 0x1ac2
cmpl $0x1, %eax
jne 0x1bd6
movl %r8d, %eax
shlq $0x4, %rax
leaq (%r12,%rax), %rcx
movsd (%r12,%rax), %xmm0
movsd 0x8(%r12,%rax), %xmm1
movl %r15d, %eax
shlq $0x4, %rax
movsd (%rax,%rcx), %xmm2
movsd 0x8(%rax,%rcx), %xmm3
movapd %xmm0, %xmm4
addsd %xmm2, %xmm4
movapd %xmm1, %xmm5
addsd %xmm3, %xmm5
movsd %xmm4, (%rbx)
movsd %xmm5, 0x8(%rbx)
subsd %xmm2, %xmm0
subsd %xmm3, %xmm1
movsd %xmm0, 0x10(%rbx)
movsd %xmm1, 0x18(%rbx)
jmp 0x1f8a
movl $0x2, %eax
movl 0xc(%rsp), %ecx
shll %cl, %eax
movl %r8d, %esi
shlq $0x4, %rsi
leaq (%r12,%rsi), %rdx
movsd (%r12,%rsi), %xmm0
movsd 0x8(%r12,%rsi), %xmm1
shlq $0x4, %rax
movsd (%rax,%rdx), %xmm4
movsd 0x8(%rax,%rdx), %xmm5
movapd %xmm0, %xmm2
addsd %xmm4, %xmm2
movapd %xmm1, %xmm3
addsd %xmm5, %xmm3
movsd %xmm2, (%rbx)
movsd %xmm3, 0x8(%rbx)
subsd %xmm4, %xmm0
subsd %xmm5, %xmm1
movsd %xmm0, 0x10(%rbx)
movsd %xmm1, 0x18(%rbx)
addl %r8d, %r15d
shlq $0x4, %r15
movsd (%r12,%r15), %xmm4
movsd 0x8(%r12,%r15), %xmm5
movl $0x3, %eax
shll %cl, %eax
movsd %xmm4, 0x20(%rbx)
movsd %xmm5, 0x28(%rbx)
addl %r8d, %eax
shlq $0x4, %rax
movsd (%r12,%rax), %xmm6
movsd 0x8(%r12,%rax), %xmm7
movapd %xmm4, %xmm8
addsd %xmm6, %xmm8
subsd %xmm6, %xmm4
movapd %xmm7, %xmm6
addsd %xmm5, %xmm6
subsd %xmm7, %xmm5
movapd %xmm2, %xmm7
addsd %xmm8, %xmm7
movapd %xmm3, %xmm9
addsd %xmm6, %xmm9
movsd %xmm7, (%rbx)
movsd %xmm9, 0x8(%rbx)
movapd %xmm0, %xmm7
addsd %xmm5, %xmm7
movapd %xmm1, %xmm9
subsd %xmm4, %xmm9
movsd %xmm7, 0x10(%rbx)
movsd %xmm9, 0x18(%rbx)
subsd %xmm8, %xmm2
subsd %xmm6, %xmm3
movsd %xmm2, 0x20(%rbx)
movsd %xmm3, 0x28(%rbx)
subsd %xmm5, %xmm0
addsd %xmm1, %xmm4
movsd %xmm0, 0x30(%rbx)
movsd %xmm4, 0x38(%rbx)
jmp 0x1f8a
movl %edi, %ebp
decl %eax
movq %r12, %rsi
movl %ecx, 0x10(%rsp)
movq %rbx, %rdx
movl %eax, %ecx
movl %r8d, (%rsp)
callq 0x1a27
movl $0x2, %r13d
movl 0x10(%rsp), %ecx
shll %cl, %r13d
movl $0x2, %eax
movq %rax, 0x18(%rsp)
shlq $0x4, %r13
leaq (%rbx,%r13), %rdx
addl (%rsp), %r15d
movl %ebp, %edi
movq %r12, %rsi
movl %r15d, %r8d
callq 0x1a27
movl $0x3, %r15d
movl 0x10(%rsp), %eax
movl %eax, %ecx
shll %cl, %r15d
movl $0x3, %r8d
shlq $0x4, %r15
leaq (%rbx,%r15), %rdx
movl 0xc(%rsp), %ecx
shll %cl, %r8d
addl (%rsp), %r8d
movl %ebp, %edi
movq %r12, %rsi
movl %eax, %ecx
movl %eax, %ebp
callq 0x1a27
movsd (%rbx), %xmm0
movsd 0x8(%rbx), %xmm1
movl %r14d, %eax
shlq $0x4, %rax
movsd (%rbx,%rax), %xmm2
movsd 0x8(%rbx,%rax), %xmm4
movsd (%rbx,%r13), %xmm3
movsd 0x8(%rbx,%r13), %xmm5
movsd (%rbx,%r15), %xmm6
movsd 0x8(%rbx,%r15), %xmm7
movapd %xmm3, %xmm8
addsd %xmm6, %xmm8
subsd %xmm6, %xmm3
movapd %xmm5, %xmm6
addsd %xmm7, %xmm6
subsd %xmm7, %xmm5
movapd %xmm0, %xmm7
addsd %xmm8, %xmm7
movapd %xmm1, %xmm9
addsd %xmm6, %xmm9
movsd %xmm7, (%rbx)
movsd %xmm9, 0x8(%rbx)
movapd %xmm2, %xmm7
addsd %xmm5, %xmm7
movapd %xmm4, %xmm9
subsd %xmm3, %xmm9
movsd %xmm7, (%rbx,%rax)
movsd %xmm9, 0x8(%rbx,%rax)
subsd %xmm8, %xmm0
subsd %xmm6, %xmm1
movsd %xmm0, (%rbx,%r13)
movsd %xmm1, 0x8(%rbx,%r13)
subsd %xmm5, %xmm2
addsd %xmm4, %xmm3
movsd %xmm2, (%rbx,%r15)
movsd %xmm3, 0x8(%rbx,%r15)
movl %r14d, %ecx
shrl %ecx
movq %rcx, %rsi
shlq $0x4, %rsi
leaq (%rbx,%rsi), %rdx
movsd (%rbx,%rsi), %xmm2
movsd 0x8(%rbx,%rsi), %xmm3
movsd (%rax,%rdx), %xmm0
movsd 0x8(%rax,%rdx), %xmm1
movsd 0x1518(%rip), %xmm6     # 0x3250
movsd (%r13,%rdx), %xmm7
mulsd %xmm6, %xmm7
movsd 0x8(%r13,%rdx), %xmm4
mulsd %xmm6, %xmm4
mulsd 0x8(%r15,%rdx), %xmm6
movsd (%r15,%rdx), %xmm8
movapd %xmm7, %xmm5
addsd %xmm4, %xmm5
subsd %xmm7, %xmm4
mulsd 0x14e8(%rip), %xmm8     # 0x3258
movapd %xmm8, %xmm7
addsd %xmm6, %xmm7
subsd %xmm6, %xmm8
movapd %xmm5, %xmm6
addsd %xmm7, %xmm6
subsd %xmm7, %xmm5
movapd %xmm4, %xmm7
addsd %xmm8, %xmm7
subsd %xmm8, %xmm4
movapd %xmm2, %xmm8
addsd %xmm6, %xmm8
movapd %xmm3, %xmm9
addsd %xmm7, %xmm9
movsd %xmm8, (%rbx,%rsi)
movsd %xmm9, 0x8(%rbx,%rsi)
movapd %xmm0, %xmm8
addsd %xmm4, %xmm8
movapd %xmm1, %xmm9
subsd %xmm5, %xmm9
movsd %xmm8, (%rax,%rdx)
movsd %xmm9, 0x8(%rax,%rdx)
subsd %xmm6, %xmm2
subsd %xmm7, %xmm3
movsd %xmm2, (%r13,%rdx)
movsd %xmm3, 0x8(%r13,%rdx)
subsd %xmm4, %xmm0
addsd %xmm1, %xmm5
movsd %xmm0, (%r15,%rdx)
movsd %xmm5, 0x8(%r15,%rdx)
cmpl $0x2, %ebp
jb 0x1f8a
cmpl $0x3, %ecx
movq 0x18(%rsp), %rdx
cmovael %ecx, %edx
movq %rdx, 0x18(%rsp)
leaq (%rax,%rbx), %r15
addq $-0x10, %r15
addq $0x10, %rbx
movl $0x1, %r12d
leaq 0x3249(%rip), %r13      # 0x5080
leaq 0x324a(%rip), %rbp      # 0x5088
movl %r12d, %eax
movl 0xc(%rsp), %ecx
shll %cl, %eax
movq (%r13), %rcx
shlq $0x4, %rax
movsd (%rcx,%rax), %xmm0
movsd %xmm0, 0x20(%rsp)
movsd 0x8(%rcx,%rax), %xmm1
movsd %xmm1, 0x30(%rsp)
movq (%rbp), %rcx
movsd (%rcx,%rax), %xmm2
movsd 0x8(%rcx,%rax), %xmm3
movl %r14d, %edi
movq %rbx, %rsi
movsd %xmm2, (%rsp)
movsd %xmm3, 0x10(%rsp)
callq 0x1fae
movsd 0x30(%rsp), %xmm3
movsd 0x20(%rsp), %xmm2
movapd %xmm2, %xmm4
xorpd %xmm0, %xmm0
mulsd %xmm0, %xmm4
movapd %xmm3, %xmm1
mulsd %xmm0, %xmm1
subsd %xmm3, %xmm4
addsd %xmm2, %xmm1
ucomisd %xmm4, %xmm4
jp 0x1f1d
movsd (%rsp), %xmm5
movapd %xmm5, %xmm2
xorpd %xmm0, %xmm0
mulsd %xmm0, %xmm2
movsd 0x10(%rsp), %xmm6
movapd %xmm6, %xmm3
mulsd %xmm0, %xmm3
subsd %xmm6, %xmm2
addsd %xmm5, %xmm3
ucomisd %xmm2, %xmm2
jp 0x1f45
movapd 0x1142(%rip), %xmm0     # 0x3030
xorpd %xmm0, %xmm1
xorpd %xmm0, %xmm2
movl %r14d, %edi
movq %r15, %rsi
movapd %xmm4, %xmm0
callq 0x1fae
incq %r12
addq $0x10, %rbx
addq $-0x10, %r15
cmpq %r12, 0x18(%rsp)
jne 0x1e3e
jmp 0x1f8a
ucomisd %xmm1, %xmm1
jnp 0x1eb9
movapd %xmm2, %xmm0
xorpd %xmm2, %xmm2
movapd %xmm3, %xmm1
movsd 0x1329(%rip), %xmm3     # 0x3260
callq 0x2930
movapd %xmm0, %xmm4
jmp 0x1eb9
ucomisd %xmm3, %xmm3
jnp 0x1ee6
xorpd %xmm2, %xmm2
movsd (%rsp), %xmm0
movapd %xmm1, 0x20(%rsp)
movsd 0x10(%rsp), %xmm1
movsd 0x12f8(%rip), %xmm3     # 0x3260
movsd %xmm4, (%rsp)
callq 0x2930
movsd (%rsp), %xmm4
movapd %xmm0, %xmm2
movapd %xmm1, %xmm3
movapd 0x20(%rsp), %xmm1
jmp 0x1ee6
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq