user: Converte this assembly snippet into its equivalent C code:

```asm
<rec_matmul>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdi,(%rsp)
  mov    %rsi,%r14
  mov    %rdx,0x8(%rsp)
  mov    %ecx,%ebp
  mov    %r8d,%ebx
  mov    %r9d,%r12d
  mov    0x68(%rsp),%r13d
  lea    (%rcx,%r8,1),%eax
  add    %r9d,%eax
  cmp    $0x40,%eax
  jg     L161
  test   %r13d,%r13d
  jne    L175
  test   %ecx,%ecx
  jle    L150
  movslq 0x60(%rsp),%rsi
  shl    $0x2,%rsi
  mov    $0x0,%r15d
  mov    %r9d,%r10d
  lea    -0x1(%r8),%eax
  mov    %rax,0x10(%rsp)
  lea    0x4(%rdi),%rax
  mov    %rax,0x18(%rsp)
  jmp    L155
L175:
  test   %ecx,%ecx
  jle    L150
  movslq 0x60(%rsp),%rsi
  shl    $0x2,%rsi
  mov    $0x0,%r15d
  mov    $0x0,%r13d
  mov    %r9d,%r10d
  lea    -0x1(%r8),%eax
  mov    %rax,0x10(%rsp)
  mov    (%rsp),%rax
  add    $0x4,%rax
  mov    %rax,0x18(%rsp)
  jmp    L35
L171:
  mov    %r8,%rdx
  mov    %r11,%rax
  pxor   %xmm1,%xmm1
L193:
  movss  (%rax),%xmm0
  mulss  (%rdx),%xmm0
  addss  %xmm0,%xmm1
  add    $0x4,%rax
  add    %rsi,%rdx
  cmp    %rcx,%rax
  jne    L193
L19:
  addss  (%r9,%rdi,4),%xmm1
  movss  %xmm1,(%r9,%rdi,4)
  add    $0x1,%rdi
  add    $0x4,%r8
  cmp    %r10,%rdi
  je     L12
L209:
  pxor   %xmm1,%xmm1
  test   %ebx,%ebx
  jg     L171
  jmp    L19
L12:
  add    $0x1,%r13d
  add    0x60(%rsp),%r15d
  cmp    %r13d,%ebp
  je     L150
L35:
  test   %r12d,%r12d
  jle    L12
  mov    %r14,%r8
  movslq %r15d,%rax
  lea    0x0(,%rax,4),%r9
  mov    (%rsp),%rdi
  lea    (%rdi,%r9,1),%r11
  add    0x10(%rsp),%rax
  mov    0x18(%rsp),%rdi
  lea    (%rdi,%rax,4),%rcx
  add    0x8(%rsp),%r9
  mov    $0x0,%edi
  jmp    L209
L246:
  mov    %r8,%rdx
  mov    %r11,%rax
  pxor   %xmm1,%xmm1
L163:
  movss  (%rax),%xmm0
  mulss  (%rdx),%xmm0
  addss  %xmm0,%xmm1
  add    $0x4,%rax
  add    %rsi,%rdx
  cmp    %rcx,%rax
  jne    L163
L2:
  movss  %xmm1,(%r9,%rdi,4)
  add    $0x1,%rdi
  add    $0x4,%r8
  cmp    %r10,%rdi
  je     L50
L205:
  pxor   %xmm1,%xmm1
  test   %ebx,%ebx
  jg     L246
  jmp    L2
L50:
  add    $0x1,%r13d
  add    0x60(%rsp),%r15d
  cmp    %r13d,%ebp
  je     L150
L155:
  test   %r12d,%r12d
  jle    L50
  mov    %r14,%r8
  movslq %r15d,%rax
  lea    0x0(,%rax,4),%r9
  mov    (%rsp),%rdi
  lea    (%rdi,%r9,1),%r11
  add    0x10(%rsp),%rax
  mov    0x18(%rsp),%rdi
  lea    (%rdi,%rax,4),%rcx
  add    0x8(%rsp),%r9
  mov    $0x0,%edi
  jmp    L205
L161:
  cmp    %r8d,%ecx
  jl     L83
  cmp    %r9d,%r8d
  jge    L15
L83:
  cmp    %r12d,%ebp
  mov    %r12d,%eax
  cmovge %ebp,%eax
  cmp    %eax,%ebx
  jl     L82
  mov    %ebx,%r15d
  sar    %r15d
  push   %r13
  mov    0x68(%rsp),%eax
  push   %rax
  mov    %r12d,%r9d
  mov    %r15d,%r8d
  mov    %ebp,%ecx
  mov    0x18(%rsp),%rdx
  mov    %r14,%rsi
  mov    0x10(%rsp),%r13
  mov    %r13,%rdi
  call   <rec_matmul>
  mov    %r15d,%eax
  imul   0x70(%rsp),%eax
  cltq
  lea    (%r14,%rax,4),%rsi
  movslq %r15d,%rax
  lea    0x0(%r13,%rax,4),%rdi
  push   $0x1
  mov    0x78(%rsp),%eax
  push   %rax
  mov    %r12d,%r9d
  sub    %r15d,%ebx
  mov    %ebx,%r8d
  mov    %ebp,%ecx
  mov    0x28(%rsp),%rdx
  call   <rec_matmul>
  add    $0x20,%rsp
L150:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L15:
  mov    %ecx,%r15d
  sar    %r15d
  push   %r13
  mov    0x68(%rsp),%eax
  push   %rax
  mov    %r15d,%ecx
  mov    0x18(%rsp),%rdx
  mov    0x10(%rsp),%rdi
  call   <rec_matmul>
  mov    %r15d,%eax
  imul   0x70(%rsp),%eax
  cltq
  shl    $0x2,%rax
  mov    %ebp,%ecx
  sub    %r15d,%ecx
  mov    0x18(%rsp),%rdx
  add    %rax,%rdx
  mov    0x10(%rsp),%rdi
  add    %rax,%rdi
  push   %r13
  mov    0x78(%rsp),%eax
  push   %rax
  mov    %r12d,%r9d
  mov    %ebx,%r8d
  mov    %r14,%rsi
  call   <rec_matmul>
  add    $0x20,%rsp
  jmp    L150
L82:
  mov    %r12d,%r15d
  sar    %r15d
  push   %r13
  mov    0x68(%rsp),%eax
  push   %rax
  mov    %r15d,%r9d
  mov    %ebx,%r8d
  mov    %ebp,%ecx
  mov    0x18(%rsp),%rdx
  mov    %r14,%rsi
  mov    0x10(%rsp),%rdi
  call   <rec_matmul>
  movslq %r15d,%rax
  shl    $0x2,%rax
  mov    0x18(%rsp),%rdx
  add    %rax,%rdx
  lea    (%r14,%rax,1),%rsi
  push   %r13
  mov    0x78(%rsp),%eax
  push   %rax
  mov    %r12d,%r9d
  sub    %r15d,%r9d
  mov    %ebx,%r8d
  mov    %ebp,%ecx
  mov    0x20(%rsp),%rdi
  call   <rec_matmul>
  add    $0x20,%rsp
  jmp    L150
```

