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

```asm
<wcsutil_dblEq>:
  endbr64
  mov    %rsi,%rax
  mov    $0x1,%ecx
  test   %edi,%edi
  je     L79
  mov    $0x0,%ecx
  js     L79
  mov    $0x1,%ecx
  or     %rdx,%rsi
  je     L79
  ucomisd D95(%rip),%xmm0
  jp     L124
  mov    %edi,%r9d
  mov    $0x0,%r8d
  jne    L124
  movsd  D69(%rip),%xmm2
  mov    $0x1,%edi
  mov    $0x0,%r10d
  movapd %xmm2,%xmm3
  movapd %xmm2,%xmm4
  jmp    L176
L255:
  movsd  D69(%rip),%xmm1
L207:
  ucomisd D69(%rip),%xmm0
  setp   %sil
  ucomisd %xmm2,%xmm0
  cmovne %edi,%esi
  ucomisd D69(%rip),%xmm1
  setnp  %cl
  ucomisd %xmm2,%xmm1
  cmovne %r10d,%ecx
  test   %cl,%sil
  jne    L82
  ucomisd %xmm1,%xmm0
  setp   %cl
  cmovne %edi,%ecx
  test   %cl,%cl
  jne    L82
L266:
  add    $0x1,%r8
  cmp    %r9,%r8
  je     L104
L176:
  test   %rax,%rax
  je     L175
  movsd  (%rax,%r8,8),%xmm0
  test   %rdx,%rdx
  je     L255
L66:
  movsd  (%rdx,%r8,8),%xmm1
  ucomisd D69(%rip),%xmm0
  setnp  %cl
  ucomisd %xmm3,%xmm0
  cmovne %r10d,%ecx
  test   %cl,%cl
  je     L207
  ucomisd D69(%rip),%xmm1
  setp   %cl
  ucomisd %xmm4,%xmm1
  cmovne %edi,%ecx
  test   %cl,%cl
  je     L207
  mov    $0x0,%ecx
  jmp    L79
L104:
  mov    $0x1,%ecx
  jmp    L79
L124:
  mov    %edi,%edi
  mov    $0x0,%ecx
  movsd  D69(%rip),%xmm5
  movapd %xmm5,%xmm7
  movapd %xmm5,%xmm6
  movapd %xmm5,%xmm8
  movq   D125(%rip),%xmm4
  movsd  D65(%rip),%xmm3
  jmp    L132
L35:
  movsd  D69(%rip),%xmm2
L192:
  ucomisd D69(%rip),%xmm1
  setp   %sil
  ucomisd %xmm5,%xmm1
  mov    $0x1,%r8d
  cmovne %r8d,%esi
  test   %sil,%sil
  je     L314
  ucomisd D69(%rip),%xmm2
  setnp  %sil
  ucomisd %xmm7,%xmm2
  mov    $0x0,%r8d
  cmovne %r8d,%esi
  test   %sil,%sil
  jne    L112
L314:
  subsd  %xmm2,%xmm1
  andpd  %xmm4,%xmm1
  movapd %xmm0,%xmm2
  mulsd  %xmm3,%xmm2
  comisd %xmm2,%xmm1
  ja     L3
  add    $0x1,%rcx
  cmp    %rdi,%rcx
  je     L84
L132:
  test   %rax,%rax
  je     L7
  movsd  (%rax,%rcx,8),%xmm1
  test   %rdx,%rdx
  je     L35
L157:
  movsd  (%rdx,%rcx,8),%xmm2
  ucomisd D69(%rip),%xmm1
  setnp  %sil
  ucomisd %xmm6,%xmm1
  mov    $0x0,%r8d
  cmovne %r8d,%esi
  test   %sil,%sil
  je     L192
  ucomisd D69(%rip),%xmm2
  setp   %sil
  ucomisd %xmm8,%xmm2
  mov    $0x1,%r8d
  cmovne %r8d,%esi
  test   %sil,%sil
  je     L192
  mov    $0x0,%ecx
  jmp    L79
L84:
  mov    $0x1,%ecx
  jmp    L79
L82:
  mov    $0x0,%ecx
L79:
  mov    %ecx,%eax
  ret
L112:
  mov    $0x0,%ecx
  jmp    L79
L3:
  mov    $0x0,%ecx
  jmp    L79
L175:
  movsd  D69(%rip),%xmm0
  test   %rdx,%rdx
  jne    L66
  jmp    L266
L7:
  movsd  D69(%rip),%xmm1
  test   %rdx,%rdx
  jne    L157
  movapd %xmm1,%xmm2
  jmp    L314
```

tool_calls: name: parse_data
arguments: data_tag: D95
type_guessed: f64
name: parse_data
arguments: data_tag: D69
type_guessed: f64
name: parse_data
arguments: data_tag: D125
type_guessed: qword
name: parse_data
arguments: data_tag: D65
type_guessed: f64

tool: D95: 0

tool: D69: 9.87654321e+107

tool: D125: 9223372036854775807

tool: D65: 0.5

assistant: ```c
int wcsutil_dblEq(int nelem, double tol, const double *darr1, const double *darr2) {
  if (nelem == 0)
    return 1;
  if (nelem < 0)
    return 0;
  if (darr1 == 0x0 && darr2 == 0x0)
    return 1;
  if (tol == 0.0) {
    for (int i = 0; i < nelem; i++) {
      double dval1 = (darr1 ? darr1[i] : 987654321.0e99);
      double dval2 = (darr2 ? darr2[i] : 987654321.0e99);
      if (dval1 == 987654321.0e99 && dval2 != 987654321.0e99)
        return 0;
      if (dval1 != 987654321.0e99 && dval2 == 987654321.0e99)
        return 0;
      if (dval1 != dval2)
        return 0;
    }
  } else {
    for (int i = 0; i < nelem; i++) {
      double dval1 = (darr1 ? darr1[i] : 987654321.0e99);
      double dval2 = (darr2 ? darr2[i] : 987654321.0e99);
      if (dval1 == 987654321.0e99 && dval2 != 987654321.0e99)
        return 0;
      if (dval1 != 987654321.0e99 && dval2 == 987654321.0e99)
        return 0;
      if (fabs(dval1 - dval2) > 0.5 * tol)
        return 0;
    }
  }
  return 1;
}
```