#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*/ free(double *);
int /*<<< orphan*/ kmeanspp(double *, double *, int, int, int, int);
scalar_t__ malloc(int);
double model_variance(double *, double *, int, int, int);
int omp_get_thread_num();
void kmeanspp_multi(double *data, double *centroids, int n_samples, int n_runs,
                    int n_jobs, int k, int N, int D) {
  double *all_centroids;
  double *all_variances = (double *)malloc(n_jobs * sizeof(double));
  if (n_jobs > 1) {
    all_centroids = (double *)malloc(k * D * n_jobs * sizeof(double));
  } else {
    all_centroids = centroids;
  }
#pragma omp parallel shared(all_centroids, all_variances, data,                \
                            distance_metric) num_threads(n_jobs)
  {
    int id = omp_get_thread_num();
    double minimum_variance, cur_variance;
    double *current_centroid = (double *)malloc(k * D * sizeof(double));
    int local_iter = 0;
#pragma omp for
    for (int i = 0; i < n_runs; i++) {
      kmeanspp(data, current_centroid, n_samples, k, N, D);
      cur_variance = model_variance(data, current_centroid, k, N, D);
      if (local_iter == 0 || cur_variance < minimum_variance) {
        minimum_variance = cur_variance;
        all_variances[id] = cur_variance;
        for (int j = 0; j < k * D; j++) {
          all_centroids[id * D * k + j] = current_centroid[j];
        }
      }
      local_iter++;
    }
    free(current_centroid);
    do {
      ;
    } while (0);
  }
  if (n_jobs > 1) {
    double min_variance;
    int min_variance_index;
    do {
      ;
    } while (0);
    for (int i = 0; i < n_jobs; i++) {
      do {
        ;
      } while (0);
      if (i == 0 || all_variances[i] < min_variance) {
        min_variance = all_variances[i];
        min_variance_index = i;
      }
    }
    do {
      ;
    } while (0);
    for (int i = 0; i < k * D; i++) {
      centroids[i] = all_centroids[min_variance_index * k * D + i];
    }
  }
  free(all_centroids);
  free(all_variances);
}


