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

```asm
<block_mult_ed>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x58,%rsp
  mov    %rdi,0x18(%rsp)
  mov    %rsi,0x20(%rsp)
  mov    %rdx,0x48(%rsp)
  mov    %ecx,%r14d
  mov    %r8d,%r12d
  mov    %ecx,%eax
  cltd
  idiv   %r8d
  mov    %eax,0x14(%rsp)
  movslq %ecx,%r13
  lea    0x0(,%r13,8),%rdi
  call   <malloc@plt>
  mov    %rax,0x38(%rsp)
  test   %r14d,%r14d
  jle    L278
  mov    %rax,%rbp
  shl    $0x2,%r13
  mov    %rax,%rbx
  mov    %r14d,%eax
  lea    0x0(%rbp,%rax,8),%r15
L54:
  mov    %r13,%rdi
  call   <malloc@plt>
  mov    %rax,0x0(%rbp)
  add    $0x8,%rbp
  cmp    %r15,%rbp
  jne    L54
  mov    %r14d,%ecx
  shl    $0x2,%rcx
L115:
  mov    $0x0,%eax
L165:
  mov    (%rbx),%rdx
  movl   $0x0,(%rdx,%rax,1)
  add    $0x4,%rax
  cmp    %rcx,%rax
  jne    L165
  add    $0x8,%rbx
  cmp    %r15,%rbx
  jne    L115
L278:
  movslq %r12d,%rbx
  lea    0x0(,%rbx,8),%rax
  mov    %rax,(%rsp)
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    %rax,%r15
  test   %r12d,%r12d
  jle    L211
  lea    0x0(,%rbx,4),%rax
  mov    %rax,0x8(%rsp)
  mov    %r15,%rbx
  mov    %r12d,%eax
  shl    $0x3,%rax
  mov    %rax,0x28(%rsp)
  lea    (%rax,%r15,1),%r13
  mov    %r15,%rbp
L8:
  mov    0x8(%rsp),%rdi
  call   <malloc@plt>
  mov    %rax,0x0(%rbp)
  add    $0x8,%rbp
  cmp    %r13,%rbp
  jne    L8
  mov    %r12d,%eax
  lea    0x0(,%rax,4),%rbp
L3:
  mov    $0x0,%eax
L156:
  mov    (%rbx),%rdx
  movl   $0x0,(%rdx,%rax,1)
  add    $0x4,%rax
  cmp    %rbp,%rax
  jne    L156
  add    $0x8,%rbx
  cmp    %r13,%rbx
  jne    L3
  mov    (%rsp),%rdi
  call   <malloc@plt>
  mov    %rax,%r13
  mov    %rax,%rbx
  mov    0x28(%rsp),%rax
  add    %r13,%rax
  mov    %rax,0x40(%rsp)
  mov    %r13,0x30(%rsp)
L24:
  mov    0x8(%rsp),%rdi
  call   <malloc@plt>
  mov    0x30(%rsp),%rdi
  mov    %rax,(%rdi)
  add    $0x8,%rdi
  mov    %rdi,0x30(%rsp)
  cmp    0x40(%rsp),%rdi
  jne    L24
L281:
  mov    $0x0,%eax
L4:
  mov    (%rbx),%rdx
  movl   $0x0,(%rdx,%rax,1)
  add    $0x4,%rax
  cmp    %rbp,%rax
  jne    L4
  add    $0x8,%rbx
  cmp    0x40(%rsp),%rbx
  jne    L281
  mov    (%rsp),%rdi
  call   <malloc@plt>
  mov    %rax,0x30(%rsp)
  mov    %rax,%rbx
  mov    0x28(%rsp),%rdi
  add    %rax,%rdi
  mov    %rdi,0x28(%rsp)
  mov    %rax,(%rsp)
L43:
  mov    0x8(%rsp),%rdi
  call   <malloc@plt>
  mov    (%rsp),%rdi
  mov    %rax,(%rdi)
  add    $0x8,%rdi
  mov    %rdi,(%rsp)
  cmp    0x28(%rsp),%rdi
  jne    L43
L146:
  mov    $0x0,%eax
L255:
  mov    (%rbx),%rdx
  movl   $0x0,(%rdx,%rax,1)
  add    $0x4,%rax
  cmp    %rbp,%rax
  jne    L255
  add    $0x8,%rbx
  cmp    0x28(%rsp),%rbx
  jne    L146
L40:
  cmpl   $0x0,0x14(%rsp)
  jle    L222
  lea    -0x1(%r12),%ebx
  add    $0x1,%rbx
  lea    (%r15,%rbx,8),%rax
  mov    %rax,0x40(%rsp)
  shl    $0x2,%rbx
  movl   $0x0,0x8(%rsp)
L200:
  movl   $0x0,(%rsp)
L264:
  mov    $0x0,%ebp
  mov    %rbx,0x28(%rsp)
  mov    0x30(%rsp),%rbx
L285:
  mov    %ebp,%r9d
  mov    0x8(%rsp),%r8d
  mov    %r12d,%ecx
  mov    %r14d,%edx
  mov    %r13,%rsi
  mov    0x18(%rsp),%rdi
  mov    $0x0,%eax
  call   <create_block_line@plt>
  mov    (%rsp),%r9d
  mov    %ebp,%r8d
  mov    %r12d,%ecx
  mov    %r14d,%edx
  mov    %rbx,%rsi
  mov    0x20(%rsp),%rdi
  mov    $0x0,%eax
  call   <create_block_column@plt>
  mov    %r12d,%ecx
  mov    %r13,%rdx
  mov    %rbx,%rsi
  mov    %r13,%rdi
  mov    $0x0,%eax
  call   <multy@plt>
  mov    %r12d,%ecx
  mov    %r15,%rdx
  mov    %r13,%rsi
  mov    %r15,%rdi
  mov    $0x0,%eax
  call   <sum@plt>
  add    $0x1,%ebp
  cmp    %ebp,0x14(%rsp)
  jne    L285
  mov    0x28(%rsp),%rbx
  mov    (%rsp),%r9d
  mov    0x8(%rsp),%r8d
  mov    %r12d,%ecx
  mov    %r14d,%edx
  mov    %r15,%rsi
  mov    0x38(%rsp),%rdi
  mov    $0x0,%eax
  call   <bring_block_back@plt>
  mov    %r15,%rcx
  mov    0x40(%rsp),%rsi
  test   %r12d,%r12d
  jle    L277
L235:
  mov    $0x0,%eax
L163:
  mov    (%rcx),%rdx
  movl   $0x0,(%rdx,%rax,1)
  add    $0x4,%rax
  cmp    %rax,%rbx
  jne    L163
  add    $0x8,%rcx
  cmp    %rsi,%rcx
  jne    L235
L277:
  addl   $0x1,(%rsp)
  mov    (%rsp),%eax
  cmp    %eax,0x14(%rsp)
  jne    L264
  addl   $0x1,0x8(%rsp)
  mov    0x8(%rsp),%eax
  cmp    %eax,0x14(%rsp)
  jne    L200
L222:
  test   %r14d,%r14d
  jle    L57
  mov    0x38(%rsp),%rsi
  mov    %rsi,%rbx
  mov    0x48(%rsp),%r8
  mov    %r14d,%edi
  lea    (%rsi,%rdi,8),%rbp
  shl    $0x2,%rdi
L176:
  mov    $0x0,%eax
L294:
  mov    (%rsi),%rdx
  mov    (%rdx,%rax,1),%ecx
  mov    (%r8),%rdx
  mov    %ecx,(%rdx,%rax,1)
  add    $0x4,%rax
  cmp    %rax,%rdi
  jne    L294
  add    $0x8,%rsi
  add    $0x8,%r8
  cmp    %rsi,%rbp
  jne    L176
L76:
  mov    (%rbx),%rdi
  call   <free@plt>
  add    $0x8,%rbx
  cmp    %rbp,%rbx
  jne    L76
L57:
  mov    0x38(%rsp),%rdi
  call   <free@plt>
  test   %r12d,%r12d
  jle    L62
  mov    %r15,%rbp
  mov    %r12d,%ebx
  shl    $0x3,%rbx
  lea    (%r15,%rbx,1),%r12
L218:
  mov    0x0(%rbp),%rdi
  call   <free@plt>
  add    $0x8,%rbp
  cmp    %r12,%rbp
  jne    L218
  mov    %r15,%rdi
  call   <free@plt>
  mov    %r13,%rbp
  lea    0x0(%r13,%rbx,1),%r12
L148:
  mov    0x0(%rbp),%rdi
  call   <free@plt>
  add    $0x8,%rbp
  cmp    %rbp,%r12
  jne    L148
  mov    %r13,%rdi
  call   <free@plt>
  mov    0x30(%rsp),%rax
  mov    %rax,%rbp
  add    %rax,%rbx
L145:
  mov    0x0(%rbp),%rdi
  call   <free@plt>
  add    $0x8,%rbp
  cmp    %rbx,%rbp
  jne    L145
L36:
  mov    0x30(%rsp),%rdi
  call   <free@plt>
  mov    $0x0,%eax
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L62:
  mov    %r15,%rdi
  call   <free@plt>
  mov    %r13,%rdi
  call   <free@plt>
  jmp    L36
L211:
  mov    (%rsp),%rbx
  mov    %rbx,%rdi
  call   <malloc@plt>
  mov    %rax,%r13
  mov    %rbx,%rdi
  call   <malloc@plt>
  mov    %rax,0x30(%rsp)
  jmp    L40
```

