user: What is the c source code of the assembly code below?

```asm
<runtest>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0xb0,%rsp
  mov    %edi,-0x84(%rbp)
  movsd  %xmm0,-0x90(%rbp)
  movsd  %xmm1,-0x98(%rbp)
  mov    %esi,-0x88(%rbp)
  mov    %edx,-0x9c(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x84(%rbp),%xmm0
  mulsd  -0x98(%rbp),%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,-0x68(%rbp)
  mov    -0x68(%rbp),%eax
  add    $0x3e8,%eax
  mov    %eax,-0x64(%rbp)
  mov    -0x84(%rbp),%eax
  add    $0x64,%eax
  cltq
  shl    $0x2,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x38(%rbp)
  mov    -0x64(%rbp),%eax
  add    $0x64,%eax
  cltq
  shl    $0x2,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x30(%rbp)
  mov    -0x9c(%rbp),%ecx
  mov    -0x88(%rbp),%edx
  movsd  -0x98(%rbp),%xmm0
  mov    -0x90(%rbp),%rsi
  mov    -0x84(%rbp),%eax
  movapd %xmm0,%xmm1
  movq   %rsi,%xmm0
  mov    %eax,%esi
  lea    D163(%rip),%rax
  mov    %rax,%rdi
  mov    $0x2,%eax
  call   <printf@plt>
  movl   $0x0,-0x7c(%rbp)
  jmp    L191
L265:
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x7c(%rbp),%xmm0
  divsd  -0x90(%rbp),%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,%edi
  call   <sin@plt>
  mov    -0x7c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,(%rax)
  addl   $0x1,-0x7c(%rbp)
L191:
  mov    -0x7c(%rbp),%eax
  cmp    -0x84(%rbp),%eax
  jl     L265
  mov    -0x84(%rbp),%eax
  mov    %eax,-0x7c(%rbp)
  jmp    L187
L9:
  mov    -0x7c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movss  D96(%rip),%xmm0
  movss  %xmm0,(%rax)
  addl   $0x1,-0x7c(%rbp)
L187:
  mov    -0x84(%rbp),%eax
  add    $0x63,%eax
  cmp    %eax,-0x7c(%rbp)
  jle    L9
  movl   $0x0,-0x7c(%rbp)
  jmp    L193
L263:
  mov    -0x7c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movss  D96(%rip),%xmm0
  movss  %xmm0,(%rax)
  addl   $0x1,-0x7c(%rbp)
L193:
  mov    -0x64(%rbp),%eax
  add    $0x63,%eax
  cmp    %eax,-0x7c(%rbp)
  jle    L263
  movsd  -0x98(%rbp),%xmm0
  mov    -0x98(%rbp),%rax
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  mov    $0x1,%edi
  call   <resample_open@plt>
  mov    %rax,-0x28(%rbp)
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <resample_get_filter_width@plt>
  mov    %eax,-0x60(%rbp)
  movl   $0x0,-0x78(%rbp)
  movl   $0x0,-0x6c(%rbp)
L68:
  mov    -0x84(%rbp),%eax
  sub    -0x6c(%rbp),%eax
  mov    -0x88(%rbp),%edx
  cmp    %eax,%edx
  cmovle %edx,%eax
  mov    %eax,-0x5c(%rbp)
  mov    -0x84(%rbp),%eax
  sub    -0x6c(%rbp),%eax
  cmp    %eax,-0x5c(%rbp)
  sete   %al
  movzbl %al,%eax
  mov    %eax,-0x58(%rbp)
  mov    -0x64(%rbp),%eax
  sub    -0x78(%rbp),%eax
  mov    %eax,%edx
  mov    -0x9c(%rbp),%eax
  cmp    %eax,%edx
  cmovle %edx,%eax
  mov    %eax,%r8d
  mov    -0x78(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  lea    (%rdx,%rax,1),%r9
  mov    -0x6c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  lea    (%rdx,%rax,1),%rsi
  lea    -0x80(%rbp),%r10
  mov    -0x58(%rbp),%ecx
  mov    -0x5c(%rbp),%edx
  mov    -0x98(%rbp),%rdi
  mov    -0x28(%rbp),%rax
  sub    $0x8,%rsp
  push   %r8
  mov    %r10,%r8
  movq   %rdi,%xmm0
  mov    %rax,%rdi
  call   <resample_process@plt>
  add    $0x10,%rsp
  mov    %eax,-0x54(%rbp)
  mov    -0x80(%rbp),%eax
  add    %eax,-0x6c(%rbp)
  cmpl   $0x0,-0x54(%rbp)
  js     L251
  mov    -0x54(%rbp),%eax
  add    %eax,-0x78(%rbp)
L251:
  cmpl   $0x0,-0x54(%rbp)
  js     L230
  cmpl   $0x0,-0x54(%rbp)
  jne    L68
  mov    -0x6c(%rbp),%eax
  cmp    -0x84(%rbp),%eax
  je     L230
  jmp    L68
L230:
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <resample_close@plt>
  cmpl   $0x0,-0x54(%rbp)
  jns    L207
  mov    -0x54(%rbp),%eax
  mov    %eax,%esi
  lea    D34(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L207:
  cmpl   $0x0,-0x78(%rbp)
  jg     L147
  mov    -0x78(%rbp),%eax
  mov    %eax,%esi
  lea    D164(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x38(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x30(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  jmp    L55
L147:
  mov    -0x78(%rbp),%eax
  sub    -0x68(%rbp),%eax
  mov    %eax,%edx
  neg    %edx
  cmovns %edx,%eax
  mov    %eax,-0x50(%rbp)
  movsd  -0x98(%rbp),%xmm0
  movapd %xmm0,%xmm1
  addsd  %xmm0,%xmm1
  movsd  D129(%rip),%xmm0
  addsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%eax
  cmp    %eax,-0x50(%rbp)
  jle    L237
  mov    -0x78(%rbp),%edx
  mov    -0x68(%rbp),%eax
  mov    %eax,%esi
  lea    D152(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L237:
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x48(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x40(%rbp)
  movl   $0x0,-0x74(%rbp)
  mov    -0x78(%rbp),%eax
  sub    -0x60(%rbp),%eax
  mov    %eax,-0x4c(%rbp)
  movl   $0x0,-0x7c(%rbp)
  jmp    L76
L98:
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x7c(%rbp),%xmm0
  divsd  -0x90(%rbp),%xmm0
  divsd  -0x98(%rbp),%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,%edi
  call   <sin@plt>
  movq   %xmm0,%rax
  mov    -0x7c(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x30(%rbp),%rdx
  add    %rcx,%rdx
  movss  (%rdx),%xmm0
  pxor   %xmm1,%xmm1
  cvtss2sd %xmm0,%xmm1
  movq   %rax,%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movsd  -0x10(%rbp),%xmm0
  movq   D39(%rip),%xmm1
  andpd  %xmm1,%xmm0
  comisd D76(%rip),%xmm0
  jbe    L108
  cmpl   $0x0,-0x74(%rbp)
  jne    L93
  mov    -0x7c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  pxor   %xmm2,%xmm2
  cvtss2sd %xmm0,%xmm2
  movsd  %xmm2,-0xa8(%rbp)
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x7c(%rbp),%xmm0
  divsd  -0x90(%rbp),%xmm0
  divsd  -0x98(%rbp),%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,%edi
  call   <sin@plt>
  movq   %xmm0,%rax
  mov    -0x7c(%rbp),%edx
  movsd  -0xa8(%rbp),%xmm1
  movq   %rax,%xmm0
  mov    %edx,%esi
  lea    D72(%rip),%rax
  mov    %rax,%rdi
  mov    $0x2,%eax
  call   <printf@plt>
L93:
  addl   $0x1,-0x74(%rbp)
L108:
  movsd  -0x10(%rbp),%xmm0
  movq   D39(%rip),%xmm1
  andpd  %xmm1,%xmm0
  movsd  -0x48(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x48(%rbp)
  movsd  -0x10(%rbp),%xmm0
  mulsd  %xmm0,%xmm0
  movsd  -0x40(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x40(%rbp)
  addl   $0x1,-0x7c(%rbp)
L76:
  mov    -0x7c(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jl     L98
  movl   $0x0,-0x70(%rbp)
  movl   $0x0,-0x7c(%rbp)
  jmp    L95
L50:
  mov    -0x7c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  pxor   %xmm1,%xmm1
  cvtss2sd %xmm0,%xmm1
  movsd  D74(%rip),%xmm0
  comisd %xmm1,%xmm0
  ja     L92
  mov    -0x7c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  cvtss2sd %xmm0,%xmm0
  comisd D135(%rip),%xmm0
  jbe    L228
L92:
  cmpl   $0x0,-0x70(%rbp)
  jne    L41
  mov    -0x7c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  pxor   %xmm3,%xmm3
  cvtss2sd %xmm0,%xmm3
  movq   %xmm3,%rdx
  mov    -0x7c(%rbp),%eax
  movq   %rdx,%xmm0
  mov    %eax,%esi
  lea    D120(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
L41:
  addl   $0x1,-0x70(%rbp)
L228:
  addl   $0x1,-0x7c(%rbp)
L95:
  mov    -0x7c(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jl     L50
  cmpl   $0x1,-0x70(%rbp)
  jle    L125
  mov    -0x70(%rbp),%eax
  mov    %eax,%esi
  lea    D158(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L125:
  cmpl   $0x0,-0x74(%rbp)
  jle    L122
  mov    -0x78(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x7c(%rbp)
  mov    -0x7c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  pxor   %xmm4,%xmm4
  cvtss2sd %xmm0,%xmm4
  movsd  %xmm4,-0xa8(%rbp)
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x7c(%rbp),%xmm0
  divsd  -0x90(%rbp),%xmm0
  divsd  -0x98(%rbp),%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,%edi
  call   <sin@plt>
  movq   %xmm0,%rax
  mov    -0x7c(%rbp),%edx
  movsd  -0xa8(%rbp),%xmm1
  movq   %rax,%xmm0
  mov    %edx,%esi
  lea    D0(%rip),%rax
  mov    %rax,%rdi
  mov    $0x2,%eax
  call   <printf@plt>
  mov    -0x74(%rbp),%eax
  mov    %eax,%esi
  lea    D11(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L122:
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x4c(%rbp),%xmm1
  movsd  -0x48(%rbp),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x4c(%rbp),%xmm1
  movsd  -0x40(%rbp),%xmm0
  divsd  %xmm1,%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  call   <sqrt@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x18(%rbp)
  movsd  -0x18(%rbp),%xmm0
  mov    -0x20(%rbp),%rdx
  mov    -0x78(%rbp),%eax
  movapd %xmm0,%xmm1
  movq   %rdx,%xmm0
  mov    %eax,%esi
  lea    D68(%rip),%rax
  mov    %rax,%rdi
  mov    $0x2,%eax
  call   <printf@plt>
  mov    -0x38(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x30(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
L55:
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L12
  call   <__stack_chk_fail@plt>
L12:
  leave
  ret
```

tool_calls: name: parse_data
arguments: tag: D163
type: string
name: parse_data
arguments: tag: D96
type: byte[4]
name: parse_data
arguments: tag: D34
type: string
name: parse_data
arguments: tag: D164
type: string
name: parse_data
arguments: tag: D129
type: f64
name: parse_data
arguments: tag: D152
type: string
name: parse_data
arguments: tag: D39
type: qword
name: parse_data
arguments: tag: D76
type: f64[2]
name: parse_data
arguments: tag: D72
type: string
name: parse_data
arguments: tag: D74
type: byte[8]
name: parse_data
arguments: tag: D135
type: f64
name: parse_data
arguments: tag: D120
type: string
name: parse_data
arguments: tag: D158
type: string
name: parse_data
arguments: tag: D0
type: string
name: parse_data
arguments: tag: D11
type: string
name: parse_data
arguments: tag: D68
type: string

tool: D163: -- srclen: %d sin freq: %.1f factor: %.3f srcblk: %d dstblk: %d


tool: {"D96": [0x00,0x00,0xc6,0xc2]}

tool: D34: Error: resample_process returned an error: %d


tool: D164: Error: resample_process returned %d samples


tool: D129: 1

tool: D152:    Expected ~%d, got %d samples out


tool: D39: 9223372036854775807

tool: {"D76": [0.05,-1.01]}

tool: D72:    First error at i=%d: expected %.3f, got %.3f


tool: {"D74": [0x29,0x5c,0x8f,0xc2,0xf5,0x28,0xf0,0xbf]}

tool: D135: 1.01

tool: D120:    Error at i=%d: value is %.3f


tool: D158:    At least %d samples were out of range


tool: D0:    i=%d:  expected %.3f, got %.3f


tool: D11:    At least %d samples had significant error.


tool: D68:    Out: %d samples  Avg err: %f RMS err: %f


assistant: ```c
void runtest(int srclen, double freq, double factor, int srcblocksize, int dstblocksize) {
  int expectedlen = (int)(srclen * factor);
  int dstlen = expectedlen + 1000;
  float *src = (float *)malloc((srclen + 100) * sizeof(float));
  float *dst = (float *)malloc((dstlen + 100) * sizeof(float));
  void *handle;
  double sum, sumsq, err, rmserr;
  int i, out, o, srcused, errcount, rangecount;
  int statlen, srcpos, lendiff;
  int fwidth;
  printf("-- srclen: %d sin freq: %.1f factor: %.3f srcblk: %d dstblk: %d\n", srclen, freq, factor, srcblocksize, dstblocksize);
  for (i = 0; i < srclen; i++)
    src[i] = sin(i / freq);
  for (i = srclen; i < srclen + 100; i++)
    src[i] = -99.0;
  for (i = 0; i < dstlen + 100; i++)
    dst[i] = -99.0;
  handle = resample_open(1, factor, factor);
  fwidth = resample_get_filter_width(handle);
  out = 0;
  srcpos = 0;
  for (;;) {
    int srcBlock = (srclen - srcpos) < (srcblocksize) ? (srclen - srcpos) : (srcblocksize);
    int lastFlag = (srcBlock == srclen - srcpos);
    o = resample_process(handle, factor, &src[srcpos], srcBlock, lastFlag, &srcused, &dst[out], (dstlen - out) < (dstblocksize) ? (dstlen - out) : (dstblocksize));
    srcpos += srcused;
    if (o >= 0)
      out += o;
    if (o < 0 || (o == 0 && srcpos == srclen))
      break;
  }
  resample_close(handle);
  if (o < 0) {
    printf("Error: resample_process returned an error: %d\n", o);
  }
  if (out <= 0) {
    printf("Error: resample_process returned %d samples\n", out);
    free(src);
    free(dst);
    return;
  }
  lendiff = abs(out - expectedlen);
  if (lendiff > (int)(2 * factor + 1.0)) {
    printf("   Expected ~%d, got %d samples out\n", expectedlen, out);
  }
  sum = 0.0;
  sumsq = 0.0;
  errcount = 0.0;
  statlen = out - fwidth;
  for (i = 0; i < statlen; i++) {
    double diff = sin((i / freq) / factor) - dst[i];
    if (fabs(diff) > 0.05) {
      if (errcount == 0)
        printf("   First error at i=%d: expected %.3f, got %.3f\n", i, sin((i / freq) / factor), dst[i]);
      errcount++;
    }
    sum += fabs(diff);
    sumsq += diff * diff;
  }
  rangecount = 0;
  for (i = 0; i < statlen; i++) {
    if (dst[i] < -1.01 || dst[i] > 1.01) {
      if (rangecount == 0)
        printf("   Error at i=%d: value is %.3f\n", i, dst[i]);
      rangecount++;
    }
  }
  if (rangecount > 1)
    printf("   At least %d samples were out of range\n", rangecount);
  if (errcount > 0) {
    i = out - 1;
    printf("   i=%d:  expected %.3f, got %.3f\n", i, sin((i / freq) / factor), dst[i]);
    printf("   At least %d samples had significant error.\n", errcount);
  }
  err = sum / statlen;
  rmserr = sqrt(sumsq / statlen);
  printf("   Out: %d samples  Avg err: %f RMS err: %f\n", out, err, rmserr);
  free(src);
  free(dst);
}
```