#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 sin(double);
void fourn_double(double data[], int nn[], const int ndim, const int isign) {
  int i1, i2, i3;
  int i2rev, i3rev, ip1, ip2, ip3, ifp1, ifp2;
  int ibit, idim, k1, k2, n, nprev, nrem, ntot;
  double tempi, tempr;
  double theta, wi, wpi, wpr, wr, wtemp;
  ntot = 1;
  for (idim = 1; idim <= ndim; idim++) {
    ntot *= nn[idim];
  }
  nprev = 1;
  for (idim = ndim; idim >= 1; idim--) {
    n = nn[idim];
    nrem = ntot / (n * nprev);
    ip1 = nprev << 1;
    ip2 = ip1 * n;
    ip3 = ip2 * nrem;
    i2rev = 1;
    for (i2 = 1; i2 <= ip2; i2 += ip1) {
      if (i2 < i2rev) {
        for (i1 = i2; i1 <= i2 + ip1 - 2; i1 += 2) {
          for (i3 = i1; i3 <= ip3; i3 += ip2) {
            i3rev = i2rev + i3 - i2;
            tempr = (data[i3]);
            (data[i3]) = (data[i3rev]);
            (data[i3rev]) = tempr;
            tempr = (data[i3 + 1]);
            (data[i3 + 1]) = (data[i3rev + 1]);
            (data[i3rev + 1]) = tempr;
          }
        }
      }
      ibit = ip2 >> 1;
      while (ibit >= ip1 && i2rev > ibit) {
        i2rev -= ibit;
        ibit >>= 1;
      }
      i2rev += ibit;
    }
    ifp1 = ip1;
    while (ifp1 < ip2) {
      ifp2 = ifp1 << 1;
      theta = isign * 6.28318530717959 / (ifp2 / ip1);
      wtemp = sin(0.5 * theta);
      wpr = -2.0 * wtemp * wtemp;
      wpi = sin(theta);
      wr = 1.0;
      wi = 0.0;
      for (i3 = 1; i3 <= ifp1; i3 += ip1) {
        for (i1 = i3; i1 <= i3 + ip1 - 2; i1 += 2) {
          for (i2 = i1; i2 <= ip3; i2 += ifp2) {
            k1 = i2;
            k2 = k1 + ifp1;
            tempr = wr * data[k2] - wi * data[k2 + 1];
            tempi = wr * data[k2 + 1] + wi * data[k2];
            data[k2] = data[k1] - tempr;
            data[k2 + 1] = data[k1 + 1] - tempi;
            data[k1] += tempr;
            data[k1 + 1] += tempi;
          }
        }
        wr = (wtemp = wr) * wpr - wi * wpi + wr;
        wi = wi * wpr + wtemp * wpi + wi;
      }
      ifp1 = ifp2;
    }
    nprev *= n;
  }
}


x86 assembly (clang, -O0):
<fourn_double>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
movl   $0x1,-0x60(%rbp)
movl   $0x1,-0x48(%rbp)
mov    -0x48(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     1163 <fourn_double+0x53>
mov    -0x10(%rbp),%rax
movslq -0x48(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
imul   -0x60(%rbp),%eax
mov    %eax,-0x60(%rbp)
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    1137 <fourn_double+0x27>
movl   $0x1,-0x58(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x48(%rbp)
cmpl   $0x1,-0x48(%rbp)
jl     1603 <fourn_double+0x4f3>
mov    -0x10(%rbp),%rax
movslq -0x48(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x54(%rbp)
mov    -0x60(%rbp),%eax
mov    -0x54(%rbp),%ecx
imul   -0x58(%rbp),%ecx
cltd
idiv   %ecx
mov    %eax,-0x5c(%rbp)
mov    -0x58(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x30(%rbp)
mov    -0x30(%rbp),%eax
imul   -0x54(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%eax
imul   -0x5c(%rbp),%eax
mov    %eax,-0x38(%rbp)
movl   $0x1,-0x28(%rbp)
movl   $0x1,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x34(%rbp),%eax
jg     1338 <fourn_double+0x228>
mov    -0x20(%rbp),%eax
cmp    -0x28(%rbp),%eax
jge    12c9 <fourn_double+0x1b9>
mov    -0x20(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    -0x20(%rbp),%ecx
add    -0x30(%rbp),%ecx
sub    $0x2,%ecx
cmp    %ecx,%eax
jg     12c4 <fourn_double+0x1b4>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x38(%rbp),%eax
jg     12b1 <fourn_double+0x1a1>
mov    -0x28(%rbp),%eax
add    -0x24(%rbp),%eax
sub    -0x20(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x70(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x8(%rbp),%rax
mov    -0x24(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x2c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x24(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x70(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x2c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x34(%rbp),%eax
add    -0x24(%rbp),%eax
mov    %eax,-0x24(%rbp)
jmp    11fb <fourn_double+0xeb>
jmp    12b6 <fourn_double+0x1a6>
mov    -0x1c(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x1c(%rbp)
jmp    11e1 <fourn_double+0xd1>
jmp    12c9 <fourn_double+0x1b9>
mov    -0x34(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x44(%rbp)
mov    -0x44(%rbp),%ecx
xor    %eax,%eax
cmp    -0x30(%rbp),%ecx
mov    %al,-0xa1(%rbp)
jl     12f5 <fourn_double+0x1e5>
mov    -0x28(%rbp),%eax
cmp    -0x44(%rbp),%eax
setg   %al
mov    %al,-0xa1(%rbp)
mov    -0xa1(%rbp),%al
test   $0x1,%al
jne    1308 <fourn_double+0x1f8>
jmp    1321 <fourn_double+0x211>
mov    -0x44(%rbp),%ecx
mov    -0x28(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x28(%rbp)
mov    -0x44(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    12d2 <fourn_double+0x1c2>
mov    -0x44(%rbp),%eax
add    -0x28(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x30(%rbp),%eax
add    -0x20(%rbp),%eax
mov    %eax,-0x20(%rbp)
jmp    11c3 <fourn_double+0xb3>
mov    -0x30(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x34(%rbp),%eax
jge    15eb <fourn_double+0x4db>
mov    -0x3c(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x40(%rbp)
cvtsi2sdl -0x18(%rbp),%xmm0
movsd  0xcb8(%rip),%xmm1
mulsd  %xmm1,%xmm0
mov    -0x40(%rbp),%eax
cltd
idivl  -0x30(%rbp)
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  0xc90(%rip),%xmm0
mulsd  -0x78(%rbp),%xmm0
call   1030 <sin@plt>
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  0xc6e(%rip),%xmm0
mulsd  -0xa0(%rbp),%xmm0
ff
mulsd  -0xa0(%rbp),%xmm0
ff
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x78(%rbp),%xmm0
call   1030 <sin@plt>
movsd  %xmm0,-0x88(%rbp)
ff
movsd  0xc34(%rip),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x80(%rbp)
movl   $0x1,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jg     15e0 <fourn_double+0x4d0>
mov    -0x24(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    -0x24(%rbp),%ecx
add    -0x30(%rbp),%ecx
sub    $0x2,%ecx
cmp    %ecx,%eax
jg     154f <fourn_double+0x43f>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x38(%rbp),%eax
jg     153c <fourn_double+0x42c>
mov    -0x20(%rbp),%eax
mov    %eax,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
add    -0x3c(%rbp),%eax
mov    %eax,-0x50(%rbp)
movsd  -0x98(%rbp),%xmm0
ff
mov    -0x8(%rbp),%rax
movslq -0x50(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x80(%rbp),%xmm1
mov    -0x8(%rbp),%rax
mov    -0x50(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x98(%rbp),%xmm0
ff
mov    -0x8(%rbp),%rax
mov    -0x50(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x80(%rbp),%xmm1
mov    -0x8(%rbp),%rax
movslq -0x50(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x70(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x50(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x8(%rbp),%rax
mov    -0x4c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x68(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x50(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x70(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x4c(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x68(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x4c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x40(%rbp),%eax
add    -0x20(%rbp),%eax
mov    %eax,-0x20(%rbp)
jmp    140f <fourn_double+0x2ff>
jmp    1541 <fourn_double+0x431>
mov    -0x1c(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x1c(%rbp)
jmp    13f5 <fourn_double+0x2e5>
movsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x90(%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
addsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
movsd  -0x90(%rbp),%xmm2
ff
movsd  -0xa0(%rbp),%xmm1
ff
mulsd  -0x88(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
addsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    -0x30(%rbp),%eax
add    -0x24(%rbp),%eax
mov    %eax,-0x24(%rbp)
jmp    13e3 <fourn_double+0x2d3>
mov    -0x40(%rbp),%eax
mov    %eax,-0x3c(%rbp)
jmp    133e <fourn_double+0x22e>
mov    -0x54(%rbp),%eax
imul   -0x58(%rbp),%eax
mov    %eax,-0x58(%rbp)
mov    -0x48(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x48(%rbp)
jmp    1170 <fourn_double+0x60>
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fourn_double>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
test   %edx,%edx
jle    1630 <fourn_double+0x520>
mov    %rdi,%rbx
mov    %edx,%r9d
cmp    $0x8,%edx
jae    1141 <fourn_double+0x31>
mov    $0x1,%eax
mov    $0x1,%r10d
jmp    130e <fourn_double+0x1fe>
mov    %r9d,%r10d
and    $0xfffffff8,%r10d
lea    -0x8(%r10),%rdi
mov    %rdi,%rbp
shr    $0x3,%rbp
add    $0x1,%rbp
mov    %ebp,%r8d
and    $0x3,%r8d
cmp    $0x18,%rdi
jae    1177 <fourn_double+0x67>
movdqa 0xe94(%rip),%xmm0
xor    %edi,%edi
movdqa %xmm0,%xmm1
jmp    125c <fourn_double+0x14c>
and    $0xfffffffffffffffc,%rbp
movdqa 0xe7d(%rip),%xmm0
xor    %edi,%edi
movdqa %xmm0,%xmm1
nopl   0x0(%rax)
movdqu 0x4(%rsi,%rdi,4),%xmm3
movdqu 0x14(%rsi,%rdi,4),%xmm2
movdqu 0x24(%rsi,%rdi,4),%xmm4
movdqu 0x34(%rsi,%rdi,4),%xmm5
pshufd $0xf5,%xmm3,%xmm6
pshufd $0xf5,%xmm0,%xmm7
pmuludq %xmm6,%xmm7
pmuludq %xmm0,%xmm3
pshufd $0xf5,%xmm2,%xmm0
pshufd $0xf5,%xmm1,%xmm6
pmuludq %xmm0,%xmm6
pmuludq %xmm1,%xmm2
pmuludq %xmm4,%xmm3
pshufd $0xf5,%xmm4,%xmm0
pmuludq %xmm7,%xmm0
pmuludq %xmm5,%xmm2
pshufd $0xf5,%xmm5,%xmm1
pmuludq %xmm6,%xmm1
movdqu 0x44(%rsi,%rdi,4),%xmm4
movdqu 0x54(%rsi,%rdi,4),%xmm5
pshufd $0xf5,%xmm4,%xmm6
pmuludq %xmm0,%xmm6
pmuludq %xmm4,%xmm3
pshufd $0xf5,%xmm5,%xmm4
pmuludq %xmm1,%xmm4
pmuludq %xmm5,%xmm2
movdqu 0x64(%rsi,%rdi,4),%xmm1
movdqu 0x74(%rsi,%rdi,4),%xmm5
pmuludq %xmm1,%xmm3
pshufd $0xe8,%xmm3,%xmm0
pshufd $0xf5,%xmm1,%xmm1
pmuludq %xmm6,%xmm1
pshufd $0xe8,%xmm1,%xmm1
punpckldq %xmm1,%xmm0
pmuludq %xmm5,%xmm2
pshufd $0xe8,%xmm2,%xmm1
pshufd $0xf5,%xmm5,%xmm2
pmuludq %xmm4,%xmm2
pshufd $0xe8,%xmm2,%xmm2
punpckldq %xmm2,%xmm1
add    $0x20,%rdi
add    $0xfffffffffffffffc,%rbp
jne    1190 <fourn_double+0x80>
movdqa %xmm0,%xmm2
movdqa %xmm1,%xmm3
test   %r8,%r8
je     12d9 <fourn_double+0x1c9>
nopl   0x0(%rax)
lea    0x0(,%rdi,4),%rbp
or     $0x4,%rbp
movdqu (%rsi,%rbp,1),%xmm2
movdqu 0x10(%rsi,%rbp,1),%xmm3
pshufd $0xf5,%xmm2,%xmm4
pmuludq %xmm0,%xmm2
pshufd $0xe8,%xmm2,%xmm2
pshufd $0xf5,%xmm0,%xmm0
pmuludq %xmm4,%xmm0
pshufd $0xe8,%xmm0,%xmm0
punpckldq %xmm0,%xmm2
pshufd $0xf5,%xmm3,%xmm0
pmuludq %xmm1,%xmm3
pshufd $0xe8,%xmm3,%xmm3
pshufd $0xf5,%xmm1,%xmm1
pmuludq %xmm0,%xmm1
pshufd $0xe8,%xmm1,%xmm0
punpckldq %xmm0,%xmm3
add    $0x8,%rdi
movdqa %xmm2,%xmm0
movdqa %xmm3,%xmm1
add    $0xffffffffffffffff,%r8
jne    1270 <fourn_double+0x160>
pshufd $0xf5,%xmm2,%xmm0
pshufd $0xf5,%xmm3,%xmm1
pmuludq %xmm0,%xmm1
pmuludq %xmm2,%xmm3
pshufd $0xee,%xmm3,%xmm0
pmuludq %xmm3,%xmm0
pshufd $0xaa,%xmm1,%xmm2
pmuludq %xmm1,%xmm2
pmuludq %xmm0,%xmm2
movd   %xmm2,%eax
cmp    %r10,%r9
je     132e <fourn_double+0x21e>
or     $0x1,%r10
lea    0x1(%r9),%rdi
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
imul   (%rsi,%r10,4),%eax
add    $0x1,%r10
cmp    %r10,%rdi
jne    1320 <fourn_double+0x210>
test   %edx,%edx
jle    1630 <fourn_double+0x520>
xorps  %xmm0,%xmm0
cvtsi2sd %ecx,%xmm0
mulsd  0xcdb(%rip),%xmm0
movsd  %xmm0,0x28(%rsp)
mov    $0x1,%ecx
mov    %rsi,0x18(%rsp)
mov    %eax,0x8(%rsp)
jmp    1380 <fourn_double+0x270>
nopl   0x0(%rax,%rax,1)
mov    0x20(%rsp),%rcx
lea    -0x1(%rcx),%r9
cmp    $0x1,%rcx
mov    0x18(%rsp),%rsi
mov    0x8(%rsp),%eax
mov    0xc(%rsp),%ecx
jle    1630 <fourn_double+0x520>
mov    %ecx,%r11d
mov    %r9,0x20(%rsp)
mov    (%rsi,%r9,4),%r13d
mov    %r13d,%ecx
imul   %r11d,%ecx
cltd
mov    %ecx,0xc(%rsp)
idiv   %ecx
mov    %eax,%r14d
add    %r11d,%r11d
imul   %r11d,%r13d
imul   %r13d,%r14d
movslq %r11d,%rax
mov    %rax,0x10(%rsp)
movslq %r14d,%r12
test   %r13d,%r13d
jle    1490 <fourn_double+0x380>
mov    %r13d,%eax
mov    $0x1,%edx
mov    $0x1,%r8d
jmp    13e2 <fourn_double+0x2d2>
nopl   0x0(%rax)
add    %esi,%ecx
add    0x10(%rsp),%r8
mov    %ecx,%edx
cmp    %r8d,%r13d
jl     1490 <fourn_double+0x380>
cmp    %r8d,%edx
jle    13f4 <fourn_double+0x2e4>
lea    (%r11,%r8,1),%r9d
add    $0xfffffffe,%r9d
cmp    %r8d,%r9d
jge    1420 <fourn_double+0x310>
mov    %r13d,%esi
nopw   0x0(%rax,%rax,1)
mov    %edx,%ecx
sar    %esi
cmp    %r11d,%esi
jl     13d0 <fourn_double+0x2c0>
mov    %ecx,%edx
sub    %esi,%edx
jg     1400 <fourn_double+0x2f0>
jmp    13d0 <fourn_double+0x2c0>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %edx,%r10d
mov    %r8,%rdi
jmp    143d <fourn_double+0x32d>
nopl   0x0(%rax,%rax,1)
add    $0x2,%rdi
add    $0x2,%r10d
cmp    %edi,%r9d
jl     13f4 <fourn_double+0x2e4>
cmp    %edi,%r14d
jl     1430 <fourn_double+0x320>
mov    %r10d,%esi
mov    %rdi,%rcx
nopl   0x0(%rax,%rax,1)
movsd  (%rbx,%rcx,8),%xmm0
movslq %esi,%rsi
movsd  (%rbx,%rsi,8),%xmm1
movsd  %xmm1,(%rbx,%rcx,8)
movsd  %xmm0,(%rbx,%rsi,8)
movsd  0x8(%rbx,%rcx,8),%xmm0
lea    0x1(%rsi),%ebp
movslq %ebp,%rbp
movq   (%rbx,%rbp,8),%xmm1
movq   %xmm1,0x8(%rbx,%rcx,8)
movsd  %xmm0,(%rbx,%rbp,8)
add    %rax,%rcx
add    %r13d,%esi
cmp    %r12,%rcx
jle    1450 <fourn_double+0x340>
jmp    1430 <fourn_double+0x320>
cmp    %r13d,%r11d
jge    1360 <fourn_double+0x250>
mov    %r11d,%r9d
mov    %r11,0x30(%rsp)
jmp    14be <fourn_double+0x3ae>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
cmp    %r13d,%r9d
mov    0x30(%rsp),%r11
jge    1360 <fourn_double+0x250>
mov    %r9d,%r15d
lea    (%r15,%r15,1),%ebp
mov    %ebp,%eax
cltd
idiv   %r11d
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  0x28(%rsp),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,0x40(%rsp)
movapd %xmm1,%xmm0
mulsd  0xb3a(%rip),%xmm0
call   1030 <sin@plt>
movsd  %xmm0,0x38(%rsp)
movsd  0x40(%rsp),%xmm0
call   1030 <sin@plt>
mov    %ebp,%r9d
mov    0x10(%rsp),%rbp
movapd 0xafb(%rip),%xmm10
test   %r15d,%r15d
jle    14b0 <fourn_double+0x3a0>
movsd  0x38(%rsp),%xmm1
movapd %xmm1,%xmm8
mulsd  0xb02(%rip),%xmm8
mulsd  %xmm1,%xmm8
movslq %r9d,%rax
mov    %r15d,%ecx
unpcklpd %xmm8,%xmm8
unpcklpd %xmm0,%xmm0
lea    (%rbx,%rcx,8),%rcx
mov    $0x1,%edx
movsd  0xae4(%rip),%xmm9
jmp    1588 <fourn_double+0x478>
cs nopw 0x0(%rax,%rax,1)
unpcklpd %xmm9,%xmm3
mulpd  %xmm0,%xmm3
movapd %xmm9,%xmm1
mulpd  %xmm8,%xmm1
addpd  %xmm3,%xmm1
addpd  %xmm1,%xmm9
mov    %r8,%rdx
cmp    %r8d,%r15d
jl     14b0 <fourn_double+0x3a0>
lea    (%rdx,%rbp,1),%r8
lea    -0x2(%r8),%edi
movapd %xmm9,%xmm4
unpckhpd %xmm9,%xmm4
movapd %xmm4,%xmm3
xorpd  %xmm10,%xmm3
cmp    %edx,%edi
jl     1560 <fourn_double+0x450>
unpcklpd %xmm3,%xmm4
movapd %xmm9,%xmm5
unpcklpd %xmm9,%xmm5
jmp    15c8 <fourn_double+0x4b8>
nopw   0x0(%rax,%rax,1)
add    $0x2,%rdx
cmp    %edx,%edi
jl     1560 <fourn_double+0x450>
cmp    %edx,%r14d
jl     15c0 <fourn_double+0x4b0>
mov    %rdx,%rsi
movupd (%rcx,%rsi,8),%xmm6
movapd %xmm6,%xmm7
mulpd  %xmm4,%xmm7
shufpd $0x1,%xmm7,%xmm7
mulpd  %xmm5,%xmm6
addpd  %xmm7,%xmm6
movsd  (%rbx,%rsi,8),%xmm7
subsd  %xmm6,%xmm7
movsd  %xmm7,(%rcx,%rsi,8)
movsd  0x8(%rbx,%rsi,8),%xmm2
movapd %xmm6,%xmm1
unpckhpd %xmm6,%xmm1
movapd %xmm2,%xmm7
subsd  %xmm1,%xmm7
movsd  %xmm7,0x8(%rcx,%rsi,8)
movsd  (%rbx,%rsi,8),%xmm1
unpcklpd %xmm2,%xmm1
addpd  %xmm6,%xmm1
movupd %xmm1,(%rbx,%rsi,8)
add    %rax,%rsi
cmp    %r12,%rsi
jle    15d0 <fourn_double+0x4c0>
jmp    15c0 <fourn_double+0x4b0>
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @fourn_double(double* nocapture %0, i32* nocapture %1, i32 %2, i32 %3) {
%5 = icmp slt i32 %2, 1
br i1 %5, label %264, label %6
6: ; preds = %4
%7 = add nuw i32 %2, 1
%8 = zext i32 %7 to i64
%9 = add nsw i64 %8, -1
%10 = icmp ult i64 %9, 8
br i1 %10, label %95, label %11
11: ; preds = %6
%12 = and i64 %9, -8
%13 = or i64 %12, 1
%14 = add nsw i64 %12, -8
%15 = lshr exact i64 %14, 3
%16 = add nuw nsw i64 %15, 1
%17 = and i64 %16, 3
%18 = icmp ult i64 %14, 24
br i1 %18, label %65, label %19
19: ; preds = %11
%20 = and i64 %16, 4611686018427387900
br label %21
21: ; preds = %21, %19
%22 = phi i64 [ 0, %19 ], [ %62, %21 ]
%23 = phi <4 x i32> [ <i32 1, i32 1, i32 1, i32 1>, %19 ], [ %60, %21 ]
%24 = phi <4 x i32> [ <i32 1, i32 1, i32 1, i32 1>, %19 ], [ %61, %21 ]
%25 = phi i64 [ 0, %19 ], [ %63, %21 ]
%26 = or i64 %22, 1
%27 = getelementptr inbounds i32, i32* %1, i64 %26
%28 = bitcast i32* %27 to <4 x i32>*
%29 = load <4 x i32>, <4 x i32>* %28
%30 = getelementptr inbounds i32, i32* %27, i64 4
%31 = bitcast i32* %30 to <4 x i32>*
%32 = load <4 x i32>, <4 x i32>* %31
%33 = mul <4 x i32> %29, %23
%34 = mul <4 x i32> %32, %24
%35 = or i64 %22, 9
%36 = getelementptr inbounds i32, i32* %1, i64 %35
%37 = bitcast i32* %36 to <4 x i32>*
%38 = load <4 x i32>, <4 x i32>* %37
%39 = getelementptr inbounds i32, i32* %36, i64 4
%40 = bitcast i32* %39 to <4 x i32>*
%41 = load <4 x i32>, <4 x i32>* %40
%42 = mul <4 x i32> %38, %33
%43 = mul <4 x i32> %41, %34
%44 = or i64 %22, 17
%45 = getelementptr inbounds i32, i32* %1, i64 %44
%46 = bitcast i32* %45 to <4 x i32>*
%47 = load <4 x i32>, <4 x i32>* %46
%48 = getelementptr inbounds i32, i32* %45, i64 4
%49 = bitcast i32* %48 to <4 x i32>*
%50 = load <4 x i32>, <4 x i32>* %49
%51 = mul <4 x i32> %47, %42
%52 = mul <4 x i32> %50, %43
%53 = or i64 %22, 25
%54 = getelementptr inbounds i32, i32* %1, i64 %53
%55 = bitcast i32* %54 to <4 x i32>*
%56 = load <4 x i32>, <4 x i32>* %55
%57 = getelementptr inbounds i32, i32* %54, i64 4
%58 = bitcast i32* %57 to <4 x i32>*
%59 = load <4 x i32>, <4 x i32>* %58
%60 = mul <4 x i32> %56, %51
%61 = mul <4 x i32> %59, %52
%62 = add nuw i64 %22, 32
%63 = add i64 %25, 4
%64 = icmp eq i64 %63, %20
br i1 %64, label %65, label %21
65: ; preds = %21, %11
%66 = phi <4 x i32> [ undef, %11 ], [ %60, %21 ]
%67 = phi <4 x i32> [ undef, %11 ], [ %61, %21 ]
%68 = phi i64 [ 0, %11 ], [ %62, %21 ]
%69 = phi <4 x i32> [ <i32 1, i32 1, i32 1, i32 1>, %11 ], [ %60, %21 ]
%70 = phi <4 x i32> [ <i32 1, i32 1, i32 1, i32 1>, %11 ], [ %61, %21 ]
%71 = icmp eq i64 %17, 0
br i1 %71, label %89, label %72
72: ; preds = %65, %72
%73 = phi i64 [ %86, %72 ], [ %68, %65 ]
%74 = phi <4 x i32> [ %84, %72 ], [ %69, %65 ]
%75 = phi <4 x i32> [ %85, %72 ], [ %70, %65 ]
%76 = phi i64 [ %87, %72 ], [ 0, %65 ]
%77 = or i64 %73, 1
%78 = getelementptr inbounds i32, i32* %1, i64 %77
%79 = bitcast i32* %78 to <4 x i32>*
%80 = load <4 x i32>, <4 x i32>* %79
%81 = getelementptr inbounds i32, i32* %78, i64 4
%82 = bitcast i32* %81 to <4 x i32>*
%83 = load <4 x i32>, <4 x i32>* %82
%84 = mul <4 x i32> %80, %74
%85 = mul <4 x i32> %83, %75
%86 = add nuw i64 %73, 8
%87 = add i64 %76, 1
%88 = icmp eq i64 %87, %17
br i1 %88, label %89, label %72
89: ; preds = %72, %65
%90 = phi <4 x i32> [ %66, %65 ], [ %84, %72 ]
%91 = phi <4 x i32> [ %67, %65 ], [ %85, %72 ]
%92 = mul <4 x i32> %91, %90
%93 = call i32 @llvm.vector.reduce.mul.v4i32(<4 x i32> %92)
%94 = icmp eq i64 %9, %12
br i1 %94, label %98, label %95
95: ; preds = %6, %89
%96 = phi i64 [ 1, %6 ], [ %13, %89 ]
%97 = phi i32 [ 1, %6 ], [ %93, %89 ]
br label %105
98: ; preds = %105, %89
%99 = phi i32 [ %93, %89 ], [ %110, %105 ]
%100 = icmp sgt i32 %2, 0
br i1 %100, label %101, label %264
101: ; preds = %98
%102 = sitofp i32 %3 to double
%103 = fmul double %102, 0x401921FB54442D1C
%104 = zext i32 %2 to i64
br label %113
105: ; preds = %95, %105
%106 = phi i64 [ %111, %105 ], [ %96, %95 ]
%107 = phi i32 [ %110, %105 ], [ %97, %95 ]
%108 = getelementptr inbounds i32, i32* %1, i64 %106
%109 = load i32, i32* %108
%110 = mul nsw i32 %109, %107
%111 = add nuw nsw i64 %106, 1
%112 = icmp eq i64 %111, %8
br i1 %112, label %98, label %105
113: ; preds = %101, %261
%114 = phi i64 [ %104, %101 ], [ %262, %261 ]
%115 = phi i32 [ 1, %101 ], [ %118, %261 ]
%116 = getelementptr inbounds i32, i32* %1, i64 %114
%117 = load i32, i32* %116
%118 = mul nsw i32 %117, %115
%119 = sdiv i32 %99, %118
%120 = shl i32 %115, 1
%121 = mul i32 %117, %120
%122 = mul nsw i32 %121, %119
%123 = icmp slt i32 %121, 1
br i1 %123, label %128, label %124
124: ; preds = %113
%125 = sext i32 %120 to i64
%126 = zext i32 %121 to i64
%127 = sext i32 %122 to i64
br label %133
128: ; preds = %179, %113
%129 = icmp slt i32 %120, %121
br i1 %129, label %130, label %261
130: ; preds = %128
%131 = sext i32 %120 to i64
%132 = sext i32 %122 to i64
br label %186
133: ; preds = %124, %179
%134 = phi i64 [ 1, %124 ], [ %181, %179 ]
%135 = phi i32 [ 1, %124 ], [ %180, %179 ]
%136 = trunc i64 %134 to i32
%137 = icmp sgt i32 %135, %136
br i1 %137, label %138, label %170
138: ; preds = %133
%139 = add nsw i32 %120, %136
%140 = add nsw i32 %139, -2
%141 = icmp slt i32 %140, %136
br i1 %141, label %170, label %142
142: ; preds = %138
%143 = sub i32 %135, %136
br label %144
144: ; preds = %142, %166
%145 = phi i64 [ %134, %142 ], [ %167, %166 ]
%146 = trunc i64 %145 to i32
%147 = icmp slt i32 %122, %146
br i1 %147, label %166, label %148
148: ; preds = %144, %148
%149 = phi i64 [ %164, %148 ], [ %145, %144 ]
%150 = trunc i64 %149 to i32
%151 = add i32 %143, %150
%152 = getelementptr inbounds double, double* %0, i64 %149
%153 = load double, double* %152
%154 = sext i32 %151 to i64
%155 = getelementptr inbounds double, double* %0, i64 %154
%156 = load double, double* %155
store double %156, double* %152
store double %153, double* %155
%157 = add nsw i64 %149, 1
%158 = getelementptr inbounds double, double* %0, i64 %157
%159 = load double, double* %158
%160 = add nsw i32 %151, 1
%161 = sext i32 %160 to i64
%162 = getelementptr inbounds double, double* %0, i64 %161
%163 = load double, double* %162
store double %163, double* %158
store double %159, double* %162
%164 = add i64 %149, %126
%165 = icmp sgt i64 %164, %127
br i1 %165, label %166, label %148
166: ; preds = %148, %144
%167 = add nsw i64 %145, 2
%168 = trunc i64 %167 to i32
%169 = icmp slt i32 %140, %168
br i1 %169, label %170, label %144
170: ; preds = %166, %138, %133
br label %171
171: ; preds = %170, %171
%172 = phi i32 [ %174, %171 ], [ %121, %170 ]
%173 = phi i32 [ %178, %171 ], [ %135, %170 ]
%174 = ashr i32 %172, 1
%175 = icmp sge i32 %174, %120
%176 = icmp sgt i32 %173, %174
%177 = select i1 %175, i1 %176, i1 false
%178 = sub nsw i32 %173, %174
br i1 %177, label %171, label %179
179: ; preds = %171
%180 = add nsw i32 %173, %174
%181 = add nsw i64 %134, %125
%182 = trunc i64 %181 to i32
%183 = icmp slt i32 %121, %182
br i1 %183, label %128, label %133
184: ; preds = %254, %186
%185 = icmp slt i32 %188, %121
br i1 %185, label %186, label %261
186: ; preds = %130, %184
%187 = phi i32 [ %188, %184 ], [ %120, %130 ]
%188 = shl i32 %187, 1
%189 = sdiv i32 %188, %120
%190 = sitofp i32 %189 to double
%191 = fdiv double %103, %190
%192 = fmul double %191, 5.000000e-01
%193 = tail call double @sin(double %192)
%194 = tail call double @sin(double %191)
%195 = icmp slt i32 %187, 1
br i1 %195, label %184, label %196
196: ; preds = %186
%197 = fmul double %193, -2.000000e+00
%198 = fmul double %193, %197
%199 = sext i32 %188 to i64
%200 = zext i32 %187 to i64
%201 = insertelement <2 x double> poison, double %198, i64 0
%202 = shufflevector <2 x double> %201, <2 x double> poison, <2 x i32> zeroinitializer
%203 = insertelement <2 x double> poison, double %194, i64 0
%204 = shufflevector <2 x double> %203, <2 x double> poison, <2 x i32> zeroinitializer
br label %205
205: ; preds = %196, %254
%206 = phi i64 [ 1, %196 ], [ %209, %254 ]
%207 = phi <2 x double> [ <double 1.000000e+00, double 0.000000e+00>, %196 ], [ %259, %254 ]
%208 = trunc i64 %206 to i32
%209 = add nsw i64 %206, %131
%210 = trunc i64 %209 to i32
%211 = add nsw i32 %210, -2
%212 = icmp slt i32 %211, %208
%213 = extractelement <2 x double> %207, i64 1
%214 = fneg double %213
br i1 %212, label %254, label %215
215: ; preds = %205
%216 = insertelement <2 x double> poison, double %213, i64 0
%217 = insertelement <2 x double> %216, double %214, i64 1
%218 = shufflevector <2 x double> %207, <2 x double> undef, <2 x i32> zeroinitializer
br label %219
219: ; preds = %215, %250
%220 = phi i64 [ %251, %250 ], [ %206, %215 ]
%221 = trunc i64 %220 to i32
%222 = icmp slt i32 %122, %221
br i1 %222, label %250, label %223
223: ; preds = %219, %223
%224 = phi i64 [ %248, %223 ], [ %220, %219 ]
%225 = add nsw i64 %224, %200
%226 = getelementptr inbounds double, double* %0, i64 %225
%227 = add nsw i64 %225, 1
%228 = getelementptr inbounds double, double* %0, i64 %227
%229 = bitcast double* %226 to <2 x double>*
%230 = load <2 x double>, <2 x double>* %229
%231 = fmul <2 x double> %230, %217
%232 = shufflevector <2 x double> %231, <2 x double> poison, <2 x i32> <i32 1, i32 0>
%233 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %218, <2 x double> %230, <2 x double> %232)
%234 = getelementptr inbounds double, double* %0, i64 %224
%235 = load double, double* %234
%236 = extractelement <2 x double> %233, i64 0
%237 = fsub double %235, %236
store double %237, double* %226
%238 = add nsw i64 %224, 1
%239 = getelementptr inbounds double, double* %0, i64 %238
%240 = load double, double* %239
%241 = extractelement <2 x double> %233, i64 1
%242 = fsub double %240, %241
store double %242, double* %228
%243 = load double, double* %234
%244 = insertelement <2 x double> poison, double %243, i64 0
%245 = insertelement <2 x double> %244, double %240, i64 1
%246 = fadd <2 x double> %233, %245
%247 = bitcast double* %234 to <2 x double>*
store <2 x double> %246, <2 x double>* %247
%248 = add i64 %224, %199
%249 = icmp sgt i64 %248, %132
br i1 %249, label %250, label %223
250: ; preds = %223, %219
%251 = add nsw i64 %220, 2
%252 = trunc i64 %251 to i32
%253 = icmp slt i32 %211, %252
br i1 %253, label %254, label %219
254: ; preds = %250, %205
%255 = insertelement <2 x double> poison, double %214, i64 0
%256 = shufflevector <2 x double> %255, <2 x double> %207, <2 x i32> <i32 0, i32 2>
%257 = fmul <2 x double> %204, %256
%258 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %207, <2 x double> %202, <2 x double> %257)
%259 = fadd <2 x double> %207, %258
%260 = icmp slt i32 %187, %210
br i1 %260, label %184, label %205
261: ; preds = %184, %128
%262 = add nsw i64 %114, -1
%263 = icmp sgt i64 %114, 1
br i1 %263, label %113, label %264
264: ; preds = %261, %4, %98
ret void
}