user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<sconstruct_frames>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %edx,-0x34(%rbp)
  mov    %ecx,-0x38(%rbp)
  mov    %r8,-0x40(%rbp)
  mov    %r9,-0x48(%rbp)
  mov    -0x30(%rbp),%rax
  mov    (%rax),%eax
  pxor   %xmm0,%xmm0
  cvtsi2ss %eax,%xmm0
  pxor   %xmm1,%xmm1
  cvtsi2ssl -0x34(%rbp),%xmm1
  subss  %xmm1,%xmm0
  mov    -0x34(%rbp),%eax
  sub    -0x38(%rbp),%eax
  pxor   %xmm2,%xmm2
  cvtsi2ss %eax,%xmm2
  movaps %xmm0,%xmm1
  divss  %xmm2,%xmm1
  movss  D5(%rip),%xmm0
  addss  %xmm0,%xmm1
  movd   %xmm1,%eax
  movd   %eax,%xmm0
  call   <ceil@plt>
  mov    -0x40(%rbp),%rdx
  mov    %eax,(%rdx)
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  lea    -0x1(%rax),%edx
  mov    -0x34(%rbp),%eax
  sub    -0x38(%rbp),%eax
  imul   %eax,%edx
  mov    -0x34(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x10(%rbp)
  mov    -0x30(%rbp),%rax
  mov    (%rax),%ecx
  mov    -0x10(%rbp),%eax
  sub    %ecx,%eax
  mov    %eax,%edx
  mov    -0x48(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x10(%rbp),%eax
  cltq
  add    %eax,%eax
  mov    %eax,%edx
  mov    -0x28(%rbp),%rax
  mov    (%rax),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <realloc@plt>
  mov    %rax,%rdx
  mov    -0x28(%rbp),%rax
  mov    %rdx,(%rax)
  mov    -0x30(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x10(%rbp),%eax
  sub    %edx,%eax
  cltq
  add    %eax,%eax
  mov    %eax,%edx
  mov    -0x28(%rbp),%rax
  mov    (%rax),%rcx
  mov    -0x30(%rbp),%rax
  mov    (%rax),%eax
  cltq
  add    %rax,%rax
  add    %rcx,%rax
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <memset@plt>
  mov    -0x30(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x10(%rbp),%eax
  sub    %edx,%eax
  mov    %eax,%ecx
  mov    -0x28(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x30(%rbp),%rax
  mov    (%rax),%eax
  cltq
  add    %rax,%rax
  add    %rdx,%rax
  mov    $0x1,%edx
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <sdither@plt>
  mov    -0x30(%rbp),%rax
  mov    -0x10(%rbp),%edx
  mov    %edx,(%rax)
  mov    -0x34(%rbp),%eax
  sub    -0x38(%rbp),%eax
  mov    %eax,-0xc(%rbp)
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  imul   -0x34(%rbp),%eax
  cltq
  add    %eax,%eax
  mov    %eax,%edi
  call   <MALLOC@plt>
  mov    %rax,-0x8(%rbp)
  movl   $0x0,-0x18(%rbp)
  jmp    L36
L34:
  movl   $0x0,-0x14(%rbp)
  jmp    L8
L7:
  mov    -0x28(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x18(%rbp),%eax
  imul   -0xc(%rbp),%eax
  movslq %eax,%rcx
  mov    -0x14(%rbp),%eax
  cltq
  add    %rcx,%rax
  add    %rax,%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x18(%rbp),%eax
  imul   -0x34(%rbp),%eax
  mov    %eax,%edx
  mov    -0x14(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    (%rax,%rax,1),%rdx
  mov    -0x8(%rbp),%rax
  add    %rax,%rdx
  movzwl (%rcx),%eax
  mov    %ax,(%rdx)
  addl   $0x1,-0x14(%rbp)
L8:
  mov    -0x14(%rbp),%eax
  cmp    -0x34(%rbp),%eax
  jl     L7
  addl   $0x1,-0x18(%rbp)
L36:
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x18(%rbp)
  jl     L34
  mov    -0x8(%rbp),%rax
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: label: D5
data_type: byte[4]

tool: {"D5": [0x00,0x00,0x80,0x3f]}

assistant: ```c
short *sconstruct_frames(short **x, int *N, int width, int overlap, int *nframes, int *add_samp) {
  *nframes = ceil(((float)*N - width) / (width - overlap) + 1);
  int padlen = width + (*nframes - 1) * (width - overlap);
  *add_samp = padlen - *N;
  *x = (short *)realloc(*x, padlen * sizeof(short));
  memset(*x + *N, 0, sizeof(short) * (padlen - *N));
  sdither(*x + *N, padlen - *N, 1);
  *N = padlen;
  int step = width - overlap;
  short *frames = MALLOC(*nframes * width * sizeof(short));
  for (int f = 0; f < *nframes; f++) {
    for (int n = 0; n < width; n++) {
      frames[f * width + n] = *(*x + f * step + n);
    }
  }
  return frames;
}
```