user: What would the C source look like for the assembly code provided here?

```asm
<kernel_dgecp_3_2_lib4>:
  endbr64
  mov    %edi,%r9d
  cmp    $0x1,%edi
  sete   %al
  movzbl %al,%eax
  lea    (%rsi,%rax,1),%edi
  test   %edi,%edi
  jle    L75
  push   %rbx
  shl    $0x2,%ecx
  movslq %ecx,%rcx
  lea    (%rdx,%rcx,8),%r10
  cmp    $0x3,%edi
  jle    L41
  lea    -0x4(%rdi),%ebx
  shr    $0x2,%ebx
  lea    0x1(%rbx),%r11d
  mov    %r11d,%r11d
  shl    $0x7,%r11
  lea    (%rdx,%r11,1),%rsi
  mov    %r10,%rcx
  mov    %r8,%rax
L18:
  movsd  0x10(%rdx),%xmm0
  movsd  %xmm0,(%rax)
  movsd  0x18(%rdx),%xmm0
  movsd  %xmm0,0x8(%rax)
  movsd  (%rcx),%xmm0
  movsd  %xmm0,0x10(%rax)
  movsd  0x30(%rdx),%xmm0
  movsd  %xmm0,0x20(%rax)
  movsd  0x38(%rdx),%xmm0
  movsd  %xmm0,0x28(%rax)
  movsd  0x20(%rcx),%xmm0
  movsd  %xmm0,0x30(%rax)
  movsd  0x50(%rdx),%xmm0
  movsd  %xmm0,0x40(%rax)
  movsd  0x58(%rdx),%xmm0
  movsd  %xmm0,0x48(%rax)
  movsd  0x40(%rcx),%xmm0
  movsd  %xmm0,0x50(%rax)
  movsd  0x70(%rdx),%xmm0
  movsd  %xmm0,0x60(%rax)
  movsd  0x78(%rdx),%xmm0
  movsd  %xmm0,0x68(%rax)
  movsd  0x60(%rcx),%xmm0
  movsd  %xmm0,0x70(%rax)
  sub    $0xffffffffffffff80,%rdx
  sub    $0xffffffffffffff80,%rcx
  sub    $0xffffffffffffff80,%rax
  cmp    %rsi,%rdx
  jne    L18
  add    %r11,%r10
  add    %r11,%r8
  lea    0x4(,%rbx,4),%ecx
  cmp    %edi,%ecx
  jge    L35
L48:
  mov    %ecx,%edx
  mov    $0x0,%eax
L77:
  movsd  0x10(%rsi,%rax,1),%xmm0
  movsd  %xmm0,(%r8,%rax,1)
  movsd  0x18(%rsi,%rax,1),%xmm0
  movsd  %xmm0,0x8(%r8,%rax,1)
  movsd  (%r10,%rax,1),%xmm0
  movsd  %xmm0,0x10(%r8,%rax,1)
  add    $0x1,%edx
  add    $0x20,%rax
  cmp    %edx,%edi
  jg     L77
  lea    -0x1(%rdi),%eax
  sub    %ecx,%eax
  add    $0x1,%rax
  shl    $0x5,%rax
  cmp    %ecx,%edi
  mov    $0x20,%edx
  cmovle %rdx,%rax
  add    %rax,%rsi
  add    %rax,%r10
  add    %rax,%r8
L35:
  cmp    $0x1,%r9d
  je     L32
L69:
  pop    %rbx
  ret
L41:
  mov    %rdx,%rsi
  mov    $0x0,%ecx
  jmp    L48
L32:
  movsd  0x18(%rsi),%xmm0
  movsd  %xmm0,0x8(%r8)
  movsd  (%r10),%xmm0
  movsd  %xmm0,0x10(%r8)
  movsd  0x20(%r10),%xmm0
  movsd  %xmm0,0x30(%r8)
  jmp    L69
L75:
  ret
```

assistant: ```c
void kernel_dgecp_3_2_lib4(int tri, int kmax, double *A0, int sda, double *B) {
  if (tri == 1) {
    kmax += 1;
  }
  if (kmax <= 0)
    return;
  const int bs = 4;
  double *A1 = A0 + bs * sda;
  int k;
  for (k = 0; k < kmax - 3; k += 4) {
    B[0 + bs * 0] = A0[2 + bs * 0];
    B[1 + bs * 0] = A0[3 + bs * 0];
    B[2 + bs * 0] = A1[0 + bs * 0];
    B[0 + bs * 1] = A0[2 + bs * 1];
    B[1 + bs * 1] = A0[3 + bs * 1];
    B[2 + bs * 1] = A1[0 + bs * 1];
    B[0 + bs * 2] = A0[2 + bs * 2];
    B[1 + bs * 2] = A0[3 + bs * 2];
    B[2 + bs * 2] = A1[0 + bs * 2];
    B[0 + bs * 3] = A0[2 + bs * 3];
    B[1 + bs * 3] = A0[3 + bs * 3];
    B[2 + bs * 3] = A1[0 + bs * 3];
    A0 += 16;
    A1 += 16;
    B += 16;
  }
  for (; k < kmax; k++) {
    B[0 + bs * 0] = A0[2 + bs * 0];
    B[1 + bs * 0] = A0[3 + bs * 0];
    B[2 + bs * 0] = A1[0 + bs * 0];
    A0 += 4;
    A1 += 4;
    B += 4;
  }
  if (tri == 1) {
    B[1 + bs * 0] = A0[3 + bs * 0];
    B[2 + bs * 0] = A1[0 + bs * 0];
    B[2 + bs * 1] = A1[0 + bs * 1];
  }
}
```