user: 请从给定的汇编指令推导出C源代码：

```asm
<wnn_Strncpy>:
  endbr64
  mov    %rsi,%rax
  movslq %edx,%rcx
  cmp    %rdi,%rsi
  jbe    L31
  lea    -0x1(%rcx),%esi
  test   %ecx,%ecx
  jle    L238
  lea    0x2(%rax),%r8
  mov    %rdi,%rdx
  mov    %esi,%r9d
  sub    %r8,%rdx
  cmp    $0xc,%rdx
  jbe    L48
  cmp    $0x2,%esi
  jbe    L48
  cmp    $0x6,%esi
  jbe    L73
  mov    %ecx,%r8d
  xor    %edx,%edx
  shr    $0x3,%r8d
  shl    $0x4,%r8
  nopl   0x0(%rax)
L136:
  movdqu (%rax,%rdx,1),%xmm0
  movups %xmm0,(%rdi,%rdx,1)
  add    $0x10,%rdx
  cmp    %r8,%rdx
  jne    L136
  mov    %ecx,%edx
  and    $0xfffffff8,%edx
  mov    %edx,%r8d
  sub    %edx,%esi
  add    %r8,%r8
  lea    (%rdi,%r8,1),%r10
  add    %rax,%r8
  cmp    %edx,%ecx
  je     L229
L146:
  sub    %edx,%ecx
  lea    -0x1(%rcx),%r11d
  cmp    $0x2,%r11d
  jbe    L235
  mov    (%rax,%rdx,2),%rax
  mov    %rax,(%rdi,%rdx,2)
  mov    %ecx,%edx
  and    $0xfffffffc,%edx
  mov    %edx,%eax
  sub    %edx,%esi
  add    %rax,%rax
  add    %rax,%r10
  add    %rax,%r8
  cmp    %edx,%ecx
  je     L229
L235:
  movzwl (%r8),%eax
  mov    %ax,(%r10)
  test   %esi,%esi
  jle    L229
  movzwl 0x2(%r8),%eax
  mov    %ax,0x2(%r10)
  cmp    $0x1,%esi
  jle    L229
  movzwl 0x4(%r8),%eax
  mov    %ax,0x4(%r10)
L229:
  mov    %r9d,%r9d
  lea    0x2(%rdi,%r9,2),%r8
L224:
  mov    %r8,%rax
  ret
  nopl   (%rax)
L31:
  mov    %rdi,%r8
  jae    L224
  movslq %ecx,%rdx
  lea    -0x1(%rcx),%r9d
  lea    (%rdx,%rdx,1),%rsi
  lea    -0x2(%rsi),%r10
  add    %r10,%r8
  add    %rax,%r10
  test   %ecx,%ecx
  jle    L224
  push   %rbx
  mov    %r8,%r11
  lea    -0x4(%rax,%rsi,1),%rbx
  sub    %rbx,%r11
  add    $0x4,%r11
  cmp    $0x4,%r11
  jbe    L110
  cmp    $0x2,%r9d
  jbe    L110
  sub    $0x8,%rsi
  xor    %edx,%edx
  add    %rsi,%rax
  add    %rdi,%rsi
  mov    %ecx,%edi
  shr    $0x2,%edi
  neg    %rdi
  shl    $0x3,%rdi
  nopw   0x0(%rax,%rax,1)
L138:
  mov    (%rax,%rdx,1),%r11
  mov    %r11,(%rsi,%rdx,1)
  sub    $0x8,%rdx
  cmp    %rdx,%rdi
  jne    L138
  mov    %ecx,%edx
  mov    %r9d,%edi
  and    $0xfffffffc,%edx
  mov    %edx,%eax
  sub    %edx,%edi
  neg    %rax
  add    %rax,%rax
  lea    (%r8,%rax,1),%rsi
  add    %r10,%rax
  cmp    %edx,%ecx
  je     L246
  movzwl (%rax),%edx
  mov    %dx,(%rsi)
  test   %edi,%edi
  jle    L246
  movzwl -0x2(%rax),%edx
  mov    %dx,-0x2(%rsi)
  cmp    $0x1,%edi
  jle    L246
  movzwl -0x4(%rax),%eax
  mov    %ax,-0x4(%rsi)
L246:
  mov    %r9d,%r9d
  pop    %rbx
  not    %r9
  lea    (%r8,%r9,2),%r8
  mov    %r8,%rax
  ret
  nopl   0x0(%rax)
L238:
  mov    %rdi,%r8
  jmp    L224
  nopl   0x0(%rax,%rax,1)
L48:
  xor    %edx,%edx
  nopw   0x0(%rax,%rax,1)
L205:
  movzwl (%rax,%rdx,2),%esi
  mov    %si,(%rdi,%rdx,2)
  add    $0x1,%rdx
  cmp    %rcx,%rdx
  jne    L205
  jmp    L229
L110:
  neg    %rdx
  xor    %eax,%eax
  add    %rdx,%rdx
  cs nopw 0x0(%rax,%rax,1)
L132:
  movzwl (%r10,%rax,1),%ecx
  mov    %cx,(%r8,%rax,1)
  sub    $0x2,%rax
  cmp    %rax,%rdx
  jne    L132
  jmp    L246
L73:
  mov    %rax,%r8
  mov    %rdi,%r10
  xor    %edx,%edx
  jmp    L146
```

assistant: ```c
unsigned short *wnn_Strncpy(s1, s2, n)
register unsigned short *s1;
register unsigned short *s2;
register int n;
{
  if (s2 > s1) {
    for (; n-- > 0;) {
      *s1++ = *s2++;
    }
  } else if (s2 < s1) {
    s1 += n - 1;
    s2 += n - 1;
    for (; n-- > 0;) {
      *s1-- = *s2--;
    }
  }
  return s1;
}
```