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

```asm
<arikkei_utf8_ucs2_strcpy>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  movl   $0x0,-0x4(%rbp)
  jmp    L103
L138:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  js     L76
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%ecx
  mov    -0x4(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x4(%rbp)
  mov    %eax,%eax
  lea    (%rax,%rax,1),%rdx
  mov    -0x20(%rbp),%rax
  add    %rax,%rdx
  movzbl %cl,%eax
  mov    %ax,(%rdx)
  addq   $0x1,-0x18(%rbp)
  jmp    L103
L76:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  and    $0xe0,%eax
  cmp    $0xc0,%eax
  jne    L54
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x6,%eax
  and    $0x7c0,%ax
  mov    %eax,%edx
  mov    -0x18(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  and    $0x3f,%eax
  mov    %edx,%ecx
  or     %eax,%ecx
  mov    -0x4(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x4(%rbp)
  mov    %eax,%eax
  lea    (%rax,%rax,1),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    %ecx,%edx
  mov    %dx,(%rax)
  addq   $0x2,-0x18(%rbp)
  jmp    L103
L54:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  and    $0xf0,%eax
  cmp    $0xe0,%eax
  jne    L84
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0xc,%eax
  mov    %eax,%edx
  mov    -0x18(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x6,%eax
  and    $0xfc0,%ax
  or     %eax,%edx
  mov    -0x18(%rbp),%rax
  add    $0x2,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  and    $0x3f,%eax
  mov    %edx,%ecx
  or     %eax,%ecx
  mov    -0x4(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x4(%rbp)
  mov    %eax,%eax
  lea    (%rax,%rax,1),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    %ecx,%edx
  mov    %dx,(%rax)
  addq   $0x3,-0x18(%rbp)
  jmp    L103
L84:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  and    $0xf8,%eax
  cmp    $0xf0,%eax
  jne    L132
  mov    -0x18(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0xc,%eax
  and    $0xf000,%ax
  mov    %eax,%edx
  mov    -0x18(%rbp),%rax
  add    $0x2,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x6,%eax
  and    $0xfc0,%ax
  or     %eax,%edx
  mov    -0x18(%rbp),%rax
  add    $0x3,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  and    $0x3f,%eax
  mov    %edx,%ecx
  or     %eax,%ecx
  mov    -0x4(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x4(%rbp)
  mov    %eax,%eax
  lea    (%rax,%rax,1),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    %ecx,%edx
  mov    %dx,(%rax)
  addq   $0x4,-0x18(%rbp)
  jmp    L103
L132:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  and    $0xfc,%eax
  cmp    $0xf8,%eax
  jne    L11
  mov    -0x18(%rbp),%rax
  add    $0x2,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0xc,%eax
  and    $0xf000,%ax
  mov    %eax,%edx
  mov    -0x18(%rbp),%rax
  add    $0x3,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x6,%eax
  and    $0xfc0,%ax
  or     %eax,%edx
  mov    -0x18(%rbp),%rax
  add    $0x4,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  and    $0x3f,%eax
  mov    %edx,%ecx
  or     %eax,%ecx
  mov    -0x4(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x4(%rbp)
  mov    %eax,%eax
  lea    (%rax,%rax,1),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    %ecx,%edx
  mov    %dx,(%rax)
  addq   $0x5,-0x18(%rbp)
  jmp    L103
L11:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  and    $0xfe,%eax
  cmp    $0xfc,%eax
  jne    L40
  mov    -0x18(%rbp),%rax
  add    $0x3,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0xc,%eax
  and    $0xf000,%ax
  mov    %eax,%edx
  mov    -0x18(%rbp),%rax
  add    $0x4,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x6,%eax
  and    $0xfc0,%ax
  or     %eax,%edx
  mov    -0x18(%rbp),%rax
  add    $0x5,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  and    $0x3f,%eax
  mov    %edx,%ecx
  or     %eax,%ecx
  mov    -0x4(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x4(%rbp)
  mov    %eax,%eax
  lea    (%rax,%rax,1),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    %ecx,%edx
  mov    %dx,(%rax)
  addq   $0x6,-0x18(%rbp)
L103:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L138
  jmp    L133
L40:
  nop
L133:
  mov    -0x4(%rbp),%eax
  lea    (%rax,%rax,1),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movw   $0x0,(%rax)
  mov    -0x4(%rbp),%eax
  pop    %rbp
  ret
```

assistant: ```c
unsigned int arikkei_utf8_ucs2_strcpy(const unsigned char *s, unsigned short *d) {
  unsigned int dp;
  dp = 0;
  while (*s) {
    if ((*s & 0x80) == 0x0) {
      d[dp++] = s[0];
      s += 1;
    } else if ((*s & 0xe0) == 0xc0) {
      d[dp++] = ((s[0] & 0x1f) << 6) | (s[1] & 0x3f);
      s += 2;
    } else if ((*s & 0xf0) == 0xe0) {
      d[dp++] = ((s[0] & 0x0f) << 12) | ((s[1] & 0x3f) << 6) | (s[2] & 0x3f);
      s += 3;
    } else if ((*s & 0xf8) == 0xf0) {
      d[dp++] = ((s[0] & 0x07) << 18) | ((s[1] & 0x3f) << 12) | ((s[2] & 0x3f) << 6) | (s[3] & 0x3f);
      s += 4;
    } else if ((*s & 0xfc) == 0xf8) {
      d[dp++] = ((s[0] & 0x03) << 24) | ((s[1] & 0x3f) << 18) | ((s[2] & 0x3f) << 12) | ((s[3] & 0x3f) << 6) | (s[4] & 0x3f);
      s += 5;
    } else if ((*s & 0xfe) == 0xfc) {
      d[dp++] = ((s[0] & 0x01) << 30) | ((s[1] & 0x3f) << 24) | ((s[2] & 0x3f) << 18) | ((s[3] & 0x3f) << 12) | ((s[4] & 0x3f) << 6) | (s[5] & 0x3f);
      s += 6;
    } else {
      break;
    }
  }
  d[dp] = 0;
  return dp;
}
```