// File: /workspace/github_cpp_makefile_star2_O3/Sleepwalking[P]world-octave/fft.cpp
// Function: cftmdl2(int, double*, double*)
void cftmdl2(int n, double *a, double *w) {
  int j, j0, j1, j2, j3, k, kr, m, mh;
  double wn4r, wk1r, wk1i, wk3r, wk3i, wd1r, wd1i, wd3r, wd3i;
  double x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i, y0r, y0i, y2r, y2i;

  mh = n >> 3;
  m = 2 * mh;
  wn4r = w[1];
  j1 = m;
  j2 = j1 + m;
  j3 = j2 + m;
  x0r = a[0] - a[j2 + 1];
  x0i = a[1] + a[j2];
  x1r = a[0] + a[j2 + 1];
  x1i = a[1] - a[j2];
  x2r = a[j1] - a[j3 + 1];
  x2i = a[j1 + 1] + a[j3];
  x3r = a[j1] + a[j3 + 1];
  x3i = a[j1 + 1] - a[j3];
  y0r = wn4r * (x2r - x2i);
  y0i = wn4r * (x2i + x2r);
  a[0] = x0r + y0r;
  a[1] = x0i + y0i;
  a[j1] = x0r - y0r;
  a[j1 + 1] = x0i - y0i;
  y0r = wn4r * (x3r - x3i);
  y0i = wn4r * (x3i + x3r);
  a[j2] = x1r - y0i;
  a[j2 + 1] = x1i + y0r;
  a[j3] = x1r + y0i;
  a[j3 + 1] = x1i - y0r;
  k = 0;
  kr = 2 * m;
  for (j = 2; j < mh; j += 2) {
    k += 4;
    wk1r = w[k];
    wk1i = w[k + 1];
    wk3r = w[k + 2];
    wk3i = w[k + 3];
    kr -= 4;
    wd1i = w[kr];
    wd1r = w[kr + 1];
    wd3i = w[kr + 2];
    wd3r = w[kr + 3];
    j1 = j + m;
    j2 = j1 + m;
    j3 = j2 + m;
    x0r = a[j] - a[j2 + 1];
    x0i = a[j + 1] + a[j2];
    x1r = a[j] + a[j2 + 1];
    x1i = a[j + 1] - a[j2];
    x2r = a[j1] - a[j3 + 1];
    x2i = a[j1 + 1] + a[j3];
    x3r = a[j1] + a[j3 + 1];
    x3i = a[j1 + 1] - a[j3];
    y0r = wk1r * x0r - wk1i * x0i;
    y0i = wk1r * x0i + wk1i * x0r;
    y2r = wd1r * x2r - wd1i * x2i;
    y2i = wd1r * x2i + wd1i * x2r;
    a[j] = y0r + y2r;
    a[j + 1] = y0i + y2i;
    a[j1] = y0r - y2r;
    a[j1 + 1] = y0i - y2i;
    y0r = wk3r * x1r + wk3i * x1i;
    y0i = wk3r * x1i - wk3i * x1r;
    y2r = wd3r * x3r + wd3i * x3i;
    y2i = wd3r * x3i - wd3i * x3r;
    a[j2] = y0r + y2r;
    a[j2 + 1] = y0i + y2i;
    a[j3] = y0r - y2r;
    a[j3 + 1] = y0i - y2i;
    j0 = m - j;
    j1 = j0 + m;
    j2 = j1 + m;
    j3 = j2 + m;
    x0r = a[j0] - a[j2 + 1];
    x0i = a[j0 + 1] + a[j2];
    x1r = a[j0] + a[j2 + 1];
    x1i = a[j0 + 1] - a[j2];
    x2r = a[j1] - a[j3 + 1];
    x2i = a[j1 + 1] + a[j3];
    x3r = a[j1] + a[j3 + 1];
    x3i = a[j1 + 1] - a[j3];
    y0r = wd1i * x0r - wd1r * x0i;
    y0i = wd1i * x0i + wd1r * x0r;
    y2r = wk1i * x2r - wk1r * x2i;
    y2i = wk1i * x2i + wk1r * x2r;
    a[j0] = y0r + y2r;
    a[j0 + 1] = y0i + y2i;
    a[j1] = y0r - y2r;
    a[j1 + 1] = y0i - y2i;
    y0r = wd3i * x1r + wd3r * x1i;
    y0i = wd3i * x1i - wd3r * x1r;
    y2r = wk3i * x3r + wk3r * x3i;
    y2i = wk3i * x3i - wk3r * x3r;
    a[j2] = y0r + y2r;
    a[j2 + 1] = y0i + y2i;
    a[j3] = y0r - y2r;
    a[j3 + 1] = y0i - y2i;
  }
  wk1r = w[m];
  wk1i = w[m + 1];
  j0 = mh;
  j1 = j0 + m;
  j2 = j1 + m;
  j3 = j2 + m;
  x0r = a[j0] - a[j2 + 1];
  x0i = a[j0 + 1] + a[j2];
  x1r = a[j0] + a[j2 + 1];
  x1i = a[j0 + 1] - a[j2];
  x2r = a[j1] - a[j3 + 1];
  x2i = a[j1 + 1] + a[j3];
  x3r = a[j1] + a[j3 + 1];
  x3i = a[j1 + 1] - a[j3];
  y0r = wk1r * x0r - wk1i * x0i;
  y0i = wk1r * x0i + wk1i * x0r;
  y2r = wk1i * x2r - wk1r * x2i;
  y2i = wk1i * x2i + wk1r * x2r;
  a[j0] = y0r + y2r;
  a[j0 + 1] = y0i + y2i;
  a[j1] = y0r - y2r;
  a[j1 + 1] = y0i - y2i;
  y0r = wk1i * x1r - wk1r * x1i;
  y0i = wk1i * x1i + wk1r * x1r;
  y2r = wk1r * x3r - wk1i * x3i;
  y2i = wk1r * x3i + wk1i * x3r;
  a[j2] = y0r - y2r;
  a[j2 + 1] = y0i - y2i;
  a[j3] = y0r + y2r;
  a[j3 + 1] = y0i + y2i;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
sarl $0x3, %edi
leal (%rdi,%rdi), %r9d
movsd 0x8(%rdx), %xmm1
leal (,%rdi,4), %eax
leal (%r9,%r9,2), %r10d
leal 0x1(,%rdi,4), %ecx
movslq %ecx, %rcx
movsd (%rsi,%rcx,8), %xmm3
movsd (%rsi), %xmm2
movsd 0x8(%rsi), %xmm0
movapd %xmm2, %xmm4
subsd %xmm3, %xmm4
movslq %eax, %r8
movsd (%rsi,%r8,8), %xmm6
movapd %xmm0, %xmm5
addsd %xmm6, %xmm5
addsd %xmm3, %xmm2
subsd %xmm6, %xmm0
movslq %r9d, %rax
movsd (%rsi,%rax,8), %xmm6
leal 0x1(%r9,%r9,2), %r9d
movslq %r9d, %r9
movsd (%rsi,%r9,8), %xmm7
movapd %xmm6, %xmm8
subsd %xmm7, %xmm8
leal 0x1(%rdi,%rdi), %r11d
movslq %r11d, %r11
movsd (%rsi,%r11,8), %xmm3
movslq %r10d, %r10
movsd (%rsi,%r10,8), %xmm9
movapd %xmm3, %xmm10
addsd %xmm9, %xmm10
addsd %xmm7, %xmm6
subsd %xmm9, %xmm3
movapd %xmm8, %xmm7
subsd %xmm10, %xmm7
mulsd %xmm1, %xmm7
addsd %xmm8, %xmm10
mulsd %xmm1, %xmm10
movapd %xmm4, %xmm8
addsd %xmm7, %xmm8
movsd %xmm8, (%rsi)
movapd %xmm5, %xmm8
addsd %xmm10, %xmm8
movsd %xmm8, 0x8(%rsi)
subsd %xmm7, %xmm4
movsd %xmm4, (%rsi,%rax,8)
subsd %xmm10, %xmm5
movsd %xmm5, (%rsi,%r11,8)
movapd %xmm6, %xmm4
subsd %xmm3, %xmm4
mulsd %xmm1, %xmm4
addsd %xmm6, %xmm3
mulsd %xmm1, %xmm3
movapd %xmm2, %xmm1
subsd %xmm3, %xmm1
movsd %xmm1, (%rsi,%r8,8)
movapd %xmm0, %xmm1
addsd %xmm4, %xmm1
movsd %xmm1, (%rsi,%rcx,8)
addsd %xmm2, %xmm3
movsd %xmm3, (%rsi,%r10,8)
subsd %xmm4, %xmm0
movsd %xmm0, (%rsi,%r9,8)
cmpl $0x2, %edi
jle 0xd0c7
movq %r11, -0x20(%rsp)
movl %edi, %ecx
leaq (%rdx,%r8,8), %r9
addq $-0x8, %r9
leaq 0x38(%rdx), %r10
leaq -0x2(%rax), %r11
movq %rax, %rbx
shlq $0x4, %rbx
leaq -0x10(%rbx), %r14
movq %rax, %r15
shlq $0x5, %r15
addq $-0x10, %r15
leaq (,%rax,8), %r8
leaq (%r8,%r8,2), %r12
addq $-0x10, %r12
leaq 0x2(%rax), %r13
leaq (%r8,%r8,2), %rbp
addq $0x10, %rbp
addq $0x10, %rbx
movl $0x2, %r8d
movsd -0x18(%r10), %xmm13
movsd -0x10(%r10), %xmm4
movsd -0x8(%r10), %xmm0
movaps %xmm0, -0x18(%rsp)
movsd (%r10), %xmm0
movapd %xmm4, %xmm7
movsd -0x18(%r9), %xmm2
movsd -0x10(%r9), %xmm9
movapd %xmm2, %xmm8
movapd 0x229b(%rip), %xmm3     # 0xf090
xorpd %xmm3, %xmm7
movupd (%rsi,%r8,8), %xmm6
movupd (%rsi,%rbx), %xmm10
shufpd $0x1, %xmm10, %xmm10    # xmm10 = xmm10[1,0]
xorpd %xmm3, %xmm8
movapd %xmm6, %xmm11
addpd %xmm10, %xmm11
movupd (%rsi,%r13,8), %xmm5
subpd %xmm10, %xmm6
movupd (%rsi,%rbp), %xmm12
shufpd $0x1, %xmm12, %xmm12    # xmm12 = xmm12[1,0]
movapd %xmm5, %xmm10
addpd %xmm12, %xmm10
subpd %xmm12, %xmm5
movapd %xmm11, %xmm14
movapd %xmm11, %xmm15
movsd %xmm6, %xmm14           # xmm14 = xmm6[0],xmm14[1]
unpcklpd %xmm4, %xmm7            # xmm7 = xmm7[0],xmm4[0]
movapd %xmm13, %xmm12
xorpd %xmm3, %xmm12
shufpd $0x1, %xmm6, %xmm15     # xmm15 = xmm15[1],xmm6[0]
unpcklpd %xmm13, %xmm12          # xmm12 = xmm12[0],xmm13[0]
unpcklpd %xmm13, %xmm13          # xmm13 = xmm13[0,0]
mulpd %xmm15, %xmm7
movapd %xmm10, %xmm15
shufpd $0x1, %xmm5, %xmm15     # xmm15 = xmm15[1],xmm5[0]
unpcklpd %xmm2, %xmm8            # xmm8 = xmm8[0],xmm2[0]
mulpd %xmm14, %xmm13
mulpd %xmm15, %xmm8
movapd %xmm9, %xmm14
xorpd %xmm3, %xmm14
movapd %xmm10, %xmm15
unpcklpd %xmm9, %xmm14           # xmm14 = xmm14[0],xmm9[0]
unpcklpd %xmm9, %xmm9            # xmm9 = xmm9[0,0]
movsd %xmm5, %xmm15           # xmm15 = xmm5[0],xmm15[1]
mulpd %xmm15, %xmm9
movapd %xmm0, %xmm15
xorpd %xmm3, %xmm15
addpd %xmm7, %xmm13
movapd %xmm0, %xmm1
unpcklpd %xmm15, %xmm1           # xmm1 = xmm1[0],xmm15[0]
movsd -0x8(%r9), %xmm7
addpd %xmm8, %xmm9
movapd %xmm6, %xmm8
movsd %xmm11, %xmm8           # xmm8 = xmm11[0],xmm8[1]
shufpd $0x1, %xmm11, %xmm6     # xmm6 = xmm6[1],xmm11[0]
movapd %xmm7, %xmm11
movapd %xmm3, %xmm15
xorpd %xmm3, %xmm11
mulpd %xmm1, %xmm6
movapd -0x18(%rsp), %xmm3
movapd %xmm3, %xmm1
unpcklpd %xmm3, %xmm1            # xmm1 = xmm1[0],xmm3[0]
mulpd %xmm8, %xmm1
movapd %xmm7, %xmm8
unpcklpd %xmm11, %xmm8           # xmm8 = xmm8[0],xmm11[0]
addpd %xmm6, %xmm1
movapd %xmm5, %xmm11
movsd %xmm10, %xmm11          # xmm11 = xmm10[0],xmm11[1]
shufpd $0x1, %xmm10, %xmm5     # xmm5 = xmm5[1],xmm10[0]
movsd (%r9), %xmm6
mulpd %xmm8, %xmm5
movapd %xmm13, %xmm8
subpd %xmm9, %xmm13
addpd %xmm9, %xmm8
movapd %xmm6, %xmm9
unpcklpd %xmm6, %xmm9            # xmm9 = xmm9[0],xmm6[0]
mulpd %xmm11, %xmm9
movupd %xmm8, (%rsi,%r8,8)
addpd %xmm5, %xmm9
movapd %xmm1, %xmm5
addpd %xmm9, %xmm5
movupd %xmm13, (%rsi,%r13,8)
movupd %xmm5, (%rsi,%rbx)
subpd %xmm9, %xmm1
movupd %xmm1, (%rsi,%rbp)
movupd (%rsi,%r11,8), %xmm9
movupd (%rsi,%r12), %xmm1
shufpd $0x1, %xmm1, %xmm1      # xmm1 = xmm1[1,0]
movapd %xmm9, %xmm10
addpd %xmm1, %xmm10
movupd (%rsi,%r14), %xmm5
movupd (%rsi,%r15), %xmm11
shufpd $0x1, %xmm11, %xmm11    # xmm11 = xmm11[1,0]
subpd %xmm1, %xmm9
movapd %xmm5, %xmm8
addpd %xmm11, %xmm8
subpd %xmm11, %xmm5
movapd %xmm10, %xmm1
shufpd $0x1, %xmm9, %xmm1      # xmm1 = xmm1[1],xmm9[0]
mulpd %xmm1, %xmm14
movapd %xmm10, %xmm1
movsd %xmm9, %xmm1            # xmm1 = xmm9[0],xmm1[1]
unpcklpd %xmm2, %xmm2            # xmm2 = xmm2[0,0]
mulpd %xmm1, %xmm2
movapd %xmm6, %xmm1
xorpd %xmm15, %xmm1
unpcklpd %xmm1, %xmm6            # xmm6 = xmm6[0],xmm1[0]
movapd %xmm8, %xmm1
shufpd $0x1, %xmm5, %xmm1      # xmm1 = xmm1[1],xmm5[0]
mulpd %xmm1, %xmm12
movapd %xmm8, %xmm1
movsd %xmm5, %xmm1            # xmm1 = xmm5[0],xmm1[1]
unpcklpd %xmm4, %xmm4            # xmm4 = xmm4[0,0]
mulpd %xmm1, %xmm4
movapd %xmm9, %xmm1
movsd %xmm10, %xmm1           # xmm1 = xmm10[0],xmm1[1]
shufpd $0x1, %xmm10, %xmm9     # xmm9 = xmm9[1],xmm10[0]
addpd %xmm14, %xmm2
mulpd %xmm6, %xmm9
unpcklpd %xmm7, %xmm7            # xmm7 = xmm7[0,0]
mulpd %xmm1, %xmm7
addpd %xmm12, %xmm4
addpd %xmm9, %xmm7
movapd %xmm2, %xmm1
subpd %xmm4, %xmm2
addpd %xmm4, %xmm1
movapd %xmm3, %xmm4
xorpd %xmm15, %xmm4
unpcklpd %xmm4, %xmm3            # xmm3 = xmm3[0],xmm4[0]
movapd %xmm5, %xmm4
movsd %xmm8, %xmm4            # xmm4 = xmm8[0],xmm4[1]
shufpd $0x1, %xmm8, %xmm5      # xmm5 = xmm5[1],xmm8[0]
mulpd %xmm3, %xmm5
movupd %xmm1, (%rsi,%r11,8)
unpcklpd %xmm0, %xmm0            # xmm0 = xmm0[0,0]
mulpd %xmm4, %xmm0
addpd %xmm5, %xmm0
movupd %xmm2, (%rsi,%r14)
movapd %xmm7, %xmm1
addpd %xmm0, %xmm1
subpd %xmm0, %xmm7
movupd %xmm1, (%rsi,%r12)
movupd %xmm7, (%rsi,%r15)
addq $-0x20, %r9
addq $0x20, %r10
addq $0x2, %r8
addq $-0x2, %r11
addq $-0x10, %r14
addq $-0x10, %r15
addq $-0x10, %r12
addq $0x2, %r13
addq $0x10, %rbp
addq $0x10, %rbx
cmpq %rcx, %r8
jb 0xcdbc
movq -0x20(%rsp), %r11
jmp 0xd0ca
movslq %edi, %rcx
leal (%rdi,%rdi,2), %r9d
leal (%rdi,%rdi,4), %r8d
leal (,%rdi,8), %r10d
subl %edi, %r10d
movslq %r8d, %r8
movslq %r9d, %r9
movslq %r10d, %rdi
movapd 0x1fa2(%rip), %xmm3     # 0xf090
movsd (%rdx,%r11,8), %xmm0
movapd %xmm0, %xmm2
xorpd %xmm3, %xmm2
movsd (%rdx,%rax,8), %xmm1
xorpd %xmm1, %xmm3
movupd (%rsi,%rcx,8), %xmm4
movupd (%rsi,%r8,8), %xmm5
shufpd $0x1, %xmm5, %xmm5      # xmm5 = xmm5[1,0]
movapd %xmm4, %xmm6
addpd %xmm5, %xmm6
subpd %xmm5, %xmm4
movapd %xmm4, %xmm7
movsd %xmm6, %xmm7            # xmm7 = xmm6[0],xmm7[1]
movupd (%rsi,%r9,8), %xmm5
movupd (%rsi,%rdi,8), %xmm9
shufpd $0x1, %xmm9, %xmm9      # xmm9 = xmm9[1,0]
movapd %xmm5, %xmm8
addpd %xmm9, %xmm8
subpd %xmm9, %xmm5
movapd %xmm5, %xmm9
movsd %xmm8, %xmm9            # xmm9 = xmm8[0],xmm9[1]
movapd %xmm6, %xmm10
movsd %xmm4, %xmm10           # xmm10 = xmm4[0],xmm10[1]
movapd %xmm8, %xmm11
movsd %xmm5, %xmm11           # xmm11 = xmm5[0],xmm11[1]
movapd %xmm6, %xmm12
shufpd $0x1, %xmm4, %xmm12     # xmm12 = xmm12[1],xmm4[0]
unpcklpd %xmm0, %xmm2            # xmm2 = xmm2[0],xmm0[0]
mulpd %xmm2, %xmm12
unpcklpd %xmm1, %xmm3            # xmm3 = xmm3[0],xmm1[0]
unpcklpd %xmm1, %xmm1            # xmm1 = xmm1[0,0]
mulpd %xmm1, %xmm10
addpd %xmm12, %xmm10
movapd %xmm8, %xmm12
shufpd $0x1, %xmm5, %xmm12     # xmm12 = xmm12[1],xmm5[0]
mulpd %xmm3, %xmm12
unpcklpd %xmm0, %xmm0            # xmm0 = xmm0[0,0]
mulpd %xmm0, %xmm11
addpd %xmm12, %xmm11
movapd %xmm10, %xmm12
addpd %xmm11, %xmm12
movupd %xmm12, (%rsi,%rcx,8)
subpd %xmm11, %xmm10
movupd %xmm10, (%rsi,%r9,8)
shufpd $0x1, %xmm6, %xmm4      # xmm4 = xmm4[1],xmm6[0]
mulpd %xmm3, %xmm4
mulpd %xmm7, %xmm0
addpd %xmm4, %xmm0
shufpd $0x1, %xmm8, %xmm5      # xmm5 = xmm5[1],xmm8[0]
mulpd %xmm2, %xmm5
mulpd %xmm9, %xmm1
addpd %xmm5, %xmm1
movapd %xmm0, %xmm2
subpd %xmm1, %xmm2
movupd %xmm2, (%rsi,%r8,8)
addpd %xmm0, %xmm1
movupd %xmm1, (%rsi,%rdi,8)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq