user: What is the c source code of the assembly code below?

```asm
<matexp>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  mov    %rdi,%r13
  push   %r12
  mov    %edx,%r12d
  push   %rbp
  push   %rbx
  sub    $0x78,%rsp
  mov    %rsi,0x30(%rsp)
  mov    %ecx,0x3c(%rsp)
  movsd  %xmm0,0x8(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x68(%rsp)
  mov    %ecx,%eax
  sub    $0x2,%eax
  cmp    $0x1d,%eax
  ja     L106
L148:
  mov    %r12d,%eax
  imul   %r12d,%eax
  mov    %eax,%edi
  mov    %eax,0x48(%rsp)
  call   <dvector@plt>
  mov    0x30(%rsp),%rsi
  mov    %rax,0x28(%rsp)
  mov    %rax,0x50(%rsp)
  mov    %rsi,0x58(%rsp)
  test   %r12d,%r12d
  jle    L128
  movslq %r12d,%rsi
  mov    0x3c(%rsp),%ebp
  mov    %r12d,0x4c(%rsp)
  mov    %rsi,0x40(%rsp)
  shl    $0x3,%rsi
  mov    %rsi,0x18(%rsp)
  mov    %rax,%rsi
  lea    -0x1(%r12),%eax
  neg    %ebp
  shl    $0x3,%rax
  mov    %rsi,%r12
  lea    0x8(%rax,%r13,1),%rcx
  add    $0x8,%rax
  mov    %rcx,0x10(%rsp)
  mov    %rax,0x20(%rsp)
L13:
  mov    0x0(%r13),%r15
  mov    0x20(%rsp),%rax
  mov    %r12,%r14
  lea    (%rax,%r15,1),%rbx
L11:
  movsd  0x8(%rsp),%xmm0
  mov    %ebp,%edi
  add    $0x8,%r15
  add    $0x8,%r14
  mulsd  -0x8(%r15),%xmm0
  call   <ldexp@plt>
  movsd  %xmm0,-0x8(%r14)
  cmp    %r15,%rbx
  jne    L11
  add    $0x8,%r13
  add    0x18(%rsp),%r12
  cmp    %r13,0x10(%rsp)
  jne    L13
  mov    0x4c(%rsp),%r12d
  mov    0x28(%rsp),%rsi
  mov    0x30(%rsp),%rdx
  mov    %r12d,%r9d
  mov    %r12d,%r8d
  mov    %r12d,%ecx
  mov    %rsi,%rdi
  call   <matby@plt>
  mov    0x48(%rsp),%edx
  test   %edx,%edx
  je     L75
L127:
  movsd  D25(%rip),%xmm1
  mov    0x48(%rsp),%ecx
  xor    %eax,%eax
  mov    0x28(%rsp),%rdx
  mov    0x30(%rsp),%rsi
  cs nopw 0x0(%rax,%rax,1)
L99:
  movsd  (%rsi,%rax,8),%xmm0
  mulsd  %xmm1,%xmm0
  addsd  (%rdx,%rax,8),%xmm0
  movsd  %xmm0,(%rdx,%rax,8)
  add    $0x1,%rax
  cmp    %eax,%ecx
  jg     L99
  movslq %r12d,%rax
  mov    %rax,0x40(%rsp)
  test   %r12d,%r12d
  jle    L28
L75:
  mov    0x40(%rsp),%rax
  movsd  D10(%rip),%xmm1
  xor    %edx,%edx
  lea    0x8(,%rax,8),%rcx
  mov    0x28(%rsp),%rax
  nopl   0x0(%rax)
L24:
  movsd  (%rax),%xmm0
  add    $0x1,%edx
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  add    %rcx,%rax
  cmp    %edx,%r12d
  jg     L24
L28:
  mov    0x3c(%rsp),%ecx
  test   %ecx,%ecx
  jle    L22
  mov    0x28(%rsp),%rdi
  mov    0x30(%rsp),%rdx
  xor    %r15d,%r15d
  xor    %r13d,%r13d
  mov    0x3c(%rsp),%r14d
  mov    $0x1,%ebp
  jmp    L37
  nopw   0x0(%rax,%rax,1)
L80:
  movslq %r13d,%rax
  mov    0x50(%rsp,%rax,8),%rdx
  mov    %ebp,%eax
  sub    %r13d,%eax
  mov    %ebx,%r13d
  cltq
  mov    0x50(%rsp,%rax,8),%rdi
L37:
  mov    %r13d,%ebx
  mov    %r12d,%r9d
  mov    %r12d,%r8d
  mov    %r12d,%ecx
  mov    %rdi,%rsi
  add    $0x1,%r15d
  xor    $0x1,%ebx
  call   <matby@plt>
  cmp    %r15d,%r14d
  jne    L80
  cmp    $0x1,%r13d
  je     L22
L108:
  mov    0x28(%rsp),%rdi
  call   <free@plt>
  mov    0x68(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L155
  add    $0x78,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L106:
  lea    D20(%rip),%rdi
  call   <error@plt>
  jmp    L148
L22:
  mov    0x48(%rsp),%edx
  mov    0x28(%rsp),%rsi
  mov    0x30(%rsp),%rdi
  shl    $0x3,%edx
  call   <memcpy@plt>
  jmp    L108
L128:
  mov    0x28(%rsp),%rsi
  mov    0x30(%rsp),%rdx
  mov    %r12d,%r9d
  mov    %r12d,%r8d
  mov    %r12d,%ecx
  mov    %rsi,%rdi
  call   <matby@plt>
  mov    0x48(%rsp),%eax
  test   %eax,%eax
  jne    L127
  jmp    L28
L155:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: tag: D25
datatype: byte[8]
name: unpack_data
arguments: tag: D10
datatype: byte[8]
name: unpack_data
arguments: tag: D20
datatype: string

tool: {"D25": [0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x3f]}

tool: {"D10": [0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x3f]}

tool: D20: TimeSquare not good

assistant: ```c
int matexp(double **Q, double *P, double t, int n, int TimeSquare) {
  int it, i, j;
  double *T[2];
  if (TimeSquare < 2 || TimeSquare > 31)
    error("TimeSquare not good");
  T[0] = dvector(n * n);
  T[1] = P;
  for (i = 0; i < n; i++) {
    for (j = 0; j < n; j++) {
      T[0][i * n + j] = ldexp(Q[i][j] * t, -TimeSquare);
    }
  }
  matby(T[0], T[0], T[1], n, n, n);
  for (i = 0; i < n * n; i++) {
    T[0][i] += T[1][i] / 2;
  }
  for (i = 0; i < n; i++) {
    T[0][i * n + i]++;
  }
  for (i = 0, it = 0; i < TimeSquare; i++) {
    it = !it;
    matby(T[1 - it], T[1 - it], T[it], n, n, n);
  }
  if (it == 0) {
    memcpy(P, T[0], n * n * sizeof(double));
  }
  free(T[0]);
  return (0);
}
```