// File: /workspace/github_c_makefile_star2_O0/diaxen[P]fft-garden/cp_dit_dr_S_P.c
// Function: cp_dit_dr
static void
cp_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 mask = (1 << log2_N) - 1;
  unsigned i0 = i & mask;
  unsigned t = log2_N - l;

  switch (l)
    {
#if 0
    case 0:			/* size 1 base case  */
      out[0] = in[i];
      break;
#endif

    case 1: {			/* size 2 base case  */
      unsigned i1 = i0 ^ is;
      complex double a = in[i0];
      complex double b = in[i1];
      out[0] = a + b;
      out[1] = a - b;
      break;
    }

    case 2: {			/* size 4 base case  */
      //      cp_dit_dr(log2_N, in, out, 1, i);
      unsigned i1 = i0 ^ (1 << (log2_N - 1));
      complex double a = in[i0];
      complex double b = in[i1];
      out[0] = a + b;
      out[1] = a - b;

      out[2] = in[(i + is) & mask];
      out[3] = in[(i - is) & mask];
      cp_dit_bf_0(1, out);
      break;
    }

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

      unsigned m = os / 2;
      if (os > 2)
	for (unsigned k = 1; k < m; k++)
	  {
	    complex double w = get_twiddle(k << t, log2_N);
	    cp_dit_bf(os, out + k, w);
	    cp_dit_bf(os, out + os - k, -I * conj(w));
	  }
      cp_dit_bf_pi4(os, out + m);
      cp_dit_bf_0(os, out);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x100, %rsp            # imm = 0x100
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
movl %eax, %edx
shll %cl, %edx
movl %edx, %ecx
movl %ecx, -0x28(%rbp)
movb -0x4(%rbp), %cl
shll %cl, %eax
decl %eax
movl %eax, -0x2c(%rbp)
movl -0x20(%rbp), %eax
movl -0x2c(%rbp), %ecx
andl %ecx, %eax
movl %eax, -0x30(%rbp)
movl -0x4(%rbp), %eax
movl -0x1c(%rbp), %ecx
subl %ecx, %eax
movl %eax, -0x34(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0xbc(%rbp)
subl $0x1, %eax
je 0x1f28
jmp 0x1f14
movl -0xbc(%rbp), %eax
subl $0x2, %eax
je 0x1fcb
jmp 0x20e4
movl -0x30(%rbp), %eax
xorl -0x24(%rbp), %eax
movl %eax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movl -0x30(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movsd (%rax), %xmm1
movsd 0x8(%rax), %xmm0
movsd %xmm1, -0x48(%rbp)
movsd %xmm0, -0x40(%rbp)
movq -0x10(%rbp), %rax
movl -0x38(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movsd (%rax), %xmm1
movsd 0x8(%rax), %xmm0
movsd %xmm1, -0x58(%rbp)
movsd %xmm0, -0x50(%rbp)
movsd -0x48(%rbp), %xmm1
movsd -0x40(%rbp), %xmm0
movsd -0x58(%rbp), %xmm3
movsd -0x50(%rbp), %xmm2
addsd %xmm3, %xmm1
addsd %xmm2, %xmm0
movq -0x18(%rbp), %rax
movsd %xmm1, (%rax)
movsd %xmm0, 0x8(%rax)
movsd -0x48(%rbp), %xmm1
movsd -0x40(%rbp), %xmm0
movsd -0x58(%rbp), %xmm3
movsd -0x50(%rbp), %xmm2
subsd %xmm3, %xmm1
subsd %xmm2, %xmm0
movq -0x18(%rbp), %rax
movsd %xmm1, 0x10(%rax)
movsd %xmm0, 0x18(%rax)
jmp 0x2391
movl -0x30(%rbp), %eax
movl -0x4(%rbp), %ecx
subl $0x1, %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
xorl %ecx, %eax
movl %eax, -0x5c(%rbp)
movq -0x10(%rbp), %rax
movl -0x30(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movsd (%rax), %xmm1
movsd 0x8(%rax), %xmm0
movsd %xmm1, -0x70(%rbp)
movsd %xmm0, -0x68(%rbp)
movq -0x10(%rbp), %rax
movl -0x5c(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movsd (%rax), %xmm1
movsd 0x8(%rax), %xmm0
movsd %xmm1, -0x80(%rbp)
movsd %xmm0, -0x78(%rbp)
movsd -0x70(%rbp), %xmm1
movsd -0x68(%rbp), %xmm0
movsd -0x80(%rbp), %xmm3
movsd -0x78(%rbp), %xmm2
addsd %xmm3, %xmm1
addsd %xmm2, %xmm0
movq -0x18(%rbp), %rax
movsd %xmm1, (%rax)
movsd %xmm0, 0x8(%rax)
movsd -0x70(%rbp), %xmm1
movsd -0x68(%rbp), %xmm0
movsd -0x80(%rbp), %xmm3
movsd -0x78(%rbp), %xmm2
subsd %xmm3, %xmm1
subsd %xmm2, %xmm0
movq -0x18(%rbp), %rax
movsd %xmm1, 0x10(%rax)
movsd %xmm0, 0x18(%rax)
movq -0x10(%rbp), %rax
movl -0x20(%rbp), %ecx
addl -0x24(%rbp), %ecx
andl -0x2c(%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
subl -0x24(%rbp), %ecx
andl -0x2c(%rbp), %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 0x23d0
jmp 0x2391
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
subl -0x24(%rbp), %r8d
callq 0x1ea0
movl -0x28(%rbp), %eax
shrl %eax
movl %eax, -0x84(%rbp)
cmpl $0x2, -0x28(%rbp)
jbe 0x236c
movl $0x1, -0x88(%rbp)
movl -0x88(%rbp), %eax
cmpl -0x84(%rbp), %eax
jae 0x236a
movl -0x88(%rbp), %edi
movl -0x34(%rbp), %ecx
shll %cl, %edi
movl -0x4(%rbp), %esi
callq 0x25c0
movsd %xmm0, -0x98(%rbp)
movsd %xmm1, -0x90(%rbp)
movl -0x28(%rbp), %edi
movq -0x18(%rbp), %rsi
movl -0x88(%rbp), %eax
shlq $0x4, %rax
addq %rax, %rsi
movsd -0x98(%rbp), %xmm1
movsd -0x90(%rbp), %xmm0
movsd %xmm1, -0xa8(%rbp)
movsd %xmm0, -0xa0(%rbp)
movsd -0xa8(%rbp), %xmm0
movsd -0xa0(%rbp), %xmm1
callq 0x2600
movl -0x28(%rbp), %eax
movl %eax, -0xfc(%rbp)
movq -0x18(%rbp), %rax
movl -0x28(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movl -0x88(%rbp), %ecx
movl %ecx, %edx
xorl %ecx, %ecx
subq %rdx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0xf8(%rbp)
movsd -0x98(%rbp), %xmm4
movsd %xmm4, -0xf0(%rbp)
movsd -0x90(%rbp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm2
movsd %xmm2, -0xe8(%rbp)
movsd 0x1df5(%rip), %xmm0     # 0x4058
mulsd %xmm4, %xmm0
movsd 0x1fd1(%rip), %xmm3     # 0x4240
mulsd %xmm2, %xmm3
movsd 0x1ddd(%rip), %xmm1     # 0x4058
mulsd %xmm2, %xmm1
movsd 0x1fb9(%rip), %xmm2     # 0x4240
mulsd %xmm4, %xmm2
subsd %xmm3, %xmm0
movsd %xmm0, -0xe0(%rbp)
addsd %xmm2, %xmm1
movsd %xmm1, -0xd8(%rbp)
ucomisd %xmm0, %xmm0
movsd %xmm0, -0xd0(%rbp)
movsd %xmm1, -0xc8(%rbp)
jnp 0x2314
movsd -0xd8(%rbp), %xmm1
movsd -0xe0(%rbp), %xmm0
ucomisd %xmm1, %xmm1
movsd %xmm0, -0xd0(%rbp)
movsd %xmm1, -0xc8(%rbp)
jnp 0x2314
movsd -0xe8(%rbp), %xmm3
movsd -0xf0(%rbp), %xmm2
movsd 0x1d61(%rip), %xmm0     # 0x4058
movsd 0x1f41(%rip), %xmm1     # 0x4240
callq 0x3410
movsd %xmm0, -0xd0(%rbp)
movsd %xmm1, -0xc8(%rbp)
movq -0xf8(%rbp), %rsi
movl -0xfc(%rbp), %edi
movsd -0xd0(%rbp), %xmm1
movsd -0xc8(%rbp), %xmm0
movsd %xmm1, -0xb8(%rbp)
movsd %xmm0, -0xb0(%rbp)
movsd -0xb8(%rbp), %xmm0
movsd -0xb0(%rbp), %xmm1
callq 0x2600
movl -0x88(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x88(%rbp)
jmp 0x2174
jmp 0x236c
movl -0x28(%rbp), %edi
movq -0x18(%rbp), %rsi
movl -0x84(%rbp), %eax
shlq $0x4, %rax
addq %rax, %rsi
callq 0x3150
movl -0x28(%rbp), %edi
movq -0x18(%rbp), %rsi
callq 0x23d0
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq
nopw (%rax,%rax)