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

```asm
<wcsutil_dblEq>:
  endbr64
  mov    %rsi,%rax
  mov    $0x1,%r8d
  test   %edi,%edi
  je     L72
  mov    $0x0,%r8d
  js     L72
  mov    %rsi,%rcx
  mov    $0x1,%r8d
  or     %rdx,%rcx
  je     L72
  pxor   %xmm7,%xmm7
  movslq %edi,%rdi
  ucomisd %xmm7,%xmm0
  jp     L135
  jne    L135
  shl    $0x3,%rdi
  xor    %ecx,%ecx
  mov    $0x1,%r9d
  xor    %r10d,%r10d
  movsd  D86(%rip),%xmm3
  jmp    L163
  cs nopw 0x0(%rax,%rax,1)
L27:
  movsd  (%rax,%rcx,1),%xmm1
  test   %rdx,%rdx
  je     L122
  ucomisd D86(%rip),%xmm1
  movapd %xmm3,%xmm2
  setnp  %r8b
  ucomisd %xmm3,%xmm1
  cmovne %r10d,%r8d
L141:
  movsd  (%rdx,%rcx,1),%xmm0
  ucomisd D86(%rip),%xmm0
  setp   %sil
  ucomisd %xmm2,%xmm0
  cmovne %r9d,%esi
  test   %sil,%sil
  je     L144
  test   %r8b,%r8b
  jne    L149
L144:
  ucomisd D86(%rip),%xmm0
  setnp  %r8b
  ucomisd %xmm2,%xmm0
  cmovne %r10d,%r8d
L177:
  ucomisd D86(%rip),%xmm1
  setp   %sil
  ucomisd %xmm2,%xmm1
  cmovne %r9d,%esi
  test   %r8b,%sil
  jne    L149
  ucomisd %xmm0,%xmm1
  setp   %sil
  cmovne %r9d,%esi
  test   %sil,%sil
  jne    L149
L269:
  add    $0x8,%rcx
  cmp    %rdi,%rcx
  je     L115
L163:
  test   %rax,%rax
  jne    L27
  test   %rdx,%rdx
  je     L269
  mov    $0x1,%r8d
  movapd %xmm3,%xmm2
  movapd %xmm3,%xmm1
  jmp    L141
  nopl   (%rax)
L149:
  xor    %r8d,%r8d
L72:
  mov    %r8d,%eax
  ret
  nop
L135:
  shl    $0x3,%rdi
  xor    %esi,%esi
  mov    $0x1,%r9d
  xor    %r10d,%r10d
  movsd  D86(%rip),%xmm4
  movq   D97(%rip),%xmm6
  movsd  D45(%rip),%xmm5
  jmp    L262
  nopl   0x0(%rax)
L18:
  movsd  (%rax,%rsi,1),%xmm1
  test   %rdx,%rdx
  je     L204
  ucomisd D86(%rip),%xmm1
  movapd %xmm4,%xmm2
  setnp  %r8b
  ucomisd %xmm4,%xmm1
  cmovne %r10d,%r8d
L235:
  movsd  (%rdx,%rsi,1),%xmm3
  ucomisd D86(%rip),%xmm3
  setp   %cl
  ucomisd %xmm2,%xmm3
  cmovne %r9d,%ecx
  test   %cl,%cl
  je     L168
  test   %r8b,%r8b
  jne    L149
L168:
  ucomisd D86(%rip),%xmm3
  setnp  %cl
  ucomisd %xmm2,%xmm3
  cmovne %r10d,%ecx
  mov    %ecx,%r8d
L15:
  ucomisd D86(%rip),%xmm1
  setp   %cl
  ucomisd %xmm2,%xmm1
  cmovne %r9d,%ecx
  test   %cl,%cl
  je     L20
  test   %r8b,%r8b
  jne    L149
L20:
  subsd  %xmm3,%xmm1
  andpd  %xmm6,%xmm1
L22:
  movapd %xmm0,%xmm2
  mulsd  %xmm5,%xmm2
  comisd %xmm2,%xmm1
  ja     L149
  add    $0x8,%rsi
  cmp    %rsi,%rdi
  je     L115
L262:
  test   %rax,%rax
  jne    L18
  pxor   %xmm1,%xmm1
  test   %rdx,%rdx
  je     L22
  mov    $0x1,%r8d
  movapd %xmm4,%xmm2
  movapd %xmm4,%xmm1
  jmp    L235
  nopl   0x0(%rax)
L204:
  mov    $0x1,%r8d
  movapd %xmm4,%xmm2
  movapd %xmm4,%xmm3
  jmp    L15
L122:
  mov    $0x1,%r8d
  movapd %xmm3,%xmm2
  movapd %xmm3,%xmm0
  jmp    L177
  nopl   0x0(%rax,%rax,1)
L115:
  mov    $0x1,%r8d
  jmp    L72
```

tool_calls: name: unpack_data
arguments: label: D86
type_infered: f64
name: unpack_data
arguments: label: D97
type_infered: qword
name: unpack_data
arguments: label: D45
type_infered: f64

tool: D86: 9.87654321e+107

tool: D97: 9223372036854775807

tool: D45: 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;
}
```