void restartMapping(double *g, double *z, double *v, double lambda, int nn) {
  int i, n = nn + 1;
  double temp;
  int *S = (int *)malloc(sizeof(int) * nn);
  double *x = (double *)malloc(sizeof(double) * n);
  double *s = (double *)malloc(sizeof(double) * nn);
  double *Av = (double *)malloc(sizeof(double) * nn);
  for (i = 0; i < nn; i++)
    Av[i] = v[i + 1] - v[i];
  g[0] = z[0] + z[0] - z[1] - Av[0];
  for (i = 1; i < nn - 1; i++) {
    g[i] = -z[i - 1] + z[i] + z[i] - z[i + 1] - Av[i];
  }
  g[nn - 1] = -z[nn - 2] + z[nn - 1] + z[nn - 1] - Av[nn - 1];
  for (i = 0; i < nn; i++)
    s[i] = Av[i] - x[i + 1] + x[i];
  Thomas(&temp, g, s, nn);
  for (i = 0; i < nn; i++) {
    if (g[i] > lambda)
      g[i] = lambda;
    else if (g[i] < -lambda)
      g[i] = -lambda;
  }
  free(S);
  free(x);
  free(s);
  free(Av);
}


x86 assembly (clang, -O0):
<restartMapping>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movsd  %xmm0,-0x20(%rbp)
mov    %ecx,-0x24(%rbp)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
movslq -0x24(%rbp),%rdi
shl    $0x2,%rdi
call   1040 <malloc@plt>
mov    %rax,-0x40(%rbp)
movslq -0x2c(%rbp),%rdi
shl    $0x3,%rdi
call   1040 <malloc@plt>
mov    %rax,-0x48(%rbp)
movslq -0x24(%rbp),%rdi
shl    $0x3,%rdi
call   1040 <malloc@plt>
mov    %rax,-0x50(%rbp)
movslq -0x24(%rbp),%rdi
shl    $0x3,%rdi
call   1040 <malloc@plt>
mov    %rax,-0x58(%rbp)
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    11e6 <restartMapping+0xb6>
mov    -0x18(%rbp),%rax
mov    -0x28(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x28(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
mov    -0x58(%rbp),%rax
movslq -0x28(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    11a0 <restartMapping+0x70>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
addsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
subsd  0x8(%rax),%xmm0
mov    -0x58(%rbp),%rax
subsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
movl   $0x1,-0x28(%rbp)
mov    -0x28(%rbp),%eax
mov    -0x24(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    12a4 <restartMapping+0x174>
mov    -0x10(%rbp),%rax
mov    -0x28(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x10(%rbp),%rax
movslq -0x28(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x28(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x28(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
subsd  (%rax,%rcx,8),%xmm0
mov    -0x58(%rbp),%rax
movslq -0x28(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x28(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    1216 <restartMapping+0xe6>
mov    -0x10(%rbp),%rax
mov    -0x24(%rbp),%ecx
sub    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x10(%rbp),%rax
mov    -0x24(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x24(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm0
mov    -0x58(%rbp),%rax
mov    -0x24(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
subsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x24(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    136f <restartMapping+0x23f>
mov    -0x58(%rbp),%rax
movslq -0x28(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x48(%rbp),%rax
mov    -0x28(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
subsd  (%rax,%rcx,8),%xmm0
mov    -0x48(%rbp),%rax
movslq -0x28(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
mov    -0x50(%rbp),%rax
movslq -0x28(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    131c <restartMapping+0x1ec>
mov    -0x8(%rbp),%rsi
mov    -0x50(%rbp),%rdx
mov    -0x24(%rbp),%ecx
lea    -0x38(%rbp),%rdi
mov    $0x0,%al
call   1050 <Thomas@plt>
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    143b <restartMapping+0x30b>
mov    -0x8(%rbp),%rax
movslq -0x28(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
ucomisd -0x20(%rbp),%xmm0
jbe    13c7 <restartMapping+0x297>
movsd  -0x20(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x28(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    1428 <restartMapping+0x2f8>
mov    -0x8(%rbp),%rax
movslq -0x28(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  -0x20(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
ucomisd %xmm1,%xmm0
jbe    1423 <restartMapping+0x2f3>
movsd  -0x20(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x8(%rbp),%rax
movslq -0x28(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    1428 <restartMapping+0x2f8>
jmp    142d <restartMapping+0x2fd>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    138c <restartMapping+0x25c>
mov    -0x40(%rbp),%rdi
call   1030 <free@plt>
mov    -0x48(%rbp),%rdi
call   1030 <free@plt>
mov    -0x50(%rbp),%rdi
call   1030 <free@plt>
mov    -0x58(%rbp),%rdi
call   1030 <free@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<restartMapping>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %ecx,%r14d
movaps %xmm0,0x20(%rsp)
mov    %rdx,%r13
mov    %rsi,%rbp
mov    %rdi,%r12
movslq %ecx,%r15
lea    0x8(,%r15,8),%rdi
call   1040 <malloc@plt>
mov    %rax,0x10(%rsp)
lea    0x0(,%r15,8),%rbx
mov    %rbx,%rdi
call   1040 <malloc@plt>
mov    %rax,0x8(%rsp)
mov    %rbx,%rdi
call   1040 <malloc@plt>
mov    %r15,%r10
mov    %r14,%rcx
mov    %rax,%rbx
mov    %ecx,%r14d
test   %r10d,%r10d
jle    11a9 <restartMapping+0x79>
movsd  0x0(%r13),%xmm0
cmp    $0x4,%ecx
jae    11b8 <restartMapping+0x88>
xor    %eax,%eax
mov    0x8(%rsp),%r15
jmp    12b0 <restartMapping+0x180>
mov    0x10(%rsp),%r13
mov    0x8(%rsp),%r15
jmp    12dd <restartMapping+0x1ad>
mov    %r14d,%eax
and    $0xfffffffc,%eax
unpcklpd %xmm0,%xmm0
lea    -0x4(%rax),%rsi
mov    %rsi,%rdx
shr    $0x2,%rdx
add    $0x1,%rdx
test   %rsi,%rsi
je     1641 <restartMapping+0x511>
mov    %rdx,%rsi
and    $0xfffffffffffffffe,%rsi
xor    %edi,%edi
mov    0x8(%rsp),%r15
nopl   0x0(%rax,%rax,1)
movupd 0x8(%r13,%rdi,8),%xmm1
movupd 0x18(%r13,%rdi,8),%xmm2
shufpd $0x1,%xmm1,%xmm0
movapd %xmm1,%xmm3
shufpd $0x1,%xmm2,%xmm3
subpd  %xmm0,%xmm1
movapd %xmm2,%xmm0
subpd  %xmm3,%xmm0
movupd %xmm1,(%rbx,%rdi,8)
movupd %xmm0,0x10(%rbx,%rdi,8)
movupd 0x28(%r13,%rdi,8),%xmm1
movupd 0x38(%r13,%rdi,8),%xmm0
shufpd $0x1,%xmm1,%xmm2
movapd %xmm1,%xmm3
shufpd $0x1,%xmm0,%xmm3
subpd  %xmm2,%xmm1
movapd %xmm0,%xmm2
subpd  %xmm3,%xmm2
movupd %xmm1,0x20(%rbx,%rdi,8)
movupd %xmm2,0x30(%rbx,%rdi,8)
add    $0x8,%rdi
add    $0xfffffffffffffffe,%rsi
jne    11f0 <restartMapping+0xc0>
test   $0x1,%dl
je     12a5 <restartMapping+0x175>
lea    0x0(,%rdi,8),%rdx
or     $0x8,%rdx
movupd 0x0(%r13,%rdx,1),%xmm1
movupd 0x10(%r13,%rdx,1),%xmm2
shufpd $0x1,%xmm1,%xmm0
movapd %xmm1,%xmm3
shufpd $0x1,%xmm2,%xmm3
subpd  %xmm0,%xmm1
movapd %xmm2,%xmm0
subpd  %xmm3,%xmm2
movupd %xmm1,(%rbx,%rdi,8)
movupd %xmm2,0x10(%rbx,%rdi,8)
cmp    %r14,%rax
je     12d4 <restartMapping+0x1a4>
unpckhpd %xmm0,%xmm0
xchg   %ax,%ax
movsd  0x8(%r13,%rax,8),%xmm1
movapd %xmm1,%xmm2
subsd  %xmm0,%xmm2
movsd  %xmm2,(%rbx,%rax,8)
lea    0x1(%rax),%rdx
movapd %xmm1,%xmm0
mov    %rdx,%rax
cmp    %rdx,%r14
jne    12b0 <restartMapping+0x180>
movsd  (%rbx),%xmm0
mov    0x10(%rsp),%r13
movsd  0x0(%rbp),%xmm1
addsd  %xmm1,%xmm1
subsd  0x8(%rbp),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,(%r12)
lea    -0x1(%rcx),%r9d
cmp    $0x3,%ecx
jl     1458 <restartMapping+0x328>
mov    %r9d,%eax
lea    -0x1(%rax),%r8
mov    $0x1,%edx
cmp    $0x4,%r8
jb     13c2 <restartMapping+0x292>
lea    0x8(%r12),%rsi
lea    0x8(,%rax,8),%rdi
add    %rbp,%rdi
cmp    %rdi,%rsi
jae    133a <restartMapping+0x20a>
lea    (%r12,%rax,8),%rsi
cmp    %rbp,%rsi
ja     13c2 <restartMapping+0x292>
mov    %r8,%rdi
and    $0xfffffffffffffffc,%rdi
lea    0x1(%rdi),%rdx
xor    %esi,%esi
nopw   0x0(%rax,%rax,1)
movupd 0x0(%rbp,%rsi,8),%xmm0
movupd 0x8(%rbp,%rsi,8),%xmm1
movupd 0x10(%rbp,%rsi,8),%xmm2
movupd 0x18(%rbp,%rsi,8),%xmm3
movapd %xmm1,%xmm4
subpd  %xmm0,%xmm4
movapd %xmm3,%xmm0
subpd  %xmm2,%xmm0
addpd  %xmm1,%xmm4
addpd  %xmm3,%xmm0
movupd 0x20(%rbp,%rsi,8),%xmm1
subpd  %xmm1,%xmm0
subpd  %xmm2,%xmm4
movupd 0x8(%rbx,%rsi,8),%xmm1
subpd  %xmm1,%xmm4
movupd 0x18(%rbx,%rsi,8),%xmm1
subpd  %xmm1,%xmm0
movupd %xmm4,0x8(%r12,%rsi,8)
movupd %xmm0,0x18(%r12,%rsi,8)
add    $0x4,%rsi
cmp    %rsi,%rdi
jne    1350 <restartMapping+0x220>
cmp    %rdi,%r8
je     1458 <restartMapping+0x328>
mov    %rdx,%rsi
not    %rsi
test   $0x1,%al
jne    13f5 <restartMapping+0x2c5>
movsd  0x0(%rbp,%rdx,8),%xmm0
movapd %xmm0,%xmm1
subsd  -0x8(%rbp,%rdx,8),%xmm1
addsd  %xmm0,%xmm1
subsd  0x8(%rbp,%rdx,8),%xmm1
subsd  (%rbx,%rdx,8),%xmm1
movsd  %xmm1,(%r12,%rdx,8)
add    $0x1,%rdx
add    %rax,%rsi
je     1458 <restartMapping+0x328>
nopw   0x0(%rax,%rax,1)
movsd  0x0(%rbp,%rdx,8),%xmm0
movapd %xmm0,%xmm1
subsd  -0x8(%rbp,%rdx,8),%xmm1
addsd  %xmm0,%xmm1
subsd  0x8(%rbp,%rdx,8),%xmm1
subsd  (%rbx,%rdx,8),%xmm1
movsd  %xmm1,(%r12,%rdx,8)
movsd  0x8(%rbp,%rdx,8),%xmm0
movapd %xmm0,%xmm1
subsd  0x0(%rbp,%rdx,8),%xmm1
addsd  %xmm0,%xmm1
subsd  0x10(%rbp,%rdx,8),%xmm1
subsd  0x8(%rbx,%rdx,8),%xmm1
movsd  %xmm1,0x8(%r12,%rdx,8)
lea    0x2(%rdx),%rsi
mov    %rsi,%rdx
cmp    %rsi,%rax
jne    1400 <restartMapping+0x2d0>
movslq %r9d,%rax
movsd  0x0(%rbp,%rax,8),%xmm0
movapd %xmm0,%xmm1
subsd  -0x10(%rbp,%r10,8),%xmm1
addsd  %xmm0,%xmm1
subsd  (%rbx,%rax,8),%xmm1
movsd  %xmm1,(%r12,%rax,8)
test   %ecx,%ecx
jle    15a3 <restartMapping+0x473>
movsd  0x8(%r13),%xmm0
movabs $0x7ff8000000000000,%rax
mov    %rax,(%r15)
cmp    $0x1,%ecx
je     154a <restartMapping+0x41a>
lea    -0x1(%r14),%rdi
mov    $0x1,%eax
cmp    $0x4,%rdi
jb     1520 <restartMapping+0x3f0>
mov    %rdi,%rdx
and    $0xfffffffffffffffc,%rdx
lea    0x1(%rdx),%rax
unpcklpd %xmm0,%xmm0
xor    %esi,%esi
nop
movupd 0x8(%rbx,%rsi,8),%xmm1
movupd 0x18(%rbx,%rsi,8),%xmm2
movupd 0x10(%r13,%rsi,8),%xmm3
shufpd $0x1,%xmm3,%xmm0
subpd  %xmm3,%xmm1
addpd  %xmm0,%xmm1
movupd 0x20(%r13,%rsi,8),%xmm0
shufpd $0x1,%xmm0,%xmm3
subpd  %xmm0,%xmm2
addpd  %xmm3,%xmm2
movupd %xmm1,0x8(%r15,%rsi,8)
movupd %xmm2,0x18(%r15,%rsi,8)
add    $0x4,%rsi
cmp    %rsi,%rdx
jne    14c0 <restartMapping+0x390>
cmp    %rdx,%rdi
je     154a <restartMapping+0x41a>
unpckhpd %xmm0,%xmm0
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsd  (%rbx,%rax,8),%xmm1
movsd  0x8(%r13,%rax,8),%xmm2
subsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%r15,%rax,8)
lea    0x1(%rax),%rdx
movapd %xmm2,%xmm0
mov    %rdx,%rax
cmp    %rdx,%r14
jne    1520 <restartMapping+0x3f0>
lea    0x18(%rsp),%rdi
mov    %r12,%rsi
mov    %r15,%rdx
xor    %eax,%eax
mov    %rcx,%rbp
call   1050 <Thomas@plt>
mov    %rbp,%rax
test   %eax,%eax
movapd 0x20(%rsp),%xmm3
jle    15b5 <restartMapping+0x485>
movapd 0xa8c(%rip),%xmm0
xorpd  %xmm3,%xmm0
cmp    $0x1,%eax
jne    15dc <restartMapping+0x4ac>
xor    %eax,%eax
test   $0x1,%r14b
je     15b5 <restartMapping+0x485>
movsd  (%r12,%rax,8),%xmm1
ucomisd %xmm3,%xmm1
ja     159b <restartMapping+0x46b>
ucomisd %xmm1,%xmm0
movapd %xmm0,%xmm3
jbe    15b5 <restartMapping+0x485>
movsd  %xmm3,(%r12,%rax,8)
jmp    15b5 <restartMapping+0x485>
lea    0x18(%rsp),%rdi
mov    %r12,%rsi
mov    %r15,%rdx
xor    %eax,%eax
call   1050 <Thomas@plt>
mov    %r13,%rdi
call   1030 <free@plt>
mov    %r15,%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %r14d,%ecx
and    $0xfffffffe,%ecx
xor    %eax,%eax
jmp    1604 <restartMapping+0x4d4>
cs nopw 0x0(%rax,%rax,1)
movsd  %xmm1,0x8(%r12,%rax,8)
add    $0x2,%rax
cmp    %rax,%rcx
je     157f <restartMapping+0x44f>
movsd  (%r12,%rax,8),%xmm2
ucomisd %xmm3,%xmm2
movapd %xmm3,%xmm1
ja     161e <restartMapping+0x4ee>
ucomisd %xmm2,%xmm0
movapd %xmm0,%xmm1
jbe    1624 <restartMapping+0x4f4>
movsd  %xmm1,(%r12,%rax,8)
movsd  0x8(%r12,%rax,8),%xmm2
ucomisd %xmm3,%xmm2
movapd %xmm3,%xmm1
ja     15f0 <restartMapping+0x4c0>
ucomisd %xmm2,%xmm0
movapd %xmm0,%xmm1
ja     15f0 <restartMapping+0x4c0>
jmp    15f7 <restartMapping+0x4c7>
xor    %edi,%edi
mov    0x8(%rsp),%r15
test   $0x1,%dl
jne    1266 <restartMapping+0x136>
jmp    12a5 <restartMapping+0x175>

LLVM IR (-O0):
define void @restartMapping(double* %0, double* %1, double* %2, double %3, i32 %4) {
%6 = alloca double*
%7 = alloca double*
%8 = alloca double*
%9 = alloca double
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca double
%14 = alloca i32*
%15 = alloca double*
%16 = alloca double*
%17 = alloca double*
store double* %0, double** %6
store double* %1, double** %7
store double* %2, double** %8
store double %3, double* %9
store i32 %4, i32* %10
%18 = load i32, i32* %10
%19 = add nsw i32 %18, 1
store i32 %19, i32* %12
%20 = load i32, i32* %10
%21 = sext i32 %20 to i64
%22 = mul i64 4, %21
%23 = call i8* @malloc(i64 %22)
%24 = bitcast i8* %23 to i32*
store i32* %24, i32** %14
%25 = load i32, i32* %12
%26 = sext i32 %25 to i64
%27 = mul i64 8, %26
%28 = call i8* @malloc(i64 %27)
%29 = bitcast i8* %28 to double*
store double* %29, double** %15
%30 = load i32, i32* %10
%31 = sext i32 %30 to i64
%32 = mul i64 8, %31
%33 = call i8* @malloc(i64 %32)
%34 = bitcast i8* %33 to double*
store double* %34, double** %16
%35 = load i32, i32* %10
%36 = sext i32 %35 to i64
%37 = mul i64 8, %36
%38 = call i8* @malloc(i64 %37)
%39 = bitcast i8* %38 to double*
store double* %39, double** %17
store i32 0, i32* %11
br label %40
40: ; preds = %61, %5
%41 = load i32, i32* %11
%42 = load i32, i32* %10
%43 = icmp slt i32 %41, %42
br i1 %43, label %44, label %64
44: ; preds = %40
%45 = load double*, double** %8
%46 = load i32, i32* %11
%47 = add nsw i32 %46, 1
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds double, double* %45, i64 %48
%50 = load double, double* %49
%51 = load double*, double** %8
%52 = load i32, i32* %11
%53 = sext i32 %52 to i64
%54 = getelementptr inbounds double, double* %51, i64 %53
%55 = load double, double* %54
%56 = fsub double %50, %55
%57 = load double*, double** %17
%58 = load i32, i32* %11
%59 = sext i32 %58 to i64
%60 = getelementptr inbounds double, double* %57, i64 %59
store double %56, double* %60
br label %61
61: ; preds = %44
%62 = load i32, i32* %11
%63 = add nsw i32 %62, 1
store i32 %63, i32* %11
br label %40
64: ; preds = %40
%65 = load double*, double** %7
%66 = getelementptr inbounds double, double* %65, i64 0
%67 = load double, double* %66
%68 = load double*, double** %7
%69 = getelementptr inbounds double, double* %68, i64 0
%70 = load double, double* %69
%71 = fadd double %67, %70
%72 = load double*, double** %7
%73 = getelementptr inbounds double, double* %72, i64 1
%74 = load double, double* %73
%75 = fsub double %71, %74
%76 = load double*, double** %17
%77 = getelementptr inbounds double, double* %76, i64 0
%78 = load double, double* %77
%79 = fsub double %75, %78
%80 = load double*, double** %6
%81 = getelementptr inbounds double, double* %80, i64 0
store double %79, double* %81
store i32 1, i32* %11
br label %82
82: ; preds = %124, %64
%83 = load i32, i32* %11
%84 = load i32, i32* %10
%85 = sub nsw i32 %84, 1
%86 = icmp slt i32 %83, %85
br i1 %86, label %87, label %127
87: ; preds = %82
%88 = load double*, double** %7
%89 = load i32, i32* %11
%90 = sub nsw i32 %89, 1
%91 = sext i32 %90 to i64
%92 = getelementptr inbounds double, double* %88, i64 %91
%93 = load double, double* %92
%94 = fneg double %93
%95 = load double*, double** %7
%96 = load i32, i32* %11
%97 = sext i32 %96 to i64
%98 = getelementptr inbounds double, double* %95, i64 %97
%99 = load double, double* %98
%100 = fadd double %94, %99
%101 = load double*, double** %7
%102 = load i32, i32* %11
%103 = sext i32 %102 to i64
%104 = getelementptr inbounds double, double* %101, i64 %103
%105 = load double, double* %104
%106 = fadd double %100, %105
%107 = load double*, double** %7
%108 = load i32, i32* %11
%109 = add nsw i32 %108, 1
%110 = sext i32 %109 to i64
%111 = getelementptr inbounds double, double* %107, i64 %110
%112 = load double, double* %111
%113 = fsub double %106, %112
%114 = load double*, double** %17
%115 = load i32, i32* %11
%116 = sext i32 %115 to i64
%117 = getelementptr inbounds double, double* %114, i64 %116
%118 = load double, double* %117
%119 = fsub double %113, %118
%120 = load double*, double** %6
%121 = load i32, i32* %11
%122 = sext i32 %121 to i64
%123 = getelementptr inbounds double, double* %120, i64 %122
store double %119, double* %123
br label %124
124: ; preds = %87
%125 = load i32, i32* %11
%126 = add nsw i32 %125, 1
store i32 %126, i32* %11
br label %82
127: ; preds = %82
%128 = load double*, double** %7
%129 = load i32, i32* %10
%130 = sub nsw i32 %129, 2
%131 = sext i32 %130 to i64
%132 = getelementptr inbounds double, double* %128, i64 %131
%133 = load double, double* %132
%134 = fneg double %133
%135 = load double*, double** %7
%136 = load i32, i32* %10
%137 = sub nsw i32 %136, 1
%138 = sext i32 %137 to i64
%139 = getelementptr inbounds double, double* %135, i64 %138
%140 = load double, double* %139
%141 = fadd double %134, %140
%142 = load double*, double** %7
%143 = load i32, i32* %10
%144 = sub nsw i32 %143, 1
%145 = sext i32 %144 to i64
%146 = getelementptr inbounds double, double* %142, i64 %145
%147 = load double, double* %146
%148 = fadd double %141, %147
%149 = load double*, double** %17
%150 = load i32, i32* %10
%151 = sub nsw i32 %150, 1
%152 = sext i32 %151 to i64
%153 = getelementptr inbounds double, double* %149, i64 %152
%154 = load double, double* %153
%155 = fsub double %148, %154
%156 = load double*, double** %6
%157 = load i32, i32* %10
%158 = sub nsw i32 %157, 1
%159 = sext i32 %158 to i64
%160 = getelementptr inbounds double, double* %156, i64 %159
store double %155, double* %160
store i32 0, i32* %11
br label %161
161: ; preds = %188, %127
%162 = load i32, i32* %11
%163 = load i32, i32* %10
%164 = icmp slt i32 %162, %163
br i1 %164, label %165, label %191
165: ; preds = %161
%166 = load double*, double** %17
%167 = load i32, i32* %11
%168 = sext i32 %167 to i64
%169 = getelementptr inbounds double, double* %166, i64 %168
%170 = load double, double* %169
%171 = load double*, double** %15
%172 = load i32, i32* %11
%173 = add nsw i32 %172, 1
%174 = sext i32 %173 to i64
%175 = getelementptr inbounds double, double* %171, i64 %174
%176 = load double, double* %175
%177 = fsub double %170, %176
%178 = load double*, double** %15
%179 = load i32, i32* %11
%180 = sext i32 %179 to i64
%181 = getelementptr inbounds double, double* %178, i64 %180
%182 = load double, double* %181
%183 = fadd double %177, %182
%184 = load double*, double** %16
%185 = load i32, i32* %11
%186 = sext i32 %185 to i64
%187 = getelementptr inbounds double, double* %184, i64 %186
store double %183, double* %187
br label %188
188: ; preds = %165
%189 = load i32, i32* %11
%190 = add nsw i32 %189, 1
store i32 %190, i32* %11
br label %161
191: ; preds = %161
%192 = load double*, double** %6
%193 = load double*, double** %16
%194 = load i32, i32* %10
%195 = call i32 (double*, double*, double*, i32, ...) bitcast (i32 (...)* @Thomas to i32 (double*, double*, double*, i32, ...)*)(double* %13, double* %192, double* %193, i32 %194)
store i32 0, i32* %11
br label %196
196: ; preds = %232, %191
%197 = load i32, i32* %11
%198 = load i32, i32* %10
%199 = icmp slt i32 %197, %198
br i1 %199, label %200, label %235
200: ; preds = %196
%201 = load double*, double** %6
%202 = load i32, i32* %11
%203 = sext i32 %202 to i64
%204 = getelementptr inbounds double, double* %201, i64 %203
%205 = load double, double* %204
%206 = load double, double* %9
%207 = fcmp ogt double %205, %206
br i1 %207, label %208, label %214
208: ; preds = %200
%209 = load double, double* %9
%210 = load double*, double** %6
%211 = load i32, i32* %11
%212 = sext i32 %211 to i64
%213 = getelementptr inbounds double, double* %210, i64 %212
store double %209, double* %213
br label %231
214: ; preds = %200
%215 = load double*, double** %6
%216 = load i32, i32* %11
%217 = sext i32 %216 to i64
%218 = getelementptr inbounds double, double* %215, i64 %217
%219 = load double, double* %218
%220 = load double, double* %9
%221 = fneg double %220
%222 = fcmp olt double %219, %221
br i1 %222, label %223, label %230
223: ; preds = %214
%224 = load double, double* %9
%225 = fneg double %224
%226 = load double*, double** %6
%227 = load i32, i32* %11
%228 = sext i32 %227 to i64
%229 = getelementptr inbounds double, double* %226, i64 %228
store double %225, double* %229
br label %230
230: ; preds = %223, %214
br label %231
231: ; preds = %230, %208
br label %232
232: ; preds = %231
%233 = load i32, i32* %11
%234 = add nsw i32 %233, 1
store i32 %234, i32* %11
br label %196
235: ; preds = %196
%236 = load i32*, i32** %14
%237 = bitcast i32* %236 to i8*
%238 = load double*, double** %15
%239 = bitcast double* %238 to i8*
%240 = load double*, double** %16
%241 = bitcast double* %240 to i8*
%242 = load double*, double** %17
%243 = bitcast double* %242 to i8*
ret void
}

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