// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x100, %rsp            # imm = 0x100
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl -0x18(%rbp), %eax
movl -0x14(%rbp), %ecx
subl %ecx, %eax
movb %al, %cl
decb %cl
movl $0x1, %eax
movl %eax, %edx
shll %cl, %edx
movl %edx, %ecx
movl %ecx, -0x1c(%rbp)
movb -0x14(%rbp), %cl
shll %cl, %eax
movl %eax, -0x20(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x7c(%rbp)
subl $0x1, %eax
je 0x1ee5
jmp 0x1ed8
movl -0x7c(%rbp), %eax
subl $0x2, %eax
je 0x1eff
jmp 0x1f66
movl -0x20(%rbp), %esi
movq -0x10(%rbp), %rdx
movq -0x8(%rbp), %rcx
movl $0x1, %edi
callq 0x23d0
jmp 0x238f
movl -0x20(%rbp), %esi
shll %esi
movq -0x10(%rbp), %rdx
movq -0x8(%rbp), %rcx
movl $0x1, %edi
callq 0x23d0
movl -0x20(%rbp), %esi
shll %esi
movq -0x10(%rbp), %rdx
addq $0x20, %rdx
movq -0x8(%rbp), %rcx
movl -0x20(%rbp), %eax
shlq $0x4, %rax
addq %rax, %rcx
movl $0x1, %edi
callq 0x23d0
movq -0x10(%rbp), %rdx
movq -0x10(%rbp), %rcx
movl $0x2, %esi
movl %esi, %edi
callq 0x23d0
movq -0x10(%rbp), %rsi
addq $0x10, %rsi
movl $0x2, %edi
callq 0x2480
jmp 0x238f
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
addl $0x1, %edx
movl -0x18(%rbp), %ecx
callq 0x1e90
movq -0x8(%rbp), %rdi
movl -0x20(%rbp), %eax
shlq $0x4, %rax
addq %rax, %rdi
movq -0x10(%rbp), %rsi
movl -0x1c(%rbp), %eax
shlq $0x4, %rax
addq %rax, %rsi
movl -0x14(%rbp), %edx
addl $0x1, %edx
movl -0x18(%rbp), %ecx
callq 0x1e90
movl -0x1c(%rbp), %edi
movl -0x1c(%rbp), %esi
movq -0x10(%rbp), %rdx
movq -0x10(%rbp), %rcx
callq 0x23d0
movl -0x1c(%rbp), %edi
movq -0x10(%rbp), %rsi
movl -0x1c(%rbp), %eax
shrl %eax
movl %eax, %eax
shlq $0x4, %rax
addq %rax, %rsi
callq 0x2480
movl -0x1c(%rbp), %edi
movq -0x10(%rbp), %rsi
movl -0x1c(%rbp), %eax
shrl $0x2, %eax
movl %eax, %eax
shlq $0x4, %rax
addq %rax, %rsi
callq 0x2560
movl -0x1c(%rbp), %edi
movq -0x10(%rbp), %rsi
imull $0x3, -0x1c(%rbp), %eax
shrl $0x2, %eax
movl %eax, %eax
shlq $0x4, %rax
addq %rax, %rsi
callq 0x2650
movl $0x1, -0x24(%rbp)
movl -0x24(%rbp), %eax
movl -0x1c(%rbp), %ecx
shrl $0x2, %ecx
cmpl %ecx, %eax
jae 0x238d
movl -0x24(%rbp), %edi
movl -0x14(%rbp), %ecx
shll %cl, %edi
movl -0x18(%rbp), %esi
callq 0x2770
movsd %xmm0, -0x38(%rbp)
movsd %xmm1, -0x30(%rbp)
movl -0x1c(%rbp), %edi
movq -0x10(%rbp), %rsi
movl -0x24(%rbp), %eax
shlq $0x4, %rax
addq %rax, %rsi
movsd -0x38(%rbp), %xmm1
movsd -0x30(%rbp), %xmm0
movsd %xmm1, -0x48(%rbp)
movsd %xmm0, -0x40(%rbp)
movsd -0x48(%rbp), %xmm0
movsd -0x40(%rbp), %xmm1
callq 0x27b0
movl -0x1c(%rbp), %eax
movl %eax, -0xbc(%rbp)
movq -0x10(%rbp), %rax
movl -0x24(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movl -0x1c(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0xb8(%rbp)
movsd -0x38(%rbp), %xmm1
movsd %xmm1, -0xb0(%rbp)
movsd -0x30(%rbp), %xmm2
movsd %xmm2, -0xa8(%rbp)
movsd 0xf9a(%rip), %xmm3      # 0x3058
movaps %xmm1, %xmm0
mulsd %xmm3, %xmm0
movsd 0x1173(%rip), %xmm4     # 0x3240
movaps %xmm2, %xmm3
mulsd %xmm4, %xmm3
movsd 0x1164(%rip), %xmm4     # 0x3240
mulsd %xmm4, %xmm1
movsd 0xf70(%rip), %xmm4      # 0x3058
mulsd %xmm4, %xmm2
subsd %xmm3, %xmm0
movsd %xmm0, -0xa0(%rbp)
addsd %xmm2, %xmm1
movsd %xmm1, -0x98(%rbp)
ucomisd %xmm0, %xmm0
movsd %xmm0, -0x90(%rbp)
movsd %xmm1, -0x88(%rbp)
jnp 0x2175
movsd -0x98(%rbp), %xmm1
movsd -0xa0(%rbp), %xmm0
ucomisd %xmm1, %xmm1
movsd %xmm0, -0x90(%rbp)
movsd %xmm1, -0x88(%rbp)
jnp 0x2175
movsd -0xa8(%rbp), %xmm1
movsd -0xb0(%rbp), %xmm0
movsd 0xf00(%rip), %xmm2      # 0x3058
movsd 0x10e0(%rip), %xmm3     # 0x3240
callq 0x2910
movsd %xmm0, -0x90(%rbp)
movsd %xmm1, -0x88(%rbp)
movq -0xb8(%rbp), %rsi
movl -0xbc(%rbp), %edi
movsd -0x90(%rbp), %xmm1
movsd -0x88(%rbp), %xmm0
movsd %xmm1, -0x58(%rbp)
movsd %xmm0, -0x50(%rbp)
movsd -0x58(%rbp), %xmm0
movsd -0x50(%rbp), %xmm1
callq 0x27b0
movl -0x1c(%rbp), %eax
movl %eax, -0xfc(%rbp)
movq -0x10(%rbp), %rax
movl -0x1c(%rbp), %ecx
shrl %ecx
movl %ecx, %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movl -0x24(%rbp), %ecx
movl %ecx, %edx
xorl %ecx, %ecx
subq %rdx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0xf8(%rbp)
movsd -0x38(%rbp), %xmm1
movsd %xmm1, -0xf0(%rbp)
movsd -0x30(%rbp), %xmm2
movsd %xmm2, -0xe8(%rbp)
xorps %xmm3, %xmm3
movaps %xmm1, %xmm0
mulsd %xmm3, %xmm0
movsd 0xe06(%rip), %xmm4      # 0x3010
movaps %xmm2, %xmm3
mulsd %xmm4, %xmm3
movsd 0xdf7(%rip), %xmm4      # 0x3010
mulsd %xmm4, %xmm1
xorps %xmm4, %xmm4
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 0x22a8
movsd -0xd8(%rbp), %xmm1
movsd -0xe0(%rbp), %xmm0
ucomisd %xmm1, %xmm1
movsd %xmm0, -0xd0(%rbp)
movsd %xmm1, -0xc8(%rbp)
jnp 0x22a8
movsd -0xe8(%rbp), %xmm1
movsd -0xf0(%rbp), %xmm0
xorps %xmm2, %xmm2
movsd 0xd7d(%rip), %xmm3      # 0x3010
callq 0x2910
movsd %xmm0, -0xd0(%rbp)
movsd %xmm1, -0xc8(%rbp)
movq -0xf8(%rbp), %rsi
movl -0xfc(%rbp), %edi
movsd -0xd0(%rbp), %xmm1
movsd -0xc8(%rbp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm1, -0x68(%rbp)
movsd %xmm0, -0x60(%rbp)
movsd -0x68(%rbp), %xmm0
movsd -0x60(%rbp), %xmm1
callq 0x27b0
movl -0x1c(%rbp), %edi
movq -0x10(%rbp), %rsi
movl -0x1c(%rbp), %eax
shlq $0x4, %rax
addq %rax, %rsi
movl -0x24(%rbp), %eax
movl %eax, %ecx
xorl %eax, %eax
subq %rcx, %rax
shlq $0x4, %rax
addq %rax, %rsi
movsd -0x38(%rbp), %xmm1
movsd -0x30(%rbp), %xmm0
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm1, -0x78(%rbp)
movsd %xmm0, -0x70(%rbp)
movsd -0x78(%rbp), %xmm0
movsd -0x70(%rbp), %xmm1
callq 0x27b0
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x2011
jmp 0x238f
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq
nopl (%rax,%rax)