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

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ m_add(double *, double *, double *, int, int);
int /*<<< orphan*/ m_eye(double *, int, int);
int /*<<< orphan*/ m_free(double *);
int /*<<< orphan*/ m_inversion(double *, double *, int);
int /*<<< orphan*/ m_mul(double *, double *, double *, int, int, int);
double *m_new(int, int);
int /*<<< orphan*/ m_sub(double *, double *, double *, int, int);
int /*<<< orphan*/ m_transpose(double *, double *, int, int);
void tick(double *A, double *B, double *C, double *D, int n, int p, int q,
          double *yv_k, double *u_k, double *x, double *P, double *Q, double *R,
          double *x_est, double *y_est, double *P_est) {
  double *Ax, *Cx, *Bu, *x_hat, *P_hat, *AT, *AP, *APAT, *CT, *PestCT;
  double *CPest, *K, *K1, *K2, *K2inv, *Cxest, *Du, *X1, *X2, *KX2, *se, *KC,
      *P1;
  Ax = m_new(n, 1);
  m_mul(A, x, Ax, n, n, 1);
  Bu = m_new(n, 1);
  m_mul(B, u_k, Bu, n, p, 1);
  x_hat = m_new(n, 1);
  m_add(Ax, Bu, x_hat, n, 1);
  m_free(Ax);
  m_free(Bu);
  AT = m_new(n, n);
  m_transpose(A, AT, n, n);
  AP = m_new(n, n);
  m_mul(A, P, AP, n, n, n);
  APAT = m_new(n, n);
  m_mul(AP, AT, APAT, n, n, n);
  P_hat = m_new(n, n);
  m_add(APAT, Q, P_hat, n, n);
  m_free(AT);
  m_free(AP);
  m_free(APAT);
  CT = m_new(n, q);
  m_transpose(C, CT, q, n);
  PestCT = m_new(n, q);
  m_mul(P_hat, CT, PestCT, n, n, q);
  K1 = m_new(q, q);
  CPest = m_new(q, n);
  m_mul(C, P_hat, CPest, q, n, n);
  m_mul(CPest, CT, K1, q, n, q);
  K2 = m_new(q, q);
  m_add(K1, R, K2, q, q);
  K2inv = m_new(q, q);
  m_inversion(K2, K2inv, q);
  K = m_new(n, q);
  m_mul(PestCT, K2inv, K, n, q, q);
  m_free(CT);
  m_free(PestCT);
  m_free(CPest);
  m_free(K1);
  m_free(K2);
  m_free(K2inv);
  Cxest = m_new(q, 1);
  m_mul(C, x_hat, Cxest, q, n, 1);
  Du = m_new(q, 1);
  m_mul(D, u_k, Du, q, p, 1);
  X1 = m_new(q, 1);
  m_sub(yv_k, Cxest, X1, q, 1);
  X2 = m_new(q, 1);
  m_sub(X1, Du, X2, q, 1);
  m_free(X1);
  m_free(Cxest);
  KX2 = m_new(n, 1);
  m_mul(K, X2, KX2, n, 1, 1);
  m_free(X2);
  m_add(x_hat, KX2, x_est, n, 1);
  m_free(KX2);
  se = m_new(n, n);
  m_eye(se, n, n);
  KC = m_new(n, n);
  P1 = m_new(n, n);
  m_mul(K, C, KC, n, q, n);
  m_sub(se, KC, P1, n, n);
  m_mul(P1, P_hat, P_est, n, n, n);
  m_free(se);
  m_free(P1);
  m_free(x_hat);
  m_free(P_hat);
  Cx = m_new(q, 1);
  m_mul(C, x_est, Cx, q, n, 1);
  m_add(Cx, Du, y_est, q, 1);
  m_free(Cx);
  m_free(Du);
}


