user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<matexp>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x58,%rsp
  mov    %rdi,%rbx
  mov    %rsi,0x10(%rsp)
  movsd  %xmm0,(%rsp)
  mov    %edx,%r15d
  mov    %ecx,0x18(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x48(%rsp)
  xor    %eax,%eax
  mov    %ecx,%eax
  sub    $0x2,%eax
  cmp    $0x1d,%eax
  ja     L133
L5:
  mov    %r15d,%eax
  imul   %r15d,%eax
  mov    %eax,0x1c(%rsp)
  mov    %eax,%edi
  call   <dvector@plt>
  mov    %rax,%r12
  mov    %rax,0x8(%rsp)
  mov    %rax,0x30(%rsp)
  mov    0x10(%rsp),%rax
  mov    %rax,0x38(%rsp)
  test   %r15d,%r15d
  jle    L67
  mov    %rbx,%rbp
  movslq %r15d,%rax
  shl    $0x3,%rax
  mov    %rax,0x20(%rsp)
  lea    -0x1(%r15),%eax
  lea    0x8(%rbx,%rax,8),%rax
  mov    %rax,0x28(%rsp)
  mov    %r15d,%r13d
  shl    $0x3,%r13
  mov    0x18(%rsp),%r14d
  neg    %r14d
L105:
  mov    $0x0,%ebx
L76:
  mov    0x0(%rbp),%rax
  movsd  (%rsp),%xmm0
  mulsd  (%rax,%rbx,1),%xmm0
  mov    %r14d,%edi
  call   <ldexp@plt>
  movsd  %xmm0,(%r12,%rbx,1)
  add    $0x8,%rbx
  cmp    %r13,%rbx
  jne    L76
  add    $0x8,%rbp
  add    0x20(%rsp),%r12
  cmp    0x28(%rsp),%rbp
  jne    L105
  mov    %r15d,%r9d
  mov    %r15d,%r8d
  mov    %r15d,%ecx
  mov    0x10(%rsp),%rdx
  mov    0x8(%rsp),%rsi
  mov    %rsi,%rdi
  call   <matby@plt>
  cmpl   $0x0,0x1c(%rsp)
  jle    L148
L77:
  mov    $0x0,%eax
  movsd  D28(%rip),%xmm1
L1:
  mov    0x10(%rsp),%rcx
  movapd %xmm1,%xmm0
  mulsd  (%rcx,%rax,8),%xmm0
  mov    0x8(%rsp),%rsi
  addsd  (%rsi,%rax,8),%xmm0
  movsd  %xmm0,(%rsi,%rax,8)
  add    $0x1,%rax
  cmp    %eax,0x1c(%rsp)
  jg     L1
  test   %r15d,%r15d
  jle    L43
L148:
  movslq %r15d,%rax
  lea    0x8(,%rax,8),%rcx
  mov    0x8(%rsp),%rax
  mov    $0x0,%edx
  movsd  D25(%rip),%xmm1
L25:
  movapd %xmm1,%xmm0
  addsd  (%rax),%xmm0
  movsd  %xmm0,(%rax)
  add    $0x1,%edx
  add    %rcx,%rax
  cmp    %edx,%r15d
  jg     L25
L43:
  cmpl   $0x0,0x18(%rsp)
  jle    L80
  mov    $0x0,%ebp
  mov    $0x0,%ebx
  mov    $0x1,%r12d
L110:
  mov    %ebx,%r13d
  xor    $0x1,%ebx
  mov    %r12d,%eax
  sub    %ebx,%eax
  cltq
  mov    0x30(%rsp,%rax,8),%rdi
  movslq %ebx,%rax
  mov    0x30(%rsp,%rax,8),%rdx
  mov    %r15d,%r9d
  mov    %r15d,%r8d
  mov    %r15d,%ecx
  mov    %rdi,%rsi
  call   <matby@plt>
  add    $0x1,%ebp
  cmp    %ebp,0x18(%rsp)
  jne    L110
  test   %r13d,%r13d
  jne    L80
L7:
  mov    0x8(%rsp),%rdi
  call   <free@plt>
  mov    0x48(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L159
  mov    $0x0,%eax
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L133:
  lea    D21(%rip),%rdi
  call   <error@plt>
  jmp    L5
L67:
  mov    %r15d,%r9d
  mov    %r15d,%r8d
  mov    %r15d,%ecx
  mov    0x10(%rsp),%rdx
  mov    0x8(%rsp),%rsi
  mov    %rsi,%rdi
  call   <matby@plt>
  cmpl   $0x0,0x1c(%rsp)
  jg     L77
  jmp    L43
L80:
  mov    0x1c(%rsp),%edx
  shl    $0x3,%edx
  mov    0x8(%rsp),%rsi
  mov    0x10(%rsp),%rdi
  call   <memcpy@plt>
  jmp    L7
L159:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: tag: D28
type_infered: byte[8]
name: parse_data
arguments: tag: D25
type_infered: byte[8]
name: parse_data
arguments: tag: D21
type_infered: string

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

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

tool: D21: 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);
}
```