user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<MatrixLog3>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %rdi,-0x48(%rbp)
  mov    %rsi,-0x50(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movq   $0x0,-0x20(%rbp)
  movq   $0x0,-0x18(%rbp)
  movq   $0x0,-0x10(%rbp)
  mov    -0x48(%rbp),%rax
  movsd  (%rax),%xmm1
  mov    -0x48(%rbp),%rax
  add    $0x18,%rax
  movsd  0x8(%rax),%xmm0
  addsd  %xmm0,%xmm1
  mov    -0x48(%rbp),%rax
  add    $0x30,%rax
  movsd  0x10(%rax),%xmm0
  addsd  %xmm1,%xmm0
  movsd  D216(%rip),%xmm1
  subsd  %xmm1,%xmm0
  movsd  D226(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x30(%rbp)
  movsd  -0x30(%rbp),%xmm0
  movsd  D216(%rip),%xmm1
  subsd  %xmm1,%xmm0
  movq   D315(%rip),%xmm1
  andpd  %xmm0,%xmm1
  movsd  D318(%rip),%xmm0
  comisd %xmm1,%xmm0
  jbe    L61
  mov    -0x50(%rbp),%rax
  mov    $0x48,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  jmp    L103
L61:
  movsd  D308(%rip),%xmm0
  comisd -0x30(%rbp),%xmm0
  jb     L115
  mov    -0x48(%rbp),%rax
  add    $0x30,%rax
  movsd  0x10(%rax),%xmm1
  movsd  D216(%rip),%xmm0
  addsd  %xmm1,%xmm0
  comisd D318(%rip),%xmm0
  jb     L109
  mov    -0x48(%rbp),%rax
  add    $0x30,%rax
  movsd  0x10(%rax),%xmm1
  movsd  D216(%rip),%xmm0
  addsd  %xmm1,%xmm0
  addsd  %xmm0,%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,%edi
  call   <sqrt@plt>
  movsd  D216(%rip),%xmm1
  divsd  %xmm0,%xmm1
  mov    -0x48(%rbp),%rax
  movsd  0x10(%rax),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  mov    -0x48(%rbp),%rax
  add    $0x30,%rax
  movsd  0x10(%rax),%xmm1
  movsd  D216(%rip),%xmm0
  addsd  %xmm1,%xmm0
  addsd  %xmm0,%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,%edi
  call   <sqrt@plt>
  movsd  D216(%rip),%xmm1
  divsd  %xmm0,%xmm1
  mov    -0x48(%rbp),%rax
  add    $0x18,%rax
  movsd  0x10(%rax),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  mov    -0x48(%rbp),%rax
  add    $0x30,%rax
  movsd  0x10(%rax),%xmm1
  movsd  D216(%rip),%xmm0
  addsd  %xmm1,%xmm0
  addsd  %xmm0,%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,%edi
  call   <sqrt@plt>
  movsd  D216(%rip),%xmm1
  divsd  %xmm0,%xmm1
  mov    -0x48(%rbp),%rax
  add    $0x30,%rax
  movsd  0x10(%rax),%xmm2
  movsd  D216(%rip),%xmm0
  addsd  %xmm2,%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  jmp    L59
L109:
  mov    -0x48(%rbp),%rax
  add    $0x18,%rax
  movsd  0x8(%rax),%xmm1
  movsd  D216(%rip),%xmm0
  addsd  %xmm1,%xmm0
  comisd D318(%rip),%xmm0
  jb     L84
  mov    -0x48(%rbp),%rax
  add    $0x18,%rax
  movsd  0x8(%rax),%xmm1
  movsd  D216(%rip),%xmm0
  addsd  %xmm1,%xmm0
  addsd  %xmm0,%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,%edi
  call   <sqrt@plt>
  movsd  D216(%rip),%xmm1
  divsd  %xmm0,%xmm1
  mov    -0x48(%rbp),%rax
  movsd  0x8(%rax),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  mov    -0x48(%rbp),%rax
  add    $0x18,%rax
  movsd  0x8(%rax),%xmm1
  movsd  D216(%rip),%xmm0
  addsd  %xmm1,%xmm0
  addsd  %xmm0,%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,%edi
  call   <sqrt@plt>
  movsd  D216(%rip),%xmm1
  divsd  %xmm0,%xmm1
  mov    -0x48(%rbp),%rax
  add    $0x18,%rax
  movsd  0x8(%rax),%xmm2
  movsd  D216(%rip),%xmm0
  addsd  %xmm2,%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  mov    -0x48(%rbp),%rax
  add    $0x18,%rax
  movsd  0x8(%rax),%xmm1
  movsd  D216(%rip),%xmm0
  addsd  %xmm1,%xmm0
  addsd  %xmm0,%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,%edi
  call   <sqrt@plt>
  movsd  D216(%rip),%xmm1
  divsd  %xmm0,%xmm1
  mov    -0x48(%rbp),%rax
  add    $0x30,%rax
  movsd  0x8(%rax),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  jmp    L59
L84:
  mov    -0x48(%rbp),%rax
  movsd  (%rax),%xmm1
  movsd  D216(%rip),%xmm0
  addsd  %xmm1,%xmm0
  addsd  %xmm0,%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,%edi
  call   <sqrt@plt>
  movsd  D216(%rip),%xmm1
  divsd  %xmm0,%xmm1
  mov    -0x48(%rbp),%rax
  movsd  (%rax),%xmm2
  movsd  D216(%rip),%xmm0
  addsd  %xmm2,%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  mov    -0x48(%rbp),%rax
  movsd  (%rax),%xmm1
  movsd  D216(%rip),%xmm0
  addsd  %xmm1,%xmm0
  addsd  %xmm0,%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,%edi
  call   <sqrt@plt>
  movsd  D216(%rip),%xmm1
  divsd  %xmm0,%xmm1
  mov    -0x48(%rbp),%rax
  add    $0x18,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  mov    -0x48(%rbp),%rax
  movsd  (%rax),%xmm1
  movsd  D216(%rip),%xmm0
  addsd  %xmm1,%xmm0
  addsd  %xmm0,%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,%edi
  call   <sqrt@plt>
  movsd  D216(%rip),%xmm1
  divsd  %xmm0,%xmm1
  mov    -0x48(%rbp),%rax
  add    $0x30,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
L59:
  movsd  -0x20(%rbp),%xmm1
  movsd  D90(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movsd  -0x18(%rbp),%xmm1
  movsd  D90(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movsd  -0x10(%rbp),%xmm1
  movsd  D90(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  mov    -0x50(%rbp),%rdx
  lea    -0x20(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <VecToso3@plt>
  jmp    L103
L115:
  mov    -0x30(%rbp),%rax
  movq   %rax,%xmm0
  call   <acos@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x28(%rbp)
  movl   $0x0,-0x38(%rbp)
  jmp    L44
L48:
  movl   $0x0,-0x34(%rbp)
  jmp    L86
L83:
  mov    -0x28(%rbp),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movapd %xmm0,%xmm2
  addsd  %xmm0,%xmm2
  movsd  D216(%rip),%xmm0
  movapd %xmm0,%xmm1
  divsd  %xmm2,%xmm1
  mov    -0x38(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  shl    $0x3,%rax
  mov    %rax,%rdx
  mov    -0x48(%rbp),%rax
  add    %rax,%rdx
  mov    -0x34(%rbp),%eax
  cltq
  movsd  (%rdx,%rax,8),%xmm0
  mov    -0x34(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  shl    $0x3,%rax
  mov    %rax,%rdx
  mov    -0x48(%rbp),%rax
  add    %rax,%rdx
  mov    -0x38(%rbp),%eax
  cltq
  movsd  (%rdx,%rax,8),%xmm2
  subsd  %xmm2,%xmm0
  mulsd  %xmm1,%xmm0
  mov    -0x38(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  shl    $0x3,%rax
  mov    %rax,%rdx
  mov    -0x50(%rbp),%rax
  add    %rax,%rdx
  mulsd  -0x28(%rbp),%xmm0
  mov    -0x34(%rbp),%eax
  cltq
  movsd  %xmm0,(%rdx,%rax,8)
  addl   $0x1,-0x34(%rbp)
L86:
  cmpl   $0x2,-0x34(%rbp)
  jle    L83
  addl   $0x1,-0x38(%rbp)
L44:
  cmpl   $0x2,-0x38(%rbp)
  jle    L48
  nop
L103:
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L73
  call   <__stack_chk_fail@plt>
L73:
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: data_label: D216
type_guessed: f64
name: disassemble_data
arguments: data_label: D226
type_guessed: f64
name: disassemble_data
arguments: data_label: D315
type_guessed: qword
name: disassemble_data
arguments: data_label: D318
type_guessed: byte[16]
name: disassemble_data
arguments: data_label: D308
type_guessed: f32[2]
name: disassemble_data
arguments: data_label: D90
type_guessed: f64

tool: D216: 1

tool: D226: 2

tool: D315: 9223372036854775807

tool: {"D318": [0x8d,0xed,0xb5,0xa0,0xf7,0xc6,0xb0,0x3e,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xbf]}

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

tool: D90: 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;
}
```