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

```asm
<kernel_sgemm_nt_2x2_lib4>:
  endbr64
  test   %edi,%edi
  jle    L32
  push   %rbx
  mov    %rsi,%rax
  mov    %rdx,%rsi
  mov    %rcx,%r11
  cmp    $0x3,%edi
  jle    L30
  lea    -0x4(%rdi),%ebx
  shr    $0x2,%ebx
  lea    0x1(%rbx),%r10d
  mov    %r10d,%r10d
  shl    $0x6,%r10
  lea    (%rax,%r10,1),%rcx
  pxor   %xmm0,%xmm0
  movaps %xmm0,%xmm3
  movaps %xmm0,%xmm2
  movaps %xmm0,%xmm6
L46:
  movss  (%rax),%xmm4
  movss  0x4(%rax),%xmm1
  movss  (%rdx),%xmm5
  movss  0x4(%rdx),%xmm8
  movaps %xmm4,%xmm7
  mulss  %xmm5,%xmm7
  addss  %xmm6,%xmm7
  mulss  %xmm1,%xmm5
  addss  %xmm3,%xmm5
  mulss  %xmm8,%xmm4
  addss  %xmm2,%xmm4
  mulss  %xmm8,%xmm1
  addss  %xmm0,%xmm1
  movss  0x10(%rax),%xmm2
  movss  0x14(%rax),%xmm0
  movss  0x10(%rdx),%xmm3
  movss  0x14(%rdx),%xmm8
  movaps %xmm2,%xmm6
  mulss  %xmm3,%xmm6
  addss  %xmm7,%xmm6
  mulss  %xmm0,%xmm3
  addss  %xmm3,%xmm5
  mulss  %xmm8,%xmm2
  addss  %xmm2,%xmm4
  mulss  %xmm8,%xmm0
  addss  %xmm0,%xmm1
  movss  0x20(%rax),%xmm2
  movss  0x24(%rax),%xmm0
  movss  0x20(%rdx),%xmm3
  movss  0x24(%rdx),%xmm8
  movaps %xmm2,%xmm7
  mulss  %xmm3,%xmm7
  addss  %xmm6,%xmm7
  mulss  %xmm0,%xmm3
  addss  %xmm3,%xmm5
  mulss  %xmm8,%xmm2
  addss  %xmm2,%xmm4
  mulss  %xmm8,%xmm0
  addss  %xmm0,%xmm1
  movss  0x30(%rax),%xmm2
  movss  0x34(%rax),%xmm0
  movss  0x30(%rdx),%xmm3
  movss  0x34(%rdx),%xmm8
  movaps %xmm2,%xmm6
  mulss  %xmm3,%xmm6
  addss  %xmm7,%xmm6
  mulss  %xmm0,%xmm3
  addss  %xmm5,%xmm3
  mulss  %xmm8,%xmm2
  addss  %xmm4,%xmm2
  mulss  %xmm8,%xmm0
  addss  %xmm1,%xmm0
  add    $0x40,%rax
  add    $0x40,%rdx
  cmp    %rcx,%rax
  jne    L46
  add    %r10,%rsi
  lea    0x4(,%rbx,4),%eax
  cmp    %eax,%edi
  jle    L66
L69:
  movss  (%rcx),%xmm4
  movss  0x4(%rcx),%xmm1
  movss  (%rsi),%xmm5
  movss  0x4(%rsi),%xmm7
  movaps %xmm4,%xmm8
  mulss  %xmm5,%xmm8
  addss  %xmm8,%xmm6
  mulss  %xmm1,%xmm5
  addss  %xmm5,%xmm3
  mulss  %xmm7,%xmm4
  addss  %xmm4,%xmm2
  mulss  %xmm7,%xmm1
  addss  %xmm1,%xmm0
  add    $0x10,%rcx
  add    $0x10,%rsi
  add    $0x1,%eax
  cmp    %eax,%edi
  jg     L69
L66:
  test   %r9d,%r9d
  jne    L47
  movss  %xmm6,(%r8)
  movss  %xmm3,0x4(%r8)
  movss  %xmm2,0x10(%r8)
  movss  %xmm0,0x14(%r8)
L28:
  pop    %rbx
  ret
L30:
  mov    %rax,%rcx
  pxor   %xmm0,%xmm0
  movaps %xmm0,%xmm3
  movaps %xmm0,%xmm2
  movaps %xmm0,%xmm6
  mov    $0x0,%eax
  jmp    L69
L47:
  movss  (%r11),%xmm7
  movss  0x4(%r11),%xmm5
  movss  0x10(%r11),%xmm4
  movss  0x14(%r11),%xmm1
  cmp    $0x1,%r9d
  je     L35
  subss  %xmm6,%xmm7
  subss  %xmm3,%xmm5
  subss  %xmm2,%xmm4
  subss  %xmm0,%xmm1
L81:
  movss  %xmm7,(%r8)
  movss  %xmm5,0x4(%r8)
  movss  %xmm4,0x10(%r8)
  movss  %xmm1,0x14(%r8)
  jmp    L28
L35:
  addss  %xmm6,%xmm7
  addss  %xmm3,%xmm5
  addss  %xmm2,%xmm4
  addss  %xmm0,%xmm1
  jmp    L81
L32:
  ret
```

