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

```asm
<dig_find_intersection>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  movsd  %xmm0,-0x18(%rbp)
  movsd  %xmm1,-0x20(%rbp)
  movsd  %xmm2,-0x28(%rbp)
  movsd  %xmm3,-0x30(%rbp)
  movsd  %xmm4,-0x38(%rbp)
  movsd  %xmm5,-0x40(%rbp)
  movsd  %xmm6,-0x48(%rbp)
  movsd  %xmm7,-0x50(%rbp)
  mov    %rdi,-0x58(%rbp)
  mov    %rsi,-0x60(%rbp)
  movsd  -0x28(%rbp),%xmm0
  movapd %xmm0,%xmm1
  subsd  -0x18(%rbp),%xmm1
  movsd  -0x40(%rbp),%xmm0
  subsd  -0x50(%rbp),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x30(%rbp),%xmm1
  movapd %xmm1,%xmm2
  subsd  -0x20(%rbp),%xmm2
  movsd  -0x38(%rbp),%xmm1
  subsd  -0x48(%rbp),%xmm1
  mulsd  %xmm2,%xmm1
  subsd  %xmm1,%xmm0
  movapd %xmm0,%xmm3
  movapd %xmm3,%xmm6
  pxor   %xmm0,%xmm0
  ucomisd %xmm0,%xmm3
  jp     L144
  pxor   %xmm0,%xmm0
  ucomisd %xmm0,%xmm3
  je     L203
L144:
  movsd  -0x38(%rbp),%xmm0
  movapd %xmm0,%xmm1
  subsd  -0x18(%rbp),%xmm1
  movsd  -0x40(%rbp),%xmm0
  subsd  -0x50(%rbp),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x40(%rbp),%xmm1
  movapd %xmm1,%xmm2
  subsd  -0x20(%rbp),%xmm2
  movsd  -0x38(%rbp),%xmm1
  subsd  -0x48(%rbp),%xmm1
  mulsd  %xmm2,%xmm1
  subsd  %xmm1,%xmm0
  movapd %xmm0,%xmm4
  divsd  %xmm6,%xmm4
  movapd %xmm4,%xmm7
  movsd  -0x28(%rbp),%xmm0
  movapd %xmm0,%xmm1
  subsd  -0x18(%rbp),%xmm1
  movsd  -0x40(%rbp),%xmm0
  subsd  -0x20(%rbp),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x30(%rbp),%xmm1
  movapd %xmm1,%xmm2
  subsd  -0x20(%rbp),%xmm2
  movsd  -0x38(%rbp),%xmm1
  subsd  -0x18(%rbp),%xmm1
  mulsd  %xmm2,%xmm1
  subsd  %xmm1,%xmm0
  movapd %xmm0,%xmm5
  divsd  %xmm6,%xmm5
  pxor   %xmm0,%xmm0
  comisd %xmm4,%xmm0
  ja     L293
  movsd  D19(%rip),%xmm0
  comisd %xmm0,%xmm4
  ja     L293
  pxor   %xmm0,%xmm0
  comisd %xmm5,%xmm0
  ja     L293
  movsd  D19(%rip),%xmm0
  comisd %xmm0,%xmm5
  jbe    L168
L293:
  mov    $0x0,%eax
  jmp    L259
L168:
  movsd  -0x28(%rbp),%xmm0
  subsd  -0x18(%rbp),%xmm0
  mulsd  %xmm7,%xmm0
  addsd  -0x18(%rbp),%xmm0
  mov    -0x58(%rbp),%rax
  movsd  %xmm0,(%rax)
  movsd  -0x30(%rbp),%xmm0
  subsd  -0x20(%rbp),%xmm0
  mulsd  %xmm7,%xmm0
  addsd  -0x20(%rbp),%xmm0
  mov    -0x60(%rbp),%rax
  movsd  %xmm0,(%rax)
  mov    $0x1,%eax
  jmp    L259
L203:
  movsd  -0x38(%rbp),%xmm0
  movapd %xmm0,%xmm1
  subsd  -0x18(%rbp),%xmm1
  movsd  -0x40(%rbp),%xmm0
  subsd  -0x50(%rbp),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x40(%rbp),%xmm1
  movapd %xmm1,%xmm2
  subsd  -0x20(%rbp),%xmm2
  movsd  -0x38(%rbp),%xmm1
  subsd  -0x48(%rbp),%xmm1
  mulsd  %xmm2,%xmm1
  subsd  %xmm1,%xmm0
  pxor   %xmm1,%xmm1
  ucomisd %xmm1,%xmm0
  jp     L84
  pxor   %xmm1,%xmm1
  ucomisd %xmm1,%xmm0
  jne    L84
  movsd  -0x28(%rbp),%xmm0
  movapd %xmm0,%xmm1
  subsd  -0x18(%rbp),%xmm1
  movsd  -0x40(%rbp),%xmm0
  subsd  -0x20(%rbp),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x30(%rbp),%xmm1
  movapd %xmm1,%xmm2
  subsd  -0x20(%rbp),%xmm2
  movsd  -0x38(%rbp),%xmm1
  subsd  -0x18(%rbp),%xmm1
  mulsd  %xmm2,%xmm1
  subsd  %xmm1,%xmm0
  pxor   %xmm1,%xmm1
  ucomisd %xmm1,%xmm0
  jp     L84
  pxor   %xmm1,%xmm1
  ucomisd %xmm1,%xmm0
  je     L89
L84:
  mov    $0x0,%eax
  jmp    L259
L89:
  movsd  -0x18(%rbp),%xmm0
  ucomisd -0x28(%rbp),%xmm0
  jp     L44
  movsd  -0x18(%rbp),%xmm0
  ucomisd -0x28(%rbp),%xmm0
  je     L343
L44:
  movsd  -0x18(%rbp),%xmm0
  comisd -0x28(%rbp),%xmm0
  jbe    L443
  movsd  -0x18(%rbp),%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movsd  -0x28(%rbp),%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movsd  -0x8(%rbp),%xmm0
  movsd  %xmm0,-0x28(%rbp)
  movsd  -0x20(%rbp),%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movsd  -0x30(%rbp),%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movsd  -0x8(%rbp),%xmm0
  movsd  %xmm0,-0x30(%rbp)
L443:
  movsd  -0x38(%rbp),%xmm0
  comisd -0x48(%rbp),%xmm0
  jbe    L459
  movsd  -0x38(%rbp),%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movsd  -0x48(%rbp),%xmm0
  movsd  %xmm0,-0x38(%rbp)
  movsd  -0x8(%rbp),%xmm0
  movsd  %xmm0,-0x48(%rbp)
  movsd  -0x40(%rbp),%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movsd  -0x50(%rbp),%xmm0
  movsd  %xmm0,-0x40(%rbp)
  movsd  -0x8(%rbp),%xmm0
  movsd  %xmm0,-0x50(%rbp)
L459:
  movsd  -0x18(%rbp),%xmm0
  comisd -0x48(%rbp),%xmm0
  jbe    L351
  mov    $0x0,%eax
  jmp    L259
L351:
  movsd  -0x38(%rbp),%xmm0
  comisd -0x28(%rbp),%xmm0
  jbe    L352
  mov    $0x0,%eax
  jmp    L259
L352:
  movsd  -0x18(%rbp),%xmm0
  ucomisd -0x48(%rbp),%xmm0
  jp     L100
  movsd  -0x18(%rbp),%xmm0
  ucomisd -0x48(%rbp),%xmm0
  jne    L100
  mov    -0x58(%rbp),%rax
  movsd  -0x18(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x60(%rbp),%rax
  movsd  -0x20(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    $0x1,%eax
  jmp    L259
L100:
  movsd  -0x28(%rbp),%xmm0
  ucomisd -0x38(%rbp),%xmm0
  jp     L435
  movsd  -0x28(%rbp),%xmm0
  ucomisd -0x38(%rbp),%xmm0
  jne    L435
  mov    -0x58(%rbp),%rax
  movsd  -0x28(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x60(%rbp),%rax
  movsd  -0x30(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    $0x1,%eax
  jmp    L259
L435:
  movsd  -0x18(%rbp),%xmm0
  comisd -0x38(%rbp),%xmm0
  jbe    L95
  movsd  -0x48(%rbp),%xmm0
  comisd -0x18(%rbp),%xmm0
  jbe    L95
  mov    -0x58(%rbp),%rax
  movsd  -0x18(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x60(%rbp),%rax
  movsd  -0x20(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  jmp    L127
L95:
  mov    -0x58(%rbp),%rax
  movsd  -0x28(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x60(%rbp),%rax
  movsd  -0x30(%rbp),%xmm0
  movsd  %xmm0,(%rax)
L127:
  mov    $0xffffffff,%eax
  jmp    L259
L343:
  movsd  -0x20(%rbp),%xmm0
  comisd -0x30(%rbp),%xmm0
  jbe    L99
  movsd  -0x20(%rbp),%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movsd  -0x30(%rbp),%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movsd  -0x8(%rbp),%xmm0
  movsd  %xmm0,-0x30(%rbp)
  movsd  -0x18(%rbp),%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movsd  -0x28(%rbp),%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movsd  -0x8(%rbp),%xmm0
  movsd  %xmm0,-0x28(%rbp)
L99:
  movsd  -0x40(%rbp),%xmm0
  comisd -0x50(%rbp),%xmm0
  jbe    L346
  movsd  -0x40(%rbp),%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movsd  -0x50(%rbp),%xmm0
  movsd  %xmm0,-0x40(%rbp)
  movsd  -0x8(%rbp),%xmm0
  movsd  %xmm0,-0x50(%rbp)
  movsd  -0x40(%rbp),%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movsd  -0x50(%rbp),%xmm0
  movsd  %xmm0,-0x40(%rbp)
  movsd  -0x8(%rbp),%xmm0
  movsd  %xmm0,-0x50(%rbp)
L346:
  movsd  -0x20(%rbp),%xmm0
  comisd -0x50(%rbp),%xmm0
  jbe    L160
  mov    $0x0,%eax
  jmp    L259
L160:
  movsd  -0x40(%rbp),%xmm0
  comisd -0x30(%rbp),%xmm0
  jbe    L206
  mov    $0x0,%eax
  jmp    L259
L206:
  movsd  -0x20(%rbp),%xmm0
  ucomisd -0x50(%rbp),%xmm0
  jp     L186
  movsd  -0x20(%rbp),%xmm0
  ucomisd -0x50(%rbp),%xmm0
  jne    L186
  mov    -0x58(%rbp),%rax
  movsd  -0x18(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x60(%rbp),%rax
  movsd  -0x20(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    $0x1,%eax
  jmp    L259
L186:
  movsd  -0x30(%rbp),%xmm0
  ucomisd -0x40(%rbp),%xmm0
  jp     L345
  movsd  -0x30(%rbp),%xmm0
  ucomisd -0x40(%rbp),%xmm0
  jne    L345
  mov    -0x58(%rbp),%rax
  movsd  -0x28(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x60(%rbp),%rax
  movsd  -0x30(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    $0x1,%eax
  jmp    L259
L345:
  movsd  -0x20(%rbp),%xmm0
  comisd -0x40(%rbp),%xmm0
  jbe    L374
  movsd  -0x50(%rbp),%xmm0
  comisd -0x20(%rbp),%xmm0
  jbe    L374
  mov    -0x58(%rbp),%rax
  movsd  -0x18(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x60(%rbp),%rax
  movsd  -0x20(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  jmp    L209
L374:
  mov    -0x58(%rbp),%rax
  movsd  -0x28(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x60(%rbp),%rax
  movsd  -0x30(%rbp),%xmm0
  movsd  %xmm0,(%rax)
L209:
  mov    $0xffffffff,%eax
L259:
  pop    %rbp
  ret
```

