void test_0() {
  const double one = 1.0;
  const double two = 2.0;
  const double ten = 10.0;
  const unsigned n_rows_a = 4;
  const unsigned n_cols_a = 3;
  const unsigned n_rows_b = 3;
  const unsigned n_cols_b = 2;
  const unsigned n_rows_x = 4;
  const unsigned n_cols_x = 3;
  double *a = malloc(n_rows_a * n_cols_a * sizeof(*a));
  double *b = malloc(n_rows_b * n_cols_b * sizeof(*b));
  double *c = malloc(n_rows_a * n_cols_b * sizeof(*c));
  double *d = malloc(n_rows_a * n_cols_b * sizeof(*d));
  double *e = malloc(n_rows_a * n_cols_a * sizeof(*e));
  double *f = malloc(n_rows_a * n_cols_a * sizeof(*f));
  double *g = malloc(n_rows_a * n_cols_a * sizeof(*g));
  double *h = malloc(n_rows_a * n_cols_a * sizeof(*h));
  double *i = malloc(n_rows_a * n_cols_a * sizeof(*i));
  double *x = malloc(n_rows_x * n_cols_x * sizeof(*x));
  double *y = malloc(n_rows_x * n_cols_x * sizeof(*y));
  if (!a || !b || !c || !d || !e || !f || !g || !x || !y) {
    printf("Couldn't allocate memory!\a\n");
    system("pause");
    exit(-1);
  }
  const int rand = 0;
  printf("\nRunning \"test_0\" with %s data...\n\n",
         rand ? "random" : "sequential");
  if (rand) {
    init_rand(a, n_rows_a, n_cols_a);
    init_rand(b, n_rows_b, n_cols_b);
  } else {
    init_seq(a, n_rows_a, n_cols_a);
    init_seq(b, n_rows_b, n_cols_b);
  }
  c = dot_faster(a, n_rows_a, n_cols_a, b, n_rows_b, n_cols_b, c);
  d = transpose(c, n_rows_a, n_cols_b, d);
  e = divide_arrays(&ten, 0, a, n_rows_a * n_cols_a, e);
  e = divide_arrays(a, n_rows_a * n_cols_a, &ten, 0, e);
  memset(e, -1, n_rows_a * n_cols_a * sizeof(*e));
  e = divide_arrays(&one, 0, &ten, 0, e);
  e = add_arrays(a, n_rows_a * n_cols_a, a, n_rows_a * n_cols_a, e);
  f = multiply_arrays(&two, 0, a, n_rows_a * n_cols_a, f);
  memcpy(g, a, n_rows_a * n_cols_a * sizeof(*a));
  add_update(g, n_rows_a * n_cols_a, &ten, 0);
  g = add_update(g, n_rows_a * n_cols_a, e, n_rows_a * n_cols_a);
  h = greater_than(&two, 0, &one, 0, h);
  h = greater_than(&one, 0, f, n_rows_a * n_cols_a, h);
  h = greater_than(f, n_rows_a * n_cols_a, &one, 0, h);
  init_rand(x, n_rows_x, n_cols_x);
  h = greater_than(f, n_rows_a * n_cols_a, x, n_rows_x * n_cols_x, h);
  i = equal(e, n_rows_a * n_cols_a, f, n_rows_a * n_cols_a, i);
  printf("Matrix A:\n");
  print(a, n_rows_a, n_cols_a);
  printf("Matrix B:\n");
  print(b, n_rows_b, n_cols_b);
  printf("Matrix C:\n");
  print(c, n_rows_a, n_cols_b);
  printf("Matrix D:\n");
  print(d, n_cols_b, n_rows_a);
  printf("Matrix E:\n");
  print(e, n_rows_a, n_cols_a);
  printf("Matrix F:\n");
  print(f, n_rows_a, n_cols_a);
  printf("Matrix G:\n");
  print(g, n_rows_a, n_cols_a);
  printf("Matrix X:\n");
  print(x, n_rows_x, n_cols_x);
  printf("Matrix H:\n");
  print(h, n_rows_a, n_cols_a);
  printf("Matrix I:\n");
  print(i, n_rows_a, n_cols_a);
  printf("\n");
  printf("Sum of A: %f\n", sum_array(a, n_rows_a * n_cols_a));
  printf("Mean of A:        %f\n", mean(a, n_rows_a * n_cols_a));
  printf("Mean of A by sum: %f\n",
         sum_array(a, n_rows_a * n_cols_a) / (n_rows_a * n_cols_a));
  init_seq(x, n_rows_x, n_cols_x);
  transpose(x, n_rows_x, n_cols_x, y);
  i = equal(x, n_rows_x * n_cols_x, &two, 0, i);
  printf("\n");
  printf("Matrix X:\n");
  print(x, n_rows_x, n_cols_x);
  printf("Matrix Y:\n");
  print(y, n_cols_x, n_rows_x);
  printf("Matrix I:\n");
  print(i, n_rows_a, n_cols_a);
  puts("");
  free(a);
  free(b);
  free(c);
  free(d);
  free(e);
  free(f);
  free(g);
  free(h);
  free(i);
  free(x);
  free(y);
}


