user: What would the C source look like for the assembly code provided here:

```asm
<swapfunc>:
  endbr64
  mov    %rdi,%rax
  mov    %rdx,%rdi
  cmp    $0x1,%ecx
  jle    L67
  lea    -0x1(%rdx),%rcx
  lea    0xf(%rax),%rdx
  sub    %rsi,%rdx
  cmp    $0x1e,%rdx
  jbe    L168
  cmp    $0x6,%rcx
  jbe    L168
  cmp    $0xe,%rcx
  jbe    L68
  lea    -0x10(%rdi),%r8
  xor    %edx,%edx
  xor    %ecx,%ecx
  shr    $0x4,%r8
  add    $0x1,%r8
  nopl   0x0(%rax)
L129:
  movdqu (%rax,%rdx,1),%xmm0
  movdqu (%rsi,%rdx,1),%xmm1
  add    $0x1,%rcx
  movups %xmm1,(%rax,%rdx,1)
  movups %xmm0,(%rsi,%rdx,1)
  add    $0x10,%rdx
  cmp    %r8,%rcx
  jb     L129
  shl    $0x4,%r8
  mov    %rdi,%r9
  add    %r8,%rax
  add    %r8,%rsi
  sub    %r8,%r9
  mov    %rax,%rcx
  mov    %rsi,%rdx
  cmp    %r8,%rdi
  je     L155
  lea    -0x1(%r9),%r8
  mov    %r9,%rdi
  cmp    $0x6,%r8
  jbe    L30
L150:
  mov    (%rsi),%r10
  mov    (%rax),%r8
  mov    %r10,(%rax)
  mov    %rdi,%rax
  and    $0xfffffffffffffff8,%rax
  mov    %r8,(%rsi)
  sub    %rax,%r9
  add    %rax,%rcx
  add    %rax,%rdx
  cmp    %rax,%rdi
  je     L155
  lea    -0x1(%r9),%r8
L30:
  movzbl (%rcx),%eax
  movzbl (%rdx),%esi
  mov    %sil,(%rcx)
  mov    %al,(%rdx)
  test   %r8,%r8
  je     L155
  movzbl 0x1(%rcx),%eax
  movzbl 0x1(%rdx),%esi
  mov    %sil,0x1(%rcx)
  mov    %al,0x1(%rdx)
  cmp    $0x2,%r9
  je     L155
  movzbl 0x2(%rcx),%eax
  movzbl 0x2(%rdx),%esi
  mov    %sil,0x2(%rcx)
  mov    %al,0x2(%rdx)
  cmp    $0x3,%r9
  je     L155
  movzbl 0x3(%rcx),%eax
  movzbl 0x3(%rdx),%esi
  mov    %sil,0x3(%rcx)
  mov    %al,0x3(%rdx)
  cmp    $0x4,%r9
  je     L155
  movzbl 0x4(%rcx),%eax
  movzbl 0x4(%rdx),%esi
  mov    %sil,0x4(%rcx)
  mov    %al,0x4(%rdx)
  cmp    $0x5,%r9
  je     L155
  movzbl 0x5(%rcx),%eax
  movzbl 0x5(%rdx),%esi
  mov    %sil,0x5(%rcx)
  mov    %al,0x5(%rdx)
  cmp    $0x6,%r9
  je     L155
  movzbl 0x6(%rcx),%eax
  movzbl 0x6(%rdx),%esi
  mov    %sil,0x6(%rcx)
  mov    %al,0x6(%rdx)
  ret
  nopl   (%rax)
L168:
  add    %rax,%rdi
  nopl   0x0(%rax,%rax,1)
L142:
  movzbl (%rax),%edx
  movzbl (%rsi),%ecx
  add    $0x1,%rax
  add    $0x1,%rsi
  mov    %cl,-0x1(%rax)
  mov    %dl,-0x1(%rsi)
  cmp    %rdi,%rax
  jne    L142
L155:
  ret
  nopw   0x0(%rax,%rax,1)
L67:
  test   $0x7,%dil
  lea    -0x8(%rdx),%rdx
  sete   %r8b
  cmp    $0x8,%rdx
  seta   %cl
  test   %cl,%r8b
  je     L85
  lea    0xf(%rax),%rcx
  sub    %rsi,%rcx
  cmp    $0x1e,%rcx
  jbe    L85
  shr    $0x3,%rdx
  xor    %ecx,%ecx
  lea    0x1(%rdx),%rdi
  xor    %edx,%edx
  mov    %rdi,%r8
  shr    %r8
  nopw   0x0(%rax,%rax,1)
L50:
  movdqu (%rax,%rdx,1),%xmm0
  movdqu (%rsi,%rdx,1),%xmm2
  add    $0x1,%rcx
  movups %xmm2,(%rax,%rdx,1)
  movups %xmm0,(%rsi,%rdx,1)
  add    $0x10,%rdx
  cmp    %rcx,%r8
  ja     L50
  mov    %rdi,%rcx
  and    $0xfffffffffffffffe,%rcx
  lea    0x0(,%rcx,8),%rdx
  add    %rdx,%rax
  add    %rsi,%rdx
  cmp    %rcx,%rdi
  je     L155
  mov    (%rax),%rcx
  mov    (%rdx),%rsi
  mov    %rsi,(%rax)
  mov    %rcx,(%rdx)
  ret
  cs nopw 0x0(%rax,%rax,1)
L85:
  add    %rax,%rdi
  nopl   0x0(%rax,%rax,1)
L63:
  mov    (%rax),%rdx
  mov    (%rsi),%rcx
  add    $0x8,%rax
  add    $0x8,%rsi
  mov    %rcx,-0x8(%rax)
  mov    %rdx,-0x8(%rsi)
  cmp    %rdi,%rax
  jne    L63
  ret
L68:
  mov    %rsi,%rdx
  mov    %rax,%rcx
  mov    %rdi,%r9
  jmp    L150
```

assistant: ```c
void swapfunc(char *a, char *b, size_t n, int swaptype) {
  if (swaptype <= 1) {
    register long *pi = (long *)(a);
    register long *pj = (long *)(b);
    do {
      register long t = *pi;
      *pi++ = *pj;
      *pj++ = t;
    } while ((n -= sizeof(long)) > 0);
  } else {
    register char *pi = (char *)(a);
    register char *pj = (char *)(b);
    do {
      register char t = *pi;
      *pi++ = *pj;
      *pj++ = t;
    } while ((n -= sizeof(char)) > 0);
  }
}
```