#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 */
typedef scalar_t__ clock_t;

/* Variables and functions */
double CLOCKS_PER_SEC;
scalar_t__ clock();
int /*<<< orphan*/ free_2d(double **);
int /*<<< orphan*/ init(double **, int, int);
double **malloc_2d(int, int);
int /*<<< orphan*/ printf(char *, double, double, double);
int main(int argc, char **argv) {
  double eps;
  double **u, **unew;
  const double factor = 0.25;
  const int niter = 2;
  double mlups = 0e0;
  int nx = 1022, ny = 1022;
  clock_t t_start, t_end;
  double dt;
  double sum;
  int i, j;
  int iter;
  u = malloc_2d(nx + 2, ny + 2);
  unew = malloc_2d(nx + 2, ny + 2);
  init(u, nx, ny);
  init(unew, nx, ny);
  t_start = clock();
  for (iter = 0; iter < niter; iter++) {
#pragma acc parallel
    {
#pragma acc loop
      for (i = 1; i < nx + 1; i++)
#pragma acc loop
        for (j = 1; j < ny + 1; j++) {
          unew[i][j] =
              factor * (u[i - 1][j] + u[i + 1][j] + u[i][j - 1] + u[i][j + 1]);
        }
    }
#pragma acc parallel
    {
#pragma acc loop
      for (i = 1; i < nx + 1; i++)
#pragma acc loop
        for (j = 1; j < ny + 1; j++) {
          u[i][j] = factor * (unew[i - 1][j] + unew[i + 1][j] + unew[i][j - 1] +
                              unew[i][j + 1]);
        }
    }
  }
  sum = 0.0;
  for (i = 1; i < nx + 1; i++)
    for (j = 1; j < ny + 1; j++)
      sum += u[i][j];
  free_2d(u);
  free_2d(unew);
  mlups = niter * nx * ny * 1.0e-6;
  t_end = clock();
  dt = ((double)(t_end - t_start)) / CLOCKS_PER_SEC;
  printf("Stencil: Time =%18.16f sec, MLups/s=%18.16f, sum=%18.16f\n", dt,
         (double)mlups / dt, sum);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  0xe8f(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
movl   $0x2,-0x34(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x40(%rbp)
movl   $0x3fe,-0x44(%rbp)
movl   $0x3fe,-0x48(%rbp)
mov    -0x44(%rbp),%edi
add    $0x2,%edi
mov    -0x48(%rbp),%esi
add    $0x2,%esi
call   1030 <malloc_2d@plt>
mov    %rax,-0x20(%rbp)
mov    -0x44(%rbp),%edi
add    $0x2,%edi
mov    -0x48(%rbp),%esi
add    $0x2,%esi
call   1030 <malloc_2d@plt>
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x44(%rbp),%esi
mov    -0x48(%rbp),%edx
call   1060 <init@plt>
mov    -0x28(%rbp),%rdi
mov    -0x44(%rbp),%esi
mov    -0x48(%rbp),%edx
call   1060 <init@plt>
mov    $0x0,%al
call   1040 <clock@plt>
mov    %rax,-0x50(%rbp)
movl   $0x0,-0x74(%rbp)
cmpl   $0x2,-0x74(%rbp)
jge    13be <main+0x26e>
movl   $0x1,-0x6c(%rbp)
mov    -0x6c(%rbp),%eax
mov    -0x44(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jge    12d1 <main+0x181>
movl   $0x1,-0x70(%rbp)
mov    -0x70(%rbp),%eax
mov    -0x48(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jge    12be <main+0x16e>
mov    -0x20(%rbp),%rax
mov    -0x6c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x70(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x20(%rbp),%rax
mov    -0x6c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x70(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm1
mov    -0x20(%rbp),%rax
movslq -0x6c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x70(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm1
mov    -0x20(%rbp),%rax
movslq -0x6c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x70(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm1
movsd  0xd69(%rip),%xmm0
mulsd  %xmm1,%xmm0
mov    -0x28(%rbp),%rax
movslq -0x6c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x70(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x70(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x70(%rbp)
jmp    1216 <main+0xc6>
jmp    12c3 <main+0x173>
mov    -0x6c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x6c(%rbp)
jmp    11fe <main+0xae>
movl   $0x1,-0x6c(%rbp)
mov    -0x6c(%rbp),%eax
mov    -0x44(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jge    13ab <main+0x25b>
movl   $0x1,-0x70(%rbp)
mov    -0x70(%rbp),%eax
mov    -0x48(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jge    1398 <main+0x248>
mov    -0x28(%rbp),%rax
mov    -0x6c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x70(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x28(%rbp),%rax
mov    -0x6c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x70(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm1
mov    -0x28(%rbp),%rax
movslq -0x6c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x70(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm1
mov    -0x28(%rbp),%rax
movslq -0x6c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x70(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm1
movsd  0xc8f(%rip),%xmm0
mulsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movslq -0x6c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x70(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x70(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x70(%rbp)
jmp    12f0 <main+0x1a0>
jmp    139d <main+0x24d>
mov    -0x6c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x6c(%rbp)
jmp    12d8 <main+0x188>
jmp    13b0 <main+0x260>
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    11ed <main+0x9d>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x68(%rbp)
movl   $0x1,-0x6c(%rbp)
mov    -0x6c(%rbp),%eax
mov    -0x44(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jge    1436 <main+0x2e6>
movl   $0x1,-0x70(%rbp)
mov    -0x70(%rbp),%eax
mov    -0x48(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jge    1423 <main+0x2d3>
mov    -0x20(%rbp),%rax
movslq -0x6c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x70(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
addsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x70(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x70(%rbp)
jmp    13e5 <main+0x295>
jmp    1428 <main+0x2d8>
mov    -0x6c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x6c(%rbp)
jmp    13cd <main+0x27d>
mov    -0x20(%rbp),%rdi
call   1070 <free_2d@plt>
mov    -0x28(%rbp),%rdi
call   1070 <free_2d@plt>
mov    -0x44(%rbp),%eax
shl    $0x1,%eax
imul   -0x48(%rbp),%eax
cvtsi2sd %eax,%xmm0
movsd  0xbaa(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    $0x0,%al
call   1040 <clock@plt>
mov    %rax,-0x58(%rbp)
mov    -0x58(%rbp),%rax
sub    -0x50(%rbp),%rax
cvtsi2sd %rax,%xmm0
mov    0x2b62(%rip),%rax
divsd  (%rax),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x60(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm1
divsd  -0x60(%rbp),%xmm1
movsd  -0x68(%rbp),%xmm2
lea    0xb66(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    $0x400,%edi
mov    $0x400,%esi
call   1030 <malloc_2d@plt>
mov    %rax,%rbx
mov    $0x400,%edi
mov    $0x400,%esi
call   1030 <malloc_2d@plt>
mov    %rax,%rbp
mov    %rbx,%rdi
mov    $0x3fe,%esi
mov    $0x3fe,%edx
call   1060 <init@plt>
mov    %rbp,0x28(%rsp)
mov    %rbp,%rdi
mov    $0x3fe,%esi
mov    $0x3fe,%edx
call   1060 <init@plt>
xor    %eax,%eax
call   1040 <clock@plt>
mov    %rax,0x38(%rsp)
mov    (%rbx),%r11
mov    %rbx,0x10(%rsp)
mov    0x8(%rbx),%r9
mov    $0x1,%ebp
movsd  0xe40(%rip),%xmm0
movapd 0xe28(%rip),%xmm1
mov    %r9,%r10
mov    %r11,%rdx
xchg   %ax,%ax
mov    %r10,%r15
mov    0x10(%rsp),%rax
mov    0x8(%rax,%rbp,8),%r10
mov    0x28(%rsp),%rax
mov    %rbp,0x20(%rsp)
mov    (%rax,%rbp,8),%rbp
lea    0x8(%rbp),%rbx
lea    0x1ff8(%rbp),%rax
lea    0x8(%rdx),%rcx
lea    0x1ff8(%rdx),%rdi
lea    0x8(%r10),%rsi
lea    0x1ff8(%r10),%r8
lea    0x1ff0(%r15),%r14
lea    0x2000(%r15),%r12
cmp    %rdi,%rbx
setb   0x6(%rsp)
cmp    %rax,%rcx
setb   0x8(%rsp)
cmp    %r8,%rbx
setb   %r13b
cmp    %rax,%rsi
setb   %r8b
cmp    %r14,%rbx
setb   %r14b
cmp    %rax,%r15
setb   0x5(%rsp)
cmp    %r12,%rbx
lea    0x10(%r15),%rdi
setb   %r12b
cmp    %rax,%rdi
setb   0x18(%rsp)
mov    $0x1,%eax
mov    0x8(%rsp),%dil
test   %dil,0x6(%rsp)
jne    131b <main+0x1cb>
mov    $0x1,%eax
and    %r8b,%r13b
jne    131b <main+0x1cb>
mov    $0x1,%eax
and    0x5(%rsp),%r14b
jne    131b <main+0x1cb>
mov    $0x1,%eax
and    0x18(%rsp),%r12b
jne    131b <main+0x1cb>
xor    %eax,%eax
nopl   0x0(%rax,%rax,1)
movupd 0x8(%rdx,%rax,8),%xmm2
movupd 0x18(%rdx,%rax,8),%xmm3
movupd 0x8(%r10,%rax,8),%xmm4
addpd  %xmm2,%xmm4
movupd 0x18(%r10,%rax,8),%xmm2
addpd  %xmm3,%xmm2
movupd (%r15,%rax,8),%xmm3
addpd  %xmm4,%xmm3
movupd 0x10(%r15,%rax,8),%xmm4
movupd 0x20(%r15,%rax,8),%xmm5
addpd  %xmm4,%xmm2
addpd  %xmm5,%xmm2
addpd  %xmm4,%xmm3
mulpd  %xmm1,%xmm3
mulpd  %xmm1,%xmm2
movupd %xmm3,0x8(%rbp,%rax,8)
movupd %xmm2,0x18(%rbp,%rax,8)
add    $0x4,%rax
cmp    $0x3fc,%rax
jne    12b0 <main+0x160>
mov    $0x3fd,%eax
mov    0x20(%rsp),%rbp
add    $0x1,%rbp
shl    $0x3,%rax
mov    $0x1ff8,%edx
mov    %r15,%rdi
movsd  -0x8(%rcx,%rax,1),%xmm2
addsd  -0x8(%rsi,%rax,1),%xmm2
addsd  -0x8(%rdi,%rax,1),%xmm2
addsd  0x8(%rdi,%rax,1),%xmm2
mulsd  %xmm0,%xmm2
movsd  %xmm2,-0x8(%rbx,%rax,1)
movsd  (%rcx,%rax,1),%xmm2
addsd  (%rsi,%rax,1),%xmm2
addsd  (%rdi,%rax,1),%xmm2
addsd  0x10(%rdi,%rax,1),%xmm2
mulsd  %xmm0,%xmm2
movsd  %xmm2,(%rbx,%rax,1)
add    $0xfffffffffffffff0,%rdx
add    $0x10,%rdi
add    $0x10,%rbx
add    $0x10,%rsi
add    $0x10,%rcx
cmp    %rdx,%rax
jne    1330 <main+0x1e0>
mov    %r15,%rdx
cmp    $0x3ff,%rbp
jne    11e0 <main+0x90>
mov    0x28(%rsp),%rax
mov    (%rax),%r10
mov    0x8(%rax),%r13
mov    $0x1,%r14d
mov    %r9,%rdi
mov    %r13,0x40(%rsp)
mov    %r10,%rbp
cs nopw 0x0(%rax,%rax,1)
mov    %r13,%rcx
mov    0x28(%rsp),%rax
mov    %r14,0x20(%rsp)
mov    0x8(%rax,%r14,8),%r13
lea    0x8(%rdi),%rbx
lea    0x1ff8(%rdi),%r8
lea    0x8(%rbp),%rdx
lea    0x1ff8(%rbp),%r14
lea    0x8(%r13),%rsi
lea    0x1ff8(%r13),%r15
lea    0x1ff0(%rcx),%rax
mov    %rax,0x30(%rsp)
lea    0x10(%rcx),%r12
mov    %r12,0x8(%rsp)
lea    0x2000(%rcx),%rax
mov    %rax,0x18(%rsp)
cmp    %r14,%rbx
setb   0x6(%rsp)
cmp    %r8,%rdx
setb   0x5(%rsp)
cmp    %r15,%rbx
setb   %r14b
cmp    %r8,%rsi
setb   0x7(%rsp)
cmp    0x30(%rsp),%rbx
setb   %r12b
cmp    %r8,%rcx
setb   0x30(%rsp)
cmp    0x18(%rsp),%rbx
setb   0x18(%rsp)
cmp    %r8,0x8(%rsp)
setb   0x8(%rsp)
mov    $0x1,%r15d
mov    0x5(%rsp),%al
test   %al,0x6(%rsp)
jne    1509 <main+0x3b9>
mov    $0x1,%r15d
and    0x7(%rsp),%r14b
jne    1509 <main+0x3b9>
mov    $0x1,%r15d
and    0x30(%rsp),%r12b
jne    1509 <main+0x3b9>
mov    $0x1,%r15d
mov    0x8(%rsp),%al
and    %al,0x18(%rsp)
jne    1509 <main+0x3b9>
xor    %eax,%eax
movupd 0x8(%rbp,%rax,8),%xmm2
movupd 0x18(%rbp,%rax,8),%xmm3
movupd 0x8(%r13,%rax,8),%xmm4
addpd  %xmm2,%xmm4
movupd 0x18(%r13,%rax,8),%xmm2
addpd  %xmm3,%xmm2
movupd (%rcx,%rax,8),%xmm3
addpd  %xmm4,%xmm3
movupd 0x10(%rcx,%rax,8),%xmm4
movupd 0x20(%rcx,%rax,8),%xmm5
addpd  %xmm4,%xmm2
addpd  %xmm5,%xmm2
addpd  %xmm4,%xmm3
mulpd  %xmm1,%xmm3
mulpd  %xmm1,%xmm2
movupd %xmm3,0x8(%rdi,%rax,8)
movupd %xmm2,0x18(%rdi,%rax,8)
add    $0x4,%rax
cmp    $0x3fc,%rax
jne    14a0 <main+0x350>
mov    $0x3fd,%r15d
mov    0x20(%rsp),%r14
add    $0x1,%r14
shl    $0x3,%r15
mov    $0x1ff8,%edi
mov    %rcx,%rbp
xchg   %ax,%ax
movsd  -0x8(%rdx,%r15,1),%xmm2
addsd  -0x8(%rsi,%r15,1),%xmm2
addsd  -0x8(%rbp,%r15,1),%xmm2
addsd  0x8(%rbp,%r15,1),%xmm2
mulsd  %xmm0,%xmm2
movsd  %xmm2,-0x8(%rbx,%r15,1)
movsd  (%rdx,%r15,1),%xmm2
addsd  (%rsi,%r15,1),%xmm2
addsd  0x0(%rbp,%r15,1),%xmm2
addsd  0x10(%rbp,%r15,1),%xmm2
mulsd  %xmm0,%xmm2
movsd  %xmm2,(%rbx,%r15,1)
add    $0xfffffffffffffff0,%rdi
add    $0x10,%rbp
add    $0x10,%rbx
add    $0x10,%rsi
add    $0x10,%rdx
cmp    %rdi,%r15
jne    1520 <main+0x3d0>
cmp    $0x3ff,%r14
mov    0x40(%rsp),%r8
je     15a3 <main+0x453>
mov    0x10(%rsp),%rax
mov    (%rax,%r14,8),%rdi
mov    %rcx,%rbp
jmp    13c0 <main+0x270>
mov    $0x1,%r14d
mov    %r8,%rbx
mov    %r9,%r13
nop
mov    %r13,%rax
mov    0x10(%rsp),%rcx
mov    %r14,0x20(%rsp)
mov    0x8(%rcx,%r14,8),%r13
lea    0x8(%rbx),%rcx
lea    0x1ff8(%rbx),%rbp
lea    0x8(%r11),%rdx
lea    0x1ff8(%r11),%r15
lea    0x8(%r13),%rsi
lea    0x1ff8(%r13),%r14
lea    0x1ff0(%rax),%r12
lea    0x10(%rax),%rdi
mov    %rdi,0x8(%rsp)
lea    0x2000(%rax),%rdi
cmp    %r15,%rcx
setb   0x6(%rsp)
cmp    %rbp,%rdx
setb   0x5(%rsp)
cmp    %r14,%rcx
setb   %r15b
cmp    %rbp,%rsi
setb   0x18(%rsp)
cmp    %r12,%rcx
setb   %r14b
cmp    %rbp,%rax
setb   0x30(%rsp)
cmp    %rdi,%rcx
setb   %dil
cmp    %rbp,0x8(%rsp)
setb   0x8(%rsp)
mov    $0x1,%ebp
mov    0x5(%rsp),%r12b
test   %r12b,0x6(%rsp)
jne    16eb <main+0x59b>
mov    $0x1,%ebp
and    0x18(%rsp),%r15b
jne    16eb <main+0x59b>
mov    $0x1,%ebp
and    0x30(%rsp),%r14b
jne    16eb <main+0x59b>
mov    $0x1,%ebp
and    0x8(%rsp),%dil
jne    16eb <main+0x59b>
xor    %edi,%edi
nopl   0x0(%rax)
movupd 0x8(%r11,%rdi,8),%xmm2
movupd 0x18(%r11,%rdi,8),%xmm3
movupd 0x8(%r13,%rdi,8),%xmm4
addpd  %xmm2,%xmm4
movupd 0x18(%r13,%rdi,8),%xmm2
addpd  %xmm3,%xmm2
movupd (%rax,%rdi,8),%xmm3
addpd  %xmm4,%xmm3
movupd 0x10(%rax,%rdi,8),%xmm4
movupd 0x20(%rax,%rdi,8),%xmm5
addpd  %xmm4,%xmm2
addpd  %xmm5,%xmm2
addpd  %xmm4,%xmm3
mulpd  %xmm1,%xmm3
mulpd  %xmm1,%xmm2
movupd %xmm3,0x8(%rbx,%rdi,8)
movupd %xmm2,0x18(%rbx,%rdi,8)
add    $0x4,%rdi
cmp    $0x3fc,%rdi
jne    1680 <main+0x530>
mov    $0x3fd,%ebp
mov    0x20(%rsp),%r14
add    $0x1,%r14
shl    $0x3,%rbp
mov    $0x1ff8,%ebx
mov    %rax,%rdi
movsd  -0x8(%rdx,%rbp,1),%xmm2
addsd  -0x8(%rsi,%rbp,1),%xmm2
addsd  -0x8(%rdi,%rbp,1),%xmm2
addsd  0x8(%rdi,%rbp,1),%xmm2
mulsd  %xmm0,%xmm2
movsd  %xmm2,-0x8(%rcx,%rbp,1)
movsd  (%rdx,%rbp,1),%xmm2
addsd  (%rsi,%rbp,1),%xmm2
addsd  (%rdi,%rbp,1),%xmm2
addsd  0x10(%rdi,%rbp,1),%xmm2
mulsd  %xmm0,%xmm2
movsd  %xmm2,(%rcx,%rbp,1)
add    $0xfffffffffffffff0,%rbx
add    $0x10,%rdi
add    $0x10,%rcx
add    $0x10,%rsi
add    $0x10,%rdx
cmp    %rbx,%rbp
jne    1700 <main+0x5b0>
cmp    $0x3ff,%r14
je     1773 <main+0x623>
mov    0x28(%rsp),%rcx
mov    (%rcx,%r14,8),%rbx
mov    %rax,%r11
jmp    15b0 <main+0x460>
mov    $0x1,%r11d
mov    %r9,%rsi
nopl   0x0(%rax)
mov    %r8,%rax
mov    0x28(%rsp),%rcx
mov    %r11,0x20(%rsp)
mov    0x8(%rcx,%r11,8),%r8
lea    0x8(%rsi),%rdi
lea    0x1ff8(%rsi),%rbp
lea    0x8(%r10),%rdx
lea    0x1ff8(%r10),%r15
lea    0x8(%r8),%rbx
lea    0x1ff8(%r8),%r11
lea    0x1ff0(%rax),%r14
lea    0x10(%rax),%rcx
mov    %rcx,0x8(%rsp)
lea    0x2000(%rax),%r13
cmp    %r15,%rdi
setb   0x6(%rsp)
cmp    %rbp,%rdx
setb   %r15b
cmp    %r11,%rdi
setb   %cl
cmp    %rbp,%rbx
setb   %r11b
cmp    %r14,%rdi
setb   %r12b
cmp    %rbp,%rax
setb   0x5(%rsp)
cmp    %r13,%rdi
setb   %r14b
cmp    %rbp,0x8(%rsp)
setb   %r13b
mov    $0x1,%ebp
test   %r15b,0x6(%rsp)
jne    18ab <main+0x75b>
mov    $0x1,%ebp
and    %r11b,%cl
jne    18ab <main+0x75b>
mov    $0x1,%ebp
and    0x5(%rsp),%r12b
jne    18ab <main+0x75b>
mov    $0x1,%ebp
and    %r13b,%r14b
jne    18ab <main+0x75b>
xor    %ecx,%ecx
nop
movupd 0x8(%r10,%rcx,8),%xmm2
movupd 0x18(%r10,%rcx,8),%xmm3
movupd 0x8(%r8,%rcx,8),%xmm4
addpd  %xmm2,%xmm4
movupd 0x18(%r8,%rcx,8),%xmm2
addpd  %xmm3,%xmm2
movupd (%rax,%rcx,8),%xmm3
addpd  %xmm4,%xmm3
movupd 0x10(%rax,%rcx,8),%xmm4
movupd 0x20(%rax,%rcx,8),%xmm5
addpd  %xmm4,%xmm2
addpd  %xmm5,%xmm2
addpd  %xmm4,%xmm3
mulpd  %xmm1,%xmm3
mulpd  %xmm1,%xmm2
movupd %xmm3,0x8(%rsi,%rcx,8)
movupd %xmm2,0x18(%rsi,%rcx,8)
add    $0x4,%rcx
cmp    $0x3fc,%rcx
jne    1840 <main+0x6f0>
mov    $0x3fd,%ebp
mov    0x20(%rsp),%r11
add    $0x1,%r11
shl    $0x3,%rbp
mov    $0x1ff8,%esi
mov    %rax,%rcx
movsd  -0x8(%rdx,%rbp,1),%xmm2
addsd  -0x8(%rbx,%rbp,1),%xmm2
addsd  -0x8(%rcx,%rbp,1),%xmm2
addsd  0x8(%rcx,%rbp,1),%xmm2
mulsd  %xmm0,%xmm2
movsd  %xmm2,-0x8(%rdi,%rbp,1)
movsd  (%rdx,%rbp,1),%xmm2
addsd  (%rbx,%rbp,1),%xmm2
addsd  (%rcx,%rbp,1),%xmm2
addsd  0x10(%rcx,%rbp,1),%xmm2
mulsd  %xmm0,%xmm2
movsd  %xmm2,(%rdi,%rbp,1)
add    $0xfffffffffffffff0,%rsi
add    $0x10,%rcx
add    $0x10,%rdi
add    $0x10,%rbx
add    $0x10,%rdx
cmp    %rsi,%rbp
jne    18c0 <main+0x770>
cmp    $0x3ff,%r11
je     1933 <main+0x7e3>
mov    0x10(%rsp),%rcx
mov    (%rcx,%r11,8),%rsi
mov    %rax,%r10
jmp    1780 <main+0x630>
xorpd  %xmm0,%xmm0
mov    $0x1,%eax
nopl   0x0(%rax)
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
addsd  0x8(%r9,%rcx,8),%xmm0
addsd  0x10(%r9,%rcx,8),%xmm0
addsd  0x18(%r9,%rcx,8),%xmm0
addsd  0x20(%r9,%rcx,8),%xmm0
addsd  0x28(%r9,%rcx,8),%xmm0
addsd  0x30(%r9,%rcx,8),%xmm0
addsd  0x38(%r9,%rcx,8),%xmm0
add    $0x7,%rcx
cmp    $0x3fe,%rcx
jne    1950 <main+0x800>
add    $0x1,%rax
cmp    $0x3ff,%rax
je     19a5 <main+0x855>
mov    0x10(%rsp),%rcx
mov    (%rcx,%rax,8),%r9
jmp    1940 <main+0x7f0>
mov    0x10(%rsp),%rdi
movsd  %xmm0,0x10(%rsp)
call   1070 <free_2d@plt>
mov    0x28(%rsp),%rdi
call   1070 <free_2d@plt>
xor    %eax,%eax
call   1040 <clock@plt>
sub    0x38(%rsp),%rax
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
mov    0x260e(%rip),%rax
divsd  (%rax),%xmm0
movsd  0x632(%rip),%xmm1
divsd  %xmm0,%xmm1
lea    0x62f(%rip),%rdi
movsd  0x10(%rsp),%xmm2
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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