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

```asm
<multiplica>:
  endbr64
  push   %r15
  mov    %ecx,%r15d
  push   %r14
  push   %r13
  mov    %rsi,%r13
  mov    $0x3e8,%esi
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    D8(%rip),%r14
  mov    %rdi,0x20(%rsp)
  mov    (%r14),%edi
  mov    %rdx,0x18(%rsp)
  mov    $0x180,%edx
  mov    %ecx,0x4(%rsp)
  mov    %r8d,0x14(%rsp)
  call   <shmget@plt>
  test   %r15d,%r15d
  jle    L179
  mov    %eax,%ebx
  mov    0x4(%rsp),%eax
  mov    0x18(%rsp),%rdi
  sub    $0x1,%eax
  mov    %rdi,%r15
  lea    0x8(%rdi,%rax,8),%r12
  nop
L214:
  xor    %edx,%edx
  xor    %esi,%esi
  mov    %ebx,%edi
  add    $0x8,%r15
  call   <shmat@plt>
  mov    %rax,-0x8(%r15)
  cmp    %r15,%r12
  jne    L214
L179:
  mov    (%r14),%edi
  mov    $0x180,%edx
  mov    $0x4,%esi
  call   <shmget@plt>
  xor    %edx,%edx
  xor    %esi,%esi
  mov    %eax,%edi
  call   <shmat@plt>
  mov    0x14(%rsp),%edi
  mov    %rax,%rbx
  cmp    %edi,0x4(%rsp)
  jl     L66
  mov    0x4(%rsp),%eax
  mov    %edi,%esi
  cltd
  idiv   %edi
  mov    %edx,0x2c(%rsp)
  mov    %eax,0x10(%rsp)
  test   %edi,%edi
  jle    L32
  mov    0x18(%rsp),%rdi
  lea    -0x1(%rsi),%eax
  mov    0x20(%rsp),%r12
  xor    %ebp,%ebp
  movslq 0x4(%rsp),%r14
  mov    %rdi,%r15
  lea    0x8(%rdi,%rax,8),%rdi
  mov    %rdi,0x8(%rsp)
  jmp    L77
  nopw   0x0(%rax,%rax,1)
L165:
  mov    %r9d,%ebp
  add    $0x8,%r15
  add    $0x8,%r12
  cmp    %r15,0x8(%rsp)
  je     L86
L77:
  call   <fork@plt>
  mov    0x10(%rsp),%edi
  lea    (%rdi,%rbp,1),%r9d
  test   %eax,%eax
  jne    L165
  mov    %r9d,(%rbx)
  mov    %ebp,%r10d
  cmp    %r9d,%ebp
  jge    L39
  mov    0x4(%rsp),%esi
  test   %esi,%esi
  jle    L39
  movslq %ebp,%rsi
  mov    (%r15),%r11
  mov    (%r12),%r8
  shl    $0x2,%rsi
L183:
  lea    (%r11,%rsi,1),%rdi
  xor    %eax,%eax
  mov    (%rdi),%ecx
  nopl   0x0(%rax,%rax,1)
L31:
  mov    0x0(%r13,%rax,8),%rdx
  mov    (%rdx,%rsi,1),%edx
  imul   (%r8,%rax,4),%edx
  add    $0x1,%rax
  add    %edx,%ecx
  mov    %ecx,(%rdi)
  cmp    %rax,%r14
  jne    L31
  add    $0x1,%r10d
  add    $0x4,%rsi
  cmp    (%rbx),%r10d
  jl     L183
L39:
  mov    $0x1,%edi
  mov    %r9d,0x28(%rsp)
  call   <exit@plt>
  mov    0x28(%rsp),%r9d
  jmp    L165
L86:
  mov    0x2c(%rsp),%edx
  test   %edx,%edx
  je     L181
  mov    (%rbx),%edx
  movslq 0x14(%rsp),%rax
  cmp    0x4(%rsp),%edx
  jge    L181
L35:
  mov    0x18(%rsp),%r8
  mov    0x4(%rsp),%ebx
  shl    $0x3,%rax
  add    %rax,%r8
  add    0x20(%rsp),%rax
  test   %ebx,%ebx
  jle    L95
  lea    -0x1(%rbx),%ecx
  movslq %edx,%rdi
  mov    (%rax),%r9
  mov    (%r8),%r11
  sub    %edx,%ecx
  lea    0x0(,%rdi,4),%rsi
  mov    %ebx,%r8d
  lea    0x1(%rdi,%rcx,1),%r10
  shl    $0x2,%r10
  nopl   0x0(%rax)
L67:
  lea    (%r11,%rsi,1),%rdi
  xor    %eax,%eax
  mov    (%rdi),%ecx
L162:
  mov    0x0(%r13,%rax,8),%rdx
  mov    (%rdx,%rsi,1),%edx
  imul   (%r9,%rax,4),%edx
  add    $0x1,%rax
  add    %edx,%ecx
  mov    %ecx,(%rdi)
  cmp    %r8,%rax
  jne    L162
  add    $0x4,%rsi
  cmp    %rsi,%r10
  jne    L67
L95:
  mov    0x14(%rsp),%ecx
  test   %ecx,%ecx
  jle    L66
L181:
  mov    0x14(%rsp),%ebp
  xor    %ebx,%ebx
  nopl   0x0(%rax)
L213:
  xor    %edi,%edi
  add    $0x1,%ebx
  call   <wait@plt>
  cmp    %ebx,%ebp
  jg     L213
L66:
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L32:
  mov    0x2c(%rsp),%eax
  test   %eax,%eax
  je     L66
  mov    (%rbx),%edx
  xor    %eax,%eax
  cmp    %edx,0x4(%rsp)
  jg     L35
  jmp    L66
```

assistant: ```c
void multiplica(int **m1, int **m2, int **m3, int tam, int nthreads) {
  int min, *max, i, l, c;
  int mrId = shmget(IPC_PRIVATE, 1000, 0600);
  for (i = 0; i < tam; i++)
    m3[i] = shmat(mrId, NULL, NULL);
  int maxId = shmget(IPC_PRIVATE, sizeof(int), 0600);
  max = shmat(maxId, NULL, NULL);
  int num = tam / nthreads;
  int resto = tam % nthreads;
  if (nthreads == tam || nthreads < tam) {
    for (l = 0; l < nthreads; l++) {
      int thread = fork();
      if (thread == 0) {
        min = l * num;
        *max = num * (l + 1);
        for (c = min; c < *max; c++)
          for (i = 0; i < tam; i++)
            m3[l][c] = m3[l][c] + (m1[l][i] * m2[i][c]);
        exit(1);
      }
    }
    if (resto != 0)
      for (c = *max; c < tam; c++)
        for (i = 0; i < tam; i++)
          m3[l][c] = m3[l][c] + (m1[l][i] * m2[i][c]);
    for (l = 0; l < nthreads; l++)
      wait(NULL);
  }
}
```