user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<__imlib_SubBlendShapedSpanToRGB>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  mov    %rdx,-0x28(%rbp)
  mov    %ecx,-0x20(%rbp)
  lea    -0x1c(%rbp),%rax
  add    $0x3,%rax
  movzbl (%rax),%eax
  cmp    $0xff,%al
  je     L42
  jmp    L102
L27:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  test   %eax,%eax
  je     L22
  cmp    $0xff,%eax
  jne    L113
  lea    -0x1c(%rbp),%rax
  add    $0x2,%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  lea    -0x1c(%rbp),%rax
  add    $0x3,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  imul   %edx,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x28(%rbp),%rax
  add    $0x2,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    -0x4(%rbp),%edx
  mov    %edx,%ecx
  shr    $0x8,%ecx
  mov    -0x4(%rbp),%edx
  add    %ecx,%edx
  sub    $0xffffff80,%edx
  shr    $0x8,%edx
  sub    %edx,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x4(%rbp),%eax
  shr    $0x8,%eax
  not    %eax
  mov    %eax,%edx
  mov    -0x4(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x28(%rbp),%rax
  add    $0x2,%rax
  and    %ecx,%edx
  mov    %dl,(%rax)
  lea    -0x1c(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  lea    -0x1c(%rbp),%rax
  add    $0x3,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  imul   %edx,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x28(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    -0x4(%rbp),%edx
  mov    %edx,%ecx
  shr    $0x8,%ecx
  mov    -0x4(%rbp),%edx
  add    %ecx,%edx
  sub    $0xffffff80,%edx
  shr    $0x8,%edx
  sub    %edx,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x4(%rbp),%eax
  shr    $0x8,%eax
  not    %eax
  mov    %eax,%edx
  mov    -0x4(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x28(%rbp),%rax
  add    $0x1,%rax
  and    %ecx,%edx
  mov    %dl,(%rax)
  lea    -0x1c(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  lea    -0x1c(%rbp),%rax
  add    $0x3,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  imul   %edx,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    -0x4(%rbp),%edx
  mov    %edx,%ecx
  shr    $0x8,%ecx
  mov    -0x4(%rbp),%edx
  add    %ecx,%edx
  sub    $0xffffff80,%edx
  shr    $0x8,%edx
  sub    %edx,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x4(%rbp),%eax
  shr    $0x8,%eax
  not    %eax
  mov    %eax,%edx
  mov    -0x4(%rbp),%eax
  and    %eax,%edx
  mov    -0x28(%rbp),%rax
  mov    %dl,(%rax)
  jmp    L1
L113:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  lea    -0x1c(%rbp),%rax
  add    $0x3,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  imul   %edx,%eax
  sub    $0xffffff80,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x4(%rbp),%eax
  shr    $0x8,%eax
  mov    %eax,%edx
  mov    -0x4(%rbp),%eax
  add    %edx,%eax
  shr    $0x8,%eax
  mov    %al,-0x9(%rbp)
  lea    -0x1c(%rbp),%rax
  add    $0x2,%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  movzbl -0x9(%rbp),%eax
  imul   %edx,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x28(%rbp),%rax
  add    $0x2,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    -0x4(%rbp),%edx
  mov    %edx,%ecx
  shr    $0x8,%ecx
  mov    -0x4(%rbp),%edx
  add    %ecx,%edx
  sub    $0xffffff80,%edx
  shr    $0x8,%edx
  sub    %edx,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x4(%rbp),%eax
  shr    $0x8,%eax
  not    %eax
  mov    %eax,%edx
  mov    -0x4(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x28(%rbp),%rax
  add    $0x2,%rax
  and    %ecx,%edx
  mov    %dl,(%rax)
  lea    -0x1c(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  movzbl -0x9(%rbp),%eax
  imul   %edx,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x28(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    -0x4(%rbp),%edx
  mov    %edx,%ecx
  shr    $0x8,%ecx
  mov    -0x4(%rbp),%edx
  add    %ecx,%edx
  sub    $0xffffff80,%edx
  shr    $0x8,%edx
  sub    %edx,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x4(%rbp),%eax
  shr    $0x8,%eax
  not    %eax
  mov    %eax,%edx
  mov    -0x4(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x28(%rbp),%rax
  add    $0x1,%rax
  and    %ecx,%edx
  mov    %dl,(%rax)
  lea    -0x1c(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  movzbl -0x9(%rbp),%eax
  imul   %edx,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    -0x4(%rbp),%edx
  mov    %edx,%ecx
  shr    $0x8,%ecx
  mov    -0x4(%rbp),%edx
  add    %ecx,%edx
  sub    $0xffffff80,%edx
  shr    $0x8,%edx
  sub    %edx,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x4(%rbp),%eax
  shr    $0x8,%eax
  not    %eax
  mov    %eax,%edx
  mov    -0x4(%rbp),%eax
  and    %eax,%edx
  mov    -0x28(%rbp),%rax
  mov    %dl,(%rax)
  jmp    L1
L22:
  nop
L1:
  addq   $0x1,-0x18(%rbp)
  addq   $0x4,-0x28(%rbp)
L102:
  mov    -0x20(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    %edx,-0x20(%rbp)
  test   %eax,%eax
  jne    L27
  jmp    L90
L106:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  test   %eax,%eax
  je     L111
  cmp    $0xff,%eax
  jne    L88
  mov    -0x28(%rbp),%rax
  add    $0x2,%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  lea    -0x1c(%rbp),%rax
  add    $0x2,%rax
  movzbl (%rax),%eax
  movzbl %al,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  mov    %eax,-0x8(%rbp)
  mov    -0x8(%rbp),%eax
  shr    $0x8,%eax
  not    %eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x28(%rbp),%rax
  add    $0x2,%rax
  and    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0x28(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  lea    -0x1c(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movzbl %al,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  mov    %eax,-0x8(%rbp)
  mov    -0x8(%rbp),%eax
  shr    $0x8,%eax
  not    %eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x28(%rbp),%rax
  add    $0x1,%rax
  and    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  lea    -0x1c(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  mov    %eax,-0x8(%rbp)
  mov    -0x8(%rbp),%eax
  shr    $0x8,%eax
  not    %eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%eax
  and    %eax,%edx
  mov    -0x28(%rbp),%rax
  mov    %dl,(%rax)
  jmp    L50
L88:
  lea    -0x1c(%rbp),%rax
  add    $0x2,%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  imul   %edx,%eax
  mov    %eax,-0x8(%rbp)
  mov    -0x28(%rbp),%rax
  add    $0x2,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    -0x8(%rbp),%edx
  mov    %edx,%ecx
  shr    $0x8,%ecx
  mov    -0x8(%rbp),%edx
  add    %ecx,%edx
  sub    $0xffffff80,%edx
  shr    $0x8,%edx
  sub    %edx,%eax
  mov    %eax,-0x8(%rbp)
  mov    -0x8(%rbp),%eax
  shr    $0x8,%eax
  not    %eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x28(%rbp),%rax
  add    $0x2,%rax
  and    %ecx,%edx
  mov    %dl,(%rax)
  lea    -0x1c(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  imul   %edx,%eax
  mov    %eax,-0x8(%rbp)
  mov    -0x28(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    -0x8(%rbp),%edx
  mov    %edx,%ecx
  shr    $0x8,%ecx
  mov    -0x8(%rbp),%edx
  add    %ecx,%edx
  sub    $0xffffff80,%edx
  shr    $0x8,%edx
  sub    %edx,%eax
  mov    %eax,-0x8(%rbp)
  mov    -0x8(%rbp),%eax
  shr    $0x8,%eax
  not    %eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x28(%rbp),%rax
  add    $0x1,%rax
  and    %ecx,%edx
  mov    %dl,(%rax)
  lea    -0x1c(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  imul   %edx,%eax
  mov    %eax,-0x8(%rbp)
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    -0x8(%rbp),%edx
  mov    %edx,%ecx
  shr    $0x8,%ecx
  mov    -0x8(%rbp),%edx
  add    %ecx,%edx
  sub    $0xffffff80,%edx
  shr    $0x8,%edx
  sub    %edx,%eax
  mov    %eax,-0x8(%rbp)
  mov    -0x8(%rbp),%eax
  shr    $0x8,%eax
  not    %eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%eax
  and    %eax,%edx
  mov    -0x28(%rbp),%rax
  mov    %dl,(%rax)
  jmp    L50
L111:
  nop
L50:
  addq   $0x1,-0x18(%rbp)
  addq   $0x4,-0x28(%rbp)
L42:
  mov    -0x20(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    %edx,-0x20(%rbp)
  test   %eax,%eax
  jne    L106
L90:
  pop    %rbp
  ret
```

assistant: ```c
void __imlib_SubBlendShapedSpanToRGB(unsigned char *src, unsigned int color, unsigned int *dst, int len) {
  if (((unsigned char *)(&color))[3] < 255) {
    while (len--) {
      unsigned int tmp;
      unsigned char a;
      switch (*src) {
      case 0:
        break;
      case 255: {
        tmp = (((unsigned char *)(&color))[2]) * (((unsigned char *)(&color))[3]);
        tmp = (((unsigned char *)(dst))[2]) - ((tmp + (tmp >> 8) + 0x80) >> 8);
        ((unsigned char *)(dst))[2] = (tmp & (~(tmp >> 8)));
        ;
        tmp = (((unsigned char *)(&color))[1]) * (((unsigned char *)(&color))[3]);
        tmp = (((unsigned char *)(dst))[1]) - ((tmp + (tmp >> 8) + 0x80) >> 8);
        ((unsigned char *)(dst))[1] = (tmp & (~(tmp >> 8)));
        ;
        tmp = (((unsigned char *)(&color))[0]) * (((unsigned char *)(&color))[3]);
        tmp = (((unsigned char *)(dst))[0]) - ((tmp + (tmp >> 8) + 0x80) >> 8);
        ((unsigned char *)(dst))[0] = (tmp & (~(tmp >> 8)));
        ;
        ;
        break;
      }
      default: {
        do {
          tmp = ((*src) * (((unsigned char *)(&color))[3])) + 0x80;
          a = (tmp + (tmp >> 8)) >> 8;
        } while (0);
        tmp = (((unsigned char *)(&color))[2]) * (a);
        tmp = (((unsigned char *)(dst))[2]) - ((tmp + (tmp >> 8) + 0x80) >> 8);
        ((unsigned char *)(dst))[2] = (tmp & (~(tmp >> 8)));
        ;
        tmp = (((unsigned char *)(&color))[1]) * (a);
        tmp = (((unsigned char *)(dst))[1]) - ((tmp + (tmp >> 8) + 0x80) >> 8);
        ((unsigned char *)(dst))[1] = (tmp & (~(tmp >> 8)));
        ;
        tmp = (((unsigned char *)(&color))[0]) * (a);
        tmp = (((unsigned char *)(dst))[0]) - ((tmp + (tmp >> 8) + 0x80) >> 8);
        ((unsigned char *)(dst))[0] = (tmp & (~(tmp >> 8)));
        ;
        ;
        break;
      }
      }
      src++;
      dst++;
    }
    return;
  }
  while (len--) {
    unsigned int tmp;
    switch (*src) {
    case 0:
      break;
    case 255: {
      do {
        tmp = (((unsigned char *)(dst))[2]) - (((unsigned char *)(&color))[2]);
        ((unsigned char *)(dst))[2] = (tmp & (~(tmp >> 8)));
        ;
        tmp = (((unsigned char *)(dst))[1]) - (((unsigned char *)(&color))[1]);
        ((unsigned char *)(dst))[1] = (tmp & (~(tmp >> 8)));
        ;
        tmp = (((unsigned char *)(dst))[0]) - (((unsigned char *)(&color))[0]);
        ((unsigned char *)(dst))[0] = (tmp & (~(tmp >> 8)));
        ;
      } while (0);
      break;
    }
    default: {
      tmp = (((unsigned char *)(&color))[2]) * (*src);
      tmp = (((unsigned char *)(dst))[2]) - ((tmp + (tmp >> 8) + 0x80) >> 8);
      ((unsigned char *)(dst))[2] = (tmp & (~(tmp >> 8)));
      ;
      tmp = (((unsigned char *)(&color))[1]) * (*src);
      tmp = (((unsigned char *)(dst))[1]) - ((tmp + (tmp >> 8) + 0x80) >> 8);
      ((unsigned char *)(dst))[1] = (tmp & (~(tmp >> 8)));
      ;
      tmp = (((unsigned char *)(&color))[0]) * (*src);
      tmp = (((unsigned char *)(dst))[0]) - ((tmp + (tmp >> 8) + 0x80) >> 8);
      ((unsigned char *)(dst))[0] = (tmp & (~(tmp >> 8)));
      ;
      ;
      break;
    }
    }
    src++;
    dst++;
  }
}
```