#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
double cos(double);
double sin(double);
void rstage(int n, int n2, int n4, double *x1, double *x2, double *x3,
            double *x4) {
  int n8, is, id, i1, i2, j, jn;
  double t1, t2, e, t3, t4, t5;
  double ss1, sd1, ss3, sd3;
  double cc1, cd1, cc3, cd3;
  n8 = n2 / 8;
  is = 0;
  id = n2 * 2;
  do {
    for (i1 = is + 1; i1 <= n; i1 += id) {
      t1 = x4[i1] + x3[i1];
      x4[i1] = x4[i1] - x3[i1];
      x3[i1] = x1[i1] - t1;
      x1[i1] = x1[i1] + t1;
    }
    is = 2 * id - n2;
    id = 4 * id;
  } while (is < n);
  if (n4 - 1 <= 0)
    return;
  is = 0;
  id = n2 * 2;
  do {
    for (i2 = is + 1 + n8; i2 <= n; i2 += id) {
      t1 = (x3[i2] + x4[i2]) * .7071067811865475;
      t2 = (x3[i2] - x4[i2]) * .7071067811865475;
      x4[i2] = x2[i2] - t1;
      x3[i2] = -x2[i2] - t1;
      x2[i2] = x1[i2] - t2;
      x1[i2] = x1[i2] + t2;
    }
    is = 2 * id - n2;
    id = 4 * id;
  } while (is < n);
  if (n8 - 1 <= 0)
    return;
  e = 2 * 3.14159265358979323 / n2;
  ss1 = sin(e);
  sd1 = ss1;
  sd3 = 3 * sd1 - 4 * (sd1 * sd1 * sd1);
  ss3 = sd3;
  cc1 = cos(e);
  cd1 = cc1;
  cd3 = 4 * (cd1 * cd1 * cd1) - 3. * cd1;
  cc3 = cd3;
  for (j = 2; j <= n8; j++) {
    is = 0;
    id = 2 * n2;
    jn = n4 - 2 * j + 2;
    do {
      for (i1 = is + j; i1 <= n; i1 += id) {
        i2 = i1 + jn;
        t1 = x3[i1] * cc1 + x3[i2] * ss1;
        t2 = x3[i2] * cc1 - x3[i1] * ss1;
        t3 = x4[i1] * cc3 + x4[i2] * ss3;
        t4 = x4[i2] * cc3 - x4[i1] * ss3;
        t5 = t1 + t3;
        t3 = t1 - t3;
        t1 = t2 + t4;
        t4 = t2 - t4;
        x3[i1] = t1 - x2[i2];
        x4[i2] = t1 + x2[i2];
        x3[i2] = -x2[i1] - t3;
        x4[i1] = x2[i1] - t3;
        x2[i2] = x1[i1] - t5;
        x1[i1] = x1[i1] + t5;
        x2[i1] = x1[i2] + t4;
        x1[i2] = x1[i2] - t4;
      }
      is = 2 * id - n2;
      id = 4 * id;
    } while (is < n);
    t1 = cc1 * cd1 - ss1 * sd1;
    ss1 = cc1 * sd1 + ss1 * cd1;
    cc1 = t1;
    t3 = cc3 * cd3 - ss3 * sd3;
    ss3 = cc3 * sd3 + ss3 * cd3;
    cc3 = t3;
  }
  return;
}


