user: Translate the below assembly code into C programming language:

```asm
<nand_usmatrix>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,-0x58(%rsp)
  mov    %rcx,-0x10(%rsp)
  mov    %r8,-0x28(%rsp)
  mov    %r9,-0x50(%rsp)
  cmp    %rdx,%rsi
  jg     L95
  mov    %rcx,%rax
  cmp    %r8,%rcx
  jg     L95
  lea    0x1(%rdx),%rbx
  lea    0x1(%r8),%r12
  pxor   %xmm1,%xmm1
  mov    %r8,%rdi
  sub    %rcx,%rdi
  mov    %rbx,-0x48(%rsp)
  movdqa D0(%rip),%xmm2
  lea    0x0(,%rcx,4),%rbx
  mov    %rdi,-0x40(%rsp)
  add    $0x1,%rdi
  lea    0x4(%rbx),%rbp
  mov    %rdi,%r11
  mov    %rdi,-0x38(%rsp)
  and    $0xfffffffffffffffc,%rdi
  add    %rdi,%rax
  mov    %rdi,-0x30(%rsp)
  shr    $0x2,%r11
  lea    0x1(%rax),%rdi
  lea    0x0(,%rax,4),%r13
  add    $0x2,%rax
  shl    $0x4,%r11
  mov    %rdi,-0x20(%rsp)
  lea    0x0(,%rdi,4),%r14
  lea    0x0(,%rax,4),%r15
  mov    %rax,-0x18(%rsp)
  nopl   0x0(%rax)
L104:
  mov    -0x58(%rsp),%rax
  mov    (%rax,%rsi,8),%rcx
  mov    -0x50(%rsp),%rax
  mov    (%rax,%rsi,8),%rdi
  mov    0x38(%rsp),%rax
  lea    (%rcx,%rbp,1),%r9
  mov    (%rax,%rsi,8),%r10
  lea    (%rdi,%rbp,1),%r8
  lea    (%r10,%rbx,1),%rdx
  mov    %rdx,%rax
  sub    %r8,%rax
  mov    %rdx,%r8
  cmp    $0x8,%rax
  seta   %al
  sub    %r9,%r8
  cmp    $0x8,%r8
  seta   %r8b
  test   %r8b,%al
  je     L61
  cmpq   $0x2,-0x40(%rsp)
  jbe    L61
  lea    (%rcx,%rbx,1),%r9
  lea    (%rdi,%rbx,1),%r8
  xor    %eax,%eax
  nopl   0x0(%rax)
L97:
  movdqu (%r9,%rax,1),%xmm0
  movdqu (%r8,%rax,1),%xmm3
  pand   %xmm3,%xmm0
  pcmpeqd %xmm1,%xmm0
  pand   %xmm2,%xmm0
  movups %xmm0,(%rdx,%rax,1)
  add    $0x10,%rax
  cmp    %r11,%rax
  jne    L97
  mov    -0x30(%rsp),%rdx
  cmp    %rdx,-0x38(%rsp)
  je     L39
  mov    (%rcx,%r13,1),%eax
  and    (%rdi,%r13,1),%eax
  sete   %al
  mov    -0x28(%rsp),%rdx
  movzbl %al,%eax
  mov    %eax,(%r10,%r13,1)
  mov    -0x20(%rsp),%rax
  cmp    %rax,%rdx
  jl     L39
  mov    (%rcx,%r14,1),%eax
  and    (%rdi,%r14,1),%eax
  sete   %al
  movzbl %al,%eax
  mov    %eax,(%r10,%r14,1)
  mov    -0x18(%rsp),%rax
  cmp    %rax,%rdx
  jl     L39
  mov    (%rcx,%r15,1),%eax
  and    (%rdi,%r15,1),%eax
  sete   %al
  movzbl %al,%eax
  mov    %eax,(%r10,%r15,1)
L39:
  add    $0x1,%rsi
  cmp    -0x48(%rsp),%rsi
  jne    L104
L95:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L61:
  mov    -0x10(%rsp),%rax
  nopl   (%rax)
L89:
  mov    (%rdi,%rax,4),%edx
  and    (%rcx,%rax,4),%edx
  sete   %dl
  movzbl %dl,%edx
  mov    %edx,(%r10,%rax,4)
  add    $0x1,%rax
  cmp    %r12,%rax
  jne    L89
  jmp    L39
```

tool_calls: name: unpack_data
arguments: tag: D0
type: byte[16]

tool: {"D0": [0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00]}

assistant: ```c
void nand_usmatrix(ushort **m1, long nrl, long nrh, long ncl, long nch, ushort **m2, ushort **m3) {
  long i, j;
  ushort x, y, z, *Xi, *Yi, *Zi;
  for (i = nrl; i <= nrh; i++) {
    Xi = m1[i];
    Yi = m2[i];
    Zi = m3[i];
    for (j = ncl; j <= nch; j++) {
      x = Xi[j];
      y = Yi[j];
      z = !(x & y);
      Zi[j] = z;
    }
  }
}
```