// File: /workspace/github_c_makefile_star2_O2/diaxen[P]fft-garden/cp_dit_dr.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 k;
      for (k = 0; k < os; k++)
	cp_dit_bf(os, out + k, get_twiddle(k << t, log2_N));
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movl %r8d, %r15d
movl %ecx, %eax
movq %rdx, %rbx
movl %edi, %r12d
movl %edi, %r8d
subl %ecx, %r8d
pushq $0x1
popq %rdi
movl %edi, %r14d
movl %r8d, %ecx
shll %cl, %r14d
pushq $-0x1
popq %rdx
movl %r12d, %ecx
shll %cl, %edx
notl %edx
movl %edx, %ecx
andl %r15d, %ecx
cmpl $0x2, %eax
je 0x1a34
cmpl $0x1, %eax
jne 0x1ad5
xorl %ecx, %r14d
movl %ecx, %eax
shlq $0x4, %rax
shlq $0x4, %r14
movupd (%rsi,%rax), %xmm0
movupd (%rsi,%r14), %xmm1
movapd %xmm0, %xmm2
addpd %xmm1, %xmm2
movupd %xmm2, (%rbx)
subpd %xmm1, %xmm0
movupd %xmm0, 0x10(%rbx)
jmp 0x1ac3
decb %r12b
movl %ecx, %eax
btcl %r12d, %ecx
shlq $0x4, %rax
shlq $0x4, %rcx
leal (%r14,%r15), %edi
andl %edx, %edi
shlq $0x4, %rdi
subl %r14d, %r15d
andl %edx, %r15d
shlq $0x4, %r15
movupd (%rsi,%rax), %xmm0
movupd (%rsi,%rcx), %xmm1
movapd %xmm0, %xmm2
addpd %xmm1, %xmm2
movupd (%rsi,%rdi), %xmm3
movupd (%rsi,%r15), %xmm4
movapd %xmm3, %xmm5
addpd %xmm4, %xmm5
movapd %xmm2, %xmm6
addpd %xmm5, %xmm6
movupd %xmm6, (%rbx)
subpd %xmm1, %xmm0
subpd %xmm4, %xmm3
shufpd $0x1, %xmm3, %xmm3      # xmm3 = xmm3[1,0]
movapd %xmm0, %xmm1
addpd %xmm3, %xmm1
subpd %xmm3, %xmm0
movapd %xmm0, %xmm3
movsd %xmm1, %xmm3            # xmm3 = xmm1[0],xmm3[1]
movupd %xmm3, 0x10(%rbx)
subpd %xmm5, %xmm2
movupd %xmm2, 0x20(%rbx)
shufpd $0x2, %xmm1, %xmm0      # xmm0 = xmm0[0],xmm1[1]
movupd %xmm0, 0x30(%rbx)
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leal -0x2(%rax), %ecx
movl %ecx, 0xb0(%rsp)
shll %cl, %edi
movq %rdi, 0x8(%rsp)
decl %eax
movl %r12d, %edi
movl %r8d, 0x4(%rsp)
movq %rbx, %rdx
movl %eax, %ecx
movq %rsi, %r13
movq %rsi, 0xd0(%rsp)
movl %r15d, %r8d
callq 0x19b7
pushq $0x2
popq %rbp
movl 0xb0(%rsp), %ecx
shll %cl, %ebp
shlq $0x4, %rbp
leaq (%rbx,%rbp), %rdx
leal (%r14,%r15), %r8d
movl %r12d, %edi
movq %r13, %rsi
callq 0x19b7
pushq $0x3
popq %r13
movl 0xb0(%rsp), %ecx
shll %cl, %r13d
shlq $0x4, %r13
leaq (%rbx,%r13), %rdx
subl %r14d, %r15d
movl %r12d, %edi
movq 0xd0(%rsp), %rsi
movl %r15d, %r8d
callq 0x19b7
movq 0x8(%rsp), %rsi
movl 0x4(%rsp), %ecx
movq %rsi, %r14
shlq $0x4, %r14
xorl %r15d, %r15d
leaq 0x350f(%rip), %r12      # 0x5080
movapd 0x14b7(%rip), %xmm3     # 0x3030
xorpd %xmm6, %xmm6
xorpd %xmm5, %xmm5
cmpq %r15, %rsi
je 0x1ac3
movl %r15d, %eax
shll %cl, %eax
movq (%r12), %rdx
shlq $0x4, %rax
movupd (%rbx,%r14), %xmm7
movsd (%rbx,%rbp), %xmm12
movsd 0x8(%rbx,%rbp), %xmm13
movupd (%rdx,%rax), %xmm4
movupd (%rbx), %xmm2
movupd (%rbx,%r13), %xmm11
movapd %xmm13, %xmm0
unpcklpd %xmm13, %xmm0           # xmm0 = xmm0[0],xmm13[0]
movapd %xmm4, %xmm1
shufpd $0x1, %xmm4, %xmm1      # xmm1 = xmm1[1],xmm4[0]
mulpd %xmm0, %xmm1
movapd %xmm12, %xmm8
unpcklpd %xmm12, %xmm8           # xmm8 = xmm8[0],xmm12[0]
mulpd %xmm4, %xmm8
movapd %xmm8, %xmm9
subpd %xmm1, %xmm9
addpd %xmm1, %xmm8
movapd %xmm8, %xmm1
movsd %xmm9, %xmm1            # xmm1 = xmm9[0],xmm1[1]
ucomisd %xmm9, %xmm9
unpckhpd %xmm8, %xmm8            # xmm8 = xmm8[1,1]
movapd %xmm4, %xmm0
unpckhpd %xmm4, %xmm0            # xmm0 = xmm0[1],xmm4[1]
movapd %xmm1, 0xb0(%rsp)
movapd %xmm1, 0xf0(%rsp)
movapd %xmm2, 0xc0(%rsp)
movapd %xmm0, 0xe0(%rsp)
jp 0x1de0
movapd %xmm0, %xmm15
xorpd %xmm3, %xmm15
movapd %xmm4, %xmm10
unpcklpd %xmm4, %xmm10           # xmm10 = xmm10[0],xmm4[0]
mulpd %xmm11, %xmm10
mulpd %xmm11, %xmm0
shufpd $0x1, %xmm0, %xmm0      # xmm0 = xmm0[1,0]
movapd %xmm10, %xmm1
addpd %xmm0, %xmm1
subpd %xmm0, %xmm10
movapd %xmm10, %xmm14
movsd %xmm1, %xmm14           # xmm14 = xmm1[0],xmm14[1]
ucomisd %xmm1, %xmm1
unpckhpd %xmm10, %xmm10          # xmm10 = xmm10[1,1]
movapd %xmm11, %xmm0
unpckhpd %xmm11, %xmm0           # xmm0 = xmm0[1],xmm11[1]
movapd %xmm0, 0x100(%rsp)
movapd %xmm14, 0xd0(%rsp)
movapd %xmm14, %xmm0
movapd %xmm1, 0xa0(%rsp)
jp 0x1ec0
ucomisd %xmm9, %xmm9
movapd 0xf0(%rsp), %xmm14
addpd %xmm0, %xmm14
addpd %xmm2, %xmm14
movupd %xmm14, (%rbx)
movapd 0xb0(%rsp), %xmm14
jp 0x1fa9
ucomisd %xmm1, %xmm1
movapd 0xd0(%rsp), %xmm0
jp 0x2091
subpd %xmm0, %xmm14
movapd %xmm14, %xmm0
mulpd %xmm6, %xmm0
movapd %xmm14, %xmm1
shufpd $0x1, %xmm14, %xmm1     # xmm1 = xmm1[1],xmm14[0]
movapd %xmm0, %xmm2
subpd %xmm1, %xmm2
addpd %xmm0, %xmm1
movapd %xmm1, %xmm0
movsd %xmm2, %xmm0            # xmm0 = xmm2[0],xmm0[1]
ucomisd %xmm2, %xmm2
jp 0x217c
movapd 0xc0(%rsp), %xmm2
ucomisd %xmm9, %xmm9
movapd %xmm7, %xmm1
subpd %xmm0, %xmm1
movupd %xmm1, (%rbx,%r14)
jp 0x2264
movapd 0xa0(%rsp), %xmm0
ucomisd %xmm0, %xmm0
jp 0x234e
movapd 0xb0(%rsp), %xmm1
addpd 0xd0(%rsp), %xmm1
ucomisd %xmm9, %xmm9
subpd %xmm1, %xmm2
movupd %xmm2, (%rbx,%rbp)
jp 0x2437
ucomisd %xmm0, %xmm0
jp 0x24d1
subsd %xmm10, %xmm8
subsd 0xa0(%rsp), %xmm9
movapd %xmm9, %xmm0
mulsd %xmm5, %xmm0
movapd %xmm8, %xmm1
mulsd %xmm5, %xmm1
subsd %xmm8, %xmm0
addsd %xmm9, %xmm1
ucomisd %xmm0, %xmm0
jp 0x254b
addsd %xmm7, %xmm0
unpckhpd %xmm7, %xmm7            # xmm7 = xmm7[1,1]
addsd %xmm1, %xmm7
movsd %xmm0, (%rbx,%r13)
movsd %xmm7, 0x8(%rbx,%r13)
incq %r15
addq $0x10, %rbx
jmp 0x1b81
ucomisd %xmm8, %xmm8
movapd 0xb0(%rsp), %xmm1
movapd %xmm1, 0xf0(%rsp)
jnp 0x1c34
movapd %xmm4, %xmm0
movapd 0xe0(%rsp), %xmm1
movapd %xmm12, %xmm2
movapd %xmm13, %xmm3
movapd %xmm7, 0x10(%rsp)
movapd %xmm8, 0x50(%rsp)
movapd %xmm9, 0x40(%rsp)
movapd %xmm4, 0x30(%rsp)
movapd %xmm11, 0x20(%rsp)
movapd %xmm12, 0x90(%rsp)
movapd %xmm13, 0x80(%rsp)
callq 0x25b0
movapd 0xc0(%rsp), %xmm2
movapd 0x80(%rsp), %xmm13
movapd 0x90(%rsp), %xmm12
movapd 0x20(%rsp), %xmm11
movapd 0x30(%rsp), %xmm4
movapd 0x40(%rsp), %xmm9
movapd 0x50(%rsp), %xmm8
movapd 0x10(%rsp), %xmm7
xorpd %xmm5, %xmm5
xorpd %xmm6, %xmm6
movapd 0x1194(%rip), %xmm3     # 0x3030
movq 0x8(%rsp), %rsi
movl 0x4(%rsp), %ecx
unpcklpd %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0]
movapd %xmm0, 0xf0(%rsp)
movapd 0xe0(%rsp), %xmm0
jmp 0x1c34
ucomisd %xmm10, %xmm10
movapd 0xd0(%rsp), %xmm0
jnp 0x1ca9
movapd %xmm4, %xmm0
movapd %xmm15, %xmm1
movapd %xmm11, %xmm2
movaps 0x100(%rsp), %xmm3
movapd %xmm7, 0x10(%rsp)
movapd %xmm8, 0x50(%rsp)
movapd %xmm9, 0x40(%rsp)
movapd %xmm4, 0x30(%rsp)
movapd %xmm11, 0x20(%rsp)
movapd %xmm12, 0x90(%rsp)
movapd %xmm13, 0x80(%rsp)
movapd %xmm10, 0x70(%rsp)
movapd %xmm15, 0x60(%rsp)
callq 0x25b0
movapd 0xc0(%rsp), %xmm2
movapd 0x60(%rsp), %xmm15
movapd 0x70(%rsp), %xmm10
movapd 0x80(%rsp), %xmm13
movapd 0x90(%rsp), %xmm12
movapd 0x20(%rsp), %xmm11
movapd 0x30(%rsp), %xmm4
movapd 0x40(%rsp), %xmm9
movapd 0x50(%rsp), %xmm8
movapd 0x10(%rsp), %xmm7
xorpd %xmm5, %xmm5
xorpd %xmm6, %xmm6
movapd 0x10a2(%rip), %xmm3     # 0x3030
movq 0x8(%rsp), %rsi
movl 0x4(%rsp), %ecx
unpcklpd %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0]
movapd 0xa0(%rsp), %xmm1
jmp 0x1ca9
ucomisd %xmm8, %xmm8
movapd 0xb0(%rsp), %xmm14
jnp 0x1cd7
movapd %xmm4, %xmm0
movapd 0xe0(%rsp), %xmm1
movapd %xmm12, %xmm2
movapd %xmm13, %xmm3
movapd %xmm7, 0x10(%rsp)
movapd %xmm8, 0x50(%rsp)
movapd %xmm9, 0x40(%rsp)
movapd %xmm4, 0x30(%rsp)
movapd %xmm11, 0x20(%rsp)
movapd %xmm12, 0x90(%rsp)
movapd %xmm13, 0x80(%rsp)
movapd %xmm10, 0x70(%rsp)
movapd %xmm15, 0x60(%rsp)
callq 0x25b0
movapd 0x60(%rsp), %xmm15
movapd 0x70(%rsp), %xmm10
movapd 0x80(%rsp), %xmm13
movapd 0x90(%rsp), %xmm12
movapd 0x20(%rsp), %xmm11
movapd 0x30(%rsp), %xmm4
movapd 0x40(%rsp), %xmm9
movapd 0x50(%rsp), %xmm8
movapd 0x10(%rsp), %xmm7
xorpd %xmm5, %xmm5
xorpd %xmm6, %xmm6
movapd 0xfc0(%rip), %xmm3      # 0x3030
movq 0x8(%rsp), %rsi
movl 0x4(%rsp), %ecx
movapd %xmm0, %xmm14
unpcklpd %xmm1, %xmm14           # xmm14 = xmm14[0],xmm1[0]
movapd 0xa0(%rsp), %xmm1
jmp 0x1cd7
ucomisd %xmm10, %xmm10
movapd 0xd0(%rsp), %xmm0
jnp 0x1cea
movapd %xmm4, %xmm0
movapd %xmm15, %xmm1
movapd %xmm11, %xmm2
movaps 0x100(%rsp), %xmm3
movapd %xmm7, 0x10(%rsp)
movapd %xmm8, 0x50(%rsp)
movapd %xmm9, 0x40(%rsp)
movapd %xmm4, 0x30(%rsp)
movapd %xmm11, 0x20(%rsp)
movapd %xmm12, 0x90(%rsp)
movapd %xmm13, 0x80(%rsp)
movapd %xmm10, 0x70(%rsp)
movapd %xmm15, 0x60(%rsp)
movapd %xmm14, 0xf0(%rsp)
callq 0x25b0
movapd 0xf0(%rsp), %xmm14
movapd 0x60(%rsp), %xmm15
movapd 0x70(%rsp), %xmm10
movapd 0x80(%rsp), %xmm13
movapd 0x90(%rsp), %xmm12
movapd 0x20(%rsp), %xmm11
movapd 0x30(%rsp), %xmm4
movapd 0x40(%rsp), %xmm9
movapd 0x50(%rsp), %xmm8
movapd 0x10(%rsp), %xmm7
xorpd %xmm5, %xmm5
xorpd %xmm6, %xmm6
movapd 0xec6(%rip), %xmm3      # 0x3030
movq 0x8(%rsp), %rsi
movl 0x4(%rsp), %ecx
unpcklpd %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0]
jmp 0x1cea
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
ucomisd %xmm1, %xmm1
movapd 0xc0(%rsp), %xmm2
jnp 0x1d2a
movapd %xmm14, %xmm3
unpckhpd %xmm14, %xmm3           # xmm3 = xmm3[1],xmm14[1]
xorpd %xmm0, %xmm0
movsd 0x10a7(%rip), %xmm1     # 0x3250
movapd %xmm14, %xmm2
movapd %xmm7, 0x10(%rsp)
movapd %xmm8, 0x50(%rsp)
movapd %xmm9, 0x40(%rsp)
movapd %xmm4, 0x30(%rsp)
movapd %xmm11, 0x20(%rsp)
movapd %xmm12, 0x90(%rsp)
movapd %xmm13, 0x80(%rsp)
movapd %xmm10, 0x70(%rsp)
movapd %xmm15, 0x60(%rsp)
callq 0x25b0
movapd 0xc0(%rsp), %xmm2
movapd 0x60(%rsp), %xmm15
movapd 0x70(%rsp), %xmm10
movapd 0x80(%rsp), %xmm13
movapd 0x90(%rsp), %xmm12
movapd 0x20(%rsp), %xmm11
movapd 0x30(%rsp), %xmm4
movapd 0x40(%rsp), %xmm9
movapd 0x50(%rsp), %xmm8
movapd 0x10(%rsp), %xmm7
xorpd %xmm5, %xmm5
xorpd %xmm6, %xmm6
movapd 0xdde(%rip), %xmm3      # 0x3030
movq 0x8(%rsp), %rsi
movl 0x4(%rsp), %ecx
unpcklpd %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0]
jmp 0x1d2a
ucomisd %xmm8, %xmm8
movapd 0xa0(%rsp), %xmm0
jnp 0x1d4c
movapd %xmm4, %xmm0
movapd 0xe0(%rsp), %xmm1
movapd %xmm12, %xmm2
movapd %xmm13, %xmm3
movapd %xmm7, 0x10(%rsp)
movapd %xmm8, 0x50(%rsp)
movapd %xmm9, 0x40(%rsp)
movapd %xmm4, 0x30(%rsp)
movapd %xmm11, 0x20(%rsp)
movapd %xmm12, 0x90(%rsp)
movapd %xmm13, 0x80(%rsp)
movapd %xmm10, 0x70(%rsp)
movapd %xmm15, 0x60(%rsp)
callq 0x25b0
movapd 0xc0(%rsp), %xmm2
movapd 0x60(%rsp), %xmm15
movapd 0x70(%rsp), %xmm10
movapd 0x80(%rsp), %xmm13
movapd 0x90(%rsp), %xmm12
movapd 0x20(%rsp), %xmm11
movapd 0x30(%rsp), %xmm4
movapd 0x40(%rsp), %xmm9
movapd 0x50(%rsp), %xmm8
movapd 0x10(%rsp), %xmm7
xorpd %xmm5, %xmm5
xorpd %xmm6, %xmm6
movapd 0xcfd(%rip), %xmm3      # 0x3030
movq 0x8(%rsp), %rsi
movl 0x4(%rsp), %ecx
unpcklpd %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0]
movapd %xmm0, 0xb0(%rsp)
jmp 0x1d43
ucomisd %xmm10, %xmm10
jnp 0x1d56
movapd %xmm4, %xmm0
movapd %xmm15, %xmm1
movapd %xmm11, %xmm2
movaps 0x100(%rsp), %xmm3
movapd %xmm7, 0x10(%rsp)
movapd %xmm8, 0x50(%rsp)
movapd %xmm9, 0x40(%rsp)
movapd %xmm4, 0x30(%rsp)
movapd %xmm11, 0x20(%rsp)
movapd %xmm12, 0x90(%rsp)
movapd %xmm13, 0x80(%rsp)
movapd %xmm10, 0x70(%rsp)
movapd %xmm15, 0x60(%rsp)
callq 0x25b0
movapd 0xc0(%rsp), %xmm2
movapd 0x60(%rsp), %xmm15
movapd 0x70(%rsp), %xmm10
movapd 0x80(%rsp), %xmm13
movapd 0x90(%rsp), %xmm12
movapd 0x20(%rsp), %xmm11
movapd 0x30(%rsp), %xmm4
movapd 0x40(%rsp), %xmm9
movapd 0x50(%rsp), %xmm8
movapd 0x10(%rsp), %xmm7
xorpd %xmm5, %xmm5
xorpd %xmm6, %xmm6
movapd 0xc1d(%rip), %xmm3      # 0x3030
movq 0x8(%rsp), %rsi
movl 0x4(%rsp), %ecx
unpcklpd %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0]
movapd %xmm0, 0xd0(%rsp)
movapd 0xa0(%rsp), %xmm0
jmp 0x1d56
ucomisd %xmm8, %xmm8
jnp 0x1d7c
movapd %xmm4, %xmm0
movapd 0xe0(%rsp), %xmm1
movapd %xmm12, %xmm2
movapd %xmm13, %xmm3
movapd %xmm7, 0x10(%rsp)
movapd %xmm4, 0x30(%rsp)
movapd %xmm11, 0x20(%rsp)
movapd %xmm10, 0x70(%rsp)
movapd %xmm15, 0x60(%rsp)
callq 0x25b0
movapd 0x60(%rsp), %xmm15
movapd 0x70(%rsp), %xmm10
movapd 0x20(%rsp), %xmm11
movapd 0x30(%rsp), %xmm4
movapd 0x10(%rsp), %xmm7
xorpd %xmm5, %xmm5
xorpd %xmm6, %xmm6
movapd 0xb80(%rip), %xmm3      # 0x3030
movq 0x8(%rsp), %rsi
movl 0x4(%rsp), %ecx
movapd %xmm0, %xmm9
movapd %xmm1, %xmm8
movapd 0xa0(%rsp), %xmm0
jmp 0x1d7c
ucomisd %xmm10, %xmm10
jnp 0x1d86
movapd %xmm4, %xmm0
movapd %xmm15, %xmm1
movapd %xmm11, %xmm2
movaps 0x100(%rsp), %xmm3
movapd %xmm7, 0x10(%rsp)
movapd %xmm8, 0x50(%rsp)
movapd %xmm9, 0x40(%rsp)
callq 0x25b0
movapd 0x40(%rsp), %xmm9
movapd 0x50(%rsp), %xmm8
movapd 0x10(%rsp), %xmm7
xorpd %xmm5, %xmm5
xorpd %xmm6, %xmm6
movapd 0xb01(%rip), %xmm3      # 0x3030
movq 0x8(%rsp), %rsi
movl 0x4(%rsp), %ecx
movapd %xmm0, 0xa0(%rsp)
movapd %xmm1, %xmm10
jmp 0x1d86
ucomisd %xmm1, %xmm1
jnp 0x1dbb
xorpd %xmm0, %xmm0
movsd 0xcef(%rip), %xmm1      # 0x3250
movapd %xmm9, %xmm2
movapd %xmm8, %xmm3
movapd %xmm7, 0x10(%rsp)
callq 0x25b0
movapd 0x10(%rsp), %xmm7
xorpd %xmm5, %xmm5
xorpd %xmm6, %xmm6
movapd 0xaa4(%rip), %xmm3      # 0x3030
movq 0x8(%rsp), %rsi
movl 0x4(%rsp), %ecx
jmp 0x1dbb