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

```asm
<bitset>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x870,%rsp
  mov    %rdi,-0x848(%rbp)
  mov    %rsi,-0x850(%rbp)
  mov    %edx,-0x854(%rbp)
  mov    %rcx,-0x860(%rbp)
  mov    %r8d,-0x858(%rbp)
  mov    %r9d,-0x864(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x828(%rbp)
  mov    -0x850(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,-0x838(%rbp)
  mov    -0x838(%rbp),%eax
  mov    %eax,-0x83c(%rbp)
  movl   $0x1,-0x834(%rbp)
  jmp    L139
L54:
  mov    -0x834(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x850(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    -0x838(%rbp),%edx
  cmp    %eax,%edx
  cmovge %edx,%eax
  mov    %eax,-0x838(%rbp)
  mov    -0x834(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x850(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    -0x83c(%rbp),%edx
  cmp    %eax,%edx
  cmovle %edx,%eax
  mov    %eax,-0x83c(%rbp)
  addl   $0x1,-0x834(%rbp)
L139:
  mov    -0x834(%rbp),%eax
  cmp    -0x854(%rbp),%eax
  jl     L54
  mov    -0x838(%rbp),%eax
  cmp    -0x83c(%rbp),%eax
  jge    L92
  mov    -0x83c(%rbp),%eax
  mov    %eax,-0x824(%rbp)
  mov    -0x838(%rbp),%eax
  mov    %eax,-0x83c(%rbp)
  mov    -0x824(%rbp),%eax
  mov    %eax,-0x838(%rbp)
L92:
  mov    -0x83c(%rbp),%eax
  mov    $0x0,%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  mov    %eax,-0x83c(%rbp)
  mov    -0x864(%rbp),%eax
  cmp    -0x838(%rbp),%eax
  jg     L148
  mov    -0x864(%rbp),%eax
  sub    $0x1,%eax
  jmp    L98
L148:
  mov    -0x838(%rbp),%eax
L98:
  mov    %eax,-0x838(%rbp)
  mov    -0x83c(%rbp),%eax
  mov    %eax,-0x830(%rbp)
  jmp    L34
L0:
  lea    -0x810(%rbp),%rdi
  mov    -0x830(%rbp),%ecx
  mov    -0x854(%rbp),%edx
  mov    -0x850(%rbp),%rsi
  mov    -0x848(%rbp),%rax
  mov    %rdi,%r8
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <xxsect@plt>
  mov    %eax,-0x828(%rbp)
  cmpl   $0x1,-0x828(%rbp)
  jle    L18
  movl   $0x1,-0x834(%rbp)
  jmp    L62
L24:
  mov    -0x830(%rbp),%eax
  imul   -0x858(%rbp),%eax
  mov    %eax,-0x820(%rbp)
  mov    -0x834(%rbp),%eax
  sub    $0x1,%eax
  cltq
  mov    -0x810(%rbp,%rax,4),%edx
  mov    -0x834(%rbp),%eax
  cltq
  mov    -0x810(%rbp,%rax,4),%eax
  add    %edx,%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  mov    %eax,-0x81c(%rbp)
  mov    -0x830(%rbp),%edi
  mov    -0x81c(%rbp),%ecx
  mov    -0x854(%rbp),%edx
  mov    -0x850(%rbp),%rsi
  mov    -0x848(%rbp),%rax
  mov    %edi,%r8d
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <inside@plt>
  test   %eax,%eax
  je     L95
  mov    -0x834(%rbp),%eax
  sub    $0x1,%eax
  cltq
  mov    -0x810(%rbp,%rax,4),%eax
  mov    $0x0,%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  mov    %eax,-0x818(%rbp)
  mov    -0x834(%rbp),%eax
  cltq
  mov    -0x810(%rbp,%rax,4),%eax
  cmp    %eax,-0x858(%rbp)
  jg     L21
  mov    -0x858(%rbp),%eax
  sub    $0x1,%eax
  jmp    L50
L21:
  mov    -0x834(%rbp),%eax
  cltq
  mov    -0x810(%rbp,%rax,4),%eax
L50:
  mov    %eax,-0x814(%rbp)
  mov    -0x818(%rbp),%eax
  mov    %eax,-0x82c(%rbp)
  jmp    L146
L79:
  mov    -0x820(%rbp),%edx
  mov    -0x82c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x860(%rbp),%rax
  add    %rdx,%rax
  movss  D4(%rip),%xmm0
  movss  %xmm0,(%rax)
  addl   $0x1,-0x82c(%rbp)
L146:
  mov    -0x82c(%rbp),%eax
  cmp    -0x814(%rbp),%eax
  jle    L79
L95:
  addl   $0x1,-0x834(%rbp)
L62:
  mov    -0x834(%rbp),%eax
  cmp    -0x828(%rbp),%eax
  jl     L24
L18:
  addl   $0x1,-0x830(%rbp)
L34:
  mov    -0x830(%rbp),%eax
  cmp    -0x838(%rbp),%eax
  jle    L0
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L52
  call   <__stack_chk_fail@plt>
L52:
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: tag: D4
type_guessed: f32

tool: D4: 1

assistant: ```c
void bitset(xverts, yverts, nverts, mask, npix, nrast) float mask[];
int xverts[], yverts[], nverts;
int npix, nrast;
{
  int xsects[512];
  int ifrast, ilrast;
  int ifpix, ilpix;
  int nxsect = 0;
  int i, j, k, n, ix, itemp;
  ifrast = ilrast = yverts[0];
  for (i = 1; i < nverts; i++) {
    ilrast = ((yverts[i]) > (ilrast) ? (yverts[i]) : (ilrast));
    ifrast = ((yverts[i]) < (ifrast) ? (yverts[i]) : (ifrast));
  }
  if (ilrast < ifrast)
    (itemp = (ifrast), (ifrast) = (ilrast), (ilrast) = itemp);
  ifrast = ((0) > (ifrast) ? (0) : (ifrast));
  ilrast = (((nrast - 1)) < (ilrast) ? ((nrast - 1)) : (ilrast));
  for (j = ifrast; j <= ilrast; j++)
    if ((nxsect = xxsect(xverts, yverts, nverts, j, xsects)) > 1)
      for (i = 1; i < nxsect; i++) {
        n = (j * npix);
        ix = (xsects[i - 1] + xsects[i]) / 2;
        if (inside(xverts, yverts, nverts, ix, j)) {
          ifpix = ((0) > (xsects[i - 1]) ? (0) : (xsects[i - 1]));
          ilpix = (((npix - 1)) < (xsects[i]) ? ((npix - 1)) : (xsects[i]));
          for (k = ifpix; k <= ilpix; k++)
            mask[n + k] = 1.0;
        }
      }
}
```