user: What is the c source code of the assembly code below:

```asm
<RotToAxisAng>:
  endbr64
  push   %r12
  mov    %rdx,%r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  sub    $0x10,%rsp
  movsd  (%rdi),%xmm5
  movsd  0x20(%rdi),%xmm4
  movsd  0x40(%rdi),%xmm3
  movsd  D22(%rip),%xmm1
  movapd %xmm5,%xmm0
  movsd  D50(%rip),%xmm6
  addsd  %xmm4,%xmm0
  addsd  %xmm3,%xmm0
  subsd  %xmm1,%xmm0
  mulsd  D10(%rip),%xmm0
  movapd %xmm0,%xmm2
  subsd  %xmm1,%xmm2
  andpd  D20(%rip),%xmm2
  comisd %xmm2,%xmm6
  ja     L0
  movsd  D110(%rip),%xmm2
  mov    %rdi,%rbx
  comisd %xmm0,%xmm2
  jb     L45
  addsd  %xmm1,%xmm3
  comisd %xmm6,%xmm3
  jae    L23
  addsd  %xmm1,%xmm4
  comisd %xmm6,%xmm4
  jae    L29
  addsd  %xmm1,%xmm5
  addsd  %xmm5,%xmm5
  cvttsd2si %xmm5,%edi
  call   <sqrt@plt>
  mov    D22(%rip),%rax
  movapd %xmm0,%xmm2
  movsd  (%rbx),%xmm0
  movq   %rax,%xmm3
  movq   %rax,%xmm1
  divsd  %xmm2,%xmm3
  addsd  %xmm1,%xmm0
  mulsd  %xmm0,%xmm3
  addsd  %xmm0,%xmm0
  cvttsd2si %xmm0,%edi
  movsd  %xmm3,0x8(%rsp)
  call   <sqrt@plt>
  mov    D22(%rip),%rax
  movq   %rax,%xmm2
  movq   %rax,%xmm1
  divsd  %xmm0,%xmm2
  movsd  (%rbx),%xmm0
  addsd  %xmm1,%xmm0
  addsd  %xmm0,%xmm0
  cvttsd2si %xmm0,%edi
  mulsd  0x18(%rbx),%xmm2
  movsd  %xmm2,(%rsp)
  call   <sqrt@plt>
  movsd  0x8(%rsp),%xmm3
  movsd  (%rsp),%xmm2
  mov    D22(%rip),%rax
  movq   %rax,%xmm1
  divsd  %xmm0,%xmm1
  mulsd  0x30(%rbx),%xmm1
L54:
  mov    D115(%rip),%rax
  movsd  %xmm3,0x0(%rbp)
  movsd  %xmm2,0x8(%rbp)
  movsd  %xmm1,0x10(%rbp)
  mov    %rax,(%r12)
  add    $0x10,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nopl   0x0(%rax,%rax,1)
L45:
  call   <acos@plt>
  movsd  %xmm0,(%r12)
  call   <sin@plt>
  movsd  0x38(%rbx),%xmm1
  subsd  0x28(%rbx),%xmm1
  addsd  %xmm0,%xmm0
  divsd  %xmm0,%xmm1
  movsd  %xmm1,0x0(%rbp)
  movsd  0x10(%rbx),%xmm1
  subsd  0x30(%rbx),%xmm1
  divsd  %xmm0,%xmm1
  movsd  %xmm1,0x8(%rbp)
  movsd  0x18(%rbx),%xmm1
  subsd  0x8(%rbx),%xmm1
  divsd  %xmm0,%xmm1
  movsd  %xmm1,0x10(%rbp)
  add    $0x10,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  xchg   %ax,%ax
L0:
  mov    %rbp,%rdi
  mov    $0x18,%edx
  xor    %esi,%esi
  call   <memset@plt>
  movq   $0x0,(%r12)
  add    $0x10,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L29:
  addsd  %xmm4,%xmm4
  cvttsd2si %xmm4,%edi
  call   <sqrt@plt>
  mov    D22(%rip),%rax
  movq   %rax,%xmm3
  movq   %rax,%xmm1
  divsd  %xmm0,%xmm3
  movsd  0x20(%rbx),%xmm0
  addsd  %xmm1,%xmm0
  addsd  %xmm0,%xmm0
  cvttsd2si %xmm0,%edi
  mulsd  0x8(%rbx),%xmm3
  movsd  %xmm3,0x8(%rsp)
  call   <sqrt@plt>
  mov    D22(%rip),%rax
  movapd %xmm0,%xmm4
  movsd  0x20(%rbx),%xmm0
  movq   %rax,%xmm2
  movq   %rax,%xmm1
  divsd  %xmm4,%xmm2
  addsd  %xmm1,%xmm0
  mulsd  %xmm0,%xmm2
  addsd  %xmm0,%xmm0
  cvttsd2si %xmm0,%edi
  movsd  %xmm2,(%rsp)
  call   <sqrt@plt>
  movsd  (%rsp),%xmm2
  mov    D22(%rip),%rax
  movsd  0x8(%rsp),%xmm3
  movq   %rax,%xmm1
  divsd  %xmm0,%xmm1
  mulsd  0x38(%rbx),%xmm1
  jmp    L54
L23:
  addsd  %xmm3,%xmm3
  cvttsd2si %xmm3,%edi
  call   <sqrt@plt>
  mov    D22(%rip),%rax
  movq   %rax,%xmm3
  movq   %rax,%xmm1
  divsd  %xmm0,%xmm3
  movsd  0x40(%rbx),%xmm0
  addsd  %xmm1,%xmm0
  addsd  %xmm0,%xmm0
  cvttsd2si %xmm0,%edi
  mulsd  0x10(%rbx),%xmm3
  movsd  %xmm3,0x8(%rsp)
  call   <sqrt@plt>
  mov    D22(%rip),%rax
  movq   %rax,%xmm2
  movq   %rax,%xmm1
  divsd  %xmm0,%xmm2
  movsd  0x40(%rbx),%xmm0
  addsd  %xmm1,%xmm0
  addsd  %xmm0,%xmm0
  cvttsd2si %xmm0,%edi
  mulsd  0x28(%rbx),%xmm2
  movsd  %xmm2,(%rsp)
  call   <sqrt@plt>
  movsd  (%rsp),%xmm2
  mov    D22(%rip),%rax
  movapd %xmm0,%xmm4
  movsd  0x40(%rbx),%xmm0
  movsd  0x8(%rsp),%xmm3
  movq   %rax,%xmm1
  addsd  %xmm1,%xmm0
  divsd  %xmm4,%xmm1
  mulsd  %xmm0,%xmm1
  jmp    L54
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D22
type: f64
name: extract_symbolic_data
arguments: data_tag: D50
type: byte[8]
name: extract_symbolic_data
arguments: data_tag: D10
type: f32[2]
name: extract_symbolic_data
arguments: data_tag: D20
type: qword[2]
name: extract_symbolic_data
arguments: data_tag: D110
type: f32[2]
name: extract_symbolic_data
arguments: data_tag: D115
type: f64

tool: D22: 1

tool: {"D50": [0x8d,0xed,0xb5,0xa0,0xf7,0xc6,0xb0,0x3e]}

tool: {"D10": [0.0,1.75]}

tool: {"D20": [0x7fffffffffffffff,0x0000000000000000]}

tool: {"D110": [0.0,-1.875]}

tool: D115: 3.141592653589793

assistant: ```c
void RotToAxisAng(double R[3][3], double omghat[3], double *theta) {
  double tmp;
  double omg[3] = {0};
  double acosinput = (R[0][0] + R[1][1] + R[2][2] - 1.0) / 2.0;
  if (fabs(acosinput - 1.0) < 1.0E-6) {
    memset(omghat, 0, 3 * sizeof(double));
    *theta = 0.0;
  } else if (acosinput <= -1.0) {
    if ((1.0 + R[2][2]) >= 1.0E-6) {
      omg[0] = 1.0 / sqrt(2 * (1.0 + R[2][2])) * R[0][2];
      omg[1] = 1.0 / sqrt(2 * (1.0 + R[2][2])) * R[1][2];
      omg[2] = 1.0 / sqrt(2 * (1.0 + R[2][2])) * (1.0 + R[2][2]);
    } else if ((1.0 + R[1][1] >= 1.0E-6)) {
      omg[0] = 1.0 / sqrt(2 * (1.0 + R[1][1])) * R[0][1];
      omg[1] = 1.0 / sqrt(2 * (1.0 + R[1][1])) * (1.0 + R[1][1]);
      omg[2] = 1.0 / sqrt(2 * (1.0 + R[1][1])) * R[2][1];
    } else {
      omg[0] = 1.0 / sqrt(2 * (1.0 + R[0][0])) * (1.0 + R[0][0]);
      omg[1] = 1.0 / sqrt(2 * (1.0 + R[0][0])) * R[1][0];
      omg[2] = 1.0 / sqrt(2 * (1.0 + R[0][0])) * R[2][0];
    }
    omghat[0] = omg[0];
    omghat[1] = omg[1];
    omghat[2] = omg[2];
    *theta = 3.14159265358979323846;
  } else {
    *theta = acos(acosinput);
    tmp = 2.0 * sin(*theta);
    omghat[0] = (R[2][1] - R[1][2]) / tmp;
    omghat[1] = (R[0][2] - R[2][0]) / tmp;
    omghat[2] = (R[1][0] - R[0][1]) / tmp;
  }
  return;
}
```