// File: /workspace/github_c_makefile_star2_O3/diaxen[P]fft-garden/ct_dit_dr_S_P.c
// Function: ct_fft_dr
static inline void
ct_fft_dr(const complex double * restrict in,
           complex double * restrict out,
           int s, int log2_N)
{
  unsigned l = 1 << (log2_N - s - 1);
  unsigned stride = 1 << s;

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

    case 2:                     /* size 4 base case  */
      // ct_fft_dr(in, out, s + 1, log2_N);
      ct_dit_bf2_0(1, stride * 2, out, in);
      // ct_fft_dr(in + stride, out + l, s + 1, log2_N);
      ct_dit_bf2_0(1, stride * 2, out + 2, in + stride);

      ct_dit_bf2_0(2, 2, out, out);
      ct_dit_bf2_pi2(2, out + 1);
      break;

    default:
      ct_fft_dr(in, out, s + 1, log2_N);
      ct_fft_dr(in + stride, out + l, s + 1, log2_N);

      ct_dit_bf2_0(l, l, out, out);
      ct_dit_bf2_pi2(l, out + l / 2);
      ct_dit_bf2_pi4(l, out + l / 4);
      ct_dit_bf2_3pi4(l, out + 3 * l / 4);

      for (unsigned k = 1; k < l / 4; k++)
        {
          complex double t = get_twiddle(k << s, log2_N);

          ct_dit_bf2(l, out + k, t);
          ct_dit_bf2(l, out + k + l / 2, t * -I);
          ct_dit_bf2(l, out + l / 2 - k, conj(t * I));
          ct_dit_bf2(l, out + l - k, conj(-t));
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movl %ecx, %r12d
movl %edx, %r8d
movq %rsi, %rbx
movq %rdi, %r15
movl %edx, %ebp
notl %ebp
addl %ecx, %ebp
movl $0x1, %r13d
movl $0x1, %r14d
movl %ebp, %ecx
shll %cl, %r14d
movl %r8d, %ecx
shll %cl, %r13d
cmpl $0x2, %r14d
je 0x1a8c
cmpl $0x1, %r14d
jne 0x1b15
movl %r13d, %eax
shlq $0x4, %rax
movupd (%r15), %xmm0
movupd (%r15,%rax), %xmm1
movapd %xmm0, %xmm2
addpd %xmm1, %xmm2
movupd %xmm2, (%rbx)
subpd %xmm1, %xmm0
movupd %xmm0, 0x10(%rbx)
jmp 0x2411
movl $0x2, %eax
movl %r8d, %ecx
shll %cl, %eax
shlq $0x4, %rax
movl %r13d, %ecx
shlq $0x4, %rcx
leaq (%r15,%rcx), %rdx
movupd (%r15), %xmm0
movupd (%r15,%rax), %xmm1
movapd %xmm0, %xmm2
addpd %xmm1, %xmm2
movupd (%r15,%rcx), %xmm3
movupd (%rax,%rdx), %xmm4
movapd %xmm3, %xmm5
addpd %xmm4, %xmm5
movapd %xmm2, %xmm6
addpd %xmm5, %xmm6
movupd %xmm6, (%rbx)
subpd %xmm5, %xmm2
movupd %xmm2, 0x20(%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, %xmm2
movsd %xmm1, %xmm2            # xmm2 = xmm1[0],xmm2[1]
movupd %xmm2, 0x10(%rbx)
shufpd $0x2, %xmm1, %xmm0      # xmm0 = xmm0[0],xmm1[1]
movupd %xmm0, 0x30(%rbx)
jmp 0x2411
leal 0x1(%r8), %edx
movl %edx, 0x60(%rsp)
movq %r15, %rdi
movq %rbx, %rsi
movq %r8, 0x28(%rsp)
movl %r12d, %ecx
callq 0x1a16
movl %r13d, %edi
shlq $0x4, %rdi
addq %r15, %rdi
movl %r14d, %r15d
movq %r15, %r13
shlq $0x4, %r13
leaq (%rbx,%r13), %rsi
movl 0x60(%rsp), %edx
movl %r12d, %ecx
callq 0x1a16
movupd (%rbx), %xmm0
movupd (%rbx,%r13), %xmm1
movapd %xmm0, %xmm2
addpd %xmm1, %xmm2
movupd %xmm2, (%rbx)
subpd %xmm1, %xmm0
movupd %xmm0, (%rbx,%r13)
movl %r14d, %r8d
shrl %r8d
shlq $0x4, %r8
leaq (%rbx,%r8), %rax
movsd (%rbx,%r8), %xmm0
movsd 0x8(%rbx,%r8), %xmm1
movsd (%r13,%rax), %xmm2
movsd 0x8(%r13,%rax), %xmm3
movapd %xmm0, %xmm4
addsd %xmm3, %xmm4
movapd %xmm1, %xmm5
subsd %xmm2, %xmm5
movsd %xmm4, (%rbx,%r8)
movsd %xmm5, 0x8(%rbx,%r8)
subsd %xmm3, %xmm0
addsd %xmm2, %xmm1
movsd %xmm0, (%r13,%rax)
movsd %xmm1, 0x8(%r13,%rax)
shrl $0x2, %r14d
movq %r14, %rax
shlq $0x4, %rax
leaq (%rbx,%rax), %rdx
movupd (%rbx,%rax), %xmm1
movupd (%r13,%rdx), %xmm2
movapd %xmm2, %xmm0
shufpd $0x1, %xmm2, %xmm0      # xmm0 = xmm0[1],xmm2[0]
movapd %xmm2, %xmm3
addpd %xmm0, %xmm3
subpd %xmm0, %xmm2
movsd %xmm3, %xmm2            # xmm2 = xmm3[0],xmm2[1]
movapd 0x1644(%rip), %xmm0     # 0x3250
mulpd %xmm0, %xmm2
movapd %xmm1, %xmm3
addpd %xmm2, %xmm3
movupd %xmm3, (%rbx,%rax)
movl $0x3, %eax
movl %ebp, %ecx
shll %cl, %eax
subpd %xmm2, %xmm1
movupd %xmm1, (%r13,%rdx)
movq 0x28(%rsp), %rcx
shrl $0x2, %eax
shlq $0x4, %rax
leaq (%rbx,%rax), %rdx
movsd (%r13,%rdx), %xmm1
movsd 0x8(%r13,%rdx), %xmm2
movapd 0x13d9(%rip), %xmm3     # 0x3030
xorpd %xmm2, %xmm3
movupd (%rbx,%rax), %xmm4
unpcklpd %xmm3, %xmm2            # xmm2 = xmm2[0],xmm3[0]
unpcklpd %xmm1, %xmm1            # xmm1 = xmm1[0,0]
subpd %xmm1, %xmm2
mulpd %xmm0, %xmm2
movapd %xmm4, %xmm0
addpd %xmm2, %xmm0
movupd %xmm0, (%rbx,%rax)
subpd %xmm2, %xmm4
movupd %xmm4, (%r13,%rdx)
cmpl $0x3, %ebp
jb 0x2411
movq %r13, %rdi
movq %r15, %rsi
cmpl $0x3, %r14d
movl $0x2, %r9d
cmovael %r14d, %r9d
leaq 0x10(%r13), %rbp
leaq 0x18(%r8), %r13
leaq (%r8,%rdi), %r14
addq $0x18, %r14
shlq $0x5, %rsi
addq $-0x10, %rsi
leaq (%r8,%rdi), %r15
addq $-0x8, %r15
addq $-0x8, %r8
addq $-0x10, %rdi
shlq $0x4, %r9
movl $0x10, %r12d
movl $0x1, %r10d
leaq 0x339c(%rip), %r11      # 0x5080
xorpd %xmm7, %xmm7
movsd 0x137f(%rip), %xmm8     # 0x3070
movsd 0x1567(%rip), %xmm3     # 0x3260
movsd 0x1566(%rip), %xmm10    # 0x3268
movapd 0x1325(%rip), %xmm11    # 0x3030
movl %r10d, %eax
shll %cl, %eax
movq (%r11), %rdx
shlq $0x4, %rax
movupd (%rdx,%rax), %xmm12
movsd (%rbx,%rbp), %xmm0
movsd 0x8(%rbx,%rbp), %xmm1
movupd (%rbx,%r12), %xmm6
movapd %xmm0, %xmm2
unpcklpd %xmm0, %xmm2            # xmm2 = xmm2[0],xmm0[0]
mulpd %xmm12, %xmm2
movapd %xmm1, %xmm5
unpcklpd %xmm1, %xmm5            # xmm5 = xmm5[0],xmm1[0]
movapd %xmm12, %xmm14
shufpd $0x1, %xmm12, %xmm14    # xmm14 = xmm14[1],xmm12[0]
mulpd %xmm14, %xmm5
movapd %xmm2, %xmm4
subpd %xmm5, %xmm4
addpd %xmm2, %xmm5
movapd %xmm5, %xmm2
movsd %xmm4, %xmm2            # xmm2 = xmm4[0],xmm2[1]
ucomisd %xmm4, %xmm4
movapd %xmm12, %xmm13
unpckhpd %xmm12, %xmm13          # xmm13 = xmm13[1],xmm12[1]
jp 0x1f95
movapd %xmm6, %xmm0
addpd %xmm2, %xmm0
movupd %xmm0, (%rbx,%r12)
subpd %xmm2, %xmm6
movupd %xmm6, (%rbx,%rbp)
movapd %xmm12, %xmm15
mulsd %xmm7, %xmm15
movapd %xmm13, %xmm9
mulsd %xmm8, %xmm9
movapd %xmm13, %xmm2
subsd %xmm15, %xmm2
subsd %xmm12, %xmm9
ucomisd %xmm2, %xmm2
jp 0x205a
movsd -0x8(%rbx,%r13), %xmm0
movsd %xmm0, 0x60(%rsp)
movsd (%rbx,%r13), %xmm0
movsd %xmm0, 0x78(%rsp)
movsd -0x8(%rbx,%r14), %xmm4
movsd (%rbx,%r14), %xmm5
movapd %xmm2, %xmm0
mulsd %xmm4, %xmm0
movapd %xmm9, %xmm1
mulsd %xmm5, %xmm1
subsd %xmm1, %xmm0
movapd %xmm9, %xmm6
mulsd %xmm4, %xmm6
movapd %xmm2, %xmm1
mulsd %xmm5, %xmm1
addsd %xmm6, %xmm1
ucomisd %xmm0, %xmm0
jp 0x212a
movsd 0x60(%rsp), %xmm5
movapd %xmm5, %xmm2
addsd %xmm0, %xmm2
movsd 0x78(%rsp), %xmm6
movapd %xmm6, %xmm4
addsd %xmm1, %xmm4
movsd %xmm2, -0x8(%rbx,%r13)
movsd %xmm4, (%rbx,%r13)
subsd %xmm0, %xmm5
subsd %xmm1, %xmm6
movsd %xmm5, -0x8(%rbx,%r14)
movsd %xmm6, (%rbx,%r14)
subsd %xmm13, %xmm15
movapd %xmm13, %xmm6
mulsd %xmm7, %xmm6
addsd %xmm12, %xmm6
ucomisd %xmm15, %xmm15
jp 0x21ee
movsd -0x8(%rbx,%r8), %xmm9
movsd (%rbx,%r8), %xmm0
movsd %xmm0, 0x60(%rsp)
movsd -0x8(%rbx,%r15), %xmm2
movsd (%rbx,%r15), %xmm4
movapd %xmm15, %xmm5
mulsd %xmm2, %xmm5
movapd %xmm15, %xmm1
mulsd %xmm4, %xmm1
movapd %xmm6, %xmm0
mulsd %xmm4, %xmm0
addsd %xmm5, %xmm0
movapd %xmm6, %xmm5
mulsd %xmm2, %xmm5
subsd %xmm5, %xmm1
ucomisd %xmm0, %xmm0
jp 0x22ac
movapd %xmm9, %xmm2
addsd %xmm0, %xmm2
movsd 0x60(%rsp), %xmm5
movapd %xmm5, %xmm4
addsd %xmm1, %xmm4
movsd %xmm2, -0x8(%rbx,%r8)
movsd %xmm4, (%rbx,%r8)
subsd %xmm0, %xmm9
subsd %xmm1, %xmm5
movsd %xmm9, -0x8(%rbx,%r15)
movsd %xmm5, (%rbx,%r15)
movapd %xmm12, %xmm2
xorpd %xmm11, %xmm2
movsd (%rbx,%rsi), %xmm0
movsd 0x8(%rbx,%rsi), %xmm1
movupd (%rbx,%rdi), %xmm5
movapd %xmm0, %xmm4
unpcklpd %xmm0, %xmm4            # xmm4 = xmm4[0],xmm0[0]
movsd %xmm2, %xmm12           # xmm12 = xmm2[0],xmm12[1]
mulpd %xmm4, %xmm12
movapd %xmm1, %xmm4
unpcklpd %xmm1, %xmm4            # xmm4 = xmm4[0],xmm1[0]
mulpd %xmm4, %xmm14
subpd %xmm14, %xmm12
ucomisd %xmm12, %xmm12
jp 0x2373
movapd %xmm5, %xmm0
addpd %xmm12, %xmm0
movupd %xmm0, (%rbx,%rdi)
subpd %xmm12, %xmm5
movupd %xmm5, (%rbx,%rsi)
addq $0x10, %r12
addq $0x10, %rbp
addq $0x10, %r13
addq $0x10, %r14
addq $-0x10, %rdi
addq $-0x10, %rsi
addq $-0x10, %r8
addq $-0x10, %r15
incl %r10d
cmpq %r12, %r9
jne 0x1d0b
jmp 0x2411
unpckhpd %xmm5, %xmm5            # xmm5 = xmm5[1,1]
ucomisd %xmm5, %xmm5
jnp 0x1d7b
movapd %xmm12, %xmm2
movapd %xmm13, %xmm3
movq %rsi, 0x20(%rsp)
movq %rdi, 0x18(%rsp)
movq %r8, 0x10(%rsp)
movq %r9, 0x8(%rsp)
movl %r10d, 0x4(%rsp)
movapd %xmm12, 0x50(%rsp)
movapd %xmm13, 0x40(%rsp)
movapd %xmm14, 0x30(%rsp)
movapd %xmm6, 0x60(%rsp)
callq 0x2440
movapd 0x60(%rsp), %xmm6
movapd 0x30(%rsp), %xmm14
movapd 0x40(%rsp), %xmm13
movapd 0x50(%rsp), %xmm12
movapd 0x1026(%rip), %xmm11    # 0x3030
movsd 0x1255(%rip), %xmm10    # 0x3268
movsd 0x1245(%rip), %xmm3     # 0x3260
movsd 0x104c(%rip), %xmm8     # 0x3070
xorpd %xmm7, %xmm7
leaq 0x3051(%rip), %r11      # 0x5080
movl 0x4(%rsp), %r10d
movq 0x8(%rsp), %r9
movq 0x10(%rsp), %r8
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rcx
movapd %xmm0, %xmm2
unpcklpd %xmm1, %xmm2            # xmm2 = xmm2[0],xmm1[0]
jmp 0x1d7b
ucomisd %xmm9, %xmm9
jnp 0x1dbf
movapd %xmm12, %xmm0
movapd %xmm13, %xmm1
movapd %xmm8, %xmm2
movq %rsi, 0x20(%rsp)
movq %rdi, 0x18(%rsp)
movq %r8, 0x10(%rsp)
movq %r9, 0x8(%rsp)
movl %r10d, 0x4(%rsp)
movapd %xmm12, 0x50(%rsp)
movapd %xmm13, 0x40(%rsp)
movapd %xmm14, 0x30(%rsp)
movapd %xmm15, 0x80(%rsp)
callq 0x2440
movapd 0x80(%rsp), %xmm15
movapd 0x30(%rsp), %xmm14
movapd 0x40(%rsp), %xmm13
movapd 0x50(%rsp), %xmm12
movapd 0xf57(%rip), %xmm11     # 0x3030
movsd 0x1186(%rip), %xmm10    # 0x3268
movsd 0x1176(%rip), %xmm3     # 0x3260
movsd 0xf7d(%rip), %xmm8      # 0x3070
xorpd %xmm7, %xmm7
leaq 0x2f82(%rip), %r11      # 0x5080
movl 0x4(%rsp), %r10d
movq 0x8(%rsp), %r9
movq 0x10(%rsp), %r8
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rcx
movapd %xmm0, %xmm2
movapd %xmm1, %xmm9
jmp 0x1dbf
ucomisd %xmm1, %xmm1
jnp 0x1e19
movapd %xmm4, %xmm0
movapd %xmm5, %xmm1
movapd %xmm9, %xmm3
movq %rsi, 0x20(%rsp)
movq %rdi, 0x18(%rsp)
movq %r8, 0x10(%rsp)
movq %r9, 0x8(%rsp)
movl %r10d, 0x4(%rsp)
movapd %xmm12, 0x50(%rsp)
movapd %xmm13, 0x40(%rsp)
movapd %xmm14, 0x30(%rsp)
movapd %xmm15, 0x80(%rsp)
callq 0x2440
movapd 0x80(%rsp), %xmm15
movapd 0x30(%rsp), %xmm14
movapd 0x40(%rsp), %xmm13
movapd 0x50(%rsp), %xmm12
movapd 0xe8a(%rip), %xmm11     # 0x3030
movsd 0x10b9(%rip), %xmm10    # 0x3268
movsd 0x10a9(%rip), %xmm3     # 0x3260
movsd 0xeb0(%rip), %xmm8      # 0x3070
xorpd %xmm7, %xmm7
leaq 0x2eb5(%rip), %r11      # 0x5080
movl 0x4(%rsp), %r10d
movq 0x8(%rsp), %r9
movq 0x10(%rsp), %r8
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rcx
jmp 0x1e19
ucomisd %xmm6, %xmm6
jnp 0x1e75
xorpd %xmm2, %xmm2
movapd %xmm12, %xmm0
movapd %xmm13, %xmm1
movaps %xmm10, %xmm3
movq %rsi, 0x20(%rsp)
movq %rdi, 0x18(%rsp)
movq %r8, 0x10(%rsp)
movq %r9, 0x8(%rsp)
movl %r10d, 0x4(%rsp)
movapd %xmm12, 0x50(%rsp)
movapd %xmm13, 0x40(%rsp)
movapd %xmm14, 0x30(%rsp)
callq 0x2440
movapd 0x30(%rsp), %xmm14
movapd 0x40(%rsp), %xmm13
movapd 0x50(%rsp), %xmm12
movapd 0xdd5(%rip), %xmm11     # 0x3030
movsd 0x1004(%rip), %xmm10    # 0x3268
movsd 0xff4(%rip), %xmm3      # 0x3260
movsd 0xdfb(%rip), %xmm8      # 0x3070
xorpd %xmm7, %xmm7
leaq 0x2e00(%rip), %r11      # 0x5080
movl 0x4(%rsp), %r10d
movq 0x8(%rsp), %r9
movq 0x10(%rsp), %r8
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rcx
movapd %xmm0, %xmm15
movapd %xmm1, %xmm6
jmp 0x1e75
ucomisd %xmm1, %xmm1
jnp 0x1ec9
xorpd %xmm11, %xmm6
movapd %xmm2, %xmm0
movapd %xmm4, %xmm1
movapd %xmm15, %xmm2
movapd %xmm6, %xmm3
movq %rsi, 0x20(%rsp)
movq %rdi, 0x18(%rsp)
movq %r8, 0x10(%rsp)
movq %r9, 0x8(%rsp)
movl %r10d, 0x4(%rsp)
movapd %xmm12, 0x50(%rsp)
movapd %xmm13, 0x40(%rsp)
movapd %xmm14, 0x30(%rsp)
movsd %xmm9, 0x78(%rsp)
callq 0x2440
movsd 0x78(%rsp), %xmm9
movapd 0x30(%rsp), %xmm14
movapd 0x40(%rsp), %xmm13
movapd 0x50(%rsp), %xmm12
movapd 0xd05(%rip), %xmm11     # 0x3030
movsd 0xf34(%rip), %xmm10     # 0x3268
movsd 0xf24(%rip), %xmm3      # 0x3260
movsd 0xd2b(%rip), %xmm8      # 0x3070
xorpd %xmm7, %xmm7
leaq 0x2d30(%rip), %r11      # 0x5080
movl 0x4(%rsp), %r10d
movq 0x8(%rsp), %r9
movq 0x10(%rsp), %r8
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rcx
jmp 0x1ec9
movapd %xmm12, %xmm4
unpckhpd %xmm12, %xmm4           # xmm4 = xmm4[1],xmm12[1]
ucomisd %xmm4, %xmm4
jnp 0x1f4c
movapd %xmm13, %xmm3
movq %rsi, 0x20(%rsp)
movq %rdi, 0x18(%rsp)
movq %r8, 0x10(%rsp)
movq %r9, 0x8(%rsp)
movl %r10d, 0x4(%rsp)
movapd %xmm5, 0x60(%rsp)
callq 0x2440
movapd 0x60(%rsp), %xmm5
movapd 0xc71(%rip), %xmm11     # 0x3030
movsd 0xea0(%rip), %xmm10     # 0x3268
movsd 0xe90(%rip), %xmm3      # 0x3260
movsd 0xc97(%rip), %xmm8      # 0x3070
xorpd %xmm7, %xmm7
leaq 0x2c9c(%rip), %r11      # 0x5080
movl 0x4(%rsp), %r10d
movq 0x8(%rsp), %r9
movq 0x10(%rsp), %r8
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rcx
movapd %xmm0, %xmm12
unpcklpd %xmm1, %xmm12           # xmm12 = xmm12[0],xmm1[0]
jmp 0x1f4c
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq