int InverseMatrix(double **matrixA, double **inversedMatrixA, int userN,
                  double determinantResult) {
  int userM = 0;
  int row = 0;
  int column = 0;
  int cofactorRowCheck = 0;
  int cofactorColumnCheck = 0;
  int cofactorRow = 0;
  int cofactorColumn = 0;
  int sign = 1;
  double temporaryValue = 0;
  double **determinantCofactorMatrixA;
  double **cofactorMatrixA;
  userM = userN - 1;
  cofactorMatrixA = (double **)malloc(sizeof(double *) * userN);
  for (row = 0; row < userN; row++) {
    cofactorMatrixA[row] = (double *)malloc(sizeof(double) * userN);
  }
  determinantCofactorMatrixA = (double **)malloc(sizeof(double *) * userM);
  for (row = 0; row < userM; row++) {
    determinantCofactorMatrixA[row] = (double *)malloc(sizeof(double) * userM);
  }
  if (userN == 2) {
    cofactorMatrixA[0][0] =
        (matrixA[0][0] * matrixA[1][1]) - (matrixA[0][1] * matrixA[1][0]);
  } else {
    for (row = 0; row < userN; row++) {
      for (column = 0; column < userN; column++) {
        cofactorColumnCheck = 0;
        for (cofactorRow = 0; cofactorRow < userM; cofactorRow++) {
          if (cofactorColumnCheck == column) {
            cofactorColumnCheck++;
          }
          cofactorRowCheck = 0;
          for (cofactorColumn = 0; cofactorColumn < userM; cofactorColumn++) {
            if (cofactorColumn == row) {
              cofactorRowCheck++;
            }
            determinantCofactorMatrixA[cofactorRow][cofactorColumn] =
                matrixA[cofactorColumnCheck][cofactorRowCheck];
            cofactorRowCheck++;
          }
          cofactorColumnCheck++;
        }
        if ((row + column) % 2 == 1) {
          sign = -1;
        } else {
          sign = 1;
        }
        cofactorMatrixA[row][column] =
            sign * Determinant(determinantCofactorMatrixA, userM);
      }
    }
  }
  for (row = 0; row < userM; row++) {
    free(determinantCofactorMatrixA[row]);
  }
  free(determinantCofactorMatrixA);
  for (row = 0; row < userN; row++) {
    for (column = 0; column < userN; column++) {
      temporaryValue = cofactorMatrixA[row][column];
      inversedMatrixA[row][column] = cofactorMatrixA[column][row];
      inversedMatrixA[column][row] = temporaryValue;
    }
  }
  for (row = 0; row < userN; row++) {
    for (column = 0; column < userN; column++) {
      inversedMatrixA[row][column] =
          cofactorMatrixA[row][column] / determinantResult;
    }
  }
  for (row = 0; row < userN; row++) {
    free(cofactorMatrixA[row]);
  }
  free(cofactorMatrixA);
  return 0;
}


