user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<MatrixLog3>:
  endbr64
  push   %rbp
  pxor   %xmm0,%xmm0
  mov    %rsi,%rbp
  push   %rbx
  sub    $0x38,%rsp
  movsd  (%rdi),%xmm1
  movsd  0x20(%rdi),%xmm5
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  movaps %xmm0,0x10(%rsp)
  movsd  0x40(%rdi),%xmm4
  movsd  D65(%rip),%xmm2
  movapd %xmm1,%xmm0
  movsd  D12(%rip),%xmm6
  movq   $0x0,0x20(%rsp)
  addsd  %xmm5,%xmm0
  addsd  %xmm4,%xmm0
  subsd  %xmm2,%xmm0
  mulsd  D82(%rip),%xmm0
  movapd %xmm0,%xmm3
  subsd  %xmm2,%xmm3
  andpd  D9(%rip),%xmm3
  comisd %xmm3,%xmm6
  ja     L89
  movsd  D2(%rip),%xmm3
  mov    %rdi,%rbx
  comisd %xmm0,%xmm3
  jb     L2
  addsd  %xmm2,%xmm4
  comisd %xmm6,%xmm4
  jae    L10
  addsd  %xmm2,%xmm5
  comisd %xmm6,%xmm5
  jae    L90
  addsd  %xmm2,%xmm1
  addsd  %xmm1,%xmm1
  cvttsd2si %xmm1,%edi
  call   <sqrt@plt>
  mov    D65(%rip),%rax
  movapd %xmm0,%xmm3
  movsd  (%rbx),%xmm0
  movq   %rax,%xmm1
  movq   %rax,%xmm2
  divsd  %xmm3,%xmm1
  addsd  %xmm2,%xmm0
  mulsd  %xmm0,%xmm1
  addsd  %xmm0,%xmm0
  cvttsd2si %xmm0,%edi
  movsd  %xmm1,0x10(%rsp)
  call   <sqrt@plt>
  mov    D65(%rip),%rax
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  movq   %rax,%xmm2
  divsd  %xmm1,%xmm0
  mulsd  0x18(%rbx),%xmm0
  movsd  %xmm0,0x18(%rsp)
  movsd  (%rbx),%xmm0
  addsd  %xmm2,%xmm0
  addsd  %xmm0,%xmm0
  cvttsd2si %xmm0,%edi
  call   <sqrt@plt>
  mov    D65(%rip),%rax
  movq   %rax,%xmm2
  divsd  %xmm0,%xmm2
  mulsd  0x30(%rbx),%xmm2
L80:
  movsd  D86(%rip),%xmm0
  movsd  0x10(%rsp),%xmm1
  lea    0x10(%rsp),%rdi
  mov    %rbp,%rsi
  mulsd  %xmm0,%xmm1
  mulsd  %xmm0,%xmm2
  movsd  %xmm1,0x10(%rsp)
  movsd  0x18(%rsp),%xmm1
  movsd  %xmm2,0x20(%rsp)
  mulsd  %xmm0,%xmm1
  movsd  %xmm1,0x18(%rsp)
  call   <VecToso3@plt>
L13:
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L93
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  ret
  nopl   0x0(%rax)
L2:
  movsd  %xmm1,0x8(%rsp)
  call   <acos@plt>
  movsd  %xmm0,(%rsp)
  call   <sin@plt>
  mov    D65(%rip),%rax
  movsd  0x8(%rsp),%xmm1
  lea    0x8(%rbx),%rdx
  addsd  %xmm0,%xmm0
  movsd  (%rsp),%xmm3
  movq   %rax,%xmm2
  xor    %eax,%eax
  divsd  %xmm0,%xmm2
  movapd %xmm1,%xmm0
L91:
  subsd  %xmm0,%xmm1
  mulsd  %xmm2,%xmm1
  mulsd  %xmm3,%xmm1
  movsd  %xmm1,0x0(%rbp,%rax,1)
  movsd  0x8(%rbx,%rax,1),%xmm0
  subsd  0x10(%rdx),%xmm0
  mulsd  %xmm2,%xmm0
  mulsd  %xmm3,%xmm0
  movsd  %xmm0,0x8(%rbp,%rax,1)
  movsd  0x10(%rbx,%rax,1),%xmm0
  subsd  0x28(%rdx),%xmm0
  mulsd  %xmm2,%xmm0
  mulsd  %xmm3,%xmm0
  movsd  %xmm0,0x10(%rbp,%rax,1)
  add    $0x18,%rax
  cmp    $0x48,%rax
  je     L13
  movsd  (%rdx),%xmm0
  movsd  (%rbx,%rax,1),%xmm1
  add    $0x8,%rdx
  jmp    L91
  nopw   0x0(%rax,%rax,1)
