// File: /workspace/github_cpp_makefile_star2_O2/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), %eax
movsd 0x8(%rdx), %xmm1
leal (,%rdi,4), %r8d
imull $0x6, %edi, %r10d
leal 0x1(,%rdi,4), %ecx
movslq %ecx, %rcx
movsd (%rsi,%rcx,8), %xmm4
movsd (%rsi), %xmm2
movsd 0x8(%rsi), %xmm0
movapd %xmm2, %xmm3
subsd %xmm4, %xmm3
movslq %r8d, %r13
movsd (%rsi,%r13,8), %xmm6
movapd %xmm0, %xmm5
addsd %xmm6, %xmm5
addsd %xmm4, %xmm2
subsd %xmm6, %xmm0
cltq
movsd (%rsi,%rax,8), %xmm6
leal 0x1(%r10), %r8d
movslq %r8d, %r9
movsd (%rsi,%r9,8), %xmm7
movapd %xmm6, %xmm8
subsd %xmm7, %xmm8
leal 0x1(%rdi,%rdi), %r8d
movslq %r8d, %r8
movsd (%rsi,%r8,8), %xmm4
movslq %r10d, %r10
movsd (%rsi,%r10,8), %xmm9
movapd %xmm4, %xmm10
addsd %xmm9, %xmm10
addsd %xmm7, %xmm6
subsd %xmm9, %xmm4
movapd %xmm8, %xmm7
subsd %xmm10, %xmm7
mulsd %xmm1, %xmm7
addsd %xmm8, %xmm10
mulsd %xmm1, %xmm10
movapd %xmm3, %xmm8
addsd %xmm7, %xmm8
movsd %xmm8, (%rsi)
movapd %xmm5, %xmm8
addsd %xmm10, %xmm8
movsd %xmm8, 0x8(%rsi)
subsd %xmm7, %xmm3
movsd %xmm3, (%rsi,%rax,8)
subsd %xmm10, %xmm5
movsd %xmm5, (%rsi,%r8,8)
movapd %xmm6, %xmm3
subsd %xmm4, %xmm3
mulsd %xmm1, %xmm3
addsd %xmm6, %xmm4
mulsd %xmm1, %xmm4
movapd %xmm2, %xmm1
subsd %xmm4, %xmm1
movsd %xmm1, (%rsi,%r13,8)
movapd %xmm0, %xmm1
addsd %xmm3, %xmm1
movsd %xmm1, (%rsi,%rcx,8)
addsd %xmm2, %xmm4
movsd %xmm4, (%rsi,%r10,8)
subsd %xmm3, %xmm0
movsd %xmm0, (%rsi,%r9,8)
movslq %edi, %rcx
leaq 0x2(%rax), %rdi
imulq $0x18, %rax, %r9
leaq 0x10(%r9), %r10
movq %rax, %r11
shlq $0x4, %r11
leaq 0x10(%r11), %rbx
leaq -0x2(%rax), %r14
addq $-0x10, %r11
movq %rax, %r15
shlq $0x5, %r15
addq $-0x10, %r15
addq $-0x10, %r9
leaq 0x38(%rdx), %r12
leaq (%rdx,%r13,8), %r13
addq $-0x8, %r13
movabsq $0x2, %rbp
movapd 0x1a5b(%rip), %xmm0     # 0xd060
cmpq %rcx, %rbp
jge 0xb8ff
movsd -0x18(%r12), %xmm13
movsd -0x10(%r12), %xmm4
movsd -0x8(%r12), %xmm3
movsd (%r12), %xmm1
movapd %xmm4, %xmm12
xorpd %xmm0, %xmm12
movsd -0x18(%r13), %xmm5
movsd -0x10(%r13), %xmm11
movsd -0x8(%r13), %xmm2
movapd %xmm5, %xmm10
xorpd %xmm0, %xmm10
movupd (%rsi,%rbp,8), %xmm6
movupd (%rsi,%rbx), %xmm7
shufpd $0x1, %xmm7, %xmm7      # xmm7 = xmm7[1,0]
movapd %xmm6, %xmm9
addpd %xmm7, %xmm9
subpd %xmm7, %xmm6
movupd (%rsi,%rdi,8), %xmm7
movupd (%rsi,%r10), %xmm14
shufpd $0x1, %xmm14, %xmm14    # xmm14 = xmm14[1,0]
movapd %xmm7, %xmm8
addpd %xmm14, %xmm8
subpd %xmm14, %xmm7
movapd %xmm9, %xmm15
movsd %xmm6, %xmm15           # xmm15 = xmm6[0],xmm15[1]
movapd %xmm9, %xmm14
shufpd $0x1, %xmm6, %xmm14     # xmm14 = xmm14[1],xmm6[0]
unpcklpd %xmm4, %xmm12           # xmm12 = xmm12[0],xmm4[0]
mulpd %xmm14, %xmm12
movapd %xmm13, %xmm14
xorpd %xmm0, %xmm14
unpcklpd %xmm13, %xmm14          # xmm14 = xmm14[0],xmm13[0]
unpcklpd %xmm13, %xmm13          # xmm13 = xmm13[0,0]
mulpd %xmm15, %xmm13
movapd %xmm8, %xmm15
movsd %xmm7, %xmm15           # xmm15 = xmm7[0],xmm15[1]
addpd %xmm12, %xmm13
movapd %xmm8, %xmm12
shufpd $0x1, %xmm7, %xmm12     # xmm12 = xmm12[1],xmm7[0]
unpcklpd %xmm5, %xmm10           # xmm10 = xmm10[0],xmm5[0]
mulpd %xmm12, %xmm10
movapd %xmm11, %xmm12
xorpd %xmm0, %xmm12
unpcklpd %xmm11, %xmm12          # xmm12 = xmm12[0],xmm11[0]
unpcklpd %xmm11, %xmm11          # xmm11 = xmm11[0,0]
mulpd %xmm15, %xmm11
movsd (%r13), %xmm15
addpd %xmm10, %xmm11
movapd %xmm13, %xmm10
addpd %xmm11, %xmm10
movupd %xmm10, (%rsi,%rbp,8)
subpd %xmm11, %xmm13
movapd %xmm1, %xmm10
xorpd %xmm0, %xmm10
movupd %xmm13, (%rsi,%rdi,8)
movapd %xmm1, %xmm11
unpcklpd %xmm10, %xmm11          # xmm11 = xmm11[0],xmm10[0]
movapd %xmm6, %xmm10
movsd %xmm9, %xmm10           # xmm10 = xmm9[0],xmm10[1]
shufpd $0x1, %xmm9, %xmm6      # xmm6 = xmm6[1],xmm9[0]
mulpd %xmm11, %xmm6
movapd %xmm3, %xmm9
unpcklpd %xmm3, %xmm9            # xmm9 = xmm9[0],xmm3[0]
mulpd %xmm10, %xmm9
movapd %xmm2, %xmm10
xorpd %xmm0, %xmm10
addpd %xmm6, %xmm9
movapd %xmm2, %xmm6
unpcklpd %xmm10, %xmm6           # xmm6 = xmm6[0],xmm10[0]
movapd %xmm7, %xmm10
movsd %xmm8, %xmm10           # xmm10 = xmm8[0],xmm10[1]
shufpd $0x1, %xmm8, %xmm7      # xmm7 = xmm7[1],xmm8[0]
mulpd %xmm6, %xmm7
movapd %xmm15, %xmm6
unpcklpd %xmm15, %xmm6           # xmm6 = xmm6[0],xmm15[0]
mulpd %xmm10, %xmm6
addpd %xmm7, %xmm6
movapd %xmm9, %xmm7
addpd %xmm6, %xmm7
movupd %xmm7, (%rsi,%rbx)
subpd %xmm6, %xmm9
movupd %xmm9, (%rsi,%r10)
movupd (%rsi,%r14,8), %xmm7
movupd (%rsi,%r9), %xmm6
shufpd $0x1, %xmm6, %xmm6      # xmm6 = xmm6[1,0]
movapd %xmm7, %xmm9
addpd %xmm6, %xmm9
subpd %xmm6, %xmm7
movupd (%rsi,%r11), %xmm6
movupd (%rsi,%r15), %xmm10
shufpd $0x1, %xmm10, %xmm10    # xmm10 = xmm10[1,0]
movapd %xmm6, %xmm8
addpd %xmm10, %xmm8
subpd %xmm10, %xmm6
movapd %xmm9, %xmm10
shufpd $0x1, %xmm7, %xmm10     # xmm10 = xmm10[1],xmm7[0]
mulpd %xmm10, %xmm12
movapd %xmm9, %xmm10
movsd %xmm7, %xmm10           # xmm10 = xmm7[0],xmm10[1]
unpcklpd %xmm5, %xmm5            # xmm5 = xmm5[0,0]
mulpd %xmm10, %xmm5
addpd %xmm12, %xmm5
movapd %xmm8, %xmm10
shufpd $0x1, %xmm6, %xmm10     # xmm10 = xmm10[1],xmm6[0]
mulpd %xmm10, %xmm14
movapd %xmm8, %xmm10
movsd %xmm6, %xmm10           # xmm10 = xmm6[0],xmm10[1]
unpcklpd %xmm4, %xmm4            # xmm4 = xmm4[0,0]
mulpd %xmm10, %xmm4
addpd %xmm14, %xmm4
movapd %xmm5, %xmm10
addpd %xmm4, %xmm10
movupd %xmm10, (%rsi,%r14,8)
subpd %xmm4, %xmm5
movupd %xmm5, (%rsi,%r11)
movapd %xmm15, %xmm4
xorpd %xmm0, %xmm4
unpcklpd %xmm4, %xmm15           # xmm15 = xmm15[0],xmm4[0]
movapd %xmm7, %xmm4
movsd %xmm9, %xmm4            # xmm4 = xmm9[0],xmm4[1]
shufpd $0x1, %xmm9, %xmm7      # xmm7 = xmm7[1],xmm9[0]
mulpd %xmm15, %xmm7
unpcklpd %xmm2, %xmm2            # xmm2 = xmm2[0,0]
mulpd %xmm4, %xmm2
addpd %xmm7, %xmm2
movapd %xmm3, %xmm4
xorpd %xmm0, %xmm4
unpcklpd %xmm4, %xmm3            # xmm3 = xmm3[0],xmm4[0]
movapd %xmm6, %xmm4
movsd %xmm8, %xmm4            # xmm4 = xmm8[0],xmm4[1]
shufpd $0x1, %xmm8, %xmm6      # xmm6 = xmm6[1],xmm8[0]
mulpd %xmm3, %xmm6
unpcklpd %xmm1, %xmm1            # xmm1 = xmm1[0,0]
mulpd %xmm4, %xmm1
addpd %xmm6, %xmm1
movapd %xmm2, %xmm3
addpd %xmm1, %xmm3
movupd %xmm3, (%rsi,%r9)
subpd %xmm1, %xmm2
movupd %xmm2, (%rsi,%r15)
addq $0x2, %rbp
addq $0x2, %rdi
addq $0x10, %r10
addq $0x10, %rbx
addq $-0x2, %r14
addq $-0x10, %r11
addq $-0x10, %r15
addq $-0x10, %r9
addq $0x20, %r12
addq $-0x20, %r13
jmp 0xb605
leal (%rcx,%rcx,2), %edi
leal (%rcx,%rcx,4), %r9d
imull $0x7, %ecx, %r11d
movslq %r9d, %r9
movslq %edi, %r10
movslq %r11d, %rdi
movsd (%rdx,%r8,8), %xmm1
movapd %xmm1, %xmm3
xorpd %xmm0, %xmm3
movsd (%rdx,%rax,8), %xmm2
xorpd %xmm2, %xmm0
movupd (%rsi,%rcx,8), %xmm4
movupd (%rsi,%r9,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,%r10,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 %xmm1, %xmm3            # xmm3 = xmm3[0],xmm1[0]
mulpd %xmm3, %xmm12
unpcklpd %xmm2, %xmm0            # xmm0 = xmm0[0],xmm2[0]
unpcklpd %xmm2, %xmm2            # xmm2 = xmm2[0,0]
mulpd %xmm2, %xmm10
addpd %xmm12, %xmm10
movapd %xmm8, %xmm12
shufpd $0x1, %xmm5, %xmm12     # xmm12 = xmm12[1],xmm5[0]
mulpd %xmm0, %xmm12
unpcklpd %xmm1, %xmm1            # xmm1 = xmm1[0,0]
mulpd %xmm1, %xmm11
addpd %xmm12, %xmm11
movapd %xmm10, %xmm12
addpd %xmm11, %xmm12
movupd %xmm12, (%rsi,%rcx,8)
subpd %xmm11, %xmm10
movupd %xmm10, (%rsi,%r10,8)
shufpd $0x1, %xmm6, %xmm4      # xmm4 = xmm4[1],xmm6[0]
mulpd %xmm0, %xmm4
mulpd %xmm7, %xmm1
addpd %xmm4, %xmm1
shufpd $0x1, %xmm8, %xmm5      # xmm5 = xmm5[1],xmm8[0]
mulpd %xmm3, %xmm5
mulpd %xmm9, %xmm2
addpd %xmm5, %xmm2
movapd %xmm1, %xmm0
subpd %xmm2, %xmm0
movupd %xmm0, (%rsi,%r9,8)
addpd %xmm1, %xmm2
movupd %xmm2, (%rsi,%rdi,8)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq