user: What would the C source look like for the assembly code provided here:

```asm
<clean_mask>:
  endbr64
  mov    %rdi,%r8
  mov    %edx,%edi
  push   %r15
  imul   %ecx,%edi
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %ecx,%ebx
  mov    %rsi,-0x10(%rsp)
  mov    %edi,-0x4(%rsp)
  test   %edi,%edi
  jle    L336
  movslq %edi,%rsi
  mov    -0x10(%rsp),%rdi
  xor    %eax,%eax
  nop
L211:
  xor    %ecx,%ecx
  cmpq   $0x0,(%r8,%rax,8)
  setg   %cl
  mov    %rcx,(%rdi,%rax,8)
  add    $0x1,%rax
  cmp    %rsi,%rax
  jne    L211
L336:
  lea    -0x1(%rdx),%eax
  mov    -0x10(%rsp),%rcx
  movslq %ebx,%r15
  xor    %r10d,%r10d
  mov    %eax,-0x8(%rsp)
  lea    -0x1(%rbx),%esi
  xor    %eax,%eax
  test   %ebx,%ebx
  jg     L157
  jmp    L289
  nopw   0x0(%rax,%rax,1)
L216:
  add    $0x1,%r10d
L71:
  add    $0x1,%rax
  cmp    %r15,%rax
  je     L172
L157:
  cmpq   $0x0,(%rcx,%rax,8)
  jle    L71
  lea    (%rbx,%rax,1),%edx
  mov    %eax,%edi
  movslq %edx,%rdx
  mov    (%r8,%rdx,8),%rdx
  test   %rax,%rax
  je     L317
  add    -0x8(%r8,%rax,8),%rdx
L317:
  cmp    %edi,%esi
  jle    L47
  add    0x8(%r8,%rax,8),%rdx
L47:
  test   %rdx,%rdx
  jg     L216
  movq   $0x0,(%rcx,%rax,8)
  add    $0x1,%rax
  cmp    %r15,%rax
  jne    L157
L172:
  cmpl   $0x1,-0x8(%rsp)
  jle    L116
L232:
  mov    -0x10(%rsp),%rdi
  lea    -0x1(%rbx),%r9d
  lea    (%rbx,%rbx,1),%r11d
  xor    %r12d,%r12d
  lea    0x0(,%r15,8),%rax
  mov    $0x1,%r14d
  mov    %rax,-0x18(%rsp)
  lea    (%r8,%rax,1),%r13
  lea    0x8(%rdi,%rax,1),%rbp
L206:
  cmpq   $0x0,-0x8(%rbp)
  jle    L128
  lea    (%r12,%r11,1),%edx
  movslq %r12d,%rax
  movslq %edx,%rdx
  mov    (%r8,%rax,8),%rax
  add    (%r8,%rdx,8),%rax
  add    0x8(%r13),%rax
  test   %rax,%rax
  jle    L42
  add    $0x1,%r10d
L128:
  lea    0x1(%r12),%edx
  mov    %r13,%rsi
  mov    %rbp,%rcx
  cmp    $0x2,%ebx
  jg     L151
  jmp    L244
  nopl   0x0(%rax)
L58:
  add    $0x1,%r10d
L187:
  add    $0x1,%edx
  add    $0x8,%rcx
  add    $0x8,%rsi
  cmp    %r9d,%edx
  je     L244
L151:
  cmpq   $0x0,(%rcx)
  jle    L187
  lea    (%rdx,%r11,1),%edi
  movslq %edx,%rax
  movslq %edi,%rdi
  mov    (%r8,%rax,8),%rax
  add    (%r8,%rdi,8),%rax
  add    (%rsi),%rax
  add    0x10(%rsi),%rax
  test   %rax,%rax
  jg     L58
  add    $0x1,%edx
  movq   $0x0,(%rcx)
  add    $0x8,%rsi
  add    $0x8,%rcx
  cmp    %r9d,%edx
  jne    L151
L244:
  add    $0x1,%r14d
  cmpq   $0x0,-0x10(%rbp,%r15,8)
  jle    L286
  lea    (%r9,%r11,1),%edx
  movslq %r9d,%rax
  movslq %edx,%rdx
  mov    (%r8,%rax,8),%rax
  add    (%r8,%rdx,8),%rax
  add    -0x10(%r13,%r15,8),%rax
  test   %rax,%rax
  jle    L118
  add    $0x1,%r10d
L286:
  mov    -0x18(%rsp),%rax
  add    %ebx,%r12d
  add    %ebx,%r9d
  add    %rax,%r13
  add    %rax,%rbp
  cmp    -0x8(%rsp),%r14d
  jl     L206
  test   %ebx,%ebx
  jle    L120
L116:
  mov    -0x4(%rsp),%r11d
  mov    -0x10(%rsp),%rcx
  mov    %ebx,%r9d
  xor    %eax,%eax
  sub    %ebx,%r11d
  movslq %r11d,%rsi
  sub    %ebx,%r11d
  sub    $0x1,%ebx
  shl    $0x3,%rsi
  add    %rsi,%rcx
  add    %r8,%rsi
  jmp    L287
  cs nopw 0x0(%rax,%rax,1)
L300:
  add    $0x1,%r10d
L228:
  add    $0x1,%rax
  cmp    %r9,%rax
  je     L120
L287:
  cmpq   $0x0,(%rcx,%rax,8)
  jle    L228
  lea    (%r11,%rax,1),%edx
  mov    %eax,%edi
  movslq %edx,%rdx
  mov    (%r8,%rdx,8),%rdx
  test   %rax,%rax
  je     L194
  add    -0x8(%rsi,%rax,8),%rdx
L194:
  cmp    %edi,%ebx
  jle    L305
  add    0x8(%rsi,%rax,8),%rdx
L305:
  test   %rdx,%rdx
  jg     L300
  movq   $0x0,(%rcx,%rax,8)
  add    $0x1,%rax
  cmp    %r9,%rax
  jne    L287
L120:
  pop    %rbx
  mov    %r10d,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L42:
  movq   $0x0,-0x8(%rbp)
  jmp    L128
  nopl   (%rax)
L118:
  movq   $0x0,-0x10(%rbp,%r15,8)
  jmp    L286
L289:
  cmpl   $0x1,-0x8(%rsp)
  jg     L232
  jmp    L120
```

