#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 ceil(double);
double sqrt(double);
void findTopNCluster(double *x, double *y, int locCount, double *ll,
                     double wSize, int wCount, int *center, int *radius,
                     double *cLL, int nClusters) {
  if (nClusters < 1)
    return;
  int aCenter = -1;
  int aRadius = -1;
  for (int i = 0; i < locCount; i++) {
    for (int j = 0; j < wCount; j++) {
      if (ll[i * wCount + j] < 0) {
        if (aCenter < 0) {
          aCenter = i;
          aRadius = j;
        } else if (ll[i * wCount + j] > ll[aCenter * wCount + aRadius]) {
          aCenter = i;
          aRadius = j;
        }
      }
    }
  }
  center[0] = aCenter;
  radius[0] = aRadius;
  cLL[0] = ll[aCenter * wCount + aRadius];
  double lastX, lastY, lastRad;
  lastX = x[aCenter];
  lastY = y[aCenter];
  lastRad = (aRadius + 1) * wSize;
  double distance;
  int maxWindow;
  for (int c = 1; c < nClusters; c++) {
    for (int i = 0; i < locCount; i++) {
      distance = sqrt((x[i] - lastX) * (x[i] - lastX) +
                      (y[i] - lastY) * (y[i] - lastY)) -
                 lastRad;
      maxWindow = ceil(distance / wSize) - 1;
      if (maxWindow < 0)
        maxWindow = 0;
      for (int j = maxWindow; j < wCount; j++)
        ll[i * wCount + j] = 1;
    }
    aCenter = -1;
    aRadius = -1;
    for (int i = 0; i < locCount; i++) {
      for (int j = 0; j < wCount; j++) {
        if (ll[i * wCount + j] < 0) {
          if (aCenter < 0) {
            aCenter = i;
            aRadius = j;
          } else if (ll[i * wCount + j] > ll[aCenter * wCount + aRadius]) {
            aCenter = i;
            aRadius = j;
          }
        }
      }
    }
    center[c] = aCenter;
    radius[c] = aRadius;
    if (aCenter != -1)
      cLL[c] = ll[aCenter * wCount + aRadius];
    else
      break;
    lastX = x[aCenter];
    lastY = y[aCenter];
    lastRad = (aRadius + 1) * wSize;
  }
  return;
}


x86 assembly (clang, -O0):
<findTopNCluster>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
movsd  %xmm0,-0x28(%rbp)
mov    %r8d,-0x2c(%rbp)
mov    %r9,-0x38(%rbp)
cmpl   $0x1,0x20(%rbp)
jge    1161 <findTopNCluster+0x41>
jmp    151f <findTopNCluster+0x3ff>
movl   $0xffffffff,-0x3c(%rbp)
movl   $0xffffffff,-0x40(%rbp)
movl   $0x0,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    123d <findTopNCluster+0x11d>
movl   $0x0,-0x48(%rbp)
mov    -0x48(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    122a <findTopNCluster+0x10a>
mov    -0x20(%rbp),%rax
mov    -0x44(%rbp),%ecx
imul   -0x2c(%rbp),%ecx
add    -0x48(%rbp),%ecx
movslq %ecx,%rcx
xorps  %xmm0,%xmm0
ucomisd (%rax,%rcx,8),%xmm0
jbe    1217 <findTopNCluster+0xf7>
cmpl   $0x0,-0x3c(%rbp)
jge    11cf <findTopNCluster+0xaf>
mov    -0x44(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x48(%rbp),%eax
mov    %eax,-0x40(%rbp)
jmp    1212 <findTopNCluster+0xf2>
mov    -0x20(%rbp),%rax
mov    -0x44(%rbp),%ecx
imul   -0x2c(%rbp),%ecx
add    -0x48(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
mov    -0x3c(%rbp),%ecx
imul   -0x2c(%rbp),%ecx
add    -0x40(%rbp),%ecx
movslq %ecx,%rcx
ucomisd (%rax,%rcx,8),%xmm0
jbe    120d <findTopNCluster+0xed>
mov    -0x44(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x48(%rbp),%eax
mov    %eax,-0x40(%rbp)
jmp    1212 <findTopNCluster+0xf2>
jmp    1217 <findTopNCluster+0xf7>
jmp    121c <findTopNCluster+0xfc>
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    1189 <findTopNCluster+0x69>
jmp    122f <findTopNCluster+0x10f>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1176 <findTopNCluster+0x56>
mov    -0x3c(%rbp),%ecx
mov    -0x38(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x40(%rbp),%ecx
mov    0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x20(%rbp),%rax
mov    -0x3c(%rbp),%ecx
imul   -0x2c(%rbp),%ecx
add    -0x40(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x18(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x40(%rbp),%eax
add    $0x1,%eax
cvtsi2sd %eax,%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movl   $0x1,-0x70(%rbp)
mov    -0x70(%rbp),%eax
cmp    0x20(%rbp),%eax
jge    151a <findTopNCluster+0x3fa>
movl   $0x0,-0x74(%rbp)
mov    -0x74(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    13a5 <findTopNCluster+0x285>
mov    -0x8(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x50(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
subsd  -0x50(%rbp),%xmm2
mov    -0x10(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
subsd  -0x58(%rbp),%xmm1
mov    -0x10(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm3
subsd  -0x58(%rbp),%xmm3
mulsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1040 <sqrt@plt>
subsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x68(%rbp),%xmm0
divsd  -0x28(%rbp),%xmm0
call   1030 <ceil@plt>
sub    $0x1,%eax
mov    %eax,-0x6c(%rbp)
cmpl   $0x0,-0x6c(%rbp)
jge    1354 <findTopNCluster+0x234>
movl   $0x0,-0x6c(%rbp)
mov    -0x6c(%rbp),%eax
mov    %eax,-0x78(%rbp)
mov    -0x78(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    1392 <findTopNCluster+0x272>
mov    -0x20(%rbp),%rax
mov    -0x74(%rbp),%ecx
imul   -0x2c(%rbp),%ecx
add    -0x78(%rbp),%ecx
movslq %ecx,%rcx
movsd  0xc81(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x78(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x78(%rbp)
jmp    135a <findTopNCluster+0x23a>
jmp    1397 <findTopNCluster+0x277>
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    12bf <findTopNCluster+0x19f>
movl   $0xffffffff,-0x3c(%rbp)
movl   $0xffffffff,-0x40(%rbp)
movl   $0x0,-0x7c(%rbp)
mov    -0x7c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1481 <findTopNCluster+0x361>
movl   $0x0,-0x80(%rbp)
mov    -0x80(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    146e <findTopNCluster+0x34e>
mov    -0x20(%rbp),%rax
mov    -0x7c(%rbp),%ecx
imul   -0x2c(%rbp),%ecx
add    -0x80(%rbp),%ecx
movslq %ecx,%rcx
xorps  %xmm0,%xmm0
ucomisd (%rax,%rcx,8),%xmm0
jbe    145b <findTopNCluster+0x33b>
cmpl   $0x0,-0x3c(%rbp)
jge    1413 <findTopNCluster+0x2f3>
mov    -0x7c(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x80(%rbp),%eax
mov    %eax,-0x40(%rbp)
jmp    1456 <findTopNCluster+0x336>
mov    -0x20(%rbp),%rax
mov    -0x7c(%rbp),%ecx
imul   -0x2c(%rbp),%ecx
add    -0x80(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
mov    -0x3c(%rbp),%ecx
imul   -0x2c(%rbp),%ecx
add    -0x40(%rbp),%ecx
movslq %ecx,%rcx
ucomisd (%rax,%rcx,8),%xmm0
jbe    1451 <findTopNCluster+0x331>
mov    -0x7c(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x80(%rbp),%eax
mov    %eax,-0x40(%rbp)
jmp    1456 <findTopNCluster+0x336>
jmp    145b <findTopNCluster+0x33b>
jmp    1460 <findTopNCluster+0x340>
mov    -0x80(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x80(%rbp)
jmp    13cd <findTopNCluster+0x2ad>
jmp    1473 <findTopNCluster+0x353>
mov    -0x7c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7c(%rbp)
jmp    13ba <findTopNCluster+0x29a>
mov    -0x3c(%rbp),%edx
mov    -0x38(%rbp),%rax
movslq -0x70(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x40(%rbp),%edx
mov    0x10(%rbp),%rax
movslq -0x70(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
cmpl   $0xffffffff,-0x3c(%rbp)
je     14cf <findTopNCluster+0x3af>
mov    -0x20(%rbp),%rax
mov    -0x3c(%rbp),%ecx
imul   -0x2c(%rbp),%ecx
add    -0x40(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x18(%rbp),%rax
movslq -0x70(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    14d4 <findTopNCluster+0x3b4>
jmp    151a <findTopNCluster+0x3fa>
mov    -0x8(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x40(%rbp),%eax
add    $0x1,%eax
cvtsi2sd %eax,%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x70(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x70(%rbp)
jmp    12ac <findTopNCluster+0x18c>
jmp    151f <findTopNCluster+0x3ff>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<findTopNCluster>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x88,%rsp
mov    %r9,0x8(%rsp)
movsd  %xmm0,0x30(%rsp)
mov    %rsi,0x28(%rsp)
mov    %rdi,0x20(%rsp)
mov    0xd0(%rsp),%r9d
test   %r9d,%r9d
jle    1546 <findTopNCluster+0x426>
movslq %r8d,%rax
mov    %edx,%r15d
mov    %r8d,%r12d
test   %edx,%edx
jle    11e1 <findTopNCluster+0xc1>
mov    %rax,%r14
lea    0x0(,%rax,8),%r10
mov    $0xffffffff,%ebp
xor    %edi,%edi
xorpd  %xmm0,%xmm0
mov    %rcx,%rsi
mov    $0xffffffff,%r11d
jmp    119c <findTopNCluster+0x7c>
nopl   0x0(%rax)
add    $0x1,%rdi
add    %r10,%rsi
cmp    %r15,%rdi
je     11ef <findTopNCluster+0xcf>
test   %r8d,%r8d
jle    1190 <findTopNCluster+0x70>
xor    %ebx,%ebx
jmp    11be <findTopNCluster+0x9e>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %ebx,%r11d
mov    %edi,%ebp
add    $0x1,%rbx
cmp    %rbx,%r12
je     1190 <findTopNCluster+0x70>
movsd  (%rsi,%rbx,8),%xmm1
ucomisd %xmm1,%xmm0
jbe    11b5 <findTopNCluster+0x95>
test   %ebp,%ebp
js     11b0 <findTopNCluster+0x90>
mov    %ebp,%eax
imul   %r8d,%eax
add    %r11d,%eax
cltq
ucomisd (%rcx,%rax,8),%xmm1
ja     11b0 <findTopNCluster+0x90>
jmp    11b5 <findTopNCluster+0x95>
mov    %rax,%r14
mov    $0xffffffff,%r11d
mov    $0xffffffff,%ebp
mov    0x8(%rsp),%rax
mov    %ebp,(%rax)
mov    0xc0(%rsp),%rax
mov    %r11d,(%rax)
mov    %ebp,%eax
imul   %r8d,%eax
add    %r11d,%eax
cltq
movsd  (%rcx,%rax,8),%xmm0
mov    0xc8(%rsp),%rax
movsd  %xmm0,(%rax)
cmp    $0x2,%r9d
jl     1546 <findTopNCluster+0x426>
mov    %r14,%r10
mov    %r9d,%eax
mov    %rax,0x38(%rsp)
lea    0x1(%r12),%rax
mov    %rax,0x60(%rsp)
lea    0x68(%rcx),%rax
mov    %rax,0x48(%rsp)
shl    $0x3,%r10
lea    0x8(%rcx),%rax
mov    %rax,0x40(%rsp)
mov    $0x1,%r9d
xorpd  %xmm2,%xmm2
mov    %rcx,0x50(%rsp)
mov    %edx,0x14(%rsp)
mov    %r10,0x68(%rsp)
mov    %r15,0x18(%rsp)
nop
test   %edx,%edx
jle    1529 <findTopNCluster+0x409>
mov    %r9,0x58(%rsp)
add    $0x1,%r11d
movslq %ebp,%rax
xorps  %xmm0,%xmm0
cvtsi2sd %r11d,%xmm0
mulsd  0x30(%rsp),%xmm0
movsd  %xmm0,0x80(%rsp)
mov    0x28(%rsp),%rdx
movsd  (%rdx,%rax,8),%xmm0
movsd  %xmm0,0x78(%rsp)
mov    0x20(%rsp),%rdx
movsd  (%rdx,%rax,8),%xmm0
movsd  %xmm0,0x70(%rsp)
mov    %rcx,%rbx
mov    0x40(%rsp),%r14
mov    0x48(%rsp),%r15
xor    %r13d,%r13d
jmp    12ed <findTopNCluster+0x1cd>
nopl   (%rax)
add    $0x1,%r13
mov    0x68(%rsp),%r10
add    %r10,%r15
add    %r10,%r14
add    %r10,%rbx
cmp    0x18(%rsp),%r13
je     1450 <findTopNCluster+0x330>
mov    %r8d,%ebp
mov    0x20(%rsp),%rax
movsd  (%rax,%r13,8),%xmm0
subsd  0x70(%rsp),%xmm0
mov    0x28(%rsp),%rax
movsd  (%rax,%r13,8),%xmm1
subsd  0x78(%rsp),%xmm1
mulsd  %xmm1,%xmm1
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
ucomisd %xmm2,%xmm0
jb     1330 <findTopNCluster+0x210>
sqrtsd %xmm0,%xmm0
jmp    1335 <findTopNCluster+0x215>
nopw   0x0(%rax,%rax,1)
call   1040 <sqrt@plt>
subsd  0x80(%rsp),%xmm0
divsd  0x30(%rsp),%xmm0
call   1030 <ceil@plt>
test   %eax,%eax
mov    $0x1,%ecx
cmovle %ecx,%eax
mov    %ebp,%r8d
cmp    %ebp,%eax
xorpd  %xmm2,%xmm2
movabs $0x3ff0000000000000,%rcx
movapd 0xc92(%rip),%xmm0
jg     12d0 <findTopNCluster+0x1b0>
mov    %eax,%r9d
lea    -0x1(%r9),%rax
mov    0x60(%rsp),%r11
sub    %r9,%r11
cmp    $0x4,%r11
jb     1430 <findTopNCluster+0x310>
mov    %r11,%r10
and    $0xfffffffffffffffc,%r10
lea    -0x4(%r10),%rsi
mov    %rsi,%rdi
shr    $0x2,%rdi
add    $0x1,%rdi
mov    %edi,%edx
and    $0x3,%edx
cmp    $0xc,%rsi
jae    13b2 <findTopNCluster+0x292>
xor    %ebp,%ebp
jmp    13f9 <findTopNCluster+0x2d9>
and    $0xfffffffffffffffc,%rdi
lea    (%r15,%r9,8),%rsi
xor    %ebp,%ebp
nopl   0x0(%rax)
movupd %xmm0,-0x70(%rsi,%rbp,8)
movupd %xmm0,-0x60(%rsi,%rbp,8)
movupd %xmm0,-0x50(%rsi,%rbp,8)
movupd %xmm0,-0x40(%rsi,%rbp,8)
movupd %xmm0,-0x30(%rsi,%rbp,8)
movupd %xmm0,-0x20(%rsi,%rbp,8)
movupd %xmm0,-0x10(%rsi,%rbp,8)
movupd %xmm0,(%rsi,%rbp,8)
add    $0x10,%rbp
add    $0xfffffffffffffffc,%rdi
jne    13c0 <findTopNCluster+0x2a0>
test   %rdx,%rdx
je     1424 <findTopNCluster+0x304>
add    %r9,%rbp
lea    (%r14,%rbp,8),%rsi
shl    $0x5,%rdx
xor    %edi,%edi
nopl   0x0(%rax,%rax,1)
movupd %xmm0,-0x10(%rsi,%rdi,1)
movupd %xmm0,(%rsi,%rdi,1)
add    $0x20,%rdi
cmp    %rdi,%rdx
jne    1410 <findTopNCluster+0x2f0>
cmp    %r10,%r11
je     12d0 <findTopNCluster+0x1b0>
add    %r10,%rax
mov    %rcx,(%rbx,%rax,8)
add    $0x1,%rax
cmp    %rax,%r12
jne    1430 <findTopNCluster+0x310>
jmp    12d0 <findTopNCluster+0x1b0>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    0x14(%rsp),%edx
test   %edx,%edx
mov    0x50(%rsp),%rcx
mov    0x18(%rsp),%r15
mov    0x58(%rsp),%r9
jle    1529 <findTopNCluster+0x409>
mov    $0xffffffff,%ebp
mov    %rcx,%rbx
xor    %esi,%esi
mov    $0xffffffff,%r11d
jmp    148c <findTopNCluster+0x36c>
nopl   (%rax)
add    $0x1,%rsi
add    %r10,%rbx
cmp    %r15,%rsi
je     14e0 <findTopNCluster+0x3c0>
test   %r8d,%r8d
jle    1480 <findTopNCluster+0x360>
xor    %edi,%edi
jmp    14ae <findTopNCluster+0x38e>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %edi,%r11d
mov    %esi,%ebp
add    $0x1,%rdi
cmp    %rdi,%r12
je     1480 <findTopNCluster+0x360>
movsd  (%rbx,%rdi,8),%xmm0
ucomisd %xmm0,%xmm2
jbe    14a5 <findTopNCluster+0x385>
test   %ebp,%ebp
js     14a0 <findTopNCluster+0x380>
mov    %ebp,%eax
imul   %r8d,%eax
add    %r11d,%eax
cltq
ucomisd (%rcx,%rax,8),%xmm0
ja     14a0 <findTopNCluster+0x380>
jmp    14a5 <findTopNCluster+0x385>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    0x8(%rsp),%rax
mov    %ebp,(%rax,%r9,4)
mov    0xc0(%rsp),%rax
mov    %r11d,(%rax,%r9,4)
cmp    $0xffffffff,%ebp
je     1546 <findTopNCluster+0x426>
mov    %ebp,%eax
imul   %r8d,%eax
add    %r11d,%eax
cltq
movsd  (%rcx,%rax,8),%xmm0
mov    0xc8(%rsp),%rax
movsd  %xmm0,(%rax,%r9,8)
add    $0x1,%r9
cmp    0x38(%rsp),%r9
jne    1270 <findTopNCluster+0x150>
jmp    1546 <findTopNCluster+0x426>
mov    0x8(%rsp),%rax
movl   $0xffffffff,(%rax,%r9,4)
ff
mov    0xc0(%rsp),%rax
movl   $0xffffffff,(%rax,%r9,4)
ff
add    $0x88,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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