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

```asm
<kernel_dgema_1_lib4>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %edi,-0x14(%rbp)
  mov    %esi,-0x18(%rbp)
  mov    %rdx,-0x20(%rbp)
  mov    %ecx,-0x24(%rbp)
  mov    %r8,-0x30(%rbp)
  mov    %r9d,-0x28(%rbp)
  movl   $0x4,-0x4(%rbp)
  cmpl   $0x0,-0x18(%rbp)
  jne    L297
  movl   $0x0,-0x8(%rbp)
  jmp    L200
L234:
  mov    -0x20(%rbp),%rax
  movsd  (%rax),%xmm0
  mov    -0x30(%rbp),%rax
  movsd  %xmm0,(%rax)
  mov    -0x30(%rbp),%rax
  lea    0x8(%rax),%rdx
  mov    -0x20(%rbp),%rax
  movsd  0x8(%rax),%xmm0
  movsd  %xmm0,(%rdx)
  mov    -0x30(%rbp),%rax
  lea    0x10(%rax),%rdx
  mov    -0x20(%rbp),%rax
  movsd  0x10(%rax),%xmm0
  movsd  %xmm0,(%rdx)
  mov    -0x30(%rbp),%rax
  lea    0x18(%rax),%rdx
  mov    -0x20(%rbp),%rax
  movsd  0x18(%rax),%xmm0
  movsd  %xmm0,(%rdx)
  mov    -0x4(%rbp),%eax
  imul   -0x24(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rax,-0x20(%rbp)
  mov    -0x4(%rbp),%eax
  imul   -0x28(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rax,-0x30(%rbp)
  addl   $0x4,-0x8(%rbp)
L200:
  mov    -0x14(%rbp),%eax
  sub    $0x3,%eax
  cmp    %eax,-0x8(%rbp)
  jl     L234
  jmp    L29
L49:
  mov    -0x20(%rbp),%rax
  movsd  (%rax),%xmm0
  mov    -0x30(%rbp),%rax
  movsd  %xmm0,(%rax)
  addq   $0x8,-0x20(%rbp)
  addq   $0x8,-0x30(%rbp)
  addl   $0x1,-0x8(%rbp)
L29:
  mov    -0x8(%rbp),%eax
  cmp    -0x14(%rbp),%eax
  jl     L49
  jmp    L68
L297:
  cmpl   $0x1,-0x18(%rbp)
  jne    L212
  movl   $0x0,-0x8(%rbp)
  jmp    L304
L85:
  mov    -0x30(%rbp),%rax
  lea    0x18(%rax),%rdx
  mov    -0x20(%rbp),%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,(%rdx)
  mov    -0x4(%rbp),%eax
  imul   -0x28(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rax,-0x30(%rbp)
  mov    -0x20(%rbp),%rax
  movsd  0x8(%rax),%xmm0
  mov    -0x30(%rbp),%rax
  movsd  %xmm0,(%rax)
  mov    -0x30(%rbp),%rax
  lea    0x8(%rax),%rdx
  mov    -0x20(%rbp),%rax
  movsd  0x10(%rax),%xmm0
  movsd  %xmm0,(%rdx)
  mov    -0x30(%rbp),%rax
  lea    0x10(%rax),%rdx
  mov    -0x20(%rbp),%rax
  movsd  0x18(%rax),%xmm0
  movsd  %xmm0,(%rdx)
  mov    -0x4(%rbp),%eax
  imul   -0x24(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rax,-0x20(%rbp)
  addl   $0x4,-0x8(%rbp)
L304:
  mov    -0x14(%rbp),%eax
  sub    $0x3,%eax
  cmp    %eax,-0x8(%rbp)
  jl     L85
  mov    -0x8(%rbp),%eax
  cmp    -0x14(%rbp),%eax
  jge    L64
  mov    -0x30(%rbp),%rax
  lea    0x18(%rax),%rdx
  mov    -0x20(%rbp),%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,(%rdx)
  addl   $0x1,-0x8(%rbp)
  mov    -0x8(%rbp),%eax
  cmp    -0x14(%rbp),%eax
  je     L275
  mov    -0x4(%rbp),%eax
  imul   -0x28(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rax,-0x30(%rbp)
  mov    -0x20(%rbp),%rax
  movsd  0x8(%rax),%xmm0
  mov    -0x30(%rbp),%rax
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x8(%rbp)
  mov    -0x8(%rbp),%eax
  cmp    -0x14(%rbp),%eax
  je     L310
  mov    -0x30(%rbp),%rax
  lea    0x8(%rax),%rdx
  mov    -0x20(%rbp),%rax
  movsd  0x10(%rax),%xmm0
  movsd  %xmm0,(%rdx)
  jmp    L68
L212:
  cmpl   $0x2,-0x18(%rbp)
  jne    L75
  movl   $0x0,-0x8(%rbp)
  jmp    L196
L69:
  mov    -0x30(%rbp),%rax
  lea    0x10(%rax),%rdx
  mov    -0x20(%rbp),%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,(%rdx)
  mov    -0x30(%rbp),%rax
  lea    0x18(%rax),%rdx
  mov    -0x20(%rbp),%rax
  movsd  0x8(%rax),%xmm0
  movsd  %xmm0,(%rdx)
  mov    -0x4(%rbp),%eax
  imul   -0x28(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rax,-0x30(%rbp)
  mov    -0x20(%rbp),%rax
  movsd  0x10(%rax),%xmm0
  mov    -0x30(%rbp),%rax
  movsd  %xmm0,(%rax)
  mov    -0x30(%rbp),%rax
  lea    0x8(%rax),%rdx
  mov    -0x20(%rbp),%rax
  movsd  0x18(%rax),%xmm0
  movsd  %xmm0,(%rdx)
  mov    -0x4(%rbp),%eax
  imul   -0x24(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rax,-0x20(%rbp)
  addl   $0x4,-0x8(%rbp)
L196:
  mov    -0x14(%rbp),%eax
  sub    $0x3,%eax
  cmp    %eax,-0x8(%rbp)
  jl     L69
  mov    -0x8(%rbp),%eax
  cmp    -0x14(%rbp),%eax
  jge    L101
  mov    -0x30(%rbp),%rax
  lea    0x10(%rax),%rdx
  mov    -0x20(%rbp),%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,(%rdx)
  addl   $0x1,-0x8(%rbp)
  mov    -0x8(%rbp),%eax
  cmp    -0x14(%rbp),%eax
  je     L130
  mov    -0x30(%rbp),%rax
  lea    0x18(%rax),%rdx
  mov    -0x20(%rbp),%rax
  movsd  0x8(%rax),%xmm0
  movsd  %xmm0,(%rdx)
  addl   $0x1,-0x8(%rbp)
  mov    -0x8(%rbp),%eax
  cmp    -0x14(%rbp),%eax
  je     L91
  mov    -0x4(%rbp),%eax
  imul   -0x28(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rax,-0x30(%rbp)
  mov    -0x20(%rbp),%rax
  movsd  0x18(%rax),%xmm0
  mov    -0x30(%rbp),%rax
  movsd  %xmm0,(%rax)
  jmp    L68
L75:
  movl   $0x0,-0x8(%rbp)
  jmp    L59
L175:
  mov    -0x30(%rbp),%rax
  lea    0x8(%rax),%rdx
  mov    -0x20(%rbp),%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,(%rdx)
  mov    -0x30(%rbp),%rax
  lea    0x10(%rax),%rdx
  mov    -0x20(%rbp),%rax
  movsd  0x8(%rax),%xmm0
  movsd  %xmm0,(%rdx)
  mov    -0x30(%rbp),%rax
  lea    0x18(%rax),%rdx
  mov    -0x20(%rbp),%rax
  movsd  0x10(%rax),%xmm0
  movsd  %xmm0,(%rdx)
  mov    -0x4(%rbp),%eax
  imul   -0x28(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rax,-0x30(%rbp)
  mov    -0x20(%rbp),%rax
  movsd  0x18(%rax),%xmm0
  mov    -0x30(%rbp),%rax
  movsd  %xmm0,(%rax)
  mov    -0x4(%rbp),%eax
  imul   -0x24(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rax,-0x20(%rbp)
  addl   $0x4,-0x8(%rbp)
L59:
  mov    -0x14(%rbp),%eax
  sub    $0x3,%eax
  cmp    %eax,-0x8(%rbp)
  jl     L175
  mov    -0x8(%rbp),%eax
  cmp    -0x14(%rbp),%eax
  jge    L54
  mov    -0x30(%rbp),%rax
  lea    0x8(%rax),%rdx
  mov    -0x20(%rbp),%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,(%rdx)
  addl   $0x1,-0x8(%rbp)
  mov    -0x8(%rbp),%eax
  cmp    -0x14(%rbp),%eax
  je     L183
  mov    -0x30(%rbp),%rax
  lea    0x10(%rax),%rdx
  mov    -0x20(%rbp),%rax
  movsd  0x8(%rax),%xmm0
  movsd  %xmm0,(%rdx)
  addl   $0x1,-0x8(%rbp)
  mov    -0x8(%rbp),%eax
  cmp    -0x14(%rbp),%eax
  je     L78
  mov    -0x30(%rbp),%rax
  lea    0x18(%rax),%rdx
  mov    -0x20(%rbp),%rax
  movsd  0x10(%rax),%xmm0
  movsd  %xmm0,(%rdx)
  jmp    L68
L64:
  nop
  jmp    L68
L275:
  nop
  jmp    L68
L310:
  nop
  jmp    L68
L101:
  nop
  jmp    L68
L130:
  nop
  jmp    L68
L91:
  nop
  jmp    L68
L54:
  nop
  jmp    L68
L183:
  nop
  jmp    L68
L78:
  nop
L68:
  pop    %rbp
  ret
```

