// File: /workspace/github_c_makefile_star2_O3/diaxen[P]fft-garden/ct_dit_dr_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);

      unsigned k;
      for (k = 1; k < l / 4; k++)
        ct_dit_bf2(l, out + k, get_twiddle(k << s, log2_N));
      for (k++; k < l / 2; k++)
        ct_dit_bf2(l, out + k, get_twiddle(k << s, log2_N));
      for (k++; k < 3 * l / 4; k++)
        ct_dit_bf2(l, out + k, get_twiddle(k << s, log2_N));
      for (k++; k < l; k++)
        ct_dit_bf2(l, out + k, get_twiddle(k << s, log2_N));
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %ecx, %r12d
movl %edx, %r8d
movq %rdi, %r15
movl %edx, %ebp
notl %ebp
addl %ecx, %ebp
movl $0x1, %ebx
movl $0x1, %r14d
movl %ebp, %ecx
shll %cl, %r14d
movl %r8d, %ecx
shll %cl, %ebx
cmpl $0x2, %r14d
je 0x1a83
cmpl $0x1, %r14d
jne 0x1b0b
movl %ebx, %eax
shlq $0x4, %rax
movupd (%r15), %xmm0
movupd (%r15,%rax), %xmm1
movapd %xmm0, %xmm2
addpd %xmm1, %xmm2
movupd %xmm2, (%rsi)
subpd %xmm1, %xmm0
movupd %xmm0, 0x10(%rsi)
jmp 0x2101
movl $0x2, %eax
movl %r8d, %ecx
shll %cl, %eax
shlq $0x4, %rax
movl %ebx, %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, (%rsi)
subpd %xmm5, %xmm2
movupd %xmm2, 0x20(%rsi)
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(%rsi)
shufpd $0x2, %xmm1, %xmm0      # xmm0 = xmm0[0],xmm1[1]
movupd %xmm0, 0x30(%rsi)
jmp 0x2101
leal 0x1(%r8), %r13d
movq %r15, %rdi
movl %r13d, %edx
movl %r12d, %ecx
movq %r8, 0x18(%rsp)
movq %rsi, (%rsp)
callq 0x1a16
movl %ebx, %edi
shlq $0x4, %rdi
addq %r15, %rdi
movl %r14d, %r15d
movq %r15, 0x30(%rsp)
shlq $0x4, %r15
movq (%rsp), %rax
leaq (%rax,%r15), %rsi
movl %r13d, %edx
movl %r12d, %ecx
callq 0x1a16
movq (%rsp), %rdi
movq 0x18(%rsp), %rsi
movupd (%rdi), %xmm0
movupd (%rdi,%r15), %xmm1
movapd %xmm0, %xmm2
addpd %xmm1, %xmm2
movupd %xmm2, (%rdi)
subpd %xmm1, %xmm0
movupd %xmm0, (%rdi,%r15)
movl %r14d, %r12d
shrl %r12d
movq %r12, %rax
shlq $0x4, %rax
leaq (%rdi,%rax), %rcx
movsd (%rdi,%rax), %xmm0
movsd 0x8(%rdi,%rax), %xmm1
movsd (%r15,%rcx), %xmm2
movsd 0x8(%r15,%rcx), %xmm3
movapd %xmm0, %xmm4
addsd %xmm3, %xmm4
movapd %xmm1, %xmm5
subsd %xmm2, %xmm5
movsd %xmm4, (%rdi,%rax)
movsd %xmm5, 0x8(%rdi,%rax)
subsd %xmm3, %xmm0
addsd %xmm2, %xmm1
movsd %xmm0, (%r15,%rcx)
movsd %xmm1, 0x8(%r15,%rcx)
movl %r14d, %eax
shrl $0x2, %eax
movq %rax, %rcx
shlq $0x4, %rcx
leaq (%rdi,%rcx), %rdx
movupd (%rdi,%rcx), %xmm1
movupd (%r15,%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 0x1643(%rip), %xmm0     # 0x3250
mulpd %xmm0, %xmm2
movapd %xmm1, %xmm3
addpd %xmm2, %xmm3
movupd %xmm3, (%rdi,%rcx)
subpd %xmm2, %xmm1
movupd %xmm1, (%r15,%rdx)
movl $0x3, %r8d
movl %ebp, %ecx
shll %cl, %r8d
shrl $0x2, %r8d
movq %r8, %rcx
shlq $0x4, %rcx
leaq (%rdi,%rcx), %rdx
movsd (%r15,%rdx), %xmm1
movsd 0x8(%r15,%rdx), %xmm2
movapd 0x13d9(%rip), %xmm3     # 0x3030
xorpd %xmm2, %xmm3
movupd (%rdi,%rcx), %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, (%rdi,%rcx)
subpd %xmm2, %xmm4
movupd %xmm4, (%r15,%rdx)
movl $0x1, %r13d
cmpl $0x3, %ebp
movl %r14d, 0x20(%rsp)
jb 0x1da7
cmpl $0x3, %eax
movl $0x2, %r13d
cmovael %eax, %r13d
leaq 0x33d1(%rip), %rbx      # 0x5080
movq (%rbx), %rax
leaq 0x10(%rdi), %r14
movl $0x1, %ebp
movl %ebp, %edx
movl %esi, %ecx
shll %cl, %edx
shlq $0x4, %rdx
movsd (%r14), %xmm5
movsd 0x8(%r14), %xmm6
movupd (%rax,%rdx), %xmm2
movupd (%r14,%r15), %xmm4
movapd %xmm2, %xmm0
mulpd %xmm4, %xmm0
movapd %xmm2, %xmm3
shufpd $0x1, %xmm2, %xmm3      # xmm3 = xmm3[1],xmm2[0]
mulpd %xmm4, %xmm3
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
subsd %xmm1, %xmm0
movapd %xmm3, %xmm1
unpckhpd %xmm3, %xmm1            # xmm1 = xmm1[1],xmm3[1]
addsd %xmm3, %xmm1
ucomisd %xmm0, %xmm0
jp 0x1d50
movapd %xmm5, %xmm2
addsd %xmm0, %xmm2
movapd %xmm6, %xmm3
addsd %xmm1, %xmm3
movsd %xmm2, (%r14)
movsd %xmm3, 0x8(%r14)
subsd %xmm0, %xmm5
subsd %xmm1, %xmm6
movsd %xmm5, (%r14,%r15)
movsd %xmm6, 0x8(%r14,%r15)
incq %rbp
addq $0x10, %r14
cmpq %rbp, %r13
jne 0x1cbb
jmp 0x1da2
ucomisd %xmm1, %xmm1
jnp 0x1d0e
movapd %xmm2, %xmm3
unpckhpd %xmm2, %xmm3            # xmm3 = xmm3[1],xmm2[1]
movapd %xmm4, %xmm1
unpckhpd %xmm4, %xmm1            # xmm1 = xmm1[1],xmm4[1]
movapd %xmm4, %xmm0
movq %r8, 0x10(%rsp)
movsd %xmm5, 0x8(%rsp)
movsd %xmm6, 0x28(%rsp)
callq 0x2130
movsd 0x28(%rsp), %xmm6
movsd 0x8(%rsp), %xmm5
movq 0x10(%rsp), %r8
movq (%rsp), %rdi
movq 0x18(%rsp), %rsi
movq (%rbx), %rax
jmp 0x1d0e
movl 0x20(%rsp), %r14d
leal 0x1(%r13), %eax
cmpl %r12d, %eax
jae 0x1edc
movl %r13d, %r13d
leaq 0x32c2(%rip), %rax      # 0x5080
movq (%rax), %rax
movq %r13, %rcx
shlq $0x4, %rcx
leaq (%rcx,%rdi), %rbp
addq $0x10, %rbp
movq %r13, %r14
subq %r12, %r14
movl $0x1, %ebx
xorl %r12d, %r12d
leal (%rbx,%r13), %edx
movl %esi, %ecx
shll %cl, %edx
shlq $0x4, %rdx
movsd (%rbp), %xmm5
movsd 0x8(%rbp), %xmm6
movupd (%rax,%rdx), %xmm2
movupd (%rbp,%r15), %xmm4
movapd %xmm2, %xmm0
mulpd %xmm4, %xmm0
movapd %xmm2, %xmm3
shufpd $0x1, %xmm2, %xmm3      # xmm3 = xmm3[1],xmm2[0]
mulpd %xmm4, %xmm3
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
subsd %xmm1, %xmm0
movapd %xmm3, %xmm1
unpckhpd %xmm3, %xmm1            # xmm1 = xmm1[1],xmm3[1]
addsd %xmm3, %xmm1
ucomisd %xmm0, %xmm0
jp 0x1e7b
movapd %xmm5, %xmm2
addsd %xmm0, %xmm2
movapd %xmm6, %xmm3
addsd %xmm1, %xmm3
movsd %xmm2, (%rbp)
movsd %xmm3, 0x8(%rbp)
subsd %xmm0, %xmm5
subsd %xmm1, %xmm6
movsd %xmm5, (%rbp,%r15)
movsd %xmm6, 0x8(%rbp,%r15)
addq $0x10, %rbp
decq %r12
incq %rbx
movq %r14, %rcx
addq %rbx, %rcx
jne 0x1dde
jmp 0x1ed4
ucomisd %xmm1, %xmm1
jnp 0x1e33
movapd %xmm2, %xmm3
unpckhpd %xmm2, %xmm3            # xmm3 = xmm3[1],xmm2[1]
movapd %xmm4, %xmm1
unpckhpd %xmm4, %xmm1            # xmm1 = xmm1[1],xmm4[1]
movapd %xmm4, %xmm0
movq %r8, 0x10(%rsp)
movsd %xmm5, 0x8(%rsp)
movsd %xmm6, 0x28(%rsp)
callq 0x2130
movsd 0x28(%rsp), %xmm6
movsd 0x8(%rsp), %xmm5
leaq 0x31c2(%rip), %rax      # 0x5080
movq 0x10(%rsp), %r8
movq (%rsp), %rdi
movq 0x18(%rsp), %rsi
movq (%rax), %rax
jmp 0x1e33
subl %r12d, %r13d
movl 0x20(%rsp), %r14d
leal 0x2(%r13), %eax
cmpl %r8d, %eax
jae 0x1ff9
movl %r13d, %ebx
leaq 0x318d(%rip), %r14      # 0x5080
movq (%r14), %rax
movq %rbx, %rcx
shlq $0x4, %rcx
leaq (%rcx,%rdi), %r12
addq $0x20, %r12
leaq -0x2(%r8), %r13
leal 0x2(%rbx), %edx
movl %esi, %ecx
shll %cl, %edx
shlq $0x4, %rdx
movsd (%r12), %xmm5
movsd 0x8(%r12), %xmm6
movupd (%rax,%rdx), %xmm2
movupd (%r12,%r15), %xmm4
movapd %xmm2, %xmm0
mulpd %xmm4, %xmm0
movapd %xmm2, %xmm3
shufpd $0x1, %xmm2, %xmm3      # xmm3 = xmm3[1],xmm2[0]
mulpd %xmm4, %xmm3
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
subsd %xmm1, %xmm0
movapd %xmm3, %xmm1
unpckhpd %xmm3, %xmm1            # xmm1 = xmm1[1],xmm3[1]
addsd %xmm3, %xmm1
ucomisd %xmm0, %xmm0
jp 0x1fa3
movapd %xmm5, %xmm2
addsd %xmm0, %xmm2
movapd %xmm6, %xmm3
addsd %xmm1, %xmm3
movsd %xmm2, (%r12)
movsd %xmm3, 0x8(%r12)
subsd %xmm0, %xmm5
subsd %xmm1, %xmm6
movsd %xmm5, (%r12,%r15)
movsd %xmm6, 0x8(%r12,%r15)
incq %rbx
addq $0x10, %r12
cmpq %rbx, %r13
jne 0x1f09
jmp 0x1ff1
ucomisd %xmm1, %xmm1
jnp 0x1f5f
movapd %xmm2, %xmm3
unpckhpd %xmm2, %xmm3            # xmm3 = xmm3[1],xmm2[1]
movapd %xmm4, %xmm1
unpckhpd %xmm4, %xmm1            # xmm1 = xmm1[1],xmm4[1]
movapd %xmm4, %xmm0
movq %r8, %rbp
movsd %xmm5, 0x10(%rsp)
movsd %xmm6, 0x8(%rsp)
callq 0x2130
movsd 0x8(%rsp), %xmm6
movsd 0x10(%rsp), %xmm5
movq %rbp, %r8
movq (%rsp), %rdi
movq 0x18(%rsp), %rsi
movq (%r14), %rax
jmp 0x1f5f
movl %r8d, %eax
movl 0x20(%rsp), %r14d
leal 0x1(%rax), %ecx
cmpl %r14d, %ecx
movq 0x30(%rsp), %r13
jae 0x2101
movl %eax, %ecx
leaq 0x1(%rcx), %rbx
leaq 0x3069(%rip), %r14      # 0x5080
movq (%r14), %rax
shlq $0x4, %rcx
leaq (%rcx,%rdi), %r12
addq $0x10, %r12
movl %ebx, %edx
movl %esi, %ecx
shll %cl, %edx
shlq $0x4, %rdx
movsd (%r12), %xmm5
movsd 0x8(%r12), %xmm6
movupd (%rax,%rdx), %xmm2
movupd (%r12,%r15), %xmm4
movapd %xmm2, %xmm0
mulpd %xmm4, %xmm0
movapd %xmm2, %xmm3
shufpd $0x1, %xmm2, %xmm3      # xmm3 = xmm3[1],xmm2[0]
mulpd %xmm4, %xmm3
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
subsd %xmm1, %xmm0
movapd %xmm3, %xmm1
unpckhpd %xmm3, %xmm1            # xmm1 = xmm1[1],xmm3[1]
addsd %xmm3, %xmm1
ucomisd %xmm0, %xmm0
jp 0x20bf
movapd %xmm5, %xmm2
addsd %xmm0, %xmm2
movapd %xmm6, %xmm3
addsd %xmm1, %xmm3
movsd %xmm2, (%r12)
movsd %xmm3, 0x8(%r12)
subsd %xmm0, %xmm5
subsd %xmm1, %xmm6
movsd %xmm5, (%r12,%r15)
movsd %xmm6, 0x8(%r12,%r15)
incq %rbx
addq $0x10, %r12
cmpq %rbx, %r13
jne 0x2026
jmp 0x2101
ucomisd %xmm1, %xmm1
jnp 0x207b
movapd %xmm2, %xmm3
unpckhpd %xmm2, %xmm3            # xmm3 = xmm3[1],xmm2[1]
movapd %xmm4, %xmm1
unpckhpd %xmm4, %xmm1            # xmm1 = xmm1[1],xmm4[1]
movapd %xmm4, %xmm0
movsd %xmm5, (%rsp)
movsd %xmm6, 0x20(%rsp)
callq 0x2130
movsd 0x20(%rsp), %xmm6
movsd (%rsp), %xmm5
movq 0x18(%rsp), %rsi
movq (%r14), %rax
jmp 0x207b
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq