user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<swab>:
  endbr64
  mov    %rsi,%rcx
  cmp    $0x1,%edx
  jle    L107
  mov    %rdi,%rax
  lea    -0x2(%rdx),%r8d
  not    %rax
  add    %rsi,%rax
  cmp    $0x1e,%rax
  jbe    L118
  cmp    $0x1d,%r8d
  jbe    L118
  mov    %r8d,%r9d
  movdqa D3(%rip),%xmm3
  xor    %eax,%eax
  shr    %r9d
  add    $0x1,%r9d
  mov    %r9d,%esi
  shr    $0x4,%esi
  shl    $0x5,%rsi
  nop
L34:
  movdqu (%rdi,%rax,1),%xmm1
  movdqu 0x10(%rdi,%rax,1),%xmm0
  movdqu 0x10(%rdi,%rax,1),%xmm2
  pand   %xmm3,%xmm0
  pand   %xmm3,%xmm1
  packuswb %xmm0,%xmm1
  movdqu (%rdi,%rax,1),%xmm0
  psrlw  $0x8,%xmm2
  psrlw  $0x8,%xmm0
  packuswb %xmm2,%xmm0
  movdqa %xmm0,%xmm2
  punpckhbw %xmm1,%xmm0
  punpcklbw %xmm1,%xmm2
  movups %xmm0,0x10(%rcx,%rax,1)
  movups %xmm2,(%rcx,%rax,1)
  add    $0x20,%rax
  cmp    %rax,%rsi
  jne    L34
  mov    %r9d,%r10d
  and    $0xfffffff0,%r10d
  lea    (%r10,%r10,1),%eax
  lea    0x1(%rax),%esi
  cmp    %r10d,%r9d
  je     L56
  movslq %esi,%rsi
  movzbl (%rdi,%rsi,1),%r10d
  movzbl -0x1(%rdi,%rsi,1),%r9d
  mov    %r10b,-0x1(%rcx,%rsi,1)
  mov    %r9b,(%rcx,%rsi,1)
  lea    0x3(%rax),%esi
  cmp    %esi,%edx
  jle    L56
  movslq %esi,%rsi
  movzbl (%rdi,%rsi,1),%r10d
  movzbl -0x1(%rdi,%rsi,1),%r9d
  mov    %r10b,-0x1(%rcx,%rsi,1)
  mov    %r9b,(%rcx,%rsi,1)
  lea    0x5(%rax),%esi
  cmp    %esi,%edx
  jle    L56
  movslq %esi,%rsi
  movzbl (%rdi,%rsi,1),%r10d
  movzbl -0x1(%rdi,%rsi,1),%r9d
  mov    %r10b,-0x1(%rcx,%rsi,1)
  mov    %r9b,(%rcx,%rsi,1)
  lea    0x7(%rax),%esi
  cmp    %esi,%edx
  jle    L56
  movslq %esi,%rsi
  movzbl (%rdi,%rsi,1),%r10d
  movzbl -0x1(%rdi,%rsi,1),%r9d
  mov    %r10b,-0x1(%rcx,%rsi,1)
  mov    %r9b,(%rcx,%rsi,1)
  lea    0x9(%rax),%esi
  cmp    %esi,%edx
  jle    L56
  movslq %esi,%rsi
  movzbl (%rdi,%rsi,1),%r10d
  movzbl -0x1(%rdi,%rsi,1),%r9d
  mov    %r10b,-0x1(%rcx,%rsi,1)
  mov    %r9b,(%rcx,%rsi,1)
  lea    0xb(%rax),%esi
  cmp    %esi,%edx
  jle    L56
  movslq %esi,%rsi
  movzbl (%rdi,%rsi,1),%r10d
  movzbl -0x1(%rdi,%rsi,1),%r9d
  mov    %r10b,-0x1(%rcx,%rsi,1)
  mov    %r9b,(%rcx,%rsi,1)
  lea    0xd(%rax),%esi
  cmp    %esi,%edx
  jle    L56
  movslq %esi,%rsi
  movzbl (%rdi,%rsi,1),%r10d
  movzbl -0x1(%rdi,%rsi,1),%r9d
  mov    %r10b,-0x1(%rcx,%rsi,1)
  mov    %r9b,(%rcx,%rsi,1)
  lea    0xf(%rax),%esi
  cmp    %esi,%edx
  jle    L56
  movslq %esi,%rsi
  movzbl (%rdi,%rsi,1),%r10d
  movzbl -0x1(%rdi,%rsi,1),%r9d
  mov    %r10b,-0x1(%rcx,%rsi,1)
  mov    %r9b,(%rcx,%rsi,1)
  lea    0x11(%rax),%esi
  cmp    %esi,%edx
  jle    L56
  movslq %esi,%rsi
  movzbl (%rdi,%rsi,1),%r10d
  movzbl -0x1(%rdi,%rsi,1),%r9d
  mov    %r10b,-0x1(%rcx,%rsi,1)
  mov    %r9b,(%rcx,%rsi,1)
  lea    0x13(%rax),%esi
  cmp    %esi,%edx
  jle    L56
  movslq %esi,%rsi
  movzbl (%rdi,%rsi,1),%r10d
  movzbl -0x1(%rdi,%rsi,1),%r9d
  mov    %r10b,-0x1(%rcx,%rsi,1)
  mov    %r9b,(%rcx,%rsi,1)
  lea    0x15(%rax),%esi
  cmp    %esi,%edx
  jle    L56
  movslq %esi,%rsi
  movzbl (%rdi,%rsi,1),%r10d
  movzbl -0x1(%rdi,%rsi,1),%r9d
  mov    %r10b,-0x1(%rcx,%rsi,1)
  mov    %r9b,(%rcx,%rsi,1)
  lea    0x17(%rax),%esi
  cmp    %esi,%edx
  jle    L56
  movslq %esi,%rsi
  movzbl (%rdi,%rsi,1),%r10d
  movzbl -0x1(%rdi,%rsi,1),%r9d
  mov    %r10b,-0x1(%rcx,%rsi,1)
  mov    %r9b,(%rcx,%rsi,1)
  lea    0x19(%rax),%esi
  cmp    %esi,%edx
  jle    L56
  movslq %esi,%rsi
  movzbl (%rdi,%rsi,1),%r10d
  movzbl -0x1(%rdi,%rsi,1),%r9d
  mov    %r10b,-0x1(%rcx,%rsi,1)
  mov    %r9b,(%rcx,%rsi,1)
  lea    0x1b(%rax),%esi
  cmp    %esi,%edx
  jle    L56
  movslq %esi,%rsi
  add    $0x1d,%eax
  movzbl (%rdi,%rsi,1),%r10d
  movzbl -0x1(%rdi,%rsi,1),%r9d
  mov    %r10b,-0x1(%rcx,%rsi,1)
  mov    %r9b,(%rcx,%rsi,1)
  cmp    %eax,%edx
  jle    L56
  cltq
  movzbl (%rdi,%rax,1),%r9d
  movzbl -0x1(%rdi,%rax,1),%esi
  mov    %r9b,-0x1(%rcx,%rax,1)
  mov    %sil,(%rcx,%rax,1)
  cs nopw 0x0(%rax,%rax,1)
