user: 下面的汇编指令对应的C源代码是什么：

```asm
<wcsnrtombs>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  mov    %rdx,%r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x148,%rsp
  mov    (%rsi),%rbp
  mov    %rdi,0x10(%rsp)
  mov    %rsi,0x18(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x138(%rsp)
  xor    %eax,%eax
  mov    %rbp,0x28(%rsp)
  test   %rdi,%rdi
  je     L70
  test   %rcx,%rcx
  mov    %rcx,%r14
  mov    %rdi,%r15
  setne  %al
L10:
  test   %rbp,%rbp
  setne  %dl
  xor    %r12d,%r12d
  and    %al,%dl
  mov    %dl,0xf(%rsp)
  je     L22
  cmp    %r14,%r13
  jae    L82
  cmp    $0x20,%r13
  jbe    L60
L82:
  lea    0x30(%rsp),%rax
  lea    0x28(%rsp),%rbx
  mov    %rax,(%rsp)
  jmp    L32
  cs nopw 0x0(%rax,%rax,1)
L61:
  mov    %rdx,%rax
  sub    %rbp,%rax
  sar    $0x2,%rax
  sub    %rax,%r13
  test   %r14,%r14
  je     L81
  cmp    $0x20,%r13
  ja     L64
  cmp    %r13,%r14
  ja     L60
L64:
  mov    %rdx,%rbp
L32:
  cmp    %r14,%r13
  mov    %r14,%rdx
  mov    %rbx,%rsi
  mov    %r15,%rdi
  cmovbe %r13,%rdx
  xor    %ecx,%ecx
  call   <wcsrtombs@plt>
  cmp    $0xffffffffffffffff,%rax
  je     L168
  cmp    (%rsp),%r15
  je     L207
  add    %rax,%r15
  sub    %rax,%r14
L207:
  mov    0x28(%rsp),%rdx
  add    %rax,%r12
  test   %rdx,%rdx
  jne    L61
L19:
  cmpq   $0x0,0x10(%rsp)
  je     L194
  mov    0x28(%rsp),%rax
  mov    0x18(%rsp),%rbx
  mov    %rax,(%rbx)
L194:
  mov    0x138(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L179
  add    $0x148,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L22:
  test   %rbp,%rbp
  je     L19
L81:
  test   %r14,%r14
  setne  0xf(%rsp)
L60:
  test   %r13,%r13
  je     L19
  cmpb   $0x0,0xf(%rsp)
  je     L19
  mov    0x28(%rsp),%rcx
  jmp    L2
  nopl   0x0(%rax,%rax,1)
L182:
  mov    0x28(%rsp),%rbx
  sub    $0x1,%r13
  add    %rax,%r15
  add    %rax,%r12
  lea    0x4(%rbx),%rcx
  mov    %rcx,0x28(%rsp)
  sub    %rax,%r14
  je     L19
  test   %r13,%r13
  je     L19
L2:
  mov    (%rcx),%esi
  xor    %edx,%edx
  mov    %r15,%rdi
  call   <wcrtomb@plt>
  lea    0x1(%rax),%rdx
  cmp    $0x1,%rdx
  ja     L182
  test   %rax,%rax
  jne    L168
  movq   $0x0,0x28(%rsp)
  jmp    L19
  nopl   0x0(%rax,%rax,1)
L168:
  mov    $0xffffffffffffffff,%r12
  jmp    L19
  nopl   0x0(%rax)
L70:
  mov    $0x1,%eax
  lea    0x30(%rsp),%r15
  mov    $0x100,%r14d
  jmp    L10
L179:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
size_t wcsnrtombs(char *restrict dst, const wchar_t **restrict wcs, size_t wn, size_t n, mbstate_t *restrict st) {
  size_t l, cnt = 0, n2;
  char *s, buf[256];
  const wchar_t *ws = *wcs;
  const wchar_t *tmp_ws;
  if (!dst)
    s = buf, n = sizeof buf;
  else
    s = dst;
  while (ws && n && ((n2 = wn) >= n || n2 > 32)) {
    if (n2 >= n)
      n2 = n;
    tmp_ws = ws;
    l = wcsrtombs(s, &ws, n2, 0);
    if (!(l + 1)) {
      cnt = l;
      n = 0;
      break;
    }
    if (s != buf) {
      s += l;
      n -= l;
    }
    wn = ws ? wn - (ws - tmp_ws) : 0;
    cnt += l;
  }
  if (ws)
    while (n && wn) {
      l = wcrtomb(s, *ws, 0);
      if ((l + 1) <= 1) {
        if (!l)
          ws = 0;
        else
          cnt = l;
        break;
      }
      ws++;
      wn--;
      s += l;
      n -= l;
      cnt += l;
    }
  if (dst)
    *wcs = ws;
  return cnt;
}
```