user: Please show me the C implementation that matches the assembly code listed below:

```asm
<dgemm1>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  movslq %r8d,%rbx
  sub    $0x30,%rsp
  mov    %rdi,0x20(%rsp)
  mov    %rsi,-0x28(%rsp)
  mov    %ecx,-0x68(%rsp)
  mov    %ebx,-0x20(%rsp)
  test   %ecx,%ecx
  jle    L37
  mov    %ebx,%eax
  mov    %rbx,0x8(%rsp)
  mov    %rdx,%r14
  imul   %ecx,%eax
  movq   $0x0,(%rsp)
  movl   $0x0,-0x8(%rsp)
  movl   $0x0,-0x10(%rsp)
  mov    %eax,-0x4(%rsp)
  cltq
  mov    %rax,0x18(%rsp)
  movslq %ecx,%rax
  lea    0x0(,%rax,8),%r15
L84:
  mov    -0x10(%rsp),%eax
  mov    -0x20(%rsp),%ebx
  mov    -0x4(%rsp),%edi
  add    %eax,%ebx
  mov    %ebx,-0x34(%rsp)
  cmp    %ebx,%eax
  jge    L117
  mov    -0x20(%rsp),%eax
  movl   $0x0,-0xc(%rsp)
  movq   $0x0,-0x18(%rsp)
  mov    %eax,-0x64(%rsp)
  movl   $0x0,-0x38(%rsp)
  movl   $0x0,-0x44(%rsp)
L71:
  mov    -0x64(%rsp),%ebx
  cmp    %ebx,-0x44(%rsp)
  jge    L85
  mov    0x20(%rsp),%rbx
  movslq -0xc(%rsp),%rax
  movq   $0x0,-0x60(%rsp)
  add    (%rsp),%rax
  movl   $0x0,-0x1c(%rsp)
  lea    (%rbx,%rax,8),%rax
  mov    -0x20(%rsp),%r13d
  mov    %rax,0x10(%rsp)
  mov    -0x18(%rsp),%rax
  lea    (%r14,%rax,8),%rax
  mov    %rax,-0x40(%rsp)
L17:
  mov    -0x1c(%rsp),%ebx
  cmp    %r13d,%ebx
  jge    L142
  mov    -0x60(%rsp),%rdi
  mov    -0x40(%rsp),%rax
  mov    %r13d,%r12d
  sub    %ebx,%r12d
  lea    (%rax,%rdi,8),%rax
  mov    %rax,-0x30(%rsp)
  mov    %r12d,%eax
  shr    %eax
  lea    -0x1(%rax),%r10d
  mov    %r12d,%eax
  and    $0xfffffffe,%eax
  add    $0x1,%r10
  mov    %eax,-0x58(%rsp)
  add    %ebx,%eax
  shl    $0x4,%r10
  mov    %eax,%edi
  mov    0x10(%rsp),%rax
  mov    %rax,-0x50(%rsp)
  mov    -0x8(%rsp),%eax
  mov    %eax,-0x48(%rsp)
  mov    -0x10(%rsp),%eax
  mov    %eax,-0x54(%rsp)
  nopl   (%rax)
L15:
  movslq -0x48(%rsp),%rax
  mov    -0x60(%rsp),%rbx
  mov    -0x40(%rsp),%rsi
  mov    -0x44(%rsp),%r11d
  lea    0x1(%rax,%rbx,1),%rdx
  mov    -0x28(%rsp),%rbx
  shl    $0x3,%rdx
  lea    (%rbx,%rdx,1),%rcx
  lea    -0x8(%rbx,%rdx,1),%r9
  lea    (%rdi,%rax,1),%edx
  mov    %rcx,-0x70(%rsp)
  lea    (%rbx,%rax,8),%rbp
  mov    -0x38(%rsp),%ecx
  movslq %edx,%rdx
  lea    (%rbx,%rdx,8),%r8
  mov    -0x30(%rsp),%rdx
  mov    -0x50(%rsp),%rbx
  nopl   0x0(%rax)
L110:
  movsd  (%rbx),%xmm1
  cmp    %rdx,-0x70(%rsp)
  je     L58
  cmp    $0x1,%r12d
  je     L58
  movapd %xmm1,%xmm2
  xor    %eax,%eax
  unpcklpd %xmm2,%xmm2
  nopl   0x0(%rax,%rax,1)
L144:
  movupd (%r9,%rax,1),%xmm0
  movupd (%rdx,%rax,1),%xmm3
  mulpd  %xmm2,%xmm0
  addpd  %xmm3,%xmm0
  movups %xmm0,(%rdx,%rax,1)
  add    $0x10,%rax
  cmp    %rax,%r10
  jne    L144
  cmp    %r12d,-0x58(%rsp)
  je     L11
  mulsd  (%r8),%xmm1
  lea    (%rcx,%rdi,1),%eax
  cltq
  lea    (%r14,%rax,8),%rax
  movsd  (%rax),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
L11:
  add    $0x1,%r11d
  add    %r15,%rbx
  add    %r15,%rdx
  add    -0x68(%rsp),%ecx
  add    %r15,%rsi
  cmp    -0x64(%rsp),%r11d
  jne    L110
  addl   $0x1,-0x54(%rsp)
  mov    -0x68(%rsp),%esi
  addq   $0x8,-0x50(%rsp)
  mov    -0x54(%rsp),%eax
  add    %esi,-0x48(%rsp)
  cmp    -0x34(%rsp),%eax
  jne    L15
L142:
  mov    -0x20(%rsp),%ebx
  mov    0x8(%rsp),%rdi
  add    %ebx,-0x1c(%rsp)
  mov    -0x1c(%rsp),%eax
  add    %rdi,-0x60(%rsp)
  add    %ebx,%r13d
  cmp    %eax,-0x68(%rsp)
  jg     L17
L85:
  mov    -0x20(%rsp),%ebx
  mov    -0x4(%rsp),%edi
  add    %ebx,-0x44(%rsp)
  mov    0x18(%rsp),%rsi
  add    %ebx,-0x64(%rsp)
  mov    -0x44(%rsp),%eax
  add    %edi,-0x38(%rsp)
  add    %rsi,-0x18(%rsp)
  add    %edi,-0xc(%rsp)
  cmp    %eax,-0x68(%rsp)
  jg     L71
L117:
  mov    -0x34(%rsp),%eax
  add    %edi,-0x8(%rsp)
  mov    0x8(%rsp),%rdi
  add    %rdi,(%rsp)
  mov    %eax,-0x10(%rsp)
  cmp    %eax,-0x68(%rsp)
  jg     L84
L37:
  add    $0x30,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nop
L58:
  mov    -0x60(%rsp),%rax
  nopl   (%rax)
L31:
  movsd  0x0(%rbp,%rax,8),%xmm0
  mulsd  %xmm1,%xmm0
  addsd  (%rsi,%rax,8),%xmm0
  movsd  %xmm0,(%rsi,%rax,8)
  add    $0x1,%rax
  cmp    %eax,%r13d
  jg     L31
  jmp    L11
```

assistant: ```c
void dgemm1(double *a, double *b, double *c, int n, int BLOCK_SIZE) {
  int i, j, k;
  int ii, jj, kk;
  for (k = 0; k < n; k += BLOCK_SIZE) {
    for (i = 0; i < n; i += BLOCK_SIZE) {
      for (j = 0; j < n; j += BLOCK_SIZE) {
        for (kk = k; kk < k + BLOCK_SIZE; kk++) {
          for (ii = i; ii < i + BLOCK_SIZE; ii++) {
            register double r = a[ii * n + kk];
            for (jj = j; jj < j + BLOCK_SIZE; jj++) {
              c[ii * n + jj] += r * b[kk * n + jj];
            }
          }
        }
      }
    }
  }
}
```