user: Converte this assembly snippet into its equivalent C code:

```asm
<HPL_dlaswp00N>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdx,-0x10(%rsp)
  mov    %ecx,-0x8(%rsp)
  test   %edi,%edi
  jle    L102
  test   %esi,%esi
  jle    L102
  mov    %esi,%eax
  mov    %edi,%ebp
  mov    %r8,%r15
  and    $0x1f,%eax
  and    $0xffffffe0,%esi
  mov    %eax,-0x4(%rsp)
  mov    %esi,-0x3c(%rsp)
  je     L22
  movslq %ecx,%rax
  shl    $0x5,%ecx
  mov    %rdx,%rbx
  movl   $0x0,-0x40(%rsp)
  movslq %ecx,%rcx
  lea    0x0(,%rax,8),%rdx
  mov    %rbx,%r14
  lea    0x0(,%rcx,8),%rsi
  lea    (%rax,%rax,2),%rcx
  mov    %rdx,%r8
  lea    0x0(,%rcx,8),%r13
  mov    %rsi,-0x38(%rsp)
  shl    $0x5,%rcx
  sub    %rax,%r8
  lea    (%rbx,%r13,1),%rsi
  mov    %rcx,-0x28(%rsp)
  lea    (%rdx,%rax,1),%rcx
  shl    $0x3,%r8
  mov    %rsi,-0x48(%rsp)
  lea    (%rax,%rax,4),%rsi
  shl    $0x4,%rcx
  shl    $0x4,%rax
  shl    $0x4,%rsi
  mov    %rcx,-0x20(%rsp)
  mov    %rsi,-0x30(%rsp)
  mov    %rax,-0x18(%rsp)
  nopl   0x0(%rax)
L2:
  mov    -0x30(%rsp),%rax
  mov    -0x48(%rsp),%r10
  lea    (%rdx,%r14,1),%rdi
  xor    %ebx,%ebx
  lea    (%r14,%rax,1),%r11
  mov    -0x28(%rsp),%rax
  lea    (%r14,%rax,1),%rsi
  mov    -0x20(%rsp),%rax
  lea    (%r14,%rax,1),%r12
  add    %r10,%rax
  mov    %rax,%r9
  mov    -0x18(%rsp),%rax
  lea    (%rax,%r9,1),%rcx
  nopl   (%rax)
L7:
  movslq (%r15,%rbx,4),%rax
  cmp    %ebx,%eax
  je     L116
  lea    (%r14,%rax,8),%rax
  movsd  (%r14,%rbx,8),%xmm0
  movsd  (%rax),%xmm1
  movsd  %xmm1,(%r14,%rbx,8)
  movsd  %xmm0,(%rax)
  add    %rdx,%rax
  movsd  (%rdi),%xmm0
  movsd  (%rax),%xmm1
  movsd  %xmm1,(%rdi)
  movsd  %xmm0,(%rax)
  add    %rdx,%rax
  movsd  (%rdi,%rdx,1),%xmm0
  movsd  (%rax),%xmm1
  movsd  %xmm1,(%rdi,%rdx,1)
  movsd  %xmm0,(%rax)
  add    %rdx,%rax
  movsd  (%r10),%xmm0
  movsd  (%rax),%xmm1
  movsd  %xmm1,(%r10)
  movsd  %xmm0,(%rax)
  add    %rdx,%rax
  movsd  (%r10,%rdx,1),%xmm0
  movsd  (%rax),%xmm1
  movsd  %xmm1,(%r10,%rdx,1)
  movsd  %xmm0,(%rax)
  add    %rdx,%rax
  movsd  (%rdi,%rdx,4),%xmm0
  movsd  (%rax),%xmm1
  movsd  %xmm1,(%rdi,%rdx,4)
  movsd  %xmm0,(%rax)
  add    %rdx,%rax
  movsd  (%r10,%r13,1),%xmm0
  movsd  (%rax),%xmm1
  movsd  %xmm1,(%r10,%r13,1)
  movsd  %xmm0,(%rax)
  add    %rdx,%rax
  movsd  (%r10,%rdx,4),%xmm0
  movsd  (%rax),%xmm1
  movsd  %xmm1,(%r10,%rdx,4)
  movsd  %xmm0,(%rax)
  add    %rdx,%rax
  movsd  (%rdi,%r8,1),%xmm0
  movsd  (%rax),%xmm1
  movsd  %xmm1,(%rdi,%r8,1)
  movsd  %xmm0,(%rax)
  add    %rdx,%rax
  movsd  (%rdi,%rdx,8),%xmm0
  movsd  (%rax),%xmm1
  movsd  %xmm1,(%rdi,%rdx,8)
  movsd  %xmm0,(%rax)
  add    %rdx,%rax
  movsd  (%r11),%xmm0
  movsd  (%rax),%xmm1
  movsd  %xmm1,(%r11)
  movsd  %xmm0,(%rax)
  add    %rdx,%rax
  movsd  (%r11,%rdx,1),%xmm0
  movsd  (%rax),%xmm1
  movsd  %xmm1,(%r11,%rdx,1)
  movsd  %xmm0,(%rax)
  add    %rdx,%rax
  movsd  (%rsi),%xmm0
  movsd  (%rax),%xmm1
  movsd  %xmm1,(%rsi)
  movsd  %xmm0,(%rax)
  add    %rdx,%rax
  movsd  (%rsi,%rdx,1),%xmm0
  movsd  (%rax),%xmm1
  movsd  %xmm1,(%rsi,%rdx,1)
  movsd  %xmm0,(%rax)
  add    %rdx,%rax
  movsd  (%r11,%rdx,4),%xmm0
  movsd  (%rax),%xmm1
  movsd  %xmm1,(%r11,%rdx,4)
  movsd  %xmm0,(%rax)
  add    %rdx,%rax
  movsd  (%rsi,%r13,1),%xmm0
  movsd  (%rax),%xmm1
  movsd  %xmm1,(%rsi,%r13,1)
  movsd  %xmm0,(%rax)
  add    %rdx,%rax
  movsd  (%rsi,%rdx,4),%xmm0
  movsd  (%rax),%xmm1
  movsd  %xmm1,(%rsi,%rdx,4)
  movsd  %xmm0,(%rax)
  add    %rdx,%rax
  movsd  (%r11,%r8,1),%xmm0
  movsd  (%rax),%xmm1
  movsd  %xmm1,(%r11,%r8,1)
  movsd  %xmm0,(%rax)
  add    %rdx,%rax
  movsd  (%r12),%xmm0
  movsd  (%rax),%xmm1
  movsd  %xmm1,(%r12)
  movsd  %xmm0,(%rax)
  add    %rdx,%rax
  movsd  (%r12,%rdx,1),%xmm0
  movsd  (%rax),%xmm1
  movsd  %xmm1,(%r12,%rdx,1)
  movsd  %xmm0,(%rax)
  add    %rdx,%rax
  movsd  (%rsi,%rdx,8),%xmm0
  movsd  (%rax),%xmm1
  movsd  %xmm1,(%rsi,%rdx,8)
  movsd  %xmm0,(%rax)
  add    %rdx,%rax
  movsd  (%r9),%xmm0
  movsd  (%rax),%xmm1
  movsd  %xmm1,(%r9)
  movsd  %xmm0,(%rax)
  add    %rdx,%rax
  movsd  (%r9,%rdx,1),%xmm0
  movsd  (%rax),%xmm1
  movsd  %xmm1,(%r9,%rdx,1)
  movsd  %xmm0,(%rax)
  add    %rdx,%rax
  movsd  (%rcx),%xmm0
  movsd  (%rax),%xmm1
  movsd  %xmm1,(%rcx)
  movsd  %xmm0,(%rax)
  add    %rdx,%rax
  movsd  (%rcx,%rdx,1),%xmm0
  movsd  (%rax),%xmm1
  movsd  %xmm1,(%rcx,%rdx,1)
  movsd  %xmm0,(%rax)
  add    %rdx,%rax
  movsd  (%r12,%r8,1),%xmm0
  movsd  (%rax),%xmm1
  movsd  %xmm1,(%r12,%r8,1)
  movsd  %xmm0,(%rax)
  add    %rdx,%rax
  movsd  (%rcx,%r13,1),%xmm0
  movsd  (%rax),%xmm1
  movsd  %xmm1,(%rcx,%r13,1)
  movsd  %xmm0,(%rax)
  add    %rdx,%rax
  movsd  (%rcx,%rdx,4),%xmm0
  movsd  (%rax),%xmm1
  movsd  %xmm1,(%rcx,%rdx,4)
  movsd  %xmm0,(%rax)
  add    %rdx,%rax
  movsd  (%r9,%r8,1),%xmm0
  movsd  (%rax),%xmm1
  movsd  %xmm1,(%r9,%r8,1)
  movsd  %xmm0,(%rax)
  add    %rdx,%rax
  movsd  (%r9,%rdx,8),%xmm0
  movsd  (%rax),%xmm1
  movsd  %xmm1,(%r9,%rdx,8)
  movsd  %xmm0,(%rax)
  add    %rdx,%rax
  movsd  (%rcx,%r8,1),%xmm0
  movsd  (%rax),%xmm1
  movsd  %xmm1,(%rcx,%r8,1)
  movsd  %xmm0,(%rax)
  add    %rdx,%rax
  movsd  (%rcx,%rdx,8),%xmm0
  movsd  (%rax),%xmm1
  movsd  %xmm1,(%rcx,%rdx,8)
  movsd  %xmm0,(%rax)
L116:
  add    $0x1,%rbx
  add    $0x8,%rdi
  add    $0x8,%r10
  add    $0x8,%r11
  add    $0x8,%rsi
  add    $0x8,%r12
  add    $0x8,%r9
  add    $0x8,%rcx
  cmp    %ebx,%ebp
  jg     L7
  mov    -0x38(%rsp),%rdi
  addl   $0x20,-0x40(%rsp)
  add    %rdi,-0x48(%rsp)
  mov    -0x40(%rsp),%eax
  add    %rdi,%r14
  cmp    %eax,-0x3c(%rsp)
  jg     L2
  mov    -0x3c(%rsp),%eax
  sub    $0x1,%eax
  shr    $0x5,%eax
  add    $0x1,%eax
  imul   %rdi,%rax
  add    %rax,-0x10(%rsp)
L22:
  mov    -0x4(%rsp),%r9d
  test   %r9d,%r9d
  jle    L102
  movslq -0x8(%rsp),%rsi
  mov    -0x10(%rsp),%r10
  xor    %edi,%edi
  shl    $0x3,%rsi
  mov    %r10,%r8
  jmp    L52
  xchg   %ax,%ax
L51:
  add    $0x1,%rdi
  add    $0x8,%r8
  cmp    %edi,%ebp
  jle    L102
L52:
  movslq (%r15,%rdi,4),%rax
  cmp    %edi,%eax
  je     L51
  mov    %r8,%rdx
  lea    (%r10,%rax,8),%rax
  xor    %ecx,%ecx
  nopl   (%rax)
L83:
  movsd  (%rdx),%xmm0
  movsd  (%rax),%xmm1
  add    $0x1,%ecx
  movsd  %xmm1,(%rdx)
  add    %rsi,%rdx
  movsd  %xmm0,(%rax)
  add    %rsi,%rax
  cmp    %ecx,%r9d
  jne    L83
  add    $0x1,%rdi
  add    $0x8,%r8
  cmp    %edi,%ebp
  jg     L52
L102:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
void HPL_dlaswp00N(const int M, const int N, double *A, const int LDA, const int *IPIV) {
  register double r;
  double *a0, *a1;
  const int incA = (int)((unsigned int)(LDA) << 5);
  int ip, nr, nu;
  register int i, j;
  if ((M <= 0) || (N <= 0))
    return;
  nr = N - (nu = (int)(((unsigned int)(N) >> 5) << 5));
  for (j = 0; j < nu; j += 32, A += incA) {
    for (i = 0; i < M; i++) {
      if (i != (ip = IPIV[i])) {
        a0 = A + i;
        a1 = A + ip;
        r = *a0;
        *a0 = *a1;
        *a1 = r;
        a0 += LDA;
        a1 += LDA;
        r = *a0;
        *a0 = *a1;
        *a1 = r;
        a0 += LDA;
        a1 += LDA;
        r = *a0;
        *a0 = *a1;
        *a1 = r;
        a0 += LDA;
        a1 += LDA;
        r = *a0;
        *a0 = *a1;
        *a1 = r;
        a0 += LDA;
        a1 += LDA;
        r = *a0;
        *a0 = *a1;
        *a1 = r;
        a0 += LDA;
        a1 += LDA;
        r = *a0;
        *a0 = *a1;
        *a1 = r;
        a0 += LDA;
        a1 += LDA;
        r = *a0;
        *a0 = *a1;
        *a1 = r;
        a0 += LDA;
        a1 += LDA;
        r = *a0;
        *a0 = *a1;
        *a1 = r;
        a0 += LDA;
        a1 += LDA;
        r = *a0;
        *a0 = *a1;
        *a1 = r;
        a0 += LDA;
        a1 += LDA;
        r = *a0;
        *a0 = *a1;
        *a1 = r;
        a0 += LDA;
        a1 += LDA;
        r = *a0;
        *a0 = *a1;
        *a1 = r;
        a0 += LDA;
        a1 += LDA;
        r = *a0;
        *a0 = *a1;
        *a1 = r;
        a0 += LDA;
        a1 += LDA;
        r = *a0;
        *a0 = *a1;
        *a1 = r;
        a0 += LDA;
        a1 += LDA;
        r = *a0;
        *a0 = *a1;
        *a1 = r;
        a0 += LDA;
        a1 += LDA;
        r = *a0;
        *a0 = *a1;
        *a1 = r;
        a0 += LDA;
        a1 += LDA;
        r = *a0;
        *a0 = *a1;
        *a1 = r;
        a0 += LDA;
        a1 += LDA;
        r = *a0;
        *a0 = *a1;
        *a1 = r;
        a0 += LDA;
        a1 += LDA;
        r = *a0;
        *a0 = *a1;
        *a1 = r;
        a0 += LDA;
        a1 += LDA;
        r = *a0;
        *a0 = *a1;
        *a1 = r;
        a0 += LDA;
        a1 += LDA;
        r = *a0;
        *a0 = *a1;
        *a1 = r;
        a0 += LDA;
        a1 += LDA;
        r = *a0;
        *a0 = *a1;
        *a1 = r;
        a0 += LDA;
        a1 += LDA;
        r = *a0;
        *a0 = *a1;
        *a1 = r;
        a0 += LDA;
        a1 += LDA;
        r = *a0;
        *a0 = *a1;
        *a1 = r;
        a0 += LDA;
        a1 += LDA;
        r = *a0;
        *a0 = *a1;
        *a1 = r;
        a0 += LDA;
        a1 += LDA;
        r = *a0;
        *a0 = *a1;
        *a1 = r;
        a0 += LDA;
        a1 += LDA;
        r = *a0;
        *a0 = *a1;
        *a1 = r;
        a0 += LDA;
        a1 += LDA;
        r = *a0;
        *a0 = *a1;
        *a1 = r;
        a0 += LDA;
        a1 += LDA;
        r = *a0;
        *a0 = *a1;
        *a1 = r;
        a0 += LDA;
        a1 += LDA;
        r = *a0;
        *a0 = *a1;
        *a1 = r;
        a0 += LDA;
        a1 += LDA;
        r = *a0;
        *a0 = *a1;
        *a1 = r;
        a0 += LDA;
        a1 += LDA;
        r = *a0;
        *a0 = *a1;
        *a1 = r;
        a0 += LDA;
        a1 += LDA;
        r = *a0;
        *a0 = *a1;
        *a1 = r;
        a0 += LDA;
        a1 += LDA;
      }
    }
  }
  if (nr > 0) {
    for (i = 0; i < M; i++) {
      if (i != (ip = IPIV[i])) {
        a0 = A + i;
        a1 = A + ip;
        for (j = 0; j < nr; j++, a0 += LDA, a1 += LDA) {
          r = *a0;
          *a0 = *a1;
          *a1 = r;
        }
      }
    }
  }
}
```