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

```asm
<glmComputeBarycentricCoordinates3d>:
  endbr64
  push   %r15
  mov    %r8,%r15
  push   %r14
  mov    %rdx,%r14
  mov    %rsi,%rdx
  mov    %rcx,%rsi
  push   %r13
  mov    %rcx,%r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0xa8,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x98(%rsp)
  xor    %eax,%eax
  lea    0x40(%rsp),%r12
  lea    0x60(%rsp),%rbp
  mov    %r12,%rdi
  call   <glmMakeVector3d@plt>
  mov    %r14,%rdx
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <glmMakeVector3d@plt>
  mov    %r12,%rsi
  mov    %r12,%rdi
  lea    0x80(%rsp),%r14
  call   <glmDotProduct3d@plt>
  mov    %r12,%rsi
  mov    %rbp,%rdi
  movsd  %xmm0,0x8(%rsp)
  call   <glmDotProduct3d@plt>
  mov    %rbp,%rsi
  mov    %rbp,%rdi
  movapd %xmm0,%xmm6
  movsd  %xmm0,0x18(%rsp)
  movhpd 0x8(%rsp),%xmm6
  movaps %xmm6,0x20(%rsp)
  call   <glmDotProduct3d@plt>
  mov    %r15,%rdx
  mov    %r13,%rsi
  mov    %r14,%rdi
  movsd  %xmm0,0x10(%rsp)
  call   <glmMakeVector3d@plt>
  mov    %r12,%rsi
  mov    %r14,%rdi
  call   <glmDotProduct3d@plt>
  mov    %rbp,%rsi
  mov    %r14,%rdi
  movapd %xmm0,%xmm7
  unpcklpd %xmm7,%xmm7
  movaps %xmm7,0x30(%rsp)
  call   <glmDotProduct3d@plt>
  movsd  0x18(%rsp),%xmm2
  movsd  0x8(%rsp),%xmm3
  pxor   %xmm5,%xmm5
  movsd  0x10(%rsp),%xmm1
  unpcklpd %xmm0,%xmm0
  movapd %xmm2,%xmm4
  mulsd  %xmm1,%xmm3
  mulsd  %xmm2,%xmm4
  subsd  %xmm4,%xmm3
  ucomisd %xmm5,%xmm3
  jp     L11
  je     L35
L11:
  movsd  D10(%rip),%xmm4
  xorpd  D0(%rip),%xmm2
  mulpd  0x20(%rsp),%xmm0
  movapd %xmm4,%xmm5
  unpcklpd %xmm2,%xmm1
  divsd  %xmm3,%xmm5
  mulpd  0x30(%rsp),%xmm1
  movapd %xmm1,%xmm2
  addpd  %xmm0,%xmm1
  subpd  %xmm0,%xmm2
  movsd  %xmm2,%xmm1
  movapd %xmm1,%xmm0
  movapd %xmm5,%xmm1
  unpcklpd %xmm1,%xmm1
  mulpd  %xmm1,%xmm0
  subsd  %xmm0,%xmm4
  movapd %xmm0,%xmm5
  unpckhpd %xmm5,%xmm5
  movapd %xmm4,%xmm1
  subsd  %xmm5,%xmm1
L38:
  movups %xmm0,(%rbx)
  movsd  %xmm1,0x10(%rbx)
  mov    0x98(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L39
  add    $0xa8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L35:
  pxor   %xmm0,%xmm0
  pxor   %xmm1,%xmm1
  jmp    L38
L39:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: label: D10
type_guessed: f64
name: disassemble_data
arguments: label: D0
type_guessed: byte[16]

tool: D10: 1

tool: {"D0": [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]}

assistant: ```c
void glmComputeBarycentricCoordinates3d(double result[3], const double v1[3], const double v2[3], const double v3[3], const double p[3]) {
  double a, b, c, u, v, D;
  double tv1[3], tv2[3], tv3[3];
  glmMakeVector3d(tv1, v3, v1);
  glmMakeVector3d(tv2, v3, v2);
  a = glmDotProduct3d(tv1, tv1);
  b = glmDotProduct3d(tv2, tv1);
  c = glmDotProduct3d(tv2, tv2);
  glmMakeVector3d(tv3, v3, p);
  u = glmDotProduct3d(tv3, tv1);
  v = glmDotProduct3d(tv3, tv2);
  D = a * c - b * b;
  if (D == 0) {
    result[0] = 0;
    result[1] = 0;
    result[2] = 0;
    return;
  }
  D = 1.0 / D;
  result[0] = (c * u - b * v) * D;
  result[1] = (-b * u + a * v) * D;
  result[2] = 1 - result[0] - result[1];
}
```