// File: /workspace/github_c_makefile_star2_O1/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
movq %rdi, %r15
movl %edx, %ebp
notl %ebp
addl %ecx, %ebp
movl $0x1, %ebx
movl $0x1, %r14d
movl %ebp, %ecx
shll %cl, %r14d
movl %edx, %ecx
shll %cl, %ebx
cmpl $0x2, %r14d
je 0x1aaa
cmpl $0x1, %r14d
jne 0x1b98
movsd (%r15), %xmm0
movsd 0x8(%r15), %xmm1
movl %ebx, %eax
shlq $0x4, %rax
movsd (%r15,%rax), %xmm2
movsd 0x8(%r15,%rax), %xmm3
movapd %xmm0, %xmm4
addsd %xmm2, %xmm4
movapd %xmm1, %xmm5
addsd %xmm3, %xmm5
movsd %xmm4, (%rsi)
movsd %xmm5, 0x8(%rsi)
subsd %xmm2, %xmm0
subsd %xmm3, %xmm1
movsd %xmm0, 0x10(%rsi)
movsd %xmm1, 0x18(%rsi)
jmp 0x21ce
movl $0x2, %eax
movl %edx, %ecx
shll %cl, %eax
movsd (%r15), %xmm0
movsd 0x8(%r15), %xmm1
shlq $0x4, %rax
movsd (%r15,%rax), %xmm4
movsd 0x8(%r15,%rax), %xmm5
movapd %xmm0, %xmm2
addsd %xmm4, %xmm2
movapd %xmm1, %xmm3
addsd %xmm5, %xmm3
movsd %xmm2, (%rsi)
movsd %xmm3, 0x8(%rsi)
subsd %xmm4, %xmm0
subsd %xmm5, %xmm1
movsd %xmm0, 0x10(%rsi)
movsd %xmm1, 0x18(%rsi)
movl %ebx, %ecx
shlq $0x4, %rcx
leaq (%r15,%rcx), %rdx
movsd (%r15,%rcx), %xmm4
movsd 0x8(%r15,%rcx), %xmm5
movsd (%rax,%rdx), %xmm6
movsd 0x8(%rax,%rdx), %xmm7
movapd %xmm4, %xmm8
addsd %xmm6, %xmm8
movapd %xmm5, %xmm9
addsd %xmm7, %xmm9
subsd %xmm6, %xmm4
subsd %xmm7, %xmm5
movapd %xmm2, %xmm6
addsd %xmm8, %xmm6
movapd %xmm3, %xmm7
addsd %xmm9, %xmm7
movsd %xmm6, (%rsi)
movsd %xmm7, 0x8(%rsi)
subsd %xmm8, %xmm2
subsd %xmm9, %xmm3
movsd %xmm2, 0x20(%rsi)
movsd %xmm3, 0x28(%rsi)
movapd %xmm0, %xmm2
addsd %xmm5, %xmm2
movapd %xmm1, %xmm3
subsd %xmm4, %xmm3
movsd %xmm2, 0x10(%rsi)
movsd %xmm3, 0x18(%rsi)
subsd %xmm5, %xmm0
addsd %xmm1, %xmm4
movsd %xmm0, 0x30(%rsi)
movsd %xmm4, 0x38(%rsi)
jmp 0x21ce
leal 0x1(%rdx), %r13d
movq %r15, %rdi
movq %rsi, (%rsp)
movq (%rsp), %rsi
movq %rdx, 0x18(%rsp)
movl %r13d, %edx
movl %r12d, %ecx
callq 0x1a1e
movl %ebx, %edi
shlq $0x4, %rdi
addq %r15, %rdi
movl %r14d, %r15d
movq %r15, 0x20(%rsp)
shlq $0x4, %r15
movq (%rsp), %rax
leaq (%rax,%r15), %rsi
movl %r13d, %edx
movl %r12d, %ecx
callq 0x1a1e
movq (%rsp), %rsi
movsd (%rsi), %xmm0
movsd 0x8(%rsi), %xmm1
movsd (%rsi,%r15), %xmm2
movsd 0x8(%rsi,%r15), %xmm3
movapd %xmm0, %xmm4
addsd %xmm2, %xmm4
movapd %xmm1, %xmm5
addsd %xmm3, %xmm5
movsd %xmm4, (%rsi)
movsd %xmm5, 0x8(%rsi)
subsd %xmm2, %xmm0
subsd %xmm3, %xmm1
movsd %xmm0, (%rsi,%r15)
movsd %xmm1, 0x8(%rsi,%r15)
movl %r14d, %r8d
shrl %r8d
movq %r8, %rax
shlq $0x4, %rax
leaq (%rsi,%rax), %rcx
movsd (%rsi,%rax), %xmm0
movsd 0x8(%rsi,%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, (%rsi,%rax)
movsd %xmm5, 0x8(%rsi,%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 (%rsi,%rcx), %rdx
movsd (%rsi,%rcx), %xmm1
movsd 0x8(%rsi,%rcx), %xmm2
movsd (%r15,%rdx), %xmm3
movsd 0x8(%r15,%rdx), %xmm4
movapd %xmm3, %xmm5
addsd %xmm4, %xmm5
movsd 0x1597(%rip), %xmm0     # 0x3250
mulsd %xmm0, %xmm5
subsd %xmm3, %xmm4
mulsd %xmm0, %xmm4
movapd %xmm1, %xmm3
addsd %xmm5, %xmm3
movapd %xmm2, %xmm6
addsd %xmm4, %xmm6
movsd %xmm3, (%rsi,%rcx)
movsd %xmm6, 0x8(%rsi,%rcx)
subsd %xmm5, %xmm1
subsd %xmm4, %xmm2
movsd %xmm1, (%r15,%rdx)
movl $0x3, %edi
movl %ebp, %ecx
shll %cl, %edi
movsd %xmm2, 0x8(%r15,%rdx)
shrl $0x2, %edi
movq %rdi, %rcx
shlq $0x4, %rcx
leaq (%rsi,%rcx), %rdx
movsd (%rsi,%rcx), %xmm1
movsd 0x8(%rsi,%rcx), %xmm2
movsd (%r15,%rdx), %xmm3
movsd 0x8(%r15,%rdx), %xmm4
movapd %xmm4, %xmm5
subsd %xmm3, %xmm5
mulsd %xmm0, %xmm5
xorpd 0x12f8(%rip), %xmm4     # 0x3030
subsd %xmm3, %xmm4
mulsd %xmm0, %xmm4
movapd %xmm1, %xmm0
addsd %xmm5, %xmm0
movapd %xmm2, %xmm3
addsd %xmm4, %xmm3
movsd %xmm0, (%rsi,%rcx)
movsd %xmm3, 0x8(%rsi,%rcx)
subsd %xmm5, %xmm1
subsd %xmm4, %xmm2
movsd %xmm1, (%r15,%rdx)
movsd %xmm2, 0x8(%r15,%rdx)
movq 0x18(%rsp), %rcx
movl $0x1, %r13d
cmpl $0x3, %ebp
movl %r14d, 0x34(%rsp)
jb 0x1e92
cmpl $0x3, %eax
movl $0x2, %ebx
cmovael %eax, %ebx
leaq 0x18(%rsi), %r14
movl $0x1, %r13d
leaq 0x32db(%rip), %r12      # 0x5080
movl %r13d, %eax
shll %cl, %eax
movq (%r12), %rdx
shlq $0x4, %rax
movsd (%rdx,%rax), %xmm2
movsd 0x8(%rdx,%rax), %xmm3
movsd -0x8(%r14), %xmm7
movsd (%r14), %xmm8
movsd -0x8(%r14,%r15), %xmm4
movsd (%r14,%r15), %xmm5
movapd %xmm2, %xmm0
mulsd %xmm4, %xmm0
movapd %xmm3, %xmm1
mulsd %xmm5, %xmm1
subsd %xmm1, %xmm0
movapd %xmm3, %xmm6
mulsd %xmm4, %xmm6
movapd %xmm2, %xmm1
mulsd %xmm5, %xmm1
addsd %xmm6, %xmm1
ucomisd %xmm0, %xmm0
jp 0x1e47
movapd %xmm7, %xmm2
addsd %xmm0, %xmm2
movapd %xmm8, %xmm3
addsd %xmm1, %xmm3
movsd %xmm2, -0x8(%r14)
movsd %xmm3, (%r14)
subsd %xmm0, %xmm7
subsd %xmm1, %xmm8
movsd %xmm7, -0x8(%r14,%r15)
movsd %xmm8, (%r14,%r15)
incq %r13
addq $0x10, %r14
cmpq %r13, %rbx
jne 0x1da5
jmp 0x1e92
ucomisd %xmm1, %xmm1
jnp 0x1e03
movapd %xmm4, %xmm0
movapd %xmm5, %xmm1
movq %rdi, 0x10(%rsp)
movq %r8, %rbp
movsd %xmm7, 0x8(%rsp)
movsd %xmm8, 0x28(%rsp)
callq 0x2200
movsd 0x28(%rsp), %xmm8
movsd 0x8(%rsp), %xmm7
movq %rbp, %r8
movq 0x10(%rsp), %rdi
movq (%rsp), %rsi
movq 0x18(%rsp), %rcx
jmp 0x1e03
leal 0x1(%r13), %eax
cmpl %r8d, %eax
jae 0x1fc3
movl %r13d, %r13d
movl %r8d, %eax
movq %r13, %rdx
shlq $0x4, %rdx
leaq (%rdx,%rsi), %r12
addq $0x18, %r12
movq %r13, %r14
subq %rax, %r14
movl $0x1, %ebx
xorl %ebp, %ebp
leaq 0x31b8(%rip), %r8       # 0x5080
leal (%rbx,%r13), %eax
shll %cl, %eax
movq (%r8), %rdx
shlq $0x4, %rax
movsd (%rdx,%rax), %xmm2
movsd 0x8(%rdx,%rax), %xmm3
movsd -0x8(%r12), %xmm7
movsd (%r12), %xmm8
movsd -0x8(%r12,%r15), %xmm4
movsd (%r12,%r15), %xmm5
movapd %xmm2, %xmm0
mulsd %xmm4, %xmm0
movapd %xmm3, %xmm1
mulsd %xmm5, %xmm1
subsd %xmm1, %xmm0
movapd %xmm3, %xmm6
mulsd %xmm4, %xmm6
movapd %xmm2, %xmm1
mulsd %xmm5, %xmm1
addsd %xmm6, %xmm1
ucomisd %xmm0, %xmm0
jp 0x1f74
movapd %xmm7, %xmm2
addsd %xmm0, %xmm2
movapd %xmm8, %xmm3
addsd %xmm1, %xmm3
movsd %xmm2, -0x8(%r12)
movsd %xmm3, (%r12)
subsd %xmm0, %xmm7
subsd %xmm1, %xmm8
movsd %xmm7, -0x8(%r12,%r15)
movsd %xmm8, (%r12,%r15)
decq %rbp
addq $0x10, %r12
incq %rbx
movq %r14, %rax
addq %rbx, %rax
jne 0x1ec8
jmp 0x1fc0
ucomisd %xmm1, %xmm1
jnp 0x1f28
movapd %xmm4, %xmm0
movapd %xmm5, %xmm1
movq %rdi, 0x10(%rsp)
movsd %xmm7, 0x8(%rsp)
movsd %xmm8, 0x28(%rsp)
callq 0x2200
movsd 0x28(%rsp), %xmm8
movsd 0x8(%rsp), %xmm7
leaq 0x30d3(%rip), %r8       # 0x5080
movq 0x10(%rsp), %rdi
movq (%rsp), %rsi
movq 0x18(%rsp), %rcx
jmp 0x1f28
subl %ebp, %r13d
leal 0x2(%r13), %ebp
cmpl %edi, %ebp
jae 0x20c9
movl %r13d, %eax
movl %edi, %r14d
subq %rax, %r14
shlq $0x4, %rax
leaq (%rax,%rsi), %rbx
addq $0x28, %rbx
addq $-0x2, %r14
leaq 0x3091(%rip), %r12      # 0x5080
movq 0x20(%rsp), %r13
movl %ebp, %eax
shll %cl, %eax
movq (%r12), %rdx
shlq $0x4, %rax
movsd (%rdx,%rax), %xmm2
movsd 0x8(%rdx,%rax), %xmm3
movsd -0x8(%rbx), %xmm7
movsd (%rbx), %xmm8
movsd -0x8(%rbx,%r15), %xmm4
movsd (%rbx,%r15), %xmm5
movapd %xmm2, %xmm0
mulsd %xmm4, %xmm0
movapd %xmm3, %xmm1
mulsd %xmm5, %xmm1
subsd %xmm1, %xmm0
movapd %xmm3, %xmm6
mulsd %xmm4, %xmm6
movapd %xmm2, %xmm1
mulsd %xmm5, %xmm1
addsd %xmm6, %xmm1
ucomisd %xmm0, %xmm0
jp 0x2091
movapd %xmm7, %xmm2
addsd %xmm0, %xmm2
movapd %xmm8, %xmm3
addsd %xmm1, %xmm3
movsd %xmm2, -0x8(%rbx)
movsd %xmm3, (%rbx)
subsd %xmm0, %xmm7
subsd %xmm1, %xmm8
movsd %xmm7, -0x8(%rbx,%r15)
movsd %xmm8, (%rbx,%r15)
incl %ebp
addq $0x10, %rbx
decq %r14
jne 0x1ff4
jmp 0x20ce
ucomisd %xmm1, %xmm1
jnp 0x2050
movapd %xmm4, %xmm0
movapd %xmm5, %xmm1
movsd %xmm7, 0x10(%rsp)
movsd %xmm8, 0x8(%rsp)
callq 0x2200
movsd 0x8(%rsp), %xmm8
movsd 0x10(%rsp), %xmm7
movq (%rsp), %rsi
movq 0x18(%rsp), %rcx
jmp 0x2050
movq 0x20(%rsp), %r13
leal 0x1(%rbp), %eax
cmpl 0x34(%rsp), %eax
jae 0x21ce
movl %ebp, %eax
leaq 0x1(%rax), %rbx
shlq $0x4, %rax
leaq (%rax,%rsi), %r14
addq $0x18, %r14
movq %r13, %r15
shlq $0x4, %r15
leaq 0x2f85(%rip), %r12      # 0x5080
movl %ebx, %eax
shll %cl, %eax
movq (%r12), %rdx
shlq $0x4, %rax
movsd (%rdx,%rax), %xmm2
movsd 0x8(%rdx,%rax), %xmm3
movsd -0x8(%r14), %xmm7
movsd (%r14), %xmm8
movsd -0x8(%r14,%r15), %xmm4
movsd (%r14,%r15), %xmm5
movapd %xmm2, %xmm0
mulsd %xmm4, %xmm0
movapd %xmm3, %xmm1
mulsd %xmm5, %xmm1
subsd %xmm1, %xmm0
movapd %xmm3, %xmm6
mulsd %xmm4, %xmm6
movapd %xmm2, %xmm1
mulsd %xmm5, %xmm1
addsd %xmm6, %xmm1
ucomisd %xmm0, %xmm0
jp 0x219c
movapd %xmm7, %xmm2
addsd %xmm0, %xmm2
movapd %xmm8, %xmm3
addsd %xmm1, %xmm3
movsd %xmm2, -0x8(%r14)
movsd %xmm3, (%r14)
subsd %xmm0, %xmm7
subsd %xmm1, %xmm8
movsd %xmm7, -0x8(%r14,%r15)
movsd %xmm8, (%r14,%r15)
incq %rbx
addq $0x10, %r14
cmpq %rbx, %r13
jne 0x20fb
jmp 0x21ce
ucomisd %xmm1, %xmm1
jnp 0x2158
movapd %xmm4, %xmm0
movapd %xmm5, %xmm1
movsd %xmm7, (%rsp)
movsd %xmm8, 0x20(%rsp)
callq 0x2200
movsd 0x20(%rsp), %xmm8
movsd (%rsp), %xmm7
movq 0x18(%rsp), %rcx
jmp 0x2158
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq