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]) {
  double (*metric)(int, double **, double **, int **, int **, const double[],
                   int, int, int);
  const int ndata = (transpose == 0) ? ncolumns : nrows;
  int i, j;
  setmetric(dist, &metric);
  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);
  }
  return;
}


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,-0xa4(%rbp)
jmp    1184 <somassign+0x54>
mov    -0xc(%rbp),%eax
mov    %eax,-0xa4(%rbp)
mov    -0xa4(%rbp),%eax
mov    %eax,-0x3c(%rbp)
movsbl 0x28(%rbp),%edi
lea    -0x38(%rbp),%rsi
mov    $0x0,%al
call   1040 <setmetric@plt>
cmpl   $0x0,-0x2c(%rbp)
jne    13b7 <somassign+0x287>
movslq 0x18(%rbp),%rdi
shl    $0x3,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x50(%rbp)
movl   $0x0,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cmp    0x18(%rbp),%eax
jge    1231 <somassign+0x101>
movslq -0x10(%rbp),%rdi
shl    $0x2,%rdi
call   1050 <malloc@plt>
mov    %rax,%rdx
mov    -0x50(%rbp),%rax
movslq -0x40(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
movl   $0x0,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    121e <somassign+0xee>
mov    -0x50(%rbp),%rax
movslq -0x40(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x44(%rbp),%rcx
movl   $0x1,(%rax,%rcx,4)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    11ed <somassign+0xbd>
jmp    1223 <somassign+0xf3>
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    11be <somassign+0x8e>
movl   $0x0,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1377 <somassign+0x247>
movl   $0x0,-0x54(%rbp)
movl   $0x0,-0x58(%rbp)
mov    -0x38(%rbp),%rax
mov    -0x3c(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    0x20(%rbp),%rcx
movslq -0x54(%rbp),%rdx
mov    (%rcx,%rdx,8),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x50(%rbp),%r8
mov    -0x28(%rbp),%r9
mov    -0x40(%rbp),%ebx
mov    -0x58(%rbp),%r11d
mov    -0x2c(%rbp),%r10d
mov    %ebx,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10d,0x10(%rsp)
call   *%rax
movsd  %xmm0,-0x60(%rbp)
movl   $0x0,-0x64(%rbp)
mov    -0x64(%rbp),%eax
cmp    0x10(%rbp),%eax
jge    134c <somassign+0x21c>
movl   $0x0,-0x68(%rbp)
mov    -0x68(%rbp),%eax
cmp    0x18(%rbp),%eax
jge    1339 <somassign+0x209>
mov    -0x38(%rbp),%rax
mov    -0x3c(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    0x20(%rbp),%rcx
movslq -0x64(%rbp),%rdx
mov    (%rcx,%rdx,8),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x50(%rbp),%r8
mov    -0x28(%rbp),%r9
mov    -0x40(%rbp),%ebx
mov    -0x68(%rbp),%r11d
mov    -0x2c(%rbp),%r10d
mov    %ebx,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10d,0x10(%rsp)
call   *%rax
movsd  %xmm0,-0x70(%rbp)
movsd  -0x70(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1326 <somassign+0x1f6>
mov    -0x64(%rbp),%eax
mov    %eax,-0x54(%rbp)
mov    -0x68(%rbp),%eax
mov    %eax,-0x58(%rbp)
movsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
jmp    132b <somassign+0x1fb>
mov    -0x68(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x68(%rbp)
jmp    12ae <somassign+0x17e>
jmp    133e <somassign+0x20e>
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    129b <somassign+0x16b>
mov    -0x54(%rbp),%edx
mov    0x30(%rbp),%rax
movslq -0x40(%rbp),%rcx
mov    %edx,(%rax,%rcx,8)
mov    -0x58(%rbp),%edx
mov    0x30(%rbp),%rax
movslq -0x40(%rbp),%rcx
mov    %edx,0x4(%rax,%rcx,8)
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    1238 <somassign+0x108>
movl   $0x0,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cmp    0x18(%rbp),%eax
jge    13a9 <somassign+0x279>
mov    -0x50(%rbp),%rax
movslq -0x40(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    137e <somassign+0x24e>
mov    -0x50(%rbp),%rdi
call   1030 <free@plt>
jmp    168b <somassign+0x55b>
movslq -0x3c(%rbp),%rdi
shl    $0x3,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x78(%rbp)
movslq -0xc(%rbp),%rdi
shl    $0x3,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x80(%rbp)
movl   $0x0,-0x84(%rbp)
movl   $0x0,-0x88(%rbp)
movl   $0x0,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1439 <somassign+0x309>
mov    $0x4,%edi
call   1050 <malloc@plt>
mov    %rax,%rdx
mov    -0x80(%rbp),%rax
movslq -0x40(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x80(%rbp),%rax
movslq -0x40(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movl   $0x1,(%rax)
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    13f4 <somassign+0x2c4>
movl   $0x0,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1647 <somassign+0x517>
movl   $0x0,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jge    149e <somassign+0x36e>
mov    0x20(%rbp),%rax
movslq -0x84(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x88(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
movslq -0x44(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdx
mov    -0x78(%rbp),%rax
movslq -0x44(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1453 <somassign+0x323>
mov    -0x38(%rbp),%rax
mov    -0x3c(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    -0x78(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x80(%rbp),%r8
mov    -0x28(%rbp),%r9
mov    -0x40(%rbp),%r11d
mov    -0x2c(%rbp),%r10d
xor    %ebx,%ebx
mov    %r11d,(%rsp)
movl   $0x0,0x8(%rsp)
mov    %r10d,0x10(%rsp)
call   *%rax
movsd  %xmm0,-0x90(%rbp)
ff
movl   $0x0,-0x94(%rbp)
mov    -0x94(%rbp),%eax
cmp    0x10(%rbp),%eax
jge    1616 <somassign+0x4e6>
movl   $0x0,-0x98(%rbp)
mov    -0x98(%rbp),%eax
cmp    0x18(%rbp),%eax
jge    15fd <somassign+0x4cd>
movl   $0x0,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jge    1562 <somassign+0x432>
mov    0x20(%rbp),%rax
movslq -0x94(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x98(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
movslq -0x44(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdx
mov    -0x78(%rbp),%rax
movslq -0x44(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1517 <somassign+0x3e7>
mov    -0x38(%rbp),%rax
mov    -0x3c(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    -0x78(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x80(%rbp),%r8
mov    -0x28(%rbp),%r9
mov    -0x40(%rbp),%r11d
mov    -0x2c(%rbp),%r10d
xor    %ebx,%ebx
mov    %r11d,(%rsp)
movl   $0x0,0x8(%rsp)
mov    %r10d,0x10(%rsp)
call   *%rax
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0xa0(%rbp),%xmm1
ff
movsd  -0x90(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jbe    15e4 <somassign+0x4b4>
mov    -0x94(%rbp),%eax
mov    %eax,-0x84(%rbp)
mov    -0x98(%rbp),%eax
mov    %eax,-0x88(%rbp)
movsd  -0xa0(%rbp),%xmm0
ff
movsd  %xmm0,-0x90(%rbp)
ff
jmp    15e9 <somassign+0x4b9>
mov    -0x98(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x98(%rbp)
jmp    1501 <somassign+0x3d1>
jmp    1602 <somassign+0x4d2>
mov    -0x94(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x94(%rbp)
jmp    14e8 <somassign+0x3b8>
mov    -0x84(%rbp),%edx
mov    0x30(%rbp),%rax
movslq -0x40(%rbp),%rcx
mov    %edx,(%rax,%rcx,8)
mov    -0x88(%rbp),%edx
mov    0x30(%rbp),%rax
movslq -0x40(%rbp),%rcx
mov    %edx,0x4(%rax,%rcx,8)
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    1440 <somassign+0x310>
mov    -0x78(%rbp),%rdi
call   1030 <free@plt>
movl   $0x0,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1682 <somassign+0x552>
mov    -0x80(%rbp),%rax
movslq -0x40(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    1657 <somassign+0x527>
mov    -0x80(%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    $0xb8,%rsp
mov    %r9d,%r15d
mov    %r8,0x58(%rsp)
mov    %rcx,0x48(%rsp)
mov    %rdx,0x40(%rsp)
mov    %esi,%ebp
mov    %edi,%ebx
mov    0xf8(%rsp),%r14d
movsbl 0x108(%rsp),%edi
lea    0x60(%rsp),%rsi
xor    %eax,%eax
call   1040 <setmetric@plt>
mov    %ebx,%eax
mov    %r15,0x68(%rsp)
test   %r15d,%r15d
mov    %ebp,0x10(%rsp)
cmove  %ebp,%eax
mov    %eax,0xc(%rsp)
mov    %ebx,0x54(%rsp)
je     181a <somassign+0x6ea>
movslq %eax,%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,%r15
mov    %ebx,%ebp
test   %r14d,%r14d
jle    11dd <somassign+0xad>
xor    %ebx,%ebx
nopl   (%rax)
mov    $0x4,%edi
call   1050 <malloc@plt>
mov    %rax,(%r15,%rbx,8)
movl   $0x1,(%rax)
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    11c0 <somassign+0x90>
mov    %rbp,0x98(%rsp)
mov    0x10(%rsp),%ecx
test   %ecx,%ecx
mov    %r15,%r8
mov    0xf8(%rsp),%eax
mov    0xc(%rsp),%edi
mov    0x68(%rsp),%rbp
jle    17de <somassign+0x6ae>
mov    %ecx,%ecx
mov    %rcx,0xa8(%rsp)
mov    %edi,%ecx
mov    %eax,%eax
mov    %rax,0xb0(%rsp)
lea    0x0(,%rcx,8),%rax
add    %r13,%rax
mov    %rax,0x90(%rsp)
mov    %ecx,%eax
and    $0xfffffffc,%eax
mov    %rax,0x88(%rsp)
add    $0xfffffffffffffffc,%rax
mov    %rax,0x80(%rsp)
mov    %rax,%rdx
shr    $0x2,%rdx
add    $0x1,%rdx
mov    %rdx,%rax
mov    %rdx,0x78(%rsp)
and    $0xfffffffffffffffe,%rdx
mov    %rdx,0x70(%rsp)
mov    %rcx,0x28(%rsp)
mov    %ecx,%r12d
and    $0x3,%r12d
mov    %r12,0xa0(%rsp)
neg    %r12
xor    %eax,%eax
mov    %rax,0x30(%rsp)
movdqa 0xd88(%rip),%xmm4
movdqa 0xd90(%rip),%xmm5
movdqa 0xd98(%rip),%xmm6
movdqa 0xda0(%rip),%xmm7
xor    %ebx,%ebx
movl   $0x0,0x10(%rsp)
jmp    1306 <somassign+0x1d6>
nopl   0x0(%rax)
mov    0xc(%rsp),%edi
movdqa 0xd54(%rip),%xmm4
movdqa 0xd5c(%rip),%xmm5
movdqa 0xd64(%rip),%xmm6
movdqa 0xd6c(%rip),%xmm7
mov    %r14,%r8
mov    0x110(%rsp),%rax
mov    0x30(%rsp),%rcx
mov    0x10(%rsp),%edx
mov    %edx,(%rax,%rcx,8)
mov    %ebx,0x4(%rax,%rcx,8)
add    $0x1,%rcx
mov    %rcx,0x30(%rsp)
cmp    0xa8(%rsp),%rcx
je     17de <somassign+0x6ae>
test   %edi,%edi
jle    14b0 <somassign+0x380>
movslq 0x10(%rsp),%rax
mov    0x100(%rsp),%rcx
mov    (%rcx,%rax,8),%rcx
movslq %ebx,%rdx
lea    (%rcx,%rdx,8),%rax
cmp    $0x4,%edi
jb     134a <somassign+0x21a>
lea    (%rcx,%rdx,8),%rcx
add    $0x8,%rcx
cmp    %rcx,%r13
jae    13f7 <somassign+0x2c7>
cmp    %rax,0x90(%rsp)
jbe    13f7 <somassign+0x2c7>
xor    %r9d,%r9d
mov    %r9,%rdx
not    %rdx
add    0x28(%rsp),%rdx
cmpq   $0x0,0xa0(%rsp)
je     1390 <somassign+0x260>
lea    0x0(,%r9,8),%rsi
xor    %ecx,%ecx
nopl   (%rax)
mov    (%rax),%rbp
add    %rsi,%rbp
mov    %rbp,0x0(%r13,%rsi,1)
add    $0xffffffffffffffff,%rcx
add    $0x8,%rsi
cmp    %rcx,%r12
jne    1370 <somassign+0x240>
sub    %rcx,%r9
mov    0x68(%rsp),%rbp
cmp    $0x3,%rdx
jb     14b0 <somassign+0x380>
mov    0x28(%rsp),%rdx
sub    %r9,%rdx
lea    0x10(,%r9,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    13b0 <somassign+0x280>
jmp    14b0 <somassign+0x380>
cmpq   $0x0,0x80(%rsp)
je     17c4 <somassign+0x694>
movq   (%rax),%xmm0
pshufd $0x44,%xmm0,%xmm1
mov    0x70(%rsp),%rdx
xor    %ecx,%ecx
movdqa 0xbe2(%rip),%xmm0
xchg   %ax,%ax
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    1420 <somassign+0x2f0>
testb  $0x1,0x78(%rsp)
je     1496 <somassign+0x366>
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    0x88(%rsp),%rcx
mov    %rcx,%r9
cmp    0x28(%rsp),%rcx
jne    134d <somassign+0x21d>
nopl   0x0(%rax)
sub    $0x8,%rsp
mov    0x48(%rsp),%rsi
mov    %r13,%rdx
mov    0x50(%rsp),%rcx
mov    %r8,%r14
mov    0x60(%rsp),%r9
push   %rbp
push   $0x0
push   0x48(%rsp)
call   *0x80(%rsp)
add    $0x20,%rsp
cmpl   $0x0,0xf0(%rsp)
jle    12b0 <somassign+0x180>
movdqa %xmm0,%xmm1
xor    %eax,%eax
mov    %rax,0x18(%rsp)
mov    0xf8(%rsp),%eax
mov    0xc(%rsp),%edi
movdqa 0xb09(%rip),%xmm4
movdqa 0xb11(%rip),%xmm5
movdqa 0xb19(%rip),%xmm6
movdqa 0xb21(%rip),%xmm7
mov    %r14,%r8
jmp    1560 <somassign+0x430>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movdqa %xmm1,%xmm0
mov    0x18(%rsp),%rdx
add    $0x1,%rdx
movapd %xmm0,%xmm1
mov    0xf0(%rsp),%eax
mov    %rdx,%rcx
mov    %rdx,0x18(%rsp)
cmp    %rax,%rdx
mov    0xf8(%rsp),%eax
je     12d7 <somassign+0x1a7>
test   %eax,%eax
jle    1530 <somassign+0x400>
xor    %r15d,%r15d
jmp    15f7 <somassign+0x4c7>
nopl   0x0(%rax)
sub    $0x8,%rsp
mov    0x48(%rsp),%rsi
mov    %r13,%rdx
mov    0x50(%rsp),%rcx
mov    %r8,%rbx
mov    0x60(%rsp),%r9
push   %rbp
push   $0x0
push   0x48(%rsp)
call   *0x80(%rsp)
mov    %rbx,%r8
movdqa 0xa9e(%rip),%xmm7
movdqa 0xa86(%rip),%xmm6
movdqa 0xa6e(%rip),%xmm5
movdqa 0xa56(%rip),%xmm4
mov    0x2c(%rsp),%edi
add    $0x20,%rsp
movsd  0x38(%rsp),%xmm1
ucomisd %xmm0,%xmm1
mov    0x10(%rsp),%eax
cmova  0x18(%rsp),%eax
mov    %eax,0x10(%rsp)
mov    0x20(%rsp),%ebx
cmova  %r14d,%ebx
minsd  %xmm1,%xmm0
movapd %xmm0,%xmm1
cmp    0xb0(%rsp),%r15
je     1534 <somassign+0x404>
movq   %xmm1,0x38(%rsp)
mov    %ebx,0x20(%rsp)
mov    %r15,%r14
add    $0x1,%r15
test   %edi,%edi
jle    1570 <somassign+0x440>
mov    0x100(%rsp),%rax
mov    0x18(%rsp),%rcx
mov    (%rax,%rcx,8),%rcx
lea    (%rcx,%r14,8),%rax
cmp    $0x4,%edi
jb     1645 <somassign+0x515>
lea    (%rcx,%r15,8),%rcx
cmp    %rcx,%r13
jae    16f7 <somassign+0x5c7>
cmp    %rax,0x90(%rsp)
jbe    16f7 <somassign+0x5c7>
xor    %ecx,%ecx
mov    %rcx,%rdx
not    %rdx
mov    0x28(%rsp),%rsi
add    %rsi,%rdx
test   $0x3,%sil
je     1690 <somassign+0x560>
lea    0x0(,%rcx,8),%rsi
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nop
mov    (%rax),%rbx
add    %rsi,%rbx
mov    %rbx,0x0(%r13,%rsi,1)
add    $0xffffffffffffffff,%rbp
add    $0x8,%rsi
cmp    %rbp,%r12
jne    1670 <somassign+0x540>
sub    %rbp,%rcx
mov    0x68(%rsp),%rbp
cmp    $0x3,%rdx
jb     1570 <somassign+0x440>
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    16b0 <somassign+0x580>
jmp    1570 <somassign+0x440>
cmpq   $0x0,0x80(%rsp)
je     17b1 <somassign+0x681>
movq   (%rax),%xmm0
pshufd $0x44,%xmm0,%xmm1
mov    0x70(%rsp),%rdx
xor    %ecx,%ecx
movdqa 0x8e2(%rip),%xmm0
xchg   %ax,%ax
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    1720 <somassign+0x5f0>
testb  $0x1,0x78(%rsp)
je     1796 <somassign+0x666>
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    0x88(%rsp),%rdx
mov    %rdx,%rcx
cmp    0x28(%rsp),%rdx
je     1570 <somassign+0x440>
jmp    1647 <somassign+0x517>
xor    %ecx,%ecx
movdqa 0x845(%rip),%xmm0
testb  $0x1,0x78(%rsp)
jne    1772 <somassign+0x642>
jmp    1796 <somassign+0x666>
xor    %ecx,%ecx
movdqa 0x832(%rip),%xmm0
testb  $0x1,0x78(%rsp)
jne    1472 <somassign+0x342>
jmp    1496 <somassign+0x366>
mov    %r8,%r14
mov    %r13,%rdi
call   1030 <free@plt>
cmpl   $0x0,0x54(%rsp)
jle    1812 <somassign+0x6e2>
xor    %ebx,%ebx
mov    0x98(%rsp),%rbp
nopw   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1800 <somassign+0x6d0>
mov    %r14,%rdi
jmp    1b4c <somassign+0xa1c>
movslq %r14d,%rdi
shl    $0x3,%rdi
call   1050 <malloc@plt>
mov    %rax,0x20(%rsp)
test   %r14d,%r14d
mov    0x10(%rsp),%eax
jle    19b5 <somassign+0x885>
movslq %eax,%r13
shl    $0x2,%r13
mov    0xf8(%rsp),%ebx
mov    %eax,%ebp
mov    %ebp,%r14d
and    $0xfffffff8,%r14d
lea    -0x8(%r14),%rax
mov    %rax,0x38(%rsp)
shr    $0x3,%rax
add    $0x1,%rax
mov    %eax,%r12d
and    $0x7,%r12d
and    $0xfffffffffffffff8,%rax
mov    %rax,0x30(%rsp)
mov    %r12,0x18(%rsp)
shl    $0x5,%r12
xor    %r15d,%r15d
jmp    188d <somassign+0x75d>
xchg   %ax,%ax
add    $0x1,%r15
cmp    %rbx,%r15
je     19b5 <somassign+0x885>
mov    %r13,%rdi
call   1050 <malloc@plt>
movapd 0x7b3(%rip),%xmm0
mov    0x10(%rsp),%edx
mov    0x20(%rsp),%rcx
mov    %rax,(%rcx,%r15,8)
test   %edx,%edx
jle    1880 <somassign+0x750>
cmp    $0x8,%edx
jae    18c0 <somassign+0x790>
xor    %ecx,%ecx
jmp    19a0 <somassign+0x870>
nopw   0x0(%rax,%rax,1)
cmpq   $0x38,0x38(%rsp)
jae    18cf <somassign+0x79f>
xor    %ecx,%ecx
jmp    1965 <somassign+0x835>
mov    0x30(%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    18e0 <somassign+0x7b0>
cmpq   $0x0,0x18(%rsp)
je     1994 <somassign+0x864>
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    1980 <somassign+0x850>
mov    %r14,%rcx
cmp    %rbp,%r14
je     1880 <somassign+0x750>
movl   $0x1,(%rax,%rcx,4)
add    $0x1,%rcx
cmp    %rcx,%rbp
jne    19a0 <somassign+0x870>
jmp    1880 <somassign+0x750>
mov    0x54(%rsp),%eax
test   %eax,%eax
mov    0x48(%rsp),%rcx
mov    0x40(%rsp),%rsi
mov    0xc(%rsp),%edi
jle    1b0d <somassign+0x9dd>
mov    %eax,%eax
mov    %rax,0x18(%rsp)
xor    %r10d,%r10d
mov    0xc(%rsp),%r15d
jmp    1a13 <somassign+0x8e3>
mov    0x110(%rsp),%rax
mov    0x38(%rsp),%r10
mov    %ebx,(%rax,%r10,8)
mov    %ebp,0x4(%rax,%r10,8)
add    $0x1,%r10
cmp    0x18(%rsp),%r10
mov    0x48(%rsp),%rcx
mov    0x40(%rsp),%rsi
mov    0xc(%rsp),%edi
je     1b0d <somassign+0x9dd>
mov    0x100(%rsp),%rax
mov    (%rax),%rdx
sub    $0x8,%rsp
mov    0x28(%rsp),%r8
mov    0x60(%rsp),%r9
push   $0x0
push   $0x0
mov    %r10,0x50(%rsp)
push   %r10
call   *0x80(%rsp)
add    $0x20,%rsp
mov    $0x0,%ebp
mov    $0x0,%ebx
cmpl   $0x0,0xf0(%rsp)
mov    0xf8(%rsp),%eax
jle    19e0 <somassign+0x8b0>
movapd %xmm0,%xmm1
xor    %r13d,%r13d
xor    %ebx,%ebx
xor    %ebp,%ebp
jmp    1a8c <somassign+0x95c>
nopw   0x0(%rax,%rax,1)
movapd %xmm1,%xmm0
add    $0x1,%r13
movapd %xmm0,%xmm1
mov    0xf0(%rsp),%ecx
cmp    %rcx,%r13
je     19e0 <somassign+0x8b0>
test   %eax,%eax
jle    1a70 <somassign+0x940>
xor    %r14d,%r14d
mov    0x38(%rsp),%r12
nopl   0x0(%rax,%rax,1)
movsd  %xmm1,0x10(%rsp)
mov    0x100(%rsp),%rax
mov    (%rax,%r13,8),%rdx
sub    $0x8,%rsp
mov    %r15d,%edi
mov    0x48(%rsp),%rsi
mov    0x50(%rsp),%rcx
mov    0x28(%rsp),%r8
mov    0x60(%rsp),%r9
push   $0x0
push   %r14
push   %r12
call   *0x80(%rsp)
mov    0x118(%rsp),%eax
add    $0x20,%rsp
movsd  0x10(%rsp),%xmm1
ucomisd %xmm0,%xmm1
cmova  %r14d,%ebp
cmova  %r13d,%ebx
minsd  %xmm1,%xmm0
add    $0x1,%r14d
movapd %xmm0,%xmm1
cmp    %r14d,%eax
jne    1aa0 <somassign+0x970>
jmp    1a74 <somassign+0x944>
mov    0xf8(%rsp),%eax
test   %eax,%eax
jle    1b47 <somassign+0xa17>
mov    %eax,%r14d
xor    %ebp,%ebp
mov    0x20(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    (%rbx,%rbp,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbp
cmp    %rbp,%r14
jne    1b30 <somassign+0xa00>
mov    %rbx,%rdi
jmp    1b4c <somassign+0xa1c>
mov    0x20(%rsp),%rdi
call   1030 <free@plt>
add    $0xb8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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