// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x120, %rsp            # imm = 0x120
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl %r8d, -0x20(%rbp)
movl -0x4(%rbp), %eax
movl -0x1c(%rbp), %ecx
subl %ecx, %eax
movb %al, %cl
movl $0x1, %eax
movl %eax, %edx
shll %cl, %edx
movl %edx, %ecx
movl %ecx, -0x24(%rbp)
movb -0x1c(%rbp), %cl
addb $-0x2, %cl
shll %cl, %eax
movl %eax, -0x28(%rbp)
movl -0x4(%rbp), %eax
movl -0x1c(%rbp), %ecx
subl %ecx, %eax
movl %eax, -0x2c(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x94(%rbp)
subl $0x1, %eax
je 0x1f0b
jmp 0x1efb
movl -0x94(%rbp), %eax
subl $0x2, %eax
je 0x1f2f
jmp 0x1fba
movl -0x24(%rbp), %esi
movq -0x18(%rbp), %rdx
movq -0x10(%rbp), %rcx
movl -0x20(%rbp), %eax
shlq $0x4, %rax
addq %rax, %rcx
movl $0x1, %edi
callq 0x23e0
jmp 0x23a6
movl -0x24(%rbp), %esi
shll %esi
movq -0x18(%rbp), %rdx
movq -0x10(%rbp), %rcx
movl -0x20(%rbp), %eax
shlq $0x4, %rax
addq %rax, %rcx
movl $0x1, %edi
callq 0x23e0
movq -0x10(%rbp), %rax
movl -0x20(%rbp), %ecx
addl -0x24(%rbp), %ecx
movl %ecx, %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movsd (%rax), %xmm1
movsd 0x8(%rax), %xmm0
movq -0x18(%rbp), %rax
movsd %xmm1, 0x20(%rax)
movsd %xmm0, 0x28(%rax)
movq -0x10(%rbp), %rax
movl -0x20(%rbp), %ecx
imull $0x3, -0x24(%rbp), %edx
addl %edx, %ecx
movl %ecx, %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movsd (%rax), %xmm1
movsd 0x8(%rax), %xmm0
movq -0x18(%rbp), %rax
movsd %xmm1, 0x30(%rax)
movsd %xmm0, 0x38(%rax)
movq -0x18(%rbp), %rsi
movl $0x1, %edi
callq 0x2490
jmp 0x23a6
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl -0x1c(%rbp), %ecx
subl $0x1, %ecx
movl -0x20(%rbp), %r8d
callq 0x1ea0
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl -0x28(%rbp), %eax
shll %eax
movl %eax, %eax
shlq $0x4, %rax
addq %rax, %rdx
movl -0x1c(%rbp), %ecx
subl $0x2, %ecx
movl -0x20(%rbp), %r8d
addl -0x24(%rbp), %r8d
callq 0x1ea0
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
imull $0x3, -0x28(%rbp), %eax
movl %eax, %eax
shlq $0x4, %rax
addq %rax, %rdx
movl -0x1c(%rbp), %ecx
subl $0x2, %ecx
movl -0x20(%rbp), %r8d
imull $0x3, -0x24(%rbp), %eax
addl %eax, %r8d
callq 0x1ea0
movl -0x28(%rbp), %edi
movq -0x18(%rbp), %rsi
callq 0x2490
movl -0x28(%rbp), %edi
movq -0x18(%rbp), %rsi
movl -0x28(%rbp), %eax
shrl %eax
movl %eax, %eax
shlq $0x4, %rax
addq %rax, %rsi
callq 0x2680
movl $0x1, -0x30(%rbp)
movl -0x30(%rbp), %eax
movl -0x28(%rbp), %ecx
shrl %ecx
cmpl %ecx, %eax
jae 0x23a4
movl -0x30(%rbp), %edi
movl -0x2c(%rbp), %ecx
shll %cl, %edi
movl -0x4(%rbp), %esi
callq 0x2970
movsd %xmm0, -0x40(%rbp)
movsd %xmm1, -0x38(%rbp)
movl -0x30(%rbp), %edi
movl -0x2c(%rbp), %ecx
shll %cl, %edi
movl -0x4(%rbp), %esi
callq 0x29b0
movsd %xmm0, -0x50(%rbp)
movsd %xmm1, -0x48(%rbp)
movl -0x28(%rbp), %edi
movq -0x18(%rbp), %rsi
movl -0x30(%rbp), %eax
shlq $0x4, %rax
addq %rax, %rsi
movsd -0x40(%rbp), %xmm1
movsd -0x38(%rbp), %xmm0
movsd -0x50(%rbp), %xmm3
movsd -0x48(%rbp), %xmm2
movsd %xmm1, -0x60(%rbp)
movsd %xmm0, -0x58(%rbp)
movsd -0x60(%rbp), %xmm0
movsd -0x58(%rbp), %xmm1
movsd %xmm3, -0x70(%rbp)
movsd %xmm2, -0x68(%rbp)
movsd -0x70(%rbp), %xmm2
movsd -0x68(%rbp), %xmm3
callq 0x29f0
movl -0x28(%rbp), %eax
movl %eax, -0xd4(%rbp)
movq -0x18(%rbp), %rax
movl -0x28(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movl -0x30(%rbp), %ecx
movl %ecx, %edx
xorl %ecx, %ecx
subq %rdx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0xd0(%rbp)
movsd -0x40(%rbp), %xmm1
movsd %xmm1, -0xc8(%rbp)
movsd -0x38(%rbp), %xmm2
movsd %xmm2, -0xc0(%rbp)
xorps %xmm3, %xmm3
movaps %xmm1, %xmm0
mulsd %xmm3, %xmm0
movsd 0x1ec4(%rip), %xmm4     # 0x4010
movaps %xmm2, %xmm3
mulsd %xmm4, %xmm3
movsd 0x1eb5(%rip), %xmm4     # 0x4010
mulsd %xmm4, %xmm1
xorps %xmm4, %xmm4
mulsd %xmm4, %xmm2
subsd %xmm3, %xmm0
movsd %xmm0, -0xb8(%rbp)
addsd %xmm2, %xmm1
movsd %xmm1, -0xb0(%rbp)
ucomisd %xmm0, %xmm0
movsd %xmm0, -0xa8(%rbp)
movsd %xmm1, -0xa0(%rbp)
jnp 0x21ea
movsd -0xb0(%rbp), %xmm1
movsd -0xb8(%rbp), %xmm0
ucomisd %xmm1, %xmm1
movsd %xmm0, -0xa8(%rbp)
movsd %xmm1, -0xa0(%rbp)
jnp 0x21ea
movsd -0xc0(%rbp), %xmm1
movsd -0xc8(%rbp), %xmm0
xorps %xmm2, %xmm2
movsd 0x1e3b(%rip), %xmm3     # 0x4010
callq 0x3500
movsd %xmm0, -0xa8(%rbp)
movsd %xmm1, -0xa0(%rbp)
movsd -0xa8(%rbp), %xmm1
movsd -0xa0(%rbp), %xmm0
movsd %xmm1, -0x118(%rbp)
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm0, -0x110(%rbp)
movsd -0x50(%rbp), %xmm1
movsd %xmm1, -0x108(%rbp)
movsd -0x48(%rbp), %xmm2
movsd %xmm2, -0x100(%rbp)
xorps %xmm3, %xmm3
movaps %xmm1, %xmm0
mulsd %xmm3, %xmm0
movsd 0x1dc3(%rip), %xmm4     # 0x4010
movaps %xmm2, %xmm3
mulsd %xmm4, %xmm3
movsd 0x1db4(%rip), %xmm4     # 0x4010
mulsd %xmm4, %xmm1
xorps %xmm4, %xmm4
mulsd %xmm4, %xmm2
subsd %xmm3, %xmm0
movsd %xmm0, -0xf8(%rbp)
addsd %xmm2, %xmm1
movsd %xmm1, -0xf0(%rbp)
ucomisd %xmm0, %xmm0
movsd %xmm0, -0xe8(%rbp)
movsd %xmm1, -0xe0(%rbp)
jnp 0x22eb
movsd -0xf0(%rbp), %xmm1
movsd -0xf8(%rbp), %xmm0
ucomisd %xmm1, %xmm1
movsd %xmm0, -0xe8(%rbp)
movsd %xmm1, -0xe0(%rbp)
jnp 0x22eb
movsd -0x100(%rbp), %xmm1
movsd -0x108(%rbp), %xmm0
xorps %xmm2, %xmm2
movsd 0x1d3a(%rip), %xmm3     # 0x4010
callq 0x3500
movsd %xmm0, -0xe8(%rbp)
movsd %xmm1, -0xe0(%rbp)
movq -0xd0(%rbp), %rsi
movl -0xd4(%rbp), %edi
movsd -0x110(%rbp), %xmm0
movsd -0x118(%rbp), %xmm1
movsd -0xe8(%rbp), %xmm3
movsd -0xe0(%rbp), %xmm2
movq %xmm2, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm2
movq %xmm3, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm3
movq %xmm2, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm2
movsd %xmm1, -0x80(%rbp)
movsd %xmm0, -0x78(%rbp)
movsd -0x80(%rbp), %xmm0
movsd -0x78(%rbp), %xmm1
movsd %xmm3, -0x90(%rbp)
movsd %xmm2, -0x88(%rbp)
movsd -0x90(%rbp), %xmm2
movsd -0x88(%rbp), %xmm3
callq 0x29f0
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x205b
jmp 0x23a6
addq $0x120, %rsp            # imm = 0x120
popq %rbp
retq
nop