x86 assembly (clang, -O0):
<InverseMatrix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movsd  %xmm0,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
movl   $0x0,-0x30(%rbp)
movl   $0x0,-0x34(%rbp)
movl   $0x0,-0x38(%rbp)
movl   $0x0,-0x3c(%rbp)
movl   $0x1,-0x40(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x14(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x24(%rbp)
movslq -0x14(%rbp),%rdi
shl    $0x3,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x58(%rbp)
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    11df <InverseMatrix+0xaf>
movslq -0x14(%rbp),%rdi
shl    $0x3,%rdi
call   1050 <malloc@plt>
mov    %rax,%rdx
mov    -0x58(%rbp),%rax
movslq -0x28(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    11a9 <InverseMatrix+0x79>
movslq -0x24(%rbp),%rdi
shl    $0x3,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x50(%rbp)
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    122d <InverseMatrix+0xfd>
movslq -0x24(%rbp),%rdi
shl    $0x3,%rdi
call   1050 <malloc@plt>
mov    %rax,%rdx
mov    -0x50(%rbp),%rax
movslq -0x28(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    11f7 <InverseMatrix+0xc7>
cmpl   $0x2,-0x14(%rbp)
jne    1296 <InverseMatrix+0x166>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rax
movsd  0x8(%rax),%xmm2
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsd  0x8(%rax),%xmm1
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rax
mulsd  (%rax),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x58(%rbp),%rax
mov    (%rax),%rax
movsd  %xmm0,(%rax)
jmp    13f7 <InverseMatrix+0x2c7>
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    13f2 <InverseMatrix+0x2c2>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    13df <InverseMatrix+0x2af>
movl   $0x0,-0x34(%rbp)
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    1372 <InverseMatrix+0x242>
mov    -0x34(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jne    12eb <InverseMatrix+0x1bb>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
movl   $0x0,-0x30(%rbp)
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    135b <InverseMatrix+0x22b>
mov    -0x3c(%rbp),%eax
cmp    -0x28(%rbp),%eax
jne    131a <InverseMatrix+0x1ea>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x50(%rbp),%rax
movslq -0x38(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x3c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    12f9 <InverseMatrix+0x1c9>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    12ca <InverseMatrix+0x19a>
mov    -0x28(%rbp),%eax
add    -0x2c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x1,%edx
jne    1395 <InverseMatrix+0x265>
movl   $0xffffffff,-0x40(%rbp)
jmp    139c <InverseMatrix+0x26c>
movl   $0x1,-0x40(%rbp)
mov    -0x40(%rbp),%eax
mov    %eax,-0x5c(%rbp)
mov    -0x50(%rbp),%rdi
mov    -0x24(%rbp),%esi
mov    $0x0,%al
call   1040 <Determinant@plt>
mov    %eax,%ecx
mov    -0x5c(%rbp),%eax
imul   %ecx,%eax
cvtsi2sd %eax,%xmm0
mov    -0x58(%rbp),%rax
movslq -0x28(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x2c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    12b0 <InverseMatrix+0x180>
jmp    13e4 <InverseMatrix+0x2b4>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    129d <InverseMatrix+0x16d>
jmp    13f7 <InverseMatrix+0x2c7>
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    1429 <InverseMatrix+0x2f9>
mov    -0x50(%rbp),%rax
movslq -0x28(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    13fe <InverseMatrix+0x2ce>
mov    -0x50(%rbp),%rdi
call   1030 <free@plt>
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    14d7 <InverseMatrix+0x3a7>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    14c4 <InverseMatrix+0x394>
mov    -0x58(%rbp),%rax
movslq -0x28(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x58(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x28(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x28(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x2c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x48(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x28(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    144c <InverseMatrix+0x31c>
jmp    14c9 <InverseMatrix+0x399>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    1439 <InverseMatrix+0x309>
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    154d <InverseMatrix+0x41d>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    153a <InverseMatrix+0x40a>
mov    -0x58(%rbp),%rax
movslq -0x28(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
divsd  -0x20(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x28(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x2c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    14f1 <InverseMatrix+0x3c1>
jmp    153f <InverseMatrix+0x40f>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    14de <InverseMatrix+0x3ae>
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    157f <InverseMatrix+0x44f>
mov    -0x58(%rbp),%rax
movslq -0x28(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    1554 <InverseMatrix+0x424>
mov    -0x58(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<InverseMatrix>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
movapd %xmm0,0x40(%rsp)
mov    %edx,%r12d
mov    %rsi,0x38(%rsp)
mov    %rdi,0x10(%rsp)
lea    -0x1(%r12),%eax
mov    %eax,0xc(%rsp)
movslq %edx,%rbp
lea    0x0(,%rbp,8),%rbx
mov    %rbx,%rdi
call   1050 <malloc@plt>
mov    %rax,%r15
mov    %r12d,%r13d
test   %ebp,%ebp
jle    1195 <InverseMatrix+0x65>
xor    %ebp,%ebp
nopl   0x0(%rax)
mov    %rbx,%rdi
call   1050 <malloc@plt>
mov    %rax,(%r15,%rbp,8)
add    $0x1,%rbp
cmp    %rbp,%r13
jne    1180 <InverseMatrix+0x50>
movslq 0xc(%rsp),%rbx
shl    $0x3,%rbx
mov    %rbx,%rdi
call   1050 <malloc@plt>
mov    %rax,%rdi
cmp    $0x2,%r12d
mov    %rax,0x18(%rsp)
mov    %r15,0x28(%rsp)
mov    %r12,0x20(%rsp)
jl     1222 <InverseMatrix+0xf2>
mov    0xc(%rsp),%r14d
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nop
mov    %rbx,%rdi
call   1050 <malloc@plt>
mov    0x18(%rsp),%rdi
mov    %rax,(%rdi,%rbp,8)
add    $0x1,%rbp
cmp    %rbp,%r14
jne    11d0 <InverseMatrix+0xa0>
cmp    $0x2,%r12d
jne    1222 <InverseMatrix+0xf2>
mov    0x10(%rsp),%rcx
mov    (%rcx),%rax
mov    0x8(%rcx),%rcx
movsd  (%rax),%xmm0
movsd  (%rcx),%xmm1
mulsd  0x8(%rax),%xmm1
mulsd  0x8(%rcx),%xmm0
subsd  %xmm1,%xmm0
mov    (%r15),%rax
movsd  %xmm0,(%rax)
mov    0xc(%rsp),%esi
jmp    137c <InverseMatrix+0x24c>
test   %r12d,%r12d
mov    0xc(%rsp),%esi
mov    0x10(%rsp),%r10
jle    137c <InverseMatrix+0x24c>
mov    %esi,%r14d
mov    %r14d,%r15d
and    $0xfffffffe,%r15d
xor    %r12d,%r12d
mov    %r13,0x30(%rsp)
jmp    1262 <InverseMatrix+0x132>
nopl   0x0(%rax,%rax,1)
add    $0x1,%r12
mov    0x30(%rsp),%r13
cmp    %r13,%r12
je     137c <InverseMatrix+0x24c>
xor    %r13d,%r13d
jmp    12b4 <InverseMatrix+0x184>
nopw   0x0(%rax,%rax,1)
lea    (%r12,%r13,1),%ebx
xor    %eax,%eax
call   1040 <Determinant@plt>
mov    0x18(%rsp),%rdi
mov    0x10(%rsp),%r10
mov    0xc(%rsp),%esi
mov    %eax,%ecx
neg    %ecx
test   $0x1,%bl
cmove  %eax,%ecx
xorps  %xmm0,%xmm0
cvtsi2sd %ecx,%xmm0
mov    0x28(%rsp),%rax
mov    (%rax,%r12,8),%rax
movsd  %xmm0,(%rax,%r13,8)
add    $0x1,%r13
cmp    0x30(%rsp),%r13
je     1250 <InverseMatrix+0x120>
cmpl   $0x1,0x20(%rsp)
je     1270 <InverseMatrix+0x140>
xor    %r8d,%r8d
xor    %edx,%edx
jmp    12e0 <InverseMatrix+0x1b0>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%r9d
add    $0x1,%r8
mov    %r9d,%edx
cmp    %r14,%r8
je     1270 <InverseMatrix+0x140>
mov    %edx,%eax
xor    %r9d,%r9d
cmp    %rax,%r13
sete   %r9b
add    %edx,%r9d
movslq %r9d,%rdx
mov    (%r10,%rdx,8),%rdx
mov    (%rdi,%r8,8),%r11
xor    %ecx,%ecx
xor    %ebp,%ebp
cmp    $0x1,%esi
je     1355 <InverseMatrix+0x225>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
xor    %ebx,%ebx
cmp    %rcx,%r12
sete   %bl
add    %ebp,%ebx
movslq %ebx,%rbp
movsd  (%rdx,%rbp,8),%xmm0
movsd  %xmm0,(%r11,%rcx,8)
lea    0x1(%rcx),%rbx
xor    %eax,%eax
cmp    %r12,%rbx
sete   %al
lea    0x1(%rax,%rbp,1),%ebx
movslq %ebx,%rbx
movsd  (%rdx,%rbx,8),%xmm0
movsd  %xmm0,0x8(%r11,%rcx,8)
add    %eax,%ebp
add    $0x2,%ebp
add    $0x2,%rcx
cmp    %r15,%rcx
jne    1310 <InverseMatrix+0x1e0>
test   $0x1,%r14b
je     12d0 <InverseMatrix+0x1a0>
xor    %eax,%eax
cmp    %r12,%rcx
sete   %al
add    %eax,%ebp
movslq %ebp,%rax
movsd  (%rdx,%rax,8),%xmm0
movsd  %xmm0,(%r11,%rcx,8)
jmp    12d0 <InverseMatrix+0x1a0>
mov    0x20(%rsp),%r15
cmp    $0x2,%r15d
jl     13a7 <InverseMatrix+0x277>
mov    %esi,%r14d
xor    %ebp,%ebp
nopl   0x0(%rax)
mov    (%rdi,%rbp,8),%rdi
call   1030 <free@plt>
mov    0x18(%rsp),%rdi
add    $0x1,%rbp
cmp    %rbp,%r14
jne    1390 <InverseMatrix+0x260>
call   1030 <free@plt>
test   %r15d,%r15d
mov    0x28(%rsp),%r14
movapd 0x40(%rsp),%xmm2
mov    0x38(%rsp),%r11
jle    15b2 <InverseMatrix+0x482>
mov    %r13d,%eax
and    $0xfffffffe,%eax
xor    %ecx,%ecx
jmp    13dd <InverseMatrix+0x2ad>
nop
add    $0x1,%rcx
cmp    %r13,%rcx
je     1460 <InverseMatrix+0x330>
mov    (%r14,%rcx,8),%rsi
mov    (%r11,%rcx,8),%rdx
xor    %edi,%edi
cmp    $0x1,%r15d
je     1439 <InverseMatrix+0x309>
nopl   (%rax)
movsd  (%rsi,%rdi,8),%xmm0
mov    (%r14,%rdi,8),%rbp
movsd  0x0(%rbp,%rcx,8),%xmm1
movsd  %xmm1,(%rdx,%rdi,8)
mov    (%r11,%rdi,8),%rbp
movsd  %xmm0,0x0(%rbp,%rcx,8)
movsd  0x8(%rsi,%rdi,8),%xmm0
mov    0x8(%r14,%rdi,8),%rbp
movsd  0x0(%rbp,%rcx,8),%xmm1
movsd  %xmm1,0x8(%rdx,%rdi,8)
mov    0x8(%r11,%rdi,8),%rbp
movsd  %xmm0,0x0(%rbp,%rcx,8)
add    $0x2,%rdi
cmp    %rdi,%rax
jne    13f0 <InverseMatrix+0x2c0>
test   $0x1,%r13b
je     13d0 <InverseMatrix+0x2a0>
movsd  (%rsi,%rdi,8),%xmm0
mov    (%r14,%rdi,8),%rsi
movsd  (%rsi,%rcx,8),%xmm1
movsd  %xmm1,(%rdx,%rdi,8)
mov    (%r11,%rdi,8),%rdx
movsd  %xmm0,(%rdx,%rcx,8)
jmp    13d0 <InverseMatrix+0x2a0>
test   %r15d,%r15d
jle    15b2 <InverseMatrix+0x482>
mov    %r13d,%r9d
and    $0xfffffffe,%r9d
add    $0xfffffffffffffffe,%r9
mov    %r9,%r10
shr    %r10
add    $0x1,%r10
mov    %r13d,%ecx
and    $0xfffffffe,%ecx
movapd %xmm2,%xmm0
unpcklpd %xmm2,%xmm0
mov    %r10,%r8
and    $0xfffffffffffffffe,%r8
mov    %r13,%rdi
neg    %rdi
xor    %ebp,%ebp
jmp    14ad <InverseMatrix+0x37d>
nopl   (%rax)
add    $0x1,%rbp
cmp    %r13,%rbp
je     1597 <InverseMatrix+0x467>
mov    (%r14,%rbp,8),%rbx
mov    (%r11,%rbp,8),%rsi
cmp    $0x2,%r15d
jb     14cd <InverseMatrix+0x39d>
lea    (%rbx,%r13,8),%rax
cmp    %rax,%rsi
jae    1530 <InverseMatrix+0x400>
lea    (%rsi,%r13,8),%rax
cmp    %rax,%rbx
jae    1530 <InverseMatrix+0x400>
xor    %edx,%edx
mov    %rdx,%rax
test   $0x1,%r13b
je     14ed <InverseMatrix+0x3bd>
movsd  (%rbx,%rdx,8),%xmm1
divsd  %xmm2,%xmm1
movsd  %xmm1,(%rsi,%rdx,8)
mov    %rdx,%rax
or     $0x1,%rax
not    %rdx
cmp    %rdi,%rdx
je     14a0 <InverseMatrix+0x370>
cs nopw 0x0(%rax,%rax,1)
nop
movsd  (%rbx,%rax,8),%xmm1
divsd  %xmm2,%xmm1
movsd  %xmm1,(%rsi,%rax,8)
movsd  0x8(%rbx,%rax,8),%xmm1
divsd  %xmm2,%xmm1
movsd  %xmm1,0x8(%rsi,%rax,8)
add    $0x2,%rax
cmp    %rax,%r13
jne    1500 <InverseMatrix+0x3d0>
jmp    14a0 <InverseMatrix+0x370>
nopl   0x0(%rax)
test   %r9,%r9
je     158d <InverseMatrix+0x45d>
mov    %r8,%rdx
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
movupd (%rbx,%rax,8),%xmm1
divpd  %xmm0,%xmm1
movupd %xmm1,(%rsi,%rax,8)
movupd 0x10(%rbx,%rax,8),%xmm1
divpd  %xmm0,%xmm1
movupd %xmm1,0x10(%rsi,%rax,8)
add    $0x4,%rax
add    $0xfffffffffffffffe,%rdx
jne    1540 <InverseMatrix+0x410>
test   $0x1,%r10b
je     157c <InverseMatrix+0x44c>
movupd (%rbx,%rax,8),%xmm1
divpd  %xmm0,%xmm1
movupd %xmm1,(%rsi,%rax,8)
mov    %rcx,%rdx
cmp    %r13,%rcx
je     14a0 <InverseMatrix+0x370>
jmp    14cf <InverseMatrix+0x39f>
xor    %eax,%eax
test   $0x1,%r10b
jne    156e <InverseMatrix+0x43e>
jmp    157c <InverseMatrix+0x44c>
test   %r15d,%r15d
jle    15b2 <InverseMatrix+0x482>
xor    %ebx,%ebx
xchg   %ax,%ax
mov    (%r14,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%r13
jne    15a0 <InverseMatrix+0x470>
mov    %r14,%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @InverseMatrix(double** %0, double** %1, i32 %2, double %3) {
%5 = alloca double**
%6 = alloca double**
%7 = alloca i32
%8 = alloca double
%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 double
%18 = alloca double**
%19 = alloca double**
store double** %0, double*** %5
store double** %1, double*** %6
store i32 %2, i32* %7
store double %3, double* %8
store i32 0, i32* %9
store i32 0, i32* %10
store i32 0, i32* %11
store i32 0, i32* %12
store i32 0, i32* %13
store i32 0, i32* %14
store i32 0, i32* %15
store i32 1, i32* %16
store double 0.000000e+00, double* %17
%20 = load i32, i32* %7
%21 = sub nsw i32 %20, 1
store i32 %21, i32* %9
%22 = load i32, i32* %7
%23 = sext i32 %22 to i64
%24 = mul i64 8, %23
%25 = call i8* @malloc(i64 %24)
%26 = bitcast i8* %25 to double**
store double** %26, double*** %19
store i32 0, i32* %10
br label %27
27: ; preds = %41, %4
%28 = load i32, i32* %10
%29 = load i32, i32* %7
%30 = icmp slt i32 %28, %29
br i1 %30, label %31, label %44
31: ; preds = %27
%32 = load i32, i32* %7
%33 = sext i32 %32 to i64
%34 = mul i64 8, %33
%35 = call i8* @malloc(i64 %34)
%36 = bitcast i8* %35 to double*
%37 = load double**, double*** %19
%38 = load i32, i32* %10
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds double*, double** %37, i64 %39
store double* %36, double** %40
br label %41
41: ; preds = %31
%42 = load i32, i32* %10
%43 = add nsw i32 %42, 1
store i32 %43, i32* %10
br label %27
44: ; preds = %27
%45 = load i32, i32* %9
%46 = sext i32 %45 to i64
%47 = mul i64 8, %46
%48 = call i8* @malloc(i64 %47)
%49 = bitcast i8* %48 to double**
store double** %49, double*** %18
store i32 0, i32* %10
br label %50
50: ; preds = %64, %44
%51 = load i32, i32* %10
%52 = load i32, i32* %9
%53 = icmp slt i32 %51, %52
br i1 %53, label %54, label %67
54: ; preds = %50
%55 = load i32, i32* %9
%56 = sext i32 %55 to i64
%57 = mul i64 8, %56
%58 = call i8* @malloc(i64 %57)
%59 = bitcast i8* %58 to double*
%60 = load double**, double*** %18
%61 = load i32, i32* %10
%62 = sext i32 %61 to i64
%63 = getelementptr inbounds double*, double** %60, i64 %62
store double* %59, double** %63
br label %64
64: ; preds = %54
%65 = load i32, i32* %10
%66 = add nsw i32 %65, 1
store i32 %66, i32* %10
br label %50
67: ; preds = %50
%68 = load i32, i32* %7
%69 = icmp eq i32 %68, 2
br i1 %69, label %70, label %98
70: ; preds = %67
%71 = load double**, double*** %5
%72 = getelementptr inbounds double*, double** %71, i64 0
%73 = load double*, double** %72
%74 = getelementptr inbounds double, double* %73, i64 0
%75 = load double, double* %74
%76 = load double**, double*** %5
%77 = getelementptr inbounds double*, double** %76, i64 1
%78 = load double*, double** %77
%79 = getelementptr inbounds double, double* %78, i64 1
%80 = load double, double* %79
%81 = load double**, double*** %5
%82 = getelementptr inbounds double*, double** %81, i64 0
%83 = load double*, double** %82
%84 = getelementptr inbounds double, double* %83, i64 1
%85 = load double, double* %84
%86 = load double**, double*** %5
%87 = getelementptr inbounds double*, double** %86, i64 1
%88 = load double*, double** %87
%89 = getelementptr inbounds double, double* %88, i64 0
%90 = load double, double* %89
%91 = fmul double %85, %90
%92 = fneg double %91
%93 = call double @llvm.fmuladd.f64(double %75, double %80, double %92)
%94 = load double**, double*** %19
%95 = getelementptr inbounds double*, double** %94, i64 0
%96 = load double*, double** %95
%97 = getelementptr inbounds double, double* %96, i64 0
store double %93, double* %97
br label %192
98: ; preds = %67
store i32 0, i32* %10
br label %99
99: ; preds = %188, %98
%100 = load i32, i32* %10
%101 = load i32, i32* %7
%102 = icmp slt i32 %100, %101
br i1 %102, label %103, label %191
103: ; preds = %99
store i32 0, i32* %11
br label %104
104: ; preds = %184, %103
%105 = load i32, i32* %11
%106 = load i32, i32* %7
%107 = icmp slt i32 %105, %106
br i1 %107, label %108, label %187
108: ; preds = %104
store i32 0, i32* %13
store i32 0, i32* %14
br label %109
109: ; preds = %158, %108
%110 = load i32, i32* %14
%111 = load i32, i32* %9
%112 = icmp slt i32 %110, %111
br i1 %112, label %113, label %161
113: ; preds = %109
%114 = load i32, i32* %13
%115 = load i32, i32* %11
%116 = icmp eq i32 %114, %115
br i1 %116, label %117, label %120
117: ; preds = %113
%118 = load i32, i32* %13
%119 = add nsw i32 %118, 1
store i32 %119, i32* %13
br label %120
120: ; preds = %117, %113
store i32 0, i32* %12
store i32 0, i32* %15
br label %121
121: ; preds = %152, %120
%122 = load i32, i32* %15
%123 = load i32, i32* %9
%124 = icmp slt i32 %122, %123
br i1 %124, label %125, label %155
125: ; preds = %121
%126 = load i32, i32* %15
%127 = load i32, i32* %10
%128 = icmp eq i32 %126, %127
br i1 %128, label %129, label %132
129: ; preds = %125
%130 = load i32, i32* %12
%131 = add nsw i32 %130, 1
store i32 %131, i32* %12
br label %132
132: ; preds = %129, %125
%133 = load double**, double*** %5
%134 = load i32, i32* %13
%135 = sext i32 %134 to i64
%136 = getelementptr inbounds double*, double** %133, i64 %135
%137 = load double*, double** %136
%138 = load i32, i32* %12
%139 = sext i32 %138 to i64
%140 = getelementptr inbounds double, double* %137, i64 %139
%141 = load double, double* %140
%142 = load double**, double*** %18
%143 = load i32, i32* %14
%144 = sext i32 %143 to i64
%145 = getelementptr inbounds double*, double** %142, i64 %144
%146 = load double*, double** %145
%147 = load i32, i32* %15
%148 = sext i32 %147 to i64
%149 = getelementptr inbounds double, double* %146, i64 %148
store double %141, double* %149
%150 = load i32, i32* %12
%151 = add nsw i32 %150, 1
store i32 %151, i32* %12
br label %152
152: ; preds = %132
%153 = load i32, i32* %15
%154 = add nsw i32 %153, 1
store i32 %154, i32* %15
br label %121
155: ; preds = %121
%156 = load i32, i32* %13
%157 = add nsw i32 %156, 1
store i32 %157, i32* %13
br label %158
158: ; preds = %155
%159 = load i32, i32* %14
%160 = add nsw i32 %159, 1
store i32 %160, i32* %14
br label %109
161: ; preds = %109
%162 = load i32, i32* %10
%163 = load i32, i32* %11
%164 = add nsw i32 %162, %163
%165 = srem i32 %164, 2
%166 = icmp eq i32 %165, 1
br i1 %166, label %167, label %168
167: ; preds = %161
store i32 -1, i32* %16
br label %169
168: ; preds = %161
store i32 1, i32* %16
br label %169
169: ; preds = %168, %167
%170 = load i32, i32* %16
%171 = load double**, double*** %18
%172 = load i32, i32* %9
%173 = call i32 (double**, i32, ...) bitcast (i32 (...)* @Determinant to i32 (double**, i32, ...)*)(double** %171, i32 %172)
%174 = mul nsw i32 %170, %173
%175 = sitofp i32 %174 to double
%176 = load double**, double*** %19
%177 = load i32, i32* %10
%178 = sext i32 %177 to i64
%179 = getelementptr inbounds double*, double** %176, i64 %178
%180 = load double*, double** %179
%181 = load i32, i32* %11
%182 = sext i32 %181 to i64
%183 = getelementptr inbounds double, double* %180, i64 %182
store double %175, double* %183
br label %184
184: ; preds = %169
%185 = load i32, i32* %11
%186 = add nsw i32 %185, 1
store i32 %186, i32* %11
br label %104
187: ; preds = %104
br label %188
188: ; preds = %187
%189 = load i32, i32* %10
%190 = add nsw i32 %189, 1
store i32 %190, i32* %10
br label %99
191: ; preds = %99
br label %192
192: ; preds = %191, %70
store i32 0, i32* %10
br label %193
193: ; preds = %204, %192
%194 = load i32, i32* %10
%195 = load i32, i32* %9
%196 = icmp slt i32 %194, %195
br i1 %196, label %197, label %207
197: ; preds = %193
%198 = load double**, double*** %18
%199 = load i32, i32* %10
%200 = sext i32 %199 to i64
%201 = getelementptr inbounds double*, double** %198, i64 %200
%202 = load double*, double** %201
%203 = bitcast double* %202 to i8*
br label %204
204: ; preds = %197
%205 = load i32, i32* %10
%206 = add nsw i32 %205, 1
store i32 %206, i32* %10
br label %193
207: ; preds = %193
%208 = load double**, double*** %18
%209 = bitcast double** %208 to i8*
store i32 0, i32* %10
br label %210
210: ; preds = %259, %207
%211 = load i32, i32* %10
%212 = load i32, i32* %7
%213 = icmp slt i32 %211, %212
br i1 %213, label %214, label %262
214: ; preds = %210
store i32 0, i32* %11
br label %215
215: ; preds = %255, %214
%216 = load i32, i32* %11
%217 = load i32, i32* %7
%218 = icmp slt i32 %216, %217
br i1 %218, label %219, label %258
219: ; preds = %215
%220 = load double**, double*** %19
%221 = load i32, i32* %10
%222 = sext i32 %221 to i64
%223 = getelementptr inbounds double*, double** %220, i64 %222
%224 = load double*, double** %223
%225 = load i32, i32* %11
%226 = sext i32 %225 to i64
%227 = getelementptr inbounds double, double* %224, i64 %226
%228 = load double, double* %227
store double %228, double* %17
%229 = load double**, double*** %19
%230 = load i32, i32* %11
%231 = sext i32 %230 to i64
%232 = getelementptr inbounds double*, double** %229, i64 %231
%233 = load double*, double** %232
%234 = load i32, i32* %10
%235 = sext i32 %234 to i64
%236 = getelementptr inbounds double, double* %233, i64 %235
%237 = load double, double* %236
%238 = load double**, double*** %6
%239 = load i32, i32* %10
%240 = sext i32 %239 to i64
%241 = getelementptr inbounds double*, double** %238, i64 %240
%242 = load double*, double** %241
%243 = load i32, i32* %11
%244 = sext i32 %243 to i64
%245 = getelementptr inbounds double, double* %242, i64 %244
store double %237, double* %245
%246 = load double, double* %17
%247 = load double**, double*** %6
%248 = load i32, i32* %11
%249 = sext i32 %248 to i64
%250 = getelementptr inbounds double*, double** %247, i64 %249
%251 = load double*, double** %250
%252 = load i32, i32* %10
%253 = sext i32 %252 to i64
%254 = getelementptr inbounds double, double* %251, i64 %253
store double %246, double* %254
br label %255
255: ; preds = %219
%256 = load i32, i32* %11
%257 = add nsw i32 %256, 1
store i32 %257, i32* %11
br label %215
258: ; preds = %215
br label %259
259: ; preds = %258
%260 = load i32, i32* %10
%261 = add nsw i32 %260, 1
store i32 %261, i32* %10
br label %210
262: ; preds = %210
store i32 0, i32* %10
br label %263
263: ; preds = %296, %262
%264 = load i32, i32* %10
%265 = load i32, i32* %7
%266 = icmp slt i32 %264, %265
br i1 %266, label %267, label %299
267: ; preds = %263
store i32 0, i32* %11
br label %268
268: ; preds = %292, %267
%269 = load i32, i32* %11
%270 = load i32, i32* %7
%271 = icmp slt i32 %269, %270
br i1 %271, label %272, label %295
272: ; preds = %268
%273 = load double**, double*** %19
%274 = load i32, i32* %10
%275 = sext i32 %274 to i64
%276 = getelementptr inbounds double*, double** %273, i64 %275
%277 = load double*, double** %276
%278 = load i32, i32* %11
%279 = sext i32 %278 to i64
%280 = getelementptr inbounds double, double* %277, i64 %279
%281 = load double, double* %280
%282 = load double, double* %8
%283 = fdiv double %281, %282
%284 = load double**, double*** %6
%285 = load i32, i32* %10
%286 = sext i32 %285 to i64
%287 = getelementptr inbounds double*, double** %284, i64 %286
%288 = load double*, double** %287
%289 = load i32, i32* %11
%290 = sext i32 %289 to i64
%291 = getelementptr inbounds double, double* %288, i64 %290
store double %283, double* %291
br label %292
292: ; preds = %272
%293 = load i32, i32* %11
%294 = add nsw i32 %293, 1
store i32 %294, i32* %11
br label %268
295: ; preds = %268
br label %296
296: ; preds = %295
%297 = load i32, i32* %10
%298 = add nsw i32 %297, 1
store i32 %298, i32* %10
br label %263
299: ; preds = %263
store i32 0, i32* %10
br label %300
300: ; preds = %311, %299
%301 = load i32, i32* %10
%302 = load i32, i32* %7
%303 = icmp slt i32 %301, %302
br i1 %303, label %304, label %314
304: ; preds = %300
%305 = load double**, double*** %19
%306 = load i32, i32* %10
%307 = sext i32 %306 to i64
%308 = getelementptr inbounds double*, double** %305, i64 %307
%309 = load double*, double** %308
%310 = bitcast double* %309 to i8*
br label %311
311: ; preds = %304
%312 = load i32, i32* %10
%313 = add nsw i32 %312, 1
store i32 %313, i32* %10
br label %300
314: ; preds = %300
%315 = load double**, double*** %19
%316 = bitcast double** %315 to i8*
ret i32 0
}

LLVM IR (-O2):
define i32 @InverseMatrix(double** nocapture %0, double** nocapture %1, i32 %2, double %3) {
%5 = add i32 %2, -1
%6 = sext i32 %2 to i64
%7 = shl nsw i64 %6, 3
%8 = tail call i8* @malloc(i64 %7)
%9 = bitcast i8* %8 to double**
%10 = icmp sgt i32 %2, 0
br i1 %10, label %11, label %20
11: ; preds = %4
%12 = zext i32 %2 to i64
br label %13
13: ; preds = %11, %13
%14 = phi i64 [ 0, %11 ], [ %18, %13 ]
%15 = tail call i8* @malloc(i64 %7)
%16 = getelementptr inbounds double*, double** %9, i64 %14
%17 = bitcast double** %16 to i8**
store i8* %15, i8** %17
%18 = add nuw nsw i64 %14, 1
%19 = icmp eq i64 %18, %12
br i1 %19, label %20, label %13
20: ; preds = %13, %4
%21 = sext i32 %5 to i64
%22 = shl nsw i64 %21, 3
%23 = tail call i8* @malloc(i64 %22)
%24 = bitcast i8* %23 to double**
%25 = icmp sgt i32 %2, 1
br i1 %25, label %26, label %37
26: ; preds = %20
%27 = zext i32 %5 to i64
br label %28
28: ; preds = %26, %28
%29 = phi i64 [ 0, %26 ], [ %33, %28 ]
%30 = tail call i8* @malloc(i64 %22)
%31 = getelementptr inbounds double*, double** %24, i64 %29
%32 = bitcast double** %31 to i8**
store i8* %30, i8** %32
%33 = add nuw nsw i64 %29, 1
%34 = icmp eq i64 %33, %27
br i1 %34, label %35, label %28
35: ; preds = %28
%36 = icmp eq i32 %2, 2
br i1 %36, label %46, label %37
37: ; preds = %20, %35
br i1 %10, label %38, label %131
38: ; preds = %37
%39 = icmp eq i32 %2, 1
%40 = zext i32 %2 to i64
%41 = zext i32 %5 to i64
%42 = and i64 %41, 1
%43 = icmp eq i32 %5, 1
%44 = and i64 %41, 4294967294
%45 = icmp eq i64 %42, 0
br label %60
46: ; preds = %35
%47 = load double*, double** %0
%48 = load double, double* %47
%49 = getelementptr inbounds double*, double** %0, i64 1
%50 = load double*, double** %49
%51 = getelementptr inbounds double, double* %50, i64 1
%52 = load double, double* %51
%53 = getelementptr inbounds double, double* %47, i64 1
%54 = load double, double* %53
%55 = load double, double* %50
%56 = fneg double %54
%57 = fmul double %55, %56
%58 = tail call double @llvm.fmuladd.f64(double %48, double %52, double %57)
%59 = load double*, double** %9
store double %58, double* %59
br label %131
60: ; preds = %128, %38
%61 = phi i64 [ 0, %38 ], [ %129, %128 ]
%62 = getelementptr inbounds double*, double** %9, i64 %61
br label %63
63: ; preds = %60, %116
%64 = phi i64 [ 0, %60 ], [ %126, %116 ]
br i1 %39, label %116, label %65
65: ; preds = %63, %112
%66 = phi i64 [ %114, %112 ], [ 0, %63 ]
%67 = phi i32 [ %113, %112 ], [ 0, %63 ]
%68 = zext i32 %67 to i64
%69 = icmp eq i64 %64, %68
%70 = zext i1 %69 to i32
%71 = add nsw i32 %67, %70
%72 = sext i32 %71 to i64
%73 = getelementptr inbounds double*, double** %0, i64 %72
%74 = load double*, double** %73
%75 = getelementptr inbounds double*, double** %24, i64 %66
%76 = load double*, double** %75
br i1 %43, label %101, label %77
77: ; preds = %65, %77
%78 = phi i64 [ %98, %77 ], [ 0, %65 ]
%79 = phi i32 [ %97, %77 ], [ 0, %65 ]
%80 = phi i64 [ %99, %77 ], [ 0, %65 ]
%81 = icmp eq i64 %78, %61
%82 = zext i1 %81 to i32
%83 = add nsw i32 %79, %82
%84 = sext i32 %83 to i64
%85 = getelementptr inbounds double, double* %74, i64 %84
%86 = load double, double* %85
%87 = getelementptr inbounds double, double* %76, i64 %78
store double %86, double* %87
%88 = add nsw i32 %83, 1
%89 = or i64 %78, 1
%90 = icmp eq i64 %89, %61
%91 = zext i1 %90 to i32
%92 = add nsw i32 %88, %91
%93 = sext i32 %92 to i64
%94 = getelementptr inbounds double, double* %74, i64 %93
%95 = load double, double* %94
%96 = getelementptr inbounds double, double* %76, i64 %89
store double %95, double* %96
%97 = add nsw i32 %92, 1
%98 = add nuw nsw i64 %78, 2
%99 = add i64 %80, 2
%100 = icmp eq i64 %99, %44
br i1 %100, label %101, label %77
101: ; preds = %77, %65
%102 = phi i64 [ 0, %65 ], [ %98, %77 ]
%103 = phi i32 [ 0, %65 ], [ %97, %77 ]
br i1 %45, label %112, label %104
104: ; preds = %101
%105 = icmp eq i64 %102, %61
%106 = zext i1 %105 to i32
%107 = add nsw i32 %103, %106
%108 = sext i32 %107 to i64
%109 = getelementptr inbounds double, double* %74, i64 %108
%110 = load double, double* %109
%111 = getelementptr inbounds double, double* %76, i64 %102
store double %110, double* %111
br label %112
112: ; preds = %101, %104
%113 = add nsw i32 %71, 1
%114 = add nuw nsw i64 %66, 1
%115 = icmp eq i64 %114, %41
br i1 %115, label %116, label %65
116: ; preds = %112, %63
%117 = add nuw nsw i64 %64, %61
%118 = and i64 %117, 1
%119 = icmp eq i64 %118, 0
%120 = tail call i32 (double**, i32, ...) bitcast (i32 (...)* @Determinant to i32 (double**, i32, ...)*)(double** %24, i32 %5)
%121 = sub nsw i32 0, %120
%122 = select i1 %119, i32 %120, i32 %121
%123 = sitofp i32 %122 to double
%124 = load double*, double** %62
%125 = getelementptr inbounds double, double* %124, i64 %64
store double %123, double* %125
%126 = add nuw nsw i64 %64, 1
%127 = icmp eq i64 %126, %40
br i1 %127, label %128, label %63
128: ; preds = %116
%129 = add nuw nsw i64 %61, 1
%130 = icmp eq i64 %129, %40
br i1 %130, label %131, label %60
131: ; preds = %128, %37, %46
br i1 %25, label %132, label %141
132: ; preds = %131
%133 = zext i32 %5 to i64
br label %134
134: ; preds = %132, %134
%135 = phi i64 [ 0, %132 ], [ %139, %134 ]
%136 = getelementptr inbounds double*, double** %24, i64 %135
%137 = bitcast double** %136 to i8**
%138 = load i8*, i8** %137
tail call void @free(i8* %138)
%139 = add nuw nsw i64 %135, 1
%140 = icmp eq i64 %139, %133
br i1 %140, label %141, label %134
141: ; preds = %134, %131
tail call void @free(i8* %23)
br i1 %10, label %142, label %296
142: ; preds = %141
%143 = zext i32 %2 to i64
%144 = and i64 %143, 1
%145 = icmp eq i32 %2, 1
%146 = and i64 %143, 4294967294
%147 = icmp eq i64 %144, 0
br label %148
148: ; preds = %213, %142
%149 = phi i64 [ 0, %142 ], [ %214, %213 ]
%150 = getelementptr inbounds double*, double** %9, i64 %149
%151 = load double*, double** %150
%152 = getelementptr inbounds double*, double** %1, i64 %149
%153 = load double*, double** %152
br i1 %145, label %200, label %173
154: ; preds = %213
br i1 %10, label %155, label %296
155: ; preds = %154
%156 = zext i32 %2 to i64
%157 = and i64 %156, 4294967294
%158 = add nsw i64 %157, -2
%159 = lshr exact i64 %158, 1
%160 = add nuw i64 %159, 1
%161 = icmp ult i32 %2, 2
%162 = and i64 %143, 4294967294
%163 = insertelement <2 x double> poison, double %3, i64 0
%164 = shufflevector <2 x double> %163, <2 x double> poison, <2 x i32> zeroinitializer
%165 = and i64 %160, 1
%166 = icmp eq i64 %158, 0
%167 = and i64 %160, -2
%168 = icmp eq i64 %165, 0
%169 = icmp eq i64 %162, %143
%170 = and i64 %156, 1
%171 = icmp eq i64 %170, 0
%172 = sub nsw i64 0, %156
br label %216
173: ; preds = %148, %173
%174 = phi i64 [ %197, %173 ], [ 0, %148 ]
%175 = phi i64 [ %198, %173 ], [ 0, %148 ]
%176 = getelementptr inbounds double, double* %151, i64 %174
%177 = load double, double* %176
%178 = getelementptr inbounds double*, double** %9, i64 %174
%179 = load double*, double** %178
%180 = getelementptr inbounds double, double* %179, i64 %149
%181 = load double, double* %180
%182 = getelementptr inbounds double, double* %153, i64 %174
store double %181, double* %182
%183 = getelementptr inbounds double*, double** %1, i64 %174
%184 = load double*, double** %183
%185 = getelementptr inbounds double, double* %184, i64 %149
store double %177, double* %185
%186 = or i64 %174, 1
%187 = getelementptr inbounds double, double* %151, i64 %186
%188 = load double, double* %187
%189 = getelementptr inbounds double*, double** %9, i64 %186
%190 = load double*, double** %189
%191 = getelementptr inbounds double, double* %190, i64 %149
%192 = load double, double* %191
%193 = getelementptr inbounds double, double* %153, i64 %186
store double %192, double* %193
%194 = getelementptr inbounds double*, double** %1, i64 %186
%195 = load double*, double** %194
%196 = getelementptr inbounds double, double* %195, i64 %149
store double %188, double* %196
%197 = add nuw nsw i64 %174, 2
%198 = add i64 %175, 2
%199 = icmp eq i64 %198, %146
br i1 %199, label %200, label %173
200: ; preds = %173, %148
%201 = phi i64 [ 0, %148 ], [ %197, %173 ]
br i1 %147, label %213, label %202
202: ; preds = %200
%203 = getelementptr inbounds double, double* %151, i64 %201
%204 = load double, double* %203
%205 = getelementptr inbounds double*, double** %9, i64 %201
%206 = load double*, double** %205
%207 = getelementptr inbounds double, double* %206, i64 %149
%208 = load double, double* %207
%209 = getelementptr inbounds double, double* %153, i64 %201
store double %208, double* %209
%210 = getelementptr inbounds double*, double** %1, i64 %201
%211 = load double*, double** %210
%212 = getelementptr inbounds double, double* %211, i64 %149
store double %204, double* %212
br label %213
213: ; preds = %200, %202
%214 = add nuw nsw i64 %149, 1
%215 = icmp eq i64 %214, %143
br i1 %215, label %154, label %148
216: ; preds = %286, %155
%217 = phi i64 [ 0, %155 ], [ %287, %286 ]
%218 = getelementptr inbounds double*, double** %9, i64 %217
%219 = load double*, double** %218
%220 = getelementptr inbounds double*, double** %1, i64 %217
%221 = load double*, double** %220
br i1 %161, label %258, label %222
222: ; preds = %216
%223 = getelementptr double, double* %221, i64 %143
%224 = getelementptr double, double* %219, i64 %143
%225 = icmp ult double* %221, %224
%226 = icmp ult double* %219, %223
%227 = and i1 %225, %226
br i1 %227, label %258, label %228
228: ; preds = %222
br i1 %166, label %248, label %229
229: ; preds = %228, %229
%230 = phi i64 [ %245, %229 ], [ 0, %228 ]
%231 = phi i64 [ %246, %229 ], [ 0, %228 ]
%232 = getelementptr inbounds double, double* %219, i64 %230
%233 = bitcast double* %232 to <2 x double>*
%234 = load <2 x double>, <2 x double>* %233
%235 = fdiv <2 x double> %234, %164
%236 = getelementptr inbounds double, double* %221, i64 %230
%237 = bitcast double* %236 to <2 x double>*
store <2 x double> %235, <2 x double>* %237
%238 = or i64 %230, 2
%239 = getelementptr inbounds double, double* %219, i64 %238
%240 = bitcast double* %239 to <2 x double>*
%241 = load <2 x double>, <2 x double>* %240
%242 = fdiv <2 x double> %241, %164
%243 = getelementptr inbounds double, double* %221, i64 %238
%244 = bitcast double* %243 to <2 x double>*
store <2 x double> %242, <2 x double>* %244
%245 = add nuw i64 %230, 4
%246 = add nuw i64 %231, 2
%247 = icmp eq i64 %246, %167
br i1 %247, label %248, label %229
248: ; preds = %229, %228
%249 = phi i64 [ 0, %228 ], [ %245, %229 ]
br i1 %168, label %257, label %250
250: ; preds = %248
%251 = getelementptr inbounds double, double* %219, i64 %249
%252 = bitcast double* %251 to <2 x double>*
%253 = load <2 x double>, <2 x double>* %252
%254 = fdiv <2 x double> %253, %164
%255 = getelementptr inbounds double, double* %221, i64 %249
%256 = bitcast double* %255 to <2 x double>*
store <2 x double> %254, <2 x double>* %256
br label %257
257: ; preds = %248, %250
br i1 %169, label %286, label %258
258: ; preds = %222, %216, %257
%259 = phi i64 [ 0, %222 ], [ 0, %216 ], [ %162, %257 ]
%260 = xor i64 %259, -1
br i1 %171, label %267, label %261
261: ; preds = %258
%262 = getelementptr inbounds double, double* %219, i64 %259
%263 = load double, double* %262
%264 = fdiv double %263, %3
%265 = getelementptr inbounds double, double* %221, i64 %259
store double %264, double* %265
%266 = or i64 %259, 1
br label %267
267: ; preds = %261, %258
%268 = phi i64 [ %259, %258 ], [ %266, %261 ]
%269 = icmp eq i64 %260, %172
br i1 %269, label %286, label %273
270: ; preds = %286
br i1 %10, label %271, label %296
271: ; preds = %270
%272 = zext i32 %2 to i64
br label %289
273: ; preds = %267, %273
%274 = phi i64 [ %284, %273 ], [ %268, %267 ]
%275 = getelementptr inbounds double, double* %219, i64 %274
%276 = load double, double* %275
%277 = fdiv double %276, %3
%278 = getelementptr inbounds double, double* %221, i64 %274
store double %277, double* %278
%279 = add nuw nsw i64 %274, 1
%280 = getelementptr inbounds double, double* %219, i64 %279
%281 = load double, double* %280
%282 = fdiv double %281, %3
%283 = getelementptr inbounds double, double* %221, i64 %279
store double %282, double* %283
%284 = add nuw nsw i64 %274, 2
%285 = icmp eq i64 %284, %156
br i1 %285, label %286, label %273
286: ; preds = %267, %273, %257
%287 = add nuw nsw i64 %217, 1
%288 = icmp eq i64 %287, %156
br i1 %288, label %270, label %216
289: ; preds = %271, %289
%290 = phi i64 [ 0, %271 ], [ %294, %289 ]
%291 = getelementptr inbounds double*, double** %9, i64 %290
%292 = bitcast double** %291 to i8**
%293 = load i8*, i8** %292
tail call void @free(i8* %293)
%294 = add nuw nsw i64 %290, 1
%295 = icmp eq i64 %294, %272
br i1 %295, label %296, label %289
296: ; preds = %289, %141, %154, %270
tail call void @free(i8* %8)
ret i32 0
}