user: 请将以下的汇编代码转换成C语言代码:

```asm
<frac_pch>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %rdi,%r12
  mov    %rsi,0x20(%rsp)
  mov    %edx,%eax
  mov    %ecx,0x28(%rsp)
  mov    %r8d,%r14d
  mov    %r9d,%ebx
  mov    %fs:0x28,%rdx
  mov    %rdx,0x38(%rsp)
  xor    %edx,%edx
  test   %eax,%eax
  jle    L19
  mov    %ecx,%edi
  cvtss2sd %xmm0,%xmm0
  addsd  D88(%rip),%xmm0
  cvttsd2si %xmm0,%r8d
  lea    (%rax,%r8,1),%ecx
  cmp    %r14d,%ecx
  cmovg  %r14d,%ecx
  mov    %r8d,%edx
  sub    %eax,%edx
  cmp    %edi,%edx
  cmovl  %edi,%edx
  pxor   %xmm0,%xmm0
  cvtsi2sd %r8d,%xmm0
  mulsd  D64(%rip),%xmm0
  pxor   %xmm1,%xmm1
  cvtsi2sd %edx,%xmm1
  comisd %xmm1,%xmm0
  jbe    L43
  cvttsd2si %xmm0,%edx
L43:
  lea    0x34(%rsp),%rsi
  cmp    %ebx,%r8d
  cmovl  %ebx,%r8d
  mov    %r12,%rdi
  call   <find_pitch@plt>
L19:
  cvtss2sd %xmm0,%xmm0
  addsd  D88(%rip),%xmm0
  cvttsd2si %xmm0,%ebp
  lea    -0x1(%r14),%eax
  cmp    %ebp,%r14d
  cmovle %eax,%ebp
  cmp    %ebx,%ebp
  cmovge %ebp,%ebx
  lea    (%rbx,%rbp,1),%edx
  mov    %edx,%eax
  shr    $0x1f,%eax
  add    %edx,%eax
  sar    %eax
  neg    %eax
  mov    %eax,0xc(%rsp)
  lea    0x0(%rbp,%rax,1),%r13d
  movslq %r13d,%r13
  shl    $0x2,%r13
  cltq
  lea    (%r12,%rax,4),%r15
  lea    (%r12,%r13,1),%rsi
  mov    %ebx,%edx
  mov    %r15,%rdi
  call   <v_inner@plt>
  movss  %xmm0,0x10(%rsp)
  lea    0x4(%r12,%r13,1),%rsi
  mov    %ebx,%edx
  mov    %r15,%rdi
  call   <v_inner@plt>
  movss  %xmm0,0x8(%rsp)
  lea    -0x4(%r12,%r13,1),%rsi
  mov    %ebx,%edx
  mov    %r15,%rdi
  call   <v_inner@plt>
  comiss 0x8(%rsp),%xmm0
  jbe    L68
  sub    $0x1,%ebp
  movss  0x10(%rsp),%xmm5
  movss  %xmm5,0x8(%rsp)
  movss  %xmm0,0x10(%rsp)
L68:
  mov    0xc(%rsp),%eax
  add    %ebp,%eax
  cltq
  lea    0x4(,%rax,4),%rax
  lea    (%r12,%rax,1),%r13
  lea    -0x4(%r12,%rax,1),%r12
  mov    %ebx,%edx
  mov    %r13,%rsi
  mov    %r12,%rdi
  call   <v_inner@plt>
  movss  %xmm0,0xc(%rsp)
  mov    %ebx,%edx
  mov    %r15,%rsi
  mov    %r15,%rdi
  call   <v_inner@plt>
  movss  %xmm0,0x18(%rsp)
  mov    %ebx,%edx
  mov    %r12,%rsi
  mov    %r12,%rdi
  call   <v_inner@plt>
  movss  %xmm0,0x14(%rsp)
  mov    %ebx,%edx
  mov    %r13,%rsi
  mov    %r13,%rdi
  call   <v_inner@plt>
  movaps %xmm0,%xmm6
  movss  %xmm0,0x1c(%rsp)
  movss  0x14(%rsp),%xmm1
  movss  0xc(%rsp),%xmm5
  subss  %xmm5,%xmm1
  mulss  0x8(%rsp),%xmm1
  subss  %xmm5,%xmm6
  movaps %xmm6,%xmm0
  mulss  0x10(%rsp),%xmm0
  movaps %xmm1,%xmm7
  addss  %xmm0,%xmm7
  movss  %xmm7,0x2c(%rsp)
  movaps %xmm7,%xmm0
  call   <fabs@plt>
  comisd D92(%rip),%xmm0
  jbe    L62
  movss  0x10(%rsp),%xmm3
  mulss  0xc(%rsp),%xmm3
  movss  0x8(%rsp),%xmm6
  mulss  0x14(%rsp),%xmm6
  movaps %xmm6,%xmm0
  subss  %xmm3,%xmm0
  divss  0x2c(%rsp),%xmm0
  comiss D68(%rip),%xmm0
  jbe    L44
  movss  D68(%rip),%xmm0
L47:
  pxor   %xmm1,%xmm1
  cvtsi2ss %ebp,%xmm1
  movaps %xmm0,%xmm4
  addss  %xmm1,%xmm4
  pxor   %xmm0,%xmm0
  cvtsi2ss %r14d,%xmm0
  movaps %xmm0,%xmm6
  minss  %xmm4,%xmm6
  pxor   %xmm0,%xmm0
  cvtsi2ssl 0x28(%rsp),%xmm0
  maxss  %xmm6,%xmm0
  movaps %xmm0,%xmm2
  movss  %xmm0,0x28(%rsp)
  subss  %xmm1,%xmm2
  movss  D41(%rip),%xmm0
  movaps %xmm0,%xmm3
  subss  %xmm2,%xmm3
  movaps %xmm2,%xmm0
  addss  %xmm2,%xmm0
  mulss  %xmm3,%xmm0
  mulss  0xc(%rsp),%xmm0
  movaps %xmm3,%xmm1
  movss  %xmm3,0x2c(%rsp)
  mulss  %xmm3,%xmm1
  mulss  0x14(%rsp),%xmm1
  addss  %xmm1,%xmm0
  movaps %xmm2,%xmm1
  movss  %xmm2,0xc(%rsp)
  mulss  %xmm2,%xmm1
  mulss  0x1c(%rsp),%xmm1
  addss  %xmm1,%xmm0
  mulss  0x18(%rsp),%xmm0
  call   <sqrt@plt>
  movss  %xmm0,0x14(%rsp)
  call   <fabs@plt>
  comisd D92(%rip),%xmm0
  jbe    L54
  movss  0x10(%rsp),%xmm4
  mulss  0x2c(%rsp),%xmm4
  movaps %xmm4,%xmm0
  movss  0x8(%rsp),%xmm5
  mulss  0xc(%rsp),%xmm5
  addss  %xmm5,%xmm0
  divss  0x14(%rsp),%xmm0
L9:
  mov    0x20(%rsp),%rax
  movss  %xmm0,(%rax)
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L107
  movss  0x28(%rsp),%xmm0
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L44:
  movss  D71(%rip),%xmm1
  comiss %xmm0,%xmm1
  jbe    L47
  movaps %xmm1,%xmm0
  jmp    L47
L62:
  movss  D76(%rip),%xmm0
  jmp    L47
L54:
  pxor   %xmm0,%xmm0
  jmp    L9
L107:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: data_tag: D88
type_guessed: f64
name: read_data
arguments: data_tag: D64
type_guessed: f64
name: read_data
arguments: data_tag: D92
type_guessed: f64
name: read_data
arguments: data_tag: D68
type_guessed: f32
name: read_data
arguments: data_tag: D41
type_guessed: f32
name: read_data
arguments: data_tag: D71
type_guessed: byte[4]
name: read_data
arguments: data_tag: D76
type_guessed: byte[4]

tool: D88: 0.5

tool: D64: 0.75

tool: D92: 0.01

tool: D68: 2

tool: D41: 1

tool: {"D71": [0x00,0x00,0x80,0xbf]}

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

assistant: ```c
float frac_pch(float sig_in[], float *pcorr, float fpitch, int range, int pmin, int pmax, int lmin) {
  int length, cbegin, lower, upper, ipitch;
  float c0_0, c0_T, c0_T1, cT_T, cT_T1, cT1_T1, c0_Tm1;
  float frac, frac1;
  float corr, denom;
  if (range > 0) {
    ipitch = fpitch + 0.5;
    lower = ipitch - range;
    upper = ipitch + range;
    if (upper > pmax)
      upper = pmax;
    if (lower < pmin)
      lower = pmin;
    if (lower < 0.75 * ipitch)
      lower = 0.75 * ipitch;
    length = ipitch;
    if (length < lmin)
      length = lmin;
    fpitch = find_pitch(sig_in, &corr, lower, upper, length);
  }
  ipitch = fpitch + 0.5;
  if (ipitch >= pmax)
    ipitch = pmax - 1;
  length = ipitch;
  if (length < lmin)
    length = lmin;
  cbegin = -((length + ipitch) / 2);
  c0_T = v_inner(&sig_in[cbegin], &sig_in[cbegin + ipitch], length);
  c0_T1 = v_inner(&sig_in[cbegin], &sig_in[cbegin + ipitch + 1], length);
  c0_Tm1 = v_inner(&sig_in[cbegin], &sig_in[cbegin + ipitch - 1], length);
  if (c0_Tm1 > c0_T1) {
    c0_T1 = c0_T;
    c0_T = c0_Tm1;
    ipitch--;
  }
  cT_T1 = v_inner(&sig_in[cbegin + ipitch], &sig_in[cbegin + ipitch + 1], length);
  c0_0 = v_inner(&sig_in[cbegin], &sig_in[cbegin], length);
  cT_T = v_inner(&sig_in[cbegin + ipitch], &sig_in[cbegin + ipitch], length);
  cT1_T1 = v_inner(&sig_in[cbegin + ipitch + 1], &sig_in[cbegin + ipitch + 1], length);
  denom = c0_T1 * (cT_T - cT_T1) + c0_T * (cT1_T1 - cT_T1);
  if (fabs(denom) > 0.01)
    frac = (c0_T1 * cT_T - c0_T * cT_T1) / denom;
  else
    frac = 0.5;
  if (frac > 2.0)
    frac = 2.0;
  if (frac < -1.0)
    frac = -1.0;
  fpitch = ipitch + frac;
  if (fpitch > pmax)
    fpitch = pmax;
  if (fpitch < pmin)
    fpitch = pmin;
  frac = fpitch - ipitch;
  frac1 = 1.0 - frac;
  denom = c0_0 * (frac1 * frac1 * cT_T + 2 * frac * frac1 * cT_T1 + frac * frac * cT1_T1);
  denom = sqrt(denom);
  if (fabs(denom) > 0.01)
    *pcorr = (frac1 * c0_T + frac * c0_T1) / denom;
  else
    *pcorr = 0.0;
  return (fpitch);
}
```