user: Demonstrate the C code that generates the assembly output below:

```asm
<xscale_calc_coeffs>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  xor    %ebx,%ebx
  sub    $0x88,%rsp
  mov    %edi,0x1c(%rsp)
  lea    0x30(%rsp),%r14
  mov    %esi,0x28(%rsp)
  mov    %r14,%rbp
  mov    %rdx,0x10(%rsp)
  mov    %rcx,0x20(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x78(%rsp)
  xor    %eax,%eax
  call   <calc_taps@plt>
  pxor   %xmm0,%xmm0
  movss  D8(%rip),%xmm4
  cvtsi2ss %eax,%xmm0
  divss  %xmm0,%xmm4
L30:
  mov    0x28(%rsp),%esi
  mov    0x1c(%rsp),%edi
  mov    %ebx,%edx
  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    L30
  mov    0x1c(%rsp),%eax
  xor    %ebp,%ebp
  movl   $0x0,0x2c(%rsp)
  test   %eax,%eax
  jle    L8
  xor    %r12d,%r12d
  lea    0x40(%r14),%rbx
  nopl   0x0(%rax,%rax,1)
L13:
  mov    0x10(%rsp),%r15
  mov    %r14,%r13
L92:
  movss  0x0(%r13),%xmm1
  movss  %xmm4,0x18(%rsp)
  cvttss2si %xmm1,%edi
  movss  %xmm1,0xc(%rsp)
  call   <fabsf@plt>
  movss  %xmm0,0x8(%rsp)
  call   <catrom@plt>
  movss  0x18(%rsp),%xmm4
  movss  0x4(%r13),%xmm3
  movss  0x8(%rsp),%xmm2
  movss  0xc(%rsp),%xmm1
  mulss  %xmm4,%xmm0
  comiss %xmm2,%xmm4
  subss  %xmm0,%xmm3
  movss  %xmm0,(%r15)
  movss  %xmm3,0x4(%r13)
  jbe    L15
  mov    %r15,0x8(%r13)
L15:
  addss  %xmm4,%xmm1
  add    $0x10,%r13
  add    $0x4,%r15
  movss  %xmm1,-0x10(%r13)
  cmp    %rbx,%r13
  jne    L92
  addq   $0x10,0x10(%rsp)
  movss  0x30(%rsp),%xmm0
  add    $0x1,%ebp
  add    $0x1,%r12d
  comiss D9(%rip),%xmm0
  jae    L52
L21:
  cmp    %r12d,0x1c(%rsp)
  jne    L13
L8:
  movslq 0x2c(%rsp),%rax
  cmp    %eax,0x28(%rsp)
  jle    L67
L81:
  mov    0x8(%r14),%rdx
  mov    0x20(%rsp),%rcx
  add    $0x10,%r14
  movss  (%rdx),%xmm0
  addss  -0xc(%r14),%xmm0
  movss  %xmm0,(%rdx)
  mov    %ebp,(%rcx,%rax,4)
  add    $0x1,%rax
  xor    %ebp,%ebp
  cmp    %eax,0x28(%rsp)
  jg     L81
L67:
  mov    0x78(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L22
  add    $0x88,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L52:
  mov    0x38(%rsp),%rax
  mov    0x2c(%rsp),%r15d
  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    0x28(%rsp),%esi
  movaps %xmm5,0x30(%rsp)
  mov    0x1c(%rsp),%edi
  movaps %xmm6,0x40(%rsp)
  movss  %xmm0,(%rax)
  movaps %xmm7,0x50(%rsp)
  call   <map@plt>
  pxor   %xmm0,%xmm0
  movss  0x8(%rsp),%xmm4
  mov    0x20(%rsp),%rcx
  mov    %eax,%r8d
  mov    %r12d,%eax
  movl   $0x3f800000,0x64(%rsp)
  sub    %r8d,%eax
  cvtsi2ss %eax,%xmm0
  movslq %r15d,%rax
  add    $0x1,%r15d
  mov    %ebp,(%rcx,%rax,4)
  xor    %ebp,%ebp
  mov    %r15d,0x2c(%rsp)
  mulss  %xmm4,%xmm0
  movss  %xmm0,0x60(%rsp)
  jmp    L21
L22:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: label: D8
type: byte[4]
name: retrieve_data
arguments: label: D9
type: byte[4]

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

tool: {"D9": [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;
  }
}
```