user: 请将以下的汇编代码转换成C语言代码：

```asm
<scale_pixels>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xd8,%rsp
  mov    %esi,0x90(%rsp)
  imul   0x110(%rsp),%esi
  mov    %rdi,0xb0(%rsp)
  mov    %edx,0x9c(%rsp)
  mov    %rcx,0xa8(%rsp)
  mov    %r8d,0xcc(%rsp)
  mov    %esi,0xc4(%rsp)
  test   %edx,%edx
  jle    L34
  lea    0x3(%r8),%eax
  mov    %r9d,%ecx
  mov    %r8d,%ebx
  movl   $0x0,0xc0(%rsp)
  imul   0x110(%rsp),%eax
  lea    (%r8,%r8,1),%r8d
  sub    $0x1,%ecx
  movl   $0x0,0xbc(%rsp)
  movl   $0x0,0xb8(%rsp)
  shl    $0x7,%ecx
  mov    %ecx,0xc8(%rsp)
  movslq %eax,%rsi
  sub    0x110(%rsp),%eax
  mov    %rsi,0x10(%rsp)
  movslq %eax,%rsi
  sub    0x110(%rsp),%eax
  mov    %rsi,0x18(%rsp)
  movslq %eax,%rsi
  mov    %rsi,0x20(%rsp)
  mov    %eax,%esi
  sub    0x110(%rsp),%esi
  movslq %esi,%rdx
  mov    %rdx,0x28(%rsp)
  mov    0x110(%rsp),%edx
  lea    (%rdx,%rdx,1),%r9d
  mov    0x110(%rsp),%edx
  add    %r9d,%edx
  movslq %edx,%rdx
  mov    %rdx,0x58(%rsp)
  movslq %r9d,%rdx
  mov    %rdx,0x60(%rsp)
  lea    0x3(%r8),%edx
  imul   0x110(%rsp),%edx
  movslq %edx,%rdi
  sub    %r9d,%edx
  mov    %rdi,0x30(%rsp)
  lea    (%rax,%rax,1),%edi
  movslq %edx,%rdx
  movslq %edi,%r11
  add    %eax,%edi
  mov    %rdx,0x40(%rsp)
  lea    (%rsi,%rsi,1),%edx
  movslq %edi,%rax
  mov    %ebx,%edi
  mov    %r11,0x38(%rsp)
  movslq %edx,%r11
  mov    %rax,0x70(%rsp)
  lea    0x2(%rbx,%r8,1),%eax
  add    %esi,%edx
  imul   0x110(%rsp),%eax
  mov    %r11,0x48(%rsp)
  movslq %eax,%rbx
  sub    0x110(%rsp),%eax
  cltq
  mov    %rbx,0x78(%rsp)
  mov    %rax,0x80(%rsp)
  movslq %edx,%rax
  mov    %rax,0x88(%rsp)
  lea    -0x1(%rdi),%eax
  shl    $0x7,%eax
  mov    %eax,0xa4(%rsp)
  movslq 0x110(%rsp),%rax
  mov    %rax,0x68(%rsp)
L97:
  mov    0x9c(%rsp),%eax
  cmp    $0x1,%eax
  je     L67
  lea    -0x1(%rax),%ecx
  mov    0xc0(%rsp),%eax
  cltd
  idiv   %ecx
  mov    %eax,%r13d
  xor    %eax,%eax
  cmp    0xb8(%rsp),%ecx
  mov    0x90(%rsp),%ecx
  sete   %al
  sub    %eax,%r13d
  mov    %r13d,%eax
  sar    $0x7,%r13d
  and    $0x7f,%eax
  mov    %eax,0xc(%rsp)
  lea    -0x1(%r13),%eax
  test   %ecx,%ecx
  jle    L142
L27:
  imul   0xcc(%rsp),%eax
  movl   $0x0,0x54(%rsp)
  movl   $0x0,0x98(%rsp)
  mov    %eax,0xa0(%rsp)
  mov    0xbc(%rsp),%eax
  mov    %eax,0x94(%rsp)
L9:
  mov    0x90(%rsp),%eax
  cmp    $0x1,%eax
  je     L64
  lea    -0x1(%rax),%ecx
  mov    0x98(%rsp),%eax
  cltd
  idiv   %ecx
  mov    %eax,%ebx
  xor    %eax,%eax
  cmp    0x54(%rsp),%ecx
  sete   %al
  sub    %eax,%ebx
  mov    %ebx,%r12d
  sar    $0x7,%ebx
  and    $0x7f,%r12d
  sub    $0x1,%ebx
L18:
  add    0xa0(%rsp),%ebx
  imul   0x110(%rsp),%ebx
  mov    0x110(%rsp),%edx
  movslq %ebx,%rbx
  add    0xa8(%rsp),%rbx
  test   %edx,%edx
  jle    L123
  mov    0x9c(%rsp),%eax
  movslq 0x94(%rsp),%rbp
  add    0xb0(%rsp),%rbp
  sub    $0x1,%eax
  mov    %eax,0x8(%rsp)
  mov    0x110(%rsp),%eax
  sub    $0x1,%eax
  lea    0x1(%rbx,%rax,1),%rax
  mov    %rax,(%rsp)
  jmp    L146
  nopl   0x0(%rax,%rax,1)
L55:
  mov    0xc(%rsp),%r8d
  mov    %r10d,%edx
  mov    %r14d,%esi
  mov    %r15d,%edi
  call   <icerp@plt>
  mov    $0xff,%edx
  cmp    %edx,%eax
  cmovg  %edx,%eax
  xor    %edx,%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  add    $0x1,%rbx
  add    $0x1,%rbp
  mov    %al,-0x1(%rbp)
  cmp    (%rsp),%rbx
  je     L123
L146:
  mov    0x10(%rsp),%rax
  mov    %r12d,%r8d
  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
  call   <icerp@plt>
  mov    %eax,%r14d
  mov    %eax,%r15d
  test   %r13d,%r13d
  jle    L31
  mov    0x58(%rsp),%rax
  movzbl (%rbx),%edi
  mov    %r12d,%r8d
  movzbl (%rbx,%rax,1),%ecx
  mov    0x60(%rsp),%rax
  movzbl (%rbx,%rax,1),%edx
  mov    0x68(%rsp),%rax
  movzbl (%rbx,%rax,1),%esi
  call   <icerp@plt>
  mov    %eax,%r15d
L31:
  mov    0x30(%rsp),%rax
  mov    %r12d,%r8d
  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
  call   <icerp@plt>
  mov    %eax,%r10d
  mov    %eax,%ecx
  cmp    0x8(%rsp),%r13d
  jge    L55
  mov    %eax,0x50(%rsp)
  mov    0x70(%rsp),%rax
  mov    %r12d,%r8d
  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
  call   <icerp@plt>
  mov    0x50(%rsp),%r10d
  mov    %eax,%ecx
  jmp    L55
  nop
L123:
  addl   $0x1,0x54(%rsp)
  mov    0x110(%rsp),%edi
  mov    0xa4(%rsp),%esi
  add    %edi,0x94(%rsp)
  add    %esi,0x98(%rsp)
  mov    0x54(%rsp),%eax
  cmp    %eax,0x90(%rsp)
  jg     L9
L142:
  mov    0xc4(%rsp),%esi
  addl   $0x1,0xb8(%rsp)
  add    %esi,0xbc(%rsp)
  mov    0xb8(%rsp),%eax
  mov    0xc8(%rsp),%esi
  add    %esi,0xc0(%rsp)
  cmp    %eax,0x9c(%rsp)
  jne    L97
L34:
  add    $0xd8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L64:
  mov    $0xffffffff,%ebx
  xor    %r12d,%r12d
  jmp    L18
L67:
  mov    0x90(%rsp),%eax
  test   %eax,%eax
  jle    L34
  movl   $0x0,0xc(%rsp)
  mov    $0xffffffff,%eax
  xor    %r13d,%r13d
  jmp    L27
```

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;
      }
    }
  }
}
```