user: Translate the below assembly code into C programming language:

```asm
<MatToQuat>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x28,%rsp
  movss  (%rdi),%xmm1
  movss  0x10(%rdi),%xmm2
  movss  0x20(%rdi),%xmm3
  movaps %xmm1,%xmm0
  addss  %xmm2,%xmm0
  addss  %xmm3,%xmm0
  comiss D48(%rip),%xmm0
  ja     L14
  comiss %xmm1,%xmm2
  mov    $0xc,%r15d
  mov    $0x0,%ecx
  seta   %r13b
  cmova  %r15,%rcx
  movzbl %r13b,%r13d
  lea    (%rdi,%r13,4),%rsi
  comiss (%rsi,%rcx,1),%xmm3
  ja     L8
  lea    D56(%rip),%rax
  mov    %rcx,%r15
  movslq (%rax,%r13,4),%rcx
  movslq (%rax,%rcx,4),%r12
  lea    0x0(,%r13,4),%rax
  lea    (%rcx,%rcx,2),%rsi
  mov    %rax,0x10(%rsp)
  lea    (%rdi,%rsi,4),%rsi
  lea    0x0(%rbp,%rcx,4),%r14
  lea    0x0(,%r12,4),%rax
  lea    (%r12,%r12,2),%rdi
  movss  (%rsi,%rcx,4),%xmm1
  mov    %rax,0x18(%rsp)
  shl    $0x2,%rdi
L27:
  add    %rbx,%r15
  add    %rdi,%rbx
  mov    %rcx,0x8(%rsp)
  addss  (%rbx,%r12,4),%xmm1
  movss  (%r15,%r13,4),%xmm0
  mov    %rsi,(%rsp)
  subss  %xmm1,%xmm0
  addss  D59(%rip),%xmm0
  call   <sqrt@plt>
  mov    0x10(%rsp),%rax
  mov    0x8(%rsp),%rcx
  movsd  D48(%rip),%xmm1
  movapd %xmm0,%xmm2
  mov    (%rsp),%rsi
  mulsd  %xmm1,%xmm2
  divsd  %xmm0,%xmm1
  cvtsd2ss %xmm2,%xmm2
  movss  %xmm2,0x0(%rbp,%rax,1)
  movss  (%rbx,%rcx,4),%xmm0
  subss  (%rsi,%r12,4),%xmm0
  mov    0x18(%rsp),%rax
  cvtss2sd %xmm0,%xmm0
  mulsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,0xc(%rbp)
  movss  (%rsi,%r13,4),%xmm0
  addss  (%r15,%rcx,4),%xmm0
  cvtss2sd %xmm0,%xmm0
  mulsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,(%r14)
  movss  (%rbx,%r13,4),%xmm0
  addss  (%r15,%r12,4),%xmm0
  cvtss2sd %xmm0,%xmm0
  mulsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,0x0(%rbp,%rax,1)
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nop
L8:
  mov    %rdi,%rsi
  mov    %rbp,%r14
  mov    $0xc,%edi
  xor    %ecx,%ecx
  movq   $0x4,0x18(%rsp)
  mov    $0x18,%r15d
  mov    $0x2,%r13d
  mov    $0x1,%r12d
  movq   $0x8,0x10(%rsp)
  jmp    L27
  cs nopw 0x0(%rax,%rax,1)
L14:
  addss  D59(%rip),%xmm0
  call   <sqrt@plt>
  movsd  D48(%rip),%xmm2
  movapd %xmm0,%xmm1
  mulsd  %xmm2,%xmm1
  divsd  %xmm0,%xmm2
  cvtsd2ss %xmm1,%xmm1
  movss  %xmm1,0xc(%rbp)
  movss  0x1c(%rbx),%xmm0
  subss  0x14(%rbx),%xmm0
  cvtss2sd %xmm0,%xmm0
  mulsd  %xmm2,%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,0x0(%rbp)
  movss  0x8(%rbx),%xmm0
  subss  0x18(%rbx),%xmm0
  cvtss2sd %xmm0,%xmm0
  mulsd  %xmm2,%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,0x4(%rbp)
  movss  0xc(%rbx),%xmm1
  subss  0x4(%rbx),%xmm1
  pxor   %xmm0,%xmm0
  cvtss2sd %xmm1,%xmm0
  mulsd  %xmm2,%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,0x8(%rbp)
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: extract_symbolic_data
arguments: tag: D48
datatype: f64
name: extract_symbolic_data
arguments: tag: D56
datatype: string
name: extract_symbolic_data
arguments: tag: D59
datatype: f32

tool: D48: 0.5

tool: D56: 

tool: D59: 1

assistant: ```c
void MatToQuat(float srcMatrix[3][3], float destQuat[4]) {
  double trace, s;
  int i, j, k;
  static int next[3] = {1, 2, 0};
  trace = srcMatrix[0][0] + srcMatrix[1][1] + srcMatrix[2][2];
  if (trace > 0.0) {
    s = sqrt(trace + 1.0);
    destQuat[3] = s * 0.5;
    s = 0.5 / s;
    destQuat[0] = (srcMatrix[2][1] - srcMatrix[1][2]) * s;
    destQuat[1] = (srcMatrix[0][2] - srcMatrix[2][0]) * s;
    destQuat[2] = (srcMatrix[1][0] - srcMatrix[0][1]) * s;
  } else {
    i = 0;
    if (srcMatrix[1][1] > srcMatrix[0][0])
      i = 1;
    if (srcMatrix[2][2] > srcMatrix[i][i])
      i = 2;
    j = next[i];
    k = next[j];
    s = sqrt((srcMatrix[i][i] - (srcMatrix[j][j] + srcMatrix[k][k])) + 1.0);
    destQuat[i] = s * 0.5;
    s = 0.5 / s;
    destQuat[3] = (srcMatrix[k][j] - srcMatrix[j][k]) * s;
    destQuat[j] = (srcMatrix[j][i] + srcMatrix[i][j]) * s;
    destQuat[k] = (srcMatrix[k][i] + srcMatrix[i][k]) * s;
  }
}
```