void somassign(int nrows, int ncolumns, double **data, int **mask,
               const double weights[], int transpose, int nxgrid, int nygrid,
               double ***celldata, char dist, int clusterid[][2]) {
  const int ndata = (transpose == 0) ? ncolumns : nrows;
  int i, j;
  double (*metric)(int, double **, double **, int **, int **, const double[],
                   int, int, int) = setmetric(dist);
  if (transpose == 0) {
    int **dummymask = malloc(nygrid * sizeof(int *));
    for (i = 0; i < nygrid; i++) {
      dummymask[i] = malloc(ncolumns * sizeof(int));
      for (j = 0; j < ncolumns; j++)
        dummymask[i][j] = 1;
    }
    for (i = 0; i < nrows; i++) {
      int ixbest = 0;
      int iybest = 0;
      double closest = metric(ndata, data, celldata[ixbest], mask, dummymask,
                              weights, i, iybest, transpose);
      int ix, iy;
      for (ix = 0; ix < nxgrid; ix++) {
        for (iy = 0; iy < nygrid; iy++) {
          double distance = metric(ndata, data, celldata[ix], mask, dummymask,
                                   weights, i, iy, transpose);
          if (distance < closest) {
            ixbest = ix;
            iybest = iy;
            closest = distance;
          }
        }
      }
      clusterid[i][0] = ixbest;
      clusterid[i][1] = iybest;
    }
    for (i = 0; i < nygrid; i++)
      free(dummymask[i]);
    free(dummymask);
  } else {
    double **celldatavector = malloc(ndata * sizeof(double *));
    int **dummymask = malloc(nrows * sizeof(int *));
    int ixbest = 0;
    int iybest = 0;
    for (i = 0; i < nrows; i++) {
      dummymask[i] = malloc(sizeof(int));
      dummymask[i][0] = 1;
    }
    for (i = 0; i < ncolumns; i++) {
      double closest;
      int ix, iy;
      for (j = 0; j < ndata; j++)
        celldatavector[j] = &(celldata[ixbest][iybest][j]);
      closest = metric(ndata, data, celldatavector, mask, dummymask, weights, i,
                       0, transpose);
      for (ix = 0; ix < nxgrid; ix++) {
        for (iy = 0; iy < nygrid; iy++) {
          double distance;
          for (j = 0; j < ndata; j++)
            celldatavector[j] = &(celldata[ix][iy][j]);
          distance = metric(ndata, data, celldatavector, mask, dummymask,
                            weights, i, 0, transpose);
          if (distance < closest) {
            ixbest = ix;
            iybest = iy;
            closest = distance;
          }
        }
      }
      clusterid[i][0] = ixbest;
      clusterid[i][1] = iybest;
    }
    free(celldatavector);
    for (i = 0; i < nrows; i++)
      free(dummymask[i]);
    free(dummymask);
  }
}


x86 assembly (clang, -O0):
<somassign>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
sub    $0xb8,%rsp
mov    0x30(%rbp),%rax
mov    0x28(%rbp),%al
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %edi,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
cmpl   $0x0,-0x2c(%rbp)
jne    117b <somassign+0x4b>
mov    -0x10(%rbp),%eax
mov    %eax,-0x9c(%rbp)
jmp    1184 <somassign+0x54>
mov    -0xc(%rbp),%eax
mov    %eax,-0x9c(%rbp)
mov    -0x9c(%rbp),%eax
mov    %eax,-0x30(%rbp)
movsbl 0x28(%rbp),%edi
mov    $0x0,%al
call   1040 <setmetric@plt>
cltq
mov    %rax,-0x40(%rbp)
cmpl   $0x0,-0x2c(%rbp)
jne    13b9 <somassign+0x289>
movslq 0x18(%rbp),%rdi
shl    $0x3,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x48(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    0x18(%rbp),%eax
jge    1233 <somassign+0x103>
movslq -0x10(%rbp),%rdi
shl    $0x2,%rdi
call   1050 <malloc@plt>
mov    %rax,%rdx
mov    -0x48(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1220 <somassign+0xf0>
mov    -0x48(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x38(%rbp),%rcx
movl   $0x1,(%rax,%rcx,4)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    11ef <somassign+0xbf>
jmp    1225 <somassign+0xf5>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    11c0 <somassign+0x90>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1379 <somassign+0x249>
movl   $0x0,-0x4c(%rbp)
movl   $0x0,-0x50(%rbp)
mov    -0x40(%rbp),%rax
mov    -0x30(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    0x20(%rbp),%rcx
movslq -0x4c(%rbp),%rdx
mov    (%rcx,%rdx,8),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x48(%rbp),%r8
mov    -0x28(%rbp),%r9
mov    -0x34(%rbp),%ebx
mov    -0x50(%rbp),%r11d
mov    -0x2c(%rbp),%r10d
mov    %ebx,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10d,0x10(%rsp)
call   *%rax
movsd  %xmm0,-0x58(%rbp)
movl   $0x0,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
cmp    0x10(%rbp),%eax
jge    134e <somassign+0x21e>
movl   $0x0,-0x60(%rbp)
mov    -0x60(%rbp),%eax
cmp    0x18(%rbp),%eax
jge    133b <somassign+0x20b>
mov    -0x40(%rbp),%rax
mov    -0x30(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    0x20(%rbp),%rcx
movslq -0x5c(%rbp),%rdx
mov    (%rcx,%rdx,8),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x48(%rbp),%r8
mov    -0x28(%rbp),%r9
mov    -0x34(%rbp),%ebx
mov    -0x60(%rbp),%r11d
mov    -0x2c(%rbp),%r10d
mov    %ebx,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10d,0x10(%rsp)
call   *%rax
movsd  %xmm0,-0x68(%rbp)
movsd  -0x68(%rbp),%xmm1
movsd  -0x58(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1328 <somassign+0x1f8>
mov    -0x5c(%rbp),%eax
mov    %eax,-0x4c(%rbp)
mov    -0x60(%rbp),%eax
mov    %eax,-0x50(%rbp)
movsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
jmp    132d <somassign+0x1fd>
mov    -0x60(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x60(%rbp)
jmp    12b0 <somassign+0x180>
jmp    1340 <somassign+0x210>
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    129d <somassign+0x16d>
mov    -0x4c(%rbp),%edx
mov    0x30(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    %edx,(%rax,%rcx,8)
mov    -0x50(%rbp),%edx
mov    0x30(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    %edx,0x4(%rax,%rcx,8)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    123a <somassign+0x10a>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    0x18(%rbp),%eax
jge    13ab <somassign+0x27b>
mov    -0x48(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1380 <somassign+0x250>
mov    -0x48(%rbp),%rdi
call   1030 <free@plt>
jmp    1675 <somassign+0x545>
movslq -0x30(%rbp),%rdi
shl    $0x3,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x70(%rbp)
movslq -0xc(%rbp),%rdi
shl    $0x3,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x78(%rbp)
movl   $0x0,-0x7c(%rbp)
movl   $0x0,-0x80(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1435 <somassign+0x305>
mov    $0x4,%edi
call   1050 <malloc@plt>
mov    %rax,%rdx
mov    -0x78(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x78(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movl   $0x1,(%rax)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    13f0 <somassign+0x2c0>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1631 <somassign+0x501>
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x30(%rbp),%eax
jge    1494 <somassign+0x364>
mov    0x20(%rbp),%rax
movslq -0x7c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x80(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
movslq -0x38(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdx
mov    -0x70(%rbp),%rax
movslq -0x38(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    144f <somassign+0x31f>
mov    -0x40(%rbp),%rax
mov    -0x30(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    -0x70(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x78(%rbp),%r8
mov    -0x28(%rbp),%r9
mov    -0x34(%rbp),%r11d
mov    -0x2c(%rbp),%r10d
xor    %ebx,%ebx
mov    %r11d,(%rsp)
movl   $0x0,0x8(%rsp)
mov    %r10d,0x10(%rsp)
call   *%rax
movsd  %xmm0,-0x88(%rbp)
ff
movl   $0x0,-0x8c(%rbp)
mov    -0x8c(%rbp),%eax
cmp    0x10(%rbp),%eax
jge    1606 <somassign+0x4d6>
movl   $0x0,-0x90(%rbp)
mov    -0x90(%rbp),%eax
cmp    0x18(%rbp),%eax
jge    15ed <somassign+0x4bd>
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x30(%rbp),%eax
jge    1558 <somassign+0x428>
mov    0x20(%rbp),%rax
movslq -0x8c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x90(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
movslq -0x38(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdx
mov    -0x70(%rbp),%rax
movslq -0x38(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    150d <somassign+0x3dd>
mov    -0x40(%rbp),%rax
mov    -0x30(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    -0x70(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x78(%rbp),%r8
mov    -0x28(%rbp),%r9
mov    -0x34(%rbp),%r11d
mov    -0x2c(%rbp),%r10d
xor    %ebx,%ebx
mov    %r11d,(%rsp)
movl   $0x0,0x8(%rsp)
mov    %r10d,0x10(%rsp)
call   *%rax
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x98(%rbp),%xmm1
ff
movsd  -0x88(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jbe    15d4 <somassign+0x4a4>
mov    -0x8c(%rbp),%eax
mov    %eax,-0x7c(%rbp)
mov    -0x90(%rbp),%eax
mov    %eax,-0x80(%rbp)
movsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0x88(%rbp)
ff
jmp    15d9 <somassign+0x4a9>
mov    -0x90(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x90(%rbp)
jmp    14f7 <somassign+0x3c7>
jmp    15f2 <somassign+0x4c2>
mov    -0x8c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8c(%rbp)
jmp    14de <somassign+0x3ae>
mov    -0x7c(%rbp),%edx
mov    0x30(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    %edx,(%rax,%rcx,8)
mov    -0x80(%rbp),%edx
mov    0x30(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    %edx,0x4(%rax,%rcx,8)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    143c <somassign+0x30c>
mov    -0x70(%rbp),%rdi
call   1030 <free@plt>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    166c <somassign+0x53c>
mov    -0x78(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1641 <somassign+0x511>
mov    -0x78(%rbp),%rdi
call   1030 <free@plt>
add    $0xb8,%rsp
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<somassign>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xd8,%rsp
mov    %r9d,%r15d
mov    %r8,0x48(%rsp)
mov    %rcx,0x40(%rsp)
mov    %rdx,0x38(%rsp)
mov    %esi,%ebp
mov    %edi,%ebx
mov    0x130(%rsp),%rax
mov    %rax,0x78(%rsp)
mov    0x120(%rsp),%rax
mov    %rax,0x70(%rsp)
mov    0x118(%rsp),%r14d
mov    0x110(%rsp),%eax
mov    %eax,0x14(%rsp)
movsbl 0x128(%rsp),%edi
xor    %eax,%eax
call   1040 <setmetric@plt>
mov    %ebx,%ecx
cltq
mov    %rax,0x68(%rsp)
mov    %r15,0xa8(%rsp)
test   %r15d,%r15d
mov    %ebp,0x8(%rsp)
cmove  %ebp,%ecx
mov    %r14d,(%rsp)
mov    %ecx,0x4(%rsp)
mov    %ebx,0x5c(%rsp)
je     1878 <somassign+0x748>
movslq %ecx,%rdi
shl    $0x3,%rdi
call   1050 <malloc@plt>
mov    %rax,%r13
movslq %ebx,%r14
lea    0x0(,%r14,8),%rdi
call   1050 <malloc@plt>
mov    %rax,%rbp
mov    %ebx,%eax
test   %r14d,%r14d
mov    %rax,%r14
jle    120e <somassign+0xde>
xor    %ebx,%ebx
xchg   %ax,%ax
mov    $0x4,%edi
call   1050 <malloc@plt>
mov    %rax,0x0(%rbp,%rbx,8)
movl   $0x1,(%rax)
add    $0x1,%rbx
cmp    %rbx,%r14
jne    11f0 <somassign+0xc0>
mov    %r14,0xb0(%rsp)
mov    0x8(%rsp),%ecx
test   %ecx,%ecx
mov    (%rsp),%eax
mov    0x4(%rsp),%edi
jle    1837 <somassign+0x707>
mov    %ecx,%ecx
mov    %rcx,0xc0(%rsp)
mov    %edi,%ecx
mov    0x14(%rsp),%edx
mov    %rdx,0xc8(%rsp)
mov    %eax,%eax
mov    %rax,0xd0(%rsp)
lea    0x0(,%rcx,8),%rax
add    %r13,%rax
mov    %rax,0xa0(%rsp)
mov    %ecx,%eax
and    $0xfffffffc,%eax
mov    %rax,0x98(%rsp)
add    $0xfffffffffffffffc,%rax
mov    %rax,0x90(%rsp)
mov    %rax,%rdx
shr    $0x2,%rdx
add    $0x1,%rdx
mov    %rdx,%rax
mov    %rdx,0x88(%rsp)
and    $0xfffffffffffffffe,%rdx
mov    %rdx,0x80(%rsp)
mov    %rcx,0x28(%rsp)
mov    %ecx,%r14d
and    $0x3,%r14d
mov    %r14,0xb8(%rsp)
neg    %r14
xor    %eax,%eax
mov    %rax,0x60(%rsp)
movdqa 0xd51(%rip),%xmm4
movdqa 0xd59(%rip),%xmm5
movdqa 0xd61(%rip),%xmm6
movdqa 0xd69(%rip),%xmm7
xor    %ebx,%ebx
movl   $0x0,0x8(%rsp)
mov    %rbp,0x18(%rsp)
jmp    1340 <somassign+0x210>
nopl   0x0(%rax,%rax,1)
mov    0x4(%rsp),%edi
movdqa 0xd14(%rip),%xmm4
movdqa 0xd1c(%rip),%xmm5
movdqa 0xd24(%rip),%xmm6
movdqa 0xd2c(%rip),%xmm7
mov    0x78(%rsp),%rax
mov    0x60(%rsp),%rcx
mov    0x8(%rsp),%edx
mov    %edx,(%rax,%rcx,8)
mov    %ebx,0x4(%rax,%rcx,8)
add    $0x1,%rcx
mov    %rcx,0x60(%rsp)
cmp    0xc0(%rsp),%rcx
je     1837 <somassign+0x707>
test   %edi,%edi
jle    1500 <somassign+0x3d0>
movslq 0x8(%rsp),%rax
mov    0x70(%rsp),%rcx
mov    (%rcx,%rax,8),%rcx
movslq %ebx,%rdx
lea    (%rcx,%rdx,8),%rax
cmp    $0x4,%edi
jb     1381 <somassign+0x251>
lea    (%rcx,%rdx,8),%rcx
add    $0x8,%rcx
cmp    %rcx,%r13
jae    1437 <somassign+0x307>
cmp    %rax,0xa0(%rsp)
jbe    1437 <somassign+0x307>
xor    %r8d,%r8d
mov    %r8,%rdx
not    %rdx
add    0x28(%rsp),%rdx
cmpq   $0x0,0xb8(%rsp)
je     13d0 <somassign+0x2a0>
lea    0x0(,%r8,8),%rsi
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    (%rax),%rbp
add    %rsi,%rbp
mov    %rbp,0x0(%r13,%rsi,1)
add    $0xffffffffffffffff,%rcx
add    $0x8,%rsi
cmp    %rcx,%r14
jne    13b0 <somassign+0x280>
sub    %rcx,%r8
mov    0x18(%rsp),%rbp
cmp    $0x3,%rdx
jb     1500 <somassign+0x3d0>
mov    0x28(%rsp),%rdx
sub    %r8,%rdx
lea    0x10(,%r8,8),%rcx
nopw   0x0(%rax,%rax,1)
mov    (%rax),%rsi
add    %rcx,%rsi
add    $0xfffffffffffffff0,%rsi
mov    %rsi,-0x10(%r13,%rcx,1)
mov    (%rax),%rsi
add    %rcx,%rsi
add    $0xfffffffffffffff8,%rsi
mov    %rsi,-0x8(%r13,%rcx,1)
mov    (%rax),%rsi
add    %rcx,%rsi
mov    %rsi,0x0(%r13,%rcx,1)
mov    (%rax),%rsi
add    %rcx,%rsi
add    $0x8,%rsi
mov    %rsi,0x8(%r13,%rcx,1)
add    $0x20,%rcx
add    $0xfffffffffffffffc,%rdx
jne    13f0 <somassign+0x2c0>
jmp    1500 <somassign+0x3d0>
cmpq   $0x0,0x90(%rsp)
je     181a <somassign+0x6ea>
movq   (%rax),%xmm0
pshufd $0x44,%xmm0,%xmm1
mov    0x80(%rsp),%rdx
xor    %ecx,%ecx
movdqa 0xb9f(%rip),%xmm0
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movdqa %xmm0,%xmm2
psllq  $0x3,%xmm2
paddq  %xmm1,%xmm2
movdqa %xmm2,%xmm3
paddq  %xmm4,%xmm3
movdqu %xmm2,0x0(%r13,%rcx,8)
movdqu %xmm3,0x10(%r13,%rcx,8)
movdqa %xmm2,%xmm3
paddq  %xmm5,%xmm3
paddq  %xmm6,%xmm2
movdqu %xmm3,0x20(%r13,%rcx,8)
movdqu %xmm2,0x30(%r13,%rcx,8)
add    $0x8,%rcx
paddq  %xmm7,%xmm0
add    $0xfffffffffffffffe,%rdx
jne    1470 <somassign+0x340>
testb  $0x1,0x88(%rsp)
01
je     14e9 <somassign+0x3b9>
movq   (%rax),%xmm1
pshufd $0x44,%xmm1,%xmm1
psllq  $0x3,%xmm0
paddq  %xmm1,%xmm0
movdqu %xmm0,0x0(%r13,%rcx,8)
paddq  %xmm4,%xmm0
movdqu %xmm0,0x10(%r13,%rcx,8)
mov    0x98(%rsp),%rcx
mov    %rcx,%r8
cmp    0x28(%rsp),%rcx
jne    1384 <somassign+0x254>
nop
sub    $0x8,%rsp
mov    0x40(%rsp),%rsi
mov    %r13,%rdx
mov    0x48(%rsp),%rcx
mov    %rbp,%r8
mov    0x50(%rsp),%r9
push   0xb0(%rsp)
push   $0x0
push   0x78(%rsp)
call   *0x88(%rsp)
add    $0x20,%rsp
cmpl   $0x0,0x14(%rsp)
jle    12f0 <somassign+0x1c0>
movdqa %xmm0,%xmm1
xor    %eax,%eax
mov    %rax,0x20(%rsp)
mov    (%rsp),%eax
mov    0x4(%rsp),%edi
movdqa 0xaba(%rip),%xmm4
movdqa 0xac2(%rip),%xmm5
movdqa 0xaca(%rip),%xmm6
movdqa 0xad2(%rip),%xmm7
jmp    159a <somassign+0x46a>
movdqa %xmm1,%xmm0
mov    0x20(%rsp),%rcx
add    $0x1,%rcx
movapd %xmm0,%xmm1
mov    %rcx,%rax
mov    %rcx,0x20(%rsp)
cmp    0xc8(%rsp),%rcx
mov    (%rsp),%eax
je     1314 <somassign+0x1e4>
test   %eax,%eax
jle    1570 <somassign+0x440>
xor    %r12d,%r12d
jmp    163a <somassign+0x50a>
cs nopw 0x0(%rax,%rax,1)
sub    $0x8,%rsp
mov    0x40(%rsp),%rsi
mov    %r13,%rdx
mov    0x48(%rsp),%rcx
mov    %rbp,%r8
mov    0x50(%rsp),%r9
push   0xb0(%rsp)
push   $0x0
push   0x78(%rsp)
call   *0x88(%rsp)
movdqa 0xa5b(%rip),%xmm7
movdqa 0xa43(%rip),%xmm6
movdqa 0xa2b(%rip),%xmm5
movdqa 0xa13(%rip),%xmm4
mov    0x24(%rsp),%edi
add    $0x20,%rsp
movsd  0x30(%rsp),%xmm1
ucomisd %xmm0,%xmm1
mov    0x8(%rsp),%eax
cmova  0x20(%rsp),%eax
mov    %eax,0x8(%rsp)
mov    0x50(%rsp),%ebx
cmova  %r15d,%ebx
minsd  %xmm1,%xmm0
movapd %xmm0,%xmm1
cmp    0xd0(%rsp),%r12
je     1574 <somassign+0x444>
movq   %xmm1,0x30(%rsp)
mov    %ebx,0x50(%rsp)
mov    %r12,%r15
add    $0x1,%r12
test   %edi,%edi
jle    15b0 <somassign+0x480>
mov    0x70(%rsp),%rax
mov    0x20(%rsp),%rcx
mov    (%rax,%rcx,8),%rcx
lea    (%rcx,%r15,8),%rax
cmp    $0x4,%edi
jb     1685 <somassign+0x555>
lea    (%rcx,%r12,8),%rcx
cmp    %rcx,%r13
jae    1737 <somassign+0x607>
cmp    %rax,0xa0(%rsp)
jbe    1737 <somassign+0x607>
xor    %ecx,%ecx
mov    %rcx,%rdx
not    %rdx
mov    0x28(%rsp),%rsi
add    %rsi,%rdx
test   $0x3,%sil
je     16d0 <somassign+0x5a0>
lea    0x0(,%rcx,8),%rsi
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
mov    (%rax),%rbp
add    %rsi,%rbp
mov    %rbp,0x0(%r13,%rsi,1)
add    $0xffffffffffffffff,%rbx
add    $0x8,%rsi
cmp    %rbx,%r14
jne    16b0 <somassign+0x580>
sub    %rbx,%rcx
mov    0x18(%rsp),%rbp
cmp    $0x3,%rdx
jb     15b0 <somassign+0x480>
mov    0x28(%rsp),%rdx
sub    %rcx,%rdx
lea    0x10(,%rcx,8),%rcx
nopw   0x0(%rax,%rax,1)
mov    (%rax),%rsi
add    %rcx,%rsi
add    $0xfffffffffffffff0,%rsi
mov    %rsi,-0x10(%r13,%rcx,1)
mov    (%rax),%rsi
add    %rcx,%rsi
add    $0xfffffffffffffff8,%rsi
mov    %rsi,-0x8(%r13,%rcx,1)
mov    (%rax),%rsi
add    %rcx,%rsi
mov    %rsi,0x0(%r13,%rcx,1)
mov    (%rax),%rsi
add    %rcx,%rsi
add    $0x8,%rsi
mov    %rsi,0x8(%r13,%rcx,1)
add    $0x20,%rcx
add    $0xfffffffffffffffc,%rdx
jne    16f0 <somassign+0x5c0>
jmp    15b0 <somassign+0x480>
cmpq   $0x0,0x90(%rsp)
je     1804 <somassign+0x6d4>
movq   (%rax),%xmm0
pshufd $0x44,%xmm0,%xmm1
mov    0x80(%rsp),%rdx
xor    %ecx,%ecx
movdqa 0x89f(%rip),%xmm0
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movdqa %xmm0,%xmm2
psllq  $0x3,%xmm2
paddq  %xmm1,%xmm2
movdqa %xmm2,%xmm3
paddq  %xmm4,%xmm3
movdqu %xmm2,0x0(%r13,%rcx,8)
movdqu %xmm3,0x10(%r13,%rcx,8)
movdqa %xmm2,%xmm3
paddq  %xmm5,%xmm3
paddq  %xmm6,%xmm2
movdqu %xmm3,0x20(%r13,%rcx,8)
movdqu %xmm2,0x30(%r13,%rcx,8)
add    $0x8,%rcx
paddq  %xmm7,%xmm0
add    $0xfffffffffffffffe,%rdx
jne    1770 <somassign+0x640>
testb  $0x1,0x88(%rsp)
01
je     17e9 <somassign+0x6b9>
movq   (%rax),%xmm1
pshufd $0x44,%xmm1,%xmm1
psllq  $0x3,%xmm0
paddq  %xmm1,%xmm0
movdqu %xmm0,0x0(%r13,%rcx,8)
paddq  %xmm4,%xmm0
movdqu %xmm0,0x10(%r13,%rcx,8)
mov    0x98(%rsp),%rdx
mov    %rdx,%rcx
cmp    0x28(%rsp),%rdx
je     15b0 <somassign+0x480>
jmp    1687 <somassign+0x557>
xor    %ecx,%ecx
movdqa 0x7f2(%rip),%xmm0
testb  $0x1,0x88(%rsp)
01
jne    17c5 <somassign+0x695>
jmp    17e9 <somassign+0x6b9>
xor    %ecx,%ecx
movdqa 0x7dc(%rip),%xmm0
testb  $0x1,0x88(%rsp)
01
jne    14c5 <somassign+0x395>
jmp    14e9 <somassign+0x3b9>
mov    %r13,%rdi
call   1030 <free@plt>
cmpl   $0x0,0x5c(%rsp)
jle    1b9c <somassign+0xa6c>
xor    %ebx,%ebx
mov    0xb0(%rsp),%r14
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    0x0(%rbp,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%r14
jne    1860 <somassign+0x730>
jmp    1b9c <somassign+0xa6c>
movslq %r14d,%rdi
shl    $0x3,%rdi
call   1050 <malloc@plt>
mov    %rax,0x18(%rsp)
test   %r14d,%r14d
mov    0x8(%rsp),%eax
jle    1a15 <somassign+0x8e5>
movslq %eax,%r13
shl    $0x2,%r13
mov    (%rsp),%ebx
mov    %eax,%ebp
mov    %ebp,%r14d
and    $0xfffffff8,%r14d
lea    -0x8(%r14),%rax
mov    %rax,0x50(%rsp)
shr    $0x3,%rax
add    $0x1,%rax
mov    %eax,%r12d
and    $0x7,%r12d
and    $0xfffffffffffffff8,%rax
mov    %rax,0x20(%rsp)
mov    %r12,0x30(%rsp)
shl    $0x5,%r12
xor    %r15d,%r15d
jmp    18ed <somassign+0x7bd>
nopl   0x0(%rax,%rax,1)
add    $0x1,%r15
cmp    %rbx,%r15
je     1a15 <somassign+0x8e5>
mov    %r13,%rdi
call   1050 <malloc@plt>
movapd 0x753(%rip),%xmm0
mov    0x8(%rsp),%edx
mov    0x18(%rsp),%rcx
mov    %rax,(%rcx,%r15,8)
test   %edx,%edx
jle    18e0 <somassign+0x7b0>
cmp    $0x8,%edx
jae    1920 <somassign+0x7f0>
xor    %ecx,%ecx
jmp    1a00 <somassign+0x8d0>
nopw   0x0(%rax,%rax,1)
cmpq   $0x38,0x50(%rsp)
jae    192f <somassign+0x7ff>
xor    %ecx,%ecx
jmp    19c5 <somassign+0x895>
mov    0x20(%rsp),%rdx
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
movupd %xmm0,(%rax,%rcx,4)
movupd %xmm0,0x10(%rax,%rcx,4)
movupd %xmm0,0x20(%rax,%rcx,4)
movupd %xmm0,0x30(%rax,%rcx,4)
movupd %xmm0,0x40(%rax,%rcx,4)
movupd %xmm0,0x50(%rax,%rcx,4)
movupd %xmm0,0x60(%rax,%rcx,4)
movupd %xmm0,0x70(%rax,%rcx,4)
movupd %xmm0,0x80(%rax,%rcx,4)
movupd %xmm0,0x90(%rax,%rcx,4)
movupd %xmm0,0xa0(%rax,%rcx,4)
movupd %xmm0,0xb0(%rax,%rcx,4)
movupd %xmm0,0xc0(%rax,%rcx,4)
movupd %xmm0,0xd0(%rax,%rcx,4)
movupd %xmm0,0xe0(%rax,%rcx,4)
movupd %xmm0,0xf0(%rax,%rcx,4)
add    $0x40,%rcx
add    $0xfffffffffffffff8,%rdx
jne    1940 <somassign+0x810>
cmpq   $0x0,0x30(%rsp)
je     19f4 <somassign+0x8c4>
lea    (%rax,%rcx,4),%rcx
add    $0x10,%rcx
xor    %edx,%edx
nopw   0x0(%rax,%rax,1)
movupd %xmm0,-0x10(%rcx,%rdx,1)
movupd %xmm0,(%rcx,%rdx,1)
add    $0x20,%rdx
cmp    %rdx,%r12
jne    19e0 <somassign+0x8b0>
mov    %r14,%rcx
cmp    %rbp,%r14
je     18e0 <somassign+0x7b0>
movl   $0x1,(%rax,%rcx,4)
add    $0x1,%rcx
cmp    %rcx,%rbp
jne    1a00 <somassign+0x8d0>
jmp    18e0 <somassign+0x7b0>
mov    0x5c(%rsp),%eax
test   %eax,%eax
mov    0x48(%rsp),%r9
mov    0x40(%rsp),%rcx
mov    0x38(%rsp),%rsi
jle    1b64 <somassign+0xa34>
mov    %eax,%eax
mov    %rax,0x20(%rsp)
mov    0x14(%rsp),%eax
mov    %rax,0x50(%rsp)
xor    %r10d,%r10d
mov    0x68(%rsp),%r15
jmp    1a81 <somassign+0x951>
nopw   0x0(%rax,%rax,1)
mov    0x78(%rsp),%rax
mov    0x30(%rsp),%r10
mov    %ebx,(%rax,%r10,8)
mov    %ebp,0x4(%rax,%r10,8)
add    $0x1,%r10
cmp    0x20(%rsp),%r10
mov    0x48(%rsp),%r9
mov    0x40(%rsp),%rcx
mov    0x38(%rsp),%rsi
je     1b64 <somassign+0xa34>
mov    0x70(%rsp),%rax
mov    (%rax),%rdx
sub    $0x8,%rsp
mov    0xc(%rsp),%edi
mov    0x20(%rsp),%r8
push   $0x0
push   $0x0
mov    %r10,0x48(%rsp)
push   %r10
call   *0x88(%rsp)
add    $0x20,%rsp
mov    $0x0,%ebp
mov    $0x0,%ebx
cmpl   $0x0,0x14(%rsp)
mov    (%rsp),%eax
jle    1a50 <somassign+0x920>
movapd %xmm0,%xmm1
xor    %r13d,%r13d
xor    %ebx,%ebx
xor    %ebp,%ebp
jmp    1ae7 <somassign+0x9b7>
nopl   (%rax)
movapd %xmm1,%xmm0
add    $0x1,%r13
movapd %xmm0,%xmm1
cmp    0x50(%rsp),%r13
je     1a50 <somassign+0x920>
test   %eax,%eax
jle    1ad0 <somassign+0x9a0>
xor    %r14d,%r14d
mov    0x30(%rsp),%r12
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsd  %xmm1,0x8(%rsp)
mov    0x70(%rsp),%rax
mov    (%rax,%r13,8),%rdx
sub    $0x8,%rsp
mov    0xc(%rsp),%edi
mov    0x40(%rsp),%rsi
mov    0x48(%rsp),%rcx
mov    0x20(%rsp),%r8
mov    0x50(%rsp),%r9
push   $0x0
push   %r14
push   %r12
call   *%r15
mov    0x20(%rsp),%eax
add    $0x20,%rsp
movsd  0x8(%rsp),%xmm1
ucomisd %xmm0,%xmm1
cmova  %r14d,%ebp
cmova  %r13d,%ebx
minsd  %xmm1,%xmm0
add    $0x1,%r14d
movapd %xmm0,%xmm1
cmp    %r14d,%eax
jne    1b00 <somassign+0x9d0>
jmp    1ad4 <somassign+0x9a4>
mov    (%rsp),%eax
test   %eax,%eax
jle    1b97 <somassign+0xa67>
mov    %eax,%r14d
xor    %ebp,%ebp
mov    0x18(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
nop
mov    (%rbx,%rbp,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbp
cmp    %rbp,%r14
jne    1b80 <somassign+0xa50>
mov    %rbx,%rbp
jmp    1b9c <somassign+0xa6c>
mov    0x18(%rsp),%rbp
mov    %rbp,%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 @somassign(i32 %0, i32 %1, double** %2, i32** %3, double* %4, i32 %5, i32 %6, i32 %7, double*** %8, i8 signext %9, [2 x i32]* %10) {
%12 = alloca i32
%13 = alloca i32
%14 = alloca double**
%15 = alloca i32**
%16 = alloca double*
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca double***
%21 = alloca i8
%22 = alloca [2 x i32]*
%23 = alloca i32
%24 = alloca i32
%25 = alloca i32
%26 = alloca double (i32, double**, double**, i32**, i32**, double*, i32, i32, i32)*
%27 = alloca i32**
%28 = alloca i32
%29 = alloca i32
%30 = alloca double
%31 = alloca i32
%32 = alloca i32
%33 = alloca double
%34 = alloca double**
%35 = alloca i32**
%36 = alloca i32
%37 = alloca i32
%38 = alloca double
%39 = alloca i32
%40 = alloca i32
%41 = alloca double
store i32 %0, i32* %12
store i32 %1, i32* %13
store double** %2, double*** %14
store i32** %3, i32*** %15
store double* %4, double** %16
store i32 %5, i32* %17
store i32 %6, i32* %18
store i32 %7, i32* %19
store double*** %8, double**** %20
store i8 %9, i8* %21
store [2 x i32]* %10, [2 x i32]** %22
%42 = load i32, i32* %17
%43 = icmp eq i32 %42, 0
br i1 %43, label %44, label %46
44: ; preds = %11
%45 = load i32, i32* %13
br label %48
46: ; preds = %11
%47 = load i32, i32* %12
br label %48
48: ; preds = %46, %44
%49 = phi i32 [ %45, %44 ], [ %47, %46 ]
store i32 %49, i32* %23
%50 = load i8, i8* %21
%51 = sext i8 %50 to i32
%52 = call i32 (i32, ...) bitcast (i32 (...)* @setmetric to i32 (i32, ...)*)(i32 %51)
%53 = sext i32 %52 to i64
%54 = inttoptr i64 %53 to double (i32, double**, double**, i32**, i32**, double*, i32, i32, i32)*
store double (i32, double**, double**, i32**, i32**, double*, i32, i32, i32)* %54, double (i32, double**, double**, i32**, i32**, double*, i32, i32, i32)** %26
%55 = load i32, i32* %17
%56 = icmp eq i32 %55, 0
br i1 %56, label %57, label %192
57: ; preds = %48
%58 = load i32, i32* %19
%59 = sext i32 %58 to i64
%60 = mul i64 %59, 8
%61 = call i8* @malloc(i64 %60)
%62 = bitcast i8* %61 to i32**
store i32** %62, i32*** %27
store i32 0, i32* %24
br label %63
63: ; preds = %94, %57
%64 = load i32, i32* %24
%65 = load i32, i32* %19
%66 = icmp slt i32 %64, %65
br i1 %66, label %67, label %97
67: ; preds = %63
%68 = load i32, i32* %13
%69 = sext i32 %68 to i64
%70 = mul i64 %69, 4
%71 = call i8* @malloc(i64 %70)
%72 = bitcast i8* %71 to i32*
%73 = load i32**, i32*** %27
%74 = load i32, i32* %24
%75 = sext i32 %74 to i64
%76 = getelementptr inbounds i32*, i32** %73, i64 %75
store i32* %72, i32** %76
store i32 0, i32* %25
br label %77
77: ; preds = %90, %67
%78 = load i32, i32* %25
%79 = load i32, i32* %13
%80 = icmp slt i32 %78, %79
br i1 %80, label %81, label %93
81: ; preds = %77
%82 = load i32**, i32*** %27
%83 = load i32, i32* %24
%84 = sext i32 %83 to i64
%85 = getelementptr inbounds i32*, i32** %82, i64 %84
%86 = load i32*, i32** %85
%87 = load i32, i32* %25
%88 = sext i32 %87 to i64
%89 = getelementptr inbounds i32, i32* %86, i64 %88
store i32 1, i32* %89
br label %90
90: ; preds = %81
%91 = load i32, i32* %25
%92 = add nsw i32 %91, 1
store i32 %92, i32* %25
br label %77
93: ; preds = %77
br label %94
94: ; preds = %93
%95 = load i32, i32* %24
%96 = add nsw i32 %95, 1
store i32 %96, i32* %24
br label %63
97: ; preds = %63
store i32 0, i32* %24
br label %98
98: ; preds = %171, %97
%99 = load i32, i32* %24
%100 = load i32, i32* %12
%101 = icmp slt i32 %99, %100
br i1 %101, label %102, label %174
102: ; preds = %98
store i32 0, i32* %28
store i32 0, i32* %29
%103 = load double (i32, double**, double**, i32**, i32**, double*, i32, i32, i32)*, double (i32, double**, double**, i32**, i32**, double*, i32, i32, i32)** %26
%104 = load i32, i32* %23
%105 = load double**, double*** %14
%106 = load double***, double**** %20
%107 = load i32, i32* %28
%108 = sext i32 %107 to i64
%109 = getelementptr inbounds double**, double*** %106, i64 %108
%110 = load double**, double*** %109
%111 = load i32**, i32*** %15
%112 = load i32**, i32*** %27
%113 = load double*, double** %16
%114 = load i32, i32* %24
%115 = load i32, i32* %29
%116 = load i32, i32* %17
%117 = call double %103(i32 %104, double** %105, double** %110, i32** %111, i32** %112, double* %113, i32 %114, i32 %115, i32 %116)
store double %117, double* %30
store i32 0, i32* %31
br label %118
118: ; preds = %155, %102
%119 = load i32, i32* %31
%120 = load i32, i32* %18
%121 = icmp slt i32 %119, %120
br i1 %121, label %122, label %158
122: ; preds = %118
store i32 0, i32* %32
br label %123
123: ; preds = %151, %122
%124 = load i32, i32* %32
%125 = load i32, i32* %19
%126 = icmp slt i32 %124, %125
br i1 %126, label %127, label %154
127: ; preds = %123
%128 = load double (i32, double**, double**, i32**, i32**, double*, i32, i32, i32)*, double (i32, double**, double**, i32**, i32**, double*, i32, i32, i32)** %26
%129 = load i32, i32* %23
%130 = load double**, double*** %14
%131 = load double***, double**** %20
%132 = load i32, i32* %31
%133 = sext i32 %132 to i64
%134 = getelementptr inbounds double**, double*** %131, i64 %133
%135 = load double**, double*** %134
%136 = load i32**, i32*** %15
%137 = load i32**, i32*** %27
%138 = load double*, double** %16
%139 = load i32, i32* %24
%140 = load i32, i32* %32
%141 = load i32, i32* %17
%142 = call double %128(i32 %129, double** %130, double** %135, i32** %136, i32** %137, double* %138, i32 %139, i32 %140, i32 %141)
store double %142, double* %33
%143 = load double, double* %33
%144 = load double, double* %30
%145 = fcmp olt double %143, %144
br i1 %145, label %146, label %150
146: ; preds = %127
%147 = load i32, i32* %31
store i32 %147, i32* %28
%148 = load i32, i32* %32
store i32 %148, i32* %29
%149 = load double, double* %33
store double %149, double* %30
br label %150
150: ; preds = %146, %127
br label %151
151: ; preds = %150
%152 = load i32, i32* %32
%153 = add nsw i32 %152, 1
store i32 %153, i32* %32
br label %123
154: ; preds = %123
br label %155
155: ; preds = %154
%156 = load i32, i32* %31
%157 = add nsw i32 %156, 1
store i32 %157, i32* %31
br label %118
158: ; preds = %118
%159 = load i32, i32* %28
%160 = load [2 x i32]*, [2 x i32]** %22
%161 = load i32, i32* %24
%162 = sext i32 %161 to i64
%163 = getelementptr inbounds [2 x i32], [2 x i32]* %160, i64 %162
%164 = getelementptr inbounds [2 x i32], [2 x i32]* %163, i64 0, i64 0
store i32 %159, i32* %164
%165 = load i32, i32* %29
%166 = load [2 x i32]*, [2 x i32]** %22
%167 = load i32, i32* %24
%168 = sext i32 %167 to i64
%169 = getelementptr inbounds [2 x i32], [2 x i32]* %166, i64 %168
%170 = getelementptr inbounds [2 x i32], [2 x i32]* %169, i64 0, i64 1
store i32 %165, i32* %170
br label %171
171: ; preds = %158
%172 = load i32, i32* %24
%173 = add nsw i32 %172, 1
store i32 %173, i32* %24
br label %98
174: ; preds = %98
store i32 0, i32* %24
br label %175
175: ; preds = %186, %174
%176 = load i32, i32* %24
%177 = load i32, i32* %19
%178 = icmp slt i32 %176, %177
br i1 %178, label %179, label %189
179: ; preds = %175
%180 = load i32**, i32*** %27
%181 = load i32, i32* %24
%182 = sext i32 %181 to i64
%183 = getelementptr inbounds i32*, i32** %180, i64 %182
%184 = load i32*, i32** %183
%185 = bitcast i32* %184 to i8*
br label %186
186: ; preds = %179
%187 = load i32, i32* %24
%188 = add nsw i32 %187, 1
store i32 %188, i32* %24
br label %175
189: ; preds = %175
%190 = load i32**, i32*** %27
%191 = bitcast i32** %190 to i8*
br label %360
192: ; preds = %48
%193 = load i32, i32* %23
%194 = sext i32 %193 to i64
%195 = mul i64 %194, 8
%196 = call i8* @malloc(i64 %195)
%197 = bitcast i8* %196 to double**
store double** %197, double*** %34
%198 = load i32, i32* %12
%199 = sext i32 %198 to i64
%200 = mul i64 %199, 8
%201 = call i8* @malloc(i64 %200)
%202 = bitcast i8* %201 to i32**
store i32** %202, i32*** %35
store i32 0, i32* %36
store i32 0, i32* %37
store i32 0, i32* %24
br label %203
203: ; preds = %220, %192
%204 = load i32, i32* %24
%205 = load i32, i32* %12
%206 = icmp slt i32 %204, %205
br i1 %206, label %207, label %223
207: ; preds = %203
%208 = call i8* @malloc(i64 4)
%209 = bitcast i8* %208 to i32*
%210 = load i32**, i32*** %35
%211 = load i32, i32* %24
%212 = sext i32 %211 to i64
%213 = getelementptr inbounds i32*, i32** %210, i64 %212
store i32* %209, i32** %213
%214 = load i32**, i32*** %35
%215 = load i32, i32* %24
%216 = sext i32 %215 to i64
%217 = getelementptr inbounds i32*, i32** %214, i64 %216
%218 = load i32*, i32** %217
%219 = getelementptr inbounds i32, i32* %218, i64 0
store i32 1, i32* %219
br label %220
220: ; preds = %207
%221 = load i32, i32* %24
%222 = add nsw i32 %221, 1
store i32 %222, i32* %24
br label %203
223: ; preds = %203
store i32 0, i32* %24
br label %224
224: ; preds = %337, %223
%225 = load i32, i32* %24
%226 = load i32, i32* %13
%227 = icmp slt i32 %225, %226
br i1 %227, label %228, label %340
228: ; preds = %224
store i32 0, i32* %25
br label %229
229: ; preds = %250, %228
%230 = load i32, i32* %25
%231 = load i32, i32* %23
%232 = icmp slt i32 %230, %231
br i1 %232, label %233, label %253
233: ; preds = %229
%234 = load double***, double**** %20
%235 = load i32, i32* %36
%236 = sext i32 %235 to i64
%237 = getelementptr inbounds double**, double*** %234, i64 %236
%238 = load double**, double*** %237
%239 = load i32, i32* %37
%240 = sext i32 %239 to i64
%241 = getelementptr inbounds double*, double** %238, i64 %240
%242 = load double*, double** %241
%243 = load i32, i32* %25
%244 = sext i32 %243 to i64
%245 = getelementptr inbounds double, double* %242, i64 %244
%246 = load double**, double*** %34
%247 = load i32, i32* %25
%248 = sext i32 %247 to i64
%249 = getelementptr inbounds double*, double** %246, i64 %248
store double* %245, double** %249
br label %250
250: ; preds = %233
%251 = load i32, i32* %25
%252 = add nsw i32 %251, 1
store i32 %252, i32* %25
br label %229
253: ; preds = %229
%254 = load double (i32, double**, double**, i32**, i32**, double*, i32, i32, i32)*, double (i32, double**, double**, i32**, i32**, double*, i32, i32, i32)** %26
%255 = load i32, i32* %23
%256 = load double**, double*** %14
%257 = load double**, double*** %34
%258 = load i32**, i32*** %15
%259 = load i32**, i32*** %35
%260 = load double*, double** %16
%261 = load i32, i32* %24
%262 = load i32, i32* %17
%263 = call double %254(i32 %255, double** %256, double** %257, i32** %258, i32** %259, double* %260, i32 %261, i32 0, i32 %262)
store double %263, double* %38
store i32 0, i32* %39
br label %264
264: ; preds = %321, %253
%265 = load i32, i32* %39
%266 = load i32, i32* %18
%267 = icmp slt i32 %265, %266
br i1 %267, label %268, label %324
268: ; preds = %264
store i32 0, i32* %40
br label %269
269: ; preds = %317, %268
%270 = load i32, i32* %40
%271 = load i32, i32* %19
%272 = icmp slt i32 %270, %271
br i1 %272, label %273, label %320
273: ; preds = %269
store i32 0, i32* %25
br label %274
274: ; preds = %295, %273
%275 = load i32, i32* %25
%276 = load i32, i32* %23
%277 = icmp slt i32 %275, %276
br i1 %277, label %278, label %298
278: ; preds = %274
%279 = load double***, double**** %20
%280 = load i32, i32* %39
%281 = sext i32 %280 to i64
%282 = getelementptr inbounds double**, double*** %279, i64 %281
%283 = load double**, double*** %282
%284 = load i32, i32* %40
%285 = sext i32 %284 to i64
%286 = getelementptr inbounds double*, double** %283, i64 %285
%287 = load double*, double** %286
%288 = load i32, i32* %25
%289 = sext i32 %288 to i64
%290 = getelementptr inbounds double, double* %287, i64 %289
%291 = load double**, double*** %34
%292 = load i32, i32* %25
%293 = sext i32 %292 to i64
%294 = getelementptr inbounds double*, double** %291, i64 %293
store double* %290, double** %294
br label %295
295: ; preds = %278
%296 = load i32, i32* %25
%297 = add nsw i32 %296, 1
store i32 %297, i32* %25
br label %274
298: ; preds = %274
%299 = load double (i32, double**, double**, i32**, i32**, double*, i32, i32, i32)*, double (i32, double**, double**, i32**, i32**, double*, i32, i32, i32)** %26
%300 = load i32, i32* %23
%301 = load double**, double*** %14
%302 = load double**, double*** %34
%303 = load i32**, i32*** %15
%304 = load i32**, i32*** %35
%305 = load double*, double** %16
%306 = load i32, i32* %24
%307 = load i32, i32* %17
%308 = call double %299(i32 %300, double** %301, double** %302, i32** %303, i32** %304, double* %305, i32 %306, i32 0, i32 %307)
store double %308, double* %41
%309 = load double, double* %41
%310 = load double, double* %38
%311 = fcmp olt double %309, %310
br i1 %311, label %312, label %316
312: ; preds = %298
%313 = load i32, i32* %39
store i32 %313, i32* %36
%314 = load i32, i32* %40
store i32 %314, i32* %37
%315 = load double, double* %41
store double %315, double* %38
br label %316
316: ; preds = %312, %298
br label %317
317: ; preds = %316
%318 = load i32, i32* %40
%319 = add nsw i32 %318, 1
store i32 %319, i32* %40
br label %269
320: ; preds = %269
br label %321
321: ; preds = %320
%322 = load i32, i32* %39
%323 = add nsw i32 %322, 1
store i32 %323, i32* %39
br label %264
324: ; preds = %264
%325 = load i32, i32* %36
%326 = load [2 x i32]*, [2 x i32]** %22
%327 = load i32, i32* %24
%328 = sext i32 %327 to i64
%329 = getelementptr inbounds [2 x i32], [2 x i32]* %326, i64 %328
%330 = getelementptr inbounds [2 x i32], [2 x i32]* %329, i64 0, i64 0
store i32 %325, i32* %330
%331 = load i32, i32* %37
%332 = load [2 x i32]*, [2 x i32]** %22
%333 = load i32, i32* %24
%334 = sext i32 %333 to i64
%335 = getelementptr inbounds [2 x i32], [2 x i32]* %332, i64 %334
%336 = getelementptr inbounds [2 x i32], [2 x i32]* %335, i64 0, i64 1
store i32 %331, i32* %336
br label %337
337: ; preds = %324
%338 = load i32, i32* %24
%339 = add nsw i32 %338, 1
store i32 %339, i32* %24
br label %224
340: ; preds = %224
%341 = load double**, double*** %34
%342 = bitcast double** %341 to i8*
store i32 0, i32* %24
br label %343
343: ; preds = %354, %340
%344 = load i32, i32* %24
%345 = load i32, i32* %12
%346 = icmp slt i32 %344, %345
br i1 %346, label %347, label %357
347: ; preds = %343
%348 = load i32**, i32*** %35
%349 = load i32, i32* %24
%350 = sext i32 %349 to i64
%351 = getelementptr inbounds i32*, i32** %348, i64 %350
%352 = load i32*, i32** %351
%353 = bitcast i32* %352 to i8*
br label %354
354: ; preds = %347
%355 = load i32, i32* %24
%356 = add nsw i32 %355, 1
store i32 %356, i32* %24
br label %343
357: ; preds = %343
%358 = load i32**, i32*** %35
%359 = bitcast i32** %358 to i8*
br label %360
360: ; preds = %357, %189
ret void
}

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