x86 assembly (clang, -O0):
<rstage>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
mov    0x10(%rbp),%rax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    %eax,-0x2c(%rbp)
movl   $0x0,-0x30(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x34(%rbp)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     1209 <rstage+0xe9>
mov    0x10(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
movslq -0x38(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    0x10(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
movslq -0x38(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
mov    0x10(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x18(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x50(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x18(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
addsd  -0x50(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x34(%rbp),%eax
add    -0x38(%rbp),%eax
mov    %eax,-0x38(%rbp)
jmp    116b <rstage+0x4b>
mov    -0x34(%rbp),%eax
shl    $0x1,%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    -0x34(%rbp),%eax
shl    $0x2,%eax
mov    %eax,-0x34(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x4(%rbp),%eax
jl     1162 <rstage+0x42>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
cmp    $0x0,%eax
jg     123e <rstage+0x11e>
jmp    1894 <rstage+0x774>
movl   $0x0,-0x30(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x34(%rbp)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
add    -0x2c(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     135d <rstage+0x23d>
mov    -0x28(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x10(%rbp),%rax
movslq -0x3c(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  0xd90(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x28(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x10(%rbp),%rax
movslq -0x3c(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
movsd  0xd65(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x20(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x50(%rbp),%xmm0
mov    0x10(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x20(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
subsd  -0x50(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x18(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x58(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x18(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
addsd  -0x58(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x34(%rbp),%eax
add    -0x3c(%rbp),%eax
mov    %eax,-0x3c(%rbp)
jmp    125a <rstage+0x13a>
mov    -0x34(%rbp),%eax
shl    $0x1,%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    -0x34(%rbp),%eax
shl    $0x2,%eax
mov    %eax,-0x34(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x4(%rbp),%eax
jl     124e <rstage+0x12e>
mov    -0x2c(%rbp),%eax
sub    $0x1,%eax
cmp    $0x0,%eax
jg     1392 <rstage+0x272>
jmp    1894 <rstage+0x774>
cvtsi2sdl -0x8(%rbp),%xmm1
movsd  0xc71(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x60(%rbp),%xmm0
call   1030 <sin@plt>
movsd  %xmm0,-0x80(%rbp)
movsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
movsd  -0x88(%rbp),%xmm2
ff
mulsd  -0x88(%rbp),%xmm2
ff
mulsd  -0x88(%rbp),%xmm2
ff
movsd  0xc14(%rip),%xmm1
mulsd  %xmm2,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
movsd  0xbf9(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x60(%rbp),%xmm0
call   1040 <cos@plt>
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0xa8(%rbp),%xmm0
ff
mulsd  -0xa8(%rbp),%xmm0
ff
mulsd  -0xa8(%rbp),%xmm0
ff
movsd  0xb97(%rip),%xmm1
mulsd  -0xa8(%rbp),%xmm1
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
movsd  0xb68(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0xb8(%rbp),%xmm0
ff
movsd  %xmm0,-0xb0(%rbp)
ff
movl   $0x2,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jg     188f <rstage+0x76f>
movl   $0x0,-0x30(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x34(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x40(%rbp),%ecx
shl    $0x1,%ecx
sub    %ecx,%eax
add    $0x2,%eax
mov    %eax,-0x44(%rbp)
mov    -0x30(%rbp),%eax
add    -0x40(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     1767 <rstage+0x647>
mov    -0x38(%rbp),%eax
add    -0x44(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x28(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  -0xa0(%rbp),%xmm2
ff
mov    -0x28(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  -0x80(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x28(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  -0xa0(%rbp),%xmm2
ff
mov    -0x28(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  -0x80(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    0x10(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  -0xb0(%rbp),%xmm2
ff
mov    0x10(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  -0x90(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    0x10(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  -0xb0(%rbp),%xmm2
ff
mov    0x10(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  -0x90(%rbp),%xmm1
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x50(%rbp),%xmm0
addsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x50(%rbp),%xmm0
subsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x58(%rbp),%xmm0
addsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x58(%rbp),%xmm0
subsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x50(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x3c(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x50(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x3c(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
mov    0x10(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x20(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
subsd  -0x68(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x20(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x68(%rbp),%xmm0
mov    0x10(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x18(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x78(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x18(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
addsd  -0x78(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x18(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
addsd  -0x70(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x18(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x70(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x34(%rbp),%eax
add    -0x38(%rbp),%eax
mov    %eax,-0x38(%rbp)
jmp    14f5 <rstage+0x3d5>
mov    -0x34(%rbp),%eax
shl    $0x1,%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    -0x34(%rbp),%eax
shl    $0x2,%eax
mov    %eax,-0x34(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x4(%rbp),%eax
jl     14ec <rstage+0x3cc>
movsd  -0xa0(%rbp),%xmm0
ff
movsd  -0xa8(%rbp),%xmm2
ff
movsd  -0x80(%rbp),%xmm1
mulsd  -0x88(%rbp),%xmm1
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0xa0(%rbp),%xmm0
ff
movsd  -0x88(%rbp),%xmm2
ff
movsd  -0x80(%rbp),%xmm1
mulsd  -0xa8(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0xb0(%rbp),%xmm0
ff
movsd  -0xb8(%rbp),%xmm2
ff
movsd  -0x90(%rbp),%xmm1
ff
mulsd  -0x98(%rbp),%xmm1
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0xb0(%rbp),%xmm0
ff
movsd  -0x98(%rbp),%xmm2
ff
movsd  -0x90(%rbp),%xmm1
ff
mulsd  -0xb8(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    14bf <rstage+0x39f>
jmp    1894 <rstage+0x774>
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rstage>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    %r9,%r14
mov    %r8,%r15
mov    %rcx,%rbx
mov    %edi,%ebp
mov    0x80(%rsp),%r12
lea    (%rsi,%rsi,1),%r9d
movslq %edi,%r13
xor    %ecx,%ecx
mov    %r9d,%eax
jmp    115c <rstage+0x3c>
nop
lea    (%rax,%rax,1),%ecx
sub    %esi,%ecx
shl    $0x2,%eax
cmp    %ebp,%ecx
jge    11b1 <rstage+0x91>
cmp    %ebp,%ecx
jge    1150 <rstage+0x30>
add    $0x1,%ecx
movslq %ecx,%rcx
movslq %eax,%rdi
nopl   0x0(%rax)
movsd  (%r12,%rcx,8),%xmm0
movsd  (%r14,%rcx,8),%xmm1
movapd %xmm0,%xmm2
addsd  %xmm1,%xmm2
subsd  %xmm1,%xmm0
movsd  %xmm0,(%r12,%rcx,8)
movsd  (%rbx,%rcx,8),%xmm0
subsd  %xmm2,%xmm0
movsd  %xmm0,(%r14,%rcx,8)
addsd  (%rbx,%rcx,8),%xmm2
movsd  %xmm2,(%rbx,%rcx,8)
add    %rdi,%rcx
cmp    %r13,%rcx
jle    1170 <rstage+0x50>
jmp    1150 <rstage+0x30>
lea    0x7(%rsi),%r10d
test   %esi,%esi
cmovns %esi,%r10d
cmp    $0x2,%edx
jl     1273 <rstage+0x153>
sar    $0x3,%r10d
lea    0x1(%r10),%r8d
xor    %eax,%eax
movsd  0xe2a(%rip),%xmm0
mov    %r9d,%ecx
jmp    11f0 <rstage+0xd0>
nopl   0x0(%rax,%rax,1)
lea    (%rcx,%rcx,1),%eax
sub    %esi,%eax
shl    $0x2,%ecx
cmp    %ebp,%eax
jge    126e <rstage+0x14e>
add    %r8d,%eax
cmp    %ebp,%eax
jg     11e0 <rstage+0xc0>
movslq %eax,%rdi
movslq %ecx,%rax
nopl   (%rax)
movsd  (%r14,%rdi,8),%xmm1
movsd  (%r12,%rdi,8),%xmm2
movapd %xmm1,%xmm3
addsd  %xmm2,%xmm3
mulsd  %xmm0,%xmm3
subsd  %xmm2,%xmm1
mulsd  %xmm0,%xmm1
movsd  (%r15,%rdi,8),%xmm2
subsd  %xmm3,%xmm2
movsd  %xmm2,(%r12,%rdi,8)
movsd  (%r15,%rdi,8),%xmm2
xorpd  0xdf2(%rip),%xmm2
subsd  %xmm3,%xmm2
movsd  %xmm2,(%r14,%rdi,8)
movsd  (%rbx,%rdi,8),%xmm2
subsd  %xmm1,%xmm2
movsd  %xmm2,(%r15,%rdi,8)
addsd  (%rbx,%rdi,8),%xmm1
movsd  %xmm1,(%rbx,%rdi,8)
add    %rax,%rdi
cmp    %r13,%rdi
jle    1200 <rstage+0xe0>
jmp    11e0 <rstage+0xc0>
cmp    $0x10,%esi
jge    1282 <rstage+0x162>
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xorps  %xmm1,%xmm1
cvtsi2sd %esi,%xmm1
movsd  0xd77(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,0x8(%rsp)
mov    %edx,0x4(%rsp)
mov    %rsi,0x18(%rsp)
mov    %r9d,(%rsp)
mov    %r10,0x10(%rsp)
call   1030 <sin@plt>
movapd %xmm0,0x30(%rsp)
movapd %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  0xd44(%rip),%xmm1
movsd  0xd44(%rip),%xmm2
mulsd  %xmm0,%xmm2
addsd  %xmm1,%xmm2
movapd %xmm2,0x20(%rsp)
movsd  0x8(%rsp),%xmm0
call   1040 <cos@plt>
movapd 0x20(%rsp),%xmm14
movapd 0xd33(%rip),%xmm13
mov    0x10(%rsp),%r11
mov    (%rsp),%r10d
mov    0x18(%rsp),%r9
mov    0x4(%rsp),%r8d
movapd %xmm0,%xmm9
mulsd  %xmm0,%xmm9
mulsd  %xmm0,%xmm9
movsd  0xcf9(%rip),%xmm2
mulsd  %xmm0,%xmm2
mulsd  0xcf4(%rip),%xmm9
cmp    $0x3,%r11d
mov    $0x2,%eax
cmovl  %eax,%r11d
addsd  %xmm2,%xmm9
unpcklpd 0x30(%rsp),%xmm14
unpcklpd %xmm0,%xmm9
movapd 0xcd5(%rip),%xmm8
movapd %xmm9,%xmm10
movapd %xmm14,%xmm11
jmp    13bd <rstage+0x29d>
nopw   0x0(%rax,%rax,1)
xorpd  %xmm8,%xmm12
movapd %xmm9,%xmm0
mulpd  %xmm11,%xmm0
xorpd  %xmm8,%xmm11
unpcklpd %xmm12,%xmm11
mulpd  %xmm14,%xmm11
movapd %xmm10,%xmm1
mulpd  %xmm14,%xmm1
addpd  %xmm0,%xmm1
mulpd  %xmm9,%xmm10
addpd  %xmm11,%xmm10
lea    0x1(%rax),%ecx
add    $0xffffffff,%r8d
movapd %xmm1,%xmm11
cmp    %r11d,%eax
mov    %ecx,%eax
je     1273 <rstage+0x153>
movapd %xmm11,%xmm12
unpckhpd %xmm11,%xmm12
movapd %xmm10,%xmm5
unpckhpd %xmm10,%xmm5
xor    %edx,%edx
mov    %r10d,%ecx
jmp    13ed <rstage+0x2cd>
nopl   0x0(%rax,%rax,1)
lea    (%rcx,%rcx,1),%edx
sub    %r9d,%edx
shl    $0x2,%ecx
cmp    %ebp,%edx
jge    1370 <rstage+0x250>
lea    (%rdx,%rax,1),%esi
cmp    %ebp,%esi
jg     13e0 <rstage+0x2c0>
movslq %esi,%rsi
movslq %ecx,%rdi
add    %r8d,%edx
nopl   (%rax)
movsd  (%r14,%rsi,8),%xmm7
movslq %edx,%rdx
movsd  (%r14,%rdx,8),%xmm6
movapd %xmm12,%xmm4
mulsd  %xmm6,%xmm4
movapd %xmm12,%xmm3
mulsd  %xmm7,%xmm3
mulsd  %xmm5,%xmm7
addsd  %xmm4,%xmm7
mulsd  %xmm5,%xmm6
subsd  %xmm3,%xmm6
movsd  (%r12,%rsi,8),%xmm3
movsd  (%r12,%rdx,8),%xmm4
movapd %xmm11,%xmm1
mulsd  %xmm4,%xmm1
movapd %xmm11,%xmm2
mulsd  %xmm3,%xmm2
mulsd  %xmm10,%xmm3
addsd  %xmm1,%xmm3
mulsd  %xmm10,%xmm4
subsd  %xmm2,%xmm4
movapd %xmm7,%xmm1
addsd  %xmm3,%xmm1
movapd %xmm6,%xmm2
addsd  %xmm4,%xmm2
movapd %xmm2,%xmm0
subsd  (%r15,%rdx,8),%xmm0
subsd  %xmm3,%xmm7
movsd  %xmm0,(%r14,%rsi,8)
addsd  (%r15,%rdx,8),%xmm2
subsd  %xmm4,%xmm6
movsd  %xmm2,(%r12,%rdx,8)
movsd  (%r15,%rsi,8),%xmm0
xorpd  %xmm13,%xmm0
subsd  %xmm7,%xmm0
movsd  %xmm0,(%r14,%rdx,8)
movsd  (%r15,%rsi,8),%xmm0
subsd  %xmm7,%xmm0
movsd  %xmm0,(%r12,%rsi,8)
movsd  (%rbx,%rsi,8),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,(%r15,%rdx,8)
addsd  (%rbx,%rsi,8),%xmm1
movsd  %xmm1,(%rbx,%rsi,8)
movsd  (%rbx,%rdx,8),%xmm0
addsd  %xmm6,%xmm0
movsd  %xmm0,(%r15,%rsi,8)
movsd  (%rbx,%rdx,8),%xmm0
subsd  %xmm6,%xmm0
movsd  %xmm0,(%rbx,%rdx,8)
add    %rdi,%rsi
add    %ecx,%edx
cmp    %r13,%rsi
jle    1400 <rstage+0x2e0>
jmp    13e0 <rstage+0x2c0>

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

LLVM IR (-O2):
define void @rstage(i32 %0, i32 %1, i32 %2, double* nocapture %3, double* nocapture %4, double* nocapture %5, double* nocapture %6) {
%8 = shl nsw i32 %1, 1
%9 = sext i32 %0 to i64
br label %10
10: ; preds = %33, %7
%11 = phi i32 [ %8, %7 ], [ %36, %33 ]
%12 = phi i32 [ 0, %7 ], [ %35, %33 ]
%13 = icmp slt i32 %12, %0
br i1 %13, label %14, label %33
14: ; preds = %10
%15 = add nsw i32 %12, 1
%16 = sext i32 %15 to i64
%17 = sext i32 %11 to i64
br label %18
18: ; preds = %14, %18
%19 = phi i64 [ %16, %14 ], [ %31, %18 ]
%20 = getelementptr inbounds double, double* %6, i64 %19
%21 = load double, double* %20
%22 = getelementptr inbounds double, double* %5, i64 %19
%23 = load double, double* %22
%24 = fadd double %21, %23
%25 = fsub double %21, %23
store double %25, double* %20
%26 = getelementptr inbounds double, double* %3, i64 %19
%27 = load double, double* %26
%28 = fsub double %27, %24
store double %28, double* %22
%29 = load double, double* %26
%30 = fadd double %24, %29
store double %30, double* %26
%31 = add i64 %19, %17
%32 = icmp sgt i64 %31, %9
br i1 %32, label %33, label %18
33: ; preds = %18, %10
%34 = shl nsw i32 %11, 1
%35 = sub nsw i32 %34, %1
%36 = shl nsw i32 %11, 2
%37 = icmp slt i32 %35, %0
br i1 %37, label %10, label %38
38: ; preds = %33
%39 = sdiv i32 %1, 8
%40 = icmp slt i32 %2, 2
br i1 %40, label %189, label %41
41: ; preds = %38
%42 = add nsw i32 %39, 1
br label %43
43: ; preds = %41, %74
%44 = phi i32 [ %77, %74 ], [ %8, %41 ]
%45 = phi i32 [ %76, %74 ], [ 0, %41 ]
%46 = add i32 %42, %45
%47 = icmp sgt i32 %46, %0
br i1 %47, label %74, label %48
48: ; preds = %43
%49 = sext i32 %46 to i64
%50 = sext i32 %44 to i64
br label %51
51: ; preds = %48, %51
%52 = phi i64 [ %49, %48 ], [ %72, %51 ]
%53 = getelementptr inbounds double, double* %5, i64 %52
%54 = load double, double* %53
%55 = getelementptr inbounds double, double* %6, i64 %52
%56 = load double, double* %55
%57 = fadd double %54, %56
%58 = fmul double %57, 0x3FE6A09E667F3BCC
%59 = fsub double %54, %56
%60 = fmul double %59, 0x3FE6A09E667F3BCC
%61 = getelementptr inbounds double, double* %4, i64 %52
%62 = load double, double* %61
%63 = fsub double %62, %58
store double %63, double* %55
%64 = load double, double* %61
%65 = fneg double %64
%66 = fsub double %65, %58
store double %66, double* %53
%67 = getelementptr inbounds double, double* %3, i64 %52
%68 = load double, double* %67
%69 = fsub double %68, %60
store double %69, double* %61
%70 = load double, double* %67
%71 = fadd double %60, %70
store double %71, double* %67
%72 = add i64 %52, %50
%73 = icmp sgt i64 %72, %9
br i1 %73, label %74, label %51
74: ; preds = %51, %43
%75 = shl nsw i32 %44, 1
%76 = sub nsw i32 %75, %1
%77 = shl nsw i32 %44, 2
%78 = icmp slt i32 %76, %0
br i1 %78, label %43, label %79
79: ; preds = %74
%80 = icmp slt i32 %1, 16
br i1 %80, label %189, label %81
81: ; preds = %79
%82 = sitofp i32 %1 to double
%83 = fdiv double 0x401921FB54442D18, %82
%84 = tail call double @sin(double %83)
%85 = fmul double %84, %84
%86 = fmul double %84, %85
%87 = fmul double %86, -4.000000e+00
%88 = tail call double @llvm.fmuladd.f64(double %84, double 3.000000e+00, double %87)
%89 = tail call double @cos(double %83)
%90 = fmul double %89, %89
%91 = fmul double %89, %90
%92 = fmul double %89, -3.000000e+00
%93 = tail call double @llvm.fmuladd.f64(double %91, double 4.000000e+00, double %92)
%94 = add i32 %2, 2
%95 = call i32 @llvm.smax.i32(i32 %39, i32 2)
%96 = insertelement <4 x double> poison, double %93, i64 0
%97 = insertelement <4 x double> %96, double %89, i64 1
%98 = insertelement <4 x double> %97, double %88, i64 2
%99 = insertelement <4 x double> %98, double %84, i64 3
%100 = insertelement <4 x double> poison, double %88, i64 0
%101 = insertelement <4 x double> %100, double %84, i64 1
%102 = insertelement <4 x double> %101, double %93, i64 2
%103 = insertelement <4 x double> %102, double %89, i64 3
br label %104
104: ; preds = %81, %176
%105 = phi i32 [ 2, %81 ], [ %187, %176 ]
%106 = phi <4 x double> [ %99, %81 ], [ %186, %176 ]
%107 = mul nsw i32 %105, -2
%108 = add i32 %94, %107
%109 = extractelement <4 x double> %106, i64 3
%110 = extractelement <4 x double> %106, i64 1
%111 = extractelement <4 x double> %106, i64 2
%112 = extractelement <4 x double> %106, i64 0
br label %113
113: ; preds = %171, %104
%114 = phi i32 [ %8, %104 ], [ %174, %171 ]
%115 = phi i32 [ 0, %104 ], [ %173, %171 ]
%116 = add i32 %115, %105
%117 = icmp sgt i32 %116, %0
br i1 %117, label %171, label %118
118: ; preds = %113
%119 = sext i32 %116 to i64
%120 = sext i32 %114 to i64
br label %121
121: ; preds = %118, %121
%122 = phi i64 [ %119, %118 ], [ %169, %121 ]
%123 = trunc i64 %122 to i32
%124 = add i32 %108, %123
%125 = getelementptr inbounds double, double* %5, i64 %122
%126 = load double, double* %125
%127 = sext i32 %124 to i64
%128 = getelementptr inbounds double, double* %5, i64 %127
%129 = load double, double* %128
%130 = fmul double %109, %129
%131 = tail call double @llvm.fmuladd.f64(double %126, double %110, double %130)
%132 = fneg double %126
%133 = fmul double %109, %132
%134 = tail call double @llvm.fmuladd.f64(double %129, double %110, double %133)
%135 = getelementptr inbounds double, double* %6, i64 %122
%136 = load double, double* %135
%137 = getelementptr inbounds double, double* %6, i64 %127
%138 = load double, double* %137
%139 = fmul double %111, %138
%140 = tail call double @llvm.fmuladd.f64(double %136, double %112, double %139)
%141 = fneg double %136
%142 = fmul double %111, %141
%143 = tail call double @llvm.fmuladd.f64(double %138, double %112, double %142)
%144 = fadd double %131, %140
%145 = fsub double %131, %140
%146 = fadd double %134, %143
%147 = fsub double %134, %143
%148 = getelementptr inbounds double, double* %4, i64 %127
%149 = load double, double* %148
%150 = fsub double %146, %149
store double %150, double* %125
%151 = load double, double* %148
%152 = fadd double %146, %151
store double %152, double* %137
%153 = getelementptr inbounds double, double* %4, i64 %122
%154 = load double, double* %153
%155 = fneg double %154
%156 = fsub double %155, %145
store double %156, double* %128
%157 = load double, double* %153
%158 = fsub double %157, %145
store double %158, double* %135
%159 = getelementptr inbounds double, double* %3, i64 %122
%160 = load double, double* %159
%161 = fsub double %160, %144
store double %161, double* %148
%162 = load double, double* %159
%163 = fadd double %144, %162
store double %163, double* %159
%164 = getelementptr inbounds double, double* %3, i64 %127
%165 = load double, double* %164
%166 = fadd double %147, %165
store double %166, double* %153
%167 = load double, double* %164
%168 = fsub double %167, %147
store double %168, double* %164
%169 = add i64 %122, %120
%170 = icmp sgt i64 %169, %9
br i1 %170, label %171, label %121
171: ; preds = %121, %113
%172 = shl nsw i32 %114, 1
%173 = sub nsw i32 %172, %1
%174 = shl nsw i32 %114, 2
%175 = icmp slt i32 %173, %0
br i1 %175, label %113, label %176
176: ; preds = %171
%177 = extractelement <4 x double> %106, i64 3
%178 = fneg double %177
%179 = extractelement <4 x double> %106, i64 2
%180 = fneg double %179
%181 = insertelement <4 x double> poison, double %180, i64 0
%182 = insertelement <4 x double> %181, double %178, i64 1
%183 = shufflevector <4 x double> %182, <4 x double> %106, <4 x i32> <i32 0, i32 1, i32 6, i32 7>
%184 = fmul <4 x double> %103, %183
%185 = shufflevector <4 x double> %106, <4 x double> poison, <4 x i32> <i32 0, i32 1, i32 0, i32 1>
%186 = call <4 x double> @llvm.fmuladd.v4f64(<4 x double> %185, <4 x double> %99, <4 x double> %184)
%187 = add nuw nsw i32 %105, 1
%188 = icmp eq i32 %105, %95
br i1 %188, label %189, label %104
189: ; preds = %176, %79, %38
ret void
}