assistant: ```c
void kernel_dgema_1_lib4(int kmax, int kna, double *A, int sda, double *C, int sdc) {
  const int bs = 4;
  int k;
  if (kna == 0) {
    k = 0;
    for (; k < kmax - 3; k += 4) {
      C[0 + bs * 0] = A[0 + bs * 0];
      C[1 + bs * 0] = A[1 + bs * 0];
      C[2 + bs * 0] = A[2 + bs * 0];
      C[3 + bs * 0] = A[3 + bs * 0];
      A += bs * sda;
      C += bs * sdc;
    }
    for (; k < kmax; k++) {
      C[0 + bs * 0] = A[0 + bs * 0];
      A += 1;
      C += 1;
    }
    return;
  } else if (kna == 1) {
    k = 0;
    for (; k < kmax - 3; k += 4) {
      C[3 + bs * 0] = A[0 + bs * 0];
      C += bs * sdc;
      C[0 + bs * 0] = A[1 + bs * 0];
      C[1 + bs * 0] = A[2 + bs * 0];
      C[2 + bs * 0] = A[3 + bs * 0];
      A += bs * sda;
    }
    if (k >= kmax) {
      return;
    }
    C[3 + bs * 0] = A[0 + bs * 0];
    k++;
    if (k == kmax) {
      return;
    }
    C += bs * sdc;
    C[0 + bs * 0] = A[1 + bs * 0];
    k++;
    if (k == kmax) {
      return;
    }
    C[1 + bs * 0] = A[2 + bs * 0];
    return;
  } else if (kna == 2) {
    k = 0;
    for (; k < kmax - 3; k += 4) {
      C[2 + bs * 0] = A[0 + bs * 0];
      C[3 + bs * 0] = A[1 + bs * 0];
      C += bs * sdc;
      C[0 + bs * 0] = A[2 + bs * 0];
      C[1 + bs * 0] = A[3 + bs * 0];
      A += bs * sda;
    }
    if (k >= kmax) {
      return;
    }
    C[2 + bs * 0] = A[0 + bs * 0];
    k++;
    if (k == kmax) {
      return;
    }
    C[3 + bs * 0] = A[1 + bs * 0];
    k++;
    if (k == kmax) {
      return;
    }
    C += bs * sdc;
    C[0 + bs * 0] = A[3 + bs * 0];
    return;
  } else {
    k = 0;
    for (; k < kmax - 3; k += 4) {
      C[1 + bs * 0] = A[0 + bs * 0];
      C[2 + bs * 0] = A[1 + bs * 0];
      C[3 + bs * 0] = A[2 + bs * 0];
      C += bs * sdc;
      C[0 + bs * 0] = A[3 + bs * 0];
      A += bs * sda;
    }
    if (k >= kmax) {
      return;
    }
    C[1 + bs * 0] = A[0 + bs * 0];
    k++;
    if (k == kmax) {
      return;
    }
    C[2 + bs * 0] = A[1 + bs * 0];
    k++;
    if (k == kmax) {
      return;
    }
    C[3 + bs * 0] = A[2 + bs * 0];
    return;
  }
}
```