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

```asm
<double_chk>:
  endbr64
  push   %r15
  mov    %r8d,%r9d
  push   %r14
  mov    %rsi,%r14
  push   %r13
  mov    %ecx,%r13d
  push   %r12
  mov    %edx,%r12d
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  mov    %r8d,%ebx
  mov    %ecx,%r8d
  mov    %edx,%ecx
  xor    %edx,%edx
  sub    $0x28,%rsp
  movss  %xmm1,(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  call   <frac_pch@plt>
  movss  (%rsp),%xmm1
  mulss  (%r14),%xmm1
  movaps %xmm0,%xmm2
  mulss  D31(%rip),%xmm0
  movss  %xmm1,(%rsp)
  pxor   %xmm1,%xmm1
  cvtsi2ss %r12d,%xmm1
  comiss %xmm1,%xmm0
  jae    L218
L50:
  movaps %xmm2,%xmm0
  divss  D77(%rip),%xmm0
  comiss %xmm1,%xmm0
  jae    L176
  movaps %xmm2,%xmm0
  divss  D37(%rip),%xmm0
  comiss %xmm1,%xmm0
  jae    L173
L104:
  movaps %xmm2,%xmm0
  divss  D75(%rip),%xmm0
  comiss %xmm1,%xmm0
  jae    L59
L89:
  movss  D95(%rip),%xmm0
  mulss  %xmm2,%xmm0
  comiss %xmm1,%xmm0
  jae    L185
  movaps %xmm2,%xmm0
  divss  D46(%rip),%xmm0
  comiss %xmm1,%xmm0
  jae    L41
L68:
  movss  D58(%rip),%xmm0
  mulss  %xmm2,%xmm0
  comiss %xmm1,%xmm0
  jae    L99
L193:
  movaps %xmm2,%xmm0
  mov    %ebx,%r8d
  mov    %r13d,%ecx
  mov    %r12d,%edx
  mov    %r14,%rsi
  mov    %rbp,%rdi
  movss  %xmm2,(%rsp)
  call   <double_ver@plt>
  movss  (%rsp),%xmm2
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L147
  add    $0x28,%rsp
  movaps %xmm2,%xmm0
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L218:
  lea    0x14(%rsp),%r15
  xor    %edx,%edx
  mov    %ebx,%r9d
  mov    %r13d,%r8d
  mov    %r12d,%ecx
  mov    %r15,%rsi
  mov    %rbp,%rdi
  movss  %xmm2,0xc(%rsp)
  movss  %xmm1,0x8(%rsp)
  call   <frac_pch@plt>
  mov    %ebx,%r8d
  mov    %r13d,%ecx
  mov    %r12d,%edx
  mov    %r15,%rsi
  mov    %rbp,%rdi
  movss  %xmm0,0x4(%rsp)
  call   <double_ver@plt>
  movss  0x14(%rsp),%xmm3
  comiss (%rsp),%xmm3
  movss  0x4(%rsp),%xmm0
  movss  0x8(%rsp),%xmm1
  movss  0xc(%rsp),%xmm2
  jbe    L50
  nopl   0x0(%rax,%rax,1)
L2:
  mov    %ebx,%r9d
  mov    %r13d,%r8d
  mov    %r12d,%ecx
  xor    %edx,%edx
  mov    %r14,%rsi
  mov    %rbp,%rdi
  call   <frac_pch@plt>
  movaps %xmm0,%xmm2
  jmp    L193
  xchg   %ax,%ax
L176:
  lea    0x14(%rsp),%r15
  xor    %edx,%edx
  mov    %ebx,%r9d
  mov    %r13d,%r8d
  mov    %r12d,%ecx
  mov    %r15,%rsi
  mov    %rbp,%rdi
  movss  %xmm2,0xc(%rsp)
  movss  %xmm1,0x8(%rsp)
  call   <frac_pch@plt>
  mov    %ebx,%r8d
  mov    %r13d,%ecx
  mov    %r12d,%edx
  mov    %r15,%rsi
  mov    %rbp,%rdi
  movss  %xmm0,0x4(%rsp)
  call   <double_ver@plt>
  movss  0x14(%rsp),%xmm3
  comiss (%rsp),%xmm3
  movss  0x4(%rsp),%xmm0
  movss  0x8(%rsp),%xmm1
  movss  0xc(%rsp),%xmm2
  ja     L2
  movaps %xmm2,%xmm0
  divss  D37(%rip),%xmm0
  comiss %xmm1,%xmm0
  jb     L104
L173:
  lea    0x14(%rsp),%r15
  xor    %edx,%edx
  mov    %ebx,%r9d
  mov    %r13d,%r8d
  mov    %r12d,%ecx
  mov    %r15,%rsi
  mov    %rbp,%rdi
  movss  %xmm2,0xc(%rsp)
  movss  %xmm1,0x8(%rsp)
  call   <frac_pch@plt>
  mov    %ebx,%r8d
  mov    %r13d,%ecx
  mov    %r12d,%edx
  mov    %r15,%rsi
  mov    %rbp,%rdi
  movss  %xmm0,0x4(%rsp)
  call   <double_ver@plt>
  movss  0x14(%rsp),%xmm3
  comiss (%rsp),%xmm3
  movss  0x4(%rsp),%xmm0
  movss  0x8(%rsp),%xmm1
  movss  0xc(%rsp),%xmm2
  ja     L2
  movaps %xmm2,%xmm0
  divss  D75(%rip),%xmm0
  comiss %xmm1,%xmm0
  jb     L89
L59:
  lea    0x14(%rsp),%r15
  xor    %edx,%edx
  mov    %ebx,%r9d
  mov    %r13d,%r8d
  mov    %r12d,%ecx
  mov    %r15,%rsi
  mov    %rbp,%rdi
  movss  %xmm2,0xc(%rsp)
  movss  %xmm1,0x8(%rsp)
  call   <frac_pch@plt>
  mov    %ebx,%r8d
  mov    %r13d,%ecx
  mov    %r12d,%edx
  mov    %r15,%rsi
  mov    %rbp,%rdi
  movss  %xmm0,0x4(%rsp)
  call   <double_ver@plt>
  movss  0x14(%rsp),%xmm3
  comiss (%rsp),%xmm3
  movss  0x4(%rsp),%xmm0
  movss  0x8(%rsp),%xmm1
  movss  0xc(%rsp),%xmm2
  jbe    L89
  jmp    L2
  nopw   0x0(%rax,%rax,1)
L185:
  lea    0x14(%rsp),%r15
  xor    %edx,%edx
  mov    %ebx,%r9d
  mov    %r13d,%r8d
  mov    %r12d,%ecx
  mov    %r15,%rsi
  mov    %rbp,%rdi
  movss  %xmm2,0xc(%rsp)
  movss  %xmm1,0x8(%rsp)
  call   <frac_pch@plt>
  mov    %ebx,%r8d
  mov    %r13d,%ecx
  mov    %r12d,%edx
  mov    %r15,%rsi
  mov    %rbp,%rdi
  movss  %xmm0,0x4(%rsp)
  call   <double_ver@plt>
  movss  0x14(%rsp),%xmm3
  comiss (%rsp),%xmm3
  movss  0x4(%rsp),%xmm0
  movss  0x8(%rsp),%xmm1
  movss  0xc(%rsp),%xmm2
  ja     L2
  movaps %xmm2,%xmm0
  divss  D46(%rip),%xmm0
  comiss %xmm1,%xmm0
  jb     L68
L41:
  lea    0x14(%rsp),%r15
  xor    %edx,%edx
  mov    %ebx,%r9d
  mov    %r13d,%r8d
  mov    %r12d,%ecx
  mov    %r15,%rsi
  mov    %rbp,%rdi
  movss  %xmm2,0xc(%rsp)
  movss  %xmm1,0x8(%rsp)
  call   <frac_pch@plt>
  mov    %ebx,%r8d
  mov    %r13d,%ecx
  mov    %r12d,%edx
  mov    %r15,%rsi
  mov    %rbp,%rdi
  movss  %xmm0,0x4(%rsp)
  call   <double_ver@plt>
  movss  0x14(%rsp),%xmm3
  comiss (%rsp),%xmm3
  movss  0x4(%rsp),%xmm0
  movss  0x8(%rsp),%xmm1
  movss  0xc(%rsp),%xmm2
  jbe    L68
  jmp    L2
  nopw   0x0(%rax,%rax,1)
L99:
  lea    0x14(%rsp),%r15
  xor    %edx,%edx
  mov    %ebx,%r9d
  mov    %r13d,%r8d
  mov    %r12d,%ecx
  mov    %r15,%rsi
  mov    %rbp,%rdi
  movss  %xmm2,0x8(%rsp)
  call   <frac_pch@plt>
  mov    %ebx,%r8d
  mov    %r13d,%ecx
  mov    %r12d,%edx
  mov    %r15,%rsi
  mov    %rbp,%rdi
  movss  %xmm0,0x4(%rsp)
  call   <double_ver@plt>
  movss  0x14(%rsp),%xmm1
  comiss (%rsp),%xmm1
  movss  0x4(%rsp),%xmm0
  movss  0x8(%rsp),%xmm2
  jbe    L193
  jmp    L2
L147:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: label: D31
data_type: byte[4]
name: parse_data
arguments: label: D77
data_type: byte[4]
name: parse_data
arguments: label: D37
data_type: byte[4]
name: parse_data
arguments: label: D75
data_type: byte[4]
name: parse_data
arguments: label: D95
data_type: byte[4]
name: parse_data
arguments: label: D46
data_type: byte[4]
name: parse_data
arguments: label: D58
data_type: byte[4]

tool: {"D31": [0x00,0x00,0x00,0x3e]}

tool: {"D77": [0x00,0x00,0xe0,0x40]}

tool: {"D37": [0x00,0x00,0xc0,0x40]}

tool: {"D75": [0x00,0x00,0xa0,0x40]}

tool: {"D95": [0x00,0x00,0x80,0x3e]}

tool: {"D46": [0x00,0x00,0x40,0x40]}

tool: {"D58": [0x00,0x00,0x00,0x3f]}

assistant: ```c
float double_chk(float sig_in[], float *pcorr, float pitch, float pdouble, int pmin, int pmax, int lmin) {
  int mult;
  float corr, thresh;
  float temp_pit;
  pitch = frac_pch(sig_in, pcorr, pitch, 0, pmin, pmax, lmin);
  thresh = pdouble * (*pcorr);
  for (mult = 8; mult >= 2; mult--) {
    temp_pit = pitch / mult;
    if (temp_pit >= pmin) {
      temp_pit = frac_pch(sig_in, &corr, temp_pit, 0, pmin, pmax, lmin);
      double_ver(sig_in, &corr, temp_pit, pmin, pmax, lmin);
      if (corr > thresh) {
        pitch = frac_pch(sig_in, pcorr, temp_pit, 0, pmin, pmax, lmin);
        break;
      }
    }
  }
  double_ver(sig_in, pcorr, pitch, pmin, pmax, lmin);
  return (pitch);
}
```