user: What is the c source code of the assembly code below?

```asm
<d_copy_pmat_panel>:
  endbr64
  push   %r12
  mov    %rcx,%r10
  push   %rbp
  push   %rbx
  sub    $0x30,%rsp
  mov    %fs:0x28,%rcx
  mov    %rcx,0x28(%rsp)
  xor    %ecx,%ecx
  test   %edi,%edi
  jle    L13
  test   %esi,%esi
  jle    L13
  mov    %edx,%ecx
  mov    %edi,%eax
  sar    $0x1f,%ecx
  shr    $0x1e,%ecx
  add    %ecx,%edx
  and    $0x3,%edx
  sub    %edx,%ecx
  lea    0x4(%rcx),%edx
  cmp    %edx,%edi
  cmovle %edi,%edx
  sub    %edx,%edi
  cmp    $0x1,%edx
  je     L61
  lea    0x8(%r8),%rcx
  mov    %rcx,0x8(%rsp)
  cmp    $0x2,%edx
  je     L61
  lea    0x10(%r8),%rcx
  mov    %rcx,0x10(%rsp)
  cmp    $0x3,%edx
  je     L61
  lea    0x18(%r8),%rcx
  mov    %rcx,0x18(%rsp)
L61:
  test   %edi,%edi
  jle    L89
  lea    -0x4(,%r9,4),%ecx
  movslq %edx,%r9
  movslq %ecx,%rcx
  add    %r9,%rcx
  shl    $0x3,%rcx
  lea    (%r8,%rcx,1),%r11
  mov    %r11,(%rsp,%r9,8)
  cmp    $0x1,%edi
  je     L89
  lea    0x1(%rdx),%r9d
  lea    0x8(%r8,%rcx,1),%r11
  movslq %r9d,%r9
  mov    %r11,(%rsp,%r9,8)
  cmp    $0x2,%edi
  je     L89
  add    $0x2,%edx
  lea    0x10(%r8,%rcx,1),%rcx
  movslq %edx,%rdx
  mov    %rcx,(%rsp,%rdx,8)
L89:
  lea    -0x3(%rsi),%edx
  cmp    $0x1,%eax
  je     L181
  mov    0x8(%rsp),%rcx
  cmp    $0x2,%eax
  je     L67
  mov    0x10(%rsp),%rdi
  cmp    $0x3,%eax
  je     L347
  mov    0x18(%rsp),%r11
  xor    %eax,%eax
  test   %edx,%edx
  jle    L416
  lea    -0x4(%rsi),%eax
  mov    %r10,%rdx
  shr    $0x2,%eax
  lea    0x1(%rax),%r9d
  xor    %eax,%eax
  mov    %r9,%rbx
  shl    $0x7,%r9
  nopl   0x0(%rax,%rax,1)
L58:
  movsd  (%rdx),%xmm0
  sub    $0xffffffffffffff80,%rdx
  movsd  %xmm0,(%r8,%rax,1)
  movsd  -0x78(%rdx),%xmm0
  movsd  %xmm0,(%rcx,%rax,1)
  movsd  -0x70(%rdx),%xmm0
  movsd  %xmm0,(%rdi,%rax,1)
  movsd  -0x68(%rdx),%xmm0
  movsd  %xmm0,(%r11,%rax,1)
  movsd  -0x60(%rdx),%xmm0
  movsd  %xmm0,0x20(%r8,%rax,1)
  movsd  -0x58(%rdx),%xmm0
  movsd  %xmm0,0x20(%rcx,%rax,1)
  movsd  -0x50(%rdx),%xmm0
  movsd  %xmm0,0x20(%rdi,%rax,1)
  movsd  -0x68(%rdx),%xmm0
  movsd  %xmm0,(%r11,%rax,1)
  movsd  -0x40(%rdx),%xmm0
  movsd  %xmm0,0x40(%r8,%rax,1)
  movsd  -0x38(%rdx),%xmm0
  movsd  %xmm0,0x40(%rcx,%rax,1)
  movsd  -0x30(%rdx),%xmm0
  movsd  %xmm0,0x40(%rdi,%rax,1)
  movsd  -0x68(%rdx),%xmm0
  movsd  %xmm0,(%r11,%rax,1)
  movsd  -0x20(%rdx),%xmm0
  movsd  %xmm0,0x60(%r8,%rax,1)
  movsd  -0x18(%rdx),%xmm0
  movsd  %xmm0,0x60(%rcx,%rax,1)
  movsd  -0x10(%rdx),%xmm0
  movsd  %xmm0,0x60(%rdi,%rax,1)
  movsd  -0x68(%rdx),%xmm0
  movsd  %xmm0,(%r11,%rax,1)
  sub    $0xffffffffffffff80,%rax
  cmp    %r9,%rax
  jne    L58
  lea    0x0(,%rbx,4),%eax
  cmp    %eax,%esi
  jle    L13
L416:
  lea    0x0(,%rax,4),%ebx
  movslq %ebx,%rdx
  lea    0x1(%rbx),%ebp
  movsd  (%r10,%rdx,8),%xmm0
  movslq %ebp,%rbp
  lea    0x0(,%rdx,8),%r9
  lea    0x0(,%rbp,8),%r12
  movsd  %xmm0,(%r8,%rdx,8)
  movsd  (%r10,%rbp,8),%xmm0
  movsd  %xmm0,(%rcx,%rdx,8)
  movsd  0x8(%r10,%r12,1),%xmm0
  movsd  %xmm0,(%rdi,%rdx,8)
  movsd  0x10(%r10,%r12,1),%xmm0
  movsd  %xmm0,(%r11,%rdx,8)
  lea    0x1(%rax),%edx
  cmp    %edx,%esi
  jle    L13
  movsd  0x20(%r10,%r9,1),%xmm0
  lea    0x5(%rbx),%edx
  movslq %edx,%rdx
  movsd  %xmm0,0x20(%r8,%r9,1)
  movsd  (%r10,%rdx,8),%xmm0
  lea    0x0(,%rdx,8),%rbp
  lea    0x2(%rax),%edx
  movsd  %xmm0,0x20(%rcx,%r9,1)
  movsd  0x8(%r10,%rbp,1),%xmm0
  movsd  %xmm0,0x20(%rdi,%r9,1)
  movsd  0x10(%r10,%rbp,1),%xmm0
  movsd  %xmm0,0x20(%r11,%r9,1)
  cmp    %edx,%esi
  jle    L13
  movsd  0x40(%r10,%r9,1),%xmm0
  lea    0x9(%rbx),%edx
  add    $0x3,%eax
  movslq %edx,%rdx
  movsd  %xmm0,0x40(%r8,%r9,1)
  movsd  (%r10,%rdx,8),%xmm0
  lea    0x0(,%rdx,8),%rbp
  movsd  %xmm0,0x40(%rcx,%r9,1)
  movsd  0x8(%r10,%rbp,1),%xmm0
  movsd  %xmm0,0x40(%rdi,%r9,1)
  movsd  0x10(%r10,%rbp,1),%xmm0
  movsd  %xmm0,0x40(%r11,%r9,1)
  cmp    %eax,%esi
  jle    L13
  movsd  0x60(%r10,%r9,1),%xmm0
  add    $0xd,%ebx
  movslq %ebx,%rbx
  movsd  %xmm0,0x60(%r8,%r9,1)
  movsd  (%r10,%rbx,8),%xmm0
  lea    0x0(,%rbx,8),%rax
  movsd  %xmm0,0x60(%rcx,%r9,1)
  movsd  0x8(%r10,%rax,1),%xmm0
  movsd  %xmm0,0x60(%rdi,%r9,1)
  movsd  0x10(%r10,%rax,1),%xmm0
  movsd  %xmm0,0x60(%r11,%r9,1)
  nopl   0x0(%rax)
L13:
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L81
  add    $0x30,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nopl   (%rax)
L181:
  test   %edx,%edx
  jle    L365
  lea    -0x4(%rsi),%edi
  mov    %r10,%rax
  mov    %r8,%rdx
  shr    $0x2,%edi
  mov    %edi,%ecx
  shl    $0x7,%rcx
  lea    0x80(%r10,%rcx,1),%rcx
  nopw   0x0(%rax,%rax,1)
L334:
  movsd  (%rax),%xmm0
  sub    $0xffffffffffffff80,%rax
  sub    $0xffffffffffffff80,%rdx
  movsd  %xmm0,-0x80(%rdx)
  movsd  -0x60(%rax),%xmm0
  movsd  %xmm0,-0x60(%rdx)
  movsd  -0x40(%rax),%xmm0
  movsd  %xmm0,-0x40(%rdx)
  movsd  -0x20(%rax),%xmm0
  movsd  %xmm0,-0x20(%rdx)
  cmp    %rcx,%rax
  jne    L334
  lea    0x4(,%rdi,4),%eax
  cmp    %eax,%esi
  jle    L13
L232:
  lea    0x0(,%rax,4),%edx
  movslq %edx,%rdx
  movsd  (%r10,%rdx,8),%xmm0
  lea    0x0(,%rdx,8),%rcx
  movsd  %xmm0,(%r8,%rdx,8)
  lea    0x1(%rax),%edx
  cmp    %edx,%esi
  jle    L13
  movsd  0x20(%r10,%rcx,1),%xmm0
  lea    0x2(%rax),%edx
  movsd  %xmm0,0x20(%r8,%rcx,1)
  cmp    %edx,%esi
  jle    L13
  movsd  0x40(%r10,%rcx,1),%xmm0
  add    $0x3,%eax
  movsd  %xmm0,0x40(%r8,%rcx,1)
  cmp    %eax,%esi
  jle    L13
  movsd  0x60(%r10,%rcx,1),%xmm0
  movsd  %xmm0,0x60(%r8,%rcx,1)
  jmp    L13
  nopl   0x0(%rax)
L347:
  test   %edx,%edx
  jle    L255
  lea    -0x4(%rsi),%ebp
  mov    %r10,%rax
  mov    %r8,%r11
  mov    %rcx,%r9
  shr    $0x2,%ebp
  mov    %rdi,%rdx
  mov    %ebp,%ebx
  shl    $0x7,%rbx
  lea    0x80(%r10,%rbx,1),%rbx
  nopl   0x0(%rax,%rax,1)
L389:
  movsd  (%rax),%xmm0
  sub    $0xffffffffffffff80,%rax
  sub    $0xffffffffffffff80,%r11
  sub    $0xffffffffffffff80,%r9
  sub    $0xffffffffffffff80,%rdx
  movsd  %xmm0,-0x80(%r11)
  movsd  -0x78(%rax),%xmm0
  movsd  %xmm0,-0x80(%r9)
  movsd  -0x70(%rax),%xmm0
  movsd  %xmm0,-0x80(%rdx)
  movsd  -0x60(%rax),%xmm0
  movsd  %xmm0,-0x60(%r11)
  movsd  -0x58(%rax),%xmm0
  movsd  %xmm0,-0x60(%r9)
  movsd  -0x50(%rax),%xmm0
  movsd  %xmm0,-0x60(%rdx)
  movsd  -0x40(%rax),%xmm0
  movsd  %xmm0,-0x40(%r11)
  movsd  -0x38(%rax),%xmm0
  movsd  %xmm0,-0x40(%r9)
  movsd  -0x30(%rax),%xmm0
  movsd  %xmm0,-0x40(%rdx)
  movsd  -0x20(%rax),%xmm0
  movsd  %xmm0,-0x20(%r11)
  movsd  -0x18(%rax),%xmm0
  movsd  %xmm0,-0x20(%r9)
  movsd  -0x10(%rax),%xmm0
  movsd  %xmm0,-0x20(%rdx)
  cmp    %rax,%rbx
  jne    L389
  lea    0x4(,%rbp,4),%edx
  cmp    %esi,%edx
  jge    L13
L49:
  lea    0x0(,%rdx,4),%r9d
  movslq %r9d,%r11
  lea    0x1(%r9),%ebx
  movsd  (%r10,%r11,8),%xmm0
  movslq %ebx,%rbx
  lea    0x0(,%r11,8),%rax
  movsd  %xmm0,(%r8,%r11,8)
  movsd  (%r10,%rbx,8),%xmm0
  movsd  %xmm0,(%rcx,%r11,8)
  movsd  0x8(%r10,%rbx,8),%xmm0
  movsd  %xmm0,(%rdi,%r11,8)
  lea    0x1(%rdx),%r11d
  cmp    %r11d,%esi
  jle    L13
  movsd  0x20(%r10,%rax,1),%xmm0
  lea    0x5(%r9),%r11d
  movslq %r11d,%r11
  movsd  %xmm0,0x20(%r8,%rax,1)
  movsd  (%r10,%r11,8),%xmm0
  movsd  %xmm0,0x20(%rcx,%rax,1)
  movsd  0x8(%r10,%r11,8),%xmm0
  lea    0x2(%rdx),%r11d
  movsd  %xmm0,0x20(%rdi,%rax,1)
  cmp    %r11d,%esi
  jle    L13
  movsd  0x40(%r10,%rax,1),%xmm0
  lea    0x9(%r9),%r11d
  add    $0x3,%edx
  movslq %r11d,%r11
  movsd  %xmm0,0x40(%r8,%rax,1)
  movsd  (%r10,%r11,8),%xmm0
  movsd  %xmm0,0x40(%rcx,%rax,1)
  movsd  0x8(%r10,%r11,8),%xmm0
  movsd  %xmm0,0x40(%rdi,%rax,1)
  cmp    %edx,%esi
  jle    L13
  movsd  0x60(%r10,%rax,1),%xmm0
  lea    0xd(%r9),%edx
  movslq %edx,%rdx
  movsd  %xmm0,0x60(%r8,%rax,1)
  movsd  (%r10,%rdx,8),%xmm0
  movsd  %xmm0,0x60(%rcx,%rax,1)
  movsd  0x8(%r10,%rdx,8),%xmm0
  movsd  %xmm0,0x60(%rdi,%rax,1)
  jmp    L13
  nopw   0x0(%rax,%rax,1)
L67:
  test   %edx,%edx
  jle    L243
  lea    -0x4(%rsi),%r11d
  mov    %r10,%rax
  mov    %r8,%rdi
  mov    %rcx,%rdx
  shr    $0x2,%r11d
  mov    %r11d,%r9d
  shl    $0x7,%r9
  lea    0x80(%r10,%r9,1),%r9
  nopl   0x0(%rax,%rax,1)
L196:
  movsd  (%rax),%xmm0
  sub    $0xffffffffffffff80,%rax
  sub    $0xffffffffffffff80,%rdi
  sub    $0xffffffffffffff80,%rdx
  movsd  %xmm0,-0x80(%rdi)
  movsd  -0x78(%rax),%xmm0
  movsd  %xmm0,-0x80(%rdx)
  movsd  -0x60(%rax),%xmm0
  movsd  %xmm0,-0x60(%rdi)
  movsd  -0x58(%rax),%xmm0
  movsd  %xmm0,-0x60(%rdx)
  movsd  -0x40(%rax),%xmm0
  movsd  %xmm0,-0x40(%rdi)
  movsd  -0x38(%rax),%xmm0
  movsd  %xmm0,-0x40(%rdx)
  movsd  -0x20(%rax),%xmm0
  movsd  %xmm0,-0x20(%rdi)
  movsd  -0x18(%rax),%xmm0
  movsd  %xmm0,-0x20(%rdx)
  cmp    %r9,%rax
  jne    L196
  lea    0x4(,%r11,4),%eax
  cmp    %eax,%esi
  jle    L13
L412:
  lea    0x0(,%rax,4),%edx
  movslq %edx,%r9
  lea    0x1(%rdx),%r11d
  movsd  (%r10,%r9,8),%xmm0
  movslq %r11d,%r11
  lea    0x0(,%r9,8),%rdi
  movsd  %xmm0,(%r8,%r9,8)
  movsd  (%r10,%r11,8),%xmm0
  movsd  %xmm0,(%rcx,%r9,8)
  lea    0x1(%rax),%r9d
  cmp    %r9d,%esi
  jle    L13
  movsd  0x20(%r10,%rdi,1),%xmm0
  lea    0x5(%rdx),%r9d
  movslq %r9d,%r9
  movsd  %xmm0,0x20(%r8,%rdi,1)
  movsd  (%r10,%r9,8),%xmm0
  lea    0x2(%rax),%r9d
  movsd  %xmm0,0x20(%rcx,%rdi,1)
  cmp    %r9d,%esi
  jle    L13
  movsd  0x40(%r10,%rdi,1),%xmm0
  lea    0x9(%rdx),%r9d
  add    $0x3,%eax
  movslq %r9d,%r9
  movsd  %xmm0,0x40(%r8,%rdi,1)
  movsd  (%r10,%r9,8),%xmm0
  movsd  %xmm0,0x40(%rcx,%rdi,1)
  cmp    %eax,%esi
  jle    L13
  movsd  0x60(%r10,%rdi,1),%xmm0
  lea    0xd(%rdx),%eax
  cltq
  movsd  %xmm0,0x60(%r8,%rdi,1)
  movsd  (%r10,%rax,8),%xmm0
  movsd  %xmm0,0x60(%rcx,%rdi,1)
  jmp    L13
L365:
  xor    %eax,%eax
  jmp    L232
L243:
  xor    %eax,%eax
  jmp    L412
L255:
  xor    %edx,%edx
  jmp    L49
L81:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void d_copy_pmat_panel(int row, int col, int offset, double *A, double *B, int sdb) {
  if (row <= 0 || col <= 0)
    return;
  const int bs = 4;
  int i, ii;
  int row0 = bs - offset % bs;
  row0 = row0 > row ? row : row0;
  int row1 = row - row0;
  double *(ptrB[4]);
  for (i = 0; i < row0; i++)
    ptrB[i] = B + i;
  for (i = 0; i < row1; i++)
    ptrB[row0 + i] = B + row0 + (sdb - 1) * bs + i;
  if (row == 1) {
    i = 0;
    for (; i < col - 3; i += 4) {
      ptrB[0][(i + 0) * bs] = A[0 + (i + 0) * bs];
      ptrB[0][(i + 1) * bs] = A[0 + (i + 1) * bs];
      ptrB[0][(i + 2) * bs] = A[0 + (i + 2) * bs];
      ptrB[0][(i + 3) * bs] = A[0 + (i + 3) * bs];
    }
    for (; i < col; i++) {
      ptrB[0][(i + 0) * bs] = A[0 + (i + 0) * bs];
    }
  } else if (row == 2) {
    i = 0;
    for (; i < col - 3; i += 4) {
      ptrB[0][(i + 0) * bs] = A[0 + (i + 0) * bs];
      ptrB[1][(i + 0) * bs] = A[1 + (i + 0) * bs];
      ptrB[0][(i + 1) * bs] = A[0 + (i + 1) * bs];
      ptrB[1][(i + 1) * bs] = A[1 + (i + 1) * bs];
      ptrB[0][(i + 2) * bs] = A[0 + (i + 2) * bs];
      ptrB[1][(i + 2) * bs] = A[1 + (i + 2) * bs];
      ptrB[0][(i + 3) * bs] = A[0 + (i + 3) * bs];
      ptrB[1][(i + 3) * bs] = A[1 + (i + 3) * bs];
    }
    for (; i < col; i++) {
      ptrB[0][(i + 0) * bs] = A[0 + (i + 0) * bs];
      ptrB[1][(i + 0) * bs] = A[1 + (i + 0) * bs];
    }
  } else if (row == 3) {
    i = 0;
    for (; i < col - 3; i += 4) {
      ptrB[0][(i + 0) * bs] = A[0 + (i + 0) * bs];
      ptrB[1][(i + 0) * bs] = A[1 + (i + 0) * bs];
      ptrB[2][(i + 0) * bs] = A[2 + (i + 0) * bs];
      ptrB[0][(i + 1) * bs] = A[0 + (i + 1) * bs];
      ptrB[1][(i + 1) * bs] = A[1 + (i + 1) * bs];
      ptrB[2][(i + 1) * bs] = A[2 + (i + 1) * bs];
      ptrB[0][(i + 2) * bs] = A[0 + (i + 2) * bs];
      ptrB[1][(i + 2) * bs] = A[1 + (i + 2) * bs];
      ptrB[2][(i + 2) * bs] = A[2 + (i + 2) * bs];
      ptrB[0][(i + 3) * bs] = A[0 + (i + 3) * bs];
      ptrB[1][(i + 3) * bs] = A[1 + (i + 3) * bs];
      ptrB[2][(i + 3) * bs] = A[2 + (i + 3) * bs];
    }
    for (; i < col; i++) {
      ptrB[0][(i + 0) * bs] = A[0 + (i + 0) * bs];
      ptrB[1][(i + 0) * bs] = A[1 + (i + 0) * bs];
      ptrB[2][(i + 0) * bs] = A[2 + (i + 0) * bs];
    }
  } else {
    i = 0;
    for (; i < col - 3; i += 4) {
      ptrB[0][(i + 0) * bs] = A[0 + (i + 0) * bs];
      ptrB[1][(i + 0) * bs] = A[1 + (i + 0) * bs];
      ptrB[2][(i + 0) * bs] = A[2 + (i + 0) * bs];
      ptrB[3][(i + 0) * bs] = A[3 + (i + 0) * bs];
      ptrB[0][(i + 1) * bs] = A[0 + (i + 1) * bs];
      ptrB[1][(i + 1) * bs] = A[1 + (i + 1) * bs];
      ptrB[2][(i + 1) * bs] = A[2 + (i + 1) * bs];
      ptrB[3][(i + 0) * bs] = A[3 + (i + 0) * bs];
      ptrB[0][(i + 2) * bs] = A[0 + (i + 2) * bs];
      ptrB[1][(i + 2) * bs] = A[1 + (i + 2) * bs];
      ptrB[2][(i + 2) * bs] = A[2 + (i + 2) * bs];
      ptrB[3][(i + 0) * bs] = A[3 + (i + 0) * bs];
      ptrB[0][(i + 3) * bs] = A[0 + (i + 3) * bs];
      ptrB[1][(i + 3) * bs] = A[1 + (i + 3) * bs];
      ptrB[2][(i + 3) * bs] = A[2 + (i + 3) * bs];
      ptrB[3][(i + 0) * bs] = A[3 + (i + 0) * bs];
    }
    for (; i < col; i++) {
      ptrB[0][(i + 0) * bs] = A[0 + (i + 0) * bs];
      ptrB[1][(i + 0) * bs] = A[1 + (i + 0) * bs];
      ptrB[2][(i + 0) * bs] = A[2 + (i + 0) * bs];
      ptrB[3][(i + 0) * bs] = A[3 + (i + 0) * bs];
    }
  }
}
```