x86 assembly (clang, -O0):
<test_0>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movsd  0xdad(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  0xd98(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xd83(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movl   $0x4,-0x1c(%rbp)
movl   $0x3,-0x20(%rbp)
movl   $0x3,-0x24(%rbp)
movl   $0x2,-0x28(%rbp)
movl   $0x4,-0x2c(%rbp)
movl   $0x3,-0x30(%rbp)
mov    $0x60,%edi
call   1100 <malloc@plt>
mov    %rax,-0x38(%rbp)
mov    $0x30,%edi
call   1100 <malloc@plt>
mov    %rax,-0x40(%rbp)
mov    $0x40,%edi
call   1100 <malloc@plt>
mov    %rax,-0x48(%rbp)
mov    $0x40,%edi
call   1100 <malloc@plt>
mov    %rax,-0x50(%rbp)
mov    $0x60,%edi
call   1100 <malloc@plt>
mov    %rax,-0x58(%rbp)
mov    $0x60,%edi
call   1100 <malloc@plt>
mov    %rax,-0x60(%rbp)
mov    $0x60,%edi
call   1100 <malloc@plt>
mov    %rax,-0x68(%rbp)
mov    $0x60,%edi
call   1100 <malloc@plt>
mov    %rax,-0x70(%rbp)
mov    $0x60,%edi
call   1100 <malloc@plt>
mov    %rax,-0x78(%rbp)
mov    $0x60,%edi
call   1100 <malloc@plt>
mov    %rax,-0x80(%rbp)
mov    $0x60,%edi
call   1100 <malloc@plt>
mov    %rax,-0x88(%rbp)
cmpq   $0x0,-0x38(%rbp)
je     13af <test_0+0x15f>
cmpq   $0x0,-0x40(%rbp)
je     13af <test_0+0x15f>
cmpq   $0x0,-0x48(%rbp)
je     13af <test_0+0x15f>
cmpq   $0x0,-0x50(%rbp)
je     13af <test_0+0x15f>
cmpq   $0x0,-0x58(%rbp)
je     13af <test_0+0x15f>
cmpq   $0x0,-0x60(%rbp)
je     13af <test_0+0x15f>
cmpq   $0x0,-0x68(%rbp)
je     13af <test_0+0x15f>
cmpq   $0x0,-0x80(%rbp)
je     13af <test_0+0x15f>
cmpq   $0x0,-0x88(%rbp)
jne    13d5 <test_0+0x185>
lea    0xc62(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
lea    0xc70(%rip),%rdi
mov    $0x0,%al
call   1090 <system@plt>
mov    $0xffffffff,%edi
call   1160 <exit@plt>
movl   $0x0,-0x8c(%rbp)
lea    0xc54(%rip),%rdi
lea    0xc71(%rip),%rsi
mov    $0x0,%al
call   10a0 <printf@plt>
mov    -0x38(%rbp),%rdi
mov    $0x4,%esi
mov    $0x3,%edx
mov    $0x0,%al
call   10c0 <init_seq@plt>
mov    -0x40(%rbp),%rdi
mov    $0x3,%esi
mov    $0x2,%edx
mov    $0x0,%al
call   10c0 <init_seq@plt>
mov    -0x38(%rbp),%rdi
mov    -0x40(%rbp),%rcx
mov    -0x48(%rbp),%rax
mov    $0x4,%esi
mov    $0x3,%r8d
mov    $0x2,%r9d
mov    %r8d,%edx
mov    %rax,(%rsp)
mov    $0x0,%al
call   1080 <dot_faster@plt>
cltq
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rdi
mov    -0x50(%rbp),%rcx
mov    $0x4,%esi
mov    $0x2,%edx
mov    $0x0,%al
call   10e0 <transpose@plt>
cltq
mov    %rax,-0x50(%rbp)
mov    -0x38(%rbp),%rdx
mov    -0x58(%rbp),%r8
lea    -0x18(%rbp),%rdi
xor    %esi,%esi
mov    $0xc,%ecx
mov    $0x0,%al
call   1120 <divide_arrays@plt>
cltq
mov    %rax,-0x58(%rbp)
mov    -0x38(%rbp),%rdi
mov    -0x58(%rbp),%r8
mov    $0xc,%esi
lea    -0x18(%rbp),%rdx
xor    %ecx,%ecx
mov    $0x0,%al
call   1120 <divide_arrays@plt>
cltq
mov    %rax,-0x58(%rbp)
mov    -0x58(%rbp),%rdi
mov    $0xff,%esi
mov    $0x60,%edx
call   10b0 <memset@plt>
mov    -0x58(%rbp),%r8
lea    -0x8(%rbp),%rdi
xor    %ecx,%ecx
lea    -0x18(%rbp),%rdx
mov    %ecx,%esi
mov    $0x0,%al
call   1120 <divide_arrays@plt>
cltq
mov    %rax,-0x58(%rbp)
mov    -0x38(%rbp),%rdi
mov    -0x38(%rbp),%rdx
mov    -0x58(%rbp),%r8
mov    $0xc,%ecx
mov    %ecx,%esi
mov    $0x0,%al
call   1170 <add_arrays@plt>
cltq
mov    %rax,-0x58(%rbp)
mov    -0x38(%rbp),%rdx
mov    -0x60(%rbp),%r8
lea    -0x10(%rbp),%rdi
xor    %esi,%esi
mov    $0xc,%ecx
mov    $0x0,%al
call   1030 <multiply_arrays@plt>
cltq
mov    %rax,-0x60(%rbp)
mov    -0x68(%rbp),%rdi
mov    -0x38(%rbp),%rsi
mov    $0x60,%edx
call   10f0 <memcpy@plt>
mov    -0x68(%rbp),%rdi
mov    $0xc,%esi
lea    -0x18(%rbp),%rdx
xor    %ecx,%ecx
mov    $0x0,%al
call   1110 <add_update@plt>
mov    -0x68(%rbp),%rdi
mov    -0x58(%rbp),%rdx
mov    $0xc,%ecx
mov    %ecx,%esi
mov    $0x0,%al
call   1110 <add_update@plt>
cltq
mov    %rax,-0x68(%rbp)
mov    -0x70(%rbp),%r8
lea    -0x10(%rbp),%rdi
xor    %ecx,%ecx
lea    -0x8(%rbp),%rdx
mov    %ecx,%esi
mov    $0x0,%al
call   1070 <greater_than@plt>
cltq
mov    %rax,-0x70(%rbp)
mov    -0x60(%rbp),%rdx
mov    -0x70(%rbp),%r8
lea    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0xc,%ecx
mov    $0x0,%al
call   1070 <greater_than@plt>
cltq
mov    %rax,-0x70(%rbp)
mov    -0x60(%rbp),%rdi
mov    -0x70(%rbp),%r8
mov    $0xc,%esi
lea    -0x8(%rbp),%rdx
xor    %ecx,%ecx
mov    $0x0,%al
call   1070 <greater_than@plt>
cltq
mov    %rax,-0x70(%rbp)
mov    -0x80(%rbp),%rdi
mov    $0x4,%esi
mov    $0x3,%edx
mov    $0x0,%al
call   1140 <init_rand@plt>
mov    -0x60(%rbp),%rdi
mov    -0x80(%rbp),%rdx
mov    -0x70(%rbp),%r8
mov    $0xc,%ecx
mov    %ecx,%esi
mov    $0x0,%al
call   1070 <greater_than@plt>
cltq
mov    %rax,-0x70(%rbp)
mov    -0x58(%rbp),%rdi
mov    -0x60(%rbp),%rdx
mov    -0x78(%rbp),%r8
mov    $0xc,%ecx
mov    %ecx,%esi
mov    $0x0,%al
call   1130 <equal@plt>
cltq
mov    %rax,-0x78(%rbp)
lea    0xa4e(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
mov    -0x38(%rbp),%rdi
mov    $0x4,%esi
mov    $0x3,%edx
mov    $0x0,%al
call   10d0 <print@plt>
lea    0xa36(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
mov    -0x40(%rbp),%rdi
mov    $0x3,%esi
mov    $0x2,%edx
mov    $0x0,%al
call   10d0 <print@plt>
lea    0xa1e(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
mov    -0x48(%rbp),%rdi
mov    $0x4,%esi
mov    $0x2,%edx
mov    $0x0,%al
call   10d0 <print@plt>
lea    0xa06(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
mov    -0x50(%rbp),%rdi
mov    $0x2,%esi
mov    $0x4,%edx
mov    $0x0,%al
call   10d0 <print@plt>
lea    0x9ee(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
mov    -0x58(%rbp),%rdi
mov    $0x4,%esi
mov    $0x3,%edx
mov    $0x0,%al
call   10d0 <print@plt>
lea    0x9d6(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
mov    -0x60(%rbp),%rdi
mov    $0x4,%esi
mov    $0x3,%edx
mov    $0x0,%al
call   10d0 <print@plt>
lea    0x9be(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
mov    -0x68(%rbp),%rdi
mov    $0x4,%esi
mov    $0x3,%edx
mov    $0x0,%al
call   10d0 <print@plt>
lea    0x9a6(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
mov    -0x80(%rbp),%rdi
mov    $0x4,%esi
mov    $0x3,%edx
mov    $0x0,%al
call   10d0 <print@plt>
lea    0x98e(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
mov    -0x70(%rbp),%rdi
mov    $0x4,%esi
mov    $0x3,%edx
mov    $0x0,%al
call   10d0 <print@plt>
lea    0x976(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
mov    -0x78(%rbp),%rdi
mov    $0x4,%esi
mov    $0x3,%edx
mov    $0x0,%al
call   10d0 <print@plt>
lea    0x8b9(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
mov    -0x38(%rbp),%rdi
mov    $0xc,%esi
mov    $0x0,%al
call   1050 <sum_array@plt>
mov    %eax,%esi
lea    0x93e(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
mov    -0x38(%rbp),%rdi
mov    $0xc,%esi
mov    $0x0,%al
call   1150 <mean@plt>
mov    %eax,%esi
lea    0x92c(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
mov    -0x38(%rbp),%rdi
mov    $0xc,%esi
mov    $0x0,%al
call   1050 <sum_array@plt>
mov    $0xc,%ecx
xor    %edx,%edx
div    %ecx
mov    %eax,%esi
lea    0x919(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
mov    -0x80(%rbp),%rdi
mov    $0x4,%esi
mov    $0x3,%edx
mov    $0x0,%al
call   10c0 <init_seq@plt>
mov    -0x80(%rbp),%rdi
mov    -0x88(%rbp),%rcx
mov    $0x4,%esi
mov    $0x3,%edx
mov    $0x0,%al
call   10e0 <transpose@plt>
mov    -0x80(%rbp),%rdi
mov    -0x78(%rbp),%r8
mov    $0xc,%esi
lea    -0x10(%rbp),%rdx
xor    %ecx,%ecx
mov    $0x0,%al
call   1130 <equal@plt>
cltq
mov    %rax,-0x78(%rbp)
lea    0x7f1(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
lea    0x867(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
mov    -0x80(%rbp),%rdi
mov    $0x4,%esi
mov    $0x3,%edx
mov    $0x0,%al
call   10d0 <print@plt>
lea    0x89f(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
mov    -0x88(%rbp),%rdi
mov    $0x3,%esi
mov    $0x4,%edx
mov    $0x0,%al
call   10d0 <print@plt>
lea    0x834(%rip),%rdi
mov    $0x0,%al
call   10a0 <printf@plt>
mov    -0x78(%rbp),%rdi
mov    $0x4,%esi
mov    $0x3,%edx
mov    $0x0,%al
call   10d0 <print@plt>
lea    0x778(%rip),%rdi
mov    $0x0,%al
call   1060 <puts@plt>
mov    -0x38(%rbp),%rdi
call   1040 <free@plt>
mov    -0x40(%rbp),%rdi
call   1040 <free@plt>
mov    -0x48(%rbp),%rdi
call   1040 <free@plt>
mov    -0x50(%rbp),%rdi
call   1040 <free@plt>
mov    -0x58(%rbp),%rdi
call   1040 <free@plt>
mov    -0x60(%rbp),%rdi
call   1040 <free@plt>
mov    -0x68(%rbp),%rdi
call   1040 <free@plt>
mov    -0x70(%rbp),%rdi
call   1040 <free@plt>
mov    -0x78(%rbp),%rdi
call   1040 <free@plt>
mov    -0x80(%rbp),%rdi
call   1040 <free@plt>
mov    -0x88(%rbp),%rdi
call   1040 <free@plt>
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_0>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
movabs $0x3ff0000000000000,%rax
mov    %rax,0x40(%rsp)
movabs $0x4000000000000000,%rax
mov    %rax,0x38(%rsp)
movabs $0x4024000000000000,%rax
mov    %rax,0x60(%rsp)
mov    $0x60,%edi
call   10f0 <malloc@plt>
mov    %rax,%rbx
mov    $0x30,%edi
call   10f0 <malloc@plt>
mov    %rax,%rbp
mov    $0x40,%edi
call   10f0 <malloc@plt>
mov    %rax,%r12
mov    $0x40,%edi
call   10f0 <malloc@plt>
mov    %rax,%r15
mov    $0x60,%edi
call   10f0 <malloc@plt>
mov    %rax,%r14
mov    $0x60,%edi
call   10f0 <malloc@plt>
mov    %rax,0x8(%rsp)
mov    $0x60,%edi
call   10f0 <malloc@plt>
mov    %rax,%r13
mov    $0x60,%edi
call   10f0 <malloc@plt>
mov    %rax,0x58(%rsp)
mov    $0x60,%edi
call   10f0 <malloc@plt>
mov    %rax,0x10(%rsp)
mov    $0x60,%edi
call   10f0 <malloc@plt>
mov    %rax,0x30(%rsp)
mov    $0x60,%edi
call   10f0 <malloc@plt>
test   %rbx,%rbx
je     18ae <test_0+0x66e>
test   %rbp,%rbp
je     18ae <test_0+0x66e>
test   %r12,%r12
je     18ae <test_0+0x66e>
test   %r15,%r15
je     18ae <test_0+0x66e>
test   %r14,%r14
je     18ae <test_0+0x66e>
cmpq   $0x0,0x8(%rsp)
je     18ae <test_0+0x66e>
test   %r13,%r13
je     18ae <test_0+0x66e>
cmpq   $0x0,0x30(%rsp)
je     18ae <test_0+0x66e>
test   %rax,%rax
je     18ae <test_0+0x66e>
mov    %rax,0x50(%rsp)
lea    0xc94(%rip),%rdi
lea    0xcb1(%rip),%rsi
xor    %eax,%eax
call   10b0 <printf@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
mov    $0x3,%edx
xor    %eax,%eax
call   10c0 <init_seq@plt>
mov    %rbp,%rdi
mov    $0x3,%esi
mov    $0x2,%edx
xor    %eax,%eax
call   10c0 <init_seq@plt>
mov    %r12,(%rsp)
mov    %rbx,%rdi
mov    $0x4,%esi
mov    $0x3,%edx
mov    %rbp,%rcx
mov    $0x3,%r8d
mov    $0x2,%r9d
xor    %eax,%eax
call   1090 <dot_faster@plt>
movslq %eax,%rdi
mov    %rdi,0x28(%rsp)
mov    $0x4,%esi
mov    $0x2,%edx
mov    %r15,%rcx
xor    %eax,%eax
call   10e0 <transpose@plt>
cltq
mov    %rax,0x20(%rsp)
mov    %rbp,0x18(%rsp)
lea    0x60(%rsp),%r15
mov    %r15,%rdi
xor    %esi,%esi
mov    %rbx,%rdx
mov    $0xc,%ecx
mov    %r14,%r8
xor    %eax,%eax
call   1110 <divide_arrays@plt>
movslq %eax,%r8
mov    %rbx,%rdi
mov    $0xc,%esi
mov    %r15,%rdx
xor    %ecx,%ecx
xor    %eax,%eax
call   1110 <divide_arrays@plt>
movslq %eax,%r8
pcmpeqd %xmm0,%xmm0
movdqu %xmm0,(%r8)
movdqu %xmm0,0x10(%r8)
movdqu %xmm0,0x20(%r8)
movdqu %xmm0,0x30(%r8)
movdqu %xmm0,0x40(%r8)
movdqu %xmm0,0x50(%r8)
lea    0x40(%rsp),%rdi
xor    %esi,%esi
mov    %r15,%rdx
xor    %ecx,%ecx
xor    %eax,%eax
call   1110 <divide_arrays@plt>
movslq %eax,%r8
mov    %rbx,%rdi
mov    $0xc,%esi
mov    %rbx,%rdx
mov    $0xc,%ecx
xor    %eax,%eax
call   1160 <add_arrays@plt>
movslq %eax,%r12
lea    0x38(%rsp),%rbp
mov    %rbp,%rdi
xor    %esi,%esi
mov    %rbx,%rdx
mov    $0xc,%ecx
mov    0x8(%rsp),%r8
xor    %eax,%eax
call   1030 <multiply_arrays@plt>
movslq %eax,%r14
movups (%rbx),%xmm0
movups 0x10(%rbx),%xmm1
movups 0x20(%rbx),%xmm2
movups 0x30(%rbx),%xmm3
movups %xmm0,0x0(%r13)
movups %xmm1,0x10(%r13)
movups %xmm2,0x20(%r13)
movups %xmm3,0x30(%r13)
movups 0x40(%rbx),%xmm0
movups %xmm0,0x40(%r13)
movups 0x50(%rbx),%xmm0
movups %xmm0,0x50(%r13)
mov    %r13,%rdi
mov    $0xc,%esi
mov    %r15,%rdx
xor    %ecx,%ecx
xor    %eax,%eax
call   1100 <add_update@plt>
mov    %r13,%rdi
mov    $0xc,%esi
mov    %r12,%rdx
mov    $0xc,%ecx
xor    %eax,%eax
call   1100 <add_update@plt>
movslq %eax,%r13
mov    %r13,0x8(%rsp)
mov    %rbp,%rdi
xor    %esi,%esi
lea    0x40(%rsp),%rbp
mov    %rbp,%rdx
xor    %ecx,%ecx
mov    0x58(%rsp),%r8
xor    %eax,%eax
call   1080 <greater_than@plt>
movslq %eax,%r8
mov    %rbp,%rdi
xor    %esi,%esi
mov    %r14,%rdx
mov    $0xc,%ecx
xor    %eax,%eax
call   1080 <greater_than@plt>
movslq %eax,%r8
mov    %r14,%rdi
mov    $0xc,%esi
mov    %rbp,%rdx
xor    %ecx,%ecx
xor    %eax,%eax
call   1080 <greater_than@plt>
movslq %eax,%rbp
mov    0x30(%rsp),%r15
mov    %r15,%rdi
mov    $0x4,%esi
mov    $0x3,%edx
xor    %eax,%eax
call   1130 <init_rand@plt>
mov    %r14,%rdi
mov    $0xc,%esi
mov    %r15,%rdx
mov    $0xc,%ecx
mov    %rbp,%r8
xor    %eax,%eax
call   1080 <greater_than@plt>
movslq %eax,%rbp
mov    %r12,0x48(%rsp)
mov    %r12,%rdi
mov    $0xc,%esi
mov    %r14,%rdx
mov    $0xc,%ecx
mov    0x10(%rsp),%r8
xor    %eax,%eax
call   1120 <equal@plt>
cltq
mov    %rax,0x10(%rsp)
lea    0xacc(%rip),%rdi
call   1070 <puts@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
mov    $0x3,%edx
xor    %eax,%eax
call   10d0 <print@plt>
lea    0xab6(%rip),%rdi
call   1070 <puts@plt>
mov    0x18(%rsp),%rdi
mov    $0x3,%esi
mov    $0x2,%edx
xor    %eax,%eax
call   10d0 <print@plt>
lea    0xa9e(%rip),%rdi
call   1070 <puts@plt>
mov    0x28(%rsp),%rdi
mov    $0x4,%esi
mov    $0x2,%edx
xor    %eax,%eax
call   10d0 <print@plt>
lea    0xa86(%rip),%rdi
call   1070 <puts@plt>
mov    0x20(%rsp),%rdi
mov    $0x2,%esi
mov    $0x4,%edx
xor    %eax,%eax
call   10d0 <print@plt>
lea    0xa6e(%rip),%rdi
call   1070 <puts@plt>
mov    %r12,%rdi
mov    $0x4,%esi
mov    $0x3,%edx
xor    %eax,%eax
call   10d0 <print@plt>
lea    0xa58(%rip),%rdi
call   1070 <puts@plt>
mov    %r14,%rdi
mov    $0x4,%esi
mov    $0x3,%edx
xor    %eax,%eax
call   10d0 <print@plt>
lea    0xa42(%rip),%rdi
call   1070 <puts@plt>
mov    %r13,%rdi
mov    $0x4,%esi
mov    $0x3,%edx
xor    %eax,%eax
call   10d0 <print@plt>
lea    0xa36(%rip),%rdi
call   1070 <puts@plt>
mov    %r15,%rdi
mov    $0x4,%esi
mov    $0x3,%edx
xor    %eax,%eax
call   10d0 <print@plt>
lea    0xa0c(%rip),%rdi
call   1070 <puts@plt>
mov    %rbp,%rdi
mov    %rbp,%r12
mov    $0x4,%esi
mov    $0x3,%edx
xor    %eax,%eax
call   10d0 <print@plt>
lea    0xa07(%rip),%rdi
call   1070 <puts@plt>
mov    0x10(%rsp),%rbp
mov    %rbp,%rdi
mov    $0x4,%esi
mov    $0x3,%edx
xor    %eax,%eax
call   10d0 <print@plt>
mov    $0xa,%edi
call   1050 <putchar@plt>
mov    %rbx,%rdi
mov    $0xc,%esi
xor    %eax,%eax
call   1060 <sum_array@plt>
lea    0x910(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   10b0 <printf@plt>
mov    %rbx,%rdi
mov    $0xc,%esi
xor    %eax,%eax
call   1140 <mean@plt>
lea    0x8ff(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   10b0 <printf@plt>
mov    %rbx,%rdi
mov    $0xc,%esi
xor    %eax,%eax
call   1060 <sum_array@plt>
mov    %eax,%eax
mov    $0xaaaaaaab,%esi
imul   %rax,%rsi
shr    $0x23,%rsi
lea    0x8e7(%rip),%rdi
xor    %eax,%eax
call   10b0 <printf@plt>
mov    %r15,%rdi
mov    $0x4,%esi
mov    $0x3,%edx
xor    %eax,%eax
call   10c0 <init_seq@plt>
mov    %r15,%rdi
mov    $0x4,%esi
mov    $0x3,%edx
mov    0x50(%rsp),%r13
mov    %r13,%rcx
xor    %eax,%eax
call   10e0 <transpose@plt>
mov    %r15,%rdi
mov    $0xc,%esi
lea    0x38(%rsp),%rdx
xor    %ecx,%ecx
mov    %rbp,%r8
xor    %eax,%eax
call   1120 <equal@plt>
movslq %eax,%rbp
mov    $0xa,%edi
call   1050 <putchar@plt>
lea    0x904(%rip),%rdi
call   1070 <puts@plt>
mov    %r15,%rdi
mov    $0x4,%esi
mov    $0x3,%edx
xor    %eax,%eax
call   10d0 <print@plt>
lea    0x8ee(%rip),%rdi
call   1070 <puts@plt>
mov    %r13,%rdi
mov    $0x3,%esi
mov    $0x4,%edx
xor    %eax,%eax
call   10d0 <print@plt>
lea    0x8d8(%rip),%rdi
call   1070 <puts@plt>
mov    %rbp,%rdi
mov    $0x4,%esi
mov    $0x3,%edx
xor    %eax,%eax
call   10d0 <print@plt>
lea    0x853(%rip),%rdi
xor    %eax,%eax
call   1070 <puts@plt>
mov    %rbx,%rdi
call   1040 <free@plt>
mov    0x18(%rsp),%rdi
call   1040 <free@plt>
mov    0x28(%rsp),%rdi
call   1040 <free@plt>
mov    0x20(%rsp),%rdi
call   1040 <free@plt>
mov    0x48(%rsp),%rdi
call   1040 <free@plt>
mov    %r14,%rdi
call   1040 <free@plt>
mov    0x8(%rsp),%rdi
call   1040 <free@plt>
mov    %r12,%rdi
call   1040 <free@plt>
mov    %rbp,%rdi
call   1040 <free@plt>
mov    %r15,%rdi
call   1040 <free@plt>
mov    %r13,%rdi
call   1040 <free@plt>
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0x7ba(%rip),%rdi
call   1070 <puts@plt>
lea    0x73f(%rip),%rdi
xor    %eax,%eax
call   10a0 <system@plt>
mov    $0xffffffff,%edi
call   1150 <exit@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"Couldn't allocate memory!\07\0A\00"
@.str.1 = [6 x i8] c"pause\00"
@.str.2 = [36 x i8] c"\0ARunning \22test_0\22 with %s data...\0A\0A\00"
@.str.3 = [11 x i8] c"sequential\00"
@.str.4 = [11 x i8] c"Matrix A:\0A\00"
@.str.5 = [11 x i8] c"Matrix B:\0A\00"
@.str.6 = [11 x i8] c"Matrix C:\0A\00"
@.str.7 = [11 x i8] c"Matrix D:\0A\00"
@.str.8 = [11 x i8] c"Matrix E:\0A\00"
@.str.9 = [11 x i8] c"Matrix F:\0A\00"
@.str.10 = [11 x i8] c"Matrix G:\0A\00"
@.str.11 = [11 x i8] c"Matrix X:\0A\00"
@.str.12 = [11 x i8] c"Matrix H:\0A\00"
@.str.13 = [11 x i8] c"Matrix I:\0A\00"
@.str.14 = [2 x i8] c"\0A\00"
@.str.15 = [14 x i8] c"Sum of A: %f\0A\00"
@.str.16 = [22 x i8] c"Mean of A: %f\0A\00"
@.str.17 = [22 x i8] c"Mean of A by sum: %f\0A\00"
@.str.18 = [11 x i8] c"Matrix Y:\0A\00"
@.str.19 = [1 x i8] zeroinitializer
define void @test_0() {
%1 = alloca double
%2 = alloca double
%3 = alloca double
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca double*
%11 = alloca double*
%12 = alloca double*
%13 = alloca double*
%14 = alloca double*
%15 = alloca double*
%16 = alloca double*
%17 = alloca double*
%18 = alloca double*
%19 = alloca double*
%20 = alloca double*
%21 = alloca i32
store double 1.000000e+00, double* %1
store double 2.000000e+00, double* %2
store double 1.000000e+01, double* %3
store i32 4, i32* %4
store i32 3, i32* %5
store i32 3, i32* %6
store i32 2, i32* %7
store i32 4, i32* %8
store i32 3, i32* %9
%22 = call i8* @malloc(i64 96)
%23 = bitcast i8* %22 to double*
store double* %23, double** %10
%24 = call i8* @malloc(i64 48)
%25 = bitcast i8* %24 to double*
store double* %25, double** %11
%26 = call i8* @malloc(i64 64)
%27 = bitcast i8* %26 to double*
store double* %27, double** %12
%28 = call i8* @malloc(i64 64)
%29 = bitcast i8* %28 to double*
store double* %29, double** %13
%30 = call i8* @malloc(i64 96)
%31 = bitcast i8* %30 to double*
store double* %31, double** %14
%32 = call i8* @malloc(i64 96)
%33 = bitcast i8* %32 to double*
store double* %33, double** %15
%34 = call i8* @malloc(i64 96)
%35 = bitcast i8* %34 to double*
store double* %35, double** %16
%36 = call i8* @malloc(i64 96)
%37 = bitcast i8* %36 to double*
store double* %37, double** %17
%38 = call i8* @malloc(i64 96)
%39 = bitcast i8* %38 to double*
store double* %39, double** %18
%40 = call i8* @malloc(i64 96)
%41 = bitcast i8* %40 to double*
store double* %41, double** %19
%42 = call i8* @malloc(i64 96)
%43 = bitcast i8* %42 to double*
store double* %43, double** %20
%44 = load double*, double** %10
%45 = icmp ne double* %44, null
br i1 %45, label %46, label %70
46: ; preds = %0
%47 = load double*, double** %11
%48 = icmp ne double* %47, null
br i1 %48, label %49, label %70
49: ; preds = %46
%50 = load double*, double** %12
%51 = icmp ne double* %50, null
br i1 %51, label %52, label %70
52: ; preds = %49
%53 = load double*, double** %13
%54 = icmp ne double* %53, null
br i1 %54, label %55, label %70
55: ; preds = %52
%56 = load double*, double** %14
%57 = icmp ne double* %56, null
br i1 %57, label %58, label %70
58: ; preds = %55
%59 = load double*, double** %15
%60 = icmp ne double* %59, null
br i1 %60, label %61, label %70
61: ; preds = %58
%62 = load double*, double** %16
%63 = icmp ne double* %62, null
br i1 %63, label %64, label %70
64: ; preds = %61
%65 = load double*, double** %19
%66 = icmp ne double* %65, null
br i1 %66, label %67, label %70
67: ; preds = %64
%68 = load double*, double** %20
%69 = icmp ne double* %68, null
br i1 %69, label %73, label %70
70: ; preds = %67, %64, %61, %58, %55, %52, %49, %46, %0
%71 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%72 = call i32 (i8*, ...) bitcast (i32 (...)* @system to i32 (i8*, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
unreachable
73: ; preds = %67
store i32 0, i32* %21
%74 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0))
%75 = load double*, double** %10
%76 = call i32 (double*, i32, i32, ...) bitcast (i32 (...)* @init_seq to i32 (double*, i32, i32, ...)*)(double* %75, i32 4, i32 3)
%77 = load double*, double** %11
%78 = call i32 (double*, i32, i32, ...) bitcast (i32 (...)* @init_seq to i32 (double*, i32, i32, ...)*)(double* %77, i32 3, i32 2)
%79 = load double*, double** %10
%80 = load double*, double** %11
%81 = load double*, double** %12
%82 = call i32 (double*, i32, i32, double*, i32, i32, double*, ...) bitcast (i32 (...)* @dot_faster to i32 (double*, i32, i32, double*, i32, i32, double*, ...)*)(double* %79, i32 4, i32 3, double* %80, i32 3, i32 2, double* %81)
%83 = sext i32 %82 to i64
%84 = inttoptr i64 %83 to double*
store double* %84, double** %12
%85 = load double*, double** %12
%86 = load double*, double** %13
%87 = call i32 (double*, i32, i32, double*, ...) bitcast (i32 (...)* @transpose to i32 (double*, i32, i32, double*, ...)*)(double* %85, i32 4, i32 2, double* %86)
%88 = sext i32 %87 to i64
%89 = inttoptr i64 %88 to double*
store double* %89, double** %13
%90 = load double*, double** %10
%91 = load double*, double** %14
%92 = call i32 (double*, i32, double*, i32, double*, ...) bitcast (i32 (...)* @divide_arrays to i32 (double*, i32, double*, i32, double*, ...)*)(double* %3, i32 0, double* %90, i32 12, double* %91)
%93 = sext i32 %92 to i64
%94 = inttoptr i64 %93 to double*
store double* %94, double** %14
%95 = load double*, double** %10
%96 = load double*, double** %14
%97 = call i32 (double*, i32, double*, i32, double*, ...) bitcast (i32 (...)* @divide_arrays to i32 (double*, i32, double*, i32, double*, ...)*)(double* %95, i32 12, double* %3, i32 0, double* %96)
%98 = sext i32 %97 to i64
%99 = inttoptr i64 %98 to double*
store double* %99, double** %14
%100 = load double*, double** %14
%101 = bitcast double* %100 to i8*
%102 = load double*, double** %14
%103 = call i32 (double*, i32, double*, i32, double*, ...) bitcast (i32 (...)* @divide_arrays to i32 (double*, i32, double*, i32, double*, ...)*)(double* %1, i32 0, double* %3, i32 0, double* %102)
%104 = sext i32 %103 to i64
%105 = inttoptr i64 %104 to double*
store double* %105, double** %14
%106 = load double*, double** %10
%107 = load double*, double** %10
%108 = load double*, double** %14
%109 = call i32 (double*, i32, double*, i32, double*, ...) bitcast (i32 (...)* @add_arrays to i32 (double*, i32, double*, i32, double*, ...)*)(double* %106, i32 12, double* %107, i32 12, double* %108)
%110 = sext i32 %109 to i64
%111 = inttoptr i64 %110 to double*
store double* %111, double** %14
%112 = load double*, double** %10
%113 = load double*, double** %15
%114 = call i32 (double*, i32, double*, i32, double*, ...) bitcast (i32 (...)* @multiply_arrays to i32 (double*, i32, double*, i32, double*, ...)*)(double* %2, i32 0, double* %112, i32 12, double* %113)
%115 = sext i32 %114 to i64
%116 = inttoptr i64 %115 to double*
store double* %116, double** %15
%117 = load double*, double** %16
%118 = bitcast double* %117 to i8*
%119 = load double*, double** %10
%120 = bitcast double* %119 to i8*
%121 = load double*, double** %16
%122 = call i32 (double*, i32, double*, i32, ...) bitcast (i32 (...)* @add_update to i32 (double*, i32, double*, i32, ...)*)(double* %121, i32 12, double* %3, i32 0)
%123 = load double*, double** %16
%124 = load double*, double** %14
%125 = call i32 (double*, i32, double*, i32, ...) bitcast (i32 (...)* @add_update to i32 (double*, i32, double*, i32, ...)*)(double* %123, i32 12, double* %124, i32 12)
%126 = sext i32 %125 to i64
%127 = inttoptr i64 %126 to double*
store double* %127, double** %16
%128 = load double*, double** %17
%129 = call i32 (double*, i32, double*, i32, double*, ...) bitcast (i32 (...)* @greater_than to i32 (double*, i32, double*, i32, double*, ...)*)(double* %2, i32 0, double* %1, i32 0, double* %128)
%130 = sext i32 %129 to i64
%131 = inttoptr i64 %130 to double*
store double* %131, double** %17
%132 = load double*, double** %15
%133 = load double*, double** %17
%134 = call i32 (double*, i32, double*, i32, double*, ...) bitcast (i32 (...)* @greater_than to i32 (double*, i32, double*, i32, double*, ...)*)(double* %1, i32 0, double* %132, i32 12, double* %133)
%135 = sext i32 %134 to i64
%136 = inttoptr i64 %135 to double*
store double* %136, double** %17
%137 = load double*, double** %15
%138 = load double*, double** %17
%139 = call i32 (double*, i32, double*, i32, double*, ...) bitcast (i32 (...)* @greater_than to i32 (double*, i32, double*, i32, double*, ...)*)(double* %137, i32 12, double* %1, i32 0, double* %138)
%140 = sext i32 %139 to i64
%141 = inttoptr i64 %140 to double*
store double* %141, double** %17
%142 = load double*, double** %19
%143 = call i32 (double*, i32, i32, ...) bitcast (i32 (...)* @init_rand to i32 (double*, i32, i32, ...)*)(double* %142, i32 4, i32 3)
%144 = load double*, double** %15
%145 = load double*, double** %19
%146 = load double*, double** %17
%147 = call i32 (double*, i32, double*, i32, double*, ...) bitcast (i32 (...)* @greater_than to i32 (double*, i32, double*, i32, double*, ...)*)(double* %144, i32 12, double* %145, i32 12, double* %146)
%148 = sext i32 %147 to i64
%149 = inttoptr i64 %148 to double*
store double* %149, double** %17
%150 = load double*, double** %14
%151 = load double*, double** %15
%152 = load double*, double** %18
%153 = call i32 (double*, i32, double*, i32, double*, ...) bitcast (i32 (...)* @equal to i32 (double*, i32, double*, i32, double*, ...)*)(double* %150, i32 12, double* %151, i32 12, double* %152)
%154 = sext i32 %153 to i64
%155 = inttoptr i64 %154 to double*
store double* %155, double** %18
%156 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0))
%157 = load double*, double** %10
%158 = call i32 (double*, i32, i32, ...) bitcast (i32 (...)* @print to i32 (double*, i32, i32, ...)*)(double* %157, i32 4, i32 3)
%159 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0))
%160 = load double*, double** %11
%161 = call i32 (double*, i32, i32, ...) bitcast (i32 (...)* @print to i32 (double*, i32, i32, ...)*)(double* %160, i32 3, i32 2)
%162 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0))
%163 = load double*, double** %12
%164 = call i32 (double*, i32, i32, ...) bitcast (i32 (...)* @print to i32 (double*, i32, i32, ...)*)(double* %163, i32 4, i32 2)
%165 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0))
%166 = load double*, double** %13
%167 = call i32 (double*, i32, i32, ...) bitcast (i32 (...)* @print to i32 (double*, i32, i32, ...)*)(double* %166, i32 2, i32 4)
%168 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.8, i64 0, i64 0))
%169 = load double*, double** %14
%170 = call i32 (double*, i32, i32, ...) bitcast (i32 (...)* @print to i32 (double*, i32, i32, ...)*)(double* %169, i32 4, i32 3)
%171 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.9, i64 0, i64 0))
%172 = load double*, double** %15
%173 = call i32 (double*, i32, i32, ...) bitcast (i32 (...)* @print to i32 (double*, i32, i32, ...)*)(double* %172, i32 4, i32 3)
%174 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0))
%175 = load double*, double** %16
%176 = call i32 (double*, i32, i32, ...) bitcast (i32 (...)* @print to i32 (double*, i32, i32, ...)*)(double* %175, i32 4, i32 3)
%177 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.11, i64 0, i64 0))
%178 = load double*, double** %19
%179 = call i32 (double*, i32, i32, ...) bitcast (i32 (...)* @print to i32 (double*, i32, i32, ...)*)(double* %178, i32 4, i32 3)
%180 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.12, i64 0, i64 0))
%181 = load double*, double** %17
%182 = call i32 (double*, i32, i32, ...) bitcast (i32 (...)* @print to i32 (double*, i32, i32, ...)*)(double* %181, i32 4, i32 3)
%183 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.13, i64 0, i64 0))
%184 = load double*, double** %18
%185 = call i32 (double*, i32, i32, ...) bitcast (i32 (...)* @print to i32 (double*, i32, i32, ...)*)(double* %184, i32 4, i32 3)
%186 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.14, i64 0, i64 0))
%187 = load double*, double** %10
%188 = call i32 (double*, i32, ...) bitcast (i32 (...)* @sum_array to i32 (double*, i32, ...)*)(double* %187, i32 12)
%189 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.15, i64 0, i64 0), i32 %188)
%190 = load double*, double** %10
%191 = call i32 (double*, i32, ...) bitcast (i32 (...)* @mean to i32 (double*, i32, ...)*)(double* %190, i32 12)
%192 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.16, i64 0, i64 0), i32 %191)
%193 = load double*, double** %10
%194 = call i32 (double*, i32, ...) bitcast (i32 (...)* @sum_array to i32 (double*, i32, ...)*)(double* %193, i32 12)
%195 = udiv i32 %194, 12
%196 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.17, i64 0, i64 0), i32 %195)
%197 = load double*, double** %19
%198 = call i32 (double*, i32, i32, ...) bitcast (i32 (...)* @init_seq to i32 (double*, i32, i32, ...)*)(double* %197, i32 4, i32 3)
%199 = load double*, double** %19
%200 = load double*, double** %20
%201 = call i32 (double*, i32, i32, double*, ...) bitcast (i32 (...)* @transpose to i32 (double*, i32, i32, double*, ...)*)(double* %199, i32 4, i32 3, double* %200)
%202 = load double*, double** %19
%203 = load double*, double** %18
%204 = call i32 (double*, i32, double*, i32, double*, ...) bitcast (i32 (...)* @equal to i32 (double*, i32, double*, i32, double*, ...)*)(double* %202, i32 12, double* %2, i32 0, double* %203)
%205 = sext i32 %204 to i64
%206 = inttoptr i64 %205 to double*
store double* %206, double** %18
%207 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.14, i64 0, i64 0))
%208 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.11, i64 0, i64 0))
%209 = load double*, double** %19
%210 = call i32 (double*, i32, i32, ...) bitcast (i32 (...)* @print to i32 (double*, i32, i32, ...)*)(double* %209, i32 4, i32 3)
%211 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.18, i64 0, i64 0))
%212 = load double*, double** %20
%213 = call i32 (double*, i32, i32, ...) bitcast (i32 (...)* @print to i32 (double*, i32, i32, ...)*)(double* %212, i32 3, i32 4)
%214 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.13, i64 0, i64 0))
%215 = load double*, double** %18
%216 = call i32 (double*, i32, i32, ...) bitcast (i32 (...)* @print to i32 (double*, i32, i32, ...)*)(double* %215, i32 4, i32 3)
%217 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.19, i64 0, i64 0))
%218 = load double*, double** %10
%219 = bitcast double* %218 to i8*
%220 = load double*, double** %11
%221 = bitcast double* %220 to i8*
%222 = load double*, double** %12
%223 = bitcast double* %222 to i8*
%224 = load double*, double** %13
%225 = bitcast double* %224 to i8*
%226 = load double*, double** %14
%227 = bitcast double* %226 to i8*
%228 = load double*, double** %15
%229 = bitcast double* %228 to i8*
%230 = load double*, double** %16
%231 = bitcast double* %230 to i8*
%232 = load double*, double** %17
%233 = bitcast double* %232 to i8*
%234 = load double*, double** %18
%235 = bitcast double* %234 to i8*
%236 = load double*, double** %19
%237 = bitcast double* %236 to i8*
%238 = load double*, double** %20
%239 = bitcast double* %238 to i8*
ret void
}

