user: 请将以下的汇编代码转换成C语言代码：

```asm
<swap_>:
  endbr64
  push   %r15
  lea    -0x4(%r8),%r15
  push   %r14
  mov    %rsi,%r14
  push   %r13
  mov    %r9,%r13
  push   %r12
  mov    %r8,%r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    0x60(%rsp),%rax
  mov    %rdx,0x18(%rsp)
  mov    %r8,%rdx
  mov    %rcx,0x8(%rsp)
  mov    %r9,%rcx
  lea    -0x4(%rax),%rbx
  movslq (%rdi),%rax
  mov    %r15,0x10(%rsp)
  lea    (%rbx,%rax,4),%rdi
  call   <lstptr_@plt>
  cltq
  mov    (%r15,%rax,4),%edx
  mov    %edx,%eax
  neg    %eax
  cmovs  %edx,%eax
  xor    %edx,%edx
  cmp    (%r14),%eax
  je     L46
  mov    0x18(%rsp),%r11
  mov    %r13,%rcx
  mov    %r12,%rdx
  mov    %r14,%rsi
  lea    -0x4(%r13),%r15
  movslq (%r11),%rax
  lea    (%rbx,%rax,4),%rdi
  call   <lstptr_@plt>
  mov    0x18(%rsp),%r11
  movslq %eax,%rdx
  lea    (%r15,%rdx,4),%rcx
  movslq (%rcx),%rsi
  mov    %esi,D15(%rip)
  mov    %rsi,%rdx
  mov    (%r15,%rsi,4),%esi
  mov    %esi,(%rcx)
  movslq (%r11),%rcx
  lea    (%rbx,%rcx,4),%rcx
  cmp    (%rcx),%edx
  je     L34
L8:
  movslq 0x0(%rbp),%rax
  mov    %r11,%rsi
  mov    %r13,%rcx
  mov    %r12,%rdx
  lea    (%rbx,%rax,4),%rdi
  call   <lstptr_@plt>
  mov    0x10(%rsp),%rdi
  mov    %rbp,%rsi
  cltq
  lea    (%r15,%rax,4),%rdx
  movslq D15(%rip),%rax
  mov    (%rdx),%ecx
  mov    %eax,(%rdx)
  mov    (%r14),%edx
  mov    %edx,(%rdi,%rax,4)
  mov    %r12,%rdx
  mov    %ecx,(%r15,%rax,4)
  mov    0x8(%rsp),%rax
  mov    %r13,%rcx
  movslq (%rax),%rax
  lea    (%rbx,%rax,4),%rdi
  call   <lstptr_@plt>
  movslq %eax,%rdx
  lea    (%r15,%rdx,4),%rcx
  movslq (%rcx),%rsi
  mov    %esi,D21(%rip)
  mov    %rsi,%rdx
  mov    (%r15,%rsi,4),%esi
  mov    %esi,(%rcx)
  mov    0x8(%rsp),%rsi
  movslq (%rsi),%rcx
  lea    (%rbx,%rcx,4),%rcx
  cmp    (%rcx),%edx
  je     L5
L27:
  movslq (%r14),%rax
  mov    0x8(%rsp),%rsi
  mov    %r13,%rcx
  mov    %r12,%rdx
  lea    (%rbx,%rax,4),%rdi
  call   <lstptr_@plt>
  mov    D21(%rip),%edx
  mov    0x10(%rsp),%rbx
  cltq
  lea    (%r15,%rax,4),%rax
  mov    (%rax),%ecx
  mov    %edx,(%rax)
  movslq %edx,%rax
  mov    0x0(%rbp),%esi
  mov    %esi,(%rbx,%rax,4)
  mov    %ecx,(%r15,%rax,4)
L46:
  mov    0x68(%rsp),%rax
  mov    %edx,(%rax)
  add    $0x28,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L5:
  mov    %eax,(%rcx)
  jmp    L27
  nopl   0x0(%rax)
L34:
  mov    %eax,(%rcx)
  jmp    L8
```

assistant: ```c
int swap_(int *in1, int *in2, int *io1, int *io2, int *list, int *lptr, int *lend, int *lp21) {
  int i__1;
  static int lp, lph, lpsav;
  --lend;
  --lptr;
  --list;
  lp = lstptr_(&lend[*in1], in2, &list[1], &lptr[1]);
  if ((i__1 = list[lp], ((i__1) >= 0 ? (i__1) : -(i__1))) == *in2) {
    *lp21 = 0;
    return 0;
  }
  lp = lstptr_(&lend[*io1], in2, &list[1], &lptr[1]);
  lph = lptr[lp];
  lptr[lp] = lptr[lph];
  if (lend[*io1] == lph) {
    lend[*io1] = lp;
  }
  lp = lstptr_(&lend[*in1], io1, &list[1], &lptr[1]);
  lpsav = lptr[lp];
  lptr[lp] = lph;
  list[lph] = *in2;
  lptr[lph] = lpsav;
  lp = lstptr_(&lend[*io2], in1, &list[1], &lptr[1]);
  lph = lptr[lp];
  lptr[lp] = lptr[lph];
  if (lend[*io2] == lph) {
    lend[*io2] = lp;
  }
  lp = lstptr_(&lend[*in2], io2, &list[1], &lptr[1]);
  lpsav = lptr[lp];
  lptr[lp] = lph;
  list[lph] = *in1;
  lptr[lph] = lpsav;
  *lp21 = lph;
  return 0;
}
```