#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 /*<<< orphan*/ exit(int);
double fabs(double);
double pow(double, int);
int /*<<< orphan*/ printf(char *, ...);
void solve_pressure_poisson(double *restrict p, double dx, double dy, double dt,
                            double *restrict u, double *restrict v,
                            double *restrict rho) {
  int i, j;
  int stepcount;
  double diff, pdif, pnt;
  double b[51 * 101];
  double pn[51 * 101];
  double inv_dt = 1. / dt;
  double dx2 = dx * dx;
  double dy2 = dy * dy;
  double twodx = 2. * dx;
  double twody = 2. * dy;
  unsigned int n = 0;
  unsigned int s = 0;
  unsigned int m = 0;
  unsigned int e = 0;
  unsigned int w = 0;
#pragma omp parallel for
  for (j = 1; j < (51 - 1); j++) {
#pragma omp simd safelen(3)
    for (i = 1; i < (101 - 1); i++) {
      m = 101 * j + i;
      n = 101 * (j - 1) + i;
      s = 101 * (j + 1) + i;
      e = 101 * j + (i + 1);
      w = 101 * j + (i - 1);
      b[m] = ((rho[m] * dx2 * dy2) / (2 * (dx2 + dy2))) *
             (inv_dt * (((u[e] - u[w]) / twodx) + ((v[s] - v[n]) / twody)) -
              pow(((u[e] - u[w]) / twodx), 2) -
              2 * (((u[s] - u[n]) / twody) * ((v[e] - v[w]) / twodx)) -
              pow(((v[s] - v[n]) / twody), 2));
    }
  }
  diff = 1.0;
  stepcount = 0;
  while (1) {
    if (stepcount >= 1e7) {
      printf("\033[0m");
      printf("Unable to solve poisson: sc = %d, diff = %e\n", stepcount, diff);
      exit(1);
    }
    if (diff < 1e-5 && stepcount > 4)
      break;
#pragma omp parallel for
    for (i = 0; i < 101 * 51; i++) {
      pn[i] = p[i];
    }
#pragma omp parallel for
    for (j = 1; j < 51 - 1; j++) {
#pragma omp simd safelen(3)
      for (i = 1; i < 101 - 1; i++) {
        m = 101 * j + i;
        n = 101 * (j - 1) + i;
        s = 101 * (j + 1) + i;
        e = 101 * j + (i + 1);
        w = 101 * j + (i - 1);
        p[m] = ((pn[e] + pn[w]) * dy2 + (pn[s] + pn[n]) * dx2) /
                   (2 * (dx2 + dy2)) -
               b[m];
      }
    }
#pragma omp parallel for
    for (j = 0; j < 51; j++) {
      p[101 * j + 0] = p[101 * j + 1];
      p[101 * j + (101 - 1)] = p[101 * j + (101 - 2)];
    }
#pragma omp parallel for
    for (i = 0; i < 101; i++) {
      p[0 + i] = 0.;
      p[101 * (51 - 1) + i] = 0.;
    }
    pdif = 0.;
    pnt = 0.;
#pragma omp parallel for
    for (i = 0; i < 101 * 51; i++) {
      pdif += fabs(fabs(p[i]) - fabs(pn[i]));
      pnt += fabs(pn[i]);
    }
    if (pnt > 0.)
      diff = fabs(pdif / pnt);
    else
      diff = 1.0;
    if (stepcount % 10000 == 0) {
      printf("sc: %d, pdif: %e, pnt: %e, Diff: %e\n", stepcount, pdif, pnt,
             diff);
    }
    stepcount += 1;
  }
}