x86 assembly (clang, -O0):
<kmeanspp_multi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9d,-0x20(%rbp)
movslq -0x1c(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1060 <malloc@plt>
mov    %rax,-0x30(%rbp)
cmpl   $0x1,-0x1c(%rbp)
jle    11b5 <kmeanspp_multi+0x65>
mov    -0x20(%rbp),%eax
imul   0x18(%rbp),%eax
imul   -0x1c(%rbp),%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1060 <malloc@plt>
mov    %rax,-0x28(%rbp)
jmp    11bd <kmeanspp_multi+0x6d>
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    $0x0,%al
call   1050 <omp_get_thread_num@plt>
mov    %eax,-0x34(%rbp)
mov    -0x20(%rbp),%eax
imul   0x18(%rbp),%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1060 <malloc@plt>
mov    %rax,-0x50(%rbp)
movl   $0x0,-0x54(%rbp)
movl   $0x0,-0x58(%rbp)
mov    -0x58(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    12d4 <kmeanspp_multi+0x184>
mov    -0x8(%rbp),%rdi
mov    -0x50(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x20(%rbp),%ecx
mov    0x10(%rbp),%r8d
mov    0x18(%rbp),%r9d
call   1070 <kmeanspp@plt>
mov    -0x8(%rbp),%rdi
mov    -0x50(%rbp),%rsi
mov    -0x20(%rbp),%edx
mov    0x10(%rbp),%ecx
mov    0x18(%rbp),%r8d
call   1040 <model_variance@plt>
movsd  %xmm0,-0x48(%rbp)
cmpl   $0x0,-0x54(%rbp)
je     124e <kmeanspp_multi+0xfe>
movsd  -0x48(%rbp),%xmm1
movsd  -0x40(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    12bd <kmeanspp_multi+0x16d>
movsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x48(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movl   $0x0,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
mov    -0x20(%rbp),%ecx
imul   0x18(%rbp),%ecx
cmp    %ecx,%eax
jge    12b8 <kmeanspp_multi+0x168>
mov    -0x50(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
mov    -0x34(%rbp),%ecx
imul   0x18(%rbp),%ecx
imul   -0x20(%rbp),%ecx
add    -0x5c(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    1271 <kmeanspp_multi+0x121>
jmp    12bd <kmeanspp_multi+0x16d>
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
mov    -0x58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x58(%rbp)
jmp    11ed <kmeanspp_multi+0x9d>
mov    -0x50(%rbp),%rdi
call   1030 <free@plt>
jmp    12e2 <kmeanspp_multi+0x192>
cmpl   $0x1,-0x1c(%rbp)
jle    13c1 <kmeanspp_multi+0x271>
jmp    12f1 <kmeanspp_multi+0x1a1>
jmp    12f6 <kmeanspp_multi+0x1a6>
movl   $0x0,-0x70(%rbp)
mov    -0x70(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1364 <kmeanspp_multi+0x214>
jmp    130e <kmeanspp_multi+0x1be>
jmp    1313 <kmeanspp_multi+0x1c3>
cmpl   $0x0,-0x70(%rbp)
je     1339 <kmeanspp_multi+0x1e9>
mov    -0x30(%rbp),%rax
movslq -0x70(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  -0x68(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1351 <kmeanspp_multi+0x201>
mov    -0x30(%rbp),%rax
movslq -0x70(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x70(%rbp),%eax
mov    %eax,-0x6c(%rbp)
jmp    1356 <kmeanspp_multi+0x206>
mov    -0x70(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x70(%rbp)
jmp    12fd <kmeanspp_multi+0x1ad>
jmp    1369 <kmeanspp_multi+0x219>
jmp    136e <kmeanspp_multi+0x21e>
movl   $0x0,-0x74(%rbp)
mov    -0x74(%rbp),%eax
mov    -0x20(%rbp),%ecx
imul   0x18(%rbp),%ecx
cmp    %ecx,%eax
jge    13bc <kmeanspp_multi+0x26c>
mov    -0x28(%rbp),%rax
mov    -0x6c(%rbp),%ecx
imul   -0x20(%rbp),%ecx
imul   0x18(%rbp),%ecx
add    -0x74(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    1375 <kmeanspp_multi+0x225>
jmp    13c1 <kmeanspp_multi+0x271>
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
mov    -0x30(%rbp),%rdi
call   1030 <free@plt>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kmeanspp_multi>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xb8,%rsp
mov    %r9d,%r15d
mov    %r8d,%ebp
mov    %ecx,0xc(%rsp)
mov    %edx,0x30(%rsp)
mov    %rsi,%r14
mov    %rdi,0xa8(%rsp)
mov    0xf8(%rsp),%ebx
mov    0xf0(%rsp),%eax
mov    %eax,0x28(%rsp)
lea    0x0(,%rbp,8),%edi
call   1060 <malloc@plt>
mov    %rax,0x48(%rsp)
mov    %ebx,0x2c(%rsp)
mov    %ebx,%eax
mov    %r15d,0x34(%rsp)
imul   %r15d,%eax
mov    %rax,0x20(%rsp)
lea    0x0(,%rax,8),%r13d
mov    %r14,0x58(%rsp)
cmp    $0x2,%ebp
jl     11d1 <kmeanspp_multi+0x81>
mov    %r13d,%edi
imul   %ebp,%edi
call   1060 <malloc@plt>
mov    %rax,%r14
mov    %rbp,0x50(%rsp)
mov    %r14,0x38(%rsp)
xor    %ebx,%ebx
xor    %eax,%eax
call   1050 <omp_get_thread_num@plt>
mov    %eax,%ebp
mov    %r13d,%edi
call   1060 <malloc@plt>
mov    %rax,%r13
cmpl   $0x0,0xc(%rsp)
jle    14f5 <kmeanspp_multi+0x3a5>
movslq %ebp,%rsi
mov    0x20(%rsp),%rcx
mov    %ecx,%eax
mov    %rsi,%rdx
mov    %rsi,0xa0(%rsp)
imul   %esi,%eax
cltq
mov    %ecx,%esi
mov    0x38(%rsp),%rdx
lea    (%rdx,%rax,8),%r15
mov    %rax,0x78(%rsp)
add    %rsi,%rax
lea    (%rdx,%rax,8),%rax
lea    0x0(,%rsi,8),%rcx
add    %r13,%rcx
mov    %esi,%edi
and    $0xfffffffc,%edi
mov    %rdi,0x90(%rsp)
add    $0xfffffffffffffffc,%rdi
mov    %rdi,0x88(%rsp)
shr    $0x2,%rdi
add    $0x1,%rdi
cmp    %rcx,%r15
setb   %cl
cmp    %rax,%r13
setb   %al
and    %cl,%al
mov    %al,0xb(%rsp)
mov    %edi,%eax
and    $0x3,%eax
and    $0xfffffffffffffffc,%rdi
mov    %rdi,0x60(%rsp)
mov    %rsi,0x18(%rsp)
and    $0x3,%esi
mov    %rsi,0x98(%rsp)
lea    0x10(%rdx),%rcx
mov    %rcx,0x70(%rsp)
mov    %r13,%rcx
add    $0x10,%rcx
mov    %rcx,0x68(%rsp)
mov    %rax,0x80(%rsp)
shl    $0x5,%rax
mov    %rax,0x40(%rsp)
mov    0xa8(%rsp),%rbp
mov    0x34(%rsp),%r14d
mov    0x2c(%rsp),%r12d
jmp    12e3 <kmeanspp_multi+0x193>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsd  %xmm0,0x10(%rsp)
add    $0x1,%ebx
cmp    0xc(%rsp),%ebx
je     14f5 <kmeanspp_multi+0x3a5>
mov    %rbx,0xb0(%rsp)
mov    %rbp,%rdi
mov    %r13,%rsi
mov    0x30(%rsp),%edx
mov    %r14d,%ecx
mov    0x28(%rsp),%ebx
mov    %ebx,%r8d
mov    %r12d,%r9d
call   1070 <kmeanspp@plt>
mov    %rbp,%rdi
mov    %r13,%rsi
mov    %r14d,%edx
mov    %ebx,%ecx
mov    0xb0(%rsp),%rbx
mov    %r12d,%r8d
call   1040 <model_variance@plt>
test   %ebx,%ebx
je     1332 <kmeanspp_multi+0x1e2>
movsd  0x10(%rsp),%xmm1
ucomisd %xmm0,%xmm1
jbe    12d6 <kmeanspp_multi+0x186>
mov    0x48(%rsp),%rax
mov    0xa0(%rsp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x20(%rsp),%rax
test   %eax,%eax
jle    12d0 <kmeanspp_multi+0x180>
cmp    $0x4,%eax
setb   %al
or     0xb(%rsp),%al
je     1365 <kmeanspp_multi+0x215>
xor    %eax,%eax
mov    0x18(%rsp),%rdx
jmp    1468 <kmeanspp_multi+0x318>
cmpq   $0xc,0x88(%rsp)
jae    137c <kmeanspp_multi+0x22c>
xor    %eax,%eax
mov    0x40(%rsp),%rsi
jmp    13fd <kmeanspp_multi+0x2ad>
mov    0x60(%rsp),%rcx
xor    %eax,%eax
mov    0x40(%rsp),%rsi
nopl   0x0(%rax,%rax,1)
movups 0x0(%r13,%rax,8),%xmm1
movups 0x10(%r13,%rax,8),%xmm2
movups %xmm1,(%r15,%rax,8)
movups %xmm2,0x10(%r15,%rax,8)
movups 0x20(%r13,%rax,8),%xmm1
movups 0x30(%r13,%rax,8),%xmm2
movups %xmm1,0x20(%r15,%rax,8)
movups %xmm2,0x30(%r15,%rax,8)
movups 0x40(%r13,%rax,8),%xmm1
movups 0x50(%r13,%rax,8),%xmm2
movups %xmm1,0x40(%r15,%rax,8)
movups %xmm2,0x50(%r15,%rax,8)
movupd 0x60(%r13,%rax,8),%xmm1
movupd 0x70(%r13,%rax,8),%xmm2
movupd %xmm1,0x60(%r15,%rax,8)
movupd %xmm2,0x70(%r15,%rax,8)
add    $0x10,%rax
add    $0xfffffffffffffffc,%rcx
jne    1390 <kmeanspp_multi+0x240>
cmpq   $0x0,0x80(%rsp)
je     144f <kmeanspp_multi+0x2ff>
mov    0x78(%rsp),%rcx
add    %rax,%rcx
mov    0x70(%rsp),%rdx
lea    (%rdx,%rcx,8),%rcx
mov    0x68(%rsp),%rdx
lea    (%rdx,%rax,8),%rax
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movupd -0x10(%rax,%rdx,1),%xmm1
movupd (%rax,%rdx,1),%xmm2
movupd %xmm1,-0x10(%rcx,%rdx,1)
movupd %xmm2,(%rcx,%rdx,1)
add    $0x20,%rdx
cmp    %rdx,%rsi
jne    1430 <kmeanspp_multi+0x2e0>
mov    0x90(%rsp),%rcx
mov    %rcx,%rax
mov    0x18(%rsp),%rdx
cmp    %rdx,%rcx
je     12d0 <kmeanspp_multi+0x180>
mov    %rax,%rcx
not    %rcx
add    %rdx,%rcx
mov    0x98(%rsp),%rdx
test   %rdx,%rdx
je     1497 <kmeanspp_multi+0x347>
xchg   %ax,%ax
movsd  0x0(%r13,%rax,8),%xmm1
movsd  %xmm1,(%r15,%rax,8)
add    $0x1,%rax
add    $0xffffffffffffffff,%rdx
jne    1480 <kmeanspp_multi+0x330>
cmp    $0x3,%rcx
jb     12d0 <kmeanspp_multi+0x180>
mov    0x18(%rsp),%rcx
cs nopw 0x0(%rax,%rax,1)
movsd  0x0(%r13,%rax,8),%xmm1
movsd  %xmm1,(%r15,%rax,8)
movsd  0x8(%r13,%rax,8),%xmm1
movsd  %xmm1,0x8(%r15,%rax,8)
movsd  0x10(%r13,%rax,8),%xmm1
movsd  %xmm1,0x10(%r15,%rax,8)
movsd  0x18(%r13,%rax,8),%xmm1
movsd  %xmm1,0x18(%r15,%rax,8)
add    $0x4,%rax
cmp    %rax,%rcx
jne    14b0 <kmeanspp_multi+0x360>
jmp    12d0 <kmeanspp_multi+0x180>
mov    %r13,%rdi
call   1030 <free@plt>
mov    0x50(%rsp),%rax
cmp    $0x2,%eax
mov    0x58(%rsp),%r8
mov    0x48(%rsp),%r14
mov    0x38(%rsp),%rdi
mov    0x20(%rsp),%r10
jl     17a9 <kmeanspp_multi+0x659>
mov    %eax,%ecx
movsd  (%r14),%xmm0
lea    -0x1(%rcx),%r9
add    $0xfffffffffffffffe,%rcx
mov    %r9d,%eax
and    $0x3,%eax
cmp    $0x3,%rcx
jae    1543 <kmeanspp_multi+0x3f3>
xor    %edx,%edx
mov    $0x1,%ecx
jmp    15ad <kmeanspp_multi+0x45d>
and    $0xfffffffffffffffc,%r9
xor    %edx,%edx
mov    $0x1,%ecx
xor    %esi,%esi
movsd  (%r14,%rcx,8),%xmm1
ucomisd %xmm1,%xmm0
cmova  %ecx,%edx
movsd  0x8(%r14,%rcx,8),%xmm2
minsd  %xmm0,%xmm1
ucomisd %xmm2,%xmm1
lea    0x1(%rcx),%ebp
cmovbe %edx,%ebp
minsd  %xmm1,%xmm2
movsd  0x10(%r14,%rcx,8),%xmm1
ucomisd %xmm1,%xmm2
lea    0x2(%rcx),%ebx
cmovbe %ebp,%ebx
minsd  %xmm2,%xmm1
movsd  0x18(%r14,%rcx,8),%xmm0
ucomisd %xmm0,%xmm1
lea    0x3(%rcx),%edx
cmovbe %ebx,%edx
minsd  %xmm1,%xmm0
add    $0x4,%rcx
add    $0x4,%rsi
cmp    %r9,%rsi
jne    1550 <kmeanspp_multi+0x400>
test   %rax,%rax
je     15df <kmeanspp_multi+0x48f>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsd  (%r14,%rcx,8),%xmm1
ucomisd %xmm1,%xmm0
cmova  %ecx,%edx
minsd  %xmm0,%xmm1
add    $0x1,%rcx
movapd %xmm1,%xmm0
add    $0xffffffffffffffff,%rax
jne    15c0 <kmeanspp_multi+0x470>
test   %r10d,%r10d
jle    17a9 <kmeanspp_multi+0x659>
imul   %r10d,%edx
movslq %edx,%r9
mov    %r10d,%eax
cmp    $0x4,%r10d
jb     161a <kmeanspp_multi+0x4ca>
lea    (%r9,%rax,1),%rdx
lea    (%rdi,%rdx,8),%rdx
cmp    %r8,%rdx
jbe    16b0 <kmeanspp_multi+0x560>
lea    (%r8,%rax,8),%rdx
lea    (%rdi,%r9,8),%rsi
cmp    %rdx,%rsi
jae    16b0 <kmeanspp_multi+0x560>
xor    %edx,%edx
mov    %rdx,%rsi
not    %rsi
add    %rax,%rsi
mov    %rax,%rcx
and    $0x3,%rcx
je     1656 <kmeanspp_multi+0x506>
lea    (%rdi,%r9,8),%rbp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsd  0x0(%rbp,%rdx,8),%xmm0
movsd  %xmm0,(%r8,%rdx,8)
add    $0x1,%rdx
add    $0xffffffffffffffff,%rcx
jne    1640 <kmeanspp_multi+0x4f0>
cmp    $0x3,%rsi
jb     17a9 <kmeanspp_multi+0x659>
lea    (%rdi,%r9,8),%rcx
add    $0x18,%rcx
nopl   0x0(%rax,%rax,1)
movsd  -0x18(%rcx,%rdx,8),%xmm0
movsd  %xmm0,(%r8,%rdx,8)
movsd  -0x10(%rcx,%rdx,8),%xmm0
movsd  %xmm0,0x8(%r8,%rdx,8)
movsd  -0x8(%rcx,%rdx,8),%xmm0
movsd  %xmm0,0x10(%r8,%rdx,8)
movsd  (%rcx,%rdx,8),%xmm0
movsd  %xmm0,0x18(%r8,%rdx,8)
add    $0x4,%rdx
cmp    %rdx,%rax
jne    1670 <kmeanspp_multi+0x520>
jmp    17a9 <kmeanspp_multi+0x659>
mov    %eax,%edx
and    $0xfffffffc,%edx
lea    -0x4(%rdx),%rbp
mov    %rbp,%rsi
shr    $0x2,%rsi
add    $0x1,%rsi
mov    %esi,%ecx
and    $0x3,%ecx
cmp    $0xc,%rbp
jae    16d6 <kmeanspp_multi+0x586>
xor    %ebp,%ebp
jmp    1754 <kmeanspp_multi+0x604>
and    $0xfffffffffffffffc,%rsi
lea    (%rdi,%r9,8),%rbx
add    $0x70,%rbx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movups -0x70(%rbx,%rbp,8),%xmm0
movups -0x60(%rbx,%rbp,8),%xmm1
movups %xmm0,(%r8,%rbp,8)
movups %xmm1,0x10(%r8,%rbp,8)
movups -0x50(%rbx,%rbp,8),%xmm0
movups -0x40(%rbx,%rbp,8),%xmm1
movups %xmm0,0x20(%r8,%rbp,8)
movups %xmm1,0x30(%r8,%rbp,8)
movups -0x30(%rbx,%rbp,8),%xmm0
movups -0x20(%rbx,%rbp,8),%xmm1
movups %xmm0,0x40(%r8,%rbp,8)
movups %xmm1,0x50(%r8,%rbp,8)
movupd -0x10(%rbx,%rbp,8),%xmm0
movupd (%rbx,%rbp,8),%xmm1
movupd %xmm0,0x60(%r8,%rbp,8)
movupd %xmm1,0x70(%r8,%rbp,8)
add    $0x10,%rbp
add    $0xfffffffffffffffc,%rsi
jne    16f0 <kmeanspp_multi+0x5a0>
test   %rcx,%rcx
je     17a0 <kmeanspp_multi+0x650>
lea    (%r8,%rbp,8),%rsi
add    $0x10,%rsi
add    %r9,%rbp
lea    (%rdi,%rbp,8),%rbp
add    $0x10,%rbp
shl    $0x5,%rcx
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movupd -0x10(%rbp,%rbx,1),%xmm0
movupd 0x0(%rbp,%rbx,1),%xmm1
movupd %xmm0,-0x10(%rsi,%rbx,1)
movupd %xmm1,(%rsi,%rbx,1)
add    $0x20,%rbx
cmp    %rbx,%rcx
jne    1780 <kmeanspp_multi+0x630>
cmp    %rax,%rdx
jne    161c <kmeanspp_multi+0x4cc>
call   1030 <free@plt>
mov    %r14,%rdi
add    $0xb8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @kmeanspp_multi(double* %0, double* %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7) {
%9 = alloca double*
%10 = alloca double*
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca double*
%18 = alloca double*
%19 = alloca i32
%20 = alloca double
%21 = alloca double
%22 = alloca double*
%23 = alloca i32
%24 = alloca i32
%25 = alloca i32
%26 = alloca double
%27 = alloca i32
%28 = alloca i32
%29 = alloca i32
store double* %0, double** %9
store double* %1, double** %10
store i32 %2, i32* %11
store i32 %3, i32* %12
store i32 %4, i32* %13
store i32 %5, i32* %14
store i32 %6, i32* %15
store i32 %7, i32* %16
%30 = load i32, i32* %13
%31 = sext i32 %30 to i64
%32 = mul i64 %31, 8
%33 = trunc i64 %32 to i32
%34 = call i64 @malloc(i32 %33)
%35 = inttoptr i64 %34 to double*
store double* %35, double** %18
%36 = load i32, i32* %13
%37 = icmp sgt i32 %36, 1
br i1 %37, label %38, label %49
38: ; preds = %8
%39 = load i32, i32* %14
%40 = load i32, i32* %16
%41 = mul nsw i32 %39, %40
%42 = load i32, i32* %13
%43 = mul nsw i32 %41, %42
%44 = sext i32 %43 to i64
%45 = mul i64 %44, 8
%46 = trunc i64 %45 to i32
%47 = call i64 @malloc(i32 %46)
%48 = inttoptr i64 %47 to double*
store double* %48, double** %17
br label %51
49: ; preds = %8
%50 = load double*, double** %10
store double* %50, double** %17
br label %51
51: ; preds = %49, %38
%52 = call i32 (...) @omp_get_thread_num()
store i32 %52, i32* %19
%53 = load i32, i32* %14
%54 = load i32, i32* %16
%55 = mul nsw i32 %53, %54
%56 = sext i32 %55 to i64
%57 = mul i64 %56, 8
%58 = trunc i64 %57 to i32
%59 = call i64 @malloc(i32 %58)
%60 = inttoptr i64 %59 to double*
store double* %60, double** %22
store i32 0, i32* %23
store i32 0, i32* %24
br label %61
61: ; preds = %121, %51
%62 = load i32, i32* %24
%63 = load i32, i32* %12
%64 = icmp slt i32 %62, %63
br i1 %64, label %65, label %124
65: ; preds = %61
%66 = load double*, double** %9
%67 = load double*, double** %22
%68 = load i32, i32* %11
%69 = load i32, i32* %14
%70 = load i32, i32* %15
%71 = load i32, i32* %16
%72 = call i32 @kmeanspp(double* %66, double* %67, i32 %68, i32 %69, i32 %70, i32 %71)
%73 = load double*, double** %9
%74 = load double*, double** %22
%75 = load i32, i32* %14
%76 = load i32, i32* %15
%77 = load i32, i32* %16
%78 = call double @model_variance(double* %73, double* %74, i32 %75, i32 %76, i32 %77)
store double %78, double* %21
%79 = load i32, i32* %23
%80 = icmp eq i32 %79, 0
br i1 %80, label %85, label %81
81: ; preds = %65
%82 = load double, double* %21
%83 = load double, double* %20
%84 = fcmp olt double %82, %83
br i1 %84, label %85, label %118
85: ; preds = %81, %65
%86 = load double, double* %21
store double %86, double* %20
%87 = load double, double* %21
%88 = load double*, double** %18
%89 = load i32, i32* %19
%90 = sext i32 %89 to i64
%91 = getelementptr inbounds double, double* %88, i64 %90
store double %87, double* %91
store i32 0, i32* %25
br label %92
92: ; preds = %114, %85
%93 = load i32, i32* %25
%94 = load i32, i32* %14
%95 = load i32, i32* %16
%96 = mul nsw i32 %94, %95
%97 = icmp slt i32 %93, %96
br i1 %97, label %98, label %117
98: ; preds = %92
%99 = load double*, double** %22
%100 = load i32, i32* %25
%101 = sext i32 %100 to i64
%102 = getelementptr inbounds double, double* %99, i64 %101
%103 = load double, double* %102
%104 = load double*, double** %17
%105 = load i32, i32* %19
%106 = load i32, i32* %16
%107 = mul nsw i32 %105, %106
%108 = load i32, i32* %14
%109 = mul nsw i32 %107, %108
%110 = load i32, i32* %25
%111 = add nsw i32 %109, %110
%112 = sext i32 %111 to i64
%113 = getelementptr inbounds double, double* %104, i64 %112
store double %103, double* %113
br label %114
114: ; preds = %98
%115 = load i32, i32* %25
%116 = add nsw i32 %115, 1
store i32 %116, i32* %25
br label %92
117: ; preds = %92
br label %118
118: ; preds = %117, %81
%119 = load i32, i32* %23
%120 = add nsw i32 %119, 1
store i32 %120, i32* %23
br label %121
121: ; preds = %118
%122 = load i32, i32* %24
%123 = add nsw i32 %122, 1
store i32 %123, i32* %24
br label %61
124: ; preds = %61
%125 = load double*, double** %22
%126 = call i32 @free(double* %125)
br label %127
127: ; preds = %124
br label %128
128: ; preds = %127
%129 = load i32, i32* %13
%130 = icmp sgt i32 %129, 1
br i1 %130, label %131, label %191
131: ; preds = %128
br label %132
132: ; preds = %131
br label %133
133: ; preds = %132
store i32 0, i32* %28
br label %134
134: ; preds = %159, %133
%135 = load i32, i32* %28
%136 = load i32, i32* %13
%137 = icmp slt i32 %135, %136
br i1 %137, label %138, label %162
138: ; preds = %134
br label %139
139: ; preds = %138
br label %140
140: ; preds = %139
%141 = load i32, i32* %28
%142 = icmp eq i32 %141, 0
br i1 %142, label %151, label %143
143: ; preds = %140
%144 = load double*, double** %18
%145 = load i32, i32* %28
%146 = sext i32 %145 to i64
%147 = getelementptr inbounds double, double* %144, i64 %146
%148 = load double, double* %147
%149 = load double, double* %26
%150 = fcmp olt double %148, %149
br i1 %150, label %151, label %158
151: ; preds = %143, %140
%152 = load double*, double** %18
%153 = load i32, i32* %28
%154 = sext i32 %153 to i64
%155 = getelementptr inbounds double, double* %152, i64 %154
%156 = load double, double* %155
store double %156, double* %26
%157 = load i32, i32* %28
store i32 %157, i32* %27
br label %158
158: ; preds = %151, %143
br label %159
159: ; preds = %158
%160 = load i32, i32* %28
%161 = add nsw i32 %160, 1
store i32 %161, i32* %28
br label %134
162: ; preds = %134
br label %163
163: ; preds = %162
br label %164
164: ; preds = %163
store i32 0, i32* %29
br label %165
165: ; preds = %187, %164
%166 = load i32, i32* %29
%167 = load i32, i32* %14
%168 = load i32, i32* %16
%169 = mul nsw i32 %167, %168
%170 = icmp slt i32 %166, %169
br i1 %170, label %171, label %190
171: ; preds = %165
%172 = load double*, double** %17
%173 = load i32, i32* %27
%174 = load i32, i32* %14
%175 = mul nsw i32 %173, %174
%176 = load i32, i32* %16
%177 = mul nsw i32 %175, %176
%178 = load i32, i32* %29
%179 = add nsw i32 %177, %178
%180 = sext i32 %179 to i64
%181 = getelementptr inbounds double, double* %172, i64 %180
%182 = load double, double* %181
%183 = load double*, double** %10
%184 = load i32, i32* %29
%185 = sext i32 %184 to i64
%186 = getelementptr inbounds double, double* %183, i64 %185
store double %182, double* %186
br label %187
187: ; preds = %171
%188 = load i32, i32* %29
%189 = add nsw i32 %188, 1
store i32 %189, i32* %29
br label %165
190: ; preds = %165
br label %191
191: ; preds = %190, %128
%192 = load double*, double** %17
%193 = call i32 @free(double* %192)
%194 = load double*, double** %18
%195 = call i32 @free(double* %194)
ret void
}

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