L89:
  mov    $0x48,%edx
  xor    %esi,%esi
  mov    %rbp,%rdi
  call   <memset@plt>
  jmp    L13
  nopl   0x0(%rax)
L90:
  addsd  %xmm5,%xmm5
  cvttsd2si %xmm5,%edi
  call   <sqrt@plt>
  mov    D65(%rip),%rax
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  movq   %rax,%xmm2
  divsd  %xmm1,%xmm0
  mulsd  0x8(%rbx),%xmm0
  movsd  %xmm0,0x10(%rsp)
  movsd  0x20(%rbx),%xmm0
  addsd  %xmm2,%xmm0
  addsd  %xmm0,%xmm0
  cvttsd2si %xmm0,%edi
  call   <sqrt@plt>
  mov    D65(%rip),%rax
  movapd %xmm0,%xmm3
  movsd  0x20(%rbx),%xmm0
  movq   %rax,%xmm1
  movq   %rax,%xmm2
  divsd  %xmm3,%xmm1
  addsd  %xmm2,%xmm0
  mulsd  %xmm0,%xmm1
  addsd  %xmm0,%xmm0
  cvttsd2si %xmm0,%edi
  movsd  %xmm1,0x18(%rsp)
  call   <sqrt@plt>
  mov    D65(%rip),%rax
  movq   %rax,%xmm2
  divsd  %xmm0,%xmm2
  mulsd  0x38(%rbx),%xmm2
  jmp    L80
  nopw   0x0(%rax,%rax,1)
L10:
  addsd  %xmm4,%xmm4
  cvttsd2si %xmm4,%edi
  call   <sqrt@plt>
  mov    D65(%rip),%rax
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  movq   %rax,%xmm2
  divsd  %xmm1,%xmm0
  mulsd  0x10(%rbx),%xmm0
  movsd  %xmm0,0x10(%rsp)
  movsd  0x40(%rbx),%xmm0
  addsd  %xmm2,%xmm0
  addsd  %xmm0,%xmm0
  cvttsd2si %xmm0,%edi
  call   <sqrt@plt>
  mov    D65(%rip),%rax
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  movq   %rax,%xmm2
  divsd  %xmm1,%xmm0
  mulsd  0x28(%rbx),%xmm0
  movsd  %xmm0,0x18(%rsp)
  movsd  0x40(%rbx),%xmm0
  addsd  %xmm2,%xmm0
  addsd  %xmm0,%xmm0
  cvttsd2si %xmm0,%edi
  call   <sqrt@plt>
  mov    D65(%rip),%rax
  movapd %xmm0,%xmm1
  movsd  0x40(%rbx),%xmm0
  movq   %rax,%xmm2
  addsd  %xmm2,%xmm0
  divsd  %xmm1,%xmm2
  mulsd  %xmm0,%xmm2
  jmp    L80
L93:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: label: D65
type: f64
name: disassemble_data
arguments: label: D12
type: byte[8]
name: disassemble_data
arguments: label: D82
type: f32[2]
name: disassemble_data
arguments: label: D9
type: qword[2]
name: disassemble_data
arguments: label: D2
type: f32[2]
name: disassemble_data
arguments: label: D86
type: f64

tool: D65: 1

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

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

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

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

tool: D86: 3.141592653589793

assistant: ```c
void MatrixLog3(double R[3][3], double so3Mat[3][3]) {
  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(so3Mat, 0, 9 * sizeof(double));
  } 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];
    }
    omg[0] = 3.14159265358979323846 * omg[0];
    omg[1] = 3.14159265358979323846 * omg[1];
    omg[2] = 3.14159265358979323846 * omg[2];
    VecToso3(omg, so3Mat);
  } else {
    int i;
    int j;
    double theta = acos(acosinput);
    for (i = 0; i < 3; i++) {
      for (j = 0; j < 3; j++) {
        so3Mat[i][j] = 1.0 / (2.0 * sin(theta)) * (R[i][j] - R[j][i]) * theta;
      }
    }
  }
  return;
}
```