#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 */
int cos(double);
int /*<<< orphan*/ free(double *);
double *malloc(int);
void build_rep_imp(int nfcns, const double *ad, double *x, const double *y,
                   int nodd, double *h) {
  double *a = malloc((nfcns + 1) * sizeof(double));
  double *alpha = malloc((nfcns + 2) * sizeof(double));
  int nz = nfcns + 1;
  int nzz = nz + 1;
  int nm1 = nfcns - 1;
  double fsh = 1.0e-6;
  x[nzz - 1] = -2;
  double cn = 2 * nfcns - 1;
  double delf = 1.0 / cn;
  int l = 0;
  for (int j = 0; j < nfcns; j++) {
    double ft = j * delf;
    double xt = cos(6.2831853071795865 * ft);
    double xe = x[l];
    while ((xt <= xe) && ((xe - xt) >= fsh))
      xe = x[++l];
    if ((xt - xe) < fsh)
      a[j] = y[l];
    else {
      double sum = 0;
      double dot = 0;
      for (int i = 0; i < nz; i++) {
        double v = ad[i] / (xt - x[i]);
        sum += v;
        dot += v * y[i];
      }
      a[j] = dot / sum;
    }
    if (l > 1)
      l--;
  }
  double dden = 6.2831853071795865 / cn;
  for (int j = 0; j < nfcns; j++) {
    double dnum = j * dden;
    if (nm1 < 1)
      alpha[j] = a[0];
    else {
      double t = a[0];
      for (int i = 1; i < nfcns; i++)
        t += 2 * a[i] * cos(dnum * i);
      alpha[j] = t;
    }
  }
  alpha[0] /= cn;
  for (int i = 1; i < nfcns; i++)
    alpha[i] *= 2.0 / cn;
  if (nfcns <= 3)
    alpha[nfcns + 1] = alpha[nfcns] = 0;
  if (nodd != 0) {
    for (int i = 0; i < nfcns - 1; i++)
      h[i] = 0.5 * alpha[nfcns - 1 - i];
    h[nfcns - 1] = alpha[0];
    for (int i = 0; i < nfcns - 1; i++)
      h[nfcns + i] = h[nfcns - 2 - i];
  } else {
    h[0] = 0.25 * alpha[nfcns - 1];
    for (int i = 1; i < nfcns - 1; i++)
      h[i] = 0.25 * (alpha[nfcns - 1 - i] + alpha[nfcns - i]);
    h[nfcns - 1] = 0.5 * alpha[0] + 0.25 * alpha[1];
    for (int i = 0; i < nfcns; i++)
      h[nfcns + i] = h[nfcns - 1 - i];
  }
  free(a);
  free(alpha);
}