LLVM IR (-O2):
@.str.1 = [6 x i8] c"pause\00"
@.str.2 = [36 x i8] c"\0ARunning \22test_0\22 with %s data...\0A\0A\00"
@.str.3 = [11 x i8] c"sequential\00"
@.str.15 = [14 x i8] c"Sum of A: %f\0A\00"
@.str.16 = [22 x i8] c"Mean of A: %f\0A\00"
@.str.17 = [22 x i8] c"Mean of A by sum: %f\0A\00"
@.str.19 = [1 x i8] zeroinitializer
@str = [27 x i8] c"Couldn't allocate memory!\07\00"
@str.20 = [10 x i8] c"Matrix A:\00"
@str.21 = [10 x i8] c"Matrix B:\00"
@str.22 = [10 x i8] c"Matrix C:\00"
@str.23 = [10 x i8] c"Matrix D:\00"
@str.24 = [10 x i8] c"Matrix E:\00"
@str.25 = [10 x i8] c"Matrix F:\00"
@str.26 = [10 x i8] c"Matrix G:\00"
@str.28 = [10 x i8] c"Matrix H:\00"
@str.30 = [10 x i8] c"Matrix X:\00"
@str.31 = [10 x i8] c"Matrix Y:\00"
@str.32 = [10 x i8] c"Matrix I:\00"
define void @test_0() {
%1 = alloca double
%2 = alloca double
%3 = alloca double
%4 = bitcast double* %1 to i8*
store double 1.000000e+00, double* %1
%5 = bitcast double* %2 to i8*
store double 2.000000e+00, double* %2
%6 = bitcast double* %3 to i8*
store double 1.000000e+01, double* %3
%7 = tail call dereferenceable_or_null(96) i8* @malloc(i64 96)
%8 = bitcast i8* %7 to double*
%9 = tail call dereferenceable_or_null(48) i8* @malloc(i64 48)
%10 = bitcast i8* %9 to double*
%11 = tail call dereferenceable_or_null(64) i8* @malloc(i64 64)
%12 = tail call dereferenceable_or_null(64) i8* @malloc(i64 64)
%13 = tail call dereferenceable_or_null(96) i8* @malloc(i64 96)
%14 = tail call dereferenceable_or_null(96) i8* @malloc(i64 96)
%15 = tail call dereferenceable_or_null(96) i8* @malloc(i64 96)
%16 = bitcast i8* %15 to double*
%17 = tail call dereferenceable_or_null(96) i8* @malloc(i64 96)
%18 = tail call dereferenceable_or_null(96) i8* @malloc(i64 96)
%19 = tail call dereferenceable_or_null(96) i8* @malloc(i64 96)
%20 = bitcast i8* %19 to double*
%21 = tail call dereferenceable_or_null(96) i8* @malloc(i64 96)
%22 = bitcast i8* %21 to double*
%23 = icmp ne i8* %7, null
%24 = icmp ne i8* %9, null
%25 = and i1 %23, %24
%26 = icmp ne i8* %11, null
%27 = and i1 %25, %26
%28 = icmp ne i8* %12, null
%29 = and i1 %27, %28
%30 = icmp ne i8* %13, null
%31 = and i1 %29, %30
%32 = icmp ne i8* %14, null
%33 = and i1 %31, %32
%34 = icmp ne i8* %15, null
%35 = and i1 %33, %34
%36 = icmp ne i8* %19, null
%37 = and i1 %35, %36
%38 = icmp ne i8* %21, null
%39 = and i1 %37, %38
br i1 %39, label %43, label %40
40: ; preds = %0
%41 = tail call i32 bitcast (i32 (...)* @puts to i32 (i8*)*)(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
%42 = tail call i32 (i8*, ...) bitcast (i32 (...)* @system to i32 (i8*, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
tail call void @exit(i32 -1)
unreachable
43: ; preds = %0
%44 = bitcast i8* %14 to double*
%45 = bitcast i8* %13 to double*
%46 = bitcast i8* %12 to double*
%47 = bitcast i8* %11 to double*
%48 = bitcast i8* %18 to double*
%49 = bitcast i8* %17 to double*
%50 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0))
%51 = tail call i32 (double*, i32, i32, ...) bitcast (i32 (...)* @init_seq to i32 (double*, i32, i32, ...)*)(double* %8, i32 4, i32 3)
%52 = tail call i32 (double*, i32, i32, ...) bitcast (i32 (...)* @init_seq to i32 (double*, i32, i32, ...)*)(double* %10, i32 3, i32 2)
%53 = tail call i32 (double*, i32, i32, double*, i32, i32, double*, ...) bitcast (i32 (...)* @dot_faster to i32 (double*, i32, i32, double*, i32, i32, double*, ...)*)(double* %8, i32 4, i32 3, double* %10, i32 3, i32 2, double* %47)
%54 = sext i32 %53 to i64
%55 = inttoptr i64 %54 to double*
%56 = tail call i32 (double*, i32, i32, double*, ...) bitcast (i32 (...)* @transpose to i32 (double*, i32, i32, double*, ...)*)(double* %55, i32 4, i32 2, double* %46)
%57 = sext i32 %56 to i64
%58 = inttoptr i64 %57 to double*
%59 = call i32 (double*, i32, double*, i32, double*, ...) bitcast (i32 (...)* @divide_arrays to i32 (double*, i32, double*, i32, double*, ...)*)(double* %3, i32 0, double* %8, i32 12, double* %45)
%60 = sext i32 %59 to i64
%61 = inttoptr i64 %60 to double*
%62 = call i32 (double*, i32, double*, i32, double*, ...) bitcast (i32 (...)* @divide_arrays to i32 (double*, i32, double*, i32, double*, ...)*)(double* %8, i32 12, double* %3, i32 0, double* %61)
%63 = sext i32 %62 to i64
%64 = inttoptr i64 %63 to double*
%65 = inttoptr i64 %63 to i8*
%66 = call i32 (double*, i32, double*, i32, double*, ...) bitcast (i32 (...)* @divide_arrays to i32 (double*, i32, double*, i32, double*, ...)*)(double* %1, i32 0, double* %3, i32 0, double* %64)
%67 = sext i32 %66 to i64
%68 = inttoptr i64 %67 to double*
%69 = call i32 (double*, i32, double*, i32, double*, ...) bitcast (i32 (...)* @add_arrays to i32 (double*, i32, double*, i32, double*, ...)*)(double* %8, i32 12, double* %8, i32 12, double* %68)
%70 = sext i32 %69 to i64
%71 = inttoptr i64 %70 to double*
%72 = call i32 (double*, i32, double*, i32, double*, ...) bitcast (i32 (...)* @multiply_arrays to i32 (double*, i32, double*, i32, double*, ...)*)(double* %2, i32 0, double* %8, i32 12, double* %44)
%73 = sext i32 %72 to i64
%74 = inttoptr i64 %73 to double*
%75 = call i32 (double*, i32, double*, i32, ...) bitcast (i32 (...)* @add_update to i32 (double*, i32, double*, i32, ...)*)(double* %16, i32 12, double* %3, i32 0)
%76 = call i32 (double*, i32, double*, i32, ...) bitcast (i32 (...)* @add_update to i32 (double*, i32, double*, i32, ...)*)(double* %16, i32 12, double* %71, i32 12)
%77 = sext i32 %76 to i64
%78 = inttoptr i64 %77 to double*
%79 = call i32 (double*, i32, double*, i32, double*, ...) bitcast (i32 (...)* @greater_than to i32 (double*, i32, double*, i32, double*, ...)*)(double* %2, i32 0, double* %1, i32 0, double* %49)
%80 = sext i32 %79 to i64
%81 = inttoptr i64 %80 to double*
%82 = call i32 (double*, i32, double*, i32, double*, ...) bitcast (i32 (...)* @greater_than to i32 (double*, i32, double*, i32, double*, ...)*)(double* %1, i32 0, double* %74, i32 12, double* %81)
%83 = sext i32 %82 to i64
%84 = inttoptr i64 %83 to double*
%85 = call i32 (double*, i32, double*, i32, double*, ...) bitcast (i32 (...)* @greater_than to i32 (double*, i32, double*, i32, double*, ...)*)(double* %74, i32 12, double* %1, i32 0, double* %84)
%86 = sext i32 %85 to i64
%87 = inttoptr i64 %86 to double*
%88 = call i32 (double*, i32, i32, ...) bitcast (i32 (...)* @init_rand to i32 (double*, i32, i32, ...)*)(double* %20, i32 4, i32 3)
%89 = call i32 (double*, i32, double*, i32, double*, ...) bitcast (i32 (...)* @greater_than to i32 (double*, i32, double*, i32, double*, ...)*)(double* %74, i32 12, double* %20, i32 12, double* %87)
%90 = sext i32 %89 to i64
%91 = inttoptr i64 %90 to double*
%92 = call i32 (double*, i32, double*, i32, double*, ...) bitcast (i32 (...)* @equal to i32 (double*, i32, double*, i32, double*, ...)*)(double* %71, i32 12, double* %74, i32 12, double* %48)
%93 = sext i32 %92 to i64
%94 = inttoptr i64 %93 to double*
%95 = call i32 bitcast (i32 (...)* @puts to i32 (i8*)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @str.20, i64 0, i64 0))
%96 = call i32 (double*, i32, i32, ...) bitcast (i32 (...)* @print to i32 (double*, i32, i32, ...)*)(double* %8, i32 4, i32 3)
%97 = call i32 bitcast (i32 (...)* @puts to i32 (i8*)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @str.21, i64 0, i64 0))
%98 = call i32 (double*, i32, i32, ...) bitcast (i32 (...)* @print to i32 (double*, i32, i32, ...)*)(double* %10, i32 3, i32 2)
%99 = call i32 bitcast (i32 (...)* @puts to i32 (i8*)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @str.22, i64 0, i64 0))
%100 = call i32 (double*, i32, i32, ...) bitcast (i32 (...)* @print to i32 (double*, i32, i32, ...)*)(double* %55, i32 4, i32 2)
%101 = call i32 bitcast (i32 (...)* @puts to i32 (i8*)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @str.23, i64 0, i64 0))
%102 = call i32 (double*, i32, i32, ...) bitcast (i32 (...)* @print to i32 (double*, i32, i32, ...)*)(double* %58, i32 2, i32 4)
%103 = call i32 bitcast (i32 (...)* @puts to i32 (i8*)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @str.24, i64 0, i64 0))
%104 = call i32 (double*, i32, i32, ...) bitcast (i32 (...)* @print to i32 (double*, i32, i32, ...)*)(double* %71, i32 4, i32 3)
%105 = call i32 bitcast (i32 (...)* @puts to i32 (i8*)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @str.25, i64 0, i64 0))
%106 = call i32 (double*, i32, i32, ...) bitcast (i32 (...)* @print to i32 (double*, i32, i32, ...)*)(double* %74, i32 4, i32 3)
%107 = call i32 bitcast (i32 (...)* @puts to i32 (i8*)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @str.26, i64 0, i64 0))
%108 = call i32 (double*, i32, i32, ...) bitcast (i32 (...)* @print to i32 (double*, i32, i32, ...)*)(double* %78, i32 4, i32 3)
%109 = call i32 bitcast (i32 (...)* @puts to i32 (i8*)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @str.30, i64 0, i64 0))
%110 = call i32 (double*, i32, i32, ...) bitcast (i32 (...)* @print to i32 (double*, i32, i32, ...)*)(double* %20, i32 4, i32 3)
%111 = call i32 bitcast (i32 (...)* @puts to i32 (i8*)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @str.28, i64 0, i64 0))
%112 = call i32 (double*, i32, i32, ...) bitcast (i32 (...)* @print to i32 (double*, i32, i32, ...)*)(double* %91, i32 4, i32 3)
%113 = call i32 bitcast (i32 (...)* @puts to i32 (i8*)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @str.32, i64 0, i64 0))
%114 = call i32 (double*, i32, i32, ...) bitcast (i32 (...)* @print to i32 (double*, i32, i32, ...)*)(double* %94, i32 4, i32 3)
%115 = call i32 @putchar(i32 10)
%116 = call i32 (double*, i32, ...) bitcast (i32 (...)* @sum_array to i32 (double*, i32, ...)*)(double* %8, i32 12)
%117 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.15, i64 0, i64 0), i32 %116)
%118 = call i32 (double*, i32, ...) bitcast (i32 (...)* @mean to i32 (double*, i32, ...)*)(double* %8, i32 12)
%119 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.16, i64 0, i64 0), i32 %118)
%120 = call i32 (double*, i32, ...) bitcast (i32 (...)* @sum_array to i32 (double*, i32, ...)*)(double* %8, i32 12)
%121 = udiv i32 %120, 12
%122 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.17, i64 0, i64 0), i32 %121)
%123 = call i32 (double*, i32, i32, ...) bitcast (i32 (...)* @init_seq to i32 (double*, i32, i32, ...)*)(double* %20, i32 4, i32 3)
%124 = call i32 (double*, i32, i32, double*, ...) bitcast (i32 (...)* @transpose to i32 (double*, i32, i32, double*, ...)*)(double* %20, i32 4, i32 3, double* %22)
%125 = call i32 (double*, i32, double*, i32, double*, ...) bitcast (i32 (...)* @equal to i32 (double*, i32, double*, i32, double*, ...)*)(double* %20, i32 12, double* %2, i32 0, double* %94)
%126 = sext i32 %125 to i64
%127 = inttoptr i64 %126 to double*
%128 = call i32 @putchar(i32 10)
%129 = call i32 bitcast (i32 (...)* @puts to i32 (i8*)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @str.30, i64 0, i64 0))
%130 = call i32 (double*, i32, i32, ...) bitcast (i32 (...)* @print to i32 (double*, i32, i32, ...)*)(double* %20, i32 4, i32 3)
%131 = call i32 bitcast (i32 (...)* @puts to i32 (i8*)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @str.31, i64 0, i64 0))
%132 = call i32 (double*, i32, i32, ...) bitcast (i32 (...)* @print to i32 (double*, i32, i32, ...)*)(double* %22, i32 3, i32 4)
%133 = call i32 bitcast (i32 (...)* @puts to i32 (i8*)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @str.32, i64 0, i64 0))
%134 = call i32 (double*, i32, i32, ...) bitcast (i32 (...)* @print to i32 (double*, i32, i32, ...)*)(double* %127, i32 4, i32 3)
%135 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.19, i64 0, i64 0))
%136 = inttoptr i64 %54 to i8*
%137 = inttoptr i64 %57 to i8*
%138 = inttoptr i64 %70 to i8*
%139 = inttoptr i64 %73 to i8*
%140 = inttoptr i64 %77 to i8*
%141 = inttoptr i64 %90 to i8*
%142 = inttoptr i64 %126 to i8*
ret void
}