x86 assembly (clang, -O0):
<tick>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
mov    0x58(%rbp),%rax
mov    0x50(%rbp),%rax
mov    0x48(%rbp),%rax
mov    0x40(%rbp),%rax
mov    0x38(%rbp),%rax
mov    0x30(%rbp),%rax
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    %r9d,-0x28(%rbp)
mov    -0x24(%rbp),%edi
mov    $0x1,%esi
call   10a0 <m_new@plt>
mov    %rax,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x28(%rbp),%rsi
mov    -0x30(%rbp),%rdx
mov    -0x24(%rbp),%ecx
mov    -0x24(%rbp),%r8d
mov    $0x1,%r9d
call   1040 <m_mul@plt>
mov    -0x24(%rbp),%edi
mov    $0x1,%esi
call   10a0 <m_new@plt>
mov    %rax,-0x40(%rbp)
mov    -0x10(%rbp),%rdi
mov    0x20(%rbp),%rsi
mov    -0x40(%rbp),%rdx
mov    -0x24(%rbp),%ecx
mov    -0x28(%rbp),%r8d
mov    $0x1,%r9d
call   1040 <m_mul@plt>
mov    -0x24(%rbp),%edi
mov    $0x1,%esi
call   10a0 <m_new@plt>
mov    %rax,-0x48(%rbp)
mov    -0x30(%rbp),%rdi
mov    -0x40(%rbp),%rsi
mov    -0x48(%rbp),%rdx
mov    -0x24(%rbp),%ecx
mov    $0x1,%r8d
call   1080 <m_add@plt>
mov    -0x30(%rbp),%rdi
call   1090 <m_free@plt>
mov    -0x40(%rbp),%rdi
call   1090 <m_free@plt>
mov    -0x24(%rbp),%edi
mov    -0x24(%rbp),%esi
call   10a0 <m_new@plt>
mov    %rax,-0x58(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x58(%rbp),%rsi
mov    -0x24(%rbp),%edx
mov    -0x24(%rbp),%ecx
call   1030 <m_transpose@plt>
mov    -0x24(%rbp),%edi
mov    -0x24(%rbp),%esi
call   10a0 <m_new@plt>
mov    %rax,-0x60(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x30(%rbp),%rsi
mov    -0x60(%rbp),%rdx
mov    -0x24(%rbp),%ecx
mov    -0x24(%rbp),%r8d
mov    -0x24(%rbp),%r9d
call   1040 <m_mul@plt>
mov    -0x24(%rbp),%edi
mov    -0x24(%rbp),%esi
call   10a0 <m_new@plt>
mov    %rax,-0x68(%rbp)
mov    -0x60(%rbp),%rdi
mov    -0x58(%rbp),%rsi
mov    -0x68(%rbp),%rdx
mov    -0x24(%rbp),%ecx
mov    -0x24(%rbp),%r8d
mov    -0x24(%rbp),%r9d
call   1040 <m_mul@plt>
mov    -0x24(%rbp),%edi
mov    -0x24(%rbp),%esi
call   10a0 <m_new@plt>
mov    %rax,-0x50(%rbp)
mov    -0x68(%rbp),%rdi
mov    0x38(%rbp),%rsi
mov    -0x50(%rbp),%rdx
mov    -0x24(%rbp),%ecx
mov    -0x24(%rbp),%r8d
call   1080 <m_add@plt>
mov    -0x58(%rbp),%rdi
call   1090 <m_free@plt>
mov    -0x60(%rbp),%rdi
call   1090 <m_free@plt>
mov    -0x68(%rbp),%rdi
call   1090 <m_free@plt>
mov    -0x24(%rbp),%edi
mov    0x10(%rbp),%esi
call   10a0 <m_new@plt>
mov    %rax,-0x70(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x70(%rbp),%rsi
mov    0x10(%rbp),%edx
mov    -0x24(%rbp),%ecx
call   1030 <m_transpose@plt>
mov    -0x24(%rbp),%edi
mov    0x10(%rbp),%esi
call   10a0 <m_new@plt>
mov    %rax,-0x78(%rbp)
mov    -0x50(%rbp),%rdi
mov    -0x70(%rbp),%rsi
mov    -0x78(%rbp),%rdx
mov    -0x24(%rbp),%ecx
mov    -0x24(%rbp),%r8d
mov    0x10(%rbp),%r9d
call   1040 <m_mul@plt>
mov    0x10(%rbp),%edi
mov    0x10(%rbp),%esi
call   10a0 <m_new@plt>
mov    %rax,-0x90(%rbp)
mov    0x10(%rbp),%edi
mov    -0x24(%rbp),%esi
call   10a0 <m_new@plt>
mov    %rax,-0x80(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x50(%rbp),%rsi
mov    -0x80(%rbp),%rdx
mov    0x10(%rbp),%ecx
mov    -0x24(%rbp),%r8d
mov    -0x24(%rbp),%r9d
call   1040 <m_mul@plt>
mov    -0x80(%rbp),%rdi
mov    -0x70(%rbp),%rsi
mov    -0x90(%rbp),%rdx
mov    0x10(%rbp),%ecx
mov    -0x24(%rbp),%r8d
mov    0x10(%rbp),%r9d
call   1040 <m_mul@plt>
mov    0x10(%rbp),%edi
mov    0x10(%rbp),%esi
call   10a0 <m_new@plt>
mov    %rax,-0x98(%rbp)
mov    -0x90(%rbp),%rdi
mov    0x40(%rbp),%rsi
mov    -0x98(%rbp),%rdx
mov    0x10(%rbp),%ecx
mov    0x10(%rbp),%r8d
call   1080 <m_add@plt>
mov    0x10(%rbp),%edi
mov    0x10(%rbp),%esi
call   10a0 <m_new@plt>
mov    %rax,-0xa0(%rbp)
mov    -0x98(%rbp),%rdi
mov    -0xa0(%rbp),%rsi
mov    0x10(%rbp),%edx
call   1050 <m_inversion@plt>
mov    -0x24(%rbp),%edi
mov    0x10(%rbp),%esi
call   10a0 <m_new@plt>
mov    %rax,-0x88(%rbp)
mov    -0x78(%rbp),%rdi
mov    -0xa0(%rbp),%rsi
mov    -0x88(%rbp),%rdx
mov    -0x24(%rbp),%ecx
mov    0x10(%rbp),%r8d
mov    0x10(%rbp),%r9d
call   1040 <m_mul@plt>
mov    -0x70(%rbp),%rdi
call   1090 <m_free@plt>
mov    -0x78(%rbp),%rdi
call   1090 <m_free@plt>
mov    -0x80(%rbp),%rdi
call   1090 <m_free@plt>
mov    -0x90(%rbp),%rdi
call   1090 <m_free@plt>
mov    -0x98(%rbp),%rdi
call   1090 <m_free@plt>
mov    -0xa0(%rbp),%rdi
call   1090 <m_free@plt>
mov    0x10(%rbp),%edi
mov    $0x1,%esi
call   10a0 <m_new@plt>
mov    %rax,-0xa8(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x48(%rbp),%rsi
mov    -0xa8(%rbp),%rdx
mov    0x10(%rbp),%ecx
mov    -0x24(%rbp),%r8d
mov    $0x1,%r9d
call   1040 <m_mul@plt>
mov    0x10(%rbp),%edi
mov    $0x1,%esi
call   10a0 <m_new@plt>
mov    %rax,-0xb0(%rbp)
mov    -0x20(%rbp),%rdi
mov    0x20(%rbp),%rsi
mov    -0xb0(%rbp),%rdx
mov    0x10(%rbp),%ecx
mov    -0x28(%rbp),%r8d
mov    $0x1,%r9d
call   1040 <m_mul@plt>
mov    0x10(%rbp),%edi
mov    $0x1,%esi
call   10a0 <m_new@plt>
mov    %rax,-0xb8(%rbp)
mov    0x18(%rbp),%rdi
mov    -0xa8(%rbp),%rsi
mov    -0xb8(%rbp),%rdx
mov    0x10(%rbp),%ecx
mov    $0x1,%r8d
call   1070 <m_sub@plt>
mov    0x10(%rbp),%edi
mov    $0x1,%esi
call   10a0 <m_new@plt>
mov    %rax,-0xc0(%rbp)
mov    -0xb8(%rbp),%rdi
mov    -0xb0(%rbp),%rsi
mov    -0xc0(%rbp),%rdx
mov    0x10(%rbp),%ecx
mov    $0x1,%r8d
call   1070 <m_sub@plt>
mov    -0xb8(%rbp),%rdi
call   1090 <m_free@plt>
mov    -0xa8(%rbp),%rdi
call   1090 <m_free@plt>
mov    -0x24(%rbp),%edi
mov    $0x1,%esi
call   10a0 <m_new@plt>
mov    %rax,-0xc8(%rbp)
mov    -0x88(%rbp),%rdi
mov    -0xc0(%rbp),%rsi
mov    -0xc8(%rbp),%rdx
mov    -0x24(%rbp),%ecx
mov    $0x1,%r9d
mov    %r9d,%r8d
call   1040 <m_mul@plt>
mov    -0xc0(%rbp),%rdi
call   1090 <m_free@plt>
mov    -0x48(%rbp),%rdi
mov    -0xc8(%rbp),%rsi
mov    0x48(%rbp),%rdx
mov    -0x24(%rbp),%ecx
mov    $0x1,%r8d
call   1080 <m_add@plt>
mov    -0xc8(%rbp),%rdi
call   1090 <m_free@plt>
mov    -0x24(%rbp),%edi
mov    -0x24(%rbp),%esi
call   10a0 <m_new@plt>
mov    %rax,-0xd0(%rbp)
mov    -0xd0(%rbp),%rdi
mov    -0x24(%rbp),%esi
mov    -0x24(%rbp),%edx
call   1060 <m_eye@plt>
mov    -0x24(%rbp),%edi
mov    -0x24(%rbp),%esi
call   10a0 <m_new@plt>
mov    %rax,-0xd8(%rbp)
mov    -0x24(%rbp),%edi
mov    -0x24(%rbp),%esi
call   10a0 <m_new@plt>
mov    %rax,-0xe0(%rbp)
mov    -0x88(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0xd8(%rbp),%rdx
mov    -0x24(%rbp),%ecx
mov    0x10(%rbp),%r8d
mov    -0x24(%rbp),%r9d
call   1040 <m_mul@plt>
mov    -0xd0(%rbp),%rdi
mov    -0xd8(%rbp),%rsi
mov    -0xe0(%rbp),%rdx
mov    -0x24(%rbp),%ecx
mov    -0x24(%rbp),%r8d
call   1070 <m_sub@plt>
mov    -0xe0(%rbp),%rdi
mov    -0x50(%rbp),%rsi
mov    0x58(%rbp),%rdx
mov    -0x24(%rbp),%ecx
mov    -0x24(%rbp),%r8d
mov    -0x24(%rbp),%r9d
call   1040 <m_mul@plt>
mov    -0xd0(%rbp),%rdi
call   1090 <m_free@plt>
mov    -0xe0(%rbp),%rdi
call   1090 <m_free@plt>
mov    -0x48(%rbp),%rdi
call   1090 <m_free@plt>
mov    -0x50(%rbp),%rdi
call   1090 <m_free@plt>
mov    0x10(%rbp),%edi
mov    $0x1,%esi
call   10a0 <m_new@plt>
mov    %rax,-0x38(%rbp)
mov    -0x18(%rbp),%rdi
mov    0x48(%rbp),%rsi
mov    -0x38(%rbp),%rdx
mov    0x10(%rbp),%ecx
mov    -0x24(%rbp),%r8d
mov    $0x1,%r9d
call   1040 <m_mul@plt>
mov    -0x38(%rbp),%rdi
mov    -0xb0(%rbp),%rsi
mov    0x50(%rbp),%rdx
mov    0x10(%rbp),%ecx
mov    $0x1,%r8d
call   1080 <m_add@plt>
mov    -0x38(%rbp),%rdi
call   1090 <m_free@plt>
mov    -0xb0(%rbp),%rdi
call   1090 <m_free@plt>
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tick>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x78,%rsp
mov    %r9d,0xc(%rsp)
mov    %r8d,%ebp
mov    %rcx,0x58(%rsp)
mov    %rdx,0x30(%rsp)
mov    %rsi,(%rsp)
mov    %rdi,%rbx
mov    %rdi,0x10(%rsp)
mov    0xf0(%rsp),%rax
mov    %rax,0x70(%rsp)
mov    0xf8(%rsp),%rax
mov    %rax,0x68(%rsp)
mov    0xe8(%rsp),%rax
mov    %rax,0x38(%rsp)
mov    0xb8(%rsp),%rax
mov    %rax,0x60(%rsp)
mov    0xe0(%rsp),%rax
mov    %rax,0x20(%rsp)
mov    0xb0(%rsp),%r12d
mov    0xd8(%rsp),%rax
mov    %rax,0x18(%rsp)
mov    0xd0(%rsp),%rax
mov    %rax,0x28(%rsp)
mov    0xc0(%rsp),%r15
mov    %r15,0x50(%rsp)
mov    0xc8(%rsp),%r13
mov    %r8d,%edi
mov    $0x1,%esi
call   10a0 <m_new@plt>
mov    %rax,%r14
mov    %rbx,%rdi
mov    %r13,%rsi
mov    %rax,%rdx
mov    %ebp,%ecx
mov    %ebp,%r8d
mov    $0x1,%r9d
call   1040 <m_mul@plt>
mov    %ebp,%edi
mov    $0x1,%esi
call   10a0 <m_new@plt>
mov    %rax,%rbx
mov    (%rsp),%rdi
mov    %r15,%rsi
mov    %rax,%rdx
mov    %ebp,%ecx
mov    0xc(%rsp),%r8d
mov    $0x1,%r9d
call   1040 <m_mul@plt>
mov    %ebp,%edi
mov    $0x1,%esi
call   10a0 <m_new@plt>
mov    %rax,(%rsp)
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %rax,%rdx
mov    %ebp,%ecx
mov    $0x1,%r8d
call   1080 <m_add@plt>
mov    %r14,%rdi
call   1090 <m_free@plt>
mov    %rbx,%rdi
call   1090 <m_free@plt>
mov    %ebp,%edi
mov    %ebp,%esi
call   10a0 <m_new@plt>
mov    %rax,%r13
mov    0x10(%rsp),%rbx
mov    %rbx,%rdi
mov    %rax,%rsi
mov    %ebp,%edx
mov    %ebp,%ecx
call   1030 <m_transpose@plt>
mov    %ebp,%edi
mov    %ebp,%esi
call   10a0 <m_new@plt>
mov    %rax,%r14
mov    %rbx,%rdi
mov    0x28(%rsp),%rsi
mov    %rax,%rdx
mov    %ebp,%ecx
mov    %ebp,%r8d
mov    %ebp,%r9d
call   1040 <m_mul@plt>
mov    %ebp,%edi
mov    %ebp,%esi
call   10a0 <m_new@plt>
mov    %rax,%r15
mov    %r14,%rdi
mov    %r13,%rsi
mov    %rax,%rdx
mov    %ebp,%ecx
mov    %ebp,%r8d
mov    %ebp,%r9d
call   1040 <m_mul@plt>
mov    %ebp,%edi
mov    %ebp,%esi
call   10a0 <m_new@plt>
mov    %rax,%rbx
mov    %r15,%rdi
mov    0x18(%rsp),%rsi
mov    %rax,%rdx
mov    %ebp,%ecx
mov    %ebp,%r8d
call   1080 <m_add@plt>
mov    %r13,%rdi
call   1090 <m_free@plt>
mov    %r14,%rdi
call   1090 <m_free@plt>
mov    %r15,%rdi
call   1090 <m_free@plt>
mov    %ebp,%edi
mov    %r12d,%esi
call   10a0 <m_new@plt>
mov    %rax,%r14
mov    0x30(%rsp),%r15
mov    %r15,%rdi
mov    %rax,%rsi
mov    %r12d,%edx
mov    %ebp,%ecx
call   1030 <m_transpose@plt>
mov    %ebp,%edi
mov    %r12d,%esi
call   10a0 <m_new@plt>
mov    %rax,0x10(%rsp)
mov    %rbx,0x28(%rsp)
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %rax,%rdx
mov    %ebp,%ecx
mov    %ebp,%r8d
mov    %r12d,%r9d
call   1040 <m_mul@plt>
mov    %r12d,%edi
mov    %r12d,%esi
call   10a0 <m_new@plt>
mov    %rax,%r13
mov    %r12d,%edi
mov    %ebp,%esi
call   10a0 <m_new@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %rax,%rdx
mov    %rax,%rbx
mov    %rax,0x48(%rsp)
mov    %r12d,%ecx
mov    %ebp,%r8d
mov    %ebp,%r9d
call   1040 <m_mul@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r13,0x40(%rsp)
mov    %r13,%rdx
mov    %r12d,%ecx
mov    %ebp,%r8d
mov    %r12d,%r9d
call   1040 <m_mul@plt>
mov    %r12d,%edi
mov    %r12d,%esi
call   10a0 <m_new@plt>
mov    %rax,%r15
mov    %r13,%rdi
mov    0x20(%rsp),%rsi
mov    %rax,%rdx
mov    %r12d,%ecx
mov    %r12d,%r8d
call   1080 <m_add@plt>
mov    %r12d,%edi
mov    %r12d,%esi
call   10a0 <m_new@plt>
mov    %rax,%r13
mov    %r15,%rdi
mov    %rax,%rsi
mov    %r12d,%edx
call   1050 <m_inversion@plt>
mov    %ebp,%edi
mov    %r12d,%esi
call   10a0 <m_new@plt>
mov    %rax,0x18(%rsp)
mov    0x10(%rsp),%rbx
mov    %rbx,%rdi
mov    %r13,%rsi
mov    %rax,%rdx
mov    %ebp,%ecx
mov    %r12d,%r8d
mov    %r12d,%r9d
call   1040 <m_mul@plt>
mov    %r14,%rdi
call   1090 <m_free@plt>
mov    %rbx,%rdi
call   1090 <m_free@plt>
mov    0x48(%rsp),%rdi
call   1090 <m_free@plt>
mov    0x40(%rsp),%rdi
call   1090 <m_free@plt>
mov    %r15,%rdi
call   1090 <m_free@plt>
mov    %r13,%rdi
call   1090 <m_free@plt>
mov    %r12d,%edi
mov    $0x1,%esi
call   10a0 <m_new@plt>
mov    %rax,%r14
mov    0x30(%rsp),%rdi
mov    (%rsp),%rsi
mov    %rax,%rdx
mov    %r12d,%ecx
mov    %ebp,%r8d
mov    $0x1,%r9d
call   1040 <m_mul@plt>
mov    %r12d,%edi
mov    $0x1,%esi
call   10a0 <m_new@plt>
mov    %rax,%r13
mov    0x58(%rsp),%rdi
mov    0x50(%rsp),%rsi
mov    %rax,%rdx
mov    %rax,0x20(%rsp)
mov    %r12d,%ecx
mov    0xc(%rsp),%r8d
mov    $0x1,%r9d
call   1040 <m_mul@plt>
mov    %r12d,%edi
mov    $0x1,%esi
call   10a0 <m_new@plt>
mov    %rax,%rbx
mov    0x60(%rsp),%rdi
mov    %r14,%rsi
mov    %rax,%rdx
mov    %r12d,%ecx
mov    $0x1,%r8d
call   1070 <m_sub@plt>
mov    %r12d,%edi
mov    $0x1,%esi
call   10a0 <m_new@plt>
mov    %rax,%r15
mov    %rbx,%rdi
mov    %r13,%rsi
mov    %rax,%rdx
mov    %r12d,%ecx
mov    $0x1,%r8d
call   1070 <m_sub@plt>
mov    %rbx,%rdi
call   1090 <m_free@plt>
mov    %r14,%rdi
call   1090 <m_free@plt>
mov    %ebp,%edi
mov    $0x1,%esi
call   10a0 <m_new@plt>
mov    %rax,%rbx
mov    0x18(%rsp),%r13
mov    %r13,%rdi
mov    %r15,%rsi
mov    %rax,%rdx
mov    %ebp,%ecx
mov    $0x1,%r8d
mov    $0x1,%r9d
call   1040 <m_mul@plt>
mov    %r15,%rdi
call   1090 <m_free@plt>
mov    (%rsp),%rdi
mov    %rbx,%rsi
mov    0x38(%rsp),%rdx
mov    %ebp,%ecx
mov    $0x1,%r8d
call   1080 <m_add@plt>
mov    %rbx,%rdi
call   1090 <m_free@plt>
mov    %ebp,%edi
mov    %ebp,%esi
call   10a0 <m_new@plt>
mov    %rax,%r14
mov    %rax,%rdi
mov    %ebp,%esi
mov    %ebp,%edx
call   1060 <m_eye@plt>
mov    %ebp,%edi
mov    %ebp,%esi
call   10a0 <m_new@plt>
mov    %rax,%rbx
mov    %ebp,%edi
mov    %ebp,%esi
call   10a0 <m_new@plt>
mov    %rax,%r15
mov    %r13,%rdi
mov    0x30(%rsp),%r13
mov    %r13,%rsi
mov    %rbx,%rdx
mov    %ebp,%ecx
mov    %r12d,%r8d
mov    %ebp,%r9d
call   1040 <m_mul@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
mov    %ebp,%ecx
mov    %ebp,%r8d
call   1070 <m_sub@plt>
mov    %r15,%rdi
mov    0x28(%rsp),%rbx
mov    %rbx,%rsi
mov    0x68(%rsp),%rdx
mov    %ebp,%ecx
mov    %ebp,%r8d
mov    %ebp,%r9d
call   1040 <m_mul@plt>
mov    %r14,%rdi
call   1090 <m_free@plt>
mov    %r15,%rdi
call   1090 <m_free@plt>
mov    (%rsp),%rdi
call   1090 <m_free@plt>
mov    %rbx,%rdi
call   1090 <m_free@plt>
mov    %r12d,%edi
mov    $0x1,%esi
call   10a0 <m_new@plt>
mov    %rax,%rbx
mov    %r13,%rdi
mov    0x38(%rsp),%rsi
mov    %rax,%rdx
mov    %r12d,%ecx
mov    %ebp,%r8d
mov    $0x1,%r9d
call   1040 <m_mul@plt>
mov    %rbx,%rdi
mov    0x20(%rsp),%rbp
mov    %rbp,%rsi
mov    0x70(%rsp),%rdx
mov    %r12d,%ecx
mov    $0x1,%r8d
call   1080 <m_add@plt>
mov    %rbx,%rdi
call   1090 <m_free@plt>
mov    %rbp,%rdi
add    $0x78,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1090 <m_free@plt>

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

LLVM IR (-O2):
define void @tick(double* %0, double* %1, double* %2, double* %3, i32 %4, i32 %5, i32 %6, double* %7, double* %8, double* %9, double* %10, double* %11, double* %12, double* %13, double* %14, double* %15) {
%17 = tail call double* @m_new(i32 %4, i32 1)
%18 = tail call i32 @m_mul(double* %0, double* %9, double* %17, i32 %4, i32 %4, i32 1)
%19 = tail call double* @m_new(i32 %4, i32 1)
%20 = tail call i32 @m_mul(double* %1, double* %8, double* %19, i32 %4, i32 %5, i32 1)
%21 = tail call double* @m_new(i32 %4, i32 1)
%22 = tail call i32 @m_add(double* %17, double* %19, double* %21, i32 %4, i32 1)
%23 = tail call i32 @m_free(double* %17)
%24 = tail call i32 @m_free(double* %19)
%25 = tail call double* @m_new(i32 %4, i32 %4)
%26 = tail call i32 @m_transpose(double* %0, double* %25, i32 %4, i32 %4)
%27 = tail call double* @m_new(i32 %4, i32 %4)
%28 = tail call i32 @m_mul(double* %0, double* %10, double* %27, i32 %4, i32 %4, i32 %4)
%29 = tail call double* @m_new(i32 %4, i32 %4)
%30 = tail call i32 @m_mul(double* %27, double* %25, double* %29, i32 %4, i32 %4, i32 %4)
%31 = tail call double* @m_new(i32 %4, i32 %4)
%32 = tail call i32 @m_add(double* %29, double* %11, double* %31, i32 %4, i32 %4)
%33 = tail call i32 @m_free(double* %25)
%34 = tail call i32 @m_free(double* %27)
%35 = tail call i32 @m_free(double* %29)
%36 = tail call double* @m_new(i32 %4, i32 %6)
%37 = tail call i32 @m_transpose(double* %2, double* %36, i32 %6, i32 %4)
%38 = tail call double* @m_new(i32 %4, i32 %6)
%39 = tail call i32 @m_mul(double* %31, double* %36, double* %38, i32 %4, i32 %4, i32 %6)
%40 = tail call double* @m_new(i32 %6, i32 %6)
%41 = tail call double* @m_new(i32 %6, i32 %4)
%42 = tail call i32 @m_mul(double* %2, double* %31, double* %41, i32 %6, i32 %4, i32 %4)
%43 = tail call i32 @m_mul(double* %41, double* %36, double* %40, i32 %6, i32 %4, i32 %6)
%44 = tail call double* @m_new(i32 %6, i32 %6)
%45 = tail call i32 @m_add(double* %40, double* %12, double* %44, i32 %6, i32 %6)
%46 = tail call double* @m_new(i32 %6, i32 %6)
%47 = tail call i32 @m_inversion(double* %44, double* %46, i32 %6)
%48 = tail call double* @m_new(i32 %4, i32 %6)
%49 = tail call i32 @m_mul(double* %38, double* %46, double* %48, i32 %4, i32 %6, i32 %6)
%50 = tail call i32 @m_free(double* %36)
%51 = tail call i32 @m_free(double* %38)
%52 = tail call i32 @m_free(double* %41)
%53 = tail call i32 @m_free(double* %40)
%54 = tail call i32 @m_free(double* %44)
%55 = tail call i32 @m_free(double* %46)
%56 = tail call double* @m_new(i32 %6, i32 1)
%57 = tail call i32 @m_mul(double* %2, double* %21, double* %56, i32 %6, i32 %4, i32 1)
%58 = tail call double* @m_new(i32 %6, i32 1)
%59 = tail call i32 @m_mul(double* %3, double* %8, double* %58, i32 %6, i32 %5, i32 1)
%60 = tail call double* @m_new(i32 %6, i32 1)
%61 = tail call i32 @m_sub(double* %7, double* %56, double* %60, i32 %6, i32 1)
%62 = tail call double* @m_new(i32 %6, i32 1)
%63 = tail call i32 @m_sub(double* %60, double* %58, double* %62, i32 %6, i32 1)
%64 = tail call i32 @m_free(double* %60)
%65 = tail call i32 @m_free(double* %56)
%66 = tail call double* @m_new(i32 %4, i32 1)
%67 = tail call i32 @m_mul(double* %48, double* %62, double* %66, i32 %4, i32 1, i32 1)
%68 = tail call i32 @m_free(double* %62)
%69 = tail call i32 @m_add(double* %21, double* %66, double* %13, i32 %4, i32 1)
%70 = tail call i32 @m_free(double* %66)
%71 = tail call double* @m_new(i32 %4, i32 %4)
%72 = tail call i32 @m_eye(double* %71, i32 %4, i32 %4)
%73 = tail call double* @m_new(i32 %4, i32 %4)
%74 = tail call double* @m_new(i32 %4, i32 %4)
%75 = tail call i32 @m_mul(double* %48, double* %2, double* %73, i32 %4, i32 %6, i32 %4)
%76 = tail call i32 @m_sub(double* %71, double* %73, double* %74, i32 %4, i32 %4)
%77 = tail call i32 @m_mul(double* %74, double* %31, double* %15, i32 %4, i32 %4, i32 %4)
%78 = tail call i32 @m_free(double* %71)
%79 = tail call i32 @m_free(double* %74)
%80 = tail call i32 @m_free(double* %21)
%81 = tail call i32 @m_free(double* %31)
%82 = tail call double* @m_new(i32 %6, i32 1)
%83 = tail call i32 @m_mul(double* %2, double* %13, double* %82, i32 %6, i32 %4, i32 1)
%84 = tail call i32 @m_add(double* %82, double* %58, double* %14, i32 %6, i32 1)
%85 = tail call i32 @m_free(double* %82)
%86 = tail call i32 @m_free(double* %58)
ret void
}