// File: /workspace/github_c_makefile_star2_O1/diaxen[P]fft-garden/sr_dit_dr_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++)
        sr_dit_bf4(os, out + k,
               get_twiddle(k << t, log2_N),
               get_twiddle_sr(k << t, log2_N));

      for (k++; k < os; k++)
        sr_dit_bf4(os, out + k,
               get_twiddle(k << t, log2_N),
               get_twiddle_sr(k << t, log2_N));
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %ecx, %eax
movq %rdx, %rbx
movl %edi, %ebp
subl %ecx, %ebp
movl $0x1, %r15d
movl %ebp, %ecx
shll %cl, %r15d
movq %rsi, %r12
movl $0x1, %r14d
leal -0x2(%rax), %ecx
shll %cl, %r14d
cmpl $0x2, %eax
je 0x1ac0
cmpl $0x1, %eax
jne 0x1bd4
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 0x1eee
movl $0x2, %eax
movl %ebp, %ecx
shll %cl, %eax
movl %r8d, %ecx
shlq $0x4, %rcx
leaq (%r12,%rcx), %rdx
movsd (%r12,%rcx), %xmm0
movsd 0x8(%r12,%rcx), %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
movl %ebp, %ecx
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 0x1eee
movl %edi, %r13d
decl %eax
movq %r12, %rsi
movl %ecx, 0xc(%rsp)
movq %rbx, %rdx
movl %eax, %ecx
movl %r8d, 0x10(%rsp)
callq 0x1a27
movl $0x2, %edx
movl 0xc(%rsp), %ecx
shll %cl, %edx
movl $0x2, %eax
movq %rax, 0x18(%rsp)
shlq $0x4, %rdx
movq %rdx, 0x20(%rsp)
addq %rbx, %rdx
addl 0x10(%rsp), %r15d
movl %r13d, %edi
movq %r12, %rsi
movl %r15d, %r8d
callq 0x1a27
movl $0x3, %r15d
movl 0xc(%rsp), %eax
movl %eax, %ecx
shll %cl, %r15d
movl $0x3, %r8d
shlq $0x4, %r15
leaq (%rbx,%r15), %rdx
movl %ebp, %ecx
shll %cl, %r8d
addl 0x10(%rsp), %r8d
movl %r13d, %edi
movq %r12, %rsi
movl %eax, %ecx
movl %eax, %r13d
callq 0x1a27
movsd (%rbx), %xmm3
movsd 0x8(%rbx), %xmm4
movq %r14, %rax
shlq $0x4, %rax
movsd (%rbx,%rax), %xmm0
movsd 0x8(%rbx,%rax), %xmm2
movq 0x20(%rsp), %rdi
movsd (%rbx,%rdi), %xmm1
movsd 0x8(%rbx,%rdi), %xmm5
movsd (%rbx,%r15), %xmm6
movsd 0x8(%rbx,%r15), %xmm7
movapd %xmm1, %xmm8
addsd %xmm6, %xmm8
subsd %xmm6, %xmm1
movapd %xmm5, %xmm6
addsd %xmm7, %xmm6
subsd %xmm7, %xmm5
movapd %xmm3, %xmm7
addsd %xmm8, %xmm7
movapd %xmm4, %xmm9
addsd %xmm6, %xmm9
movsd %xmm7, (%rbx)
movsd %xmm9, 0x8(%rbx)
movapd %xmm0, %xmm7
addsd %xmm5, %xmm7
movapd %xmm2, %xmm9
subsd %xmm1, %xmm9
movsd %xmm7, (%rbx,%rax)
movsd %xmm9, 0x8(%rbx,%rax)
subsd %xmm8, %xmm3
subsd %xmm6, %xmm4
movsd %xmm3, (%rbx,%rdi)
movsd %xmm4, 0x8(%rbx,%rdi)
subsd %xmm5, %xmm0
addsd %xmm2, %xmm1
movsd %xmm0, (%rbx,%r15)
movsd %xmm1, 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 (%r15,%rdx), %xmm6
movsd 0x150c(%rip), %xmm7     # 0x3250
movsd (%rdi,%rdx), %xmm8
mulsd %xmm7, %xmm8
movsd 0x8(%rdi,%rdx), %xmm4
mulsd %xmm7, %xmm4
mulsd 0x8(%r15,%rdx), %xmm7
movapd %xmm8, %xmm5
addsd %xmm4, %xmm5
mulsd 0x14e7(%rip), %xmm6     # 0x3258
subsd %xmm8, %xmm4
movapd %xmm6, %xmm8
addsd %xmm7, %xmm8
subsd %xmm7, %xmm6
movapd %xmm5, %xmm7
addsd %xmm8, %xmm7
subsd %xmm8, %xmm5
movapd %xmm4, %xmm8
addsd %xmm6, %xmm8
subsd %xmm6, %xmm4
movapd %xmm2, %xmm6
addsd %xmm7, %xmm6
movapd %xmm3, %xmm9
addsd %xmm8, %xmm9
movsd %xmm6, (%rbx,%rsi)
movsd %xmm9, 0x8(%rbx,%rsi)
movapd %xmm0, %xmm6
addsd %xmm4, %xmm6
movapd %xmm1, %xmm9
subsd %xmm5, %xmm9
movsd %xmm6, (%rax,%rdx)
movsd %xmm9, 0x8(%rax,%rdx)
subsd %xmm7, %xmm2
subsd %xmm8, %xmm3
movsd %xmm2, (%rdi,%rdx)
movsd %xmm3, 0x8(%rdi,%rdx)
subsd %xmm4, %xmm0
addsd %xmm1, %xmm5
movsd %xmm0, (%r15,%rdx)
movsd %xmm5, 0x8(%r15,%rdx)
movl $0x1, %r12d
cmpl $0x2, %r13d
jb 0x1e84
cmpl $0x3, %ecx
movq 0x18(%rsp), %rax
cmovael %ecx, %eax
movq %rax, 0x18(%rsp)
movq %rbx, 0x10(%rsp)
leaq 0x10(%rbx), %r15
movl $0x1, %r12d
leaq 0x3249(%rip), %r13      # 0x5080
leaq 0x324a(%rip), %rbx      # 0x5088
movl %r12d, %eax
movl %ebp, %ecx
shll %cl, %eax
movq (%r13), %rcx
shlq $0x4, %rax
movsd (%rcx,%rax), %xmm0
movsd 0x8(%rcx,%rax), %xmm1
movq (%rbx), %rcx
movsd (%rcx,%rax), %xmm2
movsd 0x8(%rcx,%rax), %xmm3
movl %r14d, %edi
movq %r15, %rsi
callq 0x1f12
incq %r12
addq $0x10, %r15
cmpq %r12, 0x18(%rsp)
jne 0x1e3e
movq 0x10(%rsp), %rbx
leal 0x1(%r12), %eax
cmpl %r14d, %eax
jae 0x1eee
movl %r12d, %eax
leaq 0x1(%rax), %r15
shlq $0x4, %rax
addq %rax, %rbx
addq $0x10, %rbx
leaq 0x31d9(%rip), %r12      # 0x5080
leaq 0x31da(%rip), %r13      # 0x5088
movl %r15d, %eax
movl %ebp, %ecx
shll %cl, %eax
movq (%r12), %rcx
shlq $0x4, %rax
movsd (%rcx,%rax), %xmm0
movsd 0x8(%rcx,%rax), %xmm1
movq (%r13), %rcx
movsd (%rcx,%rax), %xmm2
movsd 0x8(%rcx,%rax), %xmm3
movl %r14d, %edi
movq %rbx, %rsi
callq 0x1f12
incq %r15
addq $0x10, %rbx
cmpq %r15, %r14
jne 0x1eae
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq