user: 请从给定的汇编指令推导出C源代码：

```asm
<xscale_calc_coeffs>:
  endbr64
  push   %r15
  push   %r14
  mov    %edi,%r14d
  push   %r13
  push   %r12
  mov    %rdx,%r12
  push   %rbp
  push   %rbx
  xor    %ebx,%ebx
  sub    $0x88,%rsp
  mov    %esi,0x20(%rsp)
  lea    0x30(%rsp),%rbp
  mov    %rcx,0x28(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x78(%rsp)
  xor    %eax,%eax
  call   <calc_taps@plt>
  pxor   %xmm0,%xmm0
  mov    %rbp,0x18(%rsp)
  movss  D1(%rip),%xmm4
  cvtsi2ss %eax,%xmm0
  divss  %xmm0,%xmm4
L86:
  mov    0x20(%rsp),%esi
  mov    %ebx,%edx
  mov    %r14d,%edi
  movss  %xmm4,0x8(%rsp)
  add    $0x1,%ebx
  add    $0x10,%rbp
  call   <map@plt>
  pxor   %xmm0,%xmm0
  movss  0x8(%rsp),%xmm4
  movl   $0x3f800000,-0xc(%rbp)
  neg    %eax
  cvtsi2ss %eax,%xmm0
  mulss  %xmm4,%xmm0
  movss  %xmm0,-0x10(%rbp)
  cmp    $0x4,%ebx
  jne    L86
  movl   $0x0,0x14(%rsp)
  movl   $0x0,0x24(%rsp)
  test   %r14d,%r14d
  jle    L6
  mov    0x18(%rsp),%rax
  xor    %ebp,%ebp
  lea    0x40(%rax),%rbx
  nopl   (%rax)
L105:
  mov    0x18(%rsp),%r15
  mov    %r12,%r13
L71:
  movss  (%r15),%xmm1
  movss  %xmm4,0x10(%rsp)
  cvttss2si %xmm1,%edi
  movss  %xmm1,0xc(%rsp)
  call   <fabsf@plt>
  movss  %xmm0,0x8(%rsp)
  call   <catrom@plt>
  movss  0x10(%rsp),%xmm4
  movss  0x4(%r15),%xmm3
  movss  0x8(%rsp),%xmm2
  movss  0xc(%rsp),%xmm1
  mulss  %xmm4,%xmm0
  comiss %xmm2,%xmm4
  subss  %xmm0,%xmm3
  movss  %xmm0,0x0(%r13)
  movss  %xmm3,0x4(%r15)
  jbe    L103
  mov    %r13,0x8(%r15)
L103:
  addss  %xmm4,%xmm1
  add    $0x10,%r15
  add    $0x4,%r13
  movss  %xmm1,-0x10(%r15)
  cmp    %r15,%rbx
  jne    L71
  addl   $0x1,0x14(%rsp)
  movss  0x30(%rsp),%xmm0
  add    $0x10,%r12
  add    $0x1,%ebp
  comiss D19(%rip),%xmm0
  jae    L54
L63:
  cmp    %ebp,%r14d
  jne    L105
L6:
  mov    0x20(%rsp),%esi
  mov    0x24(%rsp),%ecx
  cmp    %ecx,%esi
  jle    L45
  mov    0x38(%rsp),%rax
  mov    0x28(%rsp),%rbx
  mov    0x14(%rsp),%edi
  movss  (%rax),%xmm0
  addss  0x34(%rsp),%xmm0
  movss  %xmm0,(%rax)
  movslq %ecx,%rax
  mov    %edi,(%rbx,%rax,4)
  lea    0x0(,%rax,4),%rdx
  lea    0x1(%rcx),%eax
  cmp    %eax,%esi
  jle    L45
  mov    0x48(%rsp),%rax
  movss  (%rax),%xmm0
  addss  0x44(%rsp),%xmm0
  movss  %xmm0,(%rax)
  lea    0x2(%rcx),%eax
  movl   $0x0,0x4(%rbx,%rdx,1)
  cmp    %esi,%eax
  jge    L45
  mov    0x58(%rsp),%rax
  movss  (%rax),%xmm0
  addss  0x54(%rsp),%xmm0
  movss  %xmm0,(%rax)
  mov    %ecx,%eax
  add    $0x3,%eax
  movl   $0x0,0x8(%rbx,%rdx,1)
  cmp    %eax,%esi
  jle    L45
  mov    0x68(%rsp),%rax
  movss  (%rax),%xmm0
  addss  0x64(%rsp),%xmm0
  movss  %xmm0,(%rax)
  movl   $0x0,0xc(%rbx,%rdx,1)
L45:
  mov    0x78(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L89
  add    $0x88,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L54:
  mov    0x38(%rsp),%rax
  mov    0x24(%rsp),%r15d
  mov    %r14d,%edi
  movss  %xmm4,0x8(%rsp)
  movdqa 0x40(%rsp),%xmm5
  movdqa 0x50(%rsp),%xmm6
  movss  (%rax),%xmm0
  addss  0x34(%rsp),%xmm0
  lea    0x4(%r15),%edx
  movdqa 0x60(%rsp),%xmm7
  mov    0x20(%rsp),%esi
  movaps %xmm5,0x30(%rsp)
  movaps %xmm6,0x40(%rsp)
  movss  %xmm0,(%rax)
  movaps %xmm7,0x50(%rsp)
  call   <map@plt>
  pxor   %xmm0,%xmm0
  movss  0x8(%rsp),%xmm4
  mov    0x14(%rsp),%esi
  mov    %eax,%r8d
  mov    %ebp,%eax
  mov    0x28(%rsp),%rcx
  movl   $0x3f800000,0x64(%rsp)
  sub    %r8d,%eax
  movl   $0x0,0x14(%rsp)
  cvtsi2ss %eax,%xmm0
  movslq %r15d,%rax
  add    $0x1,%r15d
  mov    %esi,(%rcx,%rax,4)
  mov    %r15d,0x24(%rsp)
  mulss  %xmm4,%xmm0
  movss  %xmm0,0x60(%rsp)
  jmp    L63
L89:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: tag: D1
type_infered: byte[4]
name: unpack_data
arguments: tag: D19
type_infered: byte[4]

tool: {"D1": [0x00,0x00,0x80,0x40]}

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

assistant: ```c
void xscale_calc_coeffs(int in_width, int out_width, float *coeff_buf, int *border_buf) {
  struct {
    float tx;
    float fudge;
    float *center;
  } out_s[4];
  int i, j, out_pos, border, taps;
  float tap_mult_f, tx;
  out_pos = 0;
  border = 0;
  taps = calc_taps(in_width, out_width);
  tap_mult_f = (float)4 / taps;
  for (i = 0; i < 4; i++) {
    out_s[i].tx = -1 * map(in_width, out_width, i) * tap_mult_f;
    out_s[i].fudge = 1.0f;
  }
  for (i = 0; i < in_width; i++) {
    for (j = 0; j < 4; j++) {
      tx = fabsf(out_s[j].tx);
      coeff_buf[j] = catrom(tx) * tap_mult_f;
      out_s[j].fudge -= coeff_buf[j];
      if (tx < tap_mult_f) {
        out_s[j].center = coeff_buf + j;
      }
      out_s[j].tx += tap_mult_f;
    }
    border++;
    coeff_buf += 4;
    if (out_s[0].tx >= 2.0f) {
      out_s[0].center[0] += out_s[0].fudge;
      out_s[0] = out_s[1];
      out_s[1] = out_s[2];
      out_s[2] = out_s[3];
      out_s[3].tx = (i + 1 - map(in_width, out_width, out_pos + 4)) * tap_mult_f;
      out_s[3].fudge = 1.0f;
      border_buf[out_pos] = border;
      border = 0;
      out_pos++;
    }
  }
  for (i = 0; i + out_pos < out_width; i++) {
    out_s[i].center[0] += out_s[i].fudge;
    border_buf[i + out_pos] = border;
    border = 0;
  }
}
```