user: Translate the below assembly code into C programming language:

```asm
<kernel_dgecp_3_0_lib4>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %edi,-0x14(%rbp)
  mov    %esi,-0x18(%rbp)
  mov    %rdx,-0x20(%rbp)
  mov    %rcx,-0x28(%rbp)
  cmpl   $0x1,-0x14(%rbp)
  jne    L40
  addl   $0x1,-0x18(%rbp)
L40:
  cmpl   $0x0,-0x18(%rbp)
  jle    L68
  movl   $0x4,-0x4(%rbp)
  movl   $0x0,-0x8(%rbp)
  jmp    L74
L19:
  mov    -0x20(%rbp),%rax
  movsd  (%rax),%xmm0
  mov    -0x28(%rbp),%rax
  movsd  %xmm0,(%rax)
  mov    -0x28(%rbp),%rax
  lea    0x8(%rax),%rdx
  mov    -0x20(%rbp),%rax
  movsd  0x8(%rax),%xmm0
  movsd  %xmm0,(%rdx)
  mov    -0x28(%rbp),%rax
  lea    0x10(%rax),%rdx
  mov    -0x20(%rbp),%rax
  movsd  0x10(%rax),%xmm0
  movsd  %xmm0,(%rdx)
  mov    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rax,%rdx
  mov    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x28(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x4(%rbp),%eax
  add    $0x1,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rax,%rdx
  mov    -0x4(%rbp),%eax
  add    $0x1,%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x28(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x4(%rbp),%eax
  add    $0x2,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rax,%rdx
  mov    -0x4(%rbp),%eax
  add    $0x2,%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x28(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x4(%rbp),%eax
  add    %eax,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rax,%rdx
  mov    -0x4(%rbp),%eax
  add    %eax,%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x28(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x4(%rbp),%eax
  add    %eax,%eax
  add    $0x1,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rax,%rdx
  mov    -0x4(%rbp),%eax
  add    %eax,%eax
  add    $0x1,%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x28(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x4(%rbp),%eax
  add    $0x1,%eax
  add    %eax,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rax,%rdx
  mov    -0x4(%rbp),%eax
  add    $0x1,%eax
  add    %eax,%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x28(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x4(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x4(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rcx),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x4(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  add    $0x1,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x4(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  add    $0x1,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rcx),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x4(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  add    $0x2,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x4(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  add    $0x2,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rcx),%xmm0
  movsd  %xmm0,(%rax)
  subq   $0xffffffffffffff80,-0x20(%rbp)
  subq   $0xffffffffffffff80,-0x28(%rbp)
  addl   $0x4,-0x8(%rbp)
L74:
  mov    -0x18(%rbp),%eax
  sub    $0x3,%eax
  cmp    %eax,-0x8(%rbp)
  jl     L19
  jmp    L0
L49:
  mov    -0x20(%rbp),%rax
  movsd  (%rax),%xmm0
  mov    -0x28(%rbp),%rax
  movsd  %xmm0,(%rax)
  mov    -0x28(%rbp),%rax
  lea    0x8(%rax),%rdx
  mov    -0x20(%rbp),%rax
  movsd  0x8(%rax),%xmm0
  movsd  %xmm0,(%rdx)
  mov    -0x28(%rbp),%rax
  lea    0x10(%rax),%rdx
  mov    -0x20(%rbp),%rax
  movsd  0x10(%rax),%xmm0
  movsd  %xmm0,(%rdx)
  addq   $0x20,-0x20(%rbp)
  addq   $0x20,-0x28(%rbp)
  addl   $0x1,-0x8(%rbp)
L0:
  mov    -0x8(%rbp),%eax
  cmp    -0x18(%rbp),%eax
  jl     L49
  cmpl   $0x1,-0x14(%rbp)
  jne    L17
  mov    -0x28(%rbp),%rax
  lea    0x8(%rax),%rdx
  mov    -0x20(%rbp),%rax
  movsd  0x8(%rax),%xmm0
  movsd  %xmm0,(%rdx)
  mov    -0x28(%rbp),%rax
  lea    0x10(%rax),%rdx
  mov    -0x20(%rbp),%rax
  movsd  0x10(%rax),%xmm0
  movsd  %xmm0,(%rdx)
  mov    -0x4(%rbp),%eax
  add    $0x2,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rax,%rdx
  mov    -0x4(%rbp),%eax
  add    $0x2,%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x28(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  jmp    L17
L68:
  nop
L17:
  pop    %rbp
  ret
```

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