#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 *);
scalar_t__ malloc(int);
int /*<<< orphan*/ minibatch(double *, double *, int, int, double, double, int,
                             int, int);
double model_variance(double *, double *, int, int, int);
int omp_get_thread_num();
void minibatch_multi(double *data, double *centroids, int n_samples,
                     int max_iter, int n_runs, int n_jobs,
                     double bic_ratio_termination, double reassignment_ratio,
                     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++) {
      for (int j = 0; j < k * D; j++) {
        current_centroid[j] = centroids[j];
      }
      minibatch(data, current_centroid, n_samples, max_iter,
                bic_ratio_termination, reassignment_ratio, 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):
<minibatch_multi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    0x20(%rbp),%eax
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)
movsd  %xmm0,-0x28(%rbp)
movsd  %xmm1,-0x30(%rbp)
movslq -0x20(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1070 <malloc@plt>
mov    %rax,-0x40(%rbp)
cmpl   $0x1,-0x20(%rbp)
jle    11c2 <minibatch_multi+0x72>
mov    0x10(%rbp),%eax
imul   0x20(%rbp),%eax
imul   -0x20(%rbp),%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1070 <malloc@plt>
mov    %rax,-0x38(%rbp)
jmp    11ca <minibatch_multi+0x7a>
mov    -0x10(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    $0x0,%al
call   1050 <omp_get_thread_num@plt>
mov    %eax,-0x44(%rbp)
mov    0x10(%rbp),%eax
imul   0x20(%rbp),%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1070 <malloc@plt>
mov    %rax,-0x60(%rbp)
movl   $0x0,-0x64(%rbp)
movl   $0x0,-0x68(%rbp)
mov    -0x68(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1332 <minibatch_multi+0x1e2>
movl   $0x0,-0x6c(%rbp)
mov    -0x6c(%rbp),%eax
mov    0x10(%rbp),%ecx
imul   0x20(%rbp),%ecx
cmp    %ecx,%eax
jge    1247 <minibatch_multi+0xf7>
mov    -0x10(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x60(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x6c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x6c(%rbp)
jmp    120d <minibatch_multi+0xbd>
mov    -0x8(%rbp),%rdi
mov    -0x60(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
movsd  -0x28(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
mov    0x10(%rbp),%r8d
mov    0x18(%rbp),%r9d
mov    0x20(%rbp),%eax
mov    %eax,(%rsp)
call   1060 <minibatch@plt>
mov    -0x8(%rbp),%rdi
mov    -0x60(%rbp),%rsi
mov    0x10(%rbp),%edx
mov    0x18(%rbp),%ecx
mov    0x20(%rbp),%r8d
call   1040 <model_variance@plt>
movsd  %xmm0,-0x58(%rbp)
cmpl   $0x0,-0x64(%rbp)
je     12ac <minibatch_multi+0x15c>
movsd  -0x58(%rbp),%xmm1
movsd  -0x50(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    131b <minibatch_multi+0x1cb>
movsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x58(%rbp),%xmm0
mov    -0x40(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movl   $0x0,-0x70(%rbp)
mov    -0x70(%rbp),%eax
mov    0x10(%rbp),%ecx
imul   0x20(%rbp),%ecx
cmp    %ecx,%eax
jge    1316 <minibatch_multi+0x1c6>
mov    -0x60(%rbp),%rax
movslq -0x70(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x38(%rbp),%rax
mov    -0x44(%rbp),%ecx
imul   0x20(%rbp),%ecx
imul   0x10(%rbp),%ecx
add    -0x70(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x70(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x70(%rbp)
jmp    12cf <minibatch_multi+0x17f>
jmp    131b <minibatch_multi+0x1cb>
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
mov    -0x68(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x68(%rbp)
jmp    11fa <minibatch_multi+0xaa>
mov    -0x60(%rbp),%rdi
call   1030 <free@plt>
jmp    1340 <minibatch_multi+0x1f0>
cmpl   $0x1,-0x20(%rbp)
jle    1431 <minibatch_multi+0x2e1>
jmp    134f <minibatch_multi+0x1ff>
jmp    1354 <minibatch_multi+0x204>
movl   $0x0,-0x80(%rbp)
mov    -0x80(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    13c2 <minibatch_multi+0x272>
jmp    136c <minibatch_multi+0x21c>
jmp    1371 <minibatch_multi+0x221>
cmpl   $0x0,-0x80(%rbp)
je     1397 <minibatch_multi+0x247>
mov    -0x40(%rbp),%rax
movslq -0x80(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  -0x78(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    13af <minibatch_multi+0x25f>
mov    -0x40(%rbp),%rax
movslq -0x80(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x80(%rbp),%eax
mov    %eax,-0x7c(%rbp)
jmp    13b4 <minibatch_multi+0x264>
mov    -0x80(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x80(%rbp)
jmp    135b <minibatch_multi+0x20b>
jmp    13c7 <minibatch_multi+0x277>
jmp    13cc <minibatch_multi+0x27c>
movl   $0x0,-0x84(%rbp)
mov    -0x84(%rbp),%eax
mov    0x10(%rbp),%ecx
imul   0x20(%rbp),%ecx
cmp    %ecx,%eax
jge    142c <minibatch_multi+0x2dc>
mov    -0x38(%rbp),%rax
mov    -0x7c(%rbp),%ecx
imul   0x10(%rbp),%ecx
imul   0x20(%rbp),%ecx
add    -0x84(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x84(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x84(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x84(%rbp)
jmp    13d6 <minibatch_multi+0x286>
jmp    1431 <minibatch_multi+0x2e1>
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
mov    -0x40(%rbp),%rdi
call   1030 <free@plt>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<minibatch_multi>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xd8,%rsp
movsd  %xmm1,0xc8(%rsp)
movsd  %xmm0,0xc0(%rsp)
mov    %r9d,%r15d
mov    %r8d,0x10(%rsp)
mov    %ecx,0x34(%rsp)
mov    %edx,0x30(%rsp)
mov    %rsi,%rbx
mov    %rdi,0xb8(%rsp)
mov    0x120(%rsp),%r14d
mov    0x118(%rsp),%eax
mov    %eax,0x2c(%rsp)
mov    0x110(%rsp),%ebp
lea    0x0(,%r15,8),%edi
call   1070 <malloc@plt>
mov    %rax,0x60(%rsp)
mov    %r14d,0x14(%rsp)
mov    %r14d,%eax
mov    %ebp,0x28(%rsp)
imul   %ebp,%eax
mov    %rax,0x20(%rsp)
lea    0x0(,%rax,8),%r14d
mov    %rbx,%rax
cmp    $0x2,%r15d
jl     11eb <minibatch_multi+0x9b>
mov    %r14d,%edi
imul   %r15d,%edi
call   1070 <malloc@plt>
mov    %r15,0x70(%rsp)
mov    %rax,0x38(%rsp)
xor    %r15d,%r15d
xor    %eax,%eax
call   1050 <omp_get_thread_num@plt>
mov    %eax,%ebp
mov    %r14d,%edi
call   1070 <malloc@plt>
mov    %rax,%r14
cmpl   $0x0,0x10(%rsp)
mov    0x20(%rsp),%rdi
jle    16a1 <minibatch_multi+0x551>
movslq %ebp,%rdx
mov    %edi,%eax
mov    %rdx,%rcx
mov    %rdx,0xa0(%rsp)
imul   %edx,%eax
cltq
mov    %edi,%r8d
mov    0x38(%rsp),%rsi
lea    (%rsi,%rax,8),%rbp
mov    %rax,0x80(%rsp)
add    %r8,%rax
lea    (%rsi,%rax,8),%r9
lea    (%r14,%r8,8),%r10
lea    (%rbx,%r8,8),%rdx
mov    %r8d,%eax
and    $0xfffffffc,%eax
mov    %rax,0x58(%rsp)
add    $0xfffffffffffffffc,%rax
mov    %rax,0x50(%rsp)
mov    %rax,%rcx
shr    $0x2,%rcx
add    $0x1,%rcx
cmp    %rdx,%r14
setb   %dl
cmp    %rbx,%r10
seta   %al
and    %dl,%al
mov    %al,0xf(%rsp)
mov    %ecx,%edx
and    $0x3,%edx
mov    %rcx,%rax
mov    %rcx,0x88(%rsp)
and    $0xfffffffffffffffc,%rcx
mov    %rcx,0x40(%rsp)
mov    %r8d,%eax
and    $0x3,%eax
mov    %rax,0x68(%rsp)
cmp    %r10,%rbp
setb   %cl
cmp    %r9,%r14
setb   %al
and    %cl,%al
mov    %al,0xe(%rsp)
mov    %r14,%rax
add    $0x10,%rax
mov    %rax,0x48(%rsp)
lea    0x10(%rbx),%rax
mov    %rax,0x90(%rsp)
mov    %rdx,0x98(%rsp)
mov    %rdx,%r9
shl    $0x5,%r9
lea    0x10(%rsi),%rax
mov    %rax,0x78(%rsp)
mov    %r8,0xb0(%rsp)
mov    %r9,0xa8(%rsp)
mov    0x28(%rsp),%r12d
mov    0x2c(%rsp),%r13d
jmp    1325 <minibatch_multi+0x1d5>
nopw   0x0(%rax,%rax,1)
movsd  %xmm0,0x18(%rsp)
add    $0x1,%r15d
cmp    0x10(%rsp),%r15d
je     16a1 <minibatch_multi+0x551>
mov    %r15,0xd0(%rsp)
test   %edi,%edi
jle    149b <minibatch_multi+0x34b>
cmp    $0x4,%edi
setb   %al
or     0xf(%rsp),%al
je     1350 <minibatch_multi+0x200>
xor    %eax,%eax
jmp    142c <minibatch_multi+0x2dc>
nopl   0x0(%rax,%rax,1)
cmpq   $0xc,0x50(%rsp)
jae    135c <minibatch_multi+0x20c>
xor    %eax,%eax
jmp    13d4 <minibatch_multi+0x284>
mov    0x40(%rsp),%rcx
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movups (%rbx,%rax,8),%xmm0
movups 0x10(%rbx,%rax,8),%xmm1
movups %xmm0,(%r14,%rax,8)
movups %xmm1,0x10(%r14,%rax,8)
movups 0x20(%rbx,%rax,8),%xmm0
movups 0x30(%rbx,%rax,8),%xmm1
movups %xmm0,0x20(%r14,%rax,8)
movups %xmm1,0x30(%r14,%rax,8)
movups 0x40(%rbx,%rax,8),%xmm0
movups 0x50(%rbx,%rax,8),%xmm1
movups %xmm0,0x40(%r14,%rax,8)
movups %xmm1,0x50(%r14,%rax,8)
movupd 0x60(%rbx,%rax,8),%xmm0
movupd 0x70(%rbx,%rax,8),%xmm1
movupd %xmm0,0x60(%r14,%rax,8)
movupd %xmm1,0x70(%r14,%rax,8)
add    $0x10,%rax
add    $0xfffffffffffffffc,%rcx
jne    1370 <minibatch_multi+0x220>
cmpq   $0x0,0x98(%rsp)
je     141f <minibatch_multi+0x2cf>
mov    0x48(%rsp),%rcx
lea    (%rcx,%rax,8),%rcx
mov    0x90(%rsp),%rdx
lea    (%rdx,%rax,8),%rax
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
movupd -0x10(%rax,%rdx,1),%xmm0
movupd (%rax,%rdx,1),%xmm1
movupd %xmm0,-0x10(%rcx,%rdx,1)
movupd %xmm1,(%rcx,%rdx,1)
add    $0x20,%rdx
cmp    %rdx,%r9
jne    1400 <minibatch_multi+0x2b0>
mov    0x58(%rsp),%rcx
mov    %rcx,%rax
cmp    %r8,%rcx
je     149b <minibatch_multi+0x34b>
mov    %rax,%rcx
not    %rcx
add    %r8,%rcx
mov    0x68(%rsp),%rdx
test   %rdx,%rdx
je     1455 <minibatch_multi+0x305>
nop
movsd  (%rbx,%rax,8),%xmm0
movsd  %xmm0,(%r14,%rax,8)
add    $0x1,%rax
add    $0xffffffffffffffff,%rdx
jne    1440 <minibatch_multi+0x2f0>
cmp    $0x3,%rcx
jb     149b <minibatch_multi+0x34b>
nopl   0x0(%rax,%rax,1)
movsd  (%rbx,%rax,8),%xmm0
movsd  %xmm0,(%r14,%rax,8)
movsd  0x8(%rbx,%rax,8),%xmm0
movsd  %xmm0,0x8(%r14,%rax,8)
movsd  0x10(%rbx,%rax,8),%xmm0
movsd  %xmm0,0x10(%r14,%rax,8)
movsd  0x18(%rbx,%rax,8),%xmm0
movsd  %xmm0,0x18(%r14,%rax,8)
add    $0x4,%rax
cmp    %rax,%r8
jne    1460 <minibatch_multi+0x310>
mov    0x14(%rsp),%eax
mov    %eax,(%rsp)
mov    0xb8(%rsp),%r15
mov    %r15,%rdi
mov    %r14,%rsi
mov    0x30(%rsp),%edx
mov    0x34(%rsp),%ecx
movsd  0xc0(%rsp),%xmm0
movsd  0xc8(%rsp),%xmm1
mov    %r12d,%r8d
mov    %r13d,%r9d
call   1060 <minibatch@plt>
mov    %r15,%rdi
mov    %r14,%rsi
mov    %r12d,%edx
mov    %r13d,%ecx
mov    0x14(%rsp),%r8d
call   1040 <model_variance@plt>
mov    0xa8(%rsp),%r9
mov    0xb0(%rsp),%r8
mov    0x20(%rsp),%rdi
mov    0xd0(%rsp),%r15
test   %r15d,%r15d
je     151d <minibatch_multi+0x3cd>
movsd  0x18(%rsp),%xmm1
ucomisd %xmm0,%xmm1
jbe    1316 <minibatch_multi+0x1c6>
mov    0x60(%rsp),%rax
mov    0xa0(%rsp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
test   %edi,%edi
jle    1310 <minibatch_multi+0x1c0>
cmp    $0x4,%edi
setb   %al
or     0xe(%rsp),%al
je     154a <minibatch_multi+0x3fa>
xor    %eax,%eax
jmp    1620 <minibatch_multi+0x4d0>
cmpq   $0xc,0x50(%rsp)
jae    1556 <minibatch_multi+0x406>
xor    %eax,%eax
jmp    15c5 <minibatch_multi+0x475>
mov    0x40(%rsp),%rcx
xor    %eax,%eax
nopl   (%rax)
movups (%r14,%rax,8),%xmm1
movups 0x10(%r14,%rax,8),%xmm2
movups %xmm1,0x0(%rbp,%rax,8)
movups %xmm2,0x10(%rbp,%rax,8)
movups 0x20(%r14,%rax,8),%xmm1
movups 0x30(%r14,%rax,8),%xmm2
movups %xmm1,0x20(%rbp,%rax,8)
movups %xmm2,0x30(%rbp,%rax,8)
movups 0x40(%r14,%rax,8),%xmm1
movups 0x50(%r14,%rax,8),%xmm2
movups %xmm1,0x40(%rbp,%rax,8)
movups %xmm2,0x50(%rbp,%rax,8)
movupd 0x60(%r14,%rax,8),%xmm1
movupd 0x70(%r14,%rax,8),%xmm2
movupd %xmm1,0x60(%rbp,%rax,8)
movupd %xmm2,0x70(%rbp,%rax,8)
add    $0x10,%rax
add    $0xfffffffffffffffc,%rcx
jne    1560 <minibatch_multi+0x410>
testb  $0x3,0x88(%rsp)
03
je     160f <minibatch_multi+0x4bf>
mov    0x80(%rsp),%rcx
add    %rax,%rcx
mov    0x78(%rsp),%rdx
lea    (%rdx,%rcx,8),%rcx
mov    0x48(%rsp),%rdx
lea    (%rdx,%rax,8),%rax
xor    %edx,%edx
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,%r9
jne    15f0 <minibatch_multi+0x4a0>
mov    0x58(%rsp),%rcx
mov    %rcx,%rax
cmp    %r8,%rcx
je     1310 <minibatch_multi+0x1c0>
mov    %rax,%rcx
not    %rcx
add    %r8,%rcx
test   $0x3,%r8b
je     1656 <minibatch_multi+0x506>
mov    0x68(%rsp),%rdx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsd  (%r14,%rax,8),%xmm1
movsd  %xmm1,0x0(%rbp,%rax,8)
add    $0x1,%rax
add    $0xffffffffffffffff,%rdx
jne    1640 <minibatch_multi+0x4f0>
cmp    $0x3,%rcx
jb     1310 <minibatch_multi+0x1c0>
movsd  (%r14,%rax,8),%xmm1
movsd  %xmm1,0x0(%rbp,%rax,8)
movsd  0x8(%r14,%rax,8),%xmm1
movsd  %xmm1,0x8(%rbp,%rax,8)
movsd  0x10(%r14,%rax,8),%xmm1
movsd  %xmm1,0x10(%rbp,%rax,8)
movsd  0x18(%r14,%rax,8),%xmm1
movsd  %xmm1,0x18(%rbp,%rax,8)
add    $0x4,%rax
cmp    %rax,%r8
jne    1660 <minibatch_multi+0x510>
jmp    1310 <minibatch_multi+0x1c0>
mov    %r14,%rdi
call   1030 <free@plt>
mov    0x20(%rsp),%r10
mov    0x70(%rsp),%rax
cmp    $0x2,%eax
mov    0x60(%rsp),%r14
mov    0x38(%rsp),%rdi
jl     1938 <minibatch_multi+0x7e8>
mov    %eax,%ecx
movsd  (%r14),%xmm0
lea    -0x1(%rcx),%r8
add    $0xfffffffffffffffe,%rcx
mov    %r8d,%r9d
and    $0x3,%r9d
cmp    $0x3,%rcx
jae    16eb <minibatch_multi+0x59b>
xor    %edx,%edx
mov    $0x1,%ecx
jmp    175d <minibatch_multi+0x60d>
and    $0xfffffffffffffffc,%r8
xor    %edx,%edx
mov    $0x1,%ecx
xor    %eax,%eax
nopl   0x0(%rax,%rax,1)
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),%esi
cmovbe %ebp,%esi
minsd  %xmm2,%xmm1
movsd  0x18(%r14,%rcx,8),%xmm0
ucomisd %xmm0,%xmm1
lea    0x3(%rcx),%edx
cmovbe %esi,%edx
minsd  %xmm1,%xmm0
add    $0x4,%rcx
add    $0x4,%rax
cmp    %r8,%rax
jne    1700 <minibatch_multi+0x5b0>
test   %r9,%r9
je     178f <minibatch_multi+0x63f>
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,%r9
jne    1770 <minibatch_multi+0x620>
test   %r10d,%r10d
jle    1938 <minibatch_multi+0x7e8>
imul   %r10d,%edx
movslq %edx,%r8
mov    %r10d,%eax
cmp    $0x4,%r10d
jb     17ca <minibatch_multi+0x67a>
lea    (%r8,%rax,1),%rcx
lea    (%rdi,%rcx,8),%rcx
cmp    %rbx,%rcx
jbe    185c <minibatch_multi+0x70c>
lea    (%rbx,%rax,8),%rcx
lea    (%rdi,%r8,8),%rdx
cmp    %rcx,%rdx
jae    185c <minibatch_multi+0x70c>
xor    %edx,%edx
mov    %rdx,%rcx
not    %rcx
add    %rax,%rcx
mov    %rax,%rsi
and    $0x3,%rsi
je     1805 <minibatch_multi+0x6b5>
lea    (%rdi,%r8,8),%rbp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsd  0x0(%rbp,%rdx,8),%xmm0
movsd  %xmm0,(%rbx,%rdx,8)
add    $0x1,%rdx
add    $0xffffffffffffffff,%rsi
jne    17f0 <minibatch_multi+0x6a0>
cmp    $0x3,%rcx
jb     1938 <minibatch_multi+0x7e8>
lea    (%rdi,%r8,8),%rcx
add    $0x18,%rcx
nopw   0x0(%rax,%rax,1)
movsd  -0x18(%rcx,%rdx,8),%xmm0
movsd  %xmm0,(%rbx,%rdx,8)
movsd  -0x10(%rcx,%rdx,8),%xmm0
movsd  %xmm0,0x8(%rbx,%rdx,8)
movsd  -0x8(%rcx,%rdx,8),%xmm0
movsd  %xmm0,0x10(%rbx,%rdx,8)
movsd  (%rcx,%rdx,8),%xmm0
movsd  %xmm0,0x18(%rbx,%rdx,8)
add    $0x4,%rdx
cmp    %rdx,%rax
jne    1820 <minibatch_multi+0x6d0>
jmp    1938 <minibatch_multi+0x7e8>
mov    %eax,%edx
and    $0xfffffffc,%edx
lea    -0x4(%rdx),%rcx
mov    %rcx,%rsi
shr    $0x2,%rsi
add    $0x1,%rsi
mov    %esi,%r9d
and    $0x3,%r9d
cmp    $0xc,%rcx
jae    1881 <minibatch_multi+0x731>
xor    %ebp,%ebp
jmp    18ec <minibatch_multi+0x79c>
and    $0xfffffffffffffffc,%rsi
lea    (%rdi,%r8,8),%rcx
add    $0x70,%rcx
xor    %ebp,%ebp
nop
movups -0x70(%rcx,%rbp,8),%xmm0
movups -0x60(%rcx,%rbp,8),%xmm1
movups %xmm0,(%rbx,%rbp,8)
movups %xmm1,0x10(%rbx,%rbp,8)
movups -0x50(%rcx,%rbp,8),%xmm0
movups -0x40(%rcx,%rbp,8),%xmm1
movups %xmm0,0x20(%rbx,%rbp,8)
movups %xmm1,0x30(%rbx,%rbp,8)
movups -0x30(%rcx,%rbp,8),%xmm0
movups -0x20(%rcx,%rbp,8),%xmm1
movups %xmm0,0x40(%rbx,%rbp,8)
movups %xmm1,0x50(%rbx,%rbp,8)
movupd -0x10(%rcx,%rbp,8),%xmm0
movupd (%rcx,%rbp,8),%xmm1
movupd %xmm0,0x60(%rbx,%rbp,8)
movupd %xmm1,0x70(%rbx,%rbp,8)
add    $0x10,%rbp
add    $0xfffffffffffffffc,%rsi
jne    1890 <minibatch_multi+0x740>
test   %r9,%r9
je     192f <minibatch_multi+0x7df>
lea    (%rbx,%rbp,8),%rcx
add    $0x10,%rcx
add    %r8,%rbp
lea    (%rdi,%rbp,8),%rsi
add    $0x10,%rsi
shl    $0x5,%r9
xor    %ebp,%ebp
nopw   0x0(%rax,%rax,1)
movupd -0x10(%rsi,%rbp,1),%xmm0
movupd (%rsi,%rbp,1),%xmm1
movupd %xmm0,-0x10(%rcx,%rbp,1)
movupd %xmm1,(%rcx,%rbp,1)
add    $0x20,%rbp
cmp    %rbp,%r9
jne    1910 <minibatch_multi+0x7c0>
cmp    %rax,%rdx
jne    17cc <minibatch_multi+0x67c>
call   1030 <free@plt>
mov    %r14,%rdi
add    $0xd8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <free@plt>

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

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