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

```asm
<__imlib_BlendShapedSpanToRGB>:
  endbr64
  mov    %rdx,%rax
  mov    %esi,%edx
  push   %rbp
  shr    $0x18,%edx
  push   %rbx
  mov    %esi,%ebx
  cmp    $0xff,%dl
  jne    L52
  mov    %ecx,%esi
  add    %rdi,%rsi
  test   %ecx,%ecx
  je     L69
  mov    %ebx,%r8d
  movzbl %bh,%ecx
  movzbl %bl,%r9d
  and    $0xffffff,%ebx
  shr    $0x10,%r8d
  mov    %ecx,%r10d
  movzbl %r8b,%r8d
  jmp    L27
  nopl   0x0(%rax,%rax,1)
L12:
  mov    (%rax),%edx
  and    $0xff000000,%edx
  or     %ebx,%edx
  mov    %edx,(%rax)
L48:
  add    $0x1,%rdi
  add    $0x4,%rax
  cmp    %rsi,%rdi
  je     L69
L27:
  movzbl (%rdi),%edx
  test   %dl,%dl
  je     L48
  cmp    $0xff,%dl
  je     L12
  movzbl 0x2(%rax),%ebp
  mov    %r8d,%r11d
  add    $0x1,%rdi
  add    $0x4,%rax
  sub    %ebp,%r11d
  mov    %ebp,%ecx
  imul   %r11d,%edx
  mov    %edx,%r11d
  shr    $0x8,%r11d
  lea    0x80(%rdx,%r11,1),%edx
  movzbl -0x3(%rax),%r11d
  shr    $0x8,%edx
  add    %edx,%ecx
  mov    %r11d,%edx
  mov    %cl,-0x2(%rax)
  mov    %r10d,%ecx
  sub    %r11d,%ecx
  movzbl -0x1(%rdi),%r11d
  imul   %r11d,%ecx
  mov    %ecx,%r11d
  shr    $0x8,%r11d
  lea    0x80(%rcx,%r11,1),%ecx
  movzbl -0x4(%rax),%r11d
  shr    $0x8,%ecx
  add    %ecx,%edx
  mov    %r9d,%ecx
  mov    %dl,-0x3(%rax)
  sub    %r11d,%ecx
  mov    %r11d,%edx
  movzbl -0x1(%rdi),%r11d
  imul   %r11d,%ecx
  mov    %ecx,%r11d
  shr    $0x8,%r11d
  lea    0x80(%rcx,%r11,1),%ecx
  shr    $0x8,%ecx
  add    %ecx,%edx
  mov    %dl,-0x4(%rax)
  cmp    %rsi,%rdi
  jne    L27
L69:
  pop    %rbx
  pop    %rbp
  ret
  nopl   0x0(%rax,%rax,1)
L52:
  test   %ecx,%ecx
  je     L69
  mov    %ebx,%r9d
  movzbl %dl,%esi
  mov    %ecx,%ecx
  movzbl %bh,%edx
  shr    $0x10,%r9d
  add    %rdi,%rcx
  mov    %edx,%r10d
  movzbl %bl,%ebx
  movzbl %r9b,%r9d
  jmp    L122
  nopl   (%rax)
L33:
  movzbl 0x2(%rax),%r11d
  mov    %r9d,%r8d
  sub    %r11d,%r8d
  mov    %r11d,%edx
  imul   %esi,%r8d
  mov    %r8d,%r11d
  shr    $0x8,%r11d
  lea    0x80(%r8,%r11,1),%r8d
  movzbl 0x1(%rax),%r11d
  shr    $0x8,%r8d
  add    %r8d,%edx
  mov    %r10d,%r8d
  sub    %r11d,%r8d
  mov    %dl,0x2(%rax)
  mov    %r11d,%edx
  imul   %esi,%r8d
  mov    %r8d,%r11d
  shr    $0x8,%r11d
  lea    0x80(%r8,%r11,1),%r8d
  movzbl (%rax),%r11d
  shr    $0x8,%r8d
  add    %r8d,%edx
  mov    %ebx,%r8d
  sub    %r11d,%r8d
  mov    %dl,0x1(%rax)
  mov    %r11d,%edx
  imul   %esi,%r8d
  mov    %r8d,%r11d
  shr    $0x8,%r11d
  lea    0x80(%r8,%r11,1),%r8d
  shr    $0x8,%r8d
  add    %r8d,%edx
  mov    %dl,(%rax)
L128:
  add    $0x1,%rdi
  add    $0x4,%rax
  cmp    %rcx,%rdi
  je     L69
L122:
  movzbl (%rdi),%edx
  test   %dl,%dl
  je     L128
  cmp    $0xff,%dl
  je     L33
  imul   %esi,%edx
  movzbl 0x2(%rax),%ebp
  mov    %ebp,%r8d
  sub    $0xffffff80,%edx
  mov    %edx,%r11d
  shr    $0x8,%r11d
  add    %r11d,%edx
  mov    %r9d,%r11d
  shr    $0x8,%edx
  sub    %ebp,%r11d
  imul   %edx,%r11d
  mov    %r11d,%ebp
  shr    $0x8,%ebp
  lea    0x80(%r11,%rbp,1),%r11d
  movzbl 0x1(%rax),%ebp
  shr    $0x8,%r11d
  add    %r11d,%r8d
  mov    %r10d,%r11d
  sub    %ebp,%r11d
  mov    %r8b,0x2(%rax)
  mov    %ebp,%r8d
  imul   %edx,%r11d
  mov    %r11d,%ebp
  shr    $0x8,%ebp
  lea    0x80(%r11,%rbp,1),%r11d
  movzbl (%rax),%ebp
  shr    $0x8,%r11d
  add    %r11d,%r8d
  mov    %ebx,%r11d
  sub    %ebp,%r11d
  mov    %r8b,0x1(%rax)
  mov    %ebp,%r8d
  imul   %r11d,%edx
  mov    %edx,%r11d
  shr    $0x8,%r11d
  lea    0x80(%rdx,%r11,1),%edx
  shr    $0x8,%edx
  add    %edx,%r8d
  mov    %r8b,(%rax)
  jmp    L128
```

assistant: ```c
void __imlib_BlendShapedSpanToRGB(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 *)(dst))[2])) * (((unsigned char *)(&color))[3]);
        ((unsigned char *)(dst))[2] = (((unsigned char *)(dst))[2]) + ((tmp + (tmp >> 8) + 0x80) >> 8);
        ;
        tmp = ((((unsigned char *)(&color))[1]) - (((unsigned char *)(dst))[1])) * (((unsigned char *)(&color))[3]);
        ((unsigned char *)(dst))[1] = (((unsigned char *)(dst))[1]) + ((tmp + (tmp >> 8) + 0x80) >> 8);
        ;
        tmp = ((((unsigned char *)(&color))[0]) - (((unsigned char *)(dst))[0])) * (((unsigned char *)(&color))[3]);
        ((unsigned char *)(dst))[0] = (((unsigned char *)(dst))[0]) + ((tmp + (tmp >> 8) + 0x80) >> 8);
        ;
        ;
        break;
      }
      default: {
        do {
          tmp = ((*src) * (((unsigned char *)(&color))[3])) + 0x80;
          a = (tmp + (tmp >> 8)) >> 8;
        } while (0);
        tmp = ((((unsigned char *)(&color))[2]) - (((unsigned char *)(dst))[2])) * (a);
        ((unsigned char *)(dst))[2] = (((unsigned char *)(dst))[2]) + ((tmp + (tmp >> 8) + 0x80) >> 8);
        ;
        tmp = ((((unsigned char *)(&color))[1]) - (((unsigned char *)(dst))[1])) * (a);
        ((unsigned char *)(dst))[1] = (((unsigned char *)(dst))[1]) + ((tmp + (tmp >> 8) + 0x80) >> 8);
        ;
        tmp = ((((unsigned char *)(&color))[0]) - (((unsigned char *)(dst))[0])) * (a);
        ((unsigned char *)(dst))[0] = (((unsigned char *)(dst))[0]) + ((tmp + (tmp >> 8) + 0x80) >> 8);
        ;
        ;
        break;
      }
      }
      src++;
      dst++;
    }
    return;
  }
  while (len--) {
    unsigned int tmp;
    switch (*src) {
    case 0:
      break;
    case 255: {
      *dst = (*dst & 0xff000000) | (color & 0x00ffffff);
      break;
    }
    default: {
      tmp = ((((unsigned char *)(&color))[2]) - (((unsigned char *)(dst))[2])) * (*src);
      ((unsigned char *)(dst))[2] = (((unsigned char *)(dst))[2]) + ((tmp + (tmp >> 8) + 0x80) >> 8);
      ;
      tmp = ((((unsigned char *)(&color))[1]) - (((unsigned char *)(dst))[1])) * (*src);
      ((unsigned char *)(dst))[1] = (((unsigned char *)(dst))[1]) + ((tmp + (tmp >> 8) + 0x80) >> 8);
      ;
      tmp = ((((unsigned char *)(&color))[0]) - (((unsigned char *)(dst))[0])) * (*src);
      ((unsigned char *)(dst))[0] = (((unsigned char *)(dst))[0]) + ((tmp + (tmp >> 8) + 0x80) >> 8);
      ;
      ;
      break;
    }
    }
    src++;
    dst++;
  }
}
```