assistant: ```c
void rec_matmul(float *A, float *B, float *C, int m, int n, int p, int ld, int add) {
  if ((m + n + p) <= 64) {
    int i, j, k;
    if (add) {
      for (i = 0; i < m; i++)
        for (k = 0; k < p; k++) {
          float c = 0.0;
          for (j = 0; j < n; j++)
            c += A[i * ld + j] * B[j * ld + k];
          C[i * ld + k] += c;
        }
    } else {
      for (i = 0; i < m; i++)
        for (k = 0; k < p; k++) {
          float c = 0.0;
          for (j = 0; j < n; j++)
            c += A[i * ld + j] * B[j * ld + k];
          C[i * ld + k] = c;
        }
    }
  } else if (m >= n && n >= p) {
    int m1 = m >> 1;
    rec_matmul(A, B, C, m1, n, p, ld, add);
    rec_matmul(A + m1 * ld, B, C + m1 * ld, m - m1, n, p, ld, add);
  } else if (n >= m && n >= p) {
    int n1 = n >> 1;
    rec_matmul(A, B, C, m, n1, p, ld, add);
    rec_matmul(A + n1, B + n1 * ld, C, m, n - n1, p, ld, 1);
  } else {
    int p1 = p >> 1;
    rec_matmul(A, B, C, m, n, p1, ld, add);
    rec_matmul(A, B + p1, C + p1, m, n, p - p1, ld, add);
  }
}
```