assistant: ```c
void kernel_sgemm_nt_2x2_lib4(int kmax, float *A, float *B, float *D, float *C, int alg) {
  if (kmax <= 0)
    return;
  const int lda = 4;
  const int ldc = 4;
  int k;
  float a_0, a_1, b_0, b_1, c_00 = 0, c_01 = 0, c_10 = 0, c_11 = 0;
  for (k = 0; k < kmax - 3; k += 4) {
    a_0 = A[0 + lda * 0];
    a_1 = A[1 + lda * 0];
    b_0 = B[0 + lda * 0];
    b_1 = B[1 + lda * 0];
    c_00 += a_0 * b_0;
    c_10 += a_1 * b_0;
    c_01 += a_0 * b_1;
    c_11 += a_1 * b_1;
    a_0 = A[0 + lda * 1];
    a_1 = A[1 + lda * 1];
    b_0 = B[0 + lda * 1];
    b_1 = B[1 + lda * 1];
    c_00 += a_0 * b_0;
    c_10 += a_1 * b_0;
    c_01 += a_0 * b_1;
    c_11 += a_1 * b_1;
    a_0 = A[0 + lda * 2];
    a_1 = A[1 + lda * 2];
    b_0 = B[0 + lda * 2];
    b_1 = B[1 + lda * 2];
    c_00 += a_0 * b_0;
    c_10 += a_1 * b_0;
    c_01 += a_0 * b_1;
    c_11 += a_1 * b_1;
    a_0 = A[0 + lda * 3];
    a_1 = A[1 + lda * 3];
    b_0 = B[0 + lda * 3];
    b_1 = B[1 + lda * 3];
    c_00 += a_0 * b_0;
    c_10 += a_1 * b_0;
    c_01 += a_0 * b_1;
    c_11 += a_1 * b_1;
    A += 16;
    B += 16;
  }
  for (; k < kmax; k++) {
    a_0 = A[0 + lda * 0];
    a_1 = A[1 + lda * 0];
    b_0 = B[0 + lda * 0];
    b_1 = B[1 + lda * 0];
    c_00 += a_0 * b_0;
    c_10 += a_1 * b_0;
    c_01 += a_0 * b_1;
    c_11 += a_1 * b_1;
    A += 4;
    B += 4;
  }
  float d_00, d_01, d_10, d_11;
  if (alg == 0) {
    C[0 + ldc * 0] = c_00;
    C[1 + ldc * 0] = c_10;
    C[0 + ldc * 1] = c_01;
    C[1 + ldc * 1] = c_11;
  } else {
    d_00 = D[0 + ldc * 0];
    d_10 = D[1 + ldc * 0];
    d_01 = D[0 + ldc * 1];
    d_11 = D[1 + ldc * 1];
    if (alg == 1) {
      d_00 += c_00;
      d_10 += c_10;
      d_01 += c_01;
      d_11 += c_11;
    } else {
      d_00 -= c_00;
      d_10 -= c_10;
      d_01 -= c_01;
      d_11 -= c_11;
    }
    C[0 + ldc * 0] = d_00;
    C[1 + ldc * 0] = d_10;
    C[0 + ldc * 1] = d_01;
    C[1 + ldc * 1] = d_11;
  }
}
```