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

```asm
<multiply_blocked>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    %ecx,-0x3c(%rbp)
  mov    %r8d,-0x40(%rbp)
  movl   $0x0,-0x18(%rbp)
  jmp    L117
L62:
  movl   $0x0,-0x14(%rbp)
  jmp    L71
L73:
  movl   $0x0,-0x10(%rbp)
  jmp    L125
L38:
  movl   $0x0,-0xc(%rbp)
  jmp    L52
L116:
  movl   $0x0,-0x8(%rbp)
  jmp    L136
L67:
  movl   $0x0,-0x4(%rbp)
  jmp    L22
L115:
  mov    -0x18(%rbp),%edx
  mov    -0xc(%rbp),%eax
  add    %edx,%eax
  imul   -0x3c(%rbp),%eax
  mov    -0x14(%rbp),%ecx
  mov    -0x8(%rbp),%edx
  add    %ecx,%edx
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x18(%rbp),%edx
  mov    -0xc(%rbp),%eax
  add    %edx,%eax
  imul   -0x3c(%rbp),%eax
  mov    -0x10(%rbp),%ecx
  mov    -0x4(%rbp),%edx
  add    %ecx,%edx
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm2
  mov    -0x10(%rbp),%edx
  mov    -0x4(%rbp),%eax
  add    %edx,%eax
  imul   -0x3c(%rbp),%eax
  mov    -0x14(%rbp),%ecx
  mov    -0x8(%rbp),%edx
  add    %ecx,%edx
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm2,%xmm0
  mov    -0x18(%rbp),%edx
  mov    -0xc(%rbp),%eax
  add    %edx,%eax
  imul   -0x3c(%rbp),%eax
  mov    -0x14(%rbp),%ecx
  mov    -0x8(%rbp),%edx
  add    %ecx,%edx
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x4(%rbp)
L22:
  mov    -0x4(%rbp),%eax
  cmp    -0x40(%rbp),%eax
  jge    L124
  mov    -0x10(%rbp),%edx
  mov    -0x4(%rbp),%eax
  add    %edx,%eax
  cmp    %eax,-0x3c(%rbp)
  jg     L115
L124:
  addl   $0x1,-0x8(%rbp)
L136:
  mov    -0x8(%rbp),%eax
  cmp    -0x40(%rbp),%eax
  jge    L100
  mov    -0x14(%rbp),%edx
  mov    -0x8(%rbp),%eax
  add    %edx,%eax
  cmp    %eax,-0x3c(%rbp)
  jg     L67
L100:
  addl   $0x1,-0xc(%rbp)
L52:
  mov    -0xc(%rbp),%eax
  cmp    -0x40(%rbp),%eax
  jge    L20
  mov    -0x18(%rbp),%edx
  mov    -0xc(%rbp),%eax
  add    %edx,%eax
  cmp    %eax,-0x3c(%rbp)
  jg     L116
L20:
  mov    -0x40(%rbp),%eax
  add    %eax,-0x10(%rbp)
L125:
  mov    -0x10(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  jl     L38
  mov    -0x40(%rbp),%eax
  add    %eax,-0x14(%rbp)
L71:
  mov    -0x14(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  jl     L73
  mov    -0x40(%rbp),%eax
  add    %eax,-0x18(%rbp)
L117:
  mov    -0x18(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  jl     L62
  nop
  nop
  pop    %rbp
  ret
```

assistant: ```c
void multiply_blocked(double *a, double *b, double *c, int n, int B) {
  int i, j, k, i1, j1, k1;
  for (i = 0; i < n; i += B)
    for (j = 0; j < n; j += B)
      for (k = 0; k < n; k += B)
        for (i1 = 0; i1 < B && i + i1 < n; i1++)
          for (j1 = 0; j1 < B && j + j1 < n; j1++)
            for (k1 = 0; k1 < B && k + k1 < n; k1++)
              c[(i + i1) * n + (j + j1)] += a[(i + i1) * n + (k + k1)] * b[(k + k1) * n + (j + j1)];
}
```