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

```asm
<scale_pixels>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xd8,%rsp
  mov    %rdi,0xa8(%rsp)
  mov    %esi,0x90(%rsp)
  mov    %edx,0xc(%rsp)
  mov    %rcx,0xa0(%rsp)
  mov    %r8d,0xcc(%rsp)
  imul   0x110(%rsp),%esi
  mov    %esi,0xc4(%rsp)
  test   %edx,%edx
  jle    L121
  mov    %r8d,%ebx
  mov    %r9d,%edx
  lea    0x3(%r8),%eax
  imul   0x110(%rsp),%eax
  cltq
  mov    %rax,0x10(%rsp)
  lea    0x2(%r8),%eax
  imul   0x110(%rsp),%eax
  cltq
  mov    %rax,0x18(%rsp)
  lea    0x1(%r8),%ecx
  imul   0x110(%rsp),%ecx
  movslq %ecx,%rax
  mov    %rax,0x20(%rsp)
  mov    %r8d,%edi
  imul   0x110(%rsp),%edi
  mov    %edi,%r8d
  movslq %edi,%rax
  mov    %rax,0x28(%rsp)
  mov    0x110(%rsp),%eax
  add    %eax,%eax
  mov    %eax,%esi
  add    0x110(%rsp),%esi
  movslq %esi,%rsi
  mov    %rsi,0x58(%rsp)
  cltq
  mov    %rax,0x60(%rsp)
  lea    (%rbx,%rbx,1),%eax
  lea    0x3(%rax),%esi
  imul   0x110(%rsp),%esi
  movslq %esi,%rsi
  mov    %rsi,0x30(%rsp)
  lea    (%rcx,%rcx,1),%edi
  movslq %edi,%rsi
  mov    %rsi,0x38(%rsp)
  lea    0x1(%rax),%esi
  imul   0x110(%rsp),%esi
  movslq %esi,%rsi
  mov    %rsi,0x40(%rsp)
  lea    (%r8,%r8,1),%esi
  movslq %esi,%r10
  mov    %r10,0x48(%rsp)
  add    %ecx,%edi
  movslq %edi,%rdi
  mov    %rdi,0x70(%rsp)
  add    %ebx,%eax
  lea    0x2(%rax),%ecx
  imul   0x110(%rsp),%ecx
  movslq %ecx,%rcx
  mov    %rcx,0x78(%rsp)
  add    $0x1,%eax
  imul   0x110(%rsp),%eax
  cltq
  mov    %rax,0x80(%rsp)
  add    %r8d,%esi
  movslq %esi,%rax
  mov    %rax,0x88(%rsp)
  sub    $0x1,%edx
  shl    $0x7,%edx
  mov    %edx,0xc8(%rsp)
  lea    -0x1(%rbx),%eax
  shl    $0x7,%eax
  mov    %eax,0xb0(%rsp)
  movl   $0x0,0xbc(%rsp)
  movl   $0x0,0xc0(%rsp)
  movl   $0x0,0xb8(%rsp)
  movslq 0x110(%rsp),%rax
  mov    %rax,0x68(%rsp)
  jmp    L129
L105:
  movl   $0x0,0x50(%rsp)
  mov    $0x0,%r15d
  jmp    L110
L79:
  mov    $0x0,%r15d
  mov    $0x0,%eax
  jmp    L44
L138:
  mov    0x30(%rsp),%rax
  movzbl (%rbx,%rax,1),%ecx
  mov    0x38(%rsp),%rax
  movzbl (%rbx,%rax,1),%edx
  mov    0x40(%rsp),%rax
  movzbl (%rbx,%rax,1),%esi
  mov    0x48(%rsp),%rax
  movzbl (%rbx,%rax,1),%edi
  mov    %r15d,%r8d
  call   <icerp@plt>
  mov    %eax,%r12d
  mov    0xc(%rsp),%eax
  sub    $0x1,%eax
  mov    %r12d,%ecx
  cmp    %r14d,%eax
  jg     L35
L163:
  mov    0x50(%rsp),%r8d
  mov    %r12d,%edx
  mov    %ebp,%esi
  mov    0x8(%rsp),%edi
  call   <icerp@plt>
  mov    $0xff,%edx
  cmp    %edx,%eax
  cmovg  %edx,%eax
  test   %eax,%eax
  mov    $0x0,%edx
  cmovs  %edx,%eax
  mov    %al,0x0(%r13)
  add    $0x1,%rbx
  add    $0x1,%r13
  cmp    (%rsp),%rbx
  je     L3
L165:
  mov    0x10(%rsp),%rax
  movzbl (%rbx,%rax,1),%ecx
  mov    0x18(%rsp),%rax
  movzbl (%rbx,%rax,1),%edx
  mov    0x20(%rsp),%rax
  movzbl (%rbx,%rax,1),%esi
  mov    0x28(%rsp),%rax
  movzbl (%rbx,%rax,1),%edi
  mov    %r15d,%r8d
  call   <icerp@plt>
  mov    %eax,%ebp
  mov    %eax,0x8(%rsp)
  test   %r14d,%r14d
  jle    L138
  mov    0x58(%rsp),%rax
  movzbl (%rbx,%rax,1),%ecx
  mov    0x60(%rsp),%rax
  movzbl (%rbx,%rax,1),%edx
  mov    0x68(%rsp),%rax
  movzbl (%rbx,%rax,1),%esi
  movzbl (%rbx),%edi
  mov    %r15d,%r8d
  call   <icerp@plt>
  mov    %eax,0x8(%rsp)
  jmp    L138
L35:
  mov    0x70(%rsp),%rax
  movzbl (%rbx,%rax,1),%ecx
  mov    0x78(%rsp),%rax
  movzbl (%rbx,%rax,1),%edx
  mov    0x80(%rsp),%rax
  movzbl (%rbx,%rax,1),%esi
  mov    0x88(%rsp),%rax
  movzbl (%rbx,%rax,1),%edi
  mov    %r15d,%r8d
  call   <icerp@plt>
  mov    %eax,%ecx
  jmp    L163
L3:
  addl   $0x1,0x54(%rsp)
  mov    0x54(%rsp),%eax
  mov    0xb0(%rsp),%esi
  add    %esi,0x98(%rsp)
  mov    0x110(%rsp),%edi
  add    %edi,0x94(%rsp)
  cmp    %eax,0x90(%rsp)
  je     L90
L95:
  cmpl   $0x1,0x90(%rsp)
  jle    L79
  mov    0x98(%rsp),%eax
  mov    0xb4(%rsp),%edi
  cltd
  idiv   %edi
  cmp    0x54(%rsp),%edi
  sete   %dl
  movzbl %dl,%edx
  sub    %edx,%eax
  mov    %eax,%r15d
  and    $0x7f,%r15d
  sar    $0x7,%eax
L44:
  mov    0x9c(%rsp),%edi
  lea    -0x1(%rdi,%rax,1),%ebx
  imul   0x110(%rsp),%ebx
  movslq %ebx,%rbx
  add    0xa0(%rsp),%rbx
  cmpl   $0x0,0x110(%rsp)
  jle    L3
  movslq 0x94(%rsp),%r13
  add    0xa8(%rsp),%r13
  mov    0x110(%rsp),%eax
  add    %rbx,%rax
  mov    %rax,(%rsp)
  jmp    L165
L90:
  addl   $0x1,0xb8(%rsp)
  mov    0xb8(%rsp),%eax
  mov    0xc8(%rsp),%edi
  add    %edi,0xc0(%rsp)
  mov    0xc4(%rsp),%edi
  add    %edi,0xbc(%rsp)
  cmp    %eax,0xc(%rsp)
  je     L121
L129:
  mov    0xc(%rsp),%eax
  cmp    $0x1,%eax
  jle    L105
  lea    -0x1(%rax),%ecx
  mov    0xc0(%rsp),%eax
  cltd
  idiv   %ecx
  cmp    0xb8(%rsp),%ecx
  sete   %dl
  movzbl %dl,%edx
  sub    %edx,%eax
  mov    %eax,%esi
  and    $0x7f,%esi
  mov    %esi,0x50(%rsp)
  sar    $0x7,%eax
  mov    %eax,%r15d
L110:
  mov    0x90(%rsp),%esi
  test   %esi,%esi
  jle    L90
  lea    -0x1(%r15),%eax
  imul   0xcc(%rsp),%eax
  mov    %eax,0x9c(%rsp)
  mov    0xbc(%rsp),%eax
  mov    %eax,0x94(%rsp)
  movl   $0x0,0x98(%rsp)
  movl   $0x0,0x54(%rsp)
  lea    -0x1(%rsi),%eax
  mov    %eax,0xb4(%rsp)
  mov    %r15d,%r14d
  jmp    L95
L121:
  add    $0xd8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  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;
      }
    }
  }
}
```