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

```asm
<test_mm_njnini_b_c_bc_i4_d>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x28(%rbp)
  mov    %rsp,%rax
  cmp    %rax,%rsp
  je     L34
L43:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rax,%rsp
  jne    L43
L34:
  sub    $0x790,%rsp
  orq    $0x0,0x788(%rsp)
  mov    %rsp,%rax
  mov    %rsp,%r12
  cmp    %rax,%rsp
  je     L100
L126:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rax,%rsp
  jne    L126
L100:
  sub    $0x900,%rsp
  orq    $0x0,0x8f8(%rsp)
  mov    %rsp,%rax
  mov    %rsp,%r8
  cmp    %rax,%rsp
  je     L1
L120:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rax,%rsp
  jne    L120
L1:
  sub    $0x840,%rsp
  orq    $0x0,0x838(%rsp)
  mov    $0x18,%ecx
  lea    0x3(%rsp),%rdx
  mov    %r12,%rsi
  mov    %rdx,%rdi
  mov    %rdx,%rbx
  shr    $0x2,%rdi
  and    $0xfffffffffffffffc,%rbx
  cs nopw 0x0(%rax,%rax,1)
L51:
  lea    -0x17(%rcx),%eax
  mov    %rsi,%rdx
  cs nopw 0x0(%rax,%rax,1)
L94:
  mov    %eax,(%rdx)
  add    $0x1,%eax
  add    $0x4,%rdx
  cmp    %ecx,%eax
  jne    L94
  add    $0x5c,%rsi
  lea    0x15(%rax),%ecx
  cmp    $0x1bc,%eax
  jne    L51
  mov    %r8,%rsi
  mov    $0x272,%ecx
  nopl   0x0(%rax,%rax,1)
L81:
  lea    -0x271(%rcx),%eax
  mov    %rsi,%rdx
  nopl   0x0(%rax)
L22:
  mov    %eax,(%rdx)
  add    $0x19,%eax
  add    $0x4,%rdx
  cmp    %eax,%ecx
  jne    L22
  add    $0x1,%ecx
  add    $0x64,%rsi
  cmp    $0x289,%ecx
  jne    L81
  movq   $0x0,0x0(,%rdi,4)
  lea    0x8(%rbx),%rdi
  mov    %rbx,%rcx
  xor    %eax,%eax
  movq   $0x0,0x82c(%rbx)
  and    $0xfffffffffffffff8,%rdi
  sub    %rdi,%rcx
  add    $0x834,%ecx
  shr    $0x3,%ecx
  rep stos %rax,%es:(%rdi)
  mov    %r8,%rdi
  call   <xmp_desc_of@plt>
  mov    %r12,%rdi
  mov    %eax,%r13d
  call   <xmp_desc_of@plt>
  mov    %rbx,%rdi
  mov    %eax,%r12d
  call   <xmp_desc_of@plt>
  mov    %r13d,%edx
  mov    %r12d,%esi
  mov    %eax,%edi
  call   <xmp_matmul@plt>
  movsd  D23(%rip),%xmm7
  mov    %rbx,%rdx
  movsd  D43(%rip),%xmm6
  movsd  D9(%rip),%xmm5
  movsd  D4(%rip),%xmm4
  xor    %edi,%edi
  xor    %ecx,%ecx
  movsd  D1(%rip),%xmm8
  nopw   0x0(%rax,%rax,1)
L29:
  pxor   %xmm3,%xmm3
  xor    %eax,%eax
  cvtsi2sd %ecx,%xmm3
  mulsd  %xmm8,%xmm3
  nopw   0x0(%rax,%rax,1)
L57:
  pxor   %xmm0,%xmm0
  movapd %xmm3,%xmm1
  pxor   %xmm2,%xmm2
  cvtsi2sd %eax,%xmm0
  cvtsi2sdl (%rdx,%rax,4),%xmm2
  add    $0x1,%rax
  mulsd  %xmm7,%xmm0
  addsd  %xmm0,%xmm1
  mulsd  %xmm3,%xmm0
  mulsd  %xmm6,%xmm1
  mulsd  %xmm4,%xmm0
  addsd  %xmm5,%xmm1
  addsd  %xmm1,%xmm0
  subsd  %xmm0,%xmm2
  pxor   %xmm0,%xmm0
  cvtsi2sd %edi,%xmm0
  movapd %xmm2,%xmm1
  addsd  %xmm0,%xmm1
  cvttsd2si %xmm1,%edi
  cmp    $0x19,%rax
  jne    L57
  add    $0x1,%ecx
  add    $0x64,%rdx
  cmp    $0x15,%ecx
  jne    L29
  call   <chk_int2@plt>
  mov    -0x28(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L5
  lea    -0x18(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %rbp
  ret
L5:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: label: D23
type_infered: byte[8]
name: extract_symbolic_data
arguments: label: D43
type_infered: byte[8]
name: extract_symbolic_data
arguments: label: D9
type_infered: byte[8]
name: extract_symbolic_data
arguments: label: D4
type_infered: byte[8]
name: extract_symbolic_data
arguments: label: D1
type_infered: byte[8]

tool: {"D23": [0x00,0x00,0x00,0x00,0x00,0x00,0x39,0x40]}

tool: {"D43": [0x00,0x00,0x00,0x00,0x00,0x40,0x71,0x40]}

tool: {"D9": [0x00,0x00,0x00,0x00,0x00,0xe4,0xb0,0x40]}

tool: {"D4": [0x00,0x00,0x00,0x00,0x00,0x00,0x37,0x40]}

tool: {"D1": [0x00,0x00,0x00,0x00,0x00,0x00,0x35,0x40]}

assistant: ```c
void test_mm_njnini_b_c_bc_i4_d() {
  int n1 = 21, n2 = 23, n3 = 25;
  int a[n1][n2], b[n2][n3], x[n1][n3];
#pragma xmp nodes p(2, 2)
#pragma xmp template tx(0 : n1 - 1, 0 : n2 - 1)
#pragma xmp template ty(0 : n2 - 1, 0 : n3 - 1)
#pragma xmp template tz(0 : n1 - 1, 0 : n3 - 1)
#pragma xmp distribute tx(block, block) onto p
#pragma xmp distribute ty(cyclic, cyclic) onto p
#pragma xmp distribute tz(cyclic(2), cyclic(2)) onto p
#pragma xmp align a[i][*] with tx(i, *)
#pragma xmp align b[*][j] with ty(*, j)
#pragma xmp align x[*][j] with tz(*, j)
  int i, j, ierr;
  double rn1, rn2, rn3, rn4, rn5, rn6, ra, rb;
#pragma xmp loop(i) on tx(i, *)
  for (i = 0; i < n1; i++) {
    for (j = 0; j < n2; j++) {
      a[i][j] = i * n1 + j + 1;
    }
  }
  for (i = 0; i < n2; i++) {
#pragma xmp loop(j) on ty(*, j)
    for (j = 0; j < n3; j++) {
      b[i][j] = j * n3 + i + 1;
    }
  }
  for (i = 0; i < n1; i++) {
#pragma xmp loop(j) on tz(*, j)
    for (j = 0; j < n3; j++) {
      x[i][j] = 0;
    }
  }
  xmp_matmul(xmp_desc_of(x), xmp_desc_of(a), xmp_desc_of(b));
  ierr = 0;
  rn1 = n1;
  rn2 = n2;
  rn3 = n3;
  rn4 = rn2 * (rn2 + 1) * (2 * rn2 + 1) / 6.0;
  rn5 = rn2 * (rn2 + 1) / 2.0;
  for (i = 0; i < n1; i++) {
#pragma xmp loop(j) on tz(*, j)
    for (j = 0; j < n3; j++) {
      ra = i * rn1;
      rb = j * rn3;
      rn6 = rn4 + rn5 * (ra + rb) + ra * rb * rn2;
      ierr = ierr + (x[i][j] - rn6);
    }
  }
#pragma xmp task on p(1, 1 : 2)
  { chk_int2(ierr); }
}
```