user: 请将以下的汇编代码转换成C语言代码:

```asm
<MagellanRotationMatrix>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %rdi,-0x38(%rbp)
  movsd  %xmm0,-0x40(%rbp)
  movsd  %xmm1,-0x48(%rbp)
  movsd  %xmm2,-0x50(%rbp)
  mov    -0x50(%rbp),%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x30(%rbp)
  mov    -0x50(%rbp),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x28(%rbp)
  mov    -0x48(%rbp),%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x20(%rbp)
  mov    -0x48(%rbp),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x40(%rbp),%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x40(%rbp),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x8(%rbp)
  movsd  -0x30(%rbp),%xmm0
  mulsd  -0x20(%rbp),%xmm0
  mov    -0x38(%rbp),%rax
  movsd  %xmm0,(%rax)
  mov    -0x38(%rbp),%rax
  add    $0x20,%rax
  movsd  -0x28(%rbp),%xmm0
  mulsd  -0x20(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x38(%rbp),%rax
  add    $0x40,%rax
  movsd  -0x18(%rbp),%xmm0
  movq   D23(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  movsd  -0x28(%rbp),%xmm0
  movq   D23(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x10(%rbp),%xmm1
  movsd  -0x30(%rbp),%xmm0
  mulsd  -0x8(%rbp),%xmm0
  mulsd  -0x18(%rbp),%xmm0
  addsd  %xmm1,%xmm0
  mov    -0x38(%rbp),%rax
  movsd  %xmm0,0x8(%rax)
  movsd  -0x30(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x10(%rbp),%xmm1
  movsd  -0x28(%rbp),%xmm0
  mulsd  -0x8(%rbp),%xmm0
  mulsd  -0x18(%rbp),%xmm0
  mov    -0x38(%rbp),%rax
  add    $0x20,%rax
  addsd  %xmm1,%xmm0
  movsd  %xmm0,0x8(%rax)
  mov    -0x38(%rbp),%rax
  add    $0x40,%rax
  movsd  -0x20(%rbp),%xmm0
  mulsd  -0x8(%rbp),%xmm0
  movsd  %xmm0,0x8(%rax)
  movsd  -0x28(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x8(%rbp),%xmm1
  movsd  -0x30(%rbp),%xmm0
  mulsd  -0x10(%rbp),%xmm0
  mulsd  -0x18(%rbp),%xmm0
  addsd  %xmm1,%xmm0
  mov    -0x38(%rbp),%rax
  movsd  %xmm0,0x10(%rax)
  movsd  -0x30(%rbp),%xmm0
  movq   D23(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x8(%rbp),%xmm1
  movsd  -0x28(%rbp),%xmm0
  mulsd  -0x10(%rbp),%xmm0
  mulsd  -0x18(%rbp),%xmm0
  mov    -0x38(%rbp),%rax
  add    $0x20,%rax
  addsd  %xmm1,%xmm0
  movsd  %xmm0,0x10(%rax)
  mov    -0x38(%rbp),%rax
  add    $0x40,%rax
  movsd  -0x20(%rbp),%xmm0
  mulsd  -0x10(%rbp),%xmm0
  movsd  %xmm0,0x10(%rax)
  mov    -0x38(%rbp),%rax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,0x18(%rax)
  mov    -0x38(%rbp),%rax
  add    $0x20,%rax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,0x18(%rax)
  mov    -0x38(%rbp),%rax
  add    $0x40,%rax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,0x18(%rax)
  mov    -0x38(%rbp),%rax
  add    $0x60,%rax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x38(%rbp),%rax
  add    $0x60,%rax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,0x8(%rax)
  mov    -0x38(%rbp),%rax
  add    $0x60,%rax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,0x10(%rax)
  mov    -0x38(%rbp),%rax
  add    $0x60,%rax
  movsd  D11(%rip),%xmm0
  movsd  %xmm0,0x18(%rax)
  mov    $0x1,%eax
  leave
  ret
```

tool_calls: name: read_data
arguments: data_label: D23
datatype: f32[2]
name: read_data
arguments: data_label: D11
datatype: f64

tool: {"D23": [0.0,-0.0]}

tool: D11: 1

assistant: ```c
int MagellanRotationMatrix(Rotate, c, b, a)
double Rotate[4][4];
double c, b, a;
{
  double ca, cb, cc, sa, sb, sc;
  ca = cos(a);
  sa = sin(a);
  cb = cos(b);
  sb = sin(b);
  cc = cos(c);
  sc = sin(c);
  Rotate[0][0] = ca * cb;
  Rotate[1][0] = sa * cb;
  Rotate[2][0] = -sb;
  Rotate[0][1] = -sa * cc + ca * sc * sb;
  Rotate[1][1] = ca * cc + sa * sc * sb;
  Rotate[2][1] = cb * sc;
  Rotate[0][2] = sa * sc + ca * cc * sb;
  Rotate[1][2] = -ca * sc + sa * cc * sb;
  Rotate[2][2] = cb * cc;
  Rotate[0][3] = 0.0;
  Rotate[1][3] = 0.0;
  Rotate[2][3] = 0.0;
  Rotate[3][0] = 0.0;
  Rotate[3][1] = 0.0;
  Rotate[3][2] = 0.0;
  Rotate[3][3] = 1.0;
  return (1 == 1);
}
```