x86 assembly (clang, -O0):
<solve_pressure_poisson>:
push   %rbp
mov    %rsp,%rbp
sub    $0x142c0,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
mov    %rsi,-0x28(%rbp)
mov    %rdx,-0x30(%rbp)
mov    %rcx,-0x38(%rbp)
movsd  0xea6(%rip),%xmm0
divsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x14268(%rbp)
ff
movsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x14270(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x14278(%rbp)
ff
movsd  0xe65(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x14280(%rbp)
ff
movsd  0xe50(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x14288(%rbp)
ff
movl   $0x0,-0x1428c(%rbp)
movl   $0x0,-0x14290(%rbp)
movl   $0x0,-0x14294(%rbp)
movl   $0x0,-0x14298(%rbp)
movl   $0x0,-0x1429c(%rbp)
movl   $0x1,-0x40(%rbp)
cmpl   $0x32,-0x40(%rbp)
jge    1452 <solve_pressure_poisson+0x322>
movl   $0x1,-0x3c(%rbp)
cmpl   $0x64,-0x3c(%rbp)
jge    143f <solve_pressure_poisson+0x30f>
imul   $0x65,-0x40(%rbp),%eax
add    -0x3c(%rbp),%eax
mov    %eax,-0x14294(%rbp)
mov    -0x40(%rbp),%eax
sub    $0x1,%eax
imul   $0x65,%eax,%eax
add    -0x3c(%rbp),%eax
mov    %eax,-0x1428c(%rbp)
mov    -0x40(%rbp),%eax
add    $0x1,%eax
imul   $0x65,%eax,%eax
add    -0x3c(%rbp),%eax
mov    %eax,-0x14290(%rbp)
imul   $0x65,-0x40(%rbp),%eax
mov    -0x3c(%rbp),%ecx
add    $0x1,%ecx
add    %ecx,%eax
mov    %eax,-0x14298(%rbp)
imul   $0x65,-0x40(%rbp),%eax
mov    -0x3c(%rbp),%ecx
sub    $0x1,%ecx
add    %ecx,%eax
mov    %eax,-0x1429c(%rbp)
mov    -0x38(%rbp),%rax
mov    -0x14294(%rbp),%ecx
movsd  (%rax,%rcx,8),%xmm0
mulsd  -0x14270(%rbp),%xmm0
ff
mulsd  -0x14278(%rbp),%xmm0
ff
movsd  -0x14270(%rbp),%xmm2
ff
addsd  -0x14278(%rbp),%xmm2
ff
movsd  0xd63(%rip),%xmm1
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x142a8(%rbp)
ff
movsd  -0x14268(%rbp),%xmm0
ff
movsd  %xmm0,-0x142b8(%rbp)
ff
mov    -0x28(%rbp),%rax
mov    -0x14298(%rbp),%ecx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
mov    -0x1429c(%rbp),%ecx
subsd  (%rax,%rcx,8),%xmm0
divsd  -0x14280(%rbp),%xmm0
ff
mov    -0x30(%rbp),%rax
mov    -0x14290(%rbp),%ecx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x30(%rbp),%rax
mov    -0x1428c(%rbp),%ecx
subsd  (%rax,%rcx,8),%xmm1
divsd  -0x14288(%rbp),%xmm1
ff
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x142c0(%rbp)
ff
mov    -0x28(%rbp),%rax
mov    -0x14298(%rbp),%ecx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
mov    -0x1429c(%rbp),%ecx
subsd  (%rax,%rcx,8),%xmm0
divsd  -0x14280(%rbp),%xmm0
ff
mov    $0x2,%edi
call   1040 <pow@plt>
movsd  -0x142c0(%rbp),%xmm2
ff
movaps %xmm0,%xmm1
movsd  -0x142b8(%rbp),%xmm0
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x28(%rbp),%rax
mov    -0x14290(%rbp),%ecx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x28(%rbp),%rax
mov    -0x1428c(%rbp),%ecx
subsd  (%rax,%rcx,8),%xmm1
divsd  -0x14288(%rbp),%xmm1
ff
mov    -0x30(%rbp),%rax
mov    -0x14298(%rbp),%ecx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x30(%rbp),%rax
mov    -0x1429c(%rbp),%ecx
subsd  (%rax,%rcx,8),%xmm2
divsd  -0x14280(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm1
addsd  %xmm1,%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x142b0(%rbp)
ff
mov    -0x30(%rbp),%rax
mov    -0x14290(%rbp),%ecx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x30(%rbp),%rax
mov    -0x1428c(%rbp),%ecx
subsd  (%rax,%rcx,8),%xmm0
divsd  -0x14288(%rbp),%xmm0
ff
mov    $0x2,%edi
call   1040 <pow@plt>
movsd  -0x142b0(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0x142a8(%rbp),%xmm0
ff
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
mov    -0x14294(%rbp),%eax
movsd  %xmm0,-0xa160(%rbp,%rax,8)
ff ff
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1207 <solve_pressure_poisson+0xd7>
jmp    1444 <solve_pressure_poisson+0x314>
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    11f6 <solve_pressure_poisson+0xc6>
movsd  0xbae(%rip),%xmm0
movsd  %xmm0,-0x50(%rbp)
movl   $0x0,-0x44(%rbp)
cvtsi2sdl -0x44(%rbp),%xmm0
movsd  0xb9d(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     14ab <solve_pressure_poisson+0x37b>
lea    0xbac(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x44(%rbp),%esi
movsd  -0x50(%rbp),%xmm0
lea    0xb9b(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
movsd  0xb65(%rip),%xmm0
ucomisd -0x50(%rbp),%xmm0
jbe    14cd <solve_pressure_poisson+0x39d>
cmpl   $0x4,-0x44(%rbp)
jle    14cd <solve_pressure_poisson+0x39d>
jmp    1807 <solve_pressure_poisson+0x6d7>
movl   $0x0,-0x3c(%rbp)
cmpl   $0x141f,-0x3c(%rbp)
jge    1509 <solve_pressure_poisson+0x3d9>
mov    -0x8(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movslq -0x3c(%rbp),%rax
movsd  %xmm0,-0x14260(%rbp,%rax,8)
fe ff
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    14d4 <solve_pressure_poisson+0x3a4>
movl   $0x1,-0x40(%rbp)
cmpl   $0x32,-0x40(%rbp)
jge    1633 <solve_pressure_poisson+0x503>
movl   $0x1,-0x3c(%rbp)
cmpl   $0x64,-0x3c(%rbp)
jge    1620 <solve_pressure_poisson+0x4f0>
imul   $0x65,-0x40(%rbp),%eax
add    -0x3c(%rbp),%eax
mov    %eax,-0x14294(%rbp)
mov    -0x40(%rbp),%eax
sub    $0x1,%eax
imul   $0x65,%eax,%eax
add    -0x3c(%rbp),%eax
mov    %eax,-0x1428c(%rbp)
mov    -0x40(%rbp),%eax
add    $0x1,%eax
imul   $0x65,%eax,%eax
add    -0x3c(%rbp),%eax
mov    %eax,-0x14290(%rbp)
imul   $0x65,-0x40(%rbp),%eax
mov    -0x3c(%rbp),%ecx
add    $0x1,%ecx
add    %ecx,%eax
mov    %eax,-0x14298(%rbp)
imul   $0x65,-0x40(%rbp),%eax
mov    -0x3c(%rbp),%ecx
sub    $0x1,%ecx
add    %ecx,%eax
mov    %eax,-0x1429c(%rbp)
mov    -0x14298(%rbp),%eax
movsd  -0x14260(%rbp,%rax,8),%xmm0
fe ff
mov    -0x1429c(%rbp),%eax
addsd  -0x14260(%rbp,%rax,8),%xmm0
fe ff
movsd  -0x14278(%rbp),%xmm2
ff
mov    -0x14290(%rbp),%eax
movsd  -0x14260(%rbp,%rax,8),%xmm1
fe ff
mov    -0x1428c(%rbp),%eax
addsd  -0x14260(%rbp,%rax,8),%xmm1
fe ff
mulsd  -0x14270(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x14270(%rbp),%xmm2
ff
addsd  -0x14278(%rbp),%xmm2
ff
movsd  0xa14(%rip),%xmm1
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
mov    -0x14294(%rbp),%eax
subsd  -0xa160(%rbp,%rax,8),%xmm0
ff ff
mov    -0x8(%rbp),%rax
mov    -0x14294(%rbp),%ecx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1521 <solve_pressure_poisson+0x3f1>
jmp    1625 <solve_pressure_poisson+0x4f5>
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    1510 <solve_pressure_poisson+0x3e0>
movl   $0x0,-0x40(%rbp)
cmpl   $0x33,-0x40(%rbp)
jge    169e <solve_pressure_poisson+0x56e>
mov    -0x8(%rbp),%rax
imul   $0x65,-0x40(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
imul   $0x65,-0x40(%rbp),%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x8(%rbp),%rax
imul   $0x65,-0x40(%rbp),%ecx
add    $0x63,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
imul   $0x65,-0x40(%rbp),%ecx
add    $0x64,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    163a <solve_pressure_poisson+0x50a>
movl   $0x0,-0x3c(%rbp)
cmpl   $0x65,-0x3c(%rbp)
jge    16ea <solve_pressure_poisson+0x5ba>
mov    -0x8(%rbp),%rax
mov    -0x3c(%rbp),%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x8(%rbp),%rax
mov    -0x3c(%rbp),%ecx
add    $0x13ba,%ecx
movslq %ecx,%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    16a5 <solve_pressure_poisson+0x575>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x58(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x60(%rbp)
movl   $0x0,-0x3c(%rbp)
cmpl   $0x141f,-0x3c(%rbp)
jge    1787 <solve_pressure_poisson+0x657>
mov    -0x8(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movaps 0x8fe(%rip),%xmm1
pand   %xmm1,%xmm0
movslq -0x3c(%rbp),%rax
movsd  -0x14260(%rbp,%rax,8),%xmm1
fe ff
movaps 0x8e6(%rip),%xmm2
pand   %xmm2,%xmm1
subsd  %xmm1,%xmm0
movaps 0x8d7(%rip),%xmm1
pand   %xmm1,%xmm0
addsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movslq -0x3c(%rbp),%rax
movsd  -0x14260(%rbp,%rax,8),%xmm0
fe ff
movaps 0x8b5(%rip),%xmm1
pand   %xmm1,%xmm0
addsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1701 <solve_pressure_poisson+0x5d1>
movsd  -0x60(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    17b8 <solve_pressure_poisson+0x688>
movsd  -0x58(%rbp),%xmm0
divsd  -0x60(%rbp),%xmm0
movaps 0x876(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
jmp    17c5 <solve_pressure_poisson+0x695>
movsd  0x848(%rip),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x44(%rbp),%eax
mov    $0x2710,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    17f9 <solve_pressure_poisson+0x6c9>
mov    -0x44(%rbp),%esi
movsd  -0x58(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm1
movsd  -0x50(%rbp),%xmm2
lea    0x870(%rip),%rdi
mov    $0x3,%al
call   1030 <printf@plt>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1466 <solve_pressure_poisson+0x336>
add    $0x142c0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<solve_pressure_poisson>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x14288,%rsp
mov    %rcx,%r14
mov    %rdx,%rbx
mov    %rsi,%rbp
movapd %xmm0,%xmm5
mov    %rdi,%r13
movsd  0xe87(%rip),%xmm6
divsd  %xmm2,%xmm6
movapd %xmm0,%xmm4
mulsd  %xmm0,%xmm4
movapd %xmm1,%xmm2
mulsd  %xmm1,%xmm2
addsd  %xmm0,%xmm5
addsd  %xmm1,%xmm1
movapd %xmm4,%xmm3
addsd  %xmm2,%xmm3
addsd  %xmm3,%xmm3
add    $0x8,%rbp
add    $0x8,%rbx
add    $0x330,%r14
lea    0xa4c0(%rsp),%r15
mov    $0x1,%eax
movapd %xmm4,0x80(%rsp)
movapd %xmm2,0x70(%rsp)
movapd %xmm3,0x60(%rsp)
movsd  %xmm1,0x30(%rsp)
movsd  %xmm5,0x20(%rsp)
movsd  %xmm6,0x50(%rsp)
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rax,0x48(%rsp)
xor    %r12d,%r12d
nopl   0x0(%rax,%rax,1)
movsd  (%r14,%r12,1),%xmm7
mulsd  %xmm4,%xmm7
mulsd  %xmm2,%xmm7
movsd  0x330(%rbp,%r12,1),%xmm0
subsd  0x320(%rbp,%r12,1),%xmm0
divsd  %xmm3,%xmm7
movsd  %xmm7,(%rsp)
movsd  0x650(%rbx,%r12,1),%xmm2
subsd  (%rbx,%r12,1),%xmm2
divsd  %xmm5,%xmm0
divsd  %xmm1,%xmm2
movsd  %xmm2,0x58(%rsp)
movapd %xmm0,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm6,%xmm1
movsd  %xmm1,0x10(%rsp)
mov    $0x2,%edi
call   1060 <pow@plt>
movsd  0x10(%rsp),%xmm2
subsd  %xmm0,%xmm2
movsd  0x650(%rbp,%r12,1),%xmm0
subsd  0x0(%rbp,%r12,1),%xmm0
divsd  0x30(%rsp),%xmm0
movsd  0x330(%rbx,%r12,1),%xmm1
subsd  0x320(%rbx,%r12,1),%xmm1
divsd  0x20(%rsp),%xmm1
mulsd  %xmm0,%xmm1
addsd  %xmm1,%xmm1
subsd  %xmm1,%xmm2
movsd  %xmm2,0x10(%rsp)
movsd  0x58(%rsp),%xmm0
mov    $0x2,%edi
call   1060 <pow@plt>
movsd  0x50(%rsp),%xmm6
movsd  0x20(%rsp),%xmm5
movsd  0x30(%rsp),%xmm1
movapd 0x60(%rsp),%xmm3
movapd 0x70(%rsp),%xmm2
movapd 0x80(%rsp),%xmm4
movsd  0x10(%rsp),%xmm7
subsd  %xmm0,%xmm7
mulsd  (%rsp),%xmm7
movsd  %xmm7,(%r15,%r12,1)
add    $0x8,%r12
cmp    $0x318,%r12
jne    1200 <solve_pressure_poisson+0xb0>
mov    0x48(%rsp),%rax
add    $0x1,%rax
add    $0x328,%rbp
add    $0x328,%rbx
add    $0x328,%r14
add    $0x328,%r15
cmp    $0x32,%rax
jne    11f0 <solve_pressure_poisson+0xa0>
lea    0x9dd0(%r13),%r14
unpcklpd %xmm4,%xmm4
movapd %xmm2,%xmm5
unpcklpd %xmm2,%xmm5
unpcklpd %xmm3,%xmm3
lea    0x330(%r13),%rbx
xor    %r15d,%r15d
lea    0x90(%rsp),%r12
movsd  0xc91(%rip),%xmm2
movapd %xmm4,0x10(%rsp)
movapd %xmm5,0x30(%rsp)
movapd %xmm3,0x20(%rsp)
jmp    13b6 <solve_pressure_poisson+0x266>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
imul   $0x3afb7e91,%r15d,%eax
ror    $0x4,%eax
cmp    $0x68db8,%eax
jbe    1630 <solve_pressure_poisson+0x4e0>
add    $0x1,%r15d
cmp    $0x989680,%r15d
je     1662 <solve_pressure_poisson+0x512>
movsd  0xc4a(%rip),%xmm0
ucomisd %xmm2,%xmm0
jbe    13ce <solve_pressure_poisson+0x27e>
cmp    $0x4,%r15d
ja     1650 <solve_pressure_poisson+0x500>
mov    $0xa0f8,%edx
mov    %r12,%rdi
mov    %r13,%rsi
call   1050 <memcpy@plt>
movapd 0x20(%rsp),%xmm3
movapd 0x30(%rsp),%xmm7
movapd 0x10(%rsp),%xmm6
movapd 0x60(%rsp),%xmm5
movapd 0x70(%rsp),%xmm4
movapd 0x80(%rsp),%xmm8
mov    $0x1,%eax
lea    0xa4c0(%rsp),%rcx
mov    %rbx,%rdx
lea    0x6e8(%rsp),%rsi
xchg   %ax,%ax
imul   $0x65,%rax,%rdi
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
movupd -0x320(%rsi,%rbp,8),%xmm0
ff ff
movupd -0x330(%rsi,%rbp,8),%xmm1
ff ff
addpd  %xmm0,%xmm1
mulpd  %xmm7,%xmm1
movupd (%rsi,%rbp,8),%xmm0
movupd -0x650(%rsi,%rbp,8),%xmm2
ff ff
addpd  %xmm0,%xmm2
mulpd  %xmm6,%xmm2
addpd  %xmm1,%xmm2
divpd  %xmm3,%xmm2
movupd (%rcx,%rbp,8),%xmm0
subpd  %xmm0,%xmm2
movupd %xmm2,(%rdx,%rbp,8)
add    $0x2,%rbp
cmp    $0x62,%rbp
jne    1430 <solve_pressure_poisson+0x2e0>
movsd  0x3b0(%rsp,%rdi,8),%xmm0
addsd  0x3a0(%rsp,%rdi,8),%xmm0
movsd  0x6d0(%rsp,%rdi,8),%xmm1
addsd  0x80(%rsp,%rdi,8),%xmm1
mulsd  %xmm8,%xmm1
mulsd  %xmm4,%xmm0
addsd  %xmm1,%xmm0
divsd  %xmm5,%xmm0
subsd  0xa4a8(%rsp,%rdi,8),%xmm0
movsd  %xmm0,0x318(%r13,%rdi,8)
add    $0x1,%rax
add    $0x328,%rsi
add    $0x328,%rdx
add    $0x328,%rcx
cmp    $0x32,%rax
jne    1420 <solve_pressure_poisson+0x2d0>
mov    $0x648,%eax
movsd  -0x640(%r13,%rax,1),%xmm0
f9 ff ff
movsd  %xmm0,-0x648(%r13,%rax,1)
f9 ff ff
movsd  -0x330(%r13,%rax,1),%xmm0
fc ff ff
movsd  %xmm0,-0x328(%r13,%rax,1)
fc ff ff
cmp    $0xa418,%rax
je     1550 <solve_pressure_poisson+0x400>
movsd  -0x318(%r13,%rax,1),%xmm0
fc ff ff
movsd  %xmm0,-0x320(%r13,%rax,1)
fc ff ff
movsd  -0x8(%r13,%rax,1),%xmm0
movsd  %xmm0,0x0(%r13,%rax,1)
add    $0x650,%rax
jmp    14f0 <solve_pressure_poisson+0x3a0>
nopw   0x0(%rax,%rax,1)
mov    $0x328,%edx
mov    %r13,%rdi
xor    %esi,%esi
call   1040 <memset@plt>
mov    $0x328,%edx
mov    %r14,%rdi
xor    %esi,%esi
call   1040 <memset@plt>
movsd  0x90(%rsp),%xmm1
movapd 0xaa1(%rip),%xmm4
andpd  %xmm4,%xmm1
xorpd  %xmm0,%xmm0
subsd  %xmm1,%xmm0
andpd  %xmm4,%xmm0
mov    $0x2,%eax
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsd  -0x8(%r13,%rax,8),%xmm2
andpd  %xmm4,%xmm2
movsd  0x88(%rsp,%rax,8),%xmm3
andpd  %xmm4,%xmm3
subsd  %xmm3,%xmm2
andpd  %xmm4,%xmm2
addsd  %xmm0,%xmm2
movsd  0x0(%r13,%rax,8),%xmm0
addsd  %xmm1,%xmm3
movsd  0x90(%rsp,%rax,8),%xmm1
andpd  %xmm4,%xmm0
andpd  %xmm4,%xmm1
subsd  %xmm1,%xmm0
andpd  %xmm4,%xmm0
addsd  %xmm2,%xmm0
addsd  %xmm3,%xmm1
add    $0x2,%rax
cmp    $0x1420,%rax
jne    15a0 <solve_pressure_poisson+0x450>
ucomisd 0xa0c(%rip),%xmm1
movsd  0x9f4(%rip),%xmm2
jbe    1390 <solve_pressure_poisson+0x240>
movapd %xmm0,%xmm2
divsd  %xmm1,%xmm2
andpd  0x9fe(%rip),%xmm2
jmp    1390 <solve_pressure_poisson+0x240>
nopw   0x0(%rax,%rax,1)
lea    0xa2b(%rip),%rdi
mov    %r15d,%esi
mov    $0x3,%al
movapd %xmm2,(%rsp)
call   1030 <printf@plt>
movapd (%rsp),%xmm2
jmp    13a5 <solve_pressure_poisson+0x255>
add    $0x14288,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0x9c7(%rip),%rdi
xor    %eax,%eax
movapd %xmm2,(%rsp)
call   1030 <printf@plt>
lea    0x9b9(%rip),%rdi
mov    $0x989680,%esi
movaps (%rsp),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
mov    $0x1,%edi
call   1070 <exit@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"\1B[0m\00"
@.str.1 = [45 x i8] c"Unable to solve poisson: sc = %d, diff = %e\0A\00"
@.str.2 = [37 x i8] c"sc: %d, pdif: %e, pnt: %e, Diff: %e\0A\00"
define void @solve_pressure_poisson(double* noalias nocapture %0, double %1, double %2, double %3, double* noalias nocapture %4, double* noalias nocapture %5, double* noalias nocapture %6) {
%8 = bitcast double* %0 to i8*
%9 = alloca [5151 x double]
%10 = alloca [5151 x double]
%11 = bitcast [5151 x double]* %10 to i8*
%12 = bitcast [5151 x double]* %9 to i8*
%13 = fdiv double 1.000000e+00, %3
%14 = fmul double %1, %1
%15 = fmul double %2, %2
%16 = fmul double %1, 2.000000e+00
%17 = fmul double %2, 2.000000e+00
%18 = fadd double %14, %15
%19 = fmul double %18, 2.000000e+00
br label %20
20: ; preds = %7, %81
%21 = phi i64 [ 1, %7 ], [ %82, %81 ]
%22 = mul nuw nsw i64 %21, 101
br label %33
23: ; preds = %81
%24 = getelementptr double, double* %0, i64 5050
%25 = bitcast double* %24 to i8*
%26 = insertelement <2 x double> poison, double %14, i64 0
%27 = shufflevector <2 x double> %26, <2 x double> poison, <2 x i32> zeroinitializer
%28 = insertelement <2 x double> poison, double %15, i64 0
%29 = shufflevector <2 x double> %28, <2 x double> poison, <2 x i32> zeroinitializer
%30 = insertelement <2 x double> poison, double %19, i64 0
%31 = shufflevector <2 x double> %30, <2 x double> poison, <2 x i32> zeroinitializer
%32 = getelementptr inbounds [5151 x double], [5151 x double]* %10, i64 0, i64 0
br label %88
33: ; preds = %20, %33
%34 = phi i64 [ 1, %20 ], [ %38, %33 ]
%35 = add nuw nsw i64 %34, %22
%36 = add nsw i64 %35, -101
%37 = add nuw nsw i64 %35, 101
%38 = add nuw nsw i64 %34, 1
%39 = add nuw nsw i64 %38, %22
%40 = add nsw i64 %35, -1
%41 = getelementptr inbounds double, double* %6, i64 %35
%42 = load double, double* %41
%43 = fmul double %14, %42
%44 = fmul double %15, %43
%45 = fdiv double %44, %19
%46 = getelementptr inbounds double, double* %4, i64 %39
%47 = load double, double* %46
%48 = getelementptr inbounds double, double* %4, i64 %40
%49 = load double, double* %48
%50 = fsub double %47, %49
%51 = fdiv double %50, %16
%52 = getelementptr inbounds double, double* %5, i64 %37
%53 = load double, double* %52
%54 = getelementptr inbounds double, double* %5, i64 %36
%55 = load double, double* %54
%56 = fsub double %53, %55
%57 = fdiv double %56, %17
%58 = fadd double %51, %57
%59 = tail call double @pow(double %51, i32 2)
%60 = fneg double %59
%61 = tail call double @llvm.fmuladd.f64(double %13, double %58, double %60)
%62 = getelementptr inbounds double, double* %4, i64 %37
%63 = load double, double* %62
%64 = getelementptr inbounds double, double* %4, i64 %36
%65 = load double, double* %64
%66 = fsub double %63, %65
%67 = fdiv double %66, %17
%68 = getelementptr inbounds double, double* %5, i64 %39
%69 = load double, double* %68
%70 = getelementptr inbounds double, double* %5, i64 %40
%71 = load double, double* %70
%72 = fsub double %69, %71
%73 = fdiv double %72, %16
%74 = fmul double %67, %73
%75 = tail call double @llvm.fmuladd.f64(double %74, double -2.000000e+00, double %61)
%76 = tail call double @pow(double %57, i32 2)
%77 = fsub double %75, %76
%78 = fmul double %45, %77
%79 = getelementptr inbounds [5151 x double], [5151 x double]* %9, i64 0, i64 %35
store double %78, double* %79
%80 = icmp eq i64 %38, 100
br i1 %80, label %81, label %33
81: ; preds = %33
%82 = add nuw nsw i64 %21, 1
%83 = icmp eq i64 %82, 50
br i1 %83, label %23, label %20
84: ; preds = %226
%85 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%86 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str.1, i64 0, i64 0), i32 10000000, double %221)
%87 = tail call i32 @exit(i32 1)
unreachable
88: ; preds = %23, %226
%89 = phi i32 [ 0, %23 ], [ %227, %226 ]
%90 = phi double [ 1.000000e+00, %23 ], [ %221, %226 ]
%91 = fcmp olt double %90, 1.000000e-05
%92 = icmp ugt i32 %89, 4
%93 = select i1 %91, i1 %92, i1 false
br i1 %93, label %229, label %94
94: ; preds = %88
br label %95
95: ; preds = %94, %132
%96 = phi i64 [ 1, %94 ], [ %155, %132 ]
%97 = mul nuw nsw i64 %96, 101
br label %98
98: ; preds = %98, %95
%99 = phi i64 [ 0, %95 ], [ %130, %98 ]
%100 = or i64 %99, 1
%101 = add nuw nsw i64 %100, %97
%102 = add nsw i64 %101, -101
%103 = add nuw nsw i64 %101, 101
%104 = add i64 %99, 2
%105 = add nuw nsw i64 %104, %97
%106 = add nsw i64 %101, -1
%107 = getelementptr inbounds [5151 x double], [5151 x double]* %10, i64 0, i64 %105
%108 = bitcast double* %107 to <2 x double>*
%109 = load <2 x double>, <2 x double>* %108
%110 = getelementptr inbounds [5151 x double], [5151 x double]* %10, i64 0, i64 %106
%111 = bitcast double* %110 to <2 x double>*
%112 = load <2 x double>, <2 x double>* %111
%113 = fadd <2 x double> %109, %112
%114 = getelementptr inbounds [5151 x double], [5151 x double]* %10, i64 0, i64 %103
%115 = bitcast double* %114 to <2 x double>*
%116 = load <2 x double>, <2 x double>* %115
%117 = getelementptr inbounds [5151 x double], [5151 x double]* %10, i64 0, i64 %102
%118 = bitcast double* %117 to <2 x double>*
%119 = load <2 x double>, <2 x double>* %118
%120 = fadd <2 x double> %116, %119
%121 = fmul <2 x double> %27, %120
%122 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %113, <2 x double> %29, <2 x double> %121)
%123 = fdiv <2 x double> %122, %31
%124 = getelementptr inbounds [5151 x double], [5151 x double]* %9, i64 0, i64 %101
%125 = bitcast double* %124 to <2 x double>*
%126 = load <2 x double>, <2 x double>* %125
%127 = fsub <2 x double> %123, %126
%128 = getelementptr inbounds double, double* %0, i64 %101
%129 = bitcast double* %128 to <2 x double>*
store <2 x double> %127, <2 x double>* %129
%130 = add nuw i64 %99, 2
%131 = icmp eq i64 %130, 98
br i1 %131, label %132, label %98
132: ; preds = %98
%133 = add nuw nsw i64 %97, 99
%134 = add nsw i64 %97, -2
%135 = add nuw nsw i64 %97, 200
%136 = add nuw nsw i64 %97, 100
%137 = add nuw nsw i64 %97, 98
%138 = getelementptr inbounds [5151 x double], [5151 x double]* %10, i64 0, i64 %136
%139 = load double, double* %138
%140 = getelementptr inbounds [5151 x double], [5151 x double]* %10, i64 0, i64 %137
%141 = load double, double* %140
%142 = fadd double %139, %141
%143 = getelementptr inbounds [5151 x double], [5151 x double]* %10, i64 0, i64 %135
%144 = load double, double* %143
%145 = getelementptr inbounds [5151 x double], [5151 x double]* %10, i64 0, i64 %134
%146 = load double, double* %145
%147 = fadd double %144, %146
%148 = fmul double %14, %147
%149 = tail call double @llvm.fmuladd.f64(double %142, double %15, double %148)
%150 = fdiv double %149, %19
%151 = getelementptr inbounds [5151 x double], [5151 x double]* %9, i64 0, i64 %133
%152 = load double, double* %151
%153 = fsub double %150, %152
%154 = getelementptr inbounds double, double* %0, i64 %133
store double %153, double* %154
%155 = add nuw nsw i64 %96, 1
%156 = icmp eq i64 %155, 50
br i1 %156, label %157, label %95
157: ; preds = %132, %171
%158 = phi i64 [ %182, %171 ], [ 0, %132 ]
%159 = mul nuw nsw i64 %158, 101
%160 = or i64 %159, 1
%161 = getelementptr inbounds double, double* %0, i64 %160
%162 = load double, double* %161
%163 = getelementptr inbounds double, double* %0, i64 %159
store double %162, double* %163
%164 = add nuw nsw i64 %159, 99
%165 = getelementptr inbounds double, double* %0, i64 %164
%166 = load double, double* %165
%167 = add nuw nsw i64 %159, 100
%168 = getelementptr inbounds double, double* %0, i64 %167
store double %166, double* %168
%169 = or i64 %158, 1
%170 = icmp eq i64 %169, 51
br i1 %170, label %183, label %171
171: ; preds = %157
%172 = mul nuw nsw i64 %169, 101
%173 = add nuw nsw i64 %172, 1
%174 = getelementptr inbounds double, double* %0, i64 %173
%175 = load double, double* %174
%176 = getelementptr inbounds double, double* %0, i64 %172
store double %175, double* %176
%177 = add nuw nsw i64 %172, 99
%178 = getelementptr inbounds double, double* %0, i64 %177
%179 = load double, double* %178
%180 = add nuw nsw i64 %172, 100
%181 = getelementptr inbounds double, double* %0, i64 %180
store double %179, double* %181
%182 = add nuw nsw i64 %158, 2
br label %157
183: ; preds = %157
%184 = load double, double* %32
%185 = tail call double @llvm.fabs.f64(double %184)
%186 = fsub double 0.000000e+00, %185
%187 = tail call double @llvm.fabs.f64(double %186)
br label %188
188: ; preds = %188, %183
%189 = phi i64 [ 1, %183 ], [ %213, %188 ]
%190 = phi double [ %185, %183 ], [ %212, %188 ]
%191 = phi double [ %187, %183 ], [ %211, %188 ]
%192 = getelementptr inbounds double, double* %0, i64 %189
%193 = load double, double* %192
%194 = tail call double @llvm.fabs.f64(double %193)
%195 = getelementptr inbounds [5151 x double], [5151 x double]* %10, i64 0, i64 %189
%196 = load double, double* %195
%197 = tail call double @llvm.fabs.f64(double %196)
%198 = fsub double %194, %197
%199 = tail call double @llvm.fabs.f64(double %198)
%200 = fadd double %191, %199
%201 = fadd double %190, %197
%202 = add nuw nsw i64 %189, 1
%203 = getelementptr inbounds double, double* %0, i64 %202
%204 = load double, double* %203
%205 = tail call double @llvm.fabs.f64(double %204)
%206 = getelementptr inbounds [5151 x double], [5151 x double]* %10, i64 0, i64 %202
%207 = load double, double* %206
%208 = tail call double @llvm.fabs.f64(double %207)
%209 = fsub double %205, %208
%210 = tail call double @llvm.fabs.f64(double %209)
%211 = fadd double %200, %210
%212 = fadd double %201, %208
%213 = add nuw nsw i64 %189, 2
%214 = icmp eq i64 %213, 5151
br i1 %214, label %215, label %188
215: ; preds = %188
%216 = fcmp ogt double %212, 0.000000e+00
br i1 %216, label %217, label %220
217: ; preds = %215
%218 = fdiv double %211, %212
%219 = tail call double @llvm.fabs.f64(double %218)
br label %220
220: ; preds = %215, %217
%221 = phi double [ %219, %217 ], [ 1.000000e+00, %215 ]
%222 = urem i32 %89, 10000
%223 = icmp eq i32 %222, 0
br i1 %223, label %224, label %226
224: ; preds = %220
%225 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0), i32 %89, double %211, double %212, double %221)
br label %226
226: ; preds = %224, %220
%227 = add nuw nsw i32 %89, 1
%228 = icmp eq i32 %227, 10000000
br i1 %228, label %84, label %88
229: ; preds = %88
ret void
}