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

```asm
<check_overlap>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %edi,-0x54(%rbp)
  movsd  %xmm0,-0x60(%rbp)
  movsd  %xmm1,-0x68(%rbp)
  movsd  %xmm2,-0x70(%rbp)
  mov    %rsi,-0x78(%rbp)
  movl   $0x0,-0x4c(%rbp)
  jmp    L75
L42:
  mov    -0x4c(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  mov    %eax,-0x38(%rbp)
  mov    -0x38(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x34(%rbp)
  mov    -0x38(%rbp),%eax
  add    $0x2,%eax
  mov    %eax,-0x30(%rbp)
  mov    -0x4c(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x48(%rbp)
  jmp    L56
L8:
  mov    -0x48(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  mov    %eax,-0x2c(%rbp)
  mov    -0x2c(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x28(%rbp)
  mov    -0x2c(%rbp),%eax
  add    $0x2,%eax
  mov    %eax,-0x24(%rbp)
  movl   $0xffffffff,-0x44(%rbp)
  jmp    L1
L78:
  movl   $0xffffffff,-0x40(%rbp)
  jmp    L77
L112:
  movl   $0xffffffff,-0x3c(%rbp)
  jmp    L60
L61:
  mov    -0x38(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm2
  movapd %xmm0,%xmm1
  subsd  %xmm2,%xmm1
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x44(%rbp),%xmm0
  mulsd  -0x60(%rbp),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x28(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm2
  movapd %xmm0,%xmm1
  subsd  %xmm2,%xmm1
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x40(%rbp),%xmm0
  mulsd  -0x68(%rbp),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm2
  movapd %xmm0,%xmm1
  subsd  %xmm2,%xmm1
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x3c(%rbp),%xmm0
  mulsd  -0x70(%rbp),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movsd  -0x20(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  %xmm0,%xmm1
  movsd  -0x18(%rbp),%xmm0
  mulsd  %xmm0,%xmm0
  addsd  %xmm0,%xmm1
  movsd  -0x10(%rbp),%xmm0
  mulsd  %xmm0,%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movsd  D8(%rip),%xmm0
  comisd -0x8(%rbp),%xmm0
  jb     L38
  mov    $0x1,%eax
  jmp    L98
L38:
  addl   $0x1,-0x3c(%rbp)
L60:
  cmpl   $0x1,-0x3c(%rbp)
  jle    L61
  addl   $0x1,-0x40(%rbp)
L77:
  cmpl   $0x1,-0x40(%rbp)
  jle    L112
  addl   $0x1,-0x44(%rbp)
L1:
  cmpl   $0x1,-0x44(%rbp)
  jle    L78
  addl   $0x1,-0x48(%rbp)
L56:
  mov    -0x48(%rbp),%eax
  cmp    -0x54(%rbp),%eax
  jl     L8
  addl   $0x1,-0x4c(%rbp)
L75:
  mov    -0x4c(%rbp),%eax
  cmp    -0x54(%rbp),%eax
  jl     L42
  mov    $0x0,%eax
L98:
  pop    %rbp
  ret
```

tool_calls: name: read_data
arguments: data_tag: D8
data_type: f64

tool: D8: 4

assistant: ```c
int check_overlap(int np, double lx, double ly, double lz, double *pos) {
  int i;
  int ix, iy, iz;
  int j;
  int jx, jy, jz;
  int kx, ky, kz;
  double rr;
  double x, y, z;
  for (i = 0; i < np; ++i) {
    ix = i * 3;
    iy = ix + 1;
    iz = ix + 2;
    for (j = i + 1; j < np; ++j) {
      jx = j * 3;
      jy = jx + 1;
      jz = jx + 2;
      for (kx = -1; kx <= 1; ++kx) {
        for (ky = -1; ky <= 1; ++ky) {
          for (kz = -1; kz <= 1; ++kz) {
            x = pos[ix] - pos[jx] + (double)kx * lx;
            y = pos[iy] - pos[jy] + (double)ky * ly;
            z = pos[iz] - pos[jz] + (double)kz * lz;
            rr = x * x + y * y + z * z;
            if (rr <= 4.0) {
              return 1;
            }
          }
        }
      }
    }
  }
  return 0;
}
```