user: 这段汇编代码用C语言表示是什么样的？

```asm
<wcsrtombs>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    %rdx,-0x48(%rbp)
  mov    %rcx,-0x50(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x48(%rbp),%rax
  mov    %rax,-0x20(%rbp)
  cmpq   $0x0,-0x38(%rbp)
  jne    L22
  movq   $0x0,-0x48(%rbp)
  mov    -0x40(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,-0x28(%rbp)
  jmp    L144
L67:
  mov    -0x28(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0x7f,%eax
  jbe    L86
  mov    -0x28(%rbp),%rax
  mov    (%rax),%ecx
  lea    -0xc(%rbp),%rax
  mov    $0x0,%edx
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <wcrtomb@plt>
  mov    %rax,-0x18(%rbp)
  cmpq   $0xffffffffffffffff,-0x18(%rbp)
  jne    L90
  mov    $0xffffffffffffffff,%rax
  jmp    L221
L90:
  mov    -0x18(%rbp),%rax
  add    %rax,-0x48(%rbp)
  jmp    L55
L86:
  addq   $0x1,-0x48(%rbp)
L55:
  addq   $0x4,-0x28(%rbp)
L144:
  mov    -0x28(%rbp),%rax
  mov    (%rax),%eax
  test   %eax,%eax
  jne    L67
  mov    -0x48(%rbp),%rax
  jmp    L221
L180:
  mov    -0x40(%rbp),%rax
  mov    (%rax),%rax
  mov    (%rax),%eax
  cmp    $0x7f,%eax
  jbe    L226
  mov    -0x40(%rbp),%rax
  mov    (%rax),%rax
  mov    (%rax),%ecx
  mov    -0x38(%rbp),%rax
  mov    $0x0,%edx
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <wcrtomb@plt>
  mov    %rax,-0x18(%rbp)
  cmpq   $0xffffffffffffffff,-0x18(%rbp)
  jne    L201
  mov    $0xffffffffffffffff,%rax
  jmp    L221
L201:
  mov    -0x18(%rbp),%rax
  add    %rax,-0x38(%rbp)
  mov    -0x18(%rbp),%rax
  sub    %rax,-0x48(%rbp)
  jmp    L209
L226:
  mov    -0x40(%rbp),%rax
  mov    (%rax),%rax
  mov    (%rax),%ecx
  mov    -0x38(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x38(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  subq   $0x1,-0x48(%rbp)
L209:
  mov    -0x40(%rbp),%rax
  mov    (%rax),%rax
  lea    0x4(%rax),%rdx
  mov    -0x40(%rbp),%rax
  mov    %rdx,(%rax)
L22:
  cmpq   $0x3,-0x48(%rbp)
  jbe    L135
  mov    -0x40(%rbp),%rax
  mov    (%rax),%rax
  mov    (%rax),%eax
  test   %eax,%eax
  jne    L180
  jmp    L135
L78:
  mov    -0x40(%rbp),%rax
  mov    (%rax),%rax
  mov    (%rax),%eax
  cmp    $0x7f,%eax
  jbe    L192
  mov    -0x40(%rbp),%rax
  mov    (%rax),%rax
  mov    (%rax),%ecx
  lea    -0xc(%rbp),%rax
  mov    $0x0,%edx
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <wcrtomb@plt>
  mov    %rax,-0x18(%rbp)
  cmpq   $0xffffffffffffffff,-0x18(%rbp)
  jne    L97
  mov    $0xffffffffffffffff,%rax
  jmp    L221
L97:
  mov    -0x18(%rbp),%rax
  cmp    -0x48(%rbp),%rax
  jbe    L179
  mov    -0x20(%rbp),%rax
  sub    -0x48(%rbp),%rax
  jmp    L221
L179:
  mov    -0x40(%rbp),%rax
  mov    (%rax),%rax
  mov    (%rax),%ecx
  mov    -0x38(%rbp),%rax
  mov    $0x0,%edx
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <wcrtomb@plt>
  mov    -0x18(%rbp),%rax
  add    %rax,-0x38(%rbp)
  mov    -0x18(%rbp),%rax
  sub    %rax,-0x48(%rbp)
  jmp    L3
L192:
  mov    -0x40(%rbp),%rax
  mov    (%rax),%rax
  mov    (%rax),%ecx
  mov    -0x38(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x38(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  subq   $0x1,-0x48(%rbp)
L3:
  mov    -0x40(%rbp),%rax
  mov    (%rax),%rax
  lea    0x4(%rax),%rdx
  mov    -0x40(%rbp),%rax
  mov    %rdx,(%rax)
L135:
  cmpq   $0x0,-0x48(%rbp)
  je     L31
  mov    -0x40(%rbp),%rax
  mov    (%rax),%rax
  mov    (%rax),%eax
  test   %eax,%eax
  jne    L78
L31:
  cmpq   $0x0,-0x48(%rbp)
  je     L238
  mov    -0x38(%rbp),%rax
  movb   $0x0,(%rax)
L238:
  mov    -0x40(%rbp),%rax
  movq   $0x0,(%rax)
  mov    -0x20(%rbp),%rax
  sub    -0x48(%rbp),%rax
L221:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L80
  call   <__stack_chk_fail@plt>
L80:
  leave
  ret
```

assistant: ```c
size_t wcsrtombs(char *restrict s, const wchar_t **restrict ws, size_t n, mbstate_t *restrict st) {
  const wchar_t *ws2;
  char buf[4];
  size_t N = n, l;
  if (!s) {
    for (n = 0, ws2 = *ws; *ws2; ws2++) {
      if (*ws2 >= 0x80u) {
        l = wcrtomb(buf, *ws2, 0);
        if (!(l + 1))
          return -1;
        n += l;
      } else
        n++;
    }
    return n;
  }
  while (n >= 4 && **ws) {
    if (**ws >= 0x80u) {
      l = wcrtomb(s, **ws, 0);
      if (!(l + 1))
        return -1;
      s += l;
      n -= l;
    } else {
      *s++ = **ws;
      n--;
    }
    (*ws)++;
  }
  while (n && **ws) {
    if (**ws >= 0x80u) {
      l = wcrtomb(buf, **ws, 0);
      if (!(l + 1))
        return -1;
      if (l > n)
        return N - n;
      wcrtomb(s, **ws, 0);
      s += l;
      n -= l;
    } else {
      *s++ = **ws;
      n--;
    }
    (*ws)++;
  }
  if (n)
    *s = 0;
  *ws = 0;
  return N - n;
}
```