user: Converte this assembly snippet into its equivalent C code:

```asm
<nearLine>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x70,%rsp
  movsd  %xmm0,-0x48(%rbp)
  movsd  %xmm1,-0x50(%rbp)
  movsd  %xmm2,-0x58(%rbp)
  movsd  %xmm3,-0x60(%rbp)
  movsd  %xmm4,-0x68(%rbp)
  movsd  %xmm5,-0x70(%rbp)
  movsd  -0x50(%rbp),%xmm0
  movapd %xmm0,%xmm1
  subsd  -0x60(%rbp),%xmm1
  movsd  -0x48(%rbp),%xmm0
  subsd  -0x58(%rbp),%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  call   <pythagoras@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x30(%rbp)
  movsd  -0x50(%rbp),%xmm0
  movapd %xmm0,%xmm1
  subsd  -0x70(%rbp),%xmm1
  movsd  -0x48(%rbp),%xmm0
  subsd  -0x68(%rbp),%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  call   <pythagoras@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x28(%rbp)
  movsd  -0x30(%rbp),%xmm0
  movsd  %xmm0,-0x38(%rbp)
  movsd  -0x60(%rbp),%xmm0
  subsd  -0x70(%rbp),%xmm0
  movsd  -0x58(%rbp),%xmm1
  subsd  -0x68(%rbp),%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movsd  -0x30(%rbp),%xmm0
  comisd -0x28(%rbp),%xmm0
  jbe    L147
  movsd  -0x28(%rbp),%xmm0
  movsd  %xmm0,-0x38(%rbp)
L147:
  movsd  -0x20(%rbp),%xmm0
  movq   D81(%rip),%xmm1
  andpd  %xmm0,%xmm1
  movsd  D0(%rip),%xmm0
  comisd %xmm1,%xmm0
  jbe    L177
  movsd  -0x48(%rbp),%xmm0
  comisd -0x58(%rbp),%xmm0
  jbe    L125
  movsd  -0x48(%rbp),%xmm0
  comisd -0x68(%rbp),%xmm0
  ja     L149
L125:
  movsd  -0x58(%rbp),%xmm0
  comisd -0x48(%rbp),%xmm0
  jbe    L26
  movsd  -0x68(%rbp),%xmm0
  comisd -0x48(%rbp),%xmm0
  jbe    L26
L149:
  movsd  -0x38(%rbp),%xmm0
  jmp    L159
L26:
  movsd  -0x50(%rbp),%xmm0
  subsd  -0x60(%rbp),%xmm0
  addsd  -0x50(%rbp),%xmm0
  subsd  -0x70(%rbp),%xmm0
  movq   D81(%rip),%xmm1
  andpd  %xmm1,%xmm0
  movsd  D23(%rip),%xmm1
  divsd  %xmm1,%xmm0
  jmp    L159
L177:
  movsd  -0x20(%rbp),%xmm0
  movq   D81(%rip),%xmm1
  andpd  %xmm1,%xmm0
  comisd D95(%rip),%xmm0
  jbe    L59
  movsd  -0x50(%rbp),%xmm0
  comisd -0x60(%rbp),%xmm0
  jbe    L175
  movsd  -0x50(%rbp),%xmm0
  comisd -0x70(%rbp),%xmm0
  ja     L68
L175:
  movsd  -0x60(%rbp),%xmm0
  comisd -0x50(%rbp),%xmm0
  jbe    L176
  movsd  -0x70(%rbp),%xmm0
  comisd -0x50(%rbp),%xmm0
  jbe    L176
L68:
  movsd  -0x38(%rbp),%xmm0
  jmp    L159
L176:
  movsd  -0x48(%rbp),%xmm0
  subsd  -0x58(%rbp),%xmm0
  addsd  -0x48(%rbp),%xmm0
  subsd  -0x68(%rbp),%xmm0
  movq   D81(%rip),%xmm1
  andpd  %xmm1,%xmm0
  movsd  D23(%rip),%xmm1
  divsd  %xmm1,%xmm0
  jmp    L159
L59:
  movsd  -0x20(%rbp),%xmm0
  mulsd  %xmm0,%xmm0
  mulsd  -0x58(%rbp),%xmm0
  movsd  -0x60(%rbp),%xmm1
  subsd  -0x50(%rbp),%xmm1
  mulsd  -0x20(%rbp),%xmm1
  subsd  %xmm1,%xmm0
  movapd %xmm0,%xmm1
  addsd  -0x48(%rbp),%xmm1
  movsd  -0x20(%rbp),%xmm0
  movapd %xmm0,%xmm2
  mulsd  %xmm0,%xmm2
  movsd  D47(%rip),%xmm0
  addsd  %xmm0,%xmm2
  divsd  %xmm2,%xmm1
  movapd %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movsd  -0x20(%rbp),%xmm0
  mulsd  %xmm0,%xmm0
  mulsd  -0x50(%rbp),%xmm0
  movsd  -0x58(%rbp),%xmm1
  subsd  -0x48(%rbp),%xmm1
  mulsd  -0x20(%rbp),%xmm1
  subsd  %xmm1,%xmm0
  movapd %xmm0,%xmm1
  addsd  -0x60(%rbp),%xmm1
  movsd  -0x20(%rbp),%xmm0
  movapd %xmm0,%xmm2
  mulsd  %xmm0,%xmm2
  movsd  D47(%rip),%xmm0
  addsd  %xmm0,%xmm2
  divsd  %xmm2,%xmm1
  movapd %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movsd  -0x50(%rbp),%xmm0
  movapd %xmm0,%xmm1
  subsd  -0x10(%rbp),%xmm1
  movsd  -0x48(%rbp),%xmm0
  subsd  -0x18(%rbp),%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  call   <pythagoras@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x8(%rbp)
  movsd  -0x18(%rbp),%xmm0
  comisd -0x58(%rbp),%xmm0
  jbe    L79
  movsd  -0x18(%rbp),%xmm0
  comisd -0x68(%rbp),%xmm0
  ja     L95
L79:
  movsd  -0x58(%rbp),%xmm0
  comisd -0x18(%rbp),%xmm0
  jbe    L194
  movsd  -0x68(%rbp),%xmm0
  comisd -0x18(%rbp),%xmm0
  jbe    L194
L95:
  movsd  -0x38(%rbp),%xmm0
  jmp    L159
L194:
  movsd  -0x8(%rbp),%xmm0
L159:
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: tag: D81
data_type: qword
name: extract_symbolic_data
arguments: tag: D0
data_type: byte[8]
name: extract_symbolic_data
arguments: tag: D23
data_type: f64
name: extract_symbolic_data
arguments: tag: D95
data_type: byte[16]
name: extract_symbolic_data
arguments: tag: D47
data_type: byte[8]

tool: D81: 9223372036854775807

tool: {"D0": [0x8d,0xed,0xb5,0xa0,0xf7,0xc6,0xb0,0x3e]}

tool: D23: 2

tool: {"D95": [0x00,0x00,0x00,0x00,0x80,0x84,0x2e,0x41,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x3f]}

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

assistant: ```c
double nearLine(double x, double y, double x1, double y1, double x2, double y2) {
  double d1 = pythagoras(x - x1, y - y1), d2 = pythagoras(x - x2, y - y2), d3, distance = d1, slope = (y1 - y2) / (x1 - x2), x3, y3;
  if (d2 < d1)
    distance = d2;
  if (fabs(slope) < 1.0e-6) {
    if (((x > x1) && (x > x2)) || ((x < x1) && (x < x2)))
      return distance;
    else
      return fabs(y - y1 + y - y2) / 2.0;
  } else if (fabs(slope) > (1 / 1.0e-6)) {
    if (((y > y1) && (y > y2)) || ((y < y1) && (y < y2)))
      return distance;
    else
      return fabs(x - x1 + x - x2) / 2.0;
  } else {
    x3 = (slope * slope * x1 - slope * (y1 - y) + x) / (slope * slope + 1);
    y3 = (slope * slope * y - slope * (x1 - x) + y1) / (slope * slope + 1);
    d3 = pythagoras(x - x3, y - y3);
    if (((x3 > x1) && (x3 > x2)) || ((x3 < x1) && (x3 < x2)))
      return distance;
    else
      return d3;
  }
}
```