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

```asm
<shrink_line>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x68,%rsp
  mov    %rdi,%r15
  mov    %rsi,0x28(%rsp)
  mov    %edx,%ebp
  mov    %ecx,%r14d
  mov    %r8d,%r13d
  mov    %fs:0x28,%rax
  mov    %rax,0x58(%rsp)
  xor    %eax,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %r8d,%xmm0
  pxor   %xmm1,%xmm1
  cvtsi2sd %ecx,%xmm1
  movapd %xmm0,%xmm5
  divsd  %xmm1,%xmm5
  movsd  %xmm5,0x8(%rsp)
  movsd  D15(%rip),%xmm1
  divsd  %xmm0,%xmm1
  movsd  %xmm1,0x18(%rsp)
  test   %edx,%edx
  jle    L56
  lea    0x30(%rsp),%rax
  lea    -0x1(%rdx),%edx
  lea    0x38(%rsp,%rdx,8),%rdx
L148:
  movq   $0x0,(%rax)
  add    $0x8,%rax
  cmp    %rdx,%rax
  jne    L148
L56:
  test   %r13d,%r13d
  jle    L16
  lea    -0x1(%rbp),%eax
  lea    0x8(,%rax,8),%rax
  mov    %rax,(%rsp)
  mov    %ebp,%eax
  neg    %eax
  cltq
  shl    $0x3,%rax
  mov    %rax,0x20(%rsp)
  mov    0x28(%rsp),%rbx
  mov    $0x0,%r12d
  movl   $0x0,0x14(%rsp)
  jmp    L196
L20:
  add    %r13d,%r12d
  cmp    %r12d,%r14d
  jle    L22
L196:
  test   %ebp,%ebp
  jle    L20
  mov    $0x0,%eax
L14:
  lea    0x30(%rsp),%rdx
  movsd  (%rdx,%rax,8),%xmm0
  addsd  (%rbx,%rax,8),%xmm0
  movsd  %xmm0,(%rdx,%rax,8)
  add    $0x1,%rax
  cmp    %eax,%ebp
  jg     L14
  add    (%rsp),%rbx
  jmp    L20
L22:
  sub    %r14d,%r12d
  cmp    %r12d,%r13d
  jle    L35
  test   %r12d,%r12d
  jne    L57
  test   %ebp,%ebp
  jle    L46
  mov    $0x0,%eax
L156:
  movsd  0x8(%rsp),%xmm0
  mulsd  0x30(%rsp,%rax,8),%xmm0
  movsd  %xmm0,(%r15,%rax,8)
  movq   $0x0,0x30(%rsp,%rax,8)
  add    $0x1,%rax
  cmp    %eax,%ebp
  jg     L156
  add    (%rsp),%r15
L46:
  addl   $0x1,0x14(%rsp)
  mov    0x14(%rsp),%eax
  cmp    %eax,%r13d
  jne    L196
L150:
  sub    0x28(%rsp),%rbx
  sar    $0x3,%rbx
  imul   %ebp,%r14d
  movslq %r14d,%rax
  cmp    %rax,%rbx
  jne    L143
  test   %r12d,%r12d
  je     L141
L143:
  lea    D10(%rip),%rdi
  call   <Com_Printf@plt>
L141:
  mov    0x58(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L193
  add    $0x68,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L35:
  lea    D5(%rip),%rdi
  call   <Com_Printf@plt>
L57:
  mov    0x20(%rsp),%rax
  lea    (%rbx,%rax,1),%rcx
  mov    $0x0,%eax
  test   %ebp,%ebp
  jle    L46
  pxor   %xmm2,%xmm2
  cvtsi2sd %r12d,%xmm2
L59:
  movapd %xmm2,%xmm1
  mulsd  (%rcx,%rax,8),%xmm1
  mulsd  0x18(%rsp),%xmm1
  lea    0x30(%rsp),%rdx
  movsd  (%rdx,%rax,8),%xmm0
  subsd  %xmm1,%xmm0
  mulsd  0x8(%rsp),%xmm0
  movsd  %xmm0,(%r15,%rax,8)
  movsd  %xmm1,(%rdx,%rax,8)
  add    $0x1,%rax
  cmp    %eax,%ebp
  jg     L59
  add    (%rsp),%r15
  jmp    L46
L16:
  mov    0x28(%rsp),%rbx
  mov    $0x0,%r12d
  jmp    L150
L193:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: data_label: D15
datatype: f64
name: parse_data
arguments: data_label: D10
datatype: string
name: parse_data
arguments: data_label: D5
datatype: string

tool: D15: 1

tool: D10: Assertion (srcp - src == old_width * bytes && slicepos == 0) failed. Please report.

tool: D5: Assertion (slicepos < width) failed. Please report.


assistant: ```c
void shrink_line(double *dest, double *src, int bytes, int old_width, int width) {
  int x;
  int b;
  double *srcp;
  double *destp;
  double accum[4];
  double slice;
  const double avg_ratio = (double)width / old_width;
  const double inv_width = 1.0 / width;
  int slicepos;
  srcp = src;
  destp = dest;
  slicepos = 0;
  for (b = 0; b < bytes; ++b) {
    accum[b] = 0.0;
  }
  for (x = 0; x < width; x++) {
    do {
      for (b = 0; b < bytes; b++)
        accum[b] += *srcp++;
      slicepos += width;
    } while (slicepos < old_width);
    slicepos -= old_width;
    if (!(slicepos < width))
      Com_Printf("Assertion (slicepos < width) failed. Please report.\n");
    if (slicepos == 0) {
      for (b = 0; b < bytes; b++) {
        *destp++ = accum[b] * avg_ratio;
        accum[b] = 0.0;
      }
    } else {
      for (b = 0; b < bytes; b++) {
        slice = srcp[-bytes + b] * slicepos * inv_width;
        *destp++ = (accum[b] - slice) * avg_ratio;
        accum[b] = slice;
      }
    }
  }
  if (!(srcp - src == old_width * bytes && slicepos == 0)) {
    Com_Printf("Assertion (srcp - src == old_width * bytes && slicepos == 0)"
               " failed. Please report.");
  }
}
```