user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<rotmatrix>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %rdi,-0x48(%rbp)
  mov    %rsi,-0x50(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x50(%rbp),%rax
  mov    (%rax),%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x40(%rbp)
  mov    -0x50(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x38(%rbp)
  mov    -0x50(%rbp),%rax
  add    $0x10,%rax
  mov    (%rax),%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x30(%rbp)
  mov    -0x50(%rbp),%rax
  mov    (%rax),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x20(%rbp)
  mov    -0x50(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x50(%rbp),%rax
  add    $0x10,%rax
  mov    (%rax),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x10(%rbp)
  movsd  -0x30(%rbp),%xmm1
  movsd  -0x38(%rbp),%xmm0
  mulsd  %xmm1,%xmm0
  mov    -0x48(%rbp),%rax
  movsd  %xmm0,(%rax)
  movsd  -0x30(%rbp),%xmm1
  movsd  -0x18(%rbp),%xmm0
  mulsd  %xmm0,%xmm1
  movsd  -0x20(%rbp),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x10(%rbp),%xmm2
  movsd  -0x40(%rbp),%xmm1
  mulsd  %xmm2,%xmm1
  subsd  %xmm1,%xmm0
  mov    -0x48(%rbp),%rax
  movsd  %xmm0,0x8(%rax)
  movsd  -0x30(%rbp),%xmm1
  movsd  -0x18(%rbp),%xmm0
  mulsd  %xmm0,%xmm1
  movsd  -0x40(%rbp),%xmm0
  mulsd  %xmm0,%xmm1
  movsd  -0x10(%rbp),%xmm2
  movsd  -0x20(%rbp),%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm1,%xmm0
  mov    -0x48(%rbp),%rax
  movsd  %xmm0,0x10(%rax)
  movsd  -0x10(%rbp),%xmm1
  movsd  -0x38(%rbp),%xmm0
  mov    -0x48(%rbp),%rax
  add    $0x18,%rax
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  movsd  -0x10(%rbp),%xmm1
  movsd  -0x18(%rbp),%xmm0
  mulsd  %xmm0,%xmm1
  movsd  -0x20(%rbp),%xmm0
  mulsd  %xmm0,%xmm1
  movsd  -0x30(%rbp),%xmm2
  movsd  -0x40(%rbp),%xmm0
  mulsd  %xmm2,%xmm0
  mov    -0x48(%rbp),%rax
  add    $0x18,%rax
  addsd  %xmm1,%xmm0
  movsd  %xmm0,0x8(%rax)
  movsd  -0x10(%rbp),%xmm1
  movsd  -0x18(%rbp),%xmm0
  mulsd  %xmm0,%xmm1
  movsd  -0x40(%rbp),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x30(%rbp),%xmm2
  movsd  -0x20(%rbp),%xmm1
  mulsd  %xmm2,%xmm1
  mov    -0x48(%rbp),%rax
  add    $0x18,%rax
  subsd  %xmm1,%xmm0
  movsd  %xmm0,0x10(%rax)
  movsd  -0x10(%rbp),%xmm0
  mov    -0x48(%rbp),%rax
  add    $0x30,%rax
  movq   D7(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  movsd  -0x38(%rbp),%xmm1
  movsd  -0x20(%rbp),%xmm0
  mov    -0x48(%rbp),%rax
  add    $0x30,%rax
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,0x8(%rax)
  movsd  -0x30(%rbp),%xmm1
  movsd  -0x40(%rbp),%xmm0
  mov    -0x48(%rbp),%rax
  add    $0x30,%rax
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,0x10(%rax)
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L5
  call   <__stack_chk_fail@plt>
L5:
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: tag: D7
type_infered: byte[8]

tool: {"D7": [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80]}

assistant: ```c
void rotmatrix(double M[3][3], double rot[3]) {
  double c[3] = {cos(rot[0]), cos(rot[1]), cos(rot[2])};
  double s[3] = {sin(rot[0]), sin(rot[1]), sin(rot[2])};
  M[0][0] = c[2] * c[1];
  M[0][1] = c[2] * s[1] * s[0] - s[2] * c[0];
  M[0][2] = c[2] * s[1] * c[0] + s[2] * s[0];
  M[1][0] = s[2] * c[1];
  M[1][1] = s[2] * s[1] * s[0] + c[2] * c[0];
  M[1][2] = s[2] * s[1] * c[0] - c[2] * s[0];
  M[2][0] = -s[2];
  M[2][1] = c[1] * s[0];
  M[2][2] = c[2] * c[0];
}
```