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

```asm
<lookupxy>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  movsd  %xmm0,-0x48(%rbp)
  mov    %edi,-0x4c(%rbp)
  mov    %rsi,-0x58(%rbp)
  mov    %rdx,-0x60(%rbp)
  mov    -0x58(%rbp),%rax
  movsd  (%rax),%xmm0
  comisd -0x48(%rbp),%xmm0
  jb     L45
  mov    -0x60(%rbp),%rax
  movsd  (%rax),%xmm2
  mov    -0x60(%rbp),%rax
  add    $0x8,%rax
  movsd  (%rax),%xmm0
  mov    -0x60(%rbp),%rax
  movsd  (%rax),%xmm3
  movapd %xmm0,%xmm1
  subsd  %xmm3,%xmm1
  mov    -0x58(%rbp),%rax
  movsd  (%rax),%xmm3
  movsd  -0x48(%rbp),%xmm0
  subsd  %xmm3,%xmm0
  mulsd  %xmm1,%xmm0
  mov    -0x58(%rbp),%rax
  add    $0x8,%rax
  movsd  (%rax),%xmm1
  mov    -0x58(%rbp),%rax
  movsd  (%rax),%xmm3
  subsd  %xmm3,%xmm1
  divsd  %xmm1,%xmm0
  addsd  %xmm2,%xmm0
  jmp    L55
L45:
  mov    -0x4c(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  movsd  -0x48(%rbp),%xmm0
  comisd %xmm1,%xmm0
  jb     L14
  mov    -0x4c(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm2
  mov    -0x4c(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x10(%rax),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x4c(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm3
  movapd %xmm0,%xmm1
  subsd  %xmm3,%xmm1
  mov    -0x4c(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm3
  movsd  -0x48(%rbp),%xmm0
  subsd  %xmm3,%xmm0
  mulsd  %xmm1,%xmm0
  mov    -0x4c(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x4c(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x10(%rax),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm3
  subsd  %xmm3,%xmm1
  divsd  %xmm1,%xmm0
  addsd  %xmm2,%xmm0
  jmp    L55
L14:
  mov    -0x58(%rbp),%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x30(%rbp)
  mov    -0x60(%rbp),%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x28(%rbp)
  movl   $0x1,-0x34(%rbp)
  jmp    L76
L33:
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  comisd -0x48(%rbp),%xmm0
  jb     L5
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x20(%rbp)
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movsd  -0x20(%rbp),%xmm0
  subsd  -0x30(%rbp),%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movsd  -0x18(%rbp),%xmm0
  subsd  -0x28(%rbp),%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movsd  -0x48(%rbp),%xmm0
  subsd  -0x30(%rbp),%xmm0
  mulsd  -0x8(%rbp),%xmm0
  divsd  -0x10(%rbp),%xmm0
  addsd  -0x28(%rbp),%xmm0
  jmp    L55
L5:
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x30(%rbp)
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x28(%rbp)
  addl   $0x1,-0x34(%rbp)
L76:
  mov    -0x34(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jl     L33
  mov    -0x4c(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
L55:
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  pop    %rbp
  ret
```

assistant: ```c
double lookupxy(double x, int n, double *xv, double *yv) {
  double dx, dy, x1, y1, x2, y2;
  int i;
  if (x <= xv[0])
    return (yv[0] + (yv[1] - yv[0]) * (x - xv[0]) / (xv[1] - xv[0]));
  if (x >= xv[n - 1])
    return (yv[n - 1] + (yv[n - 2] - yv[n - 1]) * (x - xv[n - 1]) / (xv[n - 1] - xv[n - 2]));
  x1 = xv[0];
  y1 = yv[0];
  for (i = 1; i < n; i++) {
    if (x <= xv[i]) {
      x2 = xv[i];
      y2 = yv[i];
      dx = x2 - x1;
      dy = y2 - y1;
      return (y1 + dy * (x - x1) / dx);
    }
    x1 = xv[i];
    y1 = yv[i];
  }
  return (yv[n - 1]);
}
```