user: What would the C source look like for the assembly code provided here:

```asm
<scale_pixels>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x60,%rsp
  mov    %rdi,-0x48(%rbp)
  mov    %esi,-0x4c(%rbp)
  mov    %edx,-0x50(%rbp)
  mov    %rcx,-0x58(%rbp)
  mov    %r8d,-0x5c(%rbp)
  mov    %r9d,-0x60(%rbp)
  mov    -0x4c(%rbp),%eax
  imul   0x10(%rbp),%eax
  mov    %eax,-0x14(%rbp)
  movl   $0x0,-0x38(%rbp)
  jmp    L24
L75:
  cmpl   $0x1,-0x50(%rbp)
  jle    L175
  mov    -0x60(%rbp),%eax
  sub    $0x1,%eax
  imul   -0x38(%rbp),%eax
  shl    $0x7,%eax
  mov    -0x50(%rbp),%edx
  lea    -0x1(%rdx),%ecx
  cltd
  idiv   %ecx
  mov    %eax,-0x2c(%rbp)
  mov    -0x50(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0x38(%rbp)
  jne    L92
  subl   $0x1,-0x2c(%rbp)
L92:
  mov    -0x2c(%rbp),%eax
  and    $0x7f,%eax
  mov    %eax,-0x24(%rbp)
  sarl   $0x7,-0x2c(%rbp)
  jmp    L42
L175:
  movl   $0x0,-0x24(%rbp)
  mov    -0x24(%rbp),%eax
  mov    %eax,-0x2c(%rbp)
L42:
  movl   $0x0,-0x3c(%rbp)
  jmp    L127
L23:
  cmpl   $0x1,-0x4c(%rbp)
  jle    L143
  mov    -0x5c(%rbp),%eax
  sub    $0x1,%eax
  imul   -0x3c(%rbp),%eax
  shl    $0x7,%eax
  mov    -0x4c(%rbp),%edx
  lea    -0x1(%rdx),%ecx
  cltd
  idiv   %ecx
  mov    %eax,-0x30(%rbp)
  mov    -0x4c(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0x3c(%rbp)
  jne    L82
  subl   $0x1,-0x30(%rbp)
L82:
  mov    -0x30(%rbp),%eax
  and    $0x7f,%eax
  mov    %eax,-0x28(%rbp)
  sarl   $0x7,-0x30(%rbp)
  jmp    L177
L143:
  movl   $0x0,-0x28(%rbp)
  mov    -0x28(%rbp),%eax
  mov    %eax,-0x30(%rbp)
L177:
  mov    -0x2c(%rbp),%eax
  sub    $0x1,%eax
  imul   -0x5c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x30(%rbp),%eax
  sub    $0x1,%eax
  add    %edx,%eax
  imul   0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x8(%rbp)
  movl   $0x0,-0x34(%rbp)
  jmp    L102
L19:
  mov    -0x5c(%rbp),%eax
  add    $0x3,%eax
  imul   0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%ecx
  mov    -0x5c(%rbp),%eax
  add    $0x2,%eax
  imul   0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  mov    -0x5c(%rbp),%eax
  add    $0x1,%eax
  imul   0x10(%rbp),%eax
  movslq %eax,%rsi
  mov    -0x8(%rbp),%rax
  add    %rsi,%rax
  movzbl (%rax),%eax
  movzbl %al,%esi
  mov    -0x5c(%rbp),%eax
  imul   0x10(%rbp),%eax
  movslq %eax,%rdi
  mov    -0x8(%rbp),%rax
  add    %rdi,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    -0x28(%rbp),%edi
  mov    %edi,%r8d
  mov    %eax,%edi
  call   <icerp@plt>
  mov    %eax,-0x10(%rbp)
  cmpl   $0x0,-0x2c(%rbp)
  jle    L107
  mov    0x10(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%ecx
  mov    0x10(%rbp),%eax
  add    %eax,%eax
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  mov    0x10(%rbp),%eax
  movslq %eax,%rsi
  mov    -0x8(%rbp),%rax
  add    %rsi,%rax
  movzbl (%rax),%eax
  movzbl %al,%esi
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    -0x28(%rbp),%edi
  mov    %edi,%r8d
  mov    %eax,%edi
  call   <icerp@plt>
  mov    %eax,-0x1c(%rbp)
  jmp    L46
L107:
  mov    -0x10(%rbp),%eax
  mov    %eax,-0x1c(%rbp)
L46:
  mov    -0x5c(%rbp),%eax
  add    %eax,%eax
  add    $0x3,%eax
  imul   0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%ecx
  mov    -0x5c(%rbp),%eax
  add    $0x1,%eax
  imul   0x10(%rbp),%eax
  add    %eax,%eax
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  mov    -0x5c(%rbp),%eax
  add    %eax,%eax
  add    $0x1,%eax
  imul   0x10(%rbp),%eax
  movslq %eax,%rsi
  mov    -0x8(%rbp),%rax
  add    %rsi,%rax
  movzbl (%rax),%eax
  movzbl %al,%esi
  mov    -0x5c(%rbp),%eax
  imul   0x10(%rbp),%eax
  add    %eax,%eax
  movslq %eax,%rdi
  mov    -0x8(%rbp),%rax
  add    %rdi,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    -0x28(%rbp),%edi
  mov    %edi,%r8d
  mov    %eax,%edi
  call   <icerp@plt>
  mov    %eax,-0xc(%rbp)
  mov    -0x50(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0x2c(%rbp)
  jge    L160
  mov    -0x5c(%rbp),%eax
  add    $0x1,%eax
  imul   0x10(%rbp),%eax
  mov    %eax,%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%ecx
  mov    -0x5c(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  add    $0x2,%eax
  imul   0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  mov    -0x5c(%rbp),%esi
  mov    %esi,%eax
  add    %eax,%eax
  add    %esi,%eax
  add    $0x1,%eax
  imul   0x10(%rbp),%eax
  movslq %eax,%rsi
  mov    -0x8(%rbp),%rax
  add    %rsi,%rax
  movzbl (%rax),%eax
  movzbl %al,%esi
  mov    -0x5c(%rbp),%eax
  imul   0x10(%rbp),%eax
  mov    %eax,%edi
  mov    %edi,%eax
  add    %eax,%eax
  add    %edi,%eax
  movslq %eax,%rdi
  mov    -0x8(%rbp),%rax
  add    %rdi,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    -0x28(%rbp),%edi
  mov    %edi,%r8d
  mov    %eax,%edi
  call   <icerp@plt>
  mov    %eax,-0x18(%rbp)
  jmp    L123
L160:
  mov    -0xc(%rbp),%eax
  mov    %eax,-0x18(%rbp)
L123:
  mov    -0x24(%rbp),%edi
  mov    -0x18(%rbp),%ecx
  mov    -0xc(%rbp),%edx
  mov    -0x10(%rbp),%esi
  mov    -0x1c(%rbp),%eax
  mov    %edi,%r8d
  mov    %eax,%edi
  call   <icerp@plt>
  mov    %eax,-0x20(%rbp)
  cmpl   $0x0,-0x20(%rbp)
  jns    L25
  movl   $0x0,-0x20(%rbp)
L25:
  cmpl   $0xff,-0x20(%rbp)
  jle    L146
  movl   $0xff,-0x20(%rbp)
L146:
  mov    -0x38(%rbp),%eax
  imul   -0x14(%rbp),%eax
  mov    %eax,%edx
  mov    -0x3c(%rbp),%eax
  imul   0x10(%rbp),%eax
  add    %eax,%edx
  mov    -0x34(%rbp),%eax
  add    %edx,%eax
  movslq %eax,%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    -0x20(%rbp),%edx
  mov    %dl,(%rax)
  addq   $0x1,-0x8(%rbp)
  addl   $0x1,-0x34(%rbp)
L102:
  mov    -0x34(%rbp),%eax
  cmp    0x10(%rbp),%eax
  jl     L19
  addl   $0x1,-0x3c(%rbp)
L127:
  mov    -0x3c(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jl     L23
  addl   $0x1,-0x38(%rbp)
L24:
  mov    -0x38(%rbp),%eax
  cmp    -0x50(%rbp),%eax
  jl     L75
  nop
  nop
  leave
  ret
```