L56:
  and    $0xfffffffe,%r8d
  add    $0x3,%r8d
L164:
  cmp    %r8d,%edx
  je     L180
  ret
  xchg   %ax,%ax
L180:
  movslq %edx,%rdx
  movb   $0x0,-0x1(%rcx,%rdx,1)
  ret
  nopl   0x0(%rax)
L118:
  mov    $0x1,%eax
  nopl   (%rax)
L196:
  movzbl (%rdi,%rax,1),%r9d
  movzbl -0x1(%rdi,%rax,1),%esi
  mov    %r9b,-0x1(%rcx,%rax,1)
  mov    %sil,(%rcx,%rax,1)
  add    $0x2,%rax
  cmp    %eax,%edx
  jg     L196
  jmp    L56
  nopl   (%rax)
L107:
  mov    $0x1,%r8d
  jmp    L164
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D3
data_type: byte[16]

tool: {"D3": [0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00,0xff,0x00]}

assistant: ```c
void swab(const void *b1, void *b2, ssize_t length) {
  const char *from = b1;
  char *to = b2;
  ssize_t ptr;
  for (ptr = 1; ptr < length; ptr += 2) {
    char p = from[ptr];
    char q = from[ptr - 1];
    to[ptr - 1] = p;
    to[ptr] = q;
  }
  if (ptr == length)
    to[ptr - 1] = 0;
}
```