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

```asm
<PolygonD_Clip>:
  endbr64
  movapd %xmm0,%xmm8
  mov    %edx,%r10d
  xor    %r8d,%r8d
  test   %edi,%edi
  jle    L53
  movsd  (%rsi),%xmm5
  movapd %xmm4,%xmm6
  mov    %rsi,%r9
  xor    %edx,%edx
  xorpd  D0(%rip),%xmm6
  mulsd  %xmm0,%xmm5
  movsd  0x8(%rsi),%xmm0
  mulsd  %xmm1,%xmm0
  addsd  %xmm0,%xmm5
  movsd  0x10(%rsi),%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm0,%xmm5
  subsd  %xmm3,%xmm5
  jmp    L117
  nopl   0x0(%rax,%rax,1)
L20:
  comisd %xmm0,%xmm6
  jbe    L16
L49:
  cmp    %r10d,%r8d
  jge    L31
  movapd %xmm5,%xmm7
  movsd  (%r9),%xmm9
  add    $0x18,%rcx
  subsd  %xmm0,%xmm7
  divsd  %xmm7,%xmm5
  movsd  (%rax),%xmm7
  subsd  %xmm9,%xmm7
  mulsd  %xmm5,%xmm7
  addsd  %xmm9,%xmm7
  movsd  %xmm7,-0x18(%rcx)
  movsd  0x8(%r9),%xmm9
  movsd  0x8(%rax),%xmm7
  subsd  %xmm9,%xmm7
  mulsd  %xmm5,%xmm7
  addsd  %xmm9,%xmm7
  movsd  %xmm7,-0x10(%rcx)
  movsd  0x10(%r9),%xmm9
  movsd  0x10(%rax),%xmm7
  subsd  %xmm9,%xmm7
  mulsd  %xmm7,%xmm5
  addsd  %xmm9,%xmm5
  movsd  %xmm5,-0x8(%rcx)
L31:
  add    $0x1,%r8d
L96:
  cmp    %edi,%edx
  je     L53
L90:
  movapd %xmm0,%xmm5
  mov    %rax,%r9
L117:
  add    $0x1,%edx
  mov    %rsi,%rax
  cmp    %edi,%edx
  jge    L42
  lea    (%rdx,%rdx,2),%eax
  cltq
  lea    (%rsi,%rax,8),%rax
L42:
  movsd  (%rax),%xmm0
  movsd  0x8(%rax),%xmm7
  comisd %xmm6,%xmm5
  mulsd  %xmm1,%xmm7
  mulsd  %xmm8,%xmm0
  addsd  %xmm7,%xmm0
  movsd  0x10(%rax),%xmm7
  mulsd  %xmm2,%xmm7
  addsd  %xmm7,%xmm0
  subsd  %xmm3,%xmm0
  jb     L0
  cmp    %r8d,%r10d
  jle    L44
  movsd  (%r9),%xmm7
  add    $0x18,%rcx
  movsd  %xmm7,-0x18(%rcx)
  movsd  0x8(%r9),%xmm7
  movsd  %xmm7,-0x10(%rcx)
  movsd  0x10(%r9),%xmm7
  movsd  %xmm7,-0x8(%rcx)
L44:
  add    $0x1,%r8d
L0:
  comisd %xmm4,%xmm5
  ja     L20
L16:
  comisd %xmm5,%xmm6
  jbe    L96
  comisd %xmm4,%xmm0
  ja     L49
  cmp    %edi,%edx
  jne    L90
L53:
  mov    %r8d,%eax
  ret
```

tool_calls: name: disassemble_data
arguments: label: D0
data_type: byte[16]

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

assistant: ```c
int PolygonD_Clip(int innumpoints, const double *inpoints, double planenormalx, double planenormaly, double planenormalz, double planedist, double epsilon, int outfrontmaxpoints, double *outfrontpoints) {
  int i, frontcount = 0;
  const double *n, *p;
  double frac, pdist, ndist;
  if (innumpoints < 1)
    return 0;
  n = inpoints;
  ndist = n[0] * planenormalx + n[1] * planenormaly + n[2] * planenormalz - planedist;
  for (i = 0; i < innumpoints; i++) {
    p = n;
    pdist = ndist;
    n = inpoints + ((i + 1) < innumpoints ? (i + 1) : 0) * 3;
    ndist = n[0] * planenormalx + n[1] * planenormaly + n[2] * planenormalz - planedist;
    if (pdist >= -epsilon) {
      if (frontcount < outfrontmaxpoints) {
        *outfrontpoints++ = p[0];
        *outfrontpoints++ = p[1];
        *outfrontpoints++ = p[2];
      }
      frontcount++;
    }
    if ((pdist > epsilon && ndist < -epsilon) || (pdist < -epsilon && ndist > epsilon)) {
      frac = pdist / (pdist - ndist);
      if (frontcount < outfrontmaxpoints) {
        *outfrontpoints++ = p[0] + frac * (n[0] - p[0]);
        *outfrontpoints++ = p[1] + frac * (n[1] - p[1]);
        *outfrontpoints++ = p[2] + frac * (n[2] - p[2]);
      }
      frontcount++;
    }
  }
  return frontcount;
}
```