assistant: ```c
void scale_pixels(unsigned char *dst, int dw, int dh, unsigned char *src, int sw, int sh, int bpp) {
  int x, y, n, ix, iy, wx, wy, v;
  int a, b, c, d;
  int dstride = dw * bpp;
  unsigned char *s;
  for (y = 0; y < dh; ++y) {
    if (dh > 1) {
      iy = (((sh - 1) * y) << 7) / (dh - 1);
      if (y == dh - 1)
        --iy;
      wy = iy & 0x7f;
      iy >>= 7;
    } else
      iy = wy = 0;
    for (x = 0; x < dw; ++x) {
      if (dw > 1) {
        ix = (((sw - 1) * x) << 7) / (dw - 1);
        if (x == dw - 1)
          --ix;
        wx = ix & 0x7f;
        ix >>= 7;
      } else
        ix = wx = 0;
      s = src + ((iy - 1) * sw + (ix - 1)) * bpp;
      for (n = 0; n < bpp; ++n) {
        b = icerp(s[(sw + 0) * bpp], s[(sw + 1) * bpp], s[(sw + 2) * bpp], s[(sw + 3) * bpp], wx);
        if (iy > 0) {
          a = icerp(s[0], s[bpp], s[2 * bpp], s[3 * bpp], wx);
        } else
          a = b;
        c = icerp(s[(2 * sw + 0) * bpp], s[(2 * sw + 1) * bpp], s[(2 * sw + 2) * bpp], s[(2 * sw + 3) * bpp], wx);
        if (iy < dh - 1) {
          d = icerp(s[(3 * sw + 0) * bpp], s[(3 * sw + 1) * bpp], s[(3 * sw + 2) * bpp], s[(3 * sw + 3) * bpp], wx);
        } else
          d = c;
        v = icerp(a, b, c, d, wy);
        if (v < 0)
          v = 0;
        if (v > 255)
          v = 255;
        dst[(y * dstride) + (x * bpp) + n] = v;
        ++s;
      }
    }
  }
}
```