assistant: ```c
int block_mult_ed(int **input1, int **input2, int **out, int size, int param) {
  int i, j, k, a, b;
  int p = size / param;
  int **temp = (int **)malloc(size * sizeof(int *));
  for (i = 0; i < size; i++)
    temp[i] = (int *)malloc(size * sizeof(int));
  for (i = 0; i < size; i++)
    for (j = 0; j < size; j++)
      temp[i][j] = 0;
  int **temp_min = (int **)malloc(param * sizeof(int *));
  for (i = 0; i < param; i++)
    temp_min[i] = (int *)malloc(param * sizeof(int));
  for (i = 0; i < param; i++)
    for (j = 0; j < param; j++)
      temp_min[i][j] = 0;
  int **line = (int **)malloc(param * sizeof(int *));
  for (i = 0; i < param; i++)
    line[i] = (int *)malloc(param * sizeof(int));
  for (i = 0; i < param; i++)
    for (j = 0; j < param; j++)
      line[i][j] = 0;
  int **column = (int **)malloc(param * sizeof(int *));
  for (i = 0; i < param; i++)
    column[i] = (int *)malloc(param * sizeof(int));
  for (i = 0; i < param; i++)
    for (j = 0; j < param; j++)
      column[i][j] = 0;
  for (i = 0; i < p; i++)
    for (j = 0; j < p; j++) {
      for (k = 0; k < p; k++) {
        create_block_line(input1, line, size, param, i, k);
        create_block_column(input2, column, size, param, k, j);
        multy(line, column, line, param);
        sum(temp_min, line, temp_min, param);
      }
      bring_block_back(temp, temp_min, size, param, i, j);
      for (a = 0; a < param; a++)
        for (b = 0; b < param; b++)
          temp_min[a][b] = 0;
    }
  for (i = 0; i < size; i++)
    for (j = 0; j < size; j++)
      out[i][j] = temp[i][j];
  for (i = 0; i < size; i++)
    free(temp[i]);
  free(temp);
  for (i = 0; i < param; i++)
    free(temp_min[i]);
  free(temp_min);
  for (i = 0; i < param; i++)
    free(line[i]);
  free(line);
  for (i = 0; i < param; i++)
    free(column[i]);
  free(column);
  return 0;
}
```