// File: /workspace/github_cpp_makefile_star2_O1/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), %r8d
movsd 0x8(%rdx), %xmm1
leal (,%rdi,4), %eax
leal (%r8,%r8,2), %ebx
leal 0x1(,%rdi,4), %ecx
movslq %ecx, %r9
movsd (%rsi,%r9,8), %xmm3
movsd (%rsi), %xmm2
movsd 0x8(%rsi), %xmm0
movapd %xmm2, %xmm4
subsd %xmm3, %xmm4
movslq %eax, %r10
movsd (%rsi,%r10,8), %xmm6
movapd %xmm0, %xmm5
addsd %xmm6, %xmm5
addsd %xmm3, %xmm2
subsd %xmm6, %xmm0
movslq %r8d, %r14
movsd (%rsi,%r14,8), %xmm6
leal 0x1(%r8,%r8,2), %ecx
movslq %ecx, %r11
movsd (%rsi,%r11,8), %xmm7
movapd %xmm6, %xmm8
subsd %xmm7, %xmm8
leal 0x1(%rdi,%rdi), %ecx
movslq %ecx, %rcx
movsd (%rsi,%rcx,8), %xmm3
movslq %ebx, %rbx
movsd (%rsi,%rbx,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
movq %r14, -0x20(%rsp)
movsd %xmm4, (%rsi,%r14,8)
subsd %xmm10, %xmm5
movsd %xmm5, (%rsi,%rcx,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,%r10,8)
movapd %xmm0, %xmm1
addsd %xmm4, %xmm1
movsd %xmm1, (%rsi,%r9,8)
addsd %xmm2, %xmm3
movsd %xmm3, (%rsi,%rbx,8)
subsd %xmm4, %xmm0
movsd %xmm0, (%rsi,%r11,8)
cmpl $0x3, %edi
jl 0xd155
movl %r8d, %r8d
movl %edi, %r9d
movl %eax, %eax
leaq (%rdx,%rax,8), %r10
addq $-0x8, %r10
leaq 0x38(%rdx), %r11
leaq -0x1(%r8), %rbx
movq %r8, %r14
shlq $0x4, %r14
leaq -0x8(%r14), %r15
leaq (,%r8,8), %rax
leaq (%rax,%rax,2), %r12
addq $-0x8, %r12
movq %r8, %r13
shlq $0x5, %r13
addq $-0x8, %r13
addq $0x3, %r8
addq $0x18, %r14
leaq (%rax,%rax,2), %rbp
addq $0x18, %rbp
movl $0x2, %eax
movsd -0x18(%r11), %xmm0
movsd %xmm0, -0x8(%rsp)
movsd -0x10(%r11), %xmm3
movsd -0x8(%r11), %xmm2
movsd (%r11), %xmm1
movsd -0x18(%r10), %xmm5
movsd -0x10(%r10), %xmm4
movsd -0x8(%rsi,%r14), %xmm6
movsd (%rsi,%r14), %xmm7
movsd (%rsi,%rax,8), %xmm12
movsd 0x8(%rsi,%rax,8), %xmm8
movapd %xmm12, %xmm9
movapd %xmm8, %xmm14
addsd %xmm7, %xmm12
subsd %xmm6, %xmm8
subsd %xmm7, %xmm9
movsd -0x8(%rsi,%rbp), %xmm13
movsd (%rsi,%rbp), %xmm15
movsd -0x8(%rsi,%r8,8), %xmm11
addsd %xmm6, %xmm14
movsd (%rsi,%r8,8), %xmm10
movapd %xmm11, %xmm7
movapd %xmm10, %xmm6
subsd %xmm15, %xmm7
addsd %xmm15, %xmm11
subsd %xmm13, %xmm10
movapd %xmm0, %xmm15
addsd %xmm13, %xmm6
mulsd %xmm14, %xmm15
mulsd %xmm3, %xmm14
movapd %xmm0, %xmm13
mulsd %xmm9, %xmm13
subsd %xmm14, %xmm13
mulsd %xmm3, %xmm9
movapd %xmm4, %xmm14
addsd %xmm15, %xmm9
mulsd %xmm6, %xmm14
mulsd %xmm5, %xmm6
movapd %xmm4, %xmm15
mulsd %xmm7, %xmm15
subsd %xmm6, %xmm15
movsd -0x8(%r10), %xmm6
mulsd %xmm5, %xmm7
addsd %xmm14, %xmm7
movapd %xmm13, %xmm14
addsd %xmm15, %xmm14
subsd %xmm15, %xmm13
movapd %xmm9, %xmm15
addsd %xmm7, %xmm15
subsd %xmm7, %xmm9
movsd (%r10), %xmm7
movsd %xmm14, (%rsi,%rax,8)
movsd %xmm1, -0x18(%rsp)
movapd %xmm1, %xmm0
mulsd %xmm8, %xmm0
movsd %xmm2, -0x10(%rsp)
movapd %xmm2, %xmm14
mulsd %xmm12, %xmm14
addsd %xmm0, %xmm14
mulsd %xmm1, %xmm12
mulsd %xmm2, %xmm8
movsd %xmm15, 0x8(%rsi,%rax,8)
subsd %xmm12, %xmm8
movapd %xmm6, %xmm0
movapd %xmm7, %xmm12
mulsd %xmm10, %xmm0
mulsd %xmm11, %xmm12
addsd %xmm0, %xmm12
mulsd %xmm6, %xmm11
movsd %xmm13, -0x8(%rsi,%r8,8)
mulsd %xmm7, %xmm10
subsd %xmm11, %xmm10
movapd %xmm14, %xmm0
movsd %xmm9, (%rsi,%r8,8)
addsd %xmm12, %xmm0
movapd %xmm8, %xmm9
addsd %xmm10, %xmm9
movsd %xmm0, -0x8(%rsi,%r14)
movsd %xmm9, (%rsi,%r14)
subsd %xmm12, %xmm14
subsd %xmm10, %xmm8
movsd %xmm14, -0x8(%rsi,%rbp)
movsd %xmm8, (%rsi,%rbp)
movsd -0x8(%rsi,%r12), %xmm0
movsd (%rsi,%r12), %xmm9
movsd -0x8(%rsi,%rbx,8), %xmm11
movsd (%rsi,%rbx,8), %xmm8
movapd %xmm11, %xmm15
movapd %xmm8, %xmm12
subsd %xmm9, %xmm15
addsd %xmm9, %xmm11
subsd %xmm0, %xmm8
movsd -0x8(%rsi,%r13), %xmm1
addsd %xmm0, %xmm12
movsd (%rsi,%r13), %xmm0
movsd -0x8(%rsi,%r15), %xmm10
movapd %xmm10, %xmm14
subsd %xmm0, %xmm14
addsd %xmm0, %xmm10
movsd (%rsi,%r15), %xmm9
movapd %xmm9, %xmm13
addsd %xmm1, %xmm13
subsd %xmm1, %xmm9
movapd %xmm12, %xmm0
mulsd %xmm5, %xmm12
mulsd %xmm4, %xmm0
mulsd %xmm15, %xmm5
mulsd %xmm4, %xmm15
subsd %xmm0, %xmm5
addsd %xmm15, %xmm12
movapd %xmm13, %xmm0
mulsd %xmm3, %xmm13
movsd -0x8(%rsp), %xmm1
mulsd %xmm1, %xmm0
mulsd %xmm14, %xmm3
mulsd %xmm1, %xmm14
subsd %xmm0, %xmm3
addsd %xmm14, %xmm13
movapd %xmm5, %xmm0
addsd %xmm3, %xmm0
movsd %xmm0, -0x8(%rsi,%rbx,8)
subsd %xmm3, %xmm5
movapd %xmm12, %xmm0
addsd %xmm13, %xmm0
movsd %xmm0, (%rsi,%rbx,8)
movsd %xmm5, -0x8(%rsi,%r15)
subsd %xmm13, %xmm12
movsd %xmm12, (%rsi,%r15)
movapd %xmm6, %xmm2
mulsd %xmm11, %xmm2
mulsd %xmm7, %xmm11
mulsd %xmm8, %xmm7
addsd %xmm7, %xmm2
mulsd %xmm6, %xmm8
subsd %xmm11, %xmm8
movsd -0x18(%rsp), %xmm3
movapd %xmm3, %xmm0
mulsd %xmm10, %xmm0
movsd -0x10(%rsp), %xmm1
mulsd %xmm1, %xmm10
mulsd %xmm9, %xmm1
addsd %xmm1, %xmm0
mulsd %xmm3, %xmm9
subsd %xmm10, %xmm9
movapd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, -0x8(%rsi,%r12)
movapd %xmm8, %xmm1
addsd %xmm9, %xmm1
movsd %xmm1, (%rsi,%r12)
subsd %xmm0, %xmm2
subsd %xmm9, %xmm8
movsd %xmm2, -0x8(%rsi,%r13)
movsd %xmm8, (%rsi,%r13)
addq $-0x20, %r10
addq $0x20, %r11
addq $0x2, %rax
addq $-0x2, %rbx
addq $-0x10, %r15
addq $-0x10, %r12
addq $-0x10, %r13
addq $0x2, %r8
addq $0x10, %r14
addq $0x10, %rbp
cmpq %r9, %rax
jb 0xcdfa
movq -0x20(%rsp), %rax
movsd (%rdx,%rax,8), %xmm4
movsd (%rdx,%rcx,8), %xmm1
leal (%rdi,%rdi,2), %ecx
leal (%rdi,%rdi,4), %eax
leal (,%rdi,8), %r8d
subl %edi, %r8d
movslq %edi, %rdx
cltq
movsd (%rsi,%rax,8), %xmm2
movsd 0x8(%rsi,%rax,8), %xmm6
movsd (%rsi,%rdx,8), %xmm0
movsd 0x8(%rsi,%rdx,8), %xmm3
movapd %xmm0, %xmm5
subsd %xmm6, %xmm5
movapd %xmm3, %xmm10
addsd %xmm2, %xmm10
addsd %xmm6, %xmm0
subsd %xmm2, %xmm3
movslq %ecx, %rdi
movslq %r8d, %rcx
movsd (%rsi,%rcx,8), %xmm9
movsd 0x8(%rsi,%rcx,8), %xmm11
movsd (%rsi,%rdi,8), %xmm6
movsd 0x8(%rsi,%rdi,8), %xmm2
movapd %xmm6, %xmm7
subsd %xmm11, %xmm7
movapd %xmm2, %xmm8
addsd %xmm9, %xmm8
addsd %xmm11, %xmm6
subsd %xmm9, %xmm2
movapd %xmm4, %xmm9
movapd %xmm1, %xmm12
mulsd %xmm8, %xmm12
mulsd %xmm4, %xmm8
movapd %xmm1, %xmm11
mulsd %xmm7, %xmm11
mulsd %xmm4, %xmm7
movapd %xmm1, %xmm14
mulsd %xmm3, %xmm14
mulsd %xmm4, %xmm3
movapd %xmm1, %xmm13
mulsd %xmm0, %xmm13
mulsd %xmm4, %xmm0
movapd %xmm4, %xmm15
mulsd %xmm10, %xmm15
mulsd %xmm1, %xmm10
mulsd %xmm5, %xmm9
subsd %xmm10, %xmm9
movapd %xmm2, %xmm10
mulsd %xmm4, %xmm2
mulsd %xmm1, %xmm5
addsd %xmm15, %xmm5
subsd %xmm8, %xmm11
addsd %xmm12, %xmm7
movapd %xmm9, %xmm8
addsd %xmm11, %xmm8
movsd %xmm8, (%rsi,%rdx,8)
movapd %xmm5, %xmm8
addsd %xmm7, %xmm8
movsd %xmm8, 0x8(%rsi,%rdx,8)
subsd %xmm11, %xmm9
movsd %xmm9, (%rsi,%rdi,8)
subsd %xmm7, %xmm5
movsd %xmm5, 0x8(%rsi,%rdi,8)
subsd %xmm3, %xmm13
addsd %xmm14, %xmm0
mulsd %xmm1, %xmm10
mulsd %xmm6, %xmm4
subsd %xmm10, %xmm4
mulsd %xmm1, %xmm6
addsd %xmm6, %xmm2
movapd %xmm13, %xmm1
subsd %xmm4, %xmm1
movsd %xmm1, (%rsi,%rax,8)
movapd %xmm0, %xmm1
subsd %xmm2, %xmm1
movsd %xmm1, 0x8(%rsi,%rax,8)
addsd %xmm13, %xmm4
movsd %xmm4, (%rsi,%rcx,8)
addsd %xmm0, %xmm2
movsd %xmm2, 0x8(%rsi,%rcx,8)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq