void cluster_statistics(const int *lattice, int rows, int columns,
                        int *cluster_sizes_total_count, int **cluster_sizes,
                        int **cluster_sizes_counts,
                        int **cluster_sizes_percolated, int *filled_count,
                        int *empty_count) {
  int i;
  int j;
  char percolated;
  int lattice_size;
  int cluster_labels_total_count;
  int *cluster_labels_indices;
  int *cluster_labels_sizes;
  char *cluster_labels_percolated;
  int *cluster_sizes_indices;
  lattice_size = rows * columns;
  cluster_labels_total_count = 0;
  cluster_labels_indices = (int *)malloc((lattice_size / 2 + 3) * sizeof(int));
  cluster_labels_sizes = (int *)malloc((lattice_size / 2 + 3) * sizeof(int));
  cluster_sizes_indices = (int *)malloc((lattice_size + 1) * sizeof(int));
  for (i = 0; i < lattice_size / 2 + 3; i++) {
    cluster_labels_indices[i] = -1;
    cluster_labels_sizes[i] = 0;
  }
  for (i = 0; i < lattice_size; i++) {
    cluster_sizes_indices[i] = -1;
    if (lattice[i] == 0) {
      continue;
    }
    if (cluster_labels_indices[lattice[i]] < 0) {
      cluster_labels_indices[lattice[i]] = cluster_labels_total_count;
      cluster_labels_total_count++;
    }
    cluster_labels_sizes[cluster_labels_indices[lattice[i]]] += 1;
  }
  cluster_sizes_indices[lattice_size] = -1;
  cluster_labels_percolated =
      (char *)malloc(cluster_labels_total_count * sizeof(char));
  for (i = 0; i < cluster_labels_total_count; i++) {
    cluster_labels_percolated[i] = 0;
  }
  percolated = 0;
  for (i = 0; i < columns; i++) {
    if (percolated) {
      break;
    }
    if (lattice[i] == 0) {
      continue;
    }
    for (j = 0; j < columns; j++) {
      if (lattice[i] == lattice[(rows - 1) * columns + j]) {
        cluster_labels_percolated[cluster_labels_indices[lattice[i]]] = 1;
        percolated = 1;
        break;
      }
    }
  }
  for (i = 0; i < rows; i++) {
    if (percolated) {
      break;
    }
    if (lattice[i * columns] == 0) {
      continue;
    }
    for (j = 0; j < rows; j++) {
      if (lattice[i * columns] == lattice[j * columns + columns - 1]) {
        cluster_labels_percolated
            [cluster_labels_indices[lattice[i * columns]]] = 1;
        percolated = 1;
        break;
      }
    }
  }
  free(cluster_labels_indices);
  *cluster_sizes_total_count = 0;
  *cluster_sizes = (int *)malloc(cluster_labels_total_count * sizeof(int));
  *cluster_sizes_counts =
      (int *)malloc(cluster_labels_total_count * sizeof(int));
  *cluster_sizes_percolated =
      (int *)malloc(cluster_labels_total_count * sizeof(int));
  for (i = 0; i < cluster_labels_total_count; i++) {
    (*cluster_sizes)[i] = 0;
    (*cluster_sizes_counts)[i] = 0;
    (*cluster_sizes_percolated)[i] = 0;
  }
  for (i = 0; i < cluster_labels_total_count; i++) {
    if (cluster_sizes_indices[cluster_labels_sizes[i]] < 0) {
      cluster_sizes_indices[cluster_labels_sizes[i]] =
          *cluster_sizes_total_count;
      (*cluster_sizes_total_count) += 1;
    }
    (*cluster_sizes)[cluster_sizes_indices[cluster_labels_sizes[i]]] =
        cluster_labels_sizes[i];
    (*cluster_sizes_counts)[cluster_sizes_indices[cluster_labels_sizes[i]]] +=
        1;
    (*cluster_sizes_percolated)
        [cluster_sizes_indices[cluster_labels_sizes[i]]] +=
        cluster_labels_percolated[i];
  }
  free(cluster_labels_sizes);
  free(cluster_sizes_indices);
  free(cluster_labels_percolated);
  *cluster_sizes =
      realloc(*cluster_sizes, (*cluster_sizes_total_count) * sizeof(int));
  *cluster_sizes_counts = realloc(*cluster_sizes_counts,
                                  (*cluster_sizes_total_count) * sizeof(int));
  *cluster_sizes_percolated = realloc(
      *cluster_sizes_percolated, (*cluster_sizes_total_count) * sizeof(int));
  if (filled_count && empty_count) {
    *filled_count = 0;
    for (i = 0; i < *cluster_sizes_total_count; i++) {
      *filled_count += ((*cluster_sizes)[i]) * ((*cluster_sizes_counts)[i]);
    }
    *empty_count = lattice_size - *filled_count;
  }
}


x86 assembly (clang, -O0):
<cluster_statistics>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0xc(%rbp),%eax
imul   -0x10(%rbp),%eax
mov    %eax,-0x38(%rbp)
movl   $0x0,-0x3c(%rbp)
mov    -0x38(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
add    $0x3,%eax
movslq %eax,%rdi
shl    $0x2,%rdi
call   1040 <malloc@plt>
mov    %rax,-0x48(%rbp)
mov    -0x38(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
add    $0x3,%eax
movslq %eax,%rdi
shl    $0x2,%rdi
call   1040 <malloc@plt>
mov    %rax,-0x50(%rbp)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
movslq %eax,%rdi
shl    $0x2,%rdi
call   1040 <malloc@plt>
mov    %rax,-0x60(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
mov    %eax,-0x64(%rbp)
mov    -0x38(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x64(%rbp),%eax
add    $0x3,%ecx
cmp    %ecx,%eax
jge    1211 <cluster_statistics+0xe1>
mov    -0x48(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movl   $0xffffffff,(%rax,%rcx,4)
mov    -0x50(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    11c4 <cluster_statistics+0x94>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x38(%rbp),%eax
jge    12b2 <cluster_statistics+0x182>
mov    -0x60(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movl   $0xffffffff,(%rax,%rcx,4)
mov    -0x8(%rbp),%rax
movslq -0x2c(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
jne    124a <cluster_statistics+0x11a>
jmp    12a4 <cluster_statistics+0x174>
mov    -0x48(%rbp),%rax
mov    -0x8(%rbp),%rcx
movslq -0x2c(%rbp),%rdx
movslq (%rcx,%rdx,4),%rcx
cmpl   $0x0,(%rax,%rcx,4)
jge    1283 <cluster_statistics+0x153>
mov    -0x3c(%rbp),%edx
mov    -0x48(%rbp),%rax
mov    -0x8(%rbp),%rcx
movslq -0x2c(%rbp),%rsi
movslq (%rcx,%rsi,4),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
mov    -0x50(%rbp),%rax
mov    -0x48(%rbp),%rcx
mov    -0x8(%rbp),%rdx
movslq -0x2c(%rbp),%rsi
movslq (%rdx,%rsi,4),%rdx
movslq (%rcx,%rdx,4),%rcx
mov    (%rax,%rcx,4),%edx
add    $0x1,%edx
mov    %edx,(%rax,%rcx,4)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1218 <cluster_statistics+0xe8>
mov    -0x60(%rbp),%rax
movslq -0x38(%rbp),%rcx
movl   $0xffffffff,(%rax,%rcx,4)
movslq -0x3c(%rbp),%rdi
shl    $0x0,%rdi
call   1040 <malloc@plt>
mov    %rax,-0x58(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jge    12ff <cluster_statistics+0x1cf>
mov    -0x58(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    12d9 <cluster_statistics+0x1a9>
movb   $0x0,-0x31(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    13c2 <cluster_statistics+0x292>
cmpb   $0x0,-0x31(%rbp)
je     1325 <cluster_statistics+0x1f5>
jmp    13c2 <cluster_statistics+0x292>
mov    -0x8(%rbp),%rax
movslq -0x2c(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
jne    133c <cluster_statistics+0x20c>
jmp    13b4 <cluster_statistics+0x284>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    13af <cluster_statistics+0x27f>
mov    -0x8(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    -0x8(%rbp),%rcx
mov    -0xc(%rbp),%edx
sub    $0x1,%edx
imul   -0x10(%rbp),%edx
add    -0x30(%rbp),%edx
movslq %edx,%rdx
cmp    (%rcx,%rdx,4),%eax
jne    139c <cluster_statistics+0x26c>
mov    -0x58(%rbp),%rax
mov    -0x48(%rbp),%rcx
mov    -0x8(%rbp),%rdx
movslq -0x2c(%rbp),%rsi
movslq (%rdx,%rsi,4),%rdx
movslq (%rcx,%rdx,4),%rcx
movb   $0x1,(%rax,%rcx,1)
movb   $0x1,-0x31(%rbp)
jmp    13af <cluster_statistics+0x27f>
jmp    13a1 <cluster_statistics+0x271>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1343 <cluster_statistics+0x213>
jmp    13b4 <cluster_statistics+0x284>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    130a <cluster_statistics+0x1da>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1493 <cluster_statistics+0x363>
cmpb   $0x0,-0x31(%rbp)
je     13e4 <cluster_statistics+0x2b4>
jmp    1493 <cluster_statistics+0x363>
mov    -0x8(%rbp),%rax
mov    -0x2c(%rbp),%ecx
imul   -0x10(%rbp),%ecx
movslq %ecx,%rcx
cmpl   $0x0,(%rax,%rcx,4)
jne    1401 <cluster_statistics+0x2d1>
jmp    1485 <cluster_statistics+0x355>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1480 <cluster_statistics+0x350>
mov    -0x8(%rbp),%rax
mov    -0x2c(%rbp),%ecx
imul   -0x10(%rbp),%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%eax
mov    -0x8(%rbp),%rcx
mov    -0x30(%rbp),%edx
imul   -0x10(%rbp),%edx
add    -0x10(%rbp),%edx
sub    $0x1,%edx
movslq %edx,%rdx
cmp    (%rcx,%rdx,4),%eax
jne    146d <cluster_statistics+0x33d>
mov    -0x58(%rbp),%rax
mov    -0x48(%rbp),%rcx
mov    -0x8(%rbp),%rdx
mov    -0x2c(%rbp),%esi
imul   -0x10(%rbp),%esi
movslq %esi,%rsi
movslq (%rdx,%rsi,4),%rdx
movslq (%rcx,%rdx,4),%rcx
movb   $0x1,(%rax,%rcx,1)
movb   $0x1,-0x31(%rbp)
jmp    1480 <cluster_statistics+0x350>
jmp    1472 <cluster_statistics+0x342>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1408 <cluster_statistics+0x2d8>
jmp    1485 <cluster_statistics+0x355>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    13c9 <cluster_statistics+0x299>
mov    -0x48(%rbp),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%rax
movl   $0x0,(%rax)
movslq -0x3c(%rbp),%rdi
shl    $0x2,%rdi
call   1040 <malloc@plt>
mov    %rax,%rcx
mov    -0x20(%rbp),%rax
mov    %rcx,(%rax)
movslq -0x3c(%rbp),%rdi
shl    $0x2,%rdi
call   1040 <malloc@plt>
mov    %rax,%rcx
mov    -0x28(%rbp),%rax
mov    %rcx,(%rax)
movslq -0x3c(%rbp),%rdi
shl    $0x2,%rdi
call   1040 <malloc@plt>
mov    %rax,%rcx
mov    0x10(%rbp),%rax
mov    %rcx,(%rax)
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jge    1542 <cluster_statistics+0x412>
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
movslq -0x2c(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x28(%rbp),%rax
mov    (%rax),%rax
movslq -0x2c(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    0x10(%rbp),%rax
mov    (%rax),%rax
movslq -0x2c(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    14f2 <cluster_statistics+0x3c2>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jge    161b <cluster_statistics+0x4eb>
mov    -0x60(%rbp),%rax
mov    -0x50(%rbp),%rcx
movslq -0x2c(%rbp),%rdx
movslq (%rcx,%rdx,4),%rcx
cmpl   $0x0,(%rax,%rcx,4)
jge    1593 <cluster_statistics+0x463>
mov    -0x18(%rbp),%rax
mov    (%rax),%edx
mov    -0x60(%rbp),%rax
mov    -0x50(%rbp),%rcx
movslq -0x2c(%rbp),%rsi
movslq (%rcx,%rsi,4),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
mov    -0x50(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
mov    -0x60(%rbp),%rcx
mov    -0x50(%rbp),%rsi
movslq -0x2c(%rbp),%rdi
movslq (%rsi,%rdi,4),%rsi
movslq (%rcx,%rsi,4),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x28(%rbp),%rax
mov    (%rax),%rax
mov    -0x60(%rbp),%rcx
mov    -0x50(%rbp),%rdx
movslq -0x2c(%rbp),%rsi
movslq (%rdx,%rsi,4),%rdx
movslq (%rcx,%rdx,4),%rcx
mov    (%rax,%rcx,4),%edx
add    $0x1,%edx
mov    %edx,(%rax,%rcx,4)
mov    -0x58(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsbl (%rax,%rcx,1),%edx
mov    0x10(%rbp),%rax
mov    (%rax),%rax
mov    -0x60(%rbp),%rcx
mov    -0x50(%rbp),%rsi
movslq -0x2c(%rbp),%rdi
movslq (%rsi,%rdi,4),%rsi
movslq (%rcx,%rsi,4),%rcx
add    (%rax,%rcx,4),%edx
mov    %edx,(%rax,%rcx,4)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1549 <cluster_statistics+0x419>
mov    -0x50(%rbp),%rdi
call   1030 <free@plt>
mov    -0x60(%rbp),%rdi
call   1030 <free@plt>
mov    -0x58(%rbp),%rdi
call   1030 <free@plt>
mov    -0x20(%rbp),%rax
mov    (%rax),%rdi
mov    -0x18(%rbp),%rax
movslq (%rax),%rsi
shl    $0x2,%rsi
call   1050 <realloc@plt>
mov    %rax,%rcx
mov    -0x20(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x28(%rbp),%rax
mov    (%rax),%rdi
mov    -0x18(%rbp),%rax
movslq (%rax),%rsi
shl    $0x2,%rsi
call   1050 <realloc@plt>
mov    %rax,%rcx
mov    -0x28(%rbp),%rax
mov    %rcx,(%rax)
mov    0x10(%rbp),%rax
mov    (%rax),%rdi
mov    -0x18(%rbp),%rax
movslq (%rax),%rsi
shl    $0x2,%rsi
call   1050 <realloc@plt>
mov    %rax,%rcx
mov    0x10(%rbp),%rax
mov    %rcx,(%rax)
cmpq   $0x0,0x18(%rbp)
je     1711 <cluster_statistics+0x5e1>
cmpq   $0x0,0x20(%rbp)
je     1711 <cluster_statistics+0x5e1>
mov    0x18(%rbp),%rax
movl   $0x0,(%rax)
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jge    1702 <cluster_statistics+0x5d2>
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,4),%ecx
mov    -0x28(%rbp),%rax
mov    (%rax),%rax
movslq -0x2c(%rbp),%rdx
imul   (%rax,%rdx,4),%ecx
mov    0x18(%rbp),%rax
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    16c0 <cluster_statistics+0x590>
mov    -0x38(%rbp),%ecx
mov    0x18(%rbp),%rax
sub    (%rax),%ecx
mov    0x20(%rbp),%rax
mov    %ecx,(%rax)
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cluster_statistics>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
mov    %r9,0x28(%rsp)
mov    %r8,0x10(%rsp)
mov    %rcx,0x30(%rsp)
mov    %rdi,%r14
mov    %rdx,0x20(%rsp)
mov    %edx,%ebp
mov    %rsi,0x50(%rsp)
imul   %esi,%ebp
mov    %ebp,%r13d
shr    $0x1f,%r13d
add    %ebp,%r13d
sar    %r13d
movslq %r13d,%rax
lea    0xc(,%rax,4),%rbx
mov    %rbx,%rdi
call   1050 <malloc@plt>
mov    %rax,%r15
mov    %rbx,%rdi
call   1050 <malloc@plt>
mov    %rax,0x18(%rsp)
mov    %ebp,0xc(%rsp)
movslq %ebp,%r12
lea    0x4(,%r12,4),%rdi
call   1050 <malloc@plt>
mov    %r15,%rdi
xor    %r15d,%r15d
cmp    $0xfffffffb,%r12d
mov    %rax,(%rsp)
mov    %rdi,0x40(%rsp)
jl     1270 <cluster_statistics+0x130>
add    $0x3,%r13d
cmp    $0x2,%r13d
mov    %r12,%rbx
mov    $0x1,%r12d
cmovge %r13d,%r12d
shl    $0x2,%r12
mov    $0xff,%esi
mov    %r12,%rdx
call   1040 <memset@plt>
xor    %r15d,%r15d
mov    0x18(%rsp),%rdi
xor    %esi,%esi
mov    %r12,%rdx
mov    %rbx,%r12
call   1040 <memset@plt>
mov    (%rsp),%rax
cmpl   $0x0,0xc(%rsp)
jle    1270 <cluster_statistics+0x130>
mov    0xc(%rsp),%ebx
lea    0x0(,%rbx,4),%rdx
mov    %rax,%rdi
mov    $0xff,%esi
call   1040 <memset@plt>
mov    0x40(%rsp),%rdi
mov    (%rsp),%rax
xor    %ebp,%ebp
xor    %r15d,%r15d
mov    0x18(%rsp),%rsi
jmp    1250 <cluster_statistics+0x110>
movslq %ecx,%rcx
addl   $0x1,(%rsi,%rcx,4)
add    $0x1,%rbp
cmp    %rbp,%rbx
je     1270 <cluster_statistics+0x130>
movslq (%r14,%rbp,4),%rdx
test   %rdx,%rdx
je     1247 <cluster_statistics+0x107>
mov    (%rdi,%rdx,4),%ecx
test   %ecx,%ecx
jns    1240 <cluster_statistics+0x100>
mov    %r15d,(%rdi,%rdx,4)
mov    %r15d,%ecx
lea    0x1(%r15),%edx
mov    %edx,%r15d
jmp    1240 <cluster_statistics+0x100>
movl   $0xffffffff,(%rax,%r12,4)
ff
movslq %r15d,%rbx
mov    %rbx,%rdi
call   1050 <malloc@plt>
mov    %rbx,0x48(%rsp)
test   %ebx,%ebx
mov    %rax,0x38(%rsp)
jle    12a3 <cluster_statistics+0x163>
mov    %r15d,%edx
mov    %rax,%rdi
xor    %esi,%esi
call   1040 <memset@plt>
mov    0x38(%rsp),%rax
mov    0x90(%rsp),%r12
mov    0x20(%rsp),%r11
test   %r11d,%r11d
mov    0x28(%rsp),%r13
mov    0x40(%rsp),%rdi
mov    0x50(%rsp),%r10
jle    1310 <cluster_statistics+0x1d0>
lea    -0x1(%r10),%ecx
imul   %r11d,%ecx
movslq %ecx,%rdx
mov    %r11d,%ecx
lea    (%r14,%rdx,4),%rdx
xor    %esi,%esi
jmp    12e9 <cluster_statistics+0x1a9>
nopw   0x0(%rax,%rax,1)
add    $0x1,%rsi
cmp    %rcx,%rsi
jae    1310 <cluster_statistics+0x1d0>
mov    (%r14,%rsi,4),%ebx
test   %ebx,%ebx
je     12e0 <cluster_statistics+0x1a0>
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
cmp    (%rdx,%rbp,4),%ebx
je     1364 <cluster_statistics+0x224>
add    $0x1,%rbp
cmp    %rbp,%rcx
jne    1300 <cluster_statistics+0x1c0>
jmp    12e0 <cluster_statistics+0x1a0>
test   %r10d,%r10d
jle    136f <cluster_statistics+0x22f>
lea    -0x1(%r11),%r8d
movslq %r11d,%r9
mov    %r10d,%r10d
xor    %ebp,%ebp
jmp    1339 <cluster_statistics+0x1f9>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x1,%rbp
cmp    %r10,%rbp
jae    136f <cluster_statistics+0x22f>
mov    %rbp,%rcx
imul   %r9,%rcx
mov    (%r14,%rcx,4),%ebx
mov    %r10,%rsi
mov    %r8d,%ecx
test   %ebx,%ebx
je     1330 <cluster_statistics+0x1f0>
xchg   %ax,%ax
movslq %ecx,%rdx
cmp    (%r14,%rdx,4),%ebx
je     1364 <cluster_statistics+0x224>
add    %r11d,%ecx
add    $0xffffffffffffffff,%rsi
jne    1350 <cluster_statistics+0x210>
jmp    1330 <cluster_statistics+0x1f0>
movslq %ebx,%rcx
movslq (%rdi,%rcx,4),%rcx
movb   $0x1,(%rax,%rcx,1)
mov    %r15,0x20(%rsp)
call   1030 <free@plt>
mov    0x30(%rsp),%r15
movl   $0x0,(%r15)
mov    0x48(%rsp),%r14
lea    0x0(,%r14,4),%rbp
mov    %rbp,%rdi
call   1050 <malloc@plt>
mov    0x10(%rsp),%rbx
mov    %rax,(%rbx)
mov    %rbp,%rdi
call   1050 <malloc@plt>
mov    %rax,0x0(%r13)
mov    %rbp,%rdi
call   1050 <malloc@plt>
mov    %rax,(%r12)
test   %r14d,%r14d
mov    0x18(%rsp),%rdi
mov    (%rsp),%r9
jle    15b9 <cluster_statistics+0x479>
mov    (%rbx),%rdx
mov    0x0(%r13),%rsi
mov    0x20(%rsp),%rcx
mov    %ecx,%r11d
cmp    $0x8,%ecx
jae    144b <cluster_statistics+0x30b>
xor    %ebp,%ebp
mov    %rbp,%rcx
not    %rcx
test   $0x1,%r11b
je     1407 <cluster_statistics+0x2c7>
movl   $0x0,(%rdx,%rbp,4)
movl   $0x0,(%rsi,%rbp,4)
movl   $0x0,(%rax,%rbp,4)
or     $0x1,%rbp
add    %r11,%rcx
je     1555 <cluster_statistics+0x415>
movl   $0x0,(%rdx,%rbp,4)
movl   $0x0,(%rsi,%rbp,4)
movl   $0x0,(%rax,%rbp,4)
movl   $0x0,0x4(%rdx,%rbp,4)
movl   $0x0,0x4(%rsi,%rbp,4)
movl   $0x0,0x4(%rax,%rbp,4)
add    $0x2,%rbp
cmp    %rbp,%r11
jne    1410 <cluster_statistics+0x2d0>
jmp    1555 <cluster_statistics+0x415>
lea    (%rdx,%r11,4),%rcx
lea    (%rsi,%r11,4),%rdi
lea    (%rax,%r11,4),%rbp
cmp    %rdi,%rdx
setb   %r15b
cmp    %rcx,%rsi
setb   %r13b
cmp    %rdx,%rbp
seta   %bl
cmp    %rcx,%rax
setb   %r9b
cmp    %rsi,%rbp
seta   %r8b
cmp    %rdi,%rax
setb   %r10b
xor    %ebp,%ebp
test   %r13b,%r15b
jne    1683 <cluster_statistics+0x543>
and    %r9b,%bl
jne    1683 <cluster_statistics+0x543>
and    %r10b,%r8b
mov    0x30(%rsp),%r15
mov    0x28(%rsp),%r13
mov    0x10(%rsp),%rbx
mov    0x18(%rsp),%rdi
mov    (%rsp),%r9
jne    13e2 <cluster_statistics+0x2a2>
mov    %r11d,%ebp
and    $0xfffffff8,%ebp
lea    -0x8(%rbp),%rcx
mov    %rcx,%r8
shr    $0x3,%r8
add    $0x1,%r8
test   %rcx,%rcx
je     16a0 <cluster_statistics+0x560>
mov    %r8,%rcx
and    $0xfffffffffffffffe,%rcx
xor    %ebx,%ebx
xorps  %xmm0,%xmm0
nop
movups %xmm0,(%rdx,%rbx,4)
movups %xmm0,0x10(%rdx,%rbx,4)
movups %xmm0,(%rsi,%rbx,4)
movups %xmm0,0x10(%rsi,%rbx,4)
movups %xmm0,(%rax,%rbx,4)
movups %xmm0,0x10(%rax,%rbx,4)
movups %xmm0,0x20(%rdx,%rbx,4)
movups %xmm0,0x30(%rdx,%rbx,4)
movups %xmm0,0x20(%rsi,%rbx,4)
movups %xmm0,0x30(%rsi,%rbx,4)
movups %xmm0,0x20(%rax,%rbx,4)
movups %xmm0,0x30(%rax,%rbx,4)
add    $0x10,%rbx
add    $0xfffffffffffffffe,%rcx
jne    14e0 <cluster_statistics+0x3a0>
test   $0x1,%r8b
je     1547 <cluster_statistics+0x407>
xorps  %xmm0,%xmm0
movups %xmm0,(%rdx,%rbx,4)
movups %xmm0,0x10(%rdx,%rbx,4)
movups %xmm0,(%rsi,%rbx,4)
movups %xmm0,0x10(%rsi,%rbx,4)
movups %xmm0,(%rax,%rbx,4)
movups %xmm0,0x10(%rax,%rbx,4)
cmp    %r11,%rbp
mov    0x10(%rsp),%rbx
jne    13e2 <cluster_statistics+0x2a2>
cmpl   $0x0,0x20(%rsp)
jle    15b9 <cluster_statistics+0x479>
mov    %r13,%rcx
mov    %r12,%r13
mov    (%rbx),%r12
mov    %rcx,%r14
mov    (%rcx),%r8
xor    %esi,%esi
mov    0x38(%rsp),%rdx
jmp    159c <cluster_statistics+0x45c>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movslq %ebx,%rcx
mov    %ebp,(%r12,%rcx,4)
addl   $0x1,(%r8,%rcx,4)
movsbl (%rdx,%rsi,1),%ebp
add    %ebp,(%rax,%rcx,4)
add    $0x1,%rsi
cmp    %rsi,%r11
je     15c4 <cluster_statistics+0x484>
mov    (%rdi,%rsi,4),%ebp
movslq %ebp,%rcx
mov    (%r9,%rcx,4),%ebx
test   %ebx,%ebx
jns    1580 <cluster_statistics+0x440>
mov    (%r15),%ebx
mov    %ebx,(%r9,%rcx,4)
lea    0x1(%rbx),%ecx
mov    %ecx,(%r15)
jmp    1580 <cluster_statistics+0x440>
mov    %r13,%r14
mov    %r12,%r13
mov    (%rbx),%r12
jmp    15c9 <cluster_statistics+0x489>
mov    0x10(%rsp),%rbx
call   1030 <free@plt>
mov    (%rsp),%rdi
call   1030 <free@plt>
mov    0x38(%rsp),%rdi
call   1030 <free@plt>
movslq (%r15),%rsi
shl    $0x2,%rsi
mov    %r12,%rdi
call   1060 <realloc@plt>
mov    %rax,(%rbx)
mov    %r14,%rbp
mov    (%r14),%rdi
movslq (%r15),%rsi
shl    $0x2,%rsi
call   1060 <realloc@plt>
mov    %rax,(%r14)
mov    0x0(%r13),%rdi
movslq (%r15),%rsi
shl    $0x2,%rsi
call   1060 <realloc@plt>
mov    %rax,0x0(%r13)
mov    0x98(%rsp),%rax
test   %rax,%rax
je     1674 <cluster_statistics+0x534>
mov    0xa0(%rsp),%r8
test   %r8,%r8
je     1674 <cluster_statistics+0x534>
movl   $0x0,(%rax)
cmpl   $0x0,(%r15)
jle    1669 <cluster_statistics+0x529>
mov    (%rbx),%rdx
mov    (%r14),%rsi
xor    %ecx,%ecx
xor    %edi,%edi
nopl   0x0(%rax)
mov    (%rsi,%rdi,4),%ebp
imul   (%rdx,%rdi,4),%ebp
add    %ebp,%ecx
mov    %ecx,(%rax)
add    $0x1,%rdi
movslq (%r15),%rbp
cmp    %rbp,%rdi
jl     1650 <cluster_statistics+0x510>
jmp    166b <cluster_statistics+0x52b>
xor    %ecx,%ecx
mov    0xc(%rsp),%edx
sub    %ecx,%edx
mov    %edx,(%r8)
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x30(%rsp),%r15
mov    0x28(%rsp),%r13
mov    0x10(%rsp),%rbx
mov    0x18(%rsp),%rdi
mov    (%rsp),%r9
jmp    13e2 <cluster_statistics+0x2a2>
xor    %ebx,%ebx
test   $0x1,%r8b
jne    1529 <cluster_statistics+0x3e9>
jmp    1547 <cluster_statistics+0x407>

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

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