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

```asm
<kernel_sgemm_nt_4x4_lib4>:
  endbr64
  push   %rbx
  sub    $0x40,%rsp
  mov    %rsi,0x28(%rsp)
  mov    %rdx,0x20(%rsp)
  mov    %rcx,0x18(%rsp)
  mov    %r8,0x10(%rsp)
  mov    %r9d,0xc(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  test   %edi,%edi
  jle    1376 <.SDONE_4X4>
  mov    %edi,%eax
  and    $0x3,%edi
  sar    $0x2,%eax
  mov    %edi,0x34(%rsp)
  mov    %eax,0x30(%rsp)
  mov    0x28(%rsp),%rax
  mov    0x20(%rsp),%rbx
  movaps (%rax),%xmm0
  movaps 0x10(%rax),%xmm1
  movaps (%rbx),%xmm2
  xorpd  %xmm3,%xmm3
  movaps %xmm3,%xmm4
  movaps %xmm3,%xmm5
  movaps %xmm3,%xmm6
  movaps %xmm3,%xmm7
  movaps %xmm3,%xmm8
  movaps %xmm3,%xmm9
  movaps %xmm3,%xmm10
  movaps %xmm3,%xmm11
  mov    0x30(%rsp),%esi
  test   %esi,%esi
  je     1285 <.SCONSIDKLEFT_4X4>
```

assistant: ```c
void kernel_sgemm_nt_4x4_lib4(int kmax, float *A0, float *B, float *C0, float *D0, int alg) {
  if (kmax <= 0)
    return;
  int k_iter = kmax / 4;
  int k_left = kmax % 4;
  __asm__ volatile("                                \n\t"
                   "                                \n\t"
                   "movq          %2, %%rax         \n\t"
                   "movq          %3, %%rbx         \n\t"
                   "                                \n\t"
                   "                                \n\t"
                   "movaps        0(%%rax), %%xmm0  \n\t"
                   "movaps       16(%%rax), %%xmm1  \n\t"
                   "movaps        0(%%rbx), %%xmm2  \n\t"
                   "                                \n\t"
                   "                                \n\t"
                   "xorpd     %%xmm3,  %%xmm3       \n\t"
                   "movaps    %%xmm3,  %%xmm4       \n\t"
                   "movaps    %%xmm3,  %%xmm5       \n\t"
                   "movaps    %%xmm3,  %%xmm6       \n\t"
                   "movaps    %%xmm3,  %%xmm7       \n\t"
                   "movaps    %%xmm3,  %%xmm8       \n\t"
                   "movaps    %%xmm3,  %%xmm9       \n\t"
                   "movaps    %%xmm3, %%xmm10       \n\t"
                   "movaps    %%xmm3, %%xmm11       \n\t"
                   "                                \n\t"
                   "                                \n\t"
                   "                                \n\t"
                   "movl      %0, %%esi             \n\t"
                   "testl  %%esi, %%esi             \n\t"
                   "je     .SCONSIDKLEFT_4X4        \n\t"
                   "                                \n\t"
                   "                                \n\t"
                   "                                \n\t"
                   ".SLOOPKITER_4X4:                \n\t"
                   "                                \n\t"
                   "addps   %%xmm6, %%xmm10         \n\t"
                   "pshufd   $0x39, %%xmm2, %%xmm7  \n\t"
                   "mulps   %%xmm0, %%xmm2          \n\t"
                   "                                \n\t"
                   "addps   %%xmm4, %%xmm11         \n\t"
                   "pshufd   $0x39, %%xmm7, %%xmm6  \n\t"
                   "mulps   %%xmm0, %%xmm7          \n\t"
                   "                                \n\t"
                   "addps   %%xmm2, %%xmm8          \n\t"
                   "movaps       16(%%rbx), %%xmm2  \n\t"
                   "pshufd   $0x39, %%xmm6, %%xmm4  \n\t"
                   "mulps   %%xmm0, %%xmm6          \n\t"
                   "                                \n\t"
                   "addps   %%xmm7, %%xmm9          \n\t"
                   "mulps   %%xmm0, %%xmm4          \n\t"
                   "movaps       32(%%rax), %%xmm0  \n\t"
                   "                                \n\t"
                   "                                \n\t"
                   "addps   %%xmm6, %%xmm10         \n\t"
                   "pshufd   $0x39, %%xmm2, %%xmm7  \n\t"
                   "mulps   %%xmm1, %%xmm2          \n\t"
                   "                                \n\t"
                   "addps   %%xmm4, %%xmm11         \n\t"
                   "pshufd   $0x39, %%xmm7, %%xmm6  \n\t"
                   "mulps   %%xmm1, %%xmm7          \n\t"
                   "                                \n\t"
                   "addps   %%xmm2, %%xmm8          \n\t"
                   "movaps       32(%%rbx), %%xmm2  \n\t"
                   "pshufd   $0x39, %%xmm6, %%xmm4  \n\t"
                   "mulps   %%xmm1, %%xmm6          \n\t"
                   "                                \n\t"
                   "addps   %%xmm7, %%xmm9          \n\t"
                   "mulps   %%xmm1, %%xmm4          \n\t"
                   "movaps       48(%%rax), %%xmm1  \n\t"
                   "                                \n\t"
                   "                                \n\t"
                   "addps   %%xmm6, %%xmm10         \n\t"
                   "pshufd   $0x39, %%xmm2, %%xmm7  \n\t"
                   "mulps   %%xmm0, %%xmm2          \n\t"
                   "                                \n\t"
                   "addps   %%xmm4, %%xmm11         \n\t"
                   "pshufd   $0x39, %%xmm7, %%xmm6  \n\t"
                   "mulps   %%xmm0, %%xmm7          \n\t"
                   "                                \n\t"
                   "addps   %%xmm2, %%xmm8          \n\t"
                   "movaps       48(%%rbx), %%xmm2  \n\t"
                   "pshufd   $0x39, %%xmm6, %%xmm4  \n\t"
                   "mulps   %%xmm0, %%xmm6          \n\t"
                   "                                \n\t"
                   "addps   %%xmm7, %%xmm9          \n\t"
                   "mulps   %%xmm0, %%xmm4          \n\t"
                   "movaps       64(%%rax), %%xmm0  \n\t"
                   "                                \n\t"
                   "                                \n\t"
                   "addps   %%xmm6, %%xmm10         \n\t"
                   "pshufd   $0x39, %%xmm2, %%xmm7  \n\t"
                   "mulps   %%xmm1, %%xmm2          \n\t"
                   "addq       $64, %%rax           \n\t"
                   "                                \n\t"
                   "addps   %%xmm4, %%xmm11         \n\t"
                   "pshufd   $0x39, %%xmm7, %%xmm6  \n\t"
                   "mulps   %%xmm1, %%xmm7          \n\t"
                   "addq       $64, %%rbx           \n\t"
                   "                                \n\t"
                   "addps   %%xmm2, %%xmm8          \n\t"
                   "movaps         (%%rbx), %%xmm2  \n\t"
                   "pshufd   $0x39, %%xmm6, %%xmm4  \n\t"
                   "mulps   %%xmm1, %%xmm6          \n\t"
                   "                                \n\t"
                   "addps   %%xmm7, %%xmm9          \n\t"
                   "decl    %%esi                   \n\t"
                   "mulps   %%xmm1, %%xmm4          \n\t"
                   "movaps       16(%%rax), %%xmm1  \n\t"
                   "                                \n\t"
                   "                                \n\t"
                   "jne    .SLOOPKITER_4X4          \n\t"
                   "                                \n\t"
                   "                                \n\t"
                   "                                \n\t"
                   ".SCONSIDKLEFT_4X4:              \n\t"
                   "                                \n\t"
                   "movl      %1, %%esi             \n\t"
                   "testl  %%esi, %%esi             \n\t"
                   "je     .SPOSTACCUM_4X4          \n\t"
                   "                                \n\t"
                   "                                \n\t"
                   "                                \n\t"
                   ".SLOOPKLEFT_4X4:                \n\t"
                   "                                \n\t"
                   "addps   %%xmm6, %%xmm10         \n\t"
                   "pshufd   $0x39, %%xmm2, %%xmm7  \n\t"
                   "mulps   %%xmm0, %%xmm2          \n\t"
                   "                                \n\t"
                   "addps   %%xmm4, %%xmm11         \n\t"
                   "pshufd   $0x39, %%xmm7, %%xmm6  \n\t"
                   "mulps   %%xmm0, %%xmm7          \n\t"
                   "                                \n\t"
                   "addps   %%xmm2, %%xmm8          \n\t"
                   "movaps       16(%%rbx), %%xmm2  \n\t"
                   "pshufd   $0x39, %%xmm6, %%xmm4  \n\t"
                   "mulps   %%xmm0, %%xmm6          \n\t"
                   "                                \n\t"
                   "addps   %%xmm7, %%xmm9          \n\t"
                   "mulps   %%xmm0, %%xmm4          \n\t"
                   "movaps       16(%%rax), %%xmm0  \n\t"
                   "                                \n\t"
                   "addq          $16, %%rax        \n\t"
                   "addq          $16, %%rbx        \n\t"
                   "                                \n\t"
                   "                                \n\t"
                   "decl    %%esi                   \n\t"
                   "jne    .SLOOPKLEFT_4X4          \n\t"
                   "                                \n\t"
                   "                                \n\t"
                   "                                \n\t"
                   ".SPOSTACCUM_4X4:                \n\t"
                   "                                \n\t"
                   "addps   %%xmm6, %%xmm10         \n\t"
                   "addps   %%xmm4, %%xmm11         \n\t"
                   "                                \n\t"
                   "                                \n\t"
                   "                                \n\t"
                   "movaps  %%xmm9, %%xmm4          \n\t"
                   "shufps   $0xd8, %%xmm8,  %%xmm9 \n\t"
                   "shufps   $0xd8, %%xmm11, %%xmm8 \n\t"
                   "shufps   $0xd8, %%xmm10, %%xmm11\n\t"
                   "shufps   $0xd8, %%xmm4,  %%xmm10\n\t"
                   "                                \n\t"
                   "movaps  %%xmm8, %%xmm4          \n\t"
                   "shufps   $0xd8, %%xmm10, %%xmm8 \n\t"
                   "shufps   $0xd8, %%xmm4, %%xmm10 \n\t"
                   "movaps  %%xmm9, %%xmm5          \n\t"
                   "shufps   $0xd8, %%xmm11, %%xmm9 \n\t"
                   "shufps   $0xd8, %%xmm5, %%xmm11 \n\t"
                   "                                \n\t"
                   "                                \n\t"
                   "                                \n\t"
                   "movq   %4, %%rax                \n\t"
                   "movq   %6, %%r8                 \n\t"
                   "                                \n\t"
                   "                                \n\t"
                   "movl   %5, %%ecx                \n\t"
                   "testl  %%ecx, %%ecx             \n\t"
                   "je     .S0_4X4                  \n\t"
                   "                                \n\t"
                   "cmpl	$1, %%ecx                \n\t"
                   "                                \n\t"
                   "movaps  (%%rax),   %%xmm0       \n\t"
                   "movaps  16(%%rax), %%xmm1       \n\t"
                   "movaps  32(%%rax), %%xmm2       \n\t"
                   "movaps  48(%%rax), %%xmm3       \n\t"
                   "                                \n\t"
                   "je     .S1_4X4                  \n\t"
                   "                                \n\t"
                   "                                \n\t"
                   "subps  %%xmm8,  %%xmm0           \n\t"
                   "subps  %%xmm9,  %%xmm1           \n\t"
                   "subps  %%xmm10, %%xmm2           \n\t"
                   "subps  %%xmm11, %%xmm3           \n\t"
                   "                                \n\t"
                   "movaps  %%xmm0, (%%r8)         \n\t"
                   "movaps  %%xmm1, 16(%%r8)       \n\t"
                   "movaps  %%xmm2, 32(%%r8)       \n\t"
                   "movaps  %%xmm3, 48(%%r8)       \n\t"
                   "                                \n\t"
                   "jmp    .SDONE_4X4               \n\t"
                   "                                \n\t"
                   "                                \n\t"
                   "                                \n\t"
                   ".S1_4X4:                        \n\t"
                   "                                \n\t"
                   "addps  %%xmm0, %%xmm8           \n\t"
                   "addps  %%xmm1, %%xmm9           \n\t"
                   "addps  %%xmm2, %%xmm10          \n\t"
                   "addps  %%xmm3, %%xmm11          \n\t"
                   "                                \n\t"
                   ".S0_4X4:                        \n\t"
                   "                                \n\t"
                   "movaps	%%xmm8,  (%%r8)          \n\t"
                   "movaps	%%xmm9,  16(%%r8)        \n\t"
                   "movaps	%%xmm10, 32(%%r8)        \n\t"
                   "movaps	%%xmm11, 48(%%r8)        \n\t"
                   "                                \n\t"
                   "                                \n\t"
                   "                                \n\t"
                   "                                \n\t"
                   ".SDONE_4X4:                     \n\t"
                   "                                \n\t"
                   :
                   : "m"(k_iter), "m"(k_left), "m"(A0), "m"(B), "m"(C0), "m"(alg), "m"(D0)
                   : "rax", "rbx", "rcx", "r8", "r9", "rsi", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7", "xmm8", "xmm9", "xmm10", "xmm11", "xmm12", "xmm13", "xmm14", "xmm15", "memory");
}
```