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

```asm
<swap>:
  endbr64
  mov    %esi,%edx
  mov    %esi,%r9d
  mov    %rdi,%rax
  shr    $0x1f,%edx
  add    %esi,%edx
  sar    %edx
  and    $0x1,%r9d
  je     L135
  cmp    $0x1,%esi
  jle    L113
  lea    0x1(%rsi),%r9d
  lea    0x10(%rax),%rcx
  sar    %r9d
  movslq %r9d,%r8
  lea    (%rdi,%r8,1),%rdi
  cmp    %rcx,%rdi
  jb     L273
  cmp    $0xf,%esi
  jle    L273
  cmp    $0x1f,%esi
  jle    L39
  mov    %edx,%r10d
  xor    %ecx,%ecx
  shr    $0x4,%r10d
  shl    $0x4,%r10
L172:
  movdqu (%rax,%rcx,1),%xmm0
  movdqu (%rdi,%rcx,1),%xmm2
  movups %xmm2,(%rax,%rcx,1)
  movups %xmm0,(%rdi,%rcx,1)
  add    $0x10,%rcx
  cmp    %r10,%rcx
  jne    L172
  mov    %edx,%ecx
  and    $0xfffffff0,%ecx
  mov    %ecx,%edi
  cmp    %ecx,%edx
  je     L113
L301:
  mov    %edx,%r10d
  sub    %ecx,%r10d
  lea    -0x1(%r10),%r11d
  cmp    $0x6,%r11d
  jbe    L33
  lea    (%rax,%rcx,1),%r11
  add    %r8,%rcx
  add    %rax,%rcx
  mov    (%r11),%r8
  movq   (%rcx),%xmm0
  movq   %xmm0,(%r11)
  mov    %r8,(%rcx)
  mov    %r10d,%ecx
  and    $0xfffffff8,%ecx
  add    %ecx,%edi
  cmp    %ecx,%r10d
  je     L113
L33:
  lea    (%r9,%rdi,1),%ecx
  movslq %edi,%r8
  movslq %ecx,%rcx
  add    %rax,%r8
  add    %rax,%rcx
  movzbl (%r8),%r10d
  movzbl (%rcx),%r11d
  mov    %r11b,(%r8)
  mov    %r10b,(%rcx)
  lea    0x1(%rdi),%ecx
  cmp    %ecx,%edx
  jle    L113
  movslq %ecx,%r8
  add    %r9d,%ecx
  movslq %ecx,%rcx
  add    %rax,%r8
  add    %rax,%rcx
  movzbl (%r8),%r10d
  movzbl (%rcx),%r11d
  mov    %r11b,(%r8)
  mov    %r10b,(%rcx)
  lea    0x2(%rdi),%ecx
  cmp    %ecx,%edx
  jle    L113
  movslq %ecx,%r8
  add    %r9d,%ecx
  movslq %ecx,%rcx
  add    %rax,%r8
  add    %rax,%rcx
  movzbl (%r8),%r10d
  movzbl (%rcx),%r11d
  mov    %r11b,(%r8)
  mov    %r10b,(%rcx)
  lea    0x3(%rdi),%ecx
  cmp    %ecx,%edx
  jle    L113
  movslq %ecx,%r8
  add    %r9d,%ecx
  movslq %ecx,%rcx
  add    %rax,%r8
  add    %rax,%rcx
  movzbl (%r8),%r10d
  movzbl (%rcx),%r11d
  mov    %r11b,(%r8)
  mov    %r10b,(%rcx)
  lea    0x4(%rdi),%ecx
  cmp    %ecx,%edx
  jle    L113
  movslq %ecx,%r8
  add    %r9d,%ecx
  movslq %ecx,%rcx
  add    %rax,%r8
  add    %rax,%rcx
  movzbl (%r8),%r10d
  movzbl (%rcx),%r11d
  mov    %r11b,(%r8)
  mov    %r10b,(%rcx)
  lea    0x5(%rdi),%ecx
  cmp    %ecx,%edx
  jle    L113
  movslq %ecx,%r8
  add    %r9d,%ecx
  add    $0x6,%edi
  movslq %ecx,%rcx
  add    %rax,%r8
  add    %rax,%rcx
  movzbl (%r8),%r10d
  movzbl (%rcx),%r11d
  mov    %r11b,(%r8)
  mov    %r10b,(%rcx)
  cmp    %edi,%edx
  jle    L113
  lea    (%r9,%rdi,1),%edx
  movslq %edi,%rcx
  movslq %edx,%rdx
  add    %rax,%rcx
  add    %rax,%rdx
  movzbl (%rcx),%r8d
  movzbl (%rdx),%edi
  mov    %dil,(%rcx)
  mov    %r8b,(%rdx)
L113:
  movslq %esi,%rsi
  movb   $0x0,(%rax,%rsi,1)
  ret
  xchg   %ax,%ax
L135:
  cmp    $0x1,%esi
  jle    L113
  movslq %edx,%r8
  lea    0x10(%rax),%rcx
  lea    (%rdi,%r8,1),%rdi
  lea    0x10(%r8),%r10
  cmp    %rcx,%rdi
  setae  %cl
  test   %r10,%r10
  setle  %r10b
  or     %r10b,%cl
  je     L51
  cmp    $0xf,%esi
  jle    L51
  cmp    $0x1f,%esi
  jle    L226
  mov    %edx,%r9d
  xor    %ecx,%ecx
  shr    $0x4,%r9d
  shl    $0x4,%r9
  nopl   0x0(%rax)
L141:
  movdqu (%rax,%rcx,1),%xmm0
  movdqu (%rdi,%rcx,1),%xmm1
  movups %xmm1,(%rax,%rcx,1)
  movups %xmm0,(%rdi,%rcx,1)
  add    $0x10,%rcx
  cmp    %r9,%rcx
  jne    L141
  mov    %edx,%r9d
  and    $0xfffffff0,%r9d
  mov    %r9d,%ecx
  cmp    %r9d,%edx
  je     L113
L203:
  mov    %edx,%edi
  sub    %r9d,%edi
  lea    -0x1(%rdi),%r10d
  cmp    $0x6,%r10d
  jbe    L313
  mov    %r9d,%r9d
  add    %r9,%r8
  lea    (%rax,%r9,1),%r10
  add    %rax,%r8
  mov    (%r10),%r9
  mov    (%r8),%r11
  mov    %r11,(%r10)
  mov    %r9,(%r8)
  mov    %edi,%r8d
  and    $0xfffffff8,%r8d
  add    %r8d,%ecx
  cmp    %r8d,%edi
  je     L113
L313:
  lea    (%rdx,%rcx,1),%edi
  movslq %ecx,%r8
  movslq %edi,%rdi
  add    %rax,%r8
  add    %rax,%rdi
  movzbl (%r8),%r9d
  movzbl (%rdi),%r10d
  mov    %r10b,(%r8)
  mov    %r9b,(%rdi)
  lea    0x1(%rcx),%edi
  cmp    %edx,%edi
  jge    L113
  movslq %edi,%r8
  add    %edx,%edi
  movslq %edi,%rdi
  add    %rax,%r8
  add    %rax,%rdi
  movzbl (%r8),%r9d
  movzbl (%rdi),%r10d
  mov    %r10b,(%r8)
  mov    %r9b,(%rdi)
  lea    0x2(%rcx),%edi
  cmp    %edi,%edx
  jle    L113
  movslq %edi,%r8
  add    %edx,%edi
  movslq %edi,%rdi
  add    %rax,%r8
  add    %rax,%rdi
  movzbl (%r8),%r9d
  movzbl (%rdi),%r10d
  mov    %r10b,(%r8)
  mov    %r9b,(%rdi)
  lea    0x3(%rcx),%edi
  cmp    %edi,%edx
  jle    L113
  movslq %edi,%r8
  add    %edx,%edi
  movslq %edi,%rdi
  add    %rax,%r8
  add    %rax,%rdi
  movzbl (%r8),%r9d
  movzbl (%rdi),%r10d
  mov    %r10b,(%r8)
  mov    %r9b,(%rdi)
  lea    0x4(%rcx),%edi
  cmp    %edx,%edi
  jge    L113
  movslq %edi,%r8
  add    %edx,%edi
  movslq %edi,%rdi
  add    %rax,%r8
  add    %rax,%rdi
  movzbl (%r8),%r9d
  movzbl (%rdi),%r10d
  mov    %r10b,(%r8)
  mov    %r9b,(%rdi)
  lea    0x5(%rcx),%edi
  cmp    %edi,%edx
  jle    L113
  movslq %edi,%r8
  add    %edx,%edi
  add    $0x6,%ecx
  movslq %edi,%rdi
  add    %rax,%r8
  add    %rax,%rdi
  movzbl (%r8),%r9d
  movzbl (%rdi),%r10d
  mov    %r10b,(%r8)
  mov    %r9b,(%rdi)
  cmp    %ecx,%edx
  jle    L113
  movslq %ecx,%rdi
  add    %edx,%ecx
  movslq %esi,%rsi
  movslq %ecx,%rdx
  add    %rax,%rdi
  add    %rax,%rdx
  movzbl (%rdi),%r8d
  movzbl (%rdx),%ecx
  mov    %cl,(%rdi)
  mov    %r8b,(%rdx)
  movb   $0x0,(%rax,%rsi,1)
  ret
  cs nopw 0x0(%rax,%rax,1)
L273:
  xor    %ecx,%ecx
  nopw   0x0(%rax,%rax,1)
L183:
  movzbl (%rax,%rcx,1),%r8d
  movzbl (%rdi,%rcx,1),%r9d
  mov    %r9b,(%rax,%rcx,1)
  mov    %r8b,(%rdi,%rcx,1)
  add    $0x1,%rcx
  cmp    %ecx,%edx
  jg     L183
  jmp    L113
  nopw   0x0(%rax,%rax,1)
L51:
  xor    %ecx,%ecx
  nopw   0x0(%rax,%rax,1)
L114:
  movzbl (%rax,%rcx,1),%r8d
  movzbl (%rdi,%rcx,1),%r9d
  mov    %r9b,(%rax,%rcx,1)
  mov    %r8b,(%rdi,%rcx,1)
  add    $0x1,%rcx
  cmp    %ecx,%edx
  jg     L114
  jmp    L113
L39:
  xor    %ecx,%ecx
  xor    %edi,%edi
  jmp    L301
L226:
  xor    %ecx,%ecx
  jmp    L203
```

assistant: ```c
void swap(char a[], int n) {
  int i;
  char tmp;
  if (!(n % 2)) {
    for (i = 0; i < n / 2; i++) {
      tmp = a[i];
      a[i] = a[n / 2 + i];
      a[n / 2 + i] = tmp;
    }
  } else {
    for (i = 0; i < n / 2; i++) {
      tmp = a[i];
      a[i] = a[(n + 1) / 2 + i];
      a[(n + 1) / 2 + i] = tmp;
    }
  }
  a[n] = '\0';
}
```