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

```asm
<LineIntersect>:
  endbr64
  movapd %xmm0,%xmm8
  subsd  %xmm5,%xmm7
  subsd  %xmm4,%xmm6
  mov    %rdi,%rax
  movapd %xmm1,%xmm0
  movapd %xmm8,%xmm12
  subsd  %xmm5,%xmm0
  subsd  %xmm4,%xmm12
  pxor   %xmm5,%xmm5
  movapd %xmm6,%xmm11
  movapd %xmm7,%xmm4
  mulsd  %xmm0,%xmm11
  mulsd  %xmm12,%xmm4
  subsd  %xmm4,%xmm11
  comisd %xmm11,%xmm5
  ja     L121
  movsd  D69(%rip),%xmm4
  comisd %xmm11,%xmm4
  seta   %dl
L119:
  movapd %xmm2,%xmm9
  movapd %xmm3,%xmm10
  movapd %xmm12,%xmm4
  subsd  %xmm8,%xmm9
  subsd  %xmm1,%xmm10
  mulsd  %xmm9,%xmm7
  mulsd  %xmm10,%xmm6
  mulsd  %xmm9,%xmm0
  mulsd  %xmm10,%xmm4
  subsd  %xmm6,%xmm7
  subsd  %xmm4,%xmm0
  test   %dl,%dl
  je     L128
  comisd %xmm0,%xmm5
  ja     L47
  movsd  D69(%rip),%xmm4
  comisd %xmm0,%xmm4
  seta   %dl
L140:
  test   %dl,%dl
  je     L128
  comisd %xmm7,%xmm5
  ja     L167
  movsd  D69(%rip),%xmm4
  comisd %xmm7,%xmm4
  jbe    L128
L70:
  addsd  %xmm8,%xmm2
  addsd  %xmm1,%xmm3
  movsd  D3(%rip),%xmm0
  mov    $0x1,%r8d
  movapd %xmm2,%xmm5
  movapd %xmm3,%xmm11
  mulsd  %xmm0,%xmm5
  mulsd  %xmm0,%xmm11
  jmp    L102
L128:
  comisd %xmm7,%xmm5
  ja     L161
  movsd  D69(%rip),%xmm2
  comisd %xmm7,%xmm2
  seta   %dl
L73:
  test   %dl,%dl
  jne    L150
  divsd  %xmm7,%xmm11
  comisd %xmm11,%xmm5
  ja     L150
  movsd  D93(%rip),%xmm2
  comisd %xmm2,%xmm11
  ja     L150
  divsd  %xmm7,%xmm0
  comisd %xmm0,%xmm5
  ja     L150
  comisd %xmm2,%xmm0
  ja     L150
  movapd %xmm9,%xmm5
  mov    $0x1,%r8d
  mulsd  %xmm11,%xmm5
  mulsd  %xmm10,%xmm11
  addsd  %xmm8,%xmm5
  addsd  %xmm1,%xmm11
  movsd  %xmm5,(%rax)
  mov    %r8d,%eax
  movsd  %xmm11,(%rsi)
  ret
L150:
  movapd %xmm5,%xmm11
  xor    %r8d,%r8d
L102:
  movsd  %xmm5,(%rax)
  mov    %r8d,%eax
  movsd  %xmm11,(%rsi)
  ret
  nop
L47:
  comisd D18(%rip),%xmm0
  seta   %dl
  jmp    L140
L121:
  comisd D18(%rip),%xmm11
  seta   %dl
  jmp    L119
  nopl   0x0(%rax)
L167:
  comisd D18(%rip),%xmm7
  ja     L70
L161:
  comisd D18(%rip),%xmm7
  seta   %dl
  jmp    L73
```

tool_calls: name: unpack_data
arguments: tag: D69
data_type: f64
name: unpack_data
arguments: tag: D3
data_type: byte[8]
name: unpack_data
arguments: tag: D93
data_type: byte[8]
name: unpack_data
arguments: tag: D18
data_type: byte[16]

tool: D69: 1e-05

tool: {"D3": [0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x3f]}

tool: {"D93": [0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x3f]}

tool: {"D18": [0xf1,0x68,0xe3,0x88,0xb5,0xf8,0xe4,0xbe,0xf1,0x68,0xe3,0x88,0xb5,0xf8,0xe4,0x3e]}

assistant: ```c
int LineIntersect(double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4, double *x, double *y) {
  double mua, mub;
  double denom, numera, numerb;
  denom = (y4 - y3) * (x2 - x1) - (x4 - x3) * (y2 - y1);
  numera = (x4 - x3) * (y1 - y3) - (y4 - y3) * (x1 - x3);
  numerb = (x2 - x1) * (y1 - y3) - (y2 - y1) * (x1 - x3);
  if ((numera < 0 ? -(numera) : (numera)) < 0.00001 && (numerb < 0 ? -(numerb) : (numerb)) < 0.00001 && (denom < 0 ? -(denom) : (denom)) < 0.00001) {
    *x = (x1 + x2) / 2;
    *y = (y1 + y2) / 2;
    return (1);
  }
  if ((denom < 0 ? -(denom) : (denom)) < 0.00001) {
    *x = 0;
    *y = 0;
    return (0);
  }
  mua = numera / denom;
  mub = numerb / denom;
  if (mua < 0 || mua > 1 || mub < 0 || mub > 1) {
    *x = 0;
    *y = 0;
    return (0);
  }
  *x = x1 + mua * (x2 - x1);
  *y = y1 + mua * (y2 - y1);
  return (1);
}
```