user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<multiplica>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  mov    %rsi,%r12
  mov    $0x3e8,%esi
  push   %rbp
  push   %rbx
  mov    %ecx,%ebx
  sub    $0x38,%rsp
  mov    D3(%rip),%r15
  mov    %rdi,0x20(%rsp)
  mov    (%r15),%edi
  mov    %rdx,0x18(%rsp)
  mov    $0x180,%edx
  mov    %r8d,0x28(%rsp)
  call   <shmget@plt>
  test   %ebx,%ebx
  jle    L15
  mov    0x18(%rsp),%rsi
  mov    %eax,%r13d
  lea    -0x1(%rbx),%eax
  mov    %rsi,%rbp
  lea    0x8(%rsi,%rax,8),%r14
  cs nopw 0x0(%rax,%rax,1)
L181:
  xor    %edx,%edx
  xor    %esi,%esi
  mov    %r13d,%edi
  add    $0x8,%rbp
  call   <shmat@plt>
  mov    %rax,-0x8(%rbp)
  cmp    %r14,%rbp
  jne    L181
L15:
  mov    (%r15),%edi
  mov    $0x180,%edx
  mov    $0x4,%esi
  call   <shmget@plt>
  xor    %edx,%edx
  xor    %esi,%esi
  mov    %eax,%edi
  call   <shmat@plt>
  mov    %rax,%rbp
  cmp    0x28(%rsp),%ebx
  jl     L46
  mov    %ebx,%eax
  mov    0x28(%rsp),%edi
  cltd
  idiv   %edi
  mov    %edx,0x2c(%rsp)
  mov    %eax,0xc(%rsp)
  test   %edi,%edi
  jle    L99
  mov    0x18(%rsp),%rsi
  lea    -0x1(%rdi),%eax
  mov    0x20(%rsp),%r15
  movslq %ebx,%r13
  xor    %r11d,%r11d
  lea    0x8(%rsi,%rax,8),%rax
  mov    %r11d,%edx
  mov    %rax,0x10(%rsp)
  mov    %r13,%rax
  mov    %rbp,%r13
  mov    %r15,%rbp
  mov    %rax,%r14
  mov    %rsi,%r15
  jmp    L91
  nopl   (%rax)
L25:
  mov    %r8d,%edx
  add    $0x8,%r15
  add    $0x8,%rbp
  cmp    0x10(%rsp),%r15
  je     L158
L91:
  mov    %edx,0x8(%rsp)
  call   <fork@plt>
  mov    0xc(%rsp),%esi
  mov    0x8(%rsp),%edx
  lea    (%rsi,%rdx,1),%r8d
  test   %eax,%eax
  jne    L25
  mov    %r8d,0x0(%r13)
  mov    %edx,%r11d
  cmp    %r8d,%edx
  jge    L105
  movslq %edx,%rsi
  shl    $0x2,%rsi
  nopw   0x0(%rax,%rax,1)
L152:
  test   %ebx,%ebx
  jle    L75
  mov    (%r15),%rdi
  mov    0x0(%rbp),%r9
  xor    %eax,%eax
  add    %rsi,%rdi
  mov    (%rdi),%ecx
  nopw   0x0(%rax,%rax,1)
L124:
  mov    (%r12,%rax,8),%rdx
  mov    (%rdx,%rsi,1),%edx
  imul   (%r9,%rax,4),%edx
  add    $0x1,%rax
  add    %edx,%ecx
  mov    %ecx,(%rdi)
  cmp    %rax,%r14
  jne    L124
L75:
  add    $0x1,%r11d
  add    $0x4,%rsi
  cmp    %r11d,0x0(%r13)
  jg     L152
L105:
  mov    $0x1,%edi
  mov    %r8d,0x8(%rsp)
  call   <exit@plt>
  mov    0x8(%rsp),%r8d
  jmp    L25
L158:
  mov    0x2c(%rsp),%edx
  mov    0x28(%rsp),%eax
  mov    %r13,%rbp
  test   %edx,%edx
  je     L20
L29:
  mov    0x0(%rbp),%edx
  cmp    %edx,%ebx
  jle    L54
  lea    -0x1(%rbx),%r9d
  movslq %eax,%r10
  mov    0x18(%rsp),%r11
  movslq %edx,%rax
  mov    %r9d,%ecx
  shl    $0x3,%r10
  lea    0x0(,%rax,4),%rsi
  sub    %edx,%ecx
  add    %r10,%r11
  add    0x20(%rsp),%r10
  lea    0x1(%rax,%rcx,1),%r13
  shl    $0x2,%r13
  nopl   0x0(%rax,%rax,1)
L123:
  test   %ebx,%ebx
  jle    L85
  mov    (%r11),%rdi
  mov    (%r10),%r8
  xor    %eax,%eax
  add    %rsi,%rdi
  mov    (%rdi),%ecx
  nopl   0x0(%rax)
L190:
  mov    (%r12,%rax,8),%rdx
  mov    (%rdx,%rsi,1),%edx
  imul   (%r8,%rax,4),%edx
  add    %edx,%ecx
  mov    %rax,%rdx
  add    $0x1,%rax
  mov    %ecx,(%rdi)
  cmp    %r9,%rdx
  jne    L190
L85:
  add    $0x4,%rsi
  cmp    %rsi,%r13
  jne    L123
L54:
  mov    0x28(%rsp),%ecx
  test   %ecx,%ecx
  jle    L46
L20:
  mov    0x28(%rsp),%ebp
  xor    %ebx,%ebx
  nopl   0x0(%rax,%rax,1)
L154:
  xor    %edi,%edi
  add    $0x1,%ebx
  call   <wait@plt>
  cmp    %ebx,%ebp
  jg     L154
L46:
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L99:
  mov    0x2c(%rsp),%eax
  test   %eax,%eax
  je     L46
  xor    %eax,%eax
  jmp    L29
```

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);
  }
}
```