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

```asm
<pet_c_raycasting>:
  endbr64
  push   %rbp
  pxor   %xmm7,%xmm7
  pxor   %xmm14,%xmm14
  push   %rbx
  mov    0x60(%rsp),%ebx
  mov    0x58(%rsp),%eax
  mov    0x18(%rsp),%r9
  mov    0x28(%rsp),%r10
  mov    0x38(%rsp),%r11
  cvtsi2ssl 0x58(%rsp),%xmm7
  add    %ebx,%eax
  cvtsi2ssl 0x68(%rsp),%xmm14
  test   %esi,%esi
  jle    L65
  pxor   %xmm13,%xmm13
  mov    %rdi,%rcx
  pxor   %xmm6,%xmm6
  mov    %rdx,%rdi
  movsd  D26(%rip),%xmm8
  cvtsi2ss %eax,%xmm13
  movslq %esi,%rdx
  xor    %eax,%eax
  nop
L96:
  movss  (%rcx,%rax,4),%xmm5
  movss  (%r9,%rax,4),%xmm1
  movss  (%rdi,%rax,4),%xmm11
  movss  (%r8,%rax,4),%xmm9
  subss  %xmm5,%xmm1
  movss  (%r10,%rax,4),%xmm3
  movss  (%r11,%rax,4),%xmm10
  subss  %xmm11,%xmm3
  subss  %xmm9,%xmm10
  ucomiss %xmm6,%xmm1
  jp     L276
  je     L116
L276:
  movaps %xmm7,%xmm0
  movaps %xmm13,%xmm4
  subss  %xmm5,%xmm0
  subss  %xmm5,%xmm4
  divss  %xmm1,%xmm0
  divss  %xmm1,%xmm4
  comiss %xmm4,%xmm0
  jbe    L57
  movaps %xmm0,%xmm2
  movaps %xmm4,%xmm0
  movaps %xmm2,%xmm4
L57:
  ucomiss %xmm6,%xmm3
  jp     L231
  je     L268
L231:
  movaps %xmm7,%xmm12
  movaps %xmm13,%xmm2
  subss  %xmm11,%xmm12
  subss  %xmm11,%xmm2
  divss  %xmm3,%xmm12
  divss  %xmm3,%xmm2
  comiss %xmm2,%xmm12
  jbe    L308
  movaps %xmm12,%xmm15
  movaps %xmm2,%xmm12
  movaps %xmm15,%xmm2
L308:
  maxss  %xmm0,%xmm12
  minss  %xmm4,%xmm2
  movaps %xmm12,%xmm0
  movaps %xmm2,%xmm4
L268:
  ucomiss %xmm6,%xmm10
  jp     L84
  je     L252
L84:
  movaps %xmm6,%xmm12
  movaps %xmm14,%xmm2
  subss  %xmm9,%xmm12
  subss  %xmm9,%xmm2
  divss  %xmm10,%xmm12
  divss  %xmm10,%xmm2
  comiss %xmm2,%xmm12
  jbe    L133
  movaps %xmm12,%xmm15
  movaps %xmm2,%xmm12
  movaps %xmm15,%xmm2
L133:
  maxss  %xmm0,%xmm12
  minss  %xmm4,%xmm2
  movaps %xmm12,%xmm0
  movaps %xmm2,%xmm4
L252:
  movaps %xmm0,%xmm2
  mulss  %xmm1,%xmm2
  addss  %xmm5,%xmm2
  comiss %xmm7,%xmm2
  jb     L56
  comiss %xmm2,%xmm13
  jb     L56
  movaps %xmm0,%xmm12
  mulss  %xmm3,%xmm12
  addss  %xmm11,%xmm12
  comiss %xmm7,%xmm12
  jb     L56
  comiss %xmm12,%xmm13
  jb     L56
  mulss  %xmm10,%xmm0
  addss  %xmm9,%xmm0
  comiss %xmm6,%xmm0
  jb     L56
  comiss %xmm0,%xmm14
  jb     L56
  subss  %xmm7,%xmm2
  pxor   %xmm15,%xmm15
  subss  %xmm7,%xmm12
  cvtss2sd %xmm2,%xmm15
  addsd  %xmm8,%xmm15
  cvttsd2si %xmm15,%esi
  cmp    %ebx,%esi
  jne    L302
  pxor   %xmm2,%xmm2
  cvtsi2ss %ebx,%xmm2
  subss  D70(%rip),%xmm2
L302:
  pxor   %xmm15,%xmm15
  cvtss2sd %xmm12,%xmm15
  addsd  %xmm8,%xmm15
  cvttsd2si %xmm15,%esi
  cmp    %ebx,%esi
  jne    L145
  pxor   %xmm12,%xmm12
  cvtsi2ss %ebx,%xmm12
  subss  D70(%rip),%xmm12
L145:
  pxor   %xmm15,%xmm15
  cvtss2sd %xmm0,%xmm15
  addsd  %xmm8,%xmm15
  cvttsd2si %xmm15,%esi
  cmp    0x68(%rsp),%esi
  jne    L200
  movaps %xmm14,%xmm0
  subss  D70(%rip),%xmm0
L200:
  mulss  %xmm4,%xmm1
  movss  %xmm2,(%rcx,%rax,4)
  movss  %xmm12,(%rdi,%rax,4)
  movss  %xmm0,(%r8,%rax,4)
  addss  %xmm5,%xmm1
  comiss %xmm7,%xmm1
  jb     L56
  comiss %xmm1,%xmm13
  jb     L56
  mulss  %xmm4,%xmm3
  addss  %xmm11,%xmm3
  comiss %xmm7,%xmm3
  jb     L56
  comiss %xmm3,%xmm13
  jb     L56
  mulss  %xmm10,%xmm4
  addss  %xmm9,%xmm4
  comiss %xmm6,%xmm4
  jb     L56
  comiss %xmm4,%xmm14
  jb     L56
  subss  %xmm7,%xmm1
  pxor   %xmm5,%xmm5
  subss  %xmm7,%xmm3
  cvtss2sd %xmm1,%xmm5
  addsd  %xmm8,%xmm5
  cvttsd2si %xmm5,%esi
  cmp    %ebx,%esi
  jne    L157
  pxor   %xmm1,%xmm1
  cvtsi2ss %ebx,%xmm1
  subss  D70(%rip),%xmm1
L157:
  pxor   %xmm5,%xmm5
  cvtss2sd %xmm3,%xmm5
  addsd  %xmm8,%xmm5
  cvttsd2si %xmm5,%esi
  cmp    %ebx,%esi
  jne    L240
  pxor   %xmm3,%xmm3
  cvtsi2ss %ebx,%xmm3
  subss  D70(%rip),%xmm3
L240:
  pxor   %xmm5,%xmm5
  cvtss2sd %xmm4,%xmm5
  addsd  %xmm8,%xmm5
  cvttsd2si %xmm5,%esi
  cmp    0x68(%rsp),%esi
  jne    L279
  movaps %xmm14,%xmm4
  subss  D70(%rip),%xmm4
L279:
  cvttss2si %xmm2,%esi
  movss  %xmm1,(%r9,%rax,4)
  cvttss2si %xmm1,%ebp
  movss  %xmm3,(%r10,%rax,4)
  movss  %xmm4,(%r11,%rax,4)
  cmp    %ebp,%esi
  je     L321
L230:
  mov    0x48(%rsp),%rsi
  movl   $0x1,(%rsi,%rax,4)
  xchg   %ax,%ax
L56:
  add    $0x1,%rax
  cmp    %rax,%rdx
  jne    L96
L65:
  pop    %rbx
  pop    %rbp
  ret
L116:
  movss  D44(%rip),%xmm4
  movss  D4(%rip),%xmm0
  jmp    L57
L321:
  cvttss2si %xmm12,%ebp
  cvttss2si %xmm3,%esi
  cmp    %esi,%ebp
  jne    L230
  cvttss2si %xmm0,%ebp
  cvttss2si %xmm4,%esi
  cmp    %esi,%ebp
  jne    L230
  jmp    L56
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D26
data_type: f64
name: extract_symbolic_data
arguments: data_label: D70
data_type: byte[4]
name: extract_symbolic_data
arguments: data_label: D44
data_type: byte[4]
name: extract_symbolic_data
arguments: data_label: D4
data_type: byte[4]

tool: D26: 0.5

tool: {"D70": [0x00,0x00,0x80,0x3f]}

tool: {"D44": [0x28,0x6b,0x6e,0x4e]}

tool: {"D4": [0x28,0x6b,0x6e,0xce]}

assistant: ```c
void pet_c_raycasting(float *x1, int nx1, float *y1, int ny1, float *z1, int nz1, float *x2, int nx2, float *y2, int ny2, float *z2, int nz2, int *enable, int nenable, int border, int ROIxy, int ROIz) {
  int i, chk1, chk2;
  float xd, yd, zd, xmin, ymin, zmin, xmax, ymax, zmax;
  float tmin, tmax, tymin, tymax, tzmin, tzmax, buf;
  float xi1, yi1, zi1, xp1, yp1, zp1, xp2, yp2, zp2;
  xmin = (float)border;
  xmax = (float)(border + ROIxy);
  ymin = (float)border;
  ymax = (float)(border + ROIxy);
  zmin = 0.0f;
  zmax = (float)ROIz;
  for (i = 0; i < nx1; ++i) {
    xi1 = x1[i];
    yi1 = y1[i];
    zi1 = z1[i];
    xd = x2[i] - xi1;
    yd = y2[i] - yi1;
    zd = z2[i] - zi1;
    tmin = -1e9f;
    tmax = 1e9f;
    if (xd != 0.0f) {
      tmin = (xmin - xi1) / xd;
      tmax = (xmax - xi1) / xd;
      if (tmin > tmax) {
        buf = tmin;
        tmin = tmax;
        tmax = buf;
      }
    }
    if (yd != 0.0f) {
      tymin = (ymin - yi1) / yd;
      tymax = (ymax - yi1) / yd;
      if (tymin > tymax) {
        buf = tymin;
        tymin = tymax;
        tymax = buf;
      }
      if (tymin > tmin) {
        tmin = tymin;
      }
      if (tymax < tmax) {
        tmax = tymax;
      }
    }
    if (zd != 0.0f) {
      tzmin = (zmin - zi1) / zd;
      tzmax = (zmax - zi1) / zd;
      if (tzmin > tzmax) {
        buf = tzmin;
        tzmin = tzmax;
        tzmax = buf;
      }
      if (tzmin > tmin) {
        tmin = tzmin;
      }
      if (tzmax < tmax) {
        tmax = tzmax;
      }
    }
    xp1 = xi1 + xd * tmin;
    yp1 = yi1 + yd * tmin;
    zp1 = zi1 + zd * tmin;
    xp2 = xi1 + xd * tmax;
    yp2 = yi1 + yd * tmax;
    zp2 = zi1 + zd * tmax;
    chk1 = 0;
    chk2 = 0;
    if (xp1 >= xmin && xp1 <= xmax) {
      if (yp1 >= ymin && yp1 <= ymax) {
        if (zp1 >= zmin && zp1 <= zmax) {
          xp1 -= border;
          yp1 -= border;
          if ((int)(xp1 + 0.5) == ROIxy) {
            xp1 = ROIxy - 1.0f;
          }
          if ((int)(yp1 + 0.5) == ROIxy) {
            yp1 = ROIxy - 1.0f;
          }
          if ((int)(zp1 + 0.5) == ROIz) {
            zp1 = ROIz - 1.0f;
          }
          x1[i] = xp1;
          y1[i] = yp1;
          z1[i] = zp1;
          chk1 = 1;
        } else {
          continue;
        }
      } else {
        continue;
      }
    } else {
      continue;
    }
    if (xp2 >= xmin && xp2 <= xmax) {
      if (yp2 >= ymin && yp2 <= ymax) {
        if (zp2 >= zmin && zp2 <= zmax) {
          xp2 -= border;
          yp2 -= border;
          if ((int)(xp2 + 0.5) == ROIxy) {
            xp2 = ROIxy - 1.0f;
          }
          if ((int)(yp2 + 0.5) == ROIxy) {
            yp2 = ROIxy - 1.0f;
          }
          if ((int)(zp2 + 0.5) == ROIz) {
            zp2 = ROIz - 1.0f;
          }
          x2[i] = xp2;
          y2[i] = yp2;
          z2[i] = zp2;
          chk2 = 1;
        } else {
          continue;
        }
      } else {
        continue;
      }
    } else {
      continue;
    }
    if (chk1 && chk2) {
      if ((int)xp1 == (int)xp2 && (int)yp1 == (int)yp2 && (int)zp1 == (int)zp2) {
        continue;
      }
      enable[i] = 1;
    }
  }
}
```