void dfst(int n, double *a, double *t, int *ip, double *w) {
  void makewt(int nw, int *ip, double *w);
  void makect(int nc, int *ip, double *c);
  void bitrv2(int n, int *ip, double *a);
  void cftfsub(int n, double *a, double *w);
  void rftfsub(int n, double *a, int nc, double *c);
  void dstsub(int n, double *a, int nc, double *c);
  int j, k, l, m, mh, nw, nc;
  double xr, xi, yr, yi;
  nw = ip[0];
  if (n > (nw << 3)) {
    nw = n >> 3;
    makewt(nw, ip, w);
  }
  nc = ip[1];
  if (n > (nc << 1)) {
    nc = n >> 1;
    makect(nc, ip, w + nw);
  }
  if (n > 2) {
    m = n >> 1;
    mh = m >> 1;
    for (j = 1; j < mh; j++) {
      k = m - j;
      xr = a[j] + a[n - j];
      xi = a[j] - a[n - j];
      yr = a[k] + a[n - k];
      yi = a[k] - a[n - k];
      a[j] = xr;
      a[k] = yr;
      t[j] = xi + yi;
      t[k] = xi - yi;
    }
    t[0] = a[mh] - a[n - mh];
    a[mh] += a[n - mh];
    a[0] = a[m];
    dstsub(m, a, nc, w + nw);
    if (m > 4) {
      bitrv2(m, ip + 2, a);
      cftfsub(m, a, w);
      rftfsub(m, a, nc, w + nw);
    } else if (m == 4) {
      cftfsub(m, a, w);
    }
    a[n - 1] = a[1] - a[0];
    a[1] = a[0] + a[1];
    for (j = m - 2; j >= 2; j -= 2) {
      a[2 * j + 1] = a[j] - a[j + 1];
      a[2 * j - 1] = -a[j] - a[j + 1];
    }
    l = 2;
    m = mh;
    while (m >= 2) {
      dstsub(m, t, nc, w + nw);
      if (m > 4) {
        bitrv2(m, ip + 2, t);
        cftfsub(m, t, w);
        rftfsub(m, t, nc, w + nw);
      } else if (m == 4) {
        cftfsub(m, t, w);
      }
      a[n - l] = t[1] - t[0];
      a[l] = t[0] + t[1];
      k = 0;
      for (j = 2; j < m; j += 2) {
        k += l << 2;
        a[k - l] = -t[j] - t[j + 1];
        a[k + l] = t[j] - t[j + 1];
      }
      l <<= 1;
      mh = m >> 1;
      for (j = 1; j < mh; j++) {
        k = m - j;
        t[j] = t[m + k] + t[m + j];
        t[k] = t[m + k] - t[m + j];
      }
      t[0] = t[m + mh];
      m = mh;
    }
    a[l] = t[0];
  }
  a[0] = 0;
}


