user: 请从给定的汇编指令推导出C源代码：

```asm
<mskbits>:
  endbr64
  push   %rbx
  mov    %rsi,%rcx
  mov    %rdx,%rsi
  mov    (%rdi),%edx
  mov    %edx,%eax
  test   %dx,%dx
  je     L207
  and    $0x1,%edx
  jne    L201
  nopl   (%rax)
L103:
  shr    %ax
  test   $0x1,%al
  je     L103
L201:
  mov    %eax,%edx
  shr    %ax
  mov    %eax,%r11d
  and    $0x1,%edx
  and    $0x1,%r11d
  cmp    %edx,%r11d
  je     L328
  mov    %eax,%r9d
  movl   $0x1,(%rcx)
  mov    $0xf,%r8d
  mov    $0x1,%edi
  shr    %r9w
  mov    $0x1,%edx
  mov    $0x1,%r10d
  and    $0x1,%r9d
  cmp    %r11d,%r9d
  je     L313
L378:
  mov    %edx,(%rcx,%r10,4)
  lea    0x1(%r10),%r11d
  mov    $0x1,%edx
L258:
  mov    %eax,%r10d
  shr    $0x2,%r10w
  and    $0x1,%r10d
  cmp    %r10d,%r9d
  je     L354
  lea    0x1(%r11),%ebx
  movslq %r11d,%r11
  mov    %edx,(%rcx,%r11,4)
  mov    $0x1,%edx
L68:
  mov    %eax,%r9d
  shr    $0x3,%r9w
  and    $0x1,%r9d
  cmp    %r9d,%r10d
  je     L183
  lea    0x1(%rbx),%r11d
  movslq %ebx,%rbx
  mov    %edx,(%rcx,%rbx,4)
  mov    $0x1,%edx
L253:
  mov    %eax,%r10d
  shr    $0x4,%r10w
  and    $0x1,%r10d
  cmp    %r10d,%r9d
  je     L343
  lea    0x1(%r11),%ebx
  movslq %r11d,%r11
  mov    %edx,(%rcx,%r11,4)
  mov    $0x1,%edx
L91:
  mov    %eax,%r9d
  shr    $0x5,%r9w
  and    $0x1,%r9d
  cmp    %r9d,%r10d
  je     L362
  lea    0x1(%rbx),%r11d
  movslq %ebx,%rbx
  mov    %edx,(%rcx,%rbx,4)
  mov    $0x1,%edx
L53:
  mov    %eax,%r10d
  shr    $0x6,%r10w
  and    $0x1,%r10d
  cmp    %r10d,%r9d
  je     L175
  lea    0x1(%r11),%ebx
  movslq %r11d,%r11
  mov    %edx,(%rcx,%r11,4)
  mov    $0x1,%edx
L58:
  mov    %eax,%r9d
  shr    $0x7,%r9w
  and    $0x1,%r9d
  cmp    %r9d,%r10d
  je     L105
  lea    0x1(%rbx),%r11d
  movslq %ebx,%rbx
  mov    %edx,(%rcx,%rbx,4)
  mov    $0x1,%edx
L46:
  mov    %eax,%r10d
  shr    $0x8,%r10w
  and    $0x1,%r10d
  cmp    %r10d,%r9d
  je     L54
  lea    0x1(%r11),%ebx
  movslq %r11d,%r11
  mov    %edx,(%rcx,%r11,4)
  mov    $0x1,%edx
L261:
  mov    %eax,%r9d
  shr    $0x9,%r9w
  and    $0x1,%r9d
  cmp    %r9d,%r10d
  je     L120
  lea    0x1(%rbx),%r11d
  movslq %ebx,%rbx
  mov    %edx,(%rcx,%rbx,4)
  mov    $0x1,%edx
L306:
  mov    %eax,%r10d
  shr    $0xa,%r10w
  and    $0x1,%r10d
  cmp    %r10d,%r9d
  je     L33
  lea    0x1(%r11),%ebx
  movslq %r11d,%r11
  mov    %edx,(%rcx,%r11,4)
  mov    $0x1,%edx
L128:
  mov    %eax,%r9d
  shr    $0xb,%r9w
  and    $0x1,%r9d
  cmp    %r9d,%r10d
  je     L62
  lea    0x1(%rbx),%r11d
  movslq %ebx,%rbx
  mov    %edx,(%rcx,%rbx,4)
  mov    $0x1,%edx
L256:
  mov    %eax,%r10d
  shr    $0xc,%r10w
  and    $0x1,%r10d
  cmp    %r10d,%r9d
  je     L107
  lea    0x1(%r11),%ebx
  movslq %r11d,%r11
  mov    %edx,(%rcx,%r11,4)
  mov    $0x1,%edx
L262:
  mov    %eax,%r9d
  shr    $0xd,%r9w
  and    $0x1,%r9d
  cmp    %r9d,%r10d
  je     L10
  lea    0x1(%rbx),%r10d
  movslq %ebx,%rbx
  mov    %edx,(%rcx,%rbx,4)
  mov    $0x1,%edx
L341:
  shr    $0xe,%ax
  cmp    $0x10,%r8d
  jne    L16
  movzwl %ax,%eax
  cmp    %r9d,%eax
  je     L9
  lea    0x1(%r10),%r9d
  movslq %r10d,%r10
  mov    %edx,(%rcx,%r10,4)
  mov    $0x1,%edx
L242:
  movslq %r9d,%r8
  lea    0x1(%r9),%r10d
  shl    $0x2,%r8
  lea    (%rcx,%r8,1),%r11
  cmp    $0x1,%eax
  je     L358
  add    %edi,%edx
  mov    %edx,(%r11)
L379:
  mov    %r10d,(%rsi)
  pop    %rbx
  ret
  xchg   %ax,%ax
L207:
  movl   $0x0,(%rcx)
  mov    $0x10,%r8d
  xor    %edi,%edi
  xor    %r11d,%r11d
  mov    $0x1,%r10d
L301:
  mov    %eax,%r9d
  mov    $0x2,%edx
  shr    %r9w
  and    $0x1,%r9d
  cmp    %r11d,%r9d
  jne    L378
L313:
  add    $0x1,%edx
  mov    %r10d,%r11d
  jmp    L258
  nopl   0x0(%rax,%rax,1)
L183:
  add    $0x1,%edx
  mov    %ebx,%r11d
  jmp    L253
  nopl   0x0(%rax,%rax,1)
L354:
  add    $0x1,%edx
  mov    %r11d,%ebx
  jmp    L68
  nopl   0x0(%rax,%rax,1)
L62:
  add    $0x1,%edx
  mov    %ebx,%r11d
  jmp    L256
  nopl   0x0(%rax,%rax,1)
L358:
  mov    %edx,(%r11)
  cmp    $0x1,%edi
  jne    L379
  movl   $0x1,0x4(%rcx,%r8,1)
  lea    0x2(%r9),%r10d
  pop    %rbx
  mov    %r10d,(%rsi)
  ret
  xchg   %ax,%ax
L343:
  add    $0x1,%edx
  mov    %r11d,%ebx
  jmp    L91
  nopl   0x0(%rax,%rax,1)
L362:
  add    $0x1,%edx
  mov    %ebx,%r11d
  jmp    L53
  nopl   0x0(%rax,%rax,1)
L175:
  add    $0x1,%edx
  mov    %r11d,%ebx
  jmp    L58
  nopl   0x0(%rax,%rax,1)
L105:
  add    $0x1,%edx
  mov    %ebx,%r11d
  jmp    L46
  nopl   0x0(%rax,%rax,1)
L54:
  add    $0x1,%edx
  mov    %r11d,%ebx
  jmp    L261
  nopl   0x0(%rax,%rax,1)
L120:
  add    $0x1,%edx
  mov    %ebx,%r11d
  jmp    L306
  nopl   0x0(%rax,%rax,1)
L33:
  add    $0x1,%edx
  mov    %r11d,%ebx
  jmp    L128
L107:
  add    $0x1,%edx
  mov    %r11d,%ebx
  jmp    L262
L10:
  add    $0x1,%edx
  mov    %ebx,%r10d
  jmp    L341
L9:
  add    $0x1,%edx
  mov    %r10d,%r9d
  jmp    L242
L16:
  mov    %r9d,%eax
  mov    %r10d,%r9d
  jmp    L242
L328:
  mov    $0xf,%r8d
  mov    $0x1,%edi
  xor    %r10d,%r10d
  jmp    L301
```

assistant: ```c
void mskbits(int *mask, int *ibits, int *ndash) {
  int i, ic, ibit, ibitold;
  int nbits, nshft;
  unsigned short lmask;
  lmask = *mask;
  nshft = 0;
  if (lmask != 0) {
    while (!(ibitold = (lmask & 0x01)))
      lmask >>= 1;
    nshft++;
  }
  if (ibitold == 0) {
    *ndash = 0;
    exit;
  }
  nbits = ic = 0;
  for (i = 0; i < (16 - nshft); ++i) {
    ibit = (lmask & 0x01);
    if (ibit != ibitold) {
      ibits[ic++] = nbits;
      nbits = 0;
    }
    ibitold = ibit;
    nbits++;
    lmask >>= 1;
  }
  if (ibit == 1) {
    ibits[ic++] = nbits;
    if (nshft > 0)
      ibits[ic++] = nshft;
  } else
    ibits[ic++] = nbits + nshft;
  *ndash = ic;
}
```