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

```asm
<cpu_gemm>:
  endbr64
  push   %r15
  mov    %ecx,%r11d
  push   %r14
  push   %r13
  push   %r12
  mov    %edx,%r12d
  push   %rbp
  push   %rbx
  mov    0x38(%rsp),%eax
  mov    0x58(%rsp),%r13d
  mov    %eax,-0x10(%rsp)
  mov    0x40(%rsp),%rax
  mov    %esi,-0x28(%rsp)
  mov    0x50(%rsp),%rsi
  mov    %rax,-0x18(%rsp)
  mov    0x48(%rsp),%eax
  mov    %edi,-0x2c(%rsp)
  mov    %r8d,-0x24(%rsp)
  mov    %r9,-0x20(%rsp)
  mov    %eax,-0xc(%rsp)
  test   %edx,%edx
  jle    L85
  test   %ecx,%ecx
  jle    L85
  lea    -0x1(%rcx),%eax
  mov    %ecx,%ebx
  movslq %r13d,%r14
  mov    %rsi,%r8
  mov    %eax,-0x30(%rsp)
  mov    %ecx,%eax
  movaps %xmm1,%xmm4
  movaps %xmm1,%xmm3
  shr    $0x2,%eax
  lea    0x0(,%r14,4),%r15
  and    $0xfffffffc,%ebx
  xor    %ecx,%ecx
  lea    -0x1(%rax),%ebp
  xor    %r9d,%r9d
  xor    %r10d,%r10d
  shufps $0xe0,%xmm4,%xmm4
  add    $0x1,%rbp
  shufps $0x0,%xmm3,%xmm3
  shl    $0x4,%rbp
  nopw   0x0(%rax,%rax,1)
L83:
  cmpl   $0x2,-0x30(%rsp)
  lea    0x0(%rbp,%r8,1),%rdx
  mov    %r8,%rax
  jbe    L21
  nopl   0x0(%rax,%rax,1)
L44:
  movups (%rax),%xmm2
  add    $0x10,%rax
  mulps  %xmm3,%xmm2
  movups %xmm2,-0x10(%rax)
  cmp    %rdx,%rax
  jne    L44
  cmp    %ebx,%r11d
  je     L8
  mov    %ebx,%edx
  mov    %ebx,%eax
L103:
  mov    %r11d,%edi
  sub    %edx,%edi
  cmp    $0x1,%edi
  je     L101
  add    %r9,%rdx
  lea    (%rsi,%rdx,4),%rdx
  movq   (%rdx),%xmm2
  mulps  %xmm4,%xmm2
  movlps %xmm2,(%rdx)
  mov    %edi,%edx
  and    $0xfffffffe,%edx
  add    %edx,%eax
  cmp    %edx,%edi
  je     L8
L101:
  add    %ecx,%eax
  cltq
  lea    (%rsi,%rax,4),%rax
  movss  (%rax),%xmm2
  mulss  %xmm1,%xmm2
  movss  %xmm2,(%rax)
L8:
  add    $0x1,%r10d
  add    %r15,%r8
  add    %r13d,%ecx
  add    %r14,%r9
  cmp    %r10d,%r12d
  jne    L83
L85:
  mov    -0x2c(%rsp),%eax
  or     -0x28(%rsp),%eax
  je     L137
  mov    -0x2c(%rsp),%edi
  test   %edi,%edi
  je     L52
  mov    -0x28(%rsp),%edx
  test   %edx,%edx
  jne    L49
  mov    -0xc(%rsp),%eax
  mov    -0x20(%rsp),%r9
  mov    %r12d,%edx
  mov    %r11d,%ecx
  mov    -0x24(%rsp),%r8d
  mov    %rsi,0x50(%rsp)
  xor    %esi,%esi
  mov    %eax,0x48(%rsp)
  mov    -0x18(%rsp),%rax
  mov    %r13d,0x58(%rsp)
  mov    %rax,0x40(%rsp)
  mov    -0x10(%rsp),%eax
  mov    %eax,0x38(%rsp)
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    10b0 <cpu_gemm_tn@plt>
L21:
  xor    %edx,%edx
  xor    %eax,%eax
  jmp    L103
L49:
  mov    -0x2c(%rsp),%eax
  test   %eax,%eax
  jne    L126
L52:
  mov    -0x28(%rsp),%eax
  test   %eax,%eax
  je     L126
  mov    -0xc(%rsp),%ebx
  mov    -0x20(%rsp),%r9
  mov    %rsi,0x50(%rsp)
  xor    %edi,%edi
  mov    -0x24(%rsp),%r8d
  mov    %r13d,0x58(%rsp)
  mov    %r12d,%edx
  mov    %r11d,%ecx
  mov    %ebx,0x48(%rsp)
  mov    -0x18(%rsp),%rbx
  mov    %eax,%esi
  mov    %rbx,0x40(%rsp)
  mov    -0x10(%rsp),%ebx
  mov    %ebx,0x38(%rsp)
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1080 <cpu_gemm_nt@plt>
L137:
  mov    -0xc(%rsp),%eax
  mov    -0x20(%rsp),%r9
  mov    %rsi,0x50(%rsp)
  xor    %edi,%edi
  mov    -0x24(%rsp),%r8d
  mov    %r13d,0x58(%rsp)
  mov    %r12d,%edx
  mov    %r11d,%ecx
  mov    %eax,0x48(%rsp)
  mov    -0x18(%rsp),%rax
  xor    %esi,%esi
  mov    %rax,0x40(%rsp)
  mov    -0x10(%rsp),%eax
  mov    %eax,0x38(%rsp)
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    10a0 <cpu_gemm_nn@plt>
L126:
  mov    -0xc(%rsp),%eax
  mov    %rsi,0x50(%rsp)
  mov    %r12d,%edx
  mov    %r11d,%ecx
  mov    -0x20(%rsp),%r9
  mov    -0x24(%rsp),%r8d
  mov    %r13d,0x58(%rsp)
  mov    -0x28(%rsp),%esi
  mov    -0x2c(%rsp),%edi
  mov    %eax,0x48(%rsp)
  mov    -0x18(%rsp),%rax
  mov    %rax,0x40(%rsp)
  mov    -0x10(%rsp),%eax
  mov    %eax,0x38(%rsp)
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1090 <cpu_gemm_tt@plt>
```

assistant: ```c
void cpu_gemm(int TA, int TB, int M, int N, int K, float ALPHA, float *A, int lda, float *B, int ldb, float BETA, float *C, int ldc) {
  int i, j;
  for (i = 0; i < M; ++i) {
    for (j = 0; j < N; ++j) {
      C[i * ldc + j] *= BETA;
    }
  }
  if (!TA && !TB)
    cpu_gemm_nn(TA, TB, M, N, K, ALPHA, A, lda, B, ldb, BETA, C, ldc);
  else if (TA && !TB)
    cpu_gemm_tn(TA, TB, M, N, K, ALPHA, A, lda, B, ldb, BETA, C, ldc);
  else if (!TA && TB)
    cpu_gemm_nt(TA, TB, M, N, K, ALPHA, A, lda, B, ldb, BETA, C, ldc);
  else
    cpu_gemm_tt(TA, TB, M, N, K, ALPHA, A, lda, B, ldb, BETA, C, ldc);
}
```