#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 */
scalar_t__ calloc(int, int);
double **create_matrix(int, int);
int /*<<< orphan*/ free(double *);
int /*<<< orphan*/ free_matrix(double **, int);
int /*<<< orphan*/ ktau(double *, double *, int *, double *, double *, double *,
                        int *, int *, int *);
void ktau_matrix(double *data, int *d, int *N, double *out) {
  double **x, S = 0.0, D = 0.0, *X, *Y;
  int k = 0, i, j, t, T = 0, U = 0, V = 0;
  x = create_matrix(*d, *N);
  X = (double *)calloc(*N, sizeof(double));
  Y = (double *)calloc(*N, sizeof(double));
  for (i = 0; i < *d; i++) {
    for (t = 0; t < *N; t++) {
      x[i][t] = data[k];
      k++;
    }
  }
  k = 0;
  for (i = 0; i < ((*d) - 1); i++) {
    for (j = (i + 1); j < (*d); j++) {
      for (t = 0; t < *N; t++) {
        X[t] = x[i][t];
        Y[t] = x[j][t];
      }
      ktau(X, Y, N, &out[k], &S, &D, &T, &U, &V);
      k++;
    }
  }
  free(X);
  free(Y);
  free_matrix(x, *d);
}


x86 assembly (clang, -O0):
<ktau_matrix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x30(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x38(%rbp)
movl   $0x0,-0x4c(%rbp)
movl   $0x0,-0x5c(%rbp)
movl   $0x0,-0x60(%rbp)
movl   $0x0,-0x64(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rax
mov    (%rax),%esi
call   1040 <create_matrix@plt>
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%edi
mov    $0x8,%esi
call   1060 <calloc@plt>
mov    %rax,-0x40(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%edi
mov    $0x8,%esi
call   1060 <calloc@plt>
mov    %rax,-0x48(%rbp)
movl   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%eax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%eax
jge    124c <ktau_matrix+0xfc>
movl   $0x0,-0x58(%rbp)
mov    -0x58(%rbp),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jge    1239 <ktau_matrix+0xe9>
mov    -0x8(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
movslq -0x50(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x58(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
mov    -0x58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x58(%rbp)
jmp    11f1 <ktau_matrix+0xa1>
jmp    123e <ktau_matrix+0xee>
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    11db <ktau_matrix+0x8b>
movl   $0x0,-0x4c(%rbp)
movl   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%eax
mov    -0x10(%rbp),%rcx
mov    (%rcx),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    135a <ktau_matrix+0x20a>
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
mov    -0x54(%rbp),%eax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%eax
jge    1347 <ktau_matrix+0x1f7>
movl   $0x0,-0x58(%rbp)
mov    -0x58(%rbp),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jge    12ee <ktau_matrix+0x19e>
mov    -0x28(%rbp),%rax
movslq -0x50(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x58(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x40(%rbp),%rax
movslq -0x58(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x28(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x58(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x48(%rbp),%rax
movslq -0x58(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x58(%rbp)
jmp    128d <ktau_matrix+0x13d>
mov    -0x40(%rbp),%rdi
mov    -0x48(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
movslq -0x4c(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rcx
lea    -0x30(%rbp),%r8
lea    -0x38(%rbp),%r9
lea    -0x5c(%rbp),%r11
lea    -0x60(%rbp),%r10
lea    -0x64(%rbp),%rax
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
call   1070 <ktau@plt>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    1277 <ktau_matrix+0x127>
jmp    134c <ktau_matrix+0x1fc>
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    125a <ktau_matrix+0x10a>
mov    -0x40(%rbp),%rdi
call   1030 <free@plt>
mov    -0x48(%rbp),%rdi
call   1030 <free@plt>
mov    -0x28(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
call   1050 <free_matrix@plt>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ktau_matrix>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x88,%rsp
mov    %rcx,%r15
mov    %rdx,%rbp
mov    %rsi,%r12
mov    %rdi,%r14
movq   $0x0,0x80(%rsp)
movq   $0x0,0x78(%rsp)
movl   $0x0,0x54(%rsp)
movl   $0x0,0x50(%rsp)
movl   $0x0,0x4c(%rsp)
mov    (%rsi),%edi
mov    (%rdx),%esi
call   1040 <create_matrix@plt>
mov    %rax,0x40(%rsp)
mov    0x0(%rbp),%edi
mov    $0x8,%esi
call   1060 <calloc@plt>
mov    %rax,%rbx
mov    %rbp,(%rsp)
mov    0x0(%rbp),%edi
mov    $0x8,%esi
call   1060 <calloc@plt>
mov    %rax,%rbp
mov    %r12,0x60(%rsp)
mov    (%r12),%eax
test   %eax,%eax
jle    1716 <ktau_matrix+0x5c6>
mov    %r15,0x18(%rsp)
movabs $0x7ffffffffffffffc,%rcx
ff ff 7f
mov    %rcx,0x58(%rsp)
mov    (%rsp),%rcx
mov    (%rcx),%r11d
lea    (%r14,%r11,8),%rcx
mov    %rcx,0x38(%rsp)
mov    %r11d,%ecx
and    $0xfffffffc,%ecx
mov    %rcx,0x28(%rsp)
add    $0xfffffffffffffffc,%rcx
mov    %rcx,0x20(%rsp)
shr    $0x2,%rcx
add    $0x1,%rcx
mov    %ecx,%r12d
and    $0x3,%r12d
and    $0xfffffffffffffffc,%rcx
mov    %rcx,0x70(%rsp)
mov    %r11d,%edi
and    $0x3,%edi
lea    0x70(%r14),%rcx
mov    %rcx,0x68(%rsp)
lea    0x10(%r14),%rcx
mov    %rcx,0x8(%rsp)
mov    %r12,0x10(%rsp)
shl    $0x5,%r12
lea    0x18(%r14),%rcx
mov    %rcx,0x30(%rsp)
xor    %r15d,%r15d
xor    %r8d,%r8d
mov    %rdi,%r13
jmp    127d <ktau_matrix+0x12d>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%r15
cmp    %rax,%r15
je     1427 <ktau_matrix+0x2d7>
test   %r11d,%r11d
jle    1270 <ktau_matrix+0x120>
mov    0x40(%rsp),%rcx
mov    (%rcx,%r15,8),%r9
movslq %r8d,%r8
cmp    $0x4,%r11d
jb     12b7 <ktau_matrix+0x167>
mov    0x38(%rsp),%rcx
lea    (%rcx,%r8,8),%rcx
cmp    %rcx,%r9
jae    1352 <ktau_matrix+0x202>
lea    (%r9,%r11,8),%rcx
lea    (%r14,%r8,8),%rdx
cmp    %rcx,%rdx
jae    1352 <ktau_matrix+0x202>
xor    %esi,%esi
mov    %rsi,%r10
not    %r10
add    %r11,%r10
test   %rdi,%rdi
je     12ea <ktau_matrix+0x19a>
mov    %rdi,%rcx
nopw   0x0(%rax,%rax,1)
movsd  (%r14,%r8,8),%xmm0
movsd  %xmm0,(%r9,%rsi,8)
add    $0x1,%r8
add    $0x1,%rsi
add    $0xffffffffffffffff,%rcx
jne    12d0 <ktau_matrix+0x180>
cmp    $0x3,%r10
jb     1270 <ktau_matrix+0x120>
mov    0x30(%rsp),%rcx
lea    (%rcx,%r8,8),%rcx
mov    %r11,%rdi
sub    %rsi,%rdi
lea    (%r9,%rsi,8),%rdx
add    $0x18,%rdx
xor    %esi,%esi
nopl   0x0(%rax)
movsd  -0x18(%rcx,%rsi,8),%xmm0
movsd  %xmm0,-0x18(%rdx,%rsi,8)
movsd  -0x10(%rcx,%rsi,8),%xmm0
movsd  %xmm0,-0x10(%rdx,%rsi,8)
movsd  -0x8(%rcx,%rsi,8),%xmm0
movsd  %xmm0,-0x8(%rdx,%rsi,8)
movsd  (%rcx,%rsi,8),%xmm0
movsd  %xmm0,(%rdx,%rsi,8)
add    $0x4,%rsi
cmp    %rsi,%rdi
jne    1310 <ktau_matrix+0x1c0>
add    %rsi,%r8
mov    %r13,%rdi
jmp    1270 <ktau_matrix+0x120>
cmpq   $0xc,0x20(%rsp)
jae    135e <ktau_matrix+0x20e>
xor    %esi,%esi
jmp    13d0 <ktau_matrix+0x280>
mov    0x68(%rsp),%rcx
lea    (%rcx,%r8,8),%rdi
mov    0x70(%rsp),%rcx
xor    %esi,%esi
xchg   %ax,%ax
movups -0x70(%rdi,%rsi,8),%xmm0
movups -0x60(%rdi,%rsi,8),%xmm1
movups %xmm0,(%r9,%rsi,8)
movups %xmm1,0x10(%r9,%rsi,8)
movups -0x50(%rdi,%rsi,8),%xmm0
movups -0x40(%rdi,%rsi,8),%xmm1
movups %xmm0,0x20(%r9,%rsi,8)
movups %xmm1,0x30(%r9,%rsi,8)
movups -0x30(%rdi,%rsi,8),%xmm0
movups -0x20(%rdi,%rsi,8),%xmm1
movups %xmm0,0x40(%r9,%rsi,8)
movups %xmm1,0x50(%r9,%rsi,8)
movups -0x10(%rdi,%rsi,8),%xmm0
movups (%rdi,%rsi,8),%xmm1
movups %xmm0,0x60(%r9,%rsi,8)
movups %xmm1,0x70(%r9,%rsi,8)
add    $0x10,%rsi
add    $0xfffffffffffffffc,%rcx
jne    1370 <ktau_matrix+0x220>
cmpq   $0x0,0x10(%rsp)
je     140b <ktau_matrix+0x2bb>
lea    (%r9,%rsi,8),%rcx
add    $0x10,%rcx
add    %r8,%rsi
mov    0x8(%rsp),%rdx
lea    (%rdx,%rsi,8),%rdx
xor    %esi,%esi
xchg   %ax,%ax
movups -0x10(%rdx,%rsi,1),%xmm0
movups (%rdx,%rsi,1),%xmm1
movups %xmm0,-0x10(%rcx,%rsi,1)
movups %xmm1,(%rcx,%rsi,1)
add    $0x20,%rsi
cmp    %rsi,%r12
jne    13f0 <ktau_matrix+0x2a0>
mov    0x28(%rsp),%rcx
add    %rcx,%r8
mov    %rcx,%rsi
cmp    %r11,%rcx
mov    %r13,%rdi
je     1270 <ktau_matrix+0x120>
jmp    12b9 <ktau_matrix+0x169>
cmp    $0x2,%eax
mov    0x18(%rsp),%r15
jl     1716 <ktau_matrix+0x5c6>
xor    %edx,%edx
mov    $0x1,%r12d
addq   $0x2,0x58(%rsp)
xor    %r14d,%r14d
jmp    146d <ktau_matrix+0x31d>
nopl   0x0(%rax,%rax,1)
mov    0x10(%rsp),%r12
mov    0x8(%rsp),%rdx
lea    -0x1(%rax),%ecx
movslq %ecx,%rcx
add    $0x1,%r12
cmp    %rcx,%rdx
jge    1716 <ktau_matrix+0x5c6>
mov    %rdx,%rsi
add    $0x1,%rdx
movslq %eax,%rcx
cmp    %rcx,%rdx
jge    145a <ktau_matrix+0x30a>
mov    %rsi,0x38(%rsp)
mov    %rdx,0x8(%rsp)
movslq %r14d,%r14
mov    %r12,0x10(%rsp)
mov    (%rsp),%r13
jmp    14f4 <ktau_matrix+0x3a4>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
lea    (%r15,%r14,8),%rcx
sub    $0x8,%rsp
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    %r13,%rdx
lea    0x88(%rsp),%r8
lea    0x80(%rsp),%r9
lea    0x54(%rsp),%rax
push   %rax
lea    0x60(%rsp),%rax
push   %rax
lea    0x6c(%rsp),%rax
push   %rax
call   1070 <ktau@plt>
add    $0x20,%rsp
add    $0x1,%r14
add    $0x1,%r12
mov    0x60(%rsp),%rax
mov    (%rax),%eax
cmp    %r12d,%eax
jle    1450 <ktau_matrix+0x300>
mov    0x0(%r13),%eax
test   %eax,%eax
jle    14a0 <ktau_matrix+0x350>
mov    0x40(%rsp),%rsi
mov    0x38(%rsp),%rcx
mov    (%rsi,%rcx,8),%rcx
mov    (%rsi,%r12,8),%r11
cmp    $0x4,%eax
jae    1590 <ktau_matrix+0x440>
xor    %r9d,%r9d
mov    %r9,%rsi
test   $0x1,%al
je     1541 <ktau_matrix+0x3f1>
movsd  (%rcx,%r9,8),%xmm0
movsd  %xmm0,(%rbx,%r9,8)
movsd  (%r11,%r9,8),%xmm0
movsd  %xmm0,0x0(%rbp,%r9,8)
mov    %r9,%rsi
or     $0x1,%rsi
not    %r9
add    %rax,%r9
je     14a0 <ktau_matrix+0x350>
nopl   (%rax)
movsd  (%rcx,%rsi,8),%xmm0
movsd  %xmm0,(%rbx,%rsi,8)
movsd  (%r11,%rsi,8),%xmm0
movsd  %xmm0,0x0(%rbp,%rsi,8)
movsd  0x8(%rcx,%rsi,8),%xmm0
movsd  %xmm0,0x8(%rbx,%rsi,8)
movsd  0x8(%r11,%rsi,8),%xmm0
movsd  %xmm0,0x8(%rbp,%rsi,8)
add    $0x2,%rsi
cmp    %rsi,%rax
jne    1550 <ktau_matrix+0x400>
jmp    14a0 <ktau_matrix+0x350>
nopl   (%rax)
lea    (%rbx,%rax,8),%rsi
lea    0x0(,%rax,8),%rdi
add    %rbp,%rdi
lea    (%rcx,%rax,8),%r9
lea    (%r11,%rax,8),%r13
cmp    %rdi,%rbx
setb   0x30(%rsp)
cmp    %rsi,%rbp
setb   %r15b
cmp    %r9,%rbx
setb   %r10b
cmp    %rsi,%rcx
setb   %dl
cmp    %r13,%rbx
setb   %r8b
cmp    %rsi,%r11
setb   0x28(%rsp)
cmp    %r9,%rbp
setb   %r9b
cmp    %rdi,%rcx
setb   0x20(%rsp)
cmp    %r13,%rbp
setb   %sil
cmp    %rdi,%r11
setb   %dil
test   %r15b,0x30(%rsp)
jne    1700 <ktau_matrix+0x5b0>
and    %dl,%r10b
mov    0x18(%rsp),%r15
jne    170a <ktau_matrix+0x5ba>
and    0x28(%rsp),%r8b
mov    (%rsp),%r13
jne    1517 <ktau_matrix+0x3c7>
and    0x20(%rsp),%r9b
jne    1517 <ktau_matrix+0x3c7>
mov    $0x0,%r9d
and    %dil,%sil
jne    151a <ktau_matrix+0x3ca>
mov    %eax,%r9d
and    $0xfffffffc,%r9d
lea    -0x4(%r9),%rsi
mov    %rsi,%r8
shr    $0x2,%r8
add    $0x1,%r8
test   %rsi,%rsi
je     16f6 <ktau_matrix+0x5a6>
mov    %r8,%rsi
and    0x58(%rsp),%rsi
xor    %edi,%edi
nopw   0x0(%rax,%rax,1)
movups (%rcx,%rdi,8),%xmm0
movups 0x10(%rcx,%rdi,8),%xmm1
movups %xmm0,(%rbx,%rdi,8)
movups %xmm1,0x10(%rbx,%rdi,8)
movups (%r11,%rdi,8),%xmm0
movups 0x10(%r11,%rdi,8),%xmm1
movups %xmm0,0x0(%rbp,%rdi,8)
movups %xmm1,0x10(%rbp,%rdi,8)
movups 0x20(%rcx,%rdi,8),%xmm0
movups 0x30(%rcx,%rdi,8),%xmm1
movups %xmm0,0x20(%rbx,%rdi,8)
movups %xmm1,0x30(%rbx,%rdi,8)
movups 0x20(%r11,%rdi,8),%xmm0
movups 0x30(%r11,%rdi,8),%xmm1
movups %xmm0,0x20(%rbp,%rdi,8)
movups %xmm1,0x30(%rbp,%rdi,8)
add    $0x8,%rdi
add    $0xfffffffffffffffe,%rsi
jne    1660 <ktau_matrix+0x510>
test   $0x1,%r8b
je     16e8 <ktau_matrix+0x598>
movups (%rcx,%rdi,8),%xmm0
movups 0x10(%rcx,%rdi,8),%xmm1
movups %xmm0,(%rbx,%rdi,8)
movups %xmm1,0x10(%rbx,%rdi,8)
movups (%r11,%rdi,8),%xmm0
movups 0x10(%r11,%rdi,8),%xmm1
movups %xmm0,0x0(%rbp,%rdi,8)
movups %xmm1,0x10(%rbp,%rdi,8)
cmp    %rax,%r9
je     14a0 <ktau_matrix+0x350>
jmp    151a <ktau_matrix+0x3ca>
xor    %edi,%edi
test   $0x1,%r8b
jne    16c1 <ktau_matrix+0x571>
jmp    16e8 <ktau_matrix+0x598>
xor    %r9d,%r9d
mov    0x18(%rsp),%r15
jmp    170d <ktau_matrix+0x5bd>
xor    %r9d,%r9d
mov    (%rsp),%r13
jmp    151a <ktau_matrix+0x3ca>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %rbp,%rdi
call   1030 <free@plt>
mov    0x60(%rsp),%rax
mov    (%rax),%esi
mov    0x40(%rsp),%rdi
call   1050 <free_matrix@plt>
add    $0x88,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @ktau_matrix(double* nocapture %0, i32* nocapture %1, i32* %2, double* %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = bitcast double* %5 to i8*
store double 0.000000e+00, double* %5
%11 = bitcast double* %6 to i8*
store double 0.000000e+00, double* %6
%12 = bitcast i32* %7 to i8*
store i32 0, i32* %7
%13 = bitcast i32* %8 to i8*
store i32 0, i32* %8
%14 = bitcast i32* %9 to i8*
store i32 0, i32* %9
%15 = load i32, i32* %1
%16 = load i32, i32* %2
%17 = tail call double** @create_matrix(i32 %15, i32 %16)
%18 = load i32, i32* %2
%19 = tail call i64 @calloc(i32 %18, i32 8)
%20 = inttoptr i64 %19 to double*
%21 = inttoptr i64 %19 to i8*
%22 = load i32, i32* %2
%23 = tail call i64 @calloc(i32 %22, i32 8)
%24 = inttoptr i64 %23 to double*
%25 = inttoptr i64 %23 to i8*
%26 = load i32, i32* %1
%27 = icmp sgt i32 %26, 0
br i1 %27, label %28, label %373
28: ; preds = %4
%29 = load i32, i32* %2
%30 = icmp sgt i32 %29, 0
%31 = zext i32 %26 to i64
%32 = zext i32 %29 to i64
%33 = getelementptr double, double* %0, i64 %32
%34 = and i64 %32, 4294967292
%35 = add nsw i64 %34, -4
%36 = lshr exact i64 %35, 2
%37 = add nuw nsw i64 %36, 1
%38 = icmp ult i32 %29, 4
%39 = and i64 %32, 4294967292
%40 = and i64 %37, 3
%41 = icmp ult i64 %35, 12
%42 = and i64 %37, 9223372036854775804
%43 = icmp eq i64 %40, 0
%44 = icmp eq i64 %39, %32
%45 = and i64 %32, 3
%46 = icmp eq i64 %45, 0
br label %47
47: ; preds = %28, %186
%48 = phi i64 [ 0, %28 ], [ %188, %186 ]
%49 = phi i32 [ 0, %28 ], [ %187, %186 ]
br i1 %30, label %50, label %186
50: ; preds = %47
%51 = getelementptr inbounds double*, double** %17, i64 %48
%52 = load double*, double** %51
%53 = sext i32 %49 to i64
br i1 %38, label %136, label %54
54: ; preds = %50
%55 = getelementptr double, double* %52, i64 %32
%56 = getelementptr double, double* %0, i64 %53
%57 = getelementptr double, double* %33, i64 %53
%58 = icmp ult double* %52, %57
%59 = icmp ult double* %56, %55
%60 = and i1 %58, %59
br i1 %60, label %136, label %61
61: ; preds = %54
%62 = add nsw i64 %39, %53
br i1 %41, label %116, label %63
63: ; preds = %61, %63
%64 = phi i64 [ %113, %63 ], [ 0, %61 ]
%65 = phi i64 [ %114, %63 ], [ 0, %61 ]
%66 = add i64 %64, %53
%67 = getelementptr inbounds double, double* %0, i64 %66
%68 = bitcast double* %67 to <2 x double>*
%69 = load <2 x double>, <2 x double>* %68
%70 = getelementptr inbounds double, double* %67, i64 2
%71 = bitcast double* %70 to <2 x double>*
%72 = load <2 x double>, <2 x double>* %71
%73 = getelementptr inbounds double, double* %52, i64 %64
%74 = bitcast double* %73 to <2 x double>*
store <2 x double> %69, <2 x double>* %74
%75 = getelementptr inbounds double, double* %73, i64 2
%76 = bitcast double* %75 to <2 x double>*
store <2 x double> %72, <2 x double>* %76
%77 = or i64 %64, 4
%78 = add i64 %77, %53
%79 = getelementptr inbounds double, double* %0, i64 %78
%80 = bitcast double* %79 to <2 x double>*
%81 = load <2 x double>, <2 x double>* %80
%82 = getelementptr inbounds double, double* %79, i64 2
%83 = bitcast double* %82 to <2 x double>*
%84 = load <2 x double>, <2 x double>* %83
%85 = getelementptr inbounds double, double* %52, i64 %77
%86 = bitcast double* %85 to <2 x double>*
store <2 x double> %81, <2 x double>* %86
%87 = getelementptr inbounds double, double* %85, i64 2
%88 = bitcast double* %87 to <2 x double>*
store <2 x double> %84, <2 x double>* %88
%89 = or i64 %64, 8
%90 = add i64 %89, %53
%91 = getelementptr inbounds double, double* %0, i64 %90
%92 = bitcast double* %91 to <2 x double>*
%93 = load <2 x double>, <2 x double>* %92
%94 = getelementptr inbounds double, double* %91, i64 2
%95 = bitcast double* %94 to <2 x double>*
%96 = load <2 x double>, <2 x double>* %95
%97 = getelementptr inbounds double, double* %52, i64 %89
%98 = bitcast double* %97 to <2 x double>*
store <2 x double> %93, <2 x double>* %98
%99 = getelementptr inbounds double, double* %97, i64 2
%100 = bitcast double* %99 to <2 x double>*
store <2 x double> %96, <2 x double>* %100
%101 = or i64 %64, 12
%102 = add i64 %101, %53
%103 = getelementptr inbounds double, double* %0, i64 %102
%104 = bitcast double* %103 to <2 x double>*
%105 = load <2 x double>, <2 x double>* %104
%106 = getelementptr inbounds double, double* %103, i64 2
%107 = bitcast double* %106 to <2 x double>*
%108 = load <2 x double>, <2 x double>* %107
%109 = getelementptr inbounds double, double* %52, i64 %101
%110 = bitcast double* %109 to <2 x double>*
store <2 x double> %105, <2 x double>* %110
%111 = getelementptr inbounds double, double* %109, i64 2
%112 = bitcast double* %111 to <2 x double>*
store <2 x double> %108, <2 x double>* %112
%113 = add nuw i64 %64, 16
%114 = add nuw i64 %65, 4
%115 = icmp eq i64 %114, %42
br i1 %115, label %116, label %63
116: ; preds = %63, %61
%117 = phi i64 [ 0, %61 ], [ %113, %63 ]
br i1 %43, label %135, label %118
118: ; preds = %116, %118
%119 = phi i64 [ %132, %118 ], [ %117, %116 ]
%120 = phi i64 [ %133, %118 ], [ 0, %116 ]
%121 = add i64 %119, %53
%122 = getelementptr inbounds double, double* %0, i64 %121
%123 = bitcast double* %122 to <2 x double>*
%124 = load <2 x double>, <2 x double>* %123
%125 = getelementptr inbounds double, double* %122, i64 2
%126 = bitcast double* %125 to <2 x double>*
%127 = load <2 x double>, <2 x double>* %126
%128 = getelementptr inbounds double, double* %52, i64 %119
%129 = bitcast double* %128 to <2 x double>*
store <2 x double> %124, <2 x double>* %129
%130 = getelementptr inbounds double, double* %128, i64 2
%131 = bitcast double* %130 to <2 x double>*
store <2 x double> %127, <2 x double>* %131
%132 = add nuw i64 %119, 4
%133 = add i64 %120, 1
%134 = icmp eq i64 %133, %40
br i1 %134, label %135, label %118
135: ; preds = %118, %116
br i1 %44, label %183, label %136
136: ; preds = %54, %50, %135
%137 = phi i64 [ %53, %54 ], [ %53, %50 ], [ %62, %135 ]
%138 = phi i64 [ 0, %54 ], [ 0, %50 ], [ %39, %135 ]
%139 = xor i64 %138, -1
%140 = add nsw i64 %139, %32
br i1 %46, label %152, label %141
141: ; preds = %136, %141
%142 = phi i64 [ %148, %141 ], [ %137, %136 ]
%143 = phi i64 [ %149, %141 ], [ %138, %136 ]
%144 = phi i64 [ %150, %141 ], [ 0, %136 ]
%145 = getelementptr inbounds double, double* %0, i64 %142
%146 = load double, double* %145
%147 = getelementptr inbounds double, double* %52, i64 %143
store double %146, double* %147
%148 = add nsw i64 %142, 1
%149 = add nuw nsw i64 %143, 1
%150 = add i64 %144, 1
%151 = icmp eq i64 %150, %45
br i1 %151, label %152, label %141
152: ; preds = %141, %136
%153 = phi i64 [ undef, %136 ], [ %148, %141 ]
%154 = phi i64 [ %137, %136 ], [ %148, %141 ]
%155 = phi i64 [ %138, %136 ], [ %149, %141 ]
%156 = icmp ult i64 %140, 3
br i1 %156, label %183, label %159
157: ; preds = %186
%158 = icmp sgt i32 %26, 1
br i1 %158, label %199, label %373
159: ; preds = %152, %159
%160 = phi i64 [ %180, %159 ], [ %154, %152 ]
%161 = phi i64 [ %181, %159 ], [ %155, %152 ]
%162 = getelementptr inbounds double, double* %0, i64 %160
%163 = load double, double* %162
%164 = getelementptr inbounds double, double* %52, i64 %161
store double %163, double* %164
%165 = add nsw i64 %160, 1
%166 = add nuw nsw i64 %161, 1
%167 = getelementptr inbounds double, double* %0, i64 %165
%168 = load double, double* %167
%169 = getelementptr inbounds double, double* %52, i64 %166
store double %168, double* %169
%170 = add nsw i64 %160, 2
%171 = add nuw nsw i64 %161, 2
%172 = getelementptr inbounds double, double* %0, i64 %170
%173 = load double, double* %172
%174 = getelementptr inbounds double, double* %52, i64 %171
store double %173, double* %174
%175 = add nsw i64 %160, 3
%176 = add nuw nsw i64 %161, 3
%177 = getelementptr inbounds double, double* %0, i64 %175
%178 = load double, double* %177
%179 = getelementptr inbounds double, double* %52, i64 %176
store double %178, double* %179
%180 = add nsw i64 %160, 4
%181 = add nuw nsw i64 %161, 4
%182 = icmp eq i64 %181, %32
br i1 %182, label %183, label %159
183: ; preds = %152, %159, %135
%184 = phi i64 [ %62, %135 ], [ %153, %152 ], [ %180, %159 ]
%185 = trunc i64 %184 to i32
br label %186
186: ; preds = %183, %47
%187 = phi i32 [ %49, %47 ], [ %185, %183 ]
%188 = add nuw nsw i64 %48, 1
%189 = icmp eq i64 %188, %31
br i1 %189, label %157, label %47
190: ; preds = %365
%191 = trunc i64 %368 to i32
br label %192
192: ; preds = %190, %199
%193 = phi i32 [ %200, %199 ], [ %370, %190 ]
%194 = phi i32 [ %203, %199 ], [ %191, %190 ]
%195 = add nsw i32 %193, -1
%196 = sext i32 %195 to i64
%197 = icmp slt i64 %204, %196
%198 = add nuw nsw i64 %202, 1
br i1 %197, label %199, label %373
199: ; preds = %157, %192
%200 = phi i32 [ %193, %192 ], [ %26, %157 ]
%201 = phi i64 [ %204, %192 ], [ 0, %157 ]
%202 = phi i64 [ %198, %192 ], [ 1, %157 ]
%203 = phi i32 [ %194, %192 ], [ 0, %157 ]
%204 = add nuw nsw i64 %201, 1
%205 = sext i32 %200 to i64
%206 = icmp slt i64 %204, %205
br i1 %206, label %207, label %192
207: ; preds = %199
%208 = getelementptr inbounds double*, double** %17, i64 %201
%209 = sext i32 %203 to i64
br label %210
210: ; preds = %207, %365
%211 = phi i64 [ %209, %207 ], [ %368, %365 ]
%212 = phi i64 [ %202, %207 ], [ %369, %365 ]
%213 = load i32, i32* %2
%214 = icmp sgt i32 %213, 0
br i1 %214, label %215, label %365
215: ; preds = %210
%216 = load double*, double** %208
%217 = getelementptr inbounds double*, double** %17, i64 %212
%218 = load double*, double** %217
%219 = zext i32 %213 to i64
%220 = icmp ult i32 %213, 4
br i1 %220, label %331, label %221
221: ; preds = %215
%222 = getelementptr double, double* %20, i64 %219
%223 = bitcast double* %222 to i8*
%224 = getelementptr double, double* %24, i64 %219
%225 = bitcast double* %224 to i8*
%226 = getelementptr double, double* %216, i64 %219
%227 = bitcast double* %226 to i8*
%228 = getelementptr double, double* %218, i64 %219
%229 = bitcast double* %228 to i8*
%230 = icmp ult i8* %21, %225
%231 = icmp ult i8* %25, %223
%232 = and i1 %230, %231
%233 = icmp ult i8* %21, %227
%234 = icmp ult double* %216, %222
%235 = and i1 %233, %234
%236 = or i1 %232, %235
%237 = icmp ult i8* %21, %229
%238 = icmp ult double* %218, %222
%239 = and i1 %237, %238
%240 = or i1 %236, %239
%241 = icmp ult i8* %25, %227
%242 = icmp ult double* %216, %224
%243 = and i1 %241, %242
%244 = or i1 %240, %243
%245 = icmp ult i8* %25, %229
%246 = icmp ult double* %218, %224
%247 = and i1 %245, %246
%248 = or i1 %244, %247
br i1 %248, label %331, label %249
249: ; preds = %221
%250 = and i64 %219, 4294967292
%251 = add nsw i64 %250, -4
%252 = lshr exact i64 %251, 2
%253 = add nuw nsw i64 %252, 1
%254 = and i64 %253, 1
%255 = icmp eq i64 %251, 0
br i1 %255, label %305, label %256
256: ; preds = %249
%257 = and i64 %253, 9223372036854775806
br label %258
258: ; preds = %258, %256
%259 = phi i64 [ 0, %256 ], [ %302, %258 ]
%260 = phi i64 [ 0, %256 ], [ %303, %258 ]
%261 = getelementptr inbounds double, double* %216, i64 %259
%262 = bitcast double* %261 to <2 x double>*
%263 = load <2 x double>, <2 x double>* %262
%264 = getelementptr inbounds double, double* %261, i64 2
%265 = bitcast double* %264 to <2 x double>*
%266 = load <2 x double>, <2 x double>* %265
%267 = getelementptr inbounds double, double* %20, i64 %259
%268 = bitcast double* %267 to <2 x double>*
store <2 x double> %263, <2 x double>* %268
%269 = getelementptr inbounds double, double* %267, i64 2
%270 = bitcast double* %269 to <2 x double>*
store <2 x double> %266, <2 x double>* %270
%271 = getelementptr inbounds double, double* %218, i64 %259
%272 = bitcast double* %271 to <2 x double>*
%273 = load <2 x double>, <2 x double>* %272
%274 = getelementptr inbounds double, double* %271, i64 2
%275 = bitcast double* %274 to <2 x double>*
%276 = load <2 x double>, <2 x double>* %275
%277 = getelementptr inbounds double, double* %24, i64 %259
%278 = bitcast double* %277 to <2 x double>*
store <2 x double> %273, <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 = or i64 %259, 4
%282 = getelementptr inbounds double, double* %216, i64 %281
%283 = bitcast double* %282 to <2 x double>*
%284 = load <2 x double>, <2 x double>* %283
%285 = getelementptr inbounds double, double* %282, i64 2
%286 = bitcast double* %285 to <2 x double>*
%287 = load <2 x double>, <2 x double>* %286
%288 = getelementptr inbounds double, double* %20, i64 %281
%289 = bitcast double* %288 to <2 x double>*
store <2 x double> %284, <2 x double>* %289
%290 = getelementptr inbounds double, double* %288, i64 2
%291 = bitcast double* %290 to <2 x double>*
store <2 x double> %287, <2 x double>* %291
%292 = getelementptr inbounds double, double* %218, i64 %281
%293 = bitcast double* %292 to <2 x double>*
%294 = load <2 x double>, <2 x double>* %293
%295 = getelementptr inbounds double, double* %292, i64 2
%296 = bitcast double* %295 to <2 x double>*
%297 = load <2 x double>, <2 x double>* %296
%298 = getelementptr inbounds double, double* %24, i64 %281
%299 = bitcast double* %298 to <2 x double>*
store <2 x double> %294, <2 x double>* %299
%300 = getelementptr inbounds double, double* %298, i64 2
%301 = bitcast double* %300 to <2 x double>*
store <2 x double> %297, <2 x double>* %301
%302 = add nuw i64 %259, 8
%303 = add i64 %260, 2
%304 = icmp eq i64 %303, %257
br i1 %304, label %305, label %258
305: ; preds = %258, %249
%306 = phi i64 [ 0, %249 ], [ %302, %258 ]
%307 = icmp eq i64 %254, 0
br i1 %307, label %329, label %308
308: ; preds = %305
%309 = getelementptr inbounds double, double* %216, i64 %306
%310 = bitcast double* %309 to <2 x double>*
%311 = load <2 x double>, <2 x double>* %310
%312 = getelementptr inbounds double, double* %309, i64 2
%313 = bitcast double* %312 to <2 x double>*
%314 = load <2 x double>, <2 x double>* %313
%315 = getelementptr inbounds double, double* %20, i64 %306
%316 = bitcast double* %315 to <2 x double>*
store <2 x double> %311, <2 x double>* %316
%317 = getelementptr inbounds double, double* %315, i64 2
%318 = bitcast double* %317 to <2 x double>*
store <2 x double> %314, <2 x double>* %318
%319 = getelementptr inbounds double, double* %218, i64 %306
%320 = bitcast double* %319 to <2 x double>*
%321 = load <2 x double>, <2 x double>* %320
%322 = getelementptr inbounds double, double* %319, i64 2
%323 = bitcast double* %322 to <2 x double>*
%324 = load <2 x double>, <2 x double>* %323
%325 = getelementptr inbounds double, double* %24, i64 %306
%326 = bitcast double* %325 to <2 x double>*
store <2 x double> %321, <2 x double>* %326
%327 = getelementptr inbounds double, double* %325, i64 2
%328 = bitcast double* %327 to <2 x double>*
store <2 x double> %324, <2 x double>* %328
br label %329
329: ; preds = %305, %308
%330 = icmp eq i64 %250, %219
br i1 %330, label %365, label %331
331: ; preds = %221, %215, %329
%332 = phi i64 [ 0, %221 ], [ 0, %215 ], [ %250, %329 ]
%333 = xor i64 %332, -1
%334 = and i64 %219, 1
%335 = icmp eq i64 %334, 0
br i1 %335, label %344, label %336
336: ; preds = %331
%337 = getelementptr inbounds double, double* %216, i64 %332
%338 = load double, double* %337
%339 = getelementptr inbounds double, double* %20, i64 %332
store double %338, double* %339
%340 = getelementptr inbounds double, double* %218, i64 %332
%341 = load double, double* %340
%342 = getelementptr inbounds double, double* %24, i64 %332
store double %341, double* %342
%343 = or i64 %332, 1
br label %344
344: ; preds = %336, %331
%345 = phi i64 [ %332, %331 ], [ %343, %336 ]
%346 = sub nsw i64 0, %219
%347 = icmp eq i64 %333, %346
br i1 %347, label %365, label %348
348: ; preds = %344, %348
%349 = phi i64 [ %363, %348 ], [ %345, %344 ]
%350 = getelementptr inbounds double, double* %216, i64 %349
%351 = load double, double* %350
%352 = getelementptr inbounds double, double* %20, i64 %349
store double %351, double* %352
%353 = getelementptr inbounds double, double* %218, i64 %349
%354 = load double, double* %353
%355 = getelementptr inbounds double, double* %24, i64 %349
store double %354, double* %355
%356 = add nuw nsw i64 %349, 1
%357 = getelementptr inbounds double, double* %216, i64 %356
%358 = load double, double* %357
%359 = getelementptr inbounds double, double* %20, i64 %356
store double %358, double* %359
%360 = getelementptr inbounds double, double* %218, i64 %356
%361 = load double, double* %360
%362 = getelementptr inbounds double, double* %24, i64 %356
store double %361, double* %362
%363 = add nuw nsw i64 %349, 2
%364 = icmp eq i64 %363, %219
br i1 %364, label %365, label %348
365: ; preds = %344, %348, %329, %210
%366 = getelementptr inbounds double, double* %3, i64 %211
%367 = call i32 @ktau(double* %20, double* %24, i32* %2, double* %366, double* %5, double* %6, i32* %7, i32* %8, i32* %9)
%368 = add nsw i64 %211, 1
%369 = add nuw nsw i64 %212, 1
%370 = load i32, i32* %1
%371 = trunc i64 %369 to i32
%372 = icmp sgt i32 %370, %371
br i1 %372, label %210, label %190
373: ; preds = %192, %4, %157
%374 = call i32 @free(double* %20)
%375 = call i32 @free(double* %24)
%376 = load i32, i32* %1
%377 = call i32 @free_matrix(double** %17, i32 %376)
ret void
}