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

```asm
<Fcpd>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x90,%rsp
  mov    %edi,-0x64(%rbp)
  mov    %esi,-0x68(%rbp)
  mov    %rdx,-0x70(%rbp)
  mov    %rcx,-0x78(%rbp)
  mov    %r8,-0x80(%rbp)
  mov    -0x68(%rbp),%eax
  sub    -0x64(%rbp),%eax
  cmp    $0x2,%eax
  jg     L153
  mov    -0x68(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x68(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  subsd  %xmm1,%xmm0
  movq   %xmm0,%rax
  movsd  D54(%rip),%xmm0
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  call   <pow@plt>
  movsd  %xmm0,-0x88(%rbp)
  mov    -0x68(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x68(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  movapd %xmm0,%xmm3
  subsd  %xmm1,%xmm3
  movq   %xmm3,%rax
  movsd  D54(%rip),%xmm0
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  call   <pow@plt>
  movapd %xmm0,%xmm4
  addsd  -0x88(%rbp),%xmm4
  movq   %xmm4,%rax
  movsd  D34(%rip),%xmm0
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  call   <pow@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x38(%rbp)
  mov    -0x64(%rbp),%eax
  mov    %eax,-0x54(%rbp)
  jmp    L470
L7:
  mov    -0x54(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x50(%rbp)
  jmp    L187
L292:
  mov    -0x54(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x50(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  subsd  %xmm1,%xmm0
  movq   %xmm0,%rax
  movsd  D54(%rip),%xmm0
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  call   <pow@plt>
  movsd  %xmm0,-0x88(%rbp)
  mov    -0x54(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x50(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  movapd %xmm0,%xmm5
  subsd  %xmm1,%xmm5
  movq   %xmm5,%rax
  movsd  D54(%rip),%xmm0
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  call   <pow@plt>
  movapd %xmm0,%xmm6
  addsd  -0x88(%rbp),%xmm6
  movq   %xmm6,%rax
  movsd  D34(%rip),%xmm0
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  call   <pow@plt>
  movsd  -0x38(%rbp),%xmm1
  comisd %xmm0,%xmm1
  jbe    L451
  mov    -0x54(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x50(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  subsd  %xmm1,%xmm0
  movq   %xmm0,%rax
  movsd  D54(%rip),%xmm0
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  call   <pow@plt>
  movsd  %xmm0,-0x88(%rbp)
  mov    -0x54(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x50(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  movapd %xmm0,%xmm7
  subsd  %xmm1,%xmm7
  movq   %xmm7,%rax
  movsd  D54(%rip),%xmm0
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  call   <pow@plt>
  movapd %xmm0,%xmm2
  addsd  -0x88(%rbp),%xmm2
  movq   %xmm2,%rax
  movsd  D34(%rip),%xmm0
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  call   <pow@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x38(%rbp)
L451:
  addl   $0x1,-0x50(%rbp)
L187:
  mov    -0x50(%rbp),%eax
  cmp    -0x68(%rbp),%eax
  jle    L292
  addl   $0x1,-0x54(%rbp)
L470:
  mov    -0x68(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0x54(%rbp)
  jl     L7
  movsd  -0x38(%rbp),%xmm0
  jmp    L54
L153:
  mov    -0x64(%rbp),%edx
  mov    -0x68(%rbp),%eax
  add    %edx,%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  mov    %eax,-0x44(%rbp)
  mov    -0x44(%rbp),%eax
  sub    -0x64(%rbp),%eax
  add    $0x2,%eax
  cltq
  shl    $0x2,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x30(%rbp)
  mov    -0x68(%rbp),%eax
  sub    -0x44(%rbp),%eax
  add    $0x1,%eax
  cltq
  shl    $0x2,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x28(%rbp)
  movl   $0x0,-0x4c(%rbp)
  movl   $0x0,-0x48(%rbp)
  movl   $0x1,-0x54(%rbp)
  jmp    L410
L356:
  mov    -0x54(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x80(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    %eax,-0x44(%rbp)
  jl     L66
  mov    -0x54(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x80(%rbp),%rax
  add    %rdx,%rax
  addl   $0x1,-0x4c(%rbp)
  mov    -0x4c(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x30(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  jmp    L381
L66:
  mov    -0x54(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x80(%rbp),%rax
  add    %rdx,%rax
  addl   $0x1,-0x48(%rbp)
  mov    -0x48(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x28(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
L381:
  addl   $0x1,-0x54(%rbp)
L410:
  mov    -0x68(%rbp),%eax
  sub    -0x64(%rbp),%eax
  add    $0x1,%eax
  cmp    %eax,-0x54(%rbp)
  jle    L356
  mov    -0x30(%rbp),%rdi
  mov    -0x78(%rbp),%rcx
  mov    -0x70(%rbp),%rdx
  mov    -0x44(%rbp),%esi
  mov    -0x64(%rbp),%eax
  mov    %rdi,%r8
  mov    %eax,%edi
  call   <Fcpd>
  movq   %xmm0,%rax
  mov    %rax,-0x20(%rbp)
  pxor   %xmm0,%xmm0
  ucomisd -0x20(%rbp),%xmm0
  jp     L145
  pxor   %xmm0,%xmm0
  ucomisd -0x20(%rbp),%xmm0
  jne    L145
  pxor   %xmm0,%xmm0
  jmp    L54
L145:
  mov    -0x44(%rbp),%eax
  lea    0x1(%rax),%edi
  mov    -0x28(%rbp),%rsi
  mov    -0x78(%rbp),%rcx
  mov    -0x70(%rbp),%rdx
  mov    -0x68(%rbp),%eax
  mov    %rsi,%r8
  mov    %eax,%esi
  call   <Fcpd>
  movq   %xmm0,%rax
  mov    %rax,-0x18(%rbp)
  movsd  -0x18(%rbp),%xmm0
  comisd -0x20(%rbp),%xmm0
  jbe    L0
  movsd  -0x20(%rbp),%xmm0
  jmp    L186
L0:
  movsd  -0x18(%rbp),%xmm0
L186:
  movsd  %xmm0,-0x38(%rbp)
  mov    -0x44(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x44(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movsd  -0x18(%rbp),%xmm0
  comisd -0x38(%rbp),%xmm0
  jae    L272
  pxor   %xmm0,%xmm0
  ucomisd -0x38(%rbp),%xmm0
  jp     L68
  pxor   %xmm0,%xmm0
  ucomisd -0x38(%rbp),%xmm0
  jne    L68
L272:
  movsd  -0x38(%rbp),%xmm0
  jmp    L54
L68:
  mov    -0x44(%rbp),%eax
  mov    %eax,-0x50(%rbp)
  jmp    L210
L298:
  subl   $0x1,-0x50(%rbp)
L210:
  mov    -0x50(%rbp),%eax
  cmp    -0x64(%rbp),%eax
  jle    L396
  mov    -0x50(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x44(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  subsd  -0x38(%rbp),%xmm1
  comisd %xmm1,%xmm0
  ja     L298
L396:
  mov    -0x44(%rbp),%eax
  sub    -0x50(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x40(%rbp)
  mov    -0x44(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x50(%rbp)
  jmp    L448
L447:
  addl   $0x1,-0x50(%rbp)
L448:
  mov    -0x50(%rbp),%eax
  cmp    -0x68(%rbp),%eax
  jge    L102
  mov    -0x50(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x44(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  addsd  -0x38(%rbp),%xmm0
  comisd %xmm1,%xmm0
  ja     L447
L102:
  mov    -0x50(%rbp),%eax
  sub    -0x44(%rbp),%eax
  mov    %eax,-0x3c(%rbp)
  mov    -0x40(%rbp),%eax
  add    $0x1,%eax
  cltq
  shl    $0x2,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x10(%rbp)
  mov    -0x3c(%rbp),%eax
  add    $0x1,%eax
  cltq
  shl    $0x2,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x8(%rbp)
  movl   $0x0,-0x4c(%rbp)
  movl   $0x0,-0x48(%rbp)
  movl   $0x1,-0x54(%rbp)
  jmp    L251
L301:
  mov    -0x54(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x44(%rbp),%eax
  sub    %edx,%eax
  cmp    %eax,-0x40(%rbp)
  jle    L387
  mov    -0x54(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  addl   $0x1,-0x4c(%rbp)
  mov    -0x4c(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x10(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
L387:
  addl   $0x1,-0x54(%rbp)
L251:
  mov    -0x44(%rbp),%eax
  sub    -0x64(%rbp),%eax
  add    $0x1,%eax
  cmp    %eax,-0x54(%rbp)
  jle    L301
  movl   $0x1,-0x54(%rbp)
  jmp    L320
L345:
  mov    -0x54(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  sub    -0x44(%rbp),%eax
  cmp    %eax,-0x3c(%rbp)
  jl     L256
  mov    -0x54(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  addl   $0x1,-0x48(%rbp)
  mov    -0x48(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x8(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
L256:
  addl   $0x1,-0x54(%rbp)
L320:
  mov    -0x68(%rbp),%eax
  sub    -0x44(%rbp),%eax
  cmp    %eax,-0x54(%rbp)
  jle    L345
  mov    -0x30(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  movl   $0x1,-0x48(%rbp)
  movl   $0x1,-0x4c(%rbp)
  jmp    L323
L342:
  addl   $0x1,-0x48(%rbp)
L78:
  mov    -0x48(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  jg     L76
  mov    -0x48(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x4c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  subsd  -0x38(%rbp),%xmm0
  comisd %xmm1,%xmm0
  jae    L342
L76:
  mov    -0x3c(%rbp),%eax
  add    $0x1,%eax
  cmp    %eax,-0x48(%rbp)
  je     L91
  movl   $0x0,-0x50(%rbp)
  jmp    L249
L105:
  mov    -0x50(%rbp),%edx
  mov    -0x48(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x4c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  subsd  %xmm1,%xmm0
  movq   %xmm0,%rax
  movsd  D54(%rip),%xmm0
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  call   <pow@plt>
  movsd  %xmm0,-0x88(%rbp)
  mov    -0x50(%rbp),%edx
  mov    -0x48(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x4c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  movapd %xmm0,%xmm3
  subsd  %xmm1,%xmm3
  movq   %xmm3,%rax
  movsd  D54(%rip),%xmm0
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  call   <pow@plt>
  movapd %xmm0,%xmm4
  addsd  -0x88(%rbp),%xmm4
  movq   %xmm4,%rax
  movsd  D34(%rip),%xmm0
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  call   <pow@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x18(%rbp)
  movsd  -0x38(%rbp),%xmm0
  comisd -0x18(%rbp),%xmm0
  jbe    L208
  movsd  -0x18(%rbp),%xmm0
  movsd  %xmm0,-0x38(%rbp)
L208:
  pxor   %xmm0,%xmm0
  ucomisd -0x38(%rbp),%xmm0
  jp     L169
  pxor   %xmm0,%xmm0
  ucomisd -0x38(%rbp),%xmm0
  je     L143
L169:
  addl   $0x1,-0x50(%rbp)
L249:
  mov    -0x50(%rbp),%edx
  mov    -0x48(%rbp),%eax
  add    %edx,%eax
  cmp    %eax,-0x3c(%rbp)
  jl     L430
  mov    -0x50(%rbp),%edx
  mov    -0x48(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x4c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm2
  movapd %xmm0,%xmm1
  subsd  %xmm2,%xmm1
  movsd  -0x38(%rbp),%xmm0
  comisd %xmm1,%xmm0
  ja     L105
  jmp    L430
L143:
  nop
L430:
  pxor   %xmm0,%xmm0
  ucomisd -0x38(%rbp),%xmm0
  jp     L79
  pxor   %xmm0,%xmm0
  ucomisd -0x38(%rbp),%xmm0
  je     L433
L79:
  addl   $0x1,-0x4c(%rbp)
L323:
  mov    -0x4c(%rbp),%eax
  cmp    -0x40(%rbp),%eax
  jle    L78
  jmp    L221
L91:
  nop
  jmp    L221
L433:
  nop
L221:
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  movsd  -0x38(%rbp),%xmm0
L54:
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: label: D54
type: byte[8]
name: retrieve_data
arguments: label: D34
type: f64

tool: {"D54": [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40]}

tool: D34: 0.5

assistant: ```c
double Fcpd(int s, int t, const double *x, const double *y, const int *yo) {
  int q, a, b, *lt, *rt, ll, rl, i, j, *yl, *yr;
  double d, l, r;
  if (t - s < 3) {
    d = pow(pow(x[t - 1] - x[t], 2) + pow(y[t - 1] - y[t], 2), 0.5);
    for (a = s; a < t - 1; a++)
      for (b = a + 1; b <= t; b++)
        if (pow(pow(x[a] - x[b], 2) + pow(y[a] - y[b], 2), 0.5) < d)
          d = pow(pow(x[a] - x[b], 2) + pow(y[a] - y[b], 2), 0.5);
    return d;
  }
  q = (s + t) / 2;
  yl = (int *)malloc((q - s + 2) * sizeof(int));
  yr = (int *)malloc((t - q + 1) * sizeof(int));
  i = 0;
  j = 0;
  for (a = 1; a <= t - s + 1; a++)
    if (yo[a] <= q)
      yl[++i] = yo[a];
    else
      yr[++j] = yo[a];
  l = Fcpd(s, q, x, y, yl);
  if (l == 0)
    return 0;
  r = Fcpd(q + 1, t, x, y, yr);
  d = l < r ? l : r;
  r = x[q + 1] - x[q];
  if (r >= d || d == 0)
    return d;
  for (b = q; b > s && x[b - 1] > x[q + 1] - d; b--)
    ;
  ll = q - b + 1;
  for (b = q + 1; b < t && x[b + 1] < x[q] + d; b++)
    ;
  rl = b - q;
  lt = (int *)malloc((ll + 1) * sizeof(int));
  rt = (int *)malloc((rl + 1) * sizeof(int));
  i = 0;
  j = 0;
  for (a = 1; a <= q - s + 1; a++)
    if (q - yl[a] < ll)
      lt[++i] = yl[a];
  for (a = 1; a <= t - q; a++)
    if (yr[a] - q - 1 < rl)
      rt[++j] = yr[a];
  free(yl);
  free(yr);
  j = 1;
  for (i = 1; i <= ll; i++) {
    while (j <= rl && y[rt[j]] <= y[lt[i]] - d)
      j++;
    if (j == rl + 1)
      break;
    for (b = 0; b + j <= rl && y[rt[b + j]] - y[lt[i]] < d; b++) {
      r = pow(pow(x[rt[b + j]] - x[lt[i]], 2) + pow(y[rt[b + j]] - y[lt[i]], 2), 0.5);
      if (r < d)
        d = r;
      if (d == 0)
        break;
    }
    if (d == 0)
      break;
  }
  free(lt);
  free(rt);
  return d;
}
```