x86 assembly (clang, -O0):
<dfst>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x40(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x40(%rbp),%ecx
shl    $0x3,%ecx
cmp    %ecx,%eax
jle    11ae <dfst+0x4e>
mov    -0x4(%rbp),%eax
sar    $0x3,%eax
mov    %eax,-0x40(%rbp)
mov    -0x40(%rbp),%edi
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rdx
call   1030 <makewt@plt>
mov    -0x20(%rbp),%rax
mov    0x4(%rax),%eax
mov    %eax,-0x44(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x44(%rbp),%ecx
shl    $0x1,%ecx
cmp    %ecx,%eax
jle    11ed <dfst+0x8d>
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x44(%rbp)
mov    -0x44(%rbp),%edi
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rdx
movslq -0x40(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdx
call   1070 <makect@plt>
cmpl   $0x2,-0x4(%rbp)
jle    174b <dfst+0x5eb>
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x38(%rbp)
mov    -0x38(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x3c(%rbp)
movl   $0x1,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jge    1315 <dfst+0x1b5>
mov    -0x38(%rbp),%eax
sub    -0x2c(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%ecx
sub    -0x2c(%rbp),%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%ecx
sub    -0x2c(%rbp),%ecx
movslq %ecx,%rcx
subsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%ecx
sub    -0x30(%rbp),%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%ecx
sub    -0x30(%rbp),%ecx
movslq %ecx,%rcx
subsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x50(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x60(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x58(%rbp),%xmm0
addsd  -0x68(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x58(%rbp),%xmm0
subsd  -0x68(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1210 <dfst+0xb0>
mov    -0x10(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%ecx
sub    -0x3c(%rbp),%ecx
movslq %ecx,%rcx
subsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%ecx
sub    -0x3c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x3c(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x38(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x44(%rbp),%edx
mov    -0x28(%rbp),%rcx
movslq -0x40(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rcx
call   1060 <dstsub@plt>
cmpl   $0x4,-0x38(%rbp)
jle    13e4 <dfst+0x284>
mov    -0x38(%rbp),%edi
mov    -0x20(%rbp),%rsi
add    $0x8,%rsi
mov    -0x10(%rbp),%rdx
call   1050 <bitrv2@plt>
mov    -0x38(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x28(%rbp),%rdx
call   1080 <cftfsub@plt>
mov    -0x38(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x44(%rbp),%edx
mov    -0x28(%rbp),%rcx
movslq -0x40(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rcx
call   1040 <rftfsub@plt>
jmp    1403 <dfst+0x2a3>
cmpl   $0x4,-0x38(%rbp)
jne    13fe <dfst+0x29e>
mov    -0x38(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x28(%rbp),%rdx
call   1080 <cftfsub@plt>
jmp    1403 <dfst+0x2a3>
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
subsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
addsd  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x38(%rbp),%eax
sub    $0x2,%eax
mov    %eax,-0x2c(%rbp)
cmpl   $0x2,-0x2c(%rbp)
jl     14e0 <dfst+0x380>
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x2c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
subsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x2c(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x10(%rbp),%rax
mov    -0x2c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
subsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x2c(%rbp),%ecx
shl    $0x1,%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x2c(%rbp),%eax
sub    $0x2,%eax
mov    %eax,-0x2c(%rbp)
jmp    1449 <dfst+0x2e9>
movl   $0x2,-0x34(%rbp)
mov    -0x3c(%rbp),%eax
mov    %eax,-0x38(%rbp)
cmpl   $0x2,-0x38(%rbp)
jl     1736 <dfst+0x5d6>
mov    -0x38(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    -0x44(%rbp),%edx
mov    -0x28(%rbp),%rcx
movslq -0x40(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rcx
call   1060 <dstsub@plt>
cmpl   $0x4,-0x38(%rbp)
jle    1566 <dfst+0x406>
mov    -0x38(%rbp),%edi
mov    -0x20(%rbp),%rsi
add    $0x8,%rsi
mov    -0x18(%rbp),%rdx
call   1050 <bitrv2@plt>
mov    -0x38(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    -0x28(%rbp),%rdx
call   1080 <cftfsub@plt>
mov    -0x38(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    -0x44(%rbp),%edx
mov    -0x28(%rbp),%rcx
movslq -0x40(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rcx
call   1040 <rftfsub@plt>
jmp    1585 <dfst+0x425>
cmpl   $0x4,-0x38(%rbp)
jne    1580 <dfst+0x420>
mov    -0x38(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    -0x28(%rbp),%rdx
call   1080 <cftfsub@plt>
jmp    1585 <dfst+0x425>
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x18(%rbp),%rax
subsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%ecx
sub    -0x34(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
addsd  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movl   $0x0,-0x30(%rbp)
movl   $0x2,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x38(%rbp),%eax
jge    1673 <dfst+0x513>
mov    -0x34(%rbp),%eax
shl    $0x2,%eax
add    -0x30(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x18(%rbp),%rax
mov    -0x2c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
subsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x30(%rbp),%ecx
sub    -0x34(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x2c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
subsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x30(%rbp),%ecx
add    -0x34(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x2c(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x2c(%rbp)
jmp    15d4 <dfst+0x474>
mov    -0x34(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x34(%rbp)
mov    -0x38(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x3c(%rbp)
movl   $0x1,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jge    1711 <dfst+0x5b1>
mov    -0x38(%rbp),%eax
sub    -0x2c(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x38(%rbp),%ecx
add    -0x30(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x38(%rbp),%ecx
add    -0x2c(%rbp),%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x18(%rbp),%rax
mov    -0x38(%rbp),%ecx
add    -0x30(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x38(%rbp),%ecx
add    -0x2c(%rbp),%ecx
movslq %ecx,%rcx
subsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    168c <dfst+0x52c>
mov    -0x18(%rbp),%rax
mov    -0x38(%rbp),%ecx
add    -0x3c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x3c(%rbp),%eax
mov    %eax,-0x38(%rbp)
jmp    14ed <dfst+0x38d>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dfst>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x78,%rsp
mov    %r8,%r15
mov    %rcx,%r13
mov    %rdx,%rbx
mov    %rsi,%r14
mov    (%rcx),%ebp
lea    0x0(,%rbp,8),%eax
cmp    %edi,%eax
mov    %rdi,0x10(%rsp)
jge    11a3 <dfst+0x43>
mov    %edi,%ebp
sar    $0x3,%ebp
mov    %ebp,%edi
mov    %r13,%rsi
mov    %r15,%rdx
call   1030 <makewt@plt>
mov    0x10(%rsp),%rdi
mov    0x4(%r13),%eax
mov    %rax,0x28(%rsp)
add    %eax,%eax
movslq %ebp,%r12
cmp    %edi,%eax
jge    11cd <dfst+0x6d>
sar    %edi
lea    (%r15,%r12,8),%rdx
mov    %rdi,0x28(%rsp)
mov    %r13,%rsi
call   1070 <makect@plt>
mov    0x10(%rsp),%rdi
cmp    $0x3,%edi
jl     185b <dfst+0x6fb>
mov    %r13,0x38(%rsp)
mov    %r15,0x20(%rsp)
mov    %edi,%eax
shr    %eax
mov    %edi,%r15d
shr    $0x2,%r15d
mov    %rax,0x18(%rsp)
mov    %eax,%r8d
cmp    $0x8,%edi
jb     12a6 <dfst+0x146>
mov    %edi,%eax
cmp    $0x3,%r15d
mov    $0x2,%ebp
cmovae %r15d,%ebp
lea    (%r14,%rax,8),%r11
mov    $0x1,%edx
mov    $0x1,%esi
sub    %r8,%rsi
lea    (%r14,%r8,8),%rcx
add    $0xfffffffffffffff8,%rcx
lea    (%rbx,%r8,8),%r9
add    $0xfffffffffffffff8,%r9
lea    -0x8(,%rbp,8),%r10
ff
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
movsd  (%r14,%rdx,8),%xmm0
movsd  -0x8(%r11,%rax,1),%xmm1
movapd %xmm0,%xmm2
addsd  %xmm1,%xmm2
subsd  %xmm1,%xmm0
movsd  (%rcx,%rax,1),%xmm1
movsd  (%r11,%rsi,8),%xmm3
movapd %xmm1,%xmm4
addsd  %xmm3,%xmm4
subsd  %xmm3,%xmm1
movsd  %xmm2,(%r14,%rdx,8)
movsd  %xmm4,(%rcx,%rax,1)
movapd %xmm0,%xmm2
addsd  %xmm1,%xmm2
movsd  %xmm2,(%rbx,%rdx,8)
subsd  %xmm1,%xmm0
movsd  %xmm0,(%r9,%rax,1)
add    $0x1,%rdx
add    $0xfffffffffffffff8,%rax
add    $0x1,%rsi
mov    %r10,%rbp
add    %rax,%rbp
jne    1240 <dfst+0xe0>
mov    %r15d,%eax
movsd  (%r14,%rax,8),%xmm0
mov    %edi,%ecx
sub    %r15d,%ecx
movslq %ecx,%rcx
subsd  (%r14,%rcx,8),%xmm0
movsd  %xmm0,(%rbx)
movsd  (%r14,%rcx,8),%xmm0
addsd  (%r14,%rax,8),%xmm0
movsd  %xmm0,(%r14,%rax,8)
movsd  (%r14,%r8,8),%xmm0
movsd  %xmm0,(%r14)
mov    0x20(%rsp),%rbp
lea    0x0(%rbp,%r12,8),%r13
mov    0x18(%rsp),%r12
mov    %r12d,%edi
mov    %r14,%rsi
mov    0x28(%rsp),%rdx
mov    %r13,%rcx
call   1060 <dstsub@plt>
mov    0x10(%rsp),%rdi
cmp    $0xa,%edi
mov    %r13,0x70(%rsp)
jl     1346 <dfst+0x1e6>
mov    0x38(%rsp),%rax
lea    0x8(%rax),%rsi
mov    %r12d,%edi
mov    %r14,%rdx
call   1050 <bitrv2@plt>
mov    %r12d,%edi
mov    %r14,%rsi
mov    %rbp,%rdx
call   1080 <cftfsub@plt>
mov    %r12d,%edi
mov    %r14,%rsi
mov    0x28(%rsp),%rdx
mov    %r13,%rcx
call   1040 <rftfsub@plt>
jmp    135e <dfst+0x1fe>
cmp    $0x4,%r12d
jne    1363 <dfst+0x203>
mov    $0x4,%edi
mov    %r14,%rsi
mov    0x20(%rsp),%rdx
call   1080 <cftfsub@plt>
mov    0x10(%rsp),%rdi
lea    -0x1(%rdi),%eax
movsd  0x8(%r14),%xmm0
subsd  (%r14),%xmm0
movsd  %xmm0,(%r14,%rax,8)
movsd  (%r14),%xmm0
addsd  0x8(%r14),%xmm0
movsd  %xmm0,0x8(%r14)
cmp    $0x8,%edi
jb     1831 <dfst+0x6d1>
mov    %r12d,%eax
add    $0x2,%eax
lea    (%r12,%r12,1),%ecx
add    $0xfffffffb,%ecx
movapd 0xc5a(%rip),%xmm2
cs nopw 0x0(%rax,%rax,1)
lea    -0x4(%rax),%edx
movsd  (%r14,%rdx,8),%xmm0
lea    -0x3(%rax),%edx
movapd %xmm0,%xmm1
subsd  (%r14,%rdx,8),%xmm1
lea    0x2(%rcx),%esi
movsd  %xmm1,(%r14,%rsi,8)
xorpd  %xmm2,%xmm0
subsd  (%r14,%rdx,8),%xmm0
mov    %ecx,%edx
movsd  %xmm0,(%r14,%rdx,8)
add    $0xfffffffe,%eax
add    $0xfffffffc,%ecx
cmp    $0x5,%eax
jg     13b0 <dfst+0x250>
cmp    $0x7,%edi
jbe    1831 <dfst+0x6d1>
addq   $0x8,0x38(%rsp)
lea    -0x8(%rbx),%rax
mov    %rax,0x18(%rsp)
lea    0x8(%rbx),%rax
mov    %rax,0x50(%rsp)
lea    -0x10(%rbx),%rax
mov    %rax,0x48(%rsp)
mov    $0x2,%r12d
jmp    1437 <dfst+0x2d7>
xchg   %ax,%ax
lea    (%r15,%r13,1),%eax
movsd  (%rbx,%rax,8),%xmm0
movsd  %xmm0,(%rbx)
cmp    $0x3,%r13d
jbe    1852 <dfst+0x6f2>
mov    %r15d,%r13d
mov    %r15d,%edi
mov    %rbx,%rsi
mov    0x28(%rsp),%rbp
mov    %ebp,%edx
mov    0x70(%rsp),%r15
mov    %r15,%rcx
call   1060 <dstsub@plt>
cmp    $0x5,%r13d
jb     14a0 <dfst+0x340>
mov    %r13d,%edi
mov    0x38(%rsp),%rsi
mov    %rbx,%rdx
call   1050 <bitrv2@plt>
mov    %r13d,%edi
mov    %rbx,%rsi
mov    0x20(%rsp),%rdx
call   1080 <cftfsub@plt>
mov    %r13d,%edi
mov    %rbx,%rsi
mov    %ebp,%edx
mov    %r15,%rcx
call   1040 <rftfsub@plt>
mov    0x10(%rsp),%rax
movapd 0xb69(%rip),%xmm1
jmp    14d2 <dfst+0x372>
nopl   0x0(%rax)
cmp    $0x4,%r13d
mov    0x10(%rsp),%rax
movapd 0xb4f(%rip),%xmm1
jne    14d2 <dfst+0x372>
mov    $0x4,%edi
mov    %rbx,%rsi
mov    0x20(%rsp),%rdx
call   1080 <cftfsub@plt>
movapd 0xb33(%rip),%xmm1
mov    0x10(%rsp),%rax
movsd  0x8(%rbx),%xmm0
subsd  (%rbx),%xmm0
sub    %r12d,%eax
cltq
movsd  %xmm0,(%r14,%rax,8)
movsd  (%rbx),%xmm0
addsd  0x8(%rbx),%xmm0
movslq %r12d,%rax
movsd  %xmm0,(%r14,%rax,8)
cmp    $0x2,%r13d
jbe    183c <dfst+0x6dc>
lea    0x0(,%r12,4),%edx
mov    %r13d,%ecx
movslq %edx,%rbp
lea    (%r14,%rax,8),%rdx
shl    $0x3,%rax
mov    %r14,%rsi
sub    %rax,%rsi
mov    $0x2,%edi
mov    %rbp,%rax
cs nopw 0x0(%rax,%rax,1)
movsd  (%rbx,%rdi,8),%xmm0
xorpd  %xmm1,%xmm0
subsd  0x8(%rbx,%rdi,8),%xmm0
movsd  %xmm0,(%rsi,%rax,8)
movsd  (%rbx,%rdi,8),%xmm0
subsd  0x8(%rbx,%rdi,8),%xmm0
movsd  %xmm0,(%rdx,%rax,8)
add    $0x2,%rdi
add    %rbp,%rax
cmp    %rcx,%rdi
jb     1530 <dfst+0x3d0>
add    %r12d,%r12d
mov    %r13d,%r15d
shr    %r15d
cmp    $0x4,%r13d
jb     1845 <dfst+0x6e5>
cmp    $0x3,%r15d
mov    $0x2,%esi
cmovae %r15d,%esi
lea    -0x1(%rsi),%r8
mov    $0x1,%r11d
cmp    $0x2,%r8
jae    1670 <dfst+0x510>
mov    %r11,%rax
test   $0x1,%sil
jne    15d3 <dfst+0x473>
mov    %rcx,%rax
sub    %r11,%rax
lea    (%rax,%rcx,1),%rdx
mov    %rcx,%rdi
add    %r11,%rdi
movsd  (%rbx,%rdi,8),%xmm0
movsd  (%rbx,%rdx,8),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%rbx,%r11,8)
movsd  (%rbx,%rdx,8),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,(%rbx,%rax,8)
lea    0x1(%r11),%rax
not    %r11
add    %rsi,%r11
je     1420 <dfst+0x2c0>
lea    (%rax,%rcx,1),%rdx
add    $0x1,%rdx
mov    %rcx,%rdi
sub    %rax,%rdi
shl    $0x4,%rcx
lea    0x0(,%rax,8),%rbp
sub    %rbp,%rcx
nopl   0x0(%rax)
movsd  -0x8(%rbx,%rdx,8),%xmm0
movsd  (%rbx,%rcx,1),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%rbx,%rax,8)
movsd  (%rbx,%rcx,1),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,(%rbx,%rdi,8)
movsd  (%rbx,%rdx,8),%xmm0
movsd  -0x8(%rbx,%rcx,1),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rbx,%rax,8)
movsd  -0x8(%rbx,%rcx,1),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,-0x8(%rbx,%rdi,8)
add    $0x2,%rax
add    $0x2,%rdx
add    $0xfffffffffffffffe,%rdi
add    $0xfffffffffffffff0,%rcx
cmp    %rax,%rsi
jne    1600 <dfst+0x4a0>
jmp    1420 <dfst+0x2c0>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
lea    -0x2(%rsi),%rax
mov    $0x8,%edx
mul    %rdx
mov    0x18(%rsp),%rdx
lea    (%rdx,%rcx,8),%rbp
seto   %r9b
mov    %rbp,%rdx
sub    %rax,%rdx
cmp    %rbp,%rdx
ja     1594 <dfst+0x434>
test   %r9b,%r9b
jne    1594 <dfst+0x434>
mov    %rcx,%rdx
shl    $0x4,%rdx
mov    0x18(%rsp),%rdi
add    %rdx,%rdi
mov    %rdi,%rbp
sub    %rax,%rbp
cmp    %rdi,%rbp
ja     1594 <dfst+0x434>
test   %r9b,%r9b
jne    1594 <dfst+0x434>
mov    %r8,0x60(%rsp)
mov    %r12,0x40(%rsp)
lea    (%rcx,%rcx,1),%rdi
mov    0x50(%rsp),%r12
cmp    %rbx,%r12
setb   0xc(%rsp)
lea    (%rbx,%rsi,8),%r10
lea    (%r12,%rcx,8),%rax
mov    %rax,0x30(%rsp)
lea    (%rcx,%rsi,1),%rax
lea    (%rbx,%rax,8),%r9
mov    %r9,0x68(%rsp)
mov    %rcx,%rax
sub    %rsi,%rax
lea    (%r12,%rax,8),%r8
lea    (%rbx,%rcx,8),%rax
mov    %rdi,%rbp
mov    %rdi,0x58(%rsp)
sub    %rsi,%rdi
lea    (%r12,%rdi,8),%rbp
add    %rbx,%rdx
cmp    %r9,%r12
setb   0xf(%rsp)
cmp    %r10,0x30(%rsp)
setb   0x30(%rsp)
cmp    %rax,%r12
setb   %dil
cmp    %r10,%r8
setb   0xe(%rsp)
cmp    %rdx,%r12
setb   %r9b
cmp    %r10,%rbp
setb   0xd(%rsp)
cmp    0x68(%rsp),%r8
setb   %r12b
cmp    %rdx,%r8
setb   %r10b
cmp    %rax,%rbp
setb   %bpl
mov    0x30(%rsp),%dl
test   %dl,0xf(%rsp)
jne    1827 <dfst+0x6c7>
mov    %r12d,%r8d
and    0xe(%rsp),%dil
mov    0x40(%rsp),%r12
jne    1594 <dfst+0x434>
and    0xd(%rsp),%r9b
jne    1594 <dfst+0x434>
and    %r8b,0xc(%rsp)
jne    1594 <dfst+0x434>
and    %bpl,%r10b
jne    1594 <dfst+0x434>
mov    0x60(%rsp),%r10
mov    %r10,%r8
and    $0xfffffffffffffffe,%r8
mov    %r10,%r11
or     $0x1,%r11
mov    0x48(%rsp),%rdx
mov    0x58(%rsp),%rdi
lea    (%rdx,%rdi,8),%rdx
mov    %r8,%r9
neg    %r9
mov    $0x8,%edi
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movupd (%rdx,%rbp,8),%xmm0
shufpd $0x1,%xmm0,%xmm0
movupd (%rax,%rdi,1),%xmm1
addpd  %xmm1,%xmm0
movupd %xmm0,(%rbx,%rdi,1)
movupd (%rdx,%rbp,8),%xmm0
shufpd $0x1,%xmm1,%xmm1
subpd  %xmm1,%xmm0
movupd %xmm0,-0x10(%rax,%rbp,8)
add    $0xfffffffffffffffe,%rbp
add    $0x10,%rdi
cmp    %rbp,%r9
jne    17e0 <dfst+0x680>
cmp    %r8,%r10
je     1420 <dfst+0x2c0>
jmp    1594 <dfst+0x434>
mov    0x40(%rsp),%r12
jmp    1594 <dfst+0x434>
movsd  (%rbx),%xmm0
mov    $0x2,%eax
jmp    1855 <dfst+0x6f5>
add    %r12d,%r12d
mov    %r13d,%r15d
shr    %r15d
add    %r13d,%r15d
movsd  (%rbx,%r15,8),%xmm0
movsd  %xmm0,(%rbx)
movslq %r12d,%rax
movsd  %xmm0,(%r14,%rax,8)
movq   $0x0,(%r14)
add    $0x78,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @dfst(i32 %0, double* %1, double* %2, i32* %3, double* %4) {
%6 = alloca i32
%7 = alloca double*
%8 = alloca double*
%9 = alloca i32*
%10 = alloca double*
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca double
%19 = alloca double
%20 = alloca double
%21 = alloca double
store i32 %0, i32* %6
store double* %1, double** %7
store double* %2, double** %8
store i32* %3, i32** %9
store double* %4, double** %10
%22 = load i32*, i32** %9
%23 = getelementptr inbounds i32, i32* %22, i64 0
%24 = load i32, i32* %23
store i32 %24, i32* %16
%25 = load i32, i32* %6
%26 = load i32, i32* %16
%27 = shl i32 %26, 3
%28 = icmp sgt i32 %25, %27
br i1 %28, label %29, label %35
29: ; preds = %5
%30 = load i32, i32* %6
%31 = ashr i32 %30, 3
store i32 %31, i32* %16
%32 = load i32, i32* %16
%33 = load i32*, i32** %9
%34 = load double*, double** %10
br label %35
35: ; preds = %29, %5
%36 = load i32*, i32** %9
%37 = getelementptr inbounds i32, i32* %36, i64 1
%38 = load i32, i32* %37
store i32 %38, i32* %17
%39 = load i32, i32* %6
%40 = load i32, i32* %17
%41 = shl i32 %40, 1
%42 = icmp sgt i32 %39, %41
br i1 %42, label %43, label %52
43: ; preds = %35
%44 = load i32, i32* %6
%45 = ashr i32 %44, 1
store i32 %45, i32* %17
%46 = load i32, i32* %17
%47 = load i32*, i32** %9
%48 = load double*, double** %10
%49 = load i32, i32* %16
%50 = sext i32 %49 to i64
%51 = getelementptr inbounds double, double* %48, i64 %50
br label %52
52: ; preds = %43, %35
%53 = load i32, i32* %6
%54 = icmp sgt i32 %53, 2
br i1 %54, label %55, label %468
55: ; preds = %52
%56 = load i32, i32* %6
%57 = ashr i32 %56, 1
store i32 %57, i32* %14
%58 = load i32, i32* %14
%59 = ashr i32 %58, 1
store i32 %59, i32* %15
store i32 1, i32* %11
br label %60
60: ; preds = %144, %55
%61 = load i32, i32* %11
%62 = load i32, i32* %15
%63 = icmp slt i32 %61, %62
br i1 %63, label %64, label %147
64: ; preds = %60
%65 = load i32, i32* %14
%66 = load i32, i32* %11
%67 = sub nsw i32 %65, %66
store i32 %67, i32* %12
%68 = load double*, double** %7
%69 = load i32, i32* %11
%70 = sext i32 %69 to i64
%71 = getelementptr inbounds double, double* %68, i64 %70
%72 = load double, double* %71
%73 = load double*, double** %7
%74 = load i32, i32* %6
%75 = load i32, i32* %11
%76 = sub nsw i32 %74, %75
%77 = sext i32 %76 to i64
%78 = getelementptr inbounds double, double* %73, i64 %77
%79 = load double, double* %78
%80 = fadd double %72, %79
store double %80, double* %18
%81 = load double*, double** %7
%82 = load i32, i32* %11
%83 = sext i32 %82 to i64
%84 = getelementptr inbounds double, double* %81, i64 %83
%85 = load double, double* %84
%86 = load double*, double** %7
%87 = load i32, i32* %6
%88 = load i32, i32* %11
%89 = sub nsw i32 %87, %88
%90 = sext i32 %89 to i64
%91 = getelementptr inbounds double, double* %86, i64 %90
%92 = load double, double* %91
%93 = fsub double %85, %92
store double %93, double* %19
%94 = load double*, double** %7
%95 = load i32, i32* %12
%96 = sext i32 %95 to i64
%97 = getelementptr inbounds double, double* %94, i64 %96
%98 = load double, double* %97
%99 = load double*, double** %7
%100 = load i32, i32* %6
%101 = load i32, i32* %12
%102 = sub nsw i32 %100, %101
%103 = sext i32 %102 to i64
%104 = getelementptr inbounds double, double* %99, i64 %103
%105 = load double, double* %104
%106 = fadd double %98, %105
store double %106, double* %20
%107 = load double*, double** %7
%108 = load i32, i32* %12
%109 = sext i32 %108 to i64
%110 = getelementptr inbounds double, double* %107, i64 %109
%111 = load double, double* %110
%112 = load double*, double** %7
%113 = load i32, i32* %6
%114 = load i32, i32* %12
%115 = sub nsw i32 %113, %114
%116 = sext i32 %115 to i64
%117 = getelementptr inbounds double, double* %112, i64 %116
%118 = load double, double* %117
%119 = fsub double %111, %118
store double %119, double* %21
%120 = load double, double* %18
%121 = load double*, double** %7
%122 = load i32, i32* %11
%123 = sext i32 %122 to i64
%124 = getelementptr inbounds double, double* %121, i64 %123
store double %120, double* %124
%125 = load double, double* %20
%126 = load double*, double** %7
%127 = load i32, i32* %12
%128 = sext i32 %127 to i64
%129 = getelementptr inbounds double, double* %126, i64 %128
store double %125, double* %129
%130 = load double, double* %19
%131 = load double, double* %21
%132 = fadd double %130, %131
%133 = load double*, double** %8
%134 = load i32, i32* %11
%135 = sext i32 %134 to i64
%136 = getelementptr inbounds double, double* %133, i64 %135
store double %132, double* %136
%137 = load double, double* %19
%138 = load double, double* %21
%139 = fsub double %137, %138
%140 = load double*, double** %8
%141 = load i32, i32* %12
%142 = sext i32 %141 to i64
%143 = getelementptr inbounds double, double* %140, i64 %142
store double %139, double* %143
br label %144
144: ; preds = %64
%145 = load i32, i32* %11
%146 = add nsw i32 %145, 1
store i32 %146, i32* %11
br label %60
147: ; preds = %60
%148 = load double*, double** %7
%149 = load i32, i32* %15
%150 = sext i32 %149 to i64
%151 = getelementptr inbounds double, double* %148, i64 %150
%152 = load double, double* %151
%153 = load double*, double** %7
%154 = load i32, i32* %6
%155 = load i32, i32* %15
%156 = sub nsw i32 %154, %155
%157 = sext i32 %156 to i64
%158 = getelementptr inbounds double, double* %153, i64 %157
%159 = load double, double* %158
%160 = fsub double %152, %159
%161 = load double*, double** %8
%162 = getelementptr inbounds double, double* %161, i64 0
store double %160, double* %162
%163 = load double*, double** %7
%164 = load i32, i32* %6
%165 = load i32, i32* %15
%166 = sub nsw i32 %164, %165
%167 = sext i32 %166 to i64
%168 = getelementptr inbounds double, double* %163, i64 %167
%169 = load double, double* %168
%170 = load double*, double** %7
%171 = load i32, i32* %15
%172 = sext i32 %171 to i64
%173 = getelementptr inbounds double, double* %170, i64 %172
%174 = load double, double* %173
%175 = fadd double %174, %169
store double %175, double* %173
%176 = load double*, double** %7
%177 = load i32, i32* %14
%178 = sext i32 %177 to i64
%179 = getelementptr inbounds double, double* %176, i64 %178
%180 = load double, double* %179
%181 = load double*, double** %7
%182 = getelementptr inbounds double, double* %181, i64 0
store double %180, double* %182
%183 = load i32, i32* %14
%184 = load double*, double** %7
%185 = load i32, i32* %17
%186 = load double*, double** %10
%187 = load i32, i32* %16
%188 = sext i32 %187 to i64
%189 = getelementptr inbounds double, double* %186, i64 %188
%190 = load i32, i32* %14
%191 = icmp sgt i32 %190, 4
br i1 %191, label %192, label %207
192: ; preds = %147
%193 = load i32, i32* %14
%194 = load i32*, i32** %9
%195 = getelementptr inbounds i32, i32* %194, i64 2
%196 = load double*, double** %7
%197 = load i32, i32* %14
%198 = load double*, double** %7
%199 = load double*, double** %10
%200 = load i32, i32* %14
%201 = load double*, double** %7
%202 = load i32, i32* %17
%203 = load double*, double** %10
%204 = load i32, i32* %16
%205 = sext i32 %204 to i64
%206 = getelementptr inbounds double, double* %203, i64 %205
br label %215
207: ; preds = %147
%208 = load i32, i32* %14
%209 = icmp eq i32 %208, 4
br i1 %209, label %210, label %214
210: ; preds = %207
%211 = load i32, i32* %14
%212 = load double*, double** %7
%213 = load double*, double** %10
br label %214
214: ; preds = %210, %207
br label %215
215: ; preds = %214, %192
%216 = load double*, double** %7
%217 = getelementptr inbounds double, double* %216, i64 1
%218 = load double, double* %217
%219 = load double*, double** %7
%220 = getelementptr inbounds double, double* %219, i64 0
%221 = load double, double* %220
%222 = fsub double %218, %221
%223 = load double*, double** %7
%224 = load i32, i32* %6
%225 = sub nsw i32 %224, 1
%226 = sext i32 %225 to i64
%227 = getelementptr inbounds double, double* %223, i64 %226
store double %222, double* %227
%228 = load double*, double** %7
%229 = getelementptr inbounds double, double* %228, i64 0
%230 = load double, double* %229
%231 = load double*, double** %7
%232 = getelementptr inbounds double, double* %231, i64 1
%233 = load double, double* %232
%234 = fadd double %230, %233
%235 = load double*, double** %7
%236 = getelementptr inbounds double, double* %235, i64 1
store double %234, double* %236
%237 = load i32, i32* %14
%238 = sub nsw i32 %237, 2
store i32 %238, i32* %11
br label %239
239: ; preds = %280, %215
%240 = load i32, i32* %11
%241 = icmp sge i32 %240, 2
br i1 %241, label %242, label %283
242: ; preds = %239
%243 = load double*, double** %7
%244 = load i32, i32* %11
%245 = sext i32 %244 to i64
%246 = getelementptr inbounds double, double* %243, i64 %245
%247 = load double, double* %246
%248 = load double*, double** %7
%249 = load i32, i32* %11
%250 = add nsw i32 %249, 1
%251 = sext i32 %250 to i64
%252 = getelementptr inbounds double, double* %248, i64 %251
%253 = load double, double* %252
%254 = fsub double %247, %253
%255 = load double*, double** %7
%256 = load i32, i32* %11
%257 = mul nsw i32 2, %256
%258 = add nsw i32 %257, 1
%259 = sext i32 %258 to i64
%260 = getelementptr inbounds double, double* %255, i64 %259
store double %254, double* %260
%261 = load double*, double** %7
%262 = load i32, i32* %11
%263 = sext i32 %262 to i64
%264 = getelementptr inbounds double, double* %261, i64 %263
%265 = load double, double* %264
%266 = fneg double %265
%267 = load double*, double** %7
%268 = load i32, i32* %11
%269 = add nsw i32 %268, 1
%270 = sext i32 %269 to i64
%271 = getelementptr inbounds double, double* %267, i64 %270
%272 = load double, double* %271
%273 = fsub double %266, %272
%274 = load double*, double** %7
%275 = load i32, i32* %11
%276 = mul nsw i32 2, %275
%277 = sub nsw i32 %276, 1
%278 = sext i32 %277 to i64
%279 = getelementptr inbounds double, double* %274, i64 %278
store double %273, double* %279
br label %280
280: ; preds = %242
%281 = load i32, i32* %11
%282 = sub nsw i32 %281, 2
store i32 %282, i32* %11
br label %239
283: ; preds = %239
store i32 2, i32* %13
%284 = load i32, i32* %15
store i32 %284, i32* %14
br label %285
285: ; preds = %449, %283
%286 = load i32, i32* %14
%287 = icmp sge i32 %286, 2
br i1 %287, label %288, label %460
288: ; preds = %285
%289 = load i32, i32* %14
%290 = load double*, double** %8
%291 = load i32, i32* %17
%292 = load double*, double** %10
%293 = load i32, i32* %16
%294 = sext i32 %293 to i64
%295 = getelementptr inbounds double, double* %292, i64 %294
%296 = load i32, i32* %14
%297 = icmp sgt i32 %296, 4
br i1 %297, label %298, label %313
298: ; preds = %288
%299 = load i32, i32* %14
%300 = load i32*, i32** %9
%301 = getelementptr inbounds i32, i32* %300, i64 2
%302 = load double*, double** %8
%303 = load i32, i32* %14
%304 = load double*, double** %8
%305 = load double*, double** %10
%306 = load i32, i32* %14
%307 = load double*, double** %8
%308 = load i32, i32* %17
%309 = load double*, double** %10
%310 = load i32, i32* %16
%311 = sext i32 %310 to i64
%312 = getelementptr inbounds double, double* %309, i64 %311
br label %321
313: ; preds = %288
%314 = load i32, i32* %14
%315 = icmp eq i32 %314, 4
br i1 %315, label %316, label %320
316: ; preds = %313
%317 = load i32, i32* %14
%318 = load double*, double** %8
%319 = load double*, double** %10
br label %320
320: ; preds = %316, %313
br label %321
321: ; preds = %320, %298
%322 = load double*, double** %8
%323 = getelementptr inbounds double, double* %322, i64 1
%324 = load double, double* %323
%325 = load double*, double** %8
%326 = getelementptr inbounds double, double* %325, i64 0
%327 = load double, double* %326
%328 = fsub double %324, %327
%329 = load double*, double** %7
%330 = load i32, i32* %6
%331 = load i32, i32* %13
%332 = sub nsw i32 %330, %331
%333 = sext i32 %332 to i64
%334 = getelementptr inbounds double, double* %329, i64 %333
store double %328, double* %334
%335 = load double*, double** %8
%336 = getelementptr inbounds double, double* %335, i64 0
%337 = load double, double* %336
%338 = load double*, double** %8
%339 = getelementptr inbounds double, double* %338, i64 1
%340 = load double, double* %339
%341 = fadd double %337, %340
%342 = load double*, double** %7
%343 = load i32, i32* %13
%344 = sext i32 %343 to i64
%345 = getelementptr inbounds double, double* %342, i64 %344
store double %341, double* %345
store i32 0, i32* %12
store i32 2, i32* %11
br label %346
346: ; preds = %392, %321
%347 = load i32, i32* %11
%348 = load i32, i32* %14
%349 = icmp slt i32 %347, %348
br i1 %349, label %350, label %395
350: ; preds = %346
%351 = load i32, i32* %13
%352 = shl i32 %351, 2
%353 = load i32, i32* %12
%354 = add nsw i32 %353, %352
store i32 %354, i32* %12
%355 = load double*, double** %8
%356 = load i32, i32* %11
%357 = sext i32 %356 to i64
%358 = getelementptr inbounds double, double* %355, i64 %357
%359 = load double, double* %358
%360 = fneg double %359
%361 = load double*, double** %8
%362 = load i32, i32* %11
%363 = add nsw i32 %362, 1
%364 = sext i32 %363 to i64
%365 = getelementptr inbounds double, double* %361, i64 %364
%366 = load double, double* %365
%367 = fsub double %360, %366
%368 = load double*, double** %7
%369 = load i32, i32* %12
%370 = load i32, i32* %13
%371 = sub nsw i32 %369, %370
%372 = sext i32 %371 to i64
%373 = getelementptr inbounds double, double* %368, i64 %372
store double %367, double* %373
%374 = load double*, double** %8
%375 = load i32, i32* %11
%376 = sext i32 %375 to i64
%377 = getelementptr inbounds double, double* %374, i64 %376
%378 = load double, double* %377
%379 = load double*, double** %8
%380 = load i32, i32* %11
%381 = add nsw i32 %380, 1
%382 = sext i32 %381 to i64
%383 = getelementptr inbounds double, double* %379, i64 %382
%384 = load double, double* %383
%385 = fsub double %378, %384
%386 = load double*, double** %7
%387 = load i32, i32* %12
%388 = load i32, i32* %13
%389 = add nsw i32 %387, %388
%390 = sext i32 %389 to i64
%391 = getelementptr inbounds double, double* %386, i64 %390
store double %385, double* %391
br label %392
392: ; preds = %350
%393 = load i32, i32* %11
%394 = add nsw i32 %393, 2
store i32 %394, i32* %11
br label %346
395: ; preds = %346
%396 = load i32, i32* %13
%397 = shl i32 %396, 1
store i32 %397, i32* %13
%398 = load i32, i32* %14
%399 = ashr i32 %398, 1
store i32 %399, i32* %15
store i32 1, i32* %11
br label %400
400: ; preds = %446, %395
%401 = load i32, i32* %11
%402 = load i32, i32* %15
%403 = icmp slt i32 %401, %402
br i1 %403, label %404, label %449
404: ; preds = %400
%405 = load i32, i32* %14
%406 = load i32, i32* %11
%407 = sub nsw i32 %405, %406
store i32 %407, i32* %12
%408 = load double*, double** %8
%409 = load i32, i32* %14
%410 = load i32, i32* %12
%411 = add nsw i32 %409, %410
%412 = sext i32 %411 to i64
%413 = getelementptr inbounds double, double* %408, i64 %412
%414 = load double, double* %413
%415 = load double*, double** %8
%416 = load i32, i32* %14
%417 = load i32, i32* %11
%418 = add nsw i32 %416, %417
%419 = sext i32 %418 to i64
%420 = getelementptr inbounds double, double* %415, i64 %419
%421 = load double, double* %420
%422 = fadd double %414, %421
%423 = load double*, double** %8
%424 = load i32, i32* %11
%425 = sext i32 %424 to i64
%426 = getelementptr inbounds double, double* %423, i64 %425
store double %422, double* %426
%427 = load double*, double** %8
%428 = load i32, i32* %14
%429 = load i32, i32* %12
%430 = add nsw i32 %428, %429
%431 = sext i32 %430 to i64
%432 = getelementptr inbounds double, double* %427, i64 %431
%433 = load double, double* %432
%434 = load double*, double** %8
%435 = load i32, i32* %14
%436 = load i32, i32* %11
%437 = add nsw i32 %435, %436
%438 = sext i32 %437 to i64
%439 = getelementptr inbounds double, double* %434, i64 %438
%440 = load double, double* %439
%441 = fsub double %433, %440
%442 = load double*, double** %8
%443 = load i32, i32* %12
%444 = sext i32 %443 to i64
%445 = getelementptr inbounds double, double* %442, i64 %444
store double %441, double* %445
br label %446
446: ; preds = %404
%447 = load i32, i32* %11
%448 = add nsw i32 %447, 1
store i32 %448, i32* %11
br label %400
449: ; preds = %400
%450 = load double*, double** %8
%451 = load i32, i32* %14
%452 = load i32, i32* %15
%453 = add nsw i32 %451, %452
%454 = sext i32 %453 to i64
%455 = getelementptr inbounds double, double* %450, i64 %454
%456 = load double, double* %455
%457 = load double*, double** %8
%458 = getelementptr inbounds double, double* %457, i64 0
store double %456, double* %458
%459 = load i32, i32* %15
store i32 %459, i32* %14
br label %285
460: ; preds = %285
%461 = load double*, double** %8
%462 = getelementptr inbounds double, double* %461, i64 0
%463 = load double, double* %462
%464 = load double*, double** %7
%465 = load i32, i32* %13
%466 = sext i32 %465 to i64
%467 = getelementptr inbounds double, double* %464, i64 %466
store double %463, double* %467
br label %468
468: ; preds = %460, %52
%469 = load double*, double** %7
%470 = getelementptr inbounds double, double* %469, i64 0
store double 0.000000e+00, double* %470
ret void
}

LLVM IR (-O2):
define void @dfst(i32 %0, double* %1, double* %2, i32* %3, double* %4) {
%6 = load i32, i32* %3
%7 = shl i32 %6, 3
%8 = icmp slt i32 %7, %0
br i1 %8, label %9, label %11
9: ; preds = %5
%10 = ashr i32 %0, 3
tail call void @makewt(i32 %10, i32* %3, double* %4)
br label %11
11: ; preds = %9, %5
%12 = phi i32 [ %10, %9 ], [ %6, %5 ]
%13 = getelementptr inbounds i32, i32* %3, i64 1
%14 = load i32, i32* %13
%15 = shl i32 %14, 1
%16 = icmp slt i32 %15, %0
br i1 %16, label %17, label %21
17: ; preds = %11
%18 = ashr i32 %0, 1
%19 = sext i32 %12 to i64
%20 = getelementptr inbounds double, double* %4, i64 %19
tail call void @makect(i32 %18, i32* %3, double* %20)
br label %21
21: ; preds = %17, %11
%22 = phi i32 [ %18, %17 ], [ %14, %11 ]
%23 = icmp sgt i32 %0, 2
br i1 %23, label %24, label %339
24: ; preds = %21
%25 = lshr i32 %0, 1
%26 = lshr i32 %0, 2
%27 = icmp ugt i32 %0, 7
br i1 %27, label %28, label %56
28: ; preds = %24
%29 = zext i32 %25 to i64
%30 = zext i32 %0 to i64
%31 = call i32 @llvm.umax.i32(i32 %26, i32 2)
%32 = zext i32 %31 to i64
br label %33
33: ; preds = %28, %33
%34 = phi i64 [ 1, %28 ], [ %54, %33 ]
%35 = sub nsw i64 %29, %34
%36 = getelementptr inbounds double, double* %1, i64 %34
%37 = load double, double* %36
%38 = sub nsw i64 %30, %34
%39 = getelementptr inbounds double, double* %1, i64 %38
%40 = load double, double* %39
%41 = fadd double %37, %40
%42 = fsub double %37, %40
%43 = getelementptr inbounds double, double* %1, i64 %35
%44 = load double, double* %43
%45 = sub nsw i64 %30, %35
%46 = getelementptr inbounds double, double* %1, i64 %45
%47 = load double, double* %46
%48 = fadd double %44, %47
%49 = fsub double %44, %47
store double %41, double* %36
store double %48, double* %43
%50 = fadd double %42, %49
%51 = getelementptr inbounds double, double* %2, i64 %34
store double %50, double* %51
%52 = fsub double %42, %49
%53 = getelementptr inbounds double, double* %2, i64 %35
store double %52, double* %53
%54 = add nuw nsw i64 %34, 1
%55 = icmp eq i64 %54, %32
br i1 %55, label %56, label %33
56: ; preds = %33, %24
%57 = zext i32 %26 to i64
%58 = getelementptr inbounds double, double* %1, i64 %57
%59 = load double, double* %58
%60 = sub nsw i32 %0, %26
%61 = sext i32 %60 to i64
%62 = getelementptr inbounds double, double* %1, i64 %61
%63 = load double, double* %62
%64 = fsub double %59, %63
store double %64, double* %2
%65 = load double, double* %62
%66 = load double, double* %58
%67 = fadd double %65, %66
store double %67, double* %58
%68 = zext i32 %25 to i64
%69 = getelementptr inbounds double, double* %1, i64 %68
%70 = load double, double* %69
store double %70, double* %1
%71 = sext i32 %12 to i64
%72 = getelementptr inbounds double, double* %4, i64 %71
tail call void @dstsub(i32 %25, double* %1, i32 %22, double* %72)
%73 = icmp sgt i32 %0, 9
br i1 %73, label %74, label %76
74: ; preds = %56
%75 = getelementptr inbounds i32, i32* %3, i64 2
tail call void @bitrv2(i32 %25, i32* %75, double* %1)
tail call void @cftfsub(i32 %25, double* %1, double* %4)
tail call void @rftfsub(i32 %25, double* %1, i32 %22, double* %72)
br label %79
76: ; preds = %56
%77 = icmp eq i32 %25, 4
br i1 %77, label %78, label %79
78: ; preds = %76
tail call void @cftfsub(i32 4, double* %1, double* %4)
br label %79
79: ; preds = %76, %78, %74
%80 = getelementptr inbounds double, double* %1, i64 1
%81 = load double, double* %80
%82 = load double, double* %1
%83 = fsub double %81, %82
%84 = add nsw i32 %0, -1
%85 = zext i32 %84 to i64
%86 = getelementptr inbounds double, double* %1, i64 %85
store double %83, double* %86
%87 = load double, double* %1
%88 = load double, double* %80
%89 = fadd double %87, %88
store double %89, double* %80
br i1 %27, label %105, label %91
90: ; preds = %105
br i1 %27, label %93, label %91
91: ; preds = %79, %90
%92 = load double, double* %2
br label %335
93: ; preds = %90
%94 = getelementptr inbounds i32, i32* %3, i64 2
%95 = getelementptr inbounds double, double* %2, i64 1
%96 = getelementptr double, double* %2, i64 -1
%97 = getelementptr double, double* %2, i64 -1
%98 = getelementptr double, double* %2, i64 1
%99 = getelementptr double, double* %2, i64 1
%100 = getelementptr double, double* %2, i64 1
%101 = getelementptr double, double* %2, i64 1
%102 = icmp ult double* %99, %2
%103 = getelementptr inbounds double, double* %2, i64 -1
%104 = getelementptr inbounds double, double* %2, i64 -1
br label %127
105: ; preds = %79, %105
%106 = phi i32 [ %107, %105 ], [ %25, %79 ]
%107 = add nsw i32 %106, -2
%108 = zext i32 %107 to i64
%109 = getelementptr inbounds double, double* %1, i64 %108
%110 = load double, double* %109
%111 = add nsw i32 %106, -1
%112 = zext i32 %111 to i64
%113 = getelementptr inbounds double, double* %1, i64 %112
%114 = load double, double* %113
%115 = fsub double %110, %114
%116 = shl nuw nsw i32 %107, 1
%117 = or i32 %116, 1
%118 = zext i32 %117 to i64
%119 = getelementptr inbounds double, double* %1, i64 %118
store double %115, double* %119
%120 = fneg double %110
%121 = load double, double* %113
%122 = fsub double %120, %121
%123 = add nsw i32 %116, -1
%124 = zext i32 %123 to i64
%125 = getelementptr inbounds double, double* %1, i64 %124
store double %122, double* %125
%126 = icmp sgt i32 %106, 5
br i1 %126, label %105, label %90
127: ; preds = %93, %319
%128 = phi i32 [ 2, %93 ], [ %176, %319 ]
%129 = phi i32 [ %26, %93 ], [ %177, %319 ]
tail call void @dstsub(i32 %129, double* %2, i32 %22, double* %72)
%130 = icmp ugt i32 %129, 4
br i1 %130, label %131, label %132
131: ; preds = %127
tail call void @bitrv2(i32 %129, i32* %94, double* %2)
tail call void @cftfsub(i32 %129, double* %2, double* %4)
tail call void @rftfsub(i32 %129, double* %2, i32 %22, double* %72)
br label %135
132: ; preds = %127
%133 = icmp eq i32 %129, 4
br i1 %133, label %134, label %135
134: ; preds = %132
tail call void @cftfsub(i32 4, double* %2, double* %4)
br label %135
135: ; preds = %132, %134, %131
%136 = load double, double* %95
%137 = load double, double* %2
%138 = fsub double %136, %137
%139 = sub nsw i32 %0, %128
%140 = sext i32 %139 to i64
%141 = getelementptr inbounds double, double* %1, i64 %140
store double %138, double* %141
%142 = load double, double* %2
%143 = load double, double* %95
%144 = fadd double %142, %143
%145 = sext i32 %128 to i64
%146 = getelementptr inbounds double, double* %1, i64 %145
store double %144, double* %146
%147 = icmp ugt i32 %129, 2
br i1 %147, label %151, label %148
148: ; preds = %135
%149 = shl i32 %128, 1
%150 = lshr i32 %129, 1
br label %324
151: ; preds = %135
%152 = shl i32 %128, 2
%153 = zext i32 %129 to i64
%154 = sext i32 %152 to i64
br label %155
155: ; preds = %151, %155
%156 = phi i64 [ 0, %151 ], [ %158, %155 ]
%157 = phi i64 [ 2, %151 ], [ %173, %155 ]
%158 = add nsw i64 %156, %154
%159 = getelementptr inbounds double, double* %2, i64 %157
%160 = load double, double* %159
%161 = fneg double %160
%162 = or i64 %157, 1
%163 = getelementptr inbounds double, double* %2, i64 %162
%164 = load double, double* %163
%165 = fsub double %161, %164
%166 = sub nsw i64 %158, %145
%167 = getelementptr inbounds double, double* %1, i64 %166
store double %165, double* %167
%168 = load double, double* %159
%169 = load double, double* %163
%170 = fsub double %168, %169
%171 = add nsw i64 %158, %145
%172 = getelementptr inbounds double, double* %1, i64 %171
store double %170, double* %172
%173 = add nuw nsw i64 %157, 2
%174 = icmp ult i64 %173, %153
br i1 %174, label %155, label %175
175: ; preds = %155
%176 = shl i32 %128, 1
%177 = lshr i32 %129, 1
%178 = icmp ugt i32 %129, 3
br i1 %178, label %179, label %324
179: ; preds = %175
%180 = zext i32 %129 to i64
%181 = call i32 @llvm.umax.i32(i32 %177, i32 2)
%182 = zext i32 %181 to i64
%183 = add nsw i64 %182, -1
%184 = icmp ult i64 %183, 2
br i1 %184, label %267, label %185
185: ; preds = %179
%186 = add nsw i64 %182, -2
%187 = getelementptr double, double* %96, i64 %153
%188 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %186, i64 8)
%189 = extractvalue { i64, i1 } %188, 0
%190 = extractvalue { i64, i1 } %188, 1
%191 = bitcast double* %187 to i8*
%192 = sub i64 0, %189
%193 = getelementptr i8, i8* %191, i64 %192
%194 = icmp ugt i8* %193, %191
%195 = or i1 %194, %190
%196 = shl nuw nsw i64 %153, 1
%197 = getelementptr double, double* %97, i64 %196
%198 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %186, i64 8)
%199 = extractvalue { i64, i1 } %198, 0
%200 = extractvalue { i64, i1 } %198, 1
%201 = bitcast double* %197 to i8*
%202 = sub i64 0, %199
%203 = getelementptr i8, i8* %201, i64 %202
%204 = icmp ugt i8* %203, %201
%205 = or i1 %204, %200
%206 = or i1 %195, %205
br i1 %206, label %267, label %207
207: ; preds = %185
%208 = getelementptr double, double* %2, i64 %182
%209 = getelementptr double, double* %99, i64 %153
%210 = add nuw nsw i64 %153, %182
%211 = getelementptr double, double* %2, i64 %210
%212 = sub nsw i64 %153, %182
%213 = getelementptr double, double* %100, i64 %212
%214 = getelementptr double, double* %2, i64 %153
%215 = shl nuw nsw i64 %153, 1
%216 = sub nsw i64 %215, %182
%217 = getelementptr double, double* %101, i64 %216
%218 = getelementptr double, double* %2, i64 %215
%219 = icmp ult double* %98, %211
%220 = icmp ult double* %209, %208
%221 = and i1 %219, %220
%222 = icmp ult double* %98, %214
%223 = icmp ult double* %213, %208
%224 = and i1 %222, %223
%225 = or i1 %221, %224
%226 = icmp ult double* %98, %218
%227 = icmp ult double* %217, %208
%228 = and i1 %226, %227
%229 = or i1 %225, %228
%230 = icmp ult double* %213, %211
%231 = and i1 %102, %230
%232 = or i1 %229, %231
%233 = icmp ult double* %213, %218
%234 = icmp ult double* %217, %214
%235 = and i1 %233, %234
%236 = or i1 %232, %235
br i1 %236, label %267, label %237
237: ; preds = %207
%238 = and i64 %183, -2
%239 = or i64 %183, 1
br label %240
240: ; preds = %240, %237
%241 = phi i64 [ 0, %237 ], [ %263, %240 ]
%242 = or i64 %241, 1
%243 = sub nsw i64 %180, %242
%244 = add nsw i64 %243, %180
%245 = getelementptr inbounds double, double* %103, i64 %244
%246 = bitcast double* %245 to <2 x double>*
%247 = load <2 x double>, <2 x double>* %246
%248 = shufflevector <2 x double> %247, <2 x double> poison, <2 x i32> <i32 1, i32 0>
%249 = add nuw nsw i64 %242, %180
%250 = getelementptr inbounds double, double* %2, i64 %249
%251 = bitcast double* %250 to <2 x double>*
%252 = load <2 x double>, <2 x double>* %251
%253 = fadd <2 x double> %248, %252
%254 = getelementptr inbounds double, double* %2, i64 %242
%255 = bitcast double* %254 to <2 x double>*
store <2 x double> %253, <2 x double>* %255
%256 = bitcast double* %245 to <2 x double>*
%257 = load <2 x double>, <2 x double>* %256
%258 = shufflevector <2 x double> %257, <2 x double> poison, <2 x i32> <i32 1, i32 0>
%259 = fsub <2 x double> %258, %252
%260 = shufflevector <2 x double> %259, <2 x double> poison, <2 x i32> <i32 1, i32 0>
%261 = getelementptr inbounds double, double* %104, i64 %243
%262 = bitcast double* %261 to <2 x double>*
store <2 x double> %260, <2 x double>* %262
%263 = add nuw i64 %241, 2
%264 = icmp eq i64 %263, %238
br i1 %264, label %265, label %240
265: ; preds = %240
%266 = icmp eq i64 %183, %238
br i1 %266, label %319, label %267
267: ; preds = %207, %185, %179, %265
%268 = phi i64 [ 1, %207 ], [ 1, %185 ], [ 1, %179 ], [ %239, %265 ]
%269 = xor i64 %268, -1
%270 = and i64 %182, 1
%271 = icmp eq i64 %270, 0
br i1 %271, label %272, label %286
272: ; preds = %267
%273 = sub nsw i64 %180, %268
%274 = add nsw i64 %273, %180
%275 = getelementptr inbounds double, double* %2, i64 %274
%276 = load double, double* %275
%277 = add nuw nsw i64 %268, %180
%278 = getelementptr inbounds double, double* %2, i64 %277
%279 = load double, double* %278
%280 = fadd double %276, %279
%281 = getelementptr inbounds double, double* %2, i64 %268
store double %280, double* %281
%282 = load double, double* %275
%283 = fsub double %282, %279
%284 = getelementptr inbounds double, double* %2, i64 %273
store double %283, double* %284
%285 = add nuw nsw i64 %268, 1
br label %286
286: ; preds = %272, %267
%287 = phi i64 [ %268, %267 ], [ %285, %272 ]
%288 = sub nsw i64 0, %182
%289 = icmp eq i64 %269, %288
br i1 %289, label %319, label %290
290: ; preds = %286, %290
%291 = phi i64 [ %317, %290 ], [ %287, %286 ]
%292 = sub nsw i64 %180, %291
%293 = add nsw i64 %292, %180
%294 = getelementptr inbounds double, double* %2, i64 %293
%295 = load double, double* %294
%296 = add nuw nsw i64 %291, %180
%297 = getelementptr inbounds double, double* %2, i64 %296
%298 = load double, double* %297
%299 = fadd double %295, %298
%300 = getelementptr inbounds double, double* %2, i64 %291
store double %299, double* %300
%301 = load double, double* %294
%302 = fsub double %301, %298
%303 = getelementptr inbounds double, double* %2, i64 %292
store double %302, double* %303
%304 = add nuw nsw i64 %291, 1
%305 = sub nsw i64 %180, %304
%306 = add nsw i64 %305, %180
%307 = getelementptr inbounds double, double* %2, i64 %306
%308 = load double, double* %307
%309 = add nuw nsw i64 %304, %180
%310 = getelementptr inbounds double, double* %2, i64 %309
%311 = load double, double* %310
%312 = fadd double %308, %311
%313 = getelementptr inbounds double, double* %2, i64 %304
store double %312, double* %313
%314 = load double, double* %307
%315 = fsub double %314, %311
%316 = getelementptr inbounds double, double* %2, i64 %305
store double %315, double* %316
%317 = add nuw nsw i64 %291, 2
%318 = icmp eq i64 %317, %182
br i1 %318, label %319, label %290
319: ; preds = %286, %290, %265
%320 = add nuw nsw i32 %177, %129
%321 = zext i32 %320 to i64
%322 = getelementptr inbounds double, double* %2, i64 %321
%323 = load double, double* %322
store double %323, double* %2
br i1 %178, label %127, label %331
324: ; preds = %175, %148
%325 = phi i32 [ %150, %148 ], [ %177, %175 ]
%326 = phi i32 [ %149, %148 ], [ %176, %175 ]
%327 = add nuw nsw i32 %325, %129
%328 = zext i32 %327 to i64
%329 = getelementptr inbounds double, double* %2, i64 %328
%330 = load double, double* %329
store double %330, double* %2
br label %331
331: ; preds = %319, %324
%332 = phi double [ %330, %324 ], [ %323, %319 ]
%333 = phi i32 [ %326, %324 ], [ %176, %319 ]
%334 = sext i32 %333 to i64
br label %335
335: ; preds = %91, %331
%336 = phi double [ %92, %91 ], [ %332, %331 ]
%337 = phi i64 [ 2, %91 ], [ %334, %331 ]
%338 = getelementptr inbounds double, double* %1, i64 %337
store double %336, double* %338
br label %339
339: ; preds = %335, %21
store double 0.000000e+00, double* %1
ret void
}