#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ freeMatrix(int, int **);
int /*<<< orphan*/ initMatrix(int ***, int);
int **sub(int **, int **, int, int, int, int, int);
int **sum(int **, int **, int, int, int, int, int);
void denseMatrixMult(int **A, int **B, int ***resultMatrix, int n) {
  if (n == 1) {
    initMatrix(resultMatrix, n);
    *resultMatrix[0][0] = A[0][0] * B[0][0];
  } else {
    int **m0, **m1, **m2, **m3, **m4, **m5, **m6;
    int **zero;
    initMatrix(&zero, n);
    int **c00, **c01, **c10, **c11;
    int **temp1, **temp2;
    denseMatrixMult(temp1 = sum(A, A, 0, 0, n / 2, n / 2, n / 2),
                    temp2 = sum(B, B, 0, 0, n / 2, n / 2, n / 2), &m0, n / 2);
    freeMatrix(n / 2, temp1);
    freeMatrix(n / 2, temp2);
    denseMatrixMult(temp1 = sum(A, A, n / 2, 0, n / 2, n / 2, n / 2),
                    temp2 = sum(B, zero, 0, 0, 0, 0, n / 2), &m1, n / 2);
    freeMatrix(n / 2, temp1);
    freeMatrix(n / 2, temp2);
    denseMatrixMult(temp1 = sum(A, zero, 0, 0, 0, 0, n / 2),
                    temp2 = sub(B, B, 0, n / 2, n / 2, n / 2, n / 2), &m2,
                    n / 2);
    freeMatrix(n / 2, temp1);
    freeMatrix(n / 2, temp2);
    denseMatrixMult(temp1 = sum(A, zero, n / 2, n / 2, 0, 0, n / 2),
                    temp2 = sub(B, B, n / 2, 0, 0, 0, n / 2), &m3, n / 2);
    freeMatrix(n / 2, temp1);
    freeMatrix(n / 2, temp2);
    denseMatrixMult(temp1 = sum(A, A, 0, 0, 0, n / 2, n / 2),
                    temp2 = sum(B, zero, n / 2, n / 2, 0, 0, n / 2), &m4,
                    n / 2);
    freeMatrix(n / 2, temp1);
    freeMatrix(n / 2, temp2);
    denseMatrixMult(temp1 = sub(A, A, n / 2, 0, 0, 0, n / 2),
                    temp2 = sum(B, B, 0, 0, 0, n / 2, n / 2), &m5, n / 2);
    freeMatrix(n / 2, temp1);
    freeMatrix(n / 2, temp2);
    denseMatrixMult(temp1 = sub(A, A, 0, n / 2, n / 2, n / 2, n / 2),
                    temp2 = sum(B, B, n / 2, 0, n / 2, n / 2, n / 2), &m6,
                    n / 2);
    freeMatrix(n / 2, temp1);
    freeMatrix(n / 2, temp2);
    c00 = sum(temp2 = sub(temp1 = sum(m0, m3, 0, 0, 0, 0, n / 2), m4, 0, 0, 0,
                          0, n / 2),
              m6, 0, 0, 0, 0, n / 2);
    freeMatrix(n / 2, temp1);
    freeMatrix(n / 2, temp2);
    c01 = sum(m2, m4, 0, 0, 0, 0, n / 2);
    c10 = sum(m1, m3, 0, 0, 0, 0, n / 2);
    c11 = sum(temp2 = sum(temp1 = sub(m0, m1, 0, 0, 0, 0, n / 2), m2, 0, 0, 0,
                          0, n / 2),
              m5, 0, 0, 0, 0, n / 2);
    freeMatrix(n / 2, temp1);
    freeMatrix(n / 2, temp2);
    freeMatrix(n / 2, m0);
    freeMatrix(n / 2, m1);
    freeMatrix(n / 2, m2);
    freeMatrix(n / 2, m3);
    freeMatrix(n / 2, m4);
    freeMatrix(n / 2, m5);
    freeMatrix(n / 2, m6);
    int i, j;
    int **matrix;
    initMatrix(&matrix, n);
    for (i = 0; i < n / 2; i++) {
      for (j = 0; j < n / 2; j++) {
        matrix[i][j] = c00[i][j];
        matrix[i][j + n / 2] = c01[i][j];
        matrix[i + n / 2][j] = c10[i][j];
        matrix[i + n / 2][j + n / 2] = c11[i][j];
      }
    }
    *resultMatrix = matrix;
    freeMatrix(n, zero);
    freeMatrix(n / 2, c00);
    freeMatrix(n / 2, c01);
    freeMatrix(n / 2, c10);
    freeMatrix(n / 2, c11);
  }
}