x86 assembly (clang, -O0):
<build_rep_imp>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf0,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1040 <malloc@plt>
mov    %rax,-0x38(%rbp)
mov    -0x4(%rbp),%eax
add    $0x2,%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1040 <malloc@plt>
mov    %rax,-0x40(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x4c(%rbp)
movsd  0xe6d(%rip),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x48(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  0xe4b(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
sub    $0x1,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  0xe24(%rip),%xmm0
divsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movl   $0x0,-0x6c(%rbp)
movl   $0x0,-0x70(%rbp)
mov    -0x70(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    13e8 <build_rep_imp+0x2b8>
cvtsi2sdl -0x70(%rbp),%xmm0
mulsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  0xe01(%rip),%xmm0
mulsd  -0x78(%rbp),%xmm0
call   1050 <cos@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x80(%rbp),%xmm1
movsd  -0x88(%rbp),%xmm0
ff
xor    %eax,%eax
ucomisd %xmm1,%xmm0
mov    %al,-0xe1(%rbp)
jb     1279 <build_rep_imp+0x149>
movsd  -0x88(%rbp),%xmm0
ff
subsd  -0x80(%rbp),%xmm0
ucomisd -0x58(%rbp),%xmm0
setae  %al
mov    %al,-0xe1(%rbp)
mov    -0xe1(%rbp),%al
test   $0x1,%al
jne    128c <build_rep_imp+0x15c>
jmp    12ae <build_rep_imp+0x17e>
mov    -0x18(%rbp),%rax
mov    -0x6c(%rbp),%ecx
add    $0x1,%ecx
mov    %ecx,-0x6c(%rbp)
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
jmp    123f <build_rep_imp+0x10f>
movsd  -0x80(%rbp),%xmm1
subsd  -0x88(%rbp),%xmm1
ff
movsd  -0x58(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    12e9 <build_rep_imp+0x1b9>
mov    -0x20(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x38(%rbp),%rax
movslq -0x70(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    13c2 <build_rep_imp+0x292>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movl   $0x0,-0x9c(%rbp)
mov    -0x9c(%rbp),%eax
cmp    -0x44(%rbp),%eax
jge    13a5 <build_rep_imp+0x275>
mov    -0x10(%rbp),%rax
movslq -0x9c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  -0x80(%rbp),%xmm1
mov    -0x18(%rbp),%rax
movslq -0x9c(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0xa8(%rbp),%xmm0
ff
addsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0xa8(%rbp),%xmm0
ff
mov    -0x20(%rbp),%rax
movslq -0x9c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x98(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
mov    -0x9c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9c(%rbp)
jmp    1309 <build_rep_imp+0x1d9>
movsd  -0x98(%rbp),%xmm0
ff
divsd  -0x90(%rbp),%xmm0
ff
mov    -0x38(%rbp),%rax
movslq -0x70(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
cmpl   $0x1,-0x6c(%rbp)
jle    13d5 <build_rep_imp+0x2a5>
mov    -0x6c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x6c(%rbp)
jmp    13da <build_rep_imp+0x2aa>
mov    -0x70(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x70(%rbp)
jmp    11f4 <build_rep_imp+0xc4>
movsd  0xc28(%rip),%xmm0
divsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movl   $0x0,-0xb4(%rbp)
mov    -0xb4(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1520 <build_rep_imp+0x3f0>
cvtsi2sdl -0xb4(%rbp),%xmm0
ff
mulsd  -0xb0(%rbp),%xmm0
ff
movsd  %xmm0,-0xc0(%rbp)
ff
cmpl   $0x1,-0x4c(%rbp)
jge    1455 <build_rep_imp+0x325>
mov    -0x38(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x40(%rbp),%rax
movslq -0xb4(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    1507 <build_rep_imp+0x3d7>
mov    -0x38(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movl   $0x1,-0xcc(%rbp)
mov    -0xcc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    14ef <build_rep_imp+0x3bf>
mov    -0x38(%rbp),%rax
movslq -0xcc(%rbp),%rcx
movsd  0xb9f(%rip),%xmm0
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  -0xc0(%rbp),%xmm0
ff
cvtsi2sdl -0xcc(%rbp),%xmm1
ff
mulsd  %xmm1,%xmm0
call   1050 <cos@plt>
movsd  -0xf0(%rbp),%xmm0
ff
cvtsi2sd %eax,%xmm2
movsd  -0xc8(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
mov    -0xcc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xcc(%rbp)
jmp    146f <build_rep_imp+0x33f>
movsd  -0xc8(%rbp),%xmm0
ff
mov    -0x40(%rbp),%rax
movslq -0xb4(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    150c <build_rep_imp+0x3dc>
mov    -0xb4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb4(%rbp)
jmp    1407 <build_rep_imp+0x2d7>
movsd  -0x60(%rbp),%xmm1
mov    -0x40(%rbp),%rax
movsd  (%rax),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
movl   $0x1,-0xd0(%rbp)
mov    -0xd0(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1584 <build_rep_imp+0x454>
movsd  0xada(%rip),%xmm0
divsd  -0x60(%rbp),%xmm0
mov    -0x40(%rbp),%rax
movslq -0xd0(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0xd0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xd0(%rbp)
jmp    153f <build_rep_imp+0x40f>
cmpl   $0x3,-0x4(%rbp)
jg     15b3 <build_rep_imp+0x483>
mov    -0x40(%rbp),%rax
movslq -0x4(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x40(%rbp),%rax
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
cmpl   $0x0,-0x24(%rbp)
je     169d <build_rep_imp+0x56d>
movl   $0x0,-0xd4(%rbp)
mov    -0xd4(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    161f <build_rep_imp+0x4ef>
mov    -0x40(%rbp),%rax
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
sub    -0xd4(%rbp),%ecx
movslq %ecx,%rcx
movsd  0xa32(%rip),%xmm0
mulsd  (%rax,%rcx,8),%xmm0
mov    -0x30(%rbp),%rax
movslq -0xd4(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0xd4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xd4(%rbp)
jmp    15c7 <build_rep_imp+0x497>
mov    -0x40(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x30(%rbp),%rax
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movl   $0x0,-0xd8(%rbp)
mov    -0xd8(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1698 <build_rep_imp+0x568>
mov    -0x30(%rbp),%rax
mov    -0x4(%rbp),%ecx
sub    $0x2,%ecx
sub    -0xd8(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x30(%rbp),%rax
mov    -0x4(%rbp),%ecx
add    -0xd8(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0xd8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xd8(%rbp)
jmp    1643 <build_rep_imp+0x513>
jmp    17d4 <build_rep_imp+0x6a4>
mov    -0x40(%rbp),%rax
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  0x96e(%rip),%xmm0
mulsd  (%rax,%rcx,8),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
movl   $0x1,-0xdc(%rbp)
mov    -0xdc(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    173a <build_rep_imp+0x60a>
mov    -0x40(%rbp),%rax
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
sub    -0xdc(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x40(%rbp),%rax
mov    -0x4(%rbp),%ecx
sub    -0xdc(%rbp),%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm1
movsd  0x90e(%rip),%xmm0
mulsd  %xmm1,%xmm0
mov    -0x30(%rbp),%rax
movslq -0xdc(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0xdc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xdc(%rbp)
jmp    16c9 <build_rep_imp+0x599>
mov    -0x40(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x40(%rbp),%rax
movsd  0x8d2(%rip),%xmm1
mulsd  0x8(%rax),%xmm1
movsd  0x8cd(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x30(%rbp),%rax
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movl   $0x0,-0xe0(%rbp)
mov    -0xe0(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    17cf <build_rep_imp+0x69f>
mov    -0x30(%rbp),%rax
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
sub    -0xe0(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x30(%rbp),%rax
mov    -0x4(%rbp),%ecx
add    -0xe0(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0xe0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xe0(%rbp)
jmp    177f <build_rep_imp+0x64f>
jmp    17d4 <build_rep_imp+0x6a4>
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
mov    -0x40(%rbp),%rdi
call   1030 <free@plt>
add    $0xf0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<build_rep_imp>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x78,%rsp
mov    %r9,0x50(%rsp)
mov    %r8d,0x1c(%rsp)
mov    %rcx,%rbp
mov    %rdx,%r13
mov    %rsi,%r15
mov    %edi,%ebx
lea    0x1(%rbx),%r14d
movslq %r14d,%r12
lea    0x8(,%rbx,8),%edi
call   1040 <malloc@plt>
mov    %rax,0x8(%rsp)
lea    0x10(,%rbx,8),%edi
call   1040 <malloc@plt>
mov    %rax,0x30(%rsp)
lea    -0x1(%rbx),%eax
mov    %eax,0x4(%rsp)
movabs $0xc000000000000000,%rax
lea    -0x1(%rbx,%rbx,1),%ecx
cvtsi2sd %ecx,%xmm1
mov    %r12,0x70(%rsp)
mov    %rax,0x0(%r13,%r12,8)
movslq %ebx,%rax
mov    %rax,0x20(%rsp)
mov    %ebx,%eax
mov    %rbx,0x38(%rsp)
test   %ebx,%ebx
mov    %rax,%rbx
mov    %rax,0x40(%rsp)
jle    14e8 <build_rep_imp+0x3b8>
movsd  0xe3a(%rip),%xmm0
movsd  %xmm1,0x58(%rsp)
divsd  %xmm1,%xmm0
movsd  %xmm0,0x10(%rsp)
mov    %r14d,%eax
mov    %rax,0x48(%rsp)
lea    0x0(,%rax,8),%r12
and    $0xfffffffffffffff0,%r12
xor    %r14d,%r14d
movsd  0xe13(%rip),%xmm0
movsd  %xmm0,0x60(%rsp)
xor    %ebx,%ebx
jmp    122b <build_rep_imp+0xfb>
nop
movsd  0x0(%rbp,%rbx,8),%xmm1
mov    0x8(%rsp),%rax
movsd  %xmm1,(%rax,%r14,8)
xor    %eax,%eax
cmp    $0x2,%ebx
setge  %al
sub    %rax,%rbx
add    $0x1,%r14
cmp    0x40(%rsp),%r14
je     1323 <build_rep_imp+0x1f3>
xorps  %xmm0,%xmm0
cvtsi2sd %r14d,%xmm0
mulsd  0x10(%rsp),%xmm0
mulsd  0xdc7(%rip),%xmm0
call   1050 <cos@plt>
movsd  0xdc2(%rip),%xmm3
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movslq %ebx,%rbx
add    $0xffffffffffffffff,%rbx
nopl   0x0(%rax)
movsd  0x8(%r13,%rbx,8),%xmm1
add    $0x1,%rbx
ucomisd %xmm0,%xmm1
jb     127f <build_rep_imp+0x14f>
movapd %xmm1,%xmm2
subsd  %xmm0,%xmm2
ucomisd %xmm3,%xmm2
jae    1260 <build_rep_imp+0x130>
movapd %xmm0,%xmm2
subsd  %xmm1,%xmm2
ucomisd %xmm2,%xmm3
ja     1200 <build_rep_imp+0xd0>
xorpd  %xmm1,%xmm1
xor    %eax,%eax
xorpd  %xmm2,%xmm2
nopl   0x0(%rax,%rax,1)
movapd %xmm0,%xmm3
subsd  0x0(%r13,%rax,1),%xmm3
movsd  (%r15,%rax,1),%xmm4
divsd  %xmm3,%xmm4
movsd  0x8(%r15,%rax,1),%xmm3
addsd  %xmm4,%xmm2
mulsd  0x0(%rbp,%rax,1),%xmm4
movapd %xmm0,%xmm5
subsd  0x8(%r13,%rax,1),%xmm5
divsd  %xmm5,%xmm3
addsd  %xmm3,%xmm2
mulsd  0x8(%rbp,%rax,1),%xmm3
addsd  %xmm1,%xmm4
movapd %xmm3,%xmm1
addsd  %xmm4,%xmm1
add    $0x10,%rax
cmp    %rax,%r12
jne    12a0 <build_rep_imp+0x170>
testb  $0x1,0x48(%rsp)
je     131a <build_rep_imp+0x1ea>
movsd  (%r15,%rax,1),%xmm3
subsd  0x0(%r13,%rax,1),%xmm0
divsd  %xmm0,%xmm3
addsd  %xmm3,%xmm2
mulsd  0x0(%rbp,%rax,1),%xmm3
addsd  %xmm3,%xmm1
divsd  %xmm2,%xmm1
jmp    1206 <build_rep_imp+0xd6>
cmpl   $0x0,0x38(%rsp)
mov    0x40(%rsp),%rbx
movsd  0x58(%rsp),%xmm1
jle    14e8 <build_rep_imp+0x3b8>
movsd  0x60(%rsp),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,0x60(%rsp)
lea    -0x1(%rbx),%r14
mov    0x8(%rsp),%rax
movsd  (%rax),%xmm0
mov    %r14,%r12
and    $0xfffffffffffffffe,%r12
xor    %r15d,%r15d
movsd  %xmm0,0x68(%rsp)
mov    0x8(%rsp),%r13
jmp    1388 <build_rep_imp+0x258>
nopl   (%rax)
mov    0x30(%rsp),%rax
movsd  %xmm3,(%rax,%r15,8)
add    $0x1,%r15
cmp    %rbx,%r15
je     16a7 <build_rep_imp+0x577>
mov    0x38(%rsp),%rax
cmp    $0x1,%eax
je     14d0 <build_rep_imp+0x3a0>
xorps  %xmm2,%xmm2
cvtsi2sd %r15d,%xmm2
mulsd  0x60(%rsp),%xmm2
mov    $0x1,%ebp
movapd %xmm0,%xmm3
cmp    $0x2,%eax
je     146e <build_rep_imp+0x33e>
mov    $0x1,%ebp
movapd %xmm0,%xmm3
movsd  %xmm2,0x48(%rsp)
cs nopw 0x0(%rax,%rax,1)
nop
movsd  %xmm3,0x10(%rsp)
movsd  0x0(%r13,%rbp,8),%xmm0
addsd  %xmm0,%xmm0
movsd  %xmm0,0x28(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sd %ebp,%xmm0
mulsd  %xmm2,%xmm0
call   1050 <cos@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0x28(%rsp),%xmm0
addsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0x8(%r13,%rbp,8),%xmm0
addsd  %xmm0,%xmm0
movsd  %xmm0,0x28(%rsp)
lea    0x1(%rbp),%rbx
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
mulsd  0x48(%rsp),%xmm0
call   1050 <cos@plt>
movsd  0x48(%rsp),%xmm2
xorps  %xmm3,%xmm3
cvtsi2sd %eax,%xmm3
mulsd  0x28(%rsp),%xmm3
addsd  0x10(%rsp),%xmm3
add    $0x2,%rbp
cmp    %r12,%rbx
jne    13d0 <build_rep_imp+0x2a0>
mov    0x40(%rsp),%rbx
movsd  0x58(%rsp),%xmm1
movsd  0x68(%rsp),%xmm0
test   $0x1,%r14b
je     1370 <build_rep_imp+0x240>
movsd  0x0(%r13,%rbp,8),%xmm0
addsd  %xmm0,%xmm0
movsd  %xmm0,0x28(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sd %ebp,%xmm0
mulsd  %xmm0,%xmm2
movapd %xmm2,%xmm0
movsd  %xmm3,0x10(%rsp)
call   1050 <cos@plt>
movsd  0x10(%rsp),%xmm3
movsd  0x58(%rsp),%xmm1
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0x28(%rsp),%xmm0
addsd  %xmm0,%xmm3
movsd  0x68(%rsp),%xmm0
jmp    1370 <build_rep_imp+0x240>
nopl   0x0(%rax,%rax,1)
mov    0x30(%rsp),%rax
movsd  %xmm0,(%rax,%r15,8)
add    $0x1,%r15
cmp    %rbx,%r15
jne    1388 <build_rep_imp+0x258>
mov    0x30(%rsp),%r15
movsd  (%r15),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,(%r15)
xor    %r8d,%r8d
mov    0x8(%rsp),%rdi
mov    0x50(%rsp),%r14
mov    0x38(%rsp),%r12
mov    0x20(%rsp),%r11
mov    0x4(%rsp),%r13d
mov    0x1c(%rsp),%eax
movq   $0x0,(%r15,%r11,8)
mov    0x70(%rsp),%rcx
movq   $0x0,(%r15,%rcx,8)
movslq %r13d,%r10
test   %eax,%eax
je     1554 <build_rep_imp+0x424>
test   %r8b,%r8b
je     1697 <build_rep_imp+0x567>
mov    %r13d,%edx
cmp    $0x4,%r13d
jae    1801 <build_rep_imp+0x6d1>
xor    %esi,%esi
jmp    18e6 <build_rep_imp+0x7b6>
movsd  (%r15,%r10,8),%xmm0
mulsd  0xac6(%rip),%xmm0
movsd  %xmm0,(%r14)
cmp    $0x3,%r12d
jl     164f <build_rep_imp+0x51f>
mov    %r13d,%r11d
lea    -0x1(%r11),%r8
mov    $0x1,%edx
cmp    $0x4,%r8
jb     1611 <build_rep_imp+0x4e1>
mov    %r8,%r9
and    $0xfffffffffffffffc,%r9
lea    0x1(%r9),%rdx
lea    (%r15,%r10,8),%rbp
add    $0xfffffffffffffff0,%rbp
lea    (%r15,%rbx,8),%rbx
add    $0xfffffffffffffff0,%rbx
lea    0x18(%r14),%rsi
mov    %r9,%rcx
neg    %rcx
xor    %eax,%eax
movapd 0xa8a(%rip),%xmm0
cs nopw 0x0(%rax,%rax,1)
movupd -0x10(%rbp,%rax,8),%xmm1
movupd 0x0(%rbp,%rax,8),%xmm2
movupd -0x10(%rbx,%rax,8),%xmm3
addpd  %xmm1,%xmm3
movupd (%rbx,%rax,8),%xmm1
addpd  %xmm2,%xmm1
mulpd  %xmm0,%xmm1
shufpd $0x1,%xmm1,%xmm1
mulpd  %xmm0,%xmm3
shufpd $0x1,%xmm3,%xmm3
movupd %xmm1,-0x10(%rsi)
movupd %xmm3,(%rsi)
add    $0xfffffffffffffffc,%rax
add    $0x20,%rsi
cmp    %rax,%rcx
jne    15c0 <build_rep_imp+0x490>
cmp    %r9,%r8
mov    0x40(%rsp),%rbx
je     164f <build_rep_imp+0x51f>
lea    (%r15,%rbx,8),%rax
lea    (%r15,%r10,8),%rsi
lea    (%r14,%rdx,8),%rcx
neg    %rdx
neg    %r11
movsd  0x9fd(%rip),%xmm0
nopl   0x0(%rax,%rax,1)
movsd  (%rsi,%rdx,8),%xmm1
addsd  (%rax,%rdx,8),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%rcx)
add    $0xffffffffffffffff,%rdx
add    $0x8,%rcx
cmp    %rdx,%r11
jne    1630 <build_rep_imp+0x500>
movsd  (%r15),%xmm0
movsd  0x8(%r15),%xmm1
mulsd  0x9c6(%rip),%xmm1
mulsd  0x9b6(%rip),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%r14,%r10,8)
test   %r12d,%r12d
jle    1a4a <build_rep_imp+0x91a>
lea    -0x1(%rbx),%rax
mov    %ebx,%ecx
and    $0x3,%ecx
cmp    $0x3,%rax
jae    1952 <build_rep_imp+0x822>
xor    %edx,%edx
jmp    19a8 <build_rep_imp+0x878>
movsd  (%r15),%xmm0
movsd  %xmm0,(%r14,%r10,8)
jmp    1a4a <build_rep_imp+0x91a>
mov    0x30(%rsp),%r15
movsd  (%r15),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,(%r15)
mov    0x38(%rsp),%r12
cmp    $0x2,%r12d
setge  %r8b
jl     1940 <build_rep_imp+0x810>
movsd  0x943(%rip),%xmm0
divsd  %xmm1,%xmm0
mov    $0x1,%eax
cmp    $0x4,%r14
jb     17bb <build_rep_imp+0x68b>
mov    %r14,%rax
and    $0xfffffffffffffffc,%rax
movapd %xmm0,%xmm1
unpcklpd %xmm0,%xmm1
lea    -0x4(%rax),%rcx
mov    %rcx,%rsi
shr    $0x2,%rsi
add    $0x1,%rsi
test   %rcx,%rcx
je     1a76 <build_rep_imp+0x946>
mov    %rsi,%rcx
and    $0xfffffffffffffffe,%rcx
xor    %edx,%edx
mov    0x8(%rsp),%rdi
mov    0x20(%rsp),%r11
mov    0x4(%rsp),%r13d
nopw   0x0(%rax,%rax,1)
movupd 0x8(%r15,%rdx,8),%xmm2
movupd 0x18(%r15,%rdx,8),%xmm3
movupd 0x28(%r15,%rdx,8),%xmm4
movupd 0x38(%r15,%rdx,8),%xmm5
mulpd  %xmm1,%xmm2
mulpd  %xmm1,%xmm3
movupd %xmm2,0x8(%r15,%rdx,8)
movupd %xmm3,0x18(%r15,%rdx,8)
mulpd  %xmm1,%xmm4
mulpd  %xmm1,%xmm5
movupd %xmm4,0x28(%r15,%rdx,8)
movupd %xmm5,0x38(%r15,%rdx,8)
add    $0x8,%rdx
add    $0xfffffffffffffffe,%rcx
jne    1730 <build_rep_imp+0x600>
test   $0x1,%sil
je     17b2 <build_rep_imp+0x682>
shl    $0x3,%rdx
or     $0x8,%rdx
movupd (%r15,%rdx,1),%xmm2
movupd 0x10(%r15,%rdx,1),%xmm3
mulpd  %xmm1,%xmm2
mulpd  %xmm1,%xmm3
movupd %xmm2,(%r15,%rdx,1)
movupd %xmm3,0x10(%r15,%rdx,1)
cmp    %rax,%r14
je     17e9 <build_rep_imp+0x6b9>
or     $0x1,%rax
mov    0x8(%rsp),%rdi
mov    0x20(%rsp),%r11
mov    0x4(%rsp),%r13d
nopw   0x0(%rax,%rax,1)
movsd  (%r15,%rax,8),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%r15,%rax,8)
add    $0x1,%rax
cmp    %rax,%rbx
jne    17d0 <build_rep_imp+0x6a0>
cmp    $0x4,%r12d
mov    0x50(%rsp),%r14
mov    0x1c(%rsp),%eax
jl     151b <build_rep_imp+0x3eb>
jmp    1530 <build_rep_imp+0x400>
mov    %edx,%esi
and    $0xfffffffc,%esi
lea    -0x4(%rsi),%rax
mov    %rax,%r9
shr    $0x2,%r9
add    $0x1,%r9
test   %rax,%rax
je     1a65 <build_rep_imp+0x935>
mov    %r9,%rbp
and    $0xfffffffffffffffe,%rbp
lea    (%r15,%r10,8),%rcx
add    $0xfffffffffffffff8,%rcx
xor    %ebx,%ebx
movapd 0x7f9(%rip),%xmm0
nopw   0x0(%rax,%rax,1)
movupd -0x10(%rcx),%xmm1
movupd (%rcx),%xmm2
mulpd  %xmm0,%xmm2
shufpd $0x1,%xmm2,%xmm2
mulpd  %xmm0,%xmm1
shufpd $0x1,%xmm1,%xmm1
movupd %xmm2,(%r14,%rbx,8)
movupd %xmm1,0x10(%r14,%rbx,8)
movupd -0x30(%rcx),%xmm1
movupd -0x20(%rcx),%xmm2
mulpd  %xmm0,%xmm2
shufpd $0x1,%xmm2,%xmm2
mulpd  %xmm0,%xmm1
shufpd $0x1,%xmm1,%xmm1
movupd %xmm2,0x20(%r14,%rbx,8)
movupd %xmm1,0x30(%r14,%rbx,8)
add    $0x8,%rbx
add    $0xffffffffffffffc0,%rcx
add    $0xfffffffffffffffe,%rbp
jne    1840 <build_rep_imp+0x710>
test   $0x1,%r9b
je     18e1 <build_rep_imp+0x7b1>
mov    %r10,%rax
sub    %rbx,%rax
movupd -0x18(%r15,%rax,8),%xmm0
movupd -0x8(%r15,%rax,8),%xmm1
movapd 0x76e(%rip),%xmm2
mulpd  %xmm2,%xmm1
shufpd $0x1,%xmm1,%xmm1
mulpd  %xmm2,%xmm0
shufpd $0x1,%xmm0,%xmm0
movupd %xmm1,(%r14,%rbx,8)
movupd %xmm0,0x10(%r14,%rbx,8)
cmp    %rdx,%rsi
je     191b <build_rep_imp+0x7eb>
mov    %r10,%rax
sub    %rsi,%rax
lea    (%r15,%rax,8),%rax
movsd  0x728(%rip),%xmm0
nopl   0x0(%rax,%rax,1)
movsd  (%rax),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%r14,%rsi,8)
add    $0x1,%rsi
add    $0xfffffffffffffff8,%rax
cmp    %rsi,%rdx
jne    1900 <build_rep_imp+0x7d0>
movsd  (%r15),%xmm0
movsd  %xmm0,(%r14,%r10,8)
test   %r8b,%r8b
je     1a4a <build_rep_imp+0x91a>
cmp    $0x1,%r13d
jne    19e8 <build_rep_imp+0x8b8>
xor    %eax,%eax
jmp    1a2c <build_rep_imp+0x8fc>
xor    %r8d,%r8d
mov    0x8(%rsp),%rdi
mov    0x50(%rsp),%r14
jmp    150d <build_rep_imp+0x3dd>
mov    %ebx,%eax
and    $0xfffffffc,%eax
lea    (%r14,%r10,8),%rsi
lea    (%r14,%rbx,8),%rbp
add    $0x18,%rbp
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
nop
movsd  (%rsi),%xmm0
movsd  %xmm0,-0x18(%rbp,%rdx,8)
movsd  -0x8(%rsi),%xmm0
movsd  %xmm0,-0x10(%rbp,%rdx,8)
movsd  -0x10(%rsi),%xmm0
movsd  %xmm0,-0x8(%rbp,%rdx,8)
movsd  -0x18(%rsi),%xmm0
movsd  %xmm0,0x0(%rbp,%rdx,8)
add    $0x4,%rdx
add    $0xffffffffffffffe0,%rsi
cmp    %rdx,%rax
jne    1970 <build_rep_imp+0x840>
test   %rcx,%rcx
je     1a4a <build_rep_imp+0x91a>
add    %rdx,%rbx
lea    (%r14,%rbx,8),%rax
sub    %rdx,%r10
lea    (%r14,%r10,8),%rdx
xor    %esi,%esi
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsd  (%rdx),%xmm0
movsd  %xmm0,(%rax,%rsi,8)
add    $0x1,%rsi
add    $0xfffffffffffffff8,%rdx
cmp    %rsi,%rcx
jne    19d0 <build_rep_imp+0x8a0>
jmp    1a4a <build_rep_imp+0x91a>
mov    %edx,%ecx
and    $0xfffffffe,%ecx
lea    -0x3(%r12),%esi
lea    (%r14,%r11,8),%rbx
add    $0x8,%rbx
xor    %eax,%eax
nopl   0x0(%rax)
lea    0x1(%rsi),%ebp
movslq %ebp,%rbp
movsd  (%r14,%rbp,8),%xmm0
movsd  %xmm0,-0x8(%rbx,%rax,8)
movslq %esi,%rsi
movsd  (%r14,%rsi,8),%xmm0
movsd  %xmm0,(%rbx,%rax,8)
add    $0x2,%rax
add    $0xfffffffe,%esi
cmp    %rax,%rcx
jne    1a00 <build_rep_imp+0x8d0>
test   $0x1,%dl
je     1a4a <build_rep_imp+0x91a>
add    $0xfffffffe,%r12d
sub    %eax,%r12d
movslq %r12d,%rcx
movsd  (%r14,%rcx,8),%xmm0
add    %rax,%r11
movsd  %xmm0,(%r14,%r11,8)
call   1030 <free@plt>
mov    %r15,%rdi
add    $0x78,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <free@plt>
xor    %ebx,%ebx
test   $0x1,%r9b
jne    18a6 <build_rep_imp+0x776>
jmp    18e1 <build_rep_imp+0x7b1>
xor    %edx,%edx
mov    0x8(%rsp),%rdi
mov    0x20(%rsp),%r11
mov    0x4(%rsp),%r13d
test   $0x1,%sil
jne    1788 <build_rep_imp+0x658>
jmp    17b2 <build_rep_imp+0x682>

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

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