tool_calls: name: retrieve_data
arguments: label: D19
type_guessed: byte[8]

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

assistant: ```c
int dig_find_intersection(double ax1, double ay1, double ax2, double ay2, double bx1, double by1, double bx2, double by2, double *x, double *y) {
  register double d, r1, r2;
  double t;
  d = ((ax2 - ax1) * (by1 - by2) - (ay2 - ay1) * (bx1 - bx2));
  if (d) {
    r1 = ((bx1 - ax1) * (by1 - by2) - (by1 - ay1) * (bx1 - bx2)) / d;
    r2 = ((ax2 - ax1) * (by1 - ay1) - (ay2 - ay1) * (bx1 - ax1)) / d;
    if (r1 < 0 || r1 > 1 || r2 < 0 || r2 > 1) {
      return 0;
    }
    *x = ax1 + r1 * (ax2 - ax1);
    *y = ay1 + r1 * (ay2 - ay1);
    return 1;
  }
  if (((bx1 - ax1) * (by1 - by2) - (by1 - ay1) * (bx1 - bx2)) || ((ax2 - ax1) * (by1 - ay1) - (ay2 - ay1) * (bx1 - ax1))) {
    return 0;
  }
  if (ax1 != ax2) {
    if (ax1 > ax2) {
      t = ax1;
      ax1 = ax2;
      ax2 = t;
      t = ay1;
      ay1 = ay2;
      ay2 = t;
    }
    if (bx1 > bx2) {
      t = bx1;
      bx1 = bx2;
      bx2 = t;
      t = by1;
      by1 = by2;
      by2 = t;
    }
    if (ax1 > bx2)
      return 0;
    if (ax2 < bx1)
      return 0;
    if (ax1 == bx2) {
      *x = ax1;
      *y = ay1;
      return 1;
    }
    if (ax2 == bx1) {
      *x = ax2;
      *y = ay2;
      return 1;
    }
    if (ax1 > bx1 && ax1 < bx2) {
      *x = ax1;
      *y = ay1;
    } else {
      *x = ax2;
      *y = ay2;
    }
    return -1;
  } else {
    if (ay1 > ay2) {
      t = ay1;
      ay1 = ay2;
      ay2 = t;
      t = ax1;
      ax1 = ax2;
      ax2 = t;
    }
    if (by1 > by2) {
      t = by1;
      by1 = by2;
      by2 = t;
      t = by1;
      by1 = by2;
      by2 = t;
    }
    if (ay1 > by2)
      return 0;
    if (ay2 < by1)
      return 0;
    if (ay1 == by2) {
      *x = ax1;
      *y = ay1;
      return 1;
    }
    if (ay2 == by1) {
      *x = ax2;
      *y = ay2;
      return 1;
    }
    if (ay1 > by1 && ay1 < by2) {
      *x = ax1;
      *y = ay1;
    } else {
      *x = ax2;
      *y = ay2;
    }
    return -1;
  }
  return 0;
}
```