x86 assembly (clang, -O0):
<denseMatrixMult>:
push   %rbp
mov    %rsp,%rbp
sub    $0x150,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
cmpl   $0x1,-0x1c(%rbp)
jne    11a4 <denseMatrixMult+0x54>
mov    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%esi
call   1070 <initMatrix@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
imul   (%rax),%ecx
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%rax
mov    %ecx,(%rax)
jmp    1cc7 <denseMatrixMult+0xb77>
mov    -0x1c(%rbp),%esi
lea    -0x60(%rbp),%rdi
call   1070 <initMatrix@plt>
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%r8d
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%r9d
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
xor    %ecx,%ecx
mov    %ecx,%edx
mov    %eax,(%rsp)
call   1040 <sum@plt>
mov    %rax,-0x100(%rbp)
mov    %rax,-0x88(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%r8d
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%r9d
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
xor    %ecx,%ecx
mov    %ecx,%edx
mov    %eax,(%rsp)
call   1040 <sum@plt>
mov    -0x100(%rbp),%rdi
mov    %rax,%rsi
mov    %rsi,-0x90(%rbp)
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
lea    -0x28(%rbp),%rdx
call   1030 <denseMatrixMult@plt>
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
mov    -0x88(%rbp),%rsi
call   1050 <freeMatrix@plt>
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
mov    -0x90(%rbp),%rsi
call   1050 <freeMatrix@plt>
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0xf4(%rbp)
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%r8d
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%r9d
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    -0xf4(%rbp),%edx
xor    %ecx,%ecx
mov    %eax,(%rsp)
call   1040 <sum@plt>
mov    %rax,-0xf0(%rbp)
mov    %rax,-0x88(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x60(%rbp),%rsi
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
xor    %r9d,%r9d
mov    %r9d,%edx
mov    %r9d,%ecx
mov    %r9d,%r8d
mov    %eax,(%rsp)
call   1040 <sum@plt>
mov    -0xf0(%rbp),%rdi
mov    %rax,%rsi
mov    %rsi,-0x90(%rbp)
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
lea    -0x30(%rbp),%rdx
call   1030 <denseMatrixMult@plt>
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
mov    -0x88(%rbp),%rsi
call   1050 <freeMatrix@plt>
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
mov    -0x90(%rbp),%rsi
call   1050 <freeMatrix@plt>
mov    -0x8(%rbp),%rdi
mov    -0x60(%rbp),%rsi
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
xor    %r9d,%r9d
mov    %r9d,%edx
mov    %r9d,%ecx
mov    %r9d,%r8d
mov    %eax,(%rsp)
call   1040 <sum@plt>
mov    %rax,-0xe8(%rbp)
mov    %rax,-0x88(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x1c(%rbp),%eax
mov    $0x2,%r8d
cltd
idiv   %r8d
mov    %eax,%r8d
mov    -0x1c(%rbp),%eax
mov    $0x2,%r9d
cltd
idiv   %r9d
mov    %eax,%r9d
mov    -0x1c(%rbp),%eax
mov    $0x2,%r10d
cltd
idiv   %r10d
xor    %edx,%edx
mov    %eax,(%rsp)
call   1060 <sub@plt>
mov    -0xe8(%rbp),%rdi
mov    %rax,%rsi
mov    %rsi,-0x90(%rbp)
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
lea    -0x38(%rbp),%rdx
call   1030 <denseMatrixMult@plt>
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
mov    -0x88(%rbp),%rsi
call   1050 <freeMatrix@plt>
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
mov    -0x90(%rbp),%rsi
call   1050 <freeMatrix@plt>
mov    -0x8(%rbp),%rdi
mov    -0x60(%rbp),%rsi
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0xe0(%rbp)
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x1c(%rbp),%eax
mov    $0x2,%r8d
cltd
idiv   %r8d
mov    -0xe0(%rbp),%edx
xor    %r9d,%r9d
mov    %r9d,%r8d
mov    %eax,(%rsp)
call   1040 <sum@plt>
mov    %rax,-0xd8(%rbp)
mov    %rax,-0x88(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0xdc(%rbp)
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    -0xdc(%rbp),%edx
xor    %r9d,%r9d
mov    %r9d,%ecx
mov    %r9d,%r8d
mov    %eax,(%rsp)
call   1060 <sub@plt>
mov    -0xd8(%rbp),%rdi
mov    %rax,%rsi
mov    %rsi,-0x90(%rbp)
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
lea    -0x40(%rbp),%rdx
call   1030 <denseMatrixMult@plt>
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
mov    -0x88(%rbp),%rsi
call   1050 <freeMatrix@plt>
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
mov    -0x90(%rbp),%rsi
call   1050 <freeMatrix@plt>
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%r9d
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
xor    %r8d,%r8d
mov    %r8d,%edx
mov    %r8d,%ecx
mov    %eax,(%rsp)
call   1040 <sum@plt>
mov    %rax,-0xc8(%rbp)
mov    %rax,-0x88(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x60(%rbp),%rsi
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0xcc(%rbp)
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x1c(%rbp),%eax
mov    $0x2,%r8d
cltd
idiv   %r8d
mov    -0xcc(%rbp),%edx
xor    %r9d,%r9d
mov    %r9d,%r8d
mov    %eax,(%rsp)
call   1040 <sum@plt>
mov    -0xc8(%rbp),%rdi
mov    %rax,%rsi
mov    %rsi,-0x90(%rbp)
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
lea    -0x48(%rbp),%rdx
call   1030 <denseMatrixMult@plt>
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
mov    -0x88(%rbp),%rsi
call   1050 <freeMatrix@plt>
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
mov    -0x90(%rbp),%rsi
call   1050 <freeMatrix@plt>
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0xbc(%rbp)
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    -0xbc(%rbp),%edx
xor    %r9d,%r9d
mov    %r9d,%ecx
mov    %r9d,%r8d
mov    %eax,(%rsp)
call   1060 <sub@plt>
mov    %rax,-0xb8(%rbp)
mov    %rax,-0x88(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%r9d
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
xor    %r8d,%r8d
mov    %r8d,%edx
mov    %r8d,%ecx
mov    %eax,(%rsp)
call   1040 <sum@plt>
mov    -0xb8(%rbp),%rdi
mov    %rax,%rsi
mov    %rsi,-0x90(%rbp)
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
lea    -0x50(%rbp),%rdx
call   1030 <denseMatrixMult@plt>
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
mov    -0x88(%rbp),%rsi
call   1050 <freeMatrix@plt>
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
mov    -0x90(%rbp),%rsi
call   1050 <freeMatrix@plt>
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x1c(%rbp),%eax
mov    $0x2,%r8d
cltd
idiv   %r8d
mov    %eax,%r8d
mov    -0x1c(%rbp),%eax
mov    $0x2,%r9d
cltd
idiv   %r9d
mov    %eax,%r9d
mov    -0x1c(%rbp),%eax
mov    $0x2,%r10d
cltd
idiv   %r10d
xor    %edx,%edx
mov    %eax,(%rsp)
call   1060 <sub@plt>
mov    %rax,-0xa8(%rbp)
mov    %rax,-0x88(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0xac(%rbp)
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%r8d
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%r9d
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    -0xac(%rbp),%edx
xor    %ecx,%ecx
mov    %eax,(%rsp)
call   1040 <sum@plt>
mov    -0xa8(%rbp),%rdi
mov    %rax,%rsi
mov    %rsi,-0x90(%rbp)
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
lea    -0x58(%rbp),%rdx
call   1030 <denseMatrixMult@plt>
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
mov    -0x88(%rbp),%rsi
call   1050 <freeMatrix@plt>
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
mov    -0x90(%rbp),%rsi
call   1050 <freeMatrix@plt>
mov    -0x28(%rbp),%rdi
mov    -0x40(%rbp),%rsi
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
xor    %r9d,%r9d
mov    %r9d,%edx
mov    %r9d,%ecx
mov    %r9d,%r8d
mov    %eax,(%rsp)
call   1040 <sum@plt>
mov    %rax,%rdi
mov    %rdi,-0x88(%rbp)
mov    -0x48(%rbp),%rsi
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
xor    %r9d,%r9d
mov    %r9d,%edx
mov    %r9d,%ecx
mov    %r9d,%r8d
mov    %eax,(%rsp)
call   1060 <sub@plt>
mov    %rax,%rdi
mov    %rdi,-0x90(%rbp)
mov    -0x58(%rbp),%rsi
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
xor    %r9d,%r9d
mov    %r9d,%edx
mov    %r9d,%ecx
mov    %r9d,%r8d
mov    %eax,(%rsp)
call   1040 <sum@plt>
mov    %rax,-0x68(%rbp)
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
mov    -0x88(%rbp),%rsi
call   1050 <freeMatrix@plt>
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
mov    -0x90(%rbp),%rsi
call   1050 <freeMatrix@plt>
mov    -0x38(%rbp),%rdi
mov    -0x48(%rbp),%rsi
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
xor    %r9d,%r9d
mov    %r9d,%edx
mov    %r9d,%ecx
mov    %r9d,%r8d
mov    %eax,(%rsp)
call   1040 <sum@plt>
mov    %rax,-0x70(%rbp)
mov    -0x30(%rbp),%rdi
mov    -0x40(%rbp),%rsi
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
xor    %r9d,%r9d
mov    %r9d,%edx
mov    %r9d,%ecx
mov    %r9d,%r8d
mov    %eax,(%rsp)
call   1040 <sum@plt>
mov    %rax,-0x78(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
xor    %r9d,%r9d
mov    %r9d,%edx
mov    %r9d,%ecx
mov    %r9d,%r8d
mov    %eax,(%rsp)
call   1060 <sub@plt>
mov    %rax,%rdi
mov    %rdi,-0x88(%rbp)
mov    -0x38(%rbp),%rsi
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
xor    %r9d,%r9d
mov    %r9d,%edx
mov    %r9d,%ecx
mov    %r9d,%r8d
mov    %eax,(%rsp)
call   1040 <sum@plt>
mov    %rax,%rdi
mov    %rdi,-0x90(%rbp)
mov    -0x50(%rbp),%rsi
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
xor    %r9d,%r9d
mov    %r9d,%edx
mov    %r9d,%ecx
mov    %r9d,%r8d
mov    %eax,(%rsp)
call   1040 <sum@plt>
mov    %rax,-0x80(%rbp)
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
mov    -0x88(%rbp),%rsi
call   1050 <freeMatrix@plt>
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
mov    -0x90(%rbp),%rsi
call   1050 <freeMatrix@plt>
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
mov    -0x28(%rbp),%rsi
call   1050 <freeMatrix@plt>
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
mov    -0x30(%rbp),%rsi
call   1050 <freeMatrix@plt>
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
mov    -0x38(%rbp),%rsi
call   1050 <freeMatrix@plt>
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
mov    -0x40(%rbp),%rsi
call   1050 <freeMatrix@plt>
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
mov    -0x48(%rbp),%rsi
call   1050 <freeMatrix@plt>
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
mov    -0x50(%rbp),%rsi
call   1050 <freeMatrix@plt>
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
mov    -0x58(%rbp),%rsi
call   1050 <freeMatrix@plt>
mov    -0x1c(%rbp),%esi
lea    -0xa0(%rbp),%rdi
call   1070 <initMatrix@plt>
movl   $0x0,-0x94(%rbp)
mov    -0x94(%rbp),%eax
mov    %eax,-0x104(%rbp)
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x104(%rbp),%eax
cmp    %ecx,%eax
jge    1c55 <denseMatrixMult+0xb05>
movl   $0x0,-0x98(%rbp)
mov    -0x98(%rbp),%eax
mov    %eax,-0x108(%rbp)
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x108(%rbp),%eax
cmp    %ecx,%eax
jge    1c3c <denseMatrixMult+0xaec>
mov    -0x68(%rbp),%rax
movslq -0x94(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x98(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0xa0(%rbp),%rax
movslq -0x94(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x98(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x70(%rbp),%rax
movslq -0x94(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x98(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x13c(%rbp)
mov    -0xa0(%rbp),%rax
movslq -0x94(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x138(%rbp)
mov    -0x98(%rbp),%ecx
mov    -0x1c(%rbp),%eax
mov    $0x2,%esi
cltd
idiv   %esi
mov    -0x13c(%rbp),%edx
mov    %eax,%esi
mov    -0x138(%rbp),%rax
add    %esi,%ecx
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x78(%rbp),%rax
movslq -0x94(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x98(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x12c(%rbp)
mov    -0xa0(%rbp),%rax
mov    %rax,-0x128(%rbp)
mov    -0x94(%rbp),%ecx
mov    -0x1c(%rbp),%eax
mov    $0x2,%esi
cltd
idiv   %esi
mov    -0x12c(%rbp),%edx
mov    %eax,%esi
mov    -0x128(%rbp),%rax
add    %esi,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x98(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x80(%rbp),%rax
movslq -0x94(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x98(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x114(%rbp)
mov    -0xa0(%rbp),%rax
mov    %rax,-0x120(%rbp)
mov    -0x94(%rbp),%ecx
mov    -0x1c(%rbp),%eax
mov    $0x2,%esi
cltd
idiv   %esi
mov    %eax,%edx
mov    -0x120(%rbp),%rax
add    %edx,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x110(%rbp)
mov    -0x98(%rbp),%ecx
mov    -0x1c(%rbp),%eax
mov    $0x2,%esi
cltd
idiv   %esi
mov    -0x114(%rbp),%edx
mov    %eax,%esi
mov    -0x110(%rbp),%rax
add    %esi,%ecx
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x98(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x98(%rbp)
jmp    1a8d <denseMatrixMult+0x93d>
jmp    1c41 <denseMatrixMult+0xaf1>
mov    -0x94(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x94(%rbp)
jmp    1a5c <denseMatrixMult+0x90c>
mov    -0xa0(%rbp),%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x1c(%rbp),%edi
mov    -0x60(%rbp),%rsi
call   1050 <freeMatrix@plt>
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
mov    -0x68(%rbp),%rsi
call   1050 <freeMatrix@plt>
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
mov    -0x70(%rbp),%rsi
call   1050 <freeMatrix@plt>
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
mov    -0x78(%rbp),%rsi
call   1050 <freeMatrix@plt>
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
mov    -0x80(%rbp),%rsi
call   1050 <freeMatrix@plt>
add    $0x150,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<denseMatrixMult>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x88,%rsp
mov    %rdx,%rbx
mov    %rsi,%r15
mov    %rdi,%r14
cmp    $0x1,%ecx
jne    1194 <denseMatrixMult+0x44>
mov    %rbx,%rdi
mov    $0x1,%esi
call   1070 <initMatrix@plt>
mov    (%r14),%rax
mov    (%r15),%rcx
mov    (%rcx),%ecx
imul   (%rax),%ecx
mov    (%rbx),%rax
mov    (%rax),%rax
mov    %ecx,(%rax)
jmp    16b6 <denseMatrixMult+0x566>
mov    %ecx,%r12d
mov    %rbx,0x80(%rsp)
lea    0x8(%rsp),%rdi
mov    %ecx,%esi
call   1070 <initMatrix@plt>
mov    %r12d,%ebp
shr    $0x1f,%ebp
add    %r12d,%ebp
sar    %ebp
mov    %ebp,(%rsp)
mov    %r14,%rdi
mov    %r14,%rsi
xor    %edx,%edx
xor    %ecx,%ecx
mov    %ebp,%r8d
mov    %ebp,%r9d
call   1040 <sum@plt>
mov    %rax,%r13
mov    %ebp,(%rsp)
mov    %r15,%rdi
mov    %r15,%rsi
xor    %edx,%edx
xor    %ecx,%ecx
mov    %ebp,%r8d
mov    %ebp,%r9d
call   1040 <sum@plt>
mov    %rax,%rbx
lea    0x38(%rsp),%rdx
mov    %r13,%rdi
mov    %rax,%rsi
mov    %ebp,%ecx
call   1030 <denseMatrixMult@plt>
mov    %ebp,%edi
mov    %r13,%rsi
call   1050 <freeMatrix@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1050 <freeMatrix@plt>
mov    %ebp,(%rsp)
mov    %r14,%rdi
mov    %r14,%rsi
mov    %ebp,%edx
xor    %ecx,%ecx
mov    %ebp,%r8d
mov    %ebp,%r9d
call   1040 <sum@plt>
mov    %rax,%r13
mov    0x8(%rsp),%rsi
mov    %ebp,(%rsp)
mov    %r15,%rdi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1040 <sum@plt>
mov    %rax,%rbx
lea    0x30(%rsp),%rdx
mov    %r13,%rdi
mov    %rax,%rsi
mov    %ebp,%ecx
call   1030 <denseMatrixMult@plt>
mov    %ebp,%edi
mov    %r13,%rsi
call   1050 <freeMatrix@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1050 <freeMatrix@plt>
mov    0x8(%rsp),%rsi
mov    %ebp,(%rsp)
mov    %r14,%rdi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1040 <sum@plt>
mov    %rax,%r13
mov    %ebp,(%rsp)
mov    %r15,%rdi
mov    %r15,%rsi
xor    %edx,%edx
mov    %ebp,%ecx
mov    %ebp,%r8d
mov    %ebp,%r9d
call   1060 <sub@plt>
mov    %rax,%rbx
lea    0x28(%rsp),%rdx
mov    %r13,%rdi
mov    %rax,%rsi
mov    %ebp,%ecx
call   1030 <denseMatrixMult@plt>
mov    %ebp,%edi
mov    %r13,%rsi
call   1050 <freeMatrix@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1050 <freeMatrix@plt>
mov    0x8(%rsp),%rsi
mov    %ebp,(%rsp)
mov    %r14,%rdi
mov    %ebp,%edx
mov    %ebp,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1040 <sum@plt>
mov    %rax,%r13
mov    %ebp,(%rsp)
mov    %r15,%rdi
mov    %r15,%rsi
mov    %ebp,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1060 <sub@plt>
mov    %rax,%rbx
lea    0x20(%rsp),%rdx
mov    %r13,%rdi
mov    %rax,%rsi
mov    %ebp,%ecx
call   1030 <denseMatrixMult@plt>
mov    %ebp,%edi
mov    %r13,%rsi
call   1050 <freeMatrix@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1050 <freeMatrix@plt>
mov    %ebp,(%rsp)
mov    %r14,%rdi
mov    %r14,%rsi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
mov    %ebp,%r9d
call   1040 <sum@plt>
mov    %rax,%r13
mov    0x8(%rsp),%rsi
mov    %ebp,(%rsp)
mov    %r15,%rdi
mov    %ebp,%edx
mov    %ebp,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1040 <sum@plt>
mov    %rax,%rbx
lea    0x18(%rsp),%rdx
mov    %r13,%rdi
mov    %rax,%rsi
mov    %ebp,%ecx
call   1030 <denseMatrixMult@plt>
mov    %ebp,%edi
mov    %r13,%rsi
call   1050 <freeMatrix@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1050 <freeMatrix@plt>
mov    %ebp,(%rsp)
mov    %r14,%rdi
mov    %r14,%rsi
mov    %ebp,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1060 <sub@plt>
mov    %rax,%r13
mov    %ebp,(%rsp)
mov    %r15,%rdi
mov    %r15,%rsi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
mov    %ebp,%r9d
call   1040 <sum@plt>
mov    %rax,%rbx
lea    0x78(%rsp),%rdx
mov    %r13,%rdi
mov    %rax,%rsi
mov    %ebp,%ecx
call   1030 <denseMatrixMult@plt>
mov    %ebp,%edi
mov    %r13,%rsi
call   1050 <freeMatrix@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1050 <freeMatrix@plt>
mov    %ebp,(%rsp)
mov    %r14,%rdi
mov    %r14,%rsi
xor    %edx,%edx
mov    %ebp,%ecx
mov    %ebp,%r8d
mov    %ebp,%r9d
call   1060 <sub@plt>
mov    %rax,%r14
mov    %ebp,(%rsp)
mov    %r15,%rdi
mov    %r15,%rsi
mov    %ebp,%edx
xor    %ecx,%ecx
mov    %ebp,%r8d
mov    %ebp,%r9d
call   1040 <sum@plt>
mov    %rax,%rbx
lea    0x70(%rsp),%rdx
mov    %r14,%rdi
mov    %rax,%rsi
mov    %ebp,%ecx
call   1030 <denseMatrixMult@plt>
mov    %ebp,%edi
mov    %r14,%rsi
call   1050 <freeMatrix@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1050 <freeMatrix@plt>
mov    0x38(%rsp),%rdi
mov    0x20(%rsp),%rsi
mov    %ebp,(%rsp)
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1040 <sum@plt>
mov    %rax,%r14
mov    0x18(%rsp),%rsi
mov    %ebp,(%rsp)
mov    %rax,%rdi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1060 <sub@plt>
mov    %rax,%rbx
mov    0x70(%rsp),%rsi
mov    %ebp,(%rsp)
mov    %rax,%rdi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1040 <sum@plt>
mov    %rax,0x60(%rsp)
mov    %ebp,%edi
mov    %r14,%rsi
call   1050 <freeMatrix@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1050 <freeMatrix@plt>
mov    0x28(%rsp),%rdi
mov    0x18(%rsp),%rsi
mov    %ebp,(%rsp)
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1040 <sum@plt>
mov    %rax,0x58(%rsp)
mov    0x30(%rsp),%rdi
mov    0x20(%rsp),%rsi
mov    %ebp,(%rsp)
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1040 <sum@plt>
mov    %rax,0x50(%rsp)
mov    0x38(%rsp),%rdi
mov    0x30(%rsp),%rsi
mov    %ebp,(%rsp)
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1060 <sub@plt>
mov    %rax,%r14
mov    0x28(%rsp),%rsi
mov    %ebp,(%rsp)
mov    %rax,%rdi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1040 <sum@plt>
mov    %rax,%rbx
mov    0x78(%rsp),%rsi
mov    %ebp,(%rsp)
mov    %rax,%rdi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1040 <sum@plt>
mov    %rax,0x48(%rsp)
mov    %ebp,%edi
mov    %r14,%rsi
call   1050 <freeMatrix@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1050 <freeMatrix@plt>
mov    0x38(%rsp),%rsi
mov    %ebp,%edi
call   1050 <freeMatrix@plt>
mov    0x30(%rsp),%rsi
mov    %ebp,%edi
call   1050 <freeMatrix@plt>
mov    0x28(%rsp),%rsi
mov    %ebp,%edi
call   1050 <freeMatrix@plt>
mov    0x20(%rsp),%rsi
mov    %ebp,%edi
call   1050 <freeMatrix@plt>
mov    0x18(%rsp),%rsi
mov    %ebp,%edi
call   1050 <freeMatrix@plt>
mov    0x78(%rsp),%rsi
mov    %ebp,%edi
call   1050 <freeMatrix@plt>
mov    0x70(%rsp),%rsi
mov    %ebp,0x14(%rsp)
mov    %ebp,%edi
call   1050 <freeMatrix@plt>
lea    0x68(%rsp),%rdi
mov    %r12d,%esi
call   1070 <initMatrix@plt>
mov    %r12d,0x44(%rsp)
cmp    $0x2,%r12d
jl     1664 <denseMatrixMult+0x514>
mov    0x68(%rsp),%r8
mov    0x14(%rsp),%eax
movslq %eax,%r9
mov    %eax,%r11d
xor    %r10d,%r10d
nopl   0x0(%rax,%rax,1)
mov    0x60(%rsp),%rax
mov    (%rax,%r10,8),%r12
mov    (%r8,%r10,8),%rbx
mov    0x58(%rsp),%rax
mov    (%rax,%r10,8),%rbp
mov    0x50(%rsp),%rax
mov    (%rax,%r10,8),%rax
lea    (%r10,%r9,1),%rcx
mov    (%r8,%rcx,8),%rcx
mov    0x48(%rsp),%rdx
mov    (%rdx,%r10,8),%rsi
lea    (%rbx,%r9,4),%rdx
lea    (%rcx,%r9,4),%r13
xor    %r15d,%r15d
nopl   0x0(%rax,%rax,1)
mov    (%r12,%r15,4),%r14d
mov    %r14d,(%rbx,%r15,4)
mov    0x0(%rbp,%r15,4),%edi
mov    %edi,(%rdx,%r15,4)
mov    (%rax,%r15,4),%edi
mov    %edi,(%rcx,%r15,4)
mov    (%rsi,%r15,4),%edi
mov    %edi,0x0(%r13,%r15,4)
add    $0x1,%r15
cmp    %r15,%r11
jne    1630 <denseMatrixMult+0x4e0>
add    $0x1,%r10
cmp    %r11,%r10
jne    15f0 <denseMatrixMult+0x4a0>
mov    0x68(%rsp),%rax
mov    0x80(%rsp),%rcx
mov    %rax,(%rcx)
mov    0x8(%rsp),%rsi
mov    0x44(%rsp),%edi
call   1050 <freeMatrix@plt>
mov    0x14(%rsp),%ebx
mov    %ebx,%edi
mov    0x60(%rsp),%rsi
call   1050 <freeMatrix@plt>
mov    %ebx,%edi
mov    0x58(%rsp),%rsi
call   1050 <freeMatrix@plt>
mov    %ebx,%edi
mov    0x50(%rsp),%rsi
call   1050 <freeMatrix@plt>
mov    %ebx,%edi
mov    0x48(%rsp),%rsi
call   1050 <freeMatrix@plt>
add    $0x88,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @denseMatrixMult(i32** %0, i32** %1, i32*** %2, i32 %3) {
%5 = alloca i32**
%6 = alloca i32**
%7 = alloca i32**
%8 = alloca i32**
%9 = alloca i32**
%10 = alloca i32**
%11 = alloca i32**
%12 = alloca i32**
%13 = alloca i32**
%14 = icmp eq i32 %3, 1
br i1 %14, label %15, label %24
15: ; preds = %4
%16 = tail call i32 @initMatrix(i32*** %2, i32 1)
%17 = load i32*, i32** %0
%18 = load i32, i32* %17
%19 = load i32*, i32** %1
%20 = load i32, i32* %19
%21 = mul nsw i32 %20, %18
%22 = load i32**, i32*** %2
%23 = load i32*, i32** %22
store i32 %21, i32* %23
br label %155
24: ; preds = %4
%25 = bitcast i32*** %5 to i8*
%26 = bitcast i32*** %6 to i8*
%27 = bitcast i32*** %7 to i8*
%28 = bitcast i32*** %8 to i8*
%29 = bitcast i32*** %9 to i8*
%30 = bitcast i32*** %10 to i8*
%31 = bitcast i32*** %11 to i8*
%32 = bitcast i32*** %12 to i8*
%33 = call i32 @initMatrix(i32*** %12, i32 %3)
%34 = sdiv i32 %3, 2
%35 = call i32** @sum(i32** %0, i32** %0, i32 0, i32 0, i32 %34, i32 %34, i32 %34)
%36 = call i32** @sum(i32** %1, i32** %1, i32 0, i32 0, i32 %34, i32 %34, i32 %34)
%37 = call i32 @freeMatrix(i32 %34, i32** %35)
%38 = call i32 @freeMatrix(i32 %34, i32** %36)
%39 = call i32** @sum(i32** %0, i32** %0, i32 %34, i32 0, i32 %34, i32 %34, i32 %34)
%40 = load i32**, i32*** %12
%41 = call i32** @sum(i32** %1, i32** %40, i32 0, i32 0, i32 0, i32 0, i32 %34)
%42 = call i32 @freeMatrix(i32 %34, i32** %39)
%43 = call i32 @freeMatrix(i32 %34, i32** %41)
%44 = load i32**, i32*** %12
%45 = call i32** @sum(i32** %0, i32** %44, i32 0, i32 0, i32 0, i32 0, i32 %34)
%46 = call i32** @sub(i32** %1, i32** %1, i32 0, i32 %34, i32 %34, i32 %34, i32 %34)
%47 = call i32 @freeMatrix(i32 %34, i32** %45)
%48 = call i32 @freeMatrix(i32 %34, i32** %46)
%49 = load i32**, i32*** %12
%50 = call i32** @sum(i32** %0, i32** %49, i32 %34, i32 %34, i32 0, i32 0, i32 %34)
%51 = call i32** @sub(i32** %1, i32** %1, i32 %34, i32 0, i32 0, i32 0, i32 %34)
%52 = call i32 @freeMatrix(i32 %34, i32** %50)
%53 = call i32 @freeMatrix(i32 %34, i32** %51)
%54 = call i32** @sum(i32** %0, i32** %0, i32 0, i32 0, i32 0, i32 %34, i32 %34)
%55 = load i32**, i32*** %12
%56 = call i32** @sum(i32** %1, i32** %55, i32 %34, i32 %34, i32 0, i32 0, i32 %34)
%57 = call i32 @freeMatrix(i32 %34, i32** %54)
%58 = call i32 @freeMatrix(i32 %34, i32** %56)
%59 = call i32** @sub(i32** %0, i32** %0, i32 %34, i32 0, i32 0, i32 0, i32 %34)
%60 = call i32** @sum(i32** %1, i32** %1, i32 0, i32 0, i32 0, i32 %34, i32 %34)
%61 = call i32 @freeMatrix(i32 %34, i32** %59)
%62 = call i32 @freeMatrix(i32 %34, i32** %60)
%63 = call i32** @sub(i32** %0, i32** %0, i32 0, i32 %34, i32 %34, i32 %34, i32 %34)
%64 = call i32** @sum(i32** %1, i32** %1, i32 %34, i32 0, i32 %34, i32 %34, i32 %34)
%65 = call i32 @freeMatrix(i32 %34, i32** %63)
%66 = call i32 @freeMatrix(i32 %34, i32** %64)
%67 = load i32**, i32*** %5
%68 = load i32**, i32*** %8
%69 = call i32** @sum(i32** %67, i32** %68, i32 0, i32 0, i32 0, i32 0, i32 %34)
%70 = load i32**, i32*** %9
%71 = call i32** @sub(i32** %69, i32** %70, i32 0, i32 0, i32 0, i32 0, i32 %34)
%72 = load i32**, i32*** %11
%73 = call i32** @sum(i32** %71, i32** %72, i32 0, i32 0, i32 0, i32 0, i32 %34)
%74 = call i32 @freeMatrix(i32 %34, i32** %69)
%75 = call i32 @freeMatrix(i32 %34, i32** %71)
%76 = load i32**, i32*** %7
%77 = load i32**, i32*** %9
%78 = call i32** @sum(i32** %76, i32** %77, i32 0, i32 0, i32 0, i32 0, i32 %34)
%79 = load i32**, i32*** %6
%80 = load i32**, i32*** %8
%81 = call i32** @sum(i32** %79, i32** %80, i32 0, i32 0, i32 0, i32 0, i32 %34)
%82 = load i32**, i32*** %5
%83 = load i32**, i32*** %6
%84 = call i32** @sub(i32** %82, i32** %83, i32 0, i32 0, i32 0, i32 0, i32 %34)
%85 = load i32**, i32*** %7
%86 = call i32** @sum(i32** %84, i32** %85, i32 0, i32 0, i32 0, i32 0, i32 %34)
%87 = load i32**, i32*** %10
%88 = call i32** @sum(i32** %86, i32** %87, i32 0, i32 0, i32 0, i32 0, i32 %34)
%89 = call i32 @freeMatrix(i32 %34, i32** %84)
%90 = call i32 @freeMatrix(i32 %34, i32** %86)
%91 = load i32**, i32*** %5
%92 = call i32 @freeMatrix(i32 %34, i32** %91)
%93 = load i32**, i32*** %6
%94 = call i32 @freeMatrix(i32 %34, i32** %93)
%95 = load i32**, i32*** %7
%96 = call i32 @freeMatrix(i32 %34, i32** %95)
%97 = load i32**, i32*** %8
%98 = call i32 @freeMatrix(i32 %34, i32** %97)
%99 = load i32**, i32*** %9
%100 = call i32 @freeMatrix(i32 %34, i32** %99)
%101 = load i32**, i32*** %10
%102 = call i32 @freeMatrix(i32 %34, i32** %101)
%103 = load i32**, i32*** %11
%104 = call i32 @freeMatrix(i32 %34, i32** %103)
%105 = bitcast i32*** %13 to i8*
%106 = call i32 @initMatrix(i32*** %13, i32 %3)
%107 = icmp sgt i32 %3, 1
br i1 %107, label %108, label %147
108: ; preds = %24
%109 = load i32**, i32*** %13
%110 = sext i32 %34 to i64
%111 = zext i32 %34 to i64
br label %112
112: ; preds = %144, %108
%113 = phi i64 [ 0, %108 ], [ %145, %144 ]
%114 = getelementptr inbounds i32*, i32** %73, i64 %113
%115 = load i32*, i32** %114
%116 = getelementptr inbounds i32*, i32** %109, i64 %113
%117 = load i32*, i32** %116
%118 = getelementptr inbounds i32*, i32** %78, i64 %113
%119 = load i32*, i32** %118
%120 = getelementptr inbounds i32*, i32** %81, i64 %113
%121 = load i32*, i32** %120
%122 = add nsw i64 %113, %110
%123 = getelementptr inbounds i32*, i32** %109, i64 %122
%124 = load i32*, i32** %123
%125 = getelementptr inbounds i32*, i32** %88, i64 %113
%126 = load i32*, i32** %125
br label %127
127: ; preds = %112, %127
%128 = phi i64 [ 0, %112 ], [ %142, %127 ]
%129 = getelementptr inbounds i32, i32* %115, i64 %128
%130 = load i32, i32* %129
%131 = getelementptr inbounds i32, i32* %117, i64 %128
store i32 %130, i32* %131
%132 = getelementptr inbounds i32, i32* %119, i64 %128
%133 = load i32, i32* %132
%134 = add nsw i64 %128, %110
%135 = getelementptr inbounds i32, i32* %117, i64 %134
store i32 %133, i32* %135
%136 = getelementptr inbounds i32, i32* %121, i64 %128
%137 = load i32, i32* %136
%138 = getelementptr inbounds i32, i32* %124, i64 %128
store i32 %137, i32* %138
%139 = getelementptr inbounds i32, i32* %126, i64 %128
%140 = load i32, i32* %139
%141 = getelementptr inbounds i32, i32* %124, i64 %134
store i32 %140, i32* %141
%142 = add nuw nsw i64 %128, 1
%143 = icmp eq i64 %142, %111
br i1 %143, label %144, label %127
144: ; preds = %127
%145 = add nuw nsw i64 %113, 1
%146 = icmp eq i64 %145, %111
br i1 %146, label %147, label %112
147: ; preds = %144, %24
%148 = load i32**, i32*** %13
store i32** %148, i32*** %2
%149 = load i32**, i32*** %12
%150 = call i32 @freeMatrix(i32 %3, i32** %149)
%151 = call i32 @freeMatrix(i32 %34, i32** %73)
%152 = call i32 @freeMatrix(i32 %34, i32** %78)
%153 = call i32 @freeMatrix(i32 %34, i32** %81)
%154 = call i32 @freeMatrix(i32 %34, i32** %88)
br label %155
155: ; preds = %147, %15
ret void
}