user: Please show me the C implementation that matches the assembly code listed below:

```asm
<glmGenerateRotationMatrixFromAngles4dDeg>:
  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    -0x40(%rbp),%rax
  movq   %rax,%xmm0
  call   <glmRadd@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x40(%rbp)
  mov    -0x48(%rbp),%rax
  movq   %rax,%xmm0
  call   <glmRadd@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x48(%rbp)
  mov    -0x50(%rbp),%rax
  movq   %rax,%xmm0
  call   <glmRadd@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x50(%rbp)
  mov    -0x50(%rbp),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x30(%rbp)
  mov    -0x50(%rbp),%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x28(%rbp)
  mov    -0x48(%rbp),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x20(%rbp)
  mov    -0x48(%rbp),%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x40(%rbp),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x40(%rbp),%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x8(%rbp)
  movsd  -0x18(%rbp),%xmm0
  mulsd  -0x28(%rbp),%xmm0
  mov    -0x38(%rbp),%rax
  movsd  %xmm0,(%rax)
  mov    -0x38(%rbp),%rax
  add    $0x8,%rax
  movsd  -0x18(%rbp),%xmm0
  mulsd  -0x30(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x38(%rbp),%rax
  add    $0x10,%rax
  movsd  -0x20(%rbp),%xmm0
  movq   D8(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x38(%rbp),%rax
  add    $0x18,%rax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,(%rax)
  movsd  -0x10(%rbp),%xmm0
  mulsd  -0x20(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x28(%rbp),%xmm1
  movsd  -0x30(%rbp),%xmm0
  movq   D8(%rip),%xmm2
  xorpd  %xmm2,%xmm0
  mulsd  -0x8(%rbp),%xmm0
  mov    -0x38(%rbp),%rax
  add    $0x20,%rax
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  movsd  -0x10(%rbp),%xmm0
  mulsd  -0x20(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x30(%rbp),%xmm1
  movsd  -0x8(%rbp),%xmm0
  mulsd  -0x28(%rbp),%xmm0
  mov    -0x38(%rbp),%rax
  add    $0x28,%rax
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x38(%rbp),%rax
  add    $0x30,%rax
  movsd  -0x10(%rbp),%xmm0
  mulsd  -0x18(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x38(%rbp),%rax
  add    $0x38,%rax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,(%rax)
  movsd  -0x8(%rbp),%xmm0
  mulsd  -0x20(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x28(%rbp),%xmm1
  movsd  -0x10(%rbp),%xmm0
  mulsd  -0x30(%rbp),%xmm0
  mov    -0x38(%rbp),%rax
  add    $0x40,%rax
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  movsd  -0x8(%rbp),%xmm0
  mulsd  -0x20(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x30(%rbp),%xmm1
  movsd  -0x10(%rbp),%xmm0
  movq   D8(%rip),%xmm2
  xorpd  %xmm2,%xmm0
  mulsd  -0x28(%rbp),%xmm0
  mov    -0x38(%rbp),%rax
  add    $0x48,%rax
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x38(%rbp),%rax
  add    $0x50,%rax
  movsd  -0x8(%rbp),%xmm0
  mulsd  -0x18(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x38(%rbp),%rax
  add    $0x58,%rax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x38(%rbp),%rax
  add    $0x60,%rax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x38(%rbp),%rax
  add    $0x68,%rax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x38(%rbp),%rax
  add    $0x70,%rax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x38(%rbp),%rax
  add    $0x78,%rax
  movsd  D35(%rip),%xmm0
  movsd  %xmm0,(%rax)
  nop
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: label: D8
type_guessed: f32[2]
name: extract_symbolic_data
arguments: label: D35
type_guessed: f32[2]

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

tool: {"D35": [0.0,1.875]}

assistant: ```c
void glmGenerateRotationMatrixFromAngles4dDeg(double matrix[16], double a1, double a2, double a3) {
  double sr, sp, sy, cr, cp, cy;
  a1 = glmRadd(a1);
  a2 = glmRadd(a2);
  a3 = glmRadd(a3);
  sy = sin(a3);
  cy = cos(a3);
  sp = sin(a2);
  cp = cos(a2);
  sr = sin(a1);
  cr = cos(a1);
  matrix[0] = cp * cy;
  matrix[1] = cp * sy;
  matrix[2] = -sp;
  matrix[3] = 0;
  matrix[4] = sr * sp * cy + cr * -sy;
  matrix[5] = sr * sp * sy + cr * cy;
  matrix[6] = sr * cp;
  matrix[7] = 0;
  matrix[8] = (cr * sp * cy + -sr * -sy);
  matrix[9] = (cr * sp * sy + -sr * cy);
  matrix[10] = cr * cp;
  matrix[11] = 0;
  matrix[12] = 0.0;
  matrix[13] = 0.0;
  matrix[14] = 0.0;
  matrix[15] = 1;
}
```