assistant: ```c
int clean_mask(const int8_t *__restrict msk, int8_t *__restrict ret, int ns, int nf) {
  int i, j, q, npx;
  int8_t t;
  npx = 0;
#pragma omp parallel for private(i)
  for (i = 0; i < ns * nf; i++) {
    if (msk[i] > 0) {
      ret[i] = 1;
    } else {
      ret[i] = 0;
    }
  }
  i = 0;
  for (j = 0; j < nf; j++) {
    q = i * nf + j;
    if (ret[q] > 0) {
      t = msk[q + nf];
      if (j > 0)
        t += msk[q - 1];
      if (j < (nf - 1))
        t += msk[q + 1];
      if (t > 0) {
        npx++;
      } else {
        ret[q] = 0;
      }
    }
  }
#pragma omp parallel for private(i, j, q, t) reduction(+ : npx)
  for (i = 1; i < (ns - 1); i++) {
    q = i * nf;
    if (ret[q] > 0) {
      t = msk[q - nf] + msk[q + nf] + msk[q + 1];
      if (t > 0) {
        npx++;
      } else {
        ret[q] = 0;
      }
    }
    for (j = 1; j < (nf - 1); j++) {
      q = i * nf + j;
      if (ret[q] > 0) {
        t = msk[q - nf] + msk[q + nf] + msk[q - 1] + msk[q + 1];
        if (t > 0) {
          npx++;
        } else {
          ret[q] = 0;
        }
      }
    }
    q = (i + 1) * nf - 1;
    if (ret[q] > 0) {
      t = msk[q - nf] + msk[q + nf] + msk[q - 1];
      if (t > 0) {
        npx++;
      } else {
        ret[q] = 0;
      }
    }
  }
  i = ns - 1;
  for (j = 0; j < nf; j++) {
    q = i * nf + j;
    if (ret[q] > 0) {
      t = msk[q - nf];
      if (j > 0)
        t += msk[q - 1];
      if (j < (nf - 1))
        t += msk[q + 1];
      if (t > 0) {
        npx++;
      } else {
        ret[q] = 0;
      }
